需求修改
This commit is contained in:
@@ -27,12 +27,12 @@
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">目的地</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="text" class="filter_input" v-model="val3">
|
||||
<view class="zd-col-19 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view v-show="index === '1'" class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
@@ -54,10 +54,21 @@
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="dataList.length > 0 && dataList[0].order_code.indexOf('OR') !== -1" class="zd_wrapper">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">下一道工序</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<uni-data-select v-model="index1" :localdata="options1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -65,7 +76,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {handheldBlanking} from '@/utils/getData2.js'
|
||||
import {regionList, handheldBlanking, handheldTranshipment} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -76,23 +87,39 @@
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
options: [{ value: '1', text: '货架' }, { value: '2', text: '内部' }, { value: '3', text: '外协' }],
|
||||
index: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
disabled: false,
|
||||
dataList: [{order_code: '', material_code: '', material_qty: 0}]
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._regionList()
|
||||
},
|
||||
methods: {
|
||||
selectChange (e) {
|
||||
this.dataList = [{order_code: '', material_code: '', material_qty: 0}]
|
||||
this.index1 = ''
|
||||
},
|
||||
async _regionList () {
|
||||
let res = await regionList()
|
||||
this.options1 = [...res.content]
|
||||
this.options1.map(el => {
|
||||
this.$set(el, 'text', el.label)
|
||||
})
|
||||
},
|
||||
addRow () {
|
||||
this.dataList.push({order_code: '', material_code: '', material_qty: 0})
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.index = ''
|
||||
this.dataList = [{order_code: '', material_code: '', material_qty: 0}]
|
||||
this.index1 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _handheldBlanking () {
|
||||
@@ -108,11 +135,28 @@
|
||||
}
|
||||
})
|
||||
try {
|
||||
let res = await handheldBlanking(this.val1, this.val3, this.val2, arr)
|
||||
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)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user