Browse Source

修改发料任务

wms3.0_pda
Niext 12 months ago
parent
commit
bd9f02b476
  1. 6
      common/style/pdabasic.css
  2. 3
      mycomponents/item/itemQty.vue
  3. 7
      pages/issue/coms/comIssueDetailCard.vue
  4. 145
      pages/issue/coms/comScanIssuePack.vue
  5. 67
      pages/issue/job/issueDetail.vue
  6. 8
      pages/purchaseReceipt/job/receiptDetail.vue
  7. 5
      pages/purchaseReturn/job/returnDetail.vue

6
common/style/pdabasic.css

@ -723,9 +723,13 @@ page {
}
.page-header .header_item {
padding: 5rpx 0rpx;
/* padding-left: 10rpx; */
padding: 5rpx 10rpx;
}
.page-header .header_job_top {
padding:5rpx 0rpx;
}
.page-main {
flex: 1;
position: relative;

3
mycomponents/item/itemQty.vue

@ -5,6 +5,9 @@
</view>
<view>
<balanceQty v-if="showItemQty" :dataContent="dataContent"></balanceQty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(handleQty)" :isShowStatus="false">
</compare-qty>
</view>
<!-- <view v-else>
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false"></recommend-qty>

7
pages/issue/coms/comIssueDetailCard.vue

@ -9,6 +9,8 @@
<template v-slot:title>
<!-- 物品 -->
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent">
</com-issue-request-info> -->
</template>
<u-line />
<view v-for="(loacation,index) in item.Locations">
@ -63,7 +65,7 @@
import location from '@/mycomponents/balance/location.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import {
getDetailOption,
getEditRemoveOption
@ -81,7 +83,8 @@
balanceQtyEdit,
location,
comMessage,
detailInfoPopup
detailInfoPopup,
comIssueRequestInfo
},
props: {
dataContent: {

145
pages/issue/coms/comScanIssuePack.vue

@ -7,7 +7,7 @@
扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text>
</view>
<!-- <view class="uni-flex uni-row" style="align-items: center;
<!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
@ -145,7 +145,7 @@
positionInfo: "请选择位置",
positionList: [],
defaultValueList: [],
fromInventoryStatuses :"",
fromInventoryStatuses: "",
}
},
created() {
@ -186,26 +186,26 @@
that.fromLocationList = that.getFromLocationList();
}
},
showBalanceSelect(items) {
this.$refs.balanceSelect.openPopup(items);
},
getFromLocationList() {
let list = [];
let location = this.dataContent.find(r => r.toLocationCode == this.toLocationCode);
if (location != undefined) {
this.dataContent.forEach(location => {
location.Items.forEach(item => {
item.Locations.forEach(f => {
list.push(f.fromLocationCode)
let item = list.find(l => l == f.fromLocationCode);
if (item == undefined) {
list.push(f.fromLocationCode)
}
})
})
this.fromLocationCode = list[0];
return list;
} else {
this.$refs.comMessage.showErrorMessages('需求库位【' + this.toLocationCode + '】不存在', res => {
this.toLocationCode = '';
});
}
});
this.fromLocationCode = list[0];
return list;
},
fromLocationUpdate(fromlocation) {
@ -215,10 +215,78 @@
this.showErrorMessage('发料库位【' + fromlocation + '】不存在')
}
},
onScan(result) {
onScan1(result) {
try {
let that = this;
if (that.fromLocationCode == '') {
that.showErrorMessage('请选择来源库位', res => {
that.$refs.toLocationCombox.onFocus();
});
return;
}
let packageInfo = result.package;
let itemCode = result.label.itemCode;
let packingCode = result.label.packingNumber;
let lot = result.label.batch;
that.dataContent.forEach(l => {
let item = l.Items.find(r => r.itemCode == itemCode);
if (item == undefined) {
continue;
// that.showErrorMessage('' + itemCode + '',
// res => {
// that.getfocus();
// }
// )
// return;
} else {
//
uni.showLoading({
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that
.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode +
'],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance, packageInfo);
} else {
this.showBalanceSelect(balanceRes.data.list);
}
} else {
this.showErrorMessage(balanceRes.message.message);
}
uni.hideLoading();
});
}
})
} catch (e) {
this.showErrorMessage(e.stack)
uni.hideLoading();
}
},
onScan(result) {
try {
let that = this;
if (that.fromLocationCode == '') {
that.showErrorMessage('请选择来源库位', res => {
that.$refs.toLocationCombox.onFocus();
@ -243,35 +311,37 @@
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance,packageInfo);
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance, packageInfo);
} else {
this.showBalanceSelect(balanceRes.data.list);
}
} else {
this.showBalanceSelect(balanceRes.data.list);
this.showErrorMessage(balanceRes.message.message);
}
} else {
this.showErrorMessage(balanceRes.message.message);
}
uni.hideLoading();
});
uni.hideLoading();
});
}
} catch (e) {
this.showErrorMessage(e.stack)
uni.hideLoading();
}
},
selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance);
},
afterGetBalance(label, balance,packageInfo) {
afterGetBalance(label, balance, packageInfo) {
try {
let that = this;
let itemCode = label.itemCode;
@ -292,11 +362,11 @@
if (batch.Recommends.length > 0) {
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
if (recommend != undefined) {
that.addRecord(batch, label, balance,packageInfo)
that.addRecord(batch, label, balance, packageInfo)
} else {
//
if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
that.addRecord(batch, label, balance,packageInfo);
that.addRecord(batch, label, balance, packageInfo);
} else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',
res => {
@ -306,7 +376,7 @@
}
}
} else {
that.addRecord(batch, label, balance,packageInfo)
that.addRecord(batch, label, balance, packageInfo)
}
} else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
@ -361,14 +431,14 @@
return batch;
},
creatRecord(label, balance,packageInfo) {
creatRecord(label, balance, packageInfo) {
balance.stdPackQty = packageInfo.stdPackQty
balance.stdPackUnit = packageInfo.stdPackUnit
let record = {
itemCode: label.itemCode,
packingNumber: label.packingNumber,
batch: label.batch,
qty: Number(label.qty)>Number(balance.qty)?Number(balance.qty):Number(label.qty),
qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
@ -384,10 +454,11 @@
handleQty += Number(res.qty)
})
batch.handleQty = handleQty;
},
addRecord(batch, label, balance,packageInfo) {
let record = this.creatRecord(label, balance,packageInfo);
addRecord(batch, label, balance, packageInfo) {
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);

67
pages/issue/job/issueDetail.vue

@ -1,27 +1,39 @@
<template>
<view class="page-wraper">
<view class="page-main">
<view style="margin: 5px;">
<job-top :dataContent="jobContent"></job-top>
<view class="card_content">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
申请单号 : {{jobContent.requestNumber}}
</view>
<u-line />
</view>
<scroll-view scroll-y="true" class="">
<view v-for="(toLocation, index) in detailSource">
<com-issue-request-info :workShopCode="jobContent.workShopCode" :dataContent="toLocation">
</com-issue-request-info>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'>
</com-issue-detail-card>
</view>
<uni-collapse ref="mainCollapse" v-for="(toLocation, index) in detailSource">
<uni-collapse-item :open="true">
<template v-slot:title>
<view>
<com-issue-request-info :workShopCode="jobContent.workShopCode"
:dataContent="toLocation">
</com-issue-request-info>
</view>
</template>
<view>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'>
</com-issue-detail-card>
</view>
</uni-collapse-item>
</uni-collapse>
</scroll-view>
</view>
<div class="btn_bottom">
<view class="" style="display: flex;flex-direction: row;">
<view class="">
<button class="btn_commit" hover-class="btn_commit_after" @click="resizeCollapse()">刷新UI</button>
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
</view>
@ -132,10 +144,26 @@
},
},
mounted: function() {
// this.resizeCollapse();
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
// debugger;
this.$refs.comIssueDetailCard.forEach(r => {
r.resizeCollapse();
})
this.$refs.mainCollapse.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
},
//
receive(callback) {
if (this.id != null) {
@ -162,7 +190,11 @@
that.jobContent = res.data;
that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList)
that.resizeCollapse();
setTimeout(r => {
that.resizeCollapse();
}, 100)
uni.hideLoading();
} else {
that.showMessage('列表数据为0');
@ -178,14 +210,6 @@
this.resizeCollapse();
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.comIssueDetailCard.forEach(r => {
r.resizeCollapse();
})
});
},
// submit() {
//3.
//:XXX
@ -366,7 +390,8 @@
}
})
}
// item.handleQty=itemHandleQty;
this.resizeCollapse();
item.handleQty=itemHandleQty;
},
scanPopupGetFocus() {

8
pages/purchaseReceipt/job/receiptDetail.vue

@ -1,8 +1,10 @@
<template>
<view class="page-wraper">
<view style="margin: 5px;">
<job-top :dataContent="jobContent"></job-top>
<view class="card_content">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
发货单号 : {{jobContent.asnNumber}}
</view>
<u-line />

5
pages/purchaseReturn/job/returnDetail.vue

@ -1,6 +1,9 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent" ></job-top>
</view>
<view class="header_item" >
发货单{{jobContent.asnNumber}}
</view>
@ -75,6 +78,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import returnDetailInfoPopup from '@/pages/purchaseReturn/coms/returnDetailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default {
name: 'returnDetail',
@ -84,6 +88,7 @@
comDetailCard,
returnDetailInfoPopup,
comMessage,
jobTop
},
data() {
return {

Loading…
Cancel
Save