Commit 4e47314e by 王琦琳

Merge branch 'wangql_dev_v4.15.0' into 'dev_v4.15.0'

功能代码提交

See merge request !35
2 parents 52214ba8 2a0c7816
...@@ -39,3 +39,6 @@ dev_4.13.0 分支以上线并往 develop 以及 master 上合并 ...@@ -39,3 +39,6 @@ dev_4.13.0 分支以上线并往 develop 以及 master 上合并
12 月大版本下部分 从测试中的分支 dev_4.14.1 拉取 dev_4.14.2 分支去做 清分及对账优化 版本,待 dev_4.14.1 上线后将代码合并进开发中的 dev_4.14.2 12 月大版本下部分 从测试中的分支 dev_4.14.1 拉取 dev_4.14.2 分支去做 清分及对账优化 版本,待 dev_4.14.1 上线后将代码合并进开发中的 dev_4.14.2
dev_4.14.1 上线后已合并到主干上以及 dev_v4.14.2 上 dev_4.14.1 上线后已合并到主干上以及 dev_v4.14.2 上
紧急版本 dev_v4.14.1.2 上线后以合并到 develop 以及 master 主干上,版本代码已合并到提测版本 dev_v4.14.2 上 紧急版本 dev_v4.14.1.2 上线后以合并到 develop 以及 master 主干上,版本代码已合并到提测版本 dev_v4.14.2 上
dev_v4.12.2 已上线并合并到主干上
从主干拉取分支 dev_v4.15.0 用于开发 saas+0113 版本功能开发
...@@ -106,3 +106,21 @@ export function goodsOrderDetail(data) { ...@@ -106,3 +106,21 @@ export function goodsOrderDetail(data) {
data.method = `${path2}goodsOrder.detail` data.method = `${path2}goodsOrder.detail`
return request(data, "post") return request(data, "post")
} }
// 获取订单分账规则
export function getHistoryEffectRecord(data) {
data.method = `${path2}getHistoryEffectRecord`
return request(data, "post")
}
// 待补录订单手动分账
export function manualDivision(data) {
data.method = `${path2}waitinputorder.manualDivision`
return request(data, "post")
}
// 待补录订单分账记录
export function getDivisionRecordById(data) {
data.method = `${path2}getDivisionRecordById`
return request(data, "post")
}
<!-- 选择分账规则弹窗 -->
<template>
<d2-dialog title="选择分账规则"
:is-visible="ruleVisible"
class="chooseRuleDialog"
width="60%"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<!-- <div>
<span>订单所属商户:{{recordInfo.merchantName}}</span><span>主订单编号:{{recordInfo.inputtedOrderCode}}</span><span>订单金额:{{recordInfo.totalFee ? '¥' + recordInfo.totalFee / 100 : ''}}</span><span>支付时间:{{recordInfo.accountDate}}</span>
</div> -->
<el-form class="rule-form"
label-width="110px"
:inline="true">
<el-form-item class="d2-drawer-item"
label="订单所属商户:">
<span>{{ recordInfo.merchantName }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="主订单编号:">
<span>{{ recordInfo.inputtedOrderCode }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="订单金额:">
<span>{{ recordInfo.totalFee ? '¥' + recordInfo.totalFee / 100 : '' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="支付时间:">
<span>{{ recordInfo.accountDate }}</span>
</el-form-item>
</el-form>
<div class="fontD">请选择要应用的分账规则:</div>
<div>
<div class="merchant-checkrecord">
<div class="account-detail"
ref="accountDetail">
<div v-if="formArray && formArray.length">
<div v-for="(formItem, index) in formArray"
:ref="'resize' + index"
:key="index">
<p class="sub-title"
:class="{ 'sub-border': !formItem.show }">
<el-radio v-model="radio"
:label="formItem.id">
<i></i>
</el-radio>
<span class="label">
<span>{{ formItem.formatEffectStartDate }}</span>
<span v-if="formItem.formatEffectStartDate"> - </span>
<span :class="{ labelColor: !formItem.formatEffectEndDate }">{{
formItem.formatEffectStartDate
? formItem.formatEffectEndDate
? formItem.formatEffectEndDate
: "生效中"
: "待生效"
}}</span>
</span>
<span class="updatedInfo">
操作人: {{ formItem.updatedBy }} 操作时间:
{{ formItem.formatUpdatedDate }}
</span>
</p>
</div>
</div>
<div v-else
class="nothingtips">
<img style="height: 109px; width: 109px"
src="../systemConfig/merchant/images/empty.png" />
<p class="title">暂无财务规则</p>
<p class="tips">快去设置看看~</p>
</div>
</div>
</div>
</div>
</d2-dialog>
</template>
<script>
import dayjs from "dayjs"
import { Util, deepClone } from '@/common/util'
// import { getHistoryRecord } from "@api/publicAccount"
// import {
// getLedgerHistoryRecordApi,
// } from "@api/merchant"
import { getHistoryEffectRecord, manualDivision } from '@api/order'
export default {
name: "chooseRuleDialog",
props: {
ruleVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
components: {
},
computed: {},
data() {
return {
formArray: [],
radio: ''
}
},
created() {
},
mounted() {
this.recordInfo.accountDate = this.recordInfo.accountDate ? Util.dateFormate(this.recordInfo.accountDate, 'YYYY-MM-DD HH:mm:ss') : ''
this.getLedgerHistoryRecord()
},
methods: {
// 分账
async getLedgerHistoryRecord() {
const merchantId = this.recordInfo.merchantId
const sceneType = this.recordInfo.sceneType
const params = {
merchantId,
sceneType
}
const res = await getHistoryEffectRecord(params)
if (res.length != 0) {
const format = "YYYY/MM/DD HH:mm"
this.formArray = res.map(item => {
item.typeObject = item.rule
item.formatEffectEndDate = item.effectEndDate
? dayjs(item.effectEndDate).format(format)
: ""
item.formatEffectStartDate = item.effectStartDate
? dayjs(item.effectStartDate).format(format)
: ""
item.formatUpdatedDate = dayjs(item.updatedDate).format(format)
item.show = false
return item
})
} else {
this.formArray = []
}
},
handleAddConfirm() {
if (!this.radio) {
this.notice.warningTips('请选择分账规则')
return
}
var params = {}
params.outTradeNo = this.recordInfo.outTradeNo
params.inputtedOrderCode = this.recordInfo.inputtedOrderCode
params.effectRuleId = this.radio
// return console.log('params', params);
this.$confirm("确定分账后,当前订单会以选择的分账规则进行分账,且不可撤回;是否确定分账?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
manualDivision(params).then(res => {
this.notice.okTips('发起分账成功')
this.handleClose(true)
})
})
.catch((err) => {
console.log(err)
})
},
handleClose(flag) {
this.$emit('dialogClose', flag)
}
},
}
</script>
<style lang="scss" scoped>
$color: #2a58ad;
.merchant-checkrecord {
padding-left: 20px;
padding-right: 16px;
padding-bottom: 20px;
.account-detail {
// height: 400px;
// height: calc(100vh - 200px);
padding-right: 15px;
overflow-y: scroll;
overflow-x: hidden;
}
.sub-title {
font-weight: 700;
color: #333333;
padding: 17px 0;
margin: 0;
display: flex;
// justify-content: space-between;
font-size: 14px;
// &::before {
// top: 50%;
// transform: translateY(-50%);
// }
.label {
padding-left: 8px;
width: 37%;
}
.labelColor {
color: #0947c6;
}
.updatedInfo {
width: 40%;
text-align: left;
}
.collapse {
padding-right: 20px;
color: #0947c6;
cursor: pointer;
.arrow {
transition: all 1s;
}
.move {
transform: rotate(-180deg);
}
}
}
.sub-border {
animation: border-delay 1s forwards;
}
@keyframes border-delay {
0% {
/* opacity: 0; */
/* right: -100%; */
}
100% {
border-bottom: 1px solid #d8d8d8;
}
}
.nothingtips {
// align-items: center;
text-align: center;
font-size: 16px;
padding-top: 40px;
.title {
font-size: 20px;
color: #666;
margin: 16px 0;
}
.tips {
font-size: 12px;
color: #999;
}
}
.title {
}
.type {
margin-top: 6px;
display: flex;
.btn {
width: 96px;
height: 40px;
background: #f8f8f8;
border-radius: 4px 4px 0 0;
line-height: 40px;
text-align: center;
cursor: pointer;
}
.act {
font-weight: 500;
color: $color;
background: #fff;
}
}
}
.rule-form {
// border-bottom: 1px solid #e7eaec;
padding: 0 20px 20px;
margin-bottom: 20px;
background: #ffffff;
margin: 0 0 0 10px;
}
.rule-form .d2-drawer-item {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
font-weight: 400;
width: 25%;
margin: 0 0 0 0;
}
.fontD {
margin: 10px 20px 15px;
}
</style>
...@@ -85,6 +85,16 @@ ...@@ -85,6 +85,16 @@
@click="cancelRelat(scope.scope)"> @click="cancelRelat(scope.scope)">
取消关联 取消关联
</el-button> </el-button>
<el-button type="text"
v-if="scope.scope.inputStatus == '5'"
@click="chooseRule(scope.scope)">
发起分账
</el-button>
<el-button type="text"
v-if="scope.scope.manualFlag == '1'"
@click="ruleHistory(scope.scope)">
分账记录
</el-button>
</template> </template>
</d2-table> </d2-table>
</div> </div>
...@@ -99,6 +109,16 @@ ...@@ -99,6 +109,16 @@
:order-id="orderId" :order-id="orderId"
v-if="relatActivityVisible" v-if="relatActivityVisible"
@dialogClose="relatDialogClose" /> @dialogClose="relatDialogClose" />
<!-- 选择分账规则 -->
<choose-rule-dialog :rule-visible="ruleVisible"
:recordInfo="recordInfo"
v-if="ruleVisible"
@dialogClose="ruleDialogClose" />
<!-- 选择分账规则 -->
<rule-info-dialog :rule-info-visible="ruleInfoVisible"
:recordInfo="recordInfo"
v-if="ruleInfoVisible"
@dialogClose="ruleInfoDialogClose" />
</div> </div>
</template> </template>
...@@ -110,13 +130,17 @@ import { payTypeList } from '@/common/constants.js' ...@@ -110,13 +130,17 @@ import { payTypeList } from '@/common/constants.js'
import { waitinputorderCount, waitinputorderPage, getList, markAsNoUse, batchUpdateToNotInput, batchUpdateConfirmInput } from '@api/order' import { waitinputorderCount, waitinputorderPage, getList, markAsNoUse, batchUpdateToNotInput, batchUpdateConfirmInput } from '@api/order'
import updateYqMerchantDialog from './updateYqMerchantDialog' import updateYqMerchantDialog from './updateYqMerchantDialog'
import relatActivityOrderDialog from './relatActivityOrderDialog' import relatActivityOrderDialog from './relatActivityOrderDialog'
import chooseRuleDialog from './chooseRuleDialog'
import ruleInfoDialog from './ruleInfoDialog'
const clonePayTypeList = deepClone(payTypeList) const clonePayTypeList = deepClone(payTypeList)
clonePayTypeList.splice(1, 1) clonePayTypeList.splice(1, 1)
export default { export default {
name: 'OrderSupplement', name: 'OrderSupplement',
components: { components: {
updateYqMerchantDialog, updateYqMerchantDialog,
relatActivityOrderDialog relatActivityOrderDialog,
chooseRuleDialog,
ruleInfoDialog
}, },
data() { data() {
return { return {
...@@ -300,6 +324,10 @@ export default { ...@@ -300,6 +324,10 @@ export default {
{ {
confId: '4', confId: '4',
confLabel: '待确认补录' confLabel: '待确认补录'
},
{
confId: '5',
confLabel: '未分账'
} }
], ],
payTypeList: clonePayTypeList payTypeList: clonePayTypeList
...@@ -308,7 +336,10 @@ export default { ...@@ -308,7 +336,10 @@ export default {
merchantDialogVisible: false, merchantDialogVisible: false,
ids: [], ids: [],
relatActivityVisible: false, relatActivityVisible: false,
orderId: null orderId: null,
ruleVisible: false,
recordInfo: null,
ruleInfoVisible: false,
} }
}, },
computed: { computed: {
...@@ -599,7 +630,33 @@ export default { ...@@ -599,7 +630,33 @@ export default {
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
},
// 选择对账规则
chooseRule(row) {
this.recordInfo = row
this.ruleVisible = true
},
ruleDialogClose(flag) {
this.ruleVisible = !this.ruleVisible
if (flag) {
this.$refs.recordTable.refreshTable()
}
},
// 分账记录
ruleHistory(row) {
this.recordInfo = row
this.ruleInfoVisible = true
},
ruleInfoDialogClose(flag) {
this.ruleInfoVisible = !this.ruleInfoVisible
if (flag) {
this.$refs.recordTable.refreshTable()
} }
},
} }
} }
......
<!-- 选择分账规则弹窗 -->
<template>
<d2-dialog title="查看分账操作记录"
:is-visible="ruleInfoVisible"
class="ruleInfoDialog"
width="60%"
@closeDialog="handleClose">
<el-form class="rule-form"
label-width="110px"
:inline="true">
<el-form-item class="d2-drawer-item"
label="订单所属商户:">
<span>{{ recordInfo.merchantName }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="主订单编号:">
<span>{{ recordInfo.inputtedOrderCode }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="订单金额:">
<span>{{ recordInfo.totalFee ? '¥' + recordInfo.totalFee / 100 : '' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="支付时间:">
<span>{{ recordInfo.accountDate }}</span>
</el-form-item>
</el-form>
<div class="fontD">已应用分账规则:</div>
<div>
<div class="merchant-checkrecord">
<div class="account-detail"
ref="accountDetail">
<div v-if="ruleInfo">
<p class="sub-title"
:class="{ 'sub-border': !ruleInfo.show }">
<span class="label">
<span>{{ ruleInfo.formatEffectStartDate }}</span>
<span v-if="ruleInfo.formatEffectStartDate"> - </span>
<span :class="{ labelColor: !ruleInfo.formatEffectEndDate }">{{
ruleInfo.formatEffectStartDate
? ruleInfo.formatEffectEndDate
? ruleInfo.formatEffectEndDate
: "生效中"
: "待生效"
}}</span>
</span>
<span class="updatedInfo">
操作人: {{ ruleInfo.updatedBy }} 操作时间:
{{ ruleInfo.formatUpdatedDate }}
</span>
</p>
</div>
<div v-else
class="nothingtips">
<img style="height: 109px; width: 109px"
src="../systemConfig/merchant/images/empty.png" />
<p class="title">暂无财务规则</p>
<p class="tips">快去设置看看~</p>
</div>
</div>
</div>
</div>
<el-form class="rule-form"
style="marginTop:35px"
label-width="110px"
:inline="true">
<el-form-item class="d2-drawer-item"
label="分账操作人:">
<span>{{ recordInfo.updatedBy }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="分账操作时间:">
<span>{{ recordInfo.updatedDate }}</span>
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import dayjs from "dayjs"
import { Util, deepClone } from '@/common/util'
import { getDivisionRecordById } from '@api/order'
export default {
name: "ruleInfoDialog",
props: {
ruleInfoVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
components: {
},
computed: {},
data() {
return {
ruleInfo: null
}
},
created() {
},
mounted() {
this.recordInfo.accountDate = this.recordInfo.accountDate ? Util.dateFormate(this.recordInfo.accountDate, 'YYYY-MM-DD HH:mm:ss') : ''
this.recordInfo.updatedDate = this.recordInfo.updatedDate ? Util.dateFormate(this.recordInfo.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
this.getRuleInfo()
},
methods: {
// 获取分账记录
getRuleInfo() {
getDivisionRecordById({ id: this.recordInfo.effectRuleId }).then(res => {
this.ruleInfo = res
const format = "YYYY/MM/DD HH:mm"
this.ruleInfo.formatEffectEndDate = this.ruleInfo.effectEndDate
? dayjs(this.ruleInfo.effectEndDate).format(format)
: ""
this.ruleInfo.formatEffectStartDate = this.ruleInfo.effectStartDate
? dayjs(this.ruleInfo.effectStartDate).format(format)
: ""
this.ruleInfo.formatUpdatedDate = dayjs(this.ruleInfo.updatedDate).format(format)
this.ruleInfo.show = false
})
},
// handleAddConfirm() {
// if (!this.radio) {
// this.notice.warningTips('请选择分账规则')
// return
// }
// var params = {}
// params.outTradeNo = this.recordInfo.outTradeNo
// params.inputtedOrderCode = this.recordInfo.inputtedOrderCode
// params.effectRuleId = this.radio
// // return console.log('params', params);
// this.$confirm("确定分账后,当前订单会以选择的分账规则进行分账,且不可撤回;是否确定分账?", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning"
// })
// .then(() => {
// manualDivision(params).then(res => {
// this.notice.okTips('发起分账成功')
// this.handleClose(true)
// })
// })
// .catch((err) => {
// console.log(err)
// })
// },
handleClose() {
this.$emit('dialogClose')
}
},
}
</script>
<style lang="scss" scoped>
$color: #2a58ad;
.merchant-checkrecord {
padding-left: 20px;
padding-right: 16px;
padding-bottom: 20px;
.account-detail {
// height: 400px;
// height: calc(100vh - 200px);
padding-right: 15px;
overflow-y: scroll;
overflow-x: hidden;
}
.sub-title {
font-weight: 700;
color: #333333;
padding: 17px 0;
margin: 0;
display: flex;
// justify-content: space-between;
font-size: 14px;
// &::before {
// top: 50%;
// transform: translateY(-50%);
// }
.label {
padding-left: 8px;
width: 37%;
}
.labelColor {
color: #0947c6;
}
.updatedInfo {
width: 40%;
text-align: left;
}
.collapse {
padding-right: 20px;
color: #0947c6;
cursor: pointer;
.arrow {
transition: all 1s;
}
.move {
transform: rotate(-180deg);
}
}
}
.sub-border {
animation: border-delay 1s forwards;
}
@keyframes border-delay {
0% {
/* opacity: 0; */
/* right: -100%; */
}
100% {
border-bottom: 1px solid #d8d8d8;
}
}
.nothingtips {
// align-items: center;
text-align: center;
font-size: 16px;
padding-top: 40px;
.title {
font-size: 20px;
color: #666;
margin: 16px 0;
}
.tips {
font-size: 12px;
color: #999;
}
}
.title {
}
.type {
margin-top: 6px;
display: flex;
.btn {
width: 96px;
height: 40px;
background: #f8f8f8;
border-radius: 4px 4px 0 0;
line-height: 40px;
text-align: center;
cursor: pointer;
}
.act {
font-weight: 500;
color: $color;
background: #fff;
}
}
}
.rule-form {
padding: 0 20px 20px;
margin-bottom: 20px;
background: #ffffff;
margin: 0 0 0 10px;
}
.rule-form .d2-drawer-item {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
font-weight: 400;
width: 25%;
margin: 0 0 0 0;
}
.fontD {
margin: 10px 20px 15px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!