空载具

This commit is contained in:
2026-01-07 16:15:05 +08:00
parent b6272f3877
commit e733b759fe
14 changed files with 1464 additions and 46 deletions

View File

@@ -32,7 +32,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_createTask">呼叫入库</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_inEmptyVehicle">呼叫入库</button>
</view>
</view>
</template>
@@ -40,8 +40,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
// import {queryVehicleType} from '@/utils/mork2.js'
import {queryVehicleType, createTask} from '@/utils/getData2.js'
import {getSectList, inEmptyVehicle} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -59,13 +58,13 @@
},
onLoad (options) {
this.title = options.title
this._queryVehicleType()
this._getSectList()
},
methods: {
/** 下拉框*/
async _queryVehicleType () {
async _getSectList () {
try {
let res = await queryVehicleType()
let res = await getSectList()
if (res && res.data.length > 0) {
this.options = [...res.data]
} else {
@@ -81,14 +80,14 @@
this.index = ''
this.disabled = false
},
async _createTask () {
async _inEmptyVehicle () {
this.disabled = true
if (!this.val1 || !this.val2 || !this.index) {
this.disabled = false
return
}
try {
let res = await createTask(this.val1, this.val2, this.index)
let res = await inEmptyVehicle(this.index, this.val2, this.val1)
if (res) {
uni.showToast({
title: res.message,

View File

@@ -40,7 +40,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_createTask">呼叫出库</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index || !index2 || !num}" :disabled="disabled" @tap="_callEmptyVehicle">呼叫出库</button>
</view>
</view>
</template>
@@ -48,8 +48,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
// import {queryVehicleType} from '@/utils/mork2.js'
import {queryVehicleType, createTask} from '@/utils/getData2.js'
import {getSectList, callEmptyVehicle} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -69,24 +68,12 @@
},
onLoad (options) {
this.title = options.title
this._queryVehicleType()
this._getSectList()
},
methods: {
async _queryVehicleType () {
async _getSectList () {
try {
let res = await queryVehicleType()
if (res && res.data.length > 0) {
this.options = [...res.data]
} else {
this.options = []
}
} catch (e) {
this.options = []
}
},
async _queryVehicleType2 () {
try {
let res = await queryVehicleType()
let res = await getSectList()
if (res && res.data.length > 0) {
this.options2 = [...res.data]
} else {
@@ -100,16 +87,17 @@
this.val1 = ''
this.index = ''
this.index2 = ''
this.num = null
this.disabled = false
},
async _createTask () {
async _callEmptyVehicle () {
this.disabled = true
if (!this.val1 || !this.index) {
if (!this.val1 || !this.index || !this.index2 || !this.num) {
this.disabled = false
return
}
try {
let res = await createTask(this.val1, this.index)
let res = await callEmptyVehicle(this.index2, this.val1, this.index, this.num)
if (res) {
uni.showToast({
title: res.message,