فهرست منبع

bug修改 udi查询

liumy 1 سال پیش
والد
کامیت
d062d625e8

+ 2 - 2
src/views/page/mainrTenance-sup/templateDetail/Surgicalbag.vue

@@ -26,7 +26,7 @@
           <el-input v-model="listQuery.tmplName" placeholder="请输入模板名称"></el-input>
         </el-form-item>
         <el-form-item label="适用手术" prop="oprn">
-          <el-select v-model="listQuery.oprn" placeholder="请选择适用手术" clearable>
+          <el-select v-model="listQuery.oprn" placeholder="请选择适用手术" clearable filterable remote>
             <el-option
               v-for="item in oprnOptions"
               :key="item.value"
@@ -36,7 +36,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="适用科室" prop="dept">
-          <el-select v-model="listQuery.dept" placeholder="请选择适用科室" clearable>
+          <el-select v-model="listQuery.dept" placeholder="请选择适用科室" clearable filterable remote>
             <el-option
               v-for="item in deptOptions"
               :key="item.id"

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

@@ -370,7 +370,7 @@
               >
             </template>
           </el-table-column>
-          <el-table-column label="UDI码" prop="udid" width="120"></el-table-column>
+          <el-table-column label="UDI码" prop="udi" width="120"></el-table-column>
         </el-table>
     </el-dialog>
   </div>
@@ -471,6 +471,10 @@ export default {
     this.listForm.delvOrdStas = this.$route.query.delvOrdStas;
     this.listForm.branchName = this.$route.query.branchName;
     this.listForm.purcAmt = this.$route.query.purcAmt;
+    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;
     // this.stasOptions.forEach((i)=>{
     //     if(i.value == this.$route.query.stas){
     //         this.listForm.purcOrdStas = i.lable
@@ -686,30 +690,28 @@ export default {
     },
     // 查看UDI码
     handleudi(row) {
+      this.udiData = row.udiList
+      console.log(this.udiData,"12121")
+      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,
+      }));
       this.udidialog = true;
-      // let udiObj={
-      //     spec:row.spec,
-      //     mol:row.mol,
-      //     matl:row.matl,
-      //     isFas:row.isFas,
-      //     lotNum:row.lotNum,
-      //     manuDate:row.manuDate,
-      //     prodExpy:row.prodExpy,
-      //     convrat:row.convrat,
-      //     prcUnt:row.prcUnt,
-      //     purcUnt:row.purcUnt,
-      //     prodName:row.prodName,
-      //     regcertno:row.regcertno,
-      //     prodEntp:row.prodEntp,
-      //     fasBtch:row.fasBtch,
-      // }
-      aaa().then((res)=>{
-        if(res.success==true){
-          this.udiData = res.data
-        }else{
-          this.$message.error("获取失败")
-        }
-      })
     },
     // 返回
     handleBack() {

+ 75 - 26
src/views/page/orderManage-sup/purOrderDelivery/deliveryDetail.vue

@@ -188,7 +188,7 @@
                   },
                 ]"
               >
-                <el-input placeholder="请输入" v-model="scope.row.lotNum"></el-input>
+                <el-input placeholder="请输入" v-model="scope.row.lotNum" @change="handleEDIT(scope.row,scope.$index)"></el-input>
               </el-form-item>
             </template>
           </el-table-column>
@@ -213,6 +213,7 @@
                   type="date"
                   placeholder="请选择生产日期"
                   value-format="yyyy-MM-dd"
+                  @change="handleEDIT(scope.row,scope.$index)"
                 />
               </el-form-item>
             </template>
@@ -238,6 +239,7 @@
                   type="date"
                   placeholder="请选择有效期"
                   value-format="yyyy-MM-dd"
+                  @change="handleEDIT(scope.row,scope.$index)"
                 />
               </el-form-item>
             </template>
@@ -260,7 +262,7 @@
                       },
                       ]"
                   >
-                      <el-input-number v-model="scope.row.delvCnt" controls-position="right" @change="updateNum(scope.row,scope.$index)" :min="0"></el-input-number>
+                      <el-input-number v-model="scope.row.delvCnt"  controls-position="right" @change="updateNum(scope.row,scope.$index)" :min="0"></el-input-number>
                   </el-form-item>
               </template>
           </el-table-column>
@@ -434,6 +436,8 @@
       title="UDI码填写"
       :visible.sync="udidialog"
       width="70%"
+      :close-on-click-modal="false"
+      :before-close="handleClose"
     >
     <el-form :model="udiData" ref="udiForm">
     <el-table
@@ -1035,6 +1039,7 @@ export default {
       // }
       this.shanchu3(row);
       this.numOrPriceChange(index, row);
+      this.tableData[index].udiList=[];
     },
     numOrPriceChange(index, row) {
       this.$set(
@@ -1147,6 +1152,7 @@ export default {
         manuDate: "",
         prodExpy: "",
         dyntFileId: "",
+        isFas:row.isFas,
         // udiList:[],
       };
       this.tableData.splice(index + 1, 0, list);
@@ -1155,6 +1161,9 @@ 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=[];
+    },
     // 筛选合并项
     computeCell(tableData) {
       this.cellList = [];
@@ -1335,7 +1344,7 @@ export default {
     handleudi(row,index){
       if(row.lotNum && row.manuDate && row.prodExpy && row.delvCnt){
         this.rowIndex = index;
-      if(!this.tableData[index].udiList || this.tableData[index].udiList.length==0 || this.tableData[index].udiList.length!==row.delvCnt){
+      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:"",
@@ -1354,15 +1363,45 @@ export default {
       }
       
     },
+    // 去冲
+    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
+        }
+      })
+      
+    },
+    
     // 确定UDI
     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.$confirm("确认提交udi码", "提示", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning",
           }).then(() => {
+            
             this.tableData[this.rowIndex].udiList = this.udiData
             this.udidialog = false;
           });
@@ -1393,6 +1432,24 @@ export default {
         }
       }
     },
+    udif(arr) {
+      for (let i = 0; i < arr.length - 1; i++) {
+        for (let j = i + 1; j < arr.length; j++) {
+          console.log(arr[i].prodCode, arr[j].prodCode);
+          if (arr[i].prodCode == arr[j].prodCode) {
+            var set = new Set(); //创建个集合Set对象(用object对象也可以)
+            return arr.some(function (v, i) {
+              //遍历 arr数组,当返回值为true时提前退出遍历。
+              var f = set.has(v.udi); //判断每个对象里number属性的值是否在集合Set
+              set.add(v.udi); //将number属性的值添加到集合Set中
+              return f;
+            });
+          } else {
+            console.log("else");
+          }
+        }
+      }
+    },
     // 选择同行单
     handleTong(e, row) {
       this.tongIndex = e;
@@ -1414,6 +1471,14 @@ export default {
     },
     // 出库
     handleDelivery() {
+      let lotnum = this.pf(this.tableData);
+      if (lotnum == true) {
+        this.$message({
+          message: "同一产品的批号不能重复",
+          type: "info",
+        });
+        throw new Error("同一产品的批号不能重复");
+      }
       this.tableData.forEach((item) => {
         if (item.delvCnt=='0') {
           this.$message({
@@ -1434,15 +1499,14 @@ export default {
           this.$message.warning("请填写udi再提交")
           throw new Error("请填写udi再提交");
         }
+        item.udiList.forEach((v,index)=>{
+          if(v.udi==""||v.udi==null){
+            this.$message.warning("请填写udi再提交")
+            throw new Error("请填写udi再提交");
+          }
+        })
       });
-      let lotnum = this.pf(this.tableData);
-      if (lotnum == true) {
-        this.$message({
-          message: "同一产品的批号不能重复",
-          type: "info",
-        });
-        throw new Error("同一产品的批号不能重复");
-      }
+      
       this.$refs.tabledata.validate((valid) => {
         if (valid) {
           this.$confirm("确认出库", "提示", {
@@ -1474,21 +1538,6 @@ export default {
         cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
-        // let data = this.tableData.map((i) => {
-        //   return {
-        //     materialId: i.prodCode,
-        //     memo:i.memo,
-        //     delvCnt: i.delvCnt,
-        //     hiCode:i.hiCode,
-        //     delvPric:i.purcPric,
-        //     lotNum: i.lotNum,
-        //     manuDate: i.manuDate,
-        //     prodExpy: i.prodExpy,
-        //     invoFileId: i.invoFileId,
-        //     dyntFileId: i.dyntFileId,
-        //     noRow:i.index
-        //   };
-        // });
         let data2 = {
           delvOrdId: "",
           purcOrdId: this.$route.query.id,

+ 7 - 1
src/views/page/orderManage-sup/purOrderDelivery/index.vue

@@ -303,6 +303,7 @@ export default {
       listC: [],
       total: 0,
       totalC: 0,
+      routespdId:"",
     };
   },
   mounted() {
@@ -454,6 +455,11 @@ export default {
     },
     // 详情
     handleDetailC(row) {
+      if (this.spdId) {
+        this.routespdId = this.spdId;
+      } else {
+        this.routespdId = this.$route.query.spdId;
+      }
       this.$router.push({
         name: "alreadyDetail",
         query: {
@@ -466,7 +472,7 @@ export default {
           delvOrdStas: row.delvOrdStas,
           branchName: row.branchName,
           qtySum: row.qtySum,
-          spdId: this.spdId,
+          spdId: this.routespdId,
           activeName: this.activeName,
           purcAmt: row.purcAmt,
           oprn: row.oprn,

+ 13 - 2
src/views/page/procurement-settlement/invoiceManage/index.vue

@@ -165,6 +165,7 @@ export default {
       totalC: 0,
       // tree
       activeNametree: "org",
+      routespdId:"",
     };
   },
   methods: {
@@ -281,6 +282,11 @@ export default {
     },
     // 详情
     handleDetails(row){
+      if (this.spdId) {
+        this.routespdId = this.spdId;
+      } else {
+        this.routespdId = this.$route.query.spdId;
+      }
       this.$router.push({
         name: "consumptionDetail",
         query: {
@@ -291,13 +297,18 @@ export default {
           amt: row.amt,
           stmtPrd: row.stmtPrd,
           stas: row.stas,
-          spdId:this.spdId,
+          spdId:this.routespdId,
           activeNameTab:this.activeNameTab,
           detlCnt:row.detlCnt
         },
       });
     },
     handleDetails1(row){
+      if (this.spdId) {
+        this.routespdId = this.spdId;
+      } else {
+        this.routespdId = this.$route.query.spdId;
+      }
       this.$router.push({
         name: "consumptionDetail",
         query: {
@@ -308,7 +319,7 @@ export default {
           amt: row.amt,
           stmtPrd: row.stmtPrd,
           stas: row.stas,
-          spdId:this.spdId,
+          spdId:this.routespdId,
           detlCnt:row.detlCnt,
           activeNameTab:this.activeNameTab,
           invoFile:row.invoFile,

+ 7 - 1
src/views/page/procurement-settlement/paymentStatus/index.vue

@@ -165,6 +165,7 @@ export default {
       totalC: 0,
       // tree
       activeNametree: "org",
+      routespdId:"",
     };
   },
   methods: {
@@ -280,6 +281,11 @@ export default {
       }
     },
     handleDetails(row){
+      if (this.spdId) {
+        this.routespdId = this.spdId;
+      } else {
+        this.routespdId = this.$route.query.spdId;
+      }
       this.$router.push({
         name: "consumptionDetails",
         query: {
@@ -290,7 +296,7 @@ export default {
           amt: row.amt,
           stmtPrd: row.stmtPrd,
           stas: row.stas,
-          spdId:this.spdId,
+          spdId:this.routespdId,
           detlCnt:row.detlCnt,
           activeNameTab:this.activeNameTab,
           invoFile:row.invoFile,

+ 7 - 1
src/views/page/procurement-settlement/reconciliation/index.vue

@@ -165,6 +165,7 @@ export default {
       totalC: 0,
       // tree
       activeNametree: "org",
+      routespdId:"",
     };
   },
   methods: {
@@ -281,6 +282,11 @@ export default {
     },
     // 详情
     handleDetails(row){
+      if (this.spdId) {
+        this.routespdId = this.spdId;
+      } else {
+        this.routespdId = this.$route.query.spdId;
+      }
       this.$router.push({
         name: "supplierDetail",
         query: {
@@ -291,7 +297,7 @@ export default {
           amt: row.amt,
           stmtPrd: row.stmtPrd,
           stas: row.stas,
-          spdId:this.spdId,
+          spdId:this.routespdId,
           activeNameTab:this.activeNameTab,
           detlCnt:row.detlCnt
         },

+ 9 - 3
src/views/page/productreturnmanage-sup/returnOrderAccept/index.vue

@@ -129,6 +129,7 @@ export default {
       listLoading: false,
       list: [],
       total: 0,
+      routespdId:"",
     };
   },
   mounted() {
@@ -206,7 +207,12 @@ export default {
     },
     // 详情
     handleDetail(row) {
-      console.log(row,"row")
+      // console.log(row,"row")
+      if (this.spdId) {
+        this.routespdId = this.spdId;
+      } else {
+        this.routespdId = this.$route.query.spdId;
+      }
       if (row.stas == "A") {
         this.$router.push({
           name: "returnDetail",
@@ -219,7 +225,7 @@ export default {
             docmker:row.docmker,
             docmkDate:row.docmkDate,
             stas: row.stas,
-            spdId:this.spdId,
+            spdId:this.routespdId,
             rejtRea:row.rejtRea
           },
         });
@@ -235,7 +241,7 @@ export default {
             docmker:row.docmker,
             docmkDate:row.docmkDate,
             stas: row.stas,
-            spdId:this.spdId,
+            spdId:this.routespdId,
             rejtRea:row.rejtRea
           },
         });

+ 9 - 0
src/views/page/productreturnmanage-sup/returnOrderAccept/returnDetail.vue

@@ -137,6 +137,7 @@
       <el-button type="primary" @click="handleConfirm" :loading="sureLoading"
         >确 认</el-button
       >
+      <el-button type="info" @click="handleBack">返回</el-button>
       </div>
   </div>
 </template>
@@ -305,6 +306,14 @@ export default {
     handleSelectionChange(e) {
       this.selectData = e;
     },
+    handleBack(){
+        this.$router.push({
+            name:"returnOrderAccept",
+            query:{
+                spdId:this.$route.query.spdId
+            }
+        })
+    }
   },
 };
 </script>