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 @@
"el-tree-transfer": "^2.4.7",
"element-ui": "^2.15.6",
"glsx-common": "^1.4.9",
"glsx-components": "^1.3.7",
"glsx-components": "^1.5.2",
"glsx-vue-components": "^1.0.15",
"jquery": "^3.6.0",
"vue": "^2.6.14",
......
import { http } from '@/main'
import { http,new_http } from '@/main'
/**获取财务管理列表*/
const getBalanceList = params => {
params.method = 'scrm.api.equity.order.balance.list.get'
......@@ -177,6 +177,15 @@ const exportGasList = params => {
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 {
getBalanceList,
getOrderList,
......@@ -200,5 +209,6 @@ export default {
exportBalanceList,
getAllBrandList,
exportOrderList,
exportGasList
exportGasList,
createShortLink
}
.equity-wrap .contain {
background: #FFFFFF;
margin: 0 0 20px 0;
padding: 20px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
// margin: 0 0 20px 0;
padding: 20px 15px;
// box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
}
.equity-wrap .contain .el-table__empty-text{
display: inline-block;
......@@ -128,7 +128,60 @@
margin: 0 0 30px 0;
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 {
// width: 98%;
// color: #666666;
......
......@@ -81,8 +81,8 @@ img {
.layout .box {
background-color: #fff;
margin: 20px 0;
-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);
/* -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); */
padding: 20px;
margin: 0;
padding: 16px 20px 14px 20px;
......@@ -92,8 +92,8 @@ img {
vertical-align: baseline;
background: transparent;
background: #fff;
-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);
/* -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); */
}
.layout .box .title {
......@@ -232,7 +232,7 @@ img {
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
.tableBox{
padding: 20px 20px 10px 20px;
padding: 20px 0px 10px 20px;
border: 0;
outline: 0;
font-size: 100%;
......@@ -252,11 +252,11 @@ img {
.selectWidth{
width: 215px;
}
.el-input--small .el-input__inner {
/* .el-input--small .el-input__inner {
height: 32px;
line-height: 32px;
width: 215px;
}
} */
.el-range-editor.el-input__inner {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
......@@ -267,9 +267,7 @@ img {
padding: 3px 10px;
width: 215px;
}
.el-button+.el-button {
margin-left: 20px;
}
.el-dialog__body {
padding: 0px 20px;
color: #606266;
......
......@@ -56,7 +56,7 @@ img {
.box {
background-color: #fff;
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;
.title {
padding: 20px 0;
......
<template>
<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">
<div class="form">
<el-form class="equityForm" :model="form" :rules="rules" ref="ruleForm" label-position="right" label-width="auto">
<el-form-item v-if="type == 1" label="服务提供方" prop="supplier">
<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 gl-form-page gl-form-min">
<el-form class="equityForm" :model="form" :rules="rules" ref="ruleForm" label-width="154px">
<el-form-item v-if="type == 1" label="服务提供方:" prop="supplier">
<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-select>
</el-form-item>
<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-option label="海威" value="HW"></el-option>
</el-select>
</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-option v-for="item in brandList" :key="item.brandName" :value="item.brandName" :label="item.brandName"></el-option>
</el-select>
</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-option v-for="item in appearanceList" :key="item.appearance" :value="item.label" :label="item.label"></el-option>
</el-select>
</el-form-item>
</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-form-item>
</div>
<div class="flex">
<el-form-item label="描述" prop="equityDesc">
<el-form-item label="描述:" prop="equityDesc">
<el-input size="small" v-model="form.equityDesc" :maxlength="type == 1 ? 8 : 6" placeholder="请输入"></el-input>
</el-form-item>
</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">
<img v-if="form.equityIcon" :src="form.equityIcon" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
......@@ -46,11 +42,11 @@
</div>
</el-form>
</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" type="primary" @click="submit(type)">确 定</el-button>
</div>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -243,11 +239,7 @@ export default {
.equity-dialog {
padding: 0;
}
.flex {
display: flex;
align-items: center;
justify-content: space-between;
}
.avatar-uploader {
box-sizing: border-box;
border: 1px dashed #d9d9d9;
......@@ -271,26 +263,25 @@ export default {
height: 80px;
display: block;
}
.baseinformation {
/* .baseinformation {
width: 100%;
height: 28px;
border-bottom: 1px solid #d8d8d8;
padding-bottom: 18px;
}
.form {
padding: 32px 20px 32px 116px;
}
.equity-dialog .el-dialog__body {
padding: 0px 0px;
} */
/* .form {
padding: 16px;
} */
/* .equity-dialog .el-dialog__body {
color: #606266;
font-size: 14px;
word-break: break-all;
}
.equityForm .el-input--small .el-input__inner {
} */
/* .equityForm .el-input--small .el-input__inner {
height: 32px;
line-height: 32px;
width: 320px !important;
}
width: 432px !important;
} */
.suggestion {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
......@@ -307,20 +298,20 @@ export default {
color: #333333;
line-height: 28px;
}
.buttonBtn .el-button + .el-button {
/* .buttonBtn .el-button + .el-button {
margin-left: 40px;
}
.equityDialog .el-dialog__header {
} */
/* .equityDialog .el-dialog__header {
padding: 20px 20px 20px;
border-bottom: 1px solid #d8d8d8;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
}
.equityDialog .el-dialog__footer {
} */
/* .equityDialog .el-dialog__footer {
padding: 16px 20px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border-top: 1px solid #e6e6e6;
}
} */
</style>
\ No newline at end of file
......@@ -8,7 +8,7 @@
>
<el-button
slot="reference"
icon="el-icon-warning"
icon="gl-icon-circle-question"
circle
></el-button>
</el-popover>
......@@ -31,6 +31,7 @@ export default {
<style scope>
.table-tooltip {
padding-right: 0 !important;
padding-left: 4px !important;
}
.table-tooltip .el-button {
border: none !important;
......
......@@ -11,9 +11,9 @@
import {Http } from 'glsx-common'
let cfg = require('./conf.js')
export const fetchConfig = function(isEnv = true) {
if (isEnv) {
return Promise.resolve(cfg)
}
// if (isEnv) {
// return Promise.resolve(cfg)
// }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/616e90b11072f92988f05a09/equity/config')
//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' })
......
......@@ -20,6 +20,7 @@ Vue.prototype.$apis = apis
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const new_http = params => Vue.prototype.$new_http(params)
import './utils/util.js'
......
......@@ -6,10 +6,9 @@ export default {
carTableData: [],
carTableParams: {
listName: 'data.list',
tableOption: true,
rowStyle: ({ row, rowIndex }) => {
return row.status == 0 ? {opacity:0.5} : ''
},
// rowStyle: ({ row, rowIndex }) => {
// return row.status == 0 ? {opacity:0.5} : ''
// },
tableColumns: [{
label: '权益名称',
prop: 'equityName',
......@@ -21,10 +20,18 @@ export default {
minWidth: '200',
},
{
label: '权益图标\n(80*80,支持JPG、PNG、GIF',
// label: '权益图标\n(80*80,支持JPG、PNG、GIF',
prop:'carImage',
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: '服务提供方',
......@@ -42,11 +49,17 @@ export default {
}
},
{
label: '排序展示',
label: '首页展示',
prop: 'mainPageFlag',
minWidth: '200',
addHtml: 'mainPageFlag'
},
{
label: '操作',
width: 155,
fixed: 'right',
addHtml: 'auth-button'
}
]
},
......
......@@ -2,6 +2,7 @@
export default {
data() {
return {
currentIndex:0,
goodsCategoryId: '',
inputValue: '',
tagInputValue: '',
......@@ -9,10 +10,9 @@ export default {
tags: [],
goodsTableData: [],
goodsTableParams: {
rowStyle: ({ row, rowIndex }) => {
return row.status == 0 ? {opacity:0.5} : ''
},
tableOption: true,
// rowStyle: ({ row, rowIndex }) => {
// return row.status == 0 ? {opacity:0.5} : ''
// },
tableColumns: [{
label: '权益名称',
prop: 'equityName',
......@@ -24,10 +24,18 @@ export default {
minWidth: '200',
},
{
label: '权益图标\n(80*80,支持JPG、PNG、GIF)',
// label: '权益图标\n(80*80,支持JPG、PNG、GIF)',
minWidth: '200',
prop:'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: '品牌名称',
......@@ -43,13 +51,21 @@ export default {
},
},
{
label: '排序展示',
label: '首页展示',
prop: 'mainPageFlag',
minWidth: '200',
addHtml: 'mainPageFlag'
},
{
label: '操作',
width: 155,
fixed: 'right',
addHtml: 'auth-button'
}
]
}
},
showMoreTags:false,
moreTags:[]
}
},
mounted() {
......@@ -77,6 +93,11 @@ export default {
this.tags = list || []
this.getGoodsList(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 {
this.tags[index].active = true
this.getGoodsList(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) {
this.inputValue = val
......@@ -126,6 +156,7 @@ export default {
this.$apis.goodsEquityManageApi.categoryDelete({ id }).then(_res => {
if (_res.code == 0) {
this.getCategoryList()
this.changeGoodsCategory({id:this.tags[0].id,index:0})
} else {
this.$message.error(_res.message)
}
......
import VueQuillEditor from 'vue-quill-editor'
import '@/components'
import VueBus from 'vue-bus'
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 { GLButton,GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
// Vue.use(Button)
// Vue.use(ButtonGroup)
// Vue.use(Form)
// Vue.use(FormItem)
// Vue.use(Input)
// Vue.use(Radio)
// Vue.use(RadioGroup)
// Vue.use(Checkbox)
// Vue.use(CheckboxGroup)
// Vue.use(Switch)
// Vue.use(Select)
// Vue.use(Option)
// Vue.use(TimePicker)
// Vue.use(Col)
// Vue.use(DatePicker)
// Vue.use(Dialog)
// Vue.use(Tabs)
// Vue.use(TabPane)
// Vue.use(Table)
// Vue.use(TableColumn)
// Vue.use(Pagination)
// Vue.use(RadioButton)
// Vue.use(Upload)
Vue.use(GLTable)
import '@/components'
import VueQuillEditor from 'vue-quill-editor'
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(Button)
Vue.use(ButtonGroup)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Switch)
Vue.use(Select)
Vue.use(Option)
Vue.use(TimePicker)
Vue.use(Col)
Vue.use(DatePicker)
Vue.use(Tree)
Vue.use(Card)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Pagination)
Vue.use(Loading)
Vue.use(Dialog)
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(VueBus)
// Vue.use(Image)
// Vue.use(Loading)
// Vue.use(InputNumber)
import ElementUI from 'element-ui'
Vue.use(ElementUI)
export const message = Message
export const messageBox = MessageBox
\ No newline at end of file
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 { GLButton,GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton,GLTable, GLCombiForm, GLTableButton,GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = 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)
let newrequest = Object.assign({},request)
newrequest.baseURL = juedeDomain(request.baseURL)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
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.$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.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)
......@@ -41,3 +55,35 @@ function subscribe({ messenger }) {
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>
<div class="equity-wrap">
<div class="equity-wrap contain">
<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-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 label="订单号">
<el-input v-model="searchForm.orderId" placeholder="请输入" size="small" clearable></el-input>
</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 class="find_wrap">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{'background':colors[scope.scope.orderStatus]}"></div>
<span>{{['已结算', '待结算', '已失效'][scope.scope.orderStatus]}}</span>
</div>
</GLTable>
</div>
</div>
</template>
<script>
// type='text/ecmascript-6'
function date_format(date) {
var date2 = new Date(date)
var YY = date2.getFullYear() + '-'
......@@ -42,98 +23,136 @@ function date_format(date) {
var ss = date2.getSeconds() < 10 ? '0' + date2.getSeconds() : date2.getSeconds()
return YY + MM + DD + ' ' + hh + mm + ss
}
import url from "@/assets/empty.png"
// import { searchMixin } from '@/mixins'
import url from '@/assets/empty.png'
export default {
name: '',
// mixins: [searchMixin],
data() {
return {
url:url,
size: 'small',
url: url,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
},
searchForm: {
orderId: ''
orderId: '',
orderStatus: '',
daterange: '',
phone: ''
},
searchFormTable: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
date_format,
flag: true,
statusList: [
searchFormData: [
{
label: '已结算',
value: '0'
label: '下单时间',
name: 'daterange',
type: 'datePicker',
isClear: true
},
{
label: '待结算',
value: '1'
label: '订单号',
name: 'orderId',
type: 'input',
isClear: true
},
{
label: '已失效',
value: '2'
label: '用户信息',
name: 'phone',
type: 'input',
isClear: true
},
{
label: '订单状态',
name: 'orderStatus',
type: 'select',
optionId: 'confId',
optionLabel: 'confName',
isClear: true,
noFilter: true,
optionList: [
{
confId: 0,
confName: '已结算'
},
{
confId: 1,
confName: '待结算'
},
{
confId: 2,
confName: '已失效'
}
]
}
],
searchFormTable: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
date_format,
tableParams: {
listName: 'list',
getListApi: this.$apis.orderApi.getEDJOrderList,
tableColumns: [
{
label: '日期',
width: '200',
width: 200,
formatter: cell => {
return this.date_format(cell.callTime)
}
},
{
label: '用户信息',
prop: 'phone'
prop: 'phone',
width:150,
},
{
label: '订单里程',
label: '订单里程/km',
minWidth:120,
formatter: cell => {
return `${cell.distance}km`
return `${cell.distance}`
}
},
{
label: '实付金额',
prop: 'price'
label: '实付金额/元',
prop: 'price',
align:'right',
minWidth:120,
formatter(cell){
return cell.price.toFixed(2)
}
},
{
label: '订单总额',
prop: 'income'
label: '订单总额/元',
minWidth:120,
prop: 'income',
align:'right',
formatter(cell){
return cell.income.toFixed(2)
}
},
{
label: '订单号',
minWidth:200,
prop: 'orderId'
},
{
label: '司机工号',
minWidth:200,
prop: 'driverId'
},
{
label: '订单状态',
prop: 'status',
width:150,
formatter: cell => {
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() {},
methods: {
beforeSearchFn() {
......@@ -149,18 +168,21 @@ export default {
resolve()
})
},
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.table.data.length) {
this.$refs.table.setTableHeightFun()
}
},
// setTableFinishFun() {
// //接收到的数据为空
// if (!this.$refs.table.data.length) {
// this.$refs.table.setTableHeightFun()
// }
// },
handleReset() {
this.flag = false
this.searchForm = {}
this.$nextTick(() => {
this.flag = true
})
this.searchForm = {
orderId: '',
orderStatus: '',
daterange: '',
phone: ''
}
this.handleSearch()
},
handleSearch() {
this.$refs.table.refreshTable()
......@@ -169,21 +191,4 @@ export default {
}
</script>
<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>
<template>
<div class="equity-wrap">
<div class="equity-wrap contain">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="90px" label-position="right">
<el-row style="display: flex; align-items: center">
<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" label="加油供应商">
<el-select size="small" :value="'团油'" placeholder="请选择">
<!-- <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>
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable v-if="flag" ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.orderStatusName]}"></div>
<span>{{scope.scope.orderStatusName}}</span>
</div>
</GLTable>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
......@@ -62,7 +36,6 @@ function getExplorer() {
}
return browserType
}
function exportFn(url) {
let browserType = getExplorer()
if (browserType == 'QQ') {
......@@ -92,7 +65,77 @@ export default {
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
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: {},
statusList: [
{
......@@ -123,11 +166,10 @@ export default {
{
label: '加油时间',
prop: 'orderTime',
width: '95'
width: 180
},
{
label: '供应商',
formatter: cell => {
return '团油'
}
......@@ -135,37 +177,41 @@ export default {
{
label: '加油油站',
prop: 'gasName',
width: '150'
width: 150,
line:1
},
{
label: '油号',
prop: 'oilName'
},
{
label: '加油升数(L)',
label: '加油升数/L',
prop: 'litre',
width: '100'
width: '150'
},
{
label: '实付金额',
label: '实付金额/元',
prop: 'amountPay',
width: '100'
width: 120,
align: 'right'
},
{
label: '订单总额',
label: '订单总额/元',
prop: 'amountGun',
width: '100'
width: 120,
align: 'right'
},
{
label: '优惠金额',
label: '优惠金额/元',
prop: 'amountDiscounts',
width: '100'
width: 120,
align: 'right'
},
{
label: '订单状态',
prop: 'orderStatusName',
width: '100'
width: '100',
addHtml: 'colorStatus'
},
{
label: '用户信息',
......@@ -175,9 +221,15 @@ export default {
{
label: '供应商订单号',
prop: 'orderId',
width: '220'
width: '230'
}
]
},
colors: {
'已支付': '#2CCA74',
'退款申请中': '#5850FF',
'已退款': '#2CCA74',
'退款失败': '#EB4E4E'
}
}
},
......@@ -232,23 +284,22 @@ export default {
}
}
</script>
<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;
}
// .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>
\ No newline at end of file
<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" >
<!-- <back /> -->
<el-button type="primary" class="backBtn" size="small" @click="$router.go(-1)">返回</el-button>
<div class="grid">
<template v-for="(item,index) in detailInfoObj">
<div
......@@ -90,50 +169,50 @@
</div>
</div>
</div>
</div>
</div> -->
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
data() {
return {
detailInfo: {},
detailInfoObj: [
{
list: [
{
label: '售后编号',
label: '售后编号:',
key: 'refundCode',
class:1
class: 1
},
{
label: '申请人',
label: '申请人:',
key: 'accountName'
},
}
]
},
{
list: [
{
label: '订单渠道',
label: '订单渠道:',
key: 'channelName',
class:1
class: 1
},
{
label: '申请时间',
format (cell) {
label: '申请时间:',
format(cell) {
return cell.createDate ? new Date(cell.createDate).format('yyyy-MM-dd hh:mm:ss') : ''
}
},
],
}
]
},
{
list: [
{
label: '售后状态',
class:1,
format (cell) {
label: '售后状态:',
class: 1,
format(cell) {
const refundStatusList = {
1: '售后中',
2: '已拒绝',
......@@ -141,16 +220,16 @@ export default {
}
return `${refundStatusList[cell.refundStatus]}`
}
},
}
]
}
],
]
}
},
mounted () {
let params = { orderCode: this.$route.query.orderCode }
this.getDetail(params)
this.$nextTick(() => {
mounted() {
let params = { orderCode: this.$route.query.orderCode }
this.getDetail(params)
this.$nextTick(() => {
let clientHeight = document.documentElement.clientHeight
let offsettop = document.getElementById('bottomBox').offsetTop
document.getElementById('bottomBox').style.minHeight = clientHeight - offsettop - 120 + 'px'
......@@ -160,22 +239,117 @@ export default {
// jump(){
// this.$router.push('/saleDetail')
// },
getDetail (params) {
getDetail(params) {
this.$apis.orderApi.getRefundDetail(params).then(({ code, data }) => {
if (code == 0) {
console.log(data,'77777777777')
console.log(data, '77777777777')
// 测试私域环境访问不到图片,线上可以
// data.list[0].img=this.getHttpsImgUrl(data.list[0].img)
// data.list[0].goodImg=this.getHttpsImgUrl( data.list[0].goodImg)
this.detailInfo = data.list[0]
}
}
})
},
}
}
}
</script>
<style src="@a/css/tao.css"></style>
<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 {
margin-left: 10px;
width: calc(100% - 110px);
......@@ -188,64 +362,62 @@ export default {
.layout .box .grid .grid-item .item {
align-items: center;
}
.layout{
margin:0 20px 0 40px;
width: auto;
.topBox{
padding-top: 32px!important;
.layout {
.topBox {
padding-top: 32px !important;
}
.box{
.box {
position: relative;
padding-top: 20px;
padding-left: 52px;
.top-grid-item{
.item{
.top-grid-item {
.item {
font-size: 14px;
font-weight: 400;
color: #333333;
.label{
color: #333333;
.label {
width: 71px;
text-align: right;
}
.firstRow{
.firstRow {
margin-bottom: 14px;
}
}
}
.grid-item{
.item{
font-size: 14px;
.grid-item {
.item {
font-size: 14px;
font-weight: 400;
color: #333333;
.money{
color: #EB4E4E;
}
color: #333333;
.money {
color: #eb4e4e;
}
}
}
.backBtn{
.backBtn {
position: absolute;
right: 20px;
top: 20px;
}
.grayRow{
.grayRow {
position: absolute;
top: 0px;
left: 0;
width: 100%;
background-color: #F4F6FC;
background-color: #f4f6fc;
z-index: 0;
height: 54px;
}
.sub-title{
.sub-title {
position: relative;
z-index: 1;
margin-bottom: 35px!important;
margin-bottom: 35px !important;
font-size: 14px;
font-weight: 500;
color: #333333;
}
.grid{
.grid {
padding: 0;
}
}
......
......@@ -4,8 +4,14 @@ const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
// const baseUrl = process.env.VUE_APP_BASE_URL;
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 = {
outputDir: `dist`,
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
// np:'/newsso-equity/',
......@@ -34,6 +40,11 @@ module.exports = {
}
},
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('prefetch') // TODO: need test
config.resolve.alias
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!