Browse Source

目录存储方式联动温度

liangbowen 9 months ago
parent
commit
ca6d405f11

+ 1 - 1
src/views/login/index.vue

@@ -4,7 +4,7 @@
       <div class="big-title">
         <!-- <h1>云流供应商端耗材管理系统</h1> -->
         <h1>供应链管理系统</h1>
-        <p>云流(山西)科技有限公司山西分公司</p>
+        <p>云流(山西)科技有限公司</p>
       </div>
       <div class="banner-container">
         <div class="title-container">

+ 168 - 43
src/views/page/consumCataManage-sup/catalogdetails.vue

@@ -430,6 +430,7 @@
                     v-model="infoData.stogType"
                     placeholder="请选择存储方式"
                     clearable
+                    @change="storageChage"
                   >
                     <el-option
                       v-for="item in stogTypeData"
@@ -448,6 +449,7 @@
                     v-model="infoData.stogTemp"
                     placeholder="请选择存储温度"
                     clearable
+                    disabled
                   >
                     <el-option
                       v-for="item in stogTempData"
@@ -542,11 +544,107 @@
               </template>
             </el-table-column>
             <el-table-column label="备注" prop="memo" />
+             <el-table-column label="操作" width="100" fixed="right">
+        <template slot-scope="scope">
+          <el-button type="text" @click="quitData(scope.row)"
+            >编辑</el-button
+          >
+        </template>
+      </el-table-column>
           </el-table>
         </div>
       </el-tab-pane>
     </el-tabs>
     <!-- </el-card> -->
+     <el-dialog
+      class="addclass"
+      width="30%"
+      :title="textMap[dialogStatus]"
+      :close-on-click-modal="false"
+      :visible.sync="dialogFormVisible"
+      v-if="dialogFormVisible"
+    >
+      <el-form label-width="120px" :model="addform" ref="addForm">
+        <el-form-item
+          label="资质证书信息"
+          prop="quaName"
+          :rules="rules.selectRequired"
+        >
+          <el-input
+            v-model="addform.quaName"
+            placeholder="请输入资质证书信息"
+            maxlength="50"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="资质证书编号" prop="quaCode" :rules="rules.required">
+          <el-input
+            v-model="addform.quaCode"
+            placeholder="请输入资质证书编号"
+            maxlength="50"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="发证时间" prop="issuDate" :rules="rules.dateRequired">
+          <el-date-picker
+            v-model.trim="addform.issuDate"
+            type="date"
+            :picker-options="TimeOption1"
+            placeholder="选择日期"
+            value-format="yyyy-MM-dd"
+          ></el-date-picker>
+        </el-form-item>
+        <el-form-item label="截止时间" prop="endDate" :rules="rules.dateRequired">
+          <el-date-picker
+            v-model.trim="addform.endDate"
+            type="date"
+            :picker-options="TimeOption"
+            placeholder="选择日期"
+            value-format="yyyy-MM-dd"
+          ></el-date-picker>
+        </el-form-item>
+        <!-- <el-form-item label="截止时间" prop="endDate" :rules="rules.required">
+          <el-input
+            v-model="inputDate"
+            placeholder="请输入日期"
+            @change="handleInputDateChange"
+          ></el-input>
+          <el-date-picker
+            v-model="selectedDate"
+            type="date"
+            @change="handleInputDateChange1"
+            placeholder="选择日期"
+          ></el-date-picker> -->
+        </el-form-item>
+        <el-form-item label="资质证件" prop="fileId" :rules="rules.uploadRequired">
+          <yl-upload :fileId="addform.fileId" @getUpload="getUpload" urlName="acco">
+            <template v-slot:dec>只能上传pdf文件</template>
+          </yl-upload>
+          <!-- <yl-upload
+                v-else
+              :fileId="addform.fileId"
+              readonly
+            >
+            </yl-upload> -->
+        </el-form-item>
+        <el-form-item label="备注" prop="memo">
+          <el-input
+            v-model="addform.memo"
+            placeholder="请输入备注"
+            maxlength="50"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button
+          type="primary"
+          v-preventReClick
+          v-loading="loading1"
+          @click="handledialog()"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -559,7 +657,7 @@ import {
   selectMcsListIntfById,
   insertSplerMcsList,
   insertMcsQua,
-  insertFacQua
+  insertFacQua,
 } from "@/api/consumCataManage-sup/index";
 import moment from "moment";
 import rules from "@/utils/rules";
@@ -574,33 +672,42 @@ export default {
       infoData: { quaList: [] },
       listLoading: false,
       planForm: {},
-      sourceData: [{ value: "1", name: "国产" }, { value: "2", name: "进口" }],
-      iFjcData: [{ value: "1", name: "是" }, { value: "0", name: "否" }],
+      sourceData: [
+        { value: "1", name: "国产" },
+        { value: "2", name: "进口" },
+      ],
+      iFjcData: [
+        { value: "1", name: "是" },
+        { value: "0", name: "否" },
+      ],
       mcsTypeData: [
         { value: "0", name: "普通耗材" },
         { value: "1", name: "高值耗材" },
         { value: "2", name: "试剂" },
-        { value: "3", name: "总务耗材" }
+        { value: "3", name: "总务耗材" },
       ],
       prodTypeData: [
         { value: "0", name: "医用耗材" },
-        { value: "1", name: "办公用品" }
+        { value: "1", name: "办公用品" },
       ],
       stogTypeData: [
         { value: "常温", name: "常温" },
         { value: "冷藏", name: "冷藏" },
-        { value: "冷冻", name: "冷冻" }
+        { value: "冷冻", name: "冷冻" },
       ],
       stogTempData: [
         { value: "15℃-25℃", name: "15℃-25℃" },
         { value: "2℃-8℃", name: "2℃-8℃" },
-        { value: "-10℃-2℃", name: "-10℃-2℃" }
+        { value: "-10℃-2℃", name: "-10℃-2℃" },
       ],
       isStlzdata: [
         { value: "灭菌", name: "灭菌" },
-        { value: "非灭菌", name: "非灭菌" }
+        { value: "非灭菌", name: "非灭菌" },
+      ],
+      isPubData: [
+        { value: "1", name: "挂网" },
+        { value: "0", name: "非挂网" },
       ],
-      isPubData: [{ value: "1", name: "挂网" }, { value: "0", name: "非挂网" }],
       purcUntData: [
         { value: "箱", label: "箱" },
         { value: "包", label: "包" },
@@ -641,7 +748,7 @@ export default {
         { value: "付", label: "付" },
         { value: "桶", label: "桶" },
         { value: "节", label: "节" },
-        { value: "打", label: "打" }
+        { value: "打", label: "打" },
       ],
       prcUntData: [
         { value: "箱", label: "箱" },
@@ -674,7 +781,7 @@ export default {
         { value: "条", label: "条" },
         { value: "桶", label: "桶" },
         { value: "张", label: "张" },
-        { value: "束", label: "束" }
+        { value: "束", label: "束" },
       ],
       btnShow: true,
       reaDiv: false,
@@ -690,11 +797,11 @@ export default {
         issuDate: "",
         endDate: "",
         fileId: "",
-        memo: ""
+        memo: "",
       },
       textMap: {
         one: "耗材资质",
-        two: "生产厂商资质"
+        two: "生产厂商资质",
       },
       dialogStatus: "",
       addBtn: false,
@@ -703,20 +810,20 @@ export default {
       editCode: true,
       qualData: [
         { id: "1", dicVal: "耗材授权书" },
-        { id: "2", dicVal: "耗材注册证" }
+        { id: "2", dicVal: "耗材注册证" },
       ],
       TimeOption: {
         disabledDate(time) {
           return time.getTime() < Date.now();
-        }
+        },
       },
       TimeOption1: {
         disabledDate(time) {
           return time.getTime() > Date.now();
-        }
+        },
       },
       inputDate: "",
-      selectedDate: null
+      selectedDate: null,
     };
   },
   created() {
@@ -753,6 +860,24 @@ export default {
     }
   },
   methods: {
+    //存储方式和温度联动
+    storageChage(val) {
+      if (val == "常温") {
+        this.infoData.stogTemp = "15℃-25℃";
+      }
+       if (val == "冷藏") {
+        this.infoData.stogTemp = "2℃-8℃";
+      }
+       if (val == "冷冻") {
+        this.infoData.stogTemp = "-10℃-2℃";
+      }
+    },
+    quitData(row) {
+      let newRow = { ...row };
+      this.addform = newRow;
+      this.dialogFormVisible = true;
+      this.dialogStatus = "one";
+    },
     isWithinLastThreeMonths(deadline) {
       // 创建截止日期对象
       const deadlineDate = new Date(deadline);
@@ -789,25 +914,25 @@ export default {
     //获取列表数据
     getData() {
       selectMcsListIntfById({ id: this.$route.query.id })
-        .then(response => {
+        .then((response) => {
           this.infoData = response.data;
           this.list = response.data.mcsQuaList;
           this.listC = response.data.facQuaList;
           this.$refs["planForm"].resetFields();
         })
-        .catch(err => {
+        .catch((err) => {
           this.$message.error("获取数据失败");
         });
     },
     getData1() {
       selectMcsListById({ id: this.$route.query.id })
-        .then(response => {
+        .then((response) => {
           this.infoData = response.data;
           this.list = response.data.mcsQuaList;
           this.listC = response.data.facQuaList;
           this.$refs["planForm"].resetFields();
         })
-        .catch(err => {
+        .catch((err) => {
           this.$message.error("获取数据失败");
         });
     },
@@ -821,7 +946,7 @@ export default {
       this.$confirm("确认保存", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           this.saveLoad = true;
@@ -830,10 +955,10 @@ export default {
             (this.infoData.status = "A");
           // this.infoData.opeType = "修改"
           insertSplerMcsList(this.infoData)
-            .then(response => {
+            .then((response) => {
               this.$message({
                 message: "保存成功",
-                type: "success"
+                type: "success",
               });
               this.saveLoad = false;
             })
@@ -854,12 +979,12 @@ export default {
     },
     // 整体提交
     handleSubmit() {
-      this.$refs["planForm"].validate(valid => {
+      this.$refs["planForm"].validate((valid) => {
         if (valid) {
           this.$confirm("确认提交", "提示", {
             confirmButtonext: "确定",
             cancelButtonText: "取消",
-            type: "warning"
+            type: "warning",
           })
             .then(() => {
               this.submitLoad = true;
@@ -872,15 +997,15 @@ export default {
                 this.infoData.opeType = this.$route.query.opeType;
               }
               insertSplerMcsList(this.infoData)
-                .then(response => {
+                .then((response) => {
                   this.$message({
                     message: "提交成功",
-                    type: "success"
+                    type: "success",
                   });
                   this.submitLoad = false;
                   this.$router.push({
                     name: "consumCataManagement-sup",
-                    query: { spdId: this.$route.query.spdId }
+                    query: { spdId: this.$route.query.spdId },
                   });
                 })
                 .catch(() => {
@@ -896,12 +1021,12 @@ export default {
       if (this.$route.query.page == "2") {
         this.$router.push({
           name: "consumCataManagement-sup",
-          query: { spdId: this.$route.query.spdId }
+          query: { spdId: this.$route.query.spdId },
         });
       } else {
         this.$router.push({
           name: "distributionmanage",
-          query: { spdId: this.$route.query.spdId }
+          query: { spdId: this.$route.query.spdId },
         });
       }
     },
@@ -915,7 +1040,7 @@ export default {
         issuDate: "",
         endDate: "",
         fileId: "",
-        memo: ""
+        memo: "",
       }),
         (this.dialogFormVisible = true);
       this.dialogStatus = type;
@@ -932,7 +1057,7 @@ export default {
         endDate: "",
         fileId: "",
         memo: "",
-        prodEntp: ""
+        prodEntp: "",
       }),
         (this.dialogFormVisible = true);
       this.dialogStatus = type;
@@ -951,12 +1076,12 @@ export default {
     },
     // 确认
     handledialog() {
-      this.$refs["addForm"].validate(valid => {
+      this.$refs["addForm"].validate((valid) => {
         if (valid) {
           this.$confirm("确认提交", "提示", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
-            type: "warning"
+            type: "warning",
           })
             .then(() => {
               this.loading1 = true;
@@ -964,10 +1089,10 @@ export default {
                 this.addform.splerId = this.$store.state.user.orgId;
                 this.addform.hiCode = this.infoData.hiCode;
                 insertMcsQua(this.addform)
-                  .then(response => {
+                  .then((response) => {
                     this.$message({
                       message: "提交成功",
-                      type: "success"
+                      type: "success",
                     });
                     this.loading1 = false;
                     this.dialogFormVisible = false;
@@ -982,17 +1107,17 @@ export default {
                     this.loading1 = false;
                     this.$message({
                       message: "提交失败",
-                      type: "error"
+                      type: "error",
                     });
                   });
               } else if (this.dialogStatus == "two") {
                 this.addform.splerId = this.$store.state.user.orgId;
                 this.addform.prodEntp = this.infoData.prodEntp;
                 insertFacQua(this.addform)
-                  .then(response => {
+                  .then((response) => {
                     this.$message({
                       message: "提交成功",
-                      type: "success"
+                      type: "success",
                     });
                     this.loading1 = false;
                     this.dialogFormVisible = false;
@@ -1009,7 +1134,7 @@ export default {
                     this.loading1 = false;
                     this.$message({
                       message: "提交失败",
-                      type: "error"
+                      type: "error",
                     });
                   });
               }
@@ -1017,8 +1142,8 @@ export default {
             .catch(() => {});
         }
       });
-    }
-  }
+    },
+  },
 };
 </script>
 

+ 14 - 0
src/views/page/consumCataManage-sup/catalogdetailsadd.vue

@@ -376,6 +376,7 @@
                     v-model="infoData.stogType"
                     placeholder="请选择存储方式"
                     clearable
+                    @change="storageChage"
                   >
                     <el-option
                       v-for="item in stogTypeData"
@@ -394,6 +395,7 @@
                     v-model="infoData.stogTemp"
                     placeholder="请选择存储温度"
                     clearable
+                    disabled
                   >
                     <el-option
                       v-for="item in stogTempData"
@@ -823,6 +825,18 @@ export default {
     // this.getData()
   },
   methods: {
+    //存储方式和温度联动
+    storageChage(val) {
+      if (val == "常温") {
+        this.infoData.stogTemp = "15℃-25℃";
+      }
+      if (val == "冷藏") {
+        this.infoData.stogTemp = "2℃-8℃";
+      }
+      if (val == "冷冻") {
+        this.infoData.stogTemp = "-10℃-2℃";
+      }
+    },
     isWithinLastThreeMonths(deadline) {
       // 创建截止日期对象
       const deadlineDate = new Date(deadline);

+ 1 - 1
src/views/page/orderManage-sup/alreadyDelivery/alreadyDetail.vue

@@ -548,7 +548,7 @@ export default {
         query: {
           form: JSON.stringify({
             ...this.listForm,
-            id: this.listForm.delvOrdId,
+            id: this.listForm.purcOrdId,
             quit: "print"
           }),
           data: JSON.stringify(this.tableData)

+ 4 - 0
src/views/page/orderManage-sup/purOrderDelivery/printView.vue

@@ -32,6 +32,10 @@
       </div>
     </div>
     <div class="header-print">
+      <div class="item-print" v-if="form.id">
+        <div class="print-label">采购单号:</div>
+        <div class="print-value">{{ form.id }}</div>
+      </div>
       <div class="item-print" v-if="form.delvOrdId">
         <div class="print-label">出库单号:</div>
         <div class="print-value">{{ form.delvOrdId }}</div>