This commit is contained in:
2022-11-30 12:28:31 +08:00
parent fbaab6b342
commit f5d78a980a
3 changed files with 26 additions and 27 deletions

View File

@@ -54,7 +54,7 @@
</view> </view>
<view class="submit-bar"> <view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled2" @tap="_customerPrint">打印</button> <button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled2" @tap="_customerPrint">打印</button>
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled1" @tap="_customerInfo(val1)">查询</button> <button class="submit-button" @tap="_customerInfo(val1)">查询</button>
</view> </view>
</view> </view>
</template> </template>
@@ -82,22 +82,15 @@
}, },
/** 查询 */ /** 查询 */
async _customerInfo (e) { async _customerInfo (e) {
this.disabled1 = true
if (!this.val1) { if (!this.val1) {
uni.showToast({ uni.showToast({
title: '请扫木箱码', title: '请扫木箱码',
icon: 'none' icon: 'none'
}) })
this.disabled1 = false
return return
} }
try { let res = await customerInfo(e)
let res = await customerInfo(e) this.dataList = [...res.data]
this.dataList = [...res.data]
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
}, },
/** 打印 */ /** 打印 */
async _customerPrint () { async _customerPrint () {

View File

@@ -8,7 +8,7 @@
<span class="filter_label">木箱</span> <span class="filter_label">木箱</span>
</view> </view>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box v-model="val1" <search-box v-model="val1" @handleChange="handleChange1"
/> />
</view> </view>
</view> </view>
@@ -17,7 +17,7 @@
<span class="filter_label">点位</span> <span class="filter_label">点位</span>
</view> </view>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box v-model="val2" /> <search-box v-model="val2" @handleChange="handleChange2" />
</view> </view>
</view> </view>
</view> </view>
@@ -52,7 +52,7 @@
</view> </view>
<view class="submit-bar"> <view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !dataList.length}" :disabled="disabled1" @tap="_stoutConfirm">出库确认</button> <button class="submit-button" :class="{'btn-disabled': !dataList.length}" :disabled="disabled1" @tap="_stoutConfirm">出库确认</button>
<button class="submit-button" @tap="_stivtQuery">查询</button> <button class="submit-button" @tap="_stivtQuery(val1, val2)">查询</button>
</view> </view>
</view> </view>
</template> </template>
@@ -79,12 +79,15 @@
created () { created () {
}, },
methods: { methods: {
handleChange (e) { handleChange1 (e) {
// console.log(e) this._stivtQuery(e, this.val2)
},
handleChange2 (e) {
this._stivtQuery(this.val1, e)
}, },
/** 初始化查询 */ /** 初始化查询 */
async _stivtQuery () { async _stivtQuery (val1, val2) {
let res = await stivtQuery(this.val1, this.val2) let res = await stivtQuery(val1, val2)
this.dataList = [...res.data] this.dataList = [...res.data]
}, },
async _stoutConfirm () { async _stoutConfirm () {
@@ -94,7 +97,7 @@
this.disabled1 = false this.disabled1 = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._stivtQuery() this._stivtQuery(this.val1, this.val2)
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
@@ -114,7 +117,7 @@
this.disabled1 = false this.disabled1 = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._stivtQuery() this._stivtQuery(this.val1, this.val2)
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'

View File

@@ -8,7 +8,7 @@
<span class="filter_label">木箱</span> <span class="filter_label">木箱</span>
</view> </view>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box v-model="val1" <search-box v-model="val1" @handleChange="handleChange1"
/> />
</view> </view>
</view> </view>
@@ -17,7 +17,7 @@
<span class="filter_label">单据号</span> <span class="filter_label">单据号</span>
</view> </view>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box v-model="val2" /> <search-box v-model="val2" @handleChange="handleChange2"/>
</view> </view>
</view> </view>
<view class="filter_item"> <view class="filter_item">
@@ -54,7 +54,7 @@
</view> </view>
<view class="submit-bar"> <view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="toSure">确认</button> <button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="toSure">确认</button>
<button class="submit-button" @tap="_virtualbillQuery">查询</button> <button class="submit-button" @tap="_virtualbillQuery(val1, val2)">查询</button>
</view> </view>
</view> </view>
</template> </template>
@@ -81,12 +81,15 @@
}; };
}, },
created () { created () {
this._virtualbillQuery() this._virtualbillQuery(this.val1, this.val2)
this._virtualbillType() this._virtualbillType()
}, },
methods: { methods: {
handleChange (e) { handleChange1 (e) {
// console.log(e) this._virtualbillQuery(e, this.val2)
},
handleChange2 (e) {
this._virtualbillQuery(this.val1, e)
}, },
/** 选择器 */ /** 选择器 */
selectChange(e) { selectChange(e) {
@@ -98,8 +101,8 @@
this.options = [...res.data] this.options = [...res.data]
}, },
/** 初始化查询 */ /** 初始化查询 */
async _virtualbillQuery () { async _virtualbillQuery (val1, val2) {
let res = await virtualbillQuery(this.val1, this.val2, this.index) let res = await virtualbillQuery(val1, val2, this.index)
this.dataList = [...res.data] this.dataList = [...res.data]
}, },
toSure () { toSure () {