传值
This commit is contained in:
@@ -34,8 +34,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar">
|
<view class="submit-bar">
|
||||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_pointOperate">绑定</button>
|
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_pointOperate('1')">绑定</button>
|
||||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_pointOperate">解绑</button>
|
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_pointOperate('2')">解绑</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -71,14 +71,14 @@
|
|||||||
this.val2 = res.data.container_name
|
this.val2 = res.data.container_name
|
||||||
this.val3 = res.data.have_goods
|
this.val3 = res.data.have_goods
|
||||||
},
|
},
|
||||||
async _pointOperate () {
|
async _pointOperate (type) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.val2) {
|
if (!this.val1 || !this.val2) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await pointOperate(this.val1, this.val2)
|
let res = await pointOperate(this.val1, this.val2, type)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|||||||
@@ -69,11 +69,12 @@ export const ovenInAndOut = (pcode, cname, temp, hours, option) => request({
|
|||||||
|
|
||||||
// 点位管理
|
// 点位管理
|
||||||
// 1.1点位解绑绑定
|
// 1.1点位解绑绑定
|
||||||
export const pointOperate = (pcode, cname) => request({
|
export const pointOperate = (pcode, cname, option) => request({
|
||||||
url: 'api/pda/point/pointOperate',
|
url: 'api/pda/point/pointOperate',
|
||||||
data: {
|
data: {
|
||||||
point_code: pcode,
|
point_code: pcode,
|
||||||
container_name: cname
|
container_name: cname,
|
||||||
|
option: option
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 1.2点位状态查询
|
// 1.2点位状态查询
|
||||||
|
|||||||
Reference in New Issue
Block a user