Commit 8ca9bc53 authored by Marcus's avatar Marcus

配合接口修改入仓时商品的入仓特性

https://zentao.test.jdshangmen.com/bug-view-3781.html
parent d236c3d2
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px"> <el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form.prodAttrIds"> <el-checkbox-group v-model="form.warehouseInProdAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox> <el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px"> <el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form1.prodAttrIds"> <el-checkbox-group v-model="form1.warehouseInProdAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox> <el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
...@@ -638,7 +638,7 @@ export default { ...@@ -638,7 +638,7 @@ export default {
inTime: undefined, inTime: undefined,
material: undefined, material: undefined,
orderItemId: undefined, orderItemId: undefined,
prodAttrIds: [], warehouseInProdAttrIds: [],
prodId: undefined, prodId: undefined,
prodTitleEn: undefined, prodTitleEn: undefined,
prodTitleZh: undefined, prodTitleZh: undefined,
...@@ -657,7 +657,7 @@ export default { ...@@ -657,7 +657,7 @@ export default {
inTime: undefined, inTime: undefined,
material: undefined, material: undefined,
orderItemId: undefined, orderItemId: undefined,
prodAttrIds: [], warehouseInProdAttrIds: [],
prodId: undefined, prodId: undefined,
prodTitleEn: undefined, prodTitleEn: undefined,
prodTitleZh: undefined, prodTitleZh: undefined,
...@@ -728,7 +728,10 @@ export default { ...@@ -728,7 +728,10 @@ export default {
this.form.orderId = this.warehousing.orderId this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderItemId this.form.orderItemId = this.warehousing.orderItemId
this.form.orderNo = this.warehousing.orderNo this.form.orderNo = this.warehousing.orderNo
this.form.prodAttrIds = this.warehousing.prodAttrIds?.split(',').map(e => +e) || [] this.form.warehouseInProdAttrIds =
this.warehousing.warehouseInProdAttrIds?.split(',').map(e => +e)
|| this.warehousing.prodAttrIds?.split(',').map(e => +e)
|| []
this.form.prodId = this.warehousing.prodId this.form.prodId = this.warehousing.prodId
this.form.prodTitleEn = this.warehousing.prodTitleEn this.form.prodTitleEn = this.warehousing.prodTitleEn
this.form.prodTitleZh = this.warehousing.prodTitleZh this.form.prodTitleZh = this.warehousing.prodTitleZh
...@@ -784,7 +787,7 @@ export default { ...@@ -784,7 +787,7 @@ export default {
handleSubmit() { handleSubmit() {
if (this.activeName !== "first"){ if (this.activeName !== "first"){
// 添加非填单货物 // 添加非填单货物
if (this.form1.prodAttrIds.indexOf(4) !== -1) { if (this.form1.warehouseInProdAttrIds.indexOf(4) !== -1) {
return this.$notify({ return this.$notify({
title: this.$t('提示'), title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"), message: this.$t("订单包含不接受货物,请检查"),
...@@ -802,7 +805,7 @@ export default { ...@@ -802,7 +805,7 @@ export default {
orderId: this.warehousing.orderId, orderId: this.warehousing.orderId,
orderItemId: undefined, orderItemId: undefined,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
prodAttrIds: this.form.prodAttrIds.join(','), warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => { orderWarehouseInItemDoList: this.form1.table.map(e => {
return { return {
...e, ...e,
...@@ -821,7 +824,7 @@ export default { ...@@ -821,7 +824,7 @@ export default {
}) })
}) })
} else { } else {
if (this.form.prodAttrIds.indexOf(4) !== -1) { if (this.form.warehouseInProdAttrIds.indexOf(4) !== -1) {
return this.$notify({ return this.$notify({
title: this.$t('提示'), title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"), message: this.$t("订单包含不接受货物,请检查"),
...@@ -845,7 +848,7 @@ export default { ...@@ -845,7 +848,7 @@ export default {
volume: (+this.warehousing.volume)?.toFixed(2) || '', volume: (+this.warehousing.volume)?.toFixed(2) || '',
weight: (+this.warehousing.weight)?.toFixed(2) || '', weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.form.prodId, prodId: this.form.prodId,
prodAttrIds: this.form.prodAttrIds.join(','), warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','),
"orderWarehouseInUpdateItemDoList": this.form.table.map(e => { "orderWarehouseInUpdateItemDoList": this.form.table.map(e => {
return { return {
...e, ...e,
...@@ -871,7 +874,7 @@ export default { ...@@ -871,7 +874,7 @@ export default {
orderItemId: this.warehousing.orderItemId, orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined, isAppend: this.isAdd ? true : undefined,
prodAttrIds: this.form.prodAttrIds.join(','), warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','),
orderWarehouseInItemDoList: this.form.table.map(e => { orderWarehouseInItemDoList: this.form.table.map(e => {
return { return {
...e, ...e,
...@@ -910,13 +913,13 @@ export default { ...@@ -910,13 +913,13 @@ export default {
this.form.prodTitleZh = product.titleZh this.form.prodTitleZh = product.titleZh
this.form.prodTitleEn = product.titleEn this.form.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form.brand)) this.handleBrandChange(parseInt(this.form.brand))
this.form.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : [] this.form.warehouseInProdAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
}, },
onProductChange1(product){ onProductChange1(product){
this.form1.prodTitleZh = product.titleZh this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn this.form1.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form1.brand)) this.handleBrandChange(parseInt(this.form1.brand))
this.form1.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : [] this.form1.warehouseInProdAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
}, },
getProductBrandPage(titleZh = undefined) { getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => { getProductBrankPage({pageSize: 20, titleZh}).then(r => {
...@@ -1011,10 +1014,10 @@ export default { ...@@ -1011,10 +1014,10 @@ export default {
this.$modal.msgSuccess(this.$t("新增成功")) this.$modal.msgSuccess(this.$t("新增成功"))
if (this.activeName === 'first') { if (this.activeName === 'first') {
this.form.prodId = response.data this.form.prodId = response.data
this.form.prodAttrIds = this.productForm.attrArray this.form.warehouseInProdAttrIds = this.productForm.attrArray
} else { } else {
this.form1.prodId = response.data this.form1.prodId = response.data
this.form1.prodAttrIds = this.productForm.attrArray this.form1.warehouseInProdAttrIds = this.productForm.attrArray
} }
this.productCancel() this.productCancel()
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment