呼叫取样修改
This commit is contained in:
119
pages/manage/call-sampling1.vue
Normal file
119
pages/manage/call-sampling1.vue
Normal file
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">起点</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">终点</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_callAgvToSampling">呼叫</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_resumeMoveWasteFoilv3('2')">结束</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {callAgvToSampling, callAgvToSamplingVerify, resumeMoveWasteFoilv3} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
async _callAgvToSampling () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await callAgvToSampling(this.val1, this.val2)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _callAgvToSamplingVerify (type) {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await callAgvToSamplingVerify(type, this.val1, this.val2)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _resumeMoveWasteFoilv3 (type) {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await resumeMoveWasteFoilv3(type, this.val1, this.val2)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -38,12 +38,16 @@ export const onlyCallRollTruss = (code) => request({
|
||||
// 呼叫取样
|
||||
export const callAgvToSampling = (code1, code2) => request({
|
||||
url:'api/pda/other/callAgvToSampling',
|
||||
data: {point_code1: code1, point_code1: code2}
|
||||
data: {point_code1: code1, point_code2: code2}
|
||||
})
|
||||
export const callAgvToSamplingVerify = (flag, scode, ecode) => request({
|
||||
url:'api/pda/other/callAgvToSamplingVerify',
|
||||
data: {flag: flag, startPoint: scode, endPoint: ecode}
|
||||
})
|
||||
export const resumeMoveWasteFoilv3 = (flag, scode, ecode) => request({
|
||||
url:'api/pda/other/resumeMoveWasteFoil/v2',
|
||||
data: {flag: flag, startPoint: scode, endPoint: ecode}
|
||||
})
|
||||
// 废箔搬运
|
||||
export const startMoveWasteFoilv2 = (code) => request({
|
||||
url:'api/pda/other/startMoveWasteFoil/v2',
|
||||
|
||||
Reference in New Issue
Block a user