|
@@ -6,7 +6,7 @@
|
|
|
class="liu-tabs"
|
|
class="liu-tabs"
|
|
|
type="border-card"
|
|
type="border-card"
|
|
|
v-model="tabIndex"
|
|
v-model="tabIndex"
|
|
|
- @tab-click="handleClick"
|
|
|
|
|
|
|
+ @tab-click="tabClick"
|
|
|
>
|
|
>
|
|
|
<el-tab-pane
|
|
<el-tab-pane
|
|
|
v-for="(item, index) in tabsData"
|
|
v-for="(item, index) in tabsData"
|
|
@@ -65,9 +65,6 @@
|
|
|
<template #slot-add-goods-btn="{scope}">
|
|
<template #slot-add-goods-btn="{scope}">
|
|
|
<el-button type="primary" size="mini" @click="add()">添加</el-button>
|
|
<el-button type="primary" size="mini" @click="add()">添加</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
- <template #slot-modify="{scope}">
|
|
|
|
|
- <el-button type="text" @click="modify(scope.row)">修改</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
</x-crud>
|
|
</x-crud>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -81,32 +78,41 @@ export default {
|
|
|
app: null,
|
|
app: null,
|
|
|
sortLink: '',
|
|
sortLink: '',
|
|
|
operateData: {},
|
|
operateData: {},
|
|
|
- tabIndex: '-1',
|
|
|
|
|
|
|
+ tabIndex: '0',
|
|
|
tabsData: [
|
|
tabsData: [
|
|
|
{
|
|
{
|
|
|
- text: '全部',
|
|
|
|
|
- key: '-1'
|
|
|
|
|
|
|
+ text: '列表',
|
|
|
|
|
+ key: '0'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
selects: {},
|
|
selects: {},
|
|
|
sort: {
|
|
sort: {
|
|
|
status: false
|
|
status: false
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ classId:0
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
- console.log(88888888888888888888)
|
|
|
|
|
- console.log(this.$route.query)
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
- handleClick(tab, e) {
|
|
|
|
|
- this.app.refresh({ type: this.tabIndex });
|
|
|
|
|
|
|
+ tabClick(tab, e) {
|
|
|
|
|
+ this.app.refresh({ classId: this.classId });
|
|
|
},
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
onLoad({ ctx, app }) {
|
|
|
- this.app = app;
|
|
|
|
|
- ctx.service(this.$service.item)
|
|
|
|
|
|
|
+ this.app = app;
|
|
|
|
|
+ if (this.$route.query.classId) {
|
|
|
|
|
+ this.classId = this.$route.query.classId
|
|
|
|
|
+ if(this.$route.query.name != ''){
|
|
|
|
|
+ this.tabsData[0].text = this.$route.query.name
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ let getItem = () => {
|
|
|
|
|
+ return this.$service.item.list({classId:this.classId})
|
|
|
|
|
+ };
|
|
|
|
|
+ ctx.service({
|
|
|
|
|
+ page: getItem
|
|
|
|
|
+ })
|
|
|
.set('table', {
|
|
.set('table', {
|
|
|
columns: [
|
|
columns: [
|
|
|
{
|
|
{
|
|
@@ -134,7 +140,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'addPrice',
|
|
prop: 'addPrice',
|
|
|
- label: '单位加价',
|
|
|
|
|
|
|
+ label: '加价',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
'min-width': 100
|
|
'min-width': 100
|
|
|
},
|
|
},
|
|
@@ -159,7 +165,7 @@ export default {
|
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
|
label: '操作'
|
|
label: '操作'
|
|
|
},
|
|
},
|
|
|
- layout: ['slot-modify','delete',]
|
|
|
|
|
|
|
+ layout: ['delete',]
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.set('dict', {
|
|
.set('dict', {
|
|
@@ -184,7 +190,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
})
|
|
})
|
|
|
.done();
|
|
.done();
|
|
|
- app.refresh({ status: this.tabIndex });
|
|
|
|
|
|
|
+ app.refresh({ classId: this.classId });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
refresh(params) {
|
|
refresh(params) {
|
|
@@ -237,4 +243,4 @@ export default {
|
|
|
padding: 2px 5px;
|
|
padding: 2px 5px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|