change
This commit is contained in:
@@ -50,9 +50,9 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">卸货</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">等待</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">回库</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index2 || !checkedArr.length}" :disabled="disabled" @tap="_unload">卸货</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_waiting">等待</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_back">回库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -60,7 +60,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryXhRegion, queryPointRegion, queryRegionPoint, queryDrawConfirm} from '@/utils/getData3.js'
|
||||
import {queryXhRegion, queryEndRegion, queryRegionPoint, unload, waiting, back} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -82,6 +82,8 @@
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryRegionPoint()
|
||||
this._queryEndRegion()
|
||||
},
|
||||
methods: {
|
||||
selectChange (e) {
|
||||
@@ -102,9 +104,9 @@
|
||||
}
|
||||
},
|
||||
/** 下拉框*/
|
||||
async _queryPointRegion2 () {
|
||||
async _queryEndRegion () {
|
||||
try {
|
||||
let res = await queryPointRegion()
|
||||
let res = await queryEndRegion()
|
||||
if (res && res.data) {
|
||||
this.options2 = [...res.data]
|
||||
} else {
|
||||
@@ -143,15 +145,57 @@
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
async _queryDrawConfirm () {
|
||||
async _unload () {
|
||||
this.checkedArr = this.dataList.filter(el => el.checked === true)
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.checkedArr.length) {
|
||||
if (!this.index2 || !this.checkedArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await queryDrawConfirm(this.val1, this.num, this.checkedArr)
|
||||
let res = await unload(this.index2, this.checkedArr)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _waiting () {
|
||||
this.checkedArr = this.dataList.filter(el => el.checked === true)
|
||||
this.disabled = true
|
||||
if (!this.checkedArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await waiting()
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _back () {
|
||||
this.checkedArr = this.dataList.filter(el => el.checked === true)
|
||||
this.disabled = true
|
||||
if (!this.checkedArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await back()
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
Reference in New Issue
Block a user