瀏覽代碼

物料申请单-批号及库存状态管理控制序列号管理以及效期管理

002390 1 年之前
父節點
當前提交
55e672a9ff
共有 1 個文件被更改,包括 86 次插入2 次删除
  1. 86 2
      src/views/material/requisition/details/index.vue

+ 86 - 2
src/views/material/requisition/details/index.vue

@@ -162,6 +162,11 @@ export default {
             },
           ];
         } else {
+          let { sysMaterialApply } = this.params;
+          sysMaterialApply.expiryUnitId = "";
+          sysMaterialApply.usefulLife = "";
+          sysMaterialApply.usefulLifeUnitId = "";
+          sysMaterialApply.recentWarningPeriod = "";
           this.rules.expiryUnitId = null;
           this.rules.usefulLife = null;
           this.rules.usefulLifeUnitId = null;
@@ -474,6 +479,24 @@ export default {
         }
       } catch (error) {}
     },
+    // 批号及库存状态管理
+    isInventoryStatusChange(prop) {
+      let { sysMaterialApply } = this.params;
+      if (prop !== "0") {
+        sysMaterialApply.expiryDateManagerment = "2";
+        sysMaterialApply.serialNoManager = "2";
+      }
+    },
+    // 效期管理
+    expiryDateManagermentChange(prop) {
+      let { sysMaterialApply } = this.params;
+      if (prop !== "0") {
+        sysMaterialApply.expiryUnitId = "";
+        sysMaterialApply.usefulLife = "";
+        sysMaterialApply.usefulLifeUnitId = "";
+        sysMaterialApply.recentWarningPeriod = "";
+      }
+    },
   },
   created() {},
   mounted() {},
@@ -630,8 +653,69 @@ export default {
               </el-option>
             </component>
           </template>
-          <!-- 效期管理:expiryDateManagerment
-             近效期管理:nearOnsetManagerment -->
+          <!--  近效期管理:nearOnsetManagerment -->
+          <!-- 批号及库存状态管理 -->
+          <template slot="isInventoryStatus" slot-scope="scope">
+            <component
+              v-bind="scope.attr"
+              v-model="scope.row[scope.item.key]"
+              :size="$attrs.size"
+              :source.sync="scope.row"
+              :disabled="addType === 'see'"
+              @change="isInventoryStatusChange"
+            >
+              <el-option
+                v-for="item in dict.type[scope.attr.dictName]"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </component>
+          </template>
+          <!-- 效期管理 -->
+          <template slot="expiryDateManagerment" slot-scope="scope">
+            <component
+              v-bind="scope.attr"
+              v-model="scope.row[scope.item.key]"
+              :size="$attrs.size"
+              :source.sync="scope.row"
+              :disabled="
+                params.sysMaterialApply.isInventoryStatus !== '0' ||
+                addType === 'see'
+              "
+              @change="expiryDateManagermentChange"
+            >
+              <el-option
+                v-for="item in dict.type[scope.attr.dictName]"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </component>
+          </template>
+          <!-- 序列号管理 -->
+          <template slot="serialNoManager" slot-scope="scope">
+            <component
+              v-bind="scope.attr"
+              v-model="scope.row[scope.item.key]"
+              :size="$attrs.size"
+              :source.sync="scope.row"
+              :disabled="
+                params.sysMaterialApply.isInventoryStatus !== '0' ||
+                addType === 'see'
+              "
+            >
+              <el-option
+                v-for="item in dict.type[scope.attr.dictName]"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </component>
+          </template>
           <!-- 有效期 -->
           <template slot="usefulLife" slot-scope="scope">
             <component