Browse Source

修改调拨入库编辑

wms3.0_pda
lijuncheng 11 months ago
parent
commit
69ea6d6b46
  1. 4
      common/detail.js
  2. 2
      mycomponents/detail/comDetailCard.vue
  3. 1
      mycomponents/item/itemQty.vue
  4. 2
      pages/issue/coms/comIssueRequestPopup.vue
  5. 148
      pages/transfer/coms/comReceiptDetailCard.vue
  6. 20
      pages/transfer/job/receiptDetail.vue
  7. 2
      pages/unPlanned/coms/comReceiptDetailCard.vue

4
common/detail.js

@ -1,4 +1,6 @@
import { calc } from '@/common/calc'
import {
calc
} from '@/common/calc'
export function getDataSource(subList) {
let items = [];
subList.forEach(detail => {

2
mycomponents/detail/comDetailCard.vue

@ -3,7 +3,7 @@
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false">
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false">
</item-compare-qty>
</template>
<u-line></u-line>

1
mycomponents/item/itemQty.vue

@ -18,6 +18,7 @@
</view>
</template>
<script>
import item from '@/mycomponents/item/item.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'

2
pages/issue/coms/comIssueRequestPopup.vue

@ -46,7 +46,7 @@
:focus="numberFocus" @blur='numberFocus = false'>
</uni-number-box>
<view class="std_pack">
<view class="std_pack" v-if="itemCode!='请扫描物料信息'">
<text>
/{{stdQty}}
<!-- {{Number(dataContent.stdPackQty)}}{{getStdPackUnit(dataContent.uom)}} -->

148
pages/transfer/coms/comReceiptDetailCard.vue

@ -0,0 +1,148 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :showItemQty ="false"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowFromLocation="false" :isShowToLocation="true">
</recommend>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>
</view>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam"
@confirm="confirm">
</recommend-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import {
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
recommendQtyEdit,
detailInfoPopup,
comMessage,
winScanLocation
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowLocation: {
type: Boolean,
default: false
},
locationTypeList: {
type: Object,
default: {}
},
},
watch: {
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty,this.settingParam.allowModifyLocation)
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty,item.labelQty);
},
showLocation(item) {
this.locatonItem =item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode =code;
this.$emit('updateData')
},
detail(item) {
this.showItem = item;
this.$refs.detailInfoPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

20
pages/transfer/job/receiptDetail.vue

@ -17,10 +17,9 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationTypeList='tolocationTypeList'>
</com-detail-card>
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
</com-receipt-detail-card>
</view>
</view>
</scroll-view>
@ -32,7 +31,7 @@
<view class="">
<requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode"
@getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation == 'TRUE'"
:locationTypeList="tolocationTypeList"></requiredLocation>
:locationTypeList="toLocationTypeList"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -85,6 +84,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import detailInfoPopup from '@/pages/transfer/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
import comReceiptDetailCard from '@/pages/transfer/coms/comReceiptDetailCard.vue'
export default {
name: 'returnDetail',
@ -95,7 +95,8 @@
winScanPack,
comDetailCard,
detailInfoPopup,
jobTop
jobTop,
comReceiptDetailCard
},
data() {
return {
@ -108,7 +109,7 @@
toLocationCode: "",
businessTypeInfo: {},
managementList: [],
tolocationTypeList: []
toLocationTypeList: []
};
},
onLoad(option) {
@ -195,7 +196,7 @@
that.detailSource = getDataSource(that.subList)
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
} else {
that.showMessage('列表数据为0');
}
@ -258,11 +259,10 @@
this.detailSource[0].subList.sort(compareAsc('scaned')); //
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
itemDetail.stdPackQty = result.package.stdPackQty
itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
var list = this.detailSource[0].subList;
}
}
}

2
pages/unPlanned/coms/comReceiptDetailCard.vue

@ -3,7 +3,7 @@
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :showItemQty ="false"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.subList">

Loading…
Cancel
Save