| | |
| | | <template> |
| | | <!-- å
¨å±é®ç½©å±ï¼å¨è¯·æ±å¤çæ¶æ¾ç¤º --> |
| | | <div class="mask-layer" v-if="loading"></div> |
| | | |
| | | <vol-box v-model="show" title="ç´æ¥åºåº" :width="800" :height="1200"> |
| | | <template #content> |
| | | <el-form ref="form" :model="form" label-width="90px"> |
| | |
| | | </template> |
| | | <template #footer> |
| | | <div> |
| | | <el-button type="danger" size="small" plain @click="submit"> |
| | | <el-button type="danger" size="small" plain @click="submit" :loading="loading"> |
| | | <i class="el-icon-check">确认</i> |
| | | </el-button> |
| | | <el-button size="small" type="primary" plain @click="() => { this.show = false }"> |
| | |
| | | orderNo: "", |
| | | keys: [], |
| | | isBatch: "", |
| | | loading: false, // æ§å¶é®ç½©åæé®å è½½ç¶æ |
| | | form: {} // è¡¥å
å代ç 䏿ªå®ä¹çform |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | if (params.isBatch == 1) { |
| | | this.outboundQuantity = params.outboundQuantity |
| | | } |
| | | |
| | | }, |
| | | submit() { |
| | | // éªè¯å¿
填项 |
| | | if (!this.station) { |
| | | this.$message.warning("è¯·éæ©åºåºåºå"); |
| | | return; |
| | | } |
| | | if (this.isBatch === 1 && !this.outboundQuantity) { |
| | | this.$message.warning("请填ååºåºæ°é"); |
| | | return; |
| | | } |
| | | |
| | | this.loading = true; // æå¼é®ç½©åå è½½ç¶æ |
| | | this.$emit('parentCall', ($vue) => { |
| | | const requestParams = { |
| | | detailIds: this.keys, |
| | |
| | | console.log(requestParams); |
| | | this.http.post("api/Outbound/ProcessPickingOutbound", requestParams, 'æ°æ®å¤çä¸...') |
| | | .then((x) => { |
| | | this.loading = false; // å
³éé®ç½©åå è½½ç¶æ |
| | | if (!x.status) { |
| | | this.$message.error(x.message) |
| | | } else { |
| | | this.show = false |
| | | this.$Message.success(x.message) |
| | | this.$message.success(x.message) // ä¿®æ£$Message为$message |
| | | |
| | | // ä¿®å¤æ ¸å¿ï¼å®å
¨è°ç¨refreshæ¹æ³ |
| | | if ($vue && typeof $vue.refresh === 'function') { |
| | | $vue.refresh(); |
| | | } else { |
| | | // å¤éæ¹æ¡ï¼å¦æç¶ç»ä»¶æ²¡ærefreshæ¹æ³ï¼è§¦åèªå®ä¹äºä»¶éç¥å·æ° |
| | | this.$emit('needRefresh'); |
| | | console.warn('ç¶ç»ä»¶æªå®ä¹refreshæ¹æ³ï¼å·²è§¦åneedRefreshäºä»¶'); |
| | | } |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | this.loading = false; // å¼å¸¸æ¶ä¹è¦å
³éé®ç½© |
| | | this.$message.error("请æ±å¤±è´¥ï¼" + (error.message || "æªç¥é误")); |
| | | console.error("请æ±å¼å¸¸ï¼", error); |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /* é®ç½©å±æ ·å¼ */ |
| | | .mask-layer { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100vw; |
| | | height: 100vh; |
| | | background-color: rgba(0, 0, 0, 0.5); /* åéæé»è²é®ç½© */ |
| | | z-index: 9999; /* ç¡®ä¿é®ç½©å¨æä¸å±ï¼é«äºå¼¹çªï¼ */ |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | pointer-events: auto; /* 黿¢ç¹å»é®ç½©ä¸æ¹çå
容 */ |
| | | } |
| | | |
| | | /* å è½½å¨ç» */ |
| | | .mask-layer::after { |
| | | content: ""; |
| | | width: 40px; |
| | | height: 40px; |
| | | border: 4px solid #ffffff; |
| | | border-top: 4px solid #409eff; |
| | | border-radius: 50%; |
| | | animation: spin 1s linear infinite; |
| | | } |
| | | |
| | | @keyframes spin { |
| | | 0% { transform: rotate(0deg); } |
| | | 100% { transform: rotate(360deg); } |
| | | } |
| | | </style> |