Merge remote-tracking branch 'origin/master'
						commit
						f194e0840b
					
				| @ -0,0 +1,166 @@ | |||||||
|  | import axios from '@/utils/request' | ||||||
|  | 
 | ||||||
|  | export function filterList(query) { | ||||||
|  |   return axios({ | ||||||
|  |     url: "/udiwms/inout/muti/filterList", | ||||||
|  |     method: "get", | ||||||
|  |     params: query | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function addMuti(query) { | ||||||
|  |   return axios({ | ||||||
|  |     url: "/udiwms/inout/muti/add", | ||||||
|  |     method: "post", | ||||||
|  |     data: query | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function updateMuti(query) { | ||||||
|  |   return axios({ | ||||||
|  |     url: "/udiwms/inout/muti/update", | ||||||
|  |     method: "post", | ||||||
|  |     data: query | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function detailMuti(query) { | ||||||
|  |   return axios({ | ||||||
|  |     url: "/udiwms/inout/muti/detail", | ||||||
|  |     method: "post", | ||||||
|  |     data: query | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | export function addOrderMuti(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/addOrderMuti", | ||||||
|  |       method: "post", | ||||||
|  |       data: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function updateOrderMuti(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/updateOrderMuti", | ||||||
|  |       method: "post", | ||||||
|  |       data: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | export function filterMutiDetailList(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/filterMutiDetailList", | ||||||
|  |       method: "post", | ||||||
|  |       data: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function getCodeList(params) { | ||||||
|  |   return axios({ | ||||||
|  |     url: "/udiwms/inout/code/filterList", | ||||||
|  |     method: "get", | ||||||
|  |     params: params | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function checkUdi(params) { | ||||||
|  |   return axios({ | ||||||
|  |     url: "/udiwms/inout/order/muti/checkUdi", | ||||||
|  |     method: "post", | ||||||
|  |     data: params | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function filterMutiList(params){ | ||||||
|  |   return axios({ | ||||||
|  |     url: "/udiwms/inout/order/muti/filterMutiList", | ||||||
|  |     method: "get", | ||||||
|  |     params: params | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function selectMutiList(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/selectMutiList", | ||||||
|  |       method: "post", | ||||||
|  |       data: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function addMutiDetail(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/addMutiDetail", | ||||||
|  |       method: "post", | ||||||
|  |       data: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function selectMutiDetailList(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/selectMutiDetailList", | ||||||
|  |       method: "post", | ||||||
|  |       data: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function delectMutiDelect(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/delectMutiDelect", | ||||||
|  |       method: "post", | ||||||
|  |       data: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function getMark(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/getMark", | ||||||
|  |       method: "get", | ||||||
|  |       params: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function delectMuti(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/delectMuti", | ||||||
|  |       method: "post", | ||||||
|  |       data: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function auditMuti(query) { | ||||||
|  |   return axios( | ||||||
|  |     { | ||||||
|  |       url: "/udiwms/inout/order/muti/auditMuti", | ||||||
|  |       method: "post", | ||||||
|  |       data: query | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| @ -0,0 +1,301 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card> | ||||||
|  |       <el-form :model="filterQuery" class="query-form" size="mini" label-width="120px"v-show="showSearch"> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="11"> | ||||||
|  |             <el-form-item label="UDI:"> | ||||||
|  |               <el-input v-model="filterQuery.udiCode" placeholder="请输入UDI" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="单据号:"> | ||||||
|  |               <el-input v-model="filterQuery.orderIdFk" placeholder="请输入单据号" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="标记:"> | ||||||
|  |               <el-input v-model="filterQuery.mark" placeholder="请输入标记" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="产品DI:"> | ||||||
|  |               <el-input v-model="filterQuery.relIdFk" placeholder="请输入产品DI" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col  :span="8"> | ||||||
|  |             <el-form-item label="物资名称:"> | ||||||
|  |               <el-input v-model="filterQuery.cpmctymc" placeholder="请输入物资名称" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col  :span="8"> | ||||||
|  |             <el-form-item label="创建时间:"> | ||||||
|  |               <el-date-picker | ||||||
|  |                 style="width: 100%" | ||||||
|  |                 :picker-options="pickerOptions" | ||||||
|  |                 v-model="actDateRange" | ||||||
|  |                 type="daterange" | ||||||
|  |                 format="yyyy 年 MM 月 dd 日" | ||||||
|  |                 value-format="yyyy-MM-dd" | ||||||
|  |                 range-separator="至" | ||||||
|  |                 start-placeholder="开始日期" | ||||||
|  |                 end-placeholder="结束日期" | ||||||
|  |               > | ||||||
|  |               </el-date-picker> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  | 
 | ||||||
|  |       <div class="top-right-btn"> | ||||||
|  |         <el-button-group style="display:flex;"> | ||||||
|  |           <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button> | ||||||
|  |           <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button> | ||||||
|  |           <el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> | ||||||
|  |           <el-button type="primary" icon="el-icon-plus" @click="addOrderMuti">新增</el-button> | ||||||
|  |         </el-button-group> | ||||||
|  |       </div> | ||||||
|  |       <el-divider style="margin: 15px"></el-divider> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |       <el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail"  border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="单据号" prop="orderIdFk"></el-table-column> | ||||||
|  |         <el-table-column label="UDI码" prop="udiCode"></el-table-column> | ||||||
|  |         <el-table-column label="标记" prop="mark"></el-table-column> | ||||||
|  |         <el-table-column label="物资名称" prop="cpmctymc"></el-table-column> | ||||||
|  |         <el-table-column label="规格型号" prop="ggxh"></el-table-column> | ||||||
|  |         <el-table-column label="总使用次数" prop="totalCount"></el-table-column> | ||||||
|  |         <el-table-column label="已使用次数" prop="useCount"></el-table-column> | ||||||
|  |         <el-table-column label="剩余使用次数" prop="reCount"></el-table-column> | ||||||
|  |         <el-table-column label="批次号" prop="batchNo"></el-table-column> | ||||||
|  |         <el-table-column label="生产日期" prop="produceDate"></el-table-column> | ||||||
|  |         <el-table-column label="失效日期" prop="expireDate"></el-table-column> | ||||||
|  |         <el-table-column label="创建人" prop="createUserName"></el-table-column> | ||||||
|  |         <el-table-column label="创建时间" prop="createTime"></el-table-column> | ||||||
|  |         <el-table-column label="操作" width="120px"> | ||||||
|  |           <template slot-scope="scope"> | ||||||
|  |             <el-button type="text" size="small" @click.native.stop="editDialog(scope.row)">编辑</el-button> | ||||||
|  |             <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </el-table> | ||||||
|  | 
 | ||||||
|  |       <pagination | ||||||
|  |         v-show="total>0" | ||||||
|  |         :total="total" | ||||||
|  |         :page.sync="filterQuery.page" | ||||||
|  |         :limit.sync="filterQuery.limit" | ||||||
|  |         @pagination="handleCurrentChange" | ||||||
|  | 
 | ||||||
|  |       ></pagination> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-card class="el-card"> | ||||||
|  |       <el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="当前次数" prop="curIndex"></el-table-column> | ||||||
|  |         <el-table-column label="往来单位" prop="fromCorp" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用人" prop="createUserName" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用时间" prop="useTime" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |       </el-table> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="formMap[formName]" | ||||||
|  |       :visible.sync="orderMutiVisible" | ||||||
|  |       :before-close="close" | ||||||
|  |       width="60%" | ||||||
|  |       v-if="orderMutiVisible" | ||||||
|  |       @close='closeDialog' | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |     > | ||||||
|  |       <ioOrderMutiEditDialog | ||||||
|  |         :closeDialog="closeDialog" | ||||||
|  |         :filterQuery="inputQuery" | ||||||
|  |         :formName="formName" | ||||||
|  |       ></ioOrderMutiEditDialog> | ||||||
|  |     </el-dialog> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import ioOrderMutiEditDialog from "@/views/inout/muti/ioOrderMutiEditDialog"; | ||||||
|  | import {delectMuti, detailMuti, filterList, selectMutiDetailList, selectMutiList} from "@/api/inout/orderMuti"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "ioOrderMuti", | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       showSearch: true, | ||||||
|  |       filterQuery: { | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         relIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         cpmctymc:null, | ||||||
|  |         totalCount:null, | ||||||
|  |         useCount:null, | ||||||
|  |         status:0, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }, | ||||||
|  |       inputQuery: { | ||||||
|  |         curInv: null, | ||||||
|  |         fromCorp: "", | ||||||
|  |         targetAction: null, | ||||||
|  |         remark: null, | ||||||
|  |         updateTime: null, | ||||||
|  |       }, | ||||||
|  |       total: 0, | ||||||
|  |       loading: false, | ||||||
|  |       list: [], | ||||||
|  |       formName: 1, | ||||||
|  |       formMap: { | ||||||
|  |         1: "新增使用出库", | ||||||
|  |         2: "编辑使用出库", | ||||||
|  |       }, | ||||||
|  |       orderMutiVisible: false, | ||||||
|  |       actDateRange: [], | ||||||
|  |       detailList: [], | ||||||
|  |       pickerOptions: { | ||||||
|  |         shortcuts: [ | ||||||
|  |           { | ||||||
|  |             text: "最近一周", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             text: "最近一个月", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             text: "最近三个月", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |         ], | ||||||
|  |       }, | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     onReset(){ | ||||||
|  |       this.filterQuery={ | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         relIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         cpmctymc:null, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       } | ||||||
|  |       this.actDateRange=[] | ||||||
|  |       this.getList(); | ||||||
|  |       this.detailList=[] | ||||||
|  |     }, | ||||||
|  |     onSubmit() { | ||||||
|  |       this.filterQuery.page = 1; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     handleCurrentChange(val) { | ||||||
|  |       this.filterQuery.page = val.page; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     closeDialog(){ | ||||||
|  |       this.orderMutiVisible = false; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     hideSearch() { | ||||||
|  |       this.showSearch = !this.showSearch; | ||||||
|  |     }, | ||||||
|  |     addOrderMuti(){ | ||||||
|  |       this.inputQuery={ | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         relIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |       } | ||||||
|  |       this.formName=1; | ||||||
|  |       this.orderMutiVisible = true; | ||||||
|  |     }, | ||||||
|  |     editDialog(row){ | ||||||
|  |       this.formName=2; | ||||||
|  |       this.inputQuery=row; | ||||||
|  |       this.orderMutiVisible = true; | ||||||
|  |     }, | ||||||
|  |     getList() { | ||||||
|  |       if (this.actDateRange != null) { | ||||||
|  |         this.filterQuery.startDate = this.actDateRange[0]; | ||||||
|  |         this.filterQuery.endDate = this.actDateRange[1]; | ||||||
|  |       } else { | ||||||
|  |         this.filterQuery.startDate = null; | ||||||
|  |         this.filterQuery.endDate = null; | ||||||
|  |       } | ||||||
|  |       this.loading = true; | ||||||
|  |       selectMutiList(this.filterQuery) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.list = response.data.list || []; | ||||||
|  |           this.total = response.data.total || 0; | ||||||
|  |           this.detailList=[] | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.list = []; | ||||||
|  |           this.total = 0; | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     deleteDialog(row) { | ||||||
|  |       delectMuti(row) | ||||||
|  |         .then((response) => { | ||||||
|  |           if(response.code == 20000){ | ||||||
|  |             this.getList() | ||||||
|  |           }else{ | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     handleDetail(row) { | ||||||
|  |       selectMutiDetailList({mutiIdFk:row.id}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.detailList = response.data || []; | ||||||
|  |           this.inputQuery.useCount=this.detailList.length | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   components: {ioOrderMutiEditDialog}, | ||||||
|  |   created() { | ||||||
|  |     this.getList(); | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,273 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card> | ||||||
|  |       <el-form :model="filterQuery" class="query-form" size="mini" label-width="120px"v-show="showSearch"> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="11"> | ||||||
|  |             <el-form-item label="UDI:"> | ||||||
|  |               <el-input v-model="filterQuery.udiCode" placeholder="请输入UDI" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="单据号:"> | ||||||
|  |               <el-input v-model="filterQuery.orderIdFk" placeholder="请输入单据号" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="标记:"> | ||||||
|  |               <el-input v-model="filterQuery.mark" placeholder="请输入标记" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="产品DI:"> | ||||||
|  |               <el-input v-model="filterQuery.relIdFk" placeholder="请输入产品DI" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col  :span="8"> | ||||||
|  |             <el-form-item label="物资名称:"> | ||||||
|  |               <el-input v-model="filterQuery.cpmctymc" placeholder="请输入物资名称" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col  :span="8"> | ||||||
|  |             <el-form-item label="创建时间:"> | ||||||
|  |               <el-date-picker | ||||||
|  |                 style="width: 100%" | ||||||
|  |                 :picker-options="pickerOptions" | ||||||
|  |                 v-model="actDateRange" | ||||||
|  |                 type="daterange" | ||||||
|  |                 format="yyyy 年 MM 月 dd 日" | ||||||
|  |                 value-format="yyyy-MM-dd" | ||||||
|  |                 range-separator="至" | ||||||
|  |                 start-placeholder="开始日期" | ||||||
|  |                 end-placeholder="结束日期" | ||||||
|  |               > | ||||||
|  |               </el-date-picker> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  | 
 | ||||||
|  |       <div class="top-right-btn"> | ||||||
|  |         <el-button-group style="display:flex;"> | ||||||
|  |           <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button> | ||||||
|  |           <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button> | ||||||
|  |           <el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> | ||||||
|  | <!--          <el-button type="primary" icon="el-icon-plus" @click="addOrderMuti">新增</el-button>--> | ||||||
|  |         </el-button-group> | ||||||
|  |       </div> | ||||||
|  |       <el-divider style="margin: 15px"></el-divider> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |       <el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail"  border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="单据号" prop="orderIdFk"></el-table-column> | ||||||
|  |         <el-table-column label="UDI码" prop="udiCode"></el-table-column> | ||||||
|  |         <el-table-column label="标记" prop="mark"></el-table-column> | ||||||
|  |         <el-table-column label="物资名称" prop="cpmctymc"></el-table-column> | ||||||
|  |         <el-table-column label="规格型号" prop="ggxh"></el-table-column> | ||||||
|  |         <el-table-column label="总使用次数" prop="totalCount"></el-table-column> | ||||||
|  |         <el-table-column label="已使用次数" prop="useCount"></el-table-column> | ||||||
|  |         <el-table-column label="剩余使用次数" prop="reCount"></el-table-column> | ||||||
|  |         <el-table-column label="批次号" prop="batchNo"></el-table-column> | ||||||
|  |         <el-table-column label="生产日期" prop="produceDate"></el-table-column> | ||||||
|  |         <el-table-column label="失效日期" prop="expireDate"></el-table-column> | ||||||
|  |         <el-table-column label="创建人" prop="createUserName"></el-table-column> | ||||||
|  |         <el-table-column label="创建时间" prop="createTime"></el-table-column> | ||||||
|  |         <el-table-column label="审核人" prop="auditUserName"></el-table-column> | ||||||
|  |         <el-table-column label="审核时间" prop="auditTime"></el-table-column> | ||||||
|  |         <el-table-column label="操作" width="120px"> | ||||||
|  |           <template slot-scope="scope"> | ||||||
|  |             <el-button type="text" size="small" @click.native.stop="auditDialog(scope.row)">审核</el-button> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </el-table> | ||||||
|  | 
 | ||||||
|  |       <pagination | ||||||
|  |         v-show="total>0" | ||||||
|  |         :total="total" | ||||||
|  |         :page.sync="filterQuery.page" | ||||||
|  |         :limit.sync="filterQuery.limit" | ||||||
|  |         @pagination="handleCurrentChange" | ||||||
|  | 
 | ||||||
|  |       ></pagination> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-card class="el-card"> | ||||||
|  |       <el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="当前次数" prop="curIndex"></el-table-column> | ||||||
|  |         <el-table-column label="往来单位" prop="fromCorp" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用人" prop="createUserName" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用时间" prop="useTime" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |       </el-table> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="formName" | ||||||
|  |       :visible.sync="orderMutiVisible" | ||||||
|  |       :before-close="close" | ||||||
|  |       width="60%" | ||||||
|  |       v-if="orderMutiVisible" | ||||||
|  |       @close='closeDialog' | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |     > | ||||||
|  |       <ioOrderMutiAuditDialog | ||||||
|  |         :closeDialog="closeDialog" | ||||||
|  |         :filterQuery="inputQuery" | ||||||
|  |         :formName="formName" | ||||||
|  |       ></ioOrderMutiAuditDialog> | ||||||
|  |     </el-dialog> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import ioOrderMutiAuditDialog from "@/views/inout/muti/ioOrderMutiAuditDialog"; | ||||||
|  | import {delectMuti, detailMuti, filterList, selectMutiDetailList, selectMutiList} from "@/api/inout/orderMuti"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "ioOrderMutiAudit", | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       showSearch: true, | ||||||
|  |       filterQuery: { | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         relIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         totalCount:null, | ||||||
|  |         useCount:null, | ||||||
|  |         status:1, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }, | ||||||
|  |       inputQuery: { | ||||||
|  |         curInv: null, | ||||||
|  |         fromCorp: "", | ||||||
|  |         targetAction: null, | ||||||
|  |         remark: null, | ||||||
|  |         updateTime: null, | ||||||
|  |       }, | ||||||
|  |       total: 0, | ||||||
|  |       loading: false, | ||||||
|  |       list: [], | ||||||
|  |       formName: "审核使用出库", | ||||||
|  |       orderMutiVisible: false, | ||||||
|  |       actDateRange: [], | ||||||
|  |       detailList: [], | ||||||
|  |       pickerOptions: { | ||||||
|  |         shortcuts: [ | ||||||
|  |           { | ||||||
|  |             text: "最近一周", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             text: "最近一个月", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             text: "最近三个月", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |         ], | ||||||
|  |       }, | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     onReset(){ | ||||||
|  |       this.filterQuery={ | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         relIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         cpmctymc:null, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       } | ||||||
|  |       this.actDateRange=[] | ||||||
|  |       this.getList(); | ||||||
|  |       this.detailList=[] | ||||||
|  |     }, | ||||||
|  |     onSubmit() { | ||||||
|  |       this.filterQuery.page = 1; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     handleCurrentChange(val) { | ||||||
|  |       this.filterQuery.page = val.page; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     closeDialog(){ | ||||||
|  |       this.orderMutiVisible = false; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     hideSearch() { | ||||||
|  |       this.showSearch = !this.showSearch; | ||||||
|  |     }, | ||||||
|  |     auditDialog(row){ | ||||||
|  |       this.inputQuery=row; | ||||||
|  |       this.orderMutiVisible = true; | ||||||
|  |     }, | ||||||
|  |     getList() { | ||||||
|  |       this.loading = true; | ||||||
|  |       if (this.actDateRange != null) { | ||||||
|  |         this.filterQuery.startDate = this.actDateRange[0]; | ||||||
|  |         this.filterQuery.endDate = this.actDateRange[1]; | ||||||
|  |       } else { | ||||||
|  |         this.filterQuery.startDate = null; | ||||||
|  |         this.filterQuery.endDate = null; | ||||||
|  |       } | ||||||
|  |       selectMutiList(this.filterQuery) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.list = response.data.list || []; | ||||||
|  |           this.total = response.data.total || 0; | ||||||
|  |           this.detailList=[] | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.list = []; | ||||||
|  |           this.total = 0; | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     handleDetail(row) { | ||||||
|  |       selectMutiDetailList({mutiIdFk:row.id}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.detailList = response.data || []; | ||||||
|  |           this.inputQuery.useCount=this.detailList.length | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   components: {ioOrderMutiAuditDialog}, | ||||||
|  |   created() { | ||||||
|  |     this.getList(); | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,214 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card style="margin: 5px;"> | ||||||
|  |       <el-form :model="inputQuery" label-width="110px" style="margin-bottom: -15px"> | ||||||
|  |         <el-button-group style="display: flex; margin: 0px 0 15px 75%; height: 35px"> | ||||||
|  |           <el-button size="mini" type="primary" @click.native="saveOrder(2)">审核通过</el-button> | ||||||
|  |           <el-button size="mini" type="primary" @click.native="saveOrder(3)">审核拒绝</el-button> | ||||||
|  |         </el-button-group> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="17"> | ||||||
|  |             <el-form-item label="UDI:"> | ||||||
|  |               <el-input v-model="inputQuery.udiCode" :disabled="detailList.length>0" placeholder="请输入UDI" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="单据号:"> | ||||||
|  |               <el-input v-model="inputQuery.orderIdFk" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="标记:"> | ||||||
|  |               <el-input v-model="inputQuery.mark" :disabled="true" placeholder="请输入标记" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="物资名称:"> | ||||||
|  |               <el-input v-model="inputQuery.cpmctymc" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="规格型号:"> | ||||||
|  |               <el-input v-model="inputQuery.ggxh" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="总使用次数:"> | ||||||
|  |               <el-input v-model="inputQuery.totalCount" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="已使用次数:"> | ||||||
|  |               <el-input v-model="inputQuery.useCount" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-card style="margin: 5px;"> | ||||||
|  |       <el-table :data="detailList" style="width: 100%" border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="当前次数" prop="curIndex"></el-table-column> | ||||||
|  |         <el-table-column label="往来单位" prop="fromCorp" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用人" prop="createUserName" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用时间" prop="useTime" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |       </el-table> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="tableName" | ||||||
|  |       :visible.sync="orderMutiDelectVisible" | ||||||
|  |       width="60%" | ||||||
|  |       :append-to-body="true" | ||||||
|  |       v-if="orderMutiDelectVisible" | ||||||
|  |       @close='closeDialog' | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |     > | ||||||
|  |       <ioOrderMutiEditSelectDialog | ||||||
|  |         :closeDialogDelect="closeDialogDelect" | ||||||
|  |         :filterQuery="inputQuery" | ||||||
|  |       ></ioOrderMutiEditSelectDialog> | ||||||
|  |     </el-dialog> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { | ||||||
|  |   addMuti, | ||||||
|  |   addMutiDetail, | ||||||
|  |   addOrderMuti, auditMuti, | ||||||
|  |   checkUdi, delectMutiDelect, | ||||||
|  |   filterMutiList, getMark, | ||||||
|  |   selectMutiDetailList, | ||||||
|  |   updateMuti, | ||||||
|  |   updateOrderMuti | ||||||
|  | } from "@/api/inout/orderMuti"; | ||||||
|  | import ioOrderMutiEditSelectDialog from "@/views/inout/muti/ioOrderMutiEditSelectDialog" | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "ioOrderMutiAuditDialog", | ||||||
|  |   props: { | ||||||
|  |     closeDialog: { | ||||||
|  |       type: Function, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     formName: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     filterQuery: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       inputQuery: { | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         cpmctymc: null, | ||||||
|  |         ggxh: null, | ||||||
|  |         totalCount: null, | ||||||
|  |         useCount: null, | ||||||
|  |         supId: null, | ||||||
|  |       }, | ||||||
|  |       pId: null, | ||||||
|  |       orderMutiDelectVisible: false, | ||||||
|  |       tableName: '使用记录选择', | ||||||
|  |       invList: [], | ||||||
|  |       fromInvOptions: [], | ||||||
|  |       busTypes: [], | ||||||
|  |       detailList: [], | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     addFromCorp() { | ||||||
|  |       var query = { | ||||||
|  |         mutiIdFk: this.pId, | ||||||
|  |         fromCorp: this.inputQuery.fromCorp | ||||||
|  |       } | ||||||
|  |       addMutiDetail(query).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.selectMutiDetailList(); | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.$message.error("添加失败"); | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     selectMutiDetailList() { | ||||||
|  |       selectMutiDetailList({mutiIdFk:this.pId}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.detailList = response.data || []; | ||||||
|  |           this.inputQuery.useCount=this.detailList.length | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     filterMutiList() { | ||||||
|  |       filterMutiList({id: this.pId}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.inputQuery.cpmctymc = response.data.data.cpmctymc | ||||||
|  |           this.inputQuery.mark = response.data.data.mark | ||||||
|  |           this.inputQuery.ggxh = response.data.data.ggxh | ||||||
|  |           this.inputQuery.totalCount = response.data.data.totalCount | ||||||
|  |           this.inputQuery.useCount = response.data.data.useCount | ||||||
|  |           this.detailList = response.data.detailList | ||||||
|  |           this.inputQuery.useCount=this.detailList.length | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     closeDialogDelect(row){ | ||||||
|  |       this.orderMutiDelectVisible=false; | ||||||
|  |       this.pId=row.id; | ||||||
|  |       this.filterMutiList(); | ||||||
|  |     }, | ||||||
|  |     saveOrder(status){ | ||||||
|  |       var query={ | ||||||
|  |         id:this.pId, | ||||||
|  |         status:status | ||||||
|  |       } | ||||||
|  |       auditMuti(query).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.closeDialog() | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     deleteDialog(row){ | ||||||
|  |       delectMutiDelect({id:row.id}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.selectMutiDetailList() | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   components: {ioOrderMutiEditSelectDialog}, | ||||||
|  |   created() { | ||||||
|  |       this.inputQuery = this.filterQuery | ||||||
|  |       this.pId=this.inputQuery.id | ||||||
|  |       this.selectMutiDetailList() | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,333 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card style="margin: 5px;"> | ||||||
|  |       <el-form :model="inputQuery" label-width="110px" style="margin-bottom: -15px"> | ||||||
|  |         <el-button-group style="display: flex; margin: 0px 0 15px 75%; height: 35px"> | ||||||
|  |           <el-button size="mini" type="primary" @click.native="saveOrder(0)">草稿保存</el-button> | ||||||
|  |           <el-button size="mini" type="primary" @click.native="saveOrder(1)">立即提交</el-button> | ||||||
|  |         </el-button-group> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="17"> | ||||||
|  |             <el-form-item label="UDI:"> | ||||||
|  |               <el-input v-model="inputQuery.udiCode" :disabled="detailList.length>0" placeholder="请输入UDI" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="2"> | ||||||
|  |             <el-button type="primary" size="mini" @click="addCode" :disabled="detailList.length>0" style="margin-left: 15px">添加</el-button> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="单据号:"> | ||||||
|  |               <el-input v-model="inputQuery.orderIdFk" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="标记:"> | ||||||
|  |               <el-input v-model="inputQuery.mark" :disabled="this.formName==2" placeholder="请输入标记" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="物资名称:"> | ||||||
|  |               <el-input v-model="inputQuery.cpmctymc" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="规格型号:"> | ||||||
|  |               <el-input v-model="inputQuery.ggxh" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="总使用次数:"> | ||||||
|  |               <el-input v-model="inputQuery.totalCount" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="已使用次数:"> | ||||||
|  |               <el-input v-model="inputQuery.useCount" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="17"> | ||||||
|  |             <el-form-item label="往来单位:"> | ||||||
|  |               <el-input v-model="inputQuery.fromCorp" :disabled="this.inputQuery.udiCode==null" | ||||||
|  |                         placeholder="请输入往来单位" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="2"> | ||||||
|  |             <el-button type="primary" size="mini" :disabled="this.inputQuery.udiCode==null" @click="addFromCorp" | ||||||
|  |                        style="margin-left: 15px">添加 | ||||||
|  |             </el-button> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-card style="margin: 5px;"> | ||||||
|  |       <el-table :data="detailList" style="width: 100%" border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="当前次数" prop="curIndex"></el-table-column> | ||||||
|  |         <el-table-column label="往来单位" prop="fromCorp" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用人" prop="createUserName" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用时间" prop="useTime" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="操作" width="120px"> | ||||||
|  |           <template slot-scope="scope"> | ||||||
|  |             <el-button type="text" size="small" v-if="scope.row.status!=1" @click.native.stop="deleteDialog(scope.row)">删除</el-button> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </el-table> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="tableName" | ||||||
|  |       :visible.sync="orderMutiDelectVisible" | ||||||
|  |       width="60%" | ||||||
|  |       :append-to-body="true" | ||||||
|  |       v-if="orderMutiDelectVisible" | ||||||
|  |       @close='closeDialog' | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |     > | ||||||
|  |       <ioOrderMutiEditSelectDialog | ||||||
|  |         :closeDialogDelect="closeDialogDelect" | ||||||
|  |         :filterQuery="inputQuery" | ||||||
|  |       ></ioOrderMutiEditSelectDialog> | ||||||
|  |     </el-dialog> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { | ||||||
|  |   addMuti, | ||||||
|  |   addMutiDetail, | ||||||
|  |   addOrderMuti, | ||||||
|  |   checkUdi, delectMutiDelect, | ||||||
|  |   filterMutiList, getMark, | ||||||
|  |   selectMutiDetailList, | ||||||
|  |   updateMuti, | ||||||
|  |   updateOrderMuti | ||||||
|  | } from "@/api/inout/orderMuti"; | ||||||
|  | import ioOrderMutiEditSelectDialog from "@/views/inout/muti/ioOrderMutiEditSelectDialog" | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "ioOrderMutiEditDialog", | ||||||
|  |   props: { | ||||||
|  |     closeDialog: { | ||||||
|  |       type: Function, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     formName: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     filterQuery: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       inputQuery: { | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         cpmctymc: null, | ||||||
|  |         ggxh: null, | ||||||
|  |         totalCount: null, | ||||||
|  |         useCount: null, | ||||||
|  |         supId: null, | ||||||
|  |       }, | ||||||
|  |       pId: null, | ||||||
|  |       orderMutiDelectVisible: false, | ||||||
|  |       tableName: '使用记录选择', | ||||||
|  |       invList: [], | ||||||
|  |       fromInvOptions: [], | ||||||
|  |       busTypes: [], | ||||||
|  |       detailList: [], | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     addCode() { | ||||||
|  |       checkUdi(this.inputQuery).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.pId = response.data; | ||||||
|  |           filterMutiList({id: this.pId}).then((response) => { | ||||||
|  |             if (response.code == 20000) { | ||||||
|  |               this.inputQuery.cpmctymc = response.data.data.cpmctymc | ||||||
|  |               this.inputQuery.ggxh = response.data.data.ggxh | ||||||
|  |               this.inputQuery.totalCount = response.data.data.totalCount | ||||||
|  |               this.inputQuery.useCount = response.data.data.useCount | ||||||
|  |             } else { | ||||||
|  |               this.$message.error(response.message); | ||||||
|  |             } | ||||||
|  |           }).catch(() => { | ||||||
|  |             this.$message.error("添加失败"); | ||||||
|  |           }); | ||||||
|  |         } else if (response.code == 999) { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } else if (response.code == 888) { | ||||||
|  |           this.$confirm("是否要首次使用", "提示", { | ||||||
|  |             confirmButtonText: "确定", | ||||||
|  |             cancelButtonText: "取消", | ||||||
|  |             type: "warning", | ||||||
|  |           }) | ||||||
|  |             .then(() => { | ||||||
|  |               addOrderMuti(this.inputQuery).then((response) => { | ||||||
|  |                 if (response.code == 20000) { | ||||||
|  |                   this.pId = response.data; | ||||||
|  |                   filterMutiList({id: this.pId}).then((response) => { | ||||||
|  |                     if (response.code == 20000) { | ||||||
|  |                       this.inputQuery.cpmctymc = response.data.data.cpmctymc | ||||||
|  |                       this.inputQuery.ggxh = response.data.data.ggxh | ||||||
|  |                       this.inputQuery.totalCount = response.data.data.totalCount | ||||||
|  |                       this.inputQuery.useCount = response.data.data.useCount | ||||||
|  |                     } else { | ||||||
|  |                       this.$message.error(response.message); | ||||||
|  |                     } | ||||||
|  |                   }).catch(() => { | ||||||
|  |                     this.$message.error("添加失败"); | ||||||
|  |                   }); | ||||||
|  |                 } else { | ||||||
|  |                   this.$message.error(response.message); | ||||||
|  |                 } | ||||||
|  |               }).catch(() => { | ||||||
|  |                 this.$message.error("添加失败"); | ||||||
|  |               }); | ||||||
|  |             }) | ||||||
|  |             .catch(() => { | ||||||
|  |               this.orderMutiDelectVisible = true; | ||||||
|  |             }); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |       }).catch(() => { | ||||||
|  |         this.$message.error("添加失败"); | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     submitInv() { | ||||||
|  |       if (this.formName == 1) { | ||||||
|  |         addMuti(this.inputQuery).then((response) => { | ||||||
|  |           if (response.code == 20000) { | ||||||
|  |             this.closeDialog(); | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |         }) | ||||||
|  |           .catch(() => { | ||||||
|  |             this.$message.error("添加失败"); | ||||||
|  |           }); | ||||||
|  |       } else { | ||||||
|  |         updateMuti(this.inputQuery).then((response) => { | ||||||
|  |           if (response.code == 20000) { | ||||||
|  |             this.closeDialog(); | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |         }) | ||||||
|  |           .catch(() => { | ||||||
|  |             this.$message.error("添加失败"); | ||||||
|  |           }); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     addFromCorp() { | ||||||
|  |       var query = { | ||||||
|  |         mutiIdFk: this.pId, | ||||||
|  |         fromCorp: this.inputQuery.fromCorp | ||||||
|  |       } | ||||||
|  |       addMutiDetail(query).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.selectMutiDetailList(); | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.$message.error("添加失败"); | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     selectMutiDetailList() { | ||||||
|  |       selectMutiDetailList({mutiIdFk:this.pId}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.detailList = response.data || []; | ||||||
|  |           this.inputQuery.useCount=this.detailList.length | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     getMark(){ | ||||||
|  |       getMark().then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.inputQuery.mark = response.data; | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     filterMutiList() { | ||||||
|  |       filterMutiList({id: this.pId}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.inputQuery.cpmctymc = response.data.data.cpmctymc | ||||||
|  |           this.inputQuery.mark = response.data.data.mark | ||||||
|  |           this.inputQuery.ggxh = response.data.data.ggxh | ||||||
|  |           this.inputQuery.totalCount = response.data.data.totalCount | ||||||
|  |           this.inputQuery.useCount = response.data.data.useCount | ||||||
|  |           this.detailList = response.data.detailList | ||||||
|  |           this.inputQuery.useCount=this.detailList.length | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     closeDialogDelect(row){ | ||||||
|  |       this.orderMutiDelectVisible=false; | ||||||
|  |       this.pId=row.id; | ||||||
|  |       this.filterMutiList(); | ||||||
|  |     }, | ||||||
|  |     saveOrder(status){ | ||||||
|  |       var query={ | ||||||
|  |         id:this.pId, | ||||||
|  |         mark: this.inputQuery.mark, | ||||||
|  |         useCount:this.inputQuery.useCount, | ||||||
|  |         totalCount: this.inputQuery.totalCount, | ||||||
|  |         status:status | ||||||
|  |       } | ||||||
|  |       updateOrderMuti(query).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |             this.closeDialog() | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     deleteDialog(row){ | ||||||
|  |       delectMutiDelect({id:row.id}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.selectMutiDetailList() | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   components: {ioOrderMutiEditSelectDialog}, | ||||||
|  |   created() { | ||||||
|  |     if(this.formName==2){ | ||||||
|  |       this.inputQuery = this.filterQuery | ||||||
|  |       this.pId=this.inputQuery.id | ||||||
|  |       this.selectMutiDetailList() | ||||||
|  |     }else{ | ||||||
|  |       this.getMark(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,123 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card> | ||||||
|  |       <el-form :model="inputQuery" label-width="120px"> | ||||||
|  | 
 | ||||||
|  |       </el-form> | ||||||
|  | 
 | ||||||
|  |       <el-card style="margin: 5px;"> | ||||||
|  |         <el-table :data="detailList" style="width: 100%" border highlight-current-row> | ||||||
|  |           <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |           <el-table-column label="单据号" prop="orderIdFk"></el-table-column> | ||||||
|  |           <el-table-column label="UDI码" prop="udiCode"></el-table-column> | ||||||
|  |           <el-table-column label="标记" prop="mark"></el-table-column> | ||||||
|  |           <el-table-column label="物资名称" prop="cpmctymc"></el-table-column> | ||||||
|  |           <el-table-column label="规格型号" prop="ggxh"></el-table-column> | ||||||
|  |           <el-table-column label="总使用次数" prop="totalCount"></el-table-column> | ||||||
|  |           <el-table-column label="已使用次数" prop="useCount"></el-table-column> | ||||||
|  |           <el-table-column label="剩余使用次数" prop="reCount"></el-table-column> | ||||||
|  |           <el-table-column label="批次号" prop="batchNo"></el-table-column> | ||||||
|  |           <el-table-column label="生产日期" prop="produceDate"></el-table-column> | ||||||
|  |           <el-table-column label="失效日期" prop="expireDate"></el-table-column> | ||||||
|  |           <el-table-column label="创建人" prop="createUserName"></el-table-column> | ||||||
|  |           <el-table-column label="创建时间" prop="createTime"></el-table-column> | ||||||
|  |           <el-table-column label="操作" width="120px"> | ||||||
|  |             <template slot-scope="scope"> | ||||||
|  |               <el-button type="text" size="small" @click.native="selected(scope.row)">选入</el-button> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |         </el-table> | ||||||
|  |       </el-card> | ||||||
|  | 
 | ||||||
|  |     </el-card> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import {getLocalJoinByUser} from "@/api/basic/busType"; | ||||||
|  | import {filterSubAll} from "@/api/system/invSubWarehouse"; | ||||||
|  | import {selectCorpList} from "@/api/basic/basicUnitMaintain" | ||||||
|  | import {addMuti, filterMutiDetailList, updateMuti} from "@/api/inout/orderMuti"; | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "ioOrderMutiEditSelectDialog", | ||||||
|  |   props: { | ||||||
|  |     closeDialogDelect: { | ||||||
|  |       type: Function, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     filterQuery: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       detailList: [], | ||||||
|  |       inputQuery: { | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         cpmctymc: null, | ||||||
|  |         ggxh: null, | ||||||
|  |         totalCount: null, | ||||||
|  |         useCount: null, | ||||||
|  |         supId: null, | ||||||
|  |       }, | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  | 
 | ||||||
|  |     selected(row){ | ||||||
|  |       this.closeDialogDelect(row); | ||||||
|  |     }, | ||||||
|  |     getList() { | ||||||
|  |       this.inputQuery.mark="" | ||||||
|  |       filterMutiDetailList(this.inputQuery).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |            this.detailList=response.data; | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     submitInv() { | ||||||
|  |       if (this.formName == 1) { | ||||||
|  |         addMuti(this.inputQuery).then((response) => { | ||||||
|  |           if (response.code == 20000) { | ||||||
|  |             this.closeDialog(); | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |         }) | ||||||
|  |           .catch(() => { | ||||||
|  |             this.$message.error("添加失败"); | ||||||
|  |           }); | ||||||
|  |       } else { | ||||||
|  |         updateMuti(this.inputQuery).then((response) => { | ||||||
|  |           if (response.code == 20000) { | ||||||
|  |             this.closeDialogDelect(); | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |         }) | ||||||
|  |           .catch(() => { | ||||||
|  |             this.$message.error("添加失败"); | ||||||
|  |           }); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |   }, | ||||||
|  |   components: {}, | ||||||
|  |   created() { | ||||||
|  |     this.inputQuery = this.filterQuery | ||||||
|  |     this.getList(); | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,286 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card> | ||||||
|  |       <el-form :model="filterQuery" class="query-form" size="mini" label-width="120px"v-show="showSearch"> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="11"> | ||||||
|  |             <el-form-item label="UDI:"> | ||||||
|  |               <el-input v-model="filterQuery.udiCode" placeholder="请输入UDI" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="单据号:"> | ||||||
|  |               <el-input v-model="filterQuery.orderIdFk" placeholder="请输入单据号" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="标记:"> | ||||||
|  |               <el-input v-model="filterQuery.mark" placeholder="请输入标记" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="产品DI:"> | ||||||
|  |               <el-input v-model="filterQuery.relIdFk" placeholder="请输入产品DI" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col  :span="8"> | ||||||
|  |             <el-form-item label="物资名称:"> | ||||||
|  |               <el-input v-model="filterQuery.cpmctymc" placeholder="请输入物资名称" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col  :span="8"> | ||||||
|  |             <el-form-item label="创建时间:"> | ||||||
|  |               <el-date-picker | ||||||
|  |                 style="width: 100%" | ||||||
|  |                 :picker-options="pickerOptions" | ||||||
|  |                 v-model="actDateRange" | ||||||
|  |                 type="daterange" | ||||||
|  |                 format="yyyy 年 MM 月 dd 日" | ||||||
|  |                 value-format="yyyy-MM-dd" | ||||||
|  |                 range-separator="至" | ||||||
|  |                 start-placeholder="开始日期" | ||||||
|  |                 end-placeholder="结束日期" | ||||||
|  |               > | ||||||
|  |               </el-date-picker> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  | 
 | ||||||
|  |       <div class="top-right-btn"> | ||||||
|  |         <el-button-group style="display:flex;"> | ||||||
|  |           <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button> | ||||||
|  |           <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button> | ||||||
|  |           <el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> | ||||||
|  |           <!--          <el-button type="primary" icon="el-icon-plus" @click="addOrderMuti">新增</el-button>--> | ||||||
|  |         </el-button-group> | ||||||
|  |       </div> | ||||||
|  |       <el-divider style="margin: 15px"></el-divider> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |       <el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail"  border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="单据号" prop="orderIdFk"></el-table-column> | ||||||
|  |         <el-table-column label="UDI码" prop="udiCode"></el-table-column> | ||||||
|  |         <el-table-column label="标记" prop="mark"></el-table-column> | ||||||
|  |         <el-table-column label="物资名称" prop="cpmctymc"></el-table-column> | ||||||
|  |         <el-table-column label="规格型号" prop="ggxh"></el-table-column> | ||||||
|  |         <el-table-column label="总使用次数" prop="totalCount"></el-table-column> | ||||||
|  |         <el-table-column label="已使用次数" prop="useCount"></el-table-column> | ||||||
|  |         <el-table-column label="剩余使用次数" prop="reCount"></el-table-column> | ||||||
|  |         <el-table-column label="批次号" prop="batchNo"></el-table-column> | ||||||
|  |         <el-table-column label="生产日期" prop="produceDate"></el-table-column> | ||||||
|  |         <el-table-column label="失效日期" prop="expireDate"></el-table-column> | ||||||
|  |         <el-table-column label="创建人" prop="createUserName"></el-table-column> | ||||||
|  |         <el-table-column label="创建时间" prop="createTime"></el-table-column> | ||||||
|  |         <el-table-column label="审核人" prop="auditUserName"></el-table-column> | ||||||
|  |         <el-table-column label="审核时间" prop="auditTime"></el-table-column> | ||||||
|  |         <el-table-column label="操作" width="120px"> | ||||||
|  |           <template slot-scope="scope"> | ||||||
|  |             <el-button type="text" size="small" @click.native.stop="datilDialog(scope.row)">详情</el-button> | ||||||
|  |             <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </el-table> | ||||||
|  | 
 | ||||||
|  |       <pagination | ||||||
|  |         v-show="total>0" | ||||||
|  |         :total="total" | ||||||
|  |         :page.sync="filterQuery.page" | ||||||
|  |         :limit.sync="filterQuery.limit" | ||||||
|  |         @pagination="handleCurrentChange" | ||||||
|  | 
 | ||||||
|  |       ></pagination> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-card class="el-card"> | ||||||
|  |       <el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="当前次数" prop="curIndex"></el-table-column> | ||||||
|  |         <el-table-column label="往来单位" prop="fromCorp" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用人" prop="createUserName" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用时间" prop="useTime" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |       </el-table> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="formName" | ||||||
|  |       :visible.sync="orderMutiVisible" | ||||||
|  |       :before-close="close" | ||||||
|  |       width="60%" | ||||||
|  |       v-if="orderMutiVisible" | ||||||
|  |       @close='closeDialog' | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |     > | ||||||
|  |       <ioOrderMutiSelectDialog | ||||||
|  |         :closeDialog="closeDialog" | ||||||
|  |         :filterQuery="inputQuery" | ||||||
|  |         :formName="formName" | ||||||
|  |       ></ioOrderMutiSelectDialog> | ||||||
|  |     </el-dialog> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import ioOrderMutiSelectDialog from "@/views/inout/muti/ioOrderMutiSelectDialog"; | ||||||
|  | import {delectMuti, detailMuti, filterList, selectMutiDetailList, selectMutiList} from "@/api/inout/orderMuti"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "ioOrderMutiSelect", | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       showSearch: true, | ||||||
|  |       filterQuery: { | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         relIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         totalCount:null, | ||||||
|  |         useCount:null, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }, | ||||||
|  |       inputQuery: { | ||||||
|  |         curInv: null, | ||||||
|  |         fromCorp: "", | ||||||
|  |         targetAction: null, | ||||||
|  |         remark: null, | ||||||
|  |         updateTime: null, | ||||||
|  |       }, | ||||||
|  |       total: 0, | ||||||
|  |       loading: false, | ||||||
|  |       list: [], | ||||||
|  |       formName: "审核使用出库", | ||||||
|  |       orderMutiVisible: false, | ||||||
|  |       actDateRange: [], | ||||||
|  |       detailList: [], | ||||||
|  |       pickerOptions: { | ||||||
|  |         shortcuts: [ | ||||||
|  |           { | ||||||
|  |             text: "最近一周", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             text: "最近一个月", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             text: "最近三个月", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |         ], | ||||||
|  |       }, | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     onReset(){ | ||||||
|  |       this.filterQuery={ | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         relIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         cpmctymc:null, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       } | ||||||
|  |       this.actDateRange=[] | ||||||
|  |       this.getList(); | ||||||
|  |       this.detailList=[] | ||||||
|  |     }, | ||||||
|  |     onSubmit() { | ||||||
|  |       this.filterQuery.page = 1; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     handleCurrentChange(val) { | ||||||
|  |       this.filterQuery.page = val.page; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     closeDialog(){ | ||||||
|  |       this.orderMutiVisible = false; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     hideSearch() { | ||||||
|  |       this.showSearch = !this.showSearch; | ||||||
|  |     }, | ||||||
|  |     datilDialog(row){ | ||||||
|  |       this.inputQuery=row; | ||||||
|  |       this.orderMutiVisible = true; | ||||||
|  |     }, | ||||||
|  |     getList() { | ||||||
|  |       this.loading = true; | ||||||
|  |       if (this.actDateRange != null) { | ||||||
|  |         this.filterQuery.startDate = this.actDateRange[0]; | ||||||
|  |         this.filterQuery.endDate = this.actDateRange[1]; | ||||||
|  |       } else { | ||||||
|  |         this.filterQuery.startDate = null; | ||||||
|  |         this.filterQuery.endDate = null; | ||||||
|  |       } | ||||||
|  |       selectMutiList(this.filterQuery) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.list = response.data.list || []; | ||||||
|  |           this.total = response.data.total || 0; | ||||||
|  |           this.detailList=[] | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.list = []; | ||||||
|  |           this.total = 0; | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     handleDetail(row) { | ||||||
|  |       selectMutiDetailList({mutiIdFk:row.id}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.detailList = response.data || []; | ||||||
|  |           this.inputQuery.useCount=this.detailList.length | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     deleteDialog(row) { | ||||||
|  |       delectMuti(row) | ||||||
|  |         .then((response) => { | ||||||
|  |           if(response.code == 20000){ | ||||||
|  |             this.getList() | ||||||
|  |           }else{ | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   components: {ioOrderMutiSelectDialog}, | ||||||
|  |   created() { | ||||||
|  |     this.getList(); | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,210 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card style="margin: 5px;"> | ||||||
|  |       <el-form :model="inputQuery" label-width="110px" style="margin-bottom: -15px"> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="17"> | ||||||
|  |             <el-form-item label="UDI:"> | ||||||
|  |               <el-input v-model="inputQuery.udiCode" :disabled="detailList.length>0" placeholder="请输入UDI" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="单据号:"> | ||||||
|  |               <el-input v-model="inputQuery.orderIdFk" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="标记:"> | ||||||
|  |               <el-input v-model="inputQuery.mark" :disabled="true" placeholder="请输入标记" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="物资名称:"> | ||||||
|  |               <el-input v-model="inputQuery.cpmctymc" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="规格型号:"> | ||||||
|  |               <el-input v-model="inputQuery.ggxh" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="总使用次数:"> | ||||||
|  |               <el-input v-model="inputQuery.totalCount" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="已使用次数:"> | ||||||
|  |               <el-input v-model="inputQuery.useCount" :disabled="true" clearable></el-input> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-card style="margin: 5px;"> | ||||||
|  |       <el-table :data="detailList" style="width: 100%" border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="当前次数" prop="curIndex"></el-table-column> | ||||||
|  |         <el-table-column label="往来单位" prop="fromCorp" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用人" prop="createUserName" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |         <el-table-column label="使用时间" prop="useTime" show-overflow-tooltip="true"></el-table-column> | ||||||
|  |       </el-table> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="tableName" | ||||||
|  |       :visible.sync="orderMutiDelectVisible" | ||||||
|  |       width="60%" | ||||||
|  |       :append-to-body="true" | ||||||
|  |       v-if="orderMutiDelectVisible" | ||||||
|  |       @close='closeDialog' | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |     > | ||||||
|  |       <ioOrderMutiEditSelectDialog | ||||||
|  |         :closeDialogDelect="closeDialogDelect" | ||||||
|  |         :filterQuery="inputQuery" | ||||||
|  |       ></ioOrderMutiEditSelectDialog> | ||||||
|  |     </el-dialog> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { | ||||||
|  |   addMuti, | ||||||
|  |   addMutiDetail, | ||||||
|  |   addOrderMuti, auditMuti, | ||||||
|  |   checkUdi, delectMutiDelect, | ||||||
|  |   filterMutiList, getMark, | ||||||
|  |   selectMutiDetailList, | ||||||
|  |   updateMuti, | ||||||
|  |   updateOrderMuti | ||||||
|  | } from "@/api/inout/orderMuti"; | ||||||
|  | import ioOrderMutiEditSelectDialog from "@/views/inout/muti/ioOrderMutiEditSelectDialog" | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "ioOrderMutiAuditDialog", | ||||||
|  |   props: { | ||||||
|  |     closeDialog: { | ||||||
|  |       type: Function, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     formName: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     filterQuery: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       inputQuery: { | ||||||
|  |         udiCode: null, | ||||||
|  |         orderIdFk: null, | ||||||
|  |         mark: null, | ||||||
|  |         cpmctymc: null, | ||||||
|  |         ggxh: null, | ||||||
|  |         totalCount: null, | ||||||
|  |         useCount: null, | ||||||
|  |         supId: null, | ||||||
|  |       }, | ||||||
|  |       pId: null, | ||||||
|  |       orderMutiDelectVisible: false, | ||||||
|  |       tableName: '使用记录选择', | ||||||
|  |       invList: [], | ||||||
|  |       fromInvOptions: [], | ||||||
|  |       busTypes: [], | ||||||
|  |       detailList: [], | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     addFromCorp() { | ||||||
|  |       var query = { | ||||||
|  |         mutiIdFk: this.pId, | ||||||
|  |         fromCorp: this.inputQuery.fromCorp | ||||||
|  |       } | ||||||
|  |       addMutiDetail(query).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.selectMutiDetailList(); | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.$message.error("添加失败"); | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     selectMutiDetailList() { | ||||||
|  |       selectMutiDetailList({mutiIdFk:this.pId}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.detailList = response.data || []; | ||||||
|  |           this.inputQuery.useCount=this.detailList.length | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     filterMutiList() { | ||||||
|  |       filterMutiList({id: this.pId}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.inputQuery.cpmctymc = response.data.data.cpmctymc | ||||||
|  |           this.inputQuery.mark = response.data.data.mark | ||||||
|  |           this.inputQuery.ggxh = response.data.data.ggxh | ||||||
|  |           this.inputQuery.totalCount = response.data.data.totalCount | ||||||
|  |           this.inputQuery.useCount = response.data.data.useCount | ||||||
|  |           this.detailList = response.data.detailList | ||||||
|  |           this.inputQuery.useCount=this.detailList.length | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     closeDialogDelect(row){ | ||||||
|  |       this.orderMutiDelectVisible=false; | ||||||
|  |       this.pId=row.id; | ||||||
|  |       this.filterMutiList(); | ||||||
|  |     }, | ||||||
|  |     saveOrder(status){ | ||||||
|  |       var query={ | ||||||
|  |         id:this.pId, | ||||||
|  |         status:status | ||||||
|  |       } | ||||||
|  |       auditMuti(query).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.closeDialog() | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     deleteDialog(row){ | ||||||
|  |       delectMutiDelect({id:row.id}).then((response) => { | ||||||
|  |         if (response.code == 20000) { | ||||||
|  |           this.selectMutiDetailList() | ||||||
|  |         } else { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   components: {ioOrderMutiEditSelectDialog}, | ||||||
|  |   created() { | ||||||
|  |     this.inputQuery = this.filterQuery | ||||||
|  |     this.pId=this.inputQuery.id | ||||||
|  |     this.selectMutiDetailList() | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,173 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card> | ||||||
|  |       <el-form :model="filterQuery" class="query-form" size="mini" label-width="120px" :inline="true"> | ||||||
|  |         <el-form-item label="当前仓库:"> | ||||||
|  |           <el-input v-model="filterQuery.curInv" placeholder="请输入配送企业名称" clearable></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item> | ||||||
|  |           <el-button-group> | ||||||
|  |             <el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> | ||||||
|  |             <el-button type="primary" icon="el-icon-plus" @click="addOrderMuti">新增</el-button> | ||||||
|  |           </el-button-group> | ||||||
|  |         </el-form-item> | ||||||
|  |       </el-form> | ||||||
|  |       <el-table v-loading="loading" :data="list" style="width: 100%"  border highlight-current-row> | ||||||
|  |         <el-table-column label="序号" type="index" width="60"></el-table-column> | ||||||
|  |         <el-table-column label="当前仓库" prop="invName"></el-table-column> | ||||||
|  |         <el-table-column label="生成出库单默认往来单位" prop="fromCorpName"></el-table-column> | ||||||
|  |         <el-table-column label="生成出库单默认单据类型" prop="targetActionName"></el-table-column> | ||||||
|  |         <el-table-column label="是否个人使用" prop="checkUse"> | ||||||
|  |           <template slot-scope="scope"> | ||||||
|  |             <span>{{ checkUseMap[scope.row.checkUse] }}</span> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |         <el-table-column label="备注" prop="remark"></el-table-column> | ||||||
|  |         <el-table-column label="操作" width="120px"> | ||||||
|  |           <template slot-scope="scope"> | ||||||
|  |             <el-button type="text" size="small" @click.native="editDialog(scope.row)">编辑</el-button> | ||||||
|  |             <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </el-table> | ||||||
|  | 
 | ||||||
|  |       <pagination | ||||||
|  |         v-show="total>0" | ||||||
|  |         :total="total" | ||||||
|  |         :page.sync="filterQuery.page" | ||||||
|  |         :limit.sync="filterQuery.limit" | ||||||
|  |         @pagination="handleCurrentChange" | ||||||
|  | 
 | ||||||
|  |       ></pagination> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="formMap[formName]" | ||||||
|  |       :visible.sync="orderMutiSetVisible" | ||||||
|  |       :before-close="close" | ||||||
|  |       width="40%" | ||||||
|  |       v-if="orderMutiSetVisible" | ||||||
|  |       @close='closeDialog' | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |     > | ||||||
|  |       <ioOrderMutiSetDialog | ||||||
|  |         :closeDialog="closeDialog" | ||||||
|  |         :inputQuery="inputQuery" | ||||||
|  |         :formName="formName" | ||||||
|  |       ></ioOrderMutiSetDialog> | ||||||
|  |     </el-dialog> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import ioOrderMutiSetDialog from "@/views/inout/muti/ioOrderMutiSetDialog"; | ||||||
|  | import {detailMuti, filterList} from "@/api/inout/orderMuti"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "ioOrderMutiSet", | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       filterQuery: { | ||||||
|  |         curInv: null, | ||||||
|  |         fromCorp: null, | ||||||
|  |         targetAction: null, | ||||||
|  |         remark: null, | ||||||
|  |         updateTime: null, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }, | ||||||
|  |       inputQuery: { | ||||||
|  |         curInv: null, | ||||||
|  |         fromCorp: "", | ||||||
|  |         targetAction: null, | ||||||
|  |         remark: null, | ||||||
|  |         updateTime: null, | ||||||
|  |       }, | ||||||
|  |       total: 0, | ||||||
|  |       loading: false, | ||||||
|  |       list: [], | ||||||
|  |       formName: 1, | ||||||
|  |       formMap: { | ||||||
|  |         1: "新增出库设置", | ||||||
|  |         2: "编辑出库设置", | ||||||
|  |       }, | ||||||
|  |       checkUseMap: { | ||||||
|  |         1: "是", | ||||||
|  |         0: "否", | ||||||
|  |       }, | ||||||
|  |       orderMutiSetVisible: false, | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     onSubmit() { | ||||||
|  |       this.filterQuery.page = 1; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     handleCurrentChange(val) { | ||||||
|  |       this.filterQuery.page = val.page; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     closeDialog(){ | ||||||
|  |       this.orderMutiSetVisible = false; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     addOrderMuti(){ | ||||||
|  |       this.inputQuery={ | ||||||
|  |         curInv: null, | ||||||
|  |         fromCorp: null, | ||||||
|  |         targetAction: null, | ||||||
|  |         remark: null, | ||||||
|  |         updateTime: null, | ||||||
|  |       } | ||||||
|  |       this.formName=1; | ||||||
|  |       this.orderMutiSetVisible = true; | ||||||
|  |     }, | ||||||
|  |     editDialog(row){ | ||||||
|  |       this.formName=2; | ||||||
|  |       this.inputQuery=row; | ||||||
|  |       console.log(this.inputQuery) | ||||||
|  |       this.orderMutiSetVisible = true; | ||||||
|  |     }, | ||||||
|  |     getList() { | ||||||
|  |       this.loading = true; | ||||||
|  |       filterList(this.filterQuery) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.list = response.data.list || []; | ||||||
|  |           this.total = response.data.total || 0; | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.list = []; | ||||||
|  |           this.total = 0; | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     deleteDialog(row) { | ||||||
|  |       detailMuti(row) | ||||||
|  |         .then((response) => { | ||||||
|  |           if(response.code == 20000){ | ||||||
|  |             this.getList() | ||||||
|  |           }else{ | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.$message.error(response.message); | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   components: {ioOrderMutiSetDialog}, | ||||||
|  |   created() { | ||||||
|  |     this.getList(); | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,188 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card> | ||||||
|  |       <el-form  :model="inputQuery"  label-width="120px" > | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="20" > | ||||||
|  |             <el-form-item label="当前仓库:"> | ||||||
|  |               <el-select v-model="inputQuery.curInv" @change="getBusType" placeholder="请选择当前仓库信息" style="width: 90%" clearable> | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="item in invList" | ||||||
|  |                   :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.code | ||||||
|  |                     }}</span> | ||||||
|  |                 </el-option> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="20" > | ||||||
|  |             <el-form-item label="往来单位:"> | ||||||
|  |               <el-select v-model="inputQuery.fromCorp" placeholder="请选择往来仓库"  clearable style="width: 90%"> | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="item in fromInvOptions" | ||||||
|  |                   :key="item.erpId" | ||||||
|  |                   :label="item.name" | ||||||
|  |                   :value="item.erpId" | ||||||
|  |                 > | ||||||
|  |                   <span style="float: left">{{ item.name }}</span> | ||||||
|  |                   <span style="float: right; color: #8492a6; font-size: 13px">{{item.code}}</span> | ||||||
|  |                 </el-option> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="20" > | ||||||
|  |             <el-form-item label="单据类型:"> | ||||||
|  |               <el-select v-model="inputQuery.targetAction" placeholder="请选择单据类型" style="width: 90%" clearable> | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="item in busTypes" | ||||||
|  |                   :key="item.name" | ||||||
|  |                   :label="item.name" | ||||||
|  |                   :value="item.action"> | ||||||
|  |                   <span style="float: left">{{ item.name }}</span> | ||||||
|  |                 </el-option> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="20" > | ||||||
|  |             <el-form-item label="是否个人使用:"> | ||||||
|  |               <el-radio-group v-model="inputQuery.checkUse"> | ||||||
|  |                 <el-radio :label=1>是</el-radio> | ||||||
|  |                 <el-radio :label=0>否</el-radio> | ||||||
|  |               </el-radio-group> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |         <el-col :span="20" > | ||||||
|  |           <el-form-item label="备注:"> | ||||||
|  |             <el-input type="textarea" :rows="3" v-model="inputQuery.remark" placeholder="请输入备注"></el-input> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-col> | ||||||
|  |       </el-row> | ||||||
|  |         <div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'> | ||||||
|  |           <el-button  @click="closeDialog">取消</el-button> | ||||||
|  |           <el-button type="primary" @click="submitInv">提交</el-button> | ||||||
|  |         </div> | ||||||
|  |       </el-form> | ||||||
|  |     </el-card> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import {getLocalJoinByUser} from "@/api/basic/busType"; | ||||||
|  | import {filterSubAll} from "@/api/system/invSubWarehouse"; | ||||||
|  | import {selectCorpList} from "@/api/basic/basicUnitMaintain" | ||||||
|  | import {addMuti,updateMuti} from "@/api/inout/orderMuti"; | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "ioOrderMutiSetDialog", | ||||||
|  |   props: { | ||||||
|  |     closeDialog: { | ||||||
|  |       type: Function, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     formName: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     inputQuery: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       invList:[], | ||||||
|  |       fromInvOptions: [], | ||||||
|  |       busTypes: [], | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     getInvList() { | ||||||
|  |       filterSubAll() | ||||||
|  |         .then((response) => { | ||||||
|  |           this.invList = response.data || []; | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     findFromInvList(val) { | ||||||
|  |       let cQuery = { | ||||||
|  |         corpType: 4, | ||||||
|  |       }; | ||||||
|  |       selectCorpList(cQuery) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.fromInvOptions = response.data || []; | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     getBusType() { | ||||||
|  |       let query = { | ||||||
|  |         code: this.inputQuery.curInv, | ||||||
|  |         enabled: true, | ||||||
|  |       }; | ||||||
|  |       getLocalJoinByUser(query) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.busTypes = response.data.list || []; | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     submitInv(){ | ||||||
|  |       if(this.formName==1){ | ||||||
|  |         addMuti(this.inputQuery).then((response) => { | ||||||
|  |           if(response.code == 20000){ | ||||||
|  |             this.closeDialog(); | ||||||
|  |           }else{ | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |         }) | ||||||
|  |           .catch(() => { | ||||||
|  |             this.$message.error("添加失败"); | ||||||
|  |           }); | ||||||
|  |       }else{ | ||||||
|  |         updateMuti(this.inputQuery).then((response) => { | ||||||
|  |           if(response.code == 20000){ | ||||||
|  |             this.closeDialog(); | ||||||
|  |           }else{ | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |         }) | ||||||
|  |           .catch(() => { | ||||||
|  |             this.$message.error("添加失败"); | ||||||
|  |           }); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |   }, | ||||||
|  |   components: {}, | ||||||
|  |   created() { | ||||||
|  |     this.getInvList(); | ||||||
|  |     this.findFromInvList(); | ||||||
|  |     if(this.formName==2){ | ||||||
|  |      this.getBusType(); | ||||||
|  |     }else{ | ||||||
|  |       this.inputQuery.checkUse=1; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
					Loading…
					
					
				
		Reference in New Issue