Browse Source

修复库位显示

dev-xx
qb 6 months ago
parent
commit
7c7253b4a9
  1. 87
      src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue

87
src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue

@ -1,6 +1,6 @@
<template> <template>
<basic-container> <basic-container>
<div class="avue-crud"> <div class="avue-crud" v-loading="loadingObj.pageLoading">
<div v-h5uShow="!search"> <div v-h5uShow="!search">
<!-- 查询模块 --> <!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search" style="width: 100%"> <el-form :inline="true" :model="query" class="header_search" style="width: 100%">
@ -172,13 +172,13 @@
style="width: 88%" style="width: 88%"
/> --> /> -->
<el-input <el-input
v-model.trim="form.goodsShelfName" v-model.trim="form.goodsShelfName"
style="width: 100%" style="width: 100%"
placeholder="请输入货架名称" placeholder="请输入货架名称"
@input="headlineinput" @input="headlineinput"
> >
<template #append></template> <template #append></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="allocation"> <el-col :span="12" v-if="allocation">
@ -346,8 +346,7 @@
width="600px" width="600px"
v-model="dialogVisible" v-model="dialogVisible"
> >
<div class="el_ewm" v-loading="ewmloading" <div class="el_ewm" v-loading="ewmloading" element-loading-text="二维码加载中...">
element-loading-text="二维码加载中...">
<!-- <div v-for="(item,index) in qrCodeObj" class="pdf-dom">--> <!-- <div v-for="(item,index) in qrCodeObj" class="pdf-dom">-->
<!-- <el-divider></el-divider>--> <!-- <el-divider></el-divider>-->
@ -374,7 +373,7 @@
:option="alloption" :option="alloption"
v-model:page="allpage" v-model:page="allpage"
v-model="allform" v-model="allform"
:table-loading="loading" :table-loading="loadingObj.allocation"
:data="alldata" :data="alldata"
ref="crud" ref="crud"
@selection-change="allselectionChange" @selection-change="allselectionChange"
@ -388,11 +387,7 @@
</el-button> </el-button>
</template> </template>
<template #menu="{ size, row, index }"> <template #menu="{ size, row, index }">
<el-button <el-button type="primary" text icon="el-icon-view" @click="viewhandleqr(row)"
type="primary"
text
icon="el-icon-view"
@click="viewhandleqr(row)"
>查看二维码</el-button >查看二维码</el-button
> >
<el-button <el-button
@ -471,7 +466,7 @@ export default {
goodsAreaId: null, goodsAreaId: null,
}, },
form2: {}, form2: {},
ewmloading:true, ewmloading: true,
box2: false, box2: false,
form3: {}, form3: {},
box3: false, box3: false,
@ -885,9 +880,7 @@ export default {
templateData: [], templateData: [],
validatorRules: { validatorRules: {
goodsAreaId: [{ required: true, message: '请选择货区!', trigger: 'change' }], goodsAreaId: [{ required: true, message: '请选择货区!', trigger: 'change' }],
goodsShelfName: [ goodsShelfName: [{ required: true, message: '请填写货架名称!', trigger: 'blur' }],
{ required: true, message: '请填写货架名称!', trigger: 'blur' }
],
// goodsShelfStatus: [ // goodsShelfStatus: [
// { required: true, message: '!', trigger: 'change' } // { required: true, message: '!', trigger: 'change' }
// ], // ],
@ -897,6 +890,12 @@ export default {
}, },
// //
idShowStatus: false, idShowStatus: false,
loadingObj: {
/** 页面loading */
pageLoading: false,
/** 库位loading */
allocation: false,
},
}; };
}, },
created() { created() {
@ -1009,7 +1008,7 @@ export default {
return; return;
} }
this.ewmloading=true; this.ewmloading = true;
let checkcode = []; let checkcode = [];
this.allselectionList.map(item => { this.allselectionList.map(item => {
checkcode.push(item.id); checkcode.push(item.id);
@ -1025,22 +1024,22 @@ export default {
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml); this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
}); });
this.dialogVisible = true; this.dialogVisible = true;
this.ewmloading=false; this.ewmloading = false;
}, },
viewhandleqr(row){ viewhandleqr(row) {
console.log(row); console.log(row);
let ids = row.id; let ids = row.id;
this.html = ''; this.html = '';
this.ewmloading=true; this.ewmloading = true;
getPrintTemplate({ ids }).then(res => { getPrintTemplate({ ids }).then(res => {
// this.orderPackageCode = res.data // this.orderPackageCode = res.data
console.log(res.data); console.log(res.data);
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml); this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
}); });
this.dialogVisible = true; this.dialogVisible = true;
this.ewmloading=false; this.ewmloading = false;
}, },
// childrenundefined // childrenundefined
formatCascaderData(data) { formatCascaderData(data) {
@ -1183,7 +1182,7 @@ export default {
// this.form.goodsAreaName = item.headline // this.form.goodsAreaName = item.headline
// } // }
// }) // })
this.form.goodsShelfName=this.form.goodsShelfName+'排' this.form.goodsShelfName = this.form.goodsShelfName + '排';
add(this.form).then(() => { add(this.form).then(() => {
this.box = false; this.box = false;
this.onLoad(this.page); this.onLoad(this.page);
@ -1193,7 +1192,7 @@ export default {
}); });
}); });
} else { } else {
this.form.goodsShelfName=this.form.goodsShelfName+'排' this.form.goodsShelfName = this.form.goodsShelfName + '排';
update(this.form).then(() => { update(this.form).then(() => {
this.box = false; this.box = false;
this.onLoad(this.page); this.onLoad(this.page);
@ -1230,7 +1229,7 @@ export default {
this.idShowStatus = true; this.idShowStatus = true;
getDetail(row.id).then(res => { getDetail(row.id).then(res => {
this.form = res.data.data; this.form = res.data.data;
this.headlineinput(this.form.goodsShelfName) this.headlineinput(this.form.goodsShelfName);
console.log('>>>>>>>>>>', this.form); console.log('>>>>>>>>>>', this.form);
//TODO //TODO
}); });
@ -1261,7 +1260,7 @@ export default {
}); });
}); });
}, },
headlineinput(data){ headlineinput(data) {
if (data.includes('排')) { if (data.includes('排')) {
this.form.goodsShelfName = data.replace('排', ''); this.form.goodsShelfName = data.replace('排', '');
} }
@ -1461,19 +1460,29 @@ export default {
}, },
allsizeChange(pageSize) { allsizeChange(pageSize) {
this.allpage.pageSize = pageSize; this.allpage.pageSize = pageSize;
this.onLoad(this.page); this.allonLoad(this.allpage);
}, },
allonLoad(page) { async allonLoad(page) {
let values = { try {
goodsShelfId: this.goodsShelfId, this.loadingObj.allocation = true;
};
allgetList(page.currentPage, page.pageSize, values).then(res => { let values = {
goodsShelfId: this.goodsShelfId,
};
const res = await allgetList({
currentPage: page.currentPage,
size: page.pageSize,
...values,
});
const data = res.data.data; const data = res.data.data;
console.log('data>>>>>>>>>>>>>>>', data); console.log('data>>>>>>>>>>>>>>>', data);
this.allpage.total = data.total; this.allpage.total = data.total;
this.alldata = data.records; this.alldata = data.records;
this.loading = false; } catch (error) {
}); console.log('error :>> ', error);
} finally {
this.loadingObj.allocation = false;
}
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
@ -1536,7 +1545,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.el_ewm{ .el_ewm {
min-height: 300px; min-height: 300px;
} }
</style> </style>

Loading…
Cancel
Save