Răsfoiți Sursa

Merge branch 'master' of http://120.46.159.163:7400/ezhizao/ezhizao_dms_vue

ezhizao_zx 9 luni în urmă
părinte
comite
310db53467

+ 15 - 4
src/views/business/inventoryCheck/form.vue

@@ -70,16 +70,16 @@
               </template>
             </el-table-column>
             <el-table-column label="产品描述" align="center" prop="productDescription" />
-            <el-table-column label="箱号" align="center" prop="carrierName" width="120" />
+            <el-table-column label="箱号" align="center" prop="carrierName" width="110" />
             <el-table-column label="生产状态" prop="isProductStatus" width="90" align="center">
               <template #default="scope">
                 <dict-tag :options="inventory_production_status" :value="scope.row.isProductStatus" />
               </template>
             </el-table-column>
-            <el-table-column label="工段" align="center" prop="deptName" width="100" />
+            <el-table-column label="工段" align="center" prop="deptName" width="90" />
             <el-table-column label="工序" align="center" prop="processAlias" width="110" />
-            <el-table-column label="投入数" align="center" prop="prodNum" width="96" />
-            <el-table-column label="盘点数量" align="center" prop="taksStockNum" width="96">
+            <el-table-column label="投入数" align="center" prop="prodNum" width="80" />
+            <el-table-column label="盘点数量" align="center" prop="taksStockNum" width="90">
               <template #default="scope">
                 <el-input-number v-if="scope.row.editStatus" v-model="scope.row.taksStockNum" controls-position="right"
                   style="width: 100px" :min="0" :precision="0" :max="99999"
@@ -88,6 +88,17 @@
               </template>
             </el-table-column>
             <el-table-column label="外协单号" align="center" prop="outsourceFormNo" width="110" />
+            <el-table-column label="报工状态" align="center" prop="statusLabel" width="110" >
+              <template #default="scope">
+               <span v-if="scope.row.statusLabel == 0">未开始</span>
+               <span v-if="scope.row.statusLabel == 1">进行中</span>
+               <span v-if="scope.row.statusLabel == 2">结束报工</span>
+               <span v-if="scope.row.statusLabel == 3">工序已完成</span>
+               <span v-if="scope.row.statusLabel == 4">待接收</span>
+               <span v-if="scope.row.statusLabel == 6">已周转</span>
+               <span v-if="scope.row.statusLabel == 7">已接收</span>
+              </template>
+            </el-table-column>
             <el-table-column label="标识" width="300" align="center">
               <template #default="scope">
                 <el-tag v-if="scope.row.isWaste == 1" class="spacing" type="danger">{{ "批废" }}</el-tag>

+ 2 - 2
src/views/business/inventoryCheck/index.vue

@@ -80,7 +80,7 @@
                                       >
                                         编辑
                                     </el-button>
-                                    <el-button v-show="!scope.row.editStatus && scope.row.status !=0" v-hasPermi="['business:inventoryCheck:view']"
+                                    <el-button v-show="!scope.row.editStatus && (scope.row.status ==1 || scope.row.status == 2)" v-hasPermi="['business:inventoryCheck:view']"
                                      link type="primary" icon="View" @click="handleView(scope.row)"
                                       >
                                         查看
@@ -227,7 +227,7 @@ function handleStartTakeStock(row) {
     .confirm("是否确认开始盘点?")
     .then(function () {
     row.startTime = proxy.moment().format("YYYY-MM-DD HH:mm:ss")
-    row.status = 1
+    row.flag = 0
     updateTakeStockPeriod(row).then(res => {
         if(res.code === 200) {
             proxy.$modal.msgSuccess("已成功开始盘点");

+ 10 - 2
src/views/business/productionBatch/form.vue

@@ -107,13 +107,21 @@ const detailsRow = ref({});
 const visible = ref(false);
 //校验投产批次
 const validateLotNumber = (rule, value, callback) => {
-  const min = 0;
+  let min = 0
+  console.log(detailsRow.value.status)
+  if(detailsRow.value.status) {
+     min = detailsRow.value.minLotNumber -1
+  }
+  console.log(min)
+
   const max = detailsRow.value.lotNumber;
   //如果生产子计划里没有尾批并且是编辑状态时
   if (!detailsRow.value.lastLot && detailsRow.value.status) {
     const max = detailsRow.value.lotNumber - 1;
     if (value > max) {
       callback(new Error(`尾批未投,当前投产批数不能超过` + max));
+    }else if(value<= min){
+      callback(new Error(`当前投产批数应大于` + min));
     } else {
       callback();
     }
@@ -121,7 +129,7 @@ const validateLotNumber = (rule, value, callback) => {
     if (!Number.isInteger(value)) {
       callback(new Error(`当前投产批数不能是小数`));
     } else if (value <= min) {
-      callback(new Error("当前投产批数应大于0"));
+      callback(new Error(`当前投产批数应大于` +min));
     } else if (value > max) {
       callback(new Error(`当前投产批数不能超过` + max));
     } else {

+ 17 - 0
src/views/business/productionBatch/index.vue

@@ -218,6 +218,7 @@ function handleFresh() {
       }
     }
     proxy.$refs.planDetailTable.setCurrentRow(detailPlanList.value[index]);
+    currentPlanDetail.value = detailPlanList.value[index];
   });
 }
 /**查询计划明细 */
@@ -301,6 +302,8 @@ function handleAddSubDetail(row) {
   newDetail.lotTotalNumber = row.lotTotalNumber;
   //生产计划尾批数
   newDetail.lastLotQuantity = row.lastLotQuantity;
+  //已投产的常规批次
+  newDetail.regularTotalNumber = row.regularTotalNumber;
   //新增尾批状态默认为否
   newDetail.lastLotStatus = 0;
   //新增状态
@@ -332,10 +335,24 @@ function handleShowSubDetailDialog(row) {
   row.totalLotNumber = currentPlanDetail.value.totalLotNumber;
   //生产计划尾批数
   row.lastLotQuantity = currentPlanDetail.value.lastLotQuantity;
+  //已投产的常规批次
+  row.regularTotalNumber = currentPlanDetail.value.regularTotalNumber;
+  //当前修改的生产子计划的投产批数最低值
+  let otherList = subList.value.filter(item =>item.id !=row.id);
+  let otherLotNum = 0
+  if(otherList.length > 0) {
+    otherList.forEach(item =>{
+      otherLotNum += item.lotNumber
+    })
+    row.minLotNumber = row.regularTotalNumber - otherLotNum
+  }else{
+    row.minLotNumber = row.regularTotalNumber
+  }
   //生产计划id
   row.productionPlanDetailId = currentPlanDetail.value.id;
   //编辑状态
   row.status = true;
+  console.log(row)
   //判断已投产的生产子计划是否包含尾批
   getLastLotStatus(currentPlanDetail.value.id).then((response) => {
     if (response.code == 200) {

+ 2 - 1
src/views/business/productionBatch/lotInfoForm.vue

@@ -109,12 +109,13 @@
             width="200px"
           >
             <template #default="scope">
-              <el-button
+              <el-button v-if="scope.row.hasDaywork || scope.row.isSuperaddition == 0"
                 link
                 type="primary"
                 @click="handleColumnClick(scope.row.lotCode)"
                 ><span>{{ scope.row.lotCode }}</span></el-button
               >
+              <span v-else>{{ scope.row.lotCode }}</span>
             </template>
           </el-table-column>
           <el-table-column