This commit is contained in:
2025-06-13 17:58:39 +08:00
parent facb9e5928
commit 9c346b6530
10 changed files with 229 additions and 118 deletions

View File

@@ -31,7 +31,7 @@
<span class="filter_label">数量</span>
</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val2">
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view>
</view>
<view class="filter_item">
@@ -44,8 +44,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 || !index1 || !val3}" :disabled="disabled" @tap="_operateIvt('1')">绑定</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !index || !index1 || !val3}" :disabled="disabled" @tap="_operateIvt('2')">清除</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !index2 || !index || !index1 || !val3}" :disabled="disabled" @tap="_operateIvt('1')">绑定</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !index2 || !index || !index1 || !val3}" :disabled="disabled" @tap="_operateIvt('2')">清除</button>
</view>
</view>
</template>
@@ -66,8 +66,9 @@
val1: '',
val3: '',
options1: [{value: '1', text: '1'}, {value: '2', text: '2'}, {value: '3', text: '3'}, {value: '4', text: '4'}, {value: '5', text: '5'}],
options2: [{value: '1', text: '1'}, {value: '2', text: '2'}, {value: '3', text: '3'}, {value: '4', text: '4'}, {value: '5', text: '5'}],
index1: '',
val2: '',
index2: '',
options: [],
index: '',
newoptions: [],
@@ -91,6 +92,9 @@
selectChange1 (e) {
this.index1 = e
},
selectChange2 (e) {
this.index2 = e
},
selectChange (e) {
this.index = e
},
@@ -117,12 +121,12 @@
},
async _operateIvt (type) {
this.disabled = true
if (!this.val1 || !this.val2 || !this.index || !this.index1 || !this.val3) {
if (!this.val1 || !this.index2 || !this.index || !this.index1 || !this.val3) {
this.disabled = false
return
}
try {
let res = await operateIvt(type, this.val1, this.index1, this.val2, this.index, this.val3)
let res = await operateIvt(type, this.val1, this.index1, this.index2, this.index, this.val3)
uni.showToast({
title: res.message,
icon: 'none'
@@ -136,7 +140,7 @@
clearUp () {
this.val1 = ''
this.val3 = ''
this.val2 = ''
this.index2 = ''
this.index = ''
this.index1 = ''
}