|
@@ -123,7 +123,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import moment from 'moment'
|
|
|
import { randomUUID } from '@/utils/util'
|
|
|
-import { queryOrderData, confimOrderData } from '@api/document/shipmentList'
|
|
|
+import { queryOrderData, confimOrderData,addShipmentList } from '@api/document/shipmentList'
|
|
|
|
|
|
export default {
|
|
|
name: 'ReferOrderDataModal', // 参照订单数据弹框
|
|
@@ -427,6 +427,7 @@ export default {
|
|
|
confirmLoading: false,
|
|
|
referOrderDataModVis: false,
|
|
|
error:'', // 选中数据不符合的字段名
|
|
|
+ errorIdentical:[],//选中多行数据客户、分销点不同字段
|
|
|
errorFather: '', //选中数据与已有数据不同集合
|
|
|
|
|
|
// 查询条件
|
|
@@ -499,6 +500,10 @@ export default {
|
|
|
} else if(this.selectedRows !== 1 && this.error !==''){
|
|
|
this.$message.error(this.error+'至少一项不相同!');
|
|
|
this.error = ''
|
|
|
+ }else if(this.selectedRows !== 1 && this.errorIdentical.length !== 0){
|
|
|
+ var identical = this.errorIdentical.toString()
|
|
|
+ this.$message.error(identical+'不相同!');
|
|
|
+ this.errorIdentical = []
|
|
|
}else{
|
|
|
var garment = ''
|
|
|
if(this.queryParam.flourOrGarment == 1){
|
|
@@ -506,17 +511,19 @@ export default {
|
|
|
}else {
|
|
|
garment = '面料'
|
|
|
}
|
|
|
- confimOrderData({itemId:this.confimList,readyFabric:garment}).then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.propList = res.result;
|
|
|
- this.$emit('bao', this.propList);
|
|
|
+ this.loading = true
|
|
|
+ addShipmentList({itemId:this.confimList,readyFabric:garment}).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.loading = false
|
|
|
+ this.referOrderDataModVis = false;
|
|
|
+ this.selectedRowKeys = [];
|
|
|
+ this.selectedRows = [];
|
|
|
+ this.searchReset();
|
|
|
+ this.$message.success('添加成功')
|
|
|
+ }else {
|
|
|
+ this.$message.error('res.message')
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- this.referOrderDataModVis = false;
|
|
|
- this.selectedRowKeys = [];
|
|
|
- this.selectedRows = [];
|
|
|
- this.searchReset();
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -531,7 +538,9 @@ export default {
|
|
|
inventoryCodeTest = [],
|
|
|
inventoryNameTest = [],
|
|
|
colourTest = [],
|
|
|
- sizeTest = []
|
|
|
+ sizeTest = [],
|
|
|
+ custorTest = [],
|
|
|
+ distributionPointTest = []
|
|
|
this.selectedRows.map(item=>{
|
|
|
this.confimList.push(item.syOrderDataItemId);
|
|
|
orderTest.push(item.orderNumber)
|
|
@@ -543,21 +552,16 @@ export default {
|
|
|
inventoryNameTest.push(item.inventoryName)
|
|
|
colourTest.push(item.colour)
|
|
|
sizeTest.push(item.size)
|
|
|
+ custorTest.push(item.customerName)
|
|
|
+ distributionPointTest.push(item.distributionPoint)
|
|
|
})
|
|
|
if([...new Set(orderTest)].length == 1 && [...new Set(poTest)].length == 1 &&[...new Set(preDeliveryTest)].length == 1&&
|
|
|
[...new Set(preCompletionTest)].length == 1 && [...new Set(itemNumberTest)].length == 1 &&[...new Set(inventoryCodeTest)].length !== 1&&
|
|
|
[...new Set(inventoryNameTest)].length == 1 && [...new Set(colourTest)].length == 1 &&[...new Set(sizeTest)].length == 1){
|
|
|
this.error = '订单号,小po,预发货日期,预完工日期,款号,存货编码,存货名称,颜色,尺码'
|
|
|
}
|
|
|
- // if([...new Set(orderTest)].length !== 1){this.error.push('订单号')}
|
|
|
- // if([...new Set(poTest)].length !== 1){this.error.push('小po')}
|
|
|
- // if([...new Set(preDeliveryTest)].length !== 1){this.error.push('预发货日期')}
|
|
|
- // if([...new Set(preCompletionTest)].length !== 1){this.error.push('预完工日期')}
|
|
|
- // if([...new Set(itemNumberTest)].length !== 1){this.error.push('款号')}
|
|
|
- // if([...new Set(inventoryCodeTest)].length !== 1){this.error.push('存货编码')}
|
|
|
- // if([...new Set(inventoryNameTest)].length !== 1){this.error.push('存货名称')}
|
|
|
- // if([...new Set(colourTest)].length !== 1){this.error.push('颜色')}
|
|
|
- // if([...new Set(sizeTest)].length !== 1){this.error.push('尺码')}
|
|
|
+ if([...new Set(custorTest)].length !== 1){this.errorIdentical.push('客户名称不相同')}
|
|
|
+ if([...new Set(distributionPointTest)].length !== 1){this.errorIdentical.push('分销点')}
|
|
|
},
|
|
|
|
|
|
//已有参考列表
|
|
@@ -579,10 +583,10 @@ export default {
|
|
|
// // if(father.size !== sons.size){this.errorFather.push('尺码')}
|
|
|
// },
|
|
|
|
|
|
- // handleTableChange(pagination, filters, sorter) {
|
|
|
- // this.queryParam.pageNo = pagination.current;
|
|
|
- // this.getOrderList();
|
|
|
- // },
|
|
|
+ handleTableChange(pagination, filters, sorter) {
|
|
|
+ this.queryParam.pageNo = pagination.current;
|
|
|
+ this.getOrderList();
|
|
|
+ },
|
|
|
|
|
|
searchQuery() {
|
|
|
|