设备操控修改
This commit is contained in:
@@ -14,14 +14,6 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
|
||||||
<view class="zd-col-7">
|
|
||||||
<span class="filter_label">操作命令</span>
|
|
||||||
</view>
|
|
||||||
<view class="zd-col-24 filter_select">
|
|
||||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
<view class="zd-col-7">
|
<view class="zd-col-7">
|
||||||
<span class="filter_label">载具编码</span>
|
<span class="filter_label">载具编码</span>
|
||||||
@@ -36,7 +28,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index || !val2}" :disabled="disabled" @tap="_toCommandTP">下发输送线运动命令</button>
|
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_toCommandTP">下发输送线运动命令</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -54,8 +46,6 @@
|
|||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
options: [{value: '0', text: '是'}, {value: '1', text: '否'}],
|
|
||||||
index: '',
|
|
||||||
val2: '',
|
val2: '',
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
@@ -64,17 +54,14 @@
|
|||||||
this.title = options.title
|
this.title = options.title
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectChange (e) {
|
|
||||||
this.index = e
|
|
||||||
},
|
|
||||||
async _toCommandTP () {
|
async _toCommandTP () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.index || !this.val2) {
|
if (!this.val1 || !this.val2) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await toCommandTP(this.val1, this.index, this.val2)
|
let res = await toCommandTP(this.val1, '1', this.val2)
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
@@ -86,7 +73,6 @@
|
|||||||
},
|
},
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.val1 = ''
|
this.val1 = ''
|
||||||
this.index = ''
|
|
||||||
this.val2 = ''
|
this.val2 = ''
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
options: [{value: '0', text: '是'}, {value: '1', text: '否'}],
|
options: [{value: '0', text: '停用'}, {value: '1', text: '启用'}],
|
||||||
index: '',
|
index: '',
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
options: [{value: '0', text: '是'}, {value: '1', text: '否'}],
|
options: [{value: '0', text: '入库模式'}, {value: '1', text: '出库模式'}],
|
||||||
index: '',
|
index: '',
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user