Commit bcce9ae1 by 前端

Merge branch 'v2.9.0' into 'develop'

视觉改版第三期改版合并

See merge request !8
2 parents f836dfa0 6260c0e2
This diff could not be displayed because it is too large.
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"el-tree-transfer": "^2.4.7", "el-tree-transfer": "^2.4.7",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"glsx-common": "^1.4.9", "glsx-common": "^1.4.9",
"glsx-components": "^1.3.7", "glsx-components": "^1.5.2",
"glsx-vue-components": "^1.0.15", "glsx-vue-components": "^1.0.15",
"jquery": "^3.6.0", "jquery": "^3.6.0",
"vue": "^2.6.14", "vue": "^2.6.14",
......
import { http } from '@/main' import { http,new_http } from '@/main'
/**获取财务管理列表*/ /**获取财务管理列表*/
const getBalanceList = params => { const getBalanceList = params => {
params.method = 'scrm.api.equity.order.balance.list.get' params.method = 'scrm.api.equity.order.balance.list.get'
...@@ -177,6 +177,15 @@ const exportGasList = params => { ...@@ -177,6 +177,15 @@ const exportGasList = params => {
returnAll: true returnAll: true
}) })
} }
/** 生成短链 */
const createShortLink = params => {
params.method = 'scrm.api.wechat.miniprogram.geturllink'
return new_http({
url:'rop-scrm-wechat/router',
data: params,
returnAll: true
})
}
export default { export default {
getBalanceList, getBalanceList,
getOrderList, getOrderList,
...@@ -200,5 +209,6 @@ export default { ...@@ -200,5 +209,6 @@ export default {
exportBalanceList, exportBalanceList,
getAllBrandList, getAllBrandList,
exportOrderList, exportOrderList,
exportGasList exportGasList,
createShortLink
} }
.equity-wrap .contain { .equity-wrap .contain {
background: #FFFFFF; background: #FFFFFF;
margin: 0 0 20px 0; // margin: 0 0 20px 0;
padding: 20px; padding: 20px 15px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10); // box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
} }
.equity-wrap .contain .el-table__empty-text{ .equity-wrap .contain .el-table__empty-text{
display: inline-block; display: inline-block;
...@@ -128,7 +128,60 @@ ...@@ -128,7 +128,60 @@
margin: 0 0 30px 0; margin: 0 0 30px 0;
padding-left: 8px; padding-left: 8px;
} }
.find_wrap{
background: #ffffff;
padding: 20px 15px;
// padding: 20px 20px 0px 20px;
}
.tableTopButton {
display: flex;
align-items: center;
justify-content: flex-end;
margin-bottom: 10px;
margin-right: 2px;
}
.pannel{
padding: 0 15px;
}
.table_wrap {
padding: 0 15px;
padding-bottom: 10px;
}
.gl-form-page .form .el-input-number {
width: 136px;
.el-input {
width: 100%;
}
}
.flex_sc{
display: flex;
align-items: center;
}
.flex_cc{
display: flex;
align-items: center;
justify-content: center;
}
.flex_scb{
display: flex;
align-items: center;
justify-content: space-between;
}
.table_point{
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.loadingClass{
.el-icon-loading{
font-size: 22px;
}
.el-icon-loading,
.el-loading-text{
color: #fff!important;
}
}
// .equity-wrap table { // .equity-wrap table {
// width: 98%; // width: 98%;
// color: #666666; // color: #666666;
......
...@@ -81,8 +81,8 @@ img { ...@@ -81,8 +81,8 @@ img {
.layout .box { .layout .box {
background-color: #fff; background-color: #fff;
margin: 20px 0; margin: 20px 0;
-webkit-box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1); /* -webkit-box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1); */
padding: 20px; padding: 20px;
margin: 0; margin: 0;
padding: 16px 20px 14px 20px; padding: 16px 20px 14px 20px;
...@@ -92,8 +92,8 @@ img { ...@@ -92,8 +92,8 @@ img {
vertical-align: baseline; vertical-align: baseline;
background: transparent; background: transparent;
background: #fff; background: #fff;
-webkit-box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); /* -webkit-box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); */
} }
.layout .box .title { .layout .box .title {
...@@ -232,7 +232,7 @@ img { ...@@ -232,7 +232,7 @@ img {
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
} }
.tableBox{ .tableBox{
padding: 20px 20px 10px 20px; padding: 20px 0px 10px 20px;
border: 0; border: 0;
outline: 0; outline: 0;
font-size: 100%; font-size: 100%;
...@@ -252,11 +252,11 @@ img { ...@@ -252,11 +252,11 @@ img {
.selectWidth{ .selectWidth{
width: 215px; width: 215px;
} }
.el-input--small .el-input__inner { /* .el-input--small .el-input__inner {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
width: 215px; width: 215px;
} } */
.el-range-editor.el-input__inner { .el-range-editor.el-input__inner {
display: -webkit-inline-box; display: -webkit-inline-box;
display: -ms-inline-flexbox; display: -ms-inline-flexbox;
...@@ -267,9 +267,7 @@ img { ...@@ -267,9 +267,7 @@ img {
padding: 3px 10px; padding: 3px 10px;
width: 215px; width: 215px;
} }
.el-button+.el-button {
margin-left: 20px;
}
.el-dialog__body { .el-dialog__body {
padding: 0px 20px; padding: 0px 20px;
color: #606266; color: #606266;
......
...@@ -56,7 +56,7 @@ img { ...@@ -56,7 +56,7 @@ img {
.box { .box {
background-color: #fff; background-color: #fff;
margin: 20px 0; margin: 20px 0;
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1); // box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
padding: 20px; padding: 20px;
.title { .title {
padding: 20px 0; padding: 20px 0;
......
<!-- 表格+分页 --> <!-- 表格+分页 -->
<template> <template>
<div class="d2-table"> <div class="d2-table">
<el-table <!-- <el-table
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'" :ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:data="getListApi ? data : tableData" :data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''" :row-key="tableParams.mutiSelectUniqueKey || ''"
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
</el-table> </el-table>
<template v-if="$slots.custom"> <template v-if="$slots.custom">
<slot name="custom"></slot> <slot name="custom"></slot>
</template> </template> -->
<!--
<el-pagination <el-pagination
v-if="hasPage" v-if="hasPage"
background background
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
:total="getListApi ? total : tableTotal" :total="getListApi ? total : tableTotal"
:layout="layout" :layout="layout"
> >
</el-pagination> </el-pagination> -->
</div> </div>
</template> </template>
...@@ -119,185 +119,185 @@ export default { ...@@ -119,185 +119,185 @@ export default {
data () { data () {
return { return {
loading: false, // loading: false,
data: [], // data: [],
// 页码 // // 页码
page: { // page: {
pageSize: 10, // pageSize: 10,
// pageNum: 1 // // pageNum: 1
currentPage: 1 // currentPage: 1
}, // },
total: 10, // total: 10,
// 排序 // // 排序
sortColum: '', // sortColum: '',
sort: '', // sort: '',
// 多选数组 // // 多选数组
mutiSelectArr: {} // mutiSelectArr: {}
}
},
props: {
// 搜索条件
searchForm: {
type: Object,
default: () => { }
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
tableTotal: {
type: Number,
default: 0
},
// 获取列表接口
getListApi: {
type: Function,
default: null
},
// 搜索前操作
beforeSearchFn: {
type: Function,
default: () => {
return new Promise((resolve, reject) => {
resolve()
})
} }
}, },
// 分页,默认有 // props: {
hasPage: { // // 搜索条件
type: Boolean, // searchForm: {
default: true // type: Object,
}, // default: () => { }
// 分页组件配置 // },
layout: { // // 表格数据-外部传入
type: String, // tableData: {
default: 'sizes,total,->,prev,pager,next,jumper' // type: Array,
}, // default: () => []
// 序号,默认有 // },
hasNum: { // tableTotal: {
type: Boolean, // type: Number,
default: true // default: 0
},
tableParams: {
type: Object,
default: () => {
return {
// 多选-判断来自哪个页面
// mutiSelectName: {
// type: String,
// default: ''
// }, // },
// 多选-唯一标识 // // 获取列表接口
// mutiSelectUniqueKey: { // getListApi: {
// type: Function,
// default: null
// },
// // 搜索前操作
// beforeSearchFn: {
// type: Function,
// default: () => {
// return new Promise((resolve, reject) => {
// resolve()
// })
// }
// },
// // 分页,默认有
// hasPage: {
// type: Boolean,
// default: true
// },
// // 分页组件配置
// layout: {
// type: String, // type: String,
// default: '' // default: 'sizes,total,->,prev,pager,next,jumper'
// },
// // 序号,默认有
// hasNum: {
// type: Boolean,
// default: true
// }, // },
// 搜索按钮id;new Date().getTime() + parseInt(Math.random() * 1000) // tableParams: {
// btnId: { // type: Object,
// default: () => {
// return {
// // 多选-判断来自哪个页面
// // mutiSelectName: {
// // type: String,
// // default: ''
// // },
// // 多选-唯一标识
// // mutiSelectUniqueKey: {
// // type: String,
// // default: ''
// // },
// // 搜索按钮id;new Date().getTime() + parseInt(Math.random() * 1000)
// // btnId: {
// // type: String,
// // default: ''
// // },
// // 后端返回列表参数名
// listName: {
// type: String, // type: String,
// default: '' // default: ''
// }, // },
// 后端返回列表参数名 // // 标签-默认标签名为tag;若有多个,那么需要在表格栏的列中加“tagName”
listName: { // // tag: {
type: String, // // type: Array,
default: '' // // default: () => []
}, // // },
// 标签-默认标签名为tag;若有多个,那么需要在表格栏的列中加“tagName” // // 表格操作,默认没有
// tag: { // // tableOption: {
// // type: Object,
// // default: null
// // },
// // 表格栏
// tableColumns: {
// type: Array, // type: Array,
// default: () => [] // default: () => []
// }
// }
// }
// }
// }, // },
// 表格操作,默认没有 // mounted () {
// tableOption: { // const btn = document.getElementById(this.tableParams.btnId)
// type: Object, // btn && btn.addEventListener('click', this.refreshEmit)
// default: null // this.getListApi && this.refreshTable()
// }, // },
// 表格栏
tableColumns: {
type: Array,
default: () => []
}
}
}
}
},
mounted () {
const btn = document.getElementById(this.tableParams.btnId)
btn && btn.addEventListener('click', this.refreshEmit)
this.getListApi && this.refreshTable()
},
methods: { // methods: {
// 排序 // // 排序
sortChange ({ column, prop, order }) { // sortChange ({ column, prop, order }) {
this.sortColum = order ? prop : '' // this.sortColum = order ? prop : ''
this.sort = order // this.sort = order
this.refreshTable() // this.refreshTable()
}, // },
// 多选 // // 多选
handleSelect (val) { // handleSelect (val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val // this.mutiSelectArr[this.tableParams.mutiSelectName] = val
}, // },
// 清空多选 // // 清空多选
clearMutiSelect () { // clearMutiSelect () {
this.mutiSelectArr[this.tableParams.mutiSelectName] = [] // this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection() // this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection()
}, // },
// 发布事件,以期查询条件改变后,页面图表需要刷新 // // 发布事件,以期查询条件改变后,页面图表需要刷新
refreshEmit () { // refreshEmit () {
this.$emit('searchChange') // this.$emit('searchChange')
this.refreshTable(true, true) // this.refreshTable(true, true)
}, // },
refreshTable (clearMuti = true, resetCurrentPage = false, callBack) { // refreshTable (clearMuti = true, resetCurrentPage = false, callBack) {
this.beforeSearchFn().then(res => { // this.beforeSearchFn().then(res => {
// console.log(res) // // console.log(res)
// 清空多选 // // 清空多选
clearMuti && this.clearMutiSelect() // clearMuti && this.clearMutiSelect()
this.loading = true // this.loading = true
resetCurrentPage && (this.page.currentPage = 1) // resetCurrentPage && (this.page.currentPage = 1)
var params = { // var params = {
pageNum: this.page.currentPage, // pageNum: this.page.currentPage,
pageStart: (this.page.currentPage - 1) * this.page.pageSize, // pageStart: (this.page.currentPage - 1) * this.page.pageSize,
...this.page, // ...this.page,
...this.searchForm // ...this.searchForm
} // }
if (this.sort) { // if (this.sort) {
params.sortColum = this.sortColum // params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0 // params.sort = this.sort === 'descending' ? 1 : 0
} // }
Object.keys(params).map(key => { // Object.keys(params).map(key => {
if (!params[key]) delete params[key] // if (!params[key]) delete params[key]
}) // })
// console.log(params) // // console.log(params)
this.getListApi(params).then(({ data }) => { // this.getListApi(params).then(({ data }) => {
this.data = data[this.tableParams.listName] // this.data = data[this.tableParams.listName]
this.total = data.total // this.total = data.total
this.loading = false // this.loading = false
if (callBack && typeof callBack == 'function') callBack() // if (callBack && typeof callBack == 'function') callBack()
}).catch(() => { // }).catch(() => {
this.loading = false // this.loading = false
}) // })
}).catch(() => { }) // }).catch(() => { })
}, // },
// 每页条数 // // 每页条数
handleSizeChange (value) { // handleSizeChange (value) {
this.page.pageSize = value // this.page.pageSize = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page) // this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
}, // },
// 页码 // // 页码
handleCurrentChange (value) { // handleCurrentChange (value) {
this.page.currentPage = value // this.page.currentPage = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page) // this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
} // }
} // }
} }
</script> </script>
......
<template> <template>
<div class="equity-dialog"> <div class="equity-dialog">
<el-dialog :title="type == 1 ? '添加汽车权益' : '添加商品权益'" v-if="show" :visible.sync="show" :show-close="true" :close-on-press-escape="false" :close-on-click-modal="false" width="712px" class="equityDialog" :before-close="closeListPoup"> <GLDialog mode="mid" :title="type == 1 ? '添加汽车权益' : '添加商品权益'" v-if="show" :visible.sync="show" :show-close="true" :close-on-press-escape="false" :close-on-click-modal="false" :before-close="closeListPoup">
<div class="form"> <div class="form gl-form-page gl-form-min">
<el-form class="equityForm" :model="form" :rules="rules" ref="ruleForm" label-position="right" label-width="auto"> <el-form class="equityForm" :model="form" :rules="rules" ref="ruleForm" label-width="154px">
<el-form-item v-if="type == 1" label="服务提供方" prop="supplier"> <el-form-item v-if="type == 1" label="服务提供方:" prop="supplier">
<el-select v-model="form.supplier" @change="changeSupplier" size="small"> <el-select v-model="form.supplier" @change="changeSupplier" size="small">
<el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<template v-if="type == 2"> <template v-if="type == 2">
<el-form-item label="产品提供方" prop="supplier"> <el-form-item label="产品提供方:" prop="supplier">
<el-select v-model="form.supplier" size="small"> <el-select v-model="form.supplier" size="small">
<el-option label="海威" value="HW"></el-option> <el-option label="海威" value="HW"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="选择品牌" prop="brandName"> <el-form-item label="选择品牌:" prop="brandName">
<el-select v-model="form.brandName" @change="changeBrandName" filterable size="small"> <el-select v-model="form.brandName" @change="changeBrandName" filterable size="small">
<el-option v-for="item in brandList" :key="item.brandName" :value="item.brandName" :label="item.brandName"></el-option> <el-option v-for="item in brandList" :key="item.brandName" :value="item.brandName" :label="item.brandName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品形态" prop="appearance" v-if="form.brandName"> <el-form-item label="商品形态:" prop="appearance" v-if="form.brandName">
<el-select v-model="form.appearance" size="small"> <el-select v-model="form.appearance" size="small">
<el-option v-for="item in appearanceList" :key="item.appearance" :value="item.label" :label="item.label"></el-option> <el-option v-for="item in appearanceList" :key="item.appearance" :value="item.label" :label="item.label"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
<div class="flex"> <el-form-item label="权益名称:" prop="equityName">
<el-form-item label="权益名称" prop="equityName">
<el-input size="small" v-model="form.equityName" :maxlength="type == 1 ? 8 : 6" placeholder="请输入权益名称"></el-input> <el-input size="small" v-model="form.equityName" :maxlength="type == 1 ? 8 : 6" placeholder="请输入权益名称"></el-input>
</el-form-item> </el-form-item>
</div> <el-form-item label="描述:" prop="equityDesc">
<div class="flex">
<el-form-item label="描述" prop="equityDesc">
<el-input size="small" v-model="form.equityDesc" :maxlength="type == 1 ? 8 : 6" placeholder="请输入"></el-input> <el-input size="small" v-model="form.equityDesc" :maxlength="type == 1 ? 8 : 6" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
</div>
<div> <div>
<el-form-item label="图标" required prop="equityIcon"> <el-form-item label="图标:" required prop="equityIcon">
<el-upload action="#" class="avatar-uploader" :show-file-list="false" :before-upload="upLoadImg" id="dialogIcon"> <el-upload action="#" class="avatar-uploader" :show-file-list="false" :before-upload="upLoadImg" id="dialogIcon">
<img v-if="form.equityIcon" :src="form.equityIcon" class="avatar" /> <img v-if="form.equityIcon" :src="form.equityIcon" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
...@@ -46,11 +42,11 @@ ...@@ -46,11 +42,11 @@
</div> </div>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer buttonBtn"> <div slot="footer" class="dialog-footer">
<el-button size="small" @click="close">取 消</el-button> <el-button size="small" @click="close">取 消</el-button>
<el-button size="small" type="primary" @click="submit(type)">确 定</el-button> <el-button size="small" type="primary" @click="submit(type)">确 定</el-button>
</div> </div>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -243,11 +239,7 @@ export default { ...@@ -243,11 +239,7 @@ export default {
.equity-dialog { .equity-dialog {
padding: 0; padding: 0;
} }
.flex {
display: flex;
align-items: center;
justify-content: space-between;
}
.avatar-uploader { .avatar-uploader {
box-sizing: border-box; box-sizing: border-box;
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
...@@ -271,26 +263,25 @@ export default { ...@@ -271,26 +263,25 @@ export default {
height: 80px; height: 80px;
display: block; display: block;
} }
.baseinformation { /* .baseinformation {
width: 100%; width: 100%;
height: 28px; height: 28px;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;
padding-bottom: 18px; padding-bottom: 18px;
} } */
.form { /* .form {
padding: 32px 20px 32px 116px; padding: 16px;
} } */
.equity-dialog .el-dialog__body { /* .equity-dialog .el-dialog__body {
padding: 0px 0px;
color: #606266; color: #606266;
font-size: 14px; font-size: 14px;
word-break: break-all; word-break: break-all;
} } */
.equityForm .el-input--small .el-input__inner { /* .equityForm .el-input--small .el-input__inner {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
width: 320px !important; width: 432px !important;
} } */
.suggestion { .suggestion {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
...@@ -307,20 +298,20 @@ export default { ...@@ -307,20 +298,20 @@ export default {
color: #333333; color: #333333;
line-height: 28px; line-height: 28px;
} }
.buttonBtn .el-button + .el-button { /* .buttonBtn .el-button + .el-button {
margin-left: 40px; margin-left: 40px;
} } */
.equityDialog .el-dialog__header { /* .equityDialog .el-dialog__header {
padding: 20px 20px 20px; padding: 20px 20px 20px;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;
font-size: 20px; font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
} } */
.equityDialog .el-dialog__footer { /* .equityDialog .el-dialog__footer {
padding: 16px 20px; padding: 16px 20px;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
} } */
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
> >
<el-button <el-button
slot="reference" slot="reference"
icon="el-icon-warning" icon="gl-icon-circle-question"
circle circle
></el-button> ></el-button>
</el-popover> </el-popover>
...@@ -31,6 +31,7 @@ export default { ...@@ -31,6 +31,7 @@ export default {
<style scope> <style scope>
.table-tooltip { .table-tooltip {
padding-right: 0 !important; padding-right: 0 !important;
padding-left: 4px !important;
} }
.table-tooltip .el-button { .table-tooltip .el-button {
border: none !important; border: none !important;
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
import {Http } from 'glsx-common' import {Http } from 'glsx-common'
let cfg = require('./conf.js') let cfg = require('./conf.js')
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function(isEnv = true) {
if (isEnv) { // if (isEnv) {
return Promise.resolve(cfg) // return Promise.resolve(cfg)
} // }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/616e90b11072f92988f05a09/equity/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/616e90b11072f92988f05a09/equity/config')
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
......
...@@ -20,6 +20,7 @@ Vue.prototype.$apis = apis ...@@ -20,6 +20,7 @@ Vue.prototype.$apis = apis
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const new_http = params => Vue.prototype.$new_http(params)
import './utils/util.js' import './utils/util.js'
......
...@@ -6,10 +6,9 @@ export default { ...@@ -6,10 +6,9 @@ export default {
carTableData: [], carTableData: [],
carTableParams: { carTableParams: {
listName: 'data.list', listName: 'data.list',
tableOption: true, // rowStyle: ({ row, rowIndex }) => {
rowStyle: ({ row, rowIndex }) => { // return row.status == 0 ? {opacity:0.5} : ''
return row.status == 0 ? {opacity:0.5} : '' // },
},
tableColumns: [{ tableColumns: [{
label: '权益名称', label: '权益名称',
prop: 'equityName', prop: 'equityName',
...@@ -21,10 +20,18 @@ export default { ...@@ -21,10 +20,18 @@ export default {
minWidth: '200', minWidth: '200',
}, },
{ {
label: '权益图标\n(80*80,支持JPG、PNG、GIF', // label: '权益图标\n(80*80,支持JPG、PNG、GIF',
prop:'carImage', prop:'carImage',
minWidth: '200', minWidth: '200',
addHtml: 'carImage' addHtml: 'carImage',
renderHeader: h => {
return h('div', { class: 'table-header specHeader' }, [
h('span', '权益图标'),
h('table-tooltip', {
props: { content: '80*80,支持JPG、PNG、GIF' }
})
])
},
}, },
{ {
label: '服务提供方', label: '服务提供方',
...@@ -42,11 +49,17 @@ export default { ...@@ -42,11 +49,17 @@ export default {
} }
}, },
{ {
label: '排序展示', label: '首页展示',
prop: 'mainPageFlag', prop: 'mainPageFlag',
minWidth: '200', minWidth: '200',
addHtml: 'mainPageFlag' addHtml: 'mainPageFlag'
}, },
{
label: '操作',
width: 155,
fixed: 'right',
addHtml: 'auth-button'
}
] ]
}, },
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
export default { export default {
data() { data() {
return { return {
currentIndex:0,
goodsCategoryId: '', goodsCategoryId: '',
inputValue: '', inputValue: '',
tagInputValue: '', tagInputValue: '',
...@@ -9,10 +10,9 @@ export default { ...@@ -9,10 +10,9 @@ export default {
tags: [], tags: [],
goodsTableData: [], goodsTableData: [],
goodsTableParams: { goodsTableParams: {
rowStyle: ({ row, rowIndex }) => { // rowStyle: ({ row, rowIndex }) => {
return row.status == 0 ? {opacity:0.5} : '' // return row.status == 0 ? {opacity:0.5} : ''
}, // },
tableOption: true,
tableColumns: [{ tableColumns: [{
label: '权益名称', label: '权益名称',
prop: 'equityName', prop: 'equityName',
...@@ -24,10 +24,18 @@ export default { ...@@ -24,10 +24,18 @@ export default {
minWidth: '200', minWidth: '200',
}, },
{ {
label: '权益图标\n(80*80,支持JPG、PNG、GIF)', // label: '权益图标\n(80*80,支持JPG、PNG、GIF)',
minWidth: '200', minWidth: '200',
prop:'goodsImage', prop:'goodsImage',
addHtml: 'goodsImage', addHtml: 'goodsImage',
renderHeader: h => {
return h('div', { class: 'table-header specHeader' }, [
h('span', '权益图标'),
h('table-tooltip', {
props: { content: '80*80,支持JPG、PNG、GIF' }
})
])
},
}, },
{ {
label: '品牌名称', label: '品牌名称',
...@@ -43,13 +51,21 @@ export default { ...@@ -43,13 +51,21 @@ export default {
}, },
}, },
{ {
label: '排序展示', label: '首页展示',
prop: 'mainPageFlag', prop: 'mainPageFlag',
minWidth: '200', minWidth: '200',
addHtml: 'mainPageFlag' addHtml: 'mainPageFlag'
},
{
label: '操作',
width: 155,
fixed: 'right',
addHtml: 'auth-button'
} }
] ]
} },
showMoreTags:false,
moreTags:[]
} }
}, },
mounted() { mounted() {
...@@ -77,6 +93,11 @@ export default { ...@@ -77,6 +93,11 @@ export default {
this.tags = list || [] this.tags = list || []
this.getGoodsList(id) this.getGoodsList(id)
this.goodsCategoryId = id this.goodsCategoryId = id
// if(this.tags.length>5){
// this.moreTags = this.tags.slice(5)
// this.tags = this.tags.slice(0,5)
// this.showMoreTags = true
// }
}) })
}, },
/**商品权益列表 */ /**商品权益列表 */
...@@ -96,6 +117,15 @@ export default { ...@@ -96,6 +117,15 @@ export default {
this.tags[index].active = true this.tags[index].active = true
this.getGoodsList(id) this.getGoodsList(id)
this.goodsCategoryId = id this.goodsCategoryId = id
this.currentIndex = index
// if(this.tags.length>5){
// this.moreTags = this.tags.slice(5)
// this.tags = this.tags.slice(0,5)
// this.showMoreTags = true
// }
if(this.$refs.mydrown){
this.$refs.mydrown.hide()
}
}, },
showInput(index, val) { showInput(index, val) {
this.inputValue = val this.inputValue = val
...@@ -126,6 +156,7 @@ export default { ...@@ -126,6 +156,7 @@ export default {
this.$apis.goodsEquityManageApi.categoryDelete({ id }).then(_res => { this.$apis.goodsEquityManageApi.categoryDelete({ id }).then(_res => {
if (_res.code == 0) { if (_res.code == 0) {
this.getCategoryList() this.getCategoryList()
this.changeGoodsCategory({id:this.tags[0].id,index:0})
} else { } else {
this.$message.error(_res.message) this.$message.error(_res.message)
} }
......
import VueQuillEditor from 'vue-quill-editor'
import '@/components'
import VueBus from 'vue-bus'
import Vue from 'vue' import Vue from 'vue'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Dialog, Tabs, TabPane, Table, TableColumn, Pagination, RadioButton, Upload, Image, Loading, InputNumber } from 'element-ui' import '@/components'
import { GLButton,GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建) import VueQuillEditor from 'vue-quill-editor'
// Vue.use(Button) import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Card, Table, TableColumn, Pagination, Loading, Dialog, MessageBox, Upload, Tooltip, Tabs, TabPane, Container, Progress, Timeline, TimelineItem, Dropdown, DropdownMenu, Rate, Image, Drawer, Popover, Row } from 'element-ui'
// Vue.use(ButtonGroup) Vue.use(Button)
// Vue.use(Form) Vue.use(ButtonGroup)
// Vue.use(FormItem) Vue.use(Form)
// Vue.use(Input) Vue.use(FormItem)
// Vue.use(Radio) Vue.use(Input)
// Vue.use(RadioGroup) Vue.use(Radio)
// Vue.use(Checkbox) Vue.use(RadioGroup)
// Vue.use(CheckboxGroup) Vue.use(Checkbox)
// Vue.use(Switch) Vue.use(CheckboxGroup)
// Vue.use(Select) Vue.use(Switch)
// Vue.use(Option) Vue.use(Select)
// Vue.use(TimePicker) Vue.use(Option)
// Vue.use(Col) Vue.use(TimePicker)
// Vue.use(DatePicker) Vue.use(Col)
// Vue.use(Dialog) Vue.use(DatePicker)
// Vue.use(Tabs) Vue.use(Tree)
// Vue.use(TabPane) Vue.use(Card)
// Vue.use(Table) Vue.use(Table)
// Vue.use(TableColumn) Vue.use(TableColumn)
// Vue.use(Pagination) Vue.use(Pagination)
// Vue.use(RadioButton) Vue.use(Loading)
// Vue.use(Upload) Vue.use(Dialog)
Vue.use(GLTable) Vue.use(Upload)
Vue.use(Tooltip)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Progress)
Vue.use(Timeline)
Vue.use(TimelineItem)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(Rate)
Vue.use(Image)
Vue.use(Drawer)
Vue.use(Popover)
Vue.use(Row)
Vue.use(VueQuillEditor) Vue.use(VueQuillEditor)
Vue.use(VueBus)
// Vue.use(Image)
// Vue.use(Loading)
// Vue.use(InputNumber)
import ElementUI from 'element-ui'
Vue.use(ElementUI)
export const message = Message export const message = Message
export const messageBox = MessageBox
\ No newline at end of file \ No newline at end of file
import Vue from 'vue' import Vue from 'vue'
import { message } from '@/plugins/element.js' import ElementUI from 'element-ui'
import { message,messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import { GLButton,GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton,GLTable, GLCombiForm, GLTableButton,GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
Vue.use(GLTable)
Vue.use(ElementUI)
Vue.use(GLCombiForm)
Vue.use(GLTableButton)
Vue.use(GLDialog)
export async function bootstrap({history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret } = await fetchConfig(globalState.configSwitch) const { response, request, sign, secret } = await fetchConfig(globalState.configSwitch)
let newrequest = Object.assign({},request)
newrequest.baseURL = juedeDomain(request.baseURL)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$new_http = new common.Http({ response, request:newrequest, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton,GLTable, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton,GLTable, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
...@@ -41,3 +55,35 @@ function subscribe({ messenger }) { ...@@ -41,3 +55,35 @@ function subscribe({ messenger }) {
console.log(`监听到子应用${v.from}发来消息:`, v) console.log(`监听到子应用${v.from}发来消息:`, v)
}) })
} }
function juedeDomain(url){
const val = {
environment:'test',
channel:2,
envVersion:'trial'//要打开的小程序版本。正式版为:release,体验版为:trial,开发版为:develop,仅在微信外打开时生效
}
const TEST = url.indexOf('scrm.test.glsx')>-1
const GL_PRODUCT = url.indexOf('scrm.glsx.com')>-1
const GH_PRODUCT = url.indexOf('scrm.cgacar')>-1
const DEV = url.indexOf('scrm.dev.glsx')>-1
const BETA = url.indexOf('scrm.beta.glsx')>-1
if(TEST){
val.environment = 'test'
}else if(GL_PRODUCT){
val.environment = 'product'
val.envVersion = 'release'
val.channel = 1
}else if(GH_PRODUCT){
val.environment = 'product'
val.envVersion = 'release'
val.channel = 2
}else if(DEV){
val.environment = 'dev'
val.envVersion = 'develop'
}else if(BETA){
val.environment = 'beta'
val.channel = 1
}
Vue.prototype.$custom_env = val
let baseURL = url.match(/(\S*)\/rop/)[1];
return baseURL
}
<!--领用管理-->
<!--批次管理-->
<template> <template>
<div class="equity-wrap tap tabCtn" style="margin: 20px 0 20px 0"> <div class="equity-wrap tabCtn">
<div class="tapItem"> <div class="tapItem">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="批次管理" name="first" class="contain" style="margin: 0" id="batch"> <el-tab-pane label="批次管理" name="first" class="contain" id="batch">
<GLButton fn="批量生成权益卡" type="primary" size="small" @click="dialogVisible = true">批量生成权益卡</GLButton> <!-- <div style="height: 16px"></div> -->
<el-form :inline="true" label-width="auto" label-position="right" style="margin-top: 20px" class="collectonForm"> <GLCombiForm :rowNumber="1" ref="managerRef" :formObj="batchListSearch" :formData="managerForm" @handleOk="selectCollectionTable('select')" @handleRest="selectCollectionTable('reset')">
<el-row style="align-items: center" class="select"> <div slot="merchant">
<el-form-item label="添加时间">
<el-date-picker v-model="batchDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="批次">
<el-input v-model="selectBatchId" placeholder="请输入批次号" size="small" maxlength="19" class="formItem"></el-input>
</el-form-item>
<el-form-item label="门店">
<el-select v-model="batchListSearch.merchantName" size="small" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="remoteMethod" :loading="loading" class="formItem"> <el-select v-model="batchListSearch.merchantName" size="small" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="remoteMethod" :loading="loading" class="formItem">
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option> <el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select> </el-select>
</el-form-item> </div>
<el-form-item size="small" style="float: right; margin-right: 0px !important"> </GLCombiForm>
<el-button plain size="small" @click="selectCollectionTable('reset')" class="selectBtn">重置</el-button> <div class="btn-grounp">
<el-button type="primary" size="small" @click="selectCollectionTable('select')" class="selectBtn">搜索</el-button> <span class="title">管理列表</span>
</el-form-item> <GLButton fn="批量生成权益卡" type="primary" size="small" @click="dialogVisible = true">批量生成权益卡</GLButton>
</el-row> </div>
</el-form>
<GLTable ref="batchDetailTable" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getlistMemberBatch" :beforeSearchFn="changeBatchDataFormat" :pageConf="batchPageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun"> <GLTable ref="batchDetailTable" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getlistMemberBatch" :beforeSearchFn="changeBatchDataFormat" :pageConf="batchPageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun">
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- 批次管理详情弹窗按钮 --> <!-- 批次管理详情弹窗按钮 -->
<el-button type="text" @click="batchdetails(scope.scope)">详情</el-button> <el-button type="text" @click="batchdetails(scope.scope)">详情</el-button>
</span> </span>
</GLTable> </GLTable>
<!-- 批次界面弹窗 --> <!-- 批次界面弹窗 -->
<el-dialog title="权益卡信息" :visible.sync="batchdetailsVisible" width="1200px" :before-close="detailClose" class="batchDetailBox"> <GLDialog mode="big" bigTitle="权益卡信息" :visible.sync="batchdetailsVisible" :before-close="detailClose">
<!-- <div class="baseinformation"><span class="dialogtitleText">权益卡信息</span></div> --> <el-form :inline="true" :model="cardsInformationForm" class="demo-form-inline detailFont" label-width="154px">
<el-form :inline="true" :model="cardsInformationForm" class="demo-form-inline detailFont" label-width="90px" style="margin-left: 52px"> <div class="form-wrap">
<el-row style="margin-top: 32px"> <el-form-item label="门店:" class="fixedWidth">
<el-form-item label="门店:" class="detailItem">
{{ cardsInformationForm.merchantName }} {{ cardsInformationForm.merchantName }}
</el-form-item> </el-form-item>
<el-form-item label="权益卡名称:" style="margin-left: 120px"> <el-form-item label="权益卡名称:" class="fixedWidth">
{{ cardsInformationForm.cardClassName }} {{ cardsInformationForm.cardClassName }}
</el-form-item> </el-form-item>
</el-row> <el-form-item label="生成日期:" class="fixedWidth">
<el-row>
<el-form-item label="生成日期:" class="detailItem">
{{ date_format(cardsInformationForm.createdDate, 'detail') }} {{ date_format(cardsInformationForm.createdDate, 'detail') }}
</el-form-item> </el-form-item>
</div>
<el-form-item label="批次:" style="margin-left: 120px"> <div class="form-wrap">
<el-form-item label="批次:" class="fixedWidth">
{{ cardsInformationForm.batchNo }} {{ cardsInformationForm.batchNo }}
</el-form-item> </el-form-item>
</el-row> <el-form-item label="生成张数:" class="fixedWidth">
<el-row>
<el-form-item label="生成张数:" class="detailItem">
{{ cardsInformationForm.num }} {{ cardsInformationForm.num }}
</el-form-item> </el-form-item>
<el-form-item style="margin-left: 120px" label="已激活:">{{ cardsInformationForm.recipientCount || '0' }}({{ ChangeDecimalToPercentage(this.cardsInformationForm.recipientCount / this.cardsInformationForm.num) }})</el-form-item> <el-form-item label="已激活:" class="fixedWidth">{{ cardsInformationForm.recipientCount || '0' }}({{ ChangeDecimalToPercentage(this.cardsInformationForm.recipientCount / this.cardsInformationForm.num) }})</el-form-item>
</el-row> </div>
</el-form> </el-form>
<div class="dialogtitleText" style="margin-top: 20px; margin-left: 20px">权益明细:</div> <div class="line"></div>
<div class="contain equity-wrap" style="margin: 20px 0px 20px 0px !important"> <div class="wrapper">
<el-form :inline="true" label-width="70px"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="batchPopupListSearch" :formData="diasearchFormData" @handleOk="batchdetailSelect('select')" @handleRest="batchdetailSelect('reset')"></GLCombiForm>
<el-row style="align-items: center"> <div class="flex_scb" style="margin-bottom: 10px;">
<span>权益明细</span>
<el-button plain size="small" @click="exportbatchdetail">导出</el-button>
</div>
<!-- <el-form :inline="true" label-width="70px">
<el-form-item label=" 卡号:"> <el-form-item label=" 卡号:">
<el-input v-model="batchPopupListSearch.cardNo" placeholder="请输入权益卡号" size="small" class="formItem"></el-input> <el-input v-model="batchPopupListSearch.cardNo" placeholder="请输入权益卡号" size="small" class="formItem"></el-input>
</el-form-item> </el-form-item>
...@@ -72,85 +61,68 @@ ...@@ -72,85 +61,68 @@
</el-form-item> </el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px !important"> <el-form-item size="small" style="float: right; margin-right: 0px !important">
<el-button plain size="small" @click="batchdetailSelect('reset')" class="selectBtn">重置</el-button> <el-button plain size="small" @click="batchdetailSelect('reset')" class="selectBtn">重置</el-button>
<el-button size="small" type="primary" @click="batchdetailSelect('select')" class="selectBtn">搜索</el-button> <el-button size="small" @click="batchdetailSelect('select')" class="selectBtn">搜索</el-button>
<el-button type="primary" size="small" @click="exportbatchdetail" class="selectBtn">导出</el-button>
</el-form-item> </el-form-item>
</el-row> </el-form> -->
</el-form>
<GLTable ref="batchdetailPopupTable" @hook:mounted="setTabelHeight" :tableParams="batchdetailPopupTable" :getListApi="listMemberCard" :searchForm="batchPopupListSearch" :beforeSearchFn="beforebatchPopupListSearch" :pageConf="datailPageConf"></GLTable> <GLTable ref="batchdetailPopupTable" @hook:mounted="setTabelHeight" :tableParams="batchdetailPopupTable" :getListApi="listMemberCard" :searchForm="batchPopupListSearch" :beforeSearchFn="beforebatchPopupListSearch" :pageConf="datailPageConf"></GLTable>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="closebatchdetailPopupTable">取 消</el-button> <el-button size="small" @click="closebatchdetailPopupTable">取 消</el-button>
<!-- <el-button @click="batchdetailsVisible = false">取 消</el-button> --> <el-button size="small" type="primary" @click="closebatchdetailPopupTable">确 定</el-button>
<el-button type="primary" size="small" @click="closebatchdetailPopupTable">确 定</el-button>
</span> </span>
</el-dialog> </GLDialog>
<!-- 批量生成权益卡弹窗 --> <!-- 批量生成权益卡弹窗 -->
<el-dialog title="批量生成权益卡" :visible.sync="dialogVisible" width="712px" :before-close="handleClose" class="batchDialog"> <GLDialog mode="mid" title="批量生成权益卡" :visible.sync="dialogVisible" :before-close="handleClose">
<el-form :inline="true" :model="generateRightCardsForm" :rules="rules" ref="ruleForm" label-width="90px" class="addCardsForm"> <!-- gl-form-page -->
<div class="gl-form-page gl-form-min">
<el-form :inline="true" :model="generateRightCardsForm" :rules="rules" ref="ruleForm" class="addCardsForm">
<div class="form"> <div class="form">
<el-row> <el-form-item label="关联门店:" prop="merchantName">
<el-form-item label="关联门店:" prop="merchantName">
<el-select v-model="generateRightCardsForm.merchantName" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="generateRemoteMethod" :loading="loading" size="small"> <el-select v-model="generateRightCardsForm.merchantName" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="generateRemoteMethod" :loading="loading" size="small">
<el-option v-for="(item, index) in generateOptions" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option> <el-option v-for="(item, index) in generateOptions" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> <el-form-item label="新建张数/张:" prop="num">
<el-row>
<el-form-item label="新建张数:" prop="num">
<div class="dialogLine"> <div class="dialogLine">
<el-input-number :min="1" v-model="generateRightCardsForm.num" size="mini"></el-input-number> <el-input-number :min="1" v-model="generateRightCardsForm.num" size="mini"></el-input-number>
<span style="margin-left: 1px">张</span>
</div> </div>
</el-form-item> </el-form-item>
</el-row> <el-form-item label="备注:" prop="remarks">
<el-row> <el-input type="textarea" v-model="generateRightCardsForm.remarks" maxlength="200"></el-input>
<el-form-item label="备注" prop="remarks">
<el-input type="textarea" v-model="generateRightCardsForm.remarks" maxlength="200" style="width: 320px"></el-input>
</el-form-item> </el-form-item>
</el-row>
</div> </div>
</el-form> </el-form>
</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="cancelGenerate">取 消</el-button> <el-button size="small" @click="cancelGenerate">取 消</el-button>
<el-button size="small" type="primary" @click="generateCards('ruleForm')">确 定</el-button> <el-button size="small" type="primary" @click="generateCards('ruleForm')">确 定</el-button>
</span> </span>
</el-dialog> </GLDialog>
</el-tab-pane> </el-tab-pane>
<!--领用记录 --> <!--领用记录 -->
<el-tab-pane label="领用记录" name="second" class="contain" style="margin: 0" id="collection"> <el-tab-pane label="领用记录" name="second" class="contain" id="collection">
<el-form :inline="true" label-width="70px" label-position="right" class="collectonForm"> <GLCombiForm ref="collectonRef" :rowNumber="1" :formObj="collectionListSearch" :formData="collectForm" @handleOk="collectionSelect('select')" @handleRest="collectionSelect('reset')">
<el-row style="align-items: center"> <div slot="collectMerchant">
<el-form-item label="生成日期">
<el-date-picker v-model="colletionDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="门店">
<el-select size="small" v-model="collectionListSearch.merchantName" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="remoteMethod" :loading="loading" class="formItem"> <el-select size="small" v-model="collectionListSearch.merchantName" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="remoteMethod" :loading="loading" class="formItem">
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option> <el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select> </el-select>
</el-form-item> </div>
<el-form-item label="设备SN" style="margin-left: 30px"> </GLCombiForm>
<el-input v-model="collectionListSearch.sn" placeholder="请输入设备SN" size="small" class="formItem"></el-input> <div class="btn-grounp">
</el-form-item> <span class="title">管理列表</span>
</el-row> <el-button plain size="small" @click="exportCollection">导出</el-button>
<el-row> </div>
<el-form-item size="small" label="账号"> <GLTable ref="collectionTable" :searchForm="collectionListSearch" :tableParams="collectionTableParams" :getListApi="listRequisitionMemberCard" :beforeSearchFn="changeCollectionDataFormat" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun">
<el-input v-model="collectionListSearch.mobile" placeholder="请输入账号" size="small" class="formItem"></el-input> <div class="flex_sc" slot="colorStatus" slot-scope="scope">
</el-form-item> <div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<el-form-item size="small" style="float: right; margin-right: 0px !important"> <span>{{ ['未激活', '已激活'][scope.scope.status] }}</span>
<el-button class="selectBtn" size="small" @click="collectionSelect('reset')">重置</el-button> </div>
<el-button class="selectBtn" size="small" type="primary" @click="collectionSelect('select')" style="">搜索</el-button> </GLTable>
<el-button class="selectBtn" type="primary" size="small" @click="exportCollection">导出</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable ref="collectionTable" :searchForm="collectionListSearch" :tableParams="collectionTableParams" :getListApi="listRequisitionMemberCard" :beforeSearchFn="changeCollectionDataFormat" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun"></GLTable>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
function date_format(date, e) { function date_format(date, e) {
date = new Date(date) date = new Date(date)
...@@ -194,7 +166,6 @@ export default { ...@@ -194,7 +166,6 @@ export default {
baseDate: { baseDate: {
equityList: [] equityList: []
}, },
// 批次弹窗列表搜索项 // 批次弹窗列表搜索项
batchPopupListSearch: { batchPopupListSearch: {
batchId: '', batchId: '',
...@@ -205,38 +176,61 @@ export default { ...@@ -205,38 +176,61 @@ export default {
// 批次列表搜索项 // 批次列表搜索项
selectBatchId: '' || null, selectBatchId: '' || null,
batchListSearch: { batchListSearch: {
selectBatchId: '',
batchDate: '',
batchNo: '', batchNo: '',
merchantName: '', merchantName: '',
startTime: '', startTime: '',
endTime: '' endTime: ''
}, },
managerForm: [
{
label: '添加时间',
name: 'batchDate',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd'
},
{
label: '批次',
name: 'selectBatchId',
type: 'input',
maxlength: 19
},
{
label: '门店',
name: 'merchantName',
type: 'select',
addHtml: 'merchant'
}
],
dialogVisible: false, dialogVisible: false,
activeName: 'first', activeName: 'first',
//批次管理table //批次管理table
batchTableParams: { batchTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: true, // tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '批次', label: '批次',
prop: 'batchNo' prop: 'batchNo',
width: '150'
}, },
{ {
label: '门店', label: '门店',
prop: 'merchantName' prop: 'merchantName',
width:250,
line:1
}, },
{ {
label: '生成数量', label: '生成数量',
prop: 'num' prop: 'num',
// width: 110, width: '120'
// tagLabel: true
}, },
{ {
label: '激活数量', label: '激活数量',
prop: 'recipientCount', prop: 'recipientCount',
// minWidth: '200' width: 150,
formatter: cellValue => { formatter: cellValue => {
if (cellValue.recipientCount) { if (cellValue.recipientCount) {
return cellValue.recipientCount return cellValue.recipientCount
...@@ -246,27 +240,23 @@ export default { ...@@ -246,27 +240,23 @@ export default {
} }
}, },
{ {
width: '95', width: '180',
label: '生成时间', label: '生成时间',
prop: 'createdDate', prop: 'createdDate',
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.createdDate) return this.date_format(cellValue.createdDate)
} }
// formatter: (cellValue) => {
// return {
// 0: '进行中',
// 1: '未完成',
// 2: '已过期',
// 3: '线下关闭',
// 4: '线上关闭'
// }[cellValue.status]
// }
}, },
{ {
label: '备注', label: '备注',
prop: 'remarks' prop: 'remarks',
// minWidth: '200' minWidth:240,
},
{
label: '操作',
width: 70,
fixed: 'right',
addHtml: 'auth-button'
} }
] ]
}, },
...@@ -280,7 +270,6 @@ export default { ...@@ -280,7 +270,6 @@ export default {
{ {
label: '卡号', label: '卡号',
prop: 'cardNo' prop: 'cardNo'
// minWidth: '200'
}, },
{ {
label: '激活码', label: '激活码',
...@@ -320,8 +309,34 @@ export default { ...@@ -320,8 +309,34 @@ export default {
sn: '', sn: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
mobile: '' mobile: '',
colletionDate: ''
},
collectForm: [
{
label: '生成日期',
name: 'colletionDate',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true
},
{
label: '门店',
name: 'merchantName',
type: 'select',
addHtml: 'collectMerchant'
},
{
label: '设备SN',
name: 'sn',
type: 'input'
}, },
{
label: '账号',
name: 'mobile',
type: 'input'
}
],
// 领用记录表格 // 领用记录表格
collectionTableParams: { collectionTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -330,20 +345,22 @@ export default { ...@@ -330,20 +345,22 @@ export default {
{ {
label: '卡号', label: '卡号',
prop: 'cardNo', prop: 'cardNo',
minWidth: '200' width: '160'
}, },
{ {
label: '激活码', label: '激活码',
prop: 'activationCode' prop: 'activationCode',
width: '160'
}, },
{ {
label: '设备SN', label: '设备SN',
prop: 'sn' prop: 'sn',
width: '160'
}, },
{ {
label: '账号', label: '账号',
prop: 'mobile', prop: 'mobile',
minWidth: '200', minWidth: '160',
formatter: cellValue => { formatter: cellValue => {
if (cellValue.mobile == 0) { if (cellValue.mobile == 0) {
return '' return ''
...@@ -367,19 +384,17 @@ export default { ...@@ -367,19 +384,17 @@ export default {
} }
}, },
{ {
width: '95',
label: '生成时间', label: '生成时间',
prop: 'createdDate', prop: 'createdDate',
minWidth: '200', width: '180',
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.createdDate) return this.date_format(cellValue.createdDate)
} }
}, },
{ {
width: '95', width: '180',
label: '有效时间', label: '有效时间',
prop: 'validitDate', prop: 'validitDate',
minWidth: '200',
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.validitDate) return this.date_format(cellValue.validitDate)
} }
...@@ -394,7 +409,8 @@ export default { ...@@ -394,7 +409,8 @@ export default {
0: '未激活' 0: '未激活'
}[cellValue.status] }[cellValue.status]
}, },
minWidth: '200' minWidth: '200',
addHtml: 'colorStatus'
} }
] ]
}, },
...@@ -419,7 +435,22 @@ export default { ...@@ -419,7 +435,22 @@ export default {
batchNo: '', batchNo: '',
num: '', num: '',
recipientCount: '' recipientCount: ''
} },
colors: ['#999999','#2CCA74'],
diasearchFormData:[
{
label: '卡号',
name: 'cardNo',
type: 'input',
isClear: true
},
{
label: '账号',
name: 'mobile',
type: 'input',
isClear: true
},
]
} }
}, },
mounted() { mounted() {
...@@ -437,9 +468,9 @@ export default { ...@@ -437,9 +468,9 @@ export default {
methods: { methods: {
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.table.data.length) { // if (!this.$refs.table.data.length) {
this.$refs.table.setTableHeightFun() // this.$refs.table.setTableHeightFun()
} // }
}, },
setTabelHeight() { setTabelHeight() {
this.$refs.batchdetailPopupTable.tableHeightValues = '328' this.$refs.batchdetailPopupTable.tableHeightValues = '328'
...@@ -458,8 +489,8 @@ export default { ...@@ -458,8 +489,8 @@ export default {
// 批次界面搜索 // 批次界面搜索
selectCollectionTable(e) { selectCollectionTable(e) {
if (e == 'reset') { if (e == 'reset') {
this.batchDate = '' this.batchListSearch.batchDate = ''
this.selectBatchId = '' this.batchListSearch.selectBatchId = ''
this.batchListSearch.merchantName = '' this.batchListSearch.merchantName = ''
this.$apis.equityApi.getEquityCardBatchList(this.batchListSearch).then(res => { this.$apis.equityApi.getEquityCardBatchList(this.batchListSearch).then(res => {
this.$refs.batchDetailTable.refreshTable() this.$refs.batchDetailTable.refreshTable()
...@@ -597,7 +628,6 @@ export default { ...@@ -597,7 +628,6 @@ export default {
// mobile: this.collectionListSearch.mobile, // mobile: this.collectionListSearch.mobile,
// defineId: this.collectionListSearch.merchantId // defineId: this.collectionListSearch.merchantId
// } // }
// const url = // const url =
// this.$get_session_common_config().axios.baseURL + '/memberInfo/exportMemberCard' // this.$get_session_common_config().axios.baseURL + '/memberInfo/exportMemberCard'
// exportExcel({ url, data }) // exportExcel({ url, data })
...@@ -636,10 +666,10 @@ export default { ...@@ -636,10 +666,10 @@ export default {
// 改变批次日期数据格式 // 改变批次日期数据格式
changeBatchDataFormat() { changeBatchDataFormat() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.batchListSearch.endTime = this.batchDate ? this.batchDate[1] + ' 23:59:59' : '' this.batchListSearch.endTime = this.batchListSearch.batchDate ? this.batchListSearch.batchDate[1] + ' 23:59:59' : ''
this.batchListSearch.startTime = this.batchDate ? this.batchDate[0] + ' 00:00:01' : '' this.batchListSearch.startTime = this.batchListSearch.batchDate ? this.batchListSearch.batchDate[0] + ' 00:00:01' : ''
if (this.selectBatchId) { if (this.batchListSearch.selectBatchId) {
this.batchListSearch.batchNo = +this.selectBatchId this.batchListSearch.batchNo = +this.batchListSearch.selectBatchId
} else { } else {
this.batchListSearch.batchNo = null this.batchListSearch.batchNo = null
} }
...@@ -651,8 +681,8 @@ export default { ...@@ -651,8 +681,8 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (this.collectionListSearch.sn.length > 2 || this.collectionListSearch.sn.length < 1) { if (this.collectionListSearch.sn.length > 2 || this.collectionListSearch.sn.length < 1) {
if (this.collectionListSearch.mobile.length > 2 || this.collectionListSearch.mobile.length < 1) { if (this.collectionListSearch.mobile.length > 2 || this.collectionListSearch.mobile.length < 1) {
this.collectionListSearch.endTime = this.colletionDate ? this.colletionDate[1] + ' 23:59:59' : '' || undefined this.collectionListSearch.endTime = this.collectionListSearch.colletionDate ? this.collectionListSearch.colletionDate[1] + ' 23:59:59' : '' || undefined
this.collectionListSearch.startTime = this.colletionDate ? this.colletionDate[0] + ' 00:00:01' : '' || undefined this.collectionListSearch.startTime = this.collectionListSearch.colletionDate ? this.collectionListSearch.colletionDate[0] + ' 00:00:01' : '' || undefined
resolve() resolve()
} else { } else {
Message({ Message({
...@@ -780,8 +810,8 @@ h2 { ...@@ -780,8 +810,8 @@ h2 {
} }
.dialogLine { .dialogLine {
display: flex; display: flex;
flex-direction: row;
align-items: center; align-items: center;
height: 40px;
} }
.InputContainer { .InputContainer {
display: flex; display: flex;
...@@ -850,8 +880,8 @@ h2 { ...@@ -850,8 +880,8 @@ h2 {
vertical-align: baseline; vertical-align: baseline;
background: transparent; background: transparent;
background: #fff; background: #fff;
-webkit-box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); /* -webkit-box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); */
padding: 10px; padding: 10px;
} }
/* .select { /* .select {
...@@ -859,7 +889,6 @@ display: flex; ...@@ -859,7 +889,6 @@ display: flex;
align-items: center; align-items: center;
flex-wrap: nowrap; flex-wrap: nowrap;
} */ } */
.collectonForm .el-form-item__label, .collectonForm .el-form-item__label,
.el-form-item__content { .el-form-item__content {
/* line-height: 32px; */ /* line-height: 32px; */
...@@ -893,18 +922,24 @@ flex-wrap: nowrap; ...@@ -893,18 +922,24 @@ flex-wrap: nowrap;
display: inline-block; display: inline-block;
list-style: none; list-style: none;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 400;
color: #303133; color: #666;
position: relative; position: relative;
width: 180px; width: 180px;
text-align: center; text-align: center;
border: none !important; border: none !important;
background: #fafafa;
border-radius: 4px 4px 0px 0px
}
.tabCtn #tab-first{
margin-right: 1px;
} }
.tabCtn .el-tabs--card > .el-tabs__header .el-tabs__item.is-active { .tabCtn .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f4f5fa; border-bottom-color: #f4f5fa;
background: #fff; background: #fff;
color: #5850ff; color: #5850ff;
border: none; border: none;
font-weight: 500;
} }
.tabCtn .el-tabs__nav-wrap::after { .tabCtn .el-tabs__nav-wrap::after {
height: 0 !important; height: 0 !important;
...@@ -913,8 +948,8 @@ flex-wrap: nowrap; ...@@ -913,8 +948,8 @@ flex-wrap: nowrap;
background: #ffffff; background: #ffffff;
margin: 0px 0 20px 0; margin: 0px 0 20px 0;
padding: 20px; padding: 20px;
-webkit-box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1); /* -webkit-box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1); box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1); */
} }
.dialogtitleText { .dialogtitleText {
font-size: 16px; font-size: 16px;
...@@ -940,8 +975,29 @@ flex-wrap: nowrap; ...@@ -940,8 +975,29 @@ flex-wrap: nowrap;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;
height: 28px; height: 28px;
} }
.detailItem { .form-wrap {
width: 500px; display: flex;
align-items: center;
justify-content: space-between;
}
.fixedWidth{
min-width: 300px;
}
.line{
height: 1px;
background: #e5e5e5;
}
.wrapper{
padding-top: 16px;
}
.wrapper .glsx-combi-formwrap .glsx-combi-form .el-form-item--small{
width: 30%;
}
.flex_scb{
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
} }
.detailFont { .detailFont {
font-size: 14px; font-size: 14px;
...@@ -952,7 +1008,7 @@ flex-wrap: nowrap; ...@@ -952,7 +1008,7 @@ flex-wrap: nowrap;
} }
.detailFont, .detailFont,
.el-form-item__content { .el-form-item__content {
line-height: 36px !important; /* line-height: 36px !important; */
margin-bottom: 0px; margin-bottom: 0px;
} }
.batchDetailBox .el-dialog__header { .batchDetailBox .el-dialog__header {
...@@ -968,9 +1024,9 @@ flex-wrap: nowrap; ...@@ -968,9 +1024,9 @@ flex-wrap: nowrap;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
} }
.form { /* .form {
padding: 32px 20px 32px 48px; padding: 32px 20px 32px 48px;
} } */
.batchDialog .el-dialog__header { .batchDialog .el-dialog__header {
padding: 20px 20px 20px; padding: 20px 20px 20px;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;
...@@ -978,12 +1034,12 @@ flex-wrap: nowrap; ...@@ -978,12 +1034,12 @@ flex-wrap: nowrap;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
} }
.batchDialog .el-dialog__body { /* .batchDialog .el-dialog__body {
padding: 0px 0px; padding: 0px 0px;
color: #606266; color: #606266;
font-size: 14px; font-size: 14px;
word-break: break-all; word-break: break-all;
} } */
.batchDialog .el-dialog__footer { .batchDialog .el-dialog__footer {
padding: 16px 20px; padding: 16px 20px;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
...@@ -991,13 +1047,27 @@ flex-wrap: nowrap; ...@@ -991,13 +1047,27 @@ flex-wrap: nowrap;
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
text-align: center; text-align: center;
} }
.addCardsForm .el-input--small .el-input__inner { /* .addCardsForm .el-input--small .el-input__inner {
height: 32px; width: 248px;
line-height: 32px; } */
width: 320px;
}
.equity-wrap .tapItem { .equity-wrap .tapItem {
margin: 0px; margin: 0px;
} }
.el-button+.el-button{
margin-left: 8px !important;
}
.btn-grounp{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
padding-right: 0 !important;
}
.btn-grounp .title{
font-size: 16px;
font-weight: 500;
color: #333333;
margin-left: 4px;
}
</style> </style>
<style src="@a/css/tao.css"></style> <style src="@a/css/tao.css"></style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="find_wrap">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-row style="display: flex; align-items: center"> <GLTable ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<el-form-item size="small" label="加油日期"> <div class="flex_sc" slot="colorStatus" slot-scope="scope">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker> <div class="table_point" :style="{'background':colors[scope.scope.orderStatus]}"></div>
</el-form-item> <span>{{['已结算', '待结算', '已失效'][scope.scope.orderStatus]}}</span>
<el-form-item label="订单号"> </div>
<el-input v-model="searchForm.orderId" placeholder="请输入" size="small" clearable></el-input> </GLTable>
</el-form-item>
<el-form-item label="用户信息">
<el-input v-model="searchForm.phone" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="订单状态">
<el-select size="small" v-model="searchForm.orderStatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// type='text/ecmascript-6'
function date_format(date) { function date_format(date) {
var date2 = new Date(date) var date2 = new Date(date)
var YY = date2.getFullYear() + '-' var YY = date2.getFullYear() + '-'
...@@ -42,98 +23,136 @@ function date_format(date) { ...@@ -42,98 +23,136 @@ function date_format(date) {
var ss = date2.getSeconds() < 10 ? '0' + date2.getSeconds() : date2.getSeconds() var ss = date2.getSeconds() < 10 ? '0' + date2.getSeconds() : date2.getSeconds()
return YY + MM + DD + ' ' + hh + mm + ss return YY + MM + DD + ' ' + hh + mm + ss
} }
import url from "@/assets/empty.png" import url from '@/assets/empty.png'
// import { searchMixin } from '@/mixins'
export default { export default {
name: '', name: '',
// mixins: [searchMixin],
data() { data() {
return { return {
url:url, url: url,
size: 'small',
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
} }
}, },
searchForm: { searchForm: {
orderId: '' orderId: '',
orderStatus: '',
daterange: '',
phone: ''
},
searchFormData: [
{
label: '下单时间',
name: 'daterange',
type: 'datePicker',
isClear: true
},
{
label: '订单号',
name: 'orderId',
type: 'input',
isClear: true
},
{
label: '用户信息',
name: 'phone',
type: 'input',
isClear: true
}, },
searchFormTable: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
date_format,
flag: true,
statusList: [
{ {
label: '已结算', label: '订单状态',
value: '0' name: 'orderStatus',
type: 'select',
optionId: 'confId',
optionLabel: 'confName',
isClear: true,
noFilter: true,
optionList: [
{
confId: 0,
confName: '已结算'
}, },
{ {
label: '待结算', confId: 1,
value: '1' confName: '待结算'
}, },
{ {
label: '已失效', confId: 2,
value: '2' confName: '已失效'
}
]
} }
], ],
searchFormTable: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
date_format,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
getListApi: this.$apis.orderApi.getEDJOrderList, getListApi: this.$apis.orderApi.getEDJOrderList,
tableColumns: [ tableColumns: [
{ {
label: '日期', label: '日期',
width: '200', width: 200,
formatter: cell => { formatter: cell => {
return this.date_format(cell.callTime) return this.date_format(cell.callTime)
} }
}, },
{ {
label: '用户信息', label: '用户信息',
prop: 'phone' prop: 'phone',
width:150,
}, },
{ {
label: '订单里程', label: '订单里程/km',
minWidth:120,
formatter: cell => { formatter: cell => {
return `${cell.distance}km` return `${cell.distance}`
} }
}, },
{ {
label: '实付金额', label: '实付金额/元',
prop: 'price' prop: 'price',
align:'right',
minWidth:120,
formatter(cell){
return cell.price.toFixed(2)
}
}, },
{ {
label: '订单总额', label: '订单总额/元',
prop: 'income' minWidth:120,
prop: 'income',
align:'right',
formatter(cell){
return cell.income.toFixed(2)
}
}, },
{ {
label: '订单号', label: '订单号',
minWidth:200,
prop: 'orderId' prop: 'orderId'
}, },
{ {
label: '司机工号', label: '司机工号',
minWidth:200,
prop: 'driverId' prop: 'driverId'
}, },
{ {
label: '订单状态', label: '订单状态',
prop: 'status', prop: 'status',
width:150,
formatter: cell => { formatter: cell => {
return ['已结算', '待结算', '已失效'][cell.orderStatus] return ['已结算', '待结算', '已失效'][cell.orderStatus]
} },
addHtml:'colorStatus'
} }
] ]
} },
colors:['#2CCA74','#FDB757','#999999'],
} }
}, },
// watch: {
// date(n) {
// let [callDateStart, callDateEnd] = n
// this.searchObj.callDateStart = callDateStart || ''
// this.searchObj.callDateEnd = callDateEnd || ''
// }
// },
mounted() {}, mounted() {},
methods: { methods: {
beforeSearchFn() { beforeSearchFn() {
...@@ -149,18 +168,21 @@ export default { ...@@ -149,18 +168,21 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun() { // setTableFinishFun() {
//接收到的数据为空 // //接收到的数据为空
if (!this.$refs.table.data.length) { // if (!this.$refs.table.data.length) {
this.$refs.table.setTableHeightFun() // this.$refs.table.setTableHeightFun()
} // }
}, // },
handleReset() { handleReset() {
this.flag = false this.flag = false
this.searchForm = {} this.searchForm = {
this.$nextTick(() => { orderId: '',
this.flag = true orderStatus: '',
}) daterange: '',
phone: ''
}
this.handleSearch()
}, },
handleSearch() { handleSearch() {
this.$refs.table.refreshTable() this.$refs.table.refreshTable()
...@@ -169,21 +191,4 @@ export default { ...@@ -169,21 +191,4 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-form-item {
margin-bottom: 15px;
}
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: #5850ff;
width: 215px;
}
.el-range-editor--small.el-input__inner {
width: 215px;
}
/deep/ .contain .el-input--small .el-input__inner {
width: 215px;
}
.equity-wrap .contain {
margin-top: 20px;
}
</style> </style>
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<div class="new-top-content flex_sc">
<div class="imgWrap">
<img src="@/assets/balance.png" alt="" />
</div>
<div class="balanceWrap">
<div class="flex_sc">
<span class="title">账户余额</span>
<i v-if="loading" style="color:#5850FF" class="el-icon-loading"></i>
<i v-else @click="getHwAccount(1)" style="color:#5850FF;cursor: pointer" class="el-icon-refresh-right"></i>
</div>
<span class="price">{{ price }}元</span>
</div>
</div>
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<div class="topContent"> <!-- <div class="topContent">
<div class="imgWrap"> <div class="imgWrap">
<img src="@/assets/balance.png" alt="" /> <img src="@/assets/balance.png" alt="" />
</div> </div>
...@@ -9,72 +22,37 @@ ...@@ -9,72 +22,37 @@
<span>账户余额</span> <span>账户余额</span>
<div> <div>
<span>{{ price }}</span> <span>{{ price }}</span>
<span class="yuan">元</span> <span class="yuan">元</span>
</div> </div>
</div> </div>
<el-button class="refreshBtn" v-if="loading" :loading="loading"></el-button> <el-button class="refreshBtn" v-if="loading" :loading="loading"></el-button>
<el-button class="special-btn" @click="getHwAccount(1)" v-else>刷新余额</el-button> <el-button class="special-btn" @click="getHwAccount(1)" v-else>刷新余额</el-button>
<!-- <div class="statusBtnWrap">
<div>刷新状态</div>
<el-button icon="el-icon-refresh" class="refreshBtn"></el-button>
</div> --> </div> -->
</div>
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row style="display: flex; align-items: center">
<el-form-item size="small" label="品牌名称">
<el-select size="small" v-model="searchForm.brandName" placeholder="请选择">
<el-option v-for="item in brandList" :key="item.brandId" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="商品名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
<el-form-item label="门店名称">
<el-input v-model="searchForm.merchantName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="商品形态">
<el-select size="small" v-model="searchForm.appereance" placeholder="请选择">
<el-option v-for="item in appereanceList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="订单状态">
<el-select size="small" v-model="searchForm.orderStatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="下单时间">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button :size="size" @click="handleReset">重置</el-button> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <GLTable show-summary v-if="flag" ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLButton fn="财务管理导出" :size="size" type="primary" @click="exportExcel">导出</GLButton>
</el-form-item>
</el-row>
</el-form>
<GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="custom"> <template slot="custom">
<div class="table-custom exportBtn"></div> <div class="table-custom exportBtn"></div>
</template> </template>
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background:scope.scope.appearance==2?colors2[scope.scope.orderStatus]:colors1[scope.scope.orderStatus] }"></div>
<span v-if="scope.scope.appearance==2">{{ qb_statusEnum[scope.scope.orderStatus] }}</span>
<span v-else>{{ statusEnum[scope.scope.orderStatus] }}</span>
</div>
</GLTable> </GLTable>
</div> </div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6">
<script type='text/ecmascript-6'> import url from '@/assets/empty.png'
import url from "@/assets/empty.png"
import { orderMixin, searchMixin } from '@/mixins' import { orderMixin, searchMixin } from '@/mixins'
export default { export default {
name: '', name: '',
mixins: [orderMixin, searchMixin], mixins: [orderMixin, searchMixin],
data() { data() {
return { return {
url:url, url: url,
loading: false, loading: false,
size: 'small', size: 'small',
pickerOptions: { pickerOptions: {
...@@ -85,7 +63,93 @@ export default { ...@@ -85,7 +63,93 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true, flag: true,
price: 0, price: 0,
searchForm: {}, searchForm: {
brandName: '',
productName: '',
merchantName: '',
appereance: '',
orderStatus: '',
daterange: ''
},
searchFormData: [
{
label: '品牌名称',
name: 'brandName',
type: 'select',
optionList: [],
optionId: 'brandName',
optionLabel: 'brandName',
isClear: true
},
{
label: '商品名称',
name: 'productName',
type: 'input',
isClear: true
},
{
label: '门店名称',
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '商品形态',
name: 'appereance',
type: 'select',
optionList: [
{
label: '卡券',
value: 1
},
{
label: '直充',
value: 2
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
},
{
label: '订单状态',
name: 'orderStatus',
type: 'select',
optionList: [
{
label: '待收货',
value: [1, 2]
},
{
label: '已完成',
value: [3]
},
{
label: '已退款',
value: [6]
},
{
label: '售后中',
value: [4]
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
},
{
label: '下单时间',
name: 'daterange',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
}
],
searchFormTable: {}, searchFormTable: {},
tableParams: { tableParams: {
listName: 'list', listName: 'list',
...@@ -94,11 +158,10 @@ export default { ...@@ -94,11 +158,10 @@ export default {
summaryMethod({ columns, data }) { summaryMethod({ columns, data }) {
let sums = [] let sums = []
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index == 0) { if (index == 1) {
sums[index] = '合计' sums[index] = '合计'
return return
} }
const values = data.map(item => { const values = data.map(item => {
if (column.property == 'costPrices' || column.property == 'orderPrices' || column.property == 'discount') { if (column.property == 'costPrices' || column.property == 'orderPrices' || column.property == 'discount') {
return Number(item[column.property]) return Number(item[column.property])
...@@ -124,60 +187,102 @@ export default { ...@@ -124,60 +187,102 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '订单编号', label: '订单编号',
prop: 'orderCode' prop: 'orderCode',
width: '220'
}, },
{ {
label: '品牌名称', label: '品牌名称',
width: 150,
prop: 'brandName' prop: 'brandName'
}, },
{ {
label: '商品形态', label: '商品形态',
width: '100',
prop: 'appearanceDesc' prop: 'appearanceDesc'
}, },
{ {
label: '商品名称', label: '商品名称',
width: 200,
line:1,
formatter(cell) { formatter(cell) {
return cell.appearance == 2 ? `${cell.productName}${cell.denomination}` : cell.productName return cell.appearance == 2 ? `${cell.productName}${cell.denomination}` : cell.productName
} }
}, },
{ {
label: '订单成本金额', label: '订单成本金额/元',
prop: 'costPrices' prop: 'costPrices',
width: 150,
align: 'right',
formatter(cell){
return cell.costPrices.toFixed(2)
}
}, },
{ {
label: '订单支付金额', label: '订单支付金额/元',
prop: 'orderPrices' prop: 'orderPrices',
width: 150,
align: 'right',
formatter(cell){
return cell.orderPrices.toFixed(2)
}
}, },
{ {
label: '销售差额', label: '销售差额/元',
prop: 'discount' prop: 'discount',
width: 150,
align: 'right',
formatter(cell){
return cell.discount.toFixed(2)
}
}, },
{ {
label: '下单渠道', label: '下单渠道',
width: 250,
line:1,
formatter(cell) { formatter(cell) {
return `${cell.merchantName || ''}${cell.merchantName ? '-' : ''}${cell.channelName}` return `${cell.merchantName || ''}${cell.merchantName ? '-' : ''}${cell.channelName}`
} }
}, },
{ {
label: '订单状态', label: '订单状态',
width: 120,
formatter: cell => { // formatter: cell => {
return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus] // return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
} // },
addHtml: 'colorStatus'
}, },
{ {
label: '下单时间', label: '下单时间',
prop: 'orderDate', prop: 'orderDate',
width: 95, width: 180,
formatter(cell) { formatter(cell) {
return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -' return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -'
} }
} }
] ]
},
colors1:{
0:'#999999',
1:'#2CCA74',
2:'#FDB757',
3:'#2CCA74',
4:'#5850FF',
5:'#EB4E4E',
6:'#2CCA74',
},
colors2:{
3:'#2CCA74',
6:'#EB4E4E',
2:'#5850FF',
} }
} }
}, },
created() {
this.$apis.orderApi.getAllBrandList({}).then(({ data }) => {
const item = this.searchFormData.find(item => item.name === 'brandName')
item.optionList = data
})
},
mounted() { mounted() {
this.getHwAccount() this.getHwAccount()
}, },
...@@ -254,23 +359,51 @@ export default { ...@@ -254,23 +359,51 @@ export default {
// </style> // </style>
// <style src="@a/css/tao.css"></style> // <style src="@a/css/tao.css"></style>
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-form-item { // .el-form-item {
margin-bottom: 15px; // margin-bottom: 15px;
} // }
.el-range-editor.is-active, // .el-range-editor.is-active,
.el-range-editor.is-active:hover { // .el-range-editor.is-active:hover {
border-color: #5850ff; // border-color: #5850ff;
width: 215px; // width: 215px;
} // }
.el-range-editor--small.el-input__inner { // .el-range-editor--small.el-input__inner {
width: 215px; // width: 215px;
} // }
/deep/ .contain .el-input--small .el-input__inner { // /deep/ .contain .el-input--small .el-input__inner {
width: 215px; // width: 215px;
} // }
.new-top-content{
background: white;
margin-bottom: 16px;
box-sizing: border-box;
padding: 23px 20px;
.imgWrap {
width: 56px;
height: 56px;
}
.balanceWrap {
margin-left: 10px;
> span {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
}
.title{
margin-right: 4px;
}
.price{
font-size: 36px;
font-family: Helvetica-Bold, Helvetica;
font-weight: bold;
color: #333333;
line-height: 43px;
letter-spacing: 1px;
}
}
}
.equity-wrap .contain { .equity-wrap .contain {
.topContent { .topContent {
display: flex; display: flex;
...@@ -282,7 +415,6 @@ export default { ...@@ -282,7 +415,6 @@ export default {
width: 52px; width: 52px;
height: 52px; height: 52px;
} }
.balanceWrap { .balanceWrap {
margin-left: 10px; margin-left: 10px;
> span { > span {
...@@ -295,14 +427,12 @@ export default { ...@@ -295,14 +427,12 @@ export default {
> div { > div {
height: 30px; height: 30px;
font-size: 22px; font-size: 22px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 30px; line-height: 30px;
.yuan { .yuan {
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
...@@ -329,12 +459,16 @@ export default { ...@@ -329,12 +459,16 @@ export default {
// > div { // > div {
// height: 20px; // height: 20px;
// font-size: 14px; // font-size: 14px;
// font-weight: 400; // font-weight: 400;
// color: #000000; // color: #000000;
// line-height: 20px; // line-height: 20px;
// } // }
// } // }
} }
}
/deep/ .el-table__footer-wrapper tbody td.el-table__cell{
background: #F9F9F9;
height: 56px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="90px" label-position="right"> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-row style="display: flex; align-items: center"> <GLTable v-if="flag" ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<el-form-item size="small" label="加油日期"> <div class="flex_sc" slot="colorStatus" slot-scope="scope">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker> <div class="table_point" :style="{ background: colors[scope.scope.orderStatusName]}"></div>
</el-form-item> <span>{{scope.scope.orderStatusName}}</span>
<el-form-item size="small" label="加油供应商"> </div>
<el-select size="small" :value="'团油'" placeholder="请选择"> </GLTable>
<!-- <el-option v-for="item in appereanceList" :key="item.value" :label="item.label" :value="item.value"></el-option> -->
<el-option label="团油" value="团油"></el-option>
</el-select>
</el-form-item>
<el-form-item label="加油订单号">
<el-input v-model="searchForm.orderId" placeholder="请输入" size="small"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="加油用户">
<el-input v-model="searchForm.phone" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item label="订单状态">
<el-select v-model="searchForm.orderStatus" placeholder="请选择" size="small">
<el-option v-for="item in statusList" :key="item.id" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
</div> </div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6">
<script type='text/ecmascript-6'>
function getExplorer() { function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase() var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null var browserType = null
...@@ -62,7 +36,6 @@ function getExplorer() { ...@@ -62,7 +36,6 @@ function getExplorer() {
} }
return browserType return browserType
} }
function exportFn(url) { function exportFn(url) {
let browserType = getExplorer() let browserType = getExplorer()
if (browserType == 'QQ') { if (browserType == 'QQ') {
...@@ -92,7 +65,77 @@ export default { ...@@ -92,7 +65,77 @@ export default {
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true, flag: true,
searchForm: {}, searchForm: {
orderId: '',
phone: '',
daterange: '',
orderStatus: ''
},
searchFormData: [
{
label: '加油日期',
name: 'daterange',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
label: '加油供应商',
name: 'massOil',
type: 'select',
optionList: [
{
label: '团油'
}
],
optionId: 'label',
optionLabel: 'label',
isClear: true
},
{
label: '订单号',
name: 'orderId',
type: 'input',
isClear: true
},
{
label: '用户信息',
name: 'phone',
type: 'input',
isClear: true
},
{
label: '订单状态',
name: 'orderStatus',
type: 'select',
optionList: [
{
label: '已支付',
value: 1
},
{
label: '退款申请中',
value: 4
},
{
label: '已退款',
value: 5
},
{
label: '退款失败',
value: 6
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
}
],
searchFormTable: {}, searchFormTable: {},
statusList: [ statusList: [
{ {
...@@ -123,11 +166,10 @@ export default { ...@@ -123,11 +166,10 @@ export default {
{ {
label: '加油时间', label: '加油时间',
prop: 'orderTime', prop: 'orderTime',
width: '95' width: 180
}, },
{ {
label: '供应商', label: '供应商',
formatter: cell => { formatter: cell => {
return '团油' return '团油'
} }
...@@ -135,37 +177,41 @@ export default { ...@@ -135,37 +177,41 @@ export default {
{ {
label: '加油油站', label: '加油油站',
prop: 'gasName', prop: 'gasName',
width: '150' width: 150,
line:1
}, },
{ {
label: '油号', label: '油号',
prop: 'oilName' prop: 'oilName'
}, },
{ {
label: '加油升数(L)', label: '加油升数/L',
prop: 'litre', prop: 'litre',
width: '100' width: '150'
}, },
{ {
label: '实付金额', label: '实付金额/元',
prop: 'amountPay', prop: 'amountPay',
width: '100' width: 120,
align: 'right'
}, },
{ {
label: '订单总额', label: '订单总额/元',
prop: 'amountGun', prop: 'amountGun',
width: '100' width: 120,
align: 'right'
}, },
{ {
label: '优惠金额', label: '优惠金额/元',
prop: 'amountDiscounts', prop: 'amountDiscounts',
width: '100' width: 120,
align: 'right'
}, },
{ {
label: '订单状态', label: '订单状态',
prop: 'orderStatusName', prop: 'orderStatusName',
width: '100' width: '100',
addHtml: 'colorStatus'
}, },
{ {
label: '用户信息', label: '用户信息',
...@@ -175,9 +221,15 @@ export default { ...@@ -175,9 +221,15 @@ export default {
{ {
label: '供应商订单号', label: '供应商订单号',
prop: 'orderId', prop: 'orderId',
width: '220' width: '230'
} }
] ]
},
colors: {
'已支付': '#2CCA74',
'退款申请中': '#5850FF',
'已退款': '#2CCA74',
'退款失败': '#EB4E4E'
} }
} }
}, },
...@@ -232,22 +284,21 @@ export default { ...@@ -232,22 +284,21 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-form-item { // .el-form-item {
margin-bottom: 15px; // margin-bottom: 15px;
} // }
.el-range-editor.is-active, // .el-range-editor.is-active,
.el-range-editor.is-active:hover { // .el-range-editor.is-active:hover {
border-color: #5850ff; // border-color: #5850ff;
width: 215px; // width: 215px;
} // }
.el-range-editor--small.el-input__inner { // .el-range-editor--small.el-input__inner {
width: 215px; // width: 215px;
} // }
/deep/ .contain .el-input--small .el-input__inner { // /deep/ .contain .el-input--small .el-input__inner {
width: 215px; // width: 215px;
} // }
.equity-wrap .contain { .equity-wrap .contain {
margin-top: 20px; margin-top: 20px;
} }
......
<template> <template>
<div class="equity-wrap allWrap"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="equity-wrap contain gl-form-page">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" size="medium" :key="resetTime"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="154px" size="medium" :key="resetTime">
<div class="box"> <div class="box">
<!-- <back /> -->
<div class="title">商品类型</div> <div class="title">商品类型</div>
<el-radio-group size="small" :value="1"> <el-radio-group size="small" :value="1">
<el-radio-button :label="1">品牌商品</el-radio-button> <el-radio-button :label="1">品牌商品</el-radio-button>
...@@ -12,30 +11,30 @@ ...@@ -12,30 +11,30 @@
</div> </div>
<div class="box"> <div class="box">
<div class="title baseTitle">基本信息</div> <div class="title baseTitle">基本信息</div>
<el-form-item label="产品提供方" required> <el-form-item label="产品提供方:" required>
<el-select v-model="ruleForm.supplier" :disabled="isEdit"> <el-select v-model="ruleForm.supplier" :disabled="isEdit">
<el-option label="海威" value="HW"></el-option> <el-option label="海威" value="HW"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品形态" required> <el-form-item label="商品形态:" required>
<el-radio-group size="small" v-model="ruleForm.appearance" :disabled="isEdit" @change="changeAppearance"> <el-radio-group size="small" v-model="ruleForm.appearance" :disabled="isEdit" @change="changeAppearance">
<el-radio-button label="1">卡券</el-radio-button> <el-radio-button label="1">卡券</el-radio-button>
<el-radio-button label="2">直充</el-radio-button> <el-radio-button label="2">直充</el-radio-button>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="商品编码" prop="productId"> <el-form-item label="商品编码:" prop="productId">
<el-input v-model="ruleForm.productId" :disabled="isEdit" placeholder="365淘券所对应的商品编码" maxlength="20" @blur="getEquityOutGoodsBySupplierProductId"></el-input> <el-input v-model="ruleForm.productId" :disabled="isEdit" placeholder="365淘券所对应的商品编码" maxlength="20" @blur="getEquityOutGoodsBySupplierProductId"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="品牌名称" prop="brandName"> <el-form-item label="品牌名称:" prop="brandName">
<el-select filterable v-model="ruleForm.brandName" @change="changeBrandName" :disabled="isEdit"> <el-select filterable v-model="ruleForm.brandName" @change="changeBrandName" :disabled="isEdit">
<el-option v-for="item in brandNameList" :key="item.brandId" :label="item.brandName" :value="item.brandName"></el-option> <el-option v-for="item in brandNameList" :key="item.brandId" :label="item.brandName" :value="item.brandName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品名称" prop="productName"> <el-form-item label="商品名称:" prop="productName">
<el-input v-model="ruleForm.productName" maxlength="30"></el-input> <el-input v-model="ruleForm.productName" maxlength="30"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品图片" :required="ruleForm.appearance == 1" prop="goodsImage"> <el-form-item label="商品图片:" :required="ruleForm.appearance == 1" prop="goodsImage">
<el-upload action="" class="avatar-uploader" :show-file-list="false" :before-upload="upLoadImg" id="goodsIconId"> <el-upload action="" class="avatar-uploader" :show-file-list="false" :before-upload="upLoadImg" id="goodsIconId">
<template v-if="ruleForm.goodsImage"> <template v-if="ruleForm.goodsImage">
<img :src="ruleForm.goodsImage" class="avatar" /> <img :src="ruleForm.goodsImage" class="avatar" />
...@@ -50,71 +49,56 @@ ...@@ -50,71 +49,56 @@
<el-form-item v-if="ruleForm.appearance != 1" label="直充面额" prop="denomination"> <el-form-item v-if="ruleForm.appearance != 1" label="直充面额" prop="denomination">
<el-input v-model="ruleForm.denomination" maxlength="10"></el-input> <el-input v-model="ruleForm.denomination" maxlength="10"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="会员价" prop="salesPrice"> <el-form-item label="会员价/元:" prop="salesPrice">
<el-input v-model="ruleForm.salesPrice"> <el-input v-model="ruleForm.salesPrice"></el-input>
<span slot="suffix">元</span>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="非会员价" prop="noMemberPrice"> <el-form-item label="非会员价/元:" prop="noMemberPrice">
<el-input v-model="ruleForm.noMemberPrice"> <el-input v-model="ruleForm.noMemberPrice"></el-input>
<span slot="suffix">元</span>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="成本含税价" prop="costPrice"> <el-form-item label="成本含税价/元:" prop="costPrice">
<el-input v-model="ruleForm.costPrice"> <el-input v-model="ruleForm.costPrice"></el-input>
<span slot="suffix">元</span>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="官方价/划线价" prop="lineationPrice"> <el-form-item label="官方价/划线价/元:" prop="lineationPrice">
<el-input v-model="ruleForm.lineationPrice"> <el-input v-model="ruleForm.lineationPrice"></el-input>
<span slot="suffix">元</span>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品质保期" prop="warrantyPeriod" :required="ruleForm.appearance == 1"> <el-form-item label="商品质保期/小时:" prop="warrantyPeriod" :required="ruleForm.appearance == 1">
<el-input v-model.number="ruleForm.warrantyPeriod"> <el-input v-model.number="ruleForm.warrantyPeriod">
<template slot="append">小时</template> <!-- <template slot="append">小时</template> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品有效期"> <el-form-item label="商品有效期:">
<el-input v-model.number="ruleForm.validityPeriod"> <el-input v-model.number="ruleForm.validityPeriod">
<template slot="prepend">兑换到账户内</template> <template slot="prepend">兑换到账户内</template>
<template slot="append">天有效</template> <template slot="append">天有效</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品库存"> <el-form-item label="商品库存:">
<el-input v-model="ruleForm.stock" disabled> <el-input v-model="ruleForm.stock" disabled>
<template slot="append">保存或上架商品后将自动检查库存</template> <template slot="append">保存或上架商品后将自动检查库存</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item class="editor" label="购买页使用须知" prop="buysNotes" required> <el-form-item class="editor" label="购买页使用须知:" prop="buysNotes" required>
<quill-editor v-model="ruleForm.buysNotes" :options="editorOption"></quill-editor> <quill-editor v-model="ruleForm.buysNotes" :options="editorOption"></quill-editor>
</el-form-item> </el-form-item>
<template v-if="ruleForm.appearance == 1"> <template v-if="ruleForm.appearance == 1">
<el-form-item class="editor" label="卡券页使用须知" prop="useNotes" required> <el-form-item class="editor" label="卡券页使用须知:" prop="useNotes" required>
<quill-editor v-model="ruleForm.useNotes" :options="editorOption"></quill-editor> <quill-editor v-model="ruleForm.useNotes" :options="editorOption"></quill-editor>
</el-form-item> </el-form-item>
</template> </template>
<template v-else> <template v-else>
<el-form-item class="editor" label="直充使用须知"> <el-form-item class="editor" label="直充使用须知:">
<quill-editor v-model="ruleForm.useNotes" :options="editorOption"></quill-editor> <quill-editor v-model="ruleForm.useNotes" :options="editorOption"></quill-editor>
</el-form-item> </el-form-item>
</template> </template>
</div> </div>
</el-form> </el-form>
</div> </div>
<div <div class="footer-panel">
class="footer-panel" <el-button plain class="btn-three" @click="$router.go(-1)">取消</el-button>
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<!-- <el-button type="primary" @click="onSubmit('save')" size="small">创建</el-button> -->
<el-button class="custtom" @click="onSubmit('save')" type="primary" size="small">保存</el-button>
<div class="wrap_driver"> <div class="wrap_driver">
<el-button type="primary" @click="onSubmit" size="small">提交</el-button> <el-button plain type="primary" @click="onSubmit">提交</el-button>
</div> </div>
<el-button @click="$router.go(-1)" size="small">取消</el-button> <el-button @click="onSubmit('save')" type="primary">保存</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -219,6 +203,7 @@ export default { ...@@ -219,6 +203,7 @@ export default {
name: '', name: '',
data() { data() {
return { return {
defaultwidth: 432,
eventBus: new Vue(), eventBus: new Vue(),
isEdit: false, isEdit: false,
isNewGoods: false, isNewGoods: false,
...@@ -240,10 +225,18 @@ export default { ...@@ -240,10 +225,18 @@ export default {
ruleForm: { ruleForm: {
supplier: 'HW', supplier: 'HW',
appearance: 1, appearance: 1,
costPrice:'', costPrice: '',
lineationPrice:'', lineationPrice: '',
noMemberPrice:'', noMemberPrice: '',
salesPrice:'' salesPrice: '',
brandName: '',
productName: '',
productId: '',
goodsImage: '',
denomination: 0,
warrantyPeriod: 0,
buysNotes: '',
useNotes: ''
}, },
stock: '', stock: '',
brandNameList: [], brandNameList: [],
...@@ -264,31 +257,15 @@ export default { ...@@ -264,31 +257,15 @@ export default {
} }
}, },
mounted() { mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.getListWithPageOutGoods() this.getListWithPageOutGoods()
let id = this.$route.query.id let id = this.$route.query.id
let edit = this.$route.query.edit let edit = this.$route.query.edit
// if(!edit){
// edit = true
// }
if (id) { if (id) {
this.getEquityGoodsById(id) this.getEquityGoodsById(id)
this.isEdit = !edit this.isEdit = !edit
} else { } else {
this.isNewGoods = true this.isNewGoods = true
} }
// this.eventBus.$on('query', ({ id, edit }) => {
// console.log({ id, edit })
// if (id) {
// this.getEquityGoodsById(id)
// this.isEdit = !edit
// } else {
// this.isNewGoods = true
// }
// })
// let { id, edit } = this.getParams()
}, },
methods: { methods: {
changeBrandName() { changeBrandName() {
...@@ -424,8 +401,7 @@ export default { ...@@ -424,8 +401,7 @@ export default {
this.$confirm(_res.message, '提示', { this.$confirm(_res.message, '提示', {
confirmButtonText: '保存', confirmButtonText: '保存',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
center: true
}).then(() => { }).then(() => {
this.createGoods() this.createGoods()
}) })
...@@ -433,8 +409,7 @@ export default { ...@@ -433,8 +409,7 @@ export default {
this.$confirm(_res.message, '提示', { this.$confirm(_res.message, '提示', {
confirmButtonText: '提交', confirmButtonText: '提交',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
center: true
}).then(() => { }).then(() => {
this.createGoods() this.createGoods()
}) })
...@@ -467,33 +442,20 @@ export default { ...@@ -467,33 +442,20 @@ export default {
} }
} }
} }
// <style src="@a/css/tao.css"></style>
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.allWrap { .equity-wrap .contain{
padding-bottom: 80px; padding: 16px 0;
} }
.footer-panel { .footer-panel {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: fixed;
width: 100%; width: 100%;
bottom: 0px; margin: 16px 0;
height: 64px;
background: #ffffff;
z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
.custtom {
background: #ffffff;
color: #5850ff;
}
.wrap_driver { .wrap_driver {
margin: 0 20px; margin: 0 20px;
.el-button + .el-button {
margin-right: 40px;
}
} }
} }
.uploader-del-icon { .uploader-del-icon {
......
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<GLButton fn="新增商品" class="addGood" type="primary" icon="el-icon-plus" @click="jump">新增商品</GLButton> <div class="find-wrap">
<div class="equity-wrap contain"> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="85px" label-position="right"> <div class="out_wrap">
<el-row style="display: flex; align-items: center; margin-bottom: 2px"> <div class="choseRow flex_scb">
<el-form-item size="small" label="品牌名称"> <div class="wrap">
<el-select size="small" v-model="searchForm.brandName" filterable placeholder="请选择"> <div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)">
<el-option v-for="item in goodsBrandList" :key="item.id" :label="item.brandName" :value="item.brandName"></el-option> {{ item }}
</el-select> </div>
</el-form-item> </div>
<el-form-item size="small" label="商品名称"> <div class="flex_sc">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input> <GLButton fn="新增商品" size="small" type="primary" @click="jump">新增商品</GLButton>
</el-form-item> <template v-if="currentIndex == 1">
<!-- <el-form-item label="门店名称"> <GLButton fn="下架商品" plain size="small" @click="batchOperation(2)">批量下架</GLButton>
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input> </template>
</el-form-item> --> <template v-if="currentIndex > 1">
<el-form-item size="small" label="提供方" style="margin-left: -10px"> <GLButton fn="上架商品" plain size="small" @click="batchOperation(1)">批量上架</GLButton>
<el-select size="small" v-model="searchForm.supplier"> </template>
<el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value"></el-option> <template v-if="currentIndex == 2">
</el-select> <GLButton fn="删除商品" size="small" @click="batchOperation(-1)">批量删除</GLButton>
</el-form-item> </template>
</el-row> </div>
<el-row> </div>
<el-form-item size="small" label="商品编码"> </div>
<el-input v-model="searchForm.productId" placeholder="请输入" size="small" clearable></el-input> <div class="table_box">
</el-form-item> <GLTable ref="table" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi">
<el-form-item size="small" label="商品状态"> <div class="flex_sc" slot="colorStatus" slot-scope="scope">
<el-select size="small" v-model="searchForm.status"> <div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option> <span>{{ ['待上架', '上架', '下架'][scope.scope.status] }}</span>
</el-select> </div>
</el-form-item> <div slot="table-btns" slot-scope="scope">
<el-form-item size="small" label="商品ID" style="margin-left: -10px"> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<el-input v-model="searchForm.id" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<div class="row-btns">
<el-button size="small" @click="toggleAll">全选</el-button>
<GLButton fn="上架商品" size="small" type="primary" @click="batchOperation(1)">上架</GLButton>
<GLButton fn="下架商品" size="small" type="primary" @click="batchOperation(2)">下架</GLButton>
<GLButton fn="删除商品" size="small" type="primary" @click="batchOperation(-1)">删除</GLButton>
</div> </div>
<GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf">
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="编辑商品" type="text" @click="jump(scope.scope)">编辑</GLButton>
<GLButton fn="复制商品" type="text" @click="copy(scope.scope)">复制</GLButton>
<!-- <el-button type="text" @click="copy(scope.scope)">复制</el-button> -->
</span>
</GLTable> </GLTable>
</div> </div>
<!-- <div class="pannel tableTopButton">
<el-button plain size="small" @click="toggleAll">全选</el-button>
<GLButton fn="上架商品" size="small" @click="batchOperation(1)">上架</GLButton>
<GLButton fn="下架商品" size="small" @click="batchOperation(2)">下架</GLButton>
<GLButton fn="删除商品" size="small" @click="batchOperation(-1)">删除</GLButton>
</div>
<div class="table_wrap">
<GLTable ref="table" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ ['待上架', '上架', '下架'][scope.scope.status] }}</span>
</div>
<div slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div> -->
</div>
<GLDialog mode="mid" title="商品短链" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false">
<div class="con-wrap flex_cc">
<div class="link flex_cc">{{ shortLink }}</div>
</div>
<div slot="footer">
<el-button size="small" @click="handleClose">取消</el-button>
<el-button size="small" type="primary" @click="copyLink">复制</el-button>
</div>
</GLDialog>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script>
const cloneText = message => {
let input = document.createElement('input')
input.value = message
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
}
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { searchMixin } from '@/mixins' import { searchMixin } from '@/mixins'
export default { export default {
...@@ -67,9 +84,123 @@ export default { ...@@ -67,9 +84,123 @@ export default {
url: url, url: url,
size: 'small', size: 'small',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true, flag: false,
searchForm: {}, searchForm: {
brandName: '',
productName: '',
supplier: '',
productId: '',
status:'',
id: ''
},
searchFormData: [
{
label: '品牌名称',
name: 'brandName',
type: 'select',
optionList: [],
optionId: 'brandName',
optionLabel: 'brandName',
isClear: true
},
{
label: '商品名称',
name: 'productName',
type: 'input',
isClear: true
},
{
label: '提供方',
name: 'supplier',
type: 'select',
optionList: [
{
label: '海威',
value: 'HW'
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
},
{
label: '商品编码',
name: 'productId',
type: 'input',
isClear: true
},
// {
// label: '商品状态',
// name: 'status',
// type: 'select',
// optionList: [
// {
// label: '上架',
// value: '1'
// },
// {
// label: '下架',
// value: '2'
// },
// {
// label: '待上架',
// value: '0'
// }
// ],
// optionId: 'value',
// optionLabel: 'label',
// isClear: true
// },
{
label: '商品ID',
name: 'id',
type: 'input',
isClear: true
}
],
buttonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn: '编辑商品'
},
listeners: {
click: row => this.jump(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '复制'
},
attrs: {
type: 'text',
fn: '复制商品'
},
listeners: {
click: row => this.copy(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '生成商品短链'
},
attrs: {
type: 'text',
disabled: row => {
return !row.scope.groupStatus || row.scope.status != 1
}
},
listeners: {
click: row => this.toCreateLine(row.scope)
}
}
],
supplierList: [ supplierList: [
{ {
label: '海威', label: '海威',
...@@ -90,36 +221,42 @@ export default { ...@@ -90,36 +221,42 @@ export default {
value: '0' value: '0'
} }
], ],
getListApi: this.$apis.orderApi.getGoodsList,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
mutiSelectName: 'goodsIndex', mutiSelectName: 'goodsIndex',
mutiSelectUniqueKey: 'id', mutiSelectUniqueKey: 'id',
tableOption: true, tableOption: false,
getListApi: this.$apis.orderApi.getGoodsList,
tableColumns: [ tableColumns: [
{ {
label: '提供方', label: '提供方',
width: 150,
formatter: cell => { formatter: cell => {
return '海威' return '海威'
} }
}, },
{ {
label: '商品SKU', label: '商品SKU',
minWidth:450,
formatter: cell => { formatter: cell => {
return cell.appearance == 1 ? `${cell.brandName || ''}${cell.productName || ''}` : `${cell.brandName || ''}${cell.productName || ''}${cell.denomination || ''}` let str = cell.appearance == 1 ? `${cell.brandName || ''}${cell.productName || ''}` : `${cell.brandName || ''}${cell.productName || ''}${cell.denomination || ''}`
return str
} }
}, },
{ {
label: '会员价(元)', label: '会员价/元',
prop: 'salesPrice' width: 150,
align: 'right',
prop: 'salesPrice',
formatter(cell) {
return parseFloat(cell.salesPrice).toFixed(2)
}
}, },
{ {
prop: 'sales', prop: 'sales',
sortable: true, sortable: true,
label: '销量' label: '销量',
width: 110
// renderHeader: h => { // renderHeader: h => {
// return h('div', { class: 'table-header' }, [ // return h('div', { class: 'table-header' }, [
// h('span', '销量'), // h('span', '销量'),
...@@ -131,7 +268,7 @@ export default { ...@@ -131,7 +268,7 @@ export default {
}, },
{ {
label: '库存', label: '库存',
width:110,
sortable: true, sortable: true,
formatter: cell => { formatter: cell => {
return cell.stock == -1 ? '无限制' : cell.stock return cell.stock == -1 ? '无限制' : cell.stock
...@@ -139,24 +276,98 @@ export default { ...@@ -139,24 +276,98 @@ export default {
}, },
{ {
label: '商品状态', label: '商品状态',
addHtml: 'colorStatus'
formatter: cell => { // formatter: cell => {
return ['待上架', '上架', '下架'][cell.status] // return ['待上架', '上架', '下架'][cell.status]
} // }
},
{
label: '操作',
width: 170,
fixed: 'right',
addHtml: 'table-btns'
} }
] ]
}, },
goodsBrandList: [], goodsBrandList: [],
selectStatus: false selectStatus: false,
isVisible: false,
shortLink: null,
colors: ['#FDB757', '#2CCA74', '#999999'],
choseList: ['全部', '上架', '待上架', '下架'],
currentIndex: 0
} }
}, },
mounted() { mounted() {
this.getAllBrandList() this.getAllBrandList()
}, },
methods: { methods: {
tabClick(e) {
this.currentIndex = e
let status = ''
switch (e) {
case 1:
status = 1
break
case 2:
status = 0
break
case 3:
status = 2
break
default:
status = ''
break
}
this.searchForm.status = status
this.handleSearch()
},
handleClose() {
this.isVisible = !this.isVisible
},
copyLink() {
if (!this.shortLink) return
cloneText(this.shortLink)
this.$message.success('复制成功')
this.handleClose()
},
// 生成短链
toCreateLine(row) {
const { merchantId, sapCode } = this.$globalState.session
let base_info = `merchantId=${merchantId}`
if (sapCode) {
base_info = `${base_info}&storeCode=${sapCode}`
}
const CHARGE_PATH = 'packageEquity/pages/commodity/chargeDetail/chargeDetail'
const MINI_PATH = 'packageEquity/pages/commodity/detail/detail'
const MINI_OPTIONS = {
supplier: row.supplier,
brandName: row.brandName
}
if (row.appearance == 2) {
MINI_OPTIONS.icon = row.icon
}
if (row.appearance == 1) {
MINI_OPTIONS.id = row.id
}
const ENV = this.$custom_env
let query = `param=${encodeURIComponent(JSON.stringify(MINI_OPTIONS))}&${base_info}&shortlink=1`
let para = {
path: row.appearance == 2 ? CHARGE_PATH : MINI_PATH,
query,
appId: ENV.environment == 'beta' ? 'wx9f91c1ec493eb425' : ENV.channel == 2 ? 'wxfe82b8d65d07808f' : 'wxe10067a63c1856ac',
envVersion: ENV.envVersion
}
this.$apis.orderApi.createShortLink(para).then(res => {
this.shortLink = res.data
this.isVisible = true
})
},
getAllBrandList() { getAllBrandList() {
this.$apis.orderApi.getAllBrandList().then(res => { this.$apis.orderApi.getAllBrandList().then(res => {
this.goodsBrandList = res.data || [] // this.goodsBrandList = res.data || []
const item = this.searchFormData.find(item => item.name === 'brandName')
item.optionList = res.data
}) })
}, },
jump({ id, status }, copy) { jump({ id, status }, copy) {
...@@ -167,7 +378,6 @@ export default { ...@@ -167,7 +378,6 @@ export default {
// if (window.$config.axios.environment) { // if (window.$config.axios.environment) {
// target = ['权益卡管理平台', '运营平台', 'SCRM权益平台', '商品管理', '*商品详情'] // target = ['权益卡管理平台', '运营平台', 'SCRM权益平台', '商品管理', '*商品详情']
// } // }
console.log(copy, 'copy')
let query = {} let query = {}
if (id) query.id = id if (id) query.id = id
if (status == 0) { if (status == 0) {
...@@ -178,7 +388,6 @@ export default { ...@@ -178,7 +388,6 @@ export default {
query.edit = true query.edit = true
query.$title = encodeURI('编辑商品') query.$title = encodeURI('编辑商品')
} }
console.log(query.edit, 'edit')
this.$router.push({ path: '/goods/addGoods', query }) this.$router.push({ path: '/goods/addGoods', query })
}, },
copy({ id }) { copy({ id }) {
...@@ -220,12 +429,15 @@ export default { ...@@ -220,12 +429,15 @@ export default {
handleReset() { handleReset() {
this.flag = false this.flag = false
this.searchForm = {} this.searchForm = {}
this.$nextTick(() => { this.tabClick(this.currentIndex)
this.flag = true // this.handleSearch()
})
}, },
handleSearch() { handleSearch() {
this.flag = false
this.$refs.table.refreshTable() this.$refs.table.refreshTable()
this.$nextTick(() => {
this.flag = true
})
}, },
// ['待上架', '上架', '下架'] // // ['待上架', '上架', '下架'] //
batchOperation(status) { batchOperation(status) {
...@@ -256,8 +468,7 @@ export default { ...@@ -256,8 +468,7 @@ export default {
this.$confirm(content[status], '提示', { this.$confirm(content[status], '提示', {
confirmButtonText: '是', confirmButtonText: '是',
cancelButtonText: '否', cancelButtonText: '否',
type: 'warning', type: 'warning'
center: true
}) })
.then(() => { .then(() => {
let target = 'deleteGoods' let target = 'deleteGoods'
...@@ -286,16 +497,63 @@ export default { ...@@ -286,16 +497,63 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.addGood { .addGood {
margin-bottom: 20px; margin-bottom: 16px;
// margin-left: 40px; }
padding: 8px 16px; .find-wrap {
// margin-bottom: 20px; background: #ffffff;
padding: 20px;
}
.out_wrap {
position: relative;
z-index: 100;
margin-bottom: -1px;
}
.choseRow {
display: flex;
.choseItem {
display: inline-block;
box-sizing: border-box;
padding: 0 20px;
height: 40px;
line-height: 40px;
cursor: pointer;
border: 1px solid #e5e5e5;
margin-right: 1px;
border-radius: 4px 4px 0 0;
background: #fafafa;
}
.active {
color: #5850ff;
background-color: white;
font-weight: 600;
border-bottom: none;
}
}
.table_box {
border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 16px 20px;
border-radius: 0 4px 4px 4px;
}
.con-wrap {
height: 191px;
.link {
width: 536px;
height: 62px;
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
color: #666666;
}
} }
/deep/ .contain .el-input--small .el-input__inner { .flex_cc {
width: 215px; display: flex;
align-items: center;
justify-content: center;
} }
.row-btns { .el-button + .el-button {
margin-top: 5px; margin-left: 8px;
margin-bottom: 10px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<div class="tableTitle">汽车权益</div> <div class="tableTitle">汽车权益</div>
<div class="equity-wrap contain"> <div class="tableTop">
<GLButton fn="添加汽车权益" type="primary" size="small" @click="addEquity(1)"> <span>权益列表</span>
<i class="el-icon-plus"></i> <GLButton fn="添加汽车权益" type="primary" size="small" @click="addEquity(1)">添加汽车权益</GLButton>
<span style="margin-left: 8px">添加汽车权益</span> </div>
</GLButton> <div class="equity-wrap contain botp">
<div class="noneOperation"> <div class="">
<GLTable ref="carTable" :tableParams="carTableParams" :pageConf="cardsDatail" :getListApi="getCardListApi"> <GLTable ref="carTable" :tableParams="carTableParams" :pageConf="cardsDatail" :getListApi="getCardListApi">
<div slot="mainPageFlag" slot-scope="scope"> <div slot="mainPageFlag" slot-scope="scope">
<el-button type="text" @click="carsDisplay(scope.scope)">{{ scope.scope.mainPageFlag == 1 ? '取消首页展示' : '首页展示' }}</el-button> <!-- <el-button type="text" @click="carsDisplay(scope.scope)">{{ scope.scope.mainPageFlag == 1 ? '取消首页展示' : '首页展示' }}</el-button> -->
<el-switch :value="scope.scope.mainPageFlag == 1" active-color="#5850ff" inactive-color="#eee" @change="carsDisplay(scope.scope)"></el-switch>
</div> </div>
<div slot="carImage" slot-scope="scope"> <div slot="carImage" slot-scope="scope">
<img class="equity-icon" :src="scope.scope.equityIcon" /> <img class="equity-icon" :src="scope.scope.equityIcon" />
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="汽车权益编辑" type="text" class="tableBtn" @click="editEquity(scope.scope, 1)">编辑</GLButton> <GLTableButton :buttonList="buttonListcar" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<!-- <GLButton fn="汽车权益编辑" type="text" class="tableBtn" @click="editEquity(scope.scope, 1)">编辑</GLButton>
<GLButton fn="汽车权益上/下架" type="text" class="tableBtn" @click="updateShelves(scope.scope, 'car')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</GLButton> <GLButton fn="汽车权益上/下架" type="text" class="tableBtn" @click="updateShelves(scope.scope, 'car')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</GLButton>
<el-button type="text" class="tableBtn" @click="setTop(scope.scope.id, 'car')">置顶</el-button> <el-button type="text" class="tableBtn" @click="setTop(scope.scope.id, 'car')">置顶</el-button> -->
</span> </span>
</GLTable> </GLTable>
</div> </div>
</div> </div>
<div class="tableTitle">商品权益</div> <div class="tableTitle noneOperation">商品权益</div>
<div class="equity-wrap secondBox"> <div class="equity-wrap contain fill">
<div class="equity-wrap contain">
<div class="tagsCtn"> <div class="tagsCtn">
<div class="tags-box"> <div class="choseRow flex_sc">
<div class="choseItem hideText" @click="changeGoodsCategory({ id: item.id, index })" :class="{ active: currentIndex == index }" v-for="(item, index) in tags" :key="index">
<span>{{item.goodsCategory}}</span>
<i class="del el-icon-close" @click.stop="categoryDelete(item.id)"></i>
</div>
<div v-if="inputVisible" class="choseItem">
<input @keydown.enter="handleInputConfirm" @blur="handleInputConfirm" maxlength="8" v-model="tagInputValue" class="input-new-tag" ref="saveTagInput" type="text">
</div>
<!-- <div v-if="showMoreTags" class="choseItem" style="padding:0 10px">
<el-dropdown ref="mydrown" trigger="click" @visible-change="listenDrop">
<i class="el-icon-arrow-down"></i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(el,indexs) in moreTags" :key="indexs">
<div @click.stop="changeGoodsCategory({ id: el.id, index:indexs })" class="drow_class">
<div class="title">{{el.goodsCategory}}</div>
<i class="del el-icon-close" @click.stop="categoryDelete(el.id)"></i>
</div>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div> -->
<div class="choseItem" @click="toAddEquity">+</div>
</div>
<!-- <div class="tags-box">
<template v-for="(item, index) in tags"> <template v-for="(item, index) in tags">
<el-tag :key="index" effect="dark" :type="item.active ? '' : 'info'" @click.native="changeGoodsCategory({ id: item.id, index })" :ref="`tag-${index}`" @dblclick.native="showInput(index, item.goodsCategory)" :class="{ tags: true, 'tag-active': tags[index].active }"> <el-tag size="small" :key="index" effect="dark" :type="item.active ? '' : 'info'" @click.native="changeGoodsCategory({ id: item.id, index })" :ref="`tag-${index}`" @dblclick.native="showInput(index, item.goodsCategory)" :class="{ tags: true, 'tag-active': tags[index].active }">
<i class="del el-icon-error" @click.stop="categoryDelete(item.id)"></i> <i class="del el-icon-error" @click.stop="categoryDelete(item.id)"></i>
{{ item.goodsCategory }} {{ item.goodsCategory }}
<el-input class="input-tag" v-model="inputValue" :ref="`tag-input-${index}`" size="small" @keyup.enter.native="changeTagName({ id: item.id, index })" @blur="changeTagName({ id: item.id, index })"></el-input> <el-input class="input-tag" v-model="inputValue" :ref="`tag-input-${index}`" size="small" @keyup.enter.native="changeTagName({ id: item.id, index })" @blur="changeTagName({ id: item.id, index })"></el-input>
</el-tag> </el-tag>
</template> </template>
</div> </div> -->
<!-- <div class="wrap">
<el-input class="input-new-tag" v-if="inputVisible" v-model="tagInputValue" ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" maxlength="8"></el-input> <el-input class="input-new-tag" v-if="inputVisible" v-model="tagInputValue" ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" maxlength="8"></el-input>
<el-button class="addTag" size="small" @click="showAddInput" v-else> <el-button class="addTag" size="small" @click="showAddInput" v-else>
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span style="margin-left: 8px; margin-top: 18px">添加分类</span> <span style="margin-left: 8px; margin-top: 18px">添加分类</span>
</el-button> </el-button>
</div> -->
</div>
<div class="table_box">
<div class="tableTop topP">
<span>权益列表</span>
<GLButton fn="添加门店权益" type="primary" size="small" @click="addEquity(2)">添加门店权益</GLButton>
</div>
<GLTable ref="goodsTable" :tableParams="goodsTableParams" :tableData="goodsTableData" :tableTotal="tableTotal">
<div slot="mainPageFlag" slot-scope="scope">
<!-- <el-button type="text" @click="goodsDisplay(scope.scope)">{{ scope.scope.mainPageFlag == 1 ? '取消首页展示' : '首页展示' }}</el-button> -->
<el-switch :value="scope.scope.mainPageFlag == 1" active-color="#5850ff" inactive-color="#eee" @change="goodsDisplay(scope.scope)"></el-switch>
</div>
<div slot="goodsImage" slot-scope="scope">
<img class="equity-icon" :src="scope.scope.equityIcon" />
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span>
</GLTable>
</div> </div>
<GLButton fn = '添加门店权益' type="primary" size="small" @click="addEquity(2)" style="margin-top: 20px"> </div>
<!-- <div class="equity-wrap">
<div class="equity-wrap contain">
<GLButton fn="添加门店权益" type="primary" size="small" @click="addEquity(2)" style="margin-top: 16px">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span style="margin-left: 8px">添加门店权益</span> <span style="margin-left: 8px">添加门店权益</span>
</GLButton> </GLButton>
...@@ -55,15 +102,12 @@ ...@@ -55,15 +102,12 @@
<img class="equity-icon" :src="scope.scope.equityIcon" /> <img class="equity-icon" :src="scope.scope.equityIcon" />
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="商品权益编辑" type="text" @click="editEquity(scope.scope, 2)">编辑</GLButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<GLButton fn="商品权益上/下架" type="text" @click="updateShelves(scope.scope, 'goods')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</GLButton>
<el-button type="text" @click="setTop(scope.scope.id, 'goods')">置顶</el-button>
<el-button type="text" @click="deletEquity(scope.scope.id)" :disabled="scope.scope.status == 0 ? false : true">删除</el-button>
</span> </span>
</GLTable> </GLTable>
</div> </div>
</div> </div>
</div> </div> -->
<equity-dialog :show.sync="showDialog" :type="dialogType" :isEdit.sync="isEdit"></equity-dialog> <equity-dialog :show.sync="showDialog" :type="dialogType" :isEdit.sync="isEdit"></equity-dialog>
</div> </div>
...@@ -78,12 +122,107 @@ export default { ...@@ -78,12 +122,107 @@ export default {
return { return {
getCardListApi: this.$apis.carEquityManageApi.getCarList, getCardListApi: this.$apis.carEquityManageApi.getCarList,
getGoodListApi: this.$apis.goodsEquityManageApi.getGoodsList, getGoodListApi: this.$apis.goodsEquityManageApi.getGoodsList,
tableTotal: '', tableTotal: 0,
cardsDatail: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'data.total' }, cardsDatail: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'data.total' },
showDialog: false, showDialog: false,
isEdit: false, isEdit: false,
dialogType: 1, dialogType: 1,
editData: {} editData: {},
buttonListcar: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn: '汽车权益编辑'
},
listeners: {
click: row => this.editEquity(row.scope, 1)
}
},
{
type: 'GLButton',
name: row => {
return row.scope.status == 0 ? '上架' : '下架'
},
attrs: {
type: 'text',
fn: '汽车权益上/下架'
},
listeners: {
click: row => this.updateShelves(row.scope, 'car')
}
},
{
type: 'el-button',
name: row => {
return '置顶'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.setTop(row.scope.id, 'car')
}
}
],
buttonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn: '商品权益编辑'
},
listeners: {
click: row => this.editEquity(row.scope, 2)
}
},
{
type: 'GLButton',
name: row => {
return row.scope.status == 0 ? '上架' : '下架'
},
attrs: {
type: 'text',
fn: '商品权益上/下架'
},
listeners: {
click: row => this.updateShelves(row.scope, 'goods')
}
},
{
type: 'el-button',
name: row => {
return '置顶'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.setTop(row.scope.id, 'goods')
}
},
{
type: 'el-button',
name: row => {
return '删除'
},
attrs: {
type: 'text',
disabled: row => {
return row.scope.status == 0 ? false : true
}
},
listeners: {
click: row => this.deletEquity(row.scope.id)
}
}
],
} }
}, },
mounted() { mounted() {
...@@ -92,6 +231,17 @@ export default { ...@@ -92,6 +231,17 @@ export default {
this.init() this.init()
}, },
methods: { methods: {
listenDrop(e){
if(!e){
this.$refs.mydrown.hide()
}
},
toAddEquity(){
this.inputVisible = true
setTimeout(()=>{
this.$refs.saveTagInput.focus();
},100)
},
/*更改汽车展示状态 */ /*更改汽车展示状态 */
carsDisplay(row) { carsDisplay(row) {
if (row.mainPageFlag == null || row.mainPageFlag == 0) { if (row.mainPageFlag == null || row.mainPageFlag == 0) {
...@@ -165,10 +315,7 @@ export default { ...@@ -165,10 +315,7 @@ export default {
} }
if (status == 0) { if (status == 0) {
this.$confirm('是否下架权益', '提示', { this.$confirm('是否下架权益', '提示', {
confirmButtonText: '确认', type: 'warning'
cancelButtonText: '取消',
type: 'warning',
center: true
}).then(() => { }).then(() => {
callBack() callBack()
}) })
...@@ -180,7 +327,16 @@ export default { ...@@ -180,7 +327,16 @@ export default {
} }
</script> </script>
<style src="@a/css/tao.css"></style> <style src="@a/css/tao.css"></style>
<style scoped> <style lang="scss" scoped>
::v-deep .table-header {
display: inline-flex !important;
align-items: center;
justify-content: center;
padding: 0 !important;
.el-button {
min-width: 0;
}
}
.equity-title { .equity-title {
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
...@@ -191,11 +347,9 @@ export default { ...@@ -191,11 +347,9 @@ export default {
.tags { .tags {
background: #f4f6fc; background: #f4f6fc;
} }
.tags-box { // .tags-box {
padding: 2px 42px 2px 2px;
background: #f4f6fc; // }
border-radius: 4px;
}
.tags.el-tag { .tags.el-tag {
background: #ffffff !important; background: #ffffff !important;
border-radius: 4px !important; border-radius: 4px !important;
...@@ -232,9 +386,9 @@ export default { ...@@ -232,9 +386,9 @@ export default {
z-index: 22; z-index: 22;
} }
.input-new-tag { .input-new-tag {
width: 90px !important; border: none;
margin-left: 10px; outline: none;
vertical-align: bottom; background: #fafafa;
} }
.input-tag-show { .input-tag-show {
display: block !important; display: block !important;
...@@ -256,16 +410,32 @@ export default { ...@@ -256,16 +410,32 @@ export default {
width: 40px; width: 40px;
} }
.noneOperation { .noneOperation {
margin-top: 20px; margin-top: 16px;
} }
.fixedHeight { .fixedHeight {
height: 45px; height: 45px;
} }
.secondBox {
margin-top: 20px;
}
.tableTitle { .tableTitle {
margin: 20px 40px; /* margin: 20px 40px; */
padding: 15px 20px;
background: white;
border-bottom: 1px solid #e5e5e5;
}
.tableTop{
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px 20px 10px 24px;
background: white;
>span{
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 16px;
}
}
.topP{
padding: 3px 0 10px 4px;
} }
.el-table__fixed-right-patch { .el-table__fixed-right-patch {
position: absolute; position: absolute;
...@@ -274,16 +444,65 @@ export default { ...@@ -274,16 +444,65 @@ export default {
background-color: #fff; background-color: #fff;
} }
.tagsCtn { .tagsCtn {
position: relative;
z-index: 100;
margin-bottom: -1px;
.choseRow{
display: flex; display: flex;
flex-direction: row; overflow: hidden;
.choseItem {
display: inline-block;
box-sizing: border-box;
padding: 0 20px;
height: 40px;
line-height: 40px;
cursor: pointer;
border: 1px solid #e5e5e5;
margin-right: 1px;
border-radius: 4px 4px 0 0;
background: #fafafa;
}
.active {
color: #5850ff;
background-color: white;
font-weight: 600;
border-bottom: none;
}
.del{
font-size: 8px;
margin-left: 8px;
}
}
.hideText{
// overflow: hidden;
// text-overflow: ellipsis;
white-space: nowrap;
}
}
.drow_class{
display: flex;
align-items: center;
justify-content: space-between;
.title{
min-width: 75px;
}
}
.table_box{
border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 16px 20px;
border-radius: 0 4px 4px 4px;
background: #ffffff;
}
.equity-wrap .contain {
background: #fff;
padding: 0 20px !important;
} }
.list .contain { .equity-wrap .botp{
background: #f4f5fa; padding-bottom: 16px !important;
margin: 0px 20px 20px 40px;
padding: 20px;
} }
.list { .equity-wrap .fill{
box-shadow: initial; padding: 16px 20px !important;
} }
.tags-box .tag-active { .tags-box .tag-active {
background: #5850ff !important; background: #5850ff !important;
......
<template> <template>
<div class="layout"> <div class="detail-container">
<div class="box topBox"> <div class="wrapper flex_sca">
<!-- <back /> --> <div class="label_text">订单编号:{{ detailInfo.orderCode }}</div>
<el-button type="primary" class="backBtn" size="small" @click="$router.push('/order/index')">返回</el-button> <div class="label_text">下单时间: {{ detailInfo.time }}</div>
<div class="label_text">海威订单号: {{ thirdOrderCode }}</div>
</div>
<div class="line"></div>
<div class="wrapper flex_ss">
<template v-for="(item, index) in detailInfoObj">
<div :key="index" class="box_wrap">
<div class="title">{{item.title}}</div>
<div class="box_pannel">
<div v-for="(i,ind) in item.list" :key="ind" class="row flex_sc" :class="[index==2&&ind?'max':'']">
<div class="tip flex_cc">{{i.label}}</div>
<div v-if="i.format" class="tipval flex_sc"> {{ i.format(detailInfo) }}</div>
<div v-else class="tipval flex_sc">{{ detailInfo[i.key] || '' }}</div>
</div>
</div>
</div>
</template>
</div>
<div class="line"></div>
<div class="tableWrap">
<GLTable v-if="tableData.length" :tableParams="tableParams" :tableData="tableData" :hasNum="false" :hasPage="false">
<div class="flex_sc" slot="imgText" slot-scope="scope">
<img class="imgicon" :src="scope.scope.goodsImage">
<div class="">
<div class="title">{{scope.scope.brandName}}</div>
<div class="tip" v-if="scope.scope.appearance">{{scope.scope.productName}}{{scope.scope.denomination}}</div>
<div class="tip" v-else>{{scope.scope.productName}}{{scope.scope.productName}}</div>
</div>
</div>
</GLTable>
</div>
<div class="totalWrap flex_scb">
<span class="label">合计</span>
<div v-if="detailInfo.orderPrices" class="wrap">
<div class="label tip">
<div class="left">商品总价:</div>
<div class="right"> ¥{{ detailInfo.orderPrices }}</div>
</div>
<div style="margin:8px 0" class="label tip">
<div class="left">优惠:</div>
<div class="right">¥0.00</div>
</div>
<div class="label tip">
<div class="left">实收金额:</div>
<div class="right">¥{{ detailInfo.orderPrices }}</div>
</div>
</div>
</div>
<!-- <div class="box topBox">
<div class="grid"> <div class="grid">
<div class="grid-item">订单编号:{{ detailInfo.orderCode }}</div> <div class="grid-item">订单编号:{{ detailInfo.orderCode }}</div>
<div class="grid-item">下单时间: {{ detailInfo.time }}</div> <div class="grid-item">下单时间: {{ detailInfo.time }}</div>
...@@ -29,21 +77,19 @@ ...@@ -29,21 +77,19 @@
</div> </div>
</template> </template>
<template v-if="item.btn"> <template v-if="item.btn">
<!-- <div class="grid-btn">
售后:
<template v-if="detailInfo.openRefund == 0">
<el-button type="primary" @click="openRefund" size="small">开启</el-button>
</template>
<template v-else>
<span>已开启</span>
</template>
</div> -->
</template> </template>
</div> </div>
</template> </template>
</div> </div>
<div class="tableWrap"> <div class="tableWrap">
<d2-table :tableParams="tableParams" :tableData="tableData" :hasNum="false" :hasPage="false"></d2-table> <GLTable v-if="tableData.length" :tableParams="tableParams" :tableData="tableData" :hasNum="false" :hasPage="false">
<div slot="imgText" slot-scope="scope">
<img class="goods-img" :src="scope.scope.goodsImage">
<div class="goods-info">{{scope.scope.brandName}}</div>
<div class="goods-info" v-if="scope.scope.appearance">{{scope.scope.productName}}{{scope.scope.denomination}}</div>
<div class="goods-info" v-else>{{scope.scope.productName}}{{scope.scope.productName}}</div>
</div>
</GLTable>
</div> </div>
<div class="price-box"> <div class="price-box">
<div class="price-item"> <div class="price-item">
...@@ -59,7 +105,7 @@ ...@@ -59,7 +105,7 @@
<div class="value money">¥{{ detailInfo.orderPrices }}</div> <div class="value money">¥{{ detailInfo.orderPrices }}</div>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
...@@ -86,7 +132,7 @@ export default { ...@@ -86,7 +132,7 @@ export default {
{ {
label: '付款金额', label: '付款金额',
format(cell) { format(cell) {
return `${cell.orderPrices}元` return `${cell.orderPrices || ''}${cell.orderPrices?'元':''}`
} }
}, },
{ {
...@@ -132,50 +178,48 @@ export default { ...@@ -132,50 +178,48 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商品信息', label: '商品信息',
prop:'appearance',
addHtml:'imgText'
// minWidth: '300', // minWidth: '300',
formatter: cell => { // formatter: cell => {
let str = cell.appearance == 2 ? `<div>${cell.productName}${cell.denomination}</div>` : `<div>${cell.productName}</div>` // let str = cell.appearance == 2 ? `<div>${cell.productName}${cell.denomination}</div>` : `<div>${cell.productName}</div>`
return `<div class="goods"> // return `<div class="goods">
<div class="goods-img"> // <div class="goods-img">
<img src="${cell.goodsImage}" > // <img src="${cell.goodsImage}" >
</div> // </div>
<div class="goods-info"> // <div class="goods-info">
<div>${cell.brandName}</div> // <div>${cell.brandName}</div>
${str} // ${str}
</div> // </div>
</div>` // </div>`
} // }
}, },
{ {
label: '充值账号', label: '充值账号',
// prop: 'rechargeNumber',
prop: 'rechargeNumber' prop: 'rechargeNumber'
}, },
{ {
label: '商品形态', label: '商品形态',
prop: 'appearanceDesc' prop: 'appearanceDesc'
// minWidth: '200'
}, },
{ {
label: '单价/元', label: '单价/元',
prop: 'orderPrices' prop: 'orderPrices',
// minWidth: '200' align:'right'
}, },
{ {
label: '数量', label: '数量',
// minWidth: '200',
formatter: () => { formatter: () => {
return 1 return 1
} }
}, },
{ {
label: '小计/元', label: '小计/元',
prop: 'orderPrices' prop: 'orderPrices',
// minWidth: '200' align:'right'
}, },
{ {
label: '订单状态', label: '订单状态',
// minWidth: '200',
formatter: cell => { formatter: cell => {
return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus] return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
} }
...@@ -185,14 +229,21 @@ export default { ...@@ -185,14 +229,21 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.$route, '11111111')
this.params = { orderCode: this.$route.query.orderCode } this.params = { orderCode: this.$route.query.orderCode }
this.thirdOrderCode = this.$route.query.thirdOrderCode this.thirdOrderCode = this.$route.query.thirdOrderCode
this.getDetail(this.params) this.getDetail(this.params)
}, },
methods: { methods: {
getDetail(params) { getDetail(params) {
const loading = this.$loading({
lock: true,
text: 'Loading...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
customClass:'loadingClass'
})
this.$apis.orderApi.getOrderDetail(params).then(({ code, data }) => { this.$apis.orderApi.getOrderDetail(params).then(({ code, data }) => {
loading.close()
if (code == 0) { if (code == 0) {
data.payStatus = '已付款' data.payStatus = '已付款'
data.payType = '微信支付' data.payType = '微信支付'
...@@ -229,99 +280,194 @@ export default { ...@@ -229,99 +280,194 @@ export default {
</script> </script>
<style src="@a/css/tao.css"></style> <style src="@a/css/tao.css"></style>
<style lang="scss" scoped> <style lang="scss" scoped>
.price-box { .detail-container{
margin-top: 16px; height: 90vh;
// margin-right: 52px; padding: 0 20px;
float: right; background: #fff;
} .wrapper{
.price-item { padding: 32px 0;
width: 200px; }
font-size: 14px; .flex_sca{
font-weight: 400;
color: #333333;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-around;
margin-bottom: 14px;
.label {
width: 80px;
text-align: right;
} }
.money { .flex_ss{
color: #eb4e4e;
}
}
.goods {
display: flex; display: flex;
} }
.goods-img { .label_text{
width: 100px !important;
height: 100px !important;
margin-right: 10px;
}
.goods-info {
width: calc(100% - 110px);
}
.layout {
background-color: #fff;
margin: 0 20px 0 40px;
width: auto;
.topBox {
padding-top: 32px !important;
}
.box {
position: relative;
padding-top: 20px;
padding-left: 52px;
box-shadow: none;
.top-grid-item {
.item {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
margin-left: -30px; line-height: 20px;
.label {
// width: 71px;
text-align: right;
} }
.line{
height: 1px;
background: #e5e5e5;
} }
.box_wrap{
margin-right: 38px;
.title{
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 20px;
margin-bottom: 8px;
}
.box_pannel{
.row{
height: 36px;
} }
.grid-item { .tip{
.item, width: 118px;
.grid-btn { height: 100%;
background: #F4F6FC;
border: 1px solid #E5E5E5;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
} .tipval{
.backBtn { width: 238px;
position: absolute; height: 100%;
right: 20px; background: #FFFFFF;
top: 20px; border: 1px solid #E5E5E5;
} border-left: none;
.grayRow {
position: absolute;
top: 18px;
left: 0;
width: 100%;
background-color: #f4f6fc;
z-index: 0;
height: 54px;
}
.sub-title {
position: relative;
z-index: 1;
margin-bottom: 40px !important;
font-size: 14px; font-size: 14px;
font-weight: 400;
font-weight: 500;
color: #333333; color: #333333;
padding:0 12px;
}
.max{
height: 108px;
}
}
} }
.tableWrap { .tableWrap {
margin-left: -32px; margin-top: 32px;
.imgicon{
width: 36px;
height: 36px;
margin-right: 8px;
}
.title{
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 18px;
}
.tip{
font-size: 10px;
font-weight: 400;
color: #999999;
}
}
.totalWrap{
min-height: 108px;
padding: 0 16px;
background: #F9F9F9;
.label{
font-size: 14px;
font-weight: 400;
color: #666666;
}
.tip{
display: flex;
.left{
width: 90px;
text-align: right;
}
} }
} }
} }
// .price-box {
// margin-top: 16px;
// // margin-right: 52px;
// float: right;
// }
// .price-item {
// width: 200px;
// font-size: 14px;
// font-weight: 400;
// color: #333333;
// display: flex;
// align-items: center;
// justify-content: space-between;
// margin-bottom: 14px;
// .label {
// width: 80px;
// text-align: right;
// }
// .money {
// color: #eb4e4e;
// }
// }
// .goods {
// display: flex;
// }
// .goods-img {
// width: 100px !important;
// height: 100px !important;
// margin-right: 10px;
// }
// .goods-info {
// width: calc(100% - 110px);
// }
// .layout {
// background-color: #fff;
// .topBox {
// padding-top: 32px !important;
// }
// .box {
// position: relative;
// padding-top: 20px;
// padding-left: 52px;
// box-shadow: none;
// .top-grid-item {
// .item {
// font-size: 14px;
// font-weight: 400;
// color: #333333;
// margin-left: -30px;
// .label {
// // width: 71px;
// text-align: right;
// }
// }
// }
// .grid-item {
// .item,
// .grid-btn {
// font-size: 14px;
// font-weight: 400;
// color: #333333;
// }
// }
// .backBtn {
// position: absolute;
// right: 20px;
// top: 20px;
// }
// .grayRow {
// position: absolute;
// top: 18px;
// left: 0;
// width: 100%;
// background-color: #f4f6fc;
// z-index: 0;
// height: 54px;
// }
// .sub-title {
// position: relative;
// z-index: 1;
// margin-bottom: 40px !important;
// font-size: 14px;
// font-weight: 500;
// color: #333333;
// }
// }
// }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right"> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-row style="display: flex; align-items: center"> <div class="out_wrap">
<el-form-item size="small" label="订单编号"> <div class="choseRow flex_scb">
<el-input size="small" v-model="searchForm.orderCode" placeholder="请输入"></el-input> <div class="wrap">
</el-form-item>
<el-form-item size="small" label="品牌名称">
<el-select size="small" v-model="searchForm.brandName" filterable placeholder="请选择">
<el-option v-for="item in brandList" :key="item.brandId" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="商品名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="门店名称">
<el-input v-model="searchForm.merchantName" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item size="small" label="用户信息">
<el-input v-model="searchForm.userInfo" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item size="small" label="下单时间">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</el-form-item>
</el-row>
</el-form>
<div class="choseRow">
<div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)"> <div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)">
{{ item }} {{ item }}
</div> </div>
</div> </div>
<!-- :noDataImg="url" --> <el-button :size="size" plain @click="handleExport">导出</el-button>
<GLTable v-if="flag" :noDataImg="url" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> </div>
</div>
<div class="table_box">
<GLTable v-if="flag" :noDataImg="url" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="goodsMsg" slot-scope="scope"> <span slot="goodsMsg" slot-scope="scope">
<div>{{ scope.scope.brandName }}</div> <div class="mb4">{{ scope.scope.brandName }}</div>
<div>{{ scope.scope.appearance == 2 ? scope.scope.productName + scope.scope.denomination : scope.scope.productName }}</div> <div class="min-text">{{ scope.scope.appearance == 2 ? scope.scope.productName + scope.scope.denomination : scope.scope.productName }}</div>
</span> </span>
<span slot="orderNum" slot-scope="scope"> <!-- <span slot="orderNum" slot-scope="scope">
<div>{{ scope.scope.orderCode }}</div> <div>{{ scope.scope.orderCode }}</div>
</span> </span> -->
<span slot="priceAmount" slot-scope="scope"> <!-- <span slot="priceAmount" slot-scope="scope">
<div>{{ scope.scope.salePrices }}元</div> <div>{{ scope.scope.salePrices }}元</div>
<div>{{ scope.scope.goodsQuality }}张</div> <div>{{ scope.scope.goodsQuality }}张</div>
<div></div> <div></div>
</span> </span> -->
.
<span slot="userInfo" slot-scope="scope"> <span slot="userInfo" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div> <div class="mb4">{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div> <div class="min-text">{{ scope.scope.mobile }}</div>
</span> </span>
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: scope.scope.appearance == 2 ? colors2[scope.scope.orderStatus] : colors1[scope.scope.orderStatus] }"></div>
<span v-if="scope.scope.appearance == 2">{{ qb_statusEnum[scope.scope.orderStatus] }}</span>
<span v-else>{{ statusEnum[scope.scope.orderStatus] }}</span>
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="查看订单详情" type="text" @click="jump(scope.scope, 'order')">查看详情</GLButton> <GLButton fn="查看订单详情" type="text" @click="jump(scope.scope, 'order')">查看详情</GLButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
</div> </div>
</div>
</template> </template>
<script type="text/ecmascript-6">
<script type='text/ecmascript-6'>
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { orderMixin, searchMixin } from '@/mixins' import { orderMixin, searchMixin } from '@/mixins'
export default { export default {
...@@ -84,57 +63,115 @@ export default { ...@@ -84,57 +63,115 @@ export default {
tabIndex: '', tabIndex: '',
flag: true, flag: true,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm: {}, searchForm: {
orderCode: '',
brandName: '',
productName: '',
merchantName: '',
userInfo: '',
daterange: ''
},
searchFormData: [
{
label: '订单编号',
name: 'orderCode',
type: 'input',
isClear: true
},
{
label: '品牌名称',
name: 'brandName',
type: 'select',
optionList: [],
optionId: 'brandName',
optionLabel: 'brandName',
isClear: true
},
{
label: '商品名称',
name: 'productName',
type: 'input',
isClear: true
},
{
label: '门店名称',
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '用户信息',
name: 'userInfo',
type: 'input',
isClear: true
},
{
label: '下单时间',
name: 'daterange',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
}
],
searchFormTable: {}, searchFormTable: {},
tableParams: { tableParams: {
listName: 'list', listName: 'list',
getListApi: this.$apis.orderApi.getOrderList, getListApi: this.$apis.orderApi.getOrderList,
tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '商品信息', label: '商品信息',
width: '100', width: '200',
align: 'left',
addHtml: 'goodsMsg' addHtml: 'goodsMsg'
}, },
{ {
label: '充值账号', label: '充值账号',
prop: 'rechargeNumber', prop: 'rechargeNumber',
width: '200', width: '200'
}, },
{ {
label: '订单门店', label: '订单门店',
prop: 'merchantName', prop: 'merchantName',
minWidth: '180' minWidth: 200,
line:1
// formatter(cell) { // formatter(cell) {
// return cell.merchantName || '' // return cell.merchantName || ''
// } // }
}, },
{ {
label: '价格/数量', label: '价格/元',
addHtml: 'priceAmount', width: 110,
width: '100' align: 'right',
// formatter(cell) { prop: 'salePrices'
// return `${cell.salePrices}元 },
// ${cell.goodsQuality}张` {
// } label: '数量/张',
width: 110,
align: 'right',
prop: 'goodsQuality'
}, },
{ {
label: '实收金额', label: '实收金额',
prop: 'orderPrices' prop: 'orderPrices',
// width: '100' width: '110',
align: 'right'
}, },
{ {
label: '订单状态', label: '订单状态',
// width: '100', width: '110',
formatter: cell => { addHtml: 'colorStatus'
return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus] // formatter: cell => {
} // return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
// }
}, },
{ {
label: '下单时间', label: '下单时间',
prop: 'validitDate', prop: 'validitDate',
width: '100', width: '180',
// sortable: true, // sortable: true,
formatter(cell) { formatter(cell) {
return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -' return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -'
...@@ -152,17 +189,43 @@ export default { ...@@ -152,17 +189,43 @@ export default {
{ {
label: '订单编号', label: '订单编号',
width: '280', width: '280',
addHtml: 'orderNum' prop: 'orderCode'
}, },
{ {
label: '海威订单号', label: '海威订单号',
minWidth: '100', minWidth: '220',
prop: 'thirdOrderCode' prop: 'thirdOrderCode'
},
{
label: '操作',
width: 100,
fixed: 'right',
addHtml: 'auth-button'
} }
] ]
},
colors1: {
0: '#999999',
1: '#2CCA74',
2: '#FDB757',
3: '#2CCA74',
4: '#5850FF',
5: '#EB4E4E',
6: '#2CCA74'
},
colors2: {
3: '#2CCA74',
6: '#EB4E4E',
2: '#5850FF'
} }
} }
}, },
created() {
this.$apis.orderApi.getAllBrandList({}).then(({ data }) => {
const item = this.searchFormData.find(item => item.name === 'brandName')
item.optionList = data
})
},
mounted() {}, mounted() {},
methods: { methods: {
handleExport() { handleExport() {
...@@ -279,48 +342,70 @@ export default { ...@@ -279,48 +342,70 @@ export default {
} }
// <style src="@a/css/tao.css"></style> // <style src="@a/css/tao.css"></style>
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.equity-wrap .contain { .equity-wrap .contain {
margin-top: 20px; .out_wrap {
position: relative;
z-index: 100;
margin-bottom: -1px;
}
.choseRow { .choseRow {
display: flex; display: flex;
height: 34px;
.choseItem { .choseItem {
display: inline-block;
box-sizing: border-box;
padding: 0 20px;
height: 40px;
line-height: 40px;
cursor: pointer; cursor: pointer;
width: 120px; border: 1px solid #e5e5e5;
height: 34px; margin-right: 1px;
line-height: 34px; border-radius: 4px 4px 0 0;
text-align: center; background: #fafafa;
font-size: 14px;
font-weight: 400;
color: #333333;
} }
.active { .active {
color: #5850ff; color: #5850ff;
background-color: #f4f6fc; background-color: white;
font-weight: 600;
border-bottom: none;
} }
} }
.flex_scb{
display: flex;
align-items: center;
justify-content: space-between;
}
.table_box{
border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 16px 20px;
border-radius: 0 4px 4px 4px;
}
.mb4 {
margin-bottom: 4px;
}
.min-text {
font-size: 10px;
color: #999;
font-weight: 400;
}
} }
.el-form-item { // .el-form-item {
margin-bottom: 15px; // margin-bottom: 15px;
} // }
.el-range-editor.is-active, // .el-range-editor.is-active,
.el-range-editor.is-active:hover { // .el-range-editor.is-active:hover {
border-color: #5850ff; // border-color: #5850ff;
width: 215px; // width: 215px;
} // }
.el-range-editor--small.el-input__inner { // .el-range-editor--small.el-input__inner {
width: 215px; // width: 215px;
} // }
/deep/ .contain .el-input--small .el-input__inner { // /deep/ .contain .el-input--small .el-input__inner {
width: 215px; // width: 215px;
} // }
// .el-tabs__nav-wrap:after { // .el-tabs__nav-wrap:after {
// display: none; // display: none;
// } // }
// .container { // .container {
// width: 1160px; // width: 1160px;
......
<template> <template>
<div> <div>
<!-- 领卡用户明细 --> <!-- 领卡用户明细 -->
<el-dialog :close-on-click-modal="false" title="领卡用户明细" :visible.sync="isVisible" width="1080px" class="user-detail-dialog" @close="handleReset()"> <GLDialog mode="big" :hasFooter="false" :close-on-click-modal="false" bigTitle="领卡用户明细" :visible.sync="isVisible" @close="handleReset()">
<div class="contain equity-wrap" style="margin: 20px 0px 20px 0px !important"> <div class="contain equity-wrap" style="margin: 20px 0px 20px 0px !important">
<glsx-combi-form ref="showSearch" labelWidth="120px" defaultWidth="215px" :formObj="batchListSearch" :formData="userDetailForm"> <glsx-combi-form ref="showSearch" labelWidth="120px" defaultWidth="215px" :formObj="batchListSearch" :formData="userDetailForm">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns"></span>
</span>
</glsx-combi-form> </glsx-combi-form>
<div style="padding:0 20px 20px"> <div style="padding: 0 20px 20px">
<div style="float: right; margin-right: 0;margin-bottom:10px;"> <div style="float: right; margin-right: 0; margin-bottom: 10px">
<el-button size="small" @click="handleReset('reset')">重置</el-button> <el-button plain size="small" @click="handleReset('reset')">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button> <el-button size="small" @click="handleSearch">查询</el-button>
<el-button type="primary" size="small" @click="handleExport" class="selectBtn">导出</el-button> <el-button size="small" @click="handleExport" class="selectBtn">导出</el-button>
</div> </div>
<GLTable ref="userDetailTable" :hasNum="false" @hook:mounted="setTabelHeight" :searchForm="searchForm" :tableParams="batchTableParams" :getListApi="getListApi" :pageConf="batchPageConf" :noDataImg="url" :beforeSearchFn="beforeSearchFn"> <GLTable ref="userDetailTable" :hasNum="false" @hook:mounted="setTabelHeight" :searchForm="searchForm" :tableParams="batchTableParams" :getListApi="getListApi" :pageConf="batchPageConf" :noDataImg="url" :beforeSearchFn="beforeSearchFn">
<div slot="status" slot-scope="scope"> <div class="flex_sc" slot="status" slot-scope="scope">
<p :style="{color:scope.scope.status==1 ? '#2CCA74': '#CCC'}">{{ setStatusVal(scope.scope.status) }}</p> <div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span :style="{color:scope.scope.status==1 ? '#2CCA74': '#CCC'}">{{ setStatusVal(scope.scope.status) }}</span>
</div> </div>
<!-- <div slot="status" slot-scope="scope">
<p :style="{color:scope.scope.status==1 ? '#2CCA74': '#CCC'}">{{ setStatusVal(scope.scope.status) }}</p>
</div> -->
</GLTable> </GLTable>
</div> </div>
</div> </div>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -78,17 +81,17 @@ const activeTypeList = [ ...@@ -78,17 +81,17 @@ const activeTypeList = [
{ {
confId: 12, confId: 12,
confName: '无忧服务' confName: '无忧服务'
}, }
]; ]
export default { export default {
name: 'detailDialog', name: 'detailDialog',
data() { data() {
return { return {
url, url,
cardClassId: '', cardClassId: '',
tableData:[], tableData: [],
isVisible:false, isVisible: false,
getListApi:this.$apis.equityApi.getcardRecordList, getListApi: this.$apis.equityApi.getcardRecordList,
// editRuleUser:{ // editRuleUser:{
// mobile:[ // mobile:[
// { // {
...@@ -99,16 +102,16 @@ export default { ...@@ -99,16 +102,16 @@ export default {
// } // }
// ] // ]
// }, // },
batchListSearch:{ batchListSearch: {
mobile:'', //手机号 mobile: '', //手机号
merchantName:'', //开通门店 merchantName: '', //开通门店
activeType:'', //开通方式 activeType: '', //开通方式
status:'', // 状态 status: '', // 状态
activeTime: [], // 开通日期 activeTime: [], // 开通日期
memberType:'' memberType: ''
}, },
searchForm:{}, searchForm: {},
baseData:{ baseData: {
activeTypeList: [ activeTypeList: [
{ {
confId: 1, confId: 1,
...@@ -149,11 +152,11 @@ export default { ...@@ -149,11 +152,11 @@ export default {
{ {
confId: 12, confId: 12,
confName: '购买数字化权益赠送' confName: '购买数字化权益赠送'
}, }
], ]
}, },
userDetailForm:[ userDetailForm: [
{ {
label: '用户信息', label: '用户信息',
name: 'mobile', name: 'mobile',
...@@ -225,9 +228,9 @@ export default { ...@@ -225,9 +228,9 @@ export default {
label: '开通日期', label: '开通日期',
name: 'activeTime', name: 'activeTime',
type: 'datePicker', type: 'datePicker',
valueFormat:'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd',
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
}, }
], ],
batchTableParams: { batchTableParams: {
listName: 'list', listName: 'list',
...@@ -242,7 +245,7 @@ export default { ...@@ -242,7 +245,7 @@ export default {
label: '会员类型', label: '会员类型',
prop: 'memberType', prop: 'memberType',
formatter: cellValue => { formatter: cellValue => {
return cellValue.memberType==1 ? '正式会员' : '试用会员' return cellValue.memberType == 1 ? '正式会员' : '试用会员'
} }
}, },
{ {
...@@ -257,9 +260,9 @@ export default { ...@@ -257,9 +260,9 @@ export default {
line: 1, line: 1,
formatter: cellValue => { formatter: cellValue => {
// return cellValue.activeTypeDescList || "-" // return cellValue.activeTypeDescList || "-"
if(cellValue.activeTypeDescList && Array.isArray(cellValue.activeTypeDescList ) && cellValue.activeTypeDescList.length>0){ if (cellValue.activeTypeDescList && Array.isArray(cellValue.activeTypeDescList) && cellValue.activeTypeDescList.length > 0) {
return cellValue.activeTypeDescList.join('+') return cellValue.activeTypeDescList.join('+')
}else{ } else {
return '-' return '-'
} }
} }
...@@ -274,45 +277,45 @@ export default { ...@@ -274,45 +277,45 @@ export default {
prop: 'activeTime', prop: 'activeTime',
width: 200, width: 200,
formatter: cellValue => { formatter: cellValue => {
if(cellValue.activeTime){ if (cellValue.activeTime) {
const dateArr = cellValue.activeTime.split(' ') const dateArr = cellValue.activeTime.split(' ')
return cellValue.activeTime.split(' ')[0] return cellValue.activeTime.split(' ')[0]
}else{ } else {
return '-' return '-'
} }
} }
} }
] ]
}, },
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' } batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
colors: ['', '#2CCA74', '#999999']
} }
}, },
mounted() { mounted() {},
},
methods: { methods: {
show(row){ show(row) {
this.isVisible = !this.isVisible this.isVisible = !this.isVisible
this.cardClassId = row.id this.cardClassId = row.id
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs.userDetailTable.refreshTable() this.$refs.userDetailTable.refreshTable()
}) })
}, },
setStatusVal(status){ setStatusVal(status) {
return {1: '生效中', 2: '已失效'}[status] return { 1: '生效中', 2: '已失效' }[status]
}, },
setTabelHeight() { setTabelHeight() {
this.$refs.userDetailTable.tableHeightValues = '328' this.$refs.userDetailTable.tableHeightValues = '328'
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchForm = {...this.setParams()} this.searchForm = { ...this.setParams() }
console.log(this.searchForm,this.batchListSearch,'参数') console.log(this.searchForm, this.batchListSearch, '参数')
resolve() resolve()
}) })
}, },
setParams(){ setParams() {
let params = JSON.parse(JSON.stringify(this.batchListSearch)) let params = JSON.parse(JSON.stringify(this.batchListSearch))
if(Array.isArray(params.activeTime) && params.activeTime.length>0){ if (Array.isArray(params.activeTime) && params.activeTime.length > 0) {
params.startTime = params.activeTime[0] + ' 00:00:00' params.startTime = params.activeTime[0] + ' 00:00:00'
params.endTime = params.activeTime[1] + ' 23:59:59' params.endTime = params.activeTime[1] + ' 23:59:59'
} }
...@@ -322,10 +325,10 @@ export default { ...@@ -322,10 +325,10 @@ export default {
delete params.activeTime delete params.activeTime
delete params.mobile delete params.mobile
console.log(params) console.log(params)
return params; return params
}, },
handleExport(){ handleExport() {
const parmas = {...this.setParams()} const parmas = { ...this.setParams() }
this.$apis.equityApi.exportcardRecordList(parmas).then(({ code, data, message }) => { this.$apis.equityApi.exportcardRecordList(parmas).then(({ code, data, message }) => {
if (code == 0) { if (code == 0) {
var a = document.createElement('a') var a = document.createElement('a')
...@@ -339,19 +342,19 @@ export default { ...@@ -339,19 +342,19 @@ export default {
} }
}) })
}, },
handleSearch(){ handleSearch() {
this.$refs.userDetailTable.refreshTable() this.$refs.userDetailTable.refreshTable()
}, },
handleReset(type){ handleReset(type) {
this.batchListSearch = { this.batchListSearch = {
mobile:'', mobile: '',
merchantName:'', merchantName: '',
activeType:'', activeType: '',
status:'', status: '',
activeTime: [], activeTime: [],
memberType:'' memberType: ''
} }
if(type==='reset'){ if (type === 'reset') {
this.handleSearch() this.handleSearch()
} }
} }
...@@ -359,15 +362,15 @@ export default { ...@@ -359,15 +362,15 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .user-detail-dialog{ /deep/ .user-detail-dialog {
.el-form-item{ .el-form-item {
margin-right: 0; margin-right: 0;
} }
.el-input--small .el-input__inner{ .el-input--small .el-input__inner {
width: 215px; width: 215px;
} }
.el-table__row{ .el-table__row {
.el-table__cell{ .el-table__cell {
padding: 9px 0; padding: 9px 0;
} }
} }
......
<!-- -->
<template> <template>
<div style="margin-top: 30px" class="card-manage"> <div class="card-manage">
<div class="button"> <!-- <div class="button">
<el-button type="primary" @click="addCard('true')" size="small" style="width: 128px"> <el-button type="primary" @click="addCard('true')" size="small" style="width: 128px">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span style="margin-left: 8px">新建权益卡</span> <span style="margin-left: 8px">新建权益卡</span>
</el-button> </el-button>
</div>
<div class="tableBox" style="margin-top: 20px;">
<div class="topline">
<!-- <div class="selectStore">搜索门店</div>
<el-select size="small" v-model="searchForm.merchantName" filterable remote reserve-keyword placeholder="请输入门店名称" :remote-method="remoteMethod" :loading="loading" clearable style="margin-left: 10px">
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select> -->
<el-form :inline="true" style="width: 100%; margin-left: 10px;" :model="searchForm" label-width="108px" label-position="right">
<el-row style="display: flex; align-items: center">
<el-form-item size="small" label="搜索门店">
<el-select size="small" v-model="searchForm.merchantName" remote reserve-keyword filterable placeholder="请输入门店名称" :remote-method="remoteMethod" :loading="loading" clearable >
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="权益卡名称">
<el-input size="small" v-model="searchForm.cardClassName" placeholder="请输入权益卡名称"></el-input>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button plain size="small" class="selectBtn" @click="selectStore('reset')">重置</el-button>
<el-button type="primary" size="small" style="margin-left: 20px" class="selectBtn" @click="selectStore('select')">搜索</el-button>
</el-form-item>
</el-row>
</el-form>
<!-- <div class="operationBtn">
<el-button plain size="small" class="selectBtn" @click="selectStore('reset')">重置</el-button>
<el-button type="primary" size="small" style="margin-left: 20px" class="selectBtn" @click="selectStore('select')">搜索</el-button>
</div> --> </div> -->
<div class="tableBox">
<!-- <div class="topline"></div> -->
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="selectStore('select')" @handleRest="selectStore('reset')"></GLCombiForm>
<div class="btn-grounp">
<span class="title">权益卡列表</span>
<el-button type="primary" @click="addCard('true')" size="small">
<i class="el-icon-plus"></i>
<span style="margin-left: 8px">新建权益卡</span>
</el-button>
</div> </div>
<div class="tableCtn"> <div class="tableCtn">
<GLTable ref="recordTable" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun"> <GLTable ref="recordTable" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun">
<div slot="recipientCount" slot-scope="scope"> <div slot="recipientCount" slot-scope="scope">
<p class="cursor-pointer" style="color:#5850ff" @click="handleDetail(scope.scope)">{{ scope.scope.recipientCount }}</p> <p class="cursor-pointer" style="color: #5850ff" @click="handleDetail(scope.scope)">{{ scope.scope.recipientCount }}</p>
</div>
<div class="flex_sc" slot="colorStatus">
<div class="table_point" :style="{ background: '#2CCA74' }"></div>
<span>上架</span>
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn ='权益卡管理编辑' type="text" @click="edit(scope.scope)" class="tableBtn" size="small">编辑</GLButton> <!-- <GLButton fn="权益卡管理编辑" type="text" @click="edit(scope.scope)" class="tableBtn" size="small">编辑</GLButton>
<el-button type="text" :disabled="scope.scope.tryAble == 0 ? true : false" @click="extension(scope.scope)" class="tableBtn" size="small">推广</el-button> <el-button type="text" :disabled="scope.scope.tryAble == 0 ? true : false" @click="extension(scope.scope)" class="tableBtn" size="small">推广</el-button>
<el-button type="text" @click="copy(scope.scope)" class="tableBtn" size="small">复制</el-button> <el-button type="text" @click="copy(scope.scope)" class="tableBtn" size="small">复制</el-button> -->
<GLTableButton :buttonList="recordButtonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
</div> </div>
<!-- 推广弹窗 --> <!-- 推广弹窗 -->
<el-dialog title="试用推广" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false" width="547px" class="addCardsDialog"> <GLDialog mode="mid" title="试用推广" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false">
<!-- <div class="baseinformation"><span class="titleText">试用推广</span></div> -->
<el-form :model="editForm" :rules="rules" ref="ruleForm" label-width="68px"> <el-form :model="editForm" :rules="rules" ref="ruleForm" label-width="68px">
<div class="form"> <div class="form">
<div class="main-qrcode"> <div class="main-qrcode">
...@@ -66,15 +52,13 @@ ...@@ -66,15 +52,13 @@
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button size="small" @click="handleClose">取消</el-button> <el-button size="small" @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="small">确定</el-button> <el-button size="small" type="primary" @click="handleConfirm">确定</el-button>
</div> </div>
</el-dialog> </GLDialog>
<!-- 新建权益卡弹窗 --> <!-- 新建权益卡弹窗 -->
<el-dialog title="基本信息" v-if="dialogVisible" :visible.sync="dialogVisible" width="958px" :before-close="closeDialog" class="addCardsDialog"> <!-- <GLDialog mode="big" bigTitle="基本信息" v-if="dialogVisible" :visible.sync="dialogVisible" :before-close="closeDialog">
<!-- <div class="baseinformation"><span class="titleText">基本信息</span></div> --> <div class="gl-form-page">
<el-form class="dialogForm" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="auto" label-position="left"> <el-form class="dialogForm" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="154px">
<!-- 基础表单 -->
<div class="form">
<el-form-item label="名称:" prop="cardClassName" id="name"> <el-form-item label="名称:" prop="cardClassName" id="name">
<el-input v-model="ruleForm.cardClassName" maxlength="15" type="text" size="small" placeholder="请输入"></el-input> <el-input v-model="ruleForm.cardClassName" maxlength="15" type="text" size="small" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
...@@ -94,9 +78,9 @@ ...@@ -94,9 +78,9 @@
<el-radio-group v-model="ruleForm.effectiveType"> <el-radio-group v-model="ruleForm.effectiveType">
<el-radio label="1" @change="e => controlSwitch(e, 'disable')">永久有效</el-radio> <el-radio label="1" @change="e => controlSwitch(e, 'disable')">永久有效</el-radio>
<el-radio label="2" @change="e => controlSwitch(e, 'input')"> <el-radio label="2" @change="e => controlSwitch(e, 'input')">
<span style="margin-right:10px">领取时起</span> <span style="margin-right: 10px">领取时起</span>
<el-input-number v-model="effectiveNum" controls-position="right" :min="1" :max="999" id="month" :disabled="ruleForm.effectiveType !== '2'" size="mini" change=""></el-input-number> <el-input-number v-model="effectiveNum" controls-position="right" :min="1" :max="999" id="month" :disabled="ruleForm.effectiveType !== '2'" size="mini" change=""></el-input-number>
<span style="margin-left:10px">天内有效</span> <span style="margin-left: 10px">天内有效</span>
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -105,15 +89,12 @@ ...@@ -105,15 +89,12 @@
<span class="codeTxt">用于关联流量卡服务测的商品</span> <span class="codeTxt">用于关联流量卡服务测的商品</span>
</el-form-item> </el-form-item>
<el-form-item label="使用说明:" prop="usageNotes"> <el-form-item label="使用说明:" prop="usageNotes">
<el-input type="textarea" v-model="ruleForm.usageNotes" style="width: 320px" maxlength="500" size="small"></el-input> <el-input type="textarea" :rows="3" v-model="ruleForm.usageNotes" maxlength="500" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label=" 售价:" prop="price"> <el-form-item label="售价/元:" prop="price">
<el-input-number v-model="ruleForm.price" controls-position="right" size="mini" :min="1" :max="9999.99"></el-input-number> <el-input-number v-model="ruleForm.price" controls-position="right" size="mini" :min="1" :max="9999.99"></el-input-number>
元
</el-form-item> </el-form-item>
</div>
<div class="baseinformation2"><span class="titleText">其他信息</span></div> <div class="baseinformation2"><span class="titleText">其他信息</span></div>
<div class="form">
<el-form-item label="试用设置:" prop=""> <el-form-item label="试用设置:" prop="">
<el-switch v-model="value" active-color="" inactive-color="#d3d3d3"></el-switch> <el-switch v-model="value" active-color="" inactive-color="#d3d3d3"></el-switch>
</el-form-item> </el-form-item>
...@@ -122,23 +103,106 @@ ...@@ -122,23 +103,106 @@
天试用 天试用
<span class="codeTxt2">设置后将生成试用链接和二维码可用于推广</span> <span class="codeTxt2">设置后将生成试用链接和二维码可用于推广</span>
</el-form-item> </el-form-item>
</div>
<!-- <div class="buttonCtn">
<el-form-item>
<el-button :disabled="submitBtn" type="primary" @click="submitForm('ruleForm')" size="small">提交</el-button>
<el-button size="small" @click="resetForm('ruleForm')">取消</el-button>
</el-form-item>
</div> -->
</el-form> </el-form>
</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="resetForm('ruleForm')">取消</el-button> <el-button size="small" @click="resetForm('ruleForm')">取消</el-button>
<el-button :disabled="submitBtn" type="primary" @click="submitForm('ruleForm')" size="small">提交</el-button> <el-button size="small" :disabled="submitBtn" type="primary" @click="submitForm('ruleForm')">提交</el-button>
</span> </span>
</el-dialog> </GLDialog> -->
<detail-dialog ref="detailDetailRef"></detail-dialog> <detail-dialog ref="detailDetailRef"></detail-dialog>
<el-drawer v-if="dialogVisible" :with-header="false" class="drawer-panel" size="45%" title="新建权益卡" :visible.sync="dialogVisible" :before-close="closeDialog">
<div class="drawer-header flex_scb">
<span class="title">新建权益卡</span>
<i class="el-icon-close"></i>
</div>
<div class="drawer-wrapper gl-form-page gl-form-min">
<el-form class="form" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="154px">
<el-form-item label="名称:" prop="cardClassName" id="name">
<el-input clearable v-model="ruleForm.cardClassName" maxlength="15" type="text" size="small" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="卡片样式:" prop="backgroundImage">
<div class="imageList">
<div v-for="(item, index) in product" :key="index" :id="item.id" @click="changeStyle(item.id, item.src)" :class="{ imgCtn: true, imgBg: item.src === ruleForm.backgroundImage }">
<img :src="item.imgSrc" alt="" class="imageItem" />
<i v-if="item.src === ruleForm.backgroundImage" class="imgicon el-icon-success"></i>
</div>
</div>
</el-form-item>
<el-form-item label="渠道门店:" prop="merchantName">
<el-select size="small" clearable v-model="ruleForm.merchantName" filterable remote reserve-keyword placeholder="请输入门店名称" :remote-method="generateRemoteMethod" :loading="loading" :disabled="disableSelect">
<el-option v-for="(item, index) in generateOptions" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="有效期:" prop="effectiveType">
<el-radio-group v-model="ruleForm.effectiveType">
<el-radio label="1" @change="e => controlSwitch(e, 'disable')">永久有效</el-radio>
<el-radio label="2" @change="e => controlSwitch(e, 'input')">
<span style="margin-right: 10px">领取时起</span>
<el-input-number v-model="effectiveNum" :min="1" :max="999" id="month" :disabled="ruleForm.effectiveType !== '2'" size="mini" change=""></el-input-number>
<span style="margin-left: 10px">天内有效</span>
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="">
<div slot="label">
<div class="custome_label">
<span>权益商品编码</span>
<el-popover
placement="top-start"
trigger="hover"
content="用于关联流量卡服务测的商品">
<i slot="reference" class="gl-icon-circle-question">:</i>
</el-popover>
</div>
</div>
<!-- <el-input-number v-model="ruleForm.platformGoodsId" size="small" :controls="disableInputNumber"></el-input-number> -->
<el-input clearable v-model="ruleForm.platformGoodsId" type="text" size="small" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="使用说明:" prop="usageNotes">
<el-input type="textarea" clearable show-word-limit :rows="3" v-model="ruleForm.usageNotes" maxlength="500" size="small"></el-input>
</el-form-item>
<el-form-item label="售价/元:" prop="price">
<!-- <el-input-number v-model="ruleForm.price" controls-position="right" size="mini" :min="1" :max="9999.99"></el-input-number> -->
<el-input clearable v-model="ruleForm.price" maxlength="7" type="text" size="small" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item style="margin-bottom:0" label="试用设置:" prop="">
<el-switch v-model="value" active-color="" inactive-color="#d3d3d3"></el-switch>
</el-form-item>
<el-form-item v-show="value" :prop="value == false ? '' : 'tryNum'" >
<div class="custom_wrap flex_cc">
<div class="line flex_sc">
<div class="custome_label">
<span style="color:red">*</span>
<span>试用时长</span>
<el-popover
placement="top-start"
trigger="hover"
content="设置后将生成试用链接和二维码可用于推广">
<i slot="reference" class="gl-icon-circle-question">:</i>
</el-popover>
</div>
<div class="custome_value flex_sc">
<el-input-number v-model="tryNum" size="mini" :disabled="!hasTryNum" :min="1" :max="365"></el-input-number>
<span style="margin-left:8px">天试用</span>
</div>
</div>
</div>
</el-form-item>
<!-- <el-form-item label="试用时长:" :prop="value == false ? '' : 'tryNum'" v-show="value">
<el-input-number v-model="tryNum" controls-position="right" size="mini" :disabled="!hasTryNum" :min="1" :max="365"></el-input-number>
天试用
<span class="codeTxt2">设置后将生成试用链接和二维码可用于推广</span>
</el-form-item> -->
</el-form>
</div>
<div class="drawer-footer">
<el-button @click="resetForm('ruleForm')" class="cancel-btn" size="small">取消</el-button>
<el-button @click="submitForm('ruleForm')" size="small" type="primary">确定</el-button>
</div>
</el-drawer>
</div> </div>
</template> </template>
<script> <script>
const cloneText = message => { const cloneText = message => {
let input = document.createElement('input') let input = document.createElement('input')
...@@ -209,12 +273,54 @@ export default { ...@@ -209,12 +273,54 @@ export default {
url: '', url: '',
qrCode: '' qrCode: ''
}, },
recordButtonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn: '权益卡管理编辑'
},
listeners: {
click: row => this.edit(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '推广'
},
attrs: {
type: 'text',
disabled: (row, condition) => {
return false
}
},
listeners: {
click: row => this.extension(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '复制'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.copy(row.scope)
}
}
],
product: [ product: [
{ {
id: 'firstImg', id: 'firstImg',
imgSrc: require('./images/card0.png'), imgSrc: require('./images/card0.png'),
src: './images/card0.png' src: './images/card0.png'
}, }
], ],
rules: { rules: {
cardClassName: [ cardClassName: [
...@@ -234,33 +340,43 @@ export default { ...@@ -234,33 +340,43 @@ export default {
// getListApi: none, // getListApi: none,
searchForm: { searchForm: {
merchantName: '', merchantName: '',
cardClassName:'' cardClassName: ''
},
searchFormData: [
{
label: '搜索门店',
name: 'merchantName',
type: 'input',
isClear: true
}, },
{
label: '权益卡名称',
name: 'cardClassName',
type: 'input',
isClear: true
}
],
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '权益卡名称', label: '权益卡名称',
prop: 'cardClassName' prop: 'cardClassName',
// minWidth: '200' width: 200,
line: 1
}, },
{ {
label: '门店名称', label: '门店名称',
prop: 'merchantName', prop: 'merchantName',
minWidth: '200' width: 300,
// formatter: (cellValue) => { line: 1
// let arr = []
// cellValue.memberRights.map(e => {
// if (e) arr.push(e.name)
// })
// return arr.join('、')
// }
}, },
{ {
label: '有效期', label: '有效期',
prop: 'effectiveType', prop: 'effectiveType',
width: 200,
line: 1,
formatter: cellValue => { formatter: cellValue => {
if (cellValue.effectiveType == 1) { if (cellValue.effectiveType == 1) {
return '长期有效' return '长期有效'
...@@ -270,37 +386,45 @@ export default { ...@@ -270,37 +386,45 @@ export default {
} }
}, },
{ {
label: '售价', label: '售价/元',
prop: 'price', prop: 'price',
align: 'right',
width:150,
formatter: cellValue => { formatter: cellValue => {
if (cellValue.price == null) { if (cellValue.price == null) {
return '39.9' + '元' return '39.9'
} else { } else {
return cellValue.price + '元' return parseFloat(cellValue.price).toFixed(2)
} }
} }
}, },
{ {
label: '领卡用户', label: '领卡用户',
prop: 'recipientCount', prop: 'recipientCount',
// width: 110, addHtml: 'recipientCount',
// tagLabel: true width:150,
addHtml: 'recipientCount'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
formatter: cellValue => { addHtml:'colorStatus'
return '正常' // formatter: cellValue => {
} // return '正常'
// }
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createDate', prop: 'createDate',
// minWidth: '200' width: '180',
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.createDate) return this.date_format(cellValue.createDate)
} }
},
{
label: '操作',
width: 150,
fixed: 'right',
addHtml: 'auth-button'
} }
] ]
} }
...@@ -330,15 +454,15 @@ export default { ...@@ -330,15 +454,15 @@ export default {
} }
}, },
methods: { methods: {
handleDetail(row){ handleDetail(row) {
this.$refs.detailDetailRef.show(row); this.$refs.detailDetailRef.show(row)
// this.getcardRecordList() // this.getcardRecordList()
}, },
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.table.data.length) { // if (!this.$refs.table.data.length) {
this.$refs.table.setTableHeightFun() // this.$refs.table.setTableHeightFun()
} // }
}, },
closeDialog() { closeDialog() {
this.value = false this.value = false
...@@ -382,7 +506,6 @@ export default { ...@@ -382,7 +506,6 @@ export default {
// a.href = url; // a.href = url;
// // window.open(url) // 将图片的src赋值给a节点的href // // window.open(url) // 将图片的src赋值给a节点的href
// a.dispatchEvent(event) // a.dispatchEvent(event)
// }, // },
// downloadImg(){ // downloadImg(){
// html2canvas(document.getElementById("qrCode")).then(canvas => { // html2canvas(document.getElementById("qrCode")).then(canvas => {
...@@ -454,7 +577,6 @@ export default { ...@@ -454,7 +577,6 @@ export default {
} else { } else {
;(this.value = false), (this.tryNum = 30) ;(this.value = false), (this.tryNum = 30)
} }
// 禁用门店框 // 禁用门店框
this.disableSelect = true this.disableSelect = true
}, },
...@@ -471,7 +593,7 @@ export default { ...@@ -471,7 +593,7 @@ export default {
if (row.tryAble == 1) { if (row.tryAble == 1) {
;(this.value = true), (this.tryNum = row.tryNum) ;(this.value = true), (this.tryNum = row.tryNum)
} else { } else {
;(this.value = false), (this.tryNum =30) ;(this.value = false), (this.tryNum = 30)
} }
}, },
addCard(cd) { addCard(cd) {
...@@ -604,18 +726,13 @@ export default { ...@@ -604,18 +726,13 @@ export default {
</script> </script>
<style src="@a/css/tao.css/"></style> <style src="@a/css/tao.css/"></style>
<style lang="scss"> <style lang="scss">
* { .card-manage .el-table__empty-text {
padding: 0;
margin: 0;
border: 0;
}
.card-manage .el-table__empty-text{
display: inline-block; display: inline-block;
width: 64px; width: 64px;
height: 41px; height: 41px;
} }
.tableCtn { .tableCtn {
margin-top: 20px; margin-top: 16px;
margin-right: 20px; margin-right: 20px;
} }
.baseinformation { .baseinformation {
...@@ -632,7 +749,6 @@ export default { ...@@ -632,7 +749,6 @@ export default {
margin-left: 20px; margin-left: 20px;
line-height: 28px; line-height: 28px;
} }
.explain { .explain {
color: #d3d3d3; color: #d3d3d3;
} }
...@@ -649,21 +765,26 @@ export default { ...@@ -649,21 +765,26 @@ export default {
} }
.imageList { .imageList {
display: flex; display: flex;
flex-direction: row;
} }
.imageItem { .imageItem {
width: 300px; width: 150px;
height: 100px; height: 50px;
} }
.imgCtn { .imgCtn {
width: 300px; width: 150px;
text-align: center;
padding: 1px; padding: 1px;
height: 100px; height: 50px;
margin-right: 20px; margin-right: 20px;
} }
.imgBg { .imgBg {
background: #5850ff; position: relative;
}
.imgicon{
position: absolute;
right: 4px;
top: 4px;
color: #5850ff;
font-size: 14px;
} }
.topline { .topline {
display: flex; display: flex;
...@@ -677,7 +798,7 @@ export default { ...@@ -677,7 +798,7 @@ export default {
.codeTxt { .codeTxt {
color: #8c939d; color: #8c939d;
font-size: 12px; font-size: 12px;
margin-left: 198px; margin-left: 310px;
} }
.code { .code {
color: #8c939d; color: #8c939d;
...@@ -724,14 +845,17 @@ export default { ...@@ -724,14 +845,17 @@ export default {
color: #4c4c4c; color: #4c4c4c;
line-height: 20px; line-height: 20px;
} }
// .form {
.form { // padding: 32px 20px 32px 48px;
padding: 32px 20px 32px 48px; // }
}
.dialogForm .el-input--small .el-input__inner { .dialogForm .el-input--small .el-input__inner {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
width: 320px !important; width: 432px !important;
}
.dialogForm .el-textarea__inner{
font-size: 14px;
line-height: 21px;
} }
.el-dialog__body { .el-dialog__body {
padding: 0; padding: 0;
...@@ -761,5 +885,81 @@ export default { ...@@ -761,5 +885,81 @@ export default {
cursor: pointer; cursor: pointer;
margin-right: 20px; margin-right: 20px;
} }
.el-button + .el-button {
margin-left: 8px !important;
}
.btn-grounp{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
padding-right: 20px;
}
.btn-grounp .title{
font-size: 16px;
font-weight: 500;
color: #333333;
margin-left: 4px;
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
.drawer-header{
padding: 15px 25px 15px 20px;
border-bottom: 1px solid #e5e5e5;
.title{
font-size: 22px;
font-weight: 500;
color: #333333;
}
>i{
font-size: 21px;
cursor: pointer;
}
}
.drawer-wrapper{
border-top: 1px solid #e5e5e5;
padding: 20px;
height: calc(100% - 128px);
.custome_label{
display: flex;
align-items: center;
justify-content: flex-end;
}
.custom_wrap{
width: 370px;
height: 68px;
background: #F9F9F9;
}
.custom_wrap .custome_label >span{
font-size: 14px;
font-weight: 400;
color: #666666;
}
}
.gl-form-page .form .el-input-number .el-input{
width: 100%;
}
.el-textarea .el-input__count{
right: -38px;
bottom: -12px;
}
.drawer-footer{
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 64px;
border-top: 1px solid #e5e5e5;
display: flex;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
padding-right: 20px;
.cancel-btn{
margin-right: 12px;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="layout"> <div class="sale-detail-container">
<div class="wrapper">
<template v-for="(item, index) in detailInfoObj">
<div :key="index" class="wrap">
<div v-for="(i, ind) in item.list" :key="ind" class="info" :class="{ mb: !ind }">
<div class="label">{{ i.label }}</div>
<div v-if="i.format" class="value">{{ i.format(detailInfo) }}</div>
<div v-else class="value">{{ detailInfo[i.key] || '' }}</div>
</div>
</div>
</template>
</div>
<div class="line"></div>
<div class="wrapper">
<div class="box_wrap">
<div class="title">售后描述</div>
<div class="box_pannel">
<div class="h72 row flex_sc">
<div class="tip flex_cc">描述</div>
<div class="tipval flex_sc">
<div class="img-box">
<el-image class="img-describe" :src="detailInfo.img" :preview-src-list="[detailInfo.img]"></el-image>
</div>
<!-- <div class="longText"> {{ detailInfo.reason }}</div> -->
</div>
</div>
<div class="bottom_box">
{{ detailInfo.reason }}
</div>
</div>
</div>
<div class="box_wrap">
<div class="title">售后商品</div>
<div class="box_pannel">
<div class="h72 row flex_sc">
<div class="tip flex_cc">商品图片</div>
<div class="tipval flex_sc">
<div class="img-box">
<el-image class="img-describe" :src="detailInfo.goodImg" :preview-src-list="[detailInfo.goodImg]"></el-image>
</div>
</div>
</div>
<div class="row flex_sc">
<div class="tip flex_cc">商品品牌</div>
<div class="tipval flex_sc">{{ detailInfo.brandName || '--'}}</div>
</div>
<div class="row flex_sc">
<div class="tip flex_cc">商品名称</div>
<div class="tipval flex_sc">{{ detailInfo.productName || '--'}}</div>
</div>
<div class="row flex_sc">
<div class="tip flex_cc">类型</div>
<div class="tipval flex_sc">{{ detailInfo.appearanceDesc }}</div>
</div>
</div>
</div>
<div class="box_wrap">
<div class="title">购买信息</div>
<div class="box_pannel">
<div class="row flex_sc">
<div class="tip flex_cc">订单编号</div>
<div class="tipval flex_sc">{{ detailInfo.orderCode }}</div>
</div>
<div class="row flex_sc">
<div class="tip flex_cc">购买数量/张</div>
<div class="tipval flex_sc">1</div>
</div>
<div class="row flex_sc">
<div class="tip flex_cc">商品销售价/元</div>
<div class="tipval flex_sc">{{ detailInfo.orderPrices }}</div>
</div>
<div class="row flex_sc">
<div class="tip flex_cc">实付金额/元</div>
<div class="tipval flex_sc">{{ detailInfo.orderPrices }}</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="layout">
<div class="box topBox" > <div class="box topBox" >
<!-- <back /> -->
<el-button type="primary" class="backBtn" size="small" @click="$router.go(-1)">返回</el-button>
<div class="grid"> <div class="grid">
<template v-for="(item,index) in detailInfoObj"> <template v-for="(item,index) in detailInfoObj">
<div <div
...@@ -90,50 +169,50 @@ ...@@ -90,50 +169,50 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: '', name: '',
data () { data() {
return { return {
detailInfo: {}, detailInfo: {},
detailInfoObj: [ detailInfoObj: [
{ {
list: [ list: [
{ {
label: '售后编号', label: '售后编号:',
key: 'refundCode', key: 'refundCode',
class:1 class: 1
}, },
{ {
label: '申请人', label: '申请人:',
key: 'accountName' key: 'accountName'
}, }
] ]
}, },
{ {
list: [ list: [
{ {
label: '订单渠道', label: '订单渠道:',
key: 'channelName', key: 'channelName',
class:1 class: 1
}, },
{ {
label: '申请时间', label: '申请时间:',
format (cell) { format(cell) {
return cell.createDate ? new Date(cell.createDate).format('yyyy-MM-dd hh:mm:ss') : '' return cell.createDate ? new Date(cell.createDate).format('yyyy-MM-dd hh:mm:ss') : ''
} }
}, }
], ]
}, },
{ {
list: [ list: [
{ {
label: '售后状态', label: '售后状态:',
class:1, class: 1,
format (cell) { format(cell) {
const refundStatusList = { const refundStatusList = {
1: '售后中', 1: '售后中',
2: '已拒绝', 2: '已拒绝',
...@@ -141,13 +220,13 @@ export default { ...@@ -141,13 +220,13 @@ export default {
} }
return `${refundStatusList[cell.refundStatus]}` return `${refundStatusList[cell.refundStatus]}`
} }
}, }
] ]
} }
], ]
} }
}, },
mounted () { mounted() {
let params = { orderCode: this.$route.query.orderCode } let params = { orderCode: this.$route.query.orderCode }
this.getDetail(params) this.getDetail(params)
this.$nextTick(() => { this.$nextTick(() => {
...@@ -160,22 +239,117 @@ export default { ...@@ -160,22 +239,117 @@ export default {
// jump(){ // jump(){
// this.$router.push('/saleDetail') // this.$router.push('/saleDetail')
// }, // },
getDetail (params) { getDetail(params) {
this.$apis.orderApi.getRefundDetail(params).then(({ code, data }) => { this.$apis.orderApi.getRefundDetail(params).then(({ code, data }) => {
if (code == 0) { if (code == 0) {
console.log(data,'77777777777') console.log(data, '77777777777')
// 测试私域环境访问不到图片,线上可以 // 测试私域环境访问不到图片,线上可以
// data.list[0].img=this.getHttpsImgUrl(data.list[0].img) // data.list[0].img=this.getHttpsImgUrl(data.list[0].img)
// data.list[0].goodImg=this.getHttpsImgUrl( data.list[0].goodImg) // data.list[0].goodImg=this.getHttpsImgUrl( data.list[0].goodImg)
this.detailInfo = data.list[0] this.detailInfo = data.list[0]
} }
}) })
}, }
} }
} }
</script> </script>
<style src="@a/css/tao.css"></style> <style src="@a/css/tao.css"></style>
<style lang="scss" scoped> <style lang="scss" scoped>
.sale-detail-container {
height: 90vh;
padding: 0 20px;
background: #fff;
.wrapper {
padding: 32px 0;
display: flex;
}
.wrap {
.info {
display: flex;
> div {
font-size: 14px;
font-weight: 400;
color: #333333;
}
.label {
width: 154px;
text-align: right;
}
}
.mb {
margin-bottom: 20px;
}
}
.line {
height: 1px;
background: #e5e5e5;
}
.box_wrap {
margin-right: 38px;
.title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 20px;
margin-bottom: 8px;
}
.box_pannel {
.row {
height: 36px;
}
.tip {
width: 118px;
height: 100%;
background: #f4f6fc;
border: 1px solid #e5e5e5;
font-size: 14px;
font-weight: 400;
color: #333333;
}
.tipval {
width: 238px;
height: 100%;
background: #ffffff;
border: 1px solid #e5e5e5;
border-left: none;
font-size: 14px;
font-weight: 400;
color: #333333;
padding: 0 12px;
.img-box {
width: 36px;
height: 36px;
margin-right: 8px;
}
.img-describe {
width: 36px;
height: 36px;
}
.longText{
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.h72 {
height: 72px;
}
.max {
height: 108px;
}
}
}
.bottom_box{
width: 357px;
border: 1px solid #e5e5e5;
padding: 12px;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 21px;
}
}
.flex .info { .flex .info {
margin-left: 10px; margin-left: 10px;
width: calc(100% - 110px); width: calc(100% - 110px);
...@@ -188,64 +362,62 @@ export default { ...@@ -188,64 +362,62 @@ export default {
.layout .box .grid .grid-item .item { .layout .box .grid .grid-item .item {
align-items: center; align-items: center;
} }
.layout{ .layout {
margin:0 20px 0 40px; .topBox {
width: auto; padding-top: 32px !important;
.topBox{
padding-top: 32px!important;
} }
.box{ .box {
position: relative; position: relative;
padding-top: 20px; padding-top: 20px;
padding-left: 52px; padding-left: 52px;
.top-grid-item{ .top-grid-item {
.item{ .item {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
.label{ .label {
width: 71px; width: 71px;
text-align: right; text-align: right;
} }
.firstRow{ .firstRow {
margin-bottom: 14px; margin-bottom: 14px;
} }
} }
} }
.grid-item{ .grid-item {
.item{ .item {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
.money{ .money {
color: #EB4E4E; color: #eb4e4e;
} }
} }
} }
.backBtn{ .backBtn {
position: absolute; position: absolute;
right: 20px; right: 20px;
top: 20px; top: 20px;
} }
.grayRow{ .grayRow {
position: absolute; position: absolute;
top: 0px; top: 0px;
left: 0; left: 0;
width: 100%; width: 100%;
background-color: #F4F6FC; background-color: #f4f6fc;
z-index: 0; z-index: 0;
height: 54px; height: 54px;
} }
.sub-title{ .sub-title {
position: relative; position: relative;
z-index: 1; z-index: 1;
margin-bottom: 35px!important; margin-bottom: 35px !important;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
.grid{ .grid {
padding: 0; padding: 0;
} }
} }
......
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="85px" label-position="right"> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-row style="display: flex; align-items: center;margin-bottom:2px"> <div class="out_wrap">
<el-form-item label="售后编号" size="small"> <div class="choseRow flex_sc">
<el-input v-model="searchForm.refundCode" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
<el-form-item label="订单编号" size="small">
<el-input v-model="searchForm.orderCode" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
<el-form-item label="商品名称" size="small">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="门店名称" size="small">
<el-input v-model="searchForm.merchantName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
<el-form-item label="用户信息" size="small">
<el-input v-model="searchForm.userInfo" placeholder="请输入姓名或手机号" size="small" clearable></el-input>
</el-form-item>
<el-form-item size="small" label="售后日期">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<div class="choseRow">
<div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)"> <div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)">
{{ item }} {{ item }}
</div> </div>
</div> </div>
</div>
<div class="table_border">
<!-- :noDataImg="url" --> <GLTable v-if="flag" :noDataImg="url" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable v-if="flag" :noDataImg="url" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="desc" slot-scope="scope"> <span slot="desc" slot-scope="scope">
<div class="refund-box"> <el-popover placement="bottom" width="240" trigger="click">
<img :src="scope.scope.img" style="width: 200px; height: 200px" />
<img :src="scope.scope.img" style="width: 36px; height: 36px" slot="reference" />
</el-popover>
<!-- <div class="flex_sc refund-box">
<div class="refund-img-box"> <div class="refund-img-box">
<img :src="scope.scope.img" alt="" /> <img :src="scope.scope.img" alt="" />
</div> </div>
<div>{{ scope.scope.reason }}</div> </div> -->
</div>
</span>
<span slot="number" slot-scope="scope">
<div class="refund-box">{{ scope.scope.refundCode }}</div>
</span> </span>
<span slot="goodMsg" slot-scope="scope"> <span slot="goodMsg" slot-scope="scope">
<div class="refund-box"> <div v-if="scope.scope.brandName || scope.scope.productName" class="refund-box">
<div class="mb10">{{ scope.scope.brandName }}</div> <div class="mb4">{{ scope.scope.brandName }}</div>
<div>{{ scope.scope.productName }}</div> <div class="min-text">{{ scope.scope.productName }}</div>
</div>
</span>
<span slot="priceAmount" slot-scope="scope">
<div class="refund-box">
<div class="mb10">{{ scope.scope.orderPrices }}元</div>
<div>{{ scope.scope.goodsQuality }}张</div>
</div> </div>
<div v-else>--</div>
</span> </span>
<span slot="userInfo" slot-scope="scope"> <span slot="userInfo" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div> <div class="mb4">{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div> <div class="min-text">{{ scope.scope.mobile }}</div>
</span>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="查看售后详情" type="text" @click="jump(scope.scope, 'sale')" size="small">查看详情</GLButton>
</span>
<span slot="orderNum" slot-scope="scope">
<div class="refund-box">
<div class="refund-title">{{ scope.scope.orderCode }}</div>
</div>
</span> </span>
<span slot="stores" slot-scope="scope"> <div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="refund-box"> <div class="table_point" :style="{ background: colors[scope.scope.refundStatus] }"></div>
<div class="refund-title">{{ scope.scope.merchantName }}</div> <span>{{ refundStatusList[scope.scope.refundStatus] }}</span>
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="查看售后详情" type="text" @click="jump(scope.scope, 'sale')">查看详情</GLButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
// type='text/ecmascript-6' // type='text/ecmascript-6'
// import { orderMixin, searchMixin } from '@/mixins' // import { orderMixin, searchMixin } from '@/mixins'
import url from "@/assets/empty.png" import url from '@/assets/empty.png'
export default { export default {
name: '', name: '',
// mixins: [orderMixin, searchMixin], // mixins: [orderMixin, searchMixin],
data() { data() {
return { return {
url:url, url: url,
choseList: ['全部', '售后中', '售后完成'], choseList: ['全部', '售后中', '售后完成'],
currentIndex: 0, currentIndex: 0,
size: 'small', size: 'small',
...@@ -103,68 +66,132 @@ export default { ...@@ -103,68 +66,132 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true, flag: true,
tabIndex: '', tabIndex: '',
searchForm: {}, // searchForm: {},
searchForm: {
orderCode: '',
refundCode: '',
productName: '',
merchantName: '',
userInfo: '',
daterange: ''
},
searchFormData: [
{
label: '售后编号',
name: 'refundCode',
type: 'input',
isClear: true
},
{
label: '订单编号',
name: 'orderCode',
type: 'input',
isClear: true
},
{
label: '商品名称',
name: 'productName',
type: 'input',
isClear: true
},
{
label: '门店名称',
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '用户信息',
name: 'userInfo',
type: 'input',
isClear: true
},
{
label: '下单时间',
name: 'daterange',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
}
],
searchFormTable: {}, searchFormTable: {},
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true,
getListApi: this.$apis.orderApi.getRefundList, getListApi: this.$apis.orderApi.getRefundList,
tableColumns: [ tableColumns: [
{ {
label: '售后描述', label: '售后图片',
width: 100,
minWidth: '150',
align: 'left',
addHtml: 'desc' addHtml: 'desc'
}, },
{ {
label: '售后描述',
width: 300,
line: 1,
prop: 'reason'
},
{
label: '售后编号', label: '售后编号',
minWidth: '300', prop: 'refundCode',
addHtml: 'number' width: 300
}, },
{ {
label: '商品信息', label: '商品信息',
minWidth: '150', minWidth: 200,
addHtml: 'goodMsg' addHtml: 'goodMsg'
}, },
{ {
label: '订单编号', label: '订单编号',
minWidth: '300', width: 250,
addHtml: 'orderNum' prop: 'orderCode'
},
{
label: '价格/元',
width: 110,
align: 'right',
prop: 'orderPrices'
}, },
{ {
label: '价格/数量', label: '数量/张',
minWidth: '300', width: 110,
addHtml: 'priceAmount' align: 'right',
prop: 'goodsQuality'
}, },
{ {
label: '订单渠道', label: '订单渠道',
minWidth: '300', width: 250,
addHtml: 'stores' line: 1,
prop: 'merchantName'
}, },
{ {
label: '实收金额', label: '实收金额/元',
width: 120,
align: 'right',
formatter: cell => { formatter: cell => {
return `${cell.orderPrices}元` return `${cell.orderPrices}`
} }
}, },
{ {
label: '售后状态', label: '售后状态',
width: 120,
formatter: cell => { addHtml: 'colorStatus'
const refundStatusList = { // formatter: cell => {
1: '售后中', // const refundStatusList = {
2: '已拒绝', // 1: '售后中',
3: '退款成功' // 2: '已拒绝',
} // 3: '退款成功'
return `${refundStatusList[cell.refundStatus]}` // }
} // return `${refundStatusList[cell.refundStatus]}`
// }
}, },
{ {
label: '售后时间', label: '售后时间',
minWidth: '100', width: 180,
// sortable: true,
formatter: cell => { formatter: cell => {
return cell.createDate ? new Date(cell.createDate).format('yyyy-MM-dd hh:mm:ss') : '- -' return cell.createDate ? new Date(cell.createDate).format('yyyy-MM-dd hh:mm:ss') : '- -'
} }
...@@ -173,29 +200,45 @@ export default { ...@@ -173,29 +200,45 @@ export default {
label: '用户信息', label: '用户信息',
minWidth: '200', minWidth: '200',
addHtml: 'userInfo' addHtml: 'userInfo'
},
{
label: '操作',
width: 100,
fixed: 'right',
addHtml: 'auth-button'
} }
] ]
},
refundStatusList: {
1: '售后中',
2: '已拒绝',
3: '退款成功'
},
colors: {
1: '#5850FF',
2: '#999999',
3: '#2CCA74'
} }
} }
}, },
mounted() {}, mounted() {},
methods: { methods: {
getHttpsImgUrl(url){ getHttpsImgUrl(url) {
if(!url){ if (!url) {
return '' return ''
} }
var flag=url.startsWith("http:") var flag = url.startsWith('http:')
if(flag){ // console.log(flag,'快快快')
var newurl= url.replace("http:","https:") if (flag) {
var newurl = url.replace('http:', 'https:')
//去掉http自动带的端口 :7060,https不能有 //去掉http自动带的端口 :7060,https不能有
var startPos=newurl.lastIndexOf(":") var startPos = newurl.lastIndexOf(':')
var endPos=newurl.indexOf("/",startPos) var endPos = newurl.indexOf('/', startPos)
var preStr=newurl.substring(0,startPos) var preStr = newurl.substring(0, startPos)
var afterStr=newurl.substring(endPos) var afterStr = newurl.substring(endPos)
// console.log(preStr,'前部分') // console.log(preStr,'前部分')
// console.log(afterStr,'后部分') // console.log(afterStr,'后部分')
var finalStr = preStr + afterStr
var finalStr=preStr+afterStr
// console.log(finalStr,'6777777') // console.log(finalStr,'6777777')
return finalStr return finalStr
} }
...@@ -288,41 +331,67 @@ export default { ...@@ -288,41 +331,67 @@ export default {
// } // }
// </style> // </style>
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.equity-wrap .contain { .equity-wrap .contain {
padding: 20px;
.out_wrap {
position: relative;
z-index: 100;
margin-bottom: -1px;
}
.choseRow { .choseRow {
display: flex;
margin-top: 5px;
height: 34px;
.choseItem { .choseItem {
width: 120px; display: inline-block;
height: 34px; box-sizing: border-box;
line-height: 34px; padding: 0 20px;
text-align: center; height: 40px;
font-size: 14px; line-height: 40px;
font-weight: 400;
color: #333333;
cursor: pointer; cursor: pointer;
border: 1px solid #e5e5e5;
margin-right: 1px;
border-radius: 4px 4px 0 0;
background: #fafafa;
} }
.active { .active {
color: #5850ff; color: #5850ff;
background-color: #f4f6fc; background-color: white;
font-weight: 600;
border-bottom: none;
} }
} }
.refund-img-box { .refund-img-box {
width: 100px; width: 36px;
height: 100px; height: 36px;
margin-right: 8px;
> img { > img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
margin-bottom: 10px;
} }
.refund-title { .refund-title {
margin-bottom: 10px; margin-bottom: 10px;
} }
.table_border {
border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 16px 20px;
border-radius: 0 4px 4px 4px;
}
.hide-text {
width: 156px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
cursor: pointer;
}
.mb4 {
margin-bottom: 4px;
}
.min-text {
font-size: 10px;
color: #999;
font-weight: 400;
}
} }
.el-form-item { .el-form-item {
margin-bottom: 15px; margin-bottom: 15px;
...@@ -335,7 +404,7 @@ export default { ...@@ -335,7 +404,7 @@ export default {
.el-range-editor--small.el-input__inner { .el-range-editor--small.el-input__inner {
width: 215px; width: 215px;
} }
/deep/ .contain .el-input--small .el-input__inner { // /deep/ .contain .el-input--small .el-input__inner {
width: 215px; // width: 215px;
} // }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -4,8 +4,14 @@ const node_env = process.env.NODE_ENV === 'production' ...@@ -4,8 +4,14 @@ const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/' const publicPath = node_env ? `/child/${packageName}/` : '/'
// const baseUrl = process.env.VUE_APP_BASE_URL; // const baseUrl = process.env.VUE_APP_BASE_URL;
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
// css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.13.0/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`]
}
module.exports = { module.exports = {
outputDir: `dist`, outputDir: `../dist/${packageName}`,
publicPath, publicPath,
assetsDir: 'static', assetsDir: 'static',
// np:'/newsso-equity/', // np:'/newsso-equity/',
...@@ -34,6 +40,11 @@ module.exports = { ...@@ -34,6 +40,11 @@ module.exports = {
} }
}, },
chainWebpack: config => { chainWebpack: config => {
config.plugin('html').tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
config.plugins.delete('preload') // TODO: need test config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test config.plugins.delete('prefetch') // TODO: need test
config.resolve.alias config.resolve.alias
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!