|  |  |  | @ -1,166 +1,174 @@ | 
			
		
	
		
			
				
					|  |  |  |  | <template> | 
			
		
	
		
			
				
					|  |  |  |  |     <div> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-form :model="formData" :rules="formRules" ref="dataForm" label-width="100px"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-row type="flex" justify="end"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px;margin-top: -10px"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-button type="primary" @click.native="saveOrder('1')" :loading="loading">草稿保存</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-button type="primary" @click.native="saveOrder('2')" :loading="loading">提交单据</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-button-group> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |   <div> | 
			
		
	
		
			
				
					|  |  |  |  |     <el-form :model="formData" :rules="formRules" ref="dataForm" label-width="100px"> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-row type="flex" justify="end"> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px;margin-top: -10px"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-button type="primary" @click.native="saveOrder('1')" :loading="loading">草稿保存</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-button type="primary" @click.native="saveOrder('2')" :loading="loading">提交单据</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-button-group> | 
			
		
	
		
			
				
					|  |  |  |  |       </el-row> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             <el-card style="margin-top: -5px;"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-row> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-form-item label="单据号:" prop="billNo" > | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-input v-model="formData.billNo" style="width: 90%" auto-complete="off" :disabled="true"></el-input> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-card style="margin-top: -5px;"> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-row> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item label="单据号:" prop="billNo"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-input v-model="formData.billNo" style="width: 90%" auto-complete="off" :disabled="true"></el-input> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-col> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-form-item label="单据日期:" prop="billdate"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-date-picker | 
			
		
	
		
			
				
					|  |  |  |  |                                 v-model="formData.billDate" | 
			
		
	
		
			
				
					|  |  |  |  |                                 type="datetime" | 
			
		
	
		
			
				
					|  |  |  |  |                                 placeholder="选择日期" | 
			
		
	
		
			
				
					|  |  |  |  |                                 style="width: 90%" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :clearable="false" | 
			
		
	
		
			
				
					|  |  |  |  |                                 value-format="yyyy-MM-dd HH:mm:ss" | 
			
		
	
		
			
				
					|  |  |  |  |                             > | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-date-picker> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item label="单据日期:" prop="billdate"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-date-picker | 
			
		
	
		
			
				
					|  |  |  |  |                 v-model="formData.billDate" | 
			
		
	
		
			
				
					|  |  |  |  |                 type="datetime" | 
			
		
	
		
			
				
					|  |  |  |  |                 placeholder="选择日期" | 
			
		
	
		
			
				
					|  |  |  |  |                 style="width: 90%" | 
			
		
	
		
			
				
					|  |  |  |  |                 :clearable="false" | 
			
		
	
		
			
				
					|  |  |  |  |                 value-format="yyyy-MM-dd HH:mm:ss" | 
			
		
	
		
			
				
					|  |  |  |  |               > | 
			
		
	
		
			
				
					|  |  |  |  |               </el-date-picker> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-row> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |               <el-row style="margin-top: -10px"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |                   <el-form-item label="紧急程度:" prop="emergency"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-select v-model="formData.emergency"  placeholder="请选择紧急程度" style="width: 90%" clearable> | 
			
		
	
		
			
				
					|  |  |  |  |                       <el-option label="普通" :value=1></el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                       <el-option label="紧急" :value=2></el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                       <el-option label="不紧急" :value=3></el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-select> | 
			
		
	
		
			
				
					|  |  |  |  |                   </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-form-item label="到货时间:" prop="arrivalTime"> | 
			
		
	
		
			
				
					|  |  |  |  |                       <el-date-picker | 
			
		
	
		
			
				
					|  |  |  |  |                         v-model="formData.arrivalTime" | 
			
		
	
		
			
				
					|  |  |  |  |                         type="datetime" | 
			
		
	
		
			
				
					|  |  |  |  |                         placeholder="选择日期" | 
			
		
	
		
			
				
					|  |  |  |  |                         style="width: 90%" | 
			
		
	
		
			
				
					|  |  |  |  |                         :clearable="false" | 
			
		
	
		
			
				
					|  |  |  |  |                         value-format="yyyy-MM-dd HH:mm:ss" | 
			
		
	
		
			
				
					|  |  |  |  |                       > | 
			
		
	
		
			
				
					|  |  |  |  |                       </el-date-picker> | 
			
		
	
		
			
				
					|  |  |  |  |                   </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |               </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-row style="margin-top: -10px"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item label="紧急程度:" prop="emergency"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-select v-model="formData.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-option label="普通" :value=1></el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-option label="紧急" :value=2></el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-option label="不紧急" :value=3></el-option> | 
			
		
	
		
			
				
					|  |  |  |  |               </el-select> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item label="到货时间:" prop="arrivalTime"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-date-picker | 
			
		
	
		
			
				
					|  |  |  |  |                 v-model="formData.arrivalTime" | 
			
		
	
		
			
				
					|  |  |  |  |                 type="datetime" | 
			
		
	
		
			
				
					|  |  |  |  |                 placeholder="选择日期" | 
			
		
	
		
			
				
					|  |  |  |  |                 style="width: 90%" | 
			
		
	
		
			
				
					|  |  |  |  |                 :clearable="false" | 
			
		
	
		
			
				
					|  |  |  |  |                 value-format="yyyy-MM-dd HH:mm:ss" | 
			
		
	
		
			
				
					|  |  |  |  |               > | 
			
		
	
		
			
				
					|  |  |  |  |               </el-date-picker> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-row> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-row style="margin-top: -10px"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-form-item label="申购科室:" prop="locStorageCode"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-select v-model="formData.targetInvCode"  placeholder="当前分库信息" @change="setWarehouseName" style="width: 90%" clearable> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <el-option | 
			
		
	
		
			
				
					|  |  |  |  |                                     v-for="item in subInvList" | 
			
		
	
		
			
				
					|  |  |  |  |                                     :key="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                     :label="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                     :value="item.code"> | 
			
		
	
		
			
				
					|  |  |  |  |                                     <span style="float: left">{{ item.name }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                                     <span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                                 </el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-select> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-form-item label="申购说明:" prop="billNo"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-input v-model="formData.remark" auto-complete="off" style="width: 90%" type="textarea" autosize></el-input> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-row  style="margin-top: -10px" v-show="formData.status==4"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-form-item label="拒绝原因:"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-input v-model="formData.auditRemark" auto-complete="off" style="width: 90%" :disabled="true"></el-input> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-row style="margin-top: -10px"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item label="申购科室:" prop="locStorageCode"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-select v-model="formData.targetInvCode" placeholder="当前分库信息" @change="setWarehouseName" | 
			
		
	
		
			
				
					|  |  |  |  |                          style="width: 90%" clearable> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-option | 
			
		
	
		
			
				
					|  |  |  |  |                   v-for="item in subInvList" | 
			
		
	
		
			
				
					|  |  |  |  |                   :key="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                   :label="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                   :value="item.code"> | 
			
		
	
		
			
				
					|  |  |  |  |                   <span style="float: left">{{ item.name }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                   <span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-option> | 
			
		
	
		
			
				
					|  |  |  |  |               </el-select> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item label="申购说明:" prop="billNo"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-input v-model="formData.remark" auto-complete="off" style="width: 90%" type="textarea" | 
			
		
	
		
			
				
					|  |  |  |  |                         autosize></el-input> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-row style="margin-top: -10px" v-show="formData.status==4"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-col :span="11"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-form-item label="拒绝原因:"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-input v-model="formData.auditRemark" auto-complete="off" style="width: 90%" | 
			
		
	
		
			
				
					|  |  |  |  |                         :disabled="true"></el-input> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-row> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             </el-card> | 
			
		
	
		
			
				
					|  |  |  |  |       </el-card> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             <el-card> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-row type="flex" justify="end"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-button-group style="display: flex"> | 
			
		
	
		
			
				
					|  |  |  |  |                   <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入计划单</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |                   </el-button-group> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-button-group> | 
			
		
	
		
			
				
					|  |  |  |  |               </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-card> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-row type="flex" justify="end"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-button-group style="display: flex"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入计划单</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-button-group> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-button-group> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-row> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border highlight-current-row max-height="300" height="300" ref="multipleTable"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="序号" type="index" width="50"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="产品通用名" prop="productName" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="计量单位" prop="measname" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column width="150" label="申购数量"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-input size="small" v-model="scope.row.count" | 
			
		
	
		
			
				
					|  |  |  |  |                                       placeholder="请输入数量" style="width: 80%" | 
			
		
	
		
			
				
					|  |  |  |  |                                       type='number' | 
			
		
	
		
			
				
					|  |  |  |  |                                       @change="tableCountChange(scope.row)" | 
			
		
	
		
			
				
					|  |  |  |  |                                       :disabled="scope.row.index !== selectedIndex" | 
			
		
	
		
			
				
					|  |  |  |  |                                       oninput="value=value.replace(/[^\d]/g,'')"></el-input> | 
			
		
	
		
			
				
					|  |  |  |  |                         </template> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-table-column label="操作"  width="120"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true" @click.native="rowChange(scope.row)">编辑</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-button type="text" size="small" @click.stop="true" @click.native="deleteCodeArray(scope.$index, scope.row)">删除</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |                         </template> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-table> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-card> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-form> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border | 
			
		
	
		
			
				
					|  |  |  |  |                   highlight-current-row max-height="300" height="300" ref="multipleTable"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="序号" type="index" width="50"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="产品通用名" prop="productName" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="计量单位" prop="measname" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column width="150" label="申购数量"> | 
			
		
	
		
			
				
					|  |  |  |  |             <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-input size="small" v-model="scope.row.count" | 
			
		
	
		
			
				
					|  |  |  |  |                         placeholder="请输入数量" style="width: 80%" | 
			
		
	
		
			
				
					|  |  |  |  |                         type='number' | 
			
		
	
		
			
				
					|  |  |  |  |                         @change="tableCountChange(scope.row)" | 
			
		
	
		
			
				
					|  |  |  |  |                         :disabled="scope.row.index !== selectedIndex" | 
			
		
	
		
			
				
					|  |  |  |  |                         oninput="value=value.replace(/[^\d]/g,'')"></el-input> | 
			
		
	
		
			
				
					|  |  |  |  |             </template> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-table-column label="操作" width="120"> | 
			
		
	
		
			
				
					|  |  |  |  |             <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true" | 
			
		
	
		
			
				
					|  |  |  |  |                          @click.native="rowChange(scope.row)">编辑 | 
			
		
	
		
			
				
					|  |  |  |  |               </el-button> | 
			
		
	
		
			
				
					|  |  |  |  |               <el-button type="text" size="small" @click.stop="true" | 
			
		
	
		
			
				
					|  |  |  |  |                          @click.native="deleteCodeArray(scope.$index, scope.row)">删除 | 
			
		
	
		
			
				
					|  |  |  |  |               </el-button> | 
			
		
	
		
			
				
					|  |  |  |  |             </template> | 
			
		
	
		
			
				
					|  |  |  |  |           </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-table> | 
			
		
	
		
			
				
					|  |  |  |  |       </el-card> | 
			
		
	
		
			
				
					|  |  |  |  |     </el-form> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         <el-dialog | 
			
		
	
		
			
				
					|  |  |  |  |             title="产品录入" | 
			
		
	
		
			
				
					|  |  |  |  |             :visible.sync="selectProductVisible" | 
			
		
	
		
			
				
					|  |  |  |  |             :close-on-click-modal="false" | 
			
		
	
		
			
				
					|  |  |  |  |             :close-on-press-escape="false" | 
			
		
	
		
			
				
					|  |  |  |  |             width="80%" | 
			
		
	
		
			
				
					|  |  |  |  |             v-if="selectProductVisible" | 
			
		
	
		
			
				
					|  |  |  |  |             :append-to-body='true' | 
			
		
	
		
			
				
					|  |  |  |  |         > | 
			
		
	
		
			
				
					|  |  |  |  |             <purApplyProducts | 
			
		
	
		
			
				
					|  |  |  |  |                 :closeDialog="closeDialogC2" | 
			
		
	
		
			
				
					|  |  |  |  |                 :data="thisData" | 
			
		
	
		
			
				
					|  |  |  |  |                 :pId="pId" | 
			
		
	
		
			
				
					|  |  |  |  |                 :purType="1" | 
			
		
	
		
			
				
					|  |  |  |  |             ></purApplyProducts> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |  |     <el-dialog | 
			
		
	
		
			
				
					|  |  |  |  |       title="产品录入" | 
			
		
	
		
			
				
					|  |  |  |  |       :visible.sync="selectProductVisible" | 
			
		
	
		
			
				
					|  |  |  |  |       :close-on-click-modal="false" | 
			
		
	
		
			
				
					|  |  |  |  |       :close-on-press-escape="false" | 
			
		
	
		
			
				
					|  |  |  |  |       width="80%" | 
			
		
	
		
			
				
					|  |  |  |  |       v-if="selectProductVisible" | 
			
		
	
		
			
				
					|  |  |  |  |       :append-to-body='true' | 
			
		
	
		
			
				
					|  |  |  |  |     > | 
			
		
	
		
			
				
					|  |  |  |  |       <purApplyProducts | 
			
		
	
		
			
				
					|  |  |  |  |         :closeDialog="closeDialogC2" | 
			
		
	
		
			
				
					|  |  |  |  |         :data="thisData" | 
			
		
	
		
			
				
					|  |  |  |  |         :pId="pId" | 
			
		
	
		
			
				
					|  |  |  |  |         :purType="1" | 
			
		
	
		
			
				
					|  |  |  |  |       ></purApplyProducts> | 
			
		
	
		
			
				
					|  |  |  |  |     </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       <el-dialog | 
			
		
	
		
			
				
					|  |  |  |  |         title="计划单据选入" | 
			
		
	
		
			
				
					|  |  |  |  |         :visible.sync="selectApplyVisible" | 
			
		
	
		
			
				
					|  |  |  |  |         :close-on-click-modal="false" | 
			
		
	
		
			
				
					|  |  |  |  |         :close-on-press-escape="false" | 
			
		
	
		
			
				
					|  |  |  |  |         width="80%" | 
			
		
	
		
			
				
					|  |  |  |  |         append-to-body | 
			
		
	
		
			
				
					|  |  |  |  |         v-if="selectApplyVisible" | 
			
		
	
		
			
				
					|  |  |  |  |       > | 
			
		
	
		
			
				
					|  |  |  |  |         <select-recelve-list-dialog | 
			
		
	
		
			
				
					|  |  |  |  |           :data="thisData" | 
			
		
	
		
			
				
					|  |  |  |  |           :pId="pId" | 
			
		
	
		
			
				
					|  |  |  |  |           :closeDialog="closeDialogC2" | 
			
		
	
		
			
				
					|  |  |  |  |         ></select-recelve-list-dialog> | 
			
		
	
		
			
				
					|  |  |  |  |       </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |  |     <el-dialog | 
			
		
	
		
			
				
					|  |  |  |  |       title="计划单据选入" | 
			
		
	
		
			
				
					|  |  |  |  |       :visible.sync="selectApplyVisible" | 
			
		
	
		
			
				
					|  |  |  |  |       :close-on-click-modal="false" | 
			
		
	
		
			
				
					|  |  |  |  |       :close-on-press-escape="false" | 
			
		
	
		
			
				
					|  |  |  |  |       width="80%" | 
			
		
	
		
			
				
					|  |  |  |  |       append-to-body | 
			
		
	
		
			
				
					|  |  |  |  |       v-if="selectApplyVisible" | 
			
		
	
		
			
				
					|  |  |  |  |     > | 
			
		
	
		
			
				
					|  |  |  |  |       <select-recelve-list-dialog | 
			
		
	
		
			
				
					|  |  |  |  |         :data="thisData" | 
			
		
	
		
			
				
					|  |  |  |  |         :pId="pId" | 
			
		
	
		
			
				
					|  |  |  |  |         :closeDialog="closeDialogC2" | 
			
		
	
		
			
				
					|  |  |  |  |       ></select-recelve-list-dialog> | 
			
		
	
		
			
				
					|  |  |  |  |     </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     </div> | 
			
		
	
		
			
				
					|  |  |  |  |   </div> | 
			
		
	
		
			
				
					|  |  |  |  | </template> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | <script> | 
			
		
	
	
		
			
				
					|  |  |  | @ -179,350 +187,351 @@ import {addPlanId} from "@/api/purchase/purPlan"; | 
			
		
	
		
			
				
					|  |  |  |  | import SelectRecelveListDialog from "@/views/inout/receive/selectReveiceListDialog"; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | export default { | 
			
		
	
		
			
				
					|  |  |  |  |     name: "idQuery", | 
			
		
	
		
			
				
					|  |  |  |  |     props: { | 
			
		
	
		
			
				
					|  |  |  |  |         closeDialog: { | 
			
		
	
		
			
				
					|  |  |  |  |             type: Function, | 
			
		
	
		
			
				
					|  |  |  |  |             required: true, | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         idQuery: { | 
			
		
	
		
			
				
					|  |  |  |  |             type: Object, | 
			
		
	
		
			
				
					|  |  |  |  |             required: true, | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |       changId: { | 
			
		
	
		
			
				
					|  |  |  |  |         type: Boolean, | 
			
		
	
		
			
				
					|  |  |  |  |         required: true, | 
			
		
	
		
			
				
					|  |  |  |  |       }, | 
			
		
	
		
			
				
					|  |  |  |  |       isChang: { | 
			
		
	
		
			
				
					|  |  |  |  |         type: Function, | 
			
		
	
		
			
				
					|  |  |  |  |         required: true, | 
			
		
	
		
			
				
					|  |  |  |  |       }, | 
			
		
	
		
			
				
					|  |  |  |  |   name: "idQuery", | 
			
		
	
		
			
				
					|  |  |  |  |   props: { | 
			
		
	
		
			
				
					|  |  |  |  |     closeDialog: { | 
			
		
	
		
			
				
					|  |  |  |  |       type: Function, | 
			
		
	
		
			
				
					|  |  |  |  |       required: true, | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     data() { | 
			
		
	
		
			
				
					|  |  |  |  |         return { | 
			
		
	
		
			
				
					|  |  |  |  |             code: "", | 
			
		
	
		
			
				
					|  |  |  |  |             query: { | 
			
		
	
		
			
				
					|  |  |  |  |                 orderIdFk: "", | 
			
		
	
		
			
				
					|  |  |  |  |                 page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                 limit: 10, | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             formData: { | 
			
		
	
		
			
				
					|  |  |  |  |                 id: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 billNo: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 billDate: "", | 
			
		
	
		
			
				
					|  |  |  |  |                 remark: "", | 
			
		
	
		
			
				
					|  |  |  |  |                 deptCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 invCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 targetInvCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 targetDeptCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             pId: null, | 
			
		
	
		
			
				
					|  |  |  |  |             formRules: {}, | 
			
		
	
		
			
				
					|  |  |  |  |             codeArray: [], | 
			
		
	
		
			
				
					|  |  |  |  |             total: 0, | 
			
		
	
		
			
				
					|  |  |  |  |             loading: false, | 
			
		
	
		
			
				
					|  |  |  |  |             index: null, | 
			
		
	
		
			
				
					|  |  |  |  |             formLoading: false, | 
			
		
	
		
			
				
					|  |  |  |  |             formVisible: false, | 
			
		
	
		
			
				
					|  |  |  |  |             deleteLoading: false, | 
			
		
	
		
			
				
					|  |  |  |  |             orderNo: null, | 
			
		
	
		
			
				
					|  |  |  |  |             statusMap: { | 
			
		
	
		
			
				
					|  |  |  |  |                 1: "草稿", | 
			
		
	
		
			
				
					|  |  |  |  |                 2: "未审核", | 
			
		
	
		
			
				
					|  |  |  |  |                 3: "已审核", | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             typeMap: { | 
			
		
	
		
			
				
					|  |  |  |  |                 1: "预入库", | 
			
		
	
		
			
				
					|  |  |  |  |                 2: "普通采购", | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             orderEditor: true, | 
			
		
	
		
			
				
					|  |  |  |  |             selectApplyVisible:false, | 
			
		
	
		
			
				
					|  |  |  |  |             sOptions: [], | 
			
		
	
		
			
				
					|  |  |  |  |             sValue: [], | 
			
		
	
		
			
				
					|  |  |  |  |             sList: [], | 
			
		
	
		
			
				
					|  |  |  |  |             sLoading: false, | 
			
		
	
		
			
				
					|  |  |  |  |             busTypes: [], | 
			
		
	
		
			
				
					|  |  |  |  |             currentRow: {}, | 
			
		
	
		
			
				
					|  |  |  |  |             selectedIndex: "", | 
			
		
	
		
			
				
					|  |  |  |  |             selectProductVisible: false, | 
			
		
	
		
			
				
					|  |  |  |  |             thisData: {}, | 
			
		
	
		
			
				
					|  |  |  |  |             storageList: [], | 
			
		
	
		
			
				
					|  |  |  |  |             subInvList: [], | 
			
		
	
		
			
				
					|  |  |  |  |             invQueryData: {}, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         }; | 
			
		
	
		
			
				
					|  |  |  |  |     idQuery: { | 
			
		
	
		
			
				
					|  |  |  |  |       type: Object, | 
			
		
	
		
			
				
					|  |  |  |  |       required: true, | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     changId: { | 
			
		
	
		
			
				
					|  |  |  |  |       type: Boolean, | 
			
		
	
		
			
				
					|  |  |  |  |       required: true, | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |    watch: { | 
			
		
	
		
			
				
					|  |  |  |  |      isChang: function () { | 
			
		
	
		
			
				
					|  |  |  |  |        this.$emit("cancelDialog", this.pId); | 
			
		
	
		
			
				
					|  |  |  |  |      }, | 
			
		
	
		
			
				
					|  |  |  |  |    }, | 
			
		
	
		
			
				
					|  |  |  |  |     components: { | 
			
		
	
		
			
				
					|  |  |  |  |         draggable, | 
			
		
	
		
			
				
					|  |  |  |  |       purApplyProducts, | 
			
		
	
		
			
				
					|  |  |  |  |       SelectRecelveListDialog | 
			
		
	
		
			
				
					|  |  |  |  |     isChang: { | 
			
		
	
		
			
				
					|  |  |  |  |       type: Function, | 
			
		
	
		
			
				
					|  |  |  |  |       required: true, | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     methods: { | 
			
		
	
		
			
				
					|  |  |  |  |         saveOrder(status) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.$refs["dataForm"].validate(valid => { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (valid) { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (this.codeArray.length < 1) { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.warning('未添加产品'); | 
			
		
	
		
			
				
					|  |  |  |  |                         return; | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                     if (status === '2') { | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   data() { | 
			
		
	
		
			
				
					|  |  |  |  |     return { | 
			
		
	
		
			
				
					|  |  |  |  |       code: "", | 
			
		
	
		
			
				
					|  |  |  |  |       query: { | 
			
		
	
		
			
				
					|  |  |  |  |         orderIdFk: "", | 
			
		
	
		
			
				
					|  |  |  |  |         page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |         limit: 10, | 
			
		
	
		
			
				
					|  |  |  |  |       }, | 
			
		
	
		
			
				
					|  |  |  |  |       formData: { | 
			
		
	
		
			
				
					|  |  |  |  |         billType: "CPSG", | 
			
		
	
		
			
				
					|  |  |  |  |         id: null, | 
			
		
	
		
			
				
					|  |  |  |  |         billNo: null, | 
			
		
	
		
			
				
					|  |  |  |  |         billDate: "", | 
			
		
	
		
			
				
					|  |  |  |  |         remark: "", | 
			
		
	
		
			
				
					|  |  |  |  |         deptCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |         invCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |         targetInvCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |         targetDeptCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |       }, | 
			
		
	
		
			
				
					|  |  |  |  |       pId: null, | 
			
		
	
		
			
				
					|  |  |  |  |       formRules: {}, | 
			
		
	
		
			
				
					|  |  |  |  |       codeArray: [], | 
			
		
	
		
			
				
					|  |  |  |  |       total: 0, | 
			
		
	
		
			
				
					|  |  |  |  |       loading: false, | 
			
		
	
		
			
				
					|  |  |  |  |       index: null, | 
			
		
	
		
			
				
					|  |  |  |  |       formLoading: false, | 
			
		
	
		
			
				
					|  |  |  |  |       formVisible: false, | 
			
		
	
		
			
				
					|  |  |  |  |       deleteLoading: false, | 
			
		
	
		
			
				
					|  |  |  |  |       orderNo: null, | 
			
		
	
		
			
				
					|  |  |  |  |       statusMap: { | 
			
		
	
		
			
				
					|  |  |  |  |         1: "草稿", | 
			
		
	
		
			
				
					|  |  |  |  |         2: "未审核", | 
			
		
	
		
			
				
					|  |  |  |  |         3: "已审核", | 
			
		
	
		
			
				
					|  |  |  |  |       }, | 
			
		
	
		
			
				
					|  |  |  |  |       typeMap: { | 
			
		
	
		
			
				
					|  |  |  |  |         1: "预入库", | 
			
		
	
		
			
				
					|  |  |  |  |         2: "普通采购", | 
			
		
	
		
			
				
					|  |  |  |  |       }, | 
			
		
	
		
			
				
					|  |  |  |  |       orderEditor: true, | 
			
		
	
		
			
				
					|  |  |  |  |       selectApplyVisible: false, | 
			
		
	
		
			
				
					|  |  |  |  |       sOptions: [], | 
			
		
	
		
			
				
					|  |  |  |  |       sValue: [], | 
			
		
	
		
			
				
					|  |  |  |  |       sList: [], | 
			
		
	
		
			
				
					|  |  |  |  |       sLoading: false, | 
			
		
	
		
			
				
					|  |  |  |  |       busTypes: [], | 
			
		
	
		
			
				
					|  |  |  |  |       currentRow: {}, | 
			
		
	
		
			
				
					|  |  |  |  |       selectedIndex: "", | 
			
		
	
		
			
				
					|  |  |  |  |       selectProductVisible: false, | 
			
		
	
		
			
				
					|  |  |  |  |       thisData: {}, | 
			
		
	
		
			
				
					|  |  |  |  |       storageList: [], | 
			
		
	
		
			
				
					|  |  |  |  |       subInvList: [], | 
			
		
	
		
			
				
					|  |  |  |  |       invQueryData: {}, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         if(this.formData.billDate=="" || this.formData.billDate==null){ | 
			
		
	
		
			
				
					|  |  |  |  |                             return this.$message.error("单据日期不能为空!"); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                         if(this.formData.targetInvCode=="" || this.formData.targetInvCode==null){ | 
			
		
	
		
			
				
					|  |  |  |  |                             return this.$message.error("采购科室不能为空!"); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                         if(this.formData.emergency=="" || this.formData.emergency==null){ | 
			
		
	
		
			
				
					|  |  |  |  |                           return this.$message.error("紧急程度不能为空!"); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                         if(this.formData.arrivalTime=="" || this.formData.arrivalTime==null){ | 
			
		
	
		
			
				
					|  |  |  |  |                           return this.$message.error("到货时间不能为空!"); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   watch: { | 
			
		
	
		
			
				
					|  |  |  |  |     isChang: function () { | 
			
		
	
		
			
				
					|  |  |  |  |       this.$emit("cancelDialog", this.pId); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   components: { | 
			
		
	
		
			
				
					|  |  |  |  |     draggable, | 
			
		
	
		
			
				
					|  |  |  |  |     purApplyProducts, | 
			
		
	
		
			
				
					|  |  |  |  |     SelectRecelveListDialog | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   methods: { | 
			
		
	
		
			
				
					|  |  |  |  |     saveOrder(status) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.$refs["dataForm"].validate(valid => { | 
			
		
	
		
			
				
					|  |  |  |  |         if (valid) { | 
			
		
	
		
			
				
					|  |  |  |  |           if (this.codeArray.length < 1) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.$message.warning('未添加产品'); | 
			
		
	
		
			
				
					|  |  |  |  |             return; | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |           if (status === '2') { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         for (let i = 0; i < this.codeArray.length; i++) { | 
			
		
	
		
			
				
					|  |  |  |  |                             if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") { | 
			
		
	
		
			
				
					|  |  |  |  |                                 return this.$message.error('单据数量不能为0'); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                     if (status == "1") { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.submitFunction(status); | 
			
		
	
		
			
				
					|  |  |  |  |                     } else { | 
			
		
	
		
			
				
					|  |  |  |  |                         let tip = "是否确定提交订单?"; | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$confirm(tip, "提示", { | 
			
		
	
		
			
				
					|  |  |  |  |                             confirmButtonText: "确定", | 
			
		
	
		
			
				
					|  |  |  |  |                             cancelButtonText: "取消", | 
			
		
	
		
			
				
					|  |  |  |  |                             type: "warning", | 
			
		
	
		
			
				
					|  |  |  |  |                         }).then(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                             this.submitFunction(status); | 
			
		
	
		
			
				
					|  |  |  |  |                         }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                             this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                         }); | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         submitFunction(status) { | 
			
		
	
		
			
				
					|  |  |  |  |             let tMessage = status === '1' ? '保存' : '提交'; | 
			
		
	
		
			
				
					|  |  |  |  |             this.loading = true; | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.id=this.pId; | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.invCode=this.$store.getters.locInvCode | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.deptCode=this.$store.getters.locDeptCode | 
			
		
	
		
			
				
					|  |  |  |  |             let tQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |                 type:1, | 
			
		
	
		
			
				
					|  |  |  |  |                 editStatus: status, | 
			
		
	
		
			
				
					|  |  |  |  |                 purApplyEntity: this.formData, | 
			
		
	
		
			
				
					|  |  |  |  |                 subErpOrders: this.codeArray, | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             inserThrOrderWeb(tQuery) | 
			
		
	
		
			
				
					|  |  |  |  |                 .then(response => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                     if (response.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.success(tMessage + "成功"); | 
			
		
	
		
			
				
					|  |  |  |  |                         this.closeDialog(true); | 
			
		
	
		
			
				
					|  |  |  |  |                     } else { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.error(response.message); | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |                 .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         setWarehouseName(obj){ | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.targetDeptCode= this.subInvList.find(item => item.code == obj).parentId; | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         selectProductFunction() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.selectProductVisible = true; | 
			
		
	
		
			
				
					|  |  |  |  |             //当父id为空的时候生成id | 
			
		
	
		
			
				
					|  |  |  |  |             if(this.pId==null){ | 
			
		
	
		
			
				
					|  |  |  |  |               addApplyId().then(response => { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (response.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                   this.pId=response.data | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |               }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |               }) | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.formData.billDate == "" || this.formData.billDate == null) { | 
			
		
	
		
			
				
					|  |  |  |  |               return this.$message.error("单据日期不能为空!"); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             this.thisData.stockOrderLists = this.codeArray; | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         closeDialogC2(rData) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.selectProductVisible = false; | 
			
		
	
		
			
				
					|  |  |  |  |             this.selectApplyVisible = false; | 
			
		
	
		
			
				
					|  |  |  |  |             this.query={ | 
			
		
	
		
			
				
					|  |  |  |  |               orderIdFk:rData | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.formData.targetInvCode == "" || this.formData.targetInvCode == null) { | 
			
		
	
		
			
				
					|  |  |  |  |               return this.$message.error("采购科室不能为空!"); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             this.pId=rData; | 
			
		
	
		
			
				
					|  |  |  |  |             listApplyDetail(this.query) //查找该单号下的所有条码 | 
			
		
	
		
			
				
					|  |  |  |  |               .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 console.log(response) | 
			
		
	
		
			
				
					|  |  |  |  |                 this.codeArray = response.data.list || []; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.total = response.data.total || 0; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |               }) | 
			
		
	
		
			
				
					|  |  |  |  |               .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.list = []; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.total = 0; | 
			
		
	
		
			
				
					|  |  |  |  |               }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         rowChange(val) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.currentRow = val; | 
			
		
	
		
			
				
					|  |  |  |  |             this.selectedIndex = val.index; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         tableCountChange(row) { | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.$isNotBlank(row)) { | 
			
		
	
		
			
				
					|  |  |  |  |               updateDetail(this.currentRow); | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.formData.emergency == "" || this.formData.emergency == null) { | 
			
		
	
		
			
				
					|  |  |  |  |               return this.$message.error("紧急程度不能为空!"); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         tableRowClassName({row, rowIndex}) { | 
			
		
	
		
			
				
					|  |  |  |  |             row.index = rowIndex; | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         // 刷新表单 | 
			
		
	
		
			
				
					|  |  |  |  |         resetForm() { | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.$refs["dataForm"]) { | 
			
		
	
		
			
				
					|  |  |  |  |                 // 清空验证信息表单 | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$refs["dataForm"].clearValidate(); | 
			
		
	
		
			
				
					|  |  |  |  |                 // 刷新表单 | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$refs["dataForm"].resetFields(); | 
			
		
	
		
			
				
					|  |  |  |  |                 this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.formData.arrivalTime == "" || this.formData.arrivalTime == null) { | 
			
		
	
		
			
				
					|  |  |  |  |               return this.$message.error("到货时间不能为空!"); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |       selectApply() { | 
			
		
	
		
			
				
					|  |  |  |  |         this.selectApplyVisible = true; | 
			
		
	
		
			
				
					|  |  |  |  |         //当父id为空的时候生成id | 
			
		
	
		
			
				
					|  |  |  |  |         if(this.pId==null){ | 
			
		
	
		
			
				
					|  |  |  |  |           addApplyId().then(response => { | 
			
		
	
		
			
				
					|  |  |  |  |             if (response.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |               this.pId=response.data | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             for (let i = 0; i < this.codeArray.length; i++) { | 
			
		
	
		
			
				
					|  |  |  |  |               if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") { | 
			
		
	
		
			
				
					|  |  |  |  |                 return this.$message.error('单据数量不能为0'); | 
			
		
	
		
			
				
					|  |  |  |  |               } | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |           }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |             this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |           }) | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |       }, | 
			
		
	
		
			
				
					|  |  |  |  |         deleteCodeArray(index, row) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { | 
			
		
	
		
			
				
					|  |  |  |  |                 confirmButtonText: "确定", | 
			
		
	
		
			
				
					|  |  |  |  |                 cancelButtonText: "取消", | 
			
		
	
		
			
				
					|  |  |  |  |                 type: "warning", | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |           if (status == "1") { | 
			
		
	
		
			
				
					|  |  |  |  |             this.submitFunction(status); | 
			
		
	
		
			
				
					|  |  |  |  |           } else { | 
			
		
	
		
			
				
					|  |  |  |  |             let tip = "是否确定提交订单?"; | 
			
		
	
		
			
				
					|  |  |  |  |             this.$confirm(tip, "提示", { | 
			
		
	
		
			
				
					|  |  |  |  |               confirmButtonText: "确定", | 
			
		
	
		
			
				
					|  |  |  |  |               cancelButtonText: "取消", | 
			
		
	
		
			
				
					|  |  |  |  |               type: "warning", | 
			
		
	
		
			
				
					|  |  |  |  |             }).then(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$refs.multipleTable.setCurrentRow(); | 
			
		
	
		
			
				
					|  |  |  |  |                 this.currentRow = {}; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.selectedIndex = ""; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 if (this.orderEditor) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.detailLoading = true; | 
			
		
	
		
			
				
					|  |  |  |  |                     if (this.$isNotBlank(row.id)) { | 
			
		
	
		
			
				
					|  |  |  |  |                         delApplyDetail(row.id) | 
			
		
	
		
			
				
					|  |  |  |  |                             .then(response => { | 
			
		
	
		
			
				
					|  |  |  |  |                                 this.detailLoading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                                 if (response.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                                     this.$message.success(response.data); | 
			
		
	
		
			
				
					|  |  |  |  |                                     // this.getStockOrderDetailList(); | 
			
		
	
		
			
				
					|  |  |  |  |                                     this.codeArray.splice(index, 1); | 
			
		
	
		
			
				
					|  |  |  |  |                                 } else { | 
			
		
	
		
			
				
					|  |  |  |  |                                     this.$message.error(response.message); | 
			
		
	
		
			
				
					|  |  |  |  |                                 } | 
			
		
	
		
			
				
					|  |  |  |  |                             }) | 
			
		
	
		
			
				
					|  |  |  |  |                             .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                                 this.detailLoading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                             }) | 
			
		
	
		
			
				
					|  |  |  |  |                     } else { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.success('删除成功'); | 
			
		
	
		
			
				
					|  |  |  |  |                         this.codeArray.splice(index, 1); | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } else { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.$message.success('删除成功'); | 
			
		
	
		
			
				
					|  |  |  |  |                     this.codeArray.splice(index, 1); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |               this.submitFunction(status); | 
			
		
	
		
			
				
					|  |  |  |  |             }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |               this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         getStockOrderDetailList() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.loading = true; | 
			
		
	
		
			
				
					|  |  |  |  |             listApplyDetail(this.query) //查找该单号下的所有条码 | 
			
		
	
		
			
				
					|  |  |  |  |                 .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     console.log(response) | 
			
		
	
		
			
				
					|  |  |  |  |                     this.codeArray = response.data.list || []; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.total = response.data.total || 0; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |                 .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.list = []; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.total = 0; | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         findSubInvs() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.subInvList = []; | 
			
		
	
		
			
				
					|  |  |  |  |             let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                 filter:3 | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             filterSubByInv(query) | 
			
		
	
		
			
				
					|  |  |  |  |                 .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.subInvList = response.data || []; | 
			
		
	
		
			
				
					|  |  |  |  |                     if (this.subInvList != null && this.subInvList.length == 1) { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.formData.invWarehouseCode = this.subInvList[0].code; | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |                 .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |       }); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     submitFunction(status) { | 
			
		
	
		
			
				
					|  |  |  |  |       let tMessage = status === '1' ? '保存' : '提交'; | 
			
		
	
		
			
				
					|  |  |  |  |       this.loading = true; | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData.id = this.pId; | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData.invCode = this.$store.getters.locInvCode | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData.deptCode = this.$store.getters.locDeptCode | 
			
		
	
		
			
				
					|  |  |  |  |       let tQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |         type: 1, | 
			
		
	
		
			
				
					|  |  |  |  |         editStatus: status, | 
			
		
	
		
			
				
					|  |  |  |  |         purApplyEntity: this.formData, | 
			
		
	
		
			
				
					|  |  |  |  |         subErpOrders: this.codeArray, | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       inserThrOrderWeb(tQuery) | 
			
		
	
		
			
				
					|  |  |  |  |         .then(response => { | 
			
		
	
		
			
				
					|  |  |  |  |           this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |           if (response.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.$message.success(tMessage + "成功"); | 
			
		
	
		
			
				
					|  |  |  |  |             this.closeDialog(true); | 
			
		
	
		
			
				
					|  |  |  |  |           } else { | 
			
		
	
		
			
				
					|  |  |  |  |             this.$message.error(response.message); | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |  |         .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |           this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     setWarehouseName(obj) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData.targetDeptCode = this.subInvList.find(item => item.code == obj).parentId; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     selectProductFunction() { | 
			
		
	
		
			
				
					|  |  |  |  |       this.selectProductVisible = true; | 
			
		
	
		
			
				
					|  |  |  |  |       //当父id为空的时候生成id | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.pId == null) { | 
			
		
	
		
			
				
					|  |  |  |  |         addApplyId().then(response => { | 
			
		
	
		
			
				
					|  |  |  |  |           if (response.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.pId = response.data | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |         }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |           this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       this.thisData.stockOrderLists = this.codeArray; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     closeDialogC2(rData) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.selectProductVisible = false; | 
			
		
	
		
			
				
					|  |  |  |  |       this.selectApplyVisible = false; | 
			
		
	
		
			
				
					|  |  |  |  |       this.query = { | 
			
		
	
		
			
				
					|  |  |  |  |         orderIdFk: rData | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       this.pId = rData; | 
			
		
	
		
			
				
					|  |  |  |  |       listApplyDetail(this.query) //查找该单号下的所有条码 | 
			
		
	
		
			
				
					|  |  |  |  |         .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |           console.log(response) | 
			
		
	
		
			
				
					|  |  |  |  |           this.codeArray = response.data.list || []; | 
			
		
	
		
			
				
					|  |  |  |  |           this.total = response.data.total || 0; | 
			
		
	
		
			
				
					|  |  |  |  |           this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |  |         .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |           this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |           this.list = []; | 
			
		
	
		
			
				
					|  |  |  |  |           this.total = 0; | 
			
		
	
		
			
				
					|  |  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     rowChange(val) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.currentRow = val; | 
			
		
	
		
			
				
					|  |  |  |  |       this.selectedIndex = val.index; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     filters: {}, | 
			
		
	
		
			
				
					|  |  |  |  |     mounted() { | 
			
		
	
		
			
				
					|  |  |  |  |         document.body.ondrop = function (event) { | 
			
		
	
		
			
				
					|  |  |  |  |             event.preventDefault(); | 
			
		
	
		
			
				
					|  |  |  |  |             event.stopPropagation(); | 
			
		
	
		
			
				
					|  |  |  |  |         }; | 
			
		
	
		
			
				
					|  |  |  |  |     tableCountChange(row) { | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.$isNotBlank(row)) { | 
			
		
	
		
			
				
					|  |  |  |  |         updateDetail(this.currentRow); | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     tableRowClassName({row, rowIndex}) { | 
			
		
	
		
			
				
					|  |  |  |  |       row.index = rowIndex; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     // 刷新表单 | 
			
		
	
		
			
				
					|  |  |  |  |     resetForm() { | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.$refs["dataForm"]) { | 
			
		
	
		
			
				
					|  |  |  |  |         // 清空验证信息表单 | 
			
		
	
		
			
				
					|  |  |  |  |         this.$refs["dataForm"].clearValidate(); | 
			
		
	
		
			
				
					|  |  |  |  |         // 刷新表单 | 
			
		
	
		
			
				
					|  |  |  |  |         this.$refs["dataForm"].resetFields(); | 
			
		
	
		
			
				
					|  |  |  |  |         this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     selectApply() { | 
			
		
	
		
			
				
					|  |  |  |  |       this.selectApplyVisible = true; | 
			
		
	
		
			
				
					|  |  |  |  |       //当父id为空的时候生成id | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.pId == null) { | 
			
		
	
		
			
				
					|  |  |  |  |         addApplyId().then(response => { | 
			
		
	
		
			
				
					|  |  |  |  |           if (response.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.pId = response.data | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |         }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |           this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     created() { | 
			
		
	
		
			
				
					|  |  |  |  |         if (this.$isNotBlank(this.idQuery.id)) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.query.limit = 100; | 
			
		
	
		
			
				
					|  |  |  |  |             this.pId=this.idQuery.id; | 
			
		
	
		
			
				
					|  |  |  |  |             this.query.orderIdFk = this.idQuery.id; | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData = this.idQuery.formData; | 
			
		
	
		
			
				
					|  |  |  |  |             this.orderEditor = true; | 
			
		
	
		
			
				
					|  |  |  |  |             this.sValue = this.formData.corpName; | 
			
		
	
		
			
				
					|  |  |  |  |             this.getStockOrderDetailList(); | 
			
		
	
		
			
				
					|  |  |  |  |     deleteCodeArray(index, row) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { | 
			
		
	
		
			
				
					|  |  |  |  |         confirmButtonText: "确定", | 
			
		
	
		
			
				
					|  |  |  |  |         cancelButtonText: "取消", | 
			
		
	
		
			
				
					|  |  |  |  |         type: "warning", | 
			
		
	
		
			
				
					|  |  |  |  |       }).then(() => { | 
			
		
	
		
			
				
					|  |  |  |  |         this.$refs.multipleTable.setCurrentRow(); | 
			
		
	
		
			
				
					|  |  |  |  |         this.currentRow = {}; | 
			
		
	
		
			
				
					|  |  |  |  |         this.selectedIndex = ""; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         if (this.orderEditor) { | 
			
		
	
		
			
				
					|  |  |  |  |           this.detailLoading = true; | 
			
		
	
		
			
				
					|  |  |  |  |           if (this.$isNotBlank(row.id)) { | 
			
		
	
		
			
				
					|  |  |  |  |             delApplyDetail(row.id) | 
			
		
	
		
			
				
					|  |  |  |  |               .then(response => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.detailLoading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                 if (response.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                   this.$message.success(response.data); | 
			
		
	
		
			
				
					|  |  |  |  |                   // this.getStockOrderDetailList(); | 
			
		
	
		
			
				
					|  |  |  |  |                   this.codeArray.splice(index, 1); | 
			
		
	
		
			
				
					|  |  |  |  |                 } else { | 
			
		
	
		
			
				
					|  |  |  |  |                   this.$message.error(response.message); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |               }) | 
			
		
	
		
			
				
					|  |  |  |  |               .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.detailLoading = false; | 
			
		
	
		
			
				
					|  |  |  |  |               }) | 
			
		
	
		
			
				
					|  |  |  |  |           } else { | 
			
		
	
		
			
				
					|  |  |  |  |             this.$message.success('删除成功'); | 
			
		
	
		
			
				
					|  |  |  |  |             this.codeArray.splice(index, 1); | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData = { | 
			
		
	
		
			
				
					|  |  |  |  |                 id: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 billNo: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 billDate: "", | 
			
		
	
		
			
				
					|  |  |  |  |                 remark: "", | 
			
		
	
		
			
				
					|  |  |  |  |                 deptCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 locStorageCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 invWarehouseCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             this.orderEditor = false; | 
			
		
	
		
			
				
					|  |  |  |  |           this.$message.success('删除成功'); | 
			
		
	
		
			
				
					|  |  |  |  |           this.codeArray.splice(index, 1); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         this.findSubInvs(); | 
			
		
	
		
			
				
					|  |  |  |  |         this.codeArray = []; | 
			
		
	
		
			
				
					|  |  |  |  |       }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       }); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     getStockOrderDetailList() { | 
			
		
	
		
			
				
					|  |  |  |  |       this.loading = true; | 
			
		
	
		
			
				
					|  |  |  |  |       listApplyDetail(this.query) //查找该单号下的所有条码 | 
			
		
	
		
			
				
					|  |  |  |  |         .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |           console.log(response) | 
			
		
	
		
			
				
					|  |  |  |  |           this.codeArray = response.data.list || []; | 
			
		
	
		
			
				
					|  |  |  |  |           this.total = response.data.total || 0; | 
			
		
	
		
			
				
					|  |  |  |  |           this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |  |         .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |           this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |           this.list = []; | 
			
		
	
		
			
				
					|  |  |  |  |           this.total = 0; | 
			
		
	
		
			
				
					|  |  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     findSubInvs() { | 
			
		
	
		
			
				
					|  |  |  |  |       this.subInvList = []; | 
			
		
	
		
			
				
					|  |  |  |  |       let query = { | 
			
		
	
		
			
				
					|  |  |  |  |         filter: 3 | 
			
		
	
		
			
				
					|  |  |  |  |       }; | 
			
		
	
		
			
				
					|  |  |  |  |       filterSubByInv(query) | 
			
		
	
		
			
				
					|  |  |  |  |         .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |           this.subInvList = response.data || []; | 
			
		
	
		
			
				
					|  |  |  |  |           if (this.subInvList != null && this.subInvList.length == 1) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.invWarehouseCode = this.subInvList[0].code; | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |  |         .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   filters: {}, | 
			
		
	
		
			
				
					|  |  |  |  |   mounted() { | 
			
		
	
		
			
				
					|  |  |  |  |     document.body.ondrop = function (event) { | 
			
		
	
		
			
				
					|  |  |  |  |       event.preventDefault(); | 
			
		
	
		
			
				
					|  |  |  |  |       event.stopPropagation(); | 
			
		
	
		
			
				
					|  |  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   created() { | 
			
		
	
		
			
				
					|  |  |  |  |     if (this.$isNotBlank(this.idQuery.id)) { | 
			
		
	
		
			
				
					|  |  |  |  |       this.query.limit = 100; | 
			
		
	
		
			
				
					|  |  |  |  |       this.pId = this.idQuery.id; | 
			
		
	
		
			
				
					|  |  |  |  |       this.query.orderIdFk = this.idQuery.id; | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData = this.idQuery.formData; | 
			
		
	
		
			
				
					|  |  |  |  |       this.orderEditor = true; | 
			
		
	
		
			
				
					|  |  |  |  |       this.sValue = this.formData.corpName; | 
			
		
	
		
			
				
					|  |  |  |  |       this.getStockOrderDetailList(); | 
			
		
	
		
			
				
					|  |  |  |  |     } else { | 
			
		
	
		
			
				
					|  |  |  |  |       this.formData = { | 
			
		
	
		
			
				
					|  |  |  |  |         id: null, | 
			
		
	
		
			
				
					|  |  |  |  |         billNo: null, | 
			
		
	
		
			
				
					|  |  |  |  |         billDate: "", | 
			
		
	
		
			
				
					|  |  |  |  |         remark: "", | 
			
		
	
		
			
				
					|  |  |  |  |         billType: "CPSG", | 
			
		
	
		
			
				
					|  |  |  |  |         deptCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |         locStorageCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |         invWarehouseCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |       }; | 
			
		
	
		
			
				
					|  |  |  |  |       this.orderEditor = false; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  |     this.findSubInvs(); | 
			
		
	
		
			
				
					|  |  |  |  |     this.codeArray = []; | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  | }; | 
			
		
	
		
			
				
					|  |  |  |  | </script> | 
			
		
	
		
			
				
					|  |  |  |  | <style> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | .ao-text { | 
			
		
	
		
			
				
					|  |  |  |  |     width: 100%; | 
			
		
	
		
			
				
					|  |  |  |  |     font-size: 13px; | 
			
		
	
		
			
				
					|  |  |  |  |     font-family: "Microsoft YaHei"; | 
			
		
	
		
			
				
					|  |  |  |  |     float: right; | 
			
		
	
		
			
				
					|  |  |  |  |     text-align: right; | 
			
		
	
		
			
				
					|  |  |  |  |     margin-top: 10px; | 
			
		
	
		
			
				
					|  |  |  |  |   width: 100%; | 
			
		
	
		
			
				
					|  |  |  |  |   font-size: 13px; | 
			
		
	
		
			
				
					|  |  |  |  |   font-family: "Microsoft YaHei"; | 
			
		
	
		
			
				
					|  |  |  |  |   float: right; | 
			
		
	
		
			
				
					|  |  |  |  |   text-align: right; | 
			
		
	
		
			
				
					|  |  |  |  |   margin-top: 10px; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | </style> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |