Commit 03c2ccc8 by zhouzy

1

1 parent 1e8d5092
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.2.5",
"glsx-components": "^1.3.7",
"glsx-vue-components": "^1.0.15",
"jquery": "^3.6.0",
"vue": "^2.6.14",
......
......@@ -26,7 +26,7 @@ const getOrderDetail = params => {
params.method = 'scrm.api.equity.order.detail.get'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/** 开启售后状态修改*/
......@@ -34,7 +34,7 @@ const openRefund = params => {
params.method = 'scrm.api.equity.order.refund.open'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/** 获取售后订单列表*/
......@@ -49,7 +49,7 @@ const getRefundDetail = params => {
params.method = 'scrm.api.equity.order.refund.list.get'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/** 获取e代驾订单列表*/
......@@ -78,7 +78,7 @@ const goodsShelves = (params = {}) => {
params.method = 'scrm.api.equity.goods.shelves'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/**商品删除/支持批量*/
......@@ -86,7 +86,7 @@ const deleteGoods = (params = {}) => {
params.method = 'scrm.api.equity.goods.delete'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/** 商品id获取商品信息*/
......@@ -94,15 +94,15 @@ const getEquityGoodsById = (params = {}) => {
params.method = 'scrm.api.equity.goods.get.by.id'
return http({
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'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/**商品编号获取商品信息(第三方)*/
......@@ -110,7 +110,7 @@ const getEquityOutGoodsBySupplierProductId = params => {
params.method = 'scrm.api.equity.goods.out.get'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/** 同渠道商品编码校验*/
......@@ -118,7 +118,7 @@ const sameGoodsCheck = (params = {}) => {
params.method = 'scrm.api.equity.goods.same.check'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/** 库存与下架校验*/
......@@ -126,7 +126,7 @@ const stockAndStatusCheck = (params = {}) => {
params.method = 'scrm.api.equity.goods.stock.status.check'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/**商品新增*/
......@@ -134,7 +134,7 @@ const createGoods = params => {
params.method = 'scrm.api.equity.goods.insert'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/** 商品修改*/
......@@ -142,7 +142,7 @@ const updateGoods = (params = {}) => {
params.method = 'scrm.api.equity.goods.update'
return http({
data: params,
returnAll:true
returnAll: true
})
}
/**导出财务列表Excel*/
......@@ -150,15 +150,31 @@ const exportBalanceList = params => {
params.method = 'scrm.api.equity.order.balance.list.export'
return http({
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'
return http({
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 {
......@@ -182,5 +198,7 @@ export default {
createGoods,
updateGoods,
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', () =>
import ('./equity-dialog/index.vue'))
Vue.component('table-tooltip', () =>
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'
let routes = []
let router = 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)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
......@@ -16,11 +16,12 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$common = common
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.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)
// routes = getRoutes({ name, id, routesData })
routes = getRoutes(routesData)
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase})
}
export async function mount(props) {
const insts = render(props.routerBase, routes)
......
......@@ -4,7 +4,7 @@
<div class="tapItem">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<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-row style="align-items: center" class="select">
<el-form-item label="添加时间">
......@@ -447,8 +447,8 @@ export default {
return new Promise(resolve => {
const xhr = new XMLHttpRequest()
xhr.onreadystatechange = () => {
if (xhr.readyState === 4 && xhr.status === 200) {
}
// if (xhr.readyState === 4 && xhr.status === 200) {
// }
}
xhr.open('POST', url)
xhr.send(params)
......
......@@ -53,7 +53,7 @@
<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-button :size="size" type="primary" @click="exportExcel">导出</el-button>
<GLButton fn="财务管理导出" :size="size" type="primary" @click="exportExcel">导出</GLButton>
</el-form-item>
</el-row>
</el-form>
......
......@@ -51,22 +51,22 @@
<el-input v-model="ruleForm.denomination" maxlength="10"></el-input>
</el-form-item>
<el-form-item label="会员价" prop="salesPrice">
<el-input v-model.number="ruleForm.salesPrice">
<el-input v-model="ruleForm.salesPrice">
<span slot="suffix">元</span>
</el-input>
</el-form-item>
<el-form-item label="非会员价" prop="noMemberPrice">
<el-input v-model.number="ruleForm.noMemberPrice">
<el-input v-model="ruleForm.noMemberPrice">
<span slot="suffix">元</span>
</el-input>
</el-form-item>
<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>
</el-input>
</el-form-item>
<el-form-item label="官方价/划线价" prop="lineationPrice">
<el-input v-model.number="ruleForm.lineationPrice">
<el-input v-model="ruleForm.lineationPrice">
<span slot="suffix">元</span>
</el-input>
</el-form-item>
......@@ -114,7 +114,7 @@
<div class="wrap_driver">
<el-button type="primary" @click="onSubmit" size="small">提交</el-button>
</div>
<el-button @click="$router.go(-1)" size="small">取消</el-button>
<el-button @click="$router.go(-1)" size="small">取消</el-button>
</div>
</div>
</template>
......@@ -164,19 +164,57 @@ const validatorgoodsImage = (rule, value, callback) => {
const validatorNoMemberPrice = (rule, value, callback) => {
let { salesPrice } = window.vm.$children[0].$children[0].ruleForm
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) {
callback('非会员价需 ≥ 会员价!')
} else {
callback()
}
} else {
callback('请输入数字')
callback('请输入正确格式的价格')
}
} else {
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 {
name: '',
data() {
......@@ -201,7 +239,11 @@ export default {
},
ruleForm: {
supplier: 'HW',
appearance: 1
appearance: 1,
costPrice:'',
lineationPrice:'',
noMemberPrice:'',
salesPrice:''
},
stock: '',
brandNameList: [],
......@@ -211,10 +253,10 @@ export default {
productId: [{ required: true, message: '请输入商品编码', trigger: 'blur' }],
goodsImage: [{ validator: validatorgoodsImage }],
denomination: [{ required: true, message: '请输入直值面额', trigger: 'blur' }],
salesPrice: [{ required: true, type: 'number', message: '请输入会员价', trigger: 'blur' }],
noMemberPrice: [{ validator: validatorNoMemberPrice, type: 'number', trigger: 'blur' }],
costPrice: [{ required: true, type: 'number', message: '请输入成本含税价', trigger: 'blur' }],
lineationPrice: [{ required: true, type: 'number', message: '请输入官方价/划线价', trigger: 'blur' }],
salesPrice: [{ validator: validatorSalesPrice, trigger: 'blur' }],
noMemberPrice: [{ validator: validatorNoMemberPrice, trigger: 'blur' }],
costPrice: [{ validator: validatorCostPrice, trigger: 'blur' }],
lineationPrice: [{ validator: validatorLineationPrice, trigger: 'blur' }],
warrantyPeriod: [{ validator: validatorWarrantyPeriod, type: 'number', trigger: 'blur' }],
buysNotes: [{ validator: validatorbuysNotes }],
useNotes: [{ validator: validatoruseNotes }]
......@@ -228,6 +270,9 @@ export default {
this.getListWithPageOutGoods()
let id = this.$route.query.id
let edit = this.$route.query.edit
// if(!edit){
// edit = true
// }
if (id) {
this.getEquityGoodsById(id)
this.isEdit = !edit
......@@ -289,7 +334,7 @@ export default {
if (code == 0) {
this.ruleForm.brandName = data.brandName
this.ruleForm.productName = data.productName
this.ruleForm.costPrice = Number(data.officialPrice)
this.ruleForm.costPrice = Number(data.salesPrice)
this.resetTime = new Date().getTime()
} else {
this.$message.error(message)
......@@ -300,7 +345,7 @@ export default {
let fileName = file.name
if (file.name.lastIndexOf('.') === -1) {
this.$message.info('路径不正确')
document.getElementById('goodsIconId').value = ''
document.getElementById('goodsIconId').value = ''
return false
}
let AllImgExt = '.jpg|.jpeg|.gif|.bmp|.png|.swf'
......@@ -426,8 +471,8 @@ export default {
</script>
<style lang="scss" scoped>
.allWrap{
padding-bottom: 80px;
.allWrap {
padding-bottom: 80px;
}
.footer-panel {
display: flex;
......@@ -466,10 +511,10 @@ padding-bottom: 80px;
padding: 0 0 20px;
font-weight: 700;
}
.box .baseTitle{
.box .baseTitle {
padding-top: 40px;
}
.box .priceMsgTitle{
.box .priceMsgTitle {
padding-top: 18px;
}
......@@ -490,7 +535,7 @@ padding-bottom: 80px;
.box .el-form-item .el-input__suffix {
right: 20px;
}
.box .el-select{
.box .el-select {
width: 100%;
}
.box .editor {
......
<template>
<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">
<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-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>
......@@ -15,7 +15,7 @@
<!-- <el-form-item label="门店名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input>
</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-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
......@@ -30,7 +30,7 @@
<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="商品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-form-item>
<el-form-item size="small" class="fr-mr0">
......@@ -40,15 +40,16 @@
</el-row>
</el-form>
<div class="row-btns">
<el-button size="small" @click="toggleAll">全选</el-button>
<el-button size="small" type="primary" @click="batchOperation(1)">上架</el-button>
<el-button size="small" type="primary" @click="batchOperation(2)">下架</el-button>
<el-button size="small" type="primary" @click="batchOperation(-1)">删除</el-button>
<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>
<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">
<el-button type="text" @click="jump(scope.scope)">编辑</el-button>
<el-button type="text" @click="copy(scope.scope)">复制</el-button>
<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>
</div>
......@@ -56,14 +57,14 @@
</template>
<script type='text/ecmascript-6'>
import url from "@/assets/empty.png"
// import { searchMixin } from '@/mixins'
import url from '@/assets/empty.png'
import { searchMixin } from '@/mixins'
export default {
name: '',
// mixins: [searchMixin],
mixins: [searchMixin],
data() {
return {
url:url,
url: url,
size: 'small',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true,
......@@ -158,7 +159,7 @@ export default {
this.goodsBrandList = res.data || []
})
},
jump({ id, status }) {
jump({ id, status }, copy) {
// let params = {}
// if (id) params.id = id
// if (status == 0) params.edit = true
......@@ -166,13 +167,18 @@ export default {
// if (window.$config.axios.environment) {
// target = ['权益卡管理平台', '运营平台', 'SCRM权益平台', '商品管理', '*商品详情']
// }
console.log(copy, 'copy')
let query = {}
if (id) query.id = id
if (status == 0) {
query.edit = true
query.$title = encodeURI('编辑商品')
}
if (copy == true) {
query.edit = true
query.$title = encodeURI('编辑商品')
}
console.log(query.edit, 'edit')
this.$router.push({ path: '/goods/addGoods', query })
},
copy({ id }) {
......@@ -184,10 +190,10 @@ export default {
message: '复制成功!',
type: 'success'
})
this.search(() => {
let [target] = this.$refs.table.data
this.jump(target)
})
let [target] = this.$refs.table.data
let copy = true
console.log(target)
this.jump(target, copy)
} else {
this.$message.error(res.message)
}
......
......@@ -2,25 +2,25 @@
<div class="equity-wrap">
<div class="tableTitle">汽车权益</div>
<div class="equity-wrap contain">
<el-button type="primary" size="small" @click="addEquity(1)">
<i class="el-icon-plus"></i>
<span style="margin-left: 8px">添加汽车权益</span>
</el-button>
<div class="noneOperation">
<GLTable ref="carTable" :tableParams="carTableParams" :pageConf="cardsDatail" :getListApi="getCardListApi">
<div slot="mainPageFlag" slot-scope="scope">
<el-button type="text" @click="carsDisplay(scope.scope)">{{ scope.scope.mainPageFlag == 1 ? '取消首页展示' : '首页展示' }}</el-button>
</div>
<div slot="carImage" slot-scope="scope">
<img class="equity-icon" :src="scope.scope.equityIcon" />
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" class="tableBtn" @click="editEquity(scope.scope, 1)">编辑</el-button>
<el-button type="text" class="tableBtn" @click="updateShelves(scope.scope, 'car')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</el-button>
<el-button type="text" class="tableBtn" @click="setTop(scope.scope.id, 'car')">置顶</el-button>
</span>
</GLTable>
</div>
<GLButton fn="添加汽车权益" type="primary" size="small" @click="addEquity(1)">
<i class="el-icon-plus"></i>
<span style="margin-left: 8px">添加汽车权益</span>
</GLButton>
<div class="noneOperation">
<GLTable ref="carTable" :tableParams="carTableParams" :pageConf="cardsDatail" :getListApi="getCardListApi">
<div slot="mainPageFlag" slot-scope="scope">
<el-button type="text" @click="carsDisplay(scope.scope)">{{ scope.scope.mainPageFlag == 1 ? '取消首页展示' : '首页展示' }}</el-button>
</div>
<div slot="carImage" slot-scope="scope">
<img class="equity-icon" :src="scope.scope.equityIcon" />
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<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>
<el-button type="text" class="tableBtn" @click="setTop(scope.scope.id, 'car')">置顶</el-button>
</span>
</GLTable>
</div>
</div>
<div class="tableTitle">商品权益</div>
<div class="equity-wrap secondBox">
......@@ -28,7 +28,7 @@
<div class="tagsCtn">
<div class="tags-box">
<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>
{{ 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>
......@@ -41,10 +41,10 @@
<span style="margin-left: 8px; margin-top: 18px">添加分类</span>
</el-button>
</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>
<span style="margin-left: 8px">添加门店权益</span>
</el-button>
</GLButton>
<div class="noneOperation">
<GLTable ref="goodsTable" :tableParams="goodsTableParams" :tableData="goodsTableData" :tableTotal="tableTotal">
......@@ -55,8 +55,8 @@
<img class="equity-icon" :src="scope.scope.equityIcon" />
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="editEquity(scope.scope, 2)">编辑</el-button>
<el-button type="text" @click="updateShelves(scope.scope, 'goods')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</el-button>
<GLButton fn="商品权益编辑" type="text" @click="editEquity(scope.scope, 2)">编辑</GLButton>
<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>
......@@ -265,7 +265,7 @@ export default {
margin-top: 20px;
}
.tableTitle {
margin: 20px 40px;
margin: 20px 40px;
}
.el-table__fixed-right-patch {
position: absolute;
......@@ -285,14 +285,14 @@ export default {
.list {
box-shadow: initial;
}
.tags-box .tag-active{
background: #5850FF !important;
color: #fff;
.tags-box .tag-active {
background: #5850ff !important;
color: #fff;
}
.tags-box .el-tag .del {
position: absolute;
right: -6px;
top: -6px;
color: #5850FF;
.tags-box .el-tag .del {
position: absolute;
right: -6px;
top: -6px;
color: #5850ff;
}
</style>
\ No newline at end of file
......@@ -2,11 +2,11 @@
<div class="layout">
<div class="box topBox">
<!-- <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-item">订单编号:{{ detailInfo.orderCode }}</div>
<div class="grid-item">下单时间: {{ detailInfo.time }}</div>
<div class="grid-item">海威订单号: {{ detailInfo.thirdOrderCode }}</div>
<div class="grid-item">海威订单号: {{ thirdOrderCode }}</div>
</div>
</div>
<div class="box">
......@@ -29,7 +29,7 @@
</div>
</template>
<template v-if="item.btn">
<div class="grid-btn">
<!-- <div class="grid-btn">
售后:
<template v-if="detailInfo.openRefund == 0">
<el-button type="primary" @click="openRefund" size="small">开启</el-button>
......@@ -37,7 +37,7 @@
<template v-else>
<span>已开启</span>
</template>
</div>
</div> -->
</template>
</div>
</template>
......@@ -71,6 +71,7 @@ export default {
mixins: [orderMixin],
data() {
return {
thirdOrderCode: '',
params: {},
eventBus: new Vue(),
detailInfo: {},
......@@ -146,13 +147,18 @@ export default {
}
},
{
label: '充值账号',
// prop: 'rechargeNumber',
prop: 'rechargeNumber'
},
{
label: '商品形态',
prop: 'appearanceDesc',
prop: 'appearanceDesc'
// minWidth: '200'
},
{
label: '单价/元',
prop: 'orderPrices',
prop: 'orderPrices'
// minWidth: '200'
},
{
......@@ -161,10 +167,10 @@ export default {
formatter: () => {
return 1
}
},
},
{
label: '小计/元',
prop: 'orderPrices',
prop: 'orderPrices'
// minWidth: '200'
},
{
......@@ -179,8 +185,9 @@ export default {
}
},
mounted() {
// console.log(this.$route, '11111111')
console.log(this.$route, '11111111')
this.params = { orderCode: this.$route.query.orderCode }
this.thirdOrderCode = this.$route.query.thirdOrderCode
this.getDetail(this.params)
},
methods: {
......@@ -192,6 +199,10 @@ export default {
data.time = data.orderDate ? new Date(data.orderDate).format('yyyy-MM-dd hh:mm:ss') : ''
this.detailInfo = data
this.tableData = [data]
// 1 卡券,2直充 如果是卡卷列表不显示充值账号一栏
if(data.appearance == 1){
this.tableParams.tableColumns.splice(1,1)
}
}
})
},
......@@ -308,7 +319,7 @@ export default {
font-weight: 500;
color: #333333;
}
.tableWrap{
.tableWrap {
margin-left: -32px;
}
}
......
......@@ -28,6 +28,7 @@
<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>
......@@ -36,13 +37,13 @@
{{ item }}
</div>
</div>
<!-- :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">
<!-- :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">
<span slot="goodsMsg" slot-scope="scope">
<div>{{ scope.scope.brandName }}</div>
<div>{{ scope.scope.appearance == 2 ? scope.scope.productName + scope.scope.denomination : scope.scope.productName }}</div>
</span>
<span slot="orderNum" slot-scope="scope">
<span slot="orderNum" slot-scope="scope">
<div>{{ scope.scope.orderCode }}</div>
</span>
<span slot="priceAmount" slot-scope="scope">
......@@ -50,12 +51,13 @@
<div>{{ scope.scope.goodsQuality }}张</div>
<div></div>
</span>
.
<span slot="userInfo" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div>
</span>
<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>
</GLTable>
</div>
......@@ -63,14 +65,14 @@
</template>
<script type='text/ecmascript-6'>
import url from "@/assets/empty.png"
import url from '@/assets/empty.png'
import { orderMixin, searchMixin } from '@/mixins'
export default {
name: '',
mixins: [orderMixin, searchMixin],
data() {
return {
url:url,
url: url,
choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 0,
size: 'small',
......@@ -95,7 +97,11 @@ export default {
align: 'left',
addHtml: 'goodsMsg'
},
{
{
label: '充值账号',
prop: 'rechargeNumber'
},
{
label: '订单编号',
width: '280',
addHtml: 'orderNum'
......@@ -148,10 +154,10 @@ export default {
// ${cell.mobile || ''}`
// }
},
{
{
label: '海威订单号',
minWidth: '100',
prop : 'thirdOrderCode'
prop: 'thirdOrderCode'
}
]
}
......@@ -159,6 +165,48 @@ export default {
},
mounted() {},
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) {
this.currentIndex = index
this.searchForm.orderStatus = ''
......@@ -193,16 +241,20 @@ export default {
}
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() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
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
this.searchFormTable = this.formatParams()
resolve()
})
},
......
......@@ -21,7 +21,7 @@
<div class="tableCtn">
<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">
<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" @click="copy(scope.scope)" class="tableBtn" size="small">复制</el-button>
</span>
......@@ -411,15 +411,9 @@ export default {
this.generateOptions = []
}
},
//获取src改变卡片样式
changeStore() {
// this.clearStyle()
var imageId = this.product.filter(item => item.src == this.ruleForm.backgroundImage).id
},
//编辑
edit(row) {
this.ruleForm = row
// this.changeStore()
this.dialogVisible = true
this.ruleForm.effectiveType = row.effectiveType + ''
//赋值时间框
......
......@@ -67,7 +67,7 @@
<div>{{ scope.scope.mobile }}</div>
</span>
<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 slot="orderNum" slot-scope="scope">
<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!