Commit 03c2ccc8 by zhouzy

1

1 parent 1e8d5092
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.2.5", "glsx-components": "^1.3.7",
"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",
......
...@@ -26,7 +26,7 @@ const getOrderDetail = params => { ...@@ -26,7 +26,7 @@ const getOrderDetail = params => {
params.method = 'scrm.api.equity.order.detail.get' params.method = 'scrm.api.equity.order.detail.get'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/** 开启售后状态修改*/ /** 开启售后状态修改*/
...@@ -34,7 +34,7 @@ const openRefund = params => { ...@@ -34,7 +34,7 @@ const openRefund = params => {
params.method = 'scrm.api.equity.order.refund.open' params.method = 'scrm.api.equity.order.refund.open'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/** 获取售后订单列表*/ /** 获取售后订单列表*/
...@@ -49,7 +49,7 @@ const getRefundDetail = params => { ...@@ -49,7 +49,7 @@ const getRefundDetail = params => {
params.method = 'scrm.api.equity.order.refund.list.get' params.method = 'scrm.api.equity.order.refund.list.get'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/** 获取e代驾订单列表*/ /** 获取e代驾订单列表*/
...@@ -78,7 +78,7 @@ const goodsShelves = (params = {}) => { ...@@ -78,7 +78,7 @@ const goodsShelves = (params = {}) => {
params.method = 'scrm.api.equity.goods.shelves' params.method = 'scrm.api.equity.goods.shelves'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/**商品删除/支持批量*/ /**商品删除/支持批量*/
...@@ -86,7 +86,7 @@ const deleteGoods = (params = {}) => { ...@@ -86,7 +86,7 @@ const deleteGoods = (params = {}) => {
params.method = 'scrm.api.equity.goods.delete' params.method = 'scrm.api.equity.goods.delete'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/** 商品id获取商品信息*/ /** 商品id获取商品信息*/
...@@ -94,15 +94,15 @@ const getEquityGoodsById = (params = {}) => { ...@@ -94,15 +94,15 @@ const getEquityGoodsById = (params = {}) => {
params.method = 'scrm.api.equity.goods.get.by.id' params.method = 'scrm.api.equity.goods.get.by.id'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/** 第三方商品分页查询*/ /** 第三方商品分页查询*/
const getListWithPageOutGoods = (params = { supplier: 'HW',pageSize: 99999 }) => { const getListWithPageOutGoods = (params = { supplier: 'HW', pageSize: 99999 }) => {
params.method = 'scrm.api.equity.goods.out.list.with.page' params.method = 'scrm.api.equity.goods.out.list.with.page'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/**商品编号获取商品信息(第三方)*/ /**商品编号获取商品信息(第三方)*/
...@@ -110,7 +110,7 @@ const getEquityOutGoodsBySupplierProductId = params => { ...@@ -110,7 +110,7 @@ const getEquityOutGoodsBySupplierProductId = params => {
params.method = 'scrm.api.equity.goods.out.get' params.method = 'scrm.api.equity.goods.out.get'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/** 同渠道商品编码校验*/ /** 同渠道商品编码校验*/
...@@ -118,7 +118,7 @@ const sameGoodsCheck = (params = {}) => { ...@@ -118,7 +118,7 @@ const sameGoodsCheck = (params = {}) => {
params.method = 'scrm.api.equity.goods.same.check' params.method = 'scrm.api.equity.goods.same.check'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/** 库存与下架校验*/ /** 库存与下架校验*/
...@@ -126,7 +126,7 @@ const stockAndStatusCheck = (params = {}) => { ...@@ -126,7 +126,7 @@ const stockAndStatusCheck = (params = {}) => {
params.method = 'scrm.api.equity.goods.stock.status.check' params.method = 'scrm.api.equity.goods.stock.status.check'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/**商品新增*/ /**商品新增*/
...@@ -134,7 +134,7 @@ const createGoods = params => { ...@@ -134,7 +134,7 @@ const createGoods = params => {
params.method = 'scrm.api.equity.goods.insert' params.method = 'scrm.api.equity.goods.insert'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/** 商品修改*/ /** 商品修改*/
...@@ -142,7 +142,7 @@ const updateGoods = (params = {}) => { ...@@ -142,7 +142,7 @@ const updateGoods = (params = {}) => {
params.method = 'scrm.api.equity.goods.update' params.method = 'scrm.api.equity.goods.update'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/**导出财务列表Excel*/ /**导出财务列表Excel*/
...@@ -150,15 +150,31 @@ const exportBalanceList = params => { ...@@ -150,15 +150,31 @@ const exportBalanceList = params => {
params.method = 'scrm.api.equity.order.balance.list.export' params.method = 'scrm.api.equity.order.balance.list.export'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
/** 获取渠道下所有品牌 */ /** 获取渠道下所有品牌 */
const getAllBrandList = (params = { supplier: 'HW',pageNum: 1,pageSize: 9999 }) => { const getAllBrandList = (params = { supplier: 'HW', pageNum: 1, pageSize: 9999 }) => {
params.method = 'scrm.api.equity.goods.brand.list.all' params.method = 'scrm.api.equity.goods.brand.list.all'
return http({ return http({
data: params, data: params,
returnAll:true returnAll: true
})
}
/** 导出权益列表 */
const exportOrderList = params => {
params.method = 'scrm.api.equity.order.list.get.export'
return http({
data: params,
returnAll: true
})
}
/** 导出加油列表 */
const exportGasList = params => {
params.method = 'scrm.api.equity.oil.order.list.with.page.export'
return http({
data: params,
returnAll: true
}) })
} }
export default { export default {
...@@ -182,5 +198,7 @@ export default { ...@@ -182,5 +198,7 @@ export default {
createGoods, createGoods,
updateGoods, updateGoods,
exportBalanceList, exportBalanceList,
getAllBrandList getAllBrandList,
exportOrderList,
exportGasList
} }
/**
* 时间控件-限制月份
*/
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
<!-- 弹窗 -->
<template>
<div>
<el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :width="width">
<span slot="title">
{{ title }}
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
<div slot="footer">
<slot name="btn-start"></slot>
<el-button type="primary" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button>
<el-button v-if="!noCancel" :size="btnSize" @click="handleClose">取消</el-button>
<slot name="btn-middle"></slot>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'glsx-dialog',
data() {
return {}
},
props: {
title: {
type: String,
default: ''
},
isVisible: {
type: Boolean,
default: false
},
showClose: {
type: Boolean,
default: true
},
btnOkLabel: {
type: String,
default: '确定'
},
noCancel: {
type: Boolean,
default: false
},
width: {
type: String,
default: '580px'
},
btnSize: {
type: String,
default: 'mini'
}
},
methods: {
handleClose() {
this.$emit('closeDialog')
},
handleConfirm() {
this.$emit('confirmDialog')
}
}
}
</script>
<style scoped>
.dialog-sub-title {
font-size: 12px;
color: #666666;
}
</style>
...@@ -17,4 +17,8 @@ Vue.component('d2-table', () => ...@@ -17,4 +17,8 @@ Vue.component('d2-table', () =>
import ('./equity-dialog/index.vue')) import ('./equity-dialog/index.vue'))
Vue.component('table-tooltip', () => Vue.component('table-tooltip', () =>
import ('./table-tooltip/index.vue')) import ('./table-tooltip/index.vue'))
Vue.component('glsx-dialog', () =>
import ('./glsx-dialog/index.vue'))
Vue.component('glsx-combi-form', () =>
import ('./glsx-combi-form/index.vue'))
...@@ -8,7 +8,7 @@ import 'glsx-components/dist/glsx-components.css' ...@@ -8,7 +8,7 @@ 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 }) { export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret } = await fetchConfig(globalState.configSwitch) const { response, request, sign, secret } = await fetchConfig(globalState.configSwitch)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
...@@ -16,11 +16,12 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -16,11 +16,12 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$common = common Vue.prototype.$common = common
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.$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)
// routes = getRoutes({ name, id, routesData }) // routes = getRoutes({ name, id, routesData })
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase})
} }
export async function mount(props) { export async function mount(props) {
const insts = render(props.routerBase, routes) const insts = render(props.routerBase, routes)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<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" style="margin: 0" id="batch">
<el-button type="primary" size="small" @click="dialogVisible = true">批量生成权益卡</el-button> <GLButton fn="批量生成权益卡" type="primary" size="small" @click="dialogVisible = true">批量生成权益卡</GLButton>
<el-form :inline="true" label-width="auto" label-position="right" style="margin-top: 20px" class="collectonForm"> <el-form :inline="true" label-width="auto" label-position="right" style="margin-top: 20px" class="collectonForm">
<el-row style="align-items: center" class="select"> <el-row style="align-items: center" class="select">
<el-form-item label="添加时间"> <el-form-item label="添加时间">
...@@ -447,8 +447,8 @@ export default { ...@@ -447,8 +447,8 @@ export default {
return new Promise(resolve => { return new Promise(resolve => {
const xhr = new XMLHttpRequest() const xhr = new XMLHttpRequest()
xhr.onreadystatechange = () => { xhr.onreadystatechange = () => {
if (xhr.readyState === 4 && xhr.status === 200) { // if (xhr.readyState === 4 && xhr.status === 200) {
} // }
} }
xhr.open('POST', url) xhr.open('POST', url)
xhr.send(params) xhr.send(params)
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<el-form-item size="small" class="fr-mr0"> <el-form-item size="small" class="fr-mr0">
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="exportExcel">导出</el-button> <GLButton fn="财务管理导出" :size="size" type="primary" @click="exportExcel">导出</GLButton>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
......
...@@ -51,22 +51,22 @@ ...@@ -51,22 +51,22 @@
<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.number="ruleForm.salesPrice"> <el-input v-model="ruleForm.salesPrice">
<span slot="suffix">元</span> <span slot="suffix">元</span>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="非会员价" prop="noMemberPrice"> <el-form-item label="非会员价" prop="noMemberPrice">
<el-input v-model.number="ruleForm.noMemberPrice"> <el-input v-model="ruleForm.noMemberPrice">
<span slot="suffix">元</span> <span slot="suffix">元</span>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="成本含税价" prop="costPrice"> <el-form-item label="成本含税价" prop="costPrice">
<el-input v-model.number="ruleForm.costPrice" :disabled="isEdit"> <el-input v-model="ruleForm.costPrice" :disabled="isEdit">
<span slot="suffix">元</span> <span slot="suffix">元</span>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="官方价/划线价" prop="lineationPrice"> <el-form-item label="官方价/划线价" prop="lineationPrice">
<el-input v-model.number="ruleForm.lineationPrice"> <el-input v-model="ruleForm.lineationPrice">
<span slot="suffix">元</span> <span slot="suffix">元</span>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<div class="wrap_driver"> <div class="wrap_driver">
<el-button type="primary" @click="onSubmit" size="small">提交</el-button> <el-button type="primary" @click="onSubmit" size="small">提交</el-button>
</div> </div>
<el-button @click="$router.go(-1)" size="small">取消</el-button> <el-button @click="$router.go(-1)" size="small">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -164,19 +164,57 @@ const validatorgoodsImage = (rule, value, callback) => { ...@@ -164,19 +164,57 @@ const validatorgoodsImage = (rule, value, callback) => {
const validatorNoMemberPrice = (rule, value, callback) => { const validatorNoMemberPrice = (rule, value, callback) => {
let { salesPrice } = window.vm.$children[0].$children[0].ruleForm let { salesPrice } = window.vm.$children[0].$children[0].ruleForm
if (value) { if (value) {
if (typeof value == 'number') { var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/
console.log(reg.test(value))
if (reg.test(value)) {
if (salesPrice && value < salesPrice) { if (salesPrice && value < salesPrice) {
callback('非会员价需 ≥ 会员价!') callback('非会员价需 ≥ 会员价!')
} else { } else {
callback() callback()
} }
} else { } else {
callback('请输入数字') callback('请输入正确格式的价格')
} }
} else { } else {
callback() callback()
} }
} }
const validatorSalesPrice = (rule, value, callback) => {
if (value) {
var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/
if (reg.test(value)) {
callback()
} else {
callback('请输入正确格式的价格')
}
} else {
callback('请输入会员价')
}
}
const validatorCostPrice = (rule, value, callback) => {
if (value) {
var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/
if (reg.test(value)) {
callback()
} else {
callback('请输入正确格式的价格')
}
} else {
callback('请输入成本含税价')
}
}
const validatorLineationPrice = (rule, value, callback) => {
if (value) {
var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/
if (reg.test(value)) {
callback()
} else {
callback('请输入正确格式的价格')
}
} else {
callback('请输入官方价/划线价')
}
}
export default { export default {
name: '', name: '',
data() { data() {
...@@ -201,7 +239,11 @@ export default { ...@@ -201,7 +239,11 @@ export default {
}, },
ruleForm: { ruleForm: {
supplier: 'HW', supplier: 'HW',
appearance: 1 appearance: 1,
costPrice:'',
lineationPrice:'',
noMemberPrice:'',
salesPrice:''
}, },
stock: '', stock: '',
brandNameList: [], brandNameList: [],
...@@ -211,10 +253,10 @@ export default { ...@@ -211,10 +253,10 @@ export default {
productId: [{ required: true, message: '请输入商品编码', trigger: 'blur' }], productId: [{ required: true, message: '请输入商品编码', trigger: 'blur' }],
goodsImage: [{ validator: validatorgoodsImage }], goodsImage: [{ validator: validatorgoodsImage }],
denomination: [{ required: true, message: '请输入直值面额', trigger: 'blur' }], denomination: [{ required: true, message: '请输入直值面额', trigger: 'blur' }],
salesPrice: [{ required: true, type: 'number', message: '请输入会员价', trigger: 'blur' }], salesPrice: [{ validator: validatorSalesPrice, trigger: 'blur' }],
noMemberPrice: [{ validator: validatorNoMemberPrice, type: 'number', trigger: 'blur' }], noMemberPrice: [{ validator: validatorNoMemberPrice, trigger: 'blur' }],
costPrice: [{ required: true, type: 'number', message: '请输入成本含税价', trigger: 'blur' }], costPrice: [{ validator: validatorCostPrice, trigger: 'blur' }],
lineationPrice: [{ required: true, type: 'number', message: '请输入官方价/划线价', trigger: 'blur' }], lineationPrice: [{ validator: validatorLineationPrice, trigger: 'blur' }],
warrantyPeriod: [{ validator: validatorWarrantyPeriod, type: 'number', trigger: 'blur' }], warrantyPeriod: [{ validator: validatorWarrantyPeriod, type: 'number', trigger: 'blur' }],
buysNotes: [{ validator: validatorbuysNotes }], buysNotes: [{ validator: validatorbuysNotes }],
useNotes: [{ validator: validatoruseNotes }] useNotes: [{ validator: validatoruseNotes }]
...@@ -228,6 +270,9 @@ export default { ...@@ -228,6 +270,9 @@ export default {
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
...@@ -289,7 +334,7 @@ export default { ...@@ -289,7 +334,7 @@ export default {
if (code == 0) { if (code == 0) {
this.ruleForm.brandName = data.brandName this.ruleForm.brandName = data.brandName
this.ruleForm.productName = data.productName this.ruleForm.productName = data.productName
this.ruleForm.costPrice = Number(data.officialPrice) this.ruleForm.costPrice = Number(data.salesPrice)
this.resetTime = new Date().getTime() this.resetTime = new Date().getTime()
} else { } else {
this.$message.error(message) this.$message.error(message)
...@@ -300,7 +345,7 @@ export default { ...@@ -300,7 +345,7 @@ export default {
let fileName = file.name let fileName = file.name
if (file.name.lastIndexOf('.') === -1) { if (file.name.lastIndexOf('.') === -1) {
this.$message.info('路径不正确') this.$message.info('路径不正确')
document.getElementById('goodsIconId').value = '' document.getElementById('goodsIconId').value = ''
return false return false
} }
let AllImgExt = '.jpg|.jpeg|.gif|.bmp|.png|.swf' let AllImgExt = '.jpg|.jpeg|.gif|.bmp|.png|.swf'
...@@ -426,8 +471,8 @@ export default { ...@@ -426,8 +471,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.allWrap{ .allWrap {
padding-bottom: 80px; padding-bottom: 80px;
} }
.footer-panel { .footer-panel {
display: flex; display: flex;
...@@ -466,10 +511,10 @@ padding-bottom: 80px; ...@@ -466,10 +511,10 @@ padding-bottom: 80px;
padding: 0 0 20px; padding: 0 0 20px;
font-weight: 700; font-weight: 700;
} }
.box .baseTitle{ .box .baseTitle {
padding-top: 40px; padding-top: 40px;
} }
.box .priceMsgTitle{ .box .priceMsgTitle {
padding-top: 18px; padding-top: 18px;
} }
...@@ -490,7 +535,7 @@ padding-bottom: 80px; ...@@ -490,7 +535,7 @@ padding-bottom: 80px;
.box .el-form-item .el-input__suffix { .box .el-form-item .el-input__suffix {
right: 20px; right: 20px;
} }
.box .el-select{ .box .el-select {
width: 100%; width: 100%;
} }
.box .editor { .box .editor {
......
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<el-button class="addGood" type="primary" icon="el-icon-plus" @click="jump">新增商品</el-button> <GLButton fn="新增商品" class="addGood" type="primary" icon="el-icon-plus" @click="jump">新增商品</GLButton>
<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"> <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="85px" label-position="right">
<el-row style="display: flex; align-items: center;margin-bottom:2px"> <el-row style="display: flex; align-items: center; margin-bottom: 2px">
<el-form-item size="small" label="品牌名称"> <el-form-item size="small" label="品牌名称">
<el-select size="small" v-model="searchForm.brandName" filterable placeholder="请选择"> <el-select size="small" v-model="searchForm.brandName" filterable placeholder="请选择">
<el-option v-for="item in goodsBrandList" :key="item.id" :label="item.brandName" :value="item.brandName"></el-option> <el-option v-for="item in goodsBrandList" :key="item.id" :label="item.brandName" :value="item.brandName"></el-option>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<!-- <el-form-item label="门店名称"> <!-- <el-form-item label="门店名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input> <el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item> --> </el-form-item> -->
<el-form-item size="small" label="提供方" style="margin-left:-10px"> <el-form-item size="small" label="提供方" style="margin-left: -10px">
<el-select size="small" v-model="searchForm.supplier"> <el-select size="small" v-model="searchForm.supplier">
<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>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item size="small" label="商品ID" style="margin-left:-10px"> <el-form-item size="small" label="商品ID" style="margin-left: -10px">
<el-input v-model="searchForm.id" placeholder="请输入" size="small"></el-input> <el-input v-model="searchForm.id" placeholder="请输入" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" class="fr-mr0"> <el-form-item size="small" class="fr-mr0">
...@@ -40,15 +40,16 @@ ...@@ -40,15 +40,16 @@
</el-row> </el-row>
</el-form> </el-form>
<div class="row-btns"> <div class="row-btns">
<el-button size="small" @click="toggleAll">全选</el-button> <el-button size="small" @click="toggleAll">全选</el-button>
<el-button size="small" type="primary" @click="batchOperation(1)">上架</el-button> <GLButton fn="上架商品" size="small" type="primary" @click="batchOperation(1)">上架</GLButton>
<el-button size="small" type="primary" @click="batchOperation(2)">下架</el-button> <GLButton fn="下架商品" size="small" type="primary" @click="batchOperation(2)">下架</GLButton>
<el-button size="small" type="primary" @click="batchOperation(-1)">删除</el-button> <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"> <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"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="jump(scope.scope)">编辑</el-button> <GLButton fn="编辑商品" type="text" @click="jump(scope.scope)">编辑</GLButton>
<el-button type="text" @click="copy(scope.scope)">复制</el-button> <GLButton fn="复制商品" type="text" @click="copy(scope.scope)">复制</GLButton>
<!-- <el-button type="text" @click="copy(scope.scope)">复制</el-button> -->
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -56,14 +57,14 @@ ...@@ -56,14 +57,14 @@
</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 { searchMixin } from '@/mixins' import { searchMixin } from '@/mixins'
export default { export default {
name: '', name: '',
// mixins: [searchMixin], mixins: [searchMixin],
data() { data() {
return { return {
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: true,
...@@ -158,7 +159,7 @@ export default { ...@@ -158,7 +159,7 @@ export default {
this.goodsBrandList = res.data || [] this.goodsBrandList = res.data || []
}) })
}, },
jump({ id, status }) { jump({ id, status }, copy) {
// let params = {} // let params = {}
// if (id) params.id = id // if (id) params.id = id
// if (status == 0) params.edit = true // if (status == 0) params.edit = true
...@@ -166,13 +167,18 @@ export default { ...@@ -166,13 +167,18 @@ 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) {
query.edit = true query.edit = true
query.$title = encodeURI('编辑商品') query.$title = encodeURI('编辑商品')
} }
if (copy == true) {
query.edit = true
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 }) {
...@@ -184,10 +190,10 @@ export default { ...@@ -184,10 +190,10 @@ export default {
message: '复制成功!', message: '复制成功!',
type: 'success' type: 'success'
}) })
this.search(() => { let [target] = this.$refs.table.data
let [target] = this.$refs.table.data let copy = true
this.jump(target) console.log(target)
}) this.jump(target, copy)
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }
......
...@@ -2,25 +2,25 @@ ...@@ -2,25 +2,25 @@
<div class="equity-wrap"> <div class="equity-wrap">
<div class="tableTitle">汽车权益</div> <div class="tableTitle">汽车权益</div>
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<el-button type="primary" size="small" @click="addEquity(1)"> <GLButton fn="添加汽车权益" type="primary" size="small" @click="addEquity(1)">
<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> </GLButton>
<div class="noneOperation"> <div class="noneOperation">
<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>
</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">
<el-button type="text" class="tableBtn" @click="editEquity(scope.scope, 1)">编辑</el-button> <GLButton fn="汽车权益编辑" type="text" class="tableBtn" @click="editEquity(scope.scope, 1)">编辑</GLButton>
<el-button type="text" class="tableBtn" @click="updateShelves(scope.scope, 'car')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</el-button> <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">商品权益</div>
<div class="equity-wrap secondBox"> <div class="equity-wrap secondBox">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div class="tagsCtn"> <div class="tagsCtn">
<div class="tags-box"> <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 :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>
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
<span style="margin-left: 8px; margin-top: 18px">添加分类</span> <span style="margin-left: 8px; margin-top: 18px">添加分类</span>
</el-button> </el-button>
</div> </div>
<el-button type="primary" size="small" @click="addEquity(2)" style="margin-top: 20px"> <GLButton fn = '添加门店权益' type="primary" size="small" @click="addEquity(2)" style="margin-top: 20px">
<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> </GLButton>
<div class="noneOperation"> <div class="noneOperation">
<GLTable ref="goodsTable" :tableParams="goodsTableParams" :tableData="goodsTableData" :tableTotal="tableTotal"> <GLTable ref="goodsTable" :tableParams="goodsTableParams" :tableData="goodsTableData" :tableTotal="tableTotal">
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
<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">
<el-button type="text" @click="editEquity(scope.scope, 2)">编辑</el-button> <GLButton fn="商品权益编辑" type="text" @click="editEquity(scope.scope, 2)">编辑</GLButton>
<el-button type="text" @click="updateShelves(scope.scope, 'goods')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</el-button> <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="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> <el-button type="text" @click="deletEquity(scope.scope.id)" :disabled="scope.scope.status == 0 ? false : true">删除</el-button>
</span> </span>
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
margin-top: 20px; margin-top: 20px;
} }
.tableTitle { .tableTitle {
margin: 20px 40px; margin: 20px 40px;
} }
.el-table__fixed-right-patch { .el-table__fixed-right-patch {
position: absolute; position: absolute;
...@@ -285,14 +285,14 @@ export default { ...@@ -285,14 +285,14 @@ export default {
.list { .list {
box-shadow: initial; box-shadow: initial;
} }
.tags-box .tag-active{ .tags-box .tag-active {
background: #5850FF !important; background: #5850ff !important;
color: #fff; color: #fff;
} }
.tags-box .el-tag .del { .tags-box .el-tag .del {
position: absolute; position: absolute;
right: -6px; right: -6px;
top: -6px; top: -6px;
color: #5850FF; color: #5850ff;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<div class="layout"> <div class="layout">
<div class="box topBox"> <div class="box topBox">
<!-- <back /> --> <!-- <back /> -->
<el-button type="primary" class="backBtn" size="small" @click="$router.push('/order/index')">返回</el-button> <el-button type="primary" class="backBtn" size="small" @click="$router.push('/order/index')">返回</el-button>
<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>
<div class="grid-item">海威订单号: {{ detailInfo.thirdOrderCode }}</div> <div class="grid-item">海威订单号: {{ thirdOrderCode }}</div>
</div> </div>
</div> </div>
<div class="box"> <div class="box">
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
</template> </template>
<template v-if="item.btn"> <template v-if="item.btn">
<div class="grid-btn"> <!-- <div class="grid-btn">
售后: 售后:
<template v-if="detailInfo.openRefund == 0"> <template v-if="detailInfo.openRefund == 0">
<el-button type="primary" @click="openRefund" size="small">开启</el-button> <el-button type="primary" @click="openRefund" size="small">开启</el-button>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<template v-else> <template v-else>
<span>已开启</span> <span>已开启</span>
</template> </template>
</div> </div> -->
</template> </template>
</div> </div>
</template> </template>
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
mixins: [orderMixin], mixins: [orderMixin],
data() { data() {
return { return {
thirdOrderCode: '',
params: {}, params: {},
eventBus: new Vue(), eventBus: new Vue(),
detailInfo: {}, detailInfo: {},
...@@ -146,13 +147,18 @@ export default { ...@@ -146,13 +147,18 @@ export default {
} }
}, },
{ {
label: '充值账号',
// prop: 'rechargeNumber',
prop: 'rechargeNumber'
},
{
label: '商品形态', label: '商品形态',
prop: 'appearanceDesc', prop: 'appearanceDesc'
// minWidth: '200' // minWidth: '200'
}, },
{ {
label: '单价/元', label: '单价/元',
prop: 'orderPrices', prop: 'orderPrices'
// minWidth: '200' // minWidth: '200'
}, },
{ {
...@@ -161,10 +167,10 @@ export default { ...@@ -161,10 +167,10 @@ export default {
formatter: () => { formatter: () => {
return 1 return 1
} }
}, },
{ {
label: '小计/元', label: '小计/元',
prop: 'orderPrices', prop: 'orderPrices'
// minWidth: '200' // minWidth: '200'
}, },
{ {
...@@ -179,8 +185,9 @@ export default { ...@@ -179,8 +185,9 @@ export default {
} }
}, },
mounted() { mounted() {
// console.log(this.$route, '11111111') 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.getDetail(this.params) this.getDetail(this.params)
}, },
methods: { methods: {
...@@ -192,6 +199,10 @@ export default { ...@@ -192,6 +199,10 @@ export default {
data.time = data.orderDate ? new Date(data.orderDate).format('yyyy-MM-dd hh:mm:ss') : '' data.time = data.orderDate ? new Date(data.orderDate).format('yyyy-MM-dd hh:mm:ss') : ''
this.detailInfo = data this.detailInfo = data
this.tableData = [data] this.tableData = [data]
// 1 卡券,2直充 如果是卡卷列表不显示充值账号一栏
if(data.appearance == 1){
this.tableParams.tableColumns.splice(1,1)
}
} }
}) })
}, },
...@@ -308,7 +319,7 @@ export default { ...@@ -308,7 +319,7 @@ export default {
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
.tableWrap{ .tableWrap {
margin-left: -32px; margin-left: -32px;
} }
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<el-form-item size="small" class="fr-mr0"> <el-form-item size="small" class="fr-mr0">
<el-button size="small" @click="handleReset">重置</el-button> <el-button size="small" @click="handleReset">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</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-form-item>
</el-row> </el-row>
</el-form> </el-form>
...@@ -36,13 +37,13 @@ ...@@ -36,13 +37,13 @@
{{ item }} {{ item }}
</div> </div>
</div> </div>
<!-- :noDataImg="url" --> <!-- :noDataImg="url" -->
<GLTable v-if="flag" :noDataImg="url" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :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="goodsMsg" slot-scope="scope"> <span slot="goodsMsg" slot-scope="scope">
<div>{{ scope.scope.brandName }}</div> <div>{{ scope.scope.brandName }}</div>
<div>{{ scope.scope.appearance == 2 ? scope.scope.productName + scope.scope.denomination : scope.scope.productName }}</div> <div>{{ 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">
...@@ -50,12 +51,13 @@ ...@@ -50,12 +51,13 @@
<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>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div> <div>{{ scope.scope.mobile }}</div>
</span> </span>
<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="jump(scope.scope, 'order')">查看详情</el-button> <GLButton fn="查看订单详情" type="text" @click="jump(scope.scope, 'order')">查看详情</GLButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -63,14 +65,14 @@ ...@@ -63,14 +65,14 @@
</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,
choseList: ['全部', '待收货', '已完成', '退款|售后'], choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 0, currentIndex: 0,
size: 'small', size: 'small',
...@@ -95,7 +97,11 @@ export default { ...@@ -95,7 +97,11 @@ export default {
align: 'left', align: 'left',
addHtml: 'goodsMsg' addHtml: 'goodsMsg'
}, },
{ {
label: '充值账号',
prop: 'rechargeNumber'
},
{
label: '订单编号', label: '订单编号',
width: '280', width: '280',
addHtml: 'orderNum' addHtml: 'orderNum'
...@@ -148,10 +154,10 @@ export default { ...@@ -148,10 +154,10 @@ export default {
// ${cell.mobile || ''}` // ${cell.mobile || ''}`
// } // }
}, },
{ {
label: '海威订单号', label: '海威订单号',
minWidth: '100', minWidth: '100',
prop : 'thirdOrderCode' prop: 'thirdOrderCode'
} }
] ]
} }
...@@ -159,6 +165,48 @@ export default { ...@@ -159,6 +165,48 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
handleExport() {
var params = this.formatParams()
this.$apis.orderApi.exportOrderList(params).then(res => {
console.log(res)
this.exportFn(res.data)
})
},
getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = 'IE'
} else if (ua.match(/firefox/) != null) {
browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) {
browserType = 'UC'
} else if (ua.match(/opera/) != null) {
browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) {
browserType = '百度'
} else if (ua.match(/metasr/) != null) {
browserType = '搜狗'
} else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) {
browserType = '遨游'
} else {
browserType = '谷歌'
}
return browserType
},
exportFn(url) {
let browserType = this.getExplorer()
if (browserType == 'QQ') {
window.open(url)
return
}
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = url
document.body.appendChild(iframe)
},
tabClick(index) { tabClick(index) {
this.currentIndex = index this.currentIndex = index
this.searchForm.orderStatus = '' this.searchForm.orderStatus = ''
...@@ -193,16 +241,20 @@ export default { ...@@ -193,16 +241,20 @@ export default {
} }
this.handleSearch() this.handleSearch()
}, },
formatParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.orderDateStart = this.searchForm.daterange[0] + ' 00:00:00'
params.orderDateEnd = this.searchForm.daterange[1] + ' 23:59:59'
} else {
if (params.orderDateStart) delete params.orderDateStart && delete params.orderDateEnd
}
delete params.daterange
return params
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) this.searchFormTable = this.formatParams()
if (this.searchFormTable.daterange) {
this.searchFormTable.orderDateStart = this.searchForm.daterange[0] + ' 00:00:00'
this.searchFormTable.orderDateEnd = this.searchForm.daterange[1] + ' 23:59:59'
} else {
if (this.searchFormTable.orderDateStart) delete this.searchFormTable.orderDateStart && delete this.searchFormTable.orderDateEnd
}
delete this.searchFormTable.daterange
resolve() resolve()
}) })
}, },
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<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">
<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="edit(scope.scope)" class="tableBtn" size="small">编辑</el-button> <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>
</span> </span>
...@@ -411,15 +411,9 @@ export default { ...@@ -411,15 +411,9 @@ export default {
this.generateOptions = [] this.generateOptions = []
} }
}, },
//获取src改变卡片样式
changeStore() {
// this.clearStyle()
var imageId = this.product.filter(item => item.src == this.ruleForm.backgroundImage).id
},
//编辑 //编辑
edit(row) { edit(row) {
this.ruleForm = row this.ruleForm = row
// this.changeStore()
this.dialogVisible = true this.dialogVisible = true
this.ruleForm.effectiveType = row.effectiveType + '' this.ruleForm.effectiveType = row.effectiveType + ''
//赋值时间框 //赋值时间框
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<div>{{ scope.scope.mobile }}</div> <div>{{ scope.scope.mobile }}</div>
</span> </span>
<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="jump(scope.scope, 'sale')" size="small">查看详情</el-button> <GLButton fn="查看售后详情" type="text" @click="jump(scope.scope, 'sale')" size="small">查看详情</GLButton>
</span> </span>
<span slot="orderNum" slot-scope="scope"> <span slot="orderNum" slot-scope="scope">
<div class="refund-box"> <div class="refund-box">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!