|
@@ -486,6 +486,7 @@
|
|
|
import { parameterGetByCode } from '@/api/main/index.js';
|
|
import { parameterGetByCode } from '@/api/main/index.js';
|
|
|
import { getSummaries } from '@/utils/util.js';
|
|
import { getSummaries } from '@/utils/util.js';
|
|
|
import { getBatchList } from '@/api/wms';
|
|
import { getBatchList } from '@/api/wms';
|
|
|
|
|
+ import Vue from 'vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [dictMixins, getDynamicsColumns, tabMixins],
|
|
mixins: [dictMixins, getDynamicsColumns, tabMixins],
|
|
@@ -514,6 +515,10 @@
|
|
|
},
|
|
},
|
|
|
isTotalCount: {
|
|
isTotalCount: {
|
|
|
default: 0
|
|
default: 0
|
|
|
|
|
+ },
|
|
|
|
|
+ isReturnGoodsCreate: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
@@ -1127,6 +1132,7 @@
|
|
|
warehouseId: data?.warehouseId || '',
|
|
warehouseId: data?.warehouseId || '',
|
|
|
code: row.productCode,
|
|
code: row.productCode,
|
|
|
batchNo: row.batchNo,
|
|
batchNo: row.batchNo,
|
|
|
|
|
+ systemBatchNo: row.systemBatchNo,
|
|
|
colorKey: row.colorKey,
|
|
colorKey: row.colorKey,
|
|
|
modelType: row.modelType
|
|
modelType: row.modelType
|
|
|
});
|
|
});
|
|
@@ -1182,6 +1188,7 @@
|
|
|
warehouseId: row.warehouseId,
|
|
warehouseId: row.warehouseId,
|
|
|
code: row.productCode,
|
|
code: row.productCode,
|
|
|
batchNo: row.batchNo,
|
|
batchNo: row.batchNo,
|
|
|
|
|
+ systemBatchNo: row.systemBatchNo,
|
|
|
colorKey: row.colorKey,
|
|
colorKey: row.colorKey,
|
|
|
modelType: row.modelType
|
|
modelType: row.modelType
|
|
|
})
|
|
})
|
|
@@ -1527,7 +1534,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
setValue(data) {
|
|
setValue(data) {
|
|
|
- console.log('setValue~~~~~~', data);
|
|
|
|
|
|
|
+ console.log('setValue~~~~~~', data, this.sourceType);
|
|
|
let indexS = [];
|
|
let indexS = [];
|
|
|
data.forEach((item, index) => {
|
|
data.forEach((item, index) => {
|
|
|
if (item.modelKey) {
|
|
if (item.modelKey) {
|
|
@@ -1537,9 +1544,36 @@
|
|
|
this.$set(data[index], 'colorKey', item.colorKey);
|
|
this.$set(data[index], 'colorKey', item.colorKey);
|
|
|
}
|
|
}
|
|
|
item.receiveTotalWeight = item.receiveTotalWeight || 0;
|
|
item.receiveTotalWeight = item.receiveTotalWeight || 0;
|
|
|
-
|
|
|
|
|
- // item.saleCount = item.notGenerateSendCount || item.saleCount;
|
|
|
|
|
- // item.totalCount = item.saleCount || item.totalCount;
|
|
|
|
|
|
|
+ // console.log('item~~~~', item, this.sourceType);
|
|
|
|
|
+ // if(!this.isReturnGoodsCreate) {
|
|
|
|
|
+ // console.log('isReturnGoodsCreate', this.isReturnGoodsCreate)
|
|
|
|
|
+ // item.totalCount = item.notGenerateSendCount || item.totalCount;
|
|
|
|
|
+ // // item.saleCount = item.notGenerateSendCount || item.saleCount;
|
|
|
|
|
+ // let total = item.totalCount || 0;
|
|
|
|
|
+ // let _endIndex = 0; //计算单重需要
|
|
|
|
|
+ // if (item.packageDispositionList) {
|
|
|
|
|
+ // let endIndex = item.packageDispositionList.findIndex(
|
|
|
|
|
+ // (ite) => item.saleUnitId == ite.id
|
|
|
|
|
+ // );
|
|
|
|
|
+ // _endIndex = endIndex;
|
|
|
|
|
+ // let packageData = item.packageDispositionList.find(
|
|
|
|
|
+ // (ite) => item.saleUnitId== ite.id
|
|
|
|
|
+ // );
|
|
|
|
|
+ // item.saleUnitId = packageData?.conversionUnit;
|
|
|
|
|
+ // if (item.weightUnit == item.measuringUnit && item.singleWeight) {
|
|
|
|
|
+ // item.packageDispositionList[1].packageCell = item.singleWeight;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // for (; 0 < endIndex; endIndex--) {
|
|
|
|
|
+ // total = Vue.prototype.$math.format(
|
|
|
|
|
+ // total / item.packageDispositionList[endIndex].packageCell,
|
|
|
|
|
+ // 14
|
|
|
|
|
+ // );
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // item.saleCount = total;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// this.changeCount(item, index, false);
|
|
// this.changeCount(item, index, false);
|
|
|
|
|
|
|
|
if (item.weightUnit == item.measuringUnit) {
|
|
if (item.weightUnit == item.measuringUnit) {
|
|
@@ -1588,6 +1622,7 @@
|
|
|
warehouseId: item.warehouseId,
|
|
warehouseId: item.warehouseId,
|
|
|
code: item.productCode,
|
|
code: item.productCode,
|
|
|
batchNo: item.batchNo,
|
|
batchNo: item.batchNo,
|
|
|
|
|
+ systemBatchNo: item.systemBatchNo,
|
|
|
colorKey: item.colorKey,
|
|
colorKey: item.colorKey,
|
|
|
modelType: item.modelType
|
|
modelType: item.modelType
|
|
|
})
|
|
})
|
|
@@ -1646,6 +1681,7 @@
|
|
|
warehouseId: item.warehouseId,
|
|
warehouseId: item.warehouseId,
|
|
|
code: item.productCode,
|
|
code: item.productCode,
|
|
|
batchNo: item.batchNo,
|
|
batchNo: item.batchNo,
|
|
|
|
|
+ systemBatchNo: item.systemBatchNo,
|
|
|
colorKey: item.colorKey,
|
|
colorKey: item.colorKey,
|
|
|
modelType: item.modelType
|
|
modelType: item.modelType
|
|
|
})
|
|
})
|
|
@@ -1672,11 +1708,13 @@
|
|
|
let tempBatchNoList = templist1?.list || [];
|
|
let tempBatchNoList = templist1?.list || [];
|
|
|
console.log('888~~~~', index, item.batchNo);
|
|
console.log('888~~~~', index, item.batchNo);
|
|
|
|
|
|
|
|
- // 新数据按系统批次精确匹配,历史数据保持按外部批次号兼容匹配
|
|
|
|
|
|
|
+ // 优先按批次明细ID匹配,无ID时按系统批次和业务批次兼容匹配
|
|
|
const batchNoObj = tempBatchNoList.find(
|
|
const batchNoObj = tempBatchNoList.find(
|
|
|
(i) =>
|
|
(i) =>
|
|
|
- i.batchNo == item.batchNo &&
|
|
|
|
|
- (!item.systemBatchNo || i.systemBatchNo == item.systemBatchNo)
|
|
|
|
|
|
|
+ (item.batchStockId && i.id == item.batchStockId) ||
|
|
|
|
|
+ (!item.batchStockId &&
|
|
|
|
|
+ i.batchNo == item.batchNo &&
|
|
|
|
|
+ (!item.systemBatchNo || i.systemBatchNo == item.systemBatchNo))
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
if (batchNoObj) {
|
|
if (batchNoObj) {
|
|
@@ -1685,6 +1723,11 @@
|
|
|
'batchStockId',
|
|
'batchStockId',
|
|
|
batchNoObj.id
|
|
batchNoObj.id
|
|
|
);
|
|
);
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.form.datasource[index],
|
|
|
|
|
+ 'systemBatchNo',
|
|
|
|
|
+ batchNoObj.systemBatchNo || ''
|
|
|
|
|
+ );
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.form.datasource[index],
|
|
this.form.datasource[index],
|
|
|
'warehouseNum',
|
|
'warehouseNum',
|