change
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_vehicleOutConfirm">确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_loading">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -43,7 +43,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getRegionByPoint, vehicleOutConfirm} from '@/utils/getData4.js'
|
||||
import {getRegionByPoint, loading} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -54,6 +54,7 @@
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '1',
|
||||
pointCode: '',
|
||||
currentData: {},
|
||||
disabled: false
|
||||
};
|
||||
@@ -76,6 +77,7 @@
|
||||
try {
|
||||
let res = await getRegionByPoint(e)
|
||||
if (res) {
|
||||
this.pointCode = this.val1
|
||||
this.val1 = res.region_code
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -90,16 +92,17 @@
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.pointCode = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _vehicleOutConfirm () {
|
||||
async _loading () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await vehicleOutConfirm(this.val1, this.currentData.material_code, this.val2)
|
||||
let res = await loading(this.pointCode, this.val1, this.currentData.material_code, this.val2)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
Reference in New Issue
Block a user