This commit is contained in:
2025-09-10 10:38:03 +08:00
parent 336cf4455e
commit 6f7e10fa3f
12 changed files with 800 additions and 620 deletions

View File

@@ -42,7 +42,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_vehicleInConfirm">呼叫出库</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !qty || !val2 || !index || !index2}" :disabled="disabled" @tap="_vehicleOut">呼叫出库</button>
</view>
</view>
</template>
@@ -51,7 +51,8 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import NumberInput from '@/components/NumberInput.vue'
import {getPdaSect, getPointCodeByVehicleCode, vehicleInConfirm} from '@/utils/getData4.js'
import {queryVehicleType} from '@/utils/getData2.js'
import {querySectCode, vehicleOut} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -61,7 +62,6 @@
data() {
return {
title: '',
val1: '',
val2: '',
options: [],
index: '',
@@ -75,18 +75,13 @@
this.title = options.title
},
created () {
this._getPdaSect()
this._getPdaSect2()
this._queryVehicleType()
this._querySectCode()
},
methods: {
handleChange (e) {
if (e) {
this._getPointCodeByVehicleCode()
}
},
async _getPdaSect () {
async _queryVehicleType () {
try {
let res = await getPdaSect()
let res = await queryVehicleType()
if (res) {
this.options = res.data
} else {
@@ -96,9 +91,9 @@
this.options = []
}
},
async _getPdaSect2 () {
async _querySectCode () {
try {
let res = await getPdaSect()
let res = await querySectCode()
if (res) {
this.options2 = res.data
} else {
@@ -115,28 +110,20 @@
this.index2 = e
},
clearUp () {
this.val1 = ''
this.qty = ''
this.val2 = ''
this.index = ''
this.index2 = ''
this.disabled = false
},
async _getPointCodeByVehicleCode () {
try {
let res = await getPointCodeByVehicleCode(this.val1)
if (res.code === '200') {
this.val2 = res.data
} else {
}
} catch (e) {
}
},
async _vehicleInConfirm () {
async _vehicleOut () {
this.disabled = true
if (!this.val1 || !this.val2 || !this.index) {
if (!this.qty || !this.val2 || !this.index || !this.index2) {
this.disabled = false
return
}
try {
let res = await vehicleInConfirm(this.val1, this.index, this.val2)
let res = await vehicleOut(this.qty, this.val2, this.index, this.index2)
if (res.code === '200') {
uni.showToast({
title: res.message,