入库一键设置
This commit is contained in:
@@ -113,6 +113,7 @@
|
||||
<view class="zd-checkbox" :class="{'zd-checkbox_active': checkArrActive}" @tap="selectAll"></view>
|
||||
</view>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkArr2.length === 0}" @tap="kuwConfirm">{{crType === 'IN' ? '入库' : '出库'}}</button>
|
||||
<button v-if="crType === 'IN'" class="confirm-button" @tap="onekeyUpdate">一键设置</button>
|
||||
<view class="zd-col-10">
|
||||
<!-- <view class="zd-col-12 zd-row jcflexend">
|
||||
<pagination :total="totalCount2" :page-size="queryParams2.pageSize" :current-page="currentPage2" @page-change="handlePageChange2" />
|
||||
@@ -130,7 +131,8 @@
|
||||
<view class="footer"></view>
|
||||
<grid-detail :show="delShow" :data="detailObj" :crType="crType" @closeDetail="delShow=false"></grid-detail>
|
||||
<view class="pop-wraper" :class="{'popshow': show, 'pophide': !show}">
|
||||
<view class="allwidth pop-title">{{crType === 'IN' ? '入库' : '出库'}}</view>
|
||||
<view v-show="type === '1'" class="allwidth pop-title">{{crType === 'IN' ? '入库' : '出库'}}</view>
|
||||
<view v-show="type === '3'" class="allwidth pop-title">批量设置入库库位</view>
|
||||
<view v-if="type === '1'" class="pop-grid-wraper">
|
||||
<view class="zd-row sticky zd-sec-th-wraper zd-pop-th-wraper">
|
||||
<view class="zd-col-2 zd-sec-th"><text>序号</text></view>
|
||||
@@ -159,17 +161,26 @@
|
||||
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.kcsl}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="zd-row jcenter kwcode_wraper">
|
||||
<view v-if="type === '3'" class="kwcode_wraper">
|
||||
<view class="zd-row jcenter mgt20">
|
||||
<view class="zd-col-3 pop_label">入库库位</view>
|
||||
<view class="zd-col-10 select_wraper">
|
||||
<scan-input v-model="val3" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view v-else class="zd-row jcenter kwcode_wraper">
|
||||
<view class="zd-col-12">
|
||||
<scan-input
|
||||
v-model="kwCode"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="mgb20 zd-row jcenter">
|
||||
<view class="zd-col-10 zd-row">
|
||||
<button class="confirm-button confirm-button_cancle mgl0" @tap="show = false">取消</button>
|
||||
<button class="confirm-button mgl0" :class="{'confirm-button_disabled': (type === '1' && dataList3.length === 0) || (type === '2' && kwCode === '')}" :disabled="disabled2" @tap="modalConfirm">确定</button>
|
||||
<button v-if="type === '3'" class="confirm-button mgl0" :class="{'confirm-button_disabled': val3 === ''}" :disabled="disabled2" @tap="modalConfirm1">确定</button>
|
||||
<button v-else class="confirm-button mgl0" :class="{'confirm-button_disabled': (type === '1' && dataList3.length === 0) || (type === '2' && kwCode === '')}" :disabled="disabled2" @tap="modalConfirm">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -186,8 +197,8 @@
|
||||
import ScanInput from '@/components/ScanInput.vue'
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import GridDetail from '@/components/GridDetail.vue'
|
||||
// import {getWarehouseInfo, getUserInfo} from '@/utils/getData2.js'
|
||||
import {getWarehouseInfo, getUserInfo, easOutInBillPage, easOutInBillDetailPage, easOutInBillUpdate, easOutInBillDetailUpdate, queryInventoryInfo} from '@/utils/getData2.js'
|
||||
// import {updateBillDetail} from '@/utils/getData2.js'
|
||||
import {getWarehouseInfo, getUserInfo, easOutInBillPage, easOutInBillDetailPage, easOutInBillUpdate, easOutInBillDetailUpdate, queryInventoryInfo, updateBillDetail} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -234,7 +245,8 @@
|
||||
value1: '',
|
||||
range1: [],
|
||||
value2: '',
|
||||
range2: []
|
||||
range2: [],
|
||||
val3: ''
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -273,7 +285,13 @@
|
||||
let res = await getUserInfo()
|
||||
if (res.code === 1) {
|
||||
this.range2 = [...res.result]
|
||||
this.value2 = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : ''
|
||||
if (this.$store.getters.userInfo !== '') {
|
||||
let flag = this.range2.includes({text: JSON.parse(this.$store.getters.userInfo).person_name, value: JSON.parse(this.$store.getters.userInfo).username})
|
||||
if (!flag) {
|
||||
this.range2.push({text: JSON.parse(this.$store.getters.userInfo).person_name, value: JSON.parse(this.$store.getters.userInfo).username})
|
||||
}
|
||||
this.value2 = JSON.parse(this.$store.getters.userInfo).username
|
||||
}
|
||||
this._getWarehouseInfo()
|
||||
}
|
||||
},
|
||||
@@ -551,6 +569,48 @@
|
||||
getDetails (type,e) {
|
||||
this.delShow = !this.delShow
|
||||
this.detailObj = {type: type, data:e}
|
||||
},
|
||||
// 一键设置
|
||||
onekeyUpdate () {
|
||||
this.type = '3'
|
||||
this.val3 = ''
|
||||
this.show = true
|
||||
},
|
||||
async _updateBillDetail (e) {
|
||||
try {
|
||||
let res = await updateBillDetail(e)
|
||||
if (res.code === 1) {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.disabled2 = false
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
// 一键设置弹窗确认
|
||||
modalConfirm1 () {
|
||||
this.disabled2 = true
|
||||
if (this.val3 === '') {
|
||||
uni.showToast({
|
||||
title: '请设置入库库位',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
let arr = []
|
||||
this.dataList2.map(e => {
|
||||
e.kwbm = this.val3
|
||||
let {djid, flid, kwbm} = {...e}
|
||||
let obj = {djid, flid, kwbm}
|
||||
arr.push(obj)
|
||||
})
|
||||
this.show = false
|
||||
this._updateBillDetail(arr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user