接口改
This commit is contained in:
@@ -34,8 +34,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-7 button-primary" :disabled="disabled" @tap="_callCarIos">呼叫无人车</button>
|
<button class="zd-col-7 button-primary" :disabled="disabled" @tap="_callCarIos">呼叫无人车</button>
|
||||||
<button class="zd-col-7 button-primary" @tap="toZh">装货</button>
|
<button class="zd-col-4 button-primary" @tap="toZh">装货</button>
|
||||||
<button class="zd-col-7 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_sendTask">确认送料</button>
|
<button class="zd-col-6 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_sendTask">确认送料</button>
|
||||||
|
<button class="zd-col-6 button-primary" :disabled="disabled" @tap="_cleanTask">清除任务</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {callCarIos, sendTask} from '@/utils/getData3.js'
|
import {callCarIos, sendTask, cleanTask} from '@/utils/getData3.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -128,6 +129,22 @@
|
|||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async _cleanTask () {
|
||||||
|
this.disabled = true
|
||||||
|
try {
|
||||||
|
let res = await cleanTask()
|
||||||
|
if (res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.toEmpty()
|
||||||
|
this.disabled = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
async _sendTask () {
|
async _sendTask () {
|
||||||
const hasEmpty = this.dataList.some(item => item.pcsn === '' || item.qty === '');
|
const hasEmpty = this.dataList.some(item => item.pcsn === '' || item.qty === '');
|
||||||
if (hasEmpty) {
|
if (hasEmpty) {
|
||||||
|
|||||||
@@ -138,8 +138,8 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async _authority () {
|
async _authority () {
|
||||||
let res = await authority()
|
// let res = await authority()
|
||||||
// let res = await allAuthority()
|
let res = await allAuthority()
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.menuList = [...res.result.rf_menu1.sonTree]
|
this.menuList = [...res.result.rf_menu1.sonTree]
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -570,6 +570,11 @@ export const sendTask = (rows) => request({
|
|||||||
url:'api/notCar/sendTask',
|
url:'api/notCar/sendTask',
|
||||||
data: {rows: rows}
|
data: {rows: rows}
|
||||||
})
|
})
|
||||||
|
// 清除任务
|
||||||
|
export const cleanTask = () => request({
|
||||||
|
url:'api/notCar/cleanTask',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
|
||||||
// 卸货库存查询(无人车对接)共 (2) 个
|
// 卸货库存查询(无人车对接)共 (2) 个
|
||||||
// 查询区域下拉框
|
// 查询区域下拉框
|
||||||
|
|||||||
Reference in New Issue
Block a user