|
|
|
@ -32,6 +32,11 @@
|
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain>删 除</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> |
|
|
|
|
<el-button type="danger" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
plain |
|
|
|
|
@click="handleImport">导 入 货 架 |
|
|
|
|
</el-button> |
|
|
|
|
<!-- <el-button type="danger" icon="el-icon-delete" @click="aaa" plain>导出二维码</el-button>--> |
|
|
|
|
<!-- <el-button type="danger" icon="el-icon-delete" @click="viewQrCode" plain>查看二维码</el-button>--> |
|
|
|
|
|
|
|
|
@ -158,7 +163,7 @@
|
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
<el-col :span="12" v-if="idShowStatus && !allocation"> |
|
|
|
|
<el-col :span="12" v-if="!allocation"> |
|
|
|
|
<el-form-item label="备 注:" prop="remarks" label-width="100px"> |
|
|
|
|
<el-input v-model="form.remarks" placeholder="请输入备注" style="width: 88%;"/> |
|
|
|
|
</el-form-item> |
|
|
|
@ -315,11 +320,21 @@
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<el-dialog title="货架导入" append-to-body v-model="excelBox" width="555px"> |
|
|
|
|
<avue-form :option="excelOption" v-model="excelForm" :upload-before="uploadBefore" :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> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getList, getDetail, add, update, remove,getQRCodeImg,getShowTemplate,addAllocation,disable,enable,addlayer, } from "@/api/basicdata/basicdataGoodsShelf"; |
|
|
|
|
import { getList, getDetail, add, update, remove,getQRCodeImg,getShowTemplate,addAllocation,disable,enable,addlayer,getUploadBefore} from "@/api/basicdata/basicdataGoodsShelf"; |
|
|
|
|
import {getList as allgetList,update as allupdate,getPrintTemplate} from "@/api/basicdata/basicdataGoodsAllocation"; |
|
|
|
|
import option from "@/option/basicdata/basicdataGoodsShelf"; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
@ -327,9 +342,16 @@ import { getGoodsAreaNodeList,getGoodsAreaoptionList } from '@/api/basicdata/ba
|
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import { getTemplateData} from '@/api/basic/basicPrintTemplate' |
|
|
|
|
import { getLodop } from '@/utils/LodopFuncs.js' |
|
|
|
|
import { exportBlob } from '@/api/common'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import { downloadXls } from '@/utils/util'; |
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
excelBox: false, |
|
|
|
|
excelForm: { |
|
|
|
|
goodsAreaId:null, |
|
|
|
|
}, |
|
|
|
|
form2:{}, |
|
|
|
|
box2:false, |
|
|
|
|
form3:{}, |
|
|
|
@ -489,6 +511,50 @@ export default {
|
|
|
|
|
//货位 选择行 |
|
|
|
|
allselectionList: [], |
|
|
|
|
html: null, // 页面包条码内容 |
|
|
|
|
excelOption: { |
|
|
|
|
submitBtn: false, |
|
|
|
|
emptyBtn: false, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "所属货区", |
|
|
|
|
prop: "goodsAreaId", |
|
|
|
|
type: "select", |
|
|
|
|
search: true, |
|
|
|
|
align:'center', |
|
|
|
|
width: 200, |
|
|
|
|
filterable: true, |
|
|
|
|
dicUrl: "/api/logpm-basicdata/goodsArea/dict", |
|
|
|
|
props: { |
|
|
|
|
label: "headline", |
|
|
|
|
value: "id", |
|
|
|
|
}, |
|
|
|
|
rules: [{ |
|
|
|
|
required: true, |
|
|
|
|
message: "请选择货区", |
|
|
|
|
trigger: "blur" |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '文件上传', |
|
|
|
|
prop: 'excelFile', |
|
|
|
|
type: 'upload', |
|
|
|
|
drag: true, |
|
|
|
|
loadText: '文件上传,请稍等', |
|
|
|
|
span: 24, |
|
|
|
|
propsHttp: { |
|
|
|
|
res: 'data', |
|
|
|
|
}, |
|
|
|
|
tip: '请上传 .xls,.xlsx 标准格式文件', |
|
|
|
|
action: '/api/logpm-basicdata/goodsShelf/import-BasicdataGoodsShelf', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '模板下载', |
|
|
|
|
prop: 'excelTemplate', |
|
|
|
|
formslot: true, |
|
|
|
|
span: 24, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
alloption: { |
|
|
|
|
height:'auto', |
|
|
|
|
calcHeight: 30, |
|
|
|
@ -672,7 +738,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
goodsShelfId:null, |
|
|
|
|
// 表单配置 |
|
|
|
|
option: option, |
|
|
|
|
// 表单列表 |
|
|
|
@ -750,9 +816,46 @@ export default {
|
|
|
|
|
.catch(_ => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//导入 |
|
|
|
|
handleImport(){ |
|
|
|
|
this.excelBox = true; |
|
|
|
|
}, |
|
|
|
|
//下载模板 |
|
|
|
|
handleTemplate() { |
|
|
|
|
console.log("下载模板!!!~~~~~~~~~~~"); |
|
|
|
|
exportBlob( |
|
|
|
|
`/api/logpm-basicdata/goodsShelf/exportmb-BasicdataGoodsShelf?${this.website.tokenHeader}=${getToken()}` |
|
|
|
|
).then(res => { |
|
|
|
|
downloadXls(res.data, '货架模板.xlsx'); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
init () { |
|
|
|
|
this.height = this.setPx(document.body.clientHeight - 340); |
|
|
|
|
}, |
|
|
|
|
uploadAfter(res, done, loading, column) { |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
this.excelBox = false; |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
uploadBefore(res, done, loading, column){ |
|
|
|
|
let id = this.excelForm.goodsAreaId; |
|
|
|
|
console.log("之前>>>>>>>>>>>>>>",id); |
|
|
|
|
if (null == id){ |
|
|
|
|
console.log("只杀杀杀"); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'warning', |
|
|
|
|
message: '无选择仓库!', |
|
|
|
|
}); |
|
|
|
|
loading(); |
|
|
|
|
return ; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
getUploadBefore(id); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
getListInfo(){ |
|
|
|
|
//启用状态字典列表数据 |
|
|
|
|
getDictionaryBiz( 'enable_status').then(res => { |
|
|
|
@ -883,9 +986,10 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
//货位列表 |
|
|
|
|
locationList(row){ |
|
|
|
|
console.log("row>>>>>>>>",row); |
|
|
|
|
console.log("row>>>>>>xx>>",row); |
|
|
|
|
this.title = '货位列表' |
|
|
|
|
this.box1 = true |
|
|
|
|
this.goodsShelfId = row.id |
|
|
|
|
this.allonLoad(this.allpage) |
|
|
|
|
}, |
|
|
|
|
handleSubmitAdd(){ |
|
|
|
@ -1225,7 +1329,9 @@ export default {
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
allonLoad(page){ |
|
|
|
|
let values ={} |
|
|
|
|
let values ={ |
|
|
|
|
goodsShelfId:this.goodsShelfId, |
|
|
|
|
} |
|
|
|
|
allgetList(page.currentPage, page.pageSize, values).then(res => { |
|
|
|
|
const data = res.data.data |
|
|
|
|
console.log("data>>>>>>>>>>>>>>>",data); |
|
|
|
|