|
|
|
@ -8,10 +8,14 @@
|
|
|
|
|
<el-form-item> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col > |
|
|
|
|
<!-- <el-form-item label="货区:" prop="info" >--> |
|
|
|
|
<!-- <el-cascader :options="optioner" style="width: 80%" v-model="query.goodsAreaInfo" placeholder="请选择货区" clearable :show-all-levels="false">--> |
|
|
|
|
<el-form-item label="货区:" prop="info" > |
|
|
|
|
<!-- <el-cascader :options="optioner" :show-all-levels="false" clearable >--> |
|
|
|
|
<el-cascader :options="optioner" style="width: 80%" v-model="query.goodsAreaInfo" placeholder="请选择货区" :show-all-levels="false" /> |
|
|
|
|
<!-- </el-cascader>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="货架名称" prop="info" > |
|
|
|
|
<el-input v-model="query.goodsShelfName" placeholder="请输入货架名称"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="货架状态:" prop="areaStatus"> |
|
|
|
|
<!-- <el-input v-model="form.areaStatus" placeholder="请输入货区状态;1-启用,2-禁用"/>--> |
|
|
|
|
<el-select v-model="query.goodsShelfStatus" clearable placeholder="请选择货架状态" style="width: 80%;"> |
|
|
|
@ -100,6 +104,7 @@
|
|
|
|
|
<!-- <el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>--> |
|
|
|
|
<el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button> |
|
|
|
|
<el-button type="primary" text icon="el-icon-edit" @click="addAllocation(row)">编 辑 货 位</el-button> |
|
|
|
|
<el-button type="primary" text icon="el-icon-edit" @click="locationList(row)">货 位 列 表</el-button> |
|
|
|
|
<!-- <el-button type="primary" text icon="el-icon-edit" @click="enableStatus(row)">--> |
|
|
|
|
<!-- <span v-if="row.enableStatus === '启用'">禁用</span>--> |
|
|
|
|
<!-- <span v-else>启用</span>--> |
|
|
|
@ -257,15 +262,48 @@
|
|
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
title="货位列表" |
|
|
|
|
width="80%" |
|
|
|
|
v-model="box1"> |
|
|
|
|
<avue-crud :option="alloption" |
|
|
|
|
v-model:page="allpage" |
|
|
|
|
v-model="allform" |
|
|
|
|
:table-loading="loading" |
|
|
|
|
:data="alldata" |
|
|
|
|
ref="crud" |
|
|
|
|
@selection-change="allselectionChange" |
|
|
|
|
@current-change="allcurrentChange" |
|
|
|
|
@size-change="allsizeChange" |
|
|
|
|
@on-load="allonLoad"> |
|
|
|
|
|
|
|
|
|
<!-- <template #menu-left>--> |
|
|
|
|
<!-- <el-button type="warning"--> |
|
|
|
|
<!-- plain--> |
|
|
|
|
<!-- icon="el-icon-camera"--> |
|
|
|
|
<!-- @click="handleqr">查看二维码--> |
|
|
|
|
<!-- </el-button>--> |
|
|
|
|
<!-- </template>--> |
|
|
|
|
<template #menu="{size,row,index}"> |
|
|
|
|
<el-button type="primary" text icon="el-icon-view" v-if="row.enableStatus ==1" @click="losses(row,2)">禁 用</el-button> |
|
|
|
|
<!-- <el-button type="primary" text icon="el-icon-view" v-if="row.allocationStatus !=='1'" @click="Offshelf(row)">一 键 下 架</el-button>--> |
|
|
|
|
<el-button type="primary" text icon="el-icon-view" v-if="row.enableStatus ==2" @click="losses(row,1)">启 用</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getList, getDetail, add, update, remove,getQRCodeImg,getShowTemplate,getPrintTemplate,addAllocation } from "@/api/basicdata/basicdataGoodsShelf"; |
|
|
|
|
import {getList as allgetList,update as allupdate} from "@/api/basicdata/basicdataGoodsAllocation"; |
|
|
|
|
import option from "@/option/basicdata/basicdataGoodsShelf"; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import {getGoodsAreaList} from "@/api/basicdata/basicdataGoodsArea"; |
|
|
|
|
import { getGoodsAreaNodeList } from '@/api/basicdata/basicdataGoodsArea'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import { getTemplateData} from '@/api/basic/basicPrintTemplate' |
|
|
|
|
import { getLodop } from '@/utils/LodopFuncs.js' |
|
|
|
@ -278,6 +316,7 @@ export default {
|
|
|
|
|
title: '', |
|
|
|
|
// 是否展示弹框 |
|
|
|
|
box: false, |
|
|
|
|
box1: false, |
|
|
|
|
// 是否显示查询 |
|
|
|
|
search: true, |
|
|
|
|
// 加载中 |
|
|
|
@ -294,11 +333,204 @@ export default {
|
|
|
|
|
pageSize: 10, |
|
|
|
|
total: 40 |
|
|
|
|
}, |
|
|
|
|
allpage: { |
|
|
|
|
pageSize: 10, |
|
|
|
|
currentPage: 1, |
|
|
|
|
total: 0 |
|
|
|
|
}, |
|
|
|
|
allform:{}, |
|
|
|
|
alldata:[], |
|
|
|
|
// 表单数据 |
|
|
|
|
form: {}, |
|
|
|
|
isShowQRCode:false, |
|
|
|
|
// 选择行 |
|
|
|
|
selectionList: [], |
|
|
|
|
//货位 选择行 |
|
|
|
|
allselectionList: [], |
|
|
|
|
alloption: { |
|
|
|
|
height:'auto', |
|
|
|
|
calcHeight: 30, |
|
|
|
|
tip: false, |
|
|
|
|
searchShow: true, |
|
|
|
|
searchMenuSpan: 6, |
|
|
|
|
border: true, |
|
|
|
|
index: true, |
|
|
|
|
viewBtn: true, |
|
|
|
|
selection: false, |
|
|
|
|
editBtn:false, |
|
|
|
|
delBtn:false, |
|
|
|
|
addBtn:false, |
|
|
|
|
indexWidth:'150', |
|
|
|
|
indexLabel:"序号", |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "仓库名称", |
|
|
|
|
prop: "warehouseName", |
|
|
|
|
type: "input", |
|
|
|
|
addDisplay: false, |
|
|
|
|
editDisplay: false, |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "货区名称", |
|
|
|
|
prop: "goodsAreaName", |
|
|
|
|
type: "input", |
|
|
|
|
addDisplay: false, |
|
|
|
|
editDisplay: false, |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "货架名称", |
|
|
|
|
prop: "goodsShelfName", |
|
|
|
|
type: "input", |
|
|
|
|
addDisplay: false, |
|
|
|
|
editDisplay: false, |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '货架', |
|
|
|
|
prop: 'nodeInfo', |
|
|
|
|
type: "cascader", |
|
|
|
|
labelWidth:'100', |
|
|
|
|
clearable:true, |
|
|
|
|
placeholder:'仓库/货区/货架', |
|
|
|
|
dicUrl: '/api/logpm-basicdata/goodsAllocation/getNode', |
|
|
|
|
// dicData:dicData , |
|
|
|
|
props: { |
|
|
|
|
label:'label', |
|
|
|
|
value:'value', |
|
|
|
|
children:'children', |
|
|
|
|
leaf:'leaf', |
|
|
|
|
}, |
|
|
|
|
addDisplay: true, |
|
|
|
|
editDisplay: false, |
|
|
|
|
viewDisplay: false, |
|
|
|
|
hide: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "货位名称", |
|
|
|
|
prop: "goodsAllocationName", |
|
|
|
|
type: "input", |
|
|
|
|
addDisplay: true, |
|
|
|
|
editDisplay: true, |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
rules: [{ |
|
|
|
|
required: true, |
|
|
|
|
message: "请输入货位名称", |
|
|
|
|
trigger: "blur" |
|
|
|
|
}] |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "所在列", |
|
|
|
|
prop: "columnNum", |
|
|
|
|
type: "input", |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
addDisplay: true, |
|
|
|
|
editDisplay: true, |
|
|
|
|
viewDisplay: true, |
|
|
|
|
hide: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "所在层", |
|
|
|
|
prop: "layerNum", |
|
|
|
|
type: "input", |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
addDisplay: true, |
|
|
|
|
editDisplay: true, |
|
|
|
|
viewDisplay: true, |
|
|
|
|
hide: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "启用状态", |
|
|
|
|
prop: "enableStatus", |
|
|
|
|
type: "select", |
|
|
|
|
search: false, |
|
|
|
|
labelWidth:'100', |
|
|
|
|
dicUrl: '/api/blade-system/dict-biz/dictionary?code=enable_status', |
|
|
|
|
props: { |
|
|
|
|
label: 'dictValue', |
|
|
|
|
value: 'dictKey', |
|
|
|
|
}, |
|
|
|
|
addDisplay: false, |
|
|
|
|
align:'center', |
|
|
|
|
editDisplay: false, |
|
|
|
|
viewDisplay: false, |
|
|
|
|
hide: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "货位状态", |
|
|
|
|
prop: "allocationStatus", |
|
|
|
|
type: "select", |
|
|
|
|
labelWidth:'100', |
|
|
|
|
dicUrl: '/api/blade-system/dict-biz/dictionary?code=allocation_status', |
|
|
|
|
props: { |
|
|
|
|
label: 'dictValue', |
|
|
|
|
value: 'dictKey', |
|
|
|
|
}, |
|
|
|
|
addDisplay: false, |
|
|
|
|
align:'center', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "货位码", |
|
|
|
|
prop: "qrCode", |
|
|
|
|
type: "input", |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
viewDisplay: true, |
|
|
|
|
addDisplay: false, |
|
|
|
|
editDisplay: false, |
|
|
|
|
hide:true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "旧ID", |
|
|
|
|
prop: "oldId", |
|
|
|
|
type: "input", |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
viewDisplay: true, |
|
|
|
|
addDisplay: false, |
|
|
|
|
editDisplay: false, |
|
|
|
|
hide:true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "旧货位码", |
|
|
|
|
prop: "oldQrCode", |
|
|
|
|
type: "input", |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
viewDisplay: true, |
|
|
|
|
addDisplay: false, |
|
|
|
|
editDisplay: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "模 板", |
|
|
|
|
prop: "templateId", |
|
|
|
|
type: "select", |
|
|
|
|
align:'center', |
|
|
|
|
labelWidth:'100', |
|
|
|
|
dicUrl: '/api/logpm-basic/printTemplate/getTemplate?templateType=8', |
|
|
|
|
props: { |
|
|
|
|
label: 'templateName', |
|
|
|
|
value: 'id', |
|
|
|
|
}, |
|
|
|
|
viewDisplay: true, |
|
|
|
|
addDisplay: true, |
|
|
|
|
editDisplay: false, |
|
|
|
|
hide:true, |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 表单配置 |
|
|
|
|
option: option, |
|
|
|
|
// 表单列表 |
|
|
|
@ -356,6 +588,24 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
losses(row,mub){ |
|
|
|
|
this.$confirm('确认操作?') |
|
|
|
|
.then(_ => { |
|
|
|
|
row.enableStatus =mub |
|
|
|
|
allupdate(row).then(() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}, error => { |
|
|
|
|
loading(); |
|
|
|
|
console.log(error); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(_ => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
init () { |
|
|
|
|
this.height = this.setPx(document.body.clientHeight - 340); |
|
|
|
|
}, |
|
|
|
@ -367,9 +617,12 @@ export default {
|
|
|
|
|
getDictionaryBiz( 'goods_shelf_status').then(res => { |
|
|
|
|
this.goodsShelfStatusData = res.data.data; |
|
|
|
|
}); |
|
|
|
|
getGoodsAreaList().then(res=>{ |
|
|
|
|
console.log(res.data.data); |
|
|
|
|
this.optioner = res.data.data.records; |
|
|
|
|
getGoodsAreaNodeList().then(res=>{ |
|
|
|
|
|
|
|
|
|
const data = res.data.data |
|
|
|
|
this.optioner = this.formatCascaderData(data); |
|
|
|
|
|
|
|
|
|
console.log(">>>>>>>>>>>>>>>>optioner",this.optioner); |
|
|
|
|
}) |
|
|
|
|
getTemplateData("9").then(res=>{ |
|
|
|
|
console.log(res.data.data); |
|
|
|
@ -377,6 +630,20 @@ export default {
|
|
|
|
|
this.templateData = data; |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 格式化数据,递归将空的children置为undefined |
|
|
|
|
formatCascaderData(data) |
|
|
|
|
{ |
|
|
|
|
for (var i = 0; i < data.length; i++) { |
|
|
|
|
if (null==data[i].children ||data[i].children.length < 1) { |
|
|
|
|
// children若为空数组,则将children设为undefined |
|
|
|
|
delete data[i].children; |
|
|
|
|
} else { |
|
|
|
|
// children若不为空数组,则继续 递归调用 本方法 |
|
|
|
|
this.formatCascaderData(data[i].children) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return data |
|
|
|
|
}, |
|
|
|
|
searchHide () { |
|
|
|
|
this.search = !this.search; |
|
|
|
|
}, |
|
|
|
@ -411,6 +678,13 @@ export default {
|
|
|
|
|
//TODO 这里还需要对二维码图片进行控制显示 |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//货位列表 |
|
|
|
|
locationList(row){ |
|
|
|
|
console.log("row>>>>>>>>",row); |
|
|
|
|
this.title = '货位列表' |
|
|
|
|
this.box1 = true |
|
|
|
|
this.allonLoad(this.allpage) |
|
|
|
|
}, |
|
|
|
|
handleSubmit () { |
|
|
|
|
if (this.allocation){ |
|
|
|
|
console.log("this.form>>>>>>>货位", this.form); |
|
|
|
@ -618,6 +892,9 @@ export default {
|
|
|
|
|
selectionChange (list) { |
|
|
|
|
this.selectionList = list; |
|
|
|
|
}, |
|
|
|
|
allselectionChange (list) { |
|
|
|
|
this.allselectionList = list; |
|
|
|
|
}, |
|
|
|
|
selectionClear () { |
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.query.warehouseId=null; |
|
|
|
@ -632,6 +909,24 @@ export default {
|
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
allcurrentChange (currentPage) { |
|
|
|
|
this.allpage.currentPage = currentPage; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
allsizeChange (pageSize) { |
|
|
|
|
this.allpage.pageSize = pageSize; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
allonLoad(page){ |
|
|
|
|
let values ={} |
|
|
|
|
allgetList(page.currentPage, page.pageSize, values).then(res => { |
|
|
|
|
const data = res.data.data |
|
|
|
|
console.log("data>>>>>>>>>>>>>>>",data); |
|
|
|
|
this.allpage.total = data.total; |
|
|
|
|
this.alldata = data.records; |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
onLoad (page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
let ids = {}; |
|
|
|
@ -677,3 +972,8 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
<style> |
|
|
|
|
/*.el-cascader__dropdown .el-cascader-menu:first-child .el-cascader-node label{*/ |
|
|
|
|
/* display:none;*/ |
|
|
|
|
/*}*/ |
|
|
|
|
</style> |
|
|
|
|