修改空轴回库、呼叫套轴,add余轴退回
This commit is contained in:
@@ -29,8 +29,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-6 btn-submit btn-default letter-30" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !index2 || !index3 || !index4}" :disabled="disabled" @tap="toSure">回库</button>
|
||||
<button class="zd-col-5 btn-submit btn-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !index2 || !index3 || !index4}" :disabled="disabled" @tap="_shaftGoBack">空轴回库</button>
|
||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !index2 || !index3 || !index4}" :disabled="disabled1" @tap="_callNeedShaft">呼叫空轴</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -38,7 +39,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import {queryProductArea} from '@/utils/getData2.js'
|
||||
import {shaftGoBack} from '@/utils/getData3.js'
|
||||
import {shaftGoBack, callNeedShaft} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar
|
||||
@@ -52,7 +53,8 @@
|
||||
index3: '',
|
||||
options4: [{value: '4', text: '4'}, {value: '5', text: '5'}],
|
||||
index4: '',
|
||||
disabled: false
|
||||
disabled: false,
|
||||
disabled1: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -70,15 +72,12 @@
|
||||
selectChange2(e) {
|
||||
this.index2 = e
|
||||
},
|
||||
toSure () {
|
||||
async _shaftGoBack () {
|
||||
this.disabled = true
|
||||
if (!this.index2 || !this.index3 || !this.index4) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._shaftGoBack()
|
||||
},
|
||||
async _shaftGoBack () {
|
||||
try {
|
||||
let res = await shaftGoBack(this.index2, this.index3, this.index4)
|
||||
uni.showToast({
|
||||
@@ -90,11 +89,29 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _callNeedShaft () {
|
||||
this.disabled1 = true
|
||||
if (!this.index2 || !this.index3 || !this.index4) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await callNeedShaft(this.index2, this.index3, this.index4)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index2 = ''
|
||||
this.index3 = ''
|
||||
this.index4 = ''
|
||||
this.disabled = false
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user