|
@@ -4,9 +4,19 @@
|
|
|
<el-form ref="returnTurnoverRef" class="master-container" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="下序工段:" prop="productionDeptId" label-width="100px">
|
|
|
<el-select-v2 v-model="form.productionDeptId" clearable :disabled="!form.flag" :options="deptList"
|
|
|
- placeholder="请选择下序工段" style="width: 220px" />
|
|
|
+ placeholder="请选择下序工段" style="width: 220px" @change="handleDeptChange" />
|
|
|
<el-button @click="showProcessList">工序列表</el-button>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="下序是否包装:" prop="isSortPackaging" label-width="130px">
|
|
|
+ <el-switch
|
|
|
+ v-model="form.isSortPackaging"
|
|
|
+ active-text="是"
|
|
|
+ :active-value="1"
|
|
|
+ inactive-text="否"
|
|
|
+ :inactive-value="0"
|
|
|
+
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<template #footer>
|
|
@@ -56,7 +66,10 @@ const { form, rules } = toRefs(data);
|
|
|
function openBatch(batches) {
|
|
|
reset();
|
|
|
visible.value = true;
|
|
|
+ console.log(batches)
|
|
|
form.value = proxy.deepClone(batches[0]);
|
|
|
+ form.value.isSortPackaging ="0"
|
|
|
+ console.log(form.value)
|
|
|
if (form.value.productionDeptId == 0) {
|
|
|
form.value.productionDeptId = null;
|
|
|
}
|
|
@@ -101,6 +114,17 @@ function getTurnoverDept(data) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+function handleDeptChange() {
|
|
|
+ console.log(deptList.value)
|
|
|
+ let deptInfo = deptList.value.find(item =>item.value == form.value.productionDeptId)
|
|
|
+ console.log(deptInfo)
|
|
|
+ if(deptInfo.isSortPackaging == 1) {
|
|
|
+ form.value.isSortPackaging = 1
|
|
|
+ console.log(form.value)
|
|
|
+ }else{
|
|
|
+ form.value.isSortPackaging = 0
|
|
|
+ }
|
|
|
+}
|
|
|
function remoteCarriers(queryString, choiced) {
|
|
|
console.log(choiced);
|
|
|
loadingCarrier.value = true;
|
|
@@ -152,6 +176,7 @@ function reset() {
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
function handleSave() {
|
|
|
+ console.log(form.value)
|
|
|
if (!form.value.flag) {
|
|
|
visible.value = false;
|
|
|
} else {
|