|  |  |  | @ -136,6 +136,77 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       <el-tabs type="border-card" style="margin: 15px"> | 
			
		
	
		
			
				
					|  |  |  |  |         <!--单据业务详情--> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         <el-tab-pane> | 
			
		
	
		
			
				
					|  |  |  |  |           <span slot="label">单据 {{ orderData.billNo }}-业务详情</span> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table :data="busDataList" style="width: 100%;" highlight-current-row="true" border ref="multipleTable" | 
			
		
	
		
			
				
					|  |  |  |  |                     :row-style="rowStyleBiz" | 
			
		
	
		
			
				
					|  |  |  |  |           > | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="序号" type="index"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="产品通用名称" prop="cpmctymc" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="制剂规格" prop="prepnSpec" width="80"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="包装规格" prop="spec" width="80"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  | <!--            <el-table-column label="扫码数量" prop="scanActCount" width="80"></el-table-column>--> | 
			
		
	
		
			
				
					|  |  |  |  | <!--            <el-table-column label="单据数量" prop="count" width="80"></el-table-column>--> | 
			
		
	
		
			
				
					|  |  |  |  |             <!-- 扫码数量列 --> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="扫码数量" width="80"> | 
			
		
	
		
			
				
					|  |  |  |  |               <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |         <span :style="getScanActCountStyle(scope.row)"> | 
			
		
	
		
			
				
					|  |  |  |  |           <strong>{{ scope.row.scanActCount }}</strong> | 
			
		
	
		
			
				
					|  |  |  |  |         </span> | 
			
		
	
		
			
				
					|  |  |  |  |               </template> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <!-- 单据数量列 --> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="单据数量" prop="count" width="80"> | 
			
		
	
		
			
				
					|  |  |  |  |               <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <strong>{{ scope.row.count }}</strong> | 
			
		
	
		
			
				
					|  |  |  |  |               </template> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="批次号" prop="batchNo"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="生产日期" prop="productDate"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="失效日期" prop="expireDate"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="批准文号" prop="zczbhhzbapzbh"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="生产厂家" prop="manufactory"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="医保编码" prop="ybbm"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="药品编码" prop="nameCode"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-table> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-row style="text-align: right;font-size: 12px;margin-top: 10px"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-col span="24"> | 
			
		
	
		
			
				
					|  |  |  |  |               <div style="float: right"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <td> | 
			
		
	
		
			
				
					|  |  |  |  |                   <div style="background-color: #F56C6C;width: 10px;height: 10px;"></div> | 
			
		
	
		
			
				
					|  |  |  |  |                 </td> | 
			
		
	
		
			
				
					|  |  |  |  |                 <td> | 
			
		
	
		
			
				
					|  |  |  |  |                   <span style="color: #6d6d6d;"><pre>未扫码  </pre></span> | 
			
		
	
		
			
				
					|  |  |  |  |                 </td> | 
			
		
	
		
			
				
					|  |  |  |  |                 <td> | 
			
		
	
		
			
				
					|  |  |  |  |                   <div style="background-color: #E6A23C;width: 10px;height: 10px;"></div> | 
			
		
	
		
			
				
					|  |  |  |  |                 </td> | 
			
		
	
		
			
				
					|  |  |  |  |                 <td> | 
			
		
	
		
			
				
					|  |  |  |  |                   <span style="color: #6d6d6d;"><pre>部分扫码  </pre></span> | 
			
		
	
		
			
				
					|  |  |  |  |                 </td> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 <td> | 
			
		
	
		
			
				
					|  |  |  |  |                   <div style="background-color: #67C23A;width: 10px;height: 10px;"></div> | 
			
		
	
		
			
				
					|  |  |  |  |                 </td> | 
			
		
	
		
			
				
					|  |  |  |  |                 <td> | 
			
		
	
		
			
				
					|  |  |  |  |                   <span style="color: #6d6d6d;"><pre>已完全扫码</pre></span> | 
			
		
	
		
			
				
					|  |  |  |  |                 </td> | 
			
		
	
		
			
				
					|  |  |  |  |               </div> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |           <pagination | 
			
		
	
		
			
				
					|  |  |  |  |             v-show="busDataTotal>0" | 
			
		
	
		
			
				
					|  |  |  |  |             :total="busDataTotal" | 
			
		
	
		
			
				
					|  |  |  |  |             :limit.sync="busQuery.limit" | 
			
		
	
		
			
				
					|  |  |  |  |             :page.sync="busQuery.page" | 
			
		
	
		
			
				
					|  |  |  |  |             @pagination="getBizDetailList" | 
			
		
	
		
			
				
					|  |  |  |  |           ></pagination> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-tab-pane> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         <el-tab-pane> | 
			
		
	
		
			
				
					|  |  |  |  |           <span slot="label">单据 {{ orderData.billNo }}-追溯码详情</span> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table :data="detailList" style="width: 100%;" highlight-current-row="true" border ref="multipleTable" | 
			
		
	
	
		
			
				
					|  |  |  | @ -162,31 +233,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             @pagination="getCodeList" | 
			
		
	
		
			
				
					|  |  |  |  |           ></pagination> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-tab-pane> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-tab-pane> | 
			
		
	
		
			
				
					|  |  |  |  |           <span slot="label">单据 {{ orderData.billNo }}-业务详情</span> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table :data="busDataList" style="width: 100%;" highlight-current-row="true" border ref="multipleTable" | 
			
		
	
		
			
				
					|  |  |  |  |           > | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="序号" type="index"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="药品编码" prop="nameCode"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="产品通用名称" prop="cpmctymc" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="批准文号" prop="zczbhhzbapzbh"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="包装规格" prop="spec" width="80"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="单据数量" prop="count" width="80"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="批次号" prop="batchNo"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="生产日期" prop="productDate"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="失效日期" prop="expireDate"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="医保编码" prop="ybbm"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="生产厂家" prop="manufactory"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <!--<el-table-column label="扫码数量" prop="scanActCount"></el-table-column>--> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-table> | 
			
		
	
		
			
				
					|  |  |  |  |           <pagination | 
			
		
	
		
			
				
					|  |  |  |  |             v-show="busDataTotal>0" | 
			
		
	
		
			
				
					|  |  |  |  |             :total="busDataTotal" | 
			
		
	
		
			
				
					|  |  |  |  |             :limit.sync="busQuery.limit" | 
			
		
	
		
			
				
					|  |  |  |  |             :page.sync="busQuery.page" | 
			
		
	
		
			
				
					|  |  |  |  |             @pagination="getBizDetailList" | 
			
		
	
		
			
				
					|  |  |  |  |           ></pagination> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-tab-pane> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       </el-tabs> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -204,7 +251,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |       <selectPrescribeDialog | 
			
		
	
		
			
				
					|  |  |  |  |         ref="childRef" | 
			
		
	
		
			
				
					|  |  |  |  |         :workPlaceCode="null" | 
			
		
	
		
			
				
					|  |  |  |  |         :busType="this.orderData.busType" | 
			
		
	
		
			
				
					|  |  |  |  |         :busType="this.$route.query.busType" | 
			
		
	
		
			
				
					|  |  |  |  |         :fromCorp="this.orderData.fromCorp" | 
			
		
	
		
			
				
					|  |  |  |  |         :confirmSelect="this.confirmSelect" | 
			
		
	
		
			
				
					|  |  |  |  |         :closeDialog="this.closeDialog" | 
			
		
	
	
		
			
				
					|  |  |  | @ -229,7 +276,7 @@ import { | 
			
		
	
		
			
				
					|  |  |  |  | } from '@/api/collect/collectOrder' | 
			
		
	
		
			
				
					|  |  |  |  | import {checkCollectOrderManCode, draftOrder, finishCheckOrder, updateOrder} from '@/api/collect/splitCreateOrder' | 
			
		
	
		
			
				
					|  |  |  |  | import selectPrescribeDialog from "@/views/collect/selectCollectOrderDialog"; | 
			
		
	
		
			
				
					|  |  |  |  | import { getSet } from '@/api/collect/collectSet' | 
			
		
	
		
			
				
					|  |  |  |  | import {getSet} from '@/api/collect/collectSet' | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | export default { | 
			
		
	
		
			
				
					|  |  |  |  |   name: 'IocCollectOrderCheckCode', | 
			
		
	
	
		
			
				
					|  |  |  | @ -298,6 +345,21 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   methods: { | 
			
		
	
		
			
				
					|  |  |  |  |     getScanActCountStyle(row) { | 
			
		
	
		
			
				
					|  |  |  |  |       // const progress = row.scanActCount / row.count; | 
			
		
	
		
			
				
					|  |  |  |  |       // let color; | 
			
		
	
		
			
				
					|  |  |  |  |       // if (progress < 0.5) { | 
			
		
	
		
			
				
					|  |  |  |  |       //   color = 'red'; // 进度小于50%为红色 | 
			
		
	
		
			
				
					|  |  |  |  |       // } else if (progress < 1.0) { | 
			
		
	
		
			
				
					|  |  |  |  |       //   color = 'orange'; // 进度在50%到100%之间为橙色 | 
			
		
	
		
			
				
					|  |  |  |  |       // } else { | 
			
		
	
		
			
				
					|  |  |  |  |       //   color = 'green'; // 进度达到或超过100%为绿色 | 
			
		
	
		
			
				
					|  |  |  |  |       // } | 
			
		
	
		
			
				
					|  |  |  |  |       return { | 
			
		
	
		
			
				
					|  |  |  |  |         // color, | 
			
		
	
		
			
				
					|  |  |  |  |         fontWeight: 'bold', // 字号加粗 | 
			
		
	
		
			
				
					|  |  |  |  |       }; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     enterKey() { | 
			
		
	
		
			
				
					|  |  |  |  |       // this.result = "\n" | 
			
		
	
		
			
				
					|  |  |  |  |       this.errResult = '' | 
			
		
	
	
		
			
				
					|  |  |  | @ -337,7 +399,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.filterQuery.udiCode.includes(';')) { | 
			
		
	
		
			
				
					|  |  |  |  |         const codeArray = this.filterQuery.udiCode.split(';') | 
			
		
	
		
			
				
					|  |  |  |  |         const verify = this.verifyScanCount(codeArray) | 
			
		
	
		
			
				
					|  |  |  |  |         if (verify){ | 
			
		
	
		
			
				
					|  |  |  |  |         if (verify) { | 
			
		
	
		
			
				
					|  |  |  |  |           this.filterQuery.udiCodeList = codeArray | 
			
		
	
		
			
				
					|  |  |  |  |           this.filterQuery.udiCode = '' | 
			
		
	
		
			
				
					|  |  |  |  |           this.filterQuery.orderIdFk = this.orderData.billNo | 
			
		
	
	
		
			
				
					|  |  |  | @ -512,6 +574,21 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |             this.codeCount = this.codeCount + query.udiCodeList.length | 
			
		
	
		
			
				
					|  |  |  |  |             this.checkCodeEnd() | 
			
		
	
		
			
				
					|  |  |  |  |           } else { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             if ( this.busDataList.length > 0){ | 
			
		
	
		
			
				
					|  |  |  |  |               this.busDataList.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |  |                 // 检查 item 的 id 是否与 bizId 匹配 | 
			
		
	
		
			
				
					|  |  |  |  |                 if (item.id == res.data.bizIdFk) { | 
			
		
	
		
			
				
					|  |  |  |  |                   // 如果匹配,递增计数器 | 
			
		
	
		
			
				
					|  |  |  |  |                   if ( item.scanActCount == null){ | 
			
		
	
		
			
				
					|  |  |  |  |                     item.scanActCount = 1; | 
			
		
	
		
			
				
					|  |  |  |  |                   }else { | 
			
		
	
		
			
				
					|  |  |  |  |                     item.scanActCount += 1; | 
			
		
	
		
			
				
					|  |  |  |  |                   } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |               }); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             //如果校验成功 | 
			
		
	
		
			
				
					|  |  |  |  |             this.codeCount = this.codeCount + 1 | 
			
		
	
		
			
				
					|  |  |  |  |             this.checkCodeList.push(res.data.code) | 
			
		
	
	
		
			
				
					|  |  |  | @ -875,7 +952,9 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       this.scanTitle = '扫码结果:' | 
			
		
	
		
			
				
					|  |  |  |  |       this.scanResultType = 'success' | 
			
		
	
		
			
				
					|  |  |  |  |       this.curRow = null | 
			
		
	
		
			
				
					|  |  |  |  |       this.orderData = {} | 
			
		
	
		
			
				
					|  |  |  |  |       this.orderData = { | 
			
		
	
		
			
				
					|  |  |  |  |         busType: this.$route.query.busType | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       this.codeCount = 0 | 
			
		
	
		
			
				
					|  |  |  |  |       this.workplaceId = Number(this.$route.query.workplaceId) | 
			
		
	
		
			
				
					|  |  |  |  |       this.codeList = [] | 
			
		
	
	
		
			
				
					|  |  |  | @ -889,7 +968,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       this.getInputFocus() | 
			
		
	
		
			
				
					|  |  |  |  |       this.selectSysParam() | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     verifyScanCount(codeArray){ | 
			
		
	
		
			
				
					|  |  |  |  |     verifyScanCount(codeArray) { | 
			
		
	
		
			
				
					|  |  |  |  |       //判断扫码数量是否超出或少于设置扫码数量 | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.collectSet.scanMaxCount != null && this.collectSet.scanMaxCount != 0) { | 
			
		
	
		
			
				
					|  |  |  |  |         if (this.collectSet.scanMaxCount > codeArray.length) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -925,9 +1004,23 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         rowBackground.color = '#F56C6C' | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       rowBackground.height = '38px' | 
			
		
	
		
			
				
					|  |  |  |  |       return rowBackground; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     rowStyleBiz({row, rowIndex}) { | 
			
		
	
		
			
				
					|  |  |  |  |       let rowBackground = {} | 
			
		
	
		
			
				
					|  |  |  |  |       const progress = row.scanActCount / row.count; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       if (row.scanActCount == null || row.scanActCount == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |         rowBackground.color = '#F56C6C'; // 进度小于50%为红色 | 
			
		
	
		
			
				
					|  |  |  |  |       } else if (progress < 1.0) { | 
			
		
	
		
			
				
					|  |  |  |  |         rowBackground.color = '#E6A23C'; // 进度在50%到100%之间为橙色 | 
			
		
	
		
			
				
					|  |  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |  |         rowBackground.color = '#56a717'; // 进度达到或超过100%为绿色 | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       rowBackground.height = '38px' | 
			
		
	
		
			
				
					|  |  |  |  |       return rowBackground | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |   watch: { | 
			
		
	
		
			
				
					|  |  |  |  |     resetKey(newVal, oldVal) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.$refs.inputRef.focus() | 
			
		
	
	
		
			
				
					|  |  |  | 
 |