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

@@ -36,7 +36,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': !val1 || !val2 || !index}" :disabled="disabled" @tap="_vehicleIn">呼叫入库</button>
</view>
</view>
</template>
@@ -44,7 +44,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getPdaSect, getPointCodeByVehicleCode, vehicleInConfirm} from '@/utils/getData4.js'
import {querySectCode, vehicleIn} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -64,17 +64,12 @@
this.title = options.title
},
created () {
this._getPdaSect()
this._querySectCode()
},
methods: {
handleChange (e) {
if (e) {
this._getPointCodeByVehicleCode()
}
},
async _getPdaSect () {
async _querySectCode () {
try {
let res = await getPdaSect()
let res = await querySectCode()
if (res) {
this.options = res.data
} else {
@@ -89,27 +84,18 @@
},
clearUp () {
this.val1 = ''
this.val2 = ''
this.index = ''
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 _vehicleIn () {
this.disabled = true
if (!this.val1 || !this.val2 || !this.index) {
this.disabled = false
return
}
try {
let res = await vehicleInConfirm(this.val1, this.index, this.val2)
let res = await vehicleIn(this.val2, this.val1, this.index)
if (res.code === '200') {
uni.showToast({
title: res.message,