diff --git a/pages/management/in-storage.vue b/pages/management/in-storage.vue
index 0258999..d001ca7 100644
--- a/pages/management/in-storage.vue
+++ b/pages/management/in-storage.vue
@@ -113,6 +113,7 @@
+
-
+
+
@@ -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)
}
}
}
diff --git a/utils/getData2.js b/utils/getData2.js
index 40090e3..2a1e533 100644
--- a/utils/getData2.js
+++ b/utils/getData2.js
@@ -85,6 +85,11 @@ export const getOrganizationInfo = () => request({
url:'api/easOutInBill/getOrganizationInfo',
data: {}
})
+// 8.一键设置批量修改出库单据库位
+export const updateBillDetail = (arr) => request({
+ url:'api/easOutInBillDetail/updateBillDetail',
+ data: arr
+})
/**
* 调拨维护