|
@@ -81,8 +81,9 @@ function getCarriers() {
|
|
carriers.value.push(
|
|
carriers.value.push(
|
|
...res.rows.map((v) => ({ value: v.id, label: v.code }))
|
|
...res.rows.map((v) => ({ value: v.id, label: v.code }))
|
|
);
|
|
);
|
|
- carriers.value.push(...form.value.carriers);
|
|
|
|
- console.log(carriers.value);
|
|
|
|
|
|
+ console.log(form.value.carriers);
|
|
|
|
+ carriers.value.push(...form.value.carriers.map(v => ({ value: v.id, label: v.code })));
|
|
|
|
+ // console.log(carriers.value);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -93,25 +94,24 @@ function getNowCarriers(data) {
|
|
form.value.carriers =
|
|
form.value.carriers =
|
|
res.data.dayworkCarrierList && res.data.dayworkCarrierList.length > 0
|
|
res.data.dayworkCarrierList && res.data.dayworkCarrierList.length > 0
|
|
? res.data.dayworkCarrierList.filter(v => v.processInspectionId == "0").map((v) => ({
|
|
? res.data.dayworkCarrierList.filter(v => v.processInspectionId == "0").map((v) => ({
|
|
- value: v.carrierId,
|
|
|
|
- label: v.carrierCode,
|
|
|
|
|
|
+ id: v.carrierId,
|
|
|
|
+ code: v.carrierCode,
|
|
}))
|
|
}))
|
|
: [];
|
|
: [];
|
|
|
|
|
|
const carriers = res.data.dayworkCarrierList && res.data.dayworkCarrierList.length > 0
|
|
const carriers = res.data.dayworkCarrierList && res.data.dayworkCarrierList.length > 0
|
|
? res.data.dayworkCarrierList.filter(v => v.processInspectionId == "0").map((v) => ({
|
|
? res.data.dayworkCarrierList.filter(v => v.processInspectionId == "0").map((v) => ({
|
|
- id: v.carrierId,
|
|
|
|
- code: v.carrierCode,
|
|
|
|
|
|
+ value: v.carrierId,
|
|
|
|
+ label: v.carrierCode,
|
|
}))
|
|
}))
|
|
: []
|
|
: []
|
|
- form.value.carrierIds = res.data.carrierIds.filter(v => carriers.some(e => e.id == v));
|
|
|
|
|
|
+ form.value.carrierIds = res.data.carrierIds.filter(v => form.value.carriers.some(e => e.id == v));
|
|
getCarriers()
|
|
getCarriers()
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function getTurnoverDept(data) {
|
|
function getTurnoverDept(data) {
|
|
- let lastProcessStepNumber =
|
|
|
|
- data.processes[data.processes.length - 1].processStepNumber;
|
|
|
|
|
|
+ let lastProcessStepNumber = data.processes[data.processes.length - 1].processStepNumber;
|
|
getTurnoverDeptList({
|
|
getTurnoverDeptList({
|
|
dayworkId: form.value.dayworkId,
|
|
dayworkId: form.value.dayworkId,
|
|
processStepNumber: lastProcessStepNumber,
|
|
processStepNumber: lastProcessStepNumber,
|
|
@@ -122,7 +122,7 @@ function getTurnoverDept(data) {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function remoteCarriers(queryString, choiced) {
|
|
function remoteCarriers(queryString, choiced) {
|
|
- console.log(choiced);
|
|
|
|
|
|
+ // console.log(choiced);
|
|
loadingCarrier.value = true;
|
|
loadingCarrier.value = true;
|
|
listCarriers({
|
|
listCarriers({
|
|
isAbandoned: 0,
|
|
isAbandoned: 0,
|
|
@@ -135,6 +135,7 @@ function remoteCarriers(queryString, choiced) {
|
|
label: v.code,
|
|
label: v.code,
|
|
category: v.categoryId,
|
|
category: v.categoryId,
|
|
}));
|
|
}));
|
|
|
|
+ // console.log(choiced)
|
|
carriers.value.push(
|
|
carriers.value.push(
|
|
...choiced
|
|
...choiced
|
|
.filter((v) => !carriers.value.map((e) => e.value).includes(v.id))
|
|
.filter((v) => !carriers.value.map((e) => e.value).includes(v.id))
|
|
@@ -200,8 +201,8 @@ function handleSave() {
|
|
form.value.productionDeptName = deptList.value.find(
|
|
form.value.productionDeptName = deptList.value.find(
|
|
(v) => v.value == form.value.productionDeptId
|
|
(v) => v.value == form.value.productionDeptId
|
|
).label;
|
|
).label;
|
|
- console.log(form.value.carriers);
|
|
|
|
- console.log(form.value);
|
|
|
|
|
|
+ // console.log(form.value.carriers);
|
|
|
|
+ // console.log(form.value);
|
|
updateReceiptTurnover(form.value).then((response) => {
|
|
updateReceiptTurnover(form.value).then((response) => {
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
visible.value = false;
|
|
visible.value = false;
|