Эх сурвалжийг харах

物料申请单-非药品的医药物料的注册证号和管理类别设置为必填

002390 1 жил өмнө
parent
commit
d99a7f4a5f

+ 5 - 2
src/components/popover-select-v2/index.vue

@@ -110,8 +110,11 @@ export default {
   methods: {
     // open dialog
     async open() {
-      this.visible = true;
-      await this.useReset();
+      let { disabled } = this.$attrs;
+      if (!disabled) {
+        this.visible = true;
+        await this.useReset();
+      }
     },
     // hide dialog
     async hide() {

+ 24 - 0
src/views/material/requisition/details/index.vue

@@ -193,6 +193,30 @@ export default {
         this.count++;
       },
     },
+    "params.sysMaterialMedcineApply.isDrug": {
+      handler: function (nVal, oVal) {
+        if (nVal === "2") {
+          this.rules.registrationNo = [
+            {
+              required: true,
+              message: "注册证号/备案凭证编号",
+              trigger: "change",
+            },
+          ];
+          this.rules.medicalInstruments = [
+            {
+              required: true,
+              message: "管理类别",
+              trigger: "change",
+            },
+          ];
+        } else {
+          this.rules.registrationNo = null;
+          this.rules.medicalInstruments = null;
+        }
+        this.count++;
+      },
+    },
   },
   methods: {
     setVisible(prop) {