接口改

This commit is contained in:
2026-04-24 11:16:08 +08:00
parent 69f2931e3b
commit b68da45166
3 changed files with 27 additions and 5 deletions

View File

@@ -34,8 +34,9 @@
</view>
<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" @tap="toZh">装货</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_sendTask">确认送料</button>
<button class="zd-col-4 button-primary" @tap="toZh">装货</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>
</template>
@@ -43,7 +44,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {callCarIos, sendTask} from '@/utils/getData3.js'
import {callCarIos, sendTask, cleanTask} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -128,6 +129,22 @@
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 () {
const hasEmpty = this.dataList.some(item => item.pcsn === '' || item.qty === '');
if (hasEmpty) {

View File

@@ -138,8 +138,8 @@
},
methods: {
async _authority () {
let res = await authority()
// let res = await allAuthority()
// let res = await authority()
let res = await allAuthority()
if (res.code === '1') {
this.menuList = [...res.result.rf_menu1.sonTree]
} else {

View File

@@ -570,6 +570,11 @@ export const sendTask = (rows) => request({
url:'api/notCar/sendTask',
data: {rows: rows}
})
// 清除任务
export const cleanTask = () => request({
url:'api/notCar/cleanTask',
data: {}
})
// 卸货库存查询(无人车对接)共 (2) 个
// 查询区域下拉框