This commit is contained in:
2023-09-12 11:07:57 +08:00
parent 486453888b
commit 5611f3b103
3 changed files with 67 additions and 15 deletions

View File

@@ -14,6 +14,12 @@
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">点位</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
@@ -39,7 +45,7 @@
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled" @tap="toSure">出库确认</button>
<button class="submit-button" :class="{'btn-disabled': !index && !checkArr.length}" :disabled="disabled" @tap="toSure">出库确认</button>
<button class="submit-button" @tap="_empOutgetIvt(val1)">查询</button>
</view>
</view>
@@ -48,7 +54,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {empOutgetIvt, empOutconfirm} from '@/utils/getData1.js'
import {empOutgetIvt, empOutgetPoint, empOutconfirm} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -56,16 +62,34 @@
},
data() {
return {
options: [],
index: '',
val1: '',
dataList: [],
checkArr: [],
disabled: false
};
},
created () {
this._empOutgetIvt()
},
methods: {
handleChange (e) {
this._empOutgetIvt(e)
},
/** 选择器 */
selectChange(e) {
this.index = e
},
/** 点位下拉框查询 */
async _empOutgetPoint () {
let res = await empOutgetPoint()
res.data.map(el => {
this.$set(el, 'value', el.point_code)
this.$set(el, 'text', el.point_name)
})
this.options = [...res.data]
},
/** grid查询 */
async _empOutgetIvt (e) {
let res = await empOutgetIvt(e)
@@ -81,14 +105,15 @@
/** 确认 */
async toSure () {
this.disabled = true
if (!this.val1) {
if (!this.index || !this.checkArr.length) {
this.disabled = false
return
}
try {
let res = await empOutconfirm(this.checkArr)
let res = await empOutconfirm(this.checkArr, this.index)
this.disabled = false
this.val1 = ''
this.dataList = []
this._empOutgetIvt()
uni.showToast({
title: res.message,
icon: 'none'