Browse Source

修复库位显示

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

Loading…
Cancel
Save