Browse Source

修改发料移除的不是推荐的

hella_online_20240829
lijuncheng 3 months ago
parent
commit
4103bef945
  1. 28
      src/pages/issue/coms/comIssueDetailCard.vue
  2. 1
      src/pages/issue/coms/comScanIssuePack.vue
  3. 3
      src/pages/issue/job/issueDetail.vue

28
src/pages/issue/coms/comIssueDetailCard.vue

@ -20,14 +20,14 @@
</template> </template>
<view v-for="(loacation,index) in item.Locations"> <view v-for="(loacation,locatonIndex) in item.Locations">
<view> <view>
<view class="uni-flex uni-row space-between"> <view class="uni-flex uni-row space-between">
<!-- 推荐库位 --> <!-- 推荐库位 -->
<location :locationCode="loacation.fromLocationCode"> <location :locationCode="loacation.fromLocationCode">
</location> </location>
</view> </view>
<view v-for="(batch,index) in loacation.Batchs"> <view v-for="(batch,batchIndex) in loacation.Batchs">
<recommend-balance style='margin-left: 0rpx;' :detail="batch" :isShowLocation="false" <recommend-balance style='margin-left: 0rpx;' :detail="batch" :isShowLocation="false"
:isShowPack="batch.packingNumber!=null && batch.packingNumber!=''"> :isShowPack="batch.packingNumber!=null && batch.packingNumber!=''">
</recommend-balance> </recommend-balance>
@ -37,9 +37,9 @@
扫描 扫描
</view> </view>
<view class="uni-flex uni-column scan_view" style="width: 100%;"> <view class="uni-flex uni-column scan_view" style="width: 100%;">
<view v-for="(record,index) in batch.Records"> <view v-for="(record,recordIndex) in batch.Records">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)" <uni-swipe-action-item @click="swipeClick($event,batch,record,recordIndex,batchIndex,loacation.Batchs,locatonIndex,item.Locations)"
:right-options="settingParam.allowModifyQty=='TRUE'?scanOptions:removeOptions"> :right-options="settingParam.allowModifyQty=='TRUE'?scanOptions:removeOptions">
<handle-balance :detail="record" :isShowLocation="false" <handle-balance :detail="record" :isShowLocation="false"
:isShowBatch="batch.packingNumber!=null"> :isShowBatch="batch.packingNumber!=null">
@ -136,12 +136,16 @@
}) })
}); });
}, },
swipeClick(e, batch,
swipeClick(e, batch, record, index) { record,recordIndex,
batchIndex,
Batchs,
locatonIndex,
Locations) {
if (e.content.text == "编辑") { if (e.content.text == "编辑") {
this.edit(batch, record) this.edit(batch, record)
} else if (e.content.text == "移除") { } else if (e.content.text == "移除") {
this.remove(batch, record, index) this.remove(batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations)
} }
}, },
@ -164,11 +168,17 @@
this.showItem = item; this.showItem = item;
this.$refs.receiptHint.openScanPopup() this.$refs.receiptHint.openScanPopup()
}, },
remove(batch, record, index) { remove(batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?", this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => { res => {
if (res) { if (res) {
batch.Records.splice(index, 1); batch.Records.splice(recordIndex, 1);
if(batch.Records.length==0&&Batchs[batchIndex].isNewAdd){
Batchs.splice(batchIndex,1)
}
if(batch.Records.length==0&&Locations[locatonIndex].isNewAdd){
Locations.splice(locatonIndex,1)
}
this.resizeCollapse(); this.resizeCollapse();
this.$emit('updateData', record) this.$emit('updateData', record)
} }

1
src/pages/issue/coms/comScanIssuePack.vue

@ -762,6 +762,7 @@
createBatchInfo(data, balance, packageInfo) { createBatchInfo(data, balance, packageInfo) {
let batch = { let batch = {
isNewAdd: true,
batch: data.batch, batch: data.batch,
qty: 0, qty: 0,
uom: data.uom, uom: data.uom,

3
src/pages/issue/job/issueDetail.vue

@ -425,9 +425,6 @@
}, },
updateData(record) { updateData(record) {
console.log('updateData', record)
console.log('this.detailSource', this.detailSource)
let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode); let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode);
let item = requestLocation.Items.find(r => r.itemCode == record.itemCode); let item = requestLocation.Items.find(r => r.itemCode == record.itemCode);
let itemHandleQty = 0; let itemHandleQty = 0;

Loading…
Cancel
Save