Commit 5f0e2675 by 王志慧

Merge branch 'xuyl_' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v3.15.0

2 parents 1b0349c8 2ecb3d15
import {http} from '@/main'
const getListApi = params => {
params.method = `scrm.api.shopmall.integralorder.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const pointWriteOffExportApi = params => {
params.method = `scrm.api.shopmall.integralorder.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const pointWriteOffDetail = params => {
params.method = `scrm.api.shopmall.integralorder.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {getListApi, pointWriteOffExportApi, pointWriteOffDetail}
...@@ -129,7 +129,8 @@ const orderSourceList = [ ...@@ -129,7 +129,8 @@ const orderSourceList = [
{ confId: '2', confName: '直播订单' }, { confId: '2', confName: '直播订单' },
{ confId: '3', confName: '秒杀订单' }, { confId: '3', confName: '秒杀订单' },
{ confId: '4', confName: '众筹订单' }, { confId: '4', confName: '众筹订单' },
{ confId: '6', confName: '配置升级订单' } { confId: '6', confName: '配置升级订单' },
{ confId: '7', confName: '车主优选订单' }
] ]
const deliveryTypeList = [ const deliveryTypeList = [
...@@ -213,14 +214,6 @@ const memberTypeList = [ ...@@ -213,14 +214,6 @@ const memberTypeList = [
{ {
confId: 2, confId: 2,
confName: '试用会员' confName: '试用会员'
},
{
confId: 3,
confName: '金卡会员'
},
{
confId: 4,
confName: '银卡会员'
} }
] ]
const stateList = [ const stateList = [
......
...@@ -88,7 +88,6 @@ export default { ...@@ -88,7 +88,6 @@ export default {
getList(page, isMounted = false) { getList(page, isMounted = false) {
var params = { var params = {
goodsStatus: 1, goodsStatus: 1,
goodsSources: [1,4],
currentPage: 1, currentPage: 1,
pageNum: 1, pageNum: 1,
pageSize: 100000, pageSize: 100000,
......
...@@ -536,7 +536,6 @@ export default { ...@@ -536,7 +536,6 @@ export default {
pageSize: 100000, pageSize: 100000,
pageStart: 0, pageStart: 0,
goodsStatus: 1, goodsStatus: 1,
goodsSources: [1, 4],
goodsName: '' goodsName: ''
} }
if (goodsName) { if (goodsName) {
...@@ -789,7 +788,7 @@ export default { ...@@ -789,7 +788,7 @@ export default {
// }) // })
// } // }
if(this.isEffective){ if(this.isEffective){
return return
} }
if (!valid) { if (!valid) {
this.whereToGo(Object.keys(errorObj)[0]) this.whereToGo(Object.keys(errorObj)[0])
......
...@@ -4,12 +4,24 @@ ...@@ -4,12 +4,24 @@
<div class="edit-box"> <div class="edit-box">
<div class="container m-b-20"> <div class="container m-b-20">
<p class="edit-title">订单信息</p> <p class="edit-title">订单信息</p>
<el-form label-width="100px" :inline="true"> <el-form
<el-row v-for="(item, index) in detailFormDataRow" :key="index"> label-width="100px"
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label" :inline="true"
class="row-item"> >
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? <el-row
detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span> v-for="(item, index) in detailFormDataRow"
:key="index"
>
<el-form-item
v-for="(subItem, subIndex) in item.rowList"
:key="subIndex"
:label="subItem.label"
class="row-item"
>
<span
class="detail-txt ellipsis-1"
:title="detailForm[subItem.name]"
>{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
<template v-if="detailForm.formDescribe"> <template v-if="detailForm.formDescribe">
...@@ -30,44 +42,89 @@ ...@@ -30,44 +42,89 @@
</div> </div>
<div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']"> <div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
<p class="edit-title">发货信息</p> <p class="edit-title">发货信息</p>
<el-form label-width="100px" :inline="true"> <el-form
label-width="100px"
:inline="true"
>
<el-form-item label="物流信息"> <el-form-item label="物流信息">
<span>{{ detailForm.deliveryCompany }}&nbsp;&nbsp;&nbsp;{{ detailForm.deliveryNumber }}</span> <span>{{ detailForm.deliveryCompany }}&nbsp;&nbsp;&nbsp;{{ detailForm.deliveryNumber }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div v-if="orderGoods.length" class="p-l-40"> <div
v-if="orderGoods.length"
class="p-l-40"
>
<table class="show-table"> <table class="show-table">
<tbody> <tbody>
<tr v-for="(item, index) in orderGoods" :key="index" style="height: 70px;"> <tr
<td><img :src="item.goodsImage" class="img-60" /></td> v-for="(item, index) in orderGoods"
<td>{{ item.goodsName }}</td> :key="index"
<td>{{ item.specificationData }}</td> style="height: 70px;"
<td>{{ item.activityPrice ? item.activityPrice : item.retailPrice }}元 * {{ item.goodsNumber }}</td> >
</tr> <td><img
<tr v-if="detailForm.subOrderCoupon" style="height: 40px;"> :src="item.goodsImage"
<td style="text-align: left;" colspan="3">优惠券</td> class="img-60"
<td>{{ detailForm.subOrderCoupon.discountAmount }}元</td> /></td>
</tr> <td>{{ item.goodsName }}</td>
<td>{{ item.specificationData }}</td>
<td>{{ item.activityPrice ? item.activityPrice : item.retailPrice }}元 * {{ item.goodsNumber }}</td>
</tr>
<tr
v-if="detailForm.subOrderCoupon"
style="height: 40px;"
>
<td
style="text-align: left;"
colspan="3"
>优惠券
</td>
<td>{{ detailForm.subOrderCoupon.discountAmount }}元</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="container edit-container" v-if="orderRefund"> <div
class="container edit-container"
v-if="orderRefund"
>
<p class="edit-title">售后信息</p> <p class="edit-title">售后信息</p>
<el-form label-width="100px" :inline="true"> <el-form
<el-row v-for="(item, index) in afterInfoDataRow" :key="index"> label-width="100px"
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label"> :inline="true"
<span class="detail-txt ellipsis-1" :title="orderRefund[subItem.name]">{{ orderRefund[subItem.name] || '-' >
}}</span> <el-row
v-for="(item, index) in afterInfoDataRow"
:key="index"
>
<el-form-item
v-for="(subItem, subIndex) in item.rowList"
:key="subIndex"
:label="subItem.label"
>
<span
class="detail-txt ellipsis-1"
:title="orderRefund[subItem.name]"
>{{ orderRefund[subItem.name] || '-' }}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<div class="form-img"> <div class="form-img">
<el-form label-width="100px" :inline="true"> <el-form
label-width="100px"
:inline="true"
>
<el-form-item label="售后凭证"> <el-form-item label="售后凭证">
<div class="flex"> <div class="flex">
<span v-for="(item, index) in orderRefund.imgUrls" :key="index"> <span
<el-image class="img-60 comment-img" :src="item" :preview-src-list="[item]"></el-image> v-for="(item, index) in orderRefund.imgUrls"
:key="index"
>
<el-image
class="img-60 comment-img"
:src="item"
:preview-src-list="[item]"
></el-image>
</span> </span>
</div> </div>
</el-form-item> </el-form-item>
...@@ -76,14 +133,19 @@ ...@@ -76,14 +133,19 @@
</div> </div>
</div> </div>
<GLFooter> <GLFooter>
<el-button @click="handleCancel" size="medium">取消</el-button> <el-button
@click="handleCancel"
size="medium"
>取消
</el-button>
</GLFooter> </GLFooter>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant' import {orderManageStatusList, orderSourceList, deliveryTypeList} from '@/common/constant'
export default { export default {
name: 'orderDetail', name: 'orderDetail',
data() { data() {
...@@ -154,20 +216,20 @@ export default { ...@@ -154,20 +216,20 @@ export default {
orderSourceList: orderSourceList, orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList, deliveryTypeList: deliveryTypeList,
refundTypeList: [ refundTypeList: [
{ confId: '1', confName: '退款退货' }, {confId: '1', confName: '退款退货'},
{ confId: '2', confName: '退款不退货' }, {confId: '2', confName: '退款不退货'},
{ confId: '3', confName: '众筹订单退款' } {confId: '3', confName: '众筹订单退款'}
], ],
shareStaffTypeList: [ shareStaffTypeList: [
{ confId: '1', confName: '个微' }, {confId: '1', confName: '个微'},
{ confId: '2', confName: '企微' } {confId: '2', confName: '企微'}
] ]
}, },
configShow: false configShow: false
} }
}, },
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
...@@ -295,9 +357,19 @@ export default { ...@@ -295,9 +357,19 @@ export default {
} }
}, },
getInfo() { getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => { this.$apis.orderManage.getOrderDetailApi({orderCode: this.routeInfo.orderCode}).then(res => {
this.detailForm = res this.detailForm = res
this.orderRefund = res.orderRefund || null this.orderRefund = res.orderRefund || null
if (res.orderSource == 6 || res.orderSource == 7) {
this.detailFormData.find(item => {
if (item.label == '支付定金') {
item.name = 'orderPrice'
}
if (item.label == '尾款') {
item.name = 'finalPaymentAmount'
}
})
}
this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss') this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss')
if (this.orderRefund) { if (this.orderRefund) {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-' this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-'
...@@ -315,6 +387,12 @@ export default { ...@@ -315,6 +387,12 @@ export default {
this.detailForm.crowdFundingPrice = (res.crowdFundingPrice - res.payPrice).toFixed(2) + '元' this.detailForm.crowdFundingPrice = (res.crowdFundingPrice - res.payPrice).toFixed(2) + '元'
} }
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '0元' this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '0元'
// 尾款转化为元
if ((res.finalPaymentAmount || res.finalPaymentAmount == 0) && (res.orderPrice || res.orderPrice == 0)) {
this.detailForm.finalPaymentAmount = (res.finalPaymentAmount / 100).toFixed(2) + '元'
}
this.detailForm.orderPrice = res.orderPrice ? res.orderPrice + '元' : '0元'
this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-' this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-'
this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-' this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-'
if (!this.detailForm.takeFee) { if (!this.detailForm.takeFee) {
...@@ -383,7 +461,7 @@ export default { ...@@ -383,7 +461,7 @@ export default {
width: 220px; width: 220px;
} }
.marketing.order-detail .show-table>tbody>tr>td { .marketing.order-detail .show-table > tbody > tr > td {
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
} }
......
<template>
<div class="marketing">
<div class="wa-container">
<div class="big-title">查看详情</div>
<div class="details-content">
<div class="content" v-for="(item,index) in detailsList" :key="index">
<div class="list-text">
<span class="label">{{ item.label }}:</span>
<span class="prop" v-if="detailsRes">{{ detailsRes[item.prop] || '--' }}</span>
</div>
</div>
</div>
</div>
<el-button type="primary" class="back-btn" @click="handleBack">返回</el-button>
</div>
</template>
<script>
export default {
name: "details",
data() {
return {
detailsList: [
{
label: '项目名称',
prop: 'bizRelName'
},
{
label: '消费积分',
prop: 'integralValue'
},
{
label: '客户昵称',
prop: 'customerWechatName'
},
{
label: '手机号',
prop: 'customerPhone'
},
{
label: '核销员工',
prop: 'verificationStaff'
},
{
label: '结算状态',
prop: 'settlementStatus'
},
{
label: '核销日期',
prop: 'verificationTime'
},
{
label: '订单编号',
prop: 'orderCode'
}
],
detailsRes: null
}
},
methods: {
getDetails(id) {
let params = {
id
}
this.$apis.pointWriteOff.pointWriteOffDetail(params).then(res => {
res.settlementStatus = res.settlementStatus == 0 ? '未结算' : '已结算'
this.detailsRes = res
})
},
handleBack() {
this.$router.back()
}
},
created() {
let id = this.$route.query.id || ''
this.getDetails(id)
}
}
</script>
<style lang="scss" scoped>
.wa-container {
background: #FFFFFF;
min-height: 80vh;
.big-title {
font-size: 16px;
font-weight: 600;
padding: 15px 20px;
color: #333;
border-bottom: 1px solid #E5E5E5;
}
.details-content {
padding: 50px 120px;
display: grid;
grid-template-columns: 33.3% 33.3% 33.3%;
.list-text {
margin-bottom: 20px;
font-size: 14px;
.label {
color: #666666;
}
.prop{
color: #333333;
}
}
}
}
.back-btn {
margin: 16px auto;
display: flex;
}
</style>
<template>
<div class=" marketing pointerWriteOff">
<div class="container">
<GLCombiForm ref="pointerWriteOffSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData"
@handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="exportBtn">
<el-button :size="size" @click="handleExport" class="default-blue-btn" type="default">导出</el-button>
</div>
<GLTable ref="pointerWriteOffRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import {exportFn} from "@/common/constant";
export default {
name: "index",
data() {
return {
size: 'small',
searchForm: {
// merchantId: this.$globalState.session.merchantId,
// merchantName: this.$globalState.session.merchantName
},
searchFormData: [
{
label: '项目名称',
name: 'bizRelName',
type: 'input',
placeholder: '请输入项目名称'
},
{
label: '核销日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '结算状态',
name: 'settlementStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'waiteOffStatusList'
}
],
baseData: {
waiteOffStatusList: [
{
confId: '0',
confName: '未结算'
},
{
confId: '1',
confName: '已结算'
}
],
},
getListApi: this.$apis.pointWriteOff.getListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '项目名称',
prop: 'bizRelName',
width: 280
},
{
label: '消费积分',
prop: 'integralValue',
width: 150
},
{
label: '客户昵称',
width: 150,
prop: 'customerWechatName'
},
{
label: '手机号',
prop: 'customerPhone',
width: 200,
line: 1
},
{
label: '核销员工',
prop: 'verificationStaffName',
width: 150
},
{
label: '结算状态',
prop: 'settlementStatus',
width: 100,
formatter: cellValue => {
return this.baseData.waiteOffStatusList.find(item => item.confId == cellValue.settlementStatus).confName
}
},
{
label: '核销日期',
width: 200,
prop: 'verificationTime'
},
{
label: '订单编号',
prop: 'orderCode',
width: 220
}
],
},
tableButtonList: [
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
// condition: row => {
// return row.sopStatus != 1
// },
listeners: {
click: row => this.$router.push({
path: '/pointWriteOff/details',
query: row ? { id: row.id } : ''
})
}
},
],
pageConf: {pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'},
}
},
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate?.length) {
params.verificationStartTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.verificationEndTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
handleReset() {
this.searchForm = {
bizRelName: '',
settlementStatus: '',
createDate: []
}
this.handleSearch()
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleSearch() {
this.$refs.pointerWriteOffRef.refreshTable()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = this.getParams()
// delete this.searchForm.createDate
resolve()
})
},
handleExport() {
var params = this.getParams()
this.$apis.pointWriteOff.pointWriteOffExportApi(params).then(res => {
exportFn(res)
})
},
}
}
</script>
<style lang="scss" scoped>
.exportBtn {
float: right;
margin-bottom: 10px;
}
</style>
...@@ -339,6 +339,10 @@ export default { ...@@ -339,6 +339,10 @@ export default {
{ {
confId: '4', confId: '4',
confName: '配置升级商品' confName: '配置升级商品'
},
{
confId: '5',
confName: '车主优选商品'
} }
] ]
} }
......
...@@ -175,7 +175,8 @@ export default { ...@@ -175,7 +175,8 @@ export default {
//position: relative; //position: relative;
.sort-box { .sort-box {
margin: 38px 0; margin: 38px 0;
.sort-title{
.sort-title {
margin-left: 12px; margin-left: 12px;
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!