| | |
| | | <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()" |
| | | <el-option |
| | | v-for="item in locationTypes" |
| | | :key="item.locationType" |
| | | :label="item.locationTypeDesc.toString()" |
| | | :value="item.locationType"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | </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> |
| | | </template> |
| | | <template #footer> |
| | | <div> |
| | | <el-button type="danger" size="small" plain @click="submit"> |
| | | <!-- æ·»å loadingç¶æådisabled屿§ --> |
| | | <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> |
| | |
| | | show: false, |
| | | locationTypes: [], |
| | | locationType: "", |
| | | // æ°å¢æäº¤ç¶ææ è¯ |
| | | isSubmitting: false |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | this.getData(); |
| | | }, |
| | | submit() { |
| | | // 1. éªè¯å¿
填项 |
| | | if (!this.locationType) { |
| | | this.$message.warning('è¯·éæ©åºåºåºå'); |
| | | return; |
| | | } |
| | | |
| | | // 2. 设置æäº¤ç¶æä¸ºtrueï¼ç¦ç¨æé® |
| | | this.isSubmitting = true; |
| | | |
| | | this.$emit('parentCall', ($vue) => { |
| | | this.http.post(`/api/Task/PalletOutboundTask?num=${this.num}&locationType=${this.locationType}`, {}, 'æ°æ®å¤çä¸...') |
| | | .then((x) => { |
| | |
| | | $vue.refresh(); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | // æè·è¯·æ±å¼å¸¸ï¼æç¤ºç¨æ· |
| | | this.$message.error('请æ±å¤±è´¥ï¼è¯·ç¨åéè¯'); |
| | | console.error('æäº¤å¤±è´¥:', error); |
| | | }) |
| | | .finally(() => { |
| | | // 3. 请æ±å®æï¼æå/失败ï¼åéç½®æäº¤ç¶æ |
| | | this.isSubmitting = false; |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | getData() { |
| | | this.http.post("api/LocationInfo/GetLocationTypes", null, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | </script> |