|
|
@@ -401,7 +401,7 @@ import {
|
|
|
{ required: true, message: '请选择客户名称', trigger: 'change' }
|
|
|
],
|
|
|
linkName: [
|
|
|
- { required: this.form.needProduce != 2 ? true : false, message: '请输入', trigger: ['blur', 'change'] }
|
|
|
+ { required: this.form.needProduce != 2 ? true : false, message: '请输入', trigger: ['blur', 'change'] }
|
|
|
],
|
|
|
linkPhone: [
|
|
|
{ required: this.form.needProduce != 2 ? true : false, message: '请输入', trigger: 'change' }
|
|
|
@@ -433,7 +433,7 @@ import {
|
|
|
productionRequirements: obj.map((item) => item.productionRequirements).toString(),
|
|
|
orderIds: obj.map((item) => item.id).toString(),
|
|
|
orderNo: obj.map((item) => item.orderNo).toString(),
|
|
|
- needProduce: obj.map((item) => item.needProduce),
|
|
|
+ // needProduce: obj.map((item) => item.needProduce),
|
|
|
sourceType: 1,
|
|
|
});
|
|
|
this.getSaleOrderDetails(obj.map((item) => item.id));
|
|
|
@@ -444,13 +444,15 @@ import {
|
|
|
code: 'eom_saleOrder_addInvoice'
|
|
|
});
|
|
|
|
|
|
+ console.log('eom_saleOrder_addInvoice', res)
|
|
|
+
|
|
|
let data = {
|
|
|
...res[0],
|
|
|
orderIds: res.map((item) => item.id).toString(),
|
|
|
orderNo: res.map((item) => item.orderNo).toString(),
|
|
|
productList: res.map((item) => item.productList).flat(),
|
|
|
typedetailIds: res.map((item) => item.typedetailIds).flat(),
|
|
|
-
|
|
|
+ // needProduce: res.map((item) => item.needProduce),
|
|
|
totalAmount: res.reduce(
|
|
|
(sum, obj) =>
|
|
|
sum + ((obj.totalAmount && Number(obj.totalAmount)) || 0),
|
|
|
@@ -500,7 +502,8 @@ import {
|
|
|
projectCode,
|
|
|
totalPrice,
|
|
|
receiveAddress,
|
|
|
- productionRequirements
|
|
|
+ productionRequirements,
|
|
|
+ needProduce
|
|
|
} = data;
|
|
|
if (productList && productList.length > 0) {
|
|
|
productList.forEach((v) => {
|
|
|
@@ -526,7 +529,9 @@ import {
|
|
|
projectId,
|
|
|
projectSn: projectCode,
|
|
|
productionRequirements,
|
|
|
+ needProduce
|
|
|
});
|
|
|
+ console.log('form~~~~~~~~~~', this.form)
|
|
|
productList.forEach((item, index) => {
|
|
|
item['tempId'] = index;
|
|
|
item.id = '';
|
|
|
@@ -614,6 +619,7 @@ import {
|
|
|
});
|
|
|
data.carNo = data.carNo ? data.carNo.split(',') : [];
|
|
|
this.form = data;
|
|
|
+ this.form.needProduce = data?.saleOrderList[0]?.needProduce;
|
|
|
this.form.deliveryTypeId = data.deliveryTypeId+'';
|
|
|
this.$refs.inventoryTableref &&
|
|
|
this.$refs.inventoryTableref.putTableValue(
|