|
|
@@ -1066,7 +1066,7 @@
|
|
|
return {
|
|
|
categoryId: item.productId || item.categoryId,
|
|
|
num: item.totalCount,
|
|
|
- batchNo: item.batchNo || '',
|
|
|
+ batchNo: item.batchNo || ''
|
|
|
};
|
|
|
})
|
|
|
};
|
|
|
@@ -1083,6 +1083,44 @@
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //采购委外
|
|
|
+ if (this.form.productList?.length > 0) {
|
|
|
+ this.getStaffList({ id: this.form.deptId }).then(() => {
|
|
|
+ this.formData.fromId = this.form.makerId;
|
|
|
+ this.formData.fromUser = this.form.makerName;
|
|
|
+ this.formData.extInfo.verifyDeptCode = this.form.deptId;
|
|
|
+ this.formData.extInfo.verifyDeptName = this.form.deptName;
|
|
|
+ });
|
|
|
+ let pData = {
|
|
|
+ type: '1',
|
|
|
+ builders: this.form.productList.map((item) => {
|
|
|
+ return {
|
|
|
+ categoryId: item.productId,
|
|
|
+ num: item.totalCount,
|
|
|
+ price: item.totalPrice,
|
|
|
+ unitPrice: item.singlePrice,
|
|
|
+ weight: item.singleWeight * item.totalCount || 0,
|
|
|
+ batchNo: item.batchNo || '',
|
|
|
+ taskId: item.taskId || ''
|
|
|
+ };
|
|
|
+ })
|
|
|
+ };
|
|
|
+ let pData2 = {
|
|
|
+ type: 3,
|
|
|
+ taskIds: this.form.productList.map((item) => item.taskId),
|
|
|
+ workOrderIds: [this.form.sourceId]
|
|
|
+ };
|
|
|
+
|
|
|
+ storageApi
|
|
|
+ .getHierarchyFifo(this.form.sourceId ? pData2 : pData)
|
|
|
+ .then((data) => {
|
|
|
+ this.detailData(data, this.dimension);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
}
|
|
|
// if (this.form.productList?.length > 0) {
|
|
|
// this.getStaffList({ id: this.form.deptId }).then(() => {
|
|
|
@@ -1213,7 +1251,7 @@
|
|
|
);
|
|
|
},
|
|
|
deep: true
|
|
|
- },
|
|
|
+ }
|
|
|
// detailList: {
|
|
|
// handler(newVal) {
|
|
|
// if (newVal.length) {
|