|
|
|
|
@ -2,8 +2,11 @@ |
|
|
|
|
<!-- 盘点计划 --> |
|
|
|
|
<div class="app-container"> |
|
|
|
|
<div class="search-box"> |
|
|
|
|
<el-form :inline="true" :model="enterForm"> |
|
|
|
|
<el-form-item label="业主名称"> |
|
|
|
|
<el-form |
|
|
|
|
:inline="true" |
|
|
|
|
:model="enterForm" |
|
|
|
|
> |
|
|
|
|
<!-- <el-form-item label="业主名称"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="enterForm.consignorId" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
@ -34,7 +37,7 @@ |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
|
|
|
|
|
<el-form-item label="库区编号"> |
|
|
|
|
<el-select |
|
|
|
|
@ -90,7 +93,10 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" @click="queryTable">搜索</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
@click="queryTable" |
|
|
|
|
>搜索</el-button> |
|
|
|
|
<el-button @click="resetQuery">重置</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
@ -103,8 +109,7 @@ |
|
|
|
|
type="primary" |
|
|
|
|
@click="generateThePlan" |
|
|
|
|
:disabled="!handleSelect.length != 0" |
|
|
|
|
>生成计划</el-button |
|
|
|
|
> |
|
|
|
|
>生成计划</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<!-- <el-button type="primary" @click="exportBtn">导出</el-button> --> |
|
|
|
|
@ -112,7 +117,10 @@ |
|
|
|
|
</el-row> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="layout-full" style="margin-bottom: 45px"> |
|
|
|
|
<div |
|
|
|
|
class="layout-full" |
|
|
|
|
style="margin-bottom: 45px" |
|
|
|
|
> |
|
|
|
|
<heavy-table |
|
|
|
|
:data="tableData" |
|
|
|
|
:paging="paging" |
|
|
|
|
@ -126,30 +134,25 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { tableConfig } from "./config.js"; |
|
|
|
|
import { consignorList } from "@/api/warehousing/acceptance"; |
|
|
|
|
import { storageList } from "@/api/warehousing/acceptance"; |
|
|
|
|
import { |
|
|
|
|
queryGoods, |
|
|
|
|
add, |
|
|
|
|
listAreaByStorage, |
|
|
|
|
exportBtn, |
|
|
|
|
} from "@/api/libraryManage/inventory"; |
|
|
|
|
import { Debounce, getDictLabel } from "@/utils/index"; |
|
|
|
|
import { tableConfig } from './config.js' |
|
|
|
|
import { consignorList } from '@/api/warehousing/acceptance' |
|
|
|
|
import { storageList } from '@/api/warehousing/acceptance' |
|
|
|
|
import { queryGoods, add, listAreaByStorage, exportBtn } from '@/api/libraryManage/inventory' |
|
|
|
|
import { Debounce, getDictLabel } from '@/utils/index' |
|
|
|
|
export default { |
|
|
|
|
name: "Inventory", |
|
|
|
|
dicts: ["goods_unit", "inv_type_dict"], |
|
|
|
|
name: 'Inventory', |
|
|
|
|
dicts: ['goods_unit', 'inv_type_dict'], |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
tableProps: {}, |
|
|
|
|
ids: [], |
|
|
|
|
enterForm: { |
|
|
|
|
consignorId: "", |
|
|
|
|
storageId: "", |
|
|
|
|
areaId: "", |
|
|
|
|
locationCode: "", |
|
|
|
|
invWay: "", |
|
|
|
|
invType: "", |
|
|
|
|
consignorId: '', |
|
|
|
|
storageId: '', |
|
|
|
|
areaId: '', |
|
|
|
|
locationCode: '', |
|
|
|
|
invWay: '', |
|
|
|
|
invType: '' |
|
|
|
|
}, |
|
|
|
|
options: [], |
|
|
|
|
branchList: [], |
|
|
|
|
@ -160,76 +163,73 @@ export default { |
|
|
|
|
paging: { |
|
|
|
|
page: 1, // 当前页 |
|
|
|
|
size: 10, // 页面大小 |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
total: 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.getBasicList(); |
|
|
|
|
this.getBasicListsto(); |
|
|
|
|
this.getBasicList() |
|
|
|
|
this.getBasicListsto() |
|
|
|
|
}, |
|
|
|
|
async created() { |
|
|
|
|
this.tableConfig = await this.getTableHeaderCom( |
|
|
|
|
"busin_inventory", |
|
|
|
|
tableConfig.call(this) |
|
|
|
|
); |
|
|
|
|
this.tableConfig = await this.getTableHeaderCom('busin_inventory', tableConfig.call(this)) |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 货主请求 |
|
|
|
|
getBasicList() { |
|
|
|
|
consignorList().then((res) => { |
|
|
|
|
this.options = res.rows; |
|
|
|
|
}); |
|
|
|
|
this.options = res.rows |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 库别 |
|
|
|
|
getBasicListsto() { |
|
|
|
|
storageList().then((res) => { |
|
|
|
|
this.branchList = res.data; |
|
|
|
|
}); |
|
|
|
|
this.branchList = res.data |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 根绝库别编号获得库区 |
|
|
|
|
selectStoId(val) { |
|
|
|
|
this.enterForm.areaId = ""; |
|
|
|
|
this.enterForm.areaId = '' |
|
|
|
|
if (val) { |
|
|
|
|
this.listAreaByStorage(val); |
|
|
|
|
this.listAreaByStorage(val) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 库区 |
|
|
|
|
listAreaByStorage(val) { |
|
|
|
|
listAreaByStorage(val).then((res) => { |
|
|
|
|
this.areaIdhList = res.data; |
|
|
|
|
}); |
|
|
|
|
this.areaIdhList = res.data |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 表格复选框选中 |
|
|
|
|
handleselection(val) { |
|
|
|
|
this.handleSelect = val.map((ele) => ele.id); |
|
|
|
|
this.ids = val.map((ele) => ele.stockId); |
|
|
|
|
this.handleSelect = val.map((ele) => ele.id) |
|
|
|
|
this.ids = val.map((ele) => ele.stockId) |
|
|
|
|
}, |
|
|
|
|
// 重置 |
|
|
|
|
resetQuery() { |
|
|
|
|
this.enterForm = {}; |
|
|
|
|
this.enterForm = {} |
|
|
|
|
}, |
|
|
|
|
// 表格的数据 |
|
|
|
|
queryTable() { |
|
|
|
|
if (!this.enterForm.consignorId) return this.$message("业主名称必填!"); |
|
|
|
|
if (!this.enterForm.invWay) return this.$message("盘点方式必选!"); |
|
|
|
|
if (!this.enterForm.invType) return this.$message("盘点类型必选!"); |
|
|
|
|
this.loading = true; |
|
|
|
|
if (!this.enterForm.consignorId) return this.$message('业主名称必填!') |
|
|
|
|
if (!this.enterForm.invWay) return this.$message('盘点方式必选!') |
|
|
|
|
if (!this.enterForm.invType) return this.$message('盘点类型必选!') |
|
|
|
|
this.loading = true |
|
|
|
|
queryGoods({ |
|
|
|
|
pageSize: this.paging.size, |
|
|
|
|
pageNum: this.paging.page, |
|
|
|
|
...this.enterForm, |
|
|
|
|
...this.enterForm |
|
|
|
|
}) |
|
|
|
|
.then((response) => { |
|
|
|
|
if (response.code === 200) { |
|
|
|
|
this.loading = false; |
|
|
|
|
this.paging.total = response.total; |
|
|
|
|
this.tableData = response.rows; |
|
|
|
|
this.loading = false |
|
|
|
|
this.paging.total = response.total |
|
|
|
|
this.tableData = response.rows |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 生成计划 |
|
|
|
|
@ -237,20 +237,20 @@ export default { |
|
|
|
|
add({ |
|
|
|
|
invType: this.enterForm.invType, |
|
|
|
|
invWay: this.enterForm.invWay, |
|
|
|
|
stockIds: this.ids, |
|
|
|
|
stockIds: this.ids |
|
|
|
|
}) |
|
|
|
|
.then((response) => { |
|
|
|
|
if (response.code === 200) { |
|
|
|
|
this.$message({ |
|
|
|
|
message: "操作成功!", |
|
|
|
|
type: "success", |
|
|
|
|
}); |
|
|
|
|
this.queryTable(); |
|
|
|
|
message: '操作成功!', |
|
|
|
|
type: 'success' |
|
|
|
|
}) |
|
|
|
|
this.queryTable() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 导出 |
|
|
|
|
exportBtn() { |
|
|
|
|
@ -259,14 +259,14 @@ export default { |
|
|
|
|
// pageNum: isAll === "all" ? null : this.paging.page, |
|
|
|
|
// ...this.searchForm, |
|
|
|
|
// }; |
|
|
|
|
dealEmptyQueryCondition(request); |
|
|
|
|
dealEmptyQueryCondition(request) |
|
|
|
|
// this.download( |
|
|
|
|
// "monitor/job/export", |
|
|
|
|
// request, |
|
|
|
|
// `goods_${new Date().getTime()}.xlsx` |
|
|
|
|
// ); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped></style> |
|
|
|
|
|