|
@@ -62,26 +62,36 @@
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <!-- <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" height="40vh" fixedName="operation">
|
|
|
|
|
|
|
+ <tableList ref="table" height="600px" style="margin-top: 10px" :layout="tablecols" :data="list" :opwidth="200" :custom="true"
|
|
|
|
|
+ >
|
|
|
<template v-slot:customcol="scope">
|
|
<template v-slot:customcol="scope">
|
|
|
- <span v-if="scope.column.data[scope.column.columnname]">{{scope.column.data[scope.column.columnname]}}</span>
|
|
|
|
|
- <span v-else-if="scope.column.columnname === 'itemclassname'">
|
|
|
|
|
- <span v-show="item.itemclassname" v-for="item in scope.column.data.itemclass" :key="item.index">{{item.itemclassname}},</span>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else-if="scope.column.columnname != 'operation'">--</span>
|
|
|
|
|
|
|
+ <div v-if="scope.column.columnname === 'itemclass'">
|
|
|
|
|
+ <span v-for="(item,index) in scope.column.data[scope.column.columnname]">
|
|
|
|
|
+ <span v-if="index === scope.column.data[scope.column.columnname].length -1">
|
|
|
|
|
+ {{item.itemclassname}}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span v-else>
|
|
|
|
|
+ {{item.itemclassname + ','}}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else-if="scope.column.columnname === 'isonsale'">
|
|
|
|
|
+ <span>{{scope.column.data[scope.column.columnname] === 1?'上架':'下架'}}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else-if="scope.column.columnname === 'marketprice'">
|
|
|
|
|
+ <span>{{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:opreation="scope">
|
|
<template v-slot:opreation="scope">
|
|
|
- <div >
|
|
|
|
|
- <Del type="detail" v-if="tool.checkAuth($route.name,'delete')" :id="rowData.sa_itemgroupid" @deleteSuccess="getDetail" :detailId="scope.data.sa_itemgroupmxid"/>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
|
+ title="确定删除吗?"
|
|
|
|
|
+ @confirm="deleteProduct(scope.data)">
|
|
|
|
|
+ <el-button slot="reference" type="text" size="mini">删 除</el-button>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
</template>
|
|
</template>
|
|
|
- </tableLayout> -->
|
|
|
|
|
-
|
|
|
|
|
- <Table type="edit" :data="list" @deleteProduct="deleteProduct"></Table>
|
|
|
|
|
|
|
+ </tableList>
|
|
|
|
|
+<!-- <Table type="edit" :data="list" @deleteProduct="deleteProduct"></Table>-->
|
|
|
<el-pagination
|
|
<el-pagination
|
|
|
background
|
|
background
|
|
|
small
|
|
small
|
|
@@ -96,6 +106,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import tableList from '@/components/table/index5';
|
|
|
import AddBtn from './addGroupDetailBtn'
|
|
import AddBtn from './addGroupDetailBtn'
|
|
|
import editBtn from './editGroupDetailBtn'
|
|
import editBtn from './editGroupDetailBtn'
|
|
|
import Table from './table.vue'
|
|
import Table from './table.vue'
|
|
@@ -121,6 +132,7 @@ export default {
|
|
|
"id": "20220923101603",
|
|
"id": "20220923101603",
|
|
|
"content": {
|
|
"content": {
|
|
|
"sa_itemgroupid":this.$route.query.id,
|
|
"sa_itemgroupid":this.$route.query.id,
|
|
|
|
|
+ "nocache":true,
|
|
|
"pageNumber":1,
|
|
"pageNumber":1,
|
|
|
"pageSize":20,
|
|
"pageSize":20,
|
|
|
where:{
|
|
where:{
|
|
@@ -148,7 +160,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
props:['rowData','disabled'],
|
|
props:['rowData','disabled'],
|
|
|
- components:{AddBtn,Del,Table,addProduct,uploadAllData},
|
|
|
|
|
|
|
+ components:{AddBtn,Del,Table,addProduct,uploadAllData,tableList},
|
|
|
|
|
|
|
|
watch: {
|
|
watch: {
|
|
|
},
|
|
},
|
|
@@ -159,6 +171,7 @@ export default {
|
|
|
this.tablecolsAdd = this.tool.tabelCol(this.$route.name).addProduct.tablecols
|
|
this.tablecolsAdd = this.tool.tabelCol(this.$route.name).addProduct.tablecols
|
|
|
const res = await this.$store.dispatch('optiontypeselect','itemmaterial')
|
|
const res = await this.$store.dispatch('optiontypeselect','itemmaterial')
|
|
|
this.materials = res.data
|
|
this.materials = res.data
|
|
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).productGroupDetailTable.tablecols
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
async getDetail() {
|
|
async getDetail() {
|
|
@@ -183,6 +196,7 @@ export default {
|
|
|
this.getDetail()
|
|
this.getDetail()
|
|
|
},
|
|
},
|
|
|
async deleteProduct (row) {
|
|
async deleteProduct (row) {
|
|
|
|
|
+ console.log(row)
|
|
|
const res = await this.$api.requested({
|
|
const res = await this.$api.requested({
|
|
|
"id": "20220923105103",
|
|
"id": "20220923105103",
|
|
|
"content": {
|
|
"content": {
|