新需求
This commit is contained in:
@@ -67,8 +67,8 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldTranshipment">物料转运</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldBlanking('1')">入库确认</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldBlanking('2')">物料转运</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -76,7 +76,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {regionList, handheldBlanking, handheldTranshipment} from '@/utils/getData2.js'
|
||||
import {regionList, handheldBlanking} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -122,7 +122,7 @@
|
||||
this.index1 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _handheldBlanking () {
|
||||
async _handheldBlanking (type) {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
@@ -135,20 +135,11 @@
|
||||
}
|
||||
})
|
||||
try {
|
||||
let res = await handheldBlanking(this.val1, this.index, this.val2, arr, this.index1)
|
||||
this.clearUp()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _handheldTranshipment () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await handheldTranshipment(this.val1, this.val2)
|
||||
if (type === '1') {
|
||||
let res = await handheldBlanking(type, this.val1, this.index, this.val2, arr, this.index1)
|
||||
} else if (type === '2') {
|
||||
let res = await handheldBlanking(type, this.val1, '', this.val2, '', '')
|
||||
}
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
Reference in New Issue
Block a user