| | |
| | | <template> |
| | | <vol-box v-model="show" title="空æåºåº" :width="400" :height="600"> |
| | | <vol-box v-model="show" title="空æåºåº" :width="800" :height="1200"> |
| | | <template #content> |
| | | <el-form ref="form" :model="form" label-width="90px"> |
| | | <el-form-item label="åºåºåºå:"> |
| | | <el-select v-model="locationType" placeholder="è¯·éæ©åºåºåºå"> |
| | | <el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc.toString()" :value="item.locationType"> |
| | | <el-option |
| | | v-for="item in locationTypes" |
| | | :key="item.locationType" |
| | | :label="item.locationTypeDesc.toString()" |
| | | :value="item.locationType"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form ref="form" :model="form" label-width="90px"> |
| | | <el-form-item label="åºåºæ°é:"> |
| | | <el-input-number v-model="num" :min="1" :max="999" :controls="true" placeholder="è¯·éæ©åºåºæ°é" style="width: 100%;"></el-input-number> |
| | | <el-input-number |
| | | v-model="num" |
| | | :min="1" |
| | | :max="999" |
| | | :controls="true" |
| | | placeholder="è¯·éæ©åºåºæ°é" |
| | | style="width: 100%;"> |
| | | </el-input-number> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <!-- ===================== æ°å¢ï¼ä¾åºåç¼ç ï¼å®æ¶æç´¢ä¸æï¼ ===================== --> |
| | | <el-form ref="form" :model="form" label-width="90px"> |
| | | <el-form-item label="ä¾åºåç¼ç :"> |
| | | <el-select |
| | | v-model="supplierCode" |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | | placeholder="请è¾å
¥/éæ©ä¾åºåç¼ç " |
| | | :remote-method="remoteSearchSupplier" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in supplierList" |
| | | :key="item" |
| | | :label="item" |
| | | :value="item" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- ======================================================================== --> |
| | | |
| | | </template> |
| | | <template #footer> |
| | | <div> |
| | | <el-button type="danger" size="small" plain @click="submit"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | @click="submit" |
| | | :loading="isSubmitting" |
| | | :disabled="isSubmitting"> |
| | | <i class="el-icon-check">确认</i> |
| | | </el-button> |
| | | <el-button size="small" type="primary" plain @click="() => { this.show = false }"> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | plain |
| | | @click="() => { this.show = false }"> |
| | | <i class="el-icon-close">å
³é</i> |
| | | </el-button> |
| | | </div> |
| | |
| | | num: 1, |
| | | show: false, |
| | | locationTypes: [], |
| | | locationType:"", |
| | | locationType: "", |
| | | isSubmitting: false, |
| | | // ================= æ°å¢ ================= |
| | | supplierCode: '', // ä¾åºåç¼ç ç»å® |
| | | supplierList: [] // 䏿å表 |
| | | // ======================================= |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | this.getData(); |
| | | }, |
| | | submit() { |
| | | if (!this.locationType) { |
| | | this.$message.warning('è¯·éæ©åºåºåºå'); |
| | | return; |
| | | } |
| | | |
| | | this.isSubmitting = true; |
| | | |
| | | this.$emit('parentCall', ($vue) => { |
| | | this.http.post(`/api/Task/PalletOutboundTask?num=${this.num}&locationType=${this.locationType}`, {}, 'æ°æ®å¤çä¸...') |
| | | // ===================== æ¹é æ¥å£ï¼å¸¦ä¸ supplierCode ===================== |
| | | this.http.post( |
| | | `/api/Task/PalletOutboundTask?num=${this.num}&locationType=${this.locationType}&SupplierCode=${this.supplierCode || ''}`, |
| | | {}, 'æ°æ®å¤çä¸...') |
| | | // ==================================================================== |
| | | .then((x) => { |
| | | if (!x.status) { |
| | | this.$message.error(x.message) |
| | |
| | | $vue.refresh(); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | this.$message.error('请æ±å¤±è´¥ï¼è¯·ç¨åéè¯'); |
| | | console.error('æäº¤å¤±è´¥:', error); |
| | | }) |
| | | .finally(() => { |
| | | this.isSubmitting = false; |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | getData() { |
| | | this.http.post("api/LocationInfo/GetLocationTypes",null, "æ¥è¯¢ä¸") |
| | | this.http.post("api/LocationInfo/GetLocationTypes", null, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | this.locationTypes = x.data; |
| | | }) |
| | | }, |
| | | |
| | | remoteSearchSupplier(keyword) { |
| | | if (!keyword) { |
| | | this.supplierList = []; |
| | | return; |
| | | } |
| | | // è°ç¨åç«¯å®æ¶æç´¢æ¥å£ |
| | | this.http.get(`/api/Task/SearchSupplierCode?keyword=${keyword}`) |
| | | .then(res => { |
| | | if (res.status) { |
| | | this.supplierList = res.data || []; |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | </script> |