Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into master_hella

hella_online_20240829
niexiting 2 months ago
parent
commit
12986c21e3
  1. 38
      src/api/request2.js
  2. 4
      src/mycomponents/balance/balanceSelect.vue
  3. 2
      src/mycomponents/balance/location.vue
  4. 5
      src/mycomponents/scan/winComScan.vue
  5. 227
      src/mycomponents/scan/winComScanBalance.vue
  6. 2
      src/mycomponents/scan/winScanLocation.vue
  7. 6
      src/mycomponents/scan/winScanPackAndLocation.vue
  8. 2
      src/mycomponents/scan/winScanPackJob.vue
  9. 2
      src/pages.json
  10. 5
      src/pages/count/coms/comCountDetailcards.vue
  11. 2
      src/pages/count/coms/comCountJobCard.vue
  12. 60
      src/pages/count/job/countBlindDetail.vue
  13. 39
      src/pages/count/job/countJob.vue
  14. 8
      src/pages/count/job/countLightDetail.vue
  15. 2
      src/pages/deliver/coms/comScanDeliverPack.vue
  16. 2
      src/pages/index/index.vue
  17. 210
      src/pages/issue/coms/comScanIssuePack.vue
  18. 2
      src/pages/issue/job/issueDetail.vue
  19. 283
      src/pages/issue/record/directIssue.vue
  20. 51
      src/pages/login/index.vue
  21. 113
      src/pages/package/record/overPackageRecord.vue
  22. 127
      src/pages/point/index.vue
  23. 8
      src/pages/productionReturn/coms/comScanReturnPack.vue
  24. 35
      src/pages/purchaseReceipt/job/receiptDetail.vue
  25. 7
      src/pages/purchaseReceipt/job/receiptJob.vue
  26. 2
      src/pages/putaway/job/putawayJob.vue
  27. 64
      src/pages/query/coms/comLocationDetailCard.vue
  28. 269
      src/pages/query/location.vue
  29. 5
      src/pages/repleinsh/coms/comScanReplishPack.vue
  30. 1
      src/pages/repleinsh/record/directRepleinshRecord.vue
  31. 16
      src/pages/stockUp/coms/comScanStockUpPack.vue
  32. 12
      src/uni_modules/uni-combox/components/uni-combox/uni-combox.vue

38
src/api/request2.js

@ -296,6 +296,32 @@ export function getBalanceByLocationcode(params) {
}); });
} }
/**
* 按库位查询 预计入
* @param {*}
*/
export function getExpectInByLocationCode(params) {
return request({
url: baseApi + "/wms/expectin/senior",
method: "post",
data: params,
});
}
/**
* 按库位查询 预计出
* @param {*}
*/
export function getExpectOutByLocationCode(params) {
return request({
url: baseApi + "/wms/expectout/senior",
method: "post",
data: params,
});
}
/** /**
* 查询器具信息接口 * 查询器具信息接口
* @param {*} number 器具代码 * @param {*} number 器具代码
@ -4169,3 +4195,15 @@ export function getJimuPutawayJobDetail(data) {
data:data data:data
}); });
} }
/**
* 查询库位后台自己查询管理模式
* @param {*}
*/
export function getBalanceByParams(data) {
return request({
url: baseApi + "/wms/balance/getBalanceListByPackage",
method: "post",
data:data
});
}

4
src/mycomponents/balance/balanceSelect.vue

@ -3,10 +3,10 @@
<!-- <page-meta root-font-size="18px"></page-meta> --> <!-- <page-meta root-font-size="18px"></page-meta> -->
<uni-popup ref="popupItems" type="center"> <uni-popup ref="popupItems" type="center">
<scroll-view scroll-y="true" style="background-color: #EEEEEE;height: 90vh;"> <scroll-view scroll-y="true" style="background-color: #EEEEEE;height: 90vh;">
<item :dataContent="balanceItems[0]"></item> <item style="margin: 10rpx;" :dataContent="balanceItems[0]"></item>
<view class="popinpop count_shadow" style="width: 90vw;margin: 20rpx 20rpx 30rpx 20rpx;" <view class="popinpop count_shadow" style="width: 90vw;margin: 20rpx 20rpx 30rpx 20rpx;"
v-for="(item, index) in balanceItems" :key="item.id" @click="callback(item)"> v-for="(item, index) in balanceItems" :key="item.id" @click="callback(item)">
<balance :dataContent="item"></balance> <balance :dataContent="item" :isShowStatus ="false"></balance>
</view> </view>
</scroll-view> </scroll-view>
</uni-popup> </uni-popup>

2
src/mycomponents/balance/location.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="card_view "> <view class="card_view ">
<text class="card_location card_content ">{{title}}</text> <text class="card_location card_content ">{{title}}</text>
<text class="card_content ">{{locationCode}}</text> <text class="card_content " style="font-size: 37rpx;">{{locationCode}}</text>
</view> </view>
</template> </template>

5
src/mycomponents/scan/winComScan.vue

@ -6,7 +6,7 @@
<view class="tab_info"> <view class="tab_info">
<view class="conbox"> <view class="conbox">
<textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;" <textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
:focus="boxfocus" :placeholder="placeholderValue" @focus="getfocus" @blur="losefocus" :focus="boxfocus" :placeholder="placeholderValue"
@input="handelScanMsg" :cursor="cursorIndex" ></textarea> @input="handelScanMsg" :cursor="cursorIndex" ></textarea>
</view> </view>
@ -225,6 +225,7 @@
getfocus() { getfocus() {
let that = this; let that = this;
this.$nextTick(r => { this.$nextTick(r => {
console.log("获取焦点")
that.boxfocus = true; that.boxfocus = true;
}); });
// this.hide() // this.hide()
@ -232,7 +233,9 @@
losefocus() { losefocus() {
let that = this; let that = this;
this.$nextTick(r => { this.$nextTick(r => {
console.log("失去焦点")
that.boxfocus = false; that.boxfocus = false;
uni.hideKeyboard();
}); });
}, },
clear() { clear() {

227
src/mycomponents/scan/winComScanBalance.vue

@ -0,0 +1,227 @@
<template>
<view>
<uni-popup ref="popup" :mask-click="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描{{title}}
</view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult"
:isShowHistory="isShowHistory" :clearResult="true" :headerType="headerType"></win-com-scan>
</view>
</view>
</view>
</uni-popup>
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
<!-- 模拟扫描功能 -->
</view>
<comMessage ref="comMessage"></comMessage>
</template>
<script>
import winComScan from '@/mycomponents/scan/winComScan.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import {
getBalanceByManagementPrecisionByPacking,
} from '@/common/balance.js';
import {
getBalanceByParams,
getBasicItemByCode
} from '@/api/request2.js';
import {
getListLocationAreaTypeDesc,
checkDirectoryItemExist,
getDirectoryItemArray,
getLocationAreaTypeName,
getInventoryStatusDesc,
getListItemTypeDesc,
getItemTypeInfo
} from '@/common/directory.js';
export default {
name: 'winScanPack',
emits: ["getBalance"],
components: {
winComScan,
balanceSelect
},
props: {
title: {
type: String,
default: '箱标签'
},
isShowHistory: {
type: Boolean,
default: false
},
headerType: {
type: String,
default: "HPQ,HMQ"
},
balanceFromInventoryStatuses: { //fromInventoryStatuses
type: Boolean,
default: true
},
bussinessCode:{
type: String,
default: ''
}
},
data() {
return {
scanResult: {},
show: false,
scanList: [],
expand: false,
showScanResult: {},
expendIcon: 'arrow-down',
fromLocationCode: '',
fromLocation: '',
fromLocationList: [],
fromLocationAreaTypeList: [],
locationOnFocus: false,
businessType: {},
inventoryStatus: [],
managementPrecision: '',
fromInventoryStatuses: [],
itemTypesList: [],
isCheck: false,
resultData: {}
}
},
created() {
},
methods: {
openScanPopup(businessType) {
this.businessType = businessType
this.fromInventoryStatuses = getDirectoryItemArray(businessType.outInventoryStatuses)
this.fromLocationAreaTypeList = getDirectoryItemArray(businessType.outAreaTypes)
this.itemTypesList = getDirectoryItemArray(businessType.itemTypes)
this.$refs.popup.open('bottom')
},
getScanResult(result) {
this.resultData = result;
if(!result.package){
this.showErrorMessage(result.label.code+"包装信息为空")
return;
}
this.getItemCodeType(result.package.itemCode,callBack=>{
this.queryBalance(this.resultData)
})
},
queryBalance(result) {
var params = {
itemCode: result.package.itemCode,
batch: result.label.batch,
packingNumber: result.label.packingNumber,
inventoryStatus: this.fromInventoryStatuses,
areaType: this.fromLocationAreaTypeList,
bussinessCode:this.bussinessCode
}
getBalanceByParams(params).then(res => {
uni.hideLoading()
if (res.data.length == 0) {
var status = getInventoryStatusDesc(params.inventoryStatus)
var areaType = getListLocationAreaTypeDesc(params.areaType)
var hint =
"按物料号 [" + params.itemCode + "] <br>" +
"包装号 [" + params.packingNumber + "] <br>" +
"批次 [" + params.batch + "] <br>" +
"状态 [" + status + "] <br>" +
"库区 [" + areaType + "] <br>" +
"未查找到库存余额"
this.showErrorMessage(hint)
} else if (res.data.length == 1) {
result.balance = res.data[0]
this.$emit("getBalance", result)
this.closeScanPopup()
} else {
//
this.$refs.balanceSelect.openPopup(res.data);
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
getItemCodeType(itemCode,callBack) {
uni.showLoading({
title: "加载中",
mask: true
})
getBasicItemByCode(itemCode).then(res => {
if (res.data != null && res.data.list.length > 0) {
var result = res.data.list[0];
var status = result.status;
var type = result.type;
if (status == "ENABLE") {
if (checkDirectoryItemExist(this.itemTypesList, type)) {
callBack()
} else {
var hint = getListItemTypeDesc(this.itemTypesList);
uni.hideLoading()
this.showErrorMessage("扫描物料[" + itemCode + "]是[" +
getItemTypeInfo(type).label + "],需要的物料类型是[" + hint + "]")
}
} else {
uni.hideLoading()
this.showErrorMessage('物料【' + itemCode + '】不可用');
}
} else {
uni.hideLoading()
this.showErrorMessage('未查找到物料【' + itemCode + '】');
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error)
})
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if(this.$refs.comscan){
this.$refs.comscan.getfocus()
}
}
});
},
selectBalanceItem(item) {
this.resultData.balance = item
this.$emit("getBalance", this.resultData)
this.closeScanPopup()
},
closeScanPopup() {
this.$refs.popup.close()
}
}
}
</script>
<style lang="scss">
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
</style>

2
src/mycomponents/scan/winScanLocation.vue

@ -13,7 +13,7 @@
<view class=""> <view class="">
<view class=""> <view class="">
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="true" <win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="true"
:boxFocus="true" :isShowHistory="isShowHistory" headerType=""> :isShowHistory="isShowHistory" headerType="">
</win-com-scan> </win-com-scan>
</view> </view>
</view> </view>

6
src/mycomponents/scan/winScanPackAndLocation.vue

@ -18,7 +18,7 @@
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 8rpx; border-radius: 8rpx;
height: 30px;"> height: 30px;">
<view class="uni-center" style="width: 25%; "> <view class="uni-center" style="width: 25%; font-size: 35rpx;">
来源库位 来源库位
</view> </view>
<!-- style="width: 75%;padding: 8rpx" --> <!-- style="width: 75%;padding: 8rpx" -->
@ -31,7 +31,7 @@
@confirm="handleConfirm" style='height: 30rpx;border:1px solid #fff ;'></uni-combox> @confirm="handleConfirm" style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
</view> </view>
<view v-else> <view v-else>
<text style="padding: 5px"> <text style="padding: 5px;font-size: 40rpx;">
{{fromLocationCode}} {{fromLocationCode}}
</text> </text>
</view> </view>
@ -160,7 +160,7 @@
} }
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); // this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //
if (!this.show) { if (!this.show) {
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')

2
src/mycomponents/scan/winScanPackJob.vue

@ -70,11 +70,11 @@
methods: { methods: {
// //
openScanPopup(){ openScanPopup(){
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, },
// //
closeScanPopup(content) { closeScanPopup(content) {
this.$refs.comscan.losefocus()
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("close", ''); this.$emit("close", '');
}, },

2
src/pages.json

@ -69,7 +69,7 @@
"path": "pages/query/location", "path": "pages/query/location",
"style": { "style": {
"navigationBarTitleText": "按库位查询库存", "navigationBarTitleText": "按库位查询库存",
"enablePullDownRefresh": false, "enablePullDownRefresh": true,
"titleNView": { "titleNView": {
"autoBackButton": "true", "autoBackButton": "true",
"buttons": [{}] "buttons": [{}]

5
src/pages/count/coms/comCountDetailcards.vue

@ -10,6 +10,7 @@
<view class="uni-flex uni-row"> <view class="uni-flex uni-row">
<compareQty :dataContent="dataContent" :recommendQty="dataContent.recommendQty" <compareQty :dataContent="dataContent" :recommendQty="dataContent.recommendQty"
:handleQty="dataContent.handleQty" :handleQty="dataContent.handleQty"
:isShowRecommendQty ="isShowRecommendQty"
> </compareQty> > </compareQty>
</view> </view>
@ -71,6 +72,10 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowRecommendQty: {
type: Boolean,
default: true
}
}, },
methods: { methods: {
edit(){ edit(){

2
src/pages/count/coms/comCountJobCard.vue

@ -3,7 +3,7 @@
<!-- <jobComMainDetailCard :dataContent="dataContent"> <!-- <jobComMainDetailCard :dataContent="dataContent">
</jobComMainDetailCard> --> </jobComMainDetailCard> -->
<to-location title="盘点库位" :locationCode="dataContent.toLocationCode||dataContent.locationCode"> <to-location style="margin-left: 20rpx;" title="盘点库位" :locationCode="dataContent.countSplitCode">
</to-location> </to-location>
<view class="" style="margin-left: 40rpx; font-size: 32rpx; font-weight: bold;"> <view class="" style="margin-left: 40rpx; font-size: 32rpx; font-weight: bold;">
阶段 : {{getCountStageName(dataContent.stage)}} 阶段 : {{getCountStageName(dataContent.stage)}}

60
src/pages/count/job/countBlindDetail.vue

@ -40,6 +40,7 @@
</view> </view>
<comCountDetailcards :ref="'countDetail_'+index" :dataContent="item" :index="index" <comCountDetailcards :ref="'countDetail_'+index" :dataContent="item" :index="index"
@editItem="editItem" :settingParam="jobContent" @remove="updateData" @editItem="editItem" :settingParam="jobContent" @remove="updateData"
:isShowRecommendQty ="false"
@updateData="updateData"> @updateData="updateData">
</comCountDetailcards> </comCountDetailcards>
</view> </view>
@ -66,7 +67,9 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location ref="scanPopup" :noShowBalanceMessage="true" :queryBalance="false" @getResult='getScanResult'> <win-scan-pack-and-location
:allowModifyLocation="false"
ref="scanPopup" :noShowBalanceMessage="true" :queryBalance="true" @getResult='getScanResult'>
</win-scan-pack-and-location> </win-scan-pack-and-location>
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" <count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true"
:allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'"> :allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'">
@ -242,15 +245,15 @@
} else { } else {
that.jobContent = res.data; that.jobContent = res.data;
that.jobStatus = res.data.status; that.jobStatus = res.data.status;
that.fromLocationCode = that.jobContent.locationCode; that.fromLocationCode = that.jobContent.countSplitCode;
// res.data.subList.forEach(item => { res.data.subList.forEach(item => {
// item.recommendQty = item.qty item.recommendQty = item.qty
// item.handleQty = 0 item.handleQty = 0
// item.countTime = new Date() item.countTime = new Date()
// item.fromLocationCode =that.fromLocationCode; item.fromLocationCode =that.fromLocationCode;
// }) })
// that.allDetails = res.data.subList; that.allDetails = res.data.subList;
// that.allCount = res.data.subList.length; that.allCount = res.data.subList.length;
that.initList() that.initList()
} }
@ -335,9 +338,9 @@
var packingNumber = result.label.packingNumber var packingNumber = result.label.packingNumber
var pack = result.package var pack = result.package
var batch = result.label.batch var batch = result.label.batch
var inventoryStatus = "OK" var inventoryStatus = result.balance ? result.balance.inventoryStatus : "OK"
var qty = result.label.qty ? result.label.qty : 0; var qty = result.balance ? result.balance.qty : 0;
// //
let items = this.allDetails.filter(r => let items = this.allDetails.filter(r =>
r.itemCode === itemCode && r.itemCode === itemCode &&
@ -346,13 +349,21 @@
r.inventoryStatus === inventoryStatus) r.inventoryStatus === inventoryStatus)
//, //,
if (items.length == 0) { if (items.length == 0) {
var detail = this.createAddDetailInfo(pack,qty) this.$refs.comMessage.showQuestionMessage("包装【" + result.label.packingNumber +
detail.countTime = new Date(); "】不在任务列表中,是否要添加到列表中?",
this.allDetails.push(detail) res => {
this.updateList(); //
this.$refs.countQtyEdit.openEditPopupShowSeconds(detail, if (res) {
null); var detail = this.createAddDetailInfo(pack,qty)
detail.countTime = new Date();
this.allDetails.push(detail)
this.updateList();
this.$refs.countQtyEdit.openEditPopupShowSeconds(detail,
null);
} else {
this.scanPopupGetFocus();
}
})
} else { } else {
var selectItem = items[0] var selectItem = items[0]
// //
@ -368,15 +379,15 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
} }
}) })
} else { } else {
// //
selectItem.scaned = true; selectItem.scaned = true;
selectItem.recommendQty =Number(qty); selectItem.balanceQty= Number(qty)
selectItem.handleQty = Number(qty) selectItem.handleQty = Number(qty)
selectItem.packQty = pack.packQty selectItem.packQty = pack.packQty
selectItem.packUnit = pack.packUnit selectItem.packUnit = pack.packUnit
this.$refs.countQtyEdit.openEditPopupShowSeconds(selectItem, this.$refs.countQtyEdit.openEditPopupShowSeconds(selectItem,
null); null);
selectItem.countTime = new Date(); selectItem.countTime = new Date();
@ -424,7 +435,7 @@
// //
createAddDetailInfo(pack,qty) { createAddDetailInfo(pack,qty) {
var detail = { var detail = {
id: this.jobContent.masterId, // masterId: this.jobContent.id, //
scaned: true, scaned: true,
countDetailNumber: "", countDetailNumber: "",
ownerCode: "", ownerCode: "",
@ -448,6 +459,7 @@
countQty: 0, countQty: 0,
balanceQty: 0, balanceQty: 0,
fromLocationCode: this.fromLocationCode, fromLocationCode: this.fromLocationCode,
locationCode:this.fromLocationCode,
creator: this.$store.state.user.id, creator: this.$store.state.user.id,
countTime: new Date() countTime: new Date()
} }

39
src/pages/count/job/countJob.vue

@ -152,6 +152,11 @@
action: "in", action: "in",
value: this.status value: this.status
}) })
filters.push({
column: "countSplitType",
action: "==",
value: "locationCode"
})
// filters.push({ // filters.push({
// column: "accept_user_id", // column: "accept_user_id",
@ -195,20 +200,20 @@
}, },
openJobDetail(item) { openJobDetail(item) {
uni.navigateTo({ // uni.navigateTo({
url: './countDetail?id=' + item.id + '&status=' + item.status // url: './countDetail?id=' + item.id + '&status=' + item.status
}); // });
// // //
// if(item.isOpenCount=="TRUE"){ if(item.isOpenCount=="TRUE"){
// uni.navigateTo({ uni.navigateTo({
// url: './countLightDetail?id=' + item.id + '&status=' + item.status url: './countLightDetail?id=' + item.id + '&status=' + item.status
// }); });
// }else { }else {
// // //
// uni.navigateTo({ uni.navigateTo({
// url: './countBlindDetail?id=' + item.id + '&status=' + item.status url: './countBlindDetail?id=' + item.id + '&status=' + item.status
// }); });
// } }
}, },
showItemList(itemList) { showItemList(itemList) {
@ -293,6 +298,12 @@
action: "==", action: "==",
value: code value: code
}) })
filters.push({
column: "countSplitType",
action: "==",
value: "locationCode"
})
var params = { var params = {
filters: filters, filters: filters,

8
src/pages/count/job/countLightDetail.vue

@ -68,7 +68,9 @@
</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" :noShowBalanceMessage="true" @getCountScanResult='getScanResult'> <win-scan-pack-and-location
:allowModifyLocation="false"
ref="scanPopup" :noShowBalanceMessage="true" @getCountScanResult='getScanResult'>
</win-scan-pack-and-location> </win-scan-pack-and-location>
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" <count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true"
:allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'"> :allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'">
@ -244,7 +246,7 @@
} else { } else {
that.jobContent = res.data; that.jobContent = res.data;
that.jobStatus = res.data.status; that.jobStatus = res.data.status;
that.fromLocationCode = that.jobContent.locationCode; that.fromLocationCode = that.jobContent.countSplitCode;
res.data.subList.forEach(item => { res.data.subList.forEach(item => {
item.recommendQty = item.qty item.recommendQty = item.qty
item.handleQty = 0 item.handleQty = 0
@ -434,7 +436,7 @@
// //
createAddDetailInfo(pack,qty) { createAddDetailInfo(pack,qty) {
var detail = { var detail = {
id: this.jobContent.masterId, // masterId: this.jobContent.id, //
scaned: true, scaned: true,
countDetailNumber: "", countDetailNumber: "",
ownerCode: "", ownerCode: "",

2
src/pages/deliver/coms/comScanDeliverPack.vue

@ -342,7 +342,7 @@
) )
} }
} else { } else {
if (this.jobContent.AllowModifyBatch == null) { if (this.jobContent.allowModifyBatch == "TRUE") {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot + this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的发货明细,是否要继续发货?', res => { '】的发货明细,是否要继续发货?', res => {
if (res) { if (res) {

2
src/pages/index/index.vue

@ -387,7 +387,7 @@
console.log("包装规格获取失败", res) console.log("包装规格获取失败", res)
}) })
var switchCode="FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate,purchasereceiptPrintPDA"; var switchCode="FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate,purchasereceiptPrintPDA,purchaseReceiptLocationCodeValidate";
getSwitchByCode(switchCode).then(res=>{ getSwitchByCode(switchCode).then(res=>{
uni.setStorageSync("switch", res.data) uni.setStorageSync("switch", res.data)

210
src/pages/issue/coms/comScanIssuePack.vue

@ -41,12 +41,12 @@
margin-right: 20rpx; margin-right: 20rpx;
margin-top: 8rpx; margin-top: 8rpx;
border-radius: 8rpx;"> border-radius: 8rpx;">
<view class="uni-center" style="width: 25%; "> <view class="uni-center" style="width: 25%; font-size: 35rpx; ">
来源库位 来源库位
</view> </view>
<view class="" style="width: 75%; padding: 8rpx;"> <view class="" style="width: 75%; padding: 8rpx;">
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请选择库位" <uni-combox class="my-combox" :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请选择库位"
@confirm="fromLocationUpdate"></uni-combox> @confirm="fromLocationUpdate" :inputStyle="inputStyleObject"></uni-combox>
</view> </view>
</view> </view>
@ -113,7 +113,8 @@
getDetailEditRemoveOption getDetailEditRemoveOption
} from '@/common/array.js'; } from '@/common/array.js';
import { import {
getWorkShopLineStation getWorkShopLineStation,
getBalanceByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -161,7 +162,10 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
defaultValueList: [], defaultValueList: [],
fromInventoryStatuses: "", fromInventoryStatuses: "",
packageInfo: {}, packageInfo: {},
label: {} label: {},
inputStyleObject:{
fontSize: "100rpx"
}
} }
}, },
created() { created() {
@ -215,7 +219,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
let that = this; let that = this;
that.fromLocationList = []; that.fromLocationList = [];
if (that.dataContent != null) { if (that.dataContent != null) {
that.fromInventoryStatuses = getDirectoryItemArray(this.jobContent.outInventoryStatuses) that.fromInventoryStatuses = this.jobContent.outInventoryStatuses
that.toLocation = that.dataContent[0]; that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode; that.toLocationCode = that.dataContent[0].toLocationCode;
that.fromLocationList = that.getFromLocationList(); that.fromLocationList = that.getFromLocationList();
@ -250,6 +254,192 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
this.showErrorMessage('发料库位【' + fromlocation + '】不存在') this.showErrorMessage('发料库位【' + fromlocation + '】不存在')
} }
}, },
onScanResult(result){
try {
let that = this;
if (that.fromLocationCode == '') {
that.showErrorMessage('请选择来源库位', res => {
that.$refs.toLocationCombox.onFocus();
});
return;
}
let packageInfo = result.package;
let itemCode = result.label.itemCode;
let packingCode = result.label.packingNumber;
let lot = result.label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) {
that.showErrorMessage('未查找到物料【' + itemCode + '】的发料明细',
res => {
that.getfocus();
}
)
return;
} else {
//
uni.showLoading({
title: '加载中',
mask: true
})
this.getBalance(result.label, packageInfo, balances => {
this.packageInfo =packageInfo;
//
let s = '';
if (!result.package.parentNumber) {
if (balances.list.length == 0) {
this.showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else {
let newBalances = balances.list.filter(b => b.locationCode == that
.fromLocationCode);
if (newBalances.length == 0) {
this.showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else if (newBalances.length == 1) {
let balance = newBalances[0];
this.afterGetBalance(result.label, balance, packageInfo);
} else {
this.showBalanceSelect(newBalances);
}
}
} else {
//
if (balances.list.length == 0) {
this.showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else {
//
let subPackitems = balances.list.filter(r => r.packingNumber == packageInfo
.number)
//
let subParentPackitems = balances.list.filter(r => r.packingNumber ==
packageInfo
.parentNumber&&r.locationCode==this.fromLocationCode)
//
if (subPackitems.length == 0) {
//
if (subParentPackitems.length > 0) {
if(subParentPackitems.length==1){
let balance = subParentPackitems[0];
balance.qty=packageInfo.qty;
this.afterGetBalance(result.label, balance, packageInfo);
}else {
this.showBalanceSelect(subParentPackitems);
}
} else {
this.showErrorMessage('按外包装【' + packageInfo.parentNumber + '】和子包装【' +
packageInfo.number + '】都未查找到库存余额')
}
} else {
var locationCode = this.fromLocationCode
if(balances.list==1){
locationCode=balances.list[0].locationCode
}else {
var manyBlances = balances.list.filter(r=>r.locationCode!=this.fromLocationCode)
if(manyBlances.length>0){
locationCode = manyBlances[0].locationCode;
}
}
this.showErrorMessage('该包装【' + packageInfo.number + '】在库位【' +
locationCode +
'】已经有库存余额,请重新扫描')
}
// //
// if (subitems.length == 0 && subParentPackitems.length > 0) {
// this.afterGetBalance(result.label, null, packageInfo);
// } else if (subitems.length > 0 && subParentPackitems.length == 0) {
// //
// this.showErrorMessage('' + balances.list[0].locationCode +
// ',')
// } else {
// }
}
}
uni.hideLoading();
});
// getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
// balanceRes => {
// if (balanceRes.success) {
// let s = '';
// if (balanceRes.data.list.length == 0) {
// this.afterGetBalance(result.label, null, packageInfo);
// } else if (balanceRes.data.list.length == 1) {
// let balance = balanceRes.data.list[0];
// this.afterGetBalance(result.label, balance, packageInfo);
// } else {
// this.showBalanceSelect(balanceRes.data.list);
// }
// } else {
// this.showErrorMessage(balanceRes.message.message);
// }
// uni.hideLoading();
// });
}
} catch (e) {
this.showErrorMessage(e.stack)
uni.hideLoading();
}
},
getBalance(label, packageInfo, callback) {
var filters = []
if (packageInfo.parentNumber) {
var packingNumber = packageInfo.parentNumber + "," + label.packingNumber;
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
} else {
filters.push({
column: "packingNumber",
action: "==",
value: label.packingNumber
})
}
filters.push({
column: "itemCode",
action: "==",
value: label.itemCode
})
filters.push({
column: "batch",
action: "==",
value: label.batch
})
if (this.fromInventoryStatuses != null && this.fromInventoryStatuses != "") {
filters.push({
column: "inventoryStatus",
action: "in",
value: this.fromInventoryStatuses
})
}
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getBalanceByFilter(params).then(res => {
callback(res.data)
}).catch(err => {
this.showErrorMessage(err.message);
})
},
onScan(result) { onScan(result) {
@ -267,7 +457,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
} }
} }
}, },
onScanResult(result) { onScanResult1(result) {
try { try {
let that = this; let that = this;
if (that.fromLocationCode == '') { if (that.fromLocationCode == '') {
@ -324,7 +514,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
}, },
selectBalanceItem(balance) { selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance, this.packageInfo); this.afterGetBalance(this.label, balance,this.packageInfo);
}, },
afterGetBalance(label, balance, packageInfo) { afterGetBalance(label, balance, packageInfo) {
@ -432,6 +622,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
scaned: true, scaned: true,
itemCode: label.itemCode, itemCode: label.itemCode,
packingNumber: label.packingNumber, packingNumber: label.packingNumber,
parentPackingNumber: packageInfo.parentNumber,
batch: label.batch, batch: label.batch,
qty: Number(balance.qty), qty: Number(balance.qty),
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty), // qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
@ -585,4 +776,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
max-height: 300rpx; max-height: 300rpx;
padding: 10rpx; padding: 10rpx;
} }
.my-combox{
font-size: 50px;
}
</style> </style>

2
src/pages/issue/job/issueDetail.vue

@ -367,6 +367,8 @@
.packingNumber; .packingNumber;
record.toBatch = info.batch; record.toBatch = info.batch;
} }
record.fromParentPackingNumber = r
.parentPackingNumber;
subItem.recordList.push(record); subItem.recordList.push(record);
}) })
subList.push(deepCopyData(subItem)); subList.push(deepCopyData(subItem));

283
src/pages/issue/record/directIssue.vue

@ -16,10 +16,9 @@
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" <record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowFromLocation="false" @removeItem="removeItem(index,item)" :isShowFromLocation="false" @removeItem="removeItem(index,item)"
:isShowToLocation="false" :isShowToLocation="false" @updateData="updateData" @removePack="removePack">
@updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -44,11 +43,13 @@
</view> </view>
<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 ref="scanPopup" @getResult='getScanResult' :allowModifyLocation='false'
:queryBalance="false">
</win-scan-pack-and-location> </win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
</view> </view>
</template> </template>
@ -56,6 +57,7 @@
import { import {
issueRecordSubmit, issueRecordSubmit,
getWorkShopLineStation, getWorkShopLineStation,
getBalanceByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -95,6 +97,7 @@
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue' import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
export default { export default {
components: { components: {
@ -105,7 +108,8 @@
winScanLocation, winScanLocation,
winScanPackAndLocation, winScanPackAndLocation,
recordComDetailCard, recordComDetailCard,
recordDetailCard recordDetailCard,
balanceSelect
}, },
data() { data() {
return { return {
@ -125,7 +129,8 @@
businessTypeCode: "Issue", businessTypeCode: "Issue",
positionList: [], positionList: [],
show: false, show: false,
positionInfo: "请选择生产线" positionInfo: "请选择生产线",
resultData: {}
}; };
}, },
onLoad(option) { onLoad(option) {
@ -169,7 +174,139 @@
mounted() {}, mounted() {},
methods: { methods: {
getBalance(label, packageInfo, callback) {
var filters = []
if (packageInfo.parentNumber) {
var packingNumber = packageInfo.parentNumber + "," + label.packingNumber;
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
} else {
filters.push({
column: "packingNumber",
action: "==",
value: label.packingNumber
})
}
filters.push({
column: "itemCode",
action: "==",
value: label.itemCode
})
filters.push({
column: "batch",
action: "==",
value: label.batch
})
if (this.fromInventoryStatuses != null && this.fromInventoryStatuses != "") {
filters.push({
column: "inventoryStatus",
action: "in",
value: this.fromInventoryStatuses
})
}
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getBalanceByFilter(params).then(res => {
callback(res.data)
}).catch(err => {
this.showErrorMessage(err.message);
})
},
getScanResult(result) { getScanResult(result) {
this.resultData = result;
let packageInfo = result.package;
this.getBalance(result.label, packageInfo, balances => {
//
let s = '';
if (!result.package.parentNumber) {
if (balances.list.length == 0) {
this.showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else {
let newBalances = balances.list.filter(b => b.locationCode == this
.fromLocationCode);
if (newBalances.length == 0) {
this.showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else if (newBalances.length == 1) {
let balance = newBalances[0];
result.balance = balance;
this.afterGetBalance(result);
} else {
this.showBalanceSelect(newBalances);
}
}
} else {
//
if (balances.list.length == 0) {
this.showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else {
//
let subPackitems = balances.list.filter(r => r.packingNumber == packageInfo
.number)
//
let subParentPackitems = balances.list.filter(r => r.packingNumber ==
packageInfo
.parentNumber && r.locationCode == this.fromLocationCode)
//
if (subPackitems.length == 0) {
//
if (subParentPackitems.length > 0) {
if (subParentPackitems.length == 1) {
let balance = subParentPackitems[0];
balance.qty = packageInfo.qty;
result.balance = balance;
this.afterGetBalance(result);
} else {
this.showBalanceSelect(subParentPackitems);
}
} else {
this.showErrorMessage('按外包装【' + packageInfo.parentNumber + '】和子包装【' +
packageInfo.number + '】都未查找到库存余额')
}
} else {
var locationCode = this.fromLocationCode
if (balances.list == 1) {
locationCode = balances.list[0].locationCode
} else {
var manyBlances = balances.list.filter(r => r.locationCode != this
.fromLocationCode)
if (manyBlances.length > 0) {
locationCode = manyBlances[0].locationCode;
}
}
this.showErrorMessage('该包装【' + packageInfo.number + '】在库位【' +
locationCode +
'】已经有库存余额,请重新扫描')
}
}
}
})
},
showBalanceSelect(items) {
this.$refs.balanceSelect.openPopup(items);
},
selectBalanceItem(balance) {
this.resultData.balance =balance;
this.afterGetBalance(this.resultData);
},
afterGetBalance(result){
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
@ -187,15 +324,17 @@
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
newDetail.parentNumber =pack.parentNumber;
newDetail.packingNumber =pack.number
newDetail.packUnit =packUnit; newDetail.packUnit =packUnit;
newDetail.packQty=packQty; newDetail.packQty=packQty;
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == pack.number &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) { r.inventoryStatus == balance.inventoryStatus) {
@ -204,10 +343,60 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber =pack.parentNumber;
newDetail.packingNumber =pack.number
newDetail.packUnit =packUnit; newDetail.packUnit =packUnit;
newDetail.packQty=packQty; newDetail.packQty=packQty;
item.subList.push(newDetail); item.subList.push(newDetail);
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + detail.packingNumber + "]批次[" + balance.batch + "]已经在列表中")
}
}
}
},
getScanResult1(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
let packUnit = pack.packUnit;
let packQty = pack.packQty
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (this.fromWarehouseCode == '') {
this.fromWarehouseCode = balance.warehouseCode;
}
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.packUnit = packUnit;
newDetail.packQty = packQty;
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
calcHandleQty(this.detailSource);
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
newDetail.packUnit = packUnit;
newDetail.packQty = packQty;
item.subList.push(newDetail);
calcHandleQty(this.detailSource);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -302,24 +491,25 @@
} else { } else {
this.showErrorMessage("车间-生产线基础信息维护错误") this.showErrorMessage("车间-生产线基础信息维护错误")
} }
// //
let toLocationCode = '' let toLocationCode = ''
this.positionList.forEach(item=>{ this.positionList.forEach(item => {
if(this.workshopCode == item.value){ // if (this.workshopCode == item.value) { //
item.children.find(child=>{ item.children.find(child => {
if(this.productionLineCode==child.value){ if (this.productionLineCode == child.value) {
toLocationCode = child.children.find(subChild=>this.workStationCode==subChild.value).rawLocationCode; toLocationCode = child.children.find(subChild => this.workStationCode ==
subChild.value).rawLocationCode;
} }
}) })
} }
}) })
this.detailSource.forEach(item=>{ this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
detail.toLocationCode = toLocationCode detail.toLocationCode = toLocationCode
}) })
}) })
}, },
removeItem(index, item) { removeItem(index, item) {
@ -380,7 +570,9 @@
getPrecisionStrategyList(precisionStrategyParams, res => { getPrecisionStrategyList(precisionStrategyParams, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = {...this.setRecordParams()} var params = {
...this.setRecordParams()
}
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(params).then(res => { issueRecordSubmit(params).then(res => {
@ -426,20 +618,20 @@
submitItem.qty = detail.handleQty; submitItem.qty = detail.handleQty;
submitItem.package = ""; submitItem.package = "";
submitItem.recordList = [{ submitItem.recordList = [{
toInventoryStatus:detail.inventoryStatus, toInventoryStatus: detail.inventoryStatus,
fromPackingNumber:info.packingNumber, fromParentPackingNumber: detail.parentNumber,
fromBatch:info.batch, fromPackingNumber: info.packingNumber,
toPackingNumber:info.packingNumber, fromBatch: info.batch,
toBatch:info.batch, toPackingNumber: info.packingNumber,
fromLocationCode:detail.locationCode, toBatch: info.batch,
toLocationCode:detail.toLocationCode, fromLocationCode: detail.locationCode,
handleQty:detail.handleQty, toLocationCode: detail.toLocationCode,
fromPackUnit:detail.packUnit, handleQty: detail.handleQty,
toPackUnit:detail.packUnit, fromPackUnit: detail.packUnit,
fromPackQty:detail.packQty, toPackUnit: detail.packUnit,
toPackQty:detail.packQty fromPackQty: detail.packQty,
} toPackQty: detail.packQty
] }]
subList.push(submitItem) subList.push(submitItem)
} }
}) })
@ -458,13 +650,6 @@
if (res) {} if (res) {}
}); });
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) { showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message); this.$refs.comMessage.showScanMessage(message);
@ -502,17 +687,17 @@
}) })
}, },
updateData() { updateData() {
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i]; let item = this.detailSource[i];
if (item.qty == 0) { if (item.qty == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
}
} }
} this.$forceUpdate();
this.$forceUpdate();
},
},
clearData() { clearData() {
this.fromLocationInfo = {}; this.fromLocationInfo = {};
@ -520,7 +705,7 @@
this.fromWarehouseCode = ''; this.fromWarehouseCode = '';
this.toWarehouseCode = ''; this.toWarehouseCode = '';
this.detailSource = []; this.detailSource = [];
this.to this.positionInfo= "请选择生产线";
} }
} }
} }

51
src/pages/login/index.vue

@ -4,10 +4,12 @@
<image mode="widthFix" class="loginimg" src="../../static/icons_ui/login_bg.png"></image> <image mode="widthFix" class="loginimg" src="../../static/icons_ui/login_bg.png"></image>
<view class="login_title"> <view class="login_title">
<text>您好欢迎使用</text><br> <text>您好欢迎使用</text><br>
WMS仓库管理系统 WMS仓库管理系统<br>
版本: {{version}}
</view> </view>
<view class="bgf login_wrap"> <view class="bgf login_wrap">
<view class="loginbox"> <view class="loginbox">
<form> <form>
<view class="mytab"> <view class="mytab">
<!-- <view class="mytabline" :class="tapstyle == 1?'active':''" @click="tapchenge(1)">扫码登录</view> --> <!-- <view class="mytabline" :class="tapstyle == 1?'active':''" @click="tapchenge(1)">扫码登录</view> -->
@ -28,7 +30,8 @@
</view> </view>
<view> <view>
<!-- <input class="uni-input" placeholder="请输入租户名" v-model="tenantName" disabled="true" /> --> <!-- <input class="uni-input" placeholder="请输入租户名" v-model="tenantName" disabled="true" /> -->
<uni-data-select class="uni-data-select" placeholder="请输入租户名" v-model="tenantValue" :clear="false" :localdata="tenantArray"></uni-data-select> <uni-data-select class="uni-data-select" placeholder="请输入租户名" v-model="tenantValue"
:clear="false" :localdata="tenantArray"></uni-data-select>
</view> </view>
</view> </view>
<view class="conone"> <view class="conone">
@ -104,8 +107,8 @@
data() { data() {
return { return {
tenantArray: JSON.parse(import.meta.env.VITE_TENANT), tenantArray: JSON.parse(import.meta.env.VITE_TENANT),
smloginmsg: "", smloginmsg: "",
tenantValue:0, tenantValue: 0,
// tenantName: "", // tenantName: "",
username: "", username: "",
password: "", password: "",
@ -114,7 +117,8 @@
showPassword: true, showPassword: true,
imageSrc: "", imageSrc: "",
code: "", code: "",
uuid: "" uuid: "",
version: ""
} }
}, },
// computed: mapState(['forcedLogin', 'hasLogin']), // computed: mapState(['forcedLogin', 'hasLogin']),
@ -161,6 +165,7 @@
}).catch(error => { }).catch(error => {
this.showErrorMessage(error); this.showErrorMessage(error);
}) })
this.getAppVersion()
}, },
methods: { methods: {
// ...mapMutations(['login']), // ...mapMutations(['login']),
@ -197,8 +202,8 @@
logininfo.password = this.password logininfo.password = this.password
logininfo.code = this.code; logininfo.code = this.code;
logininfo.uuid = this.uuid; logininfo.uuid = this.uuid;
logininfo.tenantName = this.tenantArray.find(item=>item.value==this.tenantValue).text; logininfo.tenantName = this.tenantArray.find(item => item.value == this.tenantValue).text;
uni.setStorageSync('tenantId', this.tenantValue) uni.setStorageSync('tenantId', this.tenantValue)
} else if (this.tapstyle == 1) { } else if (this.tapstyle == 1) {
@ -254,7 +259,20 @@
this.uuid = res.data.uuid this.uuid = res.data.uuid
} }
}) })
},
getAppVersion() {
const systemInfo = uni.getSystemInfoSync();
// #ifdef H5
this.version = systemInfo.appVersion;
console.log(systemInfo.appVersion, '版本号');
// #endif
// #ifdef APP
this.version = systemInfo.appWgtVersion;
// #endif
} }
} }
} }
</script> </script>
@ -284,7 +302,7 @@
.mytabline { .mytabline {
flex: 1; flex: 1;
text-align: center; text-align: center;
padding: 20rpx 0; padding: 10rpx 0;
color: #666; color: #666;
position: relative; position: relative;
font-size: 0.875rem; font-size: 0.875rem;
@ -339,15 +357,16 @@
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
padding: 0 0 0 20rpx; padding: 0 0 0 20rpx;
} }
.conone .uni-data-select .uni-select{
background-color: #F7F9FF; .conone .uni-data-select .uni-select {
height: 90rpx; background-color: #F7F9FF;
line-height: 90rpx; height: 90rpx;
border: 0px; line-height: 90rpx;
border: 0px;
padding: 0 10rpx 0 20rpx; padding: 0 10rpx 0 20rpx;
} }
.conone .title { .conone .title {
font-size: .875rem; font-size: .875rem;
align-items: center; align-items: center;

113
src/pages/package/record/overPackageRecord.vue

@ -1,7 +1,8 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view> <com-blank-view @goScan='getBusinessType' 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="cen_card" style="background-color: #fff; margin:10px 0px 0px 10px;"> <view class="cen_card" style="background-color: #fff; margin:10px 0px 0px 10px;">
@ -60,10 +61,12 @@
<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="true" @confirm="handleConfirm"> <winComScanBalance ref="scanPopup" @getBalance='getScanResult' bussinessCode="OverPackage">
</win-scan-pack-and-location > </winComScanBalance>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<!-- <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> -->
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -71,7 +74,8 @@
<script> <script>
import { import {
overPackageRecordSubmit, overPackageRecordSubmit,
getPackUnitByItemCode getPackUnitByItemCode,
getBalanceByParams
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome goHome
@ -79,6 +83,9 @@
import { import {
getInventoryStatusDesc, getInventoryStatusDesc,
getLocationAreaTypeName,
getLocationAreaTypeInfo,
getListLocationAreaTypeDesc,
getDirectoryItemArray, getDirectoryItemArray,
getPackUnitName, getPackUnitName,
getUomInfo getUomInfo
@ -101,6 +108,9 @@
import packageTarget from '@/mycomponents/package/packageTarget.vue' import packageTarget from '@/mycomponents/package/packageTarget.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue' import packUnit from '@/mycomponents/qty/packUnit.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
import { import {
getCurrDateTime getCurrDateTime
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -116,7 +126,8 @@
recommendBalance, recommendBalance,
packageTarget, packageTarget,
recordComDetailCard, recordComDetailCard,
packUnit packUnit,
winComScanBalance
}, },
data() { data() {
return { return {
@ -126,6 +137,7 @@
fromLocationCode: "", fromLocationCode: "",
isShowLocation: false, isShowLocation: false,
fromLocationAreaTypeList: [], fromLocationAreaTypeList: [],
fromInventoryStatuses: [],
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
@ -136,20 +148,12 @@
show: false, show: false,
toPackUnitShow: "请选择", toPackUnitShow: "请选择",
toPackQty: "", toPackQty: "",
itemCode: "" itemCode: "",
resultData: {}
}; };
}, },
onShow(){ onShow() {
var typeCode = "OverPackage" this.getBusinessType();
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)
}
});
}, },
// //
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
@ -165,6 +169,19 @@
mounted() {}, mounted() {},
methods: { methods: {
getBusinessType(){
var typeCode = "OverPackage"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType=res.businessType;
this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses);
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.openScanPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
getUomInfo(uom) { getUomInfo(uom) {
let item = getUomInfo(uom); let item = getUomInfo(uom);
if (item == '') { if (item == '') {
@ -173,9 +190,6 @@
return item.label return item.label
} }
}, },
scanPopupPack() {
this.$refs.scanPopupPack.openScanPopup();
},
showPackage() { showPackage() {
getPackUnitByItemCode(this.itemCode).then(res => { getPackUnitByItemCode(this.itemCode).then(res => {
if (res.data != null && res.data.list.length > 0) { if (res.data != null && res.data.list.length > 0) {
@ -210,15 +224,24 @@
this.toPackUnitShow = e[0].label this.toPackUnitShow = e[0].label
}, },
// //
handleConfirm(fromLocationCode){ handleConfirm(fromLocationCode) {
this.$refs.scanLocationCode.openScanPopupSimulate(fromLocationCode) this.$refs.scanLocationCode.openScanPopupSimulate(fromLocationCode)
}, },
getScanResult(result) { getScanResult(result) {
this.setData(result);
},
setData(result) {
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
this.fromPackUnit = pack.packUnit; this.fromPackUnit = pack.packUnit;
this.fromPack = pack; this.fromPack = pack;
if(this.fromLocationCode&&this.fromLocationCode!=balance.locationCode){
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位["+this.fromLocationCode+"]没有库存余额")
return;
}
var item = this.detailSource.find(res => { var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) { if (res.itemCode == balance.itemCode) {
return res return res
@ -234,6 +257,7 @@
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.itemCode = balance.itemCode; this.itemCode = balance.itemCode;
this.fromLocationCode =balance.locationCode
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
@ -253,8 +277,6 @@
} }
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
calcHandleQty() { calcHandleQty() {
@ -284,19 +306,20 @@
}, },
openScanPopup() { openScanPopup() {
if (this.fromLocationCode == "") { if(this.businessType){
this.showFromLocationPopup(); this.$refs.scanPopup.openScanPopup(this.businessType);
return }else {
this.getBusinessType()
} }
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
}, },
showFromLocationPopup() { showFromLocationPopup() {
this.$nextTick(() => { this.$nextTick(() => {
let overPackageRecord = uni.getStorageSync('overPackageRecord') let overPackageRecord = uni.getStorageSync('overPackageRecord')
if(overPackageRecord){ if (overPackageRecord) {
this.$refs.scanLocationCode.openScanPopupSimulate(overPackageRecord) this.$refs.scanLocationCode.openScanPopupSimulate(overPackageRecord)
}else{ } else {
this.$refs.scanLocationCode.openScanPopup(); this.$refs.scanLocationCode.openScanPopup();
} }
}) })
@ -315,7 +338,7 @@
}, },
commit() { commit() {
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
if (!this.toPackUnit||this.toPackUnit == "包装规格") { if (!this.toPackUnit || this.toPackUnit == "包装规格") {
this.showErrorMessage("请选择目标包装规格") this.showErrorMessage("请选择目标包装规格")
return; return;
} }
@ -357,18 +380,18 @@
let list = [] let list = []
res.data.forEach(item => { res.data.forEach(item => {
list.push({ list.push({
itemCode:item.itemCode, // itemCode: item.itemCode, //
itemName: item.itemName, // itemName: item.itemName, //
packName: item.packName,// packName: item.packName, //
packageCode: item.toPackingNumber, // packageCode: item.toPackingNumber, //
batch:item.toBatch,// batch: item.toBatch, //
parentNumber:item.parentNumber,// parentNumber: item.parentNumber, //
itemType: item.itemType,// itemType: item.itemType, //
asnNumber:item.asnNumber,//ASN asnNumber: item.asnNumber, //ASN
supplierCode: item.supplierCode, // supplierCode: item.supplierCode, //
qty: item.qty, // qty: item.qty, //
printTimes:getCurrDateTime(), // printTimes: getCurrDateTime(), //
productionLineCode:item.productionLineCode,//线 productionLineCode: item.productionLineCode, //线
barcodeString: item.barcodeString, // barcodeString: item.barcodeString, //
barcodeBase64: '', barcodeBase64: '',
}) })
@ -439,7 +462,7 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, },
getLocation(location, code) { getLocation(location, code) {
if(code){ if (code) {
uni.setStorageSync('overPackageRecord', code) uni.setStorageSync('overPackageRecord', code)
} }
this.getFromLocationCode(location, code) this.getFromLocationCode(location, code)
@ -448,15 +471,15 @@
this.fromLocationCode = code; this.fromLocationCode = code;
this.openScanPopup(); this.openScanPopup();
}, },
showCommitSuccessMessage(hint,pointData) {
showCommitSuccessMessage(hint, pointData) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.detailSource = [] this.detailSource = []
this.fromLocationCode = ''; this.fromLocationCode = '';
this.dataContent = {} this.dataContent = {}
if (pointData.length > 0) { if (pointData.length > 0) {
uni.redirectTo({ uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}` url: `/pages/point/index?points=${JSON.stringify(pointData)}`
}); });
} }

127
src/pages/point/index.vue

@ -59,7 +59,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="" style="position: fixed;width: 100%;bottom: 0rpx;left: 0px;"> <view class="" style="position: fixed;width: 100%;bottom: 0rpx;left: 0px;" v-show="isLoadFinish">
<button @click="printImage" <button @click="printImage"
style='background:rgb(60, 156, 255) !important ;color: white;margin-top: 80rpx;'> 打印</button> style='background:rgb(60, 156, 255) !important ;color: white;margin-top: 80rpx;'> 打印</button>
</view> </view>
@ -81,13 +81,67 @@
name: 'point', name: 'point',
data() { data() {
return { return {
data: {}, timer:null,
originData:[],
data: [],
newHtmlContent: '', //html newHtmlContent: '', //html
isLoadFinish: false, isLoadFinish: false,
} }
}, },
methods: { methods: {
getListData(){
//
// 线 线
// this.data = [{
// itemCode:'065.051-01M', //
// itemName: 'PCCLARNATEA1225BLACK9999', //
// packName: '',//
// packageCode: 'PS0513-000003', //
// batch:'20240514',//
// parentNumber:'PS0513-000003',//
// itemType:'',//
// asnNumber:'123232',//ASN
// supplierCode: 'Fewewq', //
// qty: '100', //
// printTimes:'2019-09-09 09:09:00', //
// barcodeString: 'HMQ;V1.0;Dwork1-line1;F;R2024-04-03T08:28:41;B20240403;PPN0403-000005;I399.960-12;Q5.000000;UEA;',
// barcodeBase64: '',
// productionLineCode:''//线
// }]
let _this = this
this.$nextTick(async () => {
//
const el = _this.$refs['qrcodeRef']
let str = ''
el.forEach(async (item, index) => {
await item.canvasToTempFilePath({
success: async (res) => {
// base64
await pathToBase64(res.tempFilePath).then(base64 => {
_this.data[index].barcodeBase64 = base64
if (index == el.length - 1) {
_this.isLoadFinish = true
uni.hideLoading();
}
}).catch(err => {
console.log(err);
})
},
fail(err) {
console.log('err:::', err)
}
})
})
})
},
// #ifdef APP // #ifdef APP
// //
printImage() { printImage() {
@ -116,6 +170,7 @@
if (newVal == true) { if (newVal == true) {
// html // html
let str = '' let str = ''
// #ifdef APP
this.readFile(htmlFileUrl, (htmlContent) => { this.readFile(htmlFileUrl, (htmlContent) => {
this.newHtmlContent = htmlContent this.newHtmlContent = htmlContent
this.data.forEach(item => { this.data.forEach(item => {
@ -195,60 +250,34 @@
"mainBody", str); // "mainBody", str); //
console.log(this.newHtmlContent) console.log(this.newHtmlContent)
}); });
// #endif
} }
} }
}, },
onLoad(option) { onLoad(option) {
uni.showLoading({
title: '加载中...',
mask: true
});
if (option.points) { if (option.points) {
this.data = JSON.parse(option.points); this.originData = JSON.parse(option.points);
}
},
unmounted() {
if(this.timer){
clearTimeout(this.timer)
this.timer = null
} }
}, },
async onShow() { onShow() {
// this.timer = setTimeout(()=>{
// 线 线 if(this.timer){
// this.data = [{ clearTimeout(this.timer)
// itemCode:'065.051-01M', // this.timer = null
// itemName: 'PCCLARNATEA1225BLACK9999', // }
// packName: '',// this.data = this.originData
// packageCode: 'PS0513-000003', // this.getListData()
// batch:'20240514',// },1000)
// parentNumber:'PS0513-000003',//
// itemType:'',//
// asnNumber:'123232',//ASN
// supplierCode: 'Fewewq', //
// qty: '100', //
// printTimes:'2019-09-09 09:09:00', //
// barcodeString: 'HMQ;V1.0;Dwork1-line1;F;R2024-04-03T08:28:41;B20240403;PPN0403-000005;I399.960-12;Q5.000000;UEA;',
// barcodeBase64: '',
// productionLineCode:''//线
// }]
this.$nextTick(async () => {
//
const el = this.$refs['qrcodeRef']
let str = ''
el.forEach(async (item, index) => {
await item.canvasToTempFilePath({
success: async (res) => {
// base64
await pathToBase64(res.tempFilePath).then(base64 => {
this.data[index].barcodeBase64 = base64
if (index == el.length - 1) {
this.isLoadFinish = true
}
}).catch(err => {
console.log(err);
})
},
fail(err) {
console.log('err:::', err)
}
})
})
})
}, },
} }
</script> </script>

8
src/pages/productionReturn/coms/comScanReturnPack.vue

@ -321,11 +321,11 @@
) )
} }
} else { } else {
if (this.jobContent.AllowModifyBatch == null) { if (this.jobContent.allowModifyBatch == "TRUE") {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot + this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的发料明细,是否要继续发料?', res => { '】的发料明细,是否要继续发料?', res => {
if (res) { if (res) {
let batch = that.createBatchInfo(label, balance); let batch = that.createBatchInfo(label, balance,packageInfo);
fromLocation.Batchs.unshift(batch); fromLocation.Batchs.unshift(batch);
} }
}) })
@ -352,7 +352,7 @@
} }
}, },
createBatchInfo(data, balance) { createBatchInfo(data, balance,packageInfo) {
let batch = { let batch = {
batch: data.lot, batch: data.lot,
qty: 0, qty: 0,
@ -360,7 +360,7 @@
handleQty: Number(data.qty), handleQty: Number(data.qty),
Records: [] Records: []
} }
let record = this.creatRecord(data, balance); let record = this.creatRecord(data, balance,packageInfo);
batch.Records.push(record); batch.Records.push(record);
this.issueRecord.unshift(record) this.issueRecord.unshift(record)
return batch; return batch;

35
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -14,9 +14,9 @@
@change="switchChange"></u-switch> @change="switchChange"></u-switch>
</view> </view>
</view> </view>
<view class="" v-if="operation=='reject'"> <view class="" v-if ="operation=='reject'">
<uni-section title="拒收原因" type="line"> <uni-section title="拒收原因" type="line">
<uni-easyinput v-model="reasonText" placeholder="请输入拒收原因"></uni-easyinput> <uni-easyinput v-model="reasonText" placeholder="请输入拒收原因" ></uni-easyinput>
</uni-section> </uni-section>
</view> </view>
@ -44,7 +44,7 @@
<view v-if="operation=='receipt'" class="uni-flex u-col-center space-between padding_10"> <view v-if="operation=='receipt'" class="uni-flex u-col-center space-between padding_10">
<view> <view>
<locationCompare ref="locationCompare" title="收货库位" :recommendLocationCode="jobToLocationCode" <locationCompare ref="locationCompare" title="收货库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode' @getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"> :locationAreaTypeList="toLocationAreaTypeList">
</locationCompare> </locationCompare>
</view> </view>
@ -143,8 +143,9 @@
operation: '', operation: '',
scanedPackingNumber: '', scanedPackingNumber: '',
status: '', status: '',
switchCode: '', switchCode:"",
reasonText: "" isCheckLocation: 'purchaseReceiptLocationCodeValidate',//
reasonText: "",
}; };
}, },
@ -154,7 +155,7 @@
this.scanedPackingNumber = option.scaned || ''; this.scanedPackingNumber = option.scaned || '';
this.operation = option.operation; this.operation = option.operation;
this.status = option.status; this.status = option.status;
this.switchCode = "purchasereceiptPrintPDA" this.switchCode = "purchasereceiptPrintPDA"//pda
}, },
@ -240,6 +241,12 @@
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.detailSource = getTreeDataSource(that.subList) that.detailSource = getTreeDataSource(that.subList)
that.isCheckLocation = getSwitchInfoByCode(that.isCheckLocation)
if (that.isCheckLocation) {
that.toLocationCode = ""
} else {
that.toLocationCode = that.jobToLocationCode;
}
that.isAllReceived = false; that.isAllReceived = false;
nextTick(() => { nextTick(() => {
that.detailSource.forEach(r => { that.detailSource.forEach(r => {
@ -494,10 +501,8 @@
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();
purchaseReceiptJobSubmit(params).then(res => { purchaseReceiptJobSubmit(params).then(res => {
if (res.data) { if (res.data) {
let isCheckPrint = getSwitchInfoByCode(this.switchCode) let isCheckPrint = getSwitchInfoByCode(this.switchCode)
if (!isCheckPrint) { if (!isCheckPrint) {
@ -559,10 +564,8 @@
}) })
}, 2000) }, 2000)
} }
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
@ -674,7 +677,6 @@
showMessage(message) { showMessage(message) {
setTimeout(r => { setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -685,7 +687,6 @@
showErrorMessage(message) { showErrorMessage(message) {
setTimeout(r => { setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -708,15 +709,7 @@
} }
}, },
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
navigateBack(1) navigateBack(1)
}) })

7
src/pages/purchaseReceipt/job/receiptJob.vue

@ -341,7 +341,10 @@
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
@ -361,8 +364,6 @@
}, },
getScanResult(result) { getScanResult(result) {
try { try {
let filters = [] let filters = []

2
src/pages/putaway/job/putawayJob.vue

@ -87,6 +87,7 @@
onShow() { onShow() {
this.getList('refresh'); this.getList('refresh');
}, },
onReady() { onReady() {
@ -166,6 +167,7 @@
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
this.openScanPopup()
} }
var list = res.data.list; var list = res.data.list;

64
src/pages/query/coms/comLocationDetailCard.vue

@ -1,29 +1,57 @@
<template> <template>
<view class=""> <view class="" style="width: 100%; background-color: #fff; border-radius: 10rpx;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true"> <view class="uni-flex uni-row" style="align-items: center;" >
<view class='split_line'></view> <text style="font-size:35rpx; padding-left:10rpx">物料代码</text>
<template v-slot:title> <item :dataContent="dataContent" style="padding-top: 10rpx; margin-left: 10rpx;"></item>
<itemQty :dataContent="dataContent" :isShowBalance="true"></itemQty> </view>
</template>
<view class="uni-flex uni-row space-between" style="align-items: center;">
<view v-for="(item, index) in dataContent.list"> <view>
<balance :dataContent="item" :isShowFromLocation="false" :isShowPack="isShowPack" <pack v-if="dataContent.parentNumber" title="父包装" :packingCode="dataContent.parentNumber"></pack>
:isShowStdPack="false"> <pack v-if=" dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
</balance> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<view class="" v-if="dataContent.jobNumber"
style="font-size: 30rpx; padding-left: 10rpx ; padding-bottom: 10rpx;">
<text style="color: coral; ">任务号</text>
{{dataContent.jobNumber}}
</view> </view>
</uni-collapse-item> <view class="" v-if="dataContent.businessType"
</uni-collapse> style="font-size: 30rpx; padding-left: 10rpx ; padding-bottom: 10rpx;">
<text style="color:green; ">业务类型</text>
{{dataContent.businessType}}
</view>
</view>
<view class="uni-flex" style="flex-direction: column;">
<view class="uni-flex uni-row center">
<qty :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="true"></qty>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import itemQty from '@/mycomponents/item/itemQty.vue' import itemQty from '@/mycomponents/item/itemQty.vue'
import balance from '@/mycomponents/balance/balance.vue' import item from '@/mycomponents/item/item.vue'
import pack from '@/mycomponents/balance/pack.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import status from '@/mycomponents/status/status.vue'
export default { export default {
components: { components: {
itemQty, itemQty,
balance item,
pack,
batch,
qty,
status
}, },
data() { data() {
return { return {
@ -35,7 +63,7 @@
props: { props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {}, default: null,
}, },
isShowPack: { isShowPack: {
type: Boolean, type: Boolean,
@ -74,4 +102,4 @@
</script> </script>
<style> <style>
</style> </style>

269
src/pages/query/location.vue

@ -1,28 +1,27 @@
<template> <template>
<!-- <page-meta root-font-size="18px"></page-meta> --> <!-- <page-meta root-font-size="18px"></page-meta> -->
<view class=""> <view class="uni-flex" style="flex-direction: column" >
<com-blank-view @goScan='openScanPopup' v-if="locationCode==''"></com-blank-view> <view class="" style=" width: 100%; position: fixed; top: 0;right: 0;">
<com-blank-view @goScan='openScanPopup' v-if="locationCode==''"></com-blank-view>
<my-paging v-show="locationCode!=''" ref="paging" v-model="dataList" @query="queryList"> <location-info :locationDetail='locationDetail' v-if="locationCode"></location-info>
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中如果需要跟着滚动则不要设置slot="top" --> <z-tabs v-if="locationCode" :list="tabList" @change="tabChange" />
<template #top> </view>
<view v-if="locationCode!=''"> <view style="padding-top: 200rpx;width:100%">
<location-info :locationDetail='locationDetail' v-if="locationCode"></location-info> <view v-if="totalCount>0" style="margin:10rpx; font-size:35rpx; font-weight:bold">总数 : {{totalCount}} </view>
<z-tabs :list="tabList" @change="tabChange" /> <view v-for="(item, index) in dataList" style="width:100%">
</view> <view class="uni-flex uni-row" style=" align-items: center; background-color: #fff; border-radius:10rpx;margin:10rpx; " >
<view class="" style="font-size:35rpx; ">
</template> ({{index+1}})
<view class="" style="padding-bottom: 50rpx;"> </view>
<view v-if="tabIndex == 0" v-for="(item, index) in dataList">
<comLocationDetailCard :isShowPack="false" :dataContent="item" style='margin: 10rpx;'> <comLocationDetailCard :isShowPack="false" :dataContent="item" style='margin: 10rpx;'>
</comLocationDetailCard> </comLocationDetailCard>
</view> </view>
<view v-if="tabIndex == 1" v-for="(item, index) in dataList">
<comLocationDetailCard :dataContent="item" style='margin: 10rpx;'></comLocationDetailCard>
</view>
</view> </view>
<uni-load-more :status="loadingType" v-if="dataList.length>0" />
</view>
</my-paging>
<win-scan-button @goScan='openScanPopup' v-if="locationCode!=''"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="locationCode!=''"></win-scan-button>
<winScanLocation ref="scanPopup" title="库位代码" @getLocation='getScanCode'></winScanLocation> <winScanLocation ref="scanPopup" title="库位代码" @getLocation='getScanCode'></winScanLocation>
@ -36,17 +35,19 @@
<script> <script>
import { import {
getBalanceByLocationcode, getBalanceByLocationcode,
getBalanceByLocationcodeGroup getBalanceByLocationcodeGroup,
getExpectInByLocationCode,
getExpectOutByLocationCode
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
maxPageSize, maxPageSize,
goHome goHome
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
calc calc
} from '@/common/calc.js'; } from '@/common/calc.js';
import locationInfo from '@/mycomponents/location/locationInfo.vue' import locationInfo from '@/mycomponents/location/locationInfo.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue'
@ -72,15 +73,18 @@
balances: [], balances: [],
dataIn: [], dataIn: [],
dataOut: [], dataOut: [],
pageNo: 1,
// //
pageSize: 1000, pageSize: 10,
// //
pageCurrent: 1, pageCurrent: 1,
// //
dataList: [], dataList: [],
tabList: ['汇总', '明细'], tabList: ['汇总', '明细', '预计入', '预计出'],
tabIndex: 0, tabIndex: 0,
loadingType: "nomore",
totalCount:0
}; };
}, },
onLoad() {}, onLoad() {},
@ -95,6 +99,21 @@
mounted() { mounted() {
this.openScanPopup() this.openScanPopup()
}, },
onPullDownRefresh() {
this.getContentByTab(this.tabIndex, this.pageNo, this.pageSize, "refresh");
},
onReachBottom() {
console.log("底部")
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getContentByTab(this.tabIndex, this.pageNo, this.pageSize, "more");
},
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup();
@ -112,114 +131,181 @@
// this.getContentByTab(this.tabIndex); // this.getContentByTab(this.tabIndex);
}, },
getSummary(pageNo, pageSize) { getSummary(pageNo, pageSize, type) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
mask: true mask: true
}); });
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.dataList = [];
}
var params = { var params = {
itemCode: this.itemCode, locationCode: this.locationCode,
pageNo: pageNo, pageNo: this.pageNo,
pageSize: pageSize pageSize: pageSize
} }
getBalanceByLocationcodeGroup(params).then(res => { getBalanceByLocationcodeGroup(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data.list.length > 0) { if (type === "refresh") {
this.summarysList = this.setShowList(res.data.list) uni.stopPullDownRefresh();
this.$refs.paging.complete(this.summarysList); }
var list = res.data.list;
} else { this.totalCount = res.data.total
this.$refs.paging.complete(false); this.loadingType = "loadmore";
this.showMessage('未查找到库位【' + this.locationCode + '】'); if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
} }
this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++;
}).catch(error => { }).catch(error => {
this.$refs.paging.complete(false);
uni.hideLoading(); uni.hideLoading();
this.showMessage(error); this.showMessage(error);
}) })
}, },
getDetailList(pageNo, pageSize) { getDetailList(pageNo, pageSize, type) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
mask: true mask: true
}); });
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.dataList = [];
}
var params = { var params = {
locationCode: this.locationCode, locationCode: this.locationCode,
pageNo: pageNo, pageNo: this.pageNo,
pageSize: pageSize pageSize: pageSize
} }
getBalanceByLocationcode(params).then(res => { getBalanceByLocationcode(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data.list.length > 0) { if (type === "refresh") {
this.detailList = this.setShowList(res.data.list) uni.stopPullDownRefresh();
this.$refs.paging.complete(this.detailList); }
} else { var list = res.data.list;
this.$refs.paging.complete(false); this.totalCount = res.data.total
this.showMessage('未查找到库位w【' + this.locationCode + '】'); this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
} }
this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++;
}).catch(error => { }).catch(error => {
this.$refs.paging.complete(false);
uni.hideLoading(); uni.hideLoading();
this.showMessage(error); this.showMessage(error);
}) })
}, },
setShowList(list) { getExpectin(pageNo, pageSize, type) {
var resultlist = []; let that = this;
list.forEach(res => { uni.showLoading({
var temp = resultlist.find(res1 => title: "加载中...",
res1.itemCode == res.itemCode) mask: true
});
if (temp == undefined) {
var data = { if (type === "refresh") {
itemCode: res.itemCode, this.pageNo = 1;
qty: Number(res.qty), this.dataList = [];
uom: res.uom, }
list: []
} var params = {
var item = { pageNo: this.pageNo,
packingNumber: res.packingNumber, pageSize: pageSize,
batch: res.batch, filters: [{
uom: res.uom, column: "locationCode",
qty: Number(res.qty), action: "==",
inventoryStatus: res.inventoryStatus, value: this.locationCode
}
data.list.push(item) }]
resultlist.push(data) }
} else {
temp.qty = calc.add(temp.qty,res.qty) getExpectInByLocationCode(params).then(res => {
var item = { uni.hideLoading();
packingNumber: res.packingNumber, if (type === "refresh") {
batch: res.batch, uni.stopPullDownRefresh();
uom: res.uom,
qty: Number(res.qty),
inventoryStatus: res.inventoryStatus,
}
temp.list.push(item)
} }
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++;
}).catch(error => {
uni.hideLoading();
this.showMessage(error);
}) })
return resultlist;
}, },
ontabtap(e) {
let index = e.target.dataset.current || e.currentTarget.dataset.current; getExpectOut(pageNo, pageSize, type) {
this.tabIndex = index; let that = this;
this.getContentByTab(this.tabIndex); uni.showLoading({
title: "加载中...",
mask: true
});
if (type === "refresh") {
this.pageNo = 1;
this.dataList = [];
}
var params = {
pageNo: this.pageNo,
pageSize: pageSize,
filters: [{
column: "locationCode",
action: "==",
value: this.locationCode
}]
}
getExpectOutByLocationCode(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++;
}).catch(error => {
uni.hideLoading();
this.showMessage(error);
})
}, },
getContentByTab(index, pageNo, pageSize) { getContentByTab(index, pageNo, pageSize, type) {
if (index === 0) { if (index === 0) {
this.getSummary(pageNo, pageSize); this.getSummary(pageNo, pageSize, type);
} else if (index === 1) this.getDetailList(pageNo, pageSize) } else if (index === 1) this.getDetailList(pageNo, pageSize, type)
else if (index === 2) { else if (index === 2) {
this.dataIn = this.balances; this.getExpectin(pageNo, pageSize, type)
} else if (index == 3) { } else if (index == 3) {
this.dataOut = this.balances; this.getExpectOut(pageNo, pageSize, type)
} }
}, },
@ -237,14 +323,7 @@
}, },
tabChange(index) { tabChange(index) {
this.tabIndex = index; this.tabIndex = index;
this.$refs.paging.reload(true); this.getContentByTab(index, this.pageNo, this.pageSize,"refresh")
},
queryList(pageNo, pageSize) {
console.log("加载", pageNo)
if (this.locationCode != "") {
this.getContentByTab(this.tabIndex, pageNo, pageSize)
}
}, },
} }
}; };
@ -254,4 +333,4 @@
page { page {
height: 100%; height: 100%;
} }
</style> </style>

5
src/pages/repleinsh/coms/comScanReplishPack.vue

@ -153,6 +153,7 @@
defaultValueList: [], defaultValueList: [],
label: {}, label: {},
fromInventoryStatuses: "", fromInventoryStatuses: "",
packageInfo:{}
} }
}, },
created() { created() {
@ -252,7 +253,7 @@
}) })
this.getBalance(result.label, packageInfo, balances => { this.getBalance(result.label, packageInfo, balances => {
this.packageInfo =packageInfo;
// //
let s = ''; let s = '';
if (!result.package.parentNumber) { if (!result.package.parentNumber) {
@ -410,7 +411,7 @@
}, },
selectBalanceItem(balance) { selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance); this.afterGetBalance(this.label, balance,this.packageInfo);
}, },
afterGetBalance(label, balance, packageInfo) { afterGetBalance(label, balance, packageInfo) {

1
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -131,7 +131,6 @@
getBusinessType(this.businessTypeCode, res => { getBusinessType(this.businessTypeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
res.fromLocationAreaTypeList.push("INSPECT","SUPPER")
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();

16
src/pages/stockUp/coms/comScanStockUpPack.vue

@ -279,13 +279,13 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
this.showBalanceSelect(balanceRes.data.list, packageInfo); this.showBalanceSelect(balanceRes.data.list, packageInfo);
} }
} else { } else {
this.showErrorMessage(balanceRes.message.message); this.showErrorMessage(balanceRes.message);
} }
uni.hideLoading(); uni.hideLoading();
}); });
} }
} catch (e) { } catch (error) {
this.showErrorMessage(e.stack) this.showErrorMessage(error)
uni.hideLoading(); uni.hideLoading();
} }
}, },
@ -340,11 +340,11 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
) )
} }
} else { } else {
if (this.jobContent.AllowModifyBatch == null) { if (this.jobContent.allowModifyBatch == "TRUE") {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot + this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的发货明细,是否要继续发货?', res => { '】的发货明细,是否要继续发货?', res => {
if (res) { if (res) {
let batch = that.createBatchInfo(label, balance); let batch = that.createBatchInfo(label, balance,packageInfo);
fromLocation.Batchs.unshift(batch); fromLocation.Batchs.unshift(batch);
} }
}) })
@ -371,15 +371,15 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
} }
}, },
createBatchInfo(data, balance) { createBatchInfo(data, balance,packageInfo) {
let batch = { let batch = {
batch: data.lot, batch: data.batch,
qty: 0, qty: 0,
uom: data.uom, uom: data.uom,
handleQty: Number(data.qty), handleQty: Number(data.qty),
Records: [] Records: []
} }
let record = this.creatRecord(data, balance); let record = this.creatRecord(data, balance,packageInfo);
batch.Records.push(record); batch.Records.push(record);
this.issueRecord.unshift(record) this.issueRecord.unshift(record)
return batch; return batch;

12
src/uni_modules/uni-combox/components/uni-combox/uni-combox.vue

@ -169,7 +169,7 @@
} }
</script> </script>
<style lang="scss" scoped> <style lang="less">
.uni-combox { .uni-combox {
font-size: 14px; font-size: 14px;
border: 1px solid #DCDFE6; border: 1px solid #DCDFE6;
@ -205,8 +205,8 @@
.uni-combox__input { .uni-combox__input {
flex: 1; flex: 1;
font-size: 14px; font-size: 14px;
height: 22px; height: 26px;
line-height: 22px; line-height: 26px;
} }
.uni-combox__input-plac { .uni-combox__input-plac {
@ -245,7 +245,7 @@
cursor: pointer; cursor: pointer;
/* #endif */ /* #endif */
line-height: 36px; line-height: 36px;
font-size: 14px; font-size: 45rpx;
text-align: center; text-align: center;
// border-bottom: solid 1px #DDDDDD; // border-bottom: solid 1px #DDDDDD;
padding: 0px 10px; padding: 0px 10px;
@ -294,4 +294,8 @@
.uni-combox__no-border { .uni-combox__no-border {
border: none; border: none;
} }
.uni-input-input {
font-size: 40rpx;
}
</style> </style>

Loading…
Cancel
Save