Commit e40bb9b3 by 前端

Merge branch 'dev_v4.15.0' into 'develop'

Dev v4.15.0

See merge request !42
2 parents 570c4d52 cf23eb71
......@@ -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
dev_4.14.1 上线后已合并到主干上以及 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 版本功能开发
......@@ -116,3 +116,9 @@ export function getThiredMaterialList(data) {
data.method = `${path}goods.type.querySceneCategoryGoods`
return request(data, 'post')
}
// 保存商品
export function saveTempGoods(data) {
data.method = `${path}basegoods.saveTemp`
return request(data, 'post')
}
\ No newline at end of file
......@@ -106,3 +106,21 @@ export function goodsOrderDetail(data) {
data.method = `${path2}goodsOrder.detail`
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")
}
......@@ -324,7 +324,7 @@ export default {
shopPriceArr.push(v.upgradePrice)
v.listShowShopPrice = v.upgradePrice
v.listShowStock = v.stock
v.listShowSpecificationData = v.specificationData.replace(';~;', ' ')
v.listShowSpecificationData = v.specificationData.replace(/;~;/g, ' ')
v.goodsInfo.goodsName = val.baseGoodsName || v.goodsInfo.goodsName // 新数据显示商品名称,历史商品数据显示素材名称
stockTotal += v.stock
})
......
......@@ -187,7 +187,7 @@ export const routerName = {
{
authId: "9060803",
parentId: "90608",
label: "加微二维码",
label: "订单质保二维码配置",
handle: "handleQrcode"
}
],
......
......@@ -117,8 +117,10 @@
<div v-else
slot="auth-button-other"
slot-scope="scope">
<auth-button :data="scope.scope"
<span v-show="showAloneUpOrDownBT(scope.scope)">
<auth-button :data="scope.scope"
:show-btn-ids="['9030208']" />
</span>
</div>
</d2-table>
</div>
......@@ -345,14 +347,16 @@ export default {
return {
0: 'ashSpot',
1: 'greenSpot',
2: 'yellowSpot'
2: 'yellowSpot',
3: 'ashSpot'
}[cellValue.status]
},
formatter: (cellValue) => {
return {
0: '待上架',
1: '在售',
2: '部分在售'
2: '部分在售',
3: '草稿'
}[cellValue.status]
}
}, {
......@@ -382,6 +386,9 @@ export default {
}, {
confId: 2,
confValue: '部分在售'
}, {
confId: 3,
confValue: '草稿'
}],
reviewStatusList: [{
confId: 0,
......@@ -441,7 +448,6 @@ export default {
currentPage: 1,
pageSize: 9999
}).then(res => {
console.log(res)
this.baseData.merchantServiceList = res.list
this.getOptionsList()
})
......@@ -615,6 +621,14 @@ export default {
// console.log(row);
return flag
},
// 子商品单独上下架操作按钮显示
showAloneUpOrDownBT(row) {
var flag = true
if (row.status == '3') { // 父商品状态为草稿 不显示按钮
flag = false
}
return flag
},
// 子商品单独上下架
handleUpOrDownForChild(row) {
console.log(row)
......@@ -668,7 +682,7 @@ export default {
// html = '审核中的商品不可执行此操作!'
// }
row.status
row.status == 1 || row.status == 2
? this.$confirm(html, '提示', {
confirmButtonText: '确定',
showCancelButton: false,
......
......@@ -53,7 +53,7 @@
v-for="(item,index) in commodityInfo.upgradeGoodsList"
:key="index">
<p class="car-sub-head">
商品{{ index + 1 }}-{{ item.specificationData ? (item.goodsInfo.goodsName + ' ' + item.specificationData.replace(';~;', ' ')) : item.goodsInfo.goodsName }}
商品{{ index + 1 }}-{{ item.specificationData ? (item.goodsInfo.goodsName + ' ' + item.specificationData.replace(/;~;/g, ' ')) : item.goodsInfo.goodsName }}
</p>
<!-- <el-form-item class="d2-drawer-item"
label="商品名称:">
......
......@@ -203,19 +203,6 @@ export default {
created() {
this.addOrEdit = this.$route.params.addOrEdit
if (this.addOrEdit === 'edit') {
this.editForm[0].formBlock[0] = {
name: 'goodsCode',
label: '选择素材',
isRequired: true,
type: 'select',
isClear: false,
optionList: [],
optionId: 'goodsCode',
optionLabel: 'goodsName',
width: '400px'
}
}
},
mounted() {
......@@ -235,7 +222,7 @@ export default {
methods: {
...mapActions({ close: 'd2admin/page/close' }),
getGoodsList() {
getGoodsList(showSelect, goodsInfoId) {
getThiredMaterialList({}).then(res => {
res && res.forEach(item => {
item.value = item.sceneType
......@@ -258,17 +245,18 @@ export default {
item.children = twoChildren
})
this.editForm[0].formBlock[0].optionList = res
if (showSelect) {
this.decorate(goodsInfoId, res)
this.$nextTick(() => {
this.show = true
})
}
})
},
getGoodsInfo(id, flag) {
getGoodsInfoById({ id: id }).then(res => {
// this.userInfo.beSuper && this.getGoodsList()
this.editForm[0].formBlock[0].optionList = [{
goodsCode: res.goodsInfo.goodsCode,
goodsName: res.goodsInfo.goodsName
}]
var tempIndex = this.editForm.findIndex(i => i.title === '选素材')
this.editForm[tempIndex].formBlock[0].isDisabled = true
this.editForm[tempIndex].formBlock[0].isDisabled = res.status == 1 || res.status == 2 ? true : false
var linkMerchantIndex = this.editForm.findIndex(i => i.title === '分配到门店')
this.editForm[linkMerchantIndex].formBlock[0].name = res.distributionType == '0' ? 'linkMerchants' : 'speciLinkMerchants'
this.radioType = this.radioType ? this.radioType : (res.distributionType + '')
......@@ -307,16 +295,47 @@ export default {
goodsSpecificationNameList: res.goodsSpecificationNameList,
linkMerchants: res.upgradeGoodsMerchantRefList ? res.upgradeGoodsMerchantRefList : [],
speciLinkMerchants: res.upgradeGoodsMerchantRefList ? res.upgradeGoodsMerchantRefList : [],
goodsId: res.goodsInfo.goodsCode
status: res.status
}
if (flag) { // 首次进入编辑页面
this.getGoodsList(true, res.goodsInfo.id)
} else { // 按规格分配后 获取商品详情
this.decorate(res.goodsInfo.id, this.editForm[0].formBlock[0].optionList)
}
this.editForm[0].formBlock[0].type = 'select'
this.markOldVal.shopPrice = res.shopPrice
this.markOldVal.retailPrice = res.retailPrice
this.$nextTick(() => {
this.show = true
})
})
},
decorate(goodsInfoId, treeData) {
let arr = this.changeDetSelect(
goodsInfoId,
treeData
)
this.editData.goodsId = arr
},
changeDetSelect(key, treeData) {
let arr = [] // 在递归时操作的数组
let returnArr = [] // 存放结果的数组
let depth = 0 // 定义全局层级
// 定义递归函数
function childrenEach(treeData, depthN) {
for (var j = 0; j < treeData.length; j++) {
depth = depthN // 将执行的层级赋值 到 全局层级
arr[depthN] = treeData[j].value
if (treeData[j].value == key && depthN == 2) { // depthN == 2只匹配素材id值
returnArr = arr.slice(0, depthN + 1) // 将目前匹配的数组,截断并保存到结果数组,
break
} else {
if (treeData[j].children) {
depth++
childrenEach(treeData[j].children, depth)
}
}
}
return returnArr
}
return childrenEach(treeData, depth)
},
handleAddClose(isRefresh = false) {
if (isRefresh) {
this.close({ tagName: '/commodity' })
......@@ -371,12 +390,11 @@ export default {
specificationData: specificationData,
upgradePrice: item.upgradePrice,
shopMinPrice: item.shopMinPrice,
stock: item.stock,
stock: (item.stock ?? '') === '' ? 999999 : item.stock,
warrantyPeriod: item.warrantyPeriod
})
})
var params = {
// yqMerchantId: this.userInfo.beSuper ? data.yqMerchantId : this.userInfo.detail.merchantId,
merchantId: this.userInfo.detail.merchantId,
id: data.id,
goodsCode: data.goodsCode,
......@@ -384,7 +402,6 @@ export default {
goodsSpecificationNameList: goodsSpecificationNameList,
goodsSpecificationList: goodsSpecificationList
}
console.log(params)
addOrEditBaseGoods(params).then(res => {
// flag true提交
if (flag) {
......
......@@ -89,7 +89,7 @@ export default {
name: 'goodsName',
label: '产品名称',
type: 'input',
maxlength: 10,
maxlength: 20,
width: '432px'
}, {
name: 'sceneType',
......
<!-- 选择分账规则弹窗 -->
<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>
......@@ -31,8 +31,10 @@
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content">
<d2-table-header :left-span="20">
<span slot="left">共<span class="count-txt">{{ countObj.totalCount }}</span>条交易记录,总金额<span
<d2-table-header :left-span="13">
<span slot="left"
class="leftSpan">共<span
class="count-txt">{{ countObj.totalCount }}</span>条交易记录,总金额<span
class="count-txt">{{ countObj.totalAmount }}</span>元,已补录<span
class="count-txt">{{ countObj.inputtedCount }}</span>条,未补录<span
class="count-txt">{{ countObj.waitInputCount }}</span>条,未关联<span
......@@ -85,6 +87,16 @@
@click="cancelRelat(scope.scope)">
取消关联
</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>
</d2-table>
</div>
......@@ -99,6 +111,16 @@
:order-id="orderId"
v-if="relatActivityVisible"
@dialogClose="relatDialogClose" />
<!-- 选择分账规则 -->
<choose-rule-dialog :rule-visible="ruleVisible"
:record-info="recordInfo"
v-if="ruleVisible"
@dialogClose="ruleDialogClose" />
<!-- 选择分账规则 -->
<rule-info-dialog :rule-info-visible="ruleInfoVisible"
:record-info="recordInfo"
v-if="ruleInfoVisible"
@dialogClose="ruleInfoDialogClose" />
</div>
</template>
......@@ -110,13 +132,17 @@ import { payTypeList } from '@/common/constants.js'
import { waitinputorderCount, waitinputorderPage, getList, markAsNoUse, batchUpdateToNotInput, batchUpdateConfirmInput } from '@api/order'
import updateYqMerchantDialog from './updateYqMerchantDialog'
import relatActivityOrderDialog from './relatActivityOrderDialog'
import chooseRuleDialog from './chooseRuleDialog'
import ruleInfoDialog from './ruleInfoDialog'
const clonePayTypeList = deepClone(payTypeList)
clonePayTypeList.splice(1, 1)
export default {
name: 'OrderSupplement',
components: {
updateYqMerchantDialog,
relatActivityOrderDialog
relatActivityOrderDialog,
chooseRuleDialog,
ruleInfoDialog
},
data() {
return {
......@@ -300,6 +326,10 @@ export default {
{
confId: '4',
confLabel: '待确认补录'
},
{
confId: '5',
confLabel: '未分账'
}
],
payTypeList: clonePayTypeList
......@@ -308,7 +338,10 @@ export default {
merchantDialogVisible: false,
ids: [],
relatActivityVisible: false,
orderId: null
orderId: null,
ruleVisible: false,
recordInfo: null,
ruleInfoVisible: false
}
},
computed: {
......@@ -599,6 +632,32 @@ export default {
}).catch(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()
}
}
}
}
......@@ -610,4 +669,9 @@ export default {
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
<!-- 选择分账规则弹窗 -->
<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>
......@@ -55,6 +55,26 @@
:prop="'trafficSide.'+index+'.expenseCategoryCalculateType'"
:rules="[{ required: true, message: '请选择分润模式', trigger: 'change' }]"
required>
<span slot="label">
{{ item.expenseCategoryName }}
<!-- content="Top Left 提示文字" -->
<el-tooltip class="item"
effect="dark"
placement="right">
<template slot="content">
<p>分润模式说明:</p>
<p>若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;</p>
<p>若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。</p>
<br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
:
</span>
<el-select v-model="classificationObj.trafficSide[index].expenseCategoryCalculateType"
@change="forceUpdate"
placeholder="请选择分润模式">
......@@ -103,6 +123,28 @@
:prop="'serviceProvider.'+index+'.expenseCategoryCalculateType'"
:rules="[{ required: true, message: '请选择分润模式', trigger: 'change' }]"
required>
<span slot="label">
{{ item.expenseCategoryName }}
<!-- content="Top Left 提示文字" -->
<el-tooltip class="item"
effect="dark"
placement="right">
<template slot="content">
<p>分润模式说明:</p>
<p>若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;</p>
<p>若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。</p>
<br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额</p>
<p>按(收入-流量方总分润)比例:以(收入-流量方总分润)*(定义的比例)进行费用计算;</p>
<p>按(收入-流量方总分润-其他费用不包含产品成本)比例:以(收入-流量方总分润-其他费用不包含产品成本)*(定义的比例)进行费用计算</p>
<p>按(收入-流量方总分润-其他费用包含产品成本)比例:以(收入-流量方总分润-其他费用包含产品成本)*(定义的比例)进行费用计算</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
:
</span>
<el-select v-model="classificationObj.serviceProvider[index].expenseCategoryCalculateType"
@change="forceUpdate"
placeholder="请选择分润模式">
......@@ -145,6 +187,20 @@
</p>
<el-form-item required
:label="'产品成本'">
<span slot="label">
产品成本
<!-- content="Top Left 提示文字" -->
<el-tooltip class="item"
effect="dark"
placement="right">
<template slot="content">
<p>开启产品成本,计算分账时会自动预留出产品成本费用给对应的承担方;</p>
<p>不开启产品成本,计算分账时不自动预留出产品成本费用;</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
:
</span>
<el-radio-group v-model="classificationObj.goodsCostFlag">
<el-radio :label="'N'">
不扣除产品成本
......@@ -161,6 +217,25 @@
:prop="'platformPublic.'+index+'.expenseCategoryCalculateType'"
:rules="[{ required: true, message: '请选择分润模式', trigger: 'change' }]"
required>
<span slot="label">
{{ item.expenseCategoryName }}
<!-- content="Top Left 提示文字" -->
<el-tooltip class="item"
effect="dark"
placement="right">
<template slot="content">
<p>分润模式说明:</p>
<p>若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;</p>
<p>若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。</p>
<br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
:
</span>
<el-select v-model="classificationObj.platformPublic[index].expenseCategoryCalculateType"
placeholder="请选择分润模式">
<el-option v-for="el in defaultSelectOptions"
......
......@@ -28,7 +28,7 @@
<!-- prop="goodsCost" @input="handleInput($event,'goodsCost')"-->
<el-form-item label="手续费:"
required>
<el-input :value="serviceChargeValue"
<el-input :value="categoryTableData.serviceCharge"
disabled>
<!-- <i slot="suffix"
class="suffix">%</i> -->
......@@ -137,10 +137,10 @@ export default {
set(val) {
this.$emit('update:visible', false)
}
},
serviceChargeValue() {
return this.form.totalPrice ? (this.form.totalPrice * 0.006).toFixed(2) : 0
}
// serviceChargeValue() {
// return this.form.totalPrice ? (this.form.totalPrice * 0.006).toFixed(2) : 0
// }
},
// data() {
// return {
......
......@@ -310,6 +310,8 @@ export default {
}
},
mounted() {
// 先默认初始化平台方和流量方
this.initFinancialObj()
this.getFinancialObj()
this.init4sServiceList()
this.initFeeCategoryByType()
......@@ -323,6 +325,17 @@ export default {
...mapActions('FinancialRules', ['reset']),
...mapMutations('FinancialRules', ['toggle', 'set4sService']),
initFinancialObj() {
const { channelType, merchantName, merchantId } = this.routerInfo
this.financialObj = Object.assign(this.financialObj, {
realityPlatformMerchantId: -1, // 实际分账平台方商户id(嘀加智慧云为-1)
realityPlatformMerchantName: '嘀加智慧云', // 实际分账平台方商户名称
realityPlatformUserType: '2', // 实际分账平台方商户用户类型(1工厂2省代3市代4门店)
realityShopMerchantId: merchantId, // 实际分账4S店商户号
realityShopMerchantName: merchantName, // 实际分账4S店商户名称
realityShopUserType: channelType // 实际分账4S店商户用户类型(1工厂2省代3市代4门店)
})
},
initSettleTimeObj() {
const { settleTimeType, settleTime } = this.financialObj
this.settleTimeObj[settleTimeType == 1 ? 'first' : 'second'] = settleTime
......
......@@ -102,7 +102,7 @@ export default {
this.$refs.categoryForm.validate(valid => {
if (valid) {
var params = deepClone(this.infoForm)
params.sceneName = this.baseData.sceneTypeList.find(item => item.confId === params.sceneType).confLabel
params.sceneName = this.baseData.sceneTypeList.find(item => item.confId === params.sceneType).confValue
if (this.categoryInfo && this.categoryInfo.id) {
params.id = this.categoryInfo.id
editGoodsCategory(params).then(res => {
......
<template>
<d2-dialog title="加微二维码"
<d2-dialog title="订单质保二维码设置"
:is-visible="qRcodeVisible"
class="qRcodeDailog"
width="585px"
......@@ -9,41 +9,60 @@
<div class="dialogContainer">
<p class="merchantName">{{ merchantInfo.yqMerchantName }}</p>
<p class="merchantId">{{ merchantInfo.yqMerchantId }}</p>
<el-upload action=""
class="elupload"
list-type="picture-card"
accept=".jpg,.png"
:auto-upload="false"
:show-file-list="false"
:disabled="!!imgUrl"
:on-change="e => handleChange(e,)"
:on-preview="e => handlePreview(e, )"
:on-remove="e => handleRemove(e, )">
<span class="img-btn">
<img v-if="imgUrl"
:src="imgUrl"
class="rectImg">
<span class="img-btns"
v-if="imgUrl">
<span class="btn-item">
<i @click.stop="handleRemove()"
class="el-icon-delete" />
<!-- <i @click.stop="handleImgLook"
<el-form :model="formData"
:rules="rules"
ref="elForm">
<el-form-item prop="qrcodeType">
<el-radio-group v-model="formData.qrcodeType">
<el-radio class="radioItem"
:label="0">关闭二维码</el-radio>
<el-radio class="radioItem"
:label="1">选择质保卡二维码链接</el-radio>
<el-radio class="radioItem"
:label="2">加微二维码</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="imgUrl"
v-if="formData.qrcodeType == 2">
<el-upload action=""
class="elupload"
list-type="picture-card"
accept=".jpg,.png"
:auto-upload="false"
:show-file-list="false"
:disabled="!!imgUrl"
:on-change="e => handleChange(e,)"
:on-preview="e => handlePreview(e, )"
:on-remove="e => handleRemove(e, )">
<span class="img-btn">
<img v-if="imgUrl"
:src="imgUrl"
class="rectImg">
<span class="img-btns"
v-if="imgUrl">
<span class="btn-item">
<i @click.stop="handleRemove()"
class="el-icon-delete" />
<!-- <i @click.stop="handleImgLook"
class="el-icon-zoom-in"></i> -->
</span>
</span>
</span>
</span>
</span>
<i v-if="!imgUrl "
class="el-icon-plus avatar-uploader-icon "
style="color: #8c939d;">
<span class="icon-text">上传图片</span>
</i>
<!-- <img v-if="!imgUrl "
<i v-if="!imgUrl "
class="el-icon-plus avatar-uploader-icon "
style="color: #8c939d;">
<span class="icon-text">上传加微二维码图片</span>
</i>
<!-- <img v-if="!imgUrl "
:src='examplePicUrl'
class="rectImg"> -->
<!-- <div slot="tip"
<!-- <div slot="tip"
class="el-upload__tip">只能上传jpg/png文件,且不超过1M</div> -->
</el-upload>
</el-upload>
</el-form-item>
</el-form>
<!-- <span v-if="txtDescript">{{txtDescript}}</span> -->
<!-- <p v-show="!imgUrl"
slot="errorTips"
......@@ -80,7 +99,24 @@ export default {
data() {
return {
imgUrl: '',
defaultImgUrl: ''
defaultImgUrl: '',
qrcodeType: '',
formData: {
qrcodeType: '',
imgUrl: ''
},
rules: {
qrcodeType: [{ required: true, message: '请选择配置方式', trigger: 'change' }],
imgUrl: [
{
required: true,
trigger: 'change',
validator: (rule, value, callback) => {
console.log(value, 'value')
this.formData.qrcodeType === 2 ? (value ? callback() : callback(new Error('请上传加微二维码'))) : callback()
}
}]
}
// oldImgUrl: ''
// dialogConfig: {
// setting: {
......@@ -98,6 +134,14 @@ export default {
// }
}
},
watch: {
imgUrl(val) {
this.formData.imgUrl = val
// if (val) {
// // this.yqMerchantConfigDetail()
// }
}
},
mounted() {
this.yqMerchantConfigDetail()
},
......@@ -106,9 +150,10 @@ export default {
// let parmas = this.merchantInfo.merchantId
yqMerchantConfigDetail({ yqMerchantId: this.merchantInfo.yqMerchantId }).then((result) => {
console.log(result)
const { workWechatQrcode } = result
const { workWechatQrcode, qrcodeType } = result
this.imgUrl = workWechatQrcode
this.defaultImgUrl = workWechatQrcode
this.formData.qrcodeType = qrcodeType
}).catch((err) => {
console.log(err)
})
......@@ -117,23 +162,20 @@ export default {
this.$emit('update:qRcodeVisible', false)
},
async handleAddConfirm() {
// 跟原来不一样认为是修改
if (this.defaultImgUrl != this.imgUrl) {
const params = {
yqMerchantId: this.merchantInfo.yqMerchantId,
imgUrl: this.imgUrl
this.$refs.elForm.validate(async (valid) => {
console.log(valid)
// return
if (valid) {
const params = {
yqMerchantId: this.merchantInfo.yqMerchantId,
...this.formData
}
const result = await serviceMerchantRelateQrcode(params)
console.log(result)
this.notice.okTips()
this.handleClose()
}
const result = await serviceMerchantRelateQrcode(params)
console.log(result)
this.notice.okTips()
// .then((result) => {
// console.log(result)
// }).catch((err) => {
// console.log(err)
// });
}
this.handleClose()
})
},
handleChange(file, attrName, targetItem) {
if (!(file.size / 1024 / 1024 < 1)) {
......@@ -198,7 +240,7 @@ export default {
position: absolute;
white-space: nowrap;
top: 28px;
left: -14px;
left: -48px;
margin-top: 8px;
font-size: 14px;
}
......@@ -206,7 +248,7 @@ export default {
.dialogContainer {
box-sizing: border-box;
width: 300px;
height: 290px;
// height: 290px;
margin: auto;
padding: 16px 24px;
display: flex;
......@@ -219,23 +261,24 @@ export default {
p {
margin: 0;
}
.radioItem {
margin-top: 10px;
}
.merchantName {
font-weight: 600;
margin-bottom: 10px;
}
.elupload {
margin: auto;
margin: 10px auto 0;
position: relative;
display: flex;
justify-content: center;
}
.disabled .el-upload--picture-card {
display: none;
}
.el-upload--picture-card {
width: 140px;
height: 92px;
line-height: 98px;
}
.rectImg {
width: 100%;
height: 100%;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!