纸管绑定需求新增

This commit is contained in:
2024-06-28 17:35:45 +08:00
parent 9e70e03518
commit 253814f08f
2 changed files with 19 additions and 7 deletions

View File

@@ -11,9 +11,15 @@
<search-box v-model="val1" />
</view>
</view>
<view class="filter_item">
<view class="filter_label">排数</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label"></span>
<span class="filter_label"></span>
</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val2">
@@ -29,8 +35,8 @@
</view>
<view class="zd-row submitbar">
<button class="zd-col-5 btn-submit btn-default" @tap="clearUp">清空</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_operateIvt('1')">绑定</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_operateIvt('2')">清除</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !index || !index1}" :disabled="disabled" @tap="_operateIvt('1')">绑定</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !index || !index1}" :disabled="disabled" @tap="_operateIvt('2')">清除</button>
</view>
</view>
</template>
@@ -48,6 +54,8 @@
data() {
return {
val1: '',
options1: [{value: '1', text: '1'}, {value: '2', text: '2'}, {value: '3', text: '3'}, {value: '4', text: '4'}, {value: '5', text: '5'}],
index1: '',
val2: '',
options: [],
index: '',
@@ -66,6 +74,9 @@
this.newoptions = [...res.rows]
},
/** 选择器 */
selectChange1 (e) {
this.index1 = e
},
selectChange (e) {
this.index = e
},
@@ -92,12 +103,12 @@
},
async _operateIvt (type) {
this.disabled = true
if (!this.val1 || !this.val2 || !this.index) {
if (!this.val1 || !this.val2 || !this.index || !this.index1) {
this.disabled = false
return
}
try {
let res = await operateIvt(type, this.val1, this.val2, this.index)
let res = await operateIvt(type, this.val1, this.index1, this.val2, this.index)
uni.showToast({
title: res.message,
icon: 'none'
@@ -111,6 +122,7 @@
this.val1 = ''
this.val2 = ''
this.index = ''
this.index1 = ''
}
}
}

View File

@@ -157,9 +157,9 @@ export const updatePackageInfo = (ivt, cn) => request({
/**
* 纸管绑定
*/
export const operateIvt = (type, vcode, num, code) => request({
export const operateIvt = (type, vcode, num, qty, code) => request({
url:'api/bstIvtStockingivt/operateIvt',
data: {type: type, vehicle_code: vcode, row_num: num, material_code: code}
data: {type: type, vehicle_code: vcode, row_num: num, qty: qty, material_code: code}
})
/**
* 分切暂存下料