Browse Source

修改发料申请

wms3.0_pda
lijuncheng 11 months ago
parent
commit
6c45e5bf5d
  1. 187
      pages/issue/coms/comIssueRequestCreator.vue
  2. 12
      pages/issue/request/issueRequest.vue
  3. 11
      pages/issue/request/issueRequestDetail.vue
  4. 8
      pages/issue/request/issueRequestSubmit.vue

187
pages/issue/coms/comIssueRequestCreator.vue

@ -1,88 +1,145 @@
<template>
<view class="">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<template v-slot:title>
<view class="" style="font-size: 32rpx;">
<view class="" >
车间 : {{dataContent.workShopName}} ({{dataContent.workshopCode}})
</view>
<view class="">
总数量 : {{dataContent.totalQty}}
</view>
</view>
</template>
<u-line />
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataContent.subList" :key="index">
<uni-swipe-action-item>
<view class="" style="font-size: 32rpx;margin: 10rpx;">
<view class="">
生产线 : {{item.productionLineName}}({{item.productionLineCode}})
</view>
<view class="">
工位 : {{item.workStationName}} ({{item.workStationCode}})
</view>
<view class="">
物品代码 : {{item.itemCode}}
</view>
<view class="">
物品名称 : {{item.itemName}}
</view>
<view class="uni-flex uni-row uni-center">
<view class="">
数量 : {{item.qty}} 单位 :
</view>
<view class="">
<uom :uom="item.uom"></uom>
</view>
</view>
</view>
</uni-swipe-action-item>
<view class="" style="background-color: #fff;">
<view class="uni-flex uni-column">
<com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="dataContent">
</com-issue-request-info>
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataContent.subList" :key="index">
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="detailOptions">
<item-qty :dataContent="item" :isShowStdPack="false">
</item-qty>
<u-line />
</view>
</uni-swipe-action>
</uni-collapse-item>
</uni-collapse>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
</view>
<request-detail-info-popup ref="jobDetailPopup"></request-detail-info-popup>
<com-message ref="message"></com-message>
</view>
</template>
<script>
import uom from '@/mycomponents/qty/uom.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import itemQty from '@/mycomponents/item/itemQty.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import requestDetailInfoPopup from '@/pages/issue/coms/requestDetailInfoPopup.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getDetailRemoveOption
} from '@/common/array.js';
export default {
emits: ['openDetail'],
components: {
uom
},
data() {
return {
}
itemCompareQty,
recommend,
balanceQtyEdit,
comMessage,
itemQty,
comIssueRequestInfo,
requestDetailInfoPopup
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
dataContent(newVal) {
this.requestItem = newVal.subList[0];
},
},
methods: {
update(){
this.$nextTick(r => {
this.$refs.collapse.resize()
});
}
data() {
return {
option: [],
showItem: {},
editItem: {
record: {
}
},
requestItem: {},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption();
// if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption();
// } else {
// this.scanOptions = getDetailRemoveOption();
// }
}
},
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.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty);
},
detail(item) {
this.$refs.jobDetailPopup.openPopup(item)
// this.$emit('openDetail', item);
// // this.showItem = item;
// // this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.record.qty = qty;
this.$emit('updateData')
}
}
}
</script>

12
pages/issue/request/issueRequest.vue

@ -14,11 +14,9 @@
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<!-- <request-info-popup ref='requestInfoPopup'></request-info-popup> -->
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup'></requestButton>
<!-- <com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup> -->
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirmsss'></com-issue-request-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
@ -31,7 +29,6 @@
import comIssueRequestCard from '@/pages/issue/coms/comIssueRequestCard.vue'
import requestInfoPopup from '@/pages/issue/coms/requestInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue'
import comIssueRequestPopup from '@/pages/issue/coms/comIssueRequestPopup.vue'
import {
goHome,
@ -67,7 +64,6 @@
comIssueRequestCard,
requestInfoPopup,
requestButton,
comIssueRequestPopup
},
data() {
return {
@ -125,7 +121,7 @@
methods: {
openRequestDetail(item) {
uni.navigateTo({
url: './issueRequestDetail?type=query&id=' + item.id
url: './issueRequestDetail?id=' + item.id
});
},
@ -204,7 +200,9 @@
},
openScanDetailPopup() {
this.$refs.comIssueRequestPopup.openRequestPopup(true);
uni.navigateTo({
url: './issueRequestSubmit'
});
},
swipeClick(e, dataContent) {

11
pages/issue/request/issueRequestDetail.vue

@ -9,7 +9,6 @@
</view>
</view>
</scroll-view>
<!-- v-if="type=='add'" -->
<div class="btn_bottom" >
<view class="" style="display: flex;flex-direction: row;">
<view class="">
@ -55,14 +54,8 @@
};
},
onLoad(option) {
debugger;
this.type = option.type;
if (this.type == 'add') {
} else {
this.id = option.id;
this.getDetail();
}
this.id = option.id;
this.getDetail();
},
//

8
pages/issue/request/issueRequestSubmit.vue

@ -96,9 +96,12 @@
productionLineName: item.productionLineName,
workStationCode: item.workStationCode,
workStationName: item.workStationName, //
toLocationCode:item.rawLocationCode,
totalQty: 0,
subList: []
}
debugger
var subItem = {
productionLineCode: item.productionLineCode,
workStationCode: item.workStationCode,
@ -134,10 +137,9 @@
}
}
console.log(this.detailSource)
this.caclcQty();
if (this.$refs.issueRequest != undefined) {
this.$refs.issueRequest.update()
}
},
caclcQty() {

Loading…
Cancel
Save