Browse Source

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

hella_online_20240829
lijuncheng 5 months ago
parent
commit
0592a6dd50
  1. 7
      src/api/request2.js
  2. 13
      src/mycomponents/package/packageCard.vue
  3. 14
      src/mycomponents/recommend/recommend.vue
  4. 3
      src/mycomponents/scan/winComScan.vue
  5. 4
      src/mycomponents/scan/winComScanFg.vue
  6. 7
      src/mycomponents/scan/winScanFgLabel.vue
  7. 7
      src/mycomponents/scan/winScanPack.vue
  8. 35
      src/mycomponents/scan/winScanPackAndLocation.vue
  9. 16
      src/pages/pointPutawayJob/index.vue
  10. 35
      src/pages/productPutaway/job/productPutawayDetail.vue
  11. 6
      src/pages/productReceipt/job/fgProductReceiptDetail.vue
  12. 3
      src/pages/productReceipt/job/productReceiptDetail.vue
  13. 60
      src/pages/purchaseReceipt/job/receiptDetail.vue
  14. 42
      src/pages/putaway/job/putawayDetail.vue
  15. 2
      src/pages/putaway/job/putawayJob.vue

7
src/api/request2.js

@ -4154,9 +4154,10 @@ export function isCheckMesCode(code) {
* 获取上架任务打印明细 * 获取上架任务打印明细
* @param {*} * @param {*}
*/ */
export function getJimuPutawayJobDetail(ids) { export function getJimuPutawayJobDetail(data) {
return request({ return request({
url: baseApi + "/wms/jimu-report/getPutawayJobDetailForPDA?masterIds="+ids, url: baseApi + "/wms/jimu-report/getPutawayJobDetailForPDA",
method: "get", method: "post",
data:data
}); });
} }

13
src/mycomponents/package/packageCard.vue

@ -93,6 +93,19 @@
}, },
watch: { watch: {
//
dataContent: {
handler(newVal, oldVal) {
if(newVal.scaned){
newVal.copyContent = "HPQ;V1.0;I" + newVal.itemCode + ";P" + newVal.packingNumber + ";B" + newVal.batch + ";Q" + newVal.qty
}else{
newVal.copyContent = ''
}
console.log('newVal.copyContent',newVal.copyContent)
},
immediate: true,
deep: true
}
}, },
methods: { methods: {

14
src/mycomponents/recommend/recommend.vue

@ -93,7 +93,19 @@
}, },
watch: { watch: {
//
detail: {
handler(newVal, oldVal) {
if(newVal.scaned){
newVal.copyContent = "HPQ;V1.0;I" + newVal.itemCode + ";P" + newVal.packingNumber + ";B" + newVal.batch + ";Q" + newVal.qty
}else{
newVal.copyContent = ''
}
console.log('newVal.copyContent',newVal.copyContent)
},
immediate: true,
deep: true
}
}, },
methods: { methods: {
copy() { copy() {

3
src/mycomponents/scan/winComScan.vue

@ -145,6 +145,9 @@
this.placeholderValue = '请扫描' + this.placeholder; this.placeholderValue = '请扫描' + this.placeholder;
}, },
methods: { methods: {
setItemCodeSimulate(scanMsg) {
this.scanMsg = scanMsg;
},
hide() { hide() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
// //

4
src/mycomponents/scan/winComScanFg.vue

@ -139,6 +139,10 @@
}, 1000); }, 1000);
// #endif // #endif
}, },
setItemCodeSimulate(itemCode,scanMsg) {
this.itemCode = itemCode;
this.scanMsg = scanMsg;
},
setItemCode(itemCode) { setItemCode(itemCode) {
this.itemCode = itemCode; this.itemCode = itemCode;
}, },

7
src/mycomponents/scan/winScanFgLabel.vue

@ -21,6 +21,8 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 模拟扫描功能 -->
<win-com-scan-fg v-show="false" ref="comscansimulate" @getResult="getScanResult" :isShowHistory="false" :clearResult="true"></win-com-scan-fg>
<comMessage ref="comMessage" @afterClose="getfocus"></comMessage> <comMessage ref="comMessage" @afterClose="getfocus"></comMessage>
</view> </view>
</template> </template>
@ -52,6 +54,11 @@
}, },
methods: { methods: {
//
simulateScan(item){
this.$refs.comscansimulate.setItemCodeSimulate(item.itemCode,item.copyContent)
this.$refs.comscansimulate.clickScanMsg();
},
openScanPopup(itemCode) { openScanPopup(itemCode) {
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')

7
src/mycomponents/scan/winScanPack.vue

@ -20,6 +20,8 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" @getResult="getScanResult" :headerType="headerType" :isShowHistory="false" :clearResult="true"></win-com-scan>
<comMessage ref="comMessage" @afterClose="getfocus"></comMessage> <comMessage ref="comMessage" @afterClose="getfocus"></comMessage>
</view> </view>
</template> </template>
@ -55,6 +57,10 @@
}, },
methods: { methods: {
simulateScan(item){
this.$refs.comscansimulate.setItemCodeSimulate(item.copyContent)
this.$refs.comscansimulate.clickScanMsg();
},
openScanPopup() { openScanPopup() {
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
@ -75,6 +81,7 @@
}, },
getScanResult(result) { getScanResult(result) {
if (result.success) { if (result.success) {
this.$emit("getResult", result); this.$emit("getResult", result);
} else { } else {

35
src/mycomponents/scan/winScanPackAndLocation.vue

@ -46,6 +46,9 @@
</view> </view>
</uni-popup> </uni-popup>
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select> <balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" @getResult="getScanResult" :headerType="headerType" :isShowHistory="false" :clearResult="true"></win-com-scan>
</view> </view>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</template> </template>
@ -172,6 +175,38 @@
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
}, },
//
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent,item) {
this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
// this.packGetFocus();
if (this.$refs.comscansimulate != undefined) {
this.$refs.comscansimulate.getfocus();
}
} else {
if (this.fromLocationList.length == 0) {
// this.locationGetFocus();
alert('没有来源库位:List')
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
let timer = setTimeout(res => {
if(timer){
clearTimeout(timer)
}
// this.$refs.comscansimulate.setItemCodeSimulate(item.copyContent)
// this.$refs.comscansimulate.clickScanMsg();
}, 500)
},
closeScanPopup(content) { closeScanPopup(content) {
this.$refs.popup.close(); this.$refs.popup.close();

16
src/pages/pointPutawayJob/index.vue

@ -14,7 +14,7 @@
创建人<text>{{data.creator||''}}</text> 创建人<text>{{data.creator||''}}</text>
</view> </view>
<view class="mb-text"> <view class="mb-text">
创建时间<text>{{data.createTime}}</text> 创建时间<text>{{formatDate(data.createTime)}}</text>
</view> </view>
</view> </view>
<u-table style="margin-top: 20rpx;"> <u-table style="margin-top: 20rpx;">
@ -50,6 +50,9 @@
import { import {
getJimuPutawayJobDetail getJimuPutawayJobDetail
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
dateFormat
} from '@/common/basic.js';
// //
const htmlFileUrl = '/hybrid/html/pointPutawayJob.html'; const htmlFileUrl = '/hybrid/html/pointPutawayJob.html';
import { import {
@ -93,8 +96,11 @@
}, function(e) { }, function(e) {
console.log("获取图片资源失败:" + e.message); console.log("获取图片资源失败:" + e.message);
}); });
} },
// #endif // #endif
formatDate(val) {
return dateFormat(val)
}
}, },
watch: { watch: {
isLoadFinish: { isLoadFinish: {
@ -115,7 +121,9 @@
} }
}, },
async onShow() { async onShow() {
await getJimuPutawayJobDetail(this.data.ids).then(res=>{ await getJimuPutawayJobDetail({
masterIds:this.data.ids
}).then(res=>{
this.data.sublist = res.data this.data.sublist = res.data
}) })
// //
@ -187,7 +195,7 @@
创建人<span>${this.data.creator}</span> 创建人<span>${this.data.creator}</span>
</div> </div>
<div class="mb-text"> <div class="mb-text">
创建时间<span>${this.data.createTime}</span> 创建时间<span>${this.formatDate(this.data.createTime)}</span>
</div> </div>
</div> </div>
<table style="margin-top: 20rpx;" style='border-collapse: collapse;'> <table style="margin-top: 20rpx;" style='border-collapse: collapse;'>

35
src/pages/productPutaway/job/productPutawayDetail.vue

@ -199,21 +199,23 @@
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.isCheckLocation = getSwitchInfoByCode(that.switchCode)
if (that.isCheckLocation) {
that.toLocationCode = ""
} else {
that.toLocationCode = that.jobToLocationCode;
}
that.detailSource.forEach(r => { that.detailSource.forEach(r => {
r.subList.forEach(s => { r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) { .packingNumber) {
s.scaned = true s.scaned = true
s.handleQty =s.qty // s.handleQty =s.qty
this.openScanPopupSimulate(s)
} }
}) })
}) })
that.isCheckLocation = getSwitchInfoByCode(that.switchCode)
if (that.isCheckLocation) {
that.toLocationCode = ""
} else {
that.toLocationCode = that.jobToLocationCode;
}
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -247,6 +249,25 @@
openDetail(item) { openDetail(item) {
this.$refs.detailInfoPopup.openPopup(item) this.$refs.detailInfoPopup.openPopup(item)
}, },
openScanPopupSimulate(item) {
let fromlocationCode = '';
let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
item.subList.forEach(l => {
//
var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location == undefined) {
fromlocationList.push(l.fromLocationCode);
}
//
if (fromlocationCode == '') {
fromlocationCode = l.fromLocationCode;
}
})
}
this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,item);
},
openScanPopup() { openScanPopup() {
let fromlocationCode = ''; let fromlocationCode = '';

6
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -231,7 +231,11 @@
that.detailSource.forEach(r => { that.detailSource.forEach(r => {
r.subList.forEach(s => { r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) s.scaned = true .packingNumber) {
s.scaned = true
//
this.$refs.scanPopup.simulateScan(s);
}
}) })
}) })

3
src/pages/productReceipt/job/productReceiptDetail.vue

@ -224,7 +224,8 @@
if (this.scanedPackingNumber && this.scanedPackingNumber == s if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber){ .packingNumber){
s.scaned = true s.scaned = true
s.handleQty =s.qty this.$refs.scanPopup.simulateScan(s);
// s.handleQty =s.qty
} }
}) })
}) })

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

@ -102,6 +102,9 @@
import { import {
productDismantleJobClose productDismantleJobClose
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
nextTick
} from 'vue';
export default { export default {
name: 'receipt_detail', name: 'receipt_detail',
@ -137,7 +140,7 @@
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
// this.scanedPackingNumber = option.scaned || ''; this.scanedPackingNumber = option.scaned || '';
this.operation = option.operation; this.operation = option.operation;
if (this.id != undefined) { if (this.id != undefined) {
// //
@ -219,13 +222,19 @@
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.detailSource.forEach(r => { that.isAllReceived = false;
r.subList.forEach(s => { nextTick(() => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s that.detailSource.forEach(r => {
.packingNumber) s.scaned = true r.subList.forEach(s => {
if (this.scanedPackingNumber && this
.scanedPackingNumber == s
.packingNumber) {
s.scaned = true
this.$refs.scanPopup.simulateScan(s);
}
})
}) })
}) })
that.isAllReceived = false;
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -423,7 +432,7 @@
mask: true mask: true
}); });
productDismantleJobClose(this.id).then(res => { productDismantleJobClose(this.id).then(res => {
console.log('拒收',res) console.log('拒收', res)
if (res.data) { if (res.data) {
navigateBack(1) navigateBack(1)
} else { } else {
@ -459,14 +468,15 @@
title: "提交成功,将跳转到打印页面", title: "提交成功,将跳转到打印页面",
mask: true mask: true
}); });
// //
let timerCount = 0 let timerCount = 0
const timer1 = setInterval(async ()=>{ const timer1 = setInterval(async () => {
if(timerCount == 10){ if (timerCount == 15) {
clearInterval(timer1) clearInterval(timer1)
uni.showLoading({ uni.showToast({
title: "跳转打印页面失败", title: "跳转打印页面失败",
mask: true icon: "none"
}); });
return; return;
} }
@ -474,30 +484,36 @@
filters: [{ filters: [{
column: "purchaseReceiptRecordNumber", column: "purchaseReceiptRecordNumber",
action: "in", action: "in",
value: res.data value: res.data.number
}], }],
pageNo: 1, pageNo: 1,
pageSize: 1000, pageSize: 1000,
}).then(res=>{ }).then(res1 => {
timerCount = timerCount + 1 timerCount = timerCount + 1
console.log(11111) if (res1.data && res1.data.list && res1.data
if(res.data && res.data.list&&res.data.list.length){ .list.length && (res1.data.total >= res
.data.detailCount)) {
uni.hideLoading() uni.hideLoading()
clearInterval(timer1) clearInterval(timer1)
const dataParams = { const dataParams = {
toLocationCode: res.data.list[0].toLocationCode, toLocationCode: res1.data.list[0]
number: res.data.list[0].number, .toLocationCode,
creator: res.data.list[0].creator, number: res1.data.list[0].number,
createTime: res.data.list[0].createTime, creator: res1.data.list[0].creator,
ids : res.data.list.map(item=>item.masterId).join(',') createTime: res1.data.list[0]
.createTime,
ids: res1.data.list.map(item =>
item.masterId).join(',')
} }
console.log(dataParams) console.log(dataParams)
uni.navigateTo({ uni.navigateTo({
url:'/pages/pointPutawayJob/index?data='+encodeURIComponent(JSON.stringify(dataParams)) url: '/pages/pointPutawayJob/index?data=' +
encodeURIComponent(JSON
.stringify(dataParams))
}) })
} }
}) })
},1000) }, 2000)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")

42
src/pages/putaway/job/putawayDetail.vue

@ -190,15 +190,6 @@
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.subList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getTreeDataSource(that.subList) that.detailSource = getTreeDataSource(that.subList)
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) s.scaned = true
s.inventoryStatus = s.inspectResult; //
})
})
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.jobToLocationCode = that.subList[0].toLocationCode; that.jobToLocationCode = that.subList[0].toLocationCode;
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
@ -208,6 +199,18 @@
} else { } else {
that.toLocationCode = that.jobToLocationCode; that.toLocationCode = that.jobToLocationCode;
} }
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) {
s.scaned = true
s.packList.forEach(item=>item.scaned = true)
s.inventoryStatus = s.inspectResult; //
this.openScanPopupSimulate(s)
}
})
})
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
@ -252,6 +255,27 @@
// this.calcHandleQty(); // this.calcHandleQty();
calcTreeHandleQty(this.detailSource) calcTreeHandleQty(this.detailSource)
}, },
//
openScanPopupSimulate(item){
let fromlocationCode = '';
let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
item.subList.forEach(l => {
//
var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location == undefined) {
fromlocationList.push(l.fromLocationCode);
}
//
if (fromlocationCode == '') {
fromlocationCode = l.fromLocationCode;
}
})
}
this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,item);
},
openScanPopup() { openScanPopup() {
let fromlocationCode = ''; let fromlocationCode = '';

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

@ -298,7 +298,7 @@
selectItem(item) { selectItem(item) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
uni.navigateTo({ uni.navigateTo({
url: './putawayDetail?id=' + item.masterId + '&status=' + item.status url: './putawayDetail?id=' + item.masterId + '&status=' + item.status+'&scaned='+item.packingNumber
}); });
}, },
getScanResult(result) { getScanResult(result) {

Loading…
Cancel
Save