接口
This commit is contained in:
@@ -32,7 +32,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 || !index}" :disabled="disabled" @tap="_pdaPalletIostorinvIn">确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index|| !val2}" :disabled="disabled" @tap="_vehicleOutConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -40,7 +40,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getStructCount, pdaPalletIostorinvIn} from '@/utils/getData2.js'
|
||||
import {getSect, vehicleOutConfirm} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -50,8 +50,9 @@
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
val2: '1',
|
||||
// options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false,
|
||||
currentData: {},
|
||||
@@ -62,23 +63,19 @@
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getSect()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getStructCount(e)
|
||||
}
|
||||
},
|
||||
async _getStructCount (e) {
|
||||
async _getSect () {
|
||||
try {
|
||||
let res = await getStructCount(e)
|
||||
let res = await getSect()
|
||||
if (res) {
|
||||
this.kwData = res
|
||||
this.options = res
|
||||
} else {
|
||||
this.kwData = {}
|
||||
this.options =[]
|
||||
}
|
||||
} catch (e) {
|
||||
this.kwData = {}
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
@@ -90,14 +87,14 @@
|
||||
this.disabled = false
|
||||
this.kwData = {}
|
||||
},
|
||||
async _pdaPalletIostorinvIn () {
|
||||
async _vehicleOutConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index) {
|
||||
if (!this.val1 || !this.index || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaPalletIostorinvIn(this.val1, this.index)
|
||||
let res = await vehicleOutConfirm(this.index, this.val1, this.val2)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
||||
Reference in New Issue
Block a user