提交库存编号

master
Mr.sun 2 years ago
parent cdaf26da21
commit a12fe2456d
  1. 14
      src/api/libraryManage/inventory.js
  2. 54
      src/views/libraryManage/inventory/inventory.vue

@ -27,15 +27,15 @@ export function add(data) {
}); });
} }
// 库内管理-补货-根据库别查询区域
// export function listAreaByStorage(query) {
// return request({
// url: `/wms/stock/common/listAreaByStorage/${query}`,
// method: "get",
// });
// }
// 库内管理-补货-根据库别查询区域 // 库内管理-补货-根据库别查询区域
export function listAreaByStorage(query) { export function listAreaByStorage(query) {
return request({
url: `/wms/stock/common/listAreaByStorage/${query}`,
method: "get",
});
}
// 库内管理-补货-根据库别查询区域
export function storageList1(query) {
return request({ return request({
url: `/wms/storage/list`, url: `/wms/storage/list`,
method: "get", method: "get",

@ -38,23 +38,6 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<el-form-item label="库区编号">
<el-select
v-model="enterForm.id"
placeholder="请选择库区编号"
clearable
style="width: 240px"
>
<el-option
v-for="item in areaIdhList"
:key="item.storageCode"
:label="item.storageName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="货位"> <el-form-item label="货位">
<el-input <el-input
v-model="enterForm.locationCode" v-model="enterForm.locationCode"
@ -92,6 +75,26 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item
label="库区编号"
prop='state'
>
<el-select
v-model="enterForm.areaId"
placeholder="请选择库区编号"
clearable
style="width: 240px"
>
<el-option
v-for="item in areaIdhList"
:key="item.areaCode"
:label="item.areaName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
@ -137,7 +140,7 @@
import { tableConfig } from './config.js' import { tableConfig } from './config.js'
import { consignorList } from '@/api/warehousing/acceptance' import { consignorList } from '@/api/warehousing/acceptance'
import { storageList } from '@/api/warehousing/acceptance' import { storageList } from '@/api/warehousing/acceptance'
import { queryGoods, add, listAreaByStorage, exportBtn } from '@/api/libraryManage/inventory' import { queryGoods, storageList1, add, listAreaByStorage, exportBtn, getAreaList } from '@/api/libraryManage/inventory'
import { Debounce, getDictLabel } from '@/utils/index' import { Debounce, getDictLabel } from '@/utils/index'
export default { export default {
name: 'Inventory', name: 'Inventory',
@ -160,6 +163,7 @@ export default {
areaIdhList: [], areaIdhList: [],
handleSelect: [], handleSelect: [],
tableConfig: {}, tableConfig: {},
storageId: '',
paging: { paging: {
page: 1, // page: 1, //
size: 10, // size: 10, //
@ -170,7 +174,11 @@ export default {
mounted() { mounted() {
this.getBasicList() this.getBasicList()
this.getBasicListsto() this.getBasicListsto()
this.listAreaByStorage() storageList1().then((res) => {
this.enterForm.storageId = res.data[0].id
this.listAreaByStorage(this.enterForm.storageId)
})
}, },
async created() { async created() {
this.tableConfig = await this.getTableHeaderCom('busin_inventory', tableConfig.call(this)) this.tableConfig = await this.getTableHeaderCom('busin_inventory', tableConfig.call(this))
@ -191,15 +199,15 @@ export default {
// //
selectStoId(val) { selectStoId(val) {
this.enterForm.areaId = '' this.enterForm.areaId = ''
if (this.enterForm.storageId) {
if (val) { this.listAreaByStorage(this.enterForm.storageId)
this.listAreaByStorage(val)
} }
}, },
// //
listAreaByStorage(val) { listAreaByStorage(val) {
listAreaByStorage().then((res) => { listAreaByStorage(this.enterForm.storageId).then((res) => {
this.areaIdhList = res.data this.areaIdhList = res.data
this.enterForm.areaId = 1
// console.log(this.areaIdhList) // console.log(this.areaIdhList)
}) })
}, },

Loading…
Cancel
Save