niexiting 1 year ago
parent
commit
094644ba3f
  1. 8
      api/httpRequest3.js
  2. 6
      mycomponents/recommend/recommend.vue
  3. 38
      mycomponents/scan/winScanPackAndPosition.vue
  4. 113
      mycomponents/scan/winScanProdline.vue
  5. 31
      pages.json
  6. 4
      pages/count/job/countDetail.vue
  7. 6
      pages/count/record/countRecord.vue
  8. 4
      pages/customerReturn/job/returnDetail.vue
  9. 11
      pages/customerReturn/record/returnRecord.vue
  10. 4
      pages/customerReturn/request/customerReturnRequest.vue
  11. 11
      pages/deliver/record/deliverRecord.vue
  12. 3
      pages/deliver/request/deliverRequest.vue
  13. 6
      pages/inventoryMove/coms/comMove.vue
  14. 3
      pages/issue-按批次推荐/job/issueDetail.vue
  15. 2
      pages/issue/record/issueRecord.vue
  16. 3
      pages/issue/request/issueRequest.vue
  17. 3
      pages/login/index.vue
  18. 9
      pages/package/record/mergePackageRecord.vue
  19. 7
      pages/package/record/overPackageRecord.vue
  20. 7
      pages/package/record/splitPackageRecord.vue
  21. 2
      pages/pallet/record/bindPalletRecord.vue
  22. 4
      pages/pallet/record/unBindPalletRecord.vue
  23. 6
      pages/productDismantle/record/productDismantleRecord.vue
  24. 2
      pages/productPutaway/job/productPutawayDetail.vue
  25. 16
      pages/productPutaway/record/productPutawayRecord.vue
  26. 4
      pages/productPutaway/request/putawayRequest.vue
  27. 36
      pages/productReceipt/job/productReceiptDetail.vue
  28. 44
      pages/productReceipt/record/productReceiptRecord.vue
  29. 9
      pages/productionReceipt/record/productionReceiptRecord.vue
  30. 16
      pages/productionReturn/coms/comReturn.vue
  31. 3
      pages/productionReturn/coms/comReturnCommonRequest.vue
  32. 51
      pages/productionReturn/coms/comReturnRecordTitle.vue
  33. 6
      pages/productionReturn/job/returnDetail.vue
  34. 451
      pages/productionReturn/record/returnToHold.vue
  35. 142
      pages/productionReturn/record/returnToStore.vue
  36. 4
      pages/purchaseReceipt/job/receiptDetail.vue
  37. 2
      pages/purchaseReturn/job/returnDetail.vue
  38. 2
      pages/purchaseReturn/record/returnRecord.vue
  39. 3
      pages/purchaseReturn/request/returnRequest.vue
  40. 2
      pages/purchaseReturn/request/returnRequestCreate.vue
  41. 4
      pages/putaway/record/putawayRecord.vue
  42. 4
      pages/putaway/request/putawayRequest.vue
  43. 17
      pages/query/container.vue
  44. 2
      pages/query/item.vue
  45. 12
      pages/query/item_copy.vue
  46. 9
      pages/query/location.vue
  47. 3
      pages/query/location_copy.vue
  48. 28
      pages/repleinsh/record/repleinshRecord.vue
  49. 22
      pages/scrap/record/scrapRecord.vue
  50. 6
      pages/scrap/request/scrapRequestCreate.vue
  51. 8
      pages/setter/index.vue
  52. 6
      pages/supplierDeliver/coms/comRecordDetailCard.vue
  53. 24
      pages/supplierDeliver/record/supplierDeliverRecordDetail.vue
  54. 16
      pages/transfer/coms/comTransferRecord.vue
  55. 6
      pages/unPlanned/job/receiptJobDetail.vue
  56. 11
      pages/unPlanned/record/issueRecord.vue
  57. 7
      pages/unPlanned/record/receiptRecord.vue
  58. 4
      pages/unPlanned/request/issueRequest.vue
  59. 6
      pages/unPlanned/request/issueRequestCreate.vue
  60. 3
      pages/unPlanned/request/receiptRequest.vue
  61. 2
      static/config.json
  62. 2
      uni_modules/vk-uview-ui/components/u-select/u-select.vue

8
api/httpRequest3.js

@ -27,15 +27,15 @@ function service(options = {}) {
if(res.data.code==0){ if(res.data.code==0){
resolve(res.data); resolve(res.data);
}else { }else {
reject("系统:"+res.data.msg) reject("系统异常:"+res.data.msg)
} }
}else { }else {
reject("系统:"+ res.data.msg) reject("系统异常:"+ res.data.msg)
} }
} else { } else {
reject("系统:"+res.data.msg) reject("系统异常:"+res.data.msg)
} }
}; };
options.fail = (error) => { options.fail = (error) => {
@ -47,7 +47,7 @@ function service(options = {}) {
} else if (message.includes('Request failed with status code')) { } else if (message.includes('Request failed with status code')) {
message = '接口' + message.substr(message.length - 3) + '异常' message = '接口' + message.substr(message.length - 3) + '异常'
} }
reject("系统:"+message); reject("系统异常:"+message);
}; };
uni.request(options); uni.request(options);
}); });

6
mycomponents/recommend/recommend.vue

@ -13,7 +13,7 @@
<view> <view>
<!-- ||detail.handleQty==0 可能会有扫描到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" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" <compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false"> :handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty> </compare-qty>
@ -69,6 +69,10 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: { locationTitle: {
type: String, type: String,

38
mycomponents/scan/winScanPackAndPosition.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()"> <uni-popup ref="popup" @maskClick="closeScanPopup()">
<view class="popup_box"> <view class="popup_box">
<view class="pop_title uni-flex space-between"> <view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;"> <view class="" style="font-size: 35rpx;">
@ -178,24 +178,24 @@
this.productionLineName = e[1].label this.productionLineName = e[1].label
this.workStationName = e[2].label this.workStationName = e[2].label
let shop = this.positionList.find(shop => shop.value == this.workshopCode); // let shop = this.positionList.find(shop => shop.value == this.workshopCode);
if (shop != undefined && shop.children != undefined) { // if (shop != undefined && shop.children != undefined) {
let prodLine = shop.children.find(line => line.value == this.productionLineCode); // let prodLine = shop.children.find(line => line.value == this.productionLineCode);
if (prodLine != undefined && prodLine.children != undefined) { // if (prodLine != undefined && prodLine.children != undefined) {
let station = prodLine.children.find(r => r.value == this.workStationCode); // let station = prodLine.children.find(r => r.value == this.workStationCode);
if (station.rawLocationCode == '' && station.rawLocationCode == null) { // if (station.rawLocationCode == '' && station.rawLocationCode == null) {
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择") // this.showErrorMessage(this.workStationName + ",")
return; // return;
} else { // } else {
this.rawLocationCode = station.rawLocationCode; // this.rawLocationCode = station.rawLocationCode;
this.fgLocationCode = station.fgLocationCode; // this.fgLocationCode = station.fgLocationCode;
} // }
} else { // } else {
this.showErrorMessage("生产线-工位基础信息维护错误") // this.showErrorMessage("线-")
} // }
} else { // } else {
this.showErrorMessage("车间-生产线基础信息维护错误") // this.showErrorMessage("-线")
} // }
}, },
} }
} }

113
mycomponents/scan/winScanProdline.vue

@ -1,113 +0,0 @@
<template>
<uni-popup ref="popup" :maskClick='false'>
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描生产线
</view>
<view>
<image class=" icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()">
</image>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="scan" @getResultult="getScanResult" placeholder='生产线' :clearResult="false"
:boxFocus="true" :isShowHistory="false">
</win-com-scan>
</view>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</template>
<script>
import {
getProductionlineByCode,
} from '@/api/request.js';
import {
getListLocationTypeDesc,
checkDirectoryItemExist
} from '@/common/directory.js';
import winComScan from '@/mycomponents/scan/winComScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
export default {
components: {
winComScan,
comMessage
},
emits: ["getProdLine"],
props: {},
data() {
return {
code: '',
prodLine: {}
}
},
created() {
},
methods: {
openScanPopup() {
this.$refs.popup.open('bottom')
},
closeScanPopup() {
this.$refs.popup.close()
},
scanClick() {
this.$refs.scan.clickScanMsg();
},
cancelClick() {
this.$refs.scan.clearScanValue();
},
getScanResult(result) {
uni.showLoading({
title: '扫描中...',
mask: true
});
let label = result.label;
if (label.barType === 'QRCode') {
this.code = label.ProdLineCode;
} else if (label.barType === 'BarCode') {
this.code = label.Code;
}
getProductionlineByCode(this.code).then(res => {
if (res.data.total > 0) {
this.prodLine = res.data.list[0];
this.callBack();
} else {
this.showErrorMessage('未查询到生产线[' + this.code + ']')
}
uni.hideLoading();
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error)
})
},
callBack() {
this.closeScanPopup();
this.$emit("getProdLine", this.prodLine, this.code);
},
getfocus() {
this.$refs.scan.getfocus();
},
losefocus() {
this.$refs.scan.losefocus();
},
showErrorMessage(message) {
setTimeout(r => {
this.losefocus();
this.$refs.comMessage.showErrorMessage(message, res => {
this.code = '';
this.getfocus();
})
})
}
}
}
</script>
<style>
</style>

31
pages.json

@ -14,7 +14,14 @@
"path": "pages/message/index", "path": "pages/message/index",
"style": { "style": {
"navigationBarTitleText": "消息", "navigationBarTitleText": "消息",
"enablePullDownRefresh": true "enablePullDownRefresh": true,
"titleNView": {
// "autoBackButton": "true",
"buttons": [
]
}
} }
}, },
@ -35,17 +42,12 @@
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
"titleNView": { "titleNView": {
// "autoBackButton": "true", // "autoBackButton": "true",
// "buttons": [ "buttons": [
// //
// {
// "float": "right",
// "fontSize": "52rpx", //
// "text": "\ue706",
// "fontSrc": "/static/ali_icon/iconfont.ttf"
// }
// ] ]
} }
} }
}, },
{ {
@ -1704,7 +1706,14 @@
"path": "pages/setter/index", "path": "pages/setter/index",
"style": { "style": {
"navigationBarTitleText": "设置", "navigationBarTitleText": "设置",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"titleNView": {
// "autoBackButton": "true",
"buttons": [
]
}
} }
}, },
{ {

4
pages/count/job/countDetail.vue

@ -288,11 +288,15 @@
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent); this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
}, },
closeScanPopup() { closeScanPopup() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.packGetFocus(); this.$refs.scanPopup.packGetFocus();
}
}, },
getScanResult(result) { getScanResult(result) {

6
pages/count/record/countRecord.vue

@ -116,7 +116,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message ); this.showErrorMessage(res.message)
} }
}); });
@ -218,11 +218,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.packGetFocus(); this.$refs.scanPopup.packGetFocus();
}
}, },
getScanResult(result) { getScanResult(result) {

4
pages/customerReturn/job/returnDetail.vue

@ -466,11 +466,15 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.packGetFocus(); this.$refs.scanPopup.packGetFocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.packLoseFocus(); this.$refs.scanPopup.packLoseFocus();
}
}, },
afterCloseMessage() { afterCloseMessage() {

11
pages/customerReturn/record/returnRecord.vue

@ -218,11 +218,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {
@ -388,14 +392,17 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData()
})
},
clearData(){
this.fromLocationCode = ''; this.fromLocationCode = '';
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {} this.dataContent = {}
this.toWarehouseCode = "" this.toWarehouseCode = ""
})
}, },
updateData() { updateData() {

4
pages/customerReturn/request/customerReturnRequest.vue

@ -33,9 +33,7 @@
goHome, goHome,
updateTitle updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
getCustomerReturnRequestList, getCustomerReturnRequestList,
} from '@/api/request2.js'; } from '@/api/request2.js';

11
pages/deliver/record/deliverRecord.vue

@ -251,11 +251,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {
@ -423,14 +427,17 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){
this.fromLocationCode = ''; this.fromLocationCode = '';
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {} this.dataContent = {}
this.toWarehouseCode = "" this.toWarehouseCode = ""
})
}, },
updateData() { updateData() {

3
pages/deliver/request/deliverRequest.vue

@ -33,9 +33,6 @@
goHome, goHome,
updateTitle updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
getDeliverRequestList, getDeliverRequestList,
} from '@/api/request2.js'; } from '@/api/request2.js';

6
pages/inventoryMove/coms/comMove.vue

@ -271,14 +271,16 @@
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData()
})
},
clearData(){
this.fromLocationCode = ''; this.fromLocationCode = '';
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {} this.dataContent = {}
this.toWarehouseCode = "" this.toWarehouseCode = ""
})
}, },
commit() { commit() {

3
pages/issue-按批次推荐/job/issueDetail.vue

@ -597,10 +597,11 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {

2
pages/issue/record/issueRecord.vue

@ -104,7 +104,7 @@
this.toInventoryStatuses = res.toInventoryStatuses this.toInventoryStatuses = res.toInventoryStatuses
this.goScan(true) this.goScan(true)
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });

3
pages/issue/request/issueRequest.vue

@ -36,9 +36,6 @@
clearTirmAndWrap clearTirmAndWrap
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
getIssueRequestList, getIssueRequestList,
issueRequestClose, issueRequestClose,

3
pages/login/index.vue

@ -67,7 +67,7 @@
style="background-color: lightgray;padding-top: 40rpx;padding-bottom: 40rpx;margin-right: 20rpx;" /> style="background-color: lightgray;padding-top: 40rpx;padding-bottom: 40rpx;margin-right: 20rpx;" />
</view> --> </view> -->
<view class="uni-input-wrapper"> <view class="uni-input-wrapper">
<input class="" style="height: 80rpx; background-color: #EEEEEE;margin-right: 20rpx;" <input class="" style="height: 80rpx; background-color: #F7F9FF;margin-right: 20rpx;"
placeholder="请输入验证码" type="number" v-model="code" /> placeholder="请输入验证码" type="number" v-model="code" />
</view> </view>
<view class="display: flex; align-items: center; text-center"> <view class="display: flex; align-items: center; text-center">
@ -143,6 +143,7 @@
url:"/pages/config/config" url:"/pages/config/config"
}) })
} }
}, },
onLoad() { onLoad() {
getCaptchaImage().then(res => { getCaptchaImage().then(res => {

9
pages/package/record/mergePackageRecord.vue

@ -35,7 +35,8 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false"></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationTypeList="fromlocationTypeList"></win-scan-location>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>
@ -118,7 +119,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });
}, },
@ -219,11 +220,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {

7
pages/package/record/overPackageRecord.vue

@ -30,7 +30,8 @@
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false"></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-button @goScan='showScanPopupPack'></win-scan-button> <win-scan-button @goScan='showScanPopupPack'></win-scan-button>
@ -243,11 +244,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {

7
pages/package/record/splitPackageRecord.vue

@ -29,7 +29,8 @@
</view> </view>
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false"></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-button @goScan='showScanPopupPack'></win-scan-button> <win-scan-button @goScan='showScanPopupPack'></win-scan-button>
@ -243,11 +244,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {

2
pages/pallet/record/bindPalletRecord.vue

@ -111,7 +111,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });
}, },

4
pages/pallet/record/unBindPalletRecord.vue

@ -246,11 +246,15 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
}
}, },

6
pages/productDismantle/record/productDismantleRecord.vue

@ -119,7 +119,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });
}, },
@ -214,11 +214,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {

2
pages/productPutaway/job/productPutawayDetail.vue

@ -39,7 +39,7 @@
</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>
<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>

16
pages/productPutaway/record/productPutawayRecord.vue

@ -43,7 +43,6 @@
</template> </template>
<script> <script>
import { import {
productPutawayRecordSubmit productPutawayRecordSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
@ -105,7 +104,7 @@
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
managementList:[] managementList: []
}; };
}, },
onLoad(option) { onLoad(option) {
@ -133,8 +132,7 @@
onPullDownRefresh() {}, onPullDownRefresh() {},
mounted() { mounted() {},
},
methods: { methods: {
getScanResult(result) { getScanResult(result) {
let balance = result.balance; let balance = result.balance;
@ -214,11 +212,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {
@ -381,13 +383,15 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){
this.fromLocationCode = ''; this.fromLocationCode = '';
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {} this.dataContent = {}
})
}, },
updateData() { updateData() {

4
pages/productPutaway/request/putawayRequest.vue

@ -36,9 +36,7 @@
updateTitle, updateTitle,
clearTirmAndWrap clearTirmAndWrap
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
getProductPutawayRequestList, getProductPutawayRequestList,
productPutawayRequestClose, productPutawayRequestClose,

36
pages/productReceipt/job/productReceiptDetail.vue

@ -14,8 +14,7 @@
<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="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" <comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" @remove="updateData" @updateData="updateData" :locationTypeList='tolocationTypeList'>
:locationTypeList='tolocationTypeList'>
</comProductDetailCard> </comProductDetailCard>
</view> </view>
<u-line /> <u-line />
@ -27,8 +26,9 @@
<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="">
<requiredLocation title="收货库位" :locationCode="toLocationCode" :isShowEdit="jobContent.allowModifyLocation=='TRUE'" <requiredLocation title="收货库位" :locationCode="toLocationCode"
@getLocation='scanLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation> :isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
</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>
@ -214,9 +214,9 @@
if (itemDetail == undefined) { if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中") this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中")
} else { } else {
if(itemDetail.scaned){ if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
}else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty); itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode; itemDetail.toLocationCode = this.toLocationCode;
@ -268,7 +268,7 @@
checkLocation() { checkLocation() {
var isPass = true; var isPass = true;
if (this.toLocationCode == ""||this.toLocationCode ==null) { if (this.toLocationCode == "" || this.toLocationCode == null) {
this.showMessageHint('请扫描收货库位', callback => { this.showMessageHint('请扫描收货库位', callback => {
this.$refs.comScanLocation.showLocation(); this.$refs.comScanLocation.showLocation();
}) })
@ -299,14 +299,14 @@
// //
if(this.scanCount == this.subList.length){ if (this.scanCount == this.subList.length) {
this.submitJob(); this.submitJob();
}else if(this.scanCount <this.subList.length){ } else if (this.scanCount < this.subList.length) {
// //
if(this.jobContent.allowPartialComplete == "TRUE"){ if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.submitJob();
}else { } else {
// //
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length + .length +
@ -316,7 +316,7 @@
}, },
submitJob(){ submitJob() {
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
@ -325,11 +325,11 @@
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
itemCodes.push(item.itemCode) itemCodes.push(item.itemCode)
}) })
getManagementPrecisions(itemCodes,this.toLocationCode, res => { getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams(); var params = this.setParams();
console.log("提交参数",JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
productReceiptJobsubmit(params).then(res => { productReceiptJobsubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
@ -360,24 +360,28 @@
detail.toPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
detail.toInventoryStatus =detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode detail.toLocationCode = this.toLocationCode
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.jobContent.subList = subList this.jobContent.subList = subList
this.jobContent.creator =creator; this.jobContent.creator = creator;
return this.jobContent; return this.jobContent;
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
}
}, },
showMessage(message) { showMessage(message) {

44
pages/productReceipt/record/productReceiptRecord.vue

@ -8,8 +8,8 @@
<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">
<view class=""> <view class="">
<com-product-record :dataContent="item" :index="index" <com-product-record :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> @updateData="updateData" @removePack="removePack">
</com-product-record> </com-product-record>
</view> </view>
<u-line /> <u-line />
@ -94,19 +94,19 @@
fromLocationTypeList: [], fromLocationTypeList: [],
fromLocationCode: "", fromLocationCode: "",
businessType: {}, businessType: {},
dataContent:{}, dataContent: {},
managementList:[], managementList: [],
show:false, show: false,
positionInfo:"请选择位置", positionInfo: "请选择位置",
positionList:[], positionList: [],
productionLineCode:'', productionLineCode: '',
rawLocationCode:"", rawLocationCode: "",
fgLocationCode:"", fgLocationCode: "",
workshopCode :"", workshopCode: "",
workStationCode :"", workStationCode: "",
workShopName :"", workShopName: "",
productionLineName :"", productionLineName: "",
workStationName :"", workStationName: "",
}; };
}, },
onLoad(option) { onLoad(option) {
@ -362,11 +362,15 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
}
}, },
afterCloseMessage() { afterCloseMessage() {
@ -379,14 +383,16 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {}; this.dataContent = {};
this.positionInfo= "请选择位置"; this.positionInfo = "请选择位置";
this.fgLocationCode ="" this.fgLocationCode = ""
})
}, },
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {

9
pages/productionReceipt/record/productionReceiptRecord.vue

@ -115,7 +115,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message ); this.showErrorMessage(res.message)
} }
}); });
}, },
@ -130,8 +130,7 @@
onPullDownRefresh() {}, onPullDownRefresh() {},
mounted() { mounted() {},
},
methods: { methods: {
getScanResult(result) { getScanResult(result) {
let balance = result.balance; let balance = result.balance;
@ -207,11 +206,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {

16
pages/productionReturn/coms/comReturn.vue

@ -8,8 +8,8 @@
<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">
<view class=""> <view class="">
<comReturnRecord :dataContent="item" :index="index" <comReturnRecord :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> @updateData="updateData" @removePack="removePack">
</comReturnRecord> </comReturnRecord>
</view> </view>
<u-line /> <u-line />
@ -140,7 +140,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup(); this.openScanPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });
getWorkShopLineStation().then(res => { getWorkShopLineStation().then(res => {
@ -415,23 +415,29 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
}
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {}; this.dataContent = {};
this.positionInfo = "请选择位置"; this.positionInfo = "请选择位置";
this.fgLocationCode = "" this.fgLocationCode = ""
})
}, },
confirmSelect(e) { confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label

3
pages/productionReturn/coms/comReturnCommonRequest.vue

@ -30,9 +30,6 @@
import requestInfoPopup from '@/pages/productionReturn/coms/requestInfoPopup.vue' import requestInfoPopup from '@/pages/productionReturn/coms/requestInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue' import requestButton from '@/mycomponents/button/requestButton.vue'
import {
getBusinessType,
} from '@/common/record.js';
import { import {
getProductionReturnRequestList, getProductionReturnRequestList,
productionReturnRequestHandle, productionReturnRequestHandle,

51
pages/productionReturn/coms/comReturnRecordTitle.vue

@ -0,0 +1,51 @@
<template>
<view class="header_job_top">
<view class="cen_card">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">车间</view>
<view>{{workshopCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">生产线</view>
<view>{{productionLineCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">工位</view>
<view>{{ workStationCode }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
watch: {},
props: {
workshopCode: {
type: String,
default: ""
},
productionLineCode: {
type: String,
default: ""
},
workStationCode: {
type: String,
default: ""
},
},
methods: {}
}
</script>
<style>
</style>

6
pages/productionReturn/job/returnDetail.vue

@ -497,15 +497,17 @@
// }, // },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
}
}, },
showQuestionMessage(message, callback) { showQuestionMessage(message, callback) {
setTimeout(r => { setTimeout(r => {
this.scanPopupLoseFocus(); this.scanPopupLoseFocus();

451
pages/productionReturn/record/returnToHold.vue

@ -1,29 +1,468 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comReturn businessTypeCode="ReturnToHold" > </comReturn> <view class="">
<com-blank-view @goScan='openScanPopup(true)' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<comReturnRecordTitle :workshopCode="workshopCode" :productionLineCode="productionLineCode"
:workStationCode="workStationCode"></comReturnRecordTitle>
</view>
<u-line />
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comReturnRecord :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack">
</comReturnRecord>
</view>
<u-line />
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup(false)'></win-scan-button>
</view>
<winScanPackAndPosition ref="scanPopup" @getResult='getScanResult'></winScanPackAndPosition>
<comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
<script> <script>
import comReturn from '@/pages/productionReturn/coms/comReturn.vue' import {
productionReturnRecordSubmit,
} from '@/api/request2.js';
import {
goHome,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
getPrecisionStrategyList,
getPrecisionStrategyParams
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comReturnRecord from '@/pages/productionReturn/coms/comReturnRecord.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanPackAndPosition from "@/mycomponents/scan/winScanPackAndPosition.vue"
import comReturnRecordTitle from '@/pages/productionReturn/coms/comReturnRecordTitle.vue'
export default { export default {
name: 'comReturn',
components: { components: {
comReturn winScanButton,
comReturnRecordTitle,
requiredLocation,
comBlankView,
comMessage,
comReturnRecord,
winScanPack,
winScanPackAndPosition
}, },
data() {
watch: {},
data() {
return { return {
id: '',
dataContent: {}, //
subList: [], //subList
detailSource: [], //
fromLocationCode: '',
fromLocationTypeList: [],
toLocationCode: '',
tolocationTypeList: [],
businessType: {},
inventoryStatus: '',
managementList: [],
show: false,
positionList: [],
productionLineCode: '',
rawLocationCode: "",
fgLocationCode: "",
workshopCode: "",
workStationCode: "",
workShopName: "",
productionLineName: "",
workStationName: "",
businessTypeCode: "ReturnToHold",
positionInfo: "",
recommendLocationList: [], //
};
},
onLoad() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup(true);
} else {
this.showErrorMessage(res.message)
}
});
},
mounted() {
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} }
}, },
//
onBackPress(e) {},
onLoad(option) { onPullDownRefresh() {
uni.stopPullDownRefresh();
}, },
methods: { methods: {
openScanPopup(isEditPosition) {
this.$refs.scanPopup.openScanPopup(isEditPosition);
},
getScanResult(result, param) {
this.positionInfo = param.positionInfo;
this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode;
this.workStationCode = param.workStationCode;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == label.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = "HOLD";
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber &&
r.batch == label.batch) {
return r;
}
})
if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = "HOLD";
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]已经在列表中")
}
}
}
this.calcHandleQty();
},
createItemInfo(label, pack) {
let item = {
itemCode: label.itemCode,
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
qty: Number(label.qty),
handleQty: 0,
uom: pack.uom,
subList: []
}
return item;
},
createDetailInfo(label, pack) {
let detail = {};
Object.assign(detail, label)
detail.scaned = true;
detail.qty = Number(label.qty);
detail.inventoryStatus = "HOLD"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
detail.package = pack;
detail.label = label;
return detail;
},
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
}
}
}
this.scanPopupGetFocus();
this.$forceUpdate();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
},
showSelect() {
this.show = !this.show
},
updateData() {
this.calcHandleQty();
},
removeData(item) {
for (let i = 0; i < this.detailSource.length; i++) {
if (this.detailSource[i].itemCode == item.itemCode) {
this.detailSource.splice(i, 1)
}
}
},
commit() {
if (this.positionInfo == "请选择位置") {
this.showMessage("请先选择位置")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
title: "提交中....",
mask: true
});
this.managementList = [];
var precisionStrategParams = getPrecisionStrategyParams(this.detailSource)
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
productionReturnRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成退料收货记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
})
} else {
this.showErrorMessage("没有要提交的数据,请先扫描")
}
},
setPrecisionStrategParams() {
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
return res
}
})
//
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
} }
})
})
return itemList;
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = info.packingNumber;
detail.toPackingNumber = info.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
detail.fromBatch = info.batch;
detail.toBatch = info.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.toLocationCode;
detail.productionlineCode = this.productionLineCode;
detail.workStationCode = this.workStationCode;
subList.push(detail)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.workshopCode = this.workshopCode;
this.dataContent.businessType = this.businessTypeCode;
return this.dataContent;
},
showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
showErrorMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo = "请选择位置";
}
}
} }
</script> </script>
<style> <style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style> </style>

142
pages/productionReturn/record/returnToStore.vue

@ -1,27 +1,20 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view> <com-blank-view @goScan='openScanPopup(true)' v-if="detailSource.length==0"></com-blank-view>
</view> </view>
<view class="page-wraper" v-if="detailSource.length>0"> <view class="page-wraper" v-if="detailSource.length>0">
<view class=""> <view class="page-header">
<view class="uni-flex uni-row u-col-center" style="margin: 10rpx;"> <comReturnRecordTitle :workshopCode="workshopCode" :productionLineCode="productionLineCode"
<text style="font-size: 32rpx;margin-left: 20rpx;">位置 : </text> :workStationCode="workStationCode"></comReturnRecordTitle>
<view class="uni-flex u-col-center uni-row">
<view class="" style="margin-left: 20rpx;font-size: 30rpx;">
{{positionInfo}}
</view>
</view>
</view> </view>
<u-line /> <u-line />
</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">
<view class=""> <view class="">
<comReturnRecord :dataContent="item" :index="index" <comReturnRecord :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> @updateData="updateData" @removePack="removePack">
</comReturnRecord> </comReturnRecord>
</view> </view>
<u-line /> <u-line />
@ -39,7 +32,7 @@
</view> </view>
</view> </view>
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup(false)'></win-scan-button>
</view> </view>
<winScanPackAndPosition ref="scanPopup" @getResult='getScanResult'></winScanPackAndPosition> <winScanPackAndPosition ref="scanPopup" @getResult='getScanResult'></winScanPackAndPosition>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -49,12 +42,12 @@
<script> <script>
import { import {
productionReturnRecordSubmit, productionReturnRecordSubmit,
getWorkShopLineStation getPutawayRecommendLocation
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
getPackingNumberAndBatchByList getPackingNumberAndBatchByList,
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -63,12 +56,10 @@
import { import {
getBusinessType, getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js'; } from '@/common/record.js';
import { import {
getPrecisionStrategyList getPrecisionStrategyList,
getPrecisionStrategyParams
} from '@/common/balance.js'; } from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -78,13 +69,15 @@
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanPackAndPosition from "@/mycomponents/scan/winScanPackAndPosition.vue" import winScanPackAndPosition from "@/mycomponents/scan/winScanPackAndPosition.vue"
import comReturnRecordTitle from '@/pages/productionReturn/coms/comReturnRecordTitle.vue'
export default { export default {
name: 'comReturn', name: 'comReturn',
components: { components: {
winScanButton, winScanButton,
// comReturnRecord, comReturnRecordTitle,
requiredLocation, requiredLocation,
comBlankView, comBlankView,
comMessage, comMessage,
@ -118,8 +111,10 @@
workShopName: "", workShopName: "",
productionLineName: "", productionLineName: "",
workStationName: "", workStationName: "",
businessTypeCode :"ReturnToStore", businessTypeCode: "ReturnToStore",
positionInfo:"" positionInfo: "",
recommendLocationList: [], //
fromWarehouseCode: '' //
}; };
}, },
@ -129,7 +124,7 @@
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup(); this.openScanPopup(true);
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
} }
@ -154,15 +149,15 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup(isEditPosition) {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup(isEditPosition);
}, },
getScanResult(result,param) { getScanResult(result, param) {
this.positionInfo = param.positionInfo; this.positionInfo = param.positionInfo;
this.workshopCode = param.workshopCode; this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode; this.productionLineCode = param.productionLineCode;
this.workStationCode = param.workStationCode ; this.workStationCode = param.workStationCode;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
@ -174,10 +169,20 @@
}) })
if (item == undefined) { if (item == undefined) {
//
this.getRecommendLocation(label, pack, toLocation => {
var itemp = this.createItemInfo(label, pack); var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = toLocation.code;
newDetail.toWarehouseCode = toLocation.warehouseCode;
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
})
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber && if (r.packingNumber == label.packingNumber &&
@ -187,8 +192,13 @@
}) })
if (detail == undefined) { if (detail == undefined) {
this.getRecommendLocation(label, pack, toLocation => {
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = toLocation.code;
newDetail.toWarehouseCode = toLocation.warehouseCode;
item.subList.push(newDetail); item.subList.push(newDetail);
});
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]已经在列表中") this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]已经在列表中")
@ -258,6 +268,33 @@
this.calcHandleQty(); this.calcHandleQty();
}, },
//
getRecommendLocation(label, pack, callback) {
let recommend = this.recommendLocationList.find(r => r.itemCode == balance.itemCode);
if (recommend == undefined) {
let param = {
itemCode: label.itemCode,
batch: label.batch,
inventoryStatus: label.inventoryStatus,
supplierCode: pack.supplierCode
};
console.log(JSON.stringify(param))
getPutawayRecommendLocation(param).then(res => {
this.recommendLocationList.push({
itemCode: label.itemCode,
locationCode: res.data.code
})
callback(res.data);
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
callback(recommend);
}
},
removeData(item) { removeData(item) {
for (let i = 0; i < this.detailSource.length; i++) { for (let i = 0; i < this.detailSource.length; i++) {
if (this.detailSource[i].itemCode == item.itemCode) { if (this.detailSource[i].itemCode == item.itemCode) {
@ -279,7 +316,7 @@
mask: true mask: true
}); });
this.managementList = []; this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams() var precisionStrategParams = getPrecisionStrategyParams(this.detailSource)
getPrecisionStrategyList(precisionStrategParams, res => { getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) { if (res.success) {
@ -315,7 +352,6 @@
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
detail.toLocationCode = this.fgLocationCode;
var filterResult = itemList.filter(res => { var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode && if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) { detail.toLocationCode == res.locationCode) {
@ -377,13 +413,11 @@
this.dataContent.creator = creator; this.dataContent.creator = creator;
this.dataContent.workshopCode = this.workshopCode; this.dataContent.workshopCode = this.workshopCode;
this.dataContent.businessType = this.businessTypeCode; this.dataContent.businessType = this.businessTypeCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
return this.dataContent; return this.dataContent;
}, },
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus(); this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
@ -408,53 +442,29 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
}
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {}; this.dataContent = {};
this.positionInfo = "请选择位置";
this.fgLocationCode = ""
})
},
confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
console.log("位置", this.positionInfo)
this.workshopCode = e[0].value
this.productionLineCode = e[1].value
this.workStationCode = e[2].value
this.workShopName = e[0].label
this.productionLineName = e[1].label
this.workStationName = e[2].label
let shop = this.positionList.find(shop => shop.value == this.workshopCode);
if (shop != undefined && shop.children != undefined) {
let prodLine = shop.children.find(line => line.value == this.productionLineCode);
if (prodLine != undefined && prodLine.children != undefined) {
let station = prodLine.children.find(r => r.value == this.workStationCode);
if (station.rawLocationCode == '' && station.rawLocationCode == null) {
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择")
return;
} else {
this.rawLocationCode = station.rawLocationCode;
this.fgLocationCode = station.fgLocationCode;
} }
} else {
this.showErrorMessage("生产线-工位基础信息维护错误")
}
} else {
this.showErrorMessage("车间-生产线基础信息维护错误")
}
},
} }
} }
</script> </script>

4
pages/purchaseReceipt/job/receiptDetail.vue

@ -421,11 +421,15 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
}
}, },

2
pages/purchaseReturn/job/returnDetail.vue

@ -428,7 +428,7 @@
showCommitSuccessMessage(number) { showCommitSuccessMessage(number) {
this.$refs.comMessage.showSuccessMessage('提交成功<br>生成退货记录:' + number, res => { this.$refs.comMessage.showSuccessMessage('提交成功<br>生成退货记录:' + number, res => {
navigateBack() navigateBack(1)
}) })
} }
} }

2
pages/purchaseReturn/record/returnRecord.vue

@ -108,7 +108,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });
}, },

3
pages/purchaseReturn/request/returnRequest.vue

@ -30,9 +30,6 @@
import requestInfoPopup from '@/pages/purchaseReturn/coms/requestInfoPopup.vue' import requestInfoPopup from '@/pages/purchaseReturn/coms/requestInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue' import requestButton from '@/mycomponents/button/requestButton.vue'
import {
getBusinessType,
} from '@/common/record.js';
import { import {
goHome, goHome,
updateTitle, updateTitle,

2
pages/purchaseReturn/request/returnRequestCreate.vue

@ -101,7 +101,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });
}, },

4
pages/putaway/record/putawayRecord.vue

@ -273,11 +273,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
// scanLocationCode(location, code) { // scanLocationCode(location, code) {

4
pages/putaway/request/putawayRequest.vue

@ -30,10 +30,6 @@
import requestInfoPopup from '@/pages/putaway/coms/requestInfoPopup.vue' import requestInfoPopup from '@/pages/putaway/coms/requestInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue' import requestButton from '@/mycomponents/button/requestButton.vue'
import {
getBusinessType,
} from '@/common/record.js';
import { import {
goHome, goHome,
updateTitle updateTitle

17
pages/query/container.vue

@ -95,8 +95,7 @@
goHome(); goHome();
} }
}, },
filters: { filters: {},
},
mounted() { mounted() {
this.openScanPopup() this.openScanPopup()
}, },
@ -139,7 +138,7 @@
}) })
}, },
getSummary(pageNo,pageSize) { getSummary(pageNo, pageSize) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
@ -167,7 +166,7 @@
}, },
getDetailList(pageNo,pageSize) { getDetailList(pageNo, pageSize) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
@ -231,17 +230,15 @@
return resultlist; return resultlist;
}, },
getContentByTab(index,pageNo, pageSize) { getContentByTab(index, pageNo, pageSize) {
if (index === 0) { if (index === 0) {
this.getSummary(pageNo, pageSize); this.getSummary(pageNo, pageSize);
} else if (index === 1) this.getDetailList(pageNo, pageSize) } else if (index === 1) this.getDetailList(pageNo, pageSize)
}, },
upper: function(e) { upper: function(e) {},
}, lower: function(e) {},
lower: function(e) {
},
tabChange(index) { tabChange(index) {
this.tabIndex = index; this.tabIndex = index;
this.$refs.paging.reload(true); this.$refs.paging.reload(true);
@ -254,7 +251,9 @@
}); });
}, },
afterCloseMessage() { afterCloseMessage() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
queryList(pageNo, pageSize) { queryList(pageNo, pageSize) {
console.log("加载", pageNo) console.log("加载", pageNo)

2
pages/query/item.vue

@ -244,7 +244,9 @@
}); });
}, },
afterCloseMessage() { afterCloseMessage() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
tabChange(index) { tabChange(index) {
this.tabIndex = index; this.tabIndex = index;

12
pages/query/item_copy.vue

@ -17,8 +17,8 @@
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" <scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll"> @scroll="scroll">
<!-- 汇总 --> <!-- 汇总 -->
<comItemDetailCard v-if="tabIndex == 0" :itemList="summarys" :isShowPack="false" <comItemDetailCard v-if="tabIndex == 0" :itemList="summarys" :isShowPack="false" style='margin: 10rpx;'>
style='margin: 10rpx;'></comItemDetailCard> </comItemDetailCard>
</scroll-view> </scroll-view>
<!-- 明细 --> <!-- 明细 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" <scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@ -29,14 +29,14 @@
<!-- 预计入 --> <!-- 预计入 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" <scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll"> @scroll="scroll">
<comItemDetailCard v-if="tabIndex == 2" :itemList="dataIn" <comItemDetailCard v-if="tabIndex == 2" :itemList="dataIn" :isShowLocation="false"
:isShowLocation="false"
:isShowBusiness="true"></comItemDetailCard> :isShowBusiness="true"></comItemDetailCard>
</scroll-view> </scroll-view>
<!-- 预计出 --> <!-- 预计出 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" <scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll"> @scroll="scroll">
<comItemDetailCard v-if="tabIndex == 3" :itemList="dataOut" :isShowLocation="false" :isShowBusiness="true"> <comItemDetailCard v-if="tabIndex == 3" :itemList="dataOut" :isShowLocation="false"
:isShowBusiness="true">
</comItemDetailCard> </comItemDetailCard>
</scroll-view> </scroll-view>
</view> </view>
@ -303,9 +303,11 @@
}); });
}, },
afterCloseMessage() { afterCloseMessage() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
} }
}
}; };
</script> </script>

9
pages/query/location.vue

@ -35,7 +35,6 @@
</template> </template>
<script> <script>
import { import {
getBalanceByLocationcode, getBalanceByLocationcode,
getBalanceByLocationcodeGroup getBalanceByLocationcodeGroup
@ -113,7 +112,7 @@
// this.getContentByTab(this.tabIndex); // this.getContentByTab(this.tabIndex);
}, },
getSummary(pageNo,pageSize) { getSummary(pageNo, pageSize) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
@ -143,7 +142,7 @@
}, },
getDetailList(pageNo,pageSize) { getDetailList(pageNo, pageSize) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
@ -213,7 +212,7 @@
this.getContentByTab(this.tabIndex); this.getContentByTab(this.tabIndex);
}, },
getContentByTab(index,pageNo, pageSize) { getContentByTab(index, pageNo, pageSize) {
if (index === 0) { if (index === 0) {
this.getSummary(pageNo, pageSize); this.getSummary(pageNo, pageSize);
} else if (index === 1) this.getDetailList(pageNo, pageSize) } else if (index === 1) this.getDetailList(pageNo, pageSize)
@ -232,7 +231,9 @@
}); });
}, },
afterCloseMessage() { afterCloseMessage() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
tabChange(index) { tabChange(index) {
this.tabIndex = index; this.tabIndex = index;

3
pages/query/location_copy.vue

@ -56,7 +56,6 @@
</template> </template>
<script> <script>
import { import {
getBalanceByLocationcode, getBalanceByLocationcode,
getBalanceByLocationcodeGroup getBalanceByLocationcodeGroup
@ -263,9 +262,11 @@
}); });
}, },
afterCloseMessage() { afterCloseMessage() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
} }
}
}; };
</script> </script>

28
pages/repleinsh/record/repleinshRecord.vue

@ -40,7 +40,6 @@
</template> </template>
<script> <script>
import { import {
repleinshRequestSubmit, repleinshRequestSubmit,
repleinshRecordSubmit repleinshRecordSubmit
@ -119,7 +118,11 @@
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType this.fromType = option.fromType
if(this.fromType=="requestType"){ updateTitle("补料申请") }else { updateTitle("补料记录") } if (this.fromType == "requestType") {
updateTitle("补料申请")
} else {
updateTitle("补料记录")
}
var typeCode = "Repleinment" var typeCode = "Repleinment"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -128,7 +131,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message ); this.showErrorMessage(res.message)
} }
}); });
}, },
@ -143,8 +146,7 @@
onPullDownRefresh() {}, onPullDownRefresh() {},
mounted() { mounted() {},
},
methods: { methods: {
getScanResult(result) { getScanResult(result) {
let balance = result.balance; let balance = result.balance;
@ -237,7 +239,9 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {
@ -258,7 +262,7 @@
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))
@ -273,7 +277,7 @@
// uni.hideLoading() // uni.hideLoading()
// this.showErrorMessage(error) // this.showErrorMessage(error)
// }) // })
}else { } else {
// repleinshRecordSubmit(params).then(res => { // repleinshRecordSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
@ -306,13 +310,13 @@
return subList; return subList;
}, },
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)
@ -323,8 +327,8 @@
this.dataContent.subList = subList this.dataContent.subList = subList
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";

22
pages/scrap/record/scrapRecord.vue

@ -55,7 +55,6 @@
import { import {
goHome, goHome,
updateTitle,
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -232,17 +231,20 @@
}, },
closeScanPopup() { closeScanPopup() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
commit() { commit() {
if(this.reasonText==""){ if(this.reasonText==""){
this.showMessage("请先选择报废原因") this.showErrorMessage("请先选择报废原因")
return; return;
} }
// //
@ -302,14 +304,6 @@
}, },
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
@ -339,14 +333,16 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){
this.reasonCode = "" this.reasonCode = ""
this.reasonText = ""; this.reasonText = "";
this.detailSource = []; this.detailSource = [];
this.subList =[]; this.subList =[];
this.managementList =[]; this.managementList =[];
this.dataContent ={} this.dataContent ={}
})
}, },
updateData() { updateData() {

6
pages/scrap/request/scrapRequestCreate.vue

@ -128,7 +128,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });
@ -228,11 +228,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },

8
pages/setter/index.vue

@ -20,10 +20,10 @@
thumb="/static/icon_personal_password.png"></uni-list-item> thumb="/static/icon_personal_password.png"></uni-list-item>
<uni-list-item title="" clickable rightText="清除缓存" thumb="/static/icon_personal_name.png" <uni-list-item title="" clickable rightText="清除缓存" thumb="/static/icon_personal_name.png"
@click="clear"></uni-list-item> @click="clear"></uni-list-item>
<uni-list-item title="修改密码" link to="/pages/setter/passwordpage" <uni-list-item rightText="修改密码" link to="/pages/setter/passwordpage"
thumb="/static/icon_personal_password.png"></uni-list-item>
<uni-list-item title="服务器地址"
thumb="/static/icon_personal_password.png"></uni-list-item> thumb="/static/icon_personal_password.png"></uni-list-item>
<!-- <uni-list-item title="服务器地址"
thumb="/static/icon_personal_password.png"></uni-list-item> -->
<!-- <uni-list-item title="参数设置" link to="/pages/setter/setterDetail" <!-- <uni-list-item title="参数设置" link to="/pages/setter/setterDetail"
thumb="/static/icon_personal_setting.png"></uni-list-item> --> thumb="/static/icon_personal_setting.png"></uni-list-item> -->
</uni-list> </uni-list>
@ -56,11 +56,11 @@
onLoad onLoad
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
const userName = ref(store.state.user.name); const userName = ref(store.state.user.name);
let test = ref("123"); let test = ref("123");
let userInfo = ref(null); let userInfo = ref(null);
onLoad(() => { onLoad(() => {
console.log(11)
getUserProfile().then(res => { getUserProfile().then(res => {
userInfo.value = res.data userInfo.value = res.data
// nextTick(()=>{ // nextTick(()=>{

6
pages/supplierDeliver/coms/comRecordDetailCard.vue

@ -10,7 +10,11 @@
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="detailOptions"> :right-options="detailOptions">
<recommend :detail="item" :isShowFromLocation="false"></recommend> <recommend :detail="item" :isShowToLocation="true"
:isShowFromLocation="false"
:isShowStatus="false"
:isShowPack="false"
></recommend>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
<u-line color="#D8D8D8"></u-line> <u-line color="#D8D8D8"></u-line>

24
pages/supplierDeliver/record/supplierDeliverRecordDetail.vue

@ -5,20 +5,19 @@
<view class="" <view class=""
style="padding-left: 20rpx;padding-right: 20rpx; padding-top: 10rpx;padding-bottom: 10rpx;"> style="padding-left: 20rpx;padding-right: 20rpx; padding-top: 10rpx;padding-bottom: 10rpx;">
<view class="" style="font-size: 35rpx;"> <view class="" style="font-size: 35rpx;">
发货单号 : 发货单号 :{{dataContent.asnNumber}}
</view> </view>
<view class="" style="font-size: 35rpx;"> <view class="" style="font-size: 35rpx;">
<text>供应商 : </text> 供应商代码 :{{dataContent.supplierCode}}
</view> </view>
</view> </view>
<u-line /> <u-line />
<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="">
<comRecordDetailCard :dataContent="item" :index="index" :settingParam="jobContent" <comRecordDetailCard :dataContent="item" :index="index"
@remove="updateData" @updateData="updateData" @openDetail="openDetail"> @remove="updateData" @updateData="updateData" @openDetail="openDetail">
</comRecordDetailCard> </comRecordDetailCard>
</view> </view>
<u-line />
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -80,9 +79,8 @@
id: '', id: '',
receiptJob: {}, receiptJob: {},
received: false, received: false,
scanCount: 0, scanCount: 0,
jobContent: {}, // dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
@ -121,7 +119,7 @@
that.showMessage('未获取到详情'); that.showMessage('未获取到详情');
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.dataContent = res.data;
that.subList = res.data.subList; that.subList = res.data.subList;
that.subList.forEach(res => { that.subList.forEach(res => {
res.packingNumber = res.toPackingNumber res.packingNumber = res.toPackingNumber
@ -181,18 +179,6 @@
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
}, },
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
showMessage(message) { showMessage(message) {
setTimeout(r => { setTimeout(r => {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {

16
pages/transfer/coms/comTransferRecord.vue

@ -107,7 +107,7 @@
businessType: {}, businessType: {},
managementList: [], managementList: [],
dataContent: {}, dataContent: {},
toWarehouseCode:'' toWarehouseCode: ''
}; };
}, },
@ -155,7 +155,7 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
newDetail.inventoryStatus ="OK" newDetail.inventoryStatus = "OK"
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
@ -221,11 +221,15 @@
}, },
closeScanPopup() { closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {
@ -399,7 +403,7 @@
this.openScanPopup(); this.openScanPopup();
}, },
getToLocationCode(location, code) { getToLocationCode(location, code) {
this.toWarehouseCode =location.warehouseCode this.toWarehouseCode = location.warehouseCode
// if (this.fromLocationCode == code) { // if (this.fromLocationCode == code) {
// uni.showToast({ // uni.showToast({
// title: "[" + this.fromLocationCode + "][" + code + "]", // title: "[" + this.fromLocationCode + "][" + code + "]",
@ -412,14 +416,16 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){
this.fromLocationCode = ''; this.fromLocationCode = '';
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {} this.dataContent = {}
this.toWarehouseCode = "" this.toWarehouseCode = ""
})
}, },
updateData() { updateData() {

6
pages/unPlanned/job/receiptJobDetail.vue

@ -245,7 +245,7 @@
commit() { commit() {
this.scanCount = getScanCount(this.subList); this.scanCount = getScanCount(this.subList);
if( this.scanCount==0){ if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
@ -385,11 +385,15 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
}
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {

11
pages/unPlanned/record/issueRecord.vue

@ -54,10 +54,6 @@
unPlannedIssueRecordSubmit unPlannedIssueRecordSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
getBalanceByUniquecode,
} from '@/api/request.js';
import { import {
getBusinessType, getBusinessType,
} from '@/common/record.js'; } from '@/common/record.js';
@ -278,13 +274,16 @@
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
})
},
clearData(){
this.reasonCode = "" this.reasonCode = ""
this.reasonText = ""; this.reasonText = "";
this.detailSource = []; this.detailSource = [];
this.managementList =[]; this.managementList =[];
this.dataContent ={} this.dataContent ={}
}) }
},
} }
} }

7
pages/unPlanned/record/receiptRecord.vue

@ -351,14 +351,17 @@
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){
this.reasonCode = "" this.reasonCode = ""
this.reasonText = ""; this.reasonText = "";
this.detailSource = []; this.detailSource = [];
this.managementList=[]; this.managementList=[];
this.dataContent ={} this.dataContent ={}
this.toLocationCode ="" this.toLocationCode =""
}) }
},
} }

4
pages/unPlanned/request/issueRequest.vue

@ -36,9 +36,7 @@
updateTitle, updateTitle,
clearTirmAndWrap clearTirmAndWrap
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
getUnPlannedIssueRequestList, getUnPlannedIssueRequestList,
unPlannedIssueRequestApprove, unPlannedIssueRequestApprove,

6
pages/unPlanned/request/issueRequestCreate.vue

@ -60,10 +60,6 @@
unPlannedIssueRequestCreate, unPlannedIssueRequestCreate,
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
getBalanceByUniquecode,
} from '@/api/request.js';
import { import {
getBusinessType, getBusinessType,
} from '@/common/record.js'; } from '@/common/record.js';
@ -128,7 +124,7 @@
this.fromLocationTypeArray = res.fromlocationTypeList; this.fromLocationTypeArray = res.fromlocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });

3
pages/unPlanned/request/receiptRequest.vue

@ -30,9 +30,6 @@
import requestRecInfoPopup from '@/pages/unPlanned/coms/requestRecInfoPopup.vue' import requestRecInfoPopup from '@/pages/unPlanned/coms/requestRecInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue' import requestButton from '@/mycomponents/button/requestButton.vue'
import {
getBusinessType,
} from '@/common/record.js';
import { import {
goHome, goHome,
updateTitle, updateTitle,

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.230:12080/admin-api", "value": "http://dev.ccwin-in.com:25100/api/admin-api",
"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",

2
uni_modules/vk-uview-ui/components/u-select/u-select.vue

@ -17,7 +17,7 @@
:style="{ color: cancelColor }" :style="{ color: cancelColor }"
hover-class="u-hover-class" hover-class="u-hover-class"
:hover-stay-time="150" :hover-stay-time="150"
@tap="getResult('cancel')" @tap.stop="getResult('cancel')"
> >
{{cancelText}} {{cancelText}}
</view> </view>

Loading…
Cancel
Save