物料入库修改
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val2 || !val3}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -97,12 +97,18 @@
|
||||
},
|
||||
async _handheldBlanking () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.val3) {
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
let arr = []
|
||||
this.dataList.map(el => {
|
||||
if (el.order_code !== '' && el.material_qty !== '') {
|
||||
arr.push(el)
|
||||
}
|
||||
})
|
||||
try {
|
||||
let res = await handheldBlanking(this.val1, this.val3, this.val2, this.dataList)
|
||||
let res = await handheldBlanking(this.val1, this.val3, this.val2, arr)
|
||||
this.clearUp()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
|
||||
@@ -2,6 +2,18 @@
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">载具号</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
@@ -35,7 +47,8 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_updateOrder">入库确认</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_fabOrders">查询</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_updateOrder">入库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -53,6 +66,7 @@
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false,
|
||||
@@ -71,10 +85,9 @@
|
||||
this.options.map(el => {
|
||||
this.$set(el, 'text', el.label)
|
||||
})
|
||||
this._fabOrders()
|
||||
},
|
||||
async _fabOrders () {
|
||||
let res = await fabOrders()
|
||||
let res = await fabOrders(this.val1)
|
||||
this.dataList = [...res.content]
|
||||
},
|
||||
selectChange (val) {
|
||||
|
||||
Reference in New Issue
Block a user