修改空轴回库、呼叫套轴,add余轴退回
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- <nav-bar title="分切呼叫套轴"></nav-bar> -->
|
||||
<!-- <nav-bar title="呼叫套轴"></nav-bar> -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
@@ -55,8 +55,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': !index1 || !index2 || (!upL && !upR) || !index3 || !index4 || !qty}" :disabled="disabled" @tap="_callPaperShaft">送轴</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': !index1 || !index2 || (!upL && !upR) || !index3 || !index4 || !qty}" :disabled="disabled" @tap="_callPaperShaft">自动送轴</button>
|
||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !index1 || !index2 || (!upL && !upR) || !index3 || !index4}" :disabled="disabled1" @tap="_labourShaftBack">人工送轴</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -65,7 +66,7 @@
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryProductArea, queryDeviceByarea} from '@/utils/getData2.js'
|
||||
import {paperQueryPaperMaterial, callPaperShaft} from '@/utils/getData3.js'
|
||||
import {paperQueryPaperMaterial, callPaperShaft, labourShaftBack} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -88,7 +89,8 @@
|
||||
upL: '',
|
||||
upR: '',
|
||||
qty: null,
|
||||
disabled: false
|
||||
disabled: false,
|
||||
disabled1: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -127,6 +129,7 @@
|
||||
this.index4 = ''
|
||||
this.qty = null
|
||||
this.disabled = false
|
||||
this.disabled1 = false
|
||||
},
|
||||
async _callPaperShaft () {
|
||||
this.disabled = true
|
||||
@@ -186,6 +189,33 @@
|
||||
},
|
||||
showSelector2 () {
|
||||
this.newaxis2 = this.axis
|
||||
},
|
||||
async _labourShaftBack () {
|
||||
this.disabled1 = true
|
||||
if (!this.index1 || !this.index2 || (!this.upL && !this.upR) || !this.index3 || !this.index4) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
let upLT = ''
|
||||
let upRT = ''
|
||||
this.axis.map(el => {
|
||||
if (el.value === this.upL) {
|
||||
upLT = el.text
|
||||
}
|
||||
if (el.value === this.upR) {
|
||||
upRT = el.text
|
||||
}
|
||||
})
|
||||
try {
|
||||
let res = await labourShaftBack(this.index1, this.index2, upLT, this.upL, upRT, this.upR, this.index3, this.index4)
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
72
pages/ProductManage/PlusShaftReturn.vue
Normal file
72
pages/ProductManage/PlusShaftReturn.vue
Normal file
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- <nav-bar title="余轴退回"></nav-bar> -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">起点</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</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}" :disabled="disabled1" @tap="_queryMaterialInfoL1400">空轴退回</button>
|
||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="disabled2" @tap="_shaftRecedesL1400">管轴退回</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryProductArea, queryDeviceByarea, queryMaterialInfoL1400, shaftRecedesL1400} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
disabled1: false,
|
||||
disabled2: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
async _shaftRecedesL1400 () {
|
||||
this.disabled1 = true
|
||||
if (!this.val1) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await shaftRecedesL1400(this.val1)
|
||||
this.disabled1 = false
|
||||
this.toEmpty()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -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