| | |
| | | <el-button type="success" @click="confirmPicking">确认æ£é</el-button> |
| | | <!-- <el-button type="warning" @click="openSplitDialog">æå
</el-button> |
| | | <el-button type="info" @click="openRevertSplitDialog">æ¤éæå
</el-button> --> |
| | | |
| | | <el-button type="info" @click="handleEmptyPallet">å空箱</el-button> |
| | | <el-button type="primary" @click="openBatchReturnDialog">ååº</el-button> |
| | | <!-- <el-button type="danger" @click="handleDirectOutbound">ç´æ¥åºåº</el-button> --> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- å走空箱--> |
| | | <div v-if="showEmptyPalletDialog" class="custom-dialog-overlay"> |
| | | <div class="custom-dialog-wrapper"> |
| | | <div class="custom-dialog"> |
| | | <div class="custom-dialog-header"> |
| | | <h3>å走空箱</h3> |
| | | <el-button |
| | | type="text" |
| | | @click="closeEmptyPalletDialog" |
| | | class="close-button"> |
| | | Ã |
| | | </el-button> |
| | | </div> |
| | | <div class="custom-dialog-body"> |
| | | <el-form |
| | | :model="emptypalletOutForm" |
| | | :rules="emptypalletOutFormRules" |
| | | ref="emptypalletOutFormRef" |
| | | label-width="100px"> |
| | | <el-form-item label="订åç¼å·"> |
| | | <el-input v-model="emptypalletOutForm.orderNo" disabled></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æçç¼å·" prop="palletCode"> |
| | | <el-input |
| | | v-model="emptypalletOutForm.palletCode" |
| | | placeholder="æ«ææçç " |
| | | @keyup.enter.native="onEmptyPalletScan" |
| | | @change="onEmptyPalletScan" |
| | | clearable> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="custom-dialog-footer"> |
| | | <el-button @click="closeEmptyPalletDialog">åæ¶</el-button> |
| | | <el-button type="primary" @click="handleEmptyPalletConfirm" :loading="emptypalletOutLoading">确认å走空箱</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- ç´æ¥åºåºå¼¹çª --> |
| | | <div v-if="showDirectOutDialog" class="custom-dialog-overlay"> |
| | | <div class="custom-dialog-wrapper"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <print-view ref="childs" @parentcall="parentcall"></print-view> |
| | | </template> |
| | | |
| | |
| | | { required: true, validator: validateDirectOutPalletCode, trigger: 'blur' } |
| | | ] |
| | | }, |
| | | |
| | | showEmptyPalletDialog: false, // åèµ°ç©ºç®±å¼¹çªæ¾ç¤ºç¶æ |
| | | emptypalletOutLoading: false, // å走空箱å è½½ç¶æ |
| | | emptypalletOutForm: { |
| | | orderNo: '', |
| | | palletCode: '' |
| | | }, |
| | | emptypalletOutFormRules: { |
| | | palletCode: [ |
| | | { required: true, validator: validateDirectOutPalletCode, trigger: 'blur' } |
| | | ] |
| | | }, |
| | | |
| | | |
| | | returnForm: { |
| | | orderNo: '', |
| | | palletCode: '', |
| | |
| | | }); |
| | | |
| | | if (res.status) { |
| | | this.$message.success('ååºæå'); |
| | | this.$message.success(res.message); |
| | | this.showBatchReturnDialog = false; |
| | | this.loadData(); |
| | | } else { |
| | |
| | | handleDirectOutbound() { |
| | | this.openDirectOutDialog(); |
| | | }, |
| | | |
| | | // æå¼åèµ°ç©ºç®±å¼¹çª |
| | | openEmptyPalletDialog() { |
| | | console.log('æå¼å走空箱弹çª'); |
| | | this.showEmptyPalletDialog = true; |
| | | |
| | | // é置表å |
| | | this.resetEmptyPalletForm(); |
| | | |
| | | // 设置订åä¿¡æ¯ |
| | | this.emptypalletOutForm.orderNo = this.scanData.orderNo; |
| | | |
| | | // æ¸
é¤è¡¨åéªè¯ |
| | | this.$nextTick(() => { |
| | | if (this.$refs.emptyPalletFormRef) { |
| | | this.$refs.emptyPalletFormRef.clearValidate(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // å
³éåèµ°ç©ºç®±å¼¹çª |
| | | closeEmptyPalletDialog() { |
| | | this.showEmptyPalletDialog = false; |
| | | this.resetEmptyPalletForm(); |
| | | |
| | | // æ¸
é¤è¡¨åéªè¯ |
| | | if (this.$refs.emptyPalletFormRef) { |
| | | this.$refs.emptyPalletFormRef.clearValidate(); |
| | | } |
| | | }, |
| | | |
| | | // å走空箱æçç æ«ç |
| | | onEmptyPalletScan() { |
| | | if (!this.emptypalletOutForm.palletCode) return; |
| | | |
| | | this.emptypalletOutForm.palletCode = this.emptypalletOutForm.palletCode.replace(/\n/g, '').trim(); |
| | | |
| | | // æ¸
é¤éªè¯ç¶æ |
| | | if (this.$refs.emptyPalletFormRef) { |
| | | this.$refs.emptyPalletFormRef.clearValidate(['palletCode']); |
| | | } |
| | | }, |
| | | |
| | | // å走空箱确认 |
| | | async handleEmptyPalletConfirm() { |
| | | // 表åéªè¯ |
| | | if (this.$refs.emptyPalletFormRef) { |
| | | this.$refs.emptyPalletFormRef.validate((valid) => { |
| | | if (valid) { |
| | | this.submitEmptyPallet(); |
| | | } else { |
| | | this.$message.warning('è¯·æ«ææçç '); |
| | | return false; |
| | | } |
| | | }); |
| | | } else { |
| | | // å¦ææ²¡æè¡¨åå¼ç¨ï¼ä½¿ç¨åæçéªè¯ |
| | | if (!this.emptypalletOutForm.palletCode) { |
| | | this.$message.warning('è¯·æ«ææçç '); |
| | | return; |
| | | } |
| | | |
| | | this.submitEmptyPallet(); |
| | | } |
| | | }, |
| | | |
| | | // æäº¤åèµ°ç©ºç®±è¯·æ± |
| | | async submitEmptyPallet() { |
| | | this.emptypalletOutLoading = true; |
| | | |
| | | try { |
| | | const res = await this.http.post('/api/OutboundPicking/remove-empty-pallet', { |
| | | orderNo: this.emptypalletOutForm.orderNo, |
| | | palletCode: this.emptypalletOutForm.palletCode |
| | | }); |
| | | debugger; |
| | | if (res.status) { |
| | | this.$message.success('å走空箱æå'); |
| | | this.showEmptyPalletDialog = false; |
| | | this.loadData(); |
| | | } else { |
| | | this.$message.error(res.message || 'å走空箱失败'); |
| | | } |
| | | } catch (error) { |
| | | this.$message.error('å走空箱失败'); |
| | | } finally { |
| | | this.emptypalletOutLoading = false; |
| | | } |
| | | }, |
| | | |
| | | // éç½®å走空箱表å |
| | | resetEmptyPalletForm() { |
| | | this.emptypalletOutForm.palletCode = ''; |
| | | }, |
| | | |
| | | // ä¿®æ¹åæçå走空箱æé®ç¹å»äºä»¶ |
| | | handleEmptyPallet() { |
| | | this.openEmptyPalletDialog(); |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | async loadData() { |
| | | if (!this.scanData.orderNo || !this.scanData.palletCode) { |
| | | return; |