Browse Source

修改扫描组件

wms3.0_pda
niexiting 12 months ago
parent
commit
10e440a09e
  1. 56
      mycomponents/balance/balance.vue
  2. 1
      mycomponents/qty/qty.vue
  3. 6
      mycomponents/recommend/recommend.vue
  4. 6
      mycomponents/record/recordComDetailCard.vue
  5. 4
      mycomponents/scan/winComScan.vue
  6. 4
      mycomponents/scan/winScanContainer.vue
  7. 2
      mycomponents/scan/winScanLocation.vue
  8. 4
      mycomponents/scan/winScanPackAndLocation.vue
  9. 63
      pages/pallet/record/bindPalletRecord.vue

56
mycomponents/balance/balance.vue

@ -1,6 +1,6 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<view class="uni-flex uni-row space-between uni-inline-item">
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between">
<view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
@ -14,16 +14,10 @@
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number( dataContent.qty)"
:handleQty="Number (dataContent.handleQty)" :isShowStdPack="isShowStdPack">
</compare-qty>
<view class="" v-if="isDevlement()">
<view class="" style="font-size: 40rpx;">
<u-button @click="copy" size="mini" type="primary">复制箱码</u-button>
</view>
<view class="" style="font-size: 40rpx;">
<u-button @click="copyPro" size="mini" type="primary">复制制品</u-button>
</view>
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
</view>
</view>
</view>
<!-- <u-line></u-line> -->
@ -83,31 +77,33 @@
},
methods: {
copy(){
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I"+this.dataContent.itemCode+";P"+this.dataContent.packingNumber+";B"+this.dataContent.batch+";Q"+this.dataContent.qty
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
},
copyPro(){
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I"+this.dataContent.itemCode+";P"+this.dataContent.packingNumber+";B"+this.dataContent.batch+";Q"+this.dataContent.qty
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
},
isDevlement(){
isDevlement() {
return getApp().globalData.isDevelopment;
}
}

1
mycomponents/qty/qty.vue

@ -1,6 +1,7 @@
<template>
<view class="center uni-column">
<view class="uni-flex uni-row">
{{dataContent.inventoryStatus}}
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="text_default center">
{{Number(dataContent.qty)}}

6
mycomponents/recommend/recommend.vue

@ -17,9 +17,9 @@
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty>
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; "
@click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
</view>
</view>
@ -106,7 +106,7 @@
}
)
},
isDevlement(){
isDevlement() {
return getApp().globalData.isDevelopment;
}
}

6
mycomponents/record/recordComDetailCard.vue

@ -15,8 +15,8 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions">
<balance :dataContent="detail" :isShowStdPack="false"
:isShowStatus="true" :isShowPack="true" :isShowLocation="isShowLocation"></balance>
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true"
:isShowPack="true" :isShowLocation="isShowLocation"></balance>
<!-- <purchase-label :dataContent="detail" :packageContent="detail.package" :isShowStdPack="false"
:isShowPack="true" :isShowLocation="true"></purchase-label> -->
</uni-swipe-action-item>
@ -33,9 +33,9 @@
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceDetailPopup from '@/mycomponents/balance/balanceDetailPopup.vue'
import purchaseLabel from '@/mycomponents/balance/purchaseLabel.vue'

4
mycomponents/scan/winComScan.vue

@ -83,6 +83,10 @@
isShowHistory: {
type: Boolean,
default: true
},
labelType:{
type: String,
default: 'PurchaseLabel' //PurchaseLabel LocationLabel MakeLabel ContainerLabel
}
},
data() {

4
mycomponents/scan/winScanContainer.vue

@ -23,9 +23,7 @@
</template>
<script>
import {
getBalanceByContainer
} from '@/api/request.js';
import {
getBasicLocationByCode,
} from '@/api/request2.js';

2
mycomponents/scan/winScanLocation.vue

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

4
mycomponents/scan/winScanPackAndLocation.vue

@ -104,10 +104,6 @@
},
methods: {
openScanPopup(fromLocationCode, businessType) {
this.showMessage('该方法即将删除')
},
//
openScanPopupForType(fromLocationCode, businessType) {
this.businessType = businessType;

63
pages/pallet/record/bindPalletRecord.vue

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view>
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-main">
@ -29,10 +29,12 @@
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-button @goScan='showFromLocationPopup'></win-scan-button>
</view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack>
<win-scan-location ref="scanLocationPopup" title="库位" @getLocation="getFromLocation"
:locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<!-- <win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> -->
<com-message ref="comMessage"></com-message>
</view>
</template>
@ -55,6 +57,8 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
@ -66,12 +70,15 @@
components: {
winScanButton,
winScanPack,
winScanLocation,
winScanPackAndLocation,
recordComDetailCard,
requiredLocation,
comBlankView,
comMessage,
targetContainer,
},
data() {
return {
id: '',
@ -80,11 +87,27 @@
subList: [], //subList
detailSource: [], //
containerCode: "",
businessType: {},
fromlocationCode: '',
fromlocationTypeList: [],
tolocationTypeList: []
};
},
onLoad(option) {
onLoad(option) {
var typeCode = "ContainerBind"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
}
});
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
@ -97,9 +120,26 @@
onPullDownRefresh() {},
mounted() {
this.openScanPopup();
},
methods: {
showFromLocationPopup() {
this.$nextTick(r => {
this.$refs.scanLocationPopup.openScanPopup();
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
getFromLocation(location) {
if (location != null) {
this.fromLocationCode = location.code;
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType)
}
},
getScanResult(result) {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
@ -142,6 +182,7 @@
}
});
},
calcHandleQty() {
calcHandleQty(this.detailSource)
this.$forceUpdate();
@ -150,6 +191,7 @@
updateData() {
this.calcHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
@ -164,14 +206,6 @@
this.updateData();
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
@ -180,7 +214,6 @@
this.$refs.scanPopup.losefocus();
},
commit() {
if (this.containerCode == "") {
this.showMessage("请先选择托码")

Loading…
Cancel
Save