lijuncheng 1 year ago
parent
commit
76cbf82798
  1. 2
      mycomponents/container/targetContainer.vue
  2. 2
      mycomponents/recommend/recommend.vue
  3. 2
      pages.json
  4. 11
      pages/inspect/coms/inspectComDetailCard.vue
  5. 6
      pages/pallet/record/bindPalletRecord.vue
  6. 120
      pages/productionReturn/job/returnDetail.vue
  7. 85
      pages/purchaseReturn/record/returnRecord.vue
  8. 1
      static/config.json

2
mycomponents/container/targetContainer.vue

@ -3,7 +3,7 @@
padding-bottom: 15rpx; padding-bottom: 15rpx;
padding-left: 10rpx; padding-left: 10rpx;
padding-right: 10rpx; padding-right: 10rpx;
font-size:32rpx;background-color: #fff;"> font-size:32rpx;">
<text style="font-size: 35rpx;">{{title}} </text> <text style="font-size: 35rpx;">{{title}} </text>
<view class="uni-flex u-col-center" @click="showLocation"> <view class="uni-flex u-col-center" @click="showLocation">
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="containerCode==''&&isShowEdit==true">&nbsp 请扫描</text> <text style="color:#3FBAFF;font-size: 35rpx;" v-if="containerCode==''&&isShowEdit==true">&nbsp 请扫描</text>

2
mycomponents/recommend/recommend.vue

@ -11,7 +11,7 @@
</location> </location>
</view> </view>
<view> <view>
<!-- ||detail.handleQty==0 --> <!-- ||detail.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail" <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false"></recommend-qty> :isShowStdPack="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" <compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)"

2
pages.json

@ -230,7 +230,7 @@
{ {
"path": "pages/inspect/job/inspectFullDetail", "path": "pages/inspect/job/inspectFullDetail",
"style": { "style": {
"navigationBarTitleText": "到货检验(全检)详情", "navigationBarTitleText": "全检检验详情",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },

11
pages/inspect/coms/inspectComDetailCard.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="" style="background-color: #fff;"> <view class="" style="background-color: #fff;">
<view class=""> <view class="">
<view class="" > <view class="">
<view class="cell_box uni-flex uni-row"> <view class="cell_box uni-flex uni-row">
<!-- <view class="cell_info"> <!-- <view class="cell_info">
<view class="text_lightblue">类型</view> <view class="text_lightblue">类型</view>
@ -32,7 +32,8 @@
<uni-collapse ref="collapse1" @change=""> <uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false"> <item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)"
:isShowStdPack="false">
</item-compare-qty> </item-compare-qty>
<view class="" style="margin-left: 20rpx; "> <view class="" style="margin-left: 20rpx; ">
<batch :batch="jobContent.batch"></batch> <batch :batch="jobContent.batch"></batch>
@ -45,7 +46,8 @@
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowPack="isShowPack" :isShowBatch="isShowBatch" <recommend :detail="item" :isShowPack="isShowPack" :isShowBatch="isShowBatch"
:isShowFromLocation="isShowLocation"></recommend> :isShowFromLocation="isShowLocation"></recommend>
<view v-if="item.failedQty>0||item.crackQty>0" :class="item.scaned?'scan_view':''" style="font-size: 32rpx;padding-left: 2px;"> <view v-if="item.failedQty>0||item.crackQty>0" :class="item.scaned?'scan_view':''"
style="font-size: 32rpx;padding-left: 2px;">
<view class="cell_box uni-flex uni-row"> <view class="cell_box uni-flex uni-row">
<view class="cell_info uni-flex uni-row"> <view class="cell_info uni-flex uni-row">
<view class="text_lightblue"> <view class="text_lightblue">
@ -203,7 +205,8 @@
item.notPassedQty = 0; item.notPassedQty = 0;
item.inspectResult = "" item.inspectResult = ""
item.failedReason = "" item.failedReason = ""
item.handleQty = 0; // item.handleQty = 0;
item.handleQty = null;
item.photos = "" item.photos = ""
this.$forceUpdate() this.$forceUpdate()
this.$emit('remove', item) this.$emit('remove', item)

6
pages/pallet/record/bindPalletRecord.vue

@ -16,13 +16,13 @@
</scroll-view> </scroll-view>
</view> </view>
<targetContainer ref="scanContainer" title="托盘" :containerCode="containerCode" @getContainer="getContainer">
</targetContainer>
<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%; ">
<view class=""> <view class="">
<targetContainer ref="scanContainer" title="托盘" :containerCode="containerCode"
@getContainer="getContainer">
</targetContainer>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>

120
pages/productionReturn/job/returnDetail.vue

@ -9,6 +9,7 @@
</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>
</view> </view>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<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">
@ -23,7 +24,6 @@
</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%; ">
@ -39,7 +39,8 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <!-- <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> -->
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> <detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>
</view> </view>
@ -81,13 +82,15 @@
import detailInfoPopup from '@/pages/productionReturn/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/productionReturn/coms/detailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
export default { export default {
name: 'receipt_detail', name: 'receipt_detail',
components: { components: {
winScanButton, winScanButton,
requiredLocation, requiredLocation,
winScanPackAndLocation, // winScanPackAndLocation,
winScanPack,
comDetailCard, comDetailCard,
detailInfoPopup, detailInfoPopup,
comMessage, comMessage,
@ -228,25 +231,28 @@
}, },
openScanPopup() { openScanPopup() {
let fromlocationCode = ''; this.$refs.scanPopup.openScanPopup();
let fromlocationList = []; // let fromlocationCode = '';
for (var i = 0; i < this.detailSource.length; i++) { // let fromlocationList = [];
let item = this.detailSource[i]; // for (var i = 0; i < this.detailSource.length; i++) {
item.subList.forEach(l => { // let item = this.detailSource[i];
// // item.subList.forEach(l => {
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) // //
if (location.length == 0) { // var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
fromlocationList.push(l.fromLocationCode); // if (location.length == 0) {
} // fromlocationList.push(l.fromLocationCode);
// // }
if (fromlocationCode == '') { // //
if (!l.scaned) { // if (fromlocationCode == '') {
fromlocationCode = l.fromLocationCode; // if (!l.scaned) {
} // fromlocationCode = l.fromLocationCode;
} // }
}) // }
} // })
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent); // }
// this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
}, },
@ -270,32 +276,40 @@
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
} else { } else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
']不一致,是否继续上架?', res => {
if (res) {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty) itemDetail.handleQty = Number(result.package.qty)
itemDetail.balance = result.balance; itemDetail.stdPackQty = result.package.stdPackQty
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.stdPackUnit = result.package.stdPackUnit
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty(); this.calcHandleQty();
} else {
this.scanPopupGetFocus();
} //退,退000000 --nxt
}); // let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
} else { // let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
itemDetail.scaned = true; // if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
itemDetail.handleQty = Number(result.balance.qty) // this.showQuestionMessage('[' + balanceStatus + '][' + itemStatus +
itemDetail.balance = result.balance; // '],?', res => {
itemDetail.balance.balanceQty = result.balance.qty; // if (res) {
itemDetail.balance.stdPackQty = result.package.stdPackQty // itemDetail.scaned = true;
itemDetail.balance.stdPackUnit = result.package.stdPackUnit // itemDetail.handleQty = Number(result.balance.qty)
this.calcHandleQty(); // itemDetail.balance = result.balance;
} // itemDetail.balance.balanceQty = result.balance.qty;
// itemDetail.balance.stdPackQty = result.package.stdPackQty
// itemDetail.balance.stdPackUnit = result.package.stdPackUnit
// this.calcHandleQty();
// } else {
// this.scanPopupGetFocus();
// }
// });
// } else {
// itemDetail.scaned = true;
// itemDetail.handleQty = Number(result.balance.qty)
// itemDetail.balance = result.balance;
// itemDetail.balance.balanceQty = result.balance.qty;
// itemDetail.balance.stdPackQty = result.package.stdPackQty
// itemDetail.balance.stdPackUnit = result.package.stdPackUnit
// this.calcHandleQty();
// }
} }
} }
} }
@ -451,14 +465,24 @@
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}, },
// scanPopupGetFocus() {
// this.$refs.scanPopup.getFocus();
// },
// scanPopupLoseFocus() {
// this.$refs.scanPopup.loseFocus();
// },
scanPopupGetFocus() { scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus(); this.$refs.scanPopup.getfocus();
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus(); this.$refs.scanPopup.losefocus();
}, },
showQuestionMessage(message, callback) { showQuestionMessage(message, callback) {
setTimeout(r => { setTimeout(r => {
this.scanPopupLoseFocus(); this.scanPopupLoseFocus();

85
pages/purchaseReturn/record/returnRecord.vue

@ -89,7 +89,7 @@
businessType: {}, // businessType: {}, //
poNumber: '', poNumber: '',
fromType: "", fromType: "",
dataContent : {} dataContent: {}
}; };
}, },
@ -223,6 +223,7 @@
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
//
if (this.fromType == "requestType") { if (this.fromType == "requestType") {
var params = this.setRequestParams(); var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
@ -231,7 +232,7 @@
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成采购退货申请" + res.data, ) this.showCommitSuccessMessage("提交成功<br>生成采购退货申请" + res.data, )
} else { } else {
this.showErrorMessage("提交失败"+res.msg) this.showErrorMessage("提交失败" + res.msg)
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
@ -239,34 +240,25 @@
}) })
} else { } else {
var itemCodes = [] //
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
//退
// //
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setRecordParams(true) var params = this.setRecordParams(true)
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
// purchaseReturnRecordSubmit(params).then(res => { purchaseReturnRecordSubmit(params).then(res => {
// uni.hideLoading() uni.hideLoading()
// if (res.data) { if (res.data) {
// this.showCommitSuccessMessage("<br>退" + res.data ) this.showCommitSuccessMessage("提交成功<br>生成采购退货记录" + res.data)
// } else {
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else { } else {
uni.hideLoading(); this.showErrorMessage("提交失败" + res.msg)
this.showErrorMessage(res.message);
} }
}); }).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} }
@ -279,41 +271,42 @@
setRecordParams(queryModel) { setRecordParams(queryModel) {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.dataContent.creator = creator;
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if (queryModel) { detail.itemCode = detail.itemCode;
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, detail.inventoryStatus = detail.inventoryStatus;
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;; detail.fromPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber detail.toPackingNumber = detail.packingNumber;;
detail.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus detail.fromContainerNumber = detail.containerNumber;
detail.toLocationCode = this.toLocationCode
} else {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber detail.toContainerNumber = detail.containerNumber
detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus detail.fromBatch = detail.batch;
detail.toLocationCode = "" detail.toBatch = detail.batch;
}
detail.fromLocationCode = this.fromLocationCode;
detail.toLocationCode = ''; //退
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.dataContent.subList = subList this.dataContent.subList = subList
this.dataContent.creator = creator; // this.dataContent.jobNumber = '';
return this.dataContent; return this.dataContent;
}, },
setRequestParams(){ setRequestParams() {
var subList = [] var subList = []
var supplierCode="" var supplierCode = ""
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if(supplierCode==""){ if (supplierCode == "") {
supplierCode = detail.package.supplierCode supplierCode = detail.package.supplierCode
} }
subList.push(detail) subList.push(detail)
@ -322,13 +315,13 @@
}) })
this.dataContent.subList = subList this.dataContent.subList = subList
this.dataContent.purchaseReceiptRecordNumber=""; this.dataContent.purchaseReceiptRecordNumber = "";
this.transferMode =""; this.transferMode = "";
this.dataContent.supplierCode = supplierCode this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway" this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门"; this.dataContent.departmentCode = "研发部门";
this.dataContent.status= 1 ; this.dataContent.status = 1;
this.dataContent.autoCommit = "FALSE"; this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE"; this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE"; this.dataContent.autoExecute = "FALSE";
@ -383,7 +376,7 @@
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
if (this.fromType == "requestType") { if (this.fromType == "requestType") {
navigateBack(1) navigateBack(1)
}else { } else {
// //
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];

1
static/config.json

@ -22,6 +22,7 @@
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.180:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",
"liuchen": "http://192.168.0.159:12080/admin-api",
"dev": "http://dev.ccwin-in.com:25100/api/admin-api", "dev": "http://dev.ccwin-in.com:25100/api/admin-api",
"local": "http://localhost:12080", "local": "http://localhost:12080",
"desc": "api请求地址" "desc": "api请求地址"

Loading…
Cancel
Save