lijuncheng 12 months ago
parent
commit
e5ec0b723c
  1. 13
      common/style/pdabasic.css
  2. 7
      mycomponents/item/itemQty.vue
  3. 7
      pages/issue/coms/comIssueDetailCard.vue
  4. 89
      pages/issue/coms/comScanIssuePack.vue
  5. 43
      pages/issue/job/issueDetail.vue
  6. 22
      pages/productionReceipt/job/productionReceiptDetail.vue
  7. 6
      pages/purchaseReceipt/job/receiptDetail.vue
  8. 9
      pages/purchaseReturn/job/returnDetail.vue

13
common/style/pdabasic.css

@ -716,7 +716,20 @@ page {
height: 100%; height: 100%;
} }
.page-header {
background-color: #fff;
font-size: 35rpx;
padding: 10rpx 20rpx;
}
.page-header .header_item {
/* padding-left: 10rpx; */
padding: 5rpx 10rpx;
}
.page-header .header_job_top {
padding:5rpx 0rpx;
}
.page-main { .page-main {
flex: 1; flex: 1;
position: relative; position: relative;

7
mycomponents/item/itemQty.vue

@ -5,6 +5,9 @@
</view> </view>
<view> <view>
<balanceQty v-if="showItemQty" :dataContent="dataContent"></balanceQty> <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>
<!-- <view v-else> <!-- <view v-else>
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false"></recommend-qty> <recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false"></recommend-qty>
@ -17,11 +20,13 @@
<script> <script>
import item from '@/mycomponents/item/item.vue' import item from '@/mycomponents/item/item.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue' import balanceQty from '@/mycomponents/qty/balanceQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default { export default {
components: { components: {
item, item,
balanceQty balanceQty,
compareQty
}, },
data() { data() {
return { return {

7
pages/issue/coms/comIssueDetailCard.vue

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

89
pages/issue/coms/comScanIssuePack.vue

@ -186,26 +186,26 @@
that.fromLocationList = that.getFromLocationList(); that.fromLocationList = that.getFromLocationList();
} }
}, },
showBalanceSelect(items) { showBalanceSelect(items) {
this.$refs.balanceSelect.openPopup(items); this.$refs.balanceSelect.openPopup(items);
}, },
getFromLocationList() { getFromLocationList() {
let list = []; let list = [];
let location = this.dataContent.find(r => r.toLocationCode == this.toLocationCode); this.dataContent.forEach(location => {
if (location != undefined) {
location.Items.forEach(item => { location.Items.forEach(item => {
item.Locations.forEach(f => { item.Locations.forEach(f => {
let item = list.find(l => l == f.fromLocationCode);
if (item == undefined) {
list.push(f.fromLocationCode) list.push(f.fromLocationCode)
}
}) })
}) })
});
this.fromLocationCode = list[0]; this.fromLocationCode = list[0];
return list; return list;
} else {
this.$refs.comMessage.showErrorMessages('需求库位【' + this.toLocationCode + '】不存在', res => {
this.toLocationCode = '';
});
}
}, },
fromLocationUpdate(fromlocation) { fromLocationUpdate(fromlocation) {
@ -215,10 +215,78 @@
this.showErrorMessage('发料库位【' + fromlocation + '】不存在') this.showErrorMessage('发料库位【' + fromlocation + '】不存在')
} }
}, },
onScan(result) { onScan1(result) {
try { try {
let that = this; 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 == '') { if (that.fromLocationCode == '') {
that.showErrorMessage('请选择来源库位', res => { that.showErrorMessage('请选择来源库位', res => {
that.$refs.toLocationCombox.onFocus(); that.$refs.toLocationCombox.onFocus();
@ -243,7 +311,8 @@
title: '加载中', title: '加载中',
mask: true mask: true
}) })
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, balanceRes => { getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) { if (balanceRes.success) {
if (balanceRes.data.list.length == 0) { if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录', this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
@ -267,6 +336,7 @@
uni.hideLoading(); uni.hideLoading();
} }
}, },
selectBalanceItem(balance) { selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance); this.afterGetBalance(this.label, balance);
}, },
@ -384,6 +454,7 @@
handleQty += Number(res.qty) handleQty += Number(res.qty)
}) })
batch.handleQty = handleQty; batch.handleQty = handleQty;
}, },
addRecord(batch, label, balance, packageInfo) { addRecord(batch, label, balance, packageInfo) {

43
pages/issue/job/issueDetail.vue

@ -1,18 +1,20 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-main"> <view class="page-main">
<view style="margin: 5px;"> <view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top> <job-top :dataContent="jobContent"></job-top>
<view class="card_content">
申请单号 : {{jobContent.requestNumber}}
</view> </view>
<u-line /> <view class="header_item">
申请单号 : {{jobContent.requestNumber}}
</view> </view>
</view>
<scroll-view scroll-y="true" class=""> <scroll-view scroll-y="true" class="">
<view v-for="(toLocation, index) in detailSource"> <view v-for="(toLocation, index) in detailSource">
<com-issue-request-info :workShopCode="jobContent.workShopCode" :dataContent="toLocation"> <com-issue-request-info :workShopCode="jobContent.workShopCode" :dataContent="toLocation">
</com-issue-request-info> </com-issue-request-info>
<u-line />
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'> <com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'>
</com-issue-detail-card> </com-issue-detail-card>
</view> </view>
@ -22,6 +24,7 @@
<div class="btn_bottom"> <div class="btn_bottom">
<view class="" style="display: flex;flex-direction: row;"> <view class="" style="display: flex;flex-direction: row;">
<view class=""> <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> <button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view> </view>
</view> </view>
@ -132,10 +135,25 @@
}, },
}, },
mounted: function() { mounted: function() {
// this.resizeCollapse();
}, },
methods: { 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) { receive(callback) {
if (this.id != null) { if (this.id != null) {
@ -162,7 +180,11 @@
that.jobContent = res.data; that.jobContent = res.data;
that.subList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList) that.detailSource = getDataSource(that.detailSource, that.subList)
setTimeout(r => {
that.resizeCollapse(); that.resizeCollapse();
}, 100)
uni.hideLoading(); uni.hideLoading();
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
@ -178,14 +200,6 @@
this.resizeCollapse(); this.resizeCollapse();
}, },
resizeCollapse() {
this.$nextTick(r => {
this.$refs.comIssueDetailCard.forEach(r => {
r.resizeCollapse();
})
});
},
// submit() { // submit() {
//3. //3.
//:XXX //:XXX
@ -366,7 +380,8 @@
} }
}) })
} }
// item.handleQty=itemHandleQty; this.resizeCollapse();
item.handleQty = itemHandleQty;
}, },
scanPopupGetFocus() { scanPopupGetFocus() {

22
pages/productionReceipt/job/productionReceiptDetail.vue

@ -1,21 +1,29 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
发料任务单号 : {{jobContent.issueJobNumber}}
</view>
<u-line />
</view>
<scroll-view scroll-y="true" class="">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<com-detail-card :dataContent="item" :index="index" :settingParam="jobContent" <com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationTypeList='tolocationTypeList'> :locationTypeList='tolocationTypeList'>
</com-detail-card> </com-detail-card>
</view>
<u-line /> <u-line />
</view> </view>
</view>
</scroll-view> </scroll-view>
</view> </view>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
@ -75,6 +83,8 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default { export default {
components: { components: {
@ -83,7 +93,9 @@
comMessage, comMessage,
requiredLocation, requiredLocation,
comDetailCard, comDetailCard,
detailInfoPopup detailInfoPopup,
comIssueRequestInfo,
jobTop
}, },
data() { data() {
return { return {

6
pages/purchaseReceipt/job/receiptDetail.vue

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

9
pages/purchaseReturn/job/returnDetail.vue

@ -1,10 +1,13 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header"> <view class="page-header">
<view class="" style="font-size: 35rpx;margin-top: 20rpx;margin-bottom: 20rpx;margin-left: 10rpx;"> <view class="header_job_top">
<job-top :dataContent="jobContent" ></job-top>
</view>
<view class="header_item" >
发货单{{jobContent.asnNumber}} 发货单{{jobContent.asnNumber}}
</view> </view>
<view class="" style="font-size: 35rpx;margin-top: 20rpx;margin-left: 10rpx;"> <view class="header_item" >
供应商{{jobContent.supplierCode}} 供应商{{jobContent.supplierCode}}
</view> </view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line> <u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
@ -75,6 +78,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import returnDetailInfoPopup from '@/pages/purchaseReturn/coms/returnDetailInfoPopup.vue' import returnDetailInfoPopup from '@/pages/purchaseReturn/coms/returnDetailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default { export default {
name: 'returnDetail', name: 'returnDetail',
@ -84,6 +88,7 @@
comDetailCard, comDetailCard,
returnDetailInfoPopup, returnDetailInfoPopup,
comMessage, comMessage,
jobTop
}, },
data() { data() {
return { return {

Loading…
Cancel
Save