Browse Source

直接发料,补料修改数量组件

wms3.0_pda
lijuncheng 8 months ago
parent
commit
ea6f1a49ce
  1. 26
      pages/issue/coms/comIssueRequestPopup.vue
  2. 35
      pages/repleinsh/coms/comRepleinshRequestPopup.vue

26
pages/issue/coms/comIssueRequestPopup.vue

@ -43,20 +43,13 @@
<view class="uni-flex uni-row uni-center"
style="display: flex; align-items: center;margin-left: 20rpx;justify-content: center;">
<input style="text-align: center;" class="qty_input" v-model="counQty" :focus="true" type="number"
@confirm="confirm()" @input="checkNum" :maxlength="maxlength" />
<input style="text-align: center;" class="qty_input" v-model="counQty" type="number"
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" />
<!-- <uni-number-box :value="counQty" @change="change" style='margin-left: 10rpx;'
:focus="numberFocus" @blur='numberFocus = false'>
</uni-number-box> -->
<view class="std_pack" v-if="itemCode!='请扫描物料信息'">
<text>
/{{stdQty}}
<!-- {{Number(dataContent.stdPackQty)}}{{getStdPackUnit(dataContent.uom)}} -->
</text>
</view>
<uom :uom="uom"></uom>
<view class="" v-if="stdPackInfo!=undefined" style="display: flex;flex-direction: row;margin-left: 10rpx;">
(<stdPackQty :dataContent="stdPackInfo"></stdPackQty>)
</view>
</view>
</view>
<u-line />
@ -88,6 +81,7 @@
checkDirectoryItemExist
} from '@/common/directory.js';
import uom from '@/mycomponents/qty/uom.vue'
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanItem from '@/mycomponents/scan/winScanItem.vue'
@ -98,7 +92,8 @@
uom,
balanceStatus,
comMessage,
winScanItem
winScanItem,
stdPackQty
},
data() {
return {
@ -127,7 +122,8 @@
isModifiedPosition: true,
positionList: [],
stdQty: 0, //
maxlength:10
maxlength:10,
stdPackInfo:undefined
}
},
props: {
@ -318,7 +314,7 @@
}
this.itemCode = "";
this.checkItemCode(code)
this.stdQty = scanResult.package.stdPackQty;
this.stdPackInfo = scanResult.package;
}
}
}

35
pages/repleinsh/coms/comRepleinshRequestPopup.vue

@ -44,10 +44,14 @@
<text>数量 </text>
<view class="uni-flex uni-row uni-center"
style="align-items: center;margin-left: 20rpx;">
<uni-number-box :value="counQty" @change="change" style='margin-left: 10rpx;'
:focus="numberFocus" @blur='numberFocus = false'>
</uni-number-box>
<input style="text-align: center;" class="qty_input" v-model="counQty" type="number"
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" />
<uom :uom="uom"></uom>
<view class="" v-if="stdPackInfo!=undefined" style="display: flex;flex-direction: row;margin-left: 10rpx;">
(<stdPackQty :dataContent="stdPackInfo"></stdPackQty>)
</view>
</view>
</view>
<u-line />
@ -60,7 +64,7 @@
</view>
</view>
</uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanCode='getScanCode'>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'>
</win-scan-item>
<win-scan-location ref="scanLocationPopup" title='目标库位' @getLocation='getLocationCode'
@ -89,14 +93,17 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanItem from '@/mycomponents/scan/winScanItem.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
export default {
components: {
uom,
stdPackQty,
balanceStatus,
comMessage,
winScanItem,
winScanLocation
},
data() {
return {
@ -117,6 +124,8 @@
show: false,
isModifiedPosition: true,
positionList: [],
maxlength:10,
stdPackInfo:undefined
}
},
props: {
@ -133,6 +142,21 @@
},
methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
}
this.change(value)
},
openRequestPopup(editPosition) {
// this.editPosition = editPosition;
// if (this.isModifiedPosition) {
@ -237,13 +261,14 @@
this.closeRequestPopup();
},
getScanCode(code) {
getScanCode(code, scanResult) {
if (code == "") {
this.showErrorMessage('物料号不能为空')
return;
}
this.itemCode = "";
this.checkItemCode(code)
this.stdPackInfo = scanResult.package;
},
getLocationCode(location, code) {

Loading…
Cancel
Save