Commit fa993fdf by zhangxw

订单列表,异常订单审核联调

1 parent 3a73472d
...@@ -217,3 +217,15 @@ export function getEffectiveReferralStoreDetail(data) { ...@@ -217,3 +217,15 @@ export function getEffectiveReferralStoreDetail(data) {
data.method = "dj.staff.api.effective.referral.detail" data.method = "dj.staff.api.effective.referral.detail"
return request(data) return request(data)
} }
/** 审核异常订单 */
export function auditGoodsOrderApplyRecord(data) {
data.method = `${path2}goodsOrderApplyRecord.audit.update`
return request(data, "post")
}
/** 获取审核订单详情数据 */
export function getAuditOrderDetail(data) {
data.method = `${path2}goodsOrderApplyRecord.detail.select`
return request(data, "post")
}
...@@ -1864,3 +1864,76 @@ export const reviewStatusOptMap = { ...@@ -1864,3 +1864,76 @@ export const reviewStatusOptMap = {
1: "#2CCA74", 1: "#2CCA74",
2: "#999999" 2: "#999999"
} }
export const djOrderTypeMap = {
'2': '打折策略',
'5': '组合付款',
'3': '买赠策略',
'4': '冲量活动',
'1': '正常订单'
}
export const auditStatusMap = {
'1': '区域运营待审批',
'2': '线上运营待审核',
'3': '审批通过',
'4': '审批驳回'
}
export const discountTypeMap = {
'1': '比例折扣',
'2': '折扣金额',
'3': '无折扣',
'4': '赠品',
'5': '非赠品'
}
export const djOrderTypeList = [
{
confId: '',
confLabel: '全部'
},
{
confId: '2',
confLabel: '打折策略'
},
{
confId: '5',
confLabel: '组合付款'
},
{
confId: '3',
confLabel: '买赠策略'
},
{
confId: '4',
confLabel: '冲量活动'
},
{
confId: '1',
confLabel: '正常订单'
}
]
export const goodsAuditStatusList = [
{
confId: '',
confLabel: '全部'
},
{
confId: '1',
confLabel: '区域运营待审批'
},
{
confId: '2',
confLabel: '线上运营到审核'
},
{
confId: '3',
confLabel: '审批通过'
},
{
confId: '4',
confLabel: '审批驳回'
}
]
...@@ -368,7 +368,19 @@ export const routerName = { ...@@ -368,7 +368,19 @@ export const routerName = {
parentId: "90401" parentId: "90401"
} }
] ]
} },
{
authId: "9040147",
parentId: "90401",
label: "通过",
handle: "handleApproved"
},
{
authId: "9040148",
parentId: "90401",
label: "驳回",
handle: "handleRejected"
},
], ],
component: _import("orderManage/orderList") component: _import("orderManage/orderList")
}, },
......
...@@ -63,29 +63,26 @@ ...@@ -63,29 +63,26 @@
category="Button" category="Button"
/> />
</d2-table-header> </d2-table-header>
<el-table <el-table :data="tableData" v-loading="$store.state.d2admin.loading.value" border>
:data="tableData" <el-table-column type="index" label="序号" :index="(index) => index + (page.pageNum - 1) * page.pageSize + 1"
v-loading="$store.state.d2admin.loading.value" align="center" />
border <el-table-column label="订单编号" align="center" width="150" prop="orderCode" />
> <el-table-column label="订单类型" align="center" width="100" prop="">
<el-table-column <template slot-scope="scope">
type="index" <span>{{ scope.row.djOrderType ? djOrderTypeMap[scope.row.djOrderType] : '-' }}</span>
label="序号" </template>
:index="(index) => index + (page.pageNum - 1) * page.pageSize + 1" </el-table-column>
align="center" <el-table-column label="审批状态" align="center" width="120" prop="">
/> <template slot-scope="scope">
<el-table-column <span>{{ scope.row.goodsOrderApplyStatus ? auditStatusMap[scope.row.goodsOrderApplyStatus] : '-' }}</span>
label="订单编号" </template>
align="center" </el-table-column>
width="150" <el-table-column label="原错误订单编号" align="center" width="160" prop="associatedOrderCode">
prop="orderCode" <template slot-scope="scope">
/> <span>{{ scope.row.associatedOrderCode || '-' }}</span>
<el-table-column </template>
label="第三方订单号" </el-table-column>
align="center" <el-table-column label="第三方订单号" align="center" width="150" prop="thirdOrderCode" />
width="150"
prop="thirdOrderCode"
/>
<el-table-column label="所属业务" align="center" prop="customerSex"> <el-table-column label="所属业务" align="center" prop="customerSex">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.businessType">{{ <span v-if="scope.row.businessType">{{
...@@ -315,11 +312,15 @@ ...@@ -315,11 +312,15 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="折扣后金额" align="center" prop="subOrderList">
label="优惠券 id" <template slot-scope="scope">
align="center" <span v-for="(item, index) in scope.row.subOrderList" :key="index">
prop="coupon.customerCouponCode" <p v-if="item.upgradeGoodsId">¥ {{ item.finalPrice }}</p>
> <p v-else>¥ {{ item.baseRetailPrice }}</p>
</span>
</template>
</el-table-column>
<el-table-column label="优惠券 id" align="center" prop="coupon.customerCouponCode">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index"> <span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.coupon">{{ item.coupon.customerCouponCode }}</p> <p v-if="item.coupon">{{ item.coupon.customerCouponCode }}</p>
...@@ -357,7 +358,7 @@ ...@@ -357,7 +358,7 @@
<span>¥ {{ scope.row.totalPrice }}</span> <span>¥ {{ scope.row.totalPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="支付金额" align="center" prop="totalPrice"> <el-table-column label="实收金额" align="center" prop="totalPrice">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
scope.row.finalPrice != null ? "¥" + scope.row.finalPrice : "" scope.row.finalPrice != null ? "¥" + scope.row.finalPrice : ""
...@@ -521,12 +522,12 @@ ...@@ -521,12 +522,12 @@
取消分账 取消分账
</el-button> --> </el-button> -->
<!-- 取消分账 --> <!-- 取消分账 -->
<auth-button <auth-button slot="auth-button" v-if="scope.row.profitAllocationStatus == 5" :show-btn-ids="['9040135']"
slot="auth-button" :data="scope.row" />
v-if="scope.row.profitAllocationStatus == 5" <!-- 通过 -->
:show-btn-ids="['9040135']" <auth-button v-if="scope.row.goodsOrderApplyStatus == 2" :show-btn-ids="['9040147']" :data="scope.row" />
:data="scope.row" <!-- 驳回 -->
/> <auth-button v-if="scope.row.goodsOrderApplyStatus == 2" :show-btn-ids="['9040148']" :data="scope.row" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -598,12 +599,10 @@ ...@@ -598,12 +599,10 @@
@dialogClose="ruleDialogClose" @dialogClose="ruleDialogClose"
/> />
<!-- 分账记录 --> <!-- 分账记录 -->
<rule-info-dialog <rule-info-dialog :rule-info-visible="ruleInfoVisible" :record-info="recordInfo" v-if="ruleInfoVisible"
:rule-info-visible="ruleInfoVisible" @dialogClose="ruleInfoDialogClose" />
:record-info="recordInfo" <!-- 审批通过/驳回 -->
v-if="ruleInfoVisible" <approval-dialog :approval-visible="approvalVisible" :info="approvalInfo" v-if="approvalVisible" @dialogClose="approvalDialogClose"></approval-dialog>
@dialogClose="ruleInfoDialogClose"
/>
</d2-container> </d2-container>
</template> </template>
...@@ -620,22 +619,20 @@ import { ...@@ -620,22 +619,20 @@ import {
} from "@api/order" } from "@api/order"
import { getBrandList } from "@/api/shopConfig.js" import { getBrandList } from "@/api/shopConfig.js"
import { getDiversionMerchantRef, listShop4sByRef } from "@api/merchant" import { getDiversionMerchantRef, listShop4sByRef } from "@api/merchant"
import { import { manageTypeList, BaseData, zyVoucherStatusOpt, djOrderTypeMap, auditStatusMap, djOrderTypeList, goodsAuditStatusList } from "@/common/constants"
manageTypeList,
BaseData,
zyVoucherStatusOpt
} from "@/common/constants"
import { mapActions, mapState, mapMutations } from "vuex" import { mapActions, mapState, mapMutations } from "vuex"
import { getParkStore } from "@api/editCustomer" import { getParkStore } from "@api/editCustomer"
import chooseRuleDialog from "./chooseRuleDialog" import chooseRuleDialog from "./chooseRuleDialog"
import ruleInfoDialog from "./ruleInfoDialog" import ruleInfoDialog from "./ruleInfoDialog"
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { getAllCategory } from "@api/product" import { getAllCategory } from '@api/product'
import approvalDialog from './components/approvalDialog'
export default { export default {
name: "CarDamage", name: "CarDamage",
components: { components: {
chooseRuleDialog, chooseRuleDialog,
ruleInfoDialog ruleInfoDialog,
approvalDialog
}, },
directives: { directives: {
"el-select-loadmore": { "el-select-loadmore": {
...@@ -680,7 +677,8 @@ export default { ...@@ -680,7 +677,8 @@ export default {
// 10: "已关闭", // 10: "已关闭",
11: "错误订单", 11: "错误订单",
12: "已退款", 12: "已退款",
13: "待上传" 13: "待上传",
14: "审批中"
}, },
upgradeOpts: { upgradeOpts: {
Y: "已升级", Y: "已升级",
...@@ -945,6 +943,24 @@ export default { ...@@ -945,6 +943,24 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "saleFlagList" optionsName: "saleFlagList"
},
{
label: "订单类型",
name: "djOrderType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "djOrderTypeList"
},
{
label: "审批状态",
name: "goodsOrderApplyStatus",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "auditStatusList"
} }
], ],
searchForm: { searchForm: {
...@@ -972,8 +988,10 @@ export default { ...@@ -972,8 +988,10 @@ export default {
thirdLevelGoodsType: "", thirdLevelGoodsType: "",
sellerUserId: "", sellerUserId: "",
brandIdList: [], brandIdList: [],
directSalesFlag: "", directSalesFlag: '',
sellerNameVague: "" sellerNameVague: '',
djOrderType: '',
goodsOrderApplyStatus: ''
}, },
baseData: { baseData: {
orderStatusList: [ orderStatusList: [
...@@ -1015,7 +1033,11 @@ export default { ...@@ -1015,7 +1033,11 @@ export default {
}, },
{ {
confId: 13, confId: 13,
confLabel: "待上传" confLabel: '待上传'
},
{
confId: 14,
confLabel: "审批中"
} }
], ],
upgradeList: [ upgradeList: [
...@@ -1122,8 +1144,12 @@ export default { ...@@ -1122,8 +1144,12 @@ export default {
{ confId: "1", confValue: "直营" } { confId: "1", confValue: "直营" }
], ],
brandList: [], brandList: [],
sellerList: [] sellerList: [],
djOrderTypeList,
auditStatusList: goodsAuditStatusList
}, },
djOrderTypeMap,
auditStatusMap,
tableData: [], tableData: [],
total: 0, total: 0,
page: { page: {
...@@ -1144,7 +1170,8 @@ export default { ...@@ -1144,7 +1170,8 @@ export default {
}, },
sellerList: [], sellerList: [],
pageSize: 20, pageSize: 20,
currentPage: 1 currentPage: 1,
approvalVisible: false
} }
}, },
computed: { computed: {
...@@ -1381,7 +1408,9 @@ export default { ...@@ -1381,7 +1408,9 @@ export default {
sellerUserId: "", sellerUserId: "",
brandIdList: [], brandIdList: [],
directSalesFlag: "", directSalesFlag: "",
sellerNameVague: "" sellerNameVague: "",
djOrderType: '',
goodsOrderApplyStatus: ''
} }
this.tempGoodsType = [] this.tempGoodsType = []
// this.baseData.storeIdList = [] // this.baseData.storeIdList = []
...@@ -1799,6 +1828,28 @@ export default { ...@@ -1799,6 +1828,28 @@ export default {
// }) // })
}) })
}) })
},
// 审批通过
handleApproved(data) {
this.approvalVisible = true
this.approvalInfo = {
...data,
approvalType: 1
}
},
// 审批驳回
handleRejected(data) {
this.approvalVisible = true
this.approvalInfo = {
...data,
approvalType: 2
}
},
approvalDialogClose(obj) {
this.approvalVisible = false
if (obj.flag) {
this.handleSearch()
}
} }
} }
} }
......
<!-- 审批通过/驳回弹窗 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="approval-dialog-content">
<div class="sub-title">订单信息</div>
<div class="form_div">
<el-form class="edit-sub-block"
label-width="150px"
:inline="true">
<el-form-item label="订单编号:" class="form-item-half">
{{ detailInfo.orderCode ? detailInfo.orderCode : "--" }}
</el-form-item>
<el-form-item v-if="detailInfo.oldOrderCode" label="原错误订单编号:" class="form-item-half">
{{ detailInfo.oldOrderCode ? detailInfo.oldOrderCode : "--" }}
</el-form-item>
<el-form-item label="订单类型:" class="form-item-half">{{ djOrderTypeMap[detailInfo.djOrderType] }}</el-form-item>
<el-form-item label="总价:" class="form-item-half">{{ detailInfo.finalPrice }}</el-form-item>
<el-form-item label="提单人:" class="form-item-half">{{ detailInfo.sellerName }}<span class="split">|</span>{{ detailInfo.merchantName }}</el-form-item>
</el-form>
</div>
<template v-if="detailInfo.oldOrderCode">
<div class="sub-title">原错误订单商品信息</div>
<el-table
:data="detailInfo.oldSubOrderList"
border
:header-cell-style="{
'text-align': 'center',
'background-color': '#fafafa'
}"
style="width: 100%; margin-top: 15px !important;"
>
<el-table-column type="index" align="center" label="序号" width="50px" />
<el-table-column prop="packageName" align="center" label="套餐名称">
<template #default="scope">
{{ scope.row.packageName || '-' }}
</template>
</el-table-column>
<el-table-column prop="upgradeGoodsName" align="center" label="商品名称">
<template #default="scope">
{{ scope.row.upgradeGoodsName || '-' }}
</template>
</el-table-column>
<el-table-column prop="totalPrice" align="center" label="原价">
<template #default="scope">
<span v-if="scope.row.totalPrice != null">¥{{ scope.row.totalPrice }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="discountType" align="center" label="折扣方式">
<template #default="scope">
{{ discountTypeMap[scope.row.discountType] || '-' }}
</template>
</el-table-column>
<el-table-column prop="finalPrice" align="center" label="折扣后价格">
<template #default="scope">
<span v-if="scope.row.finalPrice != null">¥{{ scope.row.finalPrice }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="number" align="center" label="数量">
<template #default="scope">
{{ scope.row.number != null ? scope.row.number : '-' }}
</template>
</el-table-column>
</el-table>
</template>
<template>
<div class="sub-title">商品信息</div>
<el-table
:data="detailInfo.subOrderList"
border
:header-cell-style="{
'text-align': 'center',
'background-color': '#fafafa'
}"
style="width: 100%; margin-top: 15px !important;"
>
<el-table-column type="index" align="center" label="序号" width="50px" />
<el-table-column prop="packageName" align="center" label="套餐名称">
<template #default="scope">
{{ scope.row.packageName || '-' }}
</template>
</el-table-column>
<el-table-column prop="upgradeGoodsName" align="center" label="商品名称">
<template #default="scope">
{{ scope.row.upgradeGoodsName || '-' }}
</template>
</el-table-column>
<el-table-column prop="totalPrice" align="center" label="原价">
<template #default="scope">
<span v-if="scope.row.totalPrice != null">¥{{ scope.row.totalPrice }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="discountType" align="center" label="折扣方式">
<template #default="scope">
{{ discountTypeMap[scope.row.discountType] || '-' }}
</template>
</el-table-column>
<el-table-column prop="finalPrice" align="center" label="折扣后价格">
<template #default="scope">
<span v-if="scope.row.finalPrice != null">¥{{ scope.row.finalPrice }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="number" align="center" label="数量">
<template #default="scope">
{{ scope.row.number != null ? scope.row.number : '-' }}
</template>
</el-table-column>
</el-table>
</template>
<div class="sub-title">审批备注</div>
<div class="form_div">
<el-form class="edit-sub-block" ref="remarkForm" :model="formObj" label-width="150px" :inline="true">
<el-form-item :label="info.approvalType == 1 ? '通过备注:' : '驳回备注:'" prop="remark" :rules="[{ required: info.approvalType == 2, message: '请输入驳回备注', trigger: 'blur' }]">
<el-input
type="textarea"
placeholder="请输入"
v-model.trim="formObj.remark"
maxlength="200"
class="textarea-input"
show-word-limit
>
</el-input>
</el-form-item>
</el-form>
</div>
</div>
</baseDialog>
</template>
<script>
import { djOrderTypeMap, discountTypeMap } from "@/common/constants"
import { getAuditOrderDetail, auditGoodsOrderApplyRecord } from "@api/order"
export default {
name: "ApprovalDialog",
props: {
approvalVisible: {
type: Boolean,
default: false
},
info: {
type: Object,
default: () => { }
}
},
computed: {
visible: {
get() {
return this.approvalVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal })
}
}
},
data() {
return {
djOrderTypeMap,
discountTypeMap,
detailInfo: {
subOrderList: []
},
dialogConfig: {
title: '',
width: '1080px'
},
formObj: {
remark: ''
}
}
},
created() {
this.dialogConfig.title = this.info.approvalType == 1 ? '审批通过' : '审批驳回'
this.getDetail()
},
mounted() {
},
methods: {
getDetail() {
let params = {
orderCode: this.info.orderCode
}
getAuditOrderDetail(params).then(res => {
if (res.oldGoodsOrderDTO) {
res.oldOrderCode = res?.oldGoodsOrderDTO?.orderCode || null
}
res.oldSubOrderList = this.flattenGoodsOrder(res.oldGoodsOrderDTO)
res.subOrderList = this.flattenGoodsOrder(res.goodsOrderDTO)
this.detailInfo = res
})
},
// 处理商品数据
flattenGoodsOrder(data) {
const result = []
if (Array.isArray(data?.subOrderList)) {
data?.subOrderList?.forEach(item => {
result.push({
...item,
packageName: null
})
})
}
if (Array.isArray(data?.packageGoodsList)) {
data?.packageGoodsList?.forEach(pkg => {
const packageName = pkg?.packageName;
if (Array.isArray(pkg?.packageGoodsOrderList)) {
pkg?.packageGoodsOrderList?.forEach(subItem => {
result.push({
...subItem,
packageName: packageName
})
})
}
})
}
return result
},
handleAddConfirm() {
this.$refs.remarkForm.validate(valid => {
if (valid) {
let params = {
orderCode: this.detailInfo.orderCode,
auditResult: this.info.approvalType,
remark: this.formObj.remark
}
auditGoodsOrderApplyRecord(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
.sub-title {
border-bottom: 1px solid #e5e5e5;
height: 50px;
line-height: 50px;
font-size: 16px;
}
.approval-dialog-content {
height: calc(100vh - 380px);
overflow: auto;
}
.form_div {
margin-top: 20px;
.form-item-half {
width: calc(50% - 10px) !important;
display: inline-block;
}
.textarea-input {
width: 585px;
}
}
.split {
margin: 0 5px;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -93,24 +93,25 @@ ...@@ -93,24 +93,25 @@
</div> </div>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column <el-table-column type="index" label="序号" :index="(index) => index + (page.pageNum - 1) * page.pageSize + 1"
type="index" align="center" />
label="序号" <el-table-column label="订单编号" align="center" width="150" prop="orderCode" />
:index="(index) => index + (page.pageNum - 1) * page.pageSize + 1" <el-table-column label="订单类型" align="center" width="100" prop="">
align="center" <template slot-scope="scope">
/> <span>{{ scope.row.djOrderType ? djOrderTypeMap[scope.row.djOrderType] : '-' }}</span>
<el-table-column </template>
label="订单编号" </el-table-column>
align="center" <el-table-column label="审批状态" align="center" width="120" prop="">
width="150" <template slot-scope="scope">
prop="orderCode" <span>{{ scope.row.goodsOrderApplyStatus ? auditStatusMap[scope.row.goodsOrderApplyStatus] : '-' }}</span>
/> </template>
<el-table-column </el-table-column>
label="订单时间" <el-table-column label="原错误订单编号" align="center" width="160" prop="associatedOrderCode">
align="center" <template slot-scope="scope">
width="160" <span>{{ scope.row.associatedOrderCode || '-' }}</span>
prop="orderTimeStr" </template>
/> </el-table-column>
<el-table-column label="订单时间" align="center" width="160" prop="orderTimeStr" />
<el-table-column <el-table-column
label="支付时间" label="支付时间"
...@@ -298,12 +299,15 @@ ...@@ -298,12 +299,15 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="实收金额" align="center" prop="subOrderList">
label="施工单状态" <template slot-scope="scope">
align="center" <span v-for="(item, index) in scope.row.subOrderList" :key="index">
width="100" <p v-if="item.upgradeGoodsId">¥ {{ item.finalPrice }}</p>
prop="subOrderList" <p v-else>¥ {{ item.baseRetailPrice }}</p>
> </span>
</template>
</el-table-column>
<el-table-column label="施工单状态" align="center" width="100" prop="subOrderList">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index"> <span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p> <p>
...@@ -500,11 +504,11 @@ ...@@ -500,11 +504,11 @@
取消分账 取消分账
</el-button> --> </el-button> -->
<!-- 取消分账 --> <!-- 取消分账 -->
<auth-button <auth-button v-if="scope.row.profitAllocationStatus == 5" :show-btn-ids="['9040107']" :data="scope.row" />
v-if="scope.row.profitAllocationStatus == 5" <!-- 通过 -->
:show-btn-ids="['9040107']" <auth-button v-if="scope.row.goodsOrderApplyStatus == 2" :show-btn-ids="['9040147']" :data="scope.row" />
:data="scope.row" <!-- 驳回 -->
/> <auth-button v-if="scope.row.goodsOrderApplyStatus == 2" :show-btn-ids="['9040148']" :data="scope.row" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -638,6 +642,8 @@ ...@@ -638,6 +642,8 @@
</glsx-combi-form> </glsx-combi-form>
</div> </div>
</baseDialog> </baseDialog>
<!-- 审批通过/驳回 -->
<approval-dialog :approval-visible="approvalVisible" :info="approvalInfo" v-if="approvalVisible" @dialogClose="approvalDialogClose"></approval-dialog>
</d2-container> </d2-container>
</template> </template>
...@@ -655,17 +661,19 @@ import { ...@@ -655,17 +661,19 @@ import {
} from "@api/order" } from "@api/order"
import { getDiversionMerchantRef, listShop4sByRef } from "@api/merchant" import { getDiversionMerchantRef, listShop4sByRef } from "@api/merchant"
import { getBrandList } from "@/api/shopConfig.js" import { getBrandList } from "@/api/shopConfig.js"
import { manageTypeList, BaseData } from "@/common/constants" import { manageTypeList, BaseData, djOrderTypeMap, auditStatusMap, djOrderTypeList, goodsAuditStatusList } from "@/common/constants"
import { mapActions, mapState, mapMutations } from "vuex" import { mapActions, mapState, mapMutations } from "vuex"
import { getParkStore } from "@api/editCustomer" import { getParkStore } from "@api/editCustomer"
import chooseRuleDialog from "./chooseRuleDialog" import chooseRuleDialog from "./chooseRuleDialog"
import ruleInfoDialog from "./ruleInfoDialog" import ruleInfoDialog from "./ruleInfoDialog"
import { getAllCategory } from "@api/product" import { getAllCategory } from '@api/product'
import approvalDialog from './components/approvalDialog'
export default { export default {
name: "OrderList", name: "OrderList",
components: { components: {
chooseRuleDialog, chooseRuleDialog,
ruleInfoDialog ruleInfoDialog,
approvalDialog
}, },
directives: { directives: {
"el-select-loadmore": { "el-select-loadmore": {
...@@ -711,7 +719,8 @@ export default { ...@@ -711,7 +719,8 @@ export default {
10: "已关闭", 10: "已关闭",
11: "错误订单", 11: "错误订单",
12: "已退款", 12: "已退款",
13: "待上传" 13: "待上传",
14: "审批中"
}, },
upgradeOpts: { upgradeOpts: {
Y: "已升级", Y: "已升级",
...@@ -954,6 +963,24 @@ export default { ...@@ -954,6 +963,24 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "saleFlagList" optionsName: "saleFlagList"
},
{
label: "订单类型",
name: "djOrderType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "djOrderTypeList"
},
{
label: "审批状态",
name: "goodsOrderApplyStatus",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "auditStatusList"
} }
], ],
searchForm: { searchForm: {
...@@ -979,7 +1006,9 @@ export default { ...@@ -979,7 +1006,9 @@ export default {
thirdLevelGoodsType: "", thirdLevelGoodsType: "",
sellerNameVague: "", sellerNameVague: "",
brandIdList: [], brandIdList: [],
directSalesFlag: "" directSalesFlag: '',
djOrderType: '',
goodsOrderApplyStatus: ''
}, },
baseData: { baseData: {
orderStatusList: [ orderStatusList: [
...@@ -1021,6 +1050,10 @@ export default { ...@@ -1021,6 +1050,10 @@ export default {
{ {
confId: 12, confId: 12,
confLabel: "已退款" confLabel: "已退款"
},
{
confId: 14,
confLabel: "审批中"
} }
], ],
upgradeList: [ upgradeList: [
...@@ -1114,8 +1147,12 @@ export default { ...@@ -1114,8 +1147,12 @@ export default {
{ confId: "0", confValue: "非直营" }, { confId: "0", confValue: "非直营" },
{ confId: "1", confValue: "直营" } { confId: "1", confValue: "直营" }
], ],
brandList: [] brandList: [],
djOrderTypeList,
auditStatusList: goodsAuditStatusList
}, },
djOrderTypeMap,
auditStatusMap,
tableData: [], tableData: [],
total: 0, total: 0,
page: { page: {
...@@ -1161,7 +1198,8 @@ export default { ...@@ -1161,7 +1198,8 @@ export default {
}, },
sellerList: [], sellerList: [],
pageSize: 20, pageSize: 20,
currentPage: 1 currentPage: 1,
approvalVisible: false
} }
}, },
computed: { computed: {
...@@ -1373,7 +1411,9 @@ export default { ...@@ -1373,7 +1411,9 @@ export default {
salesType: "", salesType: "",
sellerNameVague: "", sellerNameVague: "",
brandIdList: [], brandIdList: [],
directSalesFlag: "" directSalesFlag: "",
djOrderType: '',
goodsOrderApplyStatus: ''
} }
this.tempGoodsType = [] this.tempGoodsType = []
// this.baseData.storeIdList = [] // this.baseData.storeIdList = []
...@@ -1861,6 +1901,29 @@ export default { ...@@ -1861,6 +1901,29 @@ export default {
// }) // })
}) })
}) })
},
// 审批通过
handleApproved(data) {
console.log(data)
this.approvalVisible = true
this.approvalInfo = {
...data,
approvalType: 1
}
},
// 审批驳回
handleRejected(data) {
this.approvalVisible = true
this.approvalInfo = {
...data,
approvalType: 2
}
},
approvalDialogClose(obj) {
this.approvalVisible = false
if (obj.flag) {
this.handleSearch()
}
} }
} }
} }
......
...@@ -83,6 +83,9 @@ ...@@ -83,6 +83,9 @@
] ]
}} }}
</el-form-item> </el-form-item>
<el-form-item label="订单类型:">
{{ djOrderTypeMap[detail.djOrderType] || '-' }}
</el-form-item>
<el-form-item label="退款订单:" v-if="detail.status == 12"> <el-form-item label="退款订单:" v-if="detail.status == 12">
{{ detail.refundRemark }} {{ detail.refundRemark }}
</el-form-item> </el-form-item>
...@@ -248,7 +251,23 @@ ...@@ -248,7 +251,23 @@
<el-table-column :prop="'upgradeGoodsAlias'" align="center" label="商品别名" /> <el-table-column :prop="'upgradeGoodsAlias'" align="center" label="商品别名" />
<el-table-column :prop="'upgradeGoodsTypeName'" align="center" label="商品分类" /> <el-table-column :prop="'upgradeGoodsTypeName'" align="center" label="商品分类" />
<el-table-column :prop="'upgradeBrandMerchantName'" align="center" label="品牌商" /> <el-table-column :prop="'upgradeBrandMerchantName'" align="center" label="品牌商" />
<el-table-column :prop="'upgradePrice'" align="center" label="商品售价" /> <el-table-column :prop="'upgradePrice'" align="center" :label="detail.sceneType == 0 || detail.sceneType == 1 ? '商品单价' : '商品售价'">
<template slot-scope="scope">
<span>¥{{ scope.row.upgradePrice || 0 }}</span>
</template>
</el-table-column>
<!-- 1.1订单详情新增实收金额 -->
<el-table-column :prop="'finalPrice'" v-if="detail.sceneType == 1" align="center" label="实收金额">
<template slot-scope="scope">
<span>¥{{ scope.row.finalPrice || 0 }}</span>
</template>
</el-table-column>
<!-- 2.1订单详情新增折扣后金额 -->
<el-table-column :prop="'finalPrice'" v-if="detail.sceneType == 0" align="center" label="折扣后金额">
<template slot-scope="scope">
<span>¥{{ scope.row.finalPrice || 0 }}</span>
</template>
</el-table-column>
<el-table-column :prop="'coupon.customerCouponCode'" align="center" label="优惠券 id" /> <el-table-column :prop="'coupon.customerCouponCode'" align="center" label="优惠券 id" />
<el-table-column :prop="'coupon.couponName'" align="center" label="优惠券名称" /> <el-table-column :prop="'coupon.couponName'" align="center" label="优惠券名称" />
<el-table-column :prop="'coupon.discountPrice'" align="center" label="优惠券金额" /> <el-table-column :prop="'coupon.discountPrice'" align="center" label="优惠券金额" />
...@@ -269,13 +288,23 @@ ...@@ -269,13 +288,23 @@
<span>{{ scope.row.number }}件</span> <span>{{ scope.row.number }}件</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="totalPrice" align="center" label="优惠方式">
<template slot-scope="scope">
<span>{{ discountTypeMap[scope.row.discountType] || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="totalPrice" align="center" label="优惠金额">
<template slot-scope="scope">
<span>¥{{ scope.row.discountAmount || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="totalPrice" align="center" label="总价"> <el-table-column prop="totalPrice" align="center" label="总价">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="detail.upgradeFlag === 'Y'">¥{{ scope.row.totalPrice || 0 }}</span> <span v-if="detail.upgradeFlag === 'Y'">¥{{ scope.row.totalPrice || 0 }}</span>
<span v-else>0</span> <span v-else>0</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="totalPrice" align="center" label="支付金额"> <el-table-column prop="totalPrice" align="center" :label="detail.sceneType == 0 ? '实收金额' : '支付金额'">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.finalPrice != null ? '¥' + scope.row.finalPrice : '' }}</span> <span>{{ scope.row.finalPrice != null ? '¥' + scope.row.finalPrice : '' }}</span>
</template> </template>
...@@ -366,7 +395,7 @@ import { mapActions, mapState } from "vuex" ...@@ -366,7 +395,7 @@ import { mapActions, mapState } from "vuex"
import remarkDialog from "./remarkDialog" import remarkDialog from "./remarkDialog"
import technicianDialog from "./components/technicianDialog" import technicianDialog from "./components/technicianDialog"
import { deepClone, downLoadFile } from "@/common/util" import { deepClone, downLoadFile } from "@/common/util"
import { payType, BaseData, invoiceTypeOpt, invalidFlagOpt } from "@/common/constants.js" import { payType, BaseData, invoiceTypeOpt, invalidFlagOpt, djOrderTypeMap, discountTypeMap } from "@/common/constants.js"
import dayjs from "dayjs" import dayjs from "dayjs"
import { goodsOrderDetail, markAsInvoiced, carUploadRecordAdd, carUploadRecordDelete, downloadNumAdd } from "@api/order" import { goodsOrderDetail, markAsInvoiced, carUploadRecordAdd, carUploadRecordDelete, downloadNumAdd } from "@api/order"
import newSignRefundDialog from "./components/newSignRefundDialog" import newSignRefundDialog from "./components/newSignRefundDialog"
...@@ -456,7 +485,9 @@ export default { ...@@ -456,7 +485,9 @@ export default {
carFileType: "", // 0接车单1交车单 carFileType: "", // 0接车单1交车单
dialogTitle: "", // 上传弹窗标题 dialogTitle: "", // 上传弹窗标题
pickUpOrder: null, // 接车单信息 pickUpOrder: null, // 接车单信息
deliveryNote: null // 交车单信息 deliveryNote: null, // 交车单信息
djOrderTypeMap,
discountTypeMap
} }
}, },
computed: { computed: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!