guoyujia hai 8 meses
pai
achega
6256fb0ee7

+ 16 - 1
src/views/business/department/form.vue

@@ -96,6 +96,18 @@
             ></el-option>
           </el-select>
        </el-form-item>
+       <el-form-item label="是否分选" prop="isSortPackaging">
+         <el-select
+             v-model="form.isSortPackaging"
+          >
+            <el-option
+                v-for="item in yes_no"
+                :key="item.value"
+                :label="item.label"
+               :value="item.value"
+            ></el-option>
+          </el-select>
+       </el-form-item>
 
         <el-form-item label="显示排序" prop="orderNum">
           <el-input-number
@@ -170,6 +182,8 @@ function open(row) {
   });
   if (row) {
     getDept(row.id).then((response) => {
+      response.data.isSortPackaging = response.data.isSortPackaging +"" ;
+      console.log(response.data)
       form.value = response.data;
     });
   }
@@ -200,7 +214,8 @@ function reset() {
     isWorkSection: "0",
     sort: 0,
     equimentFlag:"0",
-    autoAllocation:"0"
+    autoAllocation:"0",
+    isSortPackaging:"0"
   };
   disabled.value = false;
   deptOptions.value = [];

+ 6 - 0
src/views/business/department/index.vue

@@ -36,6 +36,11 @@
 								<dict-tag :options="work_section_status" :value="scope.row.isWorkSection" />
 							</template>
 						</el-table-column>
+						<el-table-column label="是否分选" prop="isSortPackaging" width="70" align="center">
+							<template #default="scope">
+								<dict-tag :options="yes_no" :value="scope.row.isSortPackaging" />
+							</template>
+						</el-table-column>
 						<el-table-column label="操作" width="150" align="center" v-hasPermi="['business:department:edit']">
 							<template #default="scope">
 								<el-button link type="warning" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['business:department:edit']">编辑</el-button>
@@ -123,6 +128,7 @@ import innerTurnoverDialog from './DialogInnerTurnover.vue'
 const { proxy } = getCurrentInstance()
 /**字典 */
 const { work_section_status } = proxy.useDict('work_section_status')
+const { yes_no } = proxy.useDict("yes_no");
 //部门
 const currentDept = ref({})
 const deptList = ref([])

+ 23 - 2
src/views/business/returnTurnover/DialogReturnTurnover.vue

@@ -4,7 +4,7 @@
       <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="carrierIds" label-width="100px">
@@ -15,6 +15,16 @@
             <el-option v-for="item in carriers" :key="item.value" :label="item.label" :value="item.value" />
           </el-select>
         </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>
@@ -65,7 +75,7 @@ function open(data) {
   reset();
   visible.value = true;
   form.value = proxy.deepClone(data);
-
+  form.value.isSortPackaging ="0"
   if (form.value.productionDeptId == 0) {
     form.value.productionDeptId = null;
   }
@@ -87,6 +97,17 @@ function getCarriers() {
     }
   });
 }
+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 getNowCarriers(data) {
   getNowBindCarriers(data).then((res) => {

+ 26 - 1
src/views/business/returnTurnover/DialogReturnTurnoverBatch.vue

@@ -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 {

+ 23 - 0
src/views/business/specialDaywork/turnoverInfoDialog.vue

@@ -71,6 +71,16 @@
             />
           </el-select>
         </el-form-item>
+        <el-form-item v-if="turnoverType && (turnoverType == 2 || turnoverType == 1)" label="下序是否包装:" prop="isSortPackaging" label-width="130px">
+        <el-switch
+          v-model="curDayworkItem.isSortPackaging"
+          active-text="是"
+          :active-value="1"
+          inactive-text="否"
+          :inactive-value="0"
+
+        />
+      </el-form-item>
         <el-form-item
           label="摆放位置:"
           v-if="curDayworkItem.deptId"
@@ -217,6 +227,17 @@ function typeChange(value) {
 }
 
 function handleChangeInside(reg) {
+  let deptInfo = {}
+  deptInfo = insideDepts.value.find(item=>item.value == reg)
+  if(deptInfo == null) {
+    deptInfo = outsideDepts.value.find(item =>item.value == reg)
+  }
+  if(deptInfo.data.isSortPackaging == 1) {
+    curDayworkItem.value.isSortPackaging = 1
+  }else{
+    curDayworkItem.value.isSortPackaging = 0
+  }
+  console.log("deptInfo", deptInfo)
   turnAreaList.value = [];
   selection.value = [];
   getTurnoverListByDeptId({
@@ -328,8 +349,10 @@ function handleSave() {
         turnoverArea: curDayworkItem.value.turnoverArea,
         turnoverType: curDayworkItem.value.turnoverType,
         turnoverId: curDayworkItem.value.turnoverId,
+        isSortPackaging:curDayworkItem.value.isSortPackaging
       };
     });
+    console.log(curDayworkItemList.value)
     turnoverSave();
   }
 }