|
|
|
@ -7,17 +7,6 @@
|
|
|
|
|
<!-- 查询按钮 --> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-col> |
|
|
|
|
<!-- <el-form-item label="仓库:" prop="warehouse"> |
|
|
|
|
<el-input v-model="form.areaStatus" placeholder="请输入货区状态;1-启用,2-禁用"/> |
|
|
|
|
<el-select v-model="query.warehouseId" filterable clearable placeholder="请输入仓库关键词" style="width: 88%;"> |
|
|
|
|
<el-option> |
|
|
|
|
v-for="item in allWarehouse" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
<el-form-item label="启用状态:" prop="areaStatus"> |
|
|
|
|
<!-- <el-input v-model="form.areaStatus" placeholder="请输入货区状态;1-启用,2-禁用"/>--> |
|
|
|
|
<el-select v-model="query.enableStatus" clearable placeholder="请选择启用状态" style="width: 88%;"> |
|
|
|
@ -30,7 +19,6 @@
|
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="货区类型:" prop="areaStatus"> |
|
|
|
|
<!-- <el-input v-model="form.areaStatus" placeholder="请输入货区状态;1-启用,2-禁用"/>--> |
|
|
|
|
<el-select v-model="query.areaType" clearable placeholder="请选择货区类型" style="width: 88%;"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in areaTypeData" |
|
|
|
@ -53,6 +41,11 @@
|
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新 增</el-button> |
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain>删 除</el-button> |
|
|
|
|
<el-button type="danger" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
plain |
|
|
|
|
@click="handleImport">导 入 货 区 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleDisable" plain>禁 用</el-button> |
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleEnable" plain>启 用</el-button> |
|
|
|
|
</div> |
|
|
|
@ -183,6 +176,17 @@
|
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-dialog title="货区导入" append-to-body v-model="excelBox" width="555px"> |
|
|
|
|
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
|
|
|
|
<template #excelTemplate> |
|
|
|
|
<el-button type="primary" @click="handleTemplate"> |
|
|
|
|
点击下载<i class="el-icon-download el-icon--right"></i> |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-form> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -201,6 +205,33 @@ import { dateNow } from '@/utils/date';
|
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
excelBox: false, |
|
|
|
|
excelForm: {}, |
|
|
|
|
excelOption: { |
|
|
|
|
submitBtn: false, |
|
|
|
|
emptyBtn: false, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: '文件上传', |
|
|
|
|
prop: 'excelFile', |
|
|
|
|
type: 'upload', |
|
|
|
|
drag: true, |
|
|
|
|
loadText: '文件上传,请稍等', |
|
|
|
|
span: 24, |
|
|
|
|
propsHttp: { |
|
|
|
|
res: 'data', |
|
|
|
|
}, |
|
|
|
|
tip: '请上传 .xls,.xlsx 标准格式文件', |
|
|
|
|
action: '/api/logpm-basic/material/import-basicMaterial', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '模板下载', |
|
|
|
|
prop: 'excelTemplate', |
|
|
|
|
formslot: true, |
|
|
|
|
span: 24, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
columnList: [ |
|
|
|
|
{ |
|
|
|
|
prop: '', |
|
|
|
@ -390,7 +421,25 @@ export default {
|
|
|
|
|
methods: { |
|
|
|
|
init () { |
|
|
|
|
this.height = this.setPx(document.body.clientHeight - 340); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
uploadAfter(res, done, loading, column) { |
|
|
|
|
window.console.log(column); |
|
|
|
|
this.excelBox = false; |
|
|
|
|
this.refreshChange(); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
//导出 |
|
|
|
|
handleImport(){ |
|
|
|
|
this.excelBox = true; |
|
|
|
|
}, |
|
|
|
|
//下载模板 |
|
|
|
|
handleTemplate() { |
|
|
|
|
console.log("下载模板!!!~~~~~~~~~~~"); |
|
|
|
|
exportBlob( |
|
|
|
|
`/api/logpm-basicdata/goodsArea/exportmb-BasicdataGoodsArea?${this.website.tokenHeader}=${getToken()}` |
|
|
|
|
).then(res => { |
|
|
|
|
downloadXls(res.data, '货区模板.xlsx'); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getListInfo(){ |
|
|
|
|
getDictionaryBiz( 'area_type').then(res => { |
|
|
|
|