优化供应商管理重置
This commit is contained in:
@@ -25,17 +25,23 @@
|
|||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-table :data="tableData.list" v-loading="tableData.loading" row-key="id" lazy :load="load"
|
<el-table :data="tableData.list" v-loading="tableData.loading" row-key="id" lazy :load="load"
|
||||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
|
: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">
|
<el-table-column label="商品信息" width="200px">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div class="shop_info">
|
<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">
|
<div class="img_error" slot="error">
|
||||||
<i class="icon el-icon-document-delete"></i>
|
<i class="icon el-icon-document-delete"></i>
|
||||||
</div>
|
</div>
|
||||||
</el-image>
|
</el-image>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span>{{ scope.row.name }}</span>
|
<span>{{ scope.row.name }}</span>
|
||||||
<div>
|
<div v-if="scope.row.iskaiguans!=1">
|
||||||
<el-tag type="primary">{{ scope.row.type }}</el-tag>
|
<el-tag type="primary">{{ scope.row.type }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,8 +49,10 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="规格" prop="number">
|
<el-table-column label="规格" prop="number">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope" >
|
||||||
|
<div v-if="scope.row.iskaiguans ">
|
||||||
{{ scope.row.specSnap }}
|
{{ scope.row.specSnap }}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存" prop="number">
|
<el-table-column label="库存" prop="number">
|
||||||
@@ -131,26 +139,10 @@ export default {
|
|||||||
const res = await stocks({
|
const res = await stocks({
|
||||||
productId: tree.proId,
|
productId: tree.proId,
|
||||||
})
|
})
|
||||||
let arr = res.map(ele => ele)
|
res.forEach(ele => ele.iskaiguans = 1)
|
||||||
console.log(res, '调试1')
|
|
||||||
console.log(arr, '调试2')
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
resolve(arr)
|
resolve(res)
|
||||||
}, 1000);
|
}, 50);
|
||||||
// resolve([
|
|
||||||
// {
|
|
||||||
// id: 31,
|
|
||||||
// date: '2016-05-01',
|
|
||||||
// name: '王小虎',
|
|
||||||
// address: '上海市普陀区金沙江路 1519 弄'
|
|
||||||
// }, {
|
|
||||||
// id: 32,
|
|
||||||
// date: '2016-05-01',
|
|
||||||
// name: '王小虎',
|
|
||||||
// address: '上海市普陀区金沙江路 1519 弄'
|
|
||||||
// }
|
|
||||||
// ])
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async excelSuccessUpload(file) {
|
async excelSuccessUpload(file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
@@ -204,6 +196,9 @@ export default {
|
|||||||
shopId: localStorage.getItem('shopId')
|
shopId: localStorage.getItem('shopId')
|
||||||
|
|
||||||
})
|
})
|
||||||
|
this.tableData.list = []
|
||||||
|
this.getTableData()
|
||||||
|
|
||||||
},
|
},
|
||||||
// 售罄
|
// 售罄
|
||||||
async showChangess(e, row) {
|
async showChangess(e, row) {
|
||||||
@@ -309,5 +304,6 @@ export default {
|
|||||||
.cell {
|
.cell {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
/* flex-direction: row-reverse; */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -135,6 +135,7 @@ export default {
|
|||||||
// 重置查询
|
// 重置查询
|
||||||
resetHandle() {
|
resetHandle() {
|
||||||
this.query.name = ''
|
this.query.name = ''
|
||||||
|
this.query.type=''
|
||||||
this.tableData.page = 0;
|
this.tableData.page = 0;
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user