Browse Source

修改扫描组件

wms3.0_pda
niexiting 12 months ago
parent
commit
10e440a09e
  1. 22
      mycomponents/balance/balance.vue
  2. 1
      mycomponents/qty/qty.vue
  3. 4
      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

22
mycomponents/balance/balance.vue

@ -1,6 +1,6 @@
<template> <template>
<view :class="dataContent.scaned?'scan_view':''"> <view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between uni-inline-item"> <view class="uni-flex uni-row space-between">
<view> <view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
@ -14,16 +14,10 @@
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number( dataContent.qty)" <compare-qty v-else :dataContent="dataContent" :recommendQty="Number( dataContent.qty)"
:handleQty="Number (dataContent.handleQty)" :isShowStdPack="isShowStdPack"> :handleQty="Number (dataContent.handleQty)" :isShowStdPack="isShowStdPack">
</compare-qty> </compare-qty>
<view class="" v-if="isDevlement()"> <view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<view class="" style="font-size: 40rpx;"> <text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text>
<u-button @click="copy" size="mini" type="primary">复制箱码</u-button> <text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
</view> </view>
<view class="" style="font-size: 40rpx;">
<u-button @click="copyPro" size="mini" type="primary">复制制品</u-button>
</view>
</view>
</view> </view>
</view> </view>
<!-- <u-line></u-line> --> <!-- <u-line></u-line> -->
@ -85,7 +79,8 @@
methods: { methods: {
copy() { copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 // 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( this.$copyText(content).then(
res => { res => {
uni.showToast({ uni.showToast({
@ -97,7 +92,8 @@
}, },
copyPro() { copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 // 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( this.$copyText(content).then(
res => { res => {
uni.showToast({ uni.showToast({

1
mycomponents/qty/qty.vue

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

4
mycomponents/recommend/recommend.vue

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

6
mycomponents/record/recordComDetailCard.vue

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

4
mycomponents/scan/winComScan.vue

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

4
mycomponents/scan/winScanContainer.vue

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

2
mycomponents/scan/winScanLocation.vue

@ -12,7 +12,7 @@
</view> </view>
<view class=""> <view class="">
<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"> :boxFocus="true" :isShowHistory="isShowHistory">
</win-com-scan> </win-com-scan>
</view> </view>

4
mycomponents/scan/winScanPackAndLocation.vue

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

63
pages/pallet/record/bindPalletRecord.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view> <com-blank-view @goScan='showFromLocationPopup' 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="page-main"> <view class="page-main">
@ -29,10 +29,12 @@
</view> </view>
</view> </view>
</view> </view>
<win-scan-button @goScan='showFromLocationPopup'></win-scan-button>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </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> <com-message ref="comMessage"></com-message>
</view> </view>
</template> </template>
@ -55,6 +57,8 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.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 requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
@ -66,12 +70,15 @@
components: { components: {
winScanButton, winScanButton,
winScanPack, winScanPack,
winScanLocation,
winScanPackAndLocation,
recordComDetailCard, recordComDetailCard,
requiredLocation, requiredLocation,
comBlankView, comBlankView,
comMessage, comMessage,
targetContainer, targetContainer,
}, },
data() { data() {
return { return {
id: '', id: '',
@ -80,11 +87,27 @@
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
containerCode: "", 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) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
@ -97,9 +120,26 @@
onPullDownRefresh() {}, onPullDownRefresh() {},
mounted() { mounted() {
this.openScanPopup();
}, },
methods: { 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) { getScanResult(result) {
var packingNumber = result.label.packingNumber; var packingNumber = result.label.packingNumber;
var batch = result.label.batch; var batch = result.label.batch;
@ -142,6 +182,7 @@
} }
}); });
}, },
calcHandleQty() { calcHandleQty() {
calcHandleQty(this.detailSource) calcHandleQty(this.detailSource)
this.$forceUpdate(); this.$forceUpdate();
@ -150,6 +191,7 @@
updateData() { updateData() {
this.calcHandleQty(); this.calcHandleQty();
}, },
removeItem(index, item) { removeItem(index, item) {
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
}, },
@ -164,14 +206,6 @@
this.updateData(); this.updateData();
}, },
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() { scanPopupGetFocus() {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}, },
@ -180,7 +214,6 @@
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
}, },
commit() { commit() {
if (this.containerCode == "") { if (this.containerCode == "") {
this.showMessage("请先选择托码") this.showMessage("请先选择托码")

Loading…
Cancel
Save