空载具管理

This commit is contained in:
2022-11-10 16:43:27 +08:00
parent 8817232f1e
commit 09d09808aa
2 changed files with 24 additions and 11 deletions

View File

@@ -22,7 +22,7 @@
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled1" @tap="_inCoolIvt">入库</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled1" @tap="_emptyVehiclepointOperate">入库</button>
</view>
</view>
</template>
@@ -30,7 +30,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import { inCoolIvt} from '@/utils/getData1.js'
import {emptyVehiclepointOperate} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -42,7 +42,6 @@
val2: '',
val3: '',
val4: '',
disabled: false,
disabled1: false
};
},
@@ -50,14 +49,14 @@
handleChange (e) {
console.log(e)
},
async _inCoolIvt () {
async _emptyVehiclepointOperate () {
this.disabled1 = true
if (!this.val1 || !this.val2) {
this.disabled1 = false
return
}
try {
let res = await inCoolIvt(this.val1, this.val2)
let res = await emptyVehiclepointOperate(this.val1, this.val2, '1')
uni.showToast({
title: res.message,
icon: 'none'

View File

@@ -8,7 +8,11 @@
<span class="filter_label">站点码</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" />
<search-box
v-model="val1"
:seaShow="true"
@toSearch="toSearch"
/>
</view>
</view>
<view class="filter_item">
@@ -22,7 +26,7 @@
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled1" @tap="_inCoolIvt">出库</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled1" @tap="_emptyVehiclepointOperate">出库</button>
</view>
</view>
</template>
@@ -30,7 +34,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import { inCoolIvt} from '@/utils/getData1.js'
import {emptyVehiclepointOperate, emptyVehiclepointStatusQuery} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -42,7 +46,6 @@
val2: '',
val3: '',
val4: '',
disabled: false,
disabled1: false
};
},
@@ -50,14 +53,25 @@
handleChange (e) {
console.log(e)
},
async _inCoolIvt () {
toSearch (e) {
this._emptyVehiclepointStatusQuery()
},
/** 查询 */
async _emptyVehiclepointStatusQuery () {
if (!this.val1) {
return
}
let res = await emptyVehiclepointStatusQuery(this.val1)
this.val2 = res.data.vehicle_code
},
async _emptyVehiclepointOperate () {
this.disabled1 = true
if (!this.val1 || !this.val2) {
this.disabled1 = false
return
}
try {
let res = await inCoolIvt(this.val1, this.val2)
let res = await emptyVehiclepointOperate(this.val1, this.val2, '0')
uni.showToast({
title: res.message,
icon: 'none'