liangbowen il y a 1 an
Parent
commit
01a079ddbc

+ 2 - 0
package.json

@@ -39,8 +39,10 @@
     "screenfull": "^5.2.0",
     "v-viewer": "^1.5.1",
     "vue": "2.6.10",
+    "vue-barcode": "^1.3.0",
     "vue-layer": "^1.2.0",
     "vue-pdf": "^4.1.0",
+    "vue-qr": "^4.0.9",
     "vue-quill-editor": "^3.0.6",
     "vue-router": "3.0.6",
     "vue-video-player": "^5.0.2",

+ 1 - 1
src/layout/components/Navbar.vue

@@ -24,7 +24,7 @@
         <el-dropdown-menu slot="dropdown">
           <router-link to="/personalCenter">
             <el-dropdown-item>
-              <i class="el-icon-user-solid" />个人中心
+              <i class="el-icon-user-solid" />账户信息
             </el-dropdown-item>
           </router-link>
           <el-dropdown-item>

+ 1 - 1
src/router/index.js

@@ -71,7 +71,7 @@ export const constantRoutes = [
         path: "/personalCenter",
         component: () => import("@/views/page/personalCenter/index"),
         name: "PersonalCenter",
-        meta: { title: "个人中心", icon: "dashboard" },
+        meta: { title: "账户信息", icon: "dashboard" },
         hidden: true
       }
     ]

+ 21 - 7
src/router/modules/order.js

@@ -13,7 +13,8 @@ const orderRouter = {
     {
       // 采购订单-待确认详情
       path: "acceptDetail",
-      component: () => import("@/views/page/orderManage-sup/purOrderAccept/acceptDetail.vue"),
+      component: () =>
+        import("@/views/page/orderManage-sup/purOrderAccept/acceptDetail.vue"),
       name: "acceptDetail",
       meta: { title: "采购订单受理-待确认详情", icon: "" },
       hidden: true
@@ -21,7 +22,8 @@ const orderRouter = {
     {
       // 采购订单-已确认详情
       path: "confirmDetail",
-      component: () => import("@/views/page/orderManage-sup/purOrderConfirmed/confirmDetail.vue"),
+      component: () =>
+        import("@/views/page/orderManage-sup/purOrderConfirmed/confirmDetail.vue"),
       name: "confirmDetail",
       meta: { title: "采购订单-已确认详情", icon: "" },
       hidden: true
@@ -29,27 +31,39 @@ const orderRouter = {
     {
       // 采购订单-待出库详情
       path: "deliveryDetail",
-      component: () => import("@/views/page/orderManage-sup/purOrderDelivery/deliveryDetail.vue"),
+      component: () =>
+        import("@/views/page/orderManage-sup/purOrderDelivery/deliveryDetail.vue"),
       name: "deliveryDetail",
       meta: { title: "采购订单-待出库详情", icon: "" },
       hidden: true
     },
     {
+      // 采购订单-出库成功页面
+      path: "devsuccs",
+      component: () =>
+        import("@/views/page/orderManage-sup/purOrderDelivery/devsuccs.vue"),
+      name: "devsuccs",
+      meta: { title: "采购订单-出库单", icon: "" },
+      hidden: true
+    },
+    {
       // 采购订单-已出库详情
       path: "alreadyDetail",
-      component: () => import("@/views/page/orderManage-sup/alreadyDelivery/alreadyDetail.vue"),
+      component: () =>
+        import("@/views/page/orderManage-sup/alreadyDelivery/alreadyDetail.vue"),
       name: "alreadyDetail",
       meta: { title: "采购订单-已出库详情", icon: "" },
       hidden: true
-    },  
+    },
     {
       // 骨科订单-待确认详情
       path: "orthacceptDetail",
-      component: () => import("@/views/page/orderManage-sup/orthOpedicAccept/acceptDetail.vue"),
+      component: () =>
+        import("@/views/page/orderManage-sup/orthOpedicAccept/acceptDetail.vue"),
       name: "acceptDetail",
       meta: { title: "骨科订单受理-待确认详情", icon: "" },
       hidden: true
-    },
+    }
   ]
 };
 

+ 37 - 34
src/views/page/consumCataManage-sup/catalogdetails.vue

@@ -216,11 +216,11 @@
                   </el-select>
                 </el-form-item>
                 <el-form-item label="是否集采" prop="isFas" :rules="rules.selectRequired">
-                  <div class="content" v-if="isShow">
+                  <div class="content">
                     <span v-if="infoData.isFas == '1'">是</span>
                     <span v-if="infoData.isFas == '0'">否</span>
                   </div>
-                  <el-select
+                  <!-- <el-select
                     v-else
                     v-model="infoData.isFas"
                     placeholder="请选择是否集采"
@@ -233,7 +233,7 @@
                       :label="item.name"
                       :value="item.value"
                     ></el-option>
-                  </el-select>
+                  </el-select> -->
                 </el-form-item>
               </div>
               <div class="flex-css">
@@ -791,7 +791,7 @@ export default {
         issuDate: "",
         endDate: "",
         fileId: "",
-        memo:"",
+        memo: "",
       },
       textMap: {
         one: "商品资质",
@@ -802,9 +802,9 @@ export default {
       list: [],
       listC: [],
       editCode: true,
-      qualData:[
-        {id:"1",dicVal:"商品授权书"},
-        {id:"2",dicVal:"商品注册证"}
+      qualData: [
+        { id: "1", dicVal: "商品授权书" },
+        { id: "2", dicVal: "商品注册证" },
       ],
       TimeOption: {
         disabledDate(time) {
@@ -816,14 +816,11 @@ export default {
           return time.getTime() > Date.now();
         },
       },
-      inputDate:"",
-      selectedDate:null
+      inputDate: "",
+      selectedDate: null,
     };
   },
   created() {
-    // this.$nextTick(()=>{
-    //   this.$refs['planForm'].resetFields();
-    // })
     if (this.$route.query.status == "B" || this.$route.query.status == "C") {
       this.btnShow = false;
     } else if (this.$route.query.status == "D") {
@@ -849,6 +846,12 @@ export default {
     } else {
       this.editCode = true;
     }
+     let qeryData = this.$route.query;
+    if (qeryData.isPub == undefined || qeryData.isPub == "0") {
+      this.infoData.isFas = "0";
+    }else{
+        this.infoData.isFas = "1";
+    }
   },
   methods: {
     handleInputDateChange(value) {
@@ -856,13 +859,13 @@ export default {
       if (!isNaN(date.getTime())) {
         this.selectedDate = date;
       } else {
-        this.$message.error('输入的日期格式不正确');
+        this.$message.error("输入的日期格式不正确");
       }
     },
     handleInputDateChange1(value) {
-      const date =  new Date(value).getTime();
+      const date = new Date(value).getTime();
       // this.inputDate = date;
-      this.inputDate = moment(date).format("YYYY-MM-DD")
+      this.inputDate = moment(date).format("YYYY-MM-DD");
     },
     //获取列表数据
     getData() {
@@ -974,7 +977,7 @@ 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({
@@ -985,7 +988,7 @@ export default {
     },
     // 新增资质
     handleAdd(type) {
-      this.addform={
+      (this.addform = {
         splerId: "",
         hiCode: "",
         quaName: "",
@@ -993,30 +996,30 @@ export default {
         issuDate: "",
         endDate: "",
         fileId: "",
-        memo:"",
-      },
-      this.dialogFormVisible = true;
+        memo: "",
+      }),
+        (this.dialogFormVisible = true);
       this.dialogStatus = type;
       this.$nextTick(() => {
-        this.$refs.addForm.resetFields()
-      })
+        this.$refs.addForm.resetFields();
+      });
     },
     handleAdd1(type) {
-      this.addform={
+      (this.addform = {
         splerId: "",
         quaName: "",
         quaCode: "",
         issuDate: "",
         endDate: "",
         fileId: "",
-        memo:"",
+        memo: "",
         prodEntp: "",
-      },
-      this.dialogFormVisible = true;
+      }),
+        (this.dialogFormVisible = true);
       this.dialogStatus = type;
       this.$nextTick(() => {
-        this.$refs.addForm.resetFields()
-      })
+        this.$refs.addForm.resetFields();
+      });
     },
     getUpload(id) {
       this.addform.fileId = id;
@@ -1040,8 +1043,8 @@ export default {
               this.loading1 = true;
               if (this.dialogStatus == "one") {
                 this.addform.splerId = this.$store.state.user.orgId;
-                this.addform.hiCode = this.infoData.hiCode
-                this.addform.endDate = this.selectedDate
+                this.addform.hiCode = this.infoData.hiCode;
+                this.addform.endDate = this.selectedDate;
                 insertMcsQua(this.addform)
                   .then((response) => {
                     this.$message({
@@ -1050,7 +1053,7 @@ export default {
                     });
                     this.loading1 = false;
                     this.dialogFormVisible = false;
-                    this.activeName = "second"
+                    this.activeName = "second";
                     if (this.$route.query.type == "modify") {
                       this.getData1();
                     } else {
@@ -1066,7 +1069,7 @@ export default {
                   });
               } else if (this.dialogStatus == "two") {
                 this.addform.splerId = this.$store.state.user.orgId;
-                this.addform.prodEntp = this.infoData.prodEntp
+                this.addform.prodEntp = this.infoData.prodEntp;
                 insertFacQua(this.addform)
                   .then((response) => {
                     this.$message({
@@ -1074,10 +1077,10 @@ export default {
                       type: "success",
                     });
                     this.loading1 = false;
-                    this.dialogFormVisible = false
+                    this.dialogFormVisible = false;
                     this.loading1 = false;
                     this.dialogFormVisible = false;
-                    this.activeName = "second"
+                    this.activeName = "second";
                     if (this.$route.query.type == "modify") {
                       this.getData1();
                     } else {

+ 159 - 91
src/views/page/consumCataManage-sup/catalogdetailsadd.vue

@@ -16,21 +16,33 @@
         </div> -->
             <div class="form-body">
               <div class="flex-css">
-                <el-form-item label="耗材名称" prop="prodName" :rules="rules.required">
+                <el-form-item
+                  label="耗材名称"
+                  prop="prodName"
+                  :rules="rules.required"
+                >
                   <el-input
                     v-model="infoData.prodName"
                     placeholder="请输入耗材名称"
                     maxlength="50"
                   ></el-input>
                 </el-form-item>
-                <el-form-item label="通用名称" prop="genName" :rules="rules.required">
+                <el-form-item
+                  label="通用名称"
+                  prop="genName"
+                  :rules="rules.required"
+                >
                   <el-input
                     v-model="infoData.genName"
                     placeholder="请输入通用名称"
                     maxlength="50"
                   ></el-input>
                 </el-form-item>
-                <el-form-item label="英文名称" prop="engName" :rules="rules.InterEng">
+                <el-form-item
+                  label="英文名称"
+                  prop="engName"
+                  :rules="rules.InterEng"
+                >
                   <el-input
                     v-model="infoData.engName"
                     placeholder="请输入英文名称"
@@ -64,7 +76,11 @@
                     ></el-option>
                   </el-select>
                 </el-form-item>
-                <el-form-item label="生产企业" prop="prodEntp" :rules="rules.required">
+                <el-form-item
+                  label="生产企业"
+                  prop="prodEntp"
+                  :rules="rules.required"
+                >
                   <el-input
                     v-model="infoData.prodEntp"
                     maxlength="50"
@@ -73,7 +89,11 @@
                 </el-form-item>
               </div>
               <div class="flex-css">
-                <el-form-item label="代理企业" prop="agnt" :rules="rules.required">
+                <el-form-item
+                  label="代理企业"
+                  prop="agnt"
+                  :rules="rules.required"
+                >
                   <el-input
                     v-model="infoData.agnt"
                     placeholder="请输入代理企业"
@@ -105,14 +125,22 @@
                     maxlength="50"
                   ></el-input>
                 </el-form-item>
-                <el-form-item label="包装材质" prop="pacmatl" :rules="rules.required">
+                <el-form-item
+                  label="包装材质"
+                  prop="pacmatl"
+                  :rules="rules.required"
+                >
                   <el-input
                     v-model="infoData.pacmatl"
                     placeholder="请输入包装材质"
                     maxlength="50"
                   ></el-input>
                 </el-form-item>
-                <el-form-item label="注册证号" prop="regcertno" :rules="rules.required">
+                <el-form-item
+                  label="注册证号"
+                  prop="regcertno"
+                  :rules="rules.required"
+                >
                   <el-input
                     v-model="infoData.regcertno"
                     placeholder="请输入注册证号"
@@ -163,11 +191,16 @@
                     ></el-option>
                   </el-select>
                 </el-form-item>
-                <el-form-item label="是否集采" prop="isFas" :rules="rules.selectRequired">
+                <el-form-item
+                  label="是否集采"
+                  prop="isFas"
+                  :rules="rules.selectRequired"
+                >
                   <el-select
                     v-model="infoData.isFas"
                     placeholder="请选择是否集采"
                     clearable
+                    disabled="true"
                     @change="clearType"
                   >
                     <el-option
@@ -227,7 +260,11 @@
             <h3>耗材编码资料</h3>
             <div class="form-body">
               <div class="flex-css">
-                <el-form-item label="医保编码" prop="hiCode" :rules="rules.required">
+                <el-form-item
+                  label="医保编码"
+                  prop="hiCode"
+                  :rules="rules.required"
+                >
                   <el-input
                     v-model="infoData.hiCode"
                     placeholder="请输入医保编码"
@@ -259,7 +296,11 @@
                     ></el-option>
                   </el-select>
                 </el-form-item>
-                <el-form-item label="采购价" prop="purcPric" :rules="rules.numPot4">
+                <el-form-item
+                  label="采购价"
+                  prop="purcPric"
+                  :rules="rules.numPot4"
+                >
                   <template slot-scope="{}" slot="label">
                     <span>采购价</span>
                     <el-tooltip class="item" effect="dark" placement="top">
@@ -296,7 +337,11 @@
                     ></el-option>
                   </el-select>
                 </el-form-item>
-                <el-form-item label="包装内数量" prop="convrat" :rules="rules.InterNum">
+                <el-form-item
+                  label="包装内数量"
+                  prop="convrat"
+                  :rules="rules.InterNum"
+                >
                   <template slot-scope="{}" slot="label">
                     <span>包装内数量</span>
                     <el-tooltip class="item" effect="dark" placement="top">
@@ -387,9 +432,7 @@
           <el-button type="primary" @click="handleSubmit" :loading="submitLoad"
             >提交</el-button
           >
-          <el-button type="info" @click="handleBack"
-            >返回</el-button
-          >
+          <el-button type="info" @click="handleBack">返回</el-button>
         </div>
       </el-tab-pane>
       <el-tab-pane label="资质信息" name="second">
@@ -418,7 +461,8 @@
               <p>暂无数据</p>
             </template>
             <el-table-column fixed type="index" label="序号" width="60" />
-            <el-table-column label="资质证书信息" prop="quaName"> </el-table-column>
+            <el-table-column label="资质证书信息" prop="quaName">
+            </el-table-column>
             <el-table-column label="资质证书编号" prop="quaCode" />
             <el-table-column label="发证日期" prop="issuDate" />
             <el-table-column label="截止日期" prop="endDate" />
@@ -460,7 +504,8 @@
               <p>暂无数据</p>
             </template>
             <el-table-column fixed type="index" label="序号" width="60" />
-            <el-table-column label="资质证书信息" prop="quaName"> </el-table-column>
+            <el-table-column label="资质证书信息" prop="quaName">
+            </el-table-column>
             <el-table-column label="资质证书编号" prop="quaCode" />
             <el-table-column label="发证日期" prop="issuDate" />
             <el-table-column label="截止日期" prop="endDate" />
@@ -493,7 +538,10 @@
           prop="quaName"
           :rules="rules.selectRequired"
         >
-          <el-select v-model.trim="addform.quaName" placeholder="请选择资质证书信息">
+          <el-select
+            v-model.trim="addform.quaName"
+            placeholder="请选择资质证书信息"
+          >
             <el-option
               v-for="item in qualData"
               :key="item.id"
@@ -503,7 +551,11 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="资质证书编号" prop="quaCode" :rules="rules.required">
+        <el-form-item
+          label="资质证书编号"
+          prop="quaCode"
+          :rules="rules.required"
+        >
           <el-input
             v-model="addform.quaCode"
             placeholder="请输入资质证书编号"
@@ -511,7 +563,11 @@
           ></el-input>
         </el-form-item>
 
-        <el-form-item label="发证时间" prop="issuDate" :rules="rules.dateRequired">
+        <el-form-item
+          label="发证时间"
+          prop="issuDate"
+          :rules="rules.dateRequired"
+        >
           <el-date-picker
             v-model.trim="addform.issuDate"
             type="date"
@@ -520,7 +576,11 @@
             value-format="yyyy-MM-dd"
           ></el-date-picker>
         </el-form-item>
-        <el-form-item label="截止时间" prop="endDate" :rules="rules.dateRequired">
+        <el-form-item
+          label="截止时间"
+          prop="endDate"
+          :rules="rules.dateRequired"
+        >
           <el-date-picker
             v-model.trim="addform.endDate"
             type="date"
@@ -529,9 +589,19 @@
             value-format="yyyy-MM-dd"
           ></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>
+        <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
@@ -565,8 +635,12 @@
 <script>
 import ylStep from "@/components/yl-step";
 import ylUpload from "@/components/yl-upload";
-import { selectMcsListById, insertSplerMcsList,insertMcsQua,
-  insertFacQua, } from "@/api/consumCataManage-sup/index";
+import {
+  selectMcsListById,
+  insertSplerMcsList,
+  insertMcsQua,
+  insertFacQua
+} from "@/api/consumCataManage-sup/index";
 import rules from "@/utils/rules";
 export default {
   components: { ylUpload, ylStep },
@@ -581,7 +655,7 @@ export default {
         materialId: "",
         prodName: "",
         hiCode: "",
-        isFas: "",
+        isFas: "0",
         fasBtch: "",
         spec: "",
         mol: "",
@@ -594,40 +668,34 @@ export default {
         purcPric: null,
         status: "",
         isPub: "0",
-        id:"",
+        id: ""
       },
       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: "2", 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: "非灭菌" }
       ],
       purcUntData: [
         // 最小单位
@@ -670,7 +738,7 @@ export default {
         { value: "付", label: "付" },
         { value: "桶", label: "桶" },
         { value: "节", label: "节" },
-        { value: "打", label: "打" },
+        { value: "打", label: "打" }
       ],
       prcUntData: [
         { value: "箱", label: "箱" },
@@ -703,7 +771,7 @@ export default {
         { value: "条", label: "条" },
         { value: "桶", label: "桶" },
         { value: "张", label: "张" },
-        { value: "束", label: "束" },
+        { value: "束", label: "束" }
       ],
       btnShow: true,
       dialogFormVisible: false,
@@ -716,30 +784,30 @@ export default {
         issuDate: "",
         endDate: "",
         fileId: "",
-        memo:"",
+        memo: ""
       },
       textMap: {
         one: "商品资质",
-        two: "生产厂商资质",
+        two: "生产厂商资质"
       },
       dialogStatus: "",
       list: [],
       listC: [],
       editCode: true,
-      qualData:[
-        {id:"1",dicVal:"商品授权书"},
-        {id:"2",dicVal:"商品注册证"}
+      qualData: [
+        { id: "1", dicVal: "商品授权书" },
+        { id: "2", dicVal: "商品注册证" }
       ],
       TimeOption: {
         disabledDate(time) {
           return time.getTime() < Date.now();
-        },
+        }
       },
       TimeOption1: {
         disabledDate(time) {
           return time.getTime() > Date.now();
-        },
-      },
+        }
+      }
     };
   },
   created() {
@@ -766,7 +834,7 @@ export default {
       this.$confirm("确认保存", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           this.saveLoad = true;
@@ -774,12 +842,12 @@ export default {
           this.infoData.status = "A";
           this.infoData.opeType = "新增";
           insertSplerMcsList(this.infoData)
-            .then((response) => {
+            .then(response => {
               this.$message({
                 message: "保存成功",
-                type: "success",
+                type: "success"
               });
-              this.infoData.id = response.data.id
+              this.infoData.id = response.data.id;
               this.saveLoad = false;
             })
             .catch(() => {
@@ -793,27 +861,27 @@ export default {
 
     // 整体提交
     handleSubmit() {
-      this.$refs["planForm"].validate((valid) => {
+      this.$refs["planForm"].validate(valid => {
         if (valid) {
           this.$confirm("确认提交", "提示", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
-            type: "warning",
+            type: "warning"
           })
             .then(() => {
               this.submitLoad = true;
               this.infoData.status = "B";
               this.infoData.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(() => {
@@ -830,7 +898,7 @@ export default {
     },
     // 新增资质
     handleAdd(type) {
-      this.addform={
+      (this.addform = {
         splerId: "",
         hiCode: "",
         quaName: "",
@@ -838,30 +906,30 @@ export default {
         issuDate: "",
         endDate: "",
         fileId: "",
-        memo:"",
-      },
-      this.dialogFormVisible = true;
+        memo: ""
+      }),
+        (this.dialogFormVisible = true);
       this.dialogStatus = type;
       this.$nextTick(() => {
-        this.$refs.addForm.resetFields()
-      })
+        this.$refs.addForm.resetFields();
+      });
     },
     handleAdd1(type) {
-      this.addform={
+      (this.addform = {
         splerId: "",
         quaName: "",
         quaCode: "",
         issuDate: "",
         endDate: "",
         fileId: "",
-        memo:"",
-        prodEntp: "",
-      },
-      this.dialogFormVisible = true;
+        memo: "",
+        prodEntp: ""
+      }),
+        (this.dialogFormVisible = true);
       this.dialogStatus = type;
       this.$nextTick(() => {
-        this.$refs.addForm.resetFields()
-      })
+        this.$refs.addForm.resetFields();
+      });
     },
     getUpload(id) {
       this.addform.fileId = id;
@@ -873,27 +941,27 @@ 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;
               if (this.dialogStatus == "one") {
                 this.addform.splerId = this.$store.state.user.orgId;
-                this.addform.hiCode = this.infoData.hiCode
+                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;
-                    this.activeName = "second"
+                    this.activeName = "second";
                     if (this.$route.query.type == "modify") {
                       this.getData1();
                     } else {
@@ -904,23 +972,23 @@ 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
+                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
+                    this.dialogFormVisible = false;
                     this.loading1 = false;
                     this.dialogFormVisible = false;
-                    this.activeName = "second"
+                    this.activeName = "second";
                     if (this.$route.query.type == "modify") {
                       this.getData1();
                     } else {
@@ -931,7 +999,7 @@ export default {
                     this.loading1 = false;
                     this.$message({
                       message: "提交失败",
-                      type: "error",
+                      type: "error"
                     });
                   });
               }
@@ -941,12 +1009,12 @@ export default {
       });
     },
     handleBack() {
-        this.$router.push({
-          name: "distributionmanage",
-          query: {spdId: this.$route.query.spdId },
-        });
-    },
-  },
+      this.$router.push({
+        name: "distributionmanage",
+        query: { spdId: this.$route.query.spdId }
+      });
+    }
+  }
 };
 </script>
 

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

@@ -60,11 +60,21 @@
               </div>
             </el-form-item>
             <el-form-item label="当前状态" prop="delvOrdStas">
-              <div class="content" v-if="listForm.delvOrdStas === 'C'">已出库</div>
-              <div class="content" v-if="listForm.delvOrdStas === 'R'">被驳回</div>
-              <div class="content" v-if="listForm.delvOrdStas === 'D'">部分出库</div>
-              <div class="content" v-if="listForm.delvOrdStas === 'Y'">已入库</div>
-              <div class="content" v-if="listForm.delvOrdStas === 'P'">部分入库</div>
+              <div class="content" v-if="listForm.delvOrdStas === 'C'">
+                已出库
+              </div>
+              <div class="content" v-if="listForm.delvOrdStas === 'R'">
+                被驳回
+              </div>
+              <div class="content" v-if="listForm.delvOrdStas === 'D'">
+                部分出库
+              </div>
+              <div class="content" v-if="listForm.delvOrdStas === 'Y'">
+                已入库
+              </div>
+              <div class="content" v-if="listForm.delvOrdStas === 'P'">
+                部分入库
+              </div>
             </el-form-item>
           </div>
           <div class="flex-css">
@@ -115,13 +125,25 @@
     </div>
     <div class="common-card">
       <h3>商品明细</h3>
-      <el-form :model="listQuery" ref="listQuery" :inline="true" label-width="90px">
+      <el-form
+        :model="listQuery"
+        ref="listQuery"
+        :inline="true"
+        label-width="90px"
+      >
         <el-form-item size="mini" label="生产企业" prop="prodEntp" class="long">
-          <el-input v-model="listQuery.prodEntp" placeholder="请输入生产企业"></el-input>
+          <el-input
+            v-model="listQuery.prodEntp"
+            placeholder="请输入生产企业"
+          ></el-input>
         </el-form-item>
 
         <el-form-item size="mini" label="是否集采" prop="isFas" class="long">
-          <el-select v-model="listQuery.isFas" placeholder="请选择是否集采" clearable>
+          <el-select
+            v-model="listQuery.isFas"
+            placeholder="请选择是否集采"
+            clearable
+          >
             <el-option
               v-for="item in isFasData"
               :key="item.value"
@@ -130,14 +152,25 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item size="mini" label="注册证号" prop="regcertno" class="long">
-          <el-input v-model="listQuery.regcertno" placeholder="请输入注册证号"></el-input>
+        <el-form-item
+          size="mini"
+          label="注册证号"
+          prop="regcertno"
+          class="long"
+        >
+          <el-input
+            v-model="listQuery.regcertno"
+            placeholder="请输入注册证号"
+          ></el-input>
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="getData()">查询</el-button>
           <el-button @click="reset">重置</el-button>
         </el-form-item>
       </el-form>
+      <div class="right-button">
+        <el-button type="primary" @click="ckPrivew()">打印出库单</el-button>
+      </div>
       <el-table
         :data="tableData"
         v-loading="loding"
@@ -176,8 +209,18 @@
           </template>
         </el-table-column>
         <el-table-column label="批次号" prop="lotNum" />
-        <el-table-column label="生产日期" prop="manuDate" width="100px" v-if="!cShow"/>
-        <el-table-column label="有效期至" prop="prodExpy" width="100px" v-if="!cShow"/>
+        <el-table-column
+          label="生产日期"
+          prop="manuDate"
+          width="100px"
+          v-if="!cShow"
+        />
+        <el-table-column
+          label="有效期至"
+          prop="prodExpy"
+          width="100px"
+          v-if="!cShow"
+        />
         <el-table-column label="需求数量" prop="purcCnt" />
         <el-table-column label="剩余出库量" prop="toDelvCnt" width="90px" />
         <el-table-column label="本次出库量" prop="delvCnt" width="90px" />
@@ -234,7 +277,9 @@
 
       <div class="foot-button" style="margin-top: 30px">
         <!-- <el-button type="danger" @click="handleOrderEnd" :loading="endLoad">结束订单</el-button> -->
-        <el-button type="info" @click="handleBack" :loading="endLoad">返 回</el-button>
+        <el-button type="info" @click="handleBack" :loading="endLoad"
+          >返 回</el-button
+        >
       </div>
     </div>
     <!-- 选择发票 -->
@@ -244,7 +289,9 @@
           <el-input v-model="faForm.aa" placeholder="请输入发票名称"></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="getFaData('search')">查询</el-button>
+          <el-button type="primary" @click="getFaData('search')"
+            >查询</el-button
+          >
           <el-button @click="faReset">重置</el-button>
         </el-form-item>
       </el-form>
@@ -268,7 +315,9 @@
         <el-table-column label="上传时间" prop="" />
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
-            <el-button type="primary" plain @click="handleRow(scope.row)">选择</el-button>
+            <el-button type="primary" plain @click="handleRow(scope.row)"
+              >选择</el-button
+            >
           </template>
         </el-table-column>
       </el-table>
@@ -285,10 +334,15 @@
     <el-dialog title="选择同行单" :visible.sync="dialogTong" width="55%">
       <el-form :model="tongForm" ref="tongform" :inline="true">
         <el-form-item label="发票信息" prop="aa">
-          <el-input v-model="tongForm.aa" placeholder="请输入同行单名称"></el-input>
+          <el-input
+            v-model="tongForm.aa"
+            placeholder="请输入同行单名称"
+          ></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="getTongData('search')">查询</el-button>
+          <el-button type="primary" @click="getTongData('search')"
+            >查询</el-button
+          >
           <el-button @click="TongReset">重置</el-button>
         </el-form-item>
       </el-form>
@@ -335,44 +389,48 @@
       width="70%"
       center
     >
-      <iframe :src="pdfSrc" frameborder="0" style="width: 100%; height: 100%"></iframe>
+      <iframe
+        :src="pdfSrc"
+        frameborder="0"
+        style="width: 100%; height: 100%"
+      ></iframe>
     </el-dialog>
     <!-- UDI码 -->
     <el-dialog title="UDI码" :visible.sync="udidialog" width="70%">
-        <el-table element-loading-text="加载中" :data="udiData" fit stripe border>
-          <template slot="empty">
-            <img src="@/assets/nopage.png" alt />
-            <p>暂无数据</p>
+      <el-table element-loading-text="加载中" :data="udiData" fit stripe border>
+        <template slot="empty">
+          <img src="@/assets/nopage.png" alt />
+          <p>暂无数据</p>
+        </template>
+        <el-table-column type="index" label="序号" width="60" />
+        <el-table-column label="耗材信息" width="230">
+          <template slot-scope="scope">
+            <mcs-info :info="scope.row"></mcs-info>
+          </template>
+        </el-table-column>
+        <el-table-column label="规格" prop="spec" />
+        <el-table-column label="型号" prop="mol" />
+        <el-table-column label="材质" prop="matl" />
+        <el-table-column label="是否集采" prop="isFas">
+          <template #default="{ row }">
+            <span v-if="row.isFas == '0'">否</span>
+            <span v-if="row.isFas == '1'">是</span>
           </template>
-          <el-table-column type="index" label="序号" width="60" />
-          <el-table-column label="耗材信息" width="230">
-            <template slot-scope="scope">
-              <mcs-info :info="scope.row"></mcs-info>
-            </template>
-          </el-table-column>
-          <el-table-column label="规格" prop="spec" />
-          <el-table-column label="型号" prop="mol" />
-          <el-table-column label="材质" prop="matl" />
-          <el-table-column label="是否集采" prop="isFas">
-            <template #default="{ row }">
-              <span v-if="row.isFas == '0'">否</span>
-              <span v-if="row.isFas == '1'">是</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="批号" prop="lotNum"> </el-table-column>
-          <!-- <el-table-column label="生产日期" prop="manuDate"> </el-table-column>
+        </el-table-column>
+        <el-table-column label="批号" prop="lotNum"> </el-table-column>
+        <!-- <el-table-column label="生产日期" prop="manuDate"> </el-table-column>
           <el-table-column label="有效期至" prop="prodExpy"> </el-table-column> -->
-          <el-table-column label="包装" prop="convrat" width="120px">
-            <template #default="{ row }">
-              <span
-                >{{ row.purcUnt }} ({{ row.convrat }}{{ row.prcUnt }}/{{
-                  row.purcUnt
-                }})</span
-              >
-            </template>
-          </el-table-column>
-          <el-table-column label="UDI码" prop="udi" width="120"></el-table-column>
-        </el-table>
+        <el-table-column label="包装" prop="convrat" width="120px">
+          <template #default="{ row }">
+            <span
+              >{{ row.purcUnt }} ({{ row.convrat }}{{ row.prcUnt }}/{{
+                row.purcUnt
+              }})</span
+            >
+          </template>
+        </el-table-column>
+        <el-table-column label="UDI码" prop="udi" width="120"></el-table-column>
+      </el-table>
     </el-dialog>
   </div>
 </template>
@@ -453,11 +511,11 @@ export default {
         { value: "0", name: "否" },
       ],
       udidialog: false,
-      udiData:[]
+      udiData: [],
     };
   },
   created() {
-    if (this.$route.query.purcType=="2") {
+    if (this.$route.query.purcType == "2") {
       this.cShow = true;
     } else {
       this.cShow = false;
@@ -486,6 +544,19 @@ export default {
     this.getData();
   },
   methods: {
+    // 跳转打印
+    ckPrivew() {
+      this.$router.push({
+        name: "devsuccs",
+        query: {
+          form: JSON.stringify({
+            ...this.listForm,
+            id: this.listForm.delvOrdId,
+          }),
+          data: JSON.stringify(this.tableData),
+        },
+      });
+    },
     getData() {
       this.listLoading = true;
       let data = {
@@ -545,7 +616,7 @@ export default {
         columnIndex === 7 ||
         columnIndex === 8 ||
         columnIndex === 12 ||
-        columnIndex === 13 
+        columnIndex === 13
       ) {
         // console.log("单元格数组,若下一项为0,则代表合并上一项", this.cellList);
         const rowCell = this.cellList[rowIndex];
@@ -690,25 +761,25 @@ export default {
     },
     // 查看UDI码
     handleudi(row) {
-      this.udiData = row.udiList
-      this.udiData = this.udiData.map(item => ({
+      this.udiData = row.udiList;
+      this.udiData = this.udiData.map((item) => ({
         ...item,
-        spec:row.spec,
-        mol:row.mol,
-        matl:row.matl,
-        isFas:row.isFas,
-        lotNum:row.lotNum,
-        manuDate:row.manuDate,
-        prodExpy:row.prodExpy,
-        convrat:row.convrat,
-        purcUnt:row.purcUnt,
-        prcUnt:row.prcUnt,
-        prodName:row.prodName,
-        mcsType:row.mcsType,
-        regcertno:row.regcertno,
-        prodEntp:row.prodEntp,
-        prodSouc:row.prodSouc,
-        fasBtch:row.fasBtch,
+        spec: row.spec,
+        mol: row.mol,
+        matl: row.matl,
+        isFas: row.isFas,
+        lotNum: row.lotNum,
+        manuDate: row.manuDate,
+        prodExpy: row.prodExpy,
+        convrat: row.convrat,
+        purcUnt: row.purcUnt,
+        prcUnt: row.prcUnt,
+        prodName: row.prodName,
+        mcsType: row.mcsType,
+        regcertno: row.regcertno,
+        prodEntp: row.prodEntp,
+        prodSouc: row.prodSouc,
+        fasBtch: row.fasBtch,
       }));
       this.udidialog = true;
     },

+ 5 - 5
src/views/page/orderManage-sup/purOrderAccept/acceptDetail.vue

@@ -175,7 +175,7 @@
             </template>
           </el-table-column>
           <el-table-column label="总金额" prop="purcAmt" />
-          <el-table-column label="回原因" prop="rejtRea" width="200">
+          <el-table-column label="退回原因" prop="rejtRea" width="200">
                     <template slot-scope="scope">
                         <el-form-item
                             label-width="0"
@@ -186,7 +186,7 @@
                         </el-form-item>
                     </template>
           </el-table-column>
-          <el-table-column label="是否回" width="100">
+          <el-table-column label="是否退回" width="100">
               <template slot-scope="scope">
                   <el-switch v-model="scope.row.flag" @change="handleSwitch(scope.$index,scope.row)" :disabled="!isShow"></el-switch>
               </template>
@@ -246,7 +246,7 @@ export default {
       stasOptions: [
         { value: "A", lable: "未受理" },
         { value: "B", lable: "已受理" },
-        { value: "R", lable: "被回" },
+        { value: "R", lable: "被退回" },
         { value: "C", lable: "已出库" },
         { value: "D", lable: "部分出库" },
         { value: "Y", lable: "已入库" },
@@ -330,10 +330,10 @@ export default {
         this.list.forEach((e) => {
           if (e.flag == true && !e.rejtRea) {
             this.$message({
-              message: "选择是否驳回后请填写驳回原因",
+              message: "选择是否退回后请填写退回原因",
               type: "warning",
             });
-            throw new Error("选择是否驳回后请填写驳回原因");
+            throw new Error("选择是否退回后请填写退回原因");
           }
         });
       this.$confirm("确认受理", "提示", {

+ 262 - 384
src/views/page/orderManage-sup/purOrderDelivery/deliveryDetail.vue

@@ -117,7 +117,6 @@
       <el-form-item size="mini" label="生产企业" prop="prodEntp" class="long">
           <el-input v-model="listQuery.prodEntp" placeholder="请输入生产企业"></el-input>
         </el-form-item>
-
        <el-form-item size="mini" label="是否集采" prop="isFas" class="long">
           <el-select v-model="listQuery.isFas" placeholder="请选择是否集采" clearable>
             <el-option
@@ -143,11 +142,16 @@
           element-loading-text="加载中..."
           border
           :span-method="handleSpan"
+          @selection-change="handleSelectionChange"
         >
           <template slot="empty">
             <img src="@/assets/nopage.png" alt />
             <p>暂无数据</p>
           </template>
+        <el-table-column
+         type="selection"
+           width="55">
+         </el-table-column>
           <el-table-column fixed type="index" label="序号" width="60" />
           <el-table-column label="耗材编码" prop="prodCode" />
           <el-table-column label="医保编码" prop="hiCode" />
@@ -183,13 +187,7 @@
                 label-width="0"
                 class="item"
                 :prop="scope.$index + '.lotNum'"
-                :rules="[
-                  {
-                    required: true,
-                    message: '请输入',
-                    trigger: 'blur',
-                  },
-                ]"
+                :rules="lotNumCheck(scope.row,lotNumRule)"
               >
                 <el-input placeholder="请输入" v-model="scope.row.lotNum" @change="handleEDIT(scope.row,scope.$index)"></el-input>
               </el-form-item>
@@ -201,13 +199,7 @@
                 label-width="0"
                 class="item"
                 :prop="scope.$index + '.manuDate'"
-                :rules="[
-                  {
-                    required: true,
-                    message: '请选择生产日期',
-                    trigger: 'change',
-                  },
-                ]"
+                :rules="lotNumCheck(scope.row,manuDateRule)"
               >
                 <el-date-picker
                   style="width: 100%"
@@ -227,13 +219,7 @@
                 label-width="0"
                 class="item"
                 :prop="scope.$index + '.prodExpy'"
-                :rules="[
-                  {
-                    required: true,
-                    message: '请选择有效期',
-                    trigger: 'change',
-                  },
-                ]"
+                :rules="lotNumCheck(scope.row,prodExpyRule)"
               >
                 <el-date-picker
                   style="width: 100%"
@@ -508,165 +494,6 @@
         >
       </div>
     </el-dialog>
-    <!-- 出库单预览 -->
-    <el-dialog title="出库单预览" :visible.sync="printVisible" width="70%">
-      <div id="printMe">
-        <table cellspacing="0" cellpadding="0" border="1" width="100%" class="chuTable">
-          <tr height="50px">
-            <th :colspan="12" :rowspan="1" style="font-size: 26px; font-weight: 800">
-              送货单
-            </th>
-            <th :colspan="8" :rowspan="1" style="font-size: 20px">
-              NO:<span style="color: red">{{ listForm.id }}</span>
-            </th>
-          </tr>
-          <tr class="hang">
-            <th :colspan="2">医院名称:</th>
-            <th :colspan="8">
-              {{ listForm.branchName }}
-            </th>
-            <!-- <th>
-                            制单人:
-                        </th>
-                        <th :colspan="4">
-                            {{ listForm.docmker }}
-                        </th> -->
-            <th :colspan="2">制单时间:</th>
-            <th :colspan="8">
-              {{ listForm.docmkDate }}
-            </th>
-          </tr>
-          <tr class="hang">
-            <th :colspan="2">出库人:</th>
-            <th :colspan="8">
-              {{ $store.state.user.username }}
-            </th>
-            <th :colspan="2">出库日期:</th>
-            <th :colspan="8">
-              {{ listForm.OutboundDate }}
-            </th>
-          </tr>
-          <tr class="hang">
-            <th>序号</th>
-            <th>耗材编码</th>
-            <th>医保编码</th>
-            <th>耗材名称</th>
-            <th>商品类别</th>
-            <th>规格</th>
-            <th>型号</th>
-            <th>材质</th>
-            <th>生产来源</th>
-            <th>注册证号</th>
-            <th>生产企业</th>
-            <!-- <th>单价</th> -->
-            <th>批号</th>
-            <th>生产日期</th>
-            <th>有效期至</th>
-            <!-- <th>UDI码</th> -->
-            <th>需求数量</th>
-            <th>已出库数量</th>
-            <th>剩余出库量</th>
-            <th>本次出库数量</th>
-            
-          </tr>
-          <tr v-for="(item, index) in chuList" :key="index" class="hang">
-            <td align="center">
-              {{ index + 1 }}
-            </td>
-            <td align="center">
-              {{ item.prodCode }}
-            </td>
-            <td align="center">
-              {{ item.hiCode }}
-            </td>
-            <td align="center">
-              {{ item.prodName }}
-            </td>
-            <td align="center">
-              <span v-if="item.mcsType=='0'">普通耗材</span>
-              <span v-if="item.mcsType=='1'">高值耗材</span>
-              <span v-if="item.mcsType=='2'">试剂</span>
-            </td>
-            <td align="center">
-              {{ item.spec }}
-            </td>
-            <td align="center">
-              {{ item.mol }}
-            </td>
-            <!-- 材质 -->
-            <td align="center">
-              {{ item.matl }}
-            </td>
-            <td align="center">
-              <span v-if="item.prodSouc=='1'">国产</span>
-              <span v-if="item.prodSouc=='2'">进口</span>
-            </td>
-            <td align="center">
-              {{ item.regcertno }}
-            </td>
-            <td align="center">
-              {{ item.prodEntp }}
-            </td>
-            <!-- <td align="center">
-              {{ item.purcPric }}
-            </td> -->
-            <td align="center">
-              {{ item.lotNum }}
-            </td> 
-            <td align="center">
-              {{ item.manuDate }}
-            </td>
-            <td align="center">
-              {{ item.prodExpy }}
-            </td>
-            <!-- <td align="center">
-              {{ item.udi }}
-            </td> -->
-            <td align="center">
-              {{ item.purcCnt }}
-            </td>
-            <td align="center">
-              {{ item.delvCntYck }}
-            </td>
-            <td align="center">
-              {{ item.toDelvCnt }}
-            </td>
-            <td align="center">
-              {{ item.delvCnt }}
-            </td>
-          </tr>
-          <tr class="hang">
-            <th align="left" :colspan="6" >合计</th>
-            <td :colspan="12" align="left">
-              {{ mcsSum }}
-            </td>
-            <!-- <td align="center"> -->
-              <!-- {{ numSum }} -->
-            <!-- </td> -->
-          </tr>
-          <tr class="hang">
-            <th :colspan="6" align="left">发货金额(人民币)大写:</th>
-            <td :colspan="12">
-              {{ mcsSum | toChineseAmount }}
-            </td>
-          </tr>
-          <tr height="50px">
-            <th :colspan="6" align="left">备注:</th>
-            <td :colspan="12"></td>
-          </tr>
-          <!-- <tr class="hang">
-            <th align="left" :colspan="6">收货人:</th>
-            <td :colspan="13"></td>
-          </tr> -->
-        </table>
-      </div>
-      <div class="foot-button" style="margin-top: 40px">
-        <el-button type="primary" :loading="comfirmLoad" @click="handleConfirm"
-          >确认</el-button
-        >
-        <el-button type="primary" v-print="printObj">打印</el-button>
-      </div>
-    </el-dialog>
     <!-- 订单复用 mulDialog-->
     <el-dialog
       title="订单复用"
@@ -735,12 +562,11 @@
 import ylStep from "@/components/yl-step";
 import ylPagination from "@/components/yl-pagination";
 import ylUpload from "@/components/yl-upload";
+import printView from "./printView.vue";
 import mcsInfo from "@/views/components/mcs-info.vue";
 import { countNumPrice, getTotalAmount } from "@/utils/utils";
 import moment from "moment";
-import {
-  getMcsOrdDck,
-} from "@/api/orderManage-sup/index";
+import { getMcsOrdDck } from "@/api/orderManage-sup/index";
 import {
   getMcsOrdDckDetl,
   saveDelvOrd,
@@ -752,21 +578,45 @@ import {
 } from "@/api/orderManage-sup/index";
 export default {
   components: {
-    ylStep,                                                                 
+    ylStep,
     ylPagination,
     ylUpload,
-    mcsInfo
+    mcsInfo,
+    printView,
   },
   data() {
     return {
-      roleRadio:"",
-      cShow:false,
+      roleRadio: "",
+      cShow: false,
       pdfSrc: "",
       dialogVisible: false,
       saveLoad: false,
       confirmLoad: false,
       endLoad: false,
       number: [],
+      orderData: [], //出库单打印数据
+      lotNumRule: [
+        {
+          required: true,
+          message: "请输入",
+          trigger: "blur",
+        },
+      ],
+      manuDateRule: [
+        {
+          required: true,
+          message: "请选择生产日期",
+          trigger: "change",
+        },
+      ],
+      prodExpyRule: [
+        {
+          required: true,
+          message: "请选择有效日期",
+          trigger: "change",
+        },
+      ],
+      multipleSelection: [],
       listForm: {
         id: "",
         detlCnt: "",
@@ -774,8 +624,8 @@ export default {
         docmker: "",
         docmkDate: "",
         stas: "",
-        deptName:"",
-        branchName:"",
+        deptName: "",
+        branchName: "",
       },
       stasOptions: [
         { value: "A", lable: "未受理" },
@@ -821,35 +671,17 @@ export default {
       // 出库单预览
       printVisible: false,
       chuList: [],
-      // 打印
-      printObj: {
-        id: "printMe",
-        popTitle: "", // 打印配置页上方标题
-        extraHead: "", //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
-        preview: "", // 是否启动预览模式,默认是false(开启预览模式,可以先预览后打印)
-        previewTitle: "", // 打印预览的标题(开启预览模式后出现),
-        previewPrintBtnLabel: "", // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
-        zIndex: "", // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
-        previewBeforeOpenCallback() {}, //预览窗口打开之前的callback(开启预览模式调用)
-        previewOpenCallback() {}, // 预览窗口打开之后的callback(开启预览模式调用)
-        beforeOpenCallback: () => {}, // 开启打印前的回调事件
-        openCallback() {}, // 调用打印之后的回调事件
-        closeCallback() {}, //关闭打印的回调事件(无法确定点击的是确认还是取消)
-        url: "",
-        standard: "",
-        extraCss: "",
-      },
-      fileIndex:null,
-      fileIndex1:null,
-      endBtn:false,
-      listQuery:{
-          prodEntp: "",
-          isFas: "",
-          regcertno: "",
+      fileIndex: null,
+      fileIndex1: null,
+      endBtn: false,
+      listQuery: {
+        prodEntp: "",
+        isFas: "",
+        regcertno: "",
       },
       isFasData: [
-          { value: "1", name: "是" },
-          { value: "0", name: "否" },
+        { value: "1", name: "是" },
+        { value: "0", name: "否" },
       ],
       TimeOption: {
         disabledDate(time) {
@@ -861,26 +693,26 @@ export default {
           return time.getTime() > Date.now();
         },
       },
-      udidialog:false,
-      mulDialog:false,
-      udiData:[],
-      mulData:[],
-      mcsSum:0,
-      purcOrdId:"",
-      rowIndex:0,
-      listQuerym:{
+      udidialog: false,
+      mulDialog: false,
+      udiData: [],
+      mulData: [],
+      mcsSum: 0,
+      purcOrdId: "",
+      rowIndex: 0,
+      listQuerym: {
         current: 1,
         size: 10,
         id: "",
-        branchName:"",
+        branchName: "",
         docmkDateStart: "",
         docmkDateEnd: "",
         docmkDate: [],
         stas: "",
-        spdId:this.$route.query.spdId,
-        fyLoad:false,
+        spdId: this.$route.query.spdId,
+        fyLoad: false,
       },
-      overLoading:false,
+      overLoading: false,
     };
   },
   created() {
@@ -892,20 +724,22 @@ export default {
     this.listForm.docmker = this.$route.query.docmker;
     this.listForm.stas = this.$route.query.stas;
     this.listForm.docmkDate = this.$route.query.docmkDate;
-    this.listForm.OutboundDate = moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
+    this.listForm.OutboundDate = moment(new Date()).format(
+      "YYYY-MM-DD HH:mm:ss"
+    );
     this.listForm.branchName = this.$route.query.branchName;
     this.listForm.deptName = this.$route.query.deptName;
     this.listForm.oprn = this.$route.query.oprn;
     this.listForm.oprtRoom = this.$route.query.oprtRoom;
     this.listForm.oprtTime = this.$route.query.oprtTime;
     this.listForm.atddr = this.$route.query.atddr;
-    if(this.listForm.stas=='部分出库'){
-      this.endBtn = true
+    if (this.listForm.stas == "部分出库") {
+      this.endBtn = true;
     }
-    if(this.$route.query.purcType=="2"){
-      this.cShow = true
-    }else{
-      this.cShow = false
+    if (this.$route.query.purcType == "2") {
+      this.cShow = true;
+    } else {
+      this.cShow = false;
     }
     // this.stasOptions.forEach((i)=>{
     //     if(i.value == this.$route.query.stas){
@@ -918,12 +752,18 @@ export default {
     numSum: function () {
       return this.chuList
         .map((row) => row.delvCnt)
-        .reduce((acc, cur) => (parseFloat(acc) + parseFloat(cur)).toFixed(2), 0);
+        .reduce(
+          (acc, cur) => (parseFloat(acc) + parseFloat(cur)).toFixed(2),
+          0
+        );
     },
     moneySum: function () {
       return this.chuList
         .map((row) => row.price)
-        .reduce((acc, cur) => (parseFloat(acc) + parseFloat(cur)).toFixed(2), 0);
+        .reduce(
+          (acc, cur) => (parseFloat(acc) + parseFloat(cur)).toFixed(2),
+          0
+        );
     },
   },
   filters: {
@@ -1003,16 +843,39 @@ export default {
     this.getData();
   },
   methods: {
+    lotNumCheck(row, ruleArray) {
+      let rule = [];
+      let isId = this.multipleSelection.filter((item) => {
+        return item.id == row.id;
+      });
+      if (isId.length > 0) {
+        rule = ruleArray;
+      } else {
+        rule = [];
+      }
+      return rule;
+    },
+    //表格选中触发
+    handleSelectionChange(val) {
+      val.length > 0 &&
+        val.map((item) => {
+          item.purcOrdId = this.$route.query.id;
+          item.materialId = item.prodCode;
+        });
+      this.multipleSelection = val;
+    },
     getData() {
       this.listLoading = true;
-      getMcsOrdDckDetl({ id: this.$route.query.id,
-        spdId:this.$route.query.spdId,
-                    prodEntp:this.listQuery.prodEntp,
-                    isFas:this.listQuery.isFas,
-                    regcertno:this.listQuery.regcertno,  })
+      getMcsOrdDckDetl({
+        id: this.$route.query.id,
+        spdId: this.$route.query.spdId,
+        prodEntp: this.listQuery.prodEntp,
+        isFas: this.listQuery.isFas,
+        regcertno: this.listQuery.regcertno,
+      })
         .then((res) => {
           this.tableData = res.data;
-          this.tableData.udiList=[];
+          this.tableData.udiList = [];
           this.chuList = res.data;
           this.listLoading = false;
           this.computeCell(this.tableData);
@@ -1042,7 +905,7 @@ export default {
       // }
       this.shanchu3(row);
       this.numOrPriceChange(index, row);
-      this.tableData[index].udiList=[];
+      this.tableData[index].udiList = [];
     },
     numOrPriceChange(index, row) {
       this.$set(
@@ -1126,36 +989,36 @@ export default {
     // 添加批次
     handleBatch(row, index) {
       let list = {
-        prodCode:row.prodCode,
-        regcertno:row.regcertno,
+        prodCode: row.prodCode,
+        regcertno: row.regcertno,
         delvCnt: "",
-        delvCntYck:row.delvCntYck,
-        docmkDate:row.docmkDate,
-        docmker:row.docmker,
-        essdrugType:row.essdrugType,
+        delvCntYck: row.delvCntYck,
+        docmkDate: row.docmkDate,
+        docmker: row.docmker,
+        essdrugType: row.essdrugType,
         prodEntp: row.prodEntp,
         materialId: row.materialId,
         prodName: row.prodName,
-        hiCode:row.hiCode,
+        hiCode: row.hiCode,
         mol: row.mol,
         matl: row.matl,
-        memo:row.memo,
-        mcsType:row.mcsType,
+        memo: row.memo,
+        mcsType: row.mcsType,
         purcPric: row.purcPric,
         purcAmt: row.purcAmt,
         purcCnt: row.purcCnt,
-        prodSouc:row.prodSouc,
+        prodSouc: row.prodSouc,
         spec: row.spec,
         toDelvCnt: row.toDelvCnt,
-        convrat:row.convrat,
-        prcUnt:row.prcUnt,
-        purcUnt:row.purcUnt,
+        convrat: row.convrat,
+        prcUnt: row.prcUnt,
+        purcUnt: row.purcUnt,
         invoFileId: "",
         lotNum: "",
         manuDate: "",
         prodExpy: "",
         dyntFileId: "",
-        isFas:row.isFas,
+        isFas: row.isFas,
         // udiList:[],
       };
       this.tableData.splice(index + 1, 0, list);
@@ -1164,8 +1027,8 @@ export default {
       // const aa = this.tableData.findIndex((item) => item.id === row.id);
       // this.number.splice(aa+1,0,this.number[aa])
     },
-    handleEDIT(row,index){
-      this.tableData[index].udiList=[];
+    handleEDIT(row, index) {
+      this.tableData[index].udiList = [];
     },
     // 筛选合并项
     computeCell(tableData) {
@@ -1204,7 +1067,7 @@ export default {
         columnIndex === 8 ||
         columnIndex === 12 ||
         columnIndex === 13 ||
-        columnIndex === 14 
+        columnIndex === 14
       ) {
         // console.log("单元格数组,若下一项为0,则代表合并上一项", this.cellList);
         const rowCell = this.cellList[rowIndex];
@@ -1243,7 +1106,9 @@ export default {
     },
     //删除
     handleDelete(row, i) {
-      const index = this.tableData.findIndex((item) => item.prodCode === row.prodCode);
+      const index = this.tableData.findIndex(
+        (item) => item.prodCode === row.prodCode
+      );
       if (index !== -1) {
         let qwe = this.tableData.findIndex(function (item) {
           return item.prodCode == row.prodCode;
@@ -1262,24 +1127,23 @@ export default {
       // }
       // this.number.splice(i,1);
     },
-    getUpload1(id,index) {
-      this.tableData[index].invoFileId = id
+    getUpload1(id, index) {
+      this.tableData[index].invoFileId = id;
       if (id) {
         this.$refs.tabledata.clearValidate("invoFileId");
       } else {
         this.$refs.tabledata.validateField("invoFileId");
       }
     },
-    getUpload(id,index) {
-      this.tableData[index].dyntFileId = id
+    getUpload(id, index) {
+      this.tableData[index].dyntFileId = id;
       if (id) {
         this.$refs.tabledata.clearValidate("dyntFileId");
       } else {
         this.$refs.tabledata.validateField("dyntFileId");
       }
     },
-    
-    
+
     // 获取发票信息
     getFaData(type) {
       if (type == "search") {
@@ -1344,68 +1208,72 @@ export default {
       this.getTongData();
     },
     // 填写UDI码
-    handleudi(row,index){
-      if(row.lotNum && row.delvCnt){
+    handleudi(row, index) {
+      if (row.lotNum && row.delvCnt) {
         this.rowIndex = index;
-      if(!this.tableData[index].udiList || this.tableData[index].udiList.length==0 || this.tableData[index].udiList.length!==row.delvCnt || this.tableData[index].lotNum!==this.tableData[index].udiList[0].lotNum){
-        let udiObj={
-        ...row,
-        udi:"",
-      }
-      const n = row.delvCnt;
-      const copiedObjects = Array.from({ length: n }, () => ({ ...udiObj }));
-      this.tableData[index].udiList = copiedObjects;
-      
-      }
-      this.$nextTick(()=>{
-        this.udidialog = true;
-        this.udiData = this.tableData[index].udiList
-      })      
-      }else{
-        this.$message.warning("先填写必填信息,再填写UDI码")
+        if (
+          !this.tableData[index].udiList ||
+          this.tableData[index].udiList.length == 0 ||
+          this.tableData[index].udiList.length !== row.delvCnt ||
+          this.tableData[index].lotNum !==
+            this.tableData[index].udiList[0].lotNum
+        ) {
+          let udiObj = {
+            ...row,
+            udi: "",
+          };
+          const n = row.delvCnt;
+          const copiedObjects = Array.from({ length: n }, () => ({
+            ...udiObj,
+          }));
+          this.tableData[index].udiList = copiedObjects;
+        }
+        this.$nextTick(() => {
+          this.udidialog = true;
+          this.udiData = this.tableData[index].udiList;
+        });
+      } else {
+        this.$message.warning("先填写必填信息,再填写UDI码");
       }
-      
     },
     // 去chong
-    handleClose(){
-      this.udiData.forEach((v)=>{
-        if(v.udi){
+    handleClose() {
+      this.udiData.forEach((v) => {
+        if (v.udi) {
           let udicf = this.udif(this.udiData);
           if (udicf == true) {
-              this.$message({
-                message: "同一产品的udi码不能重复",
-                type: "error",
-              });
-              throw new Error("同一产品的udi码不能重复");
-            }else{
-          this.udidialog = false
-            }
-        }else{
-          this.udidialog = false
+            this.$message({
+              message: "同一产品的udi码不能重复",
+              type: "error",
+            });
+            throw new Error("同一产品的udi码不能重复");
+          } else {
+            this.udidialog = false;
+          }
+        } else {
+          this.udidialog = false;
         }
-      })
-      
+      });
     },
-    
+
     // 确定UDI
-    clickUdi(){
+    clickUdi() {
       this.$refs.udiForm.validate((valid) => {
         if (valid) {
           let udicf = this.udif(this.udiData);
           if (udicf == true) {
-              this.$message({
-                message: "同一产品的udi码不能重复",
-                type: "info",
-              });
-              throw new Error("同一产品的udi码不能重复");
-            }
+            this.$message({
+              message: "同一产品的udi码不能重复",
+              type: "info",
+            });
+            throw new Error("同一产品的udi码不能重复");
+          }
           this.$confirm("确认提交udi码", "提示", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning",
           }).then(() => {
-            
-            this.tableData[this.rowIndex].udiList = this.udiData
+            this.tableData[this.rowIndex].udiList = this.udiData;
             this.udidialog = false;
           });
         } else {
@@ -1474,7 +1342,14 @@ export default {
     },
     // 出库
     handleDelivery() {
-      let lotnum = this.pf(this.tableData);
+      if (this.multipleSelection.length <= 0) {
+        this.$message({
+          message: "请选择出库耗材",
+          type: "error",
+        });
+        return;
+      }
+      let lotnum = this.pf(this.multipleSelection);
       if (lotnum == true) {
         this.$message({
           message: "同一产品的批号不能重复",
@@ -1482,8 +1357,8 @@ export default {
         });
         throw new Error("同一产品的批号不能重复");
       }
-      this.tableData.forEach((item) => {
-        if (item.delvCnt=='0') {
+      this.multipleSelection.forEach((item) => {
+        if (item.delvCnt == "0") {
           this.$message({
             message: "本次出库数量必须大于0",
             type: "warning",
@@ -1498,34 +1373,28 @@ export default {
         //   });
         //   throw new Error("请填写相应信息,并选择报关单");
         // }
-        if(this.cShow==true &&(  !item.udiList|| item.udiList.length==0)){
-          this.$message.warning("请填写udi再提交")
+        if (this.cShow == true && (!item.udiList || item.udiList.length == 0)) {
+          this.$message.warning("请填写udi再提交");
           throw new Error("请填写udi再提交");
         }
-        item.udiList.forEach((v,index)=>{
-          if(v.udi==""||v.udi==null){
-            this.$message.warning("请填写udi再提交")
+        item.udiList.forEach((v, index) => {
+          if (v.udi == "" || v.udi == null) {
+            this.$message.warning("请填写udi再提交");
             throw new Error("请填写udi再提交");
           }
-        })
+        });
       });
-      
+
       this.$refs.tabledata.validate((valid) => {
         if (valid) {
-          this.$confirm("确认出库", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-          }).then(() => {
-            this.mcsSum = 0;
-            this.tableData.forEach((item) => {
-              let rowSum = 0;
-              rowSum = item.purcPric*item.convrat*item.delvCnt;
-              this.mcsSum+=rowSum
-            })
-            this.mcsSum = (this.mcsSum).toFixed(4)
-            this.printVisible = true;
+          this.mcsSum = 0;
+          this.multipleSelection.forEach((item) => {
+            let rowSum = 0;
+            rowSum = item.purcPric * item.convrat * item.delvCnt;
+            this.mcsSum += rowSum;
           });
+          this.mcsSum = this.mcsSum.toFixed(4);
+          this.handleConfirm();
         } else {
           this.$message({
             type: "warning",
@@ -1543,8 +1412,7 @@ export default {
       }).then(() => {
         let data2 = {
           delvOrdId: "",
-          purcOrdId: this.$route.query.id,
-          detlList: this.tableData,
+          detlList: this.multipleSelection,
           deptId: this.$route.query.deptId,
           spdId: this.$route.query.spdId,
           deptName: this.$route.query.deptName,
@@ -1552,15 +1420,17 @@ export default {
         submitMcsDelvOrd(data2)
           .then((res) => {
             this.printVisible = false;
-            this.$message.success("出库成功")
+            this.$message.success("出库成功");
             this.$router.push({
-                name: "purOrderDelivery",
-                query:{spdId:this.$route.query.spdId,activeName:this.$route.query.activeName}
+              name: "devsuccs",
+              query: {
+                form: JSON.stringify(this.listForm),
+                data: JSON.stringify(this.multipleSelection),
+              },
             });
           })
           .catch((err) => {
             // this.$message.error("出库失败")
-
             // this.confirmLoadLoad = false;
           });
       });
@@ -1593,15 +1463,14 @@ export default {
         });
     },
     // 订单复用
-    handlemultiplex(){
+    handlemultiplex() {
       this.mulDialog = true;
-      this.getOutboundData()
+      this.getOutboundData();
       this.roleRadio = "";
       this.purcOrdId = "";
-      
     },
     // 结束订单
-    handleEnd(){
+    handleEnd() {
       this.$confirm("确认结束订单", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -1616,15 +1485,18 @@ export default {
             this.overLoading = false;
             this.$message.success("结束订单成功");
             this.$router.push({
-                name: "purOrderDelivery",
-                query:{spdId:this.$route.query.spdId,activeName:this.$route.query.activeName}
+              name: "purOrderDelivery",
+              query: {
+                spdId: this.$route.query.spdId,
+                activeName: this.$route.query.activeName,
+              },
             });
           })
           .catch((err) => {
             this.overLoading = false;
-            this.$message.error("结束订单失败")
+            this.$message.error("结束订单失败");
           });
-      })
+      });
     },
     // 复用查询
     getOutboundData() {
@@ -1633,57 +1505,63 @@ export default {
           this.mulData = res.data.records;
           this.totalm = res.data.total;
         })
-        .catch((err) => {
-        });
+        .catch((err) => {});
     },
     // 返回
-    handleBack(){
+    handleBack() {
       this.$router.push({
         name: "purOrderDelivery",
-        query:{spdId:this.$route.query.spdId,activeName:this.$route.query.activeName}
+        query: {
+          spdId: this.$route.query.spdId,
+          activeName: this.$route.query.activeName,
+        },
       });
     },
     // 重置
-    reset(){
+    reset() {
       this.$refs.listQuery.resetFields();
-      this.getData()
+      this.getData();
     },
     // 复用单选
     getTemplateRow(index, row) {
       this.purcOrdId = row.id;
     },
     // 复用确认
-    clickMul(){
-      if(!this.purcOrdId){
-        this.$message.warning("请选择要复用的订单")
-      }else{
+    clickMul() {
+      if (!this.purcOrdId) {
+        this.$message.warning("请选择要复用的订单");
+      } else {
         this.$confirm("确认复用该订单", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        selectDelvOrdCopy({delvOrdId:this.listForm.id,purcOrdId:this.purcOrdId}).then((res)=>{
-          this.fyLoad = true;
-          if(res.success==true){
-            this.$message.success("操作成功")
-            this.mulDialog = false;
-            this.fyLoad = false;
-            this.purcOrdId = "";
-          }else{
-            // this.$message.error("操作失败")
-            this.$message(res.message)
-            this.fyLoad = false;
-            this.purcOrdId="";
-          }
-        }).catch((err)=>{
-            // this.$message(res.message)
-            this.fyLoad = false;
-            this.purcOrdId="";
-        })
-        })
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          selectDelvOrdCopy({
+            delvOrdId: this.listForm.id,
+            purcOrdId: this.purcOrdId,
+          })
+            .then((res) => {
+              this.fyLoad = true;
+              if (res.success == true) {
+                this.$message.success("操作成功");
+                this.mulDialog = false;
+                this.fyLoad = false;
+                this.purcOrdId = "";
+              } else {
+                // this.$message.error("操作失败")
+                this.$message(res.message);
+                this.fyLoad = false;
+                this.purcOrdId = "";
+              }
+            })
+            .catch((err) => {
+              // this.$message(res.message)
+              this.fyLoad = false;
+              this.purcOrdId = "";
+            });
+        });
       }
     },
-    
   },
 };
 </script>

+ 82 - 0
src/views/page/orderManage-sup/purOrderDelivery/devsuccs.vue

@@ -0,0 +1,82 @@
+<template>
+  <div class="wrap-print">
+    <h2 v-if="!listForm.delvOrdId">出库成功</h2>
+    <div class="btn-wrap">
+      <el-button type="primary" @click="breakView()" v-if="!listForm.delvOrdId">返回待出库</el-button>
+      <el-button type="primary" v-print="printObj">打印出库单</el-button>
+    </div>
+    <el-card class="box-card">
+      <printView :orderData="multipleSelection" :form="listForm"></printView>
+    </el-card>
+  </div>
+</template>
+<script>
+import printView from "./printView.vue";
+export default {
+  name: "successView",
+  components: {
+    printView,
+  },
+  props: {},
+  data() {
+    return {
+      multipleSelection: [],
+      listForm: {},
+      // 打印
+      printObj: {
+        id: "printData",
+        popTitle: "", // 打印配置页上方标题
+        extraHead: "", //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
+        preview: "", // 是否启动预览模式,默认是false(开启预览模式,可以先预览后打印)
+        previewTitle: "", // 打印预览的标题(开启预览模式后出现),
+        previewPrintBtnLabel: "", // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
+        zIndex: "", // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
+        previewBeforeOpenCallback() {}, //预览窗口打开之前的callback(开启预览模式调用)
+        previewOpenCallback() {}, // 预览窗口打开之后的callback(开启预览模式调用)
+        beforeOpenCallback: () => {}, // 开启打印前的回调事件
+        openCallback() {}, // 调用打印之后的回调事件
+        closeCallback() {}, //关闭打印的回调事件(无法确定点击的是确认还是取消)
+        url: "",
+        standard: "",
+        extraCss: "",
+      },
+    };
+  },
+  created() {
+    let { form, data } = this.$route.query;
+    this.multipleSelection = JSON.parse(data);
+    this.listForm = JSON.parse(form);
+  },
+  mounted() {},
+  methods: {
+    //返回待出库
+    breakView() {
+      this.$router.push({
+        path: "/orderManage-sup/purOrderDelivery",
+        query: {
+      
+        },
+      });
+    },
+  },
+  watch: {},
+};
+</script>
+<style scoped lang="scss">
+.wrap-print {
+  padding: 20px;
+  width: 100%;
+  background: #fff;
+  .btn-wrap {
+    margin-top: 20px;
+    width: 200px;
+    height: 40px;
+    display: flex;
+    align-items: center;
+  }
+  .box-card {
+    margin-top: 20px;
+    width: 1000px;
+  }
+}
+</style>

+ 45 - 17
src/views/page/orderManage-sup/purOrderDelivery/index.vue

@@ -2,7 +2,12 @@
   <!-- 采购订单出库 -->
   <div style="display: flex">
     <el-card style="width: 18%; margin-right: 18px; border-radius: 6px">
-      <el-tabs v-model="activeNametree" type="card" @tab-click="tabClick" stretch>
+      <el-tabs
+        v-model="activeNametree"
+        type="card"
+        @tab-click="tabClick"
+        stretch
+      >
         <!-- <el-tab-pane label="按分类" name="grp"></el-tab-pane> -->
         <el-tab-pane label="按机构" name="org"></el-tab-pane>
       </el-tabs>
@@ -25,7 +30,10 @@
         <el-tab-pane label="待出库" name="first">
           <el-form :model="listQuery" ref="queryForm" :inline="true">
             <el-form-item label="采购单号" prop="id">
-              <el-input v-model="listQuery.id" placeholder="请输入采购单号"></el-input>
+              <el-input
+                v-model="listQuery.id"
+                placeholder="请输入采购单号"
+              ></el-input>
             </el-form-item>
             <el-form-item label="客户名称" prop="branchName">
               <el-input
@@ -87,9 +95,9 @@
             </template>
             <el-table-column fixed type="index" label="序号" width="60" />
             <el-table-column label="订单编号" prop="id" />
-            <el-table-column label="订单种类" prop="detlCnt"/>
-            <el-table-column label="订单总数量" prop="qtySum"  width="100px" />
-            <el-table-column label="剩余出库量" prop="delvCnt"  width="100px" />
+            <el-table-column label="订单种类" prop="detlCnt" />
+            <el-table-column label="订单总数量" prop="qtySum" width="100px" />
+            <el-table-column label="剩余出库量" prop="delvCnt" width="100px" />
             <el-table-column label="订单总金额" prop="purcAmt" width="100px" />
             <el-table-column label="客户名称" prop="branchName" />
             <el-table-column label="来源部门" prop="deptName" />
@@ -113,7 +121,9 @@
             </el-table-column>
             <el-table-column label="操作" width="100" fixed="right">
               <template slot-scope="scope">
-                <el-button type="text" @click="handleDetail(scope.row)">详情</el-button>
+                <el-button type="text" @click="handleDetail(scope.row)"
+                  >详情</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -186,12 +196,24 @@
             </template>
             <el-table-column fixed type="index" label="序号" width="60" />
             <el-table-column label="出库单号" prop="delvOrdId" />
-            <el-table-column label="关联采购单" prop="purcOrdId" width="100px"/>
-            <el-table-column label="采购品种数" prop="detlCnt"  width="100px"/>
-            <el-table-column label="采购总数量" prop="qtySum"  width="100px"/>
-            <el-table-column label="本次出库量" prop="bcckl"  width="100px"/>
-            <el-table-column label="客户验收数量" prop="shppCnt" width="100px" />
-            <el-table-column label="剩余出库量" prop="toDelvCnt" width="100px" />
+            <el-table-column
+              label="关联采购单"
+              prop="purcOrdId"
+              width="100px"
+            />
+            <el-table-column label="采购品种数" prop="detlCnt" width="100px" />
+            <el-table-column label="采购总数量" prop="qtySum" width="100px" />
+            <el-table-column label="本次出库量" prop="bcckl" width="100px" />
+            <el-table-column
+              label="客户验收数量"
+              prop="shppCnt"
+              width="100px"
+            />
+            <el-table-column
+              label="剩余出库量"
+              prop="toDelvCnt"
+              width="100px"
+            />
             <el-table-column label="客户名称" prop="branchName" />
             <el-table-column label="来源部门" prop="deptName" />
             <el-table-column label="采购类型" prop="purcType" width="100">
@@ -216,7 +238,9 @@
             </el-table-column>
             <el-table-column label="操作" width="100" fixed="right">
               <template slot-scope="scope">
-                <el-button type="text" @click="handleDetailC(scope.row)">详情</el-button>
+                <el-button type="text" @click="handleDetailC(scope.row)"
+                  >详情</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -290,7 +314,7 @@ export default {
       listC: [],
       total: 0,
       totalC: 0,
-      routespdId:"",
+      routespdId: "",
     };
   },
   mounted() {
@@ -320,10 +344,10 @@ export default {
           this.listLoading = false;
         });
     }
-    if(this.$route.query.msgRouteUni && this.$route.query.spdId){
+    if (this.$route.query.msgRouteUni && this.$route.query.spdId) {
       this.listQuery.spdId = this.$route.query.spdId;
       this.listQuery.id = this.$route.query.msgRouteUni;
-      this.getOutboundData()
+      this.getOutboundData();
     }
   },
   methods: {
@@ -354,6 +378,7 @@ export default {
           this.listQuery.spdId = res.data[0].spdId;
           this.listQueryC.spdId = res.data[0].spdId;
           this.data = res.data;
+          this.getTableList(this.listQuery);
         })
         .catch((err) => {});
     },
@@ -383,7 +408,10 @@ export default {
       this.listQuery.docmkDateEnd = this.listQuery.docmkDate[1];
       this.spdId = data.spdId;
       this.listQuery.spdId = this.spdId;
-      getMcsOrdDck(this.listQuery)
+      this.getTableList(this.listQuery);
+    },
+    getTableList(listQuery) {
+      getMcsOrdDck(listQuery)
         .then((res) => {
           this.list = res.data.records;
           this.total = res.data.total;

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

@@ -0,0 +1,253 @@
+<template>
+  <div class="wrap-print" id="printData">
+    <div class="time">
+      {{ getTime() }}
+    </div>
+    <div class="print-hed">
+      <div style="width: 50%; text-align: center">送货单</div>
+      <div class="qrCode">
+        <div>
+          <vue-qr
+            ref="qrCode"
+            :text="form.id"
+            :logoSrc="logoSrc"
+            :color-dark="randomColor"
+            :callback="qrCodeCallback"
+            width="100"
+            height="100"
+          ></vue-qr>
+        </div>
+        <div>
+          <vue-barcode
+            :value="form.id"
+            :margin="0.5"
+            :width="1.6"
+            :height="35"
+            :fontSize="12"
+            :textAlign="center"
+            :displayValue="true"
+            :text="form.id"
+          ></vue-barcode>
+        </div>
+      </div>
+    </div>
+    <div class="header-print">
+       <div class="item-print" v-if="form.delvOrdId">
+        <div class="print-label">出库单号:</div>
+        <div class="print-value">{{ form.delvOrdId }}</div>
+      </div>
+      <div class="item-print">
+        <div class="print-label">客户名称:</div>
+        <div class="print-value">{{ form.branchName }}</div>
+      </div>
+      <div class="item-print">
+        <div class="print-label">金额:</div>
+        <div class="print-value">{{ form.purcAmt }}</div>
+      </div>
+      <div class="item-print">
+        <div class="print-label">来源部门:</div>
+        <div class="print-value">{{ form.deptName }}</div>
+      </div>
+      <div class="item-print">
+        <div class="print-label">采购总数:</div>
+        <div class="print-value">{{ form.qtySum }}</div>
+      </div>
+       <div class="item-print" v-if="form.delvOrdId">
+        <div class="print-label">出库人:</div>
+        <div class="print-value">{{ form.docmker }}</div>
+      </div>
+       <div class="item-print" v-if="form.delvOrdId">
+        <div class="print-label">出库时间:</div>
+        <div class="print-value">{{ form.docmkDate }}</div>
+      </div>
+    </div>
+    <el-table
+      ref="multipleTable"
+      :data="tableData"
+      cell-class-name="cell-class-name"
+      element-loading-text="加载中..."
+      border
+      fit
+    >
+      <template slot="empty">
+        <img src="" alt />
+        <p>暂无数据</p>
+      </template>
+      <el-table-column
+        fixed="left"
+        align="center"
+        type="index"
+        label="序号"
+        width="50"
+      />
+      <el-table-column label="耗材信息" width="300">
+        <template slot-scope="scope">
+          <mcs-info :info="scope.row"></mcs-info>
+        </template>
+      </el-table-column>
+      <el-table-column label="规格" prop="spec" />
+      <el-table-column label="型号" prop="mol" />
+      <el-table-column label="材质" prop="matl" />
+      <!-- <el-table-column label="是否集采" prop="isFas">
+        <template #default="{ row }">
+          <span v-if="row.isFas == '0'">否</span>
+          <span v-if="row.isFas == '1'">是</span>
+        </template>
+      </el-table-column> -->
+      <el-table-column label="包装" prop="convrat" width="120px">
+        <template #default="{ row }">
+          <span
+            >{{ row.purcUnt }} ({{ row.convrat }}{{ row.prcUnt }}/{{
+              row.purcUnt
+            }})</span
+          >
+        </template>
+      </el-table-column>
+      <el-table-column label="批号" prop="lotNum" width="120"></el-table-column>
+      <el-table-column label="生产日期" prop="manuDate" width="100" />
+      <el-table-column label="有效期至" width="100" prop="prodExpy" />
+      <el-table-column label="需求数量" prop="purcCnt" />
+      <el-table-column label="已出库数量" prop="delvCntYck" width="90px" v-if="!form.delvOrdId"/>
+      <el-table-column label="剩余出库量" prop="toDelvCnt" width="90px" />
+      <el-table-column label="本次出库数量" prop="delvCnt" width="120" />
+    </el-table>
+    <div class="autograph">
+      <div class="grap">送货人(签名):</div>
+      <div class="grap">收货人(签名):</div>
+    </div>
+    <div class="remarks">备注 :</div>
+  </div>
+</template>
+<script>
+import VueQr from "vue-qr";
+import vueBarcode from "vue-barcode";
+import mcsInfo from "@/views/components/mcs-info.vue";
+import moment from "moment";
+export default {
+  name: "printView",
+  components: {
+    VueQr,
+    vueBarcode,
+    mcsInfo,
+  },
+  props: {
+    orderData: {
+      type: Array,
+      default: [],
+    },
+    form: {
+      type: Object,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      form: {},
+      tableData: [],
+      text: "111111哈哈哈哈哈哈",
+      logoSrc: "",
+      randomColor: "black",
+      qrCodeUrl: "", // 存放生成的二维码url
+    };
+  },
+  created() {
+  },
+  mounted() {
+   
+    this.tableData = this.orderData;
+  },
+  methods: {
+    //获取当前时间
+    getTime() {
+      return moment().format("YYYY-MM-DD HH:mm:ss");
+    },
+  },
+  watch: {
+    orderData(newdata) {
+      this.tableData = newdata;
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.wrap-print {
+  padding: 5px;
+  width: 100%;
+  .title-print {
+    width: 100%;
+    height: 30px;
+    font-size: 30px;
+    font-weight: bold;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-bottom: 20px;
+  }
+  .print-hed {
+    width: 100%;
+    height: 100px;
+    font-size: 30px;
+    font-weight: bold;
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    margin-bottom: 20px;
+    .qrCode {
+      width: 50%;
+      height: 100%;
+      display: flex;
+      align-items: center;
+      justify-content: space-around;
+    }
+  }
+  .header-print {
+    width: 100%;
+    height: 100px;
+    padding: 2px 0px;
+    display: flex;
+    flex-wrap: wrap;
+    .item-print {
+      width: 33.3%;
+      height: 10px;
+      display: flex;
+      align-items: center;
+      flex-wrap: nowrap;
+      .print-label {
+        font-weight: bold;
+      }
+    }
+  }
+  .autograph {
+    width: 100%;
+    height: 30px;
+    margin-top: 30px;
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    .grap {
+      font-weight: bold;
+    }
+  }
+  .remarks {
+    width: 100%;
+    height: 30px;
+    margin-top: 30px;
+    display: flex;
+    align-items: center;
+    font-weight: bold;
+  }
+  .time {
+    width: 100%;
+    height: 20px;
+  }
+  ::v-deep .el-table__cell {
+    border: none;
+    border-right: 1px solid #000;
+    font-weight: bold;
+  }
+  ::v-deep .el-table {
+    border: 1px solid #000;
+    margin-top: 20px;
+  }
+}
+</style>

+ 7 - 0
src/views/page/qualityManagement-sup/information-filling/index.vue

@@ -580,6 +580,13 @@ export default {
         });
         return false;
       }
+       if (this.temp.issuDate == this.temp.endDate) {
+        this.$message({
+          message: "发证日期不能等于截止日期",
+          type: "warning"
+        });
+        return false;
+      }
       if (this.temp.type === "add") {
         let flag = false;
         if (