Commit 3aef2d8f by wangzhihui

Merge branch 'SAAS+V4.55.0-0730' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.55.0-0730
2 parents 65488b1a c864c486
...@@ -15,6 +15,12 @@ export function addRefundApplyRecord(data) { ...@@ -15,6 +15,12 @@ export function addRefundApplyRecord(data) {
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 企微OA退款审批
export function addOaRefund(data) {
data.method = 'dj.api.smartcarlife.refundApplyRecord.operator.supplement'
return request(data, RequestMethods.POST)
}
// 分页查询退款申请记录 // 分页查询退款申请记录
export function refundApplyRecordPage(data) { export function refundApplyRecordPage(data) {
data.method = `${path}refundApplyRecord.page` data.method = `${path}refundApplyRecord.page`
......
...@@ -902,7 +902,10 @@ export const refundExamine_status = [ ...@@ -902,7 +902,10 @@ export const refundExamine_status = [
{ confId: 2, confValue: "财务复核" }, { confId: 2, confValue: "财务复核" },
{ confId: 3, confValue: "财务结算" }, { confId: 3, confValue: "财务结算" },
{ confId: 4, confValue: "已完成" }, { confId: 4, confValue: "已完成" },
{ confId: 5, confValue: "驳回" } { confId: 5, confValue: "驳回" },
{ confId: 6, confValue: "驻店发起" },
{ confId: 7, confValue: "区域运营审核" },
{ confId: 8, confValue: "运营补充" }
] ]
// 订单管理-退款审核-审批类型 // 订单管理-退款审核-审批类型
...@@ -918,6 +921,13 @@ export const oaApproveStatusOpt = [ ...@@ -918,6 +921,13 @@ export const oaApproveStatusOpt = [
{ confId: 3, confValue: "已驳回" }, { confId: 3, confValue: "已驳回" },
{ confId: 4, confValue: "已撤销" } { confId: 4, confValue: "已撤销" }
] ]
// 订单管理 - 退款单来源
export const refundOrderSourceOpt = [
{ confId: 0, confValue: "嘀加系统" },
{ confId: 1, confValue: "小程序" }
]
// 虚拟对公账户银盛到账模式 // 虚拟对公账户银盛到账模式
export const receiptModeList = [ export const receiptModeList = [
{ confId: 1, confValue: "T+1" }, { confId: 1, confValue: "T+1" },
......
...@@ -691,6 +691,12 @@ export const routerName = { ...@@ -691,6 +691,12 @@ export const routerName = {
handle: "handleDetail" handle: "handleDetail"
}, },
{ {
authId: "9040810",
parentId: "90408",
label: "补充",
handle: "handleSupple"
},
{
authId: "9040805", authId: "9040805",
parentId: "90408", parentId: "90408",
label: "审核", label: "审核",
......
...@@ -13,9 +13,13 @@ ...@@ -13,9 +13,13 @@
:style="{ width: picOptions.width, height: picOptions.height }" :style="{ width: picOptions.width, height: picOptions.height }"
v-if="picOptions.type == 'video'" v-if="picOptions.type == 'video'"
> >
<video id="video" width="100%" height="100%" preload loop muted> <video id="video" width="100%" height="100%" preload="none" loop muted>
<source :src="item" type="video/mp4" /> <source :src="item" type="video/mp4" />
</video> </video>
<img
class="video-poster"
src="../../../../assets/video-default.png"
/>
<div class="mask"> <div class="mask">
<div <div
class="pic-pane-close" class="pic-pane-close"
...@@ -199,6 +203,20 @@ export default { ...@@ -199,6 +203,20 @@ export default {
default: -1 default: -1
} }
}, },
watch: {
dialogVisibleImg(val) {
if (!val) {
// 关闭所有视频播放
const videos = document.querySelectorAll('.preVideo');
videos.forEach(video => {
if (video && !video.paused) {
video.pause();
video.currentTime = 0;
}
});
}
}
},
data() { data() {
return { return {
uploading: false, uploading: false,
...@@ -471,6 +489,16 @@ export default { ...@@ -471,6 +489,16 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.video-poster {
position: absolute;
width: 104px;
height: 104px;
object-fit: fill;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
.mask { .mask {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
}).then(() => { }).then(() => {
this.loading = true this.loading = true
const params = { const params = {
invoiceReqSerialNo: this.redInfo.invoiceReqSerialNo, electronicInvoiceNo: this.redInfo.electronicInvoiceNo,
reason: this.editForm.reason reason: this.editForm.reason
} }
invoiceRed(params).then(res => { invoiceRed(params).then(res => {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<span style="margin-right: 10px" v-if="scope.scope.redInvoiceDownloadUrl"> <span style="margin-right: 10px" v-if="scope.scope.redInvoiceDownloadUrl">
<auth-button :data="scope.scope" :show-btn-ids="['9170303']" /> <auth-button :data="scope.scope" :show-btn-ids="['9170303']" />
</span> </span>
<span style="margin-right: 10px"> <span style="margin-right: 10px" v-if="scope.scope.code == '9999'">
<auth-button :data="scope.scope" :show-btn-ids="['9170304']" /> <auth-button :data="scope.scope" :show-btn-ids="['9170304']" />
</span> </span>
</div> </div>
...@@ -47,8 +47,10 @@ import { ...@@ -47,8 +47,10 @@ import {
mergePdf mergePdf
} from "@api/invoiceManage" } from "@api/invoiceManage"
import RedDialog from './components/RedDialog' import RedDialog from './components/RedDialog'
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default { export default {
name: 'invoiceRedManage', name: 'invoiceRedManage',
mixins: [reportTrackFunMixin], // 导入混入
components: { components: {
RedDialog RedDialog
}, },
...@@ -157,6 +159,10 @@ export default { ...@@ -157,6 +159,10 @@ export default {
}, },
mounted() { mounted() {
this.getBaseData() this.getBaseData()
this.onPageShow()
},
beforeDestroy() {
this.onPageHide()
}, },
methods: { methods: {
......
...@@ -167,6 +167,9 @@ ...@@ -167,6 +167,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div v-if="detailInfo.refundApplyDetailList">
<d2-table :table-params="orderTableParams" :tableData="detailInfo.refundApplyDetailList" :hasPage="false"></d2-table>
</div>
<div class="examine-record" <div class="examine-record"
v-if="detailInfo.approveType == 1"> v-if="detailInfo.approveType == 1">
<div class="title"> <div class="title">
...@@ -393,7 +396,57 @@ export default { ...@@ -393,7 +396,57 @@ export default {
} }
] ]
}, },
approveTypeOpt: deepClone(refundExamine_approveTypeOpt) approveTypeOpt: deepClone(refundExamine_approveTypeOpt),
orderTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [{
label: '子订单编码',
prop: 'subOrderCode'
},
{
label: "商品名称",
prop: "goodsName"
},
{
label: "商品别名",
prop: "goodsAlias"
},
{
label: "商品ID",
prop: "goodsCommodityCode"
},
{
label: "分类",
prop: "upgradeGoodsTypeName"
},
{
label: "售价",
prop: "upgradePrice",
formatter: cellValue => {
return "¥" + cellValue.upgradePrice
}
},
{
label: "数量/件",
prop: "number"
},
{
label: "支付金额",
prop: "totalPrice",
formatter: cellValue => {
return "¥" + cellValue.totalPrice
}
},
{
label: "业务退款金额",
prop: "refundAmount",
formatter: cellValue => {
return "¥" + cellValue.refundAmount
}
}]
},
} }
}, },
methods: { methods: {
...@@ -427,6 +480,9 @@ export default { ...@@ -427,6 +480,9 @@ export default {
item.optPerShow = "发起人" item.optPerShow = "发起人"
item.optTimeShow = "发起时间" item.optTimeShow = "发起时间"
item.optRemarkShow = "备注" item.optRemarkShow = "备注"
if(item.afterStatus == 6) {
item.optShow = "驻店发起"
}
} else if (item.beforeStatus == 0) { } else if (item.beforeStatus == 0) {
item.optShow = "运营审核" item.optShow = "运营审核"
item.optPerShow = "审核人" item.optPerShow = "审核人"
...@@ -516,6 +572,18 @@ export default { ...@@ -516,6 +572,18 @@ export default {
item.optStautsShow = "驳回" item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因" item.optRemarkShow = "驳回原因"
} }
} else if (item.beforeStatus == 6) {
item.optShow = "区域运营审核"
item.optStautsShow = "通过"
item.optPerShow = "审核人"
item.optTimeShow = "审核时间"
item.optRemarkShow = "备注"
} else if (item.beforeStatus == 7) {
item.optShow = "运营补充"
item.optStautsShow = "通过"
item.optPerShow = "操作人"
item.optTimeShow = "操作时间"
item.optRemarkShow = "备注"
} else { } else {
item.isShow = item.beforeStatus == item.afterStatus item.isShow = item.beforeStatus == item.afterStatus
if (item.beforeStatus == item.afterStatus) { if (item.beforeStatus == item.afterStatus) {
......
...@@ -98,7 +98,10 @@ export default { ...@@ -98,7 +98,10 @@ export default {
], ],
total: 0, total: 0,
refundSubOrderCode: "", refundSubOrderCode: "",
isAll: false refundApplyDetailList: [],
isAll: false,
// 是否只有一个子订单并且未退过款的
isOneSubFirst: false
} }
}, },
props: { props: {
...@@ -127,6 +130,7 @@ export default { ...@@ -127,6 +130,7 @@ export default {
async getList(orderCode) { async getList(orderCode) {
const res = await goodsSubOrder({ orderCode }) const res = await goodsSubOrder({ orderCode })
this.tableData = res this.tableData = res
this.isOneSubFirst = this.tableData.length == 1 && this.tableData.every(item => item.status == 1)
this.$refs.seletingTable.toggleAllSelection() this.$refs.seletingTable.toggleAllSelection()
}, },
handleChange(selection) { handleChange(selection) {
...@@ -142,20 +146,24 @@ export default { ...@@ -142,20 +146,24 @@ export default {
getParams(selection) { getParams(selection) {
let _total = 0 let _total = 0
let _refundSubOrderCode = [] let _refundSubOrderCode = []
selection.forEach((item) => { selection.forEach((item, idx) => {
_total += item.totalPrice _total += item.totalPrice
_refundSubOrderCode.push(item.subOrderCode) _refundSubOrderCode.push(item.subOrderCode)
this.$set(selection[idx], 'refundAmount', item.totalPrice)
}) })
this.total = _total this.total = _total
this.refundSubOrderCode = _refundSubOrderCode.join("/") this.refundSubOrderCode = _refundSubOrderCode.join("/")
this.refundApplyDetailList = selection
console.log(this.refundSubOrderCode) console.log(this.refundSubOrderCode)
}, },
handleConfirm() { handleConfirm() {
const { refundSubOrderCode, total, isAll } = this const { refundSubOrderCode, refundApplyDetailList, total, isAll, isOneSubFirst } = this
this.$emit("handleConfirm", { this.$emit("handleConfirm", {
total, total,
refundSubOrderCode, refundSubOrderCode,
isAll isAll,
refundApplyDetailList,
isOneSubFirst
}) })
}, },
handleClose() { handleClose() {
......
<!-- 修改备注 -->
<template>
<d2-dialog title="查看技师施工图" :is-visible="remarkVisible" class="accountDailog" @closeDialog="handleClose"
@confirmDialog="handleAddConfirm" :noCancel="true" btnOkLabel="返回">
<el-form ref="refundForm" :model="infoForm" :rules="formRules" label-width="150px">
<el-form-item label="技师姓名:">
{{ infoForm.technicianName }}
</el-form-item>
<el-form-item label="子商品名称:">
{{ infoForm.upgradeGoodsName }}
</el-form-item>
<el-form-item label="审核状态:">
<span class="status">{{ infoForm.approveStatus == null ? '未审核' : infoForm.approveStatus == "Y" ? '通过' :
'未通过' }}</span>
</el-form-item>
<el-form-item label="施工图片:" class="imgItem">
<img class="img" v-for="(item, index) in infoForm.constructionImgList" :key="index" :src="item" alt="">
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'technicianDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
// remark: ''
},
formRules: {
remark: [{ required: true, message: '请输入备注信息', trigger: 'change' }]
}
}
},
props: {
remarkVisible: {
type: Boolean,
default: false
},
detail: {
type: Object,
default: null
}
},
watch: {
},
created() {
},
components: {},
mounted() {
this.infoForm = deepClone(this.detail)
},
methods: {
handleAddConfirm() {
this.handleClose(true)
},
handleClose(flag) {
this.$emit('dialogClose', flag)
}
}
}
</script>
<style scoped lang="scss">
.accountDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
::v-deep .el-textarea .el-input__count {
right: 10px;
bottom: -7px;
font-size: 12px;
color: #999999;
background-color: transparent;
}
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
.imgItem {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
::v-deep .el-form-item__content {
margin-left: 0 !important;
}
}
.img {
width: 120px;
height: 120px;
}
.img+.img {
margin-left: 10px;
}
.status {
color: #2A58AD;
}
</style>
...@@ -42,6 +42,11 @@ ...@@ -42,6 +42,11 @@
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9040804']" /> :show-btn-ids="['9040804']" />
</span> </span>
<!-- 补充 -->
<span style="margin-right: 10px;" v-if="scope.scope.status == 8 && !scope.scope.oaApproveStatus">
<auth-button :data="scope.scope"
:show-btn-ids="['9040810']" />
</span>
<!-- 审核 --> <!-- 审核 -->
<span style="margin-right: 10px;" <span style="margin-right: 10px;"
v-if="(scope.scope.status == 0 || scope.scope.status == 1 || scope.scope.status == 2) && scope.scope.approveType == 1"> v-if="(scope.scope.status == 0 || scope.scope.status == 1 || scope.scope.status == 2) && scope.scope.approveType == 1">
...@@ -93,25 +98,35 @@ ...@@ -93,25 +98,35 @@
v-if="settlementVisible" v-if="settlementVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="settlementDialogClose" /> @dialogClose="settlementDialogClose" />
<!-- 补充 - 退款 -->
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
:detail="refundDetail"
:order-type="1"
:scene="refundScene"
v-if="signRefundVisible"
@dialogClose="refundDialogClose" />
</div> </div>
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { refundExamine_status, refundExamine_approveTypeOpt, oaApproveStatusOpt } from '@/common/constants.js' import { refundExamine_status, refundExamine_approveTypeOpt, oaApproveStatusOpt, refundOrderSourceOpt } from '@/common/constants.js'
import examineDialog from './components/examineDialog' import examineDialog from './components/examineDialog'
import rejectDialog from './components/rejectDialog' import rejectDialog from './components/rejectDialog'
import detailDialog from './components/detailDialog' import detailDialog from './components/detailDialog'
import settlementDialog from './components/settlementDialog' import settlementDialog from './components/settlementDialog'
import { getPlatformMerchant, refundApplyRecordPage, downloadPdf } from '@api/refundExamine' import newSignRefundDialog from "./components/newSignRefundDialog"
import { getPlatformMerchant, refundApplyRecordPage, downloadPdf, getOrderDefaultInfo } from '@api/refundExamine'
export default { export default {
name: 'RefundExamine', name: 'RefundExamine',
components: { components: {
examineDialog, examineDialog,
rejectDialog, rejectDialog,
detailDialog, detailDialog,
settlementDialog settlementDialog,
newSignRefundDialog
}, },
data() { data() {
return { return {
...@@ -127,7 +142,8 @@ export default { ...@@ -127,7 +142,8 @@ export default {
payee: '', payee: '',
applyTime: '', applyTime: '',
approveType: '', approveType: '',
oaApproveStatus: '' oaApproveStatus: '',
refundOrderSource: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
...@@ -213,6 +229,14 @@ export default { ...@@ -213,6 +229,14 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'approveTypeOpt' optionsName: 'approveTypeOpt'
}, {
label: '退款单来源',
name: 'refundOrderSource',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'refundOrderSourceOpt'
}], }],
getListApi: refundApplyRecordPage, getListApi: refundApplyRecordPage,
tableParams: { tableParams: {
...@@ -230,6 +254,13 @@ export default { ...@@ -230,6 +254,13 @@ export default {
prop: 'oaSpNo', prop: 'oaSpNo',
width: '150px' width: '150px'
}, { }, {
label: '退款单来源',
prop: 'refundOrderSource',
width: '100px',
formatter: (cellValue) => {
return this.baseData.refundOrderSourceOpt.find(item => item.confId === cellValue.refundOrderSource)?.confValue
}
}, {
label: '标题', label: '标题',
prop: 'title', prop: 'title',
width: '200px' width: '200px'
...@@ -299,7 +330,7 @@ export default { ...@@ -299,7 +330,7 @@ export default {
}, { }, {
label: '嘀加审批状态', label: '嘀加审批状态',
prop: 'status', prop: 'status',
width: '110px', width: '120px',
formatter: (cellValue) => { formatter: (cellValue) => {
return this.baseData.statusList.find(item => item.confId === cellValue.status)?.confValue return this.baseData.statusList.find(item => item.confId === cellValue.status)?.confValue
}, },
...@@ -310,7 +341,10 @@ export default { ...@@ -310,7 +341,10 @@ export default {
2: 'blueSpot', 2: 'blueSpot',
3: 'blueSpot', 3: 'blueSpot',
4: 'greenSpot', 4: 'greenSpot',
5: 'redSpot' 5: 'redSpot',
6: 'blueSpot',
7: 'blueSpot',
8: 'blueSpot',
}[cellValue.status] }[cellValue.status]
} }
}, { }, {
...@@ -342,7 +376,8 @@ export default { ...@@ -342,7 +376,8 @@ export default {
statusList: deepClone(refundExamine_status), statusList: deepClone(refundExamine_status),
approveTypeOpt: deepClone(refundExamine_approveTypeOpt), approveTypeOpt: deepClone(refundExamine_approveTypeOpt),
oaApproveStatusOpt: deepClone(oaApproveStatusOpt), oaApproveStatusOpt: deepClone(oaApproveStatusOpt),
platformMerchantIdList: [] platformMerchantIdList: [],
refundOrderSourceOpt: deepClone(refundOrderSourceOpt)
}, },
infos: [], infos: [],
...@@ -352,7 +387,10 @@ export default { ...@@ -352,7 +387,10 @@ export default {
rejectType: '', rejectType: '',
detailVisible: false, detailVisible: false,
recordInfo: {}, recordInfo: {},
settlementVisible: false settlementVisible: false,
signRefundVisible: false,
refundScene: '',
refundDetail: {}
} }
}, },
computed: { computed: {
...@@ -435,7 +473,8 @@ export default { ...@@ -435,7 +473,8 @@ export default {
status: '', status: '',
matchBizOrderCode: '', matchBizOrderCode: '',
approveType: '', approveType: '',
oaApproveStatus: '' oaApproveStatus: '',
refundOrderSource: ''
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
...@@ -579,6 +618,48 @@ export default { ...@@ -579,6 +618,48 @@ export default {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
}, },
// 补充
handleSupple(row) {
if(!row.refundApplyOrderRefList) {
this.$message.error('没有子订单信息')
return true
}
var params = {
orderCode: row.refundApplyOrderRefList[0].bizOrderCode,
applyCode: row.applyCode
}
getOrderDefaultInfo(params).then((res) => {
console.log(res, '000')
this.refundDetail = deepClone(res)
let info = res.refundApplyRecordInfo
let total = 0
info.refundApplyDetailList.forEach((item) => {
total += item.totalPrice
})
let refundSubOrderCode = info.refundApplyDetailList.map(item => item.bizOrderCode).join("/")
this.refundScene = row.refundApplyOrderRefList[0].sceneType + ''
this.refundDetail.applyCode = row.applyCode
this.refundDetail.total = total
this.refundDetail.id = info.id
this.refundDetail.refundSubOrderCode = refundSubOrderCode
this.refundDetail.refundApplyDetailList = deepClone(info.refundApplyDetailList)
this.refundDetail.isAll = res?.refundApplyRecordInfo.refundType == 1
this.refundDetail.isOneSubFirst = false
this.refundDetail.orderCode = row.refundApplyOrderRefList[0].bizOrderCode
console.log(this.refundDetail, this.refundScene, 'refundDetail---')
this.refund()
})
},
refund() {
this.signRefundVisible = !this.signRefundVisible
},
refundDialogClose(flag) {
this.signRefundVisible = !this.signRefundVisible
if (flag) {
this.$refs.recordTable.refreshTable()
}
},
// 财务结算 // 财务结算
handleSettlement(row) { handleSettlement(row) {
this.recordInfo = row this.recordInfo = row
......
...@@ -67,7 +67,10 @@ export default { ...@@ -67,7 +67,10 @@ export default {
], ],
total: 0, total: 0,
refundSubOrderCode: '', refundSubOrderCode: '',
isAll: false refundApplyDetailList: [],
isAll: false,
// 是否只有一个子订单并且未退过款的
isOneSubFirst: false
} }
}, },
props: { props: {
...@@ -96,6 +99,7 @@ export default { ...@@ -96,6 +99,7 @@ export default {
async getList(orderCode) { async getList(orderCode) {
const res = await getGoodsSubOrder({ orderCode }) const res = await getGoodsSubOrder({ orderCode })
this.tableData = res this.tableData = res
this.isOneSubFirst = this.tableData.length == 1 && this.tableData.every(item => item.status == 1)
this.$refs.seletingTable.toggleAllSelection() this.$refs.seletingTable.toggleAllSelection()
}, },
handleChange(selection) { handleChange(selection) {
...@@ -117,14 +121,17 @@ export default { ...@@ -117,14 +121,17 @@ export default {
}) })
this.total = _total this.total = _total
this.refundSubOrderCode = _refundSubOrderCode.join('/') this.refundSubOrderCode = _refundSubOrderCode.join('/')
this.refundApplyDetailList = selection
console.log(this.refundSubOrderCode) console.log(this.refundSubOrderCode)
}, },
handleConfirm() { handleConfirm() {
const {refundSubOrderCode, total, isAll} = this const {refundSubOrderCode, refundApplyDetailList, total, isAll, isOneSubFirst} = this
this.$emit("handleConfirm", { this.$emit("handleConfirm", {
total, total,
refundSubOrderCode, refundSubOrderCode,
isAll isAll,
refundApplyDetailList,
isOneSubFirst
}) })
}, },
handleClose() { handleClose() {
...@@ -145,4 +152,4 @@ export default { ...@@ -145,4 +152,4 @@ export default {
margin-left: 10px; margin-left: 10px;
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -108,6 +108,16 @@ ...@@ -108,6 +108,16 @@
<div class="max-value">可退金额:{{refundInfo.total}}</div> <div class="max-value">可退金额:{{refundInfo.total}}</div>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
<el-form :model="refundInfo" :rules="tableRules" ref="refundTableForm">
<d2-table ref="recordTable" :table-params="orderTableParams" :tableData="refundInfo.refundApplyDetailList" :hasPage="false">
<div slot="tableRefundAmount" slot-scope="scope">
<el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount">
<el-input v-model="refundInfo.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" type="number" @input="handleInput(scope.index, 'refundAmount')">
</el-input>
</el-form-item>
</div>
</d2-table>
</el-form>
</d2-dialog> </d2-dialog>
<refundDetail :dataInfo="dataInfo" :refundVisible="refundDetailVisible" @handleClose="handleRefundDetailClose" @handleConfirm="handleConfirm"></refundDetail> <refundDetail :dataInfo="dataInfo" :refundVisible="refundDetailVisible" @handleClose="handleRefundDetailClose" @handleConfirm="handleConfirm"></refundDetail>
</div> </div>
...@@ -117,6 +127,7 @@ ...@@ -117,6 +127,7 @@
<script> <script>
import refundDetail from './components/refundDetail' import refundDetail from './components/refundDetail'
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { limitPrice } from "@/common/format"
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import detailDialog from "./components/detailDialog" import detailDialog from "./components/detailDialog"
import { MessageBox } from "element-ui" import { MessageBox } from "element-ui"
...@@ -405,7 +416,38 @@ export default { ...@@ -405,7 +416,38 @@ export default {
], ],
refundDetailVisible: false, refundDetailVisible: false,
dataInfo: {}, dataInfo: {},
refundInfo: {} refundInfo: {},
refundOldData: [],
tableRules: {
refundAmount: [
{ required: true, message: '请输入退款金额', trigger: 'blur' }
]
},
orderTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [{
label: '子订单编码',
prop: 'subOrderCode'
},
{
label: "商品别名",
prop: "goodsAlias"
},
{
label: "支付金额",
prop: "totalPrice",
formatter: cellValue => {
return "¥" + cellValue.totalPrice
}
},
{
label: "业务退款金额",
prop: "refundAmount",
addHtml: 'tableRefundAmount'
}]
},
} }
}, },
computed: { computed: {
...@@ -679,11 +721,24 @@ export default { ...@@ -679,11 +721,24 @@ export default {
handleRefundDetailClose() { handleRefundDetailClose() {
this.refundDetailVisible = false this.refundDetailVisible = false
}, },
handleInput(rowIdx, attr) {
const targerItem = this.refundInfo.refundApplyDetailList[rowIdx]
const val = targerItem[attr]
const oldVal = this.refundOldData[rowIdx][attr]
this.refundInfo.refundApplyDetailList[rowIdx][attr] = limitPrice(val, oldVal, 9, 2, '', targerItem.totalPrice)
this.refundOldData[rowIdx][attr] = this.refundInfo.refundApplyDetailList[rowIdx][attr]
},
handleConfirm(val) { handleConfirm(val) {
console.log(val, '=====') console.log(val, '=====')
this.refundInfo.refundSubOrderCode = val.refundSubOrderCode this.refundInfo.refundSubOrderCode = val.refundSubOrderCode
this.refundInfo.total = val.total this.refundInfo.total = val.total
this.refundInfo.isAll = val.isAll this.refundInfo.isAll = val.isAll
this.refundInfo.isOneSubFirst = val.isOneSubFirst
this.refundInfo.refundApplyDetailList = val.refundApplyDetailList
this.refundInfo.refundApplyDetailList.forEach((k, idx) => {
this.$set(this.refundInfo.refundApplyDetailList[idx], 'refundAmount', k.totalPrice)
})
this.refundOldData = deepClone(this.refundInfo.refundApplyDetailList)
this.refundForm.refundType = val.isAll ? 1 : 2 this.refundForm.refundType = val.isAll ? 1 : 2
this.refundFormData[0].isDisabled = true this.refundFormData[0].isDisabled = true
this.handleRefund(this.refundInfo) // 原来的逻辑 this.handleRefund(this.refundInfo) // 原来的逻辑
...@@ -729,6 +784,8 @@ export default { ...@@ -729,6 +784,8 @@ export default {
this.findAttrIdx("refundType") this.findAttrIdx("refundType")
].optionList[0].isDisabled = true ].optionList[0].isDisabled = true
} }
console.log(this.refundInfo, 'this.refundInfo---')
this.refundFormData[this.findAttrIdx("refundType")].isDisabled = !this.refundInfo.isOneSubFirst
this.updateDisable() this.updateDisable()
}) })
}, },
...@@ -755,30 +812,44 @@ export default { ...@@ -755,30 +812,44 @@ export default {
handleRefundConfirm() { handleRefundConfirm() {
if (this.isRefund) { if (this.isRefund) {
this.$refs.refundFormRef.$refs[this.handleFormRef].validate((valid) => { this.$refs.refundFormRef.$refs[this.handleFormRef].validate((valid) => {
if (valid) { this.$refs.refundTableForm.validate((tableValid) => {
this.isRefund = false if (valid && tableValid) {
markAsRefunded({ this.isRefund = false
orderCode: this.refundForm.orderCode, let refundApplyDetailList = []
refundType: this.refundForm.refundType, if (this.refundInfo?.refundApplyDetailList) {
refundPoints: this.refundForm.refundPoints, this.refundInfo.refundApplyDetailList.forEach(item => {
refundAmount: this.refundForm.refundAmount, refundApplyDetailList.push({
employeeUserId: this.refundForm.employeeUserId, orderCode: item.orderCode,
employeeName: this.refundForm.employeeName, subOrderCode: item.subOrderCode,
refundSubOrderCode: this.refundForm.refundSubOrderCode, totalPrice: item.totalPrice,
refundableTotalPrice: this.refundForm.refundableTotalPrice refundAmount: item.refundAmount
}) })
.then((res) => { })
if (res) { }
this.$message.success("退款成功!") markAsRefunded({
this.refundVisible = false orderCode: this.refundForm.orderCode,
this.refundForm.id = "" refundType: this.refundForm.refundType,
this.handleSearch() refundPoints: this.refundForm.refundPoints,
} refundAmount: this.refundForm.refundAmount,
}) employeeUserId: this.refundForm.employeeUserId,
.finally(() => { employeeName: this.refundForm.employeeName,
this.isRefund = true refundSubOrderCode: this.refundForm.refundSubOrderCode,
refundableTotalPrice: this.refundForm.refundableTotalPrice,
refundApplyDetailList: refundApplyDetailList
}) })
} .then((res) => {
if (res) {
this.$message.success("退款成功!")
this.refundVisible = false
this.refundForm.id = ""
this.handleSearch()
}
})
.finally(() => {
this.isRefund = true
})
}
})
}) })
} }
}, },
......
...@@ -3,11 +3,7 @@ ...@@ -3,11 +3,7 @@
<d2-container> <d2-container>
<div> <div>
<div class=" header" slot="header"> <div class=" header" slot="header">
<d2-search ref="showSearch" :search-form="searchForm" :form-data="showFormData"> <d2-search ref="showSearch" :search-form="searchForm" :form-data="showFormData"></d2-search>
<template slot="channelType">
<el-cascader style="width: 50%;" :options="merchantLevelOptions[nameToOption[searchForm.channelType]]" :props="{ checkStrictly: true, value: 'id', label: 'merchantName' }" :show-all-levels="false" v-model="merchantLevelVal" clearable filterable />
</template>
</d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button :id="tableParams.btnId" size="small" type="primary">
查询 查询
...@@ -39,8 +35,10 @@ import { mapActions, mapState } from 'vuex' ...@@ -39,8 +35,10 @@ import { mapActions, mapState } from 'vuex'
import EditBankDialog from './components/EditBankDialog.vue' import EditBankDialog from './components/EditBankDialog.vue'
import { BaseData, merchantStoreServiceList } from '@/common/constants.js' import { BaseData, merchantStoreServiceList } from '@/common/constants.js'
import baseDialog from '@/components/baseDialog' import baseDialog from '@/components/baseDialog'
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default { export default {
name: 'AccountList', name: 'AccountList',
mixins: [reportTrackFunMixin], // 导入混入
data() { data() {
return { return {
bankVisible: false, bankVisible: false,
...@@ -80,16 +78,11 @@ export default { ...@@ -80,16 +78,11 @@ export default {
}, { }, {
label: '渠道', label: '渠道',
name: 'channelType', name: 'channelType',
addHtml: 'channelType',
type: 'select', type: 'select',
width: '50%',
optionList: [], optionList: [],
optionId: 'value', optionId: 'value',
optionLabel: 'name', optionLabel: 'name',
optionsName: 'channelTypeList', optionsName: 'channelTypeList'
changeAttr: (value, targetItem) => {
this.merchantLevelVal = []
}
}, { }, {
label: '商户名称', label: '商户名称',
name: 'merchantName', name: 'merchantName',
...@@ -180,7 +173,7 @@ export default { ...@@ -180,7 +173,7 @@ export default {
2: '广汇', 2: '广汇',
8: '直营' 8: '直营'
}, },
merchantStoreServiceList: merchantStoreServiceList, merchantStoreServiceList: deepClone(merchantStoreServiceList),
}, },
modeDialogConfig: { modeDialogConfig: {
config: { config: {
...@@ -209,10 +202,10 @@ export default { ...@@ -209,10 +202,10 @@ export default {
mounted() { mounted() {
this.getBaseData() this.getBaseData()
// 1-嘀加;2-广汇; 8-直营 this.onPageShow()
this.getMerchantLevel(1) },
this.getMerchantLevel(2) beforeDestroy() {
this.getMerchantLevel(8) this.onPageHide()
}, },
computed: { computed: {
...@@ -222,6 +215,9 @@ export default { ...@@ -222,6 +215,9 @@ export default {
}, },
methods: { methods: {
...mapActions({
get: 'd2admin/base/get'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']), ...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() { async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType) this.baseData.channelTypeList = await this.get(BaseData.channelType)
...@@ -317,9 +313,6 @@ export default { ...@@ -317,9 +313,6 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.searchFormSearch = this.getParams() this.searchFormSearch = this.getParams()
this.searchFormSearch.merchantTypeList = this.searchForm.merchantType ? [this.searchForm.merchantType] : [2, 7, -1]
this.searchFormSearch.merchantId = this.searchForm.merchantId ? this.searchForm.merchantId : this.merchantLevelVal[this.merchantLevelVal.length - 1]
delete this.searchFormSearch.merchantType
resolve() resolve()
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!