优化供应商管理重置

This commit is contained in:
duan 2024-06-27 09:36:42 +08:00
parent 55e696a6a2
commit 3d4434dbbe
2 changed files with 20 additions and 23 deletions

View File

@ -25,17 +25,23 @@
<div class="head-container">
<el-table :data="tableData.list" v-loading="tableData.loading" row-key="id" lazy :load="load"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
<el-table-column width="30">
<template v-slot="scope">
<i class="" v-if="scope.row.hasChildren == false"></i>
<!-- <div v-if="scope.row.iskaiguans == 1" style="padding-left: 20px;"></div> -->
</template>
</el-table-column>
<el-table-column label="商品信息" width="200px">
<template v-slot="scope">
<div class="shop_info">
<el-image :src="scope.row.img" class="cover">
<el-image :src="scope.row.img" class="cover" v-if="scope.row.iskaiguans!=1">
<div class="img_error" slot="error">
<i class="icon el-icon-document-delete"></i>
</div>
</el-image>
<div class="info">
<span>{{ scope.row.name }}</span>
<div>
<div v-if="scope.row.iskaiguans!=1">
<el-tag type="primary">{{ scope.row.type }}</el-tag>
</div>
</div>
@ -43,8 +49,10 @@
</template>
</el-table-column>
<el-table-column label="规格" prop="number">
<template v-slot="scope">
{{ scope.row.specSnap }}
<template v-slot="scope" >
<div v-if="scope.row.iskaiguans ">
{{ scope.row.specSnap }}
</div>
</template>
</el-table-column>
<el-table-column label="库存" prop="number">
@ -131,26 +139,10 @@ export default {
const res = await stocks({
productId: tree.proId,
})
let arr = res.map(ele => ele)
console.log(res, '调试1')
console.log(arr, '调试2')
res.forEach(ele => ele.iskaiguans = 1)
setTimeout(() => {
resolve(arr)
}, 1000);
// resolve([
// {
// id: 31,
// date: '2016-05-01',
// name: '',
// address: ' 1519 '
// }, {
// id: 32,
// date: '2016-05-01',
// name: '',
// address: ' 1519 '
// }
// ])
resolve(res)
}, 50);
},
async excelSuccessUpload(file) {
console.log(file);
@ -204,6 +196,9 @@ export default {
shopId: localStorage.getItem('shopId')
})
this.tableData.list = []
this.getTableData()
},
//
async showChangess(e, row) {
@ -309,5 +304,6 @@ export default {
.cell {
display: flex;
align-items: center;
/* flex-direction: row-reverse; */
}
</style>

View File

@ -135,6 +135,7 @@ export default {
//
resetHandle() {
this.query.name = ''
this.query.type=''
this.tableData.page = 0;
this.getTableData()
},