Commit 085db1d3 by 胡悦

Merge branch 'v1.0.2' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v1.0.2

2 parents 049095c2 47c7feca
...@@ -61,5 +61,29 @@ export default { ...@@ -61,5 +61,29 @@ export default {
// overflow-y: auto; // overflow-y: auto;
height: 100%; height: 100%;
} }
.el-switch__label--left {
position: relative;
margin-left: -20px;
left: 45px;
color: #fff;
z-index: -1111;
}
.el-switch__core{
width: 50px !important;
}
.el-switch__label--right {
position: relative;
right: 46px;
color: #fff;
z-index: -1111;
}
.el-switch__label--right.is-active {
z-index: 1111;
color: #fff !important;
}
.el-switch__label--left.is-active {
z-index: 1111;
color: #999999 !important;
}
</style> </style>
> >
...@@ -48,4 +48,13 @@ const updateCardContent = params => { ...@@ -48,4 +48,13 @@ const updateCardContent = params => {
}) })
} }
export { getCenterListApi,getMoreMerchant ,updateCardContent,getCardContent}
\ No newline at end of file \ No newline at end of file
const memberExportApi = params =>{
params.method=`scrm.api.equity.card.merchant.record.export`
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
export { getCenterListApi,getMoreMerchant ,updateCardContent,getCardContent,memberExportApi}
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,8 @@ const defaultPath = 'scrm.api.coupon.' ...@@ -4,7 +4,8 @@ const defaultPath = 'scrm.api.coupon.'
//优惠券列表 //优惠券列表
const getMerchantListApi = params => { const getMerchantListApi = params => {
params.method = `${defaultPath}list.merchant` // params.method = `${defaultPath}list.merchant`
params.method = 'scrm.backstage.coupon.list.merchant'
return http({ return http({
url: 'rop-scrm-coupon/router', url: 'rop-scrm-coupon/router',
method: 'GET', method: 'GET',
......
...@@ -87,4 +87,14 @@ const updateTakeProApi = params => { ...@@ -87,4 +87,14 @@ const updateTakeProApi = params => {
}) })
} }
export default { getListApi, getProShareApi, topProApi, updateStatusProApi, deleteTakeProApi, getProInfoApi, insertOrUpdateProApi, updateTakeProApi } const getGoodsCommentListApi = params => {
params.method = 'scrm.api.shopmall.backstage.orderGoodsComment.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getListApi, getProShareApi, topProApi, updateStatusProApi, deleteTakeProApi, getProInfoApi, insertOrUpdateProApi, updateTakeProApi, getGoodsCommentListApi }
\ No newline at end of file \ No newline at end of file
import { http } from '@/main' import { http,http2 } from '@/main'
// const defaultPath = 'scrm.api.live.' // const defaultPath = 'scrm.api.live.'
//计算提示面板出现的次数,第一次显示,之后不显示 //计算提示面板出现的次数,第一次显示,之后不显示
const getLoginCount = params => { const getLoginCount = params => {
params.method = 'entmicro.api.common.findLoginCount' params.method = 'entmicro.api.common.findLoginCount'
return http({ return http2({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
const getServiceListApi = params => { const getServiceListApi = params => {
......
...@@ -314,3 +314,47 @@ html { ...@@ -314,3 +314,47 @@ html {
.el-tag.el-tag--info.el-tag--plain { .el-tag.el-tag--info.el-tag--plain {
background: transparent !important; background: transparent !important;
} }
/* tab */
.marketing .el-tabs__nav-wrap:after {
opacity: 0;
}
.marketing .el-tabs__item {
height: 20px !important;
line-height: 10px !important;
}
.marketing .el-tabs__item {
width: 120px;
height: 40px !important;
line-height: 40px !important;
font-size: 14px;
text-align: center;
border: 0 !important;
background: #FFFFFF;
color: #999999;
border-radius: 0px 4px 0px 0px;
border: 1px solid #F4F6FC;
padding: 0;
}
.marketing .el-tabs__active-bar {
display: none;
}
.marketing .el-tabs__header {
margin: 0 !important;
}
.marketing .el-tabs__item.is-active {
color: #5850ff;
background: #F4F6FC !important;
border-radius: 4px 0px 0px 0px;
border: 1px solid #F4F6FC !important;
}
/* tab */
\ No newline at end of file \ No newline at end of file
...@@ -78,27 +78,32 @@ function exportFn(url) { ...@@ -78,27 +78,32 @@ function exportFn(url) {
// } // }
const orderManageStatusList = [ const orderManageStatusList = [
{ confId: '1', confName: '未支付' }, { confId: '1', confName: '待付款' },
{ confId: '2', confName: '已支付' }, { confId: '2', confName: '已支付' },
{ confId: '3', confName: '已失效' }, { confId: '3', confName: '已失效' },
{ confId: '4', confName: '已发货' }, { confId: '21', confName: '待收货(待核销)' },
{ confId: '5', confName: '已收货' }, { confId: '22', confName: '已收货(已核销)' },
{ confId: '6', confName: '待审核' }, { confId: '6', confName: '待发货' },
{ confId: '7', confName: '审核成功' }, // { confId: '7', confName: '待核销' },
{ confId: '8', confName: '审核失败' }, // { confId: '8', confName: '已核销' },
{ confId: '9', confName: '待确认' }, { confId: '9', confName: '售后中' },
{ confId: '10', confName: '退款中' }, { confId: '10', confName: '售后完成' }
{ confId: '11', confName: '已退款' }, ]
{ confId: '12', confName: '退款失败' },
{ confId: '13', confName: '待发货' }, const afterSaleStatusList = [
{ confId: '14', confName: '待安装' }, { confId: '1', confName: '待审核' },
{ confId: '15', confName: '已安装' } { confId: '2', confName: '审核成功' },
{ confId: '3', confName: '审核失败' },
{ confId: '4', confName: '待确认' },
{ confId: '5', confName: '退款中' },
{ confId: '6', confName: '已退款' },
{ confId: '7', confName: '退款失败' },
] ]
const orderSourceList = [ const orderSourceList = [
{ confId: '1', confName: '商城订单' }, { confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' }, { confId: '2', confName: '直播订单' },
{ confId: '3', confName: '活动订单' } { confId: '3', confName: '秒杀订单' }
] ]
const deliveryTypeList = [ const deliveryTypeList = [
...@@ -201,6 +206,7 @@ export { ...@@ -201,6 +206,7 @@ export {
exportFn, exportFn,
// aToExport, // aToExport,
orderManageStatusList, orderManageStatusList,
afterSaleStatusList,
orderSourceList, orderSourceList,
deliveryTypeList, deliveryTypeList,
statusList, statusList,
......
...@@ -20,4 +20,5 @@ Vue.prototype.size = 'small' ...@@ -20,4 +20,5 @@ Vue.prototype.size = 'small'
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
...@@ -13,7 +13,7 @@ let instance = null ...@@ -13,7 +13,7 @@ let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig() const { response, request,request2, sign, secret, sign_common, request_common } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -21,6 +21,7 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -21,6 +21,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request:request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
...@@ -121,6 +121,7 @@ export default { ...@@ -121,6 +121,7 @@ export default {
{ {
label: '优惠券类型', label: '优惠券类型',
name: 'discountType', name: 'discountType',
width: '100px',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.discountTypeList.find(item => item.confId == cellValue.discountType).confName return this.baseData.discountTypeList.find(item => item.confId == cellValue.discountType).confName
} }
...@@ -130,6 +131,14 @@ export default { ...@@ -130,6 +131,14 @@ export default {
prop: 'getAmount' prop: 'getAmount'
}, },
{ {
label: '已核销',
prop: 'usedAmount'
},
{
label: '未核销',
prop: 'unUsedAmount'
},
{
label: '剩余', label: '剩余',
prop: 'residueAmount' prop: 'residueAmount'
}, },
...@@ -147,6 +156,7 @@ export default { ...@@ -147,6 +156,7 @@ export default {
{ {
label: '优惠券状态', label: '优惠券状态',
name: 'status', name: 'status',
width: '100px',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.statusList.find(item => item.confId == cellValue.status).confName return this.baseData.statusList.find(item => item.confId == cellValue.status).confName
} }
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
<el-form-item size="small" class="fr-mr0"> <el-form-item size="small" class="fr-mr0">
<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="handleExport">导出</el-button>
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -121,8 +122,8 @@ ...@@ -121,8 +122,8 @@
<script> <script>
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent } from '@/api/modules/center' import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent,memberExportApi } from '@/api/modules/center'
import { statusList, memberTypeList } from '@/common/constant' import { statusList, memberTypeList,exportFn } from '@/common/constant'
export default { export default {
components: { components: {
glsxDialog glsxDialog
...@@ -353,19 +354,40 @@ mounted () { ...@@ -353,19 +354,40 @@ mounted () {
}) })
}) })
}, },
beforeSearchFn() { getParams() {
return new Promise((resolve, reject) => { var params = JSON.parse(JSON.stringify(this.searchForm))
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) if (params.daterange) {
if (this.searchFormTable.daterange) { params.startTime = this.searchForm.daterange[0] + ' 00:00:00'
this.searchFormTable.startTime = this.searchForm.daterange[0] + ' 00:00:00' params.endTime = this.searchForm.daterange[1] + ' 23:59:59'
this.searchFormTable.endTime = this.searchForm.daterange[1] + ' 23:59:59'
} else { } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
delete this.searchFormTable.daterange 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.startTime = this.searchForm.daterange[0] + ' 00:00:00'
// this.searchFormTable.endTime = this.searchForm.daterange[1] + ' 23:59:59'
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// delete this.searchFormTable.daterange
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
handleExport(row) {
var params = this.getParams()
memberExportApi(params).then(res => {
exportFn(res)
})
},
handleReset() { handleReset() {
this.searchForm = {} this.searchForm = {}
......
...@@ -119,13 +119,14 @@ ...@@ -119,13 +119,14 @@
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<el-button type="primary" @click="submitForm('ruleForm')" size="medium">创建</el-button> <el-button type="primary" @click="submitForm('ruleForm')" size="medium" :loading="sloading">创建</el-button>
<el-button type="primary" @click="goBack" size="medium">取消</el-button> <el-button type="primary" @click="goBack" size="medium">取消</el-button>
</div> </div>
<!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" --> <!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" -->
<glsx-dialog title="" top="30vh" :hasScroll="false" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm"> <glsx-dialog title="" top="30vh" :hasScroll="false" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body"> <div class="content-body">
当前有内容信息未保存,是否继续取消 <img src="@/assets/icon-warning.png" alt="" />
<div>当前有内容信息未保存,是否继续返回?</div>
</div> </div>
</glsx-dialog> </glsx-dialog>
</div> </div>
...@@ -165,6 +166,7 @@ export default { ...@@ -165,6 +166,7 @@ export default {
}, 1000) }, 1000)
} }
return { return {
sloading:false,
isDialogVisible:false, isDialogVisible:false,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
...@@ -360,17 +362,24 @@ export default { ...@@ -360,17 +362,24 @@ export default {
params.discountType = 7 params.discountType = 7
params.merchantId = this.merchantId params.merchantId = this.merchantId
params.merchantName = this.merchantName params.merchantName = this.merchantName
this.sloading=true
createService(params).then(res => { createService(params).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.sloading=false
this.$message.success('创建服务成功') this.$message.success('创建服务成功')
this.$router.push('/memberCenter/service') this.$router.push('/memberCenter/service')
} else { } else {
this.sloading=false
this.$message({ this.$message({
type: 'error', type: 'error',
message: res.message message: res.message
}) })
} }
}).catch(err=>{
this.sloading=false;
}).finally(()=>{
this.sloading=false;
}) })
}, },
//更新服务 //更新服务
...@@ -382,17 +391,24 @@ export default { ...@@ -382,17 +391,24 @@ export default {
param.couponId = this.$route.query.couponId param.couponId = this.$route.query.couponId
param.stock = this.ruleForm.stock param.stock = this.ruleForm.stock
param.useDescription = this.ruleForm.useDescription param.useDescription = this.ruleForm.useDescription
this.sloading=true;
updateService(param).then(res => { updateService(param).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.sloading=false;
this.$message.success('编辑服务成功') this.$message.success('编辑服务成功')
this.$router.push('/memberCenter/service') this.$router.push('/memberCenter/service')
} else { } else {
this.sloading=false;
this.$message({ this.$message({
type: 'error', type: 'error',
message: res.message message: res.message
}) })
} }
}).catch(err=>{
this.sloading=false;
}).finally(()=>{
this.sloading=false;
}) })
}, },
...@@ -602,22 +618,30 @@ export default { ...@@ -602,22 +618,30 @@ export default {
/deep/ .el-dialog__header{ /deep/ .el-dialog__header{
border: 0; border: 0;
} }
/deep/ .el-dialog__body{ /deep/ .el-dialog__body {
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
padding: 20px 25px; padding: 20px 25px;
.content-body{ .content-body {
height: 136px;
line-height: 121px;
font-size: 18px;
text-align: center; text-align: center;
height: 98px;
line-height: 26px;
div {
font-size: 16px;
color: #333333;
font-weight: 400;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
} }
}
/deep/ .el-dialog__footer { /deep/ .el-dialog__footer {
border: 0;
text-align: center; text-align: center;
padding-top: 15px; padding-top: 15px;
padding-bottom: 15px; padding-bottom: 15px;
} .el-button--small{
padding:8px 26px;
}
}
} }
</style> </style>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="allChoseWrap" v-if="this.choseItemList.length > 0"> <div class="allChoseWrap" v-if="this.choseItemList.length > 0">
<!-- choseItemList --> <!-- choseItemList -->
<div class="choseItem" v-for="(item, index) in choseItemList" :key="index"> <div class="choseItem" v-for="(item, index) in choseItemList" :key="index">
<span>{{ item.couponName }}</span> <span>{{ item.couponName }}×{{ item.serviceQuantity }}</span>
<!-- <img src="@/assets/closeIcon.png" @click="closeChoseItemFun(item, index)" alt="" /> --> <!-- <img src="@/assets/closeIcon.png" @click="closeChoseItemFun(item, index)" alt="" /> -->
<div class="close-x" @click="closeChoseItemFun(item, index)">×</div> <div class="close-x" @click="closeChoseItemFun(item, index)">×</div>
</div> </div>
...@@ -34,6 +34,32 @@ ...@@ -34,6 +34,32 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="计价器" prop="switchStatus">
<el-switch v-model="ruleForm.switchStatus" active-color="#5850ff" active-text="开" inactive-text="关"></el-switch>
<span class="calcValueMsg">开启后,小程序端套餐详情将展示该信息</span>
</el-form-item>
<template v-if="ruleForm.switchStatus">
<div class="shopValuePanel">
<div class="setmealName">套餐服务</div>
<div class="rowMsg" v-for="(item, index) in choseItemList" :key="index">
<span>
{{ item.couponName }}
<span style="color: #4a4a4a">×{{ item.serviceQuantity }}</span>
</span>
<span>
价值约:
<span style="color: #ff5151">{{ item.shopPrice * item.serviceQuantity }}元</span>
</span>
</div>
</div>
<div class="allPrice" v-if="choseItemList.length > 0">
套餐内服务实际价值总计约:
<span class="price">{{ totalShopPrice }}元</span>
</div>
</template>
<el-form-item size="small" label="说明" prop="notes" style="width: 670px"> <el-form-item size="small" label="说明" prop="notes" style="width: 670px">
<el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200" show-word-limit></el-input> <el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200" show-word-limit></el-input>
</el-form-item> </el-form-item>
...@@ -46,7 +72,7 @@ ...@@ -46,7 +72,7 @@
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<el-button type="primary" @click="submitForm('ruleForm')" size="medium">创建</el-button> <el-button type="primary" @click="submitForm('ruleForm')" size="medium" :loading="sloading">创建</el-button>
<el-button type="primary" @click="goBack" size="medium">取消</el-button> <el-button type="primary" @click="goBack" size="medium">取消</el-button>
</div> </div>
<!-- :modalAppendToBody="false" --> <!-- :modalAppendToBody="false" -->
...@@ -102,7 +128,10 @@ ...@@ -102,7 +128,10 @@
</div> </div>
</glsx-dialog> </glsx-dialog>
<glsx-dialog title="" top="30vh" :hasScroll="false" class="tipDialog" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isTipDialogVisible" :showClose="false" @closeDialog="handleTipClose" @confirmDialog="handleTipConfirm"> <glsx-dialog title="" top="30vh" :hasScroll="false" class="tipDialog" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isTipDialogVisible" :showClose="false" @closeDialog="handleTipClose" @confirmDialog="handleTipConfirm">
<div class="content-body">当前有内容信息未保存,是否继续返回</div> <div class="content-body">
<img src="@/assets/icon-warning.png" alt="" />
<div>当前有内容信息未保存,是否继续返回?</div>
</div>
</glsx-dialog> </glsx-dialog>
</div> </div>
</template> </template>
...@@ -117,9 +146,11 @@ export default { ...@@ -117,9 +146,11 @@ export default {
}, },
data() { data() {
return { return {
sloading:false,
ruleForm: { ruleForm: {
packageName: '', packageName: '',
packagePrice: '', packagePrice: '',
switchStatus: true,
notes: '' notes: ''
}, },
copyRuleForm: {}, //用于检查页面信息是否改动 copyRuleForm: {}, //用于检查页面信息是否改动
...@@ -143,6 +174,18 @@ export default { ...@@ -143,6 +174,18 @@ export default {
id: this.$route.query.id || 0 id: this.$route.query.id || 0
} }
}, },
computed: {
totalShopPrice() {
var sum = 0
if (this.choseItemList.length > 0) {
this.choseItemList.forEach(item => {
sum = ((sum * 100 + item.shopPrice * item.serviceQuantity * 100) / 100).toFixed(2)
})
return sum
}
return 0
}
},
created() { created() {
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据 this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
...@@ -193,6 +236,7 @@ export default { ...@@ -193,6 +236,7 @@ export default {
getServiceInfo({ id: this.id }).then(res => { getServiceInfo({ id: this.id }).then(res => {
if (res.code == '0') { if (res.code == '0') {
this.ruleForm = res.data this.ruleForm = res.data
this.ruleForm.switchStatus = res.data.switchStatus == 1 ? true : false
this.choseItemList = res.data.list || [] this.choseItemList = res.data.list || []
this.totalPrice = res.data.referencePrice this.totalPrice = res.data.referencePrice
...@@ -200,6 +244,7 @@ export default { ...@@ -200,6 +244,7 @@ export default {
for (let i = 0; i < this.allItemList.length; i++) { for (let i = 0; i < this.allItemList.length; i++) {
if (item.serviceId == this.allItemList[i].id) { if (item.serviceId == this.allItemList[i].id) {
item.vipPrice = this.allItemList[i].vipPrice item.vipPrice = this.allItemList[i].vipPrice
item.shopPrice = this.allItemList[i].shopPrice
} }
} }
}) })
...@@ -293,12 +338,15 @@ export default { ...@@ -293,12 +338,15 @@ export default {
param.packageName = this.ruleForm.packageName param.packageName = this.ruleForm.packageName
param.packagePrice = this.ruleForm.packagePrice param.packagePrice = this.ruleForm.packagePrice
param.notes = this.ruleForm.notes param.notes = this.ruleForm.notes
param.switchStatus = this.ruleForm.switchStatus ? 1 : 0
let lists = this.choseItemList let lists = this.choseItemList
for (var k in lists) { for (var k in lists) {
param[`lists[${k}].serviceQuantity`] = lists[k].serviceQuantity param[`lists[${k}].serviceQuantity`] = lists[k].serviceQuantity
param[`lists[${k}].serviceId`] = lists[k].serviceId param[`lists[${k}].serviceId`] = lists[k].serviceId
} }
this.sloading=true
updateSetMeal(param).then(res => { updateSetMeal(param).then(res => {
this.sloading=false
this.$message({ this.$message({
message: res.code == '0' ? '修改成功' : res.message, message: res.code == '0' ? '修改成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
...@@ -306,6 +354,10 @@ export default { ...@@ -306,6 +354,10 @@ export default {
if (res.code == '0') { if (res.code == '0') {
this.$router.push("/memberCenter/setmeal") this.$router.push("/memberCenter/setmeal")
} }
}).catch(err=>{
this.sloading=false
}).finally(()=>{
this.sloading=false
}) })
} else { } else {
//调创建的接口 //调创建的接口
...@@ -316,12 +368,15 @@ export default { ...@@ -316,12 +368,15 @@ export default {
params.packageName = this.ruleForm.packageName params.packageName = this.ruleForm.packageName
params.packagePrice = this.ruleForm.packagePrice params.packagePrice = this.ruleForm.packagePrice
params.notes = this.ruleForm.notes params.notes = this.ruleForm.notes
params.switchStatus = this.ruleForm.switchStatus ? 1 : 0
let list = this.choseItemList let list = this.choseItemList
for (var i in list) { for (var i in list) {
params[`list[${i}].serviceQuantity`] = list[i].serviceQuantity params[`list[${i}].serviceQuantity`] = list[i].serviceQuantity
params[`list[${i}].serviceId`] = list[i].serviceId params[`list[${i}].serviceId`] = list[i].serviceId
} }
this.sloading=true
createSetMeal(params).then(res => { createSetMeal(params).then(res => {
this.sloading=false
this.$message({ this.$message({
message: res.code == '0' ? '创建成功' : res.message, message: res.code == '0' ? '创建成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
...@@ -329,6 +384,10 @@ export default { ...@@ -329,6 +384,10 @@ export default {
if (res.code == '0') { if (res.code == '0') {
this.$router.push("/memberCenter/setmeal") this.$router.push("/memberCenter/setmeal")
} }
}).catch(err=>{
this.sloading=false
}).finally(()=>{
this.sloading=false
}) })
} }
}) })
...@@ -449,7 +508,7 @@ export default { ...@@ -449,7 +508,7 @@ export default {
} }
} }
.container { .container {
margin: 0 0px 20px; margin: 0 0px 100px;
position: relative; position: relative;
min-height: calc(100vh - 300px); min-height: calc(100vh - 300px);
.allChoseWrap { .allChoseWrap {
...@@ -524,6 +583,53 @@ export default { ...@@ -524,6 +583,53 @@ export default {
color: #ff5151; color: #ff5151;
} }
} }
.calcValueMsg {
margin-left: -8px;
font-size: 14px;
font-weight: 400;
color: #999999;
}
.shopValuePanel {
margin-left: 120px;
margin-bottom: 15px;
width: 550px;
min-height: 140px;
border: 1px solid #e8e8ea;
border-radius: 2px;
.setmealName {
padding-left: 10px;
height: 28px;
line-height: 28px;
background: #fafafa;
border-radius: 2px 2px 0px 0px;
border-bottom: 1px solid #e8e8ea;
font-size: 14px;
font-weight: 400;
color: #666666;
}
.rowMsg {
font-size: 14px;
font-weight: 400;
color: #666666;
margin-top: 10px;
> span:first-child {
display: inline-block;
min-width: 165px;
text-align: right;
margin-right: 10px;
}
}
}
.allPrice {
margin: 0 0 20px 120px;
font-size: 14px;
font-weight: 400;
color: #666666;
.price {
color: #ff5151;
}
}
} }
.footer-panel { .footer-panel {
display: flex; display: flex;
...@@ -701,19 +807,26 @@ export default { ...@@ -701,19 +807,26 @@ export default {
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
padding: 20px 25px; padding: 20px 25px;
.content-body { .content-body {
height: 136px;
line-height: 121px;
font-size: 18px;
text-align: center; text-align: center;
height: 98px;
line-height: 26px;
div {
font-size: 16px;
color: #333333;
font-weight: 400;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
} }
}
/deep/ .el-dialog__footer { /deep/ .el-dialog__footer {
border: 0; border: 0;
text-align: center; text-align: center;
padding-top: 15px; padding-top: 15px;
padding-bottom: 15px; padding-bottom: 15px;
.el-button--small{
padding:8px 26px;
}
} }
} }
} }
......
...@@ -36,6 +36,7 @@ export default { ...@@ -36,6 +36,7 @@ export default {
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
orderCode: '',
commentStatus: '', commentStatus: '',
createDate: [] createDate: []
}, },
...@@ -57,6 +58,13 @@ export default { ...@@ -57,6 +58,13 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'commentStatusList' optionsName: 'commentStatusList'
},
{
label: '订单编号',
name: 'orderCode',
type: 'input',
maxlength: 17,
isClear: true
} }
], ],
// 表格 // 表格
...@@ -66,9 +74,14 @@ export default { ...@@ -66,9 +74,14 @@ export default {
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '订单编号',
prop: 'orderCode',
width: '200'
},
{
label: '评价日期', label: '评价日期',
prop: 'createdDate', prop: 'createdDate',
// width: '180', width: '180',
formatter: cellValue => { formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
} }
...@@ -208,6 +221,7 @@ export default { ...@@ -208,6 +221,7 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
orderCode: '',
commentStatus: '', commentStatus: '',
createDate: [] createDate: []
} }
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
<span class="red-txt">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span> <span class="red-txt">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
项 累计订单总额: 项 累计订单总额:
<span class="red-txt">{{ statisticsInfo.payPriceTotal || 0 }}&nbsp;</span> <span class="red-txt">{{ statisticsInfo.payPriceTotal || 0 }}&nbsp;</span>
元 累计退款总额:
<span class="red-txt">{{ statisticsInfo.refundTotal || 0 }}&nbsp;</span>
元 元
</span> </span>
</div> </div>
...@@ -36,10 +38,10 @@ ...@@ -36,10 +38,10 @@
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button> --> <!-- <el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button> -->
<GLButton type="text" fn="查看订单" @click="handleDetail(scope.scope)">查看订单</GLButton> <GLButton type="text" fn="查看订单" @click="handleDetail(scope.scope)">查看订单</GLButton>
<el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 14" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button> <el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 21" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button>
<el-button v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 13" type="text" @click="handleExpressInfo(scope.scope)">输入快递信息</el-button> <el-button v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 6" type="text" @click="handleExpressInfo(scope.scope)">输入快递信息</el-button>
<el-button v-if="scope.scope.orderStatus == 6" type="text" @click="handleExamine(scope.scope)">退款审核</el-button> <el-button v-if="scope.scope.afterSaleStatus == 1" type="text" @click="handleExamine(scope.scope)">退款审核</el-button>
<el-button v-if="scope.scope.orderStatus == 9" type="text" @click="handleReceiving(scope.scope)">确认收货</el-button> <el-button v-if="scope.scope.afterSaleStatus == 4" type="text" @click="handleReceiving(scope.scope)">确认收货</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 - 全部订单/售后订单 - end --> <!-- 表格区域 - 全部订单/售后订单 - end -->
...@@ -112,7 +114,7 @@ ...@@ -112,7 +114,7 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from "@/assets/empty.png" import url from "@/assets/empty.png"
import { orderManageStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant' import { orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
export default { export default {
name: 'orderManage', name: 'orderManage',
data() { data() {
...@@ -123,11 +125,13 @@ export default { ...@@ -123,11 +125,13 @@ export default {
isEdit: true, isEdit: true,
orderCode: '', orderCode: '',
oldVal: { oldVal: {
orderStatuses: [] orderStatuses: [],
afterSaleStatuses: []
}, },
searchForm: { searchForm: {
orderCode: '', orderCode: '',
orderStatuses: [], orderStatuses: [],
afterSaleStatuses: [],
merchantName: '', merchantName: '',
customerName: '', customerName: '',
createDate: [], createDate: [],
...@@ -137,7 +141,8 @@ export default { ...@@ -137,7 +141,8 @@ export default {
tableSearchForm: {}, tableSearchForm: {},
statisticsInfo: { statisticsInfo: {
orderCount: '', orderCount: '',
payPriceTotal: '' payPriceTotal: '',
refundTotal: ''
}, },
// 搜索 // 搜索
searchFormData1: [ searchFormData1: [
...@@ -154,7 +159,7 @@ export default { ...@@ -154,7 +159,7 @@ export default {
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'orderStatusList', optionsName: 'searchOrderStatusList',
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.orderStatuses.length var isAdd = value.length > this.oldVal.orderStatuses.length
var targetVal = value[value.length - 1] var targetVal = value[value.length - 1]
...@@ -179,13 +184,45 @@ export default { ...@@ -179,13 +184,45 @@ export default {
} }
}, },
{ {
label: '售后状态',
name: 'afterSaleStatuses',
type: 'select',
multiple: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'searchAfterSaleStatusList',
changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.afterSaleStatuses.length
var targetVal = value[value.length - 1]
if (!isAdd) {
for (var i = 0; i < this.oldVal.afterSaleStatuses.length; i++) {
if (!value.includes(this.oldVal.afterSaleStatuses[i])) {
targetVal = this.oldVal.afterSaleStatuses[i]
break
}
}
}
!targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData1[2].optionList.map(item => item.confId) : [])
if (targetVal) {
var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData1[2].optionList.length) {
this.searchForm.afterSaleStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData1[2].optionList.length - 1) {
this.searchForm.afterSaleStatuses.push('')
}
}
this.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses)
}
}
],
searchFormData2: [
{
label: '门店', label: '门店',
name: 'merchantName', name: 'merchantName',
type: 'input', type: 'input',
labelWidth: 56 labelWidth: 56
} },
],
searchFormData2: [
{ {
label: '客户姓名', label: '客户姓名',
name: 'customerName', name: 'customerName',
...@@ -197,7 +234,9 @@ export default { ...@@ -197,7 +234,9 @@ export default {
type: 'datePicker', type: 'datePicker',
isClear: true, isClear: true,
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
}, }
],
searchFormData3: [
{ {
label: '订单类型', label: '订单类型',
name: 'orderSource', name: 'orderSource',
...@@ -206,9 +245,7 @@ export default { ...@@ -206,9 +245,7 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'orderSourceList' optionsName: 'orderSourceList'
} },
],
searchFormData3: [
{ {
label: '结算方式', label: '结算方式',
name: 'deliveryType', name: 'deliveryType',
...@@ -357,6 +394,14 @@ export default { ...@@ -357,6 +394,14 @@ export default {
} }
}, },
{ {
label: '售后状态',
prop: 'afterSaleStatus',
width: '80',
formatter: cellValue => {
return this.baseData.afterSaleStatusList.map(item => item.confId).includes(cellValue.afterSaleStatus + '') ? this.baseData.afterSaleStatusList.find(item => item.confId == cellValue.afterSaleStatus).confName : '-'
}
},
{
label: '结算方式', label: '结算方式',
prop: 'deliveryType', prop: 'deliveryType',
width: '80', width: '80',
...@@ -369,7 +414,10 @@ export default { ...@@ -369,7 +414,10 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据 // 基本数据
baseData: { baseData: {
searchOrderStatusList: orderManageStatusList.filter(item => ['1', '3', '21', '22', '6', '9'].includes(item.confId)),
searchAfterSaleStatusList: afterSaleStatusList.filter(item => ['1', '6', '7'].includes(item.confId)),
orderStatusList: orderManageStatusList, orderStatusList: orderManageStatusList,
afterSaleStatusList: afterSaleStatusList,
orderSourceList: orderSourceList, orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList, deliveryTypeList: deliveryTypeList,
refundTypeList: [ refundTypeList: [
...@@ -462,7 +510,7 @@ export default { ...@@ -462,7 +510,7 @@ export default {
var params = this.getParams() var params = this.getParams()
delete params.createDate delete params.createDate
this.$apis.orderManage.getCountApi(params).then(res => { this.$apis.orderManage.getCountApi(params).then(res => {
this.statisticsInfo = res || { orderCount: '', payPriceTotal: '' } this.statisticsInfo = res || { orderCount: '', payPriceTotal: '', refundTotal: '' }
}) })
}, },
...@@ -662,6 +710,7 @@ export default { ...@@ -662,6 +710,7 @@ export default {
this.searchForm = { this.searchForm = {
orderCode: '', orderCode: '',
orderStatuses: [], orderStatuses: [],
afterSaleStatuses: [],
merchantName: '', merchantName: '',
customerName: '', customerName: '',
createDate: [], createDate: [],
...@@ -675,36 +724,4 @@ export default { ...@@ -675,36 +724,4 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.marketing .el-tabs__nav-wrap:after {
opacity: 0;
}
.marketing .el-tabs__item {
height: 20px !important;
line-height: 10px !important;
}
.marketing .el-tabs__item {
width: 120px;
height: 40px !important;
line-height: 40px !important;
font-size: 14px;
text-align: center;
border: 0 !important;
background: #FFFFFF;
color: #999999;
border-radius: 0px 4px 0px 0px;
border: 1px solid #F4F6FC;
padding: 0;
}
.marketing .el-tabs__active-bar {
display: none;
}
.marketing .el-tabs__header {
margin: 0 !important;
}
.marketing .el-tabs__item.is-active {
color: #5850ff;
background: #F4F6FC !important;
border-radius: 4px 0px 0px 0px;
border: 1px solid #F4F6FC !important;
}
</style> </style>
<!-- 查看产品 - 评价信息 -->
<template>
<div class="comment-detail container edit-container">
<div style="padding: 20px;">
<!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="starLevel" slot-scope="scope">
<img v-for="(item, index) in scope.scope.starLevel" :key="index" class="icon-star" src="@/assets/icon-star.png"/>
</div>
<div slot="goodsImage" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</div>
</GLTable>
</div>
</div>
</template>
<script>
import url from "@/assets/empty.png"
export default {
name: 'commentDetail',
data() {
return {
size: 'small',
url: url,
searchForm: {
goodsId: ''
},
// 表格
getListApi: this.$apis.proManage.getGoodsCommentListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '评价用户名称',
prop: 'customerName'
},
{
label: '几天前',
prop: 'createdDateStr'
},
{
label: '评价星级',
prop: 'starLevel',
addHtml: 'starLevel'
},
{
label: '评价内容',
prop: 'commentContent',
line: 3
},
{
label: '图片',
prop: 'goodsImage',
addHtml: 'goodsImage'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
props: {
goodsId: {
type: Object,
default: () => {}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.goodsId = this.goodsId
resolve()
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.commentRef.data.length ? (this.$refs.commentRef.tableHeightValues = '') : this.$refs.commentRef.setTableHeightFun()
}
}
}
</script>
<style></style>
<!-- 编辑商品 --> <!-- 编辑商品 -->
<template> <template>
<div class="edit-pro marketing p-t-20 edit-box"> <div class="edit-pro marketing p-t-20 edit-box">
<div class="container edit-container"> <el-tabs v-if="routeInfo.addOrEdit == '3'" v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</el-tabs>
<div v-show="(routeInfo.addOrEdit != '3') || (routeInfo.addOrEdit == '3' && activeName == 'basicInfo')" class="container edit-container">
<div class="flex"> <div class="flex">
<div class="home-set-form flex-grow"> <div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index"> <div v-for="(item, index) in externalFormList" :key="index">
...@@ -317,6 +321,7 @@ ...@@ -317,6 +321,7 @@
</div> </div>
</div> </div>
</div> </div>
<comment-detail v-show="routeInfo.addOrEdit == '3' && activeName == 'afterOrder'" :goodsId="routeInfo.id"></comment-detail>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button v-if="routeInfo.addOrEdit != '3'" type="primary" @click="handleConfirm">确定</el-button> <el-button v-if="routeInfo.addOrEdit != '3'" type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
...@@ -403,6 +408,7 @@ ...@@ -403,6 +408,7 @@
<script> <script>
import { limitPrice } from '@/common/constant' import { limitPrice } from '@/common/constant'
import commentDetail from './components/commentDetail'
export default { export default {
name: 'editProduct', name: 'editProduct',
data() { data() {
...@@ -411,6 +417,8 @@ export default { ...@@ -411,6 +417,8 @@ export default {
footerLeft: '0', footerLeft: '0',
footerWidth: '0', footerWidth: '0',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
// tab
activeName: 'basicInfo',
submitted: false, submitted: false,
isDisabled: false, isDisabled: false,
wechatImgList: [], wechatImgList: [],
...@@ -775,6 +783,10 @@ export default { ...@@ -775,6 +783,10 @@ export default {
} }
}, },
components: {
commentDetail
},
watch: { watch: {
editForm: { editForm: {
handler(val) { handler(val) {
...@@ -804,12 +816,15 @@ export default { ...@@ -804,12 +816,15 @@ export default {
} }
}, },
created() {
this.routeInfo = this.$route.query
},
mounted() { mounted() {
this.userInfo = this.$globalState.session this.userInfo = this.$globalState.session
this.$refs.merchantTableRef[0].tableHeightValues = '400px' this.$refs.merchantTableRef[0].tableHeightValues = '400px'
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.query
// console.log(this.routeInfo) // console.log(this.routeInfo)
this.getBaseDate().then(() => { this.getBaseDate().then(() => {
this.getOptionsList(0, 'editFormData', false) this.getOptionsList(0, 'editFormData', false)
...@@ -1554,4 +1569,14 @@ export default { ...@@ -1554,4 +1569,14 @@ export default {
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3); background-color: rgba(144, 147, 153, 0.3);
} }
.marketing.edit-pro .el-tabs__item {
background: #F4F6FC !important;
border: 1px solid #F4F6FC !important;
}
.marketing.edit-pro .el-tabs__item.is-active {
background: #FFFFFF !important;
border: 1px solid #FFFFFF !important;
}
</style> </style>
<!-- 商品编辑 - 带货 --> <!-- 商品编辑 - 带货 -->
<template> <template>
<div class="edit-product-dh marketing p-t-20 edit-box"> <div class="edit-product-dh marketing p-t-20 edit-box">
<div class="container edit-container"> <el-tabs v-if="routeInfo.addOrEdit == '3'" v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</el-tabs>
<div v-show="(routeInfo.addOrEdit != '3') || (routeInfo.addOrEdit == '3' && activeName == 'basicInfo')" class="container edit-container">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<div class="flex" style="margin-top: 20px;"> <div class="flex" style="margin-top: 20px;">
<div class="main-img-box"> <div class="main-img-box">
...@@ -75,6 +79,7 @@ ...@@ -75,6 +79,7 @@
<img style="width: 375px; width: 375px;" v-show="item.resType == 1" :src="item.content" /> <img style="width: 375px; width: 375px;" v-show="item.resType == 1" :src="item.content" />
</div> </div>
</div> </div>
<comment-detail v-show="routeInfo.addOrEdit == '3' && activeName == 'afterOrder'" :goodsId="routeInfo.id"></comment-detail>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button v-if="routeInfo.addOrEdit != '3'" type="primary" @click="handleConfirm">确定</el-button> <el-button v-if="routeInfo.addOrEdit != '3'" type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
...@@ -84,6 +89,7 @@ ...@@ -84,6 +89,7 @@
<script> <script>
import { limitPrice } from '@/common/constant' import { limitPrice } from '@/common/constant'
import commentDetail from '../productGroup/components/commentDetail'
export default { export default {
name: 'editProductDh', name: 'editProductDh',
data() { data() {
...@@ -98,6 +104,8 @@ export default { ...@@ -98,6 +104,8 @@ export default {
footerLeft: '0', footerLeft: '0',
footerWidth: '0', footerWidth: '0',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
// tab
activeName: 'basicInfo',
submitted: false, submitted: false,
isDisabled: false, isDisabled: false,
mainImgUrl: '', mainImgUrl: '',
...@@ -154,6 +162,10 @@ export default { ...@@ -154,6 +162,10 @@ export default {
} }
}, },
components: {
commentDetail
},
watch: { watch: {
editForm: { editForm: {
handler(val) { handler(val) {
...@@ -166,10 +178,13 @@ export default { ...@@ -166,10 +178,13 @@ export default {
} }
}, },
created() {
this.routeInfo = this.$route.query
},
mounted() { mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.query
this.title = this.titleObj[this.routeInfo.addOrEdit] this.title = this.titleObj[this.routeInfo.addOrEdit]
this.isDisabled = this.routeInfo.addOrEdit == 3 this.isDisabled = this.routeInfo.addOrEdit == 3
this.editFormData[0].isDisabled = this.isDisabled this.editFormData[0].isDisabled = this.isDisabled
...@@ -387,13 +402,13 @@ export default { ...@@ -387,13 +402,13 @@ export default {
} }
} }
</script> </script>
<style scoped> <style>
.title { .edit-product-dh .title {
padding: 13px 20px; padding: 13px 20px;
border-bottom: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5;
} }
.view { .edit-product-dh .view {
width: 375px; width: 375px;
height: 667px; height: 667px;
margin: 30px 45px 0 60px; margin: 30px 45px 0 60px;
...@@ -405,7 +420,7 @@ export default { ...@@ -405,7 +420,7 @@ export default {
width: calc(100% - 480px); width: calc(100% - 480px);
} */ } */
.view img { .edit-product-dh .view img {
width: 100%; width: 100%;
vertical-align: top; vertical-align: top;
} }
...@@ -529,4 +544,13 @@ export default { ...@@ -529,4 +544,13 @@ export default {
cursor: pointer; cursor: pointer;
} }
/* 规格 */ /* 规格 */
.marketing.edit-product-dh .el-tabs__item {
background: #F4F6FC !important;
border: 1px solid #F4F6FC !important;
}
.marketing.edit-product-dh .el-tabs__item.is-active {
background: #FFFFFF !important;
border: 1px solid #FFFFFF !important;
}
</style> </style>
...@@ -100,7 +100,8 @@ export default { ...@@ -100,7 +100,8 @@ export default {
}, },
{ {
label: '浏览量(次)', label: '浏览量(次)',
prop: 'viewAmount' prop: 'viewAmount',
width: '110px'
}, },
{ {
label: '销量', label: '销量',
...@@ -109,11 +110,12 @@ export default { ...@@ -109,11 +110,12 @@ export default {
{ {
label: '秒杀价(元)', label: '秒杀价(元)',
name: 'activityPrice', name: 'activityPrice',
width: '110px',
formatter: cellValue => { formatter: cellValue => {
if (cellValue.activityPrice) { // if (cellValue.activityPrice) {
return (cellValue.activityPrice / 100).toFixed(2) return (cellValue.activityPrice / 100).toFixed(2)
} // }
return '' // return ''
} }
}, },
{ {
...@@ -123,6 +125,7 @@ export default { ...@@ -123,6 +125,7 @@ export default {
{ {
label: '创建日期', label: '创建日期',
name: 'createdDate', name: 'createdDate',
width: '160px',
formatter: cellValue => { formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!