parent
256cfd98aa
commit
ca66bf918c
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div class="table-tree">
|
||||
<el-table v-if="tableItem && tableItem.length>0" :data="list" :height="tableHeight" class="v-table" style="width: 100%;margin-bottom: 20px;" row-key="id" border default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}" :fit="true">
|
||||
<el-table-column type="index" align="center" fixed="left"></el-table-column>
|
||||
|
||||
<template v-for="(item,index) in tableItem">
|
||||
<el-table-column v-if="item.customFn" :min-width="item.width?item.width:''" header-align="center" :label="item.label" :prop="item.prop" :sortable="item.sortable?item.sortable:true">
|
||||
<template slot-scope="scope">
|
||||
<div v-html="item.customFn(scope.row)"></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-else-if="item.multiHd" header-align="center" :label="item.label">
|
||||
<template v-for="(item1,index1) in item.multiHd">
|
||||
<el-table-column v-if="item1.customFn" header-align="center" :label="item1.label" :min-width="item1.width?item1.width:''" :sortable="item1.sortable?item1.sortable:true">
|
||||
<template slot-scope="scope">
|
||||
<div v-html="item1.customFn(scope.row)"></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-else header-align="center" :prop="`${item.Fprop?item.Fprop+'.' : ''}${item1.prop}`" :label="item1.label" :min-width="item1.width?item1.width:''" :sortable="item1.sortable?item1.sortable:true">
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-else :formatter="item.formatter" :min-width="item.width?item.width:''" header-align="center" align="center" :label="item.label" :prop="item.prop" :sortable="item.sortable?item.sortable:true"></el-table-column>
|
||||
</template>
|
||||
|
||||
<slot name="btns">
|
||||
<el-table-column fixed="right" label="操作" width="190" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<Button type="error" size="small" style="margin-left: 10px;" ghost @click="$emit('delClick',scope.row)">删除</Button>
|
||||
<Button type="primary" size="small" style="margin-left: 10px;" ghost @click="$emit('editorClick',scope.row)">编辑</Button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</slot>
|
||||
</el-table>
|
||||
|
||||
<el-table v-else :height="tableHeight">
|
||||
|
||||
</el-table>
|
||||
|
||||
<el-backtop target=".el-table__body-wrapper" :visibility-height="130" :bottom="68" :right="48"></el-backtop>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
list:{
|
||||
type:Array,
|
||||
default:()=> []
|
||||
},
|
||||
tableItem:{
|
||||
type:Array,
|
||||
default:()=> []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initLoad() {
|
||||
var that = this;
|
||||
var clientHeight = document.documentElement.clientHeight
|
||||
var lxHeader_height = 96.5; //查询 头部
|
||||
var paginationHeight = 37; //分页的高度
|
||||
var topHeight = 50; //页面 头部
|
||||
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
||||
that.tableHeight = tableHeight;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initLoad()
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div style="padding: 0 20px">
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" text="活动列表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<slot>
|
||||
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
||||
<Button icon="ios-add" type="primary" style="margin-right: 10px;">添加</Button>
|
||||
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
|
||||
<my-table :table-item="table"></my-table>
|
||||
|
||||
<div style="display: flex;justify-content: flex-end;">
|
||||
<Page :total="5" show-elevator />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
table:[
|
||||
{
|
||||
label:"活动名称",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
label:"活动发布方",
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
label:"主办方",
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
label:"主办方logo",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
label:"主办方宣传语",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
label:"活动海报",
|
||||
width: 240
|
||||
},
|
||||
{
|
||||
label:"活动开始日期",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
label:"开始时间",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
label:"活动地址",
|
||||
width: 220
|
||||
},
|
||||
{
|
||||
label:"金额",
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
label:"开放名额",
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
label:"剩余名额",
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
label:"报名次数",
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
label:"状态"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<div>
|
||||
<Modal draggable title="新建商家" :value.sync="isShow" @on-visible-change="$emit('update:isShow',$event)">
|
||||
<Form ref="form" :model="form" :rules="rules" label-position="left" :label-width="80">
|
||||
<FormItem prop="name" label="姓名">
|
||||
<Row>
|
||||
<Col span="18" offset="1">
|
||||
<Input v-model="form.name" placeholder="请输入姓名"/>
|
||||
</Col>
|
||||
</Row>
|
||||
</FormItem>
|
||||
<FormItem prop="businessNumber" label="营业执照">
|
||||
<Row>
|
||||
<Col span="18" offset="1">
|
||||
<Input v-model="form.businessNumber" placeholder="请输入营业执照"/>
|
||||
</Col>
|
||||
</Row>
|
||||
</FormItem>
|
||||
<FormItem prop="address" label="地址">
|
||||
<Row>
|
||||
<Col span="18" offset="1">
|
||||
<Input v-model="form.address" placeholder="请输入地址"/>
|
||||
</Col>
|
||||
</Row>
|
||||
</FormItem>
|
||||
<FormItem label="位置">
|
||||
<Row>
|
||||
<Col span="8" offset="1">
|
||||
<FormItem>
|
||||
<Input v-model="form.lat"/>
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col offset="1" span="1">
|
||||
<div style="font-weight: 500;font-size: 20px;">/</div>
|
||||
</Col>
|
||||
<Col span="8" offset="0">
|
||||
<FormItem>
|
||||
<Input v-model="form.lng"/>
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
</FormItem>
|
||||
<Divider></Divider>
|
||||
<FormItem prop="password" label="密码">
|
||||
<Row>
|
||||
<Col span="18" offset="1">
|
||||
<Input v-model="form.password" placeholder="请输入密码"/>
|
||||
</Col>
|
||||
</Row>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
isShow:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form:{
|
||||
name:"",
|
||||
businessNumber:"",
|
||||
address:"",
|
||||
password:"",
|
||||
lat:"",
|
||||
lng:"",
|
||||
},
|
||||
rules:{
|
||||
name: [
|
||||
{ required: true, message: '请填写姓名', trigger: 'blur' }
|
||||
],
|
||||
businessNumber: [
|
||||
{ required: true, message: '请填写营业执照', trigger: 'blur' }
|
||||
],
|
||||
address: [
|
||||
{ required: true, message: '请填写地址', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<div>
|
||||
<Modal title="产品组合" :value.sync="isShow" @on-visible-change="$emit('update:isShow',$event)" @on-cancel="reset">
|
||||
<Form :model="form" ref="form">
|
||||
<FormItem
|
||||
prop="products"
|
||||
v-for="(item, index) in form.products"
|
||||
:key="index"
|
||||
:label="'产品'+item.index">
|
||||
<Row>
|
||||
<Col span="7" offset="1">
|
||||
<Select type="text" v-model="item.value" placeholder="选择产品"></Select>
|
||||
</Col>
|
||||
<Col span="5" offset="1">
|
||||
<InputNumber :max="10" :min="1" v-model="item.num"></InputNumber>
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<Input type="text" v-model="item.value" placeholder="单位"></Input>
|
||||
</Col>
|
||||
<Col span="4" offset="1">
|
||||
<Button icon="md-remove" type="primary" @click="removeProduct(item.index)">移除</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
</FormItem>
|
||||
<FormItem style="display: flex;justify-content: center;">
|
||||
<Button style="width: 200px;" type="dashed" @click="addProduct" icon="md-add">新增</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
isShow:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
productIndex:1,
|
||||
form:{
|
||||
products:[
|
||||
{
|
||||
value:"",
|
||||
num:0,
|
||||
index:1
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
removeProduct(index){
|
||||
this.form.products.map((item,index1)=>{
|
||||
if(index == item.index){
|
||||
this.form.products.splice(index1,1)
|
||||
}
|
||||
})
|
||||
},
|
||||
addProduct(){
|
||||
this.form.products.push({
|
||||
value:"",
|
||||
index:++this.productIndex,
|
||||
num:0
|
||||
})
|
||||
},
|
||||
reset(){
|
||||
this.form = {
|
||||
products:[
|
||||
{
|
||||
value:"",
|
||||
num:0,
|
||||
index:1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div style="padding: 0 20px">
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" text="产品与服务管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<Input style="width: 200px; margin-right: 10px" placeholder="关键字搜索" />
|
||||
<Button type="primary">查询</Button>
|
||||
<Button type="primary" style="margin-left: 10px">新增</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
|
||||
<my-table :list="list" :table-item="table"></my-table>
|
||||
|
||||
<div style="display: flex;justify-content: flex-end;">
|
||||
<Page :total="5" show-elevator />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list:JSON.parse('{"total":1,"rows":[{"id":1,"name":"\u7cfb\u7edf\u9ed8\u8ba4\u89c4\u5219","default":1,"created_at":"2021-12-05T12:53:30.000000Z","updated_at":"2021-12-05T12:53:30.000000Z","deleted_at":null,"items_count":6,"items":[{"id":24,"policy_id":1,"timer":"48.0","operations":"auto_fee,auto_recover","fee_ratio":"50.00","created_at":"2022-06-26T10:44:40.000000Z","updated_at":"2022-06-26T10:44:40.000000Z","deleted_at":null,"action":"assign"},{"id":25,"policy_id":1,"timer":null,"operations":"auto_fee","fee_ratio":"100.00","created_at":"2022-06-26T10:44:40.000000Z","updated_at":"2022-06-26T10:44:40.000000Z","deleted_at":null,"action":"accept_by_merchant"},{"id":26,"policy_id":1,"timer":null,"operations":"manually_refund_fee","fee_ratio":"100.00","created_at":"2022-06-26T10:44:40.000000Z","updated_at":"2022-06-26T10:44:40.000000Z","deleted_at":null,"action":"recover"},{"id":27,"policy_id":1,"timer":null,"operations":"manually_refund_fee","fee_ratio":"100.00","created_at":"2022-06-26T10:44:40.000000Z","updated_at":"2022-06-26T10:44:40.000000Z","deleted_at":null,"action":"confirm_member_cancel"},{"id":28,"policy_id":1,"timer":null,"operations":"manually_refund_fee","fee_ratio":"100.00","created_at":"2022-06-26T10:44:40.000000Z","updated_at":"2022-06-26T10:44:40.000000Z","deleted_at":null,"action":"confirm_merchant_cancel"},{"id":29,"policy_id":1,"timer":"72.0","operations":"auto_finish","fee_ratio":"0.00","created_at":"2022-06-26T10:44:40.000000Z","updated_at":"2022-06-26T10:44:40.000000Z","deleted_at":null,"action":"accept_by_merchant"}]}]}').rows,
|
||||
table:[
|
||||
{
|
||||
prop:"name",
|
||||
label:"名称",
|
||||
width: 230
|
||||
},
|
||||
{
|
||||
prop:"items_count",
|
||||
label:"政策内容",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "default",
|
||||
label:"是否全局默认",
|
||||
width:130,
|
||||
formatter:(row,data,value)=>{
|
||||
if(value){
|
||||
return '是'
|
||||
}else{
|
||||
return '否'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label:"绑定产品数",
|
||||
width: 130,
|
||||
formatter:(row)=>{
|
||||
return row.items.length
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue