纸管绑定需求新增
This commit is contained in:
@@ -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 = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user