|
@@ -81,44 +81,22 @@
|
|
|
{{ scope.row.newCarrier }} {{ scope.row.unbind == 1 ? "(已解绑)" : "" }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="新箱号"
|
|
|
- align="center"
|
|
|
- prop="carrierNames"
|
|
|
- width="320"
|
|
|
- >
|
|
|
+ <el-table-column label="新箱号" align="center" prop="carrierNames" width="320">
|
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- icon="Refresh"
|
|
|
- v-if="!scope.row.editStatus"
|
|
|
- @click="handleChangeCarrier(scope.row)"
|
|
|
- >换箱</el-button
|
|
|
- >
|
|
|
+ <el-button link type="primary" icon="Refresh" v-if="!scope.row.editStatus"
|
|
|
+ @click="handleChangeCarrier(scope.row)">换箱</el-button>
|
|
|
<el-select
|
|
|
- v-if="!(scope.row.productionDeptId != 0 || (scope.row.isApproved === 0 && scope.row.processInspecionList && scope.row.processInspecionList.length > 0) || scope.row.isProvedForCheck === 1 || scope.row.isCheckout === 1)&&( scope.row.editStatus) "
|
|
|
- v-model="scope.row.carrierIds"
|
|
|
- multiple
|
|
|
- filterable
|
|
|
- remote
|
|
|
- reserve-keyword
|
|
|
- placeholder="请选择箱号"
|
|
|
- :remote-method="
|
|
|
- (arg) =>
|
|
|
- remoteCarriers(arg, scope.row.newCarriers, scope.row)
|
|
|
- "
|
|
|
- :loading="loadingCarrier"
|
|
|
- @change="(arg) => handleCarrierChange(arg, scope.row)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in scope.row.carriers"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
+ v-if="!(scope.row.productionDeptId != 0 || (scope.row.isApproved === 0 && scope.row.processInspecionList && scope.row.processInspecionList.length > 0) || scope.row.isProvedForCheck === 1 || scope.row.isCheckout === 1) && (scope.row.editStatus)"
|
|
|
+ v-model="scope.row.carrierIds" multiple filterable remote reserve-keyword placeholder="请选择箱号"
|
|
|
+ :remote-method="(arg) =>
|
|
|
+ remoteCarriers(arg, scope.row.newCarriers, scope.row)
|
|
|
+ " :loading="loadingCarrier" @change="(arg) => handleCarrierChange(arg, scope.row)">
|
|
|
+ <el-option v-for="item in scope.row.carriers" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value" />
|
|
|
</el-select>
|
|
|
- <span v-if="((scope.row.productionDeptId != 0 || (scope.row.isApproved === 0 && scope.row.processInspecionList && scope.row.processInspecionList.length > 0) || scope.row.isProvedForCheck === 1 || scope.row.isCheckout === 1)&& scope.row.editStatus)">{{ scope.row.newCarrier }}</span>
|
|
|
+ <span
|
|
|
+ v-if="((scope.row.productionDeptId != 0 || (scope.row.isApproved === 0 && scope.row.processInspecionList && scope.row.processInspecionList.length > 0) || scope.row.isProvedForCheck === 1 || scope.row.isCheckout === 1) && scope.row.editStatus)">{{
|
|
|
+ scope.row.newCarrier }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="外协工序" align="center" prop="processAlias" width="200" />
|
|
@@ -315,7 +293,7 @@ const handleMultipleSelectedOutsourceDetails = (selection) => {
|
|
|
outsourceDetailId: selection[i].id,
|
|
|
productDescription: selection[i].productDescription,
|
|
|
lotCode: selection[i].lotCode,
|
|
|
- lotId:selection[i].lotId,
|
|
|
+ lotId: selection[i].lotId,
|
|
|
productNum: selection[i].productNum,
|
|
|
receiptNum:
|
|
|
selection[i].processes[selection[i].processes.length - 1].qualifiedNum
|
|
@@ -324,9 +302,9 @@ const handleMultipleSelectedOutsourceDetails = (selection) => {
|
|
|
newCarrier: selection[i].newCarrier,
|
|
|
remark: "",
|
|
|
carrierIds: Array.from(selection[i].carrierIds),
|
|
|
- carrierNames: selection[i].carrierNames,
|
|
|
- newCarriers: JSON.parse(JSON.stringify(selection[i].newCarriers)),
|
|
|
- dayworkId: selection[i].dayworkId,
|
|
|
+ carrierNames: selection[i].carrierNames,
|
|
|
+ newCarriers: JSON.parse(JSON.stringify(selection[i].newCarriers)),
|
|
|
+ dayworkId: selection[i].dayworkId,
|
|
|
processAlias: selection[i].processNames,
|
|
|
productionDeptId: selection[i].productionDeptId,
|
|
|
status: 0,
|
|
@@ -404,8 +382,8 @@ function submitForm() {
|
|
|
flag = false
|
|
|
proxy.$modal.msgError(checkRes.msg)
|
|
|
}
|
|
|
- //一箱多批是否全部收回
|
|
|
- const checkMore = await checkAllowMore(form.value.details);
|
|
|
+ //一箱多批是否全部收回
|
|
|
+ const checkMore = await checkAllowMore(form.value.details);
|
|
|
if (!checkMore.data) {
|
|
|
flag = false
|
|
|
proxy.$modal.msgError(checkMore.msg)
|
|
@@ -414,112 +392,112 @@ function submitForm() {
|
|
|
const checkHasNone = await checkIsNone(form.value.details);
|
|
|
if (!checkHasNone.data) {
|
|
|
proxy.$modal
|
|
|
- .confirm(checkHasNone.msg)
|
|
|
- .then(function () {
|
|
|
- let lotCode = "";
|
|
|
- lotCode = form.value.details.filter(v => v.carrierIds == null||v.carrierIds.length == 0).map(v=>v.lotCode).join(",");
|
|
|
- if(lotCode!=""){
|
|
|
- proxy.$modal
|
|
|
- .confirm(lotCode+"批次的载具为空,可能影响周转,是否确认提交?")
|
|
|
- .then(function () {
|
|
|
- if (flag) {
|
|
|
- //赋值(因为收回明细是一个批次一条,所以后端传回来两个集合,一个页面显示,一个后端保存)
|
|
|
- handleSetAuditStatus();
|
|
|
- form.value.processes = processList.value
|
|
|
- if (form.value.id != null) {
|
|
|
- console.log(form.value);
|
|
|
- updateReceipt(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("修改成功");
|
|
|
- visible.value = false;
|
|
|
- emit("handleSaveSuccess");
|
|
|
- });
|
|
|
- } else {
|
|
|
- console.log(form.value);
|
|
|
- addReceipt(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("新增成功");
|
|
|
- visible.value = false;
|
|
|
- emit("handleSaveSuccess");
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }).catch(_ => {})
|
|
|
- }else{
|
|
|
- if (flag) {
|
|
|
- //赋值(因为收回明细是一个批次一条,所以后端传回来两个集合,一个页面显示,一个后端保存)
|
|
|
- handleSetAuditStatus();
|
|
|
- form.value.processes = processList.value
|
|
|
- if (form.value.id != null) {
|
|
|
- console.log(form.value);
|
|
|
- updateReceipt(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("修改成功");
|
|
|
- visible.value = false;
|
|
|
- emit("handleSaveSuccess");
|
|
|
- });
|
|
|
- } else {
|
|
|
- console.log(form.value);
|
|
|
- addReceipt(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("新增成功");
|
|
|
- visible.value = false;
|
|
|
- emit("handleSaveSuccess");
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ .confirm(checkHasNone.msg)
|
|
|
+ .then(function () {
|
|
|
+ let lotCode = "";
|
|
|
+ lotCode = form.value.details.filter(v => v.carrierIds == null || v.carrierIds.length == 0).map(v => v.lotCode).join(",");
|
|
|
+ if (lotCode != "") {
|
|
|
+ proxy.$modal
|
|
|
+ .confirm(lotCode + "批次的载具为空,可能影响周转,是否确认提交?")
|
|
|
+ .then(function () {
|
|
|
+ if (flag) {
|
|
|
+ //赋值(因为收回明细是一个批次一条,所以后端传回来两个集合,一个页面显示,一个后端保存)
|
|
|
+ handleSetAuditStatus();
|
|
|
+ form.value.processes = processList.value
|
|
|
+ if (form.value.id != null) {
|
|
|
+ console.log(form.value);
|
|
|
+ updateReceipt(form.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("修改成功");
|
|
|
+ visible.value = false;
|
|
|
+ emit("handleSaveSuccess");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ console.log(form.value);
|
|
|
+ addReceipt(form.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("新增成功");
|
|
|
+ visible.value = false;
|
|
|
+ emit("handleSaveSuccess");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(_ => { })
|
|
|
+ } else {
|
|
|
+ if (flag) {
|
|
|
+ //赋值(因为收回明细是一个批次一条,所以后端传回来两个集合,一个页面显示,一个后端保存)
|
|
|
+ handleSetAuditStatus();
|
|
|
+ form.value.processes = processList.value
|
|
|
+ if (form.value.id != null) {
|
|
|
+ console.log(form.value);
|
|
|
+ updateReceipt(form.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("修改成功");
|
|
|
+ visible.value = false;
|
|
|
+ emit("handleSaveSuccess");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ console.log(form.value);
|
|
|
+ addReceipt(form.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("新增成功");
|
|
|
+ visible.value = false;
|
|
|
+ emit("handleSaveSuccess");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- }).catch(_ => {})
|
|
|
- }else{
|
|
|
- let lotCode = "";
|
|
|
- lotCode = form.value.details.filter(v => v.carrierIds == null||v.carrierIds.length == 0).map(v=>v.lotCode).join(",");
|
|
|
- if(lotCode!=""){
|
|
|
- proxy.$modal
|
|
|
- .confirm(lotCode+"批次的载具为空,可能影响周转,是否确认提交?")
|
|
|
- .then(function () {
|
|
|
- if (flag) {
|
|
|
- //赋值(因为收回明细是一个批次一条,所以后端传回来两个集合,一个页面显示,一个后端保存)
|
|
|
- handleSetAuditStatus();
|
|
|
- form.value.processes = processList.value
|
|
|
- if (form.value.id != null) {
|
|
|
- console.log(form.value);
|
|
|
- updateReceipt(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("修改成功");
|
|
|
- visible.value = false;
|
|
|
- emit("handleSaveSuccess");
|
|
|
- });
|
|
|
- } else {
|
|
|
- console.log(form.value);
|
|
|
- addReceipt(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("新增成功");
|
|
|
- visible.value = false;
|
|
|
- emit("handleSaveSuccess");
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }).catch(_ => {})
|
|
|
- }else{
|
|
|
- if (flag) {
|
|
|
- //赋值(因为收回明细是一个批次一条,所以后端传回来两个集合,一个页面显示,一个后端保存)
|
|
|
- handleSetAuditStatus();
|
|
|
- form.value.processes = processList.value
|
|
|
- if (form.value.id != null) {
|
|
|
- console.log(form.value);
|
|
|
- updateReceipt(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("修改成功");
|
|
|
- visible.value = false;
|
|
|
- emit("handleSaveSuccess");
|
|
|
- });
|
|
|
+ }).catch(_ => { })
|
|
|
+ } else {
|
|
|
+ let lotCode = "";
|
|
|
+ lotCode = form.value.details.filter(v => v.carrierIds == null || v.carrierIds.length == 0).map(v => v.lotCode).join(",");
|
|
|
+ if (lotCode != "") {
|
|
|
+ proxy.$modal
|
|
|
+ .confirm(lotCode + "批次的载具为空,可能影响周转,是否确认提交?")
|
|
|
+ .then(function () {
|
|
|
+ if (flag) {
|
|
|
+ //赋值(因为收回明细是一个批次一条,所以后端传回来两个集合,一个页面显示,一个后端保存)
|
|
|
+ handleSetAuditStatus();
|
|
|
+ form.value.processes = processList.value
|
|
|
+ if (form.value.id != null) {
|
|
|
+ console.log(form.value);
|
|
|
+ updateReceipt(form.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("修改成功");
|
|
|
+ visible.value = false;
|
|
|
+ emit("handleSaveSuccess");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ console.log(form.value);
|
|
|
+ addReceipt(form.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("新增成功");
|
|
|
+ visible.value = false;
|
|
|
+ emit("handleSaveSuccess");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(_ => { })
|
|
|
} else {
|
|
|
- console.log(form.value);
|
|
|
- addReceipt(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("新增成功");
|
|
|
- visible.value = false;
|
|
|
- emit("handleSaveSuccess");
|
|
|
- });
|
|
|
+ if (flag) {
|
|
|
+ //赋值(因为收回明细是一个批次一条,所以后端传回来两个集合,一个页面显示,一个后端保存)
|
|
|
+ handleSetAuditStatus();
|
|
|
+ form.value.processes = processList.value
|
|
|
+ if (form.value.id != null) {
|
|
|
+ console.log(form.value);
|
|
|
+ updateReceipt(form.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("修改成功");
|
|
|
+ visible.value = false;
|
|
|
+ emit("handleSaveSuccess");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ console.log(form.value);
|
|
|
+ addReceipt(form.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("新增成功");
|
|
|
+ visible.value = false;
|
|
|
+ emit("handleSaveSuccess");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
});
|
|
|
}
|
|
|
//换箱
|
|
@@ -527,12 +505,12 @@ function handleChangeCarrier(row) {
|
|
|
row.editStatus = true
|
|
|
row.carriers = [];
|
|
|
if (!form.value.id) {
|
|
|
- row.carriers.push(
|
|
|
- ...row.newCarriers.map((v) => ({
|
|
|
- value: v.id,
|
|
|
- label: v.code,
|
|
|
- }))
|
|
|
- );
|
|
|
+ row.carriers.push(
|
|
|
+ ...row.newCarriers.map((v) => ({
|
|
|
+ value: v.id,
|
|
|
+ label: v.code,
|
|
|
+ }))
|
|
|
+ );
|
|
|
|
|
|
}
|
|
|
console.log(row)
|
|
@@ -562,11 +540,11 @@ function remoteCarriers(code, newCarrier, row) {
|
|
|
let hasAddCarriers = []
|
|
|
console.log(form.value.details)
|
|
|
form.value.details.forEach((item) => {
|
|
|
- let info ={}
|
|
|
+ let info = {}
|
|
|
let carrierIds = []
|
|
|
info.lotId = item.lotId
|
|
|
info.dayworkId = item.dayworkId
|
|
|
- item.carrierIds.forEach(v=>{
|
|
|
+ item.carrierIds.forEach(v => {
|
|
|
carrierIds.push(v)
|
|
|
})
|
|
|
info.hasAddCarrierIds = carrierIds
|
|
@@ -575,7 +553,7 @@ function remoteCarriers(code, newCarrier, row) {
|
|
|
carrierForReturnReceipt({
|
|
|
code: code,
|
|
|
lotId: row.lotId,
|
|
|
- dayworkId:row.dayworkId,
|
|
|
+ dayworkId: row.dayworkId,
|
|
|
hasAddCarriers: hasAddCarriers
|
|
|
}).then((res) => {
|
|
|
if (res.code === 200 && res.data) {
|