|  |  | @ -0,0 +1,616 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | <template> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   <div> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     <el-form :model="filterQuery" class="order-el-form" ref="formData" label-width="120px" @submit.native.prevent> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       <el-card> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <!--  <el-alert--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <!--  style="margin-top: 15px"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <!--  :title="msgTip"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <!--  :closable="false"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <!--  type="warning">--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <!--</el-alert>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <el-row :gutter="0" style="margin-top: 15px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-col :span="24" align="right"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-button-group> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 type="primary" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 :disabled="!orderData.billNo" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 @click.native="cancelOrder()" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               >放弃 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               </el-button> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 type="primary" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 :disabled="!orderData.billNo" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 @click.native="confirmCheckOrder()" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               >完成 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               </el-button> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--              <el-dropdown @command="handleCommand">--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                <el-button type="primary">--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                  更多功能<i class="el-icon-arrow-down el-icon--right"></i>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                </el-button>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                <el-dropdown-menu slot="dropdown">--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                  <el-dropdown-item divided @click.native="handleClickOut('IoCreateOrderBlank')">工位上货</el-dropdown-item>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                  <el-dropdown-item divided @click.native="handleClickReturn('IoCreateOrderBlank')">工位退货--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                  </el-dropdown-item>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                  <el-dropdown-item divided @click.native="handleClick('ioSplitFifoCodeBlank')">工位存量</el-dropdown-item>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                  <el-dropdown-item divided @click.native="handleClick('CollectOrderAllotBlank')">待处理单--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                  </el-dropdown-item>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                  <el-dropdown-item divided @click.native="handleClick('CollectOrderEndBlank')">已完成单</el-dropdown-item>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--                </el-dropdown-menu>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <!--              </el-dropdown>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </el-button-group> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           </el-col> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         </el-row> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <div style="border: 1px solid #ebeef5;border-radius: 2px;margin-top: 15px;padding: 15px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-row :gutter="0" style="margin-top: 5px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-col :span="20"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <el-form-item prop="code" :label="scanTip" label-width="80px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <el-input | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   id="inputer" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   @focus="getInputFocus($event)" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   @keypress.enter.native="enterKey($event)" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   ref="inputRef" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   style="ime-mode: disabled" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   type="tel" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   :placeholder="this.placeholder" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   v-model="scanCode" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 ></el-input> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <!--                       :disabled="scanDisabled"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               </el-form-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </el-col> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-col :span="4"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <el-button-group style="display: flex;"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   type="primary" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   size="mini" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   icon="el-icon-search" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   @click.native.stop="enterKey($event)" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   style="margin-left: 15px" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 > | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </el-button> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <!-- :disabled="!formData.billNo ||  (this.formDataVisible != null &&  this.formDataVisible.scanType == 1)"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <el-button type="primary" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                            @click="addGs" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 >ALT+29 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </el-button> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <el-button | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   type="primary" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   size="mini" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   icon="el-icon-delete" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   @click.native.stop="init()" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 >清空 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </el-button> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               </el-button-group> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </el-col> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           </el-row> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-alert | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             v-if="successVisible" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :title="scanTitle" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :type="scanResultType" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :closable="false" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :dangerouslyUseHTMLString="true" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :description="result" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           > | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           </el-alert> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <!--<el-alert--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <!--  v-if="warnVisible"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <!--  title="警告信息:"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <!--  type="warning"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <!--  :closable="true"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <!--  :dangerouslyUseHTMLString="true"--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <!--  :description="warnResult">--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <!--</el-alert>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-alert | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             v-if="errVisible" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             title="错误信息:" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             type="error" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :closable="false" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :dangerouslyUseHTMLString="true" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :description="errResult" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           > | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           </el-alert> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <el-descriptions title="单据信息" :column="4" border style="margin-top: 15px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-descriptions-item label="业务单号">{{ orderData.billNo }}</el-descriptions-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-descriptions-item label="发货方">{{ orderData.shipperName }}</el-descriptions-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-descriptions-item label="收货方">{{ orderData.fromCorpName }}</el-descriptions-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-descriptions-item label="单据类型">{{ orderData.busTypeName }}</el-descriptions-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-descriptions-item label="来源系统">{{ orderData.fromType }}</el-descriptions-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-descriptions-item label="单据时间">{{ orderData.billTime }}</el-descriptions-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-descriptions-item label="单据备注">{{ orderData.remark }}</el-descriptions-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         </el-descriptions> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       </el-card> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       <el-tabs type="border-card" style="margin: 15px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <!--单据业务详情--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         <el-tab-pane> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <span slot="label">单据 {{ filterQuery.billNo }}-追溯码详情</span> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-table :data="detailList" style="width: 100%;" highlight-current-row="true" border ref="multipleTable" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     :row-style="rowStyle" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           > | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-table-column label="序号" type="index"></el-table-column> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-table-column label="追溯码" prop="udiCode" width="160"></el-table-column> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-table-column label="药品编码" prop="nameCode"></el-table-column> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-table-column label="药品通用名称" prop="cpmctymc" width="110"></el-table-column> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-table-column label="包装规格" prop="ggxh" width="110"></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="serialNo"></el-table-column> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <!--<el-table-column label="扫码数量" prop="scanActCount"></el-table-column>--> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-table-column label="批准文号" prop="zczbhhzbapzbh"></el-table-column> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           </el-table> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <pagination | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             v-show="resultTotal>0" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :total="resultTotal" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :limit.sync="codeQuery.limit" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             :page.sync="codeQuery.page" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             @pagination="getCodeList" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           ></pagination> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         </el-tab-pane> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       </el-tabs> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     </el-form> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | </template> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | <script> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import { isBlank } from '@/utils/strUtil' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import { getCodeEndList } from '@/api/collect/IoCollectCodeSelect' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import { enterCodeBillNo } from '@/api/inout/order' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import { autoCodeResult, findByBill, manualCodeDetail, orderDetail } from '@/api/collect/collectOrder' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import { cancelOrder, checkCollectOrderManCode } from '@/api/collect/splitCreateOrder' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   name: 'IocCollectOrderCheckCode', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   props: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     resetKey: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       type: Function, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       required: true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   data() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     return { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       detailList: [], | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       resultTotal: 0, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       scanTip: '扫码审核:', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       placeholder: '请输入单据号进行扫码审核', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       scanTitle: '扫码结果:', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       scanResultType: 'success', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       result: '\n', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       errVisible: false, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       successVisible: true, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       errResult: '', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       scanCode: '', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       codeQuery: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         fifoSplit: 3, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         billNo: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderIdFk: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         code: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         page: 1, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         limit: 10 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       filterQuery: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         code: '', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         billNo: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         codeList: [], | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         busType: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         workPlaceCode: '', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderIdFk: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         udiCode: '', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         udiCodeList: [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       workplaceId: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       orderData: {}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       curRow: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       codeList: [], | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       checkCodeList: [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   methods: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     enterKey() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.errResult = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       //是否已经有单据 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (this.orderData.billNo == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.enterBillNoKey() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.filterQuery.udiCode = this.scanCode.trim() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (this.filterQuery.udiCode.includes(';')) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         const codeArray = this.filterQuery.udiCode.split(';') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.filterQuery.udiCodeList = codeArray | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.filterQuery.udiCode = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.filterQuery.orderIdFk = this.orderData.billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // 处理多码的情况 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.batchVailCode(this.filterQuery) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (this.filterQuery.udiCode) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (!this.parseString(this.filterQuery.udiCode)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$refs.inputRef.focus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$refs.inputRef.select() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$message.error('无效追溯码') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       //单码校验 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.filterQuery.orderIdFk = this.orderData.billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.verifyCode(this.filterQuery) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // this.getInputFocus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     enterBillNoKey(billNo) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // this.checkSuccess = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.filterQuery.code = this.scanCode | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let tQuery = { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         viewType: 'tagCode', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         workPlaceCode: this.workplaceId, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         busType: this.filterQuery.busType, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         code: this.filterQuery.code.trim() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (billNo != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         tQuery.code = billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       enterCodeBillNo(tQuery).then((response) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (response.code == 601) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.placeholder = '已选入单据,请扫描追溯码进行审核' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.orderData.billNo = response.data.billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.getBillNo(this.filterQuery.billNo) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$refs.inputRef.focus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$refs.inputRef.select() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.scanCode = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.getCodeList() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$refs.inputRef.focus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$refs.inputRef.select() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.scanCode = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$message.error(response.message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.loading = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     getBillNo(billNo) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let post = { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         billNo: billNo, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         workPlaceCode: this.workplaceId, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         page: 1, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         limit: 10 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       findByBill(post).then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (res.code == 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           if (res.data.billNo != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.orderData = res.data | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.scanCode = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.filterQuery.workPlaceCode = this.workplaceId | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.curRow = this.orderData | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$message.error(res.message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     getBizDetailList() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let preQuery = {} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (this.filterQuery == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (this.filterQuery != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         preQuery = { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           orderIdFk: this.filterQuery.billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       orderDetail(preQuery).then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (res.code != 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$message.error(res.message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.$message.error('数据加载失败') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     verifyCode(query) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       checkCollectOrderManCode(query).then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (res.code == 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           if (Array.isArray(res.data)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             let codeList = res.data | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               .filter(item => item.status === 1) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               .map(item => item.code); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             codeList.forEach(code => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               this.checkCodeList.push(code); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.printCodeResultList(res.data) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             //如果校验成功 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.checkCodeList.push(res.data.code) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.verifyFinish(1, res.data, res.message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             // this.$message.success('校验成功') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           if (Array.isArray(res.data)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.verifyFinish(2, res.data, res.message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.$message.error(res.message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     verifyFinish(val, data, message) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (val == 1) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.errVisible = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.successVisible = true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.printCodeResult(data, message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.errVisible = true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.successVisible = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.errResult = data + '追溯码不存在' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.scanCode = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.getInputFocus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     getInputFocus(event) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // event.currentTarget.select(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.$nextTick(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.$refs.inputRef.focus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.$refs.inputRef.select() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     printCodeResult(data, message) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       const resultParts = [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.udi) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resultParts.push('层级标识: ' + data.udi) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.cpmctymc) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resultParts.push(data.productType == 2 ? '药品通用名称' : '产品通用名称: ' + data.cpmctymc) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.batchNo) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resultParts.push('批次号: ' + data.batchNo) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.produceDate) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resultParts.push('生产日期: ' + data.produceDate) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.expireDate) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resultParts.push('失效日期: ' + data.expireDate) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.serialNo) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resultParts.push('序列号: ' + data.serialNo) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.productType == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (data.bzgg) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           resultParts.push('包装规格: ' + data.bzgg) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (data.ggxh) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           resultParts.push('规格型号: ' + data.ggxh) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.prepnSpec) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resultParts.push('制剂规格: ' + data.prepnSpec) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.prepnUnit) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resultParts.push('剂型: ' + data.prepnUnit) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (data.packUnit) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resultParts.push('计量单位: ' + data.packUnit) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.scanTitle = '扫码结果:' + data.code | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.result = resultParts.join(' , ') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (message == 'success') { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.scanResultType = 'success' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     async printCodeResultList(vailCodeResultResponses) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.errResult = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.result = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.successVisible = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.errVisible = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.scanTitle = '扫码结果:' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       for (let i = 0; i < vailCodeResultResponses.length; i++) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         let data = vailCodeResultResponses[i] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (data.status == 1) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.result = this.result + (isBlank(this.result) ? '' : ';') + vailCodeResultResponses[i].code + ':' + vailCodeResultResponses[i].sucMsg | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } else if (data.status == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.errResult = this.errResult + '\n' + vailCodeResultResponses[i].code + ':' + vailCodeResultResponses[i].errMsg | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (!isBlank(this.result)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.successVisible = true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (!isBlank(this.errResult)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.errVisible = true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     parseString(str) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // 1. 判断是否以 "MA" 开头 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (str.startsWith('MA')) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // 2. 判断是否以 "01" 开头且长度大于等于 18 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (str.startsWith('01') && str.length >= 18) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // 3. 判断是否以 "#" 开头且 "#" 的个数大于等于 4 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (str.startsWith('#') && (str.match(/#/g) || []).length >= 4) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // 4. 判断是否以 "8" 开头且长度为 20 位 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (str.startsWith('8') && str.length === 20) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // 5. 判断是否以 "11", "17", "21", 或 "10" 开头 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       const prefixes = ['11', '17', '21', '10'] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (prefixes.some(prefix => str.startsWith(prefix))) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // 如果没有任何条件满足,返回 false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       return false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     getCodeList() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (this.orderData != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // this.codeQuery.page = 1 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.codeQuery.orderIdFk = this.orderData.billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // this.codeQuery.bizIdFk = this.bizId | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.codeLoading = true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (this.codeQuery.fifoSplit == 3) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         manualCodeDetail(this.codeQuery).then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.codeLoading = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           if (res.code != 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.$message.error(res.message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.detailList = res.data.list | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.codeList = this.detailList.map(item => item.udiCode) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.resultTotal = res.data.total || 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           // this.codeLoading = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           // this.codeLoading = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.resultTotal = res.data.total || 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$message.error('数据加载失败') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.codeQuery.fifoSplit = this.fifoSplit | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         autoCodeResult(this.codeQuery).then(res => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.codeLoading = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           if (res.code != 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.$message.error(res.message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.codeDetailList = res.data.list | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.codeTotal = res.data.total || 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.codeLoading = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.codeLoading = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.$message.error('数据加载失败') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     batchVailCode(params) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // batchVailCode(params).then((res) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       //   if (res.code === 20000) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.$refs.inputRef.focus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.$refs.inputRef.select() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.verifyCode(params) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       //   this.$message.error(res.message) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     confirmCheckOrder() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       //完成校验 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.$confirm('是否确定完成此单据审核?', '提示', { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         confirmButtonText: '确定', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         cancelButtonText: '取消', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         type: 'warning' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }).then(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.commitCheckOrder() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     commitCheckOrder() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.init() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.$message.success('单据审核完成') | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     cancelOrder() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.$confirm('此操作将取消当前正在审核单据,是否继续?', '提示', { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         confirmButtonText: '确定', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         cancelButtonText: '取消', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         type: 'warning' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }).then(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.init() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     init() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.filterQuery = { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         code: '', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         billNo: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         codeList: [], | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         busType: this.$route.query.busType, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         workPlaceCode: '', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderIdFk: null, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         udiCode: '', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         udiCodeList: [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.scanCode = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.errVisible = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.errResult = '' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.successVisible = true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.scanTitle = '扫码结果:' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.scanResultType = 'success' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.curRow = null | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.orderData = {} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.workplaceId = Number(this.$route.query.workplaceId) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.codeList = [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.detailList = [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.checkCodeList = [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.result = '\n' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.scanTip = '扫码审核:' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.placeholder = '请输入单据号进行扫码审核' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.resultTotal = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.getInputFocus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     rowStyle({ row, rowIndex }) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       let rowBackground = {} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (this.checkCodeList.length == 0) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         rowBackground.color = '#F56C6C' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         rowBackground.height = '38px' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return rowBackground | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (this.checkCodeList.includes(row.udiCode)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         rowBackground.color = '#56a717' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       if (!this.checkCodeList.includes(row.udiCode)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         rowBackground.color = '#F56C6C' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       rowBackground.height = '38px' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       return rowBackground | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   watch: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     resetKey(newVal, oldVal) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.$refs.inputRef.focus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   created() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if (this.$route.query.workplaceId != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.workplaceId = Number(this.$route.query.workplaceId) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // this.formData.workPlaceCode = Number(this.$route.query.workplaceId); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // this.getWorkBindBusTypes(this.formData.workPlaceCode); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if (this.$route.query.busType != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       this.filterQuery.busType = this.$route.query.busType | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // this.formData.workPlaceCode = Number(this.$route.query.workplaceId); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       // this.getWorkBindBusTypes(this.formData.workPlaceCode); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     // this.getResultDetailList() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     // this.init() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   mounted() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     this.getInputFocus() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | </script> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | <style scoped> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | </style> |