修改
This commit is contained in:
@@ -9,15 +9,15 @@
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box v-model="val2"/>
|
||||
<search-box v-model="val1"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料信息</span>
|
||||
<span class="filter_label">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input" v-model="currentData.material_name" @tap="toJump">
|
||||
<input type="text" class="filter_input" v-model="currentData.material_code" @tap="toJump">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -36,43 +36,24 @@
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<NumberInput v-model="currentData.qty" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料批次</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input" v-model="val3">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">源单编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box v-model="val1"/>
|
||||
<NumberInput
|
||||
v-model="qty"
|
||||
input-class="filter_input"
|
||||
mode="decimal"
|
||||
:decimalLength="3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_groupPlate">组盘确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || !val1 || !qty}" :disabled="disabled" @tap="_groupPlate">组盘确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -92,11 +73,8 @@
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
qty: null,
|
||||
currentData: {},
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
@@ -106,6 +84,7 @@
|
||||
onShow() {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.currentData = this.$store.getters.publicObj
|
||||
this.qty = this.currentData.qty
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -116,19 +95,18 @@
|
||||
},
|
||||
toEmpty () {
|
||||
this.currentData = {}
|
||||
this.index = ''
|
||||
this.qty = null
|
||||
this.disabled = false
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
},
|
||||
async _groupPlate () {
|
||||
this.disabled = true
|
||||
if (JSON.stringify(this.currentData) === '{}') {
|
||||
if (JSON.stringify(this.currentData) === '{}' || !this.val1 || !this.qty) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.currentData.stor_code = this.index
|
||||
let res = await groupPlate(this.currentData.material_id, this.val3, this.currentData.qty, this.val2, this.val1)
|
||||
let res = await groupPlate(this.currentData.material_id, this.qty, this.val1)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
|
||||
@@ -8,13 +8,12 @@
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">站点信息</span>
|
||||
</view>
|
||||
<view class="zd-col-12">
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_getVehicleMaterial(val2)">查询</button>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
@@ -119,9 +118,6 @@
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
if (e) {
|
||||
this._getVehicleMaterial(e)
|
||||
}
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
|
||||
Reference in New Issue
Block a user