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 3 months ago
parent
commit
fc1127b0c4
  1. 1
      src/api/httpRequest3.js
  2. 63
      src/hybrid/html/pointPutawayJob.html
  3. 15
      src/mycomponents/scan/winScanLocation.vue
  4. 35
      src/mycomponents/scan/winScanPackAndLocation.vue
  5. 20
      src/pages/package/record/overPackageRecord.vue
  6. 127
      src/pages/pointPutawayJob/index.vue
  7. 5
      src/pages/productPutaway/job/productPutawayJob.vue
  8. 5
      src/pages/productReceipt/job/productReceiptJob.vue
  9. 5
      src/pages/purchaseReceipt/job/receiptJob.vue
  10. 5
      src/pages/putaway/job/putawayJob.vue
  11. 1
      src/store/modules/user.js

1
src/api/httpRequest3.js

@ -36,6 +36,7 @@ function service(options = {}) {
}else {
if(res.data.code==401){
uni.clearStorageSync()
uni.removeStorageSync('overPackageRecord') // 删除直接翻包中缓存的来源库位
removeToken();
uni.reLaunch({
url: '/pages/login/index'

63
src/hybrid/html/pointPutawayJob.html

@ -15,8 +15,8 @@
<style>
.box {
font-size: 13px;
/* padding: 10px;
border: 1px solid #dedede; */
/* padding: 10px; */
border: 1px solid #dedede;
}
.left {
@ -70,38 +70,57 @@
.mb-kw {
border-bottom: 1px solid #dedede;
padding-bottom: 10px;
padding: 10px;
font-size: 15px;
}
.mb-kw span {
.mb-kw div {
font-weight: bold;
font-size: 16px;
font-size: 23px;
text-align: center;
}
.mb-text {
margin-top: 5px;
.mb-bo {
display: flex;
}
table, th, td {
border: 1px solid rgb(228, 231, 237);
border-collapse: collapse; /* 移除表格内边框间的间隙 */
.mb-bo .mb-left {
flex: 1
}
table{
width: 100%;
margin-top: 10px;
.mb-bo .mb-left .mb-text {
padding: 10px;
}
th{
padding: 4px ;
font-size: 12px;
.mb-bo .mb-left .mb-text:nth-child(1) {
border-bottom: 1px solid #dedede;
}
.mb-bo .mb-left .mb-text div {
font-weight: bold;
font-size: 16px;
text-align: center;
background:rgb(245, 246, 248);
color:rgb(96, 98, 102)
}
td{
padding: 4px ;
font-size: 12px;
.mb-bo .mb-right {
padding: 10px;
width: 230px;
border-left: 1px solid #dedede;
display: flex;
align-items: center;
}
.mb-bo .mb-right .mb-text {
width: 100%;
}
.mb-bo .mb-right .mb-text div {
font-weight: bold;
font-size: 20px;
text-align: center;
color:rgb(96, 98, 102)
width: 100%;
}
</style>
</head>

15
src/mycomponents/scan/winScanLocation.vue

@ -19,6 +19,8 @@
</view>
</view>
</uni-popup>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" @getResult="getScanResult" :clearResult="true" :boxFocus="true" :isShowHistory="false" headerType=""></win-com-scan>
<comMessage ref="comMessage"></comMessage>
</template>
@ -67,8 +69,15 @@
this.$refs.popup.open('bottom')
}, 500)
},
openScanPopupSimulate(location) {
this.$refs.comscansimulate.setItemCodeSimulate(location)
this.$refs.comscansimulate.clickScanMsg();
},
closeScanPopup() {
if(this.$refs.popup){
this.$refs.popup.close()
}
},
scanClick() {
this.$refs.scan.clickScanMsg();
@ -77,6 +86,7 @@
this.$refs.scan.clearScanValue();
},
getScanResult(result) {
uni.showLoading({
title: '扫描中...',
mask: true
@ -94,6 +104,7 @@
}
getBasicLocationByCode(this.code).then(res => {
uni.hideLoading();
if (res.data.total > 0) {
let result = res.data.list[0];
@ -142,10 +153,14 @@
return isPass
},
getfocus() {
if(this.$refs.scan){
this.$refs.scan.getfocus();
}
},
losefocus() {
if(this.$refs.scan){
this.$refs.scan.losefocus();
}
},
showErrorMessage(message) {
setTimeout(r => {

35
src/mycomponents/scan/winScanPackAndLocation.vue

@ -1,6 +1,6 @@
<template>
<view>
<uni-popup ref="popup" @change="change" :mask-click="false">
<uni-popup ref="popup" @change="change" :mask-click="false" >
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
@ -28,7 +28,7 @@
<view v-if='allowModifyLocation'>
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位"
@confirm="" style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
@confirm="handleConfirm" style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
</view>
<view v-else>
<text style="padding: 5px">
@ -47,7 +47,8 @@
</uni-popup>
<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>
<win-com-scan v-show="false" ref="comscansimulate" @getResult="getScanResult" :headerType="headerType"
:isShowHistory="false" :clearResult="true"></win-com-scan>
</view>
<comMessage ref="comMessage"></comMessage>
@ -73,7 +74,7 @@
} from '@/common/directory.js';
export default {
name: 'winScanPack',
emits: ["getResult", "close", "getCountScanResult"],
emits: ["getResult", "close", "getCountScanResult", "confirm"],
components: {
winComScan,
balanceSelect
@ -109,7 +110,7 @@
type: Boolean,
default: true
},
balanceFromInventoryStatuses:{//fromInventoryStatuses
balanceFromInventoryStatuses: { //fromInventoryStatuses
type: Boolean,
default: true
}
@ -131,15 +132,20 @@
inventoryStatus: [],
managementPrecision: '',
fromInventoryStatuses: "",
isCheck: false
isCheck: false,
}
},
created() {
},
methods: {
handleConfirm() {
this.$emit('confirm', this.fromLocationCode)
},
//
openScanPopupForType(fromLocationCode, businessType) {
this.businessType = businessType;
this.fromLocationCode = fromLocationCode;
if (fromLocationCode != '') {
@ -150,9 +156,11 @@
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //
if (!this.show) {
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
}
},
//
@ -176,7 +184,7 @@
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
},
//
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent,item) {
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, item) {
this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
@ -198,7 +206,7 @@
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
let timer = setTimeout(res => {
if(timer){
if (timer) {
clearTimeout(timer)
}
this.$refs.comscansimulate.setItemCodeSimulate(item.copyContent)
@ -295,7 +303,8 @@
// mask: true
// })
// -- fromInventoryStatuses
getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.balanceFromInventoryStatuses?this.fromInventoryStatuses:undefined,
getBalanceByManagementPrecision(result.label, this.fromLocationCode, this
.balanceFromInventoryStatuses ? this.fromInventoryStatuses : undefined,
res => {
uni.hideLoading();
if (res.success) {
@ -319,9 +328,9 @@
if (this.allowNullBalance) {
this.allowNoneBalance(datas);
} else if (this.noShowBalanceMessage) {
if(Array.isArray(datas)){
if (Array.isArray(datas)) {
this.countCallBack(datas[0]);
}else{
} else {
this.countCallBack(datas);
}
} else {
@ -385,7 +394,7 @@
//
countCallBack(datas) {
if(this.$refs.comscan){
if (this.$refs.comscan) {
this.$refs.comscan.clear();
}
//
@ -401,7 +410,7 @@
},
packCallBack(item) {
if(this.$refs.comscan){
if (this.$refs.comscan) {
this.$refs.comscan.clear();
}
//

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

@ -60,8 +60,8 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="true" @confirm="handleConfirm">
</win-scan-pack-and-location >
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage>
@ -139,7 +139,7 @@
itemCode: ""
};
},
onLoad(option) {
onShow(){
var typeCode = "OverPackage"
getBusinessType(typeCode, res => {
if (res.success) {
@ -209,7 +209,10 @@
this.toPackQty = pack.packQty;
this.toPackUnitShow = e[0].label
},
//
handleConfirm(fromLocationCode){
this.$refs.scanLocationCode.openScanPopupSimulate(fromLocationCode)
},
getScanResult(result) {
let balance = result.balance;
let label = result.label;
@ -289,7 +292,13 @@
},
showFromLocationPopup() {
this.$nextTick(() => {
let overPackageRecord = uni.getStorageSync('overPackageRecord')
if(overPackageRecord){
this.$refs.scanLocationCode.openScanPopupSimulate(overPackageRecord)
}else{
this.$refs.scanLocationCode.openScanPopup();
}
})
},
@ -429,6 +438,9 @@
this.scanPopupGetFocus();
},
getLocation(location, code) {
if(code){
uni.setStorageSync('overPackageRecord', code)
}
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {

127
src/pages/pointPutawayJob/index.vue

@ -2,22 +2,28 @@
<view class="content" style="padding:30rpx 20rpx 100rpx;min-height: calc(100vh - 120rpx);">
<com-empty-view v-if="data.length==0"></com-empty-view>
<!-- 只用于展示页面 -->
<view class="box" style="margin-bottom: 20rpx;">
<view class="box" style="margin-bottom: 20rpx;" v-for='(item,index) in data.sublist' :key='index'>
<view class="top">
<view class="mb-kw">
目标库位<text>{{data.toLocationCode}}</text>
目标库位<view>{{item.toLocationCode}}</view>
</view>
<view class="mb-bo">
<view class="mb-left">
<view class="mb-text">
任务编号<text>{{data.number}}</text>
物料号<view>{{item.itemCode}}</view>
</view>
<view class="mb-text">
创建人<text>{{data.creator||''}}</text>
托包装号<view>{{item.packingNumber}}</view>
</view>
</view>
<view class="mb-right">
<view class="mb-text">
创建时间<text>{{formatDate(data.createTime)}}</text>
数量<view>{{item.packQty}}</view>
</view>
</view>
</view>
</view>
<u-table style="margin-top: 20rpx;">
<!-- <u-table style="margin-top: 20rpx;">
<u-tr>
<u-th>物品代码</u-th>
<u-th>物品描述</u-th>
@ -27,7 +33,7 @@
<u-th>数量</u-th>
<u-th>计量单位</u-th>
</u-tr>
<u-tr v-for="(cur,key) in data.sublist" :key='key'>
<u-tr v-for="(cur,key) in item.sublist" :key='key'>
<u-td>{{cur.itemCode}}</u-td>
<u-td>{{cur.itemDesc1}}</u-td>
<u-td>{{cur.batch}}</u-td>
@ -36,7 +42,7 @@
<u-td>{{cur.qty}}</u-td>
<u-td>{{cur.uom}}</u-td>
</u-tr>
</u-table>
</u-table> -->
</view>
<view class="" style="position: fixed;width: 100%;bottom: 0rpx;left: 0px;">
<button @click="printImage"
@ -132,23 +138,13 @@
// jobNumber: '555555',
// creator: '',
// createTime: '2019-12-12 05:00:00',
// sublist: [{
// itemNumber: '66',
// itemDes: 'hahah',
// batch: '201450513',
// packingNumber: '201450513',
// packUnit: '201450513',
// packQty: '40',
// uom: ''
// },{
// itemNumber: '77',
// itemDes: '8888',
// batch: '201450513',
// packingNumber: '201450513',
// packUnit: '201450513',
// packQty: '40',
// uom: ''
// }]
// uom: '',
// }, {
// toLocationCode: 'C13-12-11',
// jobNumber: '555555',
@ -182,53 +178,30 @@
let str = ''
this.readFile(htmlFileUrl, (htmlContent) => {
this.newHtmlContent = htmlContent
// this.data.forEach(item => {
str += `<div class="box" style="page-break-before:always;"><br />
this.data.sublist.forEach(item => {
str += `<div class="box" style="page-break-before:always;" ><br />
<div class="top">
<div class="mb-kw">
目标库位<span>${this.data.toLocationCode}</span>
目标库位<div>${item.toLocationCode}</div>
</div>
<div class="mb-bo">
<div class="mb-left">
<div class="mb-text">
任务编号<span>${this.data.number}</span>
物料号<div>${item.itemCode}</div>
</div>
<div class="mb-text">
创建人<span>${this.data.creator}</span>
托包装号<div>${item.packingNumber}</div>
</div>
</div>
<div class="mb-right">
<div class="mb-text">
创建时间<span>${this.formatDate(this.data.createTime)}</span>
数量<div>${item.packQty}</div>
</div>
</div>
</div>
</div>
<table style="margin-top: 20rpx;" style='border-collapse: collapse;'>
<tr>
<th>物品代码</th>
<th>物品描述</th>
<th>批次</th>
<th>包装号</th>
<th>包装规格</th>
<th>数量</th>
<th>计量单位</th>
<tr>
tableTrTd
</table>
<div>
`
let str1 = ''
this.data.sublist.forEach((cur, key) => {
str1 += `
<tr>
<td>${cur.itemCode}</td>
<td>${cur.itemDesc1}</td>
<td>${cur.batch}</td>
<td>${cur.packingNumber}</td>
<td>${cur.packUnit}</td>
<td>${cur.qty}</td>
<td>${cur.uom}</td>
</tr>
`
})
str = str.replace(
"tableTrTd", str1)
// })
this.newHtmlContent = this.newHtmlContent.replace(
"mainBody", str); //
});
@ -243,7 +216,7 @@
.box {
font-size: 26rpx;
/* display: flex; */
padding: 20rpx;
/* padding: 20rpx; */
border: 1px solid #dedede;
}
@ -301,16 +274,52 @@
.mb-kw {
border-bottom: 1px solid #dedede;
padding-bottom: 20rpx;
padding: 20rpx;
font-size: 30rpx;
}
.mb-kw view {
font-weight: bold;
font-size: 46rpx;
text-align: center;
}
.mb-bo{
display:flex;
}
.mb-bo .mb-left{
flex:1
.mb-kw text {
}
.mb-bo .mb-left .mb-text{
padding: 20rpx;
}
.mb-bo .mb-left .mb-text:nth-child(1){
border-bottom: 1px solid #dedede;
}
.mb-bo .mb-left .mb-text view{
font-weight: bold;
font-size: 32rpx;
text-align: center;
}
.mb-bo .mb-right{
padding: 20rpx;
width: 260rpx;
border-left: 1px solid #dedede;
display: flex;
align-items: center;
}
.mb-bo .mb-right .mb-text{
.mb-text {
width: 100%;
}
.mb-bo .mb-right .mb-text view{
font-weight: bold;
font-size: 40rpx;
text-align: center;
width: 100%;
}
/* .mb-text {
margin-top: 10rpx;
}
@ -323,5 +332,5 @@
font-size: 24rpx !important;
word-break: break-all;
}
} */
</style>

5
src/pages/productPutaway/job/productPutawayJob.vue

@ -348,6 +348,11 @@
action: "==",
value: this.type
},
{
column: "status",
action: "in",
value: '1,2',
}
// {
// column: "fromLocationCode",
// action: "==",

5
src/pages/productReceipt/job/productReceiptJob.vue

@ -372,6 +372,11 @@
column: "type",
action: "==",
value: this.type
},
{
column: "status",
action: "in",
value: '1,2',
}
// {
// column: "fromLocationCode",

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

@ -380,6 +380,11 @@
action: "==",
value: result.label.itemCode
},
{
column: "status",
action: "in",
value: '1,2',
}
// {
// column: "fromLocationCode",
// action: "==",

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

@ -323,6 +323,11 @@
action: "==",
value: result.label.itemCode
},
{
column: "status",
action: "in",
value: '1,2',
}
// {
// column: "fromLocationCode",
// action: "==",

1
src/store/modules/user.js

@ -118,6 +118,7 @@ const user = {
commit('SET_ID',[])
storage.removeStorage(storage.constant.token)
storage.clearStorage()
uni.removeStorageSync('overPackageRecord') // 删除直接翻包中缓存的来源库位
resolve()
}).catch(error => {
reject(error)

Loading…
Cancel
Save