接口
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<span class="filter_label">点位/载具</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<search-box v-model="code1"/>
|
||||
<search-box v-model="keyword" @handleChange="handleChange"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -17,7 +17,7 @@
|
||||
<span class="filter_label filter_input_disabled">当前站点</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
||||
<input type="text" v-model="currentData.point_cdoe" class="filter_input filter_input_disabled" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -25,13 +25,13 @@
|
||||
<span class="filter_label filter_input_disabled">任务号</span>
|
||||
</view>
|
||||
<view class="zd-col-8">
|
||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
||||
<input type="text" v-model="currentData.task_code" class="filter_input filter_input_disabled" disabled>
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<span class="filter_label filter_input_disabled">AGV</span>
|
||||
</view>
|
||||
<view class="zd-col-8">
|
||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
||||
<input type="text" v-model="currentData.car_no" class="filter_input filter_input_disabled" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -39,13 +39,13 @@
|
||||
<span class="filter_label filter_input_disabled">起点</span>
|
||||
</view>
|
||||
<view class="zd-col-8">
|
||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
||||
<input type="text" v-model="currentData.point_cdoe1" class="filter_input filter_input_disabled" disabled>
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<span class="filter_label filter_input_disabled">终点</span>
|
||||
</view>
|
||||
<view class="zd-col-8">
|
||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
||||
<input type="text" v-model="currentData.point_cdoe2" class="filter_input filter_input_disabled" disabled>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -88,8 +88,8 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-9 button-primary" :class="{'button-info': !code1}" :disabled="disabled">确认取货</button>
|
||||
<button class="zd-col-9 button-primary" :class="{'button-info': !code1}" :disabled="disabled">确认放货</button>
|
||||
<button class="zd-col-9 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_confirmGet">确认取货</button>
|
||||
<button class="zd-col-9 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_confirmPut">确认放货</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -97,7 +97,8 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getStructCount, inStorageOrder, getBillNoInfo, storList, inStorageConfirm} from '@/utils/getData2.js'
|
||||
import {queryPointInfo} from '@/utils/mork2.js'
|
||||
import {confirmGet, confirmPut} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -106,11 +107,8 @@
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
code1: '',
|
||||
code2: '',
|
||||
code3: '',
|
||||
options: [],
|
||||
index: '',
|
||||
keyword: '',
|
||||
currentData: {},
|
||||
dataList: [],
|
||||
disabled: false
|
||||
};
|
||||
@@ -119,40 +117,66 @@
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
toJump (name) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/General/${name}`
|
||||
})
|
||||
},
|
||||
/** 下拉框*/
|
||||
async _inStorageOrder () {
|
||||
let res = await inStorageOrder()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
handleChange1 (e) {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getBillNoInfo(e)
|
||||
this._queryPointInfo(e)
|
||||
}
|
||||
},
|
||||
async _queryPointInfo (e) {
|
||||
try {
|
||||
let res = await queryPointInfo(e)
|
||||
if (res && res.data) {
|
||||
this.currentData = res.data
|
||||
this.dataList = [...res.data.rows]
|
||||
} else {
|
||||
this.currentData = {}
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.currentData = {}
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.code1 = ''
|
||||
this.keyword = ''
|
||||
this.currentData = {}
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _inStorageConfirm () {
|
||||
async _confirmGet () {
|
||||
this.disabled = true
|
||||
if (!this.index) {
|
||||
if (JSON.stringify(this.currentData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await inStorageConfirm()
|
||||
if (res.code === '200') {
|
||||
this.index = ''
|
||||
let res = await confirmGet(this.currentData.point_code)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
async _confirmPut () {
|
||||
this.disabled = true
|
||||
if (JSON.stringify(this.currentData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await confirmPut(this.currentData.point_code)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user