|
@@ -88,8 +88,8 @@
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="外协工段" prop="outsourceDeptId">
|
|
<el-form-item label="外协工段" prop="outsourceDeptId">
|
|
<el-select
|
|
<el-select
|
|
- v-if="editStatus && hasReturnReceiptDetailFlag"
|
|
|
|
- v-model="form.outsourceDeptId"
|
|
|
|
|
|
+ v-if="editStatus &&form.isSubmit ==0"
|
|
|
|
+ v-model="form.outsourceDeptId "
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
@change="handleChangeDept"
|
|
@change="handleChangeDept"
|
|
>
|
|
>
|
|
@@ -100,12 +100,17 @@
|
|
:value="dict.value"
|
|
:value="dict.value"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <span v-else>{{ form.supplierName }}</span>
|
|
|
|
|
|
+ <span v-else>{{ form.outsourceDeptName }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="外协商名称" prop="supplierName">
|
|
<el-form-item label="外协商名称" prop="supplierName">
|
|
- <span >{{ form.supplierName }}</span>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-if="editStatus"
|
|
|
|
+ v-model="form.supplierName"
|
|
|
|
+ disabled
|
|
|
|
+ />
|
|
|
|
+ <span v-else >{{ form.supplierName }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6" v-if="false">
|
|
<el-col :span="6" v-if="false">
|
|
@@ -265,7 +270,7 @@
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-input-number
|
|
<el-input-number
|
|
- v-if="editStatus && scope.row.hasReturnReceiptDetailFlag"
|
|
|
|
|
|
+ v-if="editStatus && !scope.row.hasNextInfo"
|
|
:min="0"
|
|
:min="0"
|
|
v-model="scope.row.productNum"
|
|
v-model="scope.row.productNum"
|
|
placeholder="产品数"
|
|
placeholder="产品数"
|
|
@@ -292,7 +297,7 @@
|
|
prop="newCarrier"
|
|
prop="newCarrier"
|
|
width="320"
|
|
width="320"
|
|
>
|
|
>
|
|
- <template #default="scope">
|
|
|
|
|
|
+ <template #default="scope">
|
|
<el-button
|
|
<el-button
|
|
link
|
|
link
|
|
type="primary"
|
|
type="primary"
|
|
@@ -305,7 +310,7 @@
|
|
v-if="
|
|
v-if="
|
|
editStatus &&
|
|
editStatus &&
|
|
scope.row.editStatus &&
|
|
scope.row.editStatus &&
|
|
- scope.row.hasReturnReceiptDetailFlag
|
|
|
|
|
|
+ !scope.row.hasNextInfo
|
|
"
|
|
"
|
|
v-model="scope.row.carrierIds"
|
|
v-model="scope.row.carrierIds"
|
|
multiple
|
|
multiple
|
|
@@ -328,20 +333,6 @@
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
<span v-if="!editStatus">{{ scope.row.newCarrier }}</span>
|
|
<span v-if="!editStatus">{{ scope.row.newCarrier }}</span>
|
|
- <!-- <el-input
|
|
|
|
- v-if="editStatus"
|
|
|
|
- v-model="scope.row.newCarrier"
|
|
|
|
- readonly
|
|
|
|
- placeholder="请选择新箱号"
|
|
|
|
- >
|
|
|
|
- <template #append>
|
|
|
|
- <el-button
|
|
|
|
- icon="Search"
|
|
|
|
- @click="handleShowDialogOutsourceCarriers(scope.row)"
|
|
|
|
- />
|
|
|
|
- </template>
|
|
|
|
- </el-input>
|
|
|
|
- <span v-else>{{ scope.row.newCarrier }}</span>-->
|
|
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -352,7 +343,7 @@
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-input
|
|
<el-input
|
|
- v-if="editStatus && scope.row.hasReturnReceiptDetailFlag"
|
|
|
|
|
|
+ v-if="editStatus && !scope.row.hasNextInfo"
|
|
v-model="scope.row.processNames"
|
|
v-model="scope.row.processNames"
|
|
readonly
|
|
readonly
|
|
placeholder="请选择工序"
|
|
placeholder="请选择工序"
|
|
@@ -369,7 +360,7 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="是否包装签票" align="center" prop="isPackage" >
|
|
<el-table-column label="是否包装签票" align="center" prop="isPackage" >
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-switch v-model="scope.row.isPackage" style="
|
|
|
|
|
|
+ <el-switch :disabled="scope.row.hasNextInfo" v-model="scope.row.isPackage" style="
|
|
--el-switch-on-color: #13ce66;
|
|
--el-switch-on-color: #13ce66;
|
|
--el-switch-off-color: #ff4949;
|
|
--el-switch-off-color: #ff4949;
|
|
" :active-value="1" :inactive-value="0" active-text="是" inactive-text="否" />
|
|
" :active-value="1" :inactive-value="0" active-text="是" inactive-text="否" />
|
|
@@ -378,7 +369,7 @@
|
|
<el-table-column label="备注" align="center" prop="remark">
|
|
<el-table-column label="备注" align="center" prop="remark">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-input
|
|
<el-input
|
|
- v-if="editStatus && scope.row.hasReturnReceiptDetailFlag"
|
|
|
|
|
|
+ v-if="editStatus && !scope.row.hasNextInfo"
|
|
v-model="scope.row.remark"
|
|
v-model="scope.row.remark"
|
|
placeholder="备注"
|
|
placeholder="备注"
|
|
/>
|
|
/>
|
|
@@ -396,7 +387,7 @@
|
|
<el-button
|
|
<el-button
|
|
circle
|
|
circle
|
|
type="danger"
|
|
type="danger"
|
|
- v-if="scope.row.hasReturnReceiptDetailFlag"
|
|
|
|
|
|
+ v-if="editStatus && !scope.row.hasNextInfo"
|
|
icon="Delete"
|
|
icon="Delete"
|
|
@click="handleDelete(scope.$index)"
|
|
@click="handleDelete(scope.$index)"
|
|
v-hasPermi="['business:outsource:remove']"
|
|
v-hasPermi="['business:outsource:remove']"
|
|
@@ -440,7 +431,7 @@ import {
|
|
submitOrder,
|
|
submitOrder,
|
|
exportOutsource,
|
|
exportOutsource,
|
|
printOutsource,
|
|
printOutsource,
|
|
- submitDetails,
|
|
|
|
|
|
+ submitInnerDetails,
|
|
} from "@/api/business/outsourcedOrder";
|
|
} from "@/api/business/outsourcedOrder";
|
|
import {
|
|
import {
|
|
listOutsourceDeptList
|
|
listOutsourceDeptList
|
|
@@ -493,7 +484,7 @@ const deptList = ref([])
|
|
const currentDetail = ref({});
|
|
const currentDetail = ref({});
|
|
const rules = {
|
|
const rules = {
|
|
supplierName: [
|
|
supplierName: [
|
|
- { required: true, message: "外协商名称不能为空", trigger: "change" },
|
|
|
|
|
|
+ { required: true, message: "外协商名称不能为空", trigger:"" },
|
|
],
|
|
],
|
|
};
|
|
};
|
|
|
|
|
|
@@ -657,6 +648,8 @@ function getOutsorceDeptList() {
|
|
//外协工段选择事件
|
|
//外协工段选择事件
|
|
function handleChangeDept(){
|
|
function handleChangeDept(){
|
|
let data = deptList.value.filter(item => item.outsourceDeptId == form.value.outsourceDeptId)[0]
|
|
let data = deptList.value.filter(item => item.outsourceDeptId == form.value.outsourceDeptId)[0]
|
|
|
|
+ form.value.isInnerOutsource = 1
|
|
|
|
+ form.value.outsourceDeptName = data.outsourceDeptName
|
|
form.value.supplierName = data.supplierName
|
|
form.value.supplierName = data.supplierName
|
|
form.value.supplierId = data.id;
|
|
form.value.supplierId = data.id;
|
|
form.value.lossLimit = data.lossLimit;
|
|
form.value.lossLimit = data.lossLimit;
|
|
@@ -669,7 +662,10 @@ function handleChangeDept(){
|
|
//一键包装签票
|
|
//一键包装签票
|
|
function handleCheckPackage(){
|
|
function handleCheckPackage(){
|
|
form.value.details.forEach((item) => {
|
|
form.value.details.forEach((item) => {
|
|
- item.isPackage = 1
|
|
|
|
|
|
+ if(!item.hasNextInfo){
|
|
|
|
+ item.isPackage = 1
|
|
|
|
+ }
|
|
|
|
+
|
|
})
|
|
})
|
|
}
|
|
}
|
|
//打开历史记录弹窗
|
|
//打开历史记录弹窗
|
|
@@ -810,6 +806,10 @@ function handleSubmit() {
|
|
proxy.$modal.msgError("请添加产品明细");
|
|
proxy.$modal.msgError("请添加产品明细");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ if (form.value.supplierName == "") {
|
|
|
|
+ proxy.$modal.msgError("外协商名称不能为空");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
|
|
proxy.$refs["formRef"].validate((valid) => {
|
|
proxy.$refs["formRef"].validate((valid) => {
|
|
for (const item of form.value.details) {
|
|
for (const item of form.value.details) {
|
|
@@ -829,11 +829,11 @@ function handleSubmit() {
|
|
}
|
|
}
|
|
if (valid) {
|
|
if (valid) {
|
|
console.log(form.value);
|
|
console.log(form.value);
|
|
- // submitDetails(form.value).then((response) => {
|
|
|
|
- // proxy.$modal.msgSuccess("提交成功");
|
|
|
|
- // visible.value = false;
|
|
|
|
- // getList.value();
|
|
|
|
- // });
|
|
|
|
|
|
+ submitInnerDetails(form.value).then((response) => {
|
|
|
|
+ proxy.$modal.msgSuccess("提交成功");
|
|
|
|
+ visible.value = false;
|
|
|
|
+ getList.value();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
@@ -861,7 +861,7 @@ function handleSubmit() {
|
|
}
|
|
}
|
|
if (valid) {
|
|
if (valid) {
|
|
console.log(form.value);
|
|
console.log(form.value);
|
|
- submitDetails(form.value).then((response) => {
|
|
|
|
|
|
+ submitInnerDetails(form.value).then((response) => {
|
|
proxy.$modal.msgSuccess("提交成功");
|
|
proxy.$modal.msgSuccess("提交成功");
|
|
visible.value = false;
|
|
visible.value = false;
|
|
getList.value();
|
|
getList.value();
|
|
@@ -916,6 +916,7 @@ const handleMultipleSelectedProducts = (selection) => {
|
|
productDescription: item.productDescription,
|
|
productDescription: item.productDescription,
|
|
technologicalProcessId: item.technologicalProcessId,
|
|
technologicalProcessId: item.technologicalProcessId,
|
|
technologicalProcessDetailId: item.lastDayworkItem.technologicalProcessDetailId,
|
|
technologicalProcessDetailId: item.lastDayworkItem.technologicalProcessDetailId,
|
|
|
|
+ productionPlanDetailId: item.lastDayworkItem.productionPlanDetailId,
|
|
processId: item.lastDayworkItem.processId,
|
|
processId: item.lastDayworkItem.processId,
|
|
processAlias:item.lastDayworkItem.processAlias,
|
|
processAlias:item.lastDayworkItem.processAlias,
|
|
dayworkItemId: item.lastDayworkItem.id,
|
|
dayworkItemId: item.lastDayworkItem.id,
|