Browse Source

修改直接发料可以删除物料

wms3.0_pda
lijuncheng 10 months ago
parent
commit
53c2de8134
  1. 21
      pages/issue/coms/comIssueDetailCard.vue
  2. 35
      pages/issue/record/issueRecord.vue

21
pages/issue/coms/comIssueDetailCard.vue

@ -8,7 +8,12 @@
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<!-- 物品 --> <!-- 物品 -->
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="itemCoceClick($event,item,index)"
:right-options="removeOptions">
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty> <item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent"> <!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent">
</com-issue-request-info> --> </com-issue-request-info> -->
</template> </template>
@ -68,11 +73,12 @@
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue' import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import { import {
getDetailOption, getDetailOption,
getEditRemoveOption getEditRemoveOption,
getRemoveOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
emits: ['updateData'], emits: ['updateData',"removeItemCode"],
components: { components: {
itemQty, itemQty,
recommend, recommend,
@ -107,13 +113,15 @@
editItem: {}, editItem: {},
batchItem: {}, batchItem: {},
detailOptions: [], detailOptions: [],
scanOptions: [] scanOptions: [],
removeOptions:[]
} }
}, },
mounted() { mounted() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption(); this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
}, },
methods: { methods: {
@ -136,6 +144,13 @@
} }
}, },
itemCoceClick(e,item,index){
if (e.content.text == "移除") {
this.dataContent.Items.splice(index, 1);
this.$emit('removeItemCode')
}
},
edit(batch, item) { edit(batch, item) {
let that = this; let that = this;
that.editItem = item; that.editItem = item;

35
pages/issue/record/issueRecord.vue

@ -16,11 +16,13 @@
:rawLocationCode="toLocation.toLocationCode"></work-station> :rawLocationCode="toLocation.toLocationCode"></work-station>
</view> </view>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" <com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'> @updateData='updateData'
@removeItemCode ="removeItemCode"
>
</com-issue-detail-card> </com-issue-detail-card>
</view> </view>
</scroll-view> </scroll-view>
<button class="btn_add" @click="goScan(true)">+去添加</button> <button class="btn_add" @click="goScan(false)">+去添加</button>
</view> </view>
<view class="page-footer"> <view class="page-footer">
@ -35,13 +37,15 @@
</view> </view>
</view> </view>
</view>
</view>
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup> <com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup>
<win-scan-button v-if='detailSource.length>0' @goScan='openScanDetailPopup'></win-scan-button> <win-scan-button v-if='detailSource.length>0' @goScan='openScanDetailPopup'></win-scan-button>
<com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'> <com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'>
</com-scan-issue-pack> </com-scan-issue-pack>
<com-message ref="comMessage"></com-message> <comMessage ref="comMessage"></comMessage>
</template> </template>
<script> <script>
@ -131,6 +135,7 @@
this.toInventoryStatuses = res.toInventoryStatuses this.toInventoryStatuses = res.toInventoryStatuses
this.goScan(true) this.goScan(true)
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
} }
}); });
@ -148,6 +153,7 @@
}); });
}, },
goScan(editPosition) { goScan(editPosition) {
this.$refs.comIssueRequestPopup.openRequestPopup(editPosition); this.$refs.comIssueRequestPopup.openRequestPopup(editPosition);
}, },
@ -267,6 +273,14 @@
// item.handleQty=itemHandleQty; // item.handleQty=itemHandleQty;
// this.closeScan(); // this.closeScan();
}, },
removeItemCode(){
var isClear =this.detailSource[0].Items.length==0
if(isClear){
this.clearData();
this.$refs.comIssueRequestPopup.initData()
}
},
setParams() { setParams() {
var subList = [] var subList = []
@ -381,10 +395,15 @@
}) })
}, },
clearData() { clearData() {
this.detailSource = []; this.subList= [], //subList
this.requestList = []; this.detailSource=[], //
this.dataContent = {} this.detailOptions=[],
this.managementList = [] this.scanOptions= [],
this.workShopCode="",
this.requestList= [],
this.dataContent= {},
this.managementList= []
}, },
showMessage(message) { showMessage(message) {

Loading…
Cancel
Save