Commit 2b5bdf8d by 王志慧

fix:修补bug

1 parent 227bf50c
...@@ -40,7 +40,8 @@ const orderRefund = params => { ...@@ -40,7 +40,8 @@ const orderRefund = params => {
url: '/rop-scrm-equity/router', url: '/rop-scrm-equity/router',
method: 'GET', method: 'GET',
data: params, data: params,
sign: true sign: true,
returnAll: true
}) })
} }
//套餐使用详情 //套餐使用详情
......
...@@ -8,15 +8,15 @@ export function debounce(func, wait = 200) { ...@@ -8,15 +8,15 @@ export function debounce(func, wait = 200) {
} }
} }
export function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm') { export function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm:ss') {
const date = new Date(dateTime) const date = new Date(dateTime)
const config = { const config = {
YYYY: date.getFullYear(), YYYY: date.getFullYear(),
MM: date.getMonth() + 1, //getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11) MM: date.getMonth() + 1, //getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
DD: date.getDate(), DD: date.getDate(),
HH: date.getHours(), HH: date.getHours(),
mm: date.getMinutes(), mm: date.getMinutes()<10?'0'+date.getMinutes():date.getMinutes(),
ss: date.getSeconds() ss: date.getSeconds()<10?'0'+date.getSeconds():date.getSeconds()
} }
for (const key in config) { for (const key in config) {
format = format.replace(key, config[key]) format = format.replace(key, config[key])
......
...@@ -167,12 +167,8 @@ export default { ...@@ -167,12 +167,8 @@ export default {
}, },
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
console.log('kkk', this.$globalState)
this.merchantModel = this.$globalState.session.merchantModel this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
if (this.merchantModel == 1 && this.accountLevel == 1) {
this.searchForm.orderType = 2
}
} }
}, },
mounted() {}, mounted() {},
...@@ -231,6 +227,13 @@ export default { ...@@ -231,6 +227,13 @@ export default {
this.refundVisible = !this.refundVisible this.refundVisible = !this.refundVisible
}, },
refundConfirmDialog() { refundConfirmDialog() {
if (this.refund == '') {
this.$message({
message: '请输入退款说明',
type: 'error'
})
return
}
const params = { const params = {
reason: this.refund, reason: this.refund,
orderCode: this.orderCode orderCode: this.orderCode
...@@ -251,8 +254,7 @@ export default { ...@@ -251,8 +254,7 @@ export default {
this.$router.push({ this.$router.push({
path: '/memberCenter/orderDetail', path: '/memberCenter/orderDetail',
query: { query: {
id: row.id, id: row.id
detail: row
} }
}) })
}, },
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
<template slot="orderType" slot-scope="scope"> <template slot="orderType" slot-scope="scope">
<span>{{ scope.scope.orderType == 1 ? '套餐' : '权益卡' }}</span> <span>{{ scope.scope.orderType == 1 ? '套餐' : '权益卡' }}</span>
</template> </template>
<template slot="amount">
<span>1</span>
</template>
<template slot="orderStatus" slot-scope="scope"> <template slot="orderStatus" slot-scope="scope">
<span>{{ scope.scope.orderStatus == 2 ? '待收货' : scope.scope.orderStatus == 3 ? '已完成' : scope.scope.orderStatus == 4 ? '售后中' : scope.scope.orderStatus == 5 ? '退款失败' : scope.scope.orderStatus == 6 ? '已退款' : '' }}</span> <span>{{ scope.scope.orderStatus == 2 ? '待收货' : scope.scope.orderStatus == 3 ? '已完成' : scope.scope.orderStatus == 4 ? '售后中' : scope.scope.orderStatus == 5 ? '退款失败' : scope.scope.orderStatus == 6 ? '已退款' : '' }}</span>
</template> </template>
...@@ -59,80 +62,6 @@ ...@@ -59,80 +62,6 @@
<el-button type="primary" @click="goBack">返回</el-button> <el-button type="primary" @click="goBack">返回</el-button>
</div> </div>
</div> </div>
<!-- <div class="live-room container">
<div class="topMsg">
<div class="orderNo">订单编号:{{ detail.orderCode }}</div>
<div class="orderTime">下单时间:{{ detail.createDate }}</div>
<el-button type="primary" size="small" class="backBtn" @click="goBack">
返回
</el-button>
</div>
<div class="midMsgWrap">
<div class="midMsgTitle">
<span>支付信息</span>
<span>用户信息</span>
<span>服务名称</span>
<span>已核/总次数</span>
</div>
<div class="midMsgContent">
<div class="item">
<div>付款状态:已付款</div>
<div>
付款金额:{{ detail.realPayPrice }}
<span v-show="detail.realPayPrice">元</span>
</div>
<div>付款方式:微信支付</div>
<div>付款时间:{{ detail.createDate }}</div>
</div>
<div class="item">
<div class="userName">用户名称:{{ detail.accountName }}</div>
<div class="phoneNumber">用户手机号:{{ detail.mobile }}</div>
</div>
<div class="item">
<div v-for="(item, index) in detail.list" :key="index">{{ item.serviceName }}</div>
</div>
<div class="item">
<div v-for="(item, index) in detail.list" :key="index">{{ item.serviceAmount }}/{{ item.serviceCount }}次</div>
</div>
</div>
</div>
<div id="tableWrap">
<div class="tableWrapBox">
<el-table :data="tableData" style="width: 100%" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<el-table-column label="商品名称" align="center">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.couponList" :key="index">{{ item.couponName }}</div>
</template>
</el-table-column>
<el-table-column label="类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.orderType == 1 ? '套餐' : '权益卡' }}</span>
</template>
</el-table-column>
<el-table-column label="有效期" align="center" v-if="detail.orderType == 2">
<template slot-scope="scope">
<span>{{ scope.row.effectiveNum == '-1' ? '无限制' : scope.row.effectiveNum + '天' }}</span>
</template>
</el-table-column>
<el-table-column prop="originalPrice" label="单价/元" align="center"></el-table-column>
<el-table-column prop="amount" label="数量" align="center"></el-table-column>
<el-table-column prop="totalPrice" label="小计/元" align="center"></el-table-column>
<el-table-column prop="realPayPrice" label="实收金额" align="center">
<template slot-scope="scope">
<span style="color:#EB4E4E">{{ scope.row.realPayPrice }}</span>
</template>
</el-table-column>
<el-table-column prop="orderStatus" label="状态" align="center">
<template slot-scope="scope">
<div>{{ scope.row.refundReason }}</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div> -->
</div> </div>
</template> </template>
...@@ -233,7 +162,7 @@ export default { ...@@ -233,7 +162,7 @@ export default {
}, },
{ {
colList: [ colList: [
{ thColspan: 1, tdColspan: 2, label: '数量', name: 'amount' }, { thColspan: 1, tdColspan: 2, label: '数量', name: 'amount',addHtml: 'amount' },
{ thColspan: 1, tdColspan: 2, label: '小计/元', name: 'totalPrice' } { thColspan: 1, tdColspan: 2, label: '小计/元', name: 'totalPrice' }
] ]
}, },
...@@ -306,9 +235,6 @@ export default { ...@@ -306,9 +235,6 @@ export default {
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
if (this.accountLevel == 4) {
this.basicParams.splice(6, 1)
}
} }
this.tableSearchForm = { this.tableSearchForm = {
id: this.$route.query.id id: this.$route.query.id
...@@ -316,20 +242,13 @@ export default { ...@@ -316,20 +242,13 @@ export default {
this.getOrderPageDetail() this.getOrderPageDetail()
}, },
mounted() { mounted() {},
// this.$nextTick(() => {
// let clientHeight = document.documentElement.clientHeight
// let offsettop = document.getElementById('tableWrap').offsetTop
// document.getElementById('tableWrap').style.minHeight = clientHeight - offsettop - 120 + 'px'
// })
},
methods: { methods: {
dateFormatFun(date) { dateFormatFun(date) {
return dateFormat(date) return dateFormat(date)
}, },
getOrderPageDetail() { getOrderPageDetail() {
getOrderPageDetail({ id: this.$route.query.id }).then(res => { getOrderPageDetail({ id: this.$route.query.id }).then(res => {
// this.mylist=res.list
if (res.code == '0') { if (res.code == '0') {
this.detailData = res.data this.detailData = res.data
} else { } else {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/> />
</div> </div>
<tip-panel class="list-panel" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel> <tip-panel class="list-panel" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<template v-if="accountLevel == 4"> <template v-if="accountLevel == 4 && merchantModel == 1">
<div class="setmeal-tabs flex-default m-t-10"> <div class="setmeal-tabs flex-default m-t-10">
<template v-for="(tab, index) in tabList"> <template v-for="(tab, index) in tabList">
<div :class="['tab', tab.checked ? 'active' : '']" @click="changeTab(index)" :key="index">{{ tab.text }}</div> <div :class="['tab', tab.checked ? 'active' : '']" @click="changeTab(index)" :key="index">{{ tab.text }}</div>
...@@ -33,10 +33,9 @@ ...@@ -33,10 +33,9 @@
<ticket :choseItemList="scope.scope.list"></ticket> <ticket :choseItemList="scope.scope.list"></ticket>
</div> </div>
</span> </span>
<span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope">
<!-- 是否置顶推荐:1 是;2 否 --> <template v-if="!(accountLevel == 4 && activetab == 1)">
<el-button type="text" v-if="scope.scope.topFlag == 1">已指定推荐</el-button>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2" fn="置顶推荐">置顶推荐</GLButton>
<template v-if="scope.scope.state === 0"> <template v-if="scope.scope.state === 0">
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button> <!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
...@@ -59,6 +58,9 @@ ...@@ -59,6 +58,9 @@
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton> <GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton> <GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template> </template>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2" fn="置顶推荐">置顶推荐</GLButton>
<el-button type="text" v-if="scope.scope.topFlag == 1">已置顶推荐</el-button>
</template>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -141,33 +143,26 @@ export default { ...@@ -141,33 +143,26 @@ export default {
{ {
label: '套餐名称', label: '套餐名称',
prop: 'packageName', prop: 'packageName',
width: '180' width: 200
}, },
{ {
label: '套餐售价/元', label: '套餐售价/元',
prop: 'packagePrice', prop: 'packagePrice'
width: 140
}, },
{ {
label: '说明', label: '说明',
prop: 'notes', prop: 'notes',
width: 160, width: 200,
line: 4 line: 4
}, },
{ {
label: '购买人数', label: '售出数量',
prop: 'buyNumber', prop: 'buyNumber',
line: 1 line: 1
}, },
{ {
label: '套餐总价',
prop: 'referencePrice'
},
{
label: '状态', label: '状态',
prop: 'state', prop: 'state',
width: '80',
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.stateList.find(item => item.confId == cellValue.state).confName return this.baseDataList.stateList.find(item => item.confId == cellValue.state).confName
} }
...@@ -176,7 +171,7 @@ export default { ...@@ -176,7 +171,7 @@ export default {
label: '操作', label: '操作',
prop: 'optionsFun', prop: 'optionsFun',
addHtml: 'optionsFun', addHtml: 'optionsFun',
width: 160 width: 220
} }
] ]
}, },
...@@ -191,7 +186,7 @@ export default { ...@@ -191,7 +186,7 @@ export default {
}, },
computed: { computed: {
getListApi() { getListApi() {
const { activetab, merchantModel, accountLevel } = this const { activetab } = this
let listApi = getSetMealListApi let listApi = getSetMealListApi
if (activetab == 1) { if (activetab == 1) {
listApi = getSetMealListApi listApi = getSetMealListApi
...@@ -202,26 +197,36 @@ export default { ...@@ -202,26 +197,36 @@ export default {
} }
}, },
created() { created() {
console.log(this.$route.query.activetab)
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
this.merchantModel = this.$globalState.session.merchantModel this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
// this.userType = this.$globalState.session.userType // this.userType = this.$globalState.session.userType
if (this.merchantModel == 2) {
this.activetab = 0
}
} }
this.searchForm = { this.searchForm = {
merchantId: this.merchantId merchantId: this.merchantId
// merchantName // merchantName
} }
if (this.$route.query && this.$route.query.activetab) {
this.activetab = 0
// this.changeTab(this.activetab)
this.tabList.forEach(item => (item.checked = false))
this.tabList[this.activetab].checked = true
}
this.dynamicFile() this.dynamicFile()
this.getLoginCountFun() this.getLoginCountFun()
}, },
mounted() {}, mounted() {},
methods: { methods: {
dynamicFile() { dynamicFile() {
const { activetab, merchantModel, accountLevel } = this let { activetab, accountLevel } = this
const saleParam = { const saleParam = {
label: '在本店售出数量', label: '售出数量',
prop: 'buyNumber', prop: 'buyNumber',
width: 140 width: 140
} }
...@@ -230,11 +235,11 @@ export default { ...@@ -230,11 +235,11 @@ export default {
prop: 'referencePrice' prop: 'referencePrice'
} }
// accountLevel == 4
if (activetab == 1 && accountLevel == 4) { if ((activetab == 1 && accountLevel == 4) || accountLevel != 4) {
this.tableParams.tableColumns.splice(5, 1, saleParam) this.tableParams.tableColumns.splice(4, 1, saleParam)
} else { } else if (activetab == 0 && accountLevel == 4) {
this.tableParams.tableColumns.splice(5, 1, referencePrice) this.tableParams.tableColumns.splice(4, 1, referencePrice)
} }
}, },
changeTab(index) { changeTab(index) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!