This commit is contained in:
蔡玲
2024-09-13 15:55:28 +08:00
parent 940254749e
commit 4ebd19f545
4 changed files with 14 additions and 37 deletions

View File

@@ -3,7 +3,7 @@
<nav-bar :title="title"></nav-bar> <nav-bar :title="title"></nav-bar>
<view class="zd_content"> <view class="zd_content">
<view class="zd_wrapper"> <view class="zd_wrapper">
<view class="zd-row border-bottom"> <view class="zd-row">
<view class="zd-col-7"> <view class="zd-col-7">
<span class="filter_label">点位</span> <span class="filter_label">点位</span>
</view> </view>
@@ -13,30 +13,12 @@
/> />
</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-17">
<search-box
v-model="val2"
/>
</view>
</view>
<view class="zd-row">
<view class="zd-col-7">
<span class="filter_label">收卷辊规格</span>
</view>
<view class="zd-col-17 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
</view> </view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="clearUp">清空</button> <button class="zd-col-5 button-default" @tap="clearUp">清空</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_onlySendRollTruss">入辊</button> <button class="zd-col-8 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_onlySendRollTruss">入辊</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_onlyCallRollTruss">出辊</button> <button class="zd-col-8 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_onlyCallRollTruss">出辊</button>
</view> </view>
</view> </view>
</template> </template>
@@ -54,9 +36,6 @@
return { return {
title: '', title: '',
val1: '', val1: '',
val2: '',
options: [],
index: '',
disabled: false disabled: false
}; };
}, },
@@ -69,12 +48,12 @@
}, },
async _onlySendRollTruss () { async _onlySendRollTruss () {
this.disabled = true this.disabled = true
if (!this.val1 || !this.val2 || !this.index) { if (!this.val1) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await handhonlySendRollTrusseldLock(this.val1, this.val2, this.index) let res = await onlySendRollTruss(this.val1)
this.clearUp() this.clearUp()
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
@@ -86,12 +65,12 @@
}, },
async _onlyCallRollTruss () { async _onlyCallRollTruss () {
this.disabled = true this.disabled = true
if (!this.val1 || !this.index) { if (!this.val1) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await onlyCallRollTruss(this.val1, this.index) let res = await onlyCallRollTruss(this.val1)
this.clearUp() this.clearUp()
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
@@ -103,8 +82,6 @@
}, },
clearUp () { clearUp () {
this.val1 = '' this.val1 = ''
this.val2 = ''
this.index = ''
this.disabled = false this.disabled = false
} }
} }

View File

@@ -3,7 +3,7 @@
<nav-bar :title="title"></nav-bar> <nav-bar :title="title"></nav-bar>
<view class="zd_content"> <view class="zd_content">
<view class="zd_wrapper"> <view class="zd_wrapper">
<view class="zd-row border-bottom"> <view class="zd-row">
<view class="zd-col-5"> <view class="zd-col-5">
<span class="filter_label">点位</span> <span class="filter_label">点位</span>
</view> </view>

View File

@@ -33,7 +33,7 @@
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap="clearUp">清空</button> <button class="zd-col-7 button-default" @tap="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val2 || !val3}" :disabled="disabled" @tap="_doSubVolumeBindingWeight">绑定重量</button> <button class="zd-col-15 button-primary" :class="{'button-info': !val1 || (!val2 && !val3)}" :disabled="disabled" @tap="_doSubVolumeBindingWeight">绑定重量</button>
</view> </view>
</view> </view>
</template> </template>
@@ -62,7 +62,7 @@
methods: { methods: {
async _doSubVolumeBindingWeight () { async _doSubVolumeBindingWeight () {
this.disabled = true this.disabled = true
if (!this.val1 || !this.val2 || !this.val3) { if (!this.val1 || (!this.val2 && !this.val3)) {
this.disabled = false this.disabled = false
return return
} }

View File

@@ -26,14 +26,14 @@ export const authority = () => request({
data: {} data: {}
}) })
// 入辊 // 入辊
export const onlySendRollTruss = (code, vcode, type) => request({ export const onlySendRollTruss = (code) => request({
url:'api/pda/other/onlySendRollTruss', url:'api/pda/other/onlySendRollTruss',
data: {point_code: code, vehicle_code: vcode, vehicle_type: type} data: {point_code: code}
}) })
// //
export const onlyCallRollTruss = (code, vcode, type) => request({ export const onlyCallRollTruss = (code) => request({
url:'api/pda/other/onlyCallRollTruss', url:'api/pda/other/onlyCallRollTruss',
data: {point_code: code, vehicle_type: type} data: {point_code: code}
}) })
// 呼叫取样 // 呼叫取样
export const callAgvToSampling = (code1, code2) => request({ export const callAgvToSampling = (code1, code2) => request({