Commit 01646854 by 王志慧

Merge branch 'dev_v4.17.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into wangzh_dev_v4.17.0
2 parents cddbd1d5 6f8784f1
...@@ -3508,27 +3508,6 @@ ...@@ -3508,27 +3508,6 @@
"whatwg-fetch": "^3.6.2" "whatwg-fetch": "^3.6.2"
}, },
"dependencies": { "dependencies": {
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.10.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz",
"integrity": "sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"acorn-walk": { "acorn-walk": {
"version": "8.2.0", "version": "8.2.0",
"resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz", "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz",
...@@ -3918,6 +3897,27 @@ ...@@ -3918,6 +3897,27 @@
"lodash": "^4.17.4" "lodash": "^4.17.4"
} }
}, },
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.10.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz",
"integrity": "sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"@vue/vue2-jest": { "@vue/vue2-jest": {
"version": "27.0.0", "version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz", "resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
...@@ -17687,7 +17687,7 @@ ...@@ -17687,7 +17687,7 @@
}, },
"yarn": { "yarn": {
"version": "1.22.19", "version": "1.22.19",
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz", "resolved": "https://registry.npmmirror.com/yarn/-/yarn-1.22.19.tgz",
"integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ==" "integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ=="
}, },
"yorkie": { "yorkie": {
......
...@@ -30,15 +30,15 @@ export const severSelectOptions = [ ...@@ -30,15 +30,15 @@ export const severSelectOptions = [
}, },
{ {
expenseCategoryCalculateType: 4, expenseCategoryCalculateType: 4,
label: "按(产值-流量成本)比例" label: "按园区店总金额比例"
}, },
{ {
expenseCategoryCalculateType: 5, expenseCategoryCalculateType: 5,
label: "按(产值-流量成本-其他费用不包含产品成本))比例" label: "按园区店毛利(不扣除产品成本)比例"
}, },
{ {
expenseCategoryCalculateType: 6, expenseCategoryCalculateType: 6,
label: "按(产值-流量成本-其他费用包含产品成本)比例" label: "按园区店毛利比例"
} }
] ]
// 回显财务管理-费用管理-费用类别-费用类 // 回显财务管理-费用管理-费用类别-费用类
......
...@@ -328,7 +328,7 @@ export const routerName = { ...@@ -328,7 +328,7 @@ export const routerName = {
authId: "90613", authId: "90613",
parentId: "90603", parentId: "90603",
cache: false, cache: false,
activePath: "/merchantCheck" activePath: "/merchantManage",
}, },
component: _import("systemConfig/merchant/merchantStep/merchantCheck") component: _import("systemConfig/merchant/merchantStep/merchantCheck")
}, },
...@@ -340,7 +340,7 @@ export const routerName = { ...@@ -340,7 +340,7 @@ export const routerName = {
authId: "90614", authId: "90614",
parentId: "90603", parentId: "90603",
cache: false, cache: false,
activePath: "/merchantCheckDetail" activePath: "/merchantManage",
}, },
component: _import("systemConfig/merchant/merchantStep/merchantCheckDetail") component: _import("systemConfig/merchant/merchantStep/merchantCheckDetail")
}, },
...@@ -352,7 +352,7 @@ export const routerName = { ...@@ -352,7 +352,7 @@ export const routerName = {
authId: "90615", authId: "90615",
parentId: "90603", parentId: "90603",
cache: false, cache: false,
activePath: "/merchantCheckRecord" activePath: "/merchantManage",
}, },
component: _import("systemConfig/merchant/merchantStep/merchantCheckRecord") component: _import("systemConfig/merchant/merchantStep/merchantCheckRecord")
}, },
......
...@@ -23,12 +23,13 @@ ...@@ -23,12 +23,13 @@
:ref="'selectMerchant' + index" :ref="'selectMerchant' + index"
v-el-select-loadmore="interestsLoadmore" v-el-select-loadmore="interestsLoadmore"
:loading="interesLoading"> :loading="interesLoading">
<!-- !v.isSetUpgradeSettleRule -->
<el-option <el-option
v-for="(v, k) in merchantList" v-for="(v, k) in merchantList"
:key="k" :key="k"
:label="(v.merchant && v.merchant.merchantName) + ' ' + (v.merchant && v.merchant.merchantId)" :label="(v.merchant && v.merchant.merchantName) + ' ' + (v.merchant && v.merchant.merchantId)"
:value="(v.merchant && v.merchant.merchantName) + ' ' + (v.merchant && v.merchant.merchantId)" :value="(v.merchant && v.merchant.merchantName) + ' ' + (v.merchant && v.merchant.merchantId)"
:disabled="!v.isSetUpgradeSettleRule"> :disabled="false">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
......
...@@ -27,15 +27,15 @@ ...@@ -27,15 +27,15 @@
prop="yqMerchantName" prop="yqMerchantName"
label="园区店名称" label="园区店名称"
align="center"> align="center">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<span <span
:class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.yqMerchantName }}</span> :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.yqMerchantName }}</span>
</template> </template> -->
</el-table-column> </el-table-column>
<el-table-column prop="merchantName" <el-table-column prop="merchantName"
label="4S店名称" label="4S店名称"
align="center"> align="center">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<span <span
:class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.merchantName }}</span> :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.merchantName }}</span>
<el-tooltip v-if="!scope.row.isSetUpgradeSettleRule" <el-tooltip v-if="!scope.row.isSetUpgradeSettleRule"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<span v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)" <span v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)"
class="tip-icon">?</span> class="tip-icon">?</span>
</el-tooltip> </el-tooltip>
</template> </template> -->
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination small <el-pagination small
...@@ -170,13 +170,14 @@ export default { ...@@ -170,13 +170,14 @@ export default {
methods: { methods: {
selectable(row, index) { selectable(row, index) {
var isSelect = row.hasOwnProperty('beServed') ? !row.beServed : true // var isSelect = row.hasOwnProperty('beServed') ? !row.beServed : true
if (this.sourcePage === 'editProduct') { // if (this.sourcePage === 'editProduct') {
// 不能选的判断 // // 不能选的判断
// console.log('??') // // console.log('??')
isSelect = row.isSetUpgradeSettleRule // isSelect = row.isSetUpgradeSettleRule
} // }
return isSelect // return isSelect
return true
}, },
recoverySelection() { recoverySelection() {
var exitIds = this.selectedData.map(item => item.merchantId) var exitIds = this.selectedData.map(item => item.merchantId)
...@@ -224,7 +225,8 @@ export default { ...@@ -224,7 +225,8 @@ export default {
this.selectingData.forEach(item => { this.selectingData.forEach(item => {
var isExit = this.selectedData.findIndex(subItem => subItem.merchantId === item.merchantId) var isExit = this.selectedData.findIndex(subItem => subItem.merchantId === item.merchantId)
var isServed = item.hasOwnProperty('beServed') ? item.beServed : false var isServed = item.hasOwnProperty('beServed') ? item.beServed : false
if (selection.length && (isExit === -1) && !isServed && item.isSetUpgradeSettleRule) { // if (selection.length && (isExit === -1) && !isServed && item.isSetUpgradeSettleRule) {
if (selection.length && (isExit === -1) && !isServed) {
this.selectedData.push(item) this.selectedData.push(item)
} else if (!selection.length && (isExit !== -1)) { } else if (!selection.length && (isExit !== -1)) {
this.selectedData.splice(isExit, 1) this.selectedData.splice(isExit, 1)
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<auth-button <auth-button
slot="auth-button" slot="auth-button"
:show-btn-ids="['9040102']" :show-btn-ids="['9040111']"
:data="scope" :data="scope"
/> />
</template> </template>
......
...@@ -18,15 +18,18 @@ ...@@ -18,15 +18,18 @@
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" <el-form-item class="d2-drawer-item"
label="主订单编号:"> label="主订单编号:">
<span>{{ recordInfo.inputtedOrderCode }}</span> <!-- <span>{{ recordInfo.inputtedOrderCode }}</span> -->
<span>{{ recordInfo.orderCode }}</span>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" <el-form-item class="d2-drawer-item"
label="订单金额:"> label="订单金额:">
<span>{{ recordInfo.totalFee ? '¥' + recordInfo.totalFee / 100 : '' }}</span> <!-- <span>{{ recordInfo.totalFee ? '¥' + recordInfo.totalFee / 100 : '' }}</span> -->
<span>{{ recordInfo.totalPrice ? '¥' + recordInfo.totalPrice : '' }}</span>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" <el-form-item class="d2-drawer-item"
label="支付时间:"> label="支付时间:">
<span>{{ recordInfo.accountDate }}</span> <!-- <span>{{ recordInfo.accountDate }}</span> -->
<span>{{ recordInfo.paySuccessDate }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="fontD">请选择要应用的分账规则:</div> <div class="fontD">请选择要应用的分账规则:</div>
...@@ -110,7 +113,7 @@ export default { ...@@ -110,7 +113,7 @@ export default {
}, },
mounted() { mounted() {
this.recordInfo.accountDate = this.recordInfo.accountDate ? Util.dateFormate(this.recordInfo.accountDate, 'YYYY-MM-DD HH:mm:ss') : '' // this.recordInfo.accountDate = this.recordInfo.accountDate ? Util.dateFormate(this.recordInfo.accountDate, 'YYYY-MM-DD HH:mm:ss') : ''
this.getLedgerHistoryRecord() this.getLedgerHistoryRecord()
}, },
methods: { methods: {
...@@ -150,7 +153,8 @@ export default { ...@@ -150,7 +153,8 @@ export default {
} }
var params = {} var params = {}
params.outTradeNo = this.recordInfo.outTradeNo params.outTradeNo = this.recordInfo.outTradeNo
params.inputtedOrderCode = this.recordInfo.inputtedOrderCode // params.inputtedOrderCode = this.recordInfo.inputtedOrderCode
params.inputtedOrderCode = this.recordInfo.orderCode
params.effectRuleId = this.radio params.effectRuleId = this.radio
// return console.log('params', params); // return console.log('params', params);
......
<!-- 订单列表 --> <!-- 订单列表 -->
<template> <template>
<d2-container class="order-list m-t-40"> <d2-container class="order-list m-t-40">
<div class="header" slot="header"> <div class="header"
<d2-search slot="header">
ref="showSearch" <d2-search ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:label-width="'150px'" :label-width="'150px'"
:form-data="showFormData" :form-data="showFormData" />
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch"
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button size="small"
@click="handleReset">
重置
</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span slot="left">累计订单金额:¥{{ totalCount }}元</span> <span slot="left">累计订单金额:¥{{ totalCount }}元</span>
<el-button <el-button type="primary"
type="primary"
size="mini" size="mini"
class="orderTips" class="orderTips"
@click="handlMakeUpOrder" @click="handlMakeUpOrder"
v-if="jurisdictionFlag" v-if="jurisdictionFlag"
style="padding: 0px 13px; height: 30px; margin-top: 6px" style="padding:0px 13px;height:30px;margin-top:6px">
>
待补录订单 待补录订单
<span class="tipsNum" v-show="waitOrderNum">{{ waitOrderNum }}</span> <span class="tipsNum"
v-show="waitOrderNum">{{ waitOrderNum }}</span>
</el-button> </el-button>
<!-- @click="downloadAccount" --> <!-- @click="downloadAccount" -->
<!-- <auth-button category="Button"></auth-button> --> <!-- <auth-button category="Button"></auth-button> -->
<!-- <auth-button :showBtnIds="['9040104']" <!-- <auth-button :showBtnIds="['9040104']"
class="p-r-20" class="p-r-20"
category="Button"></auth-button> --> category="Button"></auth-button> -->
<auth-button :show-btn-ids="['9040101', '9040104']" category="Button" /> <auth-button :show-btn-ids="['9040101','9040104']"
category="Button" />
</d2-table-header> </d2-table-header>
<el-table <el-table :data="tableData"
:data="tableData"
v-loading="$store.state.d2admin.loading.value" v-loading="$store.state.d2admin.loading.value"
border border>
>
<!-- <el-table-column type="expand"> <!-- <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
<div v-if="props.row.goods" class="product_list"> <div v-if="props.row.goods" class="product_list">
...@@ -55,132 +57,121 @@ ...@@ -55,132 +57,121 @@
</div> </div>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column <el-table-column type="index"
type="index"
label="序号" label="序号"
:index="(index) => index + (page.pageNum - 1) * page.pageSize + 1" :index="index => index + (page.pageNum - 1) * page.pageSize + 1"
align="center" align="center" />
/> <el-table-column label="订单编号"
<el-table-column
label="订单编号"
align="center" align="center"
width="150" width="150"
prop="orderCode" prop="orderCode" />
/> <el-table-column label="订单时间"
<el-table-column
label="订单时间"
align="center" align="center"
width="160" width="160"
prop="orderTimeStr" prop="orderTimeStr" />
/>
<el-table-column <el-table-column label="支付时间"
label="支付时间"
align="center" align="center"
width="160" width="160"
prop="paySuccessDate" prop="paySuccessDate" />
/> <el-table-column label="客户姓名"
<el-table-column label="客户姓名" align="center" prop="customerName" /> align="center"
<el-table-column label="客户性别" align="center" prop="customerSex"> prop="customerName" />
<el-table-column label="客户性别"
align="center"
prop="customerSex">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.customerSex == 1 ? "男" : "女" }}</span> <span>{{ scope.row.customerSex ==1 ? '男' : '女' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="客户手机号" <!-- <el-table-column label="客户手机号"
align="center" align="center"
width="150" width="150"
prop="customerPhone" /> --> prop="customerPhone" /> -->
<el-table-column <el-table-column label="客户车型"
label="客户车型"
align="center" align="center"
width="200" width="200"
prop="carTypeName" prop="carTypeName">
>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-show="scope.row.carBrand">{{ scope.row.carBrand }}</span> <span v-show="scope.row.carBrand">{{ scope.row.carBrand }}</span>
<span v-show="scope.row.carChildsBrandName" <span v-show="scope.row.carChildsBrandName">-{{ scope.row.carChildsBrandName }}</span>
>-{{ scope.row.carChildsBrandName }}</span <span v-show="scope.row.carSeriesName">-{{ scope.row.carSeriesName }}</span>
>
<span v-show="scope.row.carSeriesName"
>-{{ scope.row.carSeriesName }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="客户车牌号"
label="客户车牌号"
align="center" align="center"
width="110" width="110"
prop="plateNumber" prop="plateNumber" />
/>
<!-- <el-table-column label="客户车架号" <!-- <el-table-column label="客户车架号"
align="center" align="center"
width="150" width="150"
prop="standNo" /> --> prop="standNo" /> -->
<el-table-column label="升级状态" align="center" prop="upgradeFlag"> <el-table-column label="升级状态"
align="center"
prop="upgradeFlag">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{ scope.row.upgradeFlag ? upgradeOpts[scope.row.upgradeFlag] : '待升级' }}</span>
scope.row.upgradeFlag
? upgradeOpts[scope.row.upgradeFlag]
: "待升级"
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="施工状态" align="center" prop="upgradeFlag"> <el-table-column label="施工状态"
align="center"
prop="upgradeFlag">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{ scope.row.constructionFlag ? constructioOpts[scope.row.constructionFlag] : '未施工' }}</span>
scope.row.constructionFlag
? constructioOpts[scope.row.constructionFlag]
: "未施工"
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单状态" align="center" prop="status"> <el-table-column label="订单状态"
align="center"
prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ statusOpts[scope.row.status] }}</span> <span>{{ statusOpts[scope.row.status] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="分账状态"
<el-table-column align="center"
label="商品名称" prop="profitAllocationStatus">
<template slot-scope="scope">
<span>{{ profitAllocationStatusOpts[scope.row.profitAllocationStatus] }}</span>
</template>
</el-table-column>
<el-table-column label="商品名称"
align="center" align="center"
width="150" width="150"
prop="subOrderList" 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 v-if="item.upgradeGoodsId">{{ item.upgradeGoodsName }}</p> <p v-if="item.upgradeGoodsId">{{ item.upgradeGoodsName }}</p>
<p v-else>{{ item.baseGoodsName }}</p> <p v-else>{{ item.baseGoodsName }}</p>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品单价" align="center" prop="subOrderList"> <el-table-column label="商品单价"
align="center"
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 v-if="item.upgradeGoodsId">¥ {{ item.totalPrice }}</p> <p v-if="item.upgradeGoodsId">¥ {{ item.totalPrice }}</p>
<!-- <p v-if="item.upgradeGoodsId">¥ {{item.upgradePrice}}</p> --> <!-- <p v-if="item.upgradeGoodsId">¥ {{item.upgradePrice}}</p> -->
<p v-else>¥ {{ item.baseRetailPrice }}</p> <p v-else>¥ {{ item.baseRetailPrice }}</p>
</span> </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>¥ {{ scope.row.totalPrice }}</span> <span>¥ {{ scope.row.totalPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="upgradeWarrantyPeriod"
prop="upgradeWarrantyPeriod"
align="center" align="center"
label="质保年限" label="质保年限">
>
<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"
<p> :key="index">
{{ <p>{{ item.upgradeWarrantyPeriod ? (item.upgradeWarrantyPeriod + '年') : '无' }}</p>
item.upgradeWarrantyPeriod
? item.upgradeWarrantyPeriod + "年"
: "无"
}}
</p>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -188,148 +179,152 @@ ...@@ -188,148 +179,152 @@
align="center" align="center"
width="170" width="170"
prop="merchantName" /> --> prop="merchantName" /> -->
<el-table-column <el-table-column label="流量方"
label="流量方"
align="center" align="center"
width="170" width="170"
prop="merchantName" prop="merchantName" />
/> <el-table-column label="二级流量方"
<el-table-column
label="二级流量方"
align="center" align="center"
width="170" width="170"
prop="merchantName" prop="merchantName">
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.subShopMerchantName || "-" }}</span> <span>{{ scope.row.subShopMerchantName || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="园区店" --> <!-- <el-table-column label="园区店" -->
<el-table-column <el-table-column label="服务对接"
label="服务对接"
align="center" align="center"
width="170" width="170"
prop="sellerMerchantName" prop="sellerMerchantName" />
/> <el-table-column label="安装服务商"
<el-table-column
label="安装服务商"
align="center" align="center"
width="170" width="170"
prop="installMerchantName" prop="installMerchantName" />
/> <el-table-column label="营销服务商"
<el-table-column
label="营销服务商"
align="center" align="center"
width="170" width="170"
prop="marketingMerchantName" prop="marketingMerchantName" />
/> <el-table-column label="销售顾问"
<el-table-column label="销售顾问" align="center" prop="employeeName" /> align="center"
<el-table-column label="转化人员" align="center" prop="sellerName" /> prop="employeeName" />
<el-table-column <el-table-column label="转化人员"
v-if="!specialAccout" align="center"
prop="sellerName" />
<el-table-column v-if="!specialAccout"
label="订单来源" label="订单来源"
align="center" align="center"
prop="source" prop="source">
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.source == 7 ? "系统导入" : "小程序订单" }}</span> <span>{{ scope.row.source ==7 ? '系统导入' : '小程序订单' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right"> <el-table-column label="操作"
align="center"
fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<auth-button <auth-button slot="auth-button"
slot="auth-button"
:show-btn-ids="['9040102']" :show-btn-ids="['9040102']"
:data="scope" :data="scope" />
/> <el-button type="text"
size="small"
v-if="scope.row.profitAllocationStatus == 1"
@click="chooseRule(scope.row)">
发起分账
</el-button>
<el-button type="text"
size="small"
v-if="scope.row.manualFlag == '1'"
@click="ruleHistory(scope.row)">
分账记录
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination background
background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page.pageNum" :current-page="page.pageNum"
:page-sizes="[10, 20, 30, 40]" :page-sizes="[10,20,30,40]"
:page-size="page.pageSize" :page-size="page.pageSize"
:total="total" :total="total"
layout="sizes,total,->,prev,pager,next,jumper" layout="sizes,total,->,prev,pager,next,jumper" />
/>
</div> </div>
<d2-dialog <d2-dialog :title="'上传文件'"
:title="'上传文件'"
:is-visible="fileVisible" :is-visible="fileVisible"
@closeDialog="handleImport" @closeDialog="handleImport"
@confirmDialog="handleConfirmImport" @confirmDialog="handleConfirmImport">
>
<slot> <slot>
<el-form <el-form :model="fileForm"
:model="fileForm"
ref="fileRuleForm" ref="fileRuleForm"
:rules="fileRules" :rules="fileRules"
label-width="120px" label-width="120px">
> <el-form-item label="导入文件:"
<el-form-item label="导入文件:" prop="fileName"> prop="fileName">
<el-col :span="16"> <el-col :span="16">
<el-input readonly v-model="fileForm.fileName" /> <el-input readonly
v-model="fileForm.fileName" />
</el-col> </el-col>
<el-col :span="4" class="m-l-md"> <el-col :span="4"
class="m-l-md">
<el-button class="import-btn"> <el-button class="import-btn">
导入文件 导入文件
<input <input type="file"
type="file"
id="fileUpload" id="fileUpload"
class="import-input" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)" @change="importFile($event)">
/>
<!-- href="http://img01.glsx.com.cn/upload/salesexcel/园区店客户订单导入模板.xlsx?fname=自定义文件名称.zip" --> <!-- href="http://img01.glsx.com.cn/upload/salesexcel/园区店客户订单导入模板.xlsx?fname=自定义文件名称.zip" -->
<!-- href="https://img01.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/园区店客户订单导入模板.xlsx" --> <!-- href="https://img01.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/园区店客户订单导入模板.xlsx" -->
<el-link <el-link type="primary"
type="primary"
class="import-template" class="import-template"
href="http://img01.glsx.com.cn/upload/salesexcel/园区店客户订单导入模板.xlsx" href="http://img01.glsx.com.cn/upload/salesexcel/园区店客户订单导入模板.xlsx"
icon="el-icon-link" icon="el-icon-link">
>
模版下载 模版下载
</el-link> </el-link>
</el-button> </el-button>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item v-show="showNum"> <el-form-item v-show="showNum">
<span <span>导入成功{{ importNum.succNum }}条,导入失败{{ importNum.failNum }}条</span>
>导入成功{{ importNum.succNum }}条,导入失败{{
importNum.failNum
}}条</span
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</slot> </slot>
</d2-dialog> </d2-dialog>
<!-- 选择分账规则 -->
<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" />
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { Util } from "@/common/util" import { Util } from '@/common/util'
import { import { getList, getOrderCount, waitinputorderCount, orderImport } from '@api/order'
getList, import { getDiversionMerchantRef } from '@api/merchant'
getOrderCount, import { manageTypeList, BaseData } from '@/common/constants'
waitinputorderCount, import { mapActions, mapState, mapMutations } from 'vuex'
orderImport import { getServiceStore, getParkStore } from '@api/editCustomer'
} from "@api/order" import chooseRuleDialog from './chooseRuleDialog'
import { getDiversionMerchantRef } from "@api/merchant" import ruleInfoDialog from './ruleInfoDialog'
import { manageTypeList, BaseData } from "@/common/constants"
import { mapActions, mapState, mapMutations } from "vuex"
import { getServiceStore, getParkStore } from "@api/editCustomer"
// import { asyncExportExcel } from '@api/sys.base'
export default { export default {
name: "Order", name: 'OrderList',
components: {
chooseRuleDialog,
ruleInfoDialog
},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
fileForm: {}, fileForm: {},
fileRules: { fileRules: {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }] fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
}, },
showNum: false, showNum: false,
importNum: { importNum: {
...@@ -339,76 +334,83 @@ export default { ...@@ -339,76 +334,83 @@ export default {
fileVisible: false, fileVisible: false,
waitOrderNum: 0, waitOrderNum: 0,
statusOpts: { statusOpts: {
1: "待升级", 1: '待升级',
2: "战败", 2: '战败',
3: "待支付", 3: '待支付',
4: "已支付", 4: '已支付',
// 5: '已退款', // 5: '已退款',
6: "已评价", 6: '已评价',
9: "已撤销", 9: '已撤销',
10: "已关闭", 10: '已关闭',
11: "错误订单", 11: '错误订单',
12: "已退款" 12: '已退款'
}, },
upgradeOpts: { upgradeOpts: {
Y: "已升级", Y: '已升级',
N: "不升级" N: '不升级'
}, },
constructioOpts: { constructioOpts: {
Y: "已施工", Y: '已施工',
N: "未施工" N: '未施工'
}, },
showFormData: [ profitAllocationStatusOpts: {
{ 1: '未分账',
label: "订单状态", 2: '已分账'
name: "status", },
type: "select", showFormData: [{
label: '订单状态',
name: 'status',
type: 'select',
optionList: [], optionList: [],
optionId: "confId", optionId: 'confId',
optionLabel: "confLabel", optionLabel: 'confLabel',
optionsName: "orderStatusList" optionsName: 'orderStatusList'
}, {
label: '升级状态',
name: 'upgradeFinishFlag',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'upgradeList'
}, },
{ {
label: "升级状态", label: '施工状态',
name: "upgradeFinishFlag", name: 'constructionFlag',
type: "select", type: 'select',
optionList: [], optionId: 'confId',
optionId: "confId", optionLabel: 'confLabel',
optionLabel: "confLabel", optionsName: 'constructionList'
optionsName: "upgradeList"
}, },
{ {
label: "施工状态", label: '分账状态',
name: "constructionFlag", name: 'profitAllocationStatus',
type: "select", type: 'select',
optionId: "confId", optionId: 'confId',
optionLabel: "confLabel", optionLabel: 'confLabel',
optionsName: "constructionList" optionsName: 'profitAllocationStatusList'
}, },
{ {
label: "商品名称", label: '商品名称',
name: "orderGoodsName", name: 'orderGoodsName',
type: "input", type: 'input',
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, }, {
{ label: '客户姓名',
label: "客户姓名", name: 'customerName',
name: "customerName", type: 'input',
type: "input",
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, }, {
{
// label: '园区店', // label: '园区店',
label: "服务对接", label: '服务对接',
name: "yqMerchantId", name: 'yqMerchantId',
type: "select", type: 'select',
optionList: [], optionList: [],
optionId: "merchantId", optionId: 'merchantId',
optionLabel: "merchantName", optionLabel: 'merchantName',
optionsName: "parkServiceList", optionsName: 'parkServiceList',
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
if (value) { if (value) {
// 获取流量方 // 获取流量方
...@@ -416,20 +418,19 @@ export default { ...@@ -416,20 +418,19 @@ export default {
} else { } else {
this.baseData.storeIdList = [] this.baseData.storeIdList = []
} }
this.searchForm.merchantId = "" this.searchForm.merchantId = ''
this.getOptionsList() this.getOptionsList()
} }
}, }, {
{ label: '流量来源',
label: "流量来源", name: 'merchantId',
name: "merchantId", type: 'select',
type: "select", noDataText: '请先选择服务对接',
noDataText: "请先选择服务对接",
// noDataText: '请先选择园区店', // noDataText: '请先选择园区店',
optionList: [], optionList: [],
optionId: "merchantId", optionId: 'merchantId',
optionLabel: "merchantName", optionLabel: 'merchantName',
optionsName: "storeIdList", optionsName: 'storeIdList',
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
if (value) { if (value) {
// // 获取二级流量方 // // 获取二级流量方
...@@ -437,145 +438,138 @@ export default { ...@@ -437,145 +438,138 @@ export default {
} else { } else {
this.baseData.subShopMerchantList = [] this.baseData.subShopMerchantList = []
} }
this.searchForm.subShopMerchantId = "" this.searchForm.subShopMerchantId = ''
this.getOptionsList() this.getOptionsList()
} }
}, }, {
{ label: '下单日期',
label: "下单日期", name: 'orderTime',
name: "orderTime", type: 'datePicker',
type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: 'rangePickerOptions'
}, }, {
{ label: '订单编号',
label: "订单编号", name: 'orderCode',
name: "orderCode", type: 'input',
type: "input",
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, }, {
{ label: '订单来源',
label: "订单来源", name: 'sourceList',
name: "sourceList", type: 'select',
type: "select", noDataText: '请先选择订单来源',
noDataText: "请先选择订单来源",
optionList: [], optionList: [],
optionId: "confId", optionId: 'confId',
optionLabel: "confLabel", optionLabel: 'confLabel',
optionsName: "sourceList" optionsName: 'sourceList'
}, }, {
{ label: '渠道',
label: "渠道", name: 'channelType',
name: "channelType", type: 'select',
type: "select",
optionList: [], optionList: [],
optionId: "value", optionId: 'value',
optionLabel: "name", optionLabel: 'name',
// optionsName: 'sourceChannelTypeList' // optionsName: 'sourceChannelTypeList'
optionsName: "channelTypeList" optionsName: 'channelTypeList'
}, }, {
{ label: '服务对接模式',
label: "服务对接模式",
// label: '园区店模式', // label: '园区店模式',
name: "businessModel", name: 'businessModel',
type: "select", type: 'select',
optionList: [], optionList: [],
optionId: "confId", optionId: 'confId',
optionLabel: "confLabel", optionLabel: 'confLabel',
optionsName: "manageTypeList" optionsName: 'manageTypeList'
}, }, {
{ label: '二级流量方',
label: "二级流量方", name: 'subShopMerchantId',
name: "subShopMerchantId", type: 'select',
type: "select", noDataText: '请先选择流量来源',
noDataText: "请先选择流量来源",
isHide: this.subShopMerchanShowHide, isHide: this.subShopMerchanShowHide,
optionList: [], optionList: [],
optionId: "subMerchantId", optionId: 'subMerchantId',
optionLabel: "subMerchantName", optionLabel: 'subMerchantName',
optionsName: "subShopMerchantList" optionsName: 'subShopMerchantList'
} }],
],
searchForm: { searchForm: {
sceneType: 1, sceneType: 1,
status: "", status: '',
upgradeFinishFlag: "", upgradeFinishFlag: '',
customerName: "", customerName: '',
yqMerchantId: "", yqMerchantId: '',
merchantId: "", merchantId: '',
orderTime: "", orderTime: '',
constructionFlag: "", constructionFlag: '',
sourceList: "", sourceList: '',
channelType: "", channelType: '',
businessModel: "", businessModel: '',
subShopMerchantId: "" subShopMerchantId: ''
}, },
baseData: { baseData: {
orderStatusList: [ orderStatusList: [{
{
confId: 1, confId: 1,
confLabel: "待升级" confLabel: '待升级'
}, }, {
{
confId: 2, confId: 2,
confLabel: "战败" confLabel: '战败'
}, }, {
{
confId: 3, confId: 3,
confLabel: "待支付" confLabel: '待支付'
}, }, {
{
confId: 4, confId: 4,
confLabel: "已支付" confLabel: '已支付'
}, }, /* {
/* {
confId: 5, confId: 5,
confLabel: '已退款' confLabel: '已退款'
}, */ { }, */{
confId: 6, confId: 6,
confLabel: "已评价" confLabel: '已评价'
}, }, {
{
confId: 9, confId: 9,
confLabel: "已撤销" confLabel: '已撤销'
}, },
{ {
confId: 10, confId: 10,
confLabel: "已关闭" confLabel: '已关闭'
}, },
{ {
confId: 11, confId: 11,
confLabel: "错误订单" confLabel: '错误订单'
}, },
{ {
confId: 12, confId: 12,
confLabel: "已退款" confLabel: '已退款'
} }
], ],
upgradeList: [ upgradeList: [{
{ confId: 'Y',
confId: "Y", confLabel: '已升级'
confLabel: "已升级" }, {
}, confId: 'N',
confLabel: '战败'
}, {
confId: 'R',
confLabel: '待升级'
}],
constructionList: [
{ {
confId: "N", confId: 'Y',
confLabel: "战败" confLabel: '已施工'
}, },
{ {
confId: "R", confId: 'N',
confLabel: "待升级" confLabel: '未施工'
} }
], ],
profitAllocationStatusList: [
constructionList: [
{ {
confId: "Y", confId: '1',
confLabel: "已施工" confLabel: '未分账'
}, },
{ {
confId: "N", confId: '2',
confLabel: "未施工" confLabel: '已分账'
} }
], ],
parkServiceList: [], parkServiceList: [],
...@@ -584,12 +578,12 @@ export default { ...@@ -584,12 +578,12 @@ export default {
manageTypeList: Util.deepClone(manageTypeList), manageTypeList: Util.deepClone(manageTypeList),
sourceList: [ sourceList: [
{ {
confId: "1", confId: '1',
confLabel: "小程序订单" confLabel: '小程序订单'
}, },
{ {
confId: "7", confId: '7',
confLabel: "系统导入" confLabel: '系统导入'
} }
], ],
channelTypeList: [], channelTypeList: [],
...@@ -599,12 +593,15 @@ export default { ...@@ -599,12 +593,15 @@ export default {
total: 0, total: 0,
page: { page: {
pageNum: 1, pageNum: 1,
pageSize: 20 pageSize: 10
}, },
totalCount: "", totalCount: '',
jurisdictionFlag: false, // 待补录按钮权限标识 jurisdictionFlag: false, // 待补录按钮权限标识
signRefundFlag: false, // 标记退款权限标识 signRefundFlag: false, // 标记退款权限标识
subShopMerchanShowHide: true subShopMerchanShowHide: true,
ruleVisible: false,
recordInfo: null,
ruleInfoVisible: false
} }
}, },
computed: { computed: {
...@@ -614,7 +611,7 @@ export default { ...@@ -614,7 +611,7 @@ export default {
updateRefesh: (state) => state.d2admin.user.updateRefesh updateRefesh: (state) => state.d2admin.user.updateRefesh
}), }),
specialAccout() { specialAccout() {
return this.userInfo?.loginAccount?.loginAccout == "18123663366" return this.userInfo?.loginAccount?.loginAccout == '18123663366'
} }
}, },
mounted() { mounted() {
...@@ -624,30 +621,26 @@ export default { ...@@ -624,30 +621,26 @@ export default {
// console.log(specialAccout) // console.log(specialAccout)
if (this.specialAccout) { if (this.specialAccout) {
// debugger // debugger
const itemName = ["sourceList", "channelType", "businessModel"] const itemName = ['sourceList', 'channelType', 'businessModel']
this.showFormData = this.showFormData.filter( this.showFormData = this.showFormData.filter(item => !itemName.includes(item.name))
(item) => !itemName.includes(item.name)
)
} }
if (this.userInfo.beSuper || this.specialAccout) { if (this.userInfo.beSuper || this.specialAccout) {
getParkStore({}).then((res) => { getParkStore({}).then(res => {
res.forEach((item) => { res.forEach(item => {
item.merchantId = item.merchantNo item.merchantId = item.merchantNo
}) })
this.baseData.parkServiceList = res this.baseData.parkServiceList = res
this.getOptionsList() this.getOptionsList()
}) })
} else { } else {
this.showFormData = this.showFormData.filter( this.showFormData = this.showFormData.filter(item => item.name !== 'yqMerchantId')
(item) => item.name !== "yqMerchantId"
)
this.getServiceStore(this.userInfo.detail.merchantId) this.getServiceStore(this.userInfo.detail.merchantId)
} }
const $store = this.$store.getters["d2admin/auth/curBtns"] const $store = this.$store.getters['d2admin/auth/curBtns']
const btnId = "9040103" // 待补录订单权限ID const btnId = '9040103' // 待补录订单权限ID
const signRefundBtnId = "9040105" // 标记退款权限ID const signRefundBtnId = '9040105' // 标记退款权限ID
const _item = $store.find((i) => i.authId === btnId) const _item = $store.find(i => (i.authId === btnId))
const signRefundItem = $store.find((i) => i.authId === signRefundBtnId) const signRefundItem = $store.find(i => (i.authId === signRefundBtnId))
if (_item) { if (_item) {
this.jurisdictionFlag = true // 是否有待补录订单按钮权限 this.jurisdictionFlag = true // 是否有待补录订单按钮权限
this.getWaitinputorderCount() this.getWaitinputorderCount()
...@@ -664,28 +657,26 @@ export default { ...@@ -664,28 +657,26 @@ export default {
// console.log('val', val) // console.log('val', val)
if (val == true) { if (val == true) {
this.handleSearch() this.handleSearch()
this.setUpdateRefesh("false") this.setUpdateRefesh('false')
} }
}, },
"baseData.subShopMerchantList": { 'baseData.subShopMerchantList': {
handler(val) { handler(val) {
console.log("baseData.subShopMerchantList", val) console.log('baseData.subShopMerchantList', val);
if (val.length > 0) { if (val.length > 0) {
this.showFormData[ this.showFormData[this.findFormIdx('subShopMerchantId')].isHide = false
this.findFormIdx("subShopMerchantId")
].isHide = false
} else { } else {
this.showFormData[this.findFormIdx("subShopMerchantId")].isHide = true this.showFormData[this.findFormIdx('subShopMerchantId')].isHide = true
} }
}, },
immediate: true immediate: true
} }
}, },
methods: { methods: {
...mapActions({ close: "d2admin/page/close" }), ...mapActions({ close: 'd2admin/page/close' }),
...mapActions("d2admin/user", ["actionSetDownloadList"]), ...mapActions('d2admin/user', ['actionSetDownloadList']),
...mapMutations("d2admin/user", ["setUpdateRefesh"]), ...mapMutations('d2admin/user', ['setUpdateRefesh']),
...mapActions("d2admin/base", ["get"]), ...mapActions("d2admin/base", ["get"]),
async getBaseData() { async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType) this.baseData.channelTypeList = await this.get(BaseData.channelType)
...@@ -701,23 +692,22 @@ export default { ...@@ -701,23 +692,22 @@ export default {
// console.log(e) // console.log(e)
const size = e.target.files[0].size / 1024 / 1024 const size = e.target.files[0].size / 1024 / 1024
if (size < 9) { if (size < 9) {
this.$set(this.fileForm, "fileName", e.target.files[0].name) this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64 // // 转码base64
const reader = new FileReader() const reader = new FileReader()
reader.readAsDataURL(e.target.files[0]) reader.readAsDataURL(e.target.files[0])
reader.onload = (event) => { reader.onload = event => {
const imgFile = event.target.result const imgFile = event.target.result
const arrBase64 = imgFile.split(",") const arrBase64 = imgFile.split(',')
this.fileInfo = this.fileInfo = e.target.files[0].name.split('.')[1] + '@' + arrBase64[1]
e.target.files[0].name.split(".")[1] + "@" + arrBase64[1] document.getElementById('fileUpload').value = ''
document.getElementById("fileUpload").value = ""
} }
} else { } else {
this.notice.errorTips("上传文件不可超过9M") this.notice.errorTips('上传文件不可超过9M')
} }
}, },
handleConfirmImport() { handleConfirmImport() {
this.$refs.fileRuleForm.validate((valid) => { this.$refs.fileRuleForm.validate(valid => {
if (valid) { if (valid) {
var params = { var params = {
// advanceUserId: this.userInfo.detail.uuid, // advanceUserId: this.userInfo.detail.uuid,
...@@ -725,22 +715,20 @@ export default { ...@@ -725,22 +715,20 @@ export default {
// yqMerchantId: this.userInfo.beSuper ? this.fileForm.yqMerchantId : this.userInfo.detail.merchantId, // yqMerchantId: this.userInfo.beSuper ? this.fileForm.yqMerchantId : this.userInfo.detail.merchantId,
file: this.fileInfo file: this.fileInfo
} }
orderImport(params).then((res) => { orderImport(params).then(res => {
// console.log(res)
if (res) { if (res) {
// 异步处理文件上传 把id传入处理轮询 // 异步处理文件上传 把id传入处理轮询
const list = [ const list = [...this.updateList, {
...this.updateList,
{
name: this.fileForm.fileName, name: this.fileForm.fileName,
ifSuccess: false, ifSuccess: false,
uuid: res, uuid: res,
type: "upload" type: 'upload'
// labelText: '' // labelText: ''
} }]
]
this.actionSetDownloadList({ list, type: "updateList" }) this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips("上传成功") this.notice.okTips('上传成功')
this.handleImport() this.handleImport()
} }
// this.showNum = !!res.failNum // this.showNum = !!res.failNum
...@@ -762,16 +750,16 @@ export default { ...@@ -762,16 +750,16 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
sceneType: 1, sceneType: 1,
status: "", status: '',
upgradeFinishFlag: "", upgradeFinishFlag: '',
customerName: "", customerName: '',
yqMerchantId: "", yqMerchantId: '',
merchantId: "", merchantId: '',
orderTime: "", orderTime: '',
constructionFlag: "", constructionFlag: '',
channelType: "", channelType: '',
businessModel: "", businessModel: '',
subShopMerchantId: "" subShopMerchantId: ''
} }
this.baseData.storeIdList = [] this.baseData.storeIdList = []
this.getOptionsList() this.getOptionsList()
...@@ -779,7 +767,7 @@ export default { ...@@ -779,7 +767,7 @@ export default {
getServiceStore(merchantId) { getServiceStore(merchantId) {
getServiceStore({ getServiceStore({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then((res) => { }).then(res => {
this.baseData.storeIdList = res || [] this.baseData.storeIdList = res || []
this.getOptionsList() this.getOptionsList()
}) })
...@@ -787,30 +775,21 @@ export default { ...@@ -787,30 +775,21 @@ export default {
getDiversionMerchantRef(merchantId) { getDiversionMerchantRef(merchantId) {
getDiversionMerchantRef({ getDiversionMerchantRef({
merchantId: merchantId merchantId: merchantId
}).then((res) => { }).then(res => {
this.baseData.subShopMerchantList = res || [] this.baseData.subShopMerchantList = res || []
this.getOptionsList() this.getOptionsList()
}) })
}, },
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === 'select') {
if ( if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {} const temp = {}
temp[this.showFormData[index].optionId] = "" temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = "全部" temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp) this.baseData[item.optionsName].unshift(temp)
} }
this.$set( this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
} }
}) })
}, },
...@@ -819,18 +798,13 @@ export default { ...@@ -819,18 +798,13 @@ export default {
const form = this.searchForm const form = this.searchForm
if (form.orderTime && form.orderTime.length) { if (form.orderTime && form.orderTime.length) {
params.placeOrderStartDateStr = Util.dateFormate( params.placeOrderStartDateStr = Util.dateFormate(form.orderTime[0], 'YYYY-MM-DD HH:mm:ss')
form.orderTime[0], params.placeOrderEndDateStr = Util.dateFormate(form.orderTime[1], 'YYYY-MM-DD') + ' 23:59:59'
"YYYY-MM-DD HH:mm:ss"
)
params.placeOrderEndDateStr =
Util.dateFormate(form.orderTime[1], "YYYY-MM-DD") + " 23:59:59"
} }
if (params.sourceList != "") { if (params.sourceList != '') {
// 处理d2-search 下拉选不支持绑定数组的问题 // 处理d2-search 下拉选不支持绑定数组的问题
params.sourceList = params.sourceList = params.sourceList == '1' ? ['1', '2', '3', '4', '5', '6'] : ['7']
params.sourceList == "1" ? ["1", "2", "3", "4", "5", "6"] : ["7"]
} }
return params return params
}, },
...@@ -844,11 +818,9 @@ export default { ...@@ -844,11 +818,9 @@ export default {
...params ...params
} }
// console.log(params) // console.log(params)
getList(params).then((res) => { getList(params).then(res => {
this.tableData = res.list.map((item) => { this.tableData = res.list.map((item) => {
item.paySuccessDate = item.paySuccessDate item.paySuccessDate = item.paySuccessDate ? Util.dateFormate(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') : ''
? Util.dateFormate(item.paySuccessDate, "YYYY-MM-DD HH:mm:ss")
: ""
return item return item
}) })
this.page.pageNum = res.pageNum this.page.pageNum = res.pageNum
...@@ -861,7 +833,7 @@ export default { ...@@ -861,7 +833,7 @@ export default {
params = { params = {
...params ...params
} }
getOrderCount(params).then((res) => { getOrderCount(params).then(res => {
this.totalCount = res.totalPriceCount this.totalCount = res.totalPriceCount
}) })
}, },
...@@ -874,28 +846,28 @@ export default { ...@@ -874,28 +846,28 @@ export default {
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
params.pageNum = 1 params.pageNum = 1
// exportFile(params).then(res => { params.method = 'dj.api.smartcarlife.ordermanage.export.async'
// this.$open(res)
// })
params.method = "dj.api.smartcarlife.ordermanage.export.async"
// asyncExportExcel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
name: "订单列表", name: '订单列表',
exportParam: JSON.stringify(params), exportParam: JSON.stringify(params),
status: "waiting", status: 'waiting',
timeid: new Date().getTime() timeid: new Date().getTime()
} }
] ]
this.actionSetDownloadList({ list, type: "dowloadList" }) this.actionSetDownloadList({ list, type: 'dowloadList' })
// })
}, },
// 查看详情 // 查看详情
handleDetail(data) { handleDetail(data) {
<<<<<<< HEAD
this.close({ tagName: "/orderDetail" }) this.close({ tagName: "/orderDetail" })
=======
// console.log(data.row)
this.close({ tagName: '/orderDetail' })
>>>>>>> 6f8784f1c24acda26aa497e635c8be66bcfcb01d
this.$router.push({ this.$router.push({
name: "orderDetail", name: 'orderDetail',
params: { params: {
detail: data.row, detail: data.row,
signRefundFlag: this.signRefundFlag signRefundFlag: this.signRefundFlag
...@@ -906,7 +878,7 @@ export default { ...@@ -906,7 +878,7 @@ export default {
handlMakeUpOrder(data) { handlMakeUpOrder(data) {
// console.log('跳转订单补录') // console.log('跳转订单补录')
this.$router.push({ this.$router.push({
name: "orderSupplement" name: 'orderSupplement'
// params: { // params: {
// detail: data.row // detail: data.row
// } // }
...@@ -926,16 +898,43 @@ export default { ...@@ -926,16 +898,43 @@ export default {
// 待补录订单数 // 待补录订单数
getWaitinputorderCount() { getWaitinputorderCount() {
waitinputorderCount({}).then((res) => { waitinputorderCount({}).then(res => {
this.waitOrderNum = res.waitInputCount this.waitOrderNum = res.waitInputCount
}) })
}, },
findFormIdx(name) { findFormIdx(name) {
return this.showFormData.findIndex((item) => item.name === name) return this.showFormData.findIndex(item => item.name === name)
},
// 选择对账规则
chooseRule(row) {
this.recordInfo = row
this.ruleVisible = true
},
ruleDialogClose(flag) {
this.ruleVisible = !this.ruleVisible
if (flag) {
this.getList()
}
},
// 分账记录
ruleHistory(row) {
this.recordInfo = row
this.ruleInfoVisible = true
},
ruleInfoDialogClose(flag) {
this.ruleInfoVisible = !this.ruleInfoVisible
// if (flag) {
// this.getList()
// }
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.order_table { .order_table {
...@@ -991,7 +990,6 @@ export default { ...@@ -991,7 +990,6 @@ export default {
.order-list .m-l-md { .order-list .m-l-md {
margin-left: 20px; margin-left: 20px;
} }
// .order-list
.order-list .import-btn { .order-list .import-btn {
position: relative; position: relative;
} }
......
<!-- 订单列表 -->
<template> <template>
<div class="order-list-wrap"> <div class="order-list-wrap">
<div class="header" slot="header" style="background: #e7eaec"> <div class="header"
<el-tabs v-model="activeName" @tab-click="handleClick"> slot="header"
<el-tab-pane style="background: #e7eaec">
v-for="(item, index) in tabPaneList" <el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList"
:label="item.label" :label="item.label"
:name="item.name" :name="item.name"
:key="index" :key="index">
>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<components :is="tabName"></components> <components :is="tabName"></components>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Order from "./order.vue" import Order from "./order.vue"
import CrowdFunding from "./crowdfunding.vue" import CrowdFunding from "./crowdfunding.vue"
...@@ -47,7 +46,7 @@ export default { ...@@ -47,7 +46,7 @@ export default {
tabName: "Order" tabName: "Order"
} }
}, },
mounted() {}, mounted() { },
watch: {}, watch: {},
methods: { methods: {
async getBaseData() { async getBaseData() {
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
@click="cancelRelat(scope.scope)"> @click="cancelRelat(scope.scope)">
取消关联 取消关联
</el-button> </el-button>
<el-button type="text" <!-- <el-button type="text"
v-if="scope.scope.inputStatus == '5'" v-if="scope.scope.inputStatus == '5'"
@click="chooseRule(scope.scope)"> @click="chooseRule(scope.scope)">
发起分账 发起分账
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
v-if="scope.scope.manualFlag == '1'" v-if="scope.scope.manualFlag == '1'"
@click="ruleHistory(scope.scope)"> @click="ruleHistory(scope.scope)">
分账记录 分账记录
</el-button> </el-button> -->
</div> </div>
</template> </template>
</d2-table> </d2-table>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<d2-dialog title="关联活动订单" <d2-dialog title="关联活动订单"
:is-visible="relatActivityVisible" :is-visible="relatActivityVisible"
class="relatActivityDailog" class="relatActivityDailog"
width="70%" width="80%"
@closeDialog="handleClose" @closeDialog="handleClose"
@confirmDialog="handleAddConfirm"> @confirmDialog="handleAddConfirm">
<div> <div>
...@@ -83,12 +83,29 @@ export default { ...@@ -83,12 +83,29 @@ export default {
label: '商户名称', label: '商户名称',
name: 'merchantName', name: 'merchantName',
type: 'input', type: 'input',
maxlength: 20,
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, { }, {
label: '所属活动', label: '所属活动',
name: 'activityName', name: 'activityName',
type: 'input', type: 'input',
maxlength: 20,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '客户名称',
name: 'customerName',
type: 'input',
maxlength: 20,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '手机号',
name: 'customerPhone',
type: 'input',
inputType: "number",
maxlength: 11,
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}], }],
......
<!-- 选择分账规则弹窗 --> <!-- 选择分账规则弹窗 -->
<template> <template>
<d2-dialog title="查看分账操作记录" :is-visible="ruleInfoVisible" class="ruleInfoDialog" width="60%" @closeDialog="handleClose"> <d2-dialog title="查看分账操作记录"
<el-form class="rule-form" label-width="110px" :inline="true"> :is-visible="ruleInfoVisible"
<el-form-item class="d2-drawer-item" label="订单所属商户:"> 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> <span>{{ recordInfo.merchantName }}</span>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" label="主订单编号:"> <el-form-item class="d2-drawer-item"
<span>{{ recordInfo.inputtedOrderCode }}</span> label="主订单编号:">
<!-- <span>{{ recordInfo.inputtedOrderCode }}</span> -->
<span>{{ recordInfo.orderCode }}</span>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" label="订单金额:"> <el-form-item class="d2-drawer-item"
<span>{{ recordInfo.totalFee ? '¥' + recordInfo.totalFee / 100 : '' }}</span> label="订单金额:">
<!-- <span>{{ recordInfo.totalFee ? '¥' + recordInfo.totalFee / 100 : '' }}</span> -->
<span>{{ recordInfo.totalPrice ? '¥' + recordInfo.totalPrice : '' }}</span>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" label="支付时间:"> <el-form-item class="d2-drawer-item"
<span>{{ recordInfo.accountDate }}</span> label="支付时间:">
<!-- <span>{{ recordInfo.accountDate }}</span> -->
<span>{{ recordInfo.paySuccessDate }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="fontD">已应用分账规则:</div> <div class="fontD">已应用分账规则:</div>
<div> <div>
<div class="merchant-checkrecord"> <div class="merchant-checkrecord">
<div class="account-detail" ref="accountDetail"> <div class="account-detail"
ref="accountDetail">
<div v-if="ruleInfo"> <div v-if="ruleInfo">
<p class="sub-title" :class="{ 'sub-border': !ruleInfo.show }"> <p class="sub-title"
:class="{ 'sub-border': !ruleInfo.show }">
<span class="label"> <span class="label">
<span>{{ ruleInfo.formatEffectStartDate }}</span> <span>{{ ruleInfo.formatEffectStartDate }}</span>
<span v-if="ruleInfo.formatEffectStartDate"> - </span> <span v-if="ruleInfo.formatEffectStartDate"> - </span>
...@@ -39,20 +54,27 @@ ...@@ -39,20 +54,27 @@
</p> </p>
</div> </div>
<div v-else class="nothingtips"> <div v-else
<img style="height: 109px; width: 109px" src="../systemConfig/merchant/images/empty.png" /> class="nothingtips">
<img style="height: 109px; width: 109px"
src="../systemConfig/merchant/images/empty.png" />
<p class="title">暂无财务规则</p> <p class="title">暂无财务规则</p>
<p class="tips">快去设置看看~</p> <p class="tips">快去设置看看~</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<el-form class="rule-form" style="marginTop:35px" label-width="110px" :inline="true"> <el-form class="rule-form"
<el-form-item class="d2-drawer-item" label="分账操作人:"> style="marginTop:35px"
<span>{{ recordInfo.updatedBy }}</span> label-width="110px"
:inline="true">
<el-form-item class="d2-drawer-item"
label="分账操作人:">
<span>{{ recordInfo.wioUpdatedBy }}</span>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" label="分账操作时间:"> <el-form-item class="d2-drawer-item"
<span>{{ recordInfo.updatedDate }}</span> label="分账操作时间:">
<span>{{ recordInfo.wioUpdatedDate }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</d2-dialog> </d2-dialog>
...@@ -87,15 +109,17 @@ export default { ...@@ -87,15 +109,17 @@ export default {
}, },
mounted() { mounted() {
this.recordInfo.accountDate = this.recordInfo.accountDate ? Util.dateFormate(this.recordInfo.accountDate, 'YYYY-MM-DD HH:mm:ss') : '' console.log(this.recordInfo);
this.recordInfo.updatedDate = this.recordInfo.updatedDate ? Util.dateFormate(this.recordInfo.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
// this.recordInfo.accountDate = this.recordInfo.accountDate ? Util.dateFormate(this.recordInfo.accountDate, 'YYYY-MM-DD HH:mm:ss') : ''
this.recordInfo.wioUpdatedDate = this.recordInfo.wioUpdatedDate ? Util.dateFormate(this.recordInfo.wioUpdatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
this.getRuleInfo() this.getRuleInfo()
}, },
methods: { methods: {
// 获取分账记录 // 获取分账记录
getRuleInfo() { getRuleInfo() {
getDivisionRecordById({ id: this.recordInfo.effectRuleId }).then(res => { getDivisionRecordById({ id: this.recordInfo.wioEffectRuleId }).then(res => {
this.ruleInfo = res this.ruleInfo = res
const format = "YYYY/MM/DD HH:mm" const format = "YYYY/MM/DD HH:mm"
this.ruleInfo.formatEffectEndDate = this.ruleInfo.effectEndDate this.ruleInfo.formatEffectEndDate = this.ruleInfo.effectEndDate
...@@ -234,7 +258,8 @@ $color: #2a58ad; ...@@ -234,7 +258,8 @@ $color: #2a58ad;
} }
} }
.title {} .title {
}
.type { .type {
margin-top: 6px; margin-top: 6px;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<d2-Container> <d2-Container>
<div class="divece-history"> <div class="divece-history">
<div class="title"> <div class="title">
我是终端编码 {{recordInfo.posTrmNo}}
</div> </div>
<div class="account-detail" <div class="account-detail"
ref="accountDetail"> ref="accountDetail">
...@@ -89,88 +89,17 @@ export default { ...@@ -89,88 +89,17 @@ export default {
return { return {
formArray: [], formArray: [],
recordInfo: null, recordInfo: null,
// testData: [{
// "id": 287,
// "merchantId": 44210956,
// "merchantName": "老梁用车",
// "yqMerchantId": 44210956,
// "yqMerchantName": "老梁用车",
// "effectStartDate": 1672045943000,
// "effectEndDate": null,
// "createdBy": "glsadmin",
// "createdDate": 1672037915000
// }, {
// "id": 285,
// "merchantId": 44210956,
// "merchantName": "老梁用车",
// "yqMerchantId": 44210956,
// "yqMerchantName": "老梁用车",
// "effectStartDate": 1672037366000,
// "effectEndDate": 1672045943000,
// "createdBy": "glsadmin",
// "createdDate": 1672037366000
// }, {
// "id": 103,
// "merchantId": 44210956,
// "merchantName": "老梁用车",
// "yqMerchantId": 44210956,
// "yqMerchantName": "老梁用车",
// "effectStartDate": 1656432000000,
// "effectEndDate": 1656559315000,
// "createdBy": "glsadmin",
// "createdDate": 1656559315000
// }, {
// "id": 97,
// "merchantId": 44210956,
// "merchantName": "老梁用车",
// "yqMerchantId": 44210956,
// "yqMerchantName": "老梁用车",
// "effectStartDate": 1656172800000,
// "effectEndDate": 1656432000000,
// "createdBy": "system",
// "createdDate": 1656432000000
// }, {
// "id": 91,
// "merchantId": 44210956,
// "merchantName": "老梁用车",
// "yqMerchantId": 44210956,
// "yqMerchantName": "老梁用车",
// "effectStartDate": 1656000000000,
// "effectEndDate": 1656172800000,
// "createdBy": "system",
// "createdDate": 1656172800000
// }, {
// "id": 51,
// "merchantId": 44210956,
// "merchantName": "老梁用车",
// "yqMerchantId": 44210956,
// "yqMerchantName": "老梁用车",
// "effectStartDate": 1644545185000,
// "effectEndDate": 1656000000000,
// "createdBy": "system",
// "createdDate": 1656000000000
// }, {
// "id": 50,
// "merchantId": 44210956,
// "merchantName": "老梁用车",
// "yqMerchantId": 44210956,
// "yqMerchantName": "老梁用车",
// "effectStartDate": 1644545169000,
// "effectEndDate": 1644545185000,
// "createdBy": "glsadmin",
// "createdDate": 1644545185000
// }]
} }
}, },
components: { components: {
}, },
computed: {}, computed: {
},
created() { created() {
this.recordInfo = this.$route.params.info
}, },
mounted() { mounted() {
this.recordInfo = this.$route.params.info
this.getHistoryRecord() this.getHistoryRecord()
}, },
methods: { methods: {
...@@ -184,7 +113,6 @@ export default { ...@@ -184,7 +113,6 @@ export default {
this.formArray = this.formArray.map((element, index) => { this.formArray = this.formArray.map((element, index) => {
if (SelectIndex == index) { if (SelectIndex == index) {
element.show = !element.show element.show = !element.show
console.log(element);
} else { } else {
element.show = false element.show = false
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</el-tooltip>: </el-tooltip>:
</span> </span>
<el-input v-model.trim="form.posTrmNo" <el-input v-model.trim="form.posTrmNo"
maxlength="8" maxlength="20"
class="itd" class="itd"
placeholder="请输入POS机的终端编码" placeholder="请输入POS机的终端编码"
:disabled="isDisabled" :disabled="isDisabled"
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
var info = deepClone(res) var info = deepClone(res)
this.form.posTrmNo = info.posTrmNo this.form.posTrmNo = info.posTrmNo
this.form.yqMerchantId = info.yqMerchantId.toString() this.form.yqMerchantId = info.yqMerchantId.toString()
this.form.merchantId = info.merchantId.toString() this.form.merchantId = info.merchantId
}) })
}, },
......
<template> <template>
<div class="classificationCptContainer"> <div class="classificationCptContainer">
<div class="hederContainer"> <div class="hederContainer">
<span class="tips ruleTest">不确定规则是否正确?点击 <el-button @click="ruleTest" <span class="tips ruleTest"
type="text">进行测算</el-button></span> >不确定规则是否正确?点击
<span v-show="goodsTypeGroupDivisionId" <el-button @click="ruleTest" type="text">进行测算</el-button></span
class="tips dimensionTest">未进行分账测试,点击 <el-button @click="getProgress" >
type="text">立即测试</el-button></span> <span v-show="goodsTypeGroupDivisionId" class="tips dimensionTest"
>未进行分账测试,点击
<el-button @click="getProgress" type="text">立即测试</el-button></span
>
</div> </div>
<el-form ref="classification" <el-form
ref="classification"
:model="classificationObj" :model="classificationObj"
:rules="rules" :rules="rules"
label-suffix=":" label-suffix=":"
label-width="180px"> label-width="180px"
>
<p class="edit-sub-title"> <p class="edit-sub-title">
分账品类 分账品类
<!-- <span class="title-tips"></span> --> <!-- <span class="title-tips"></span> -->
</p> </p>
<el-form-item v-if="tabindex" <el-form-item v-if="tabindex" label="选择品类" prop="goodsTypes" required>
label="选择商品"
prop="goodsTypes"
required>
<!-- collapse-tags @change="goodsSelectChange" --> <!-- collapse-tags @change="goodsSelectChange" -->
<el-select v-model="classificationObj.goodsTypes" <el-select
v-model="classificationObj.goodsTypes"
value-key="goodsType" value-key="goodsType"
multiple multiple
placeholder="请选择商品"> placeholder="请选择品类"
<el-option v-for="item in goodsList" >
<el-option
v-for="item in goodsList"
:key="item.goodsType" :key="item.goodsType"
:label="item.goodsTypeName" :label="item.goodsTypeName"
:disabled="item|filterItem(disabledList)" :disabled="item | filterItem(disabledList)"
:value="item" /> :value="item"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<h3 v-if="!tabindex">全部品类</h3> <h3 v-if="!tabindex">全部品类</h3>
<p class="edit-sub-title"> <p class="edit-sub-title">流量方分润</p>
流量方分润 <el-form-item
</p> required
<el-form-item required :label="'手续费计算(仅针对线上支付订单)'"
:label="'手续费计算'"> label-width="310px"
<el-radio-group v-model="classificationObj.shop4sDeductChargeFlag "> >
<el-radio :label="'Y'"> <el-radio-group v-model="classificationObj.shop4sDeductChargeFlag">
扣除手续费 <el-radio :label="'Y'"> 扣除手续费 </el-radio>
</el-radio> <el-radio :label="'N'"> 不扣除手续费 </el-radio>
<el-radio :label="'N'">
不扣除手续费
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div class="trafficSide" <div
v-for="(item,index) in classificationObj.trafficSide" class="trafficSide"
:key="index+100"> v-for="(item, index) in classificationObj.trafficSide"
<el-form-item :label="item.expenseCategoryName" :key="index + 100"
:prop="'trafficSide.'+index+'.expenseCategoryCalculateType'" >
:rules="[{ required: true, message: '请选择分润模式', trigger: 'change' }]" <el-form-item
required> :label="item.expenseCategoryName"
:prop="'trafficSide.' + index + '.calculateMode'"
:rules="[
{ required: true, message: '请选择计算方式', trigger: 'change' }
]"
style="width: 100%"
required
>
<span slot="label"> <span slot="label">
{{ item.expenseCategoryName }} {{ item.expenseCategoryName }}
<!-- content="Top Left 提示文字" --> <!-- content="Top Left 提示文字" -->
<el-tooltip class="item" <el-tooltip class="item" effect="dark" placement="right">
effect="dark"
placement="right">
<template slot="content"> <template slot="content">
<p>计算模式说明:</p>
<p>
按品类计算:按商品对应的品类规则进行计算,多个商品进行结果汇总;
</p>
<p>
按整单计算:按整个订单进行计算,若存在多个商品的整单规则,则取最高的计算结果对应的规则;
</p>
<br />
<p>分润模式说明:</p> <p>分润模式说明:</p>
<p>若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;</p> <p>
<p>若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。</p> 若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;
</p>
<p>
若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。
</p>
<br /> <br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p> <p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p> <p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
...@@ -74,127 +93,257 @@ ...@@ -74,127 +93,257 @@
</el-tooltip> </el-tooltip>
: :
</span> </span>
<el-radio-group
<el-select v-model="classificationObj.trafficSide[index].expenseCategoryCalculateType" v-model="classificationObj.trafficSide[index].calculateMode"
@change="changeShop4sMethodType"
>
<el-radio :label="1"> 按品类计算 </el-radio>
<el-radio :label="2" disabled> 按整单计算 </el-radio>
</el-radio-group>
</el-form-item>
<div style="display: flex">
<el-form-item
required
:prop="'trafficSide.' + index + '.expenseCategoryCalculateType'"
:rules="[
{ required: true, message: '请选择分润模式', trigger: 'change' }
]"
>
<el-select
v-model="
classificationObj.trafficSide[index]
.expenseCategoryCalculateType
"
@change="forceUpdate" @change="forceUpdate"
placeholder="请选择分润模式"> placeholder="请选择分润模式"
<el-option v-for="el in defaultSelectOptions" >
<el-option
v-for="el in defaultSelectOptions"
:key="el.expenseCategoryCalculateType" :key="el.expenseCategoryCalculateType"
:label="el.label" :label="el.label"
:value="el.expenseCategoryCalculateType" /> :value="el.expenseCategoryCalculateType"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- label-width="" --> <!-- label-width="" -->
<el-form-item required <el-form-item
:prop="'trafficSide.'+index+'.expenseCategoryValue'" required
:rules="[{ required: true, message: '请输入分润比例', trigger: ['change', 'blur'] }]" :prop="'trafficSide.' + index + '.expenseCategoryValue'"
label="分润比例设定"> :rules="[
<el-input v-model="classificationObj.trafficSide[index].expenseCategoryValue" {
@input="handleInput($event,'trafficSide',classificationObj.trafficSide[index].expenseCategoryCalculateType,index)" required: true,
style="width:150px" message: '请输入分润比例',
:placeholder="classificationObj.trafficSide[index].expenseCategoryCalculateType|filerPlaceName"> trigger: ['change', 'blur']
}
]"
label="分润比例设定"
>
<el-input
v-model="
classificationObj.trafficSide[index].expenseCategoryValue
"
@input="
handleInput(
$event,
'trafficSide',
classificationObj.trafficSide[index]
.expenseCategoryCalculateType,
index
)
"
style="width: 150px"
:placeholder="
classificationObj.trafficSide[index]
.expenseCategoryCalculateType | filerPlaceName
"
>
<!-- accountSecondSetForm.marketingCostCalculateType== 1?'请输入固定金额': --> <!-- accountSecondSetForm.marketingCostCalculateType== 1?'请输入固定金额': -->
<!-- v-if="accountSecondSetForm.marketingCostCalculateType== 2" --> <!-- v-if="accountSecondSetForm.marketingCostCalculateType== 2" -->
<i slot="suffix" <i
v-if="classificationObj.trafficSide[index].expenseCategoryCalculateType !=3" slot="suffix"
class="suffix">%</i> v-if="
classificationObj.trafficSide[index]
.expenseCategoryCalculateType != 3
"
class="suffix"
>%</i
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
</div>
<p class="edit-sub-title"> <p class="edit-sub-title">服务商分润</p>
服务商分润 <el-form-item
</p> required
<el-form-item required :label="'手续费计算(仅针对线上支付订单)'"
:label="'手续费计算'"> label-width="310px"
<el-radio-group v-model="classificationObj.partnerDeductChargeFlag "> >
<el-radio :label="'Y'"> <el-radio-group v-model="classificationObj.partnerDeductChargeFlag">
扣除手续费 <el-radio :label="'Y'"> 扣除手续费 </el-radio>
</el-radio> <el-radio :label="'N'"> 不扣除手续费 </el-radio>
<el-radio :label="'N'">
不扣除手续费
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div class="serviceProvider" <div
v-for="(item,index) in classificationObj.serviceProvider" class="serviceProvider"
:key="index+200"> v-for="(item, index) in classificationObj.serviceProvider"
<el-form-item :label="item.expenseCategoryName" :key="index + 200"
:prop="'serviceProvider.'+index+'.expenseCategoryCalculateType'" >
:rules="[{ required: true, message: '请选择分润模式', trigger: 'change' }]" <el-form-item
required> :label="item.expenseCategoryName"
:prop="'serviceProvider.' + index + '.calculateMode'"
:rules="[
{ required: true, message: '请选择计算方式', trigger: 'change' }
]"
style="width: 100%"
required
>
<span slot="label"> <span slot="label">
{{ item.expenseCategoryName }} {{ item.expenseCategoryName }}
<!-- content="Top Left 提示文字" --> <!-- content="Top Left 提示文字" -->
<el-tooltip class="item" <el-tooltip class="item" effect="dark" placement="right">
effect="dark"
placement="right">
<template slot="content"> <template slot="content">
<p>计算模式说明:</p>
<p>
按品类计算:按商品对应的品类规则进行计算,多个商品进行结果汇总;
</p>
<p>
按整单计算:按整个订单进行计算,若存在多个商品的整单规则,则取最高的计算结果对应的规则;
</p>
<br />
<p>分润模式说明:</p> <p>分润模式说明:</p>
<p>若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;</p> <p>
<p>若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。</p> 若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;
</p>
<p>
若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。
</p>
<br /> <br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p> <p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p> <p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额</p> <p>按固定金额:费用=定义的固定金额</p>
<p>按(收入-流量方总分润)比例:以(收入-流量方总分润)*(定义的比例)进行费用计算;</p> <p>
<p>按(收入-流量方总分润-其他费用不包含产品成本)比例:以(收入-流量方总分润-其他费用不包含产品成本)*(定义的比例)进行费用计算</p> 按园区店总金额比例:以(收入-流量方总分润)*(定义的比例)进行费用计算;
<p>按(收入-流量方总分润-其他费用包含产品成本)比例:以(收入-流量方总分润-其他费用包含产品成本)*(定义的比例)进行费用计算</p> </p>
<p>
按园区店毛利(不扣除产品成本)比例:以(收入-流量方总分润-其他费用不包含产品成本)*(定义的比例)进行费用计算
</p>
<p>
按园区店毛利比例:以(收入-流量方总分润-其他费用包含产品成本)*(定义的比例)进行费用计算
</p>
</template> </template>
<i class="el-icon-info"></i> <i class="el-icon-info"></i>
</el-tooltip> </el-tooltip>
: :
</span> </span>
<el-select v-model="classificationObj.serviceProvider[index].expenseCategoryCalculateType" <el-radio-group
v-model="classificationObj.serviceProvider[index].calculateMode"
:disabled="classificationObj.serviceProvider[index].isDisabled"
>
<el-radio :label="1"> 按类目计算 </el-radio>
<el-radio :label="2"> 按整单计算 </el-radio>
</el-radio-group>
</el-form-item>
<div style="display: flex">
<el-form-item
required
:prop="'serviceProvider.' + index + '.expenseCategoryCalculateType'"
:rules="[
{ required: true, message: '请选择分润模式', trigger: 'change' }
]"
>
<el-select
v-model="
classificationObj.serviceProvider[index]
.expenseCategoryCalculateType
"
@change="forceUpdate" @change="forceUpdate"
placeholder="请选择分润模式"> placeholder="请选择分润模式"
<el-option v-for="el in severSelectOptions" >
<el-option
v-for="el in severSelectOptions"
:key="el.expenseCategoryCalculateType" :key="el.expenseCategoryCalculateType"
:label="el.label" :label="el.label"
:value="el.expenseCategoryCalculateType" /> :value="el.expenseCategoryCalculateType"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item required <el-form-item
:prop="'serviceProvider.'+index+'.expenseCategoryValue'" required
:rules="[{ required: true, message: '请输入分润比例',trigger: ['change', 'blur'] }]" :prop="'serviceProvider.' + index + '.expenseCategoryValue'"
label="分润比例设定"> :rules="[
{
required: true,
message: '请输入分润比例',
trigger: ['change', 'blur']
}
]"
label="分润比例设定"
>
<!-- expenseCategoryValue --> <!-- expenseCategoryValue -->
<el-input v-model="classificationObj.serviceProvider[index].expenseCategoryValue" <el-input
@input="handleInput($event,'serviceProvider',classificationObj.serviceProvider[index].expenseCategoryCalculateType,index)" v-model="
style="width:150px" classificationObj.serviceProvider[index].expenseCategoryValue
:placeholder="classificationObj.serviceProvider[index].expenseCategoryCalculateType|filerPlaceName"> "
<i slot="suffix" @input="
v-if="classificationObj.serviceProvider[index].expenseCategoryCalculateType !=3" handleInput(
class="suffix">%</i> $event,
'serviceProvider',
classificationObj.serviceProvider[index]
.expenseCategoryCalculateType,
index
)
"
style="width: 150px"
:placeholder="
classificationObj.serviceProvider[index]
.expenseCategoryCalculateType | filerPlaceName
"
>
<i
slot="suffix"
v-if="
classificationObj.serviceProvider[index]
.expenseCategoryCalculateType != 3
"
class="suffix"
>%</i
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="分润服务商"> <el-form-item label="分润服务商">
<el-select v-model="classificationObj.serviceProvider[index].targetMerchant" <el-select
v-model="classificationObj.serviceProvider[index].targetMerchant"
@change="handleSelectChange" @change="handleSelectChange"
value-key="merchantId" value-key="merchantId"
placeholder="请选分润服务商"> placeholder="请选分润服务商"
<el-option v-for="el in serviceMerchantList" >
<el-option
v-for="el in serviceMerchantList"
:key="el.merchantId" :key="el.merchantId"
:label="el.merchantName" :label="el.merchantName"
:value="el" /> :value="el"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
</div>
<p class="edit-sub-title"> <p class="edit-sub-title">
其他费用 其他费用
<span class="title-tips">用于费用预留,进行完流量方和服务商分润后,会自动先预留出对应的费用给承担方</span> <span class="title-tips"
>用于费用预留,进行完流量方和服务商分润后,会自动先预留出对应的费用给承担方</span
>
</p> </p>
<el-form-item required <el-form-item required :label="'产品成本'">
:label="'产品成本'">
<span slot="label"> <span slot="label">
产品成本 产品成本
<!-- content="Top Left 提示文字" --> <!-- content="Top Left 提示文字" -->
<el-tooltip class="item" <el-tooltip class="item" effect="dark" placement="right">
effect="dark"
placement="right">
<template slot="content"> <template slot="content">
<p>开启产品成本,计算分账时会自动预留出产品成本费用给对应的承担方;</p> <p>
开启产品成本,计算分账时会自动预留出产品成本费用给对应的承担方;
</p>
<p>不开启产品成本,计算分账时不自动预留出产品成本费用;</p> <p>不开启产品成本,计算分账时不自动预留出产品成本费用;</p>
</template> </template>
<i class="el-icon-info"></i> <i class="el-icon-info"></i>
...@@ -202,31 +351,44 @@ ...@@ -202,31 +351,44 @@
: :
</span> </span>
<el-radio-group v-model="classificationObj.goodsCostFlag"> <el-radio-group v-model="classificationObj.goodsCostFlag">
<el-radio :label="'N'"> <el-radio :label="'N'"> 不扣除产品成本 </el-radio>
不扣除产品成本 <el-radio :label="'Y'"> 扣除产品成本 </el-radio>
</el-radio>
<el-radio :label="'Y'">
扣除产品成本
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div class="platformPublic" <div
v-for="(item,index) in classificationObj.platformPublic" class="platformPublic"
:key="index+300"> v-for="(item, index) in classificationObj.platformPublic"
<el-form-item :label="item.expenseCategoryName" :key="index + 300"
:prop="'platformPublic.'+index+'.expenseCategoryCalculateType'" >
:rules="[{ required: true, message: '请选择分润模式', trigger: 'change' }]" <el-form-item
required> :label="item.expenseCategoryName"
:prop="'platformPublic.' + index + '.calculateMode'"
:rules="[
{ required: true, message: '请选择计算方式', trigger: 'change' }
]"
style="width: 100%"
required
>
<span slot="label"> <span slot="label">
{{ item.expenseCategoryName }} {{ item.expenseCategoryName }}
<!-- content="Top Left 提示文字" --> <!-- content="Top Left 提示文字" -->
<el-tooltip class="item" <el-tooltip class="item" effect="dark" placement="right">
effect="dark"
placement="right">
<template slot="content"> <template slot="content">
<p>计算模式说明:</p>
<p>
按品类计算:按商品对应的品类规则进行计算,多个商品进行结果汇总;
</p>
<p>
按整单计算:按整个订单进行计算,若存在多个商品的整单规则,则取最高的计算结果对应的规则;
</p>
<br />
<p>分润模式说明:</p> <p>分润模式说明:</p>
<p>若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;</p> <p>
<p>若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。</p> 若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;
</p>
<p>
若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。
</p>
<br /> <br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p> <p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p> <p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
...@@ -236,27 +398,80 @@ ...@@ -236,27 +398,80 @@
</el-tooltip> </el-tooltip>
: :
</span> </span>
<el-select v-model="classificationObj.platformPublic[index].expenseCategoryCalculateType" <el-radio-group
placeholder="请选择分润模式"> v-model="classificationObj.platformPublic[index].calculateMode"
<el-option v-for="el in defaultSelectOptions" :disabled="classificationObj.platformPublic[index].isDisabled"
>
<el-radio :label="1"> 按类目计算 </el-radio>
<el-radio :label="2"> 按整单计算 </el-radio>
</el-radio-group>
</el-form-item>
<div>
<el-form-item
:prop="'platformPublic.' + index + '.expenseCategoryCalculateType'"
:rules="[
{ required: true, message: '请选择分润模式', trigger: 'change' }
]"
required
>
<el-select
v-model="
classificationObj.platformPublic[index]
.expenseCategoryCalculateType
"
placeholder="请选择分润模式"
>
<el-option
v-for="el in defaultSelectOptions"
:key="el.expenseCategoryCalculateType" :key="el.expenseCategoryCalculateType"
:label="el.label" :label="el.label"
:value="el.expenseCategoryCalculateType" /> :value="el.expenseCategoryCalculateType"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item required </div>
:prop="'platformPublic.'+index+'.expenseCategoryValue'" <el-form-item
:rules="[{ required: true, message: '请输入分润比例', trigger: ['change', 'blur']}]" required
label="分润比例设定"> :prop="'platformPublic.' + index + '.expenseCategoryValue'"
<el-input v-model="classificationObj.platformPublic[index].expenseCategoryValue" :rules="[
@input="handleInput($event,'platformPublic',classificationObj.platformPublic[index].expenseCategoryCalculateType,index)" {
style="width:150px" required: true,
:placeholder="classificationObj.platformPublic[index].expenseCategoryCalculateType|filerPlaceName"> message: '请输入分润比例',
trigger: ['change', 'blur']
}
]"
label="分润比例设定"
>
<el-input
v-model="
classificationObj.platformPublic[index].expenseCategoryValue
"
@input="
handleInput(
$event,
'platformPublic',
classificationObj.platformPublic[index]
.expenseCategoryCalculateType,
index
)
"
style="width: 150px"
:placeholder="
classificationObj.platformPublic[index]
.expenseCategoryCalculateType | filerPlaceName
"
>
<!-- accountSecondSetForm.marketingCostCalculateType== 1?'请输入固定金额': --> <!-- accountSecondSetForm.marketingCostCalculateType== 1?'请输入固定金额': -->
<!-- v-if="accountSecondSetForm.marketingCostCalculateType== 2" --> <!-- v-if="accountSecondSetForm.marketingCostCalculateType== 2" -->
<i slot="suffix" <i
v-if="classificationObj.platformPublic[index].expenseCategoryCalculateType !=3" slot="suffix"
class="suffix">%</i> v-if="
classificationObj.platformPublic[index]
.expenseCategoryCalculateType != 3
"
class="suffix"
>%</i
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -264,34 +479,44 @@ ...@@ -264,34 +479,44 @@
<!-- <p>区别</p> --> <!-- <p>区别</p> -->
</el-form> </el-form>
<!-- <el-button @click="handleConfirm">测试</el-button> --> <!-- <el-button @click="handleConfirm">测试</el-button> -->
<tableAccount ref="tableAccount" <tableAccount
:merchant-distribution-rules="goodsTypeGroupRules.merchantDistributionRules" ref="tableAccount"
:merchant-distribution-rules="
goodsTypeGroupRules.merchantDistributionRules
"
:table-select-options="tableSelectOptions" :table-select-options="tableSelectOptions"
:classification-obj-select="tableClassificationObjSelect" /> :classification-obj-select="tableClassificationObjSelect"
<tipsDialog v-if="tipsDialogVisible" />
<tipsDialog
v-if="tipsDialogVisible"
:account-valid-merchants="accountValidMerchants" :account-valid-merchants="accountValidMerchants"
:visible.sync="tipsDialogVisible" /> :visible.sync="tipsDialogVisible"
<financialCalculationDialog v-if="financialCalculationVisible" />
<financialCalculationDialog
v-if="financialCalculationVisible"
v-on="$listeners" v-on="$listeners"
:financial-calculation-obj="financialCalculationObj" :financial-calculation-obj="financialCalculationObj"
:visible.sync="financialCalculationVisible" /> :visible.sync="financialCalculationVisible"
/>
</div> </div>
</template> </template>
<script> <script>
// 1按毛利比例;2按收入比例;3按固定金额 // 1按毛利比例;2按收入比例;3按固定金额
// 1按收入比例;2按毛利比例;3按固定金额;4按(产值-流量成本)比例;5按(产值-流量成本-其他费用不包含产品成本))比例;6按(产值-流量成本-其他费用包含产品成本)比例);其他费用:1按收入比例 // 1按收入比例;2按毛利比例;3按固定金额;4按(产值-流量成本)比例;5按(产值-流量成本-其他费用不包含产品成本))比例;6按(产值-流量成本-其他费用包含产品成本)比例);其他费用:1按收入比例
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from "vuex"
import tableAccount from './tableAccount' import tableAccount from "./tableAccount"
import { limitPrice } from '@/common/format' import { limitPrice } from "@/common/format"
import { deepClone } from '@/common/util' import { deepClone } from "@/common/util"
import { divisionRuleTestGet } from '@api/merchant' import { divisionRuleTestGet } from "@api/merchant"
import { defaultSelectOptions, severSelectOptions } from '@/common/constant/merchant' import {
import tipsDialog from './tipsDialog' defaultSelectOptions,
import financialCalculationDialog from './financialCalculationDialog.vue' severSelectOptions
} from "@/common/constant/merchant"
import tipsDialog from "./tipsDialog"
import financialCalculationDialog from "./financialCalculationDialog.vue"
export default { export default {
name: 'ClassificationCpt', name: "ClassificationCpt",
components: { components: {
tableAccount, tableAccount,
tipsDialog, tipsDialog,
...@@ -324,16 +549,15 @@ export default { ...@@ -324,16 +549,15 @@ export default {
return {} return {}
} }
}, },
classificationObjSelect: // 类目选择 // 类目选择
{ classificationObjSelect: {
type: Object, type: Object,
default() { default() {
return {} return {}
} }
}, },
// 平台方和导流方 // 平台方和导流方
financialLedgerParty: financialLedgerParty: {
{
type: Object, type: Object,
default() { default() {
return {} return {}
...@@ -365,9 +589,9 @@ export default { ...@@ -365,9 +589,9 @@ export default {
// serviceProviderSide: [], // serviceProviderSide: [],
// platformPublic: [], // platformPublic: [],
// expenseCategoryRules: [] // expenseCategoryRules: []
shop4sDeductChargeFlag: 'Y', // 导流方POS机支付是否扣除手续费(Y:扣除,N:不扣) shop4sDeductChargeFlag: "Y", // 导流方POS机支付是否扣除手续费(Y:扣除,N:不扣)
partnerDeductChargeFlag: 'Y', // 服务商POS机支付是否扣除手续费(Y:扣除,N:不扣) partnerDeductChargeFlag: "Y", // 服务商POS机支付是否扣除手续费(Y:扣除,N:不扣)
goodsCostFlag: 'Y', // 平台方是否扣除产品成本(Y:计算,N:不计算) goodsCostFlag: "Y", // 平台方是否扣除产品成本(Y:计算,N:不计算)
groupType: 1 groupType: 1
// expenseCategoryRules: [ // expenseCategoryRules: [
// { // {
...@@ -384,11 +608,12 @@ export default { ...@@ -384,11 +608,12 @@ export default {
severSelectOptions: Object.freeze(severSelectOptions), severSelectOptions: Object.freeze(severSelectOptions),
// serviceMerchantList: [], // serviceMerchantList: [],
rules: { rules: {
goodsTypes: [{ required: true, message: '请选择商品', trigger: 'change' }] goodsTypes: [
{ required: true, message: "请选择品类", trigger: "change" }
]
}, },
serviceSelectList: [], serviceSelectList: [],
financialCalculationObj: {} financialCalculationObj: {}
} }
}, },
computed: { computed: {
...@@ -407,7 +632,11 @@ export default { ...@@ -407,7 +632,11 @@ export default {
const list = this.goodsSelectList.filter((item) => { const list = this.goodsSelectList.filter((item) => {
// item.goodsType // item.goodsType
// const flag = selectList.findIndex(el => { return el.goodsType == item.goodsType }) // const flag = selectList.findIndex(el => { return el.goodsType == item.goodsType })
if (selectList.findIndex(el => { return el.goodsType == item.goodsType }) == -1) { if (
selectList.findIndex((el) => {
return el.goodsType == item.goodsType
}) == -1
) {
return item return item
} }
}) })
...@@ -439,11 +668,12 @@ export default { ...@@ -439,11 +668,12 @@ export default {
// return false // return false
const obj = deepClone(this.classificationObjSelect) const obj = deepClone(this.classificationObjSelect)
if (this.classificationObj.goodsCostFlag == 'Y') { if (this.classificationObj.goodsCostFlag == "Y") {
// console.log(obj, 'obj') // console.log(obj, 'obj')
const arr = [{ const arr = [
{
id: 3, id: 3,
applicationObjectName: '产品成本', applicationObjectName: "产品成本",
applicationObjectType: 3 applicationObjectType: 3
} }
] ]
...@@ -452,9 +682,10 @@ export default { ...@@ -452,9 +682,10 @@ export default {
// platformPublic // platformPublic
} }
obj.platformPublic && obj.platformPublic.push({ obj.platformPublic &&
obj.platformPublic.push({
id: 4, id: 4,
applicationObjectName: '手续费', applicationObjectName: "手续费",
applicationObjectType: 3 applicationObjectType: 3
}) })
return obj return obj
...@@ -463,39 +694,42 @@ export default { ...@@ -463,39 +694,42 @@ export default {
// } // }
}, },
goodsTypeGroupDivisionId() { goodsTypeGroupDivisionId() {
console.log(this.tabItem.groupDivisionRuleId, 'this.tabItem.groupDivisionRuleId') console.log(
const id = this.tabItem.testFlag != 'Y' ? this.tabItem.groupDivisionRuleId : false this.tabItem.groupDivisionRuleId,
"this.tabItem.groupDivisionRuleId"
)
const id =
this.tabItem.testFlag != "Y" ? this.tabItem.groupDivisionRuleId : false
return id || false return id || false
} }
}, },
filters: { filters: {
filterItem(item, list) { filterItem(item, list) {
return list.findIndex(el => el.goodsType == item.goodsType) != -1 return list.findIndex((el) => el.goodsType == item.goodsType) != -1
}, },
filerPlaceName(value) { filerPlaceName(value) {
// value? :'' // value? :''
if (!value) return '' if (!value) return ""
return value == 3 ? '请输入金额' : '请输入比例' return value == 3 ? "请输入金额" : "请输入比例"
} }
}, },
watch: { watch: {
// 解决商品取消选择的数据锁死问题 // 解决商品取消选择的数据锁死问题
'classificationObj.goodsTypes': { "classificationObj.goodsTypes": {
handler(val, oldVal) { handler(val, oldVal) {
// console.log(oldVal) // console.log(oldVal)
// console.log(val, 'val') // console.log(val, 'val')
if (val.length < oldVal.length) { if (val.length < oldVal.length) {
// 对比出已经取消的商品 // 对比出已经取消的商品
const deleteItem = oldVal.find(item => { const deleteItem = oldVal.find((item) => {
if (!val.find(el => el.goodsType == item.goodsType)) { if (!val.find((el) => el.goodsType == item.goodsType)) {
return item return item
} }
}) })
// console.log(deleteItem) // console.log(deleteItem)
this.$emit('deleteGoodsItem', deleteItem) this.$emit("deleteGoodsItem", deleteItem)
} else { } else {
this.$emit('assignGoodsList', val) this.$emit("assignGoodsList", val)
} }
}, },
deep: true deep: true
...@@ -528,7 +762,7 @@ export default { ...@@ -528,7 +762,7 @@ export default {
deep: true deep: true
// immediate: true // immediate: true
}, },
'tabItem.groupDivisionRuleId': { "tabItem.groupDivisionRuleId": {
handler() { handler() {
this.resetGoodsTypeGroupDivisionId() this.resetGoodsTypeGroupDivisionId()
}, },
...@@ -541,18 +775,24 @@ export default { ...@@ -541,18 +775,24 @@ export default {
}, },
methods: { methods: {
...mapActions('FinancialRules', ['reset']), ...mapActions("FinancialRules", ["reset"]),
// ...mapMutations('FinancialRules', ['toggle', 'set']), // ...mapMutations('FinancialRules', ['toggle', 'set']),
resetGoodsTypeGroupDivisionId() { resetGoodsTypeGroupDivisionId() {
// goodsTypeGroupDivisionId() { // goodsTypeGroupDivisionId() {
console.log(this.tabItem.groupDivisionRuleId, 'this.tabItem.groupDivisionRuleId') console.log(
this.tabItem.groupDivisionRuleId,
"this.tabItem.groupDivisionRuleId"
)
// const id = this.tabItem.testFlag != 'Y' ? this.tabItem.groupDivisionRuleId : false // const id = this.tabItem.testFlag != 'Y' ? this.tabItem.groupDivisionRuleId : false
// this.goodsTypeGroupDivisionId = id || false // this.goodsTypeGroupDivisionId = id || false
// } // }
}, },
getProgress() { getProgress() {
// groupDivisionRuleId:118 // groupDivisionRuleId:118
this.goodsTypeGroupDivisionId && divisionRuleTestGet({ goodsTypeGroupDivisionId: this.goodsTypeGroupDivisionId }).then((result) => { this.goodsTypeGroupDivisionId &&
divisionRuleTestGet({
goodsTypeGroupDivisionId: this.goodsTypeGroupDivisionId
}).then((result) => {
const { subProgress, accountValidMerchants } = result const { subProgress, accountValidMerchants } = result
// 没有虚拟对公账户 // 没有虚拟对公账户
if (subProgress == 32) { if (subProgress == 32) {
...@@ -564,43 +804,51 @@ export default { ...@@ -564,43 +804,51 @@ export default {
this.financialCalculationVisible = true this.financialCalculationVisible = true
this.financialCalculationObj = result this.financialCalculationObj = result
} }
console.log('result', result) console.log("result", result)
}) })
}, },
ruleTest() { ruleTest() {
this.$emit('rulesTest') this.$emit("rulesTest")
}, },
handleInput(newValue, name, type, index) { handleInput(newValue, name, type, index) {
// 'expenseCategoryValue' // 'expenseCategoryValue'
// expenseCategoryValue // expenseCategoryValue
// debugger // debugger
const valueName = this.classificationObj[name][index] const valueName = this.classificationObj[name][index]
console.log(valueName, 'valueName') console.log(valueName, "valueName")
// debugger // debugger
// const obj = this.classificationObj[name][index] // const obj = this.classificationObj[name][index]
// console.log(obj) // console.log(obj)
// // obj.expenseCategoryValue = newValue // // obj.expenseCategoryValue = newValue
// // this.$set(this.classificationObj[name], index, obj) // // this.$set(this.classificationObj[name], index, obj)
// return // return
newValue = newValue.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符 newValue = newValue.replace(/[^\d.]/g, "") // 清除“数字”和“.”以外的字符
console.log(newValue) console.log(newValue)
console.log(name, 'name', type, 'type', index, 'index') console.log(name, "name", type, "type", index, "index")
// const handleName = this.classificationObj[name][index] // const handleName = this.classificationObj[name][index]
// 按金额 // 按金额
if (type == 3) { if (type == 3) {
// this.classificationObj[name][index].expenseCategoryValue = limitPrice(newValue, this.accountSecondSetForm[name], 10, 2) // this.classificationObj[name][index].expenseCategoryValue = limitPrice(newValue, this.accountSecondSetForm[name], 10, 2)
valueName.expenseCategoryValue = limitPrice(newValue, valueName.expenseCategoryValue, 10, 2) valueName.expenseCategoryValue = limitPrice(
newValue,
valueName.expenseCategoryValue,
10,
2
)
// 按百分比 // 按百分比
} else { } else {
// console.log(newValue) // console.log(newValue)
// 验证第一个字符是数字 // 验证第一个字符是数字
newValue = newValue.replace(/^\./g, '') newValue = newValue.replace(/^\./g, "")
// 只保留第一个, 清除多余的 // 只保留第一个, 清除多余的
newValue = newValue.replace(/\.{2,}/g, '.') newValue = newValue.replace(/\.{2,}/g, ".")
newValue = newValue.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.') newValue = newValue
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".")
// 只能输入两个小数 // 只能输入两个小数
// eslint-disable-next-line no-useless-escape // eslint-disable-next-line no-useless-escape
newValue = newValue.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') newValue = newValue.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")
if (newValue > 100) newValue = 100 if (newValue > 100) newValue = 100
if (newValue < 0) newValue = 0 if (newValue < 0) newValue = 0
...@@ -614,7 +862,8 @@ export default { ...@@ -614,7 +862,8 @@ export default {
initList() { initList() {
this.classificationObj.groupType = this.tabindex ? 1 : 2 this.classificationObj.groupType = this.tabindex ? 1 : 2
// this.goodsTypeGroupRules // this.goodsTypeGroupRules
const expenseCategoryRules = deepClone(this.goodsTypeGroupRules.expenseCategoryRules) || [] const expenseCategoryRules =
deepClone(this.goodsTypeGroupRules.expenseCategoryRules) || []
// console.log('expenseCategoryRules', expenseCategoryRules) // console.log('expenseCategoryRules', expenseCategoryRules)
const setList = this.classificationObjSelect const setList = this.classificationObjSelect
// const list = {} // const list = {}
...@@ -625,18 +874,22 @@ export default { ...@@ -625,18 +874,22 @@ export default {
this.classificationObj[key] = [] this.classificationObj[key] = []
setList[key].forEach((item) => { setList[key].forEach((item) => {
// console.log(item) // console.log(item)
const editObj = expenseCategoryRules.find(el => el.expenseCategoryId == item.id) || {} const editObj =
expenseCategoryRules.find(
(el) => el.expenseCategoryId == item.id
) || {}
// console.log(editObj) // console.log(editObj)
const obj = { const obj = {
expenseCategoryCalculateType: '', // 计算方式 expenseCategoryCalculateType: "", // 计算方式
expenseCategoryValue: '', // 费用类目计算值(%/元) expenseCategoryValue: "", // 费用类目计算值(%/元)
targetMerchantName: '', targetMerchantName: "",
targetMerchantId: '', targetMerchantId: "",
expenseCategoryId: item.id, // 费用类目id expenseCategoryId: item.id, // 费用类目id
expenseCategoryName: item.applicationObjectName // 费用类目名 expenseCategoryName: item.applicationObjectName, // 费用类目名
calculateMode: item.calculateMode || 1 // 计算模式
// { applicationObjectType: 1, applicationObjectName: 'test1', id: 1 } // { applicationObjectType: 1, applicationObjectName: 'test1', id: 1 }
} }
if (key == 'serviceProvider') { if (key == "serviceProvider") {
// if (editObj) { // if (editObj) {
// debugger // debugger
// } // }
...@@ -650,9 +903,16 @@ export default { ...@@ -650,9 +903,16 @@ export default {
}) })
} }
// 需要拷贝的值 // 需要拷贝的值
const keyNameList = ['shop4sDeductChargeFlag', 'partnerDeductChargeFlag', 'goodsCostFlag', 'groupType', 'goodsTypes'] const keyNameList = [
"shop4sDeductChargeFlag",
"partnerDeductChargeFlag",
"goodsCostFlag",
"groupType",
"goodsTypes"
]
keyNameList.forEach((item) => { keyNameList.forEach((item) => {
this.goodsTypeGroupRules[item] && (this.classificationObj[item] = this.goodsTypeGroupRules[item]) this.goodsTypeGroupRules[item] &&
(this.classificationObj[item] = this.goodsTypeGroupRules[item])
}) })
this.classificationObj = deepClone(this.classificationObj) this.classificationObj = deepClone(this.classificationObj)
// console.log(list) // console.log(list)
...@@ -663,17 +923,66 @@ export default { ...@@ -663,17 +923,66 @@ export default {
this.$forceUpdate() // 强制更新 this.$forceUpdate() // 强制更新
}, },
// 切换流量方分润计算方式
changeShop4sMethodType(e) {
if (e == 2) {
// 流量方分润是按整单计算 服务商分润/其它费用同步为整单不可操作
this.classificationObj.serviceProvider.forEach((val, index) => {
this.$set(
this.classificationObj.serviceProvider[index],
"calculateMode",
2
)
this.$set(
this.classificationObj.serviceProvider[index],
"isDisabled",
true
)
})
this.classificationObj.platformPublic.forEach((val, index) => {
this.$set(
this.classificationObj.platformPublic[index],
"calculateMode",
2
)
this.$set(
this.classificationObj.platformPublic[index],
"isDisabled",
true
)
})
} else {
this.classificationObj.serviceProvider.forEach((val, index) => {
this.$set(
this.classificationObj.serviceProvider[index],
"isDisabled",
false
)
})
this.classificationObj.platformPublic.forEach((val, index) => {
this.$set(
this.classificationObj.platformPublic[index],
"isDisabled",
false
)
})
}
},
handleSelectChange() { handleSelectChange() {
// console.log('handleSelectChange') // console.log('handleSelectChange')
this.forceUpdate() this.forceUpdate()
const serviceProviderList = this.classificationObj.serviceProvider const serviceProviderList = this.classificationObj.serviceProvider
let list = [] let list = []
// console.log('serviceProviderList', serviceProviderList) // console.log('serviceProviderList', serviceProviderList)
if (typeof serviceProviderList == 'object' && serviceProviderList.length > 0) { if (
typeof serviceProviderList == "object" &&
serviceProviderList.length > 0
) {
list = serviceProviderList.reduce((pre, cur) => { list = serviceProviderList.reduce((pre, cur) => {
const id = cur.targetMerchant.merchantId const id = cur.targetMerchant.merchantId
// 数组对象去重 // 数组对象去重
if (id && pre.findIndex(el => el.merchantId == id) == -1) { if (id && pre.findIndex((el) => el.merchantId == id) == -1) {
// console.log(cur) // console.log(cur)
pre.push({ pre.push({
merchantId: id, merchantId: id,
...@@ -692,7 +1001,7 @@ export default { ...@@ -692,7 +1001,7 @@ export default {
const expenseCategoryRules = [] const expenseCategoryRules = []
// 合并出对象的集合 类目对象合集 // 合并出对象的集合 类目对象合集
for (const key in obj) { for (const key in obj) {
if (Array.isArray(obj[key]) && key != 'goodsTypes') { if (Array.isArray(obj[key]) && key != "goodsTypes") {
const list = obj[key].map((cur) => { const list = obj[key].map((cur) => {
return { return {
...cur, ...cur,
...@@ -736,8 +1045,10 @@ export default { ...@@ -736,8 +1045,10 @@ export default {
// console.log(this.getParams()) // console.log(this.getParams())
const obj = this.getParams() const obj = this.getParams()
const res = await this.$refs.tableAccount.handleConfirm() const res = await this.$refs.tableAccount.handleConfirm()
console.log('res', { ...obj, merchantDistributionRules: res }) console.log("res", { ...obj, merchantDistributionRules: res })
res ? resolve({ ...obj, merchantDistributionRules: res }) : resolve(false) res
? resolve({ ...obj, merchantDistributionRules: res })
: resolve(false)
} else { } else {
resolve(false) resolve(false)
} }
...@@ -790,6 +1101,7 @@ export default { ...@@ -790,6 +1101,7 @@ export default {
.platformPublic, .platformPublic,
.serviceProvider { .serviceProvider {
display: flex; display: flex;
flex-flow: column;
.el-form-item { .el-form-item {
width: 25%; width: 25%;
} }
......
...@@ -55,14 +55,21 @@ ...@@ -55,14 +55,21 @@
:data="categoryTableData.expenseCategoryCalculatedItemForRuleTestsResults"> :data="categoryTableData.expenseCategoryCalculatedItemForRuleTestsResults">
<el-table-column prop="targetType" <el-table-column prop="targetType"
label="类型" label="类型"
width="200"> width="143">
<template slot-scope="scope"> <template slot-scope="scope">
{{ targetType[scope.row.targetType] }} {{ targetType[scope.row.targetType] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="expenseCategoryName" <el-table-column prop="expenseCategoryName"
label="分账类目" label="分账类目"
width="200" /> width="143" />
<el-table-column prop="calculateMode"
label="计算模式"
width="143">
<template slot-scope="scope">
<span>{{ scope.row.calculateMode == 1 ? '按类目计算' : scope.row.calculateMode == 2 ? '按整单计算' : '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="expenseCategoryCalculateType" <el-table-column prop="expenseCategoryCalculateType"
label="分账规则"> label="分账规则">
<!-- width="180" --> <!-- width="180" -->
......
...@@ -6,17 +6,17 @@ ...@@ -6,17 +6,17 @@
label-suffix=":" label-suffix=":"
label-width="180px"> label-width="180px">
<p class="edit-sub-title"> <p class="edit-sub-title">
分账品类 对账品类
<!-- <span class="title-tips">阿斯顿</span> --> <!-- <span class="title-tips">阿斯顿</span> -->
</p> </p>
<el-form-item label-width="234px" <el-form-item label-width="234px"
v-if="tabindex" v-if="tabindex"
label="选择商品" label="选择品类"
prop="goodsTypeGroupRelations" prop="goodsTypeGroupRelations"
:rules="[ :rules="[
{ {
required: true, required: true,
message: '请选择商品', message: '请选择品类',
trigger: 'blur' trigger: 'blur'
} }
]"> ]">
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
@change="goodsSelectChange" @change="goodsSelectChange"
value-key="goodsType" value-key="goodsType"
multiple multiple
placeholder="请选择商品"> placeholder="请选择品类">
<el-option v-for="item in goodsList" <el-option v-for="item in goodsList"
:key="item.goodsType" :key="item.goodsType"
:label="item.goodsTypeName" :label="item.goodsTypeName"
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<p v-if="!tabindex" <p v-if="!tabindex"
class="store">全部商品</p> class="store">全部分类</p>
<!-- 流量方 --> <!-- 流量方 -->
<p class="edit-sub-title"> <p class="edit-sub-title">
流量方分润 流量方分润
...@@ -48,7 +48,39 @@ ...@@ -48,7 +48,39 @@
<!-- .feeCategoryNameList[0] --> <!-- .feeCategoryNameList[0] -->
<el-form-item :label="floweItem.feeCategoryName" <el-form-item :label="floweItem.feeCategoryName"
label-width="234px" label-width="234px"
:prop="'flowCostArr.' + floweIdx + '.calculateMode'"
:rules="[{ required: true, message: '请选择计算方式', trigger: 'change' }]"
required> required>
<span slot="label">
{{ floweItem.feeCategoryName }}
<el-tooltip class="item"
effect="dark"
placement="right">
<template slot="content">
<p>计算模式说明:</p>
<p>按品类计算:按商品对应的品类规则进行计算,多个商品进行结果汇总;</p>
<p>按整单计算:按整个订单进行计算,若存在多个商品的整单规则,则取最高的计算结果对应的规则;</p>
<br />
<p>对账模式说明:</p>
<p>若服务商分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;</p>
<p>若服务商分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。</p>
<br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
</span>
<el-radio-group v-model="classificationObj.flowCostArr[floweIdx].calculateMode" @change="changeCalculateMode">
<el-radio :label="1">
按类目计算
</el-radio>
<el-radio :label="2" disabled>
按整单计算
</el-radio>
</el-radio-group>
</el-form-item>
<div class="multiple-type"> <div class="multiple-type">
<el-form-item :prop=" <el-form-item :prop="
'flowCostArr.' + floweIdx + '.expenseCategoryCalculateType' 'flowCostArr.' + floweIdx + '.expenseCategoryCalculateType'
...@@ -59,7 +91,7 @@ ...@@ -59,7 +91,7 @@
message: '请选择对账费用', message: '请选择对账费用',
trigger: 'blur' trigger: 'blur'
} }
]"> ]" label-width="234px">
<el-select class="w432" <el-select class="w432"
v-model=" v-model="
classificationObj.flowCostArr[floweIdx] classificationObj.flowCostArr[floweIdx]
...@@ -111,7 +143,6 @@ ...@@ -111,7 +143,6 @@
</el-form-item> </el-form-item>
</div> </div>
</el-form-item>
<el-form-item label="对账对象" <el-form-item label="对账对象"
label-width="234px"> label-width="234px">
<!-- @change="flowListChange" --> <!-- @change="flowListChange" -->
...@@ -152,7 +183,7 @@ ...@@ -152,7 +183,7 @@
<!-- 服务方 --> <!-- 服务方 -->
<p class="edit-sub-title"> <p class="edit-sub-title">
服务商分润 服务商分润
<span class="title-tips">系统基于分账计算结果,将流量方总分润按照以下对账规则进行拆分,不影响原有分账结果</span> <span class="title-tips">系统基于分账计算结果,将服务商总分润按照以下对账规则进行拆分,不影响原有分账结果</span>
</p> </p>
<template v-if="titleListServe.length != 0"> <template v-if="titleListServe.length != 0">
<div v-for="(serveItem, serveIdx) in titleListServe" <div v-for="(serveItem, serveIdx) in titleListServe"
...@@ -160,7 +191,40 @@ ...@@ -160,7 +191,40 @@
<template v-if="serveIdx != titleListServe.length - 1"> <template v-if="serveIdx != titleListServe.length - 1">
<el-form-item :label="serveItem.feeCategoryName" <el-form-item :label="serveItem.feeCategoryName"
label-width="234px" label-width="234px"
:prop="'serviceCostArr.' + serveIdx + '.calculateMode'"
:rules="[{ required: true, message: '请选择计算方式', trigger: 'change' }]"
required> required>
<span slot="label">
{{ serveItem.feeCategoryName }}
<el-tooltip class="item"
effect="dark"
placement="right">
<template slot="content">
<p>计算模式说明:</p>
<p>按品类计算:按商品对应的品类规则进行计算,多个商品进行结果汇总;</p>
<p>按整单计算:按整个订单进行计算,若存在多个商品的整单规则,则取最高的计算结果对应的规则;</p>
<br />
<p>对账模式说明:</p>
<p>若服务商分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;</p>
<p>若服务商分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。</p>
<br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
:
</span>
<el-radio-group v-model="classificationObj.serviceCostArr[serveIdx].calculateMode" :disabled="classificationObj.serviceCostArr[serveIdx].calculateModeDisabled">
<el-radio :label="1">
按类目计算
</el-radio>
<el-radio :label="2">
按整单计算
</el-radio>
</el-radio-group>
</el-form-item>
<div class="multiple-type"> <div class="multiple-type">
<el-form-item :prop=" <el-form-item :prop="
'serviceCostArr.' + 'serviceCostArr.' +
...@@ -173,7 +237,7 @@ ...@@ -173,7 +237,7 @@
message: '请选择对账费用', message: '请选择对账费用',
trigger: 'blur' trigger: 'blur'
} }
]"> ]" label-width="234px">
<el-select class="w432" <el-select class="w432"
v-model=" v-model="
classificationObj.serviceCostArr[serveIdx] classificationObj.serviceCostArr[serveIdx]
...@@ -225,7 +289,6 @@ ...@@ -225,7 +289,6 @@
</el-form-item> </el-form-item>
</div> </div>
</el-form-item>
<el-form-item label="对账对象" <el-form-item label="对账对象"
label-width="234px"> label-width="234px">
<el-select class="w432" <el-select class="w432"
...@@ -375,20 +438,21 @@ export default { ...@@ -375,20 +438,21 @@ export default {
expenseCategoryCalculateTypeName: "按固定金额", expenseCategoryCalculateTypeName: "按固定金额",
expenseCategoryCalculateType: 3 expenseCategoryCalculateType: 3
}, },
{ // v4.16.1 按整单计算需求 删除 服务商费用项
expenseCategoryCalculateTypeName: "按(产值-流量方总分润)比例", // {
expenseCategoryCalculateType: 4 // expenseCategoryCalculateTypeName: "按(产值-流量方总分润)比例",
}, // expenseCategoryCalculateType: 4
{ // },
expenseCategoryCalculateTypeName: // {
"按(产值-流量方总分润-其他费用不包含产品成本)比例", // expenseCategoryCalculateTypeName:
expenseCategoryCalculateType: 5 // "按(产值-流量方总分润-其他费用不包含产品成本)比例",
}, // expenseCategoryCalculateType: 5
{ // },
expenseCategoryCalculateTypeName: // {
"按(产值-流量方总分润-其他费用包含产品成本)比例", // expenseCategoryCalculateTypeName:
expenseCategoryCalculateType: 6 // "按(产值-流量方总分润-其他费用包含产品成本)比例",
} // expenseCategoryCalculateType: 6
// }
], // 服务商费用列表 ], // 服务商费用列表
flowList: [], // 流量方列表 flowList: [], // 流量方列表
serveList: [], // 服务商列表 serveList: [], // 服务商列表
...@@ -580,6 +644,7 @@ export default { ...@@ -580,6 +644,7 @@ export default {
that.classificationObj.flowCostArr[index].expenseCategoryId = item.id that.classificationObj.flowCostArr[index].expenseCategoryId = item.id
that.classificationObj.flowCostArr[index].expenseCategoryName = that.classificationObj.flowCostArr[index].expenseCategoryName =
item.feeCategoryName item.feeCategoryName
that.classificationObj.flowCostArr[index].calculateMode = item.calculateMode || 1
}) })
} }
}, },
...@@ -625,6 +690,7 @@ export default { ...@@ -625,6 +690,7 @@ export default {
item.id item.id
that.classificationObj.serviceCostArr[index].expenseCategoryName = that.classificationObj.serviceCostArr[index].expenseCategoryName =
item.feeCategoryName item.feeCategoryName
that.classificationObj.serviceCostArr[index].calculateMode = item.calculateMode || 1
}) })
} }
}, },
...@@ -646,7 +712,8 @@ export default { ...@@ -646,7 +712,8 @@ export default {
merchant: { merchant: {
merchantName: flag == 1 ? this.merchantRow.merchantName : "", // merchantName: flag == 1 ? this.merchantRow.merchantName : "", //
merchantId: flag == 1 ? this.merchantRow.merchantId : "" // merchantId: flag == 1 ? this.merchantRow.merchantId : "" //
} },
calculateMode: "" // 计算模式
}) })
} }
return targetArr return targetArr
...@@ -671,7 +738,7 @@ export default { ...@@ -671,7 +738,7 @@ export default {
getClassificationObjFormat(originArr, detailArr) { getClassificationObjFormat(originArr, detailArr) {
// console.log('originArr, detailArr: ', originArr, detailArr) // console.log('originArr, detailArr: ', originArr, detailArr)
if (originArr.length == 0 || detailArr.length == 0) return [] if (originArr.length == 0 || detailArr.length == 0) return []
const resArr = originArr.map((item) => { const resArr = originArr.map((item, index) => {
detailArr.forEach((innerItem) => { detailArr.forEach((innerItem) => {
// console.log(innerItem.expenseCategoryId, item.expenseCategoryId) // console.log(innerItem.expenseCategoryId, item.expenseCategoryId)
if (innerItem.expenseCategoryId == item.expenseCategoryId) { if (innerItem.expenseCategoryId == item.expenseCategoryId) {
...@@ -690,7 +757,9 @@ export default { ...@@ -690,7 +757,9 @@ export default {
// 复制当前商户的默认值 -对账对象 // 复制当前商户的默认值 -对账对象
merchantName: innerItem.targetMerchantName, merchantName: innerItem.targetMerchantName,
merchantId: innerItem.targetMerchantId merchantId: innerItem.targetMerchantId
} },
// 承担剩余金额的对账类目无需定义,默认是按整单计算
calculateMode: index === originArr.length -1 ? 2 : (innerItem.calculateMode || 1)
} }
} }
}) })
...@@ -800,6 +869,13 @@ export default { ...@@ -800,6 +869,13 @@ export default {
// 取消 // 取消
handleReset() { handleReset() {
this.$router.go(-1) this.$router.go(-1)
},
// 修改流量方计算模式
changeCalculateMode(value) {
this.classificationObj.serviceCostArr.forEach((val, index) => {
this.$set(this.classificationObj.serviceCostArr[index], 'calculateMode', 2)
this.$set(this.classificationObj.serviceCostArr[index], 'calculateModeDisabled', true)
})
} }
} }
} }
...@@ -844,7 +920,7 @@ export default { ...@@ -844,7 +920,7 @@ export default {
.multiple-type { .multiple-type {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 18px;
.el-form-item__content { .el-form-item__content {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -128,12 +128,14 @@ ...@@ -128,12 +128,14 @@
<div class="title-table"> <div class="title-table">
<div class="head"> <div class="head">
<div class="cost">费用类目</div> <div class="cost">费用类目</div>
<div class="cost">计算模式</div>
<div class="cost">分润规则</div> <div class="cost">分润规则</div>
</div> </div>
<div class="detail" <div class="detail"
v-for="(ininItem,ininIdx) in inItem.expenseCategoryRules" v-for="(ininItem,ininIdx) in inItem.expenseCategoryRules"
:key="ininIdx+'expenseCategory3'"> :key="ininIdx+'expenseCategory3'">
<div class="detail-i">{{ ininItem.expenseCategoryName }}</div> <div class="detail-i">{{ ininItem.expenseCategoryName }}</div>
<div class="detail-i">{{ ininItem.calculateMode == 1 ? '按类目计算' : ininItem.calculateMode == 2 ? '按整单计算' : '-' }}</div>
<div class="detail-i"> <div class="detail-i">
{{ getExpenseCategoryCalculateType(ininItem.expenseCategoryCalculateType,ininItem.expenseCategoryValue) }} {{ getExpenseCategoryCalculateType(ininItem.expenseCategoryCalculateType,ininItem.expenseCategoryValue) }}
</div> </div>
...@@ -232,12 +234,14 @@ ...@@ -232,12 +234,14 @@
<div class="title-table"> <div class="title-table">
<div class="head"> <div class="head">
<div class="cost">费用类目</div> <div class="cost">费用类目</div>
<div class="cost">计算模式</div>
<div class="cost">分润规则</div> <div class="cost">分润规则</div>
</div> </div>
<div class="detail" <div class="detail"
v-for="(ininItem,ininIdx) in inItem.expenseCategoryRules" v-for="(ininItem,ininIdx) in inItem.expenseCategoryRules"
:key="ininIdx+'expenseCategory4'"> :key="ininIdx+'expenseCategory4'">
<div class="detail-i">{{ ininItem.expenseCategoryName }}</div> <div class="detail-i">{{ ininItem.expenseCategoryName }}</div>
<div class="detail-i">{{ ininItem.calculateMode == 1 ? '按类目计算' : ininItem.calculateMode == 2 ? '按整单计算' : '-' }}</div>
<div class="detail-i"> <div class="detail-i">
{{ getExpenseCategoryCalculateType(ininItem.expenseCategoryCalculateType,ininItem.expenseCategoryValue) }} {{ getExpenseCategoryCalculateType(ininItem.expenseCategoryCalculateType,ininItem.expenseCategoryValue) }}
</div> </div>
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<div class="title-table"> <div class="title-table">
<div class="head"> <div class="head">
<div class="cost">费用类目</div> <div class="cost">费用类目</div>
<div class="cost">计算模式</div>
<div class="cost">分润规则</div> <div class="cost">分润规则</div>
<div class="cost">对账对象</div> <div class="cost">对账对象</div>
<div class="cost">商户号</div> <div class="cost">商户号</div>
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
<div v-for="(childItem, idx) in item.expenseCategoryRules" :key="idx + 'expenseCategoryRules1'"> <div v-for="(childItem, idx) in item.expenseCategoryRules" :key="idx + 'expenseCategoryRules1'">
<div class="detail" v-if="childItem.targetType == 1"> <div class="detail" v-if="childItem.targetType == 1">
<div class="detail-i">{{ childItem.expenseCategoryName }}</div> <div class="detail-i">{{ childItem.expenseCategoryName }}</div>
<div class="detail-i">{{ childItem.calculateMode == 1 ? '按类目计算' : childItem.calculateMode == 2 ? '按整单计算' : '-' }}</div>
<div class="detail-i">{{ childItem.ruleDescription }}</div> <div class="detail-i">{{ childItem.ruleDescription }}</div>
<div class="detail-i">{{ childItem.targetMerchantName }}</div> <div class="detail-i">{{ childItem.targetMerchantName }}</div>
<div class="detail-i">{{ childItem.targetMerchantId }}</div> <div class="detail-i">{{ childItem.targetMerchantId }}</div>
...@@ -57,6 +59,7 @@ ...@@ -57,6 +59,7 @@
<div class="title-table"> <div class="title-table">
<div class="head"> <div class="head">
<div class="cost">费用类目</div> <div class="cost">费用类目</div>
<div class="cost">计算模式</div>
<div class="cost">分润规则</div> <div class="cost">分润规则</div>
<div class="cost">对账对象</div> <div class="cost">对账对象</div>
<div class="cost">商户号</div> <div class="cost">商户号</div>
...@@ -67,6 +70,7 @@ ...@@ -67,6 +70,7 @@
class="detail" class="detail"
v-if="childItem.targetType == 2"> v-if="childItem.targetType == 2">
<div class="detail-i">{{ childItem.expenseCategoryName }}</div> <div class="detail-i">{{ childItem.expenseCategoryName }}</div>
<div class="detail-i">{{ childItem.calculateMode == 1 ? '按类目计算' : childItem.calculateMode == 2 ? '按整单计算' : '-' }}</div>
<div class="detail-i">{{ childItem.ruleDescription }}</div> <div class="detail-i">{{ childItem.ruleDescription }}</div>
<div class="detail-i">{{ childItem.targetMerchantName }}</div> <div class="detail-i">{{ childItem.targetMerchantName }}</div>
<div class="detail-i">{{ childItem.targetMerchantId }}</div> <div class="detail-i">{{ childItem.targetMerchantId }}</div>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</span> </span>
<span class="collapse" <span class="collapse"
@click="collapseItem(index)"> @click="collapseItem(index)">
<i :class="{ move: !formItem.show }" <i :class="{ move: formItem.show }"
class="arrow el-icon-arrow-down" /> class="arrow el-icon-arrow-down" />
{{ formItem.show ? "收起" : "展开" }} {{ formItem.show ? "收起" : "展开" }}
</span> </span>
......
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
getYqMerchantSceneConfigAPI({ yqMerchantId: this.info.yqMerchantId }).then(res => { getYqMerchantSceneConfigAPI({ yqMerchantId: this.info.yqMerchantId }).then(res => {
res?.forEach(val => { res?.forEach(val => {
this.sceneList.map(v => { this.sceneList.map(v => {
if (v.sceneType === val.scene && val.sceneOpenFlag === 1) { if (v.sceneType === val.scene && val.sceneOpenFlag === 0) {
v.isOpen = 'Y' v.isOpen = 'Y'
} }
return v return v
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
this.sceneList.forEach(v => { this.sceneList.forEach(v => {
arr.push({ arr.push({
merchantId: this.info.yqMerchantId, merchantId: this.info.yqMerchantId,
sceneOpenFlag: v.isOpen === 'Y' ? 1 : 0, sceneOpenFlag: v.isOpen === 'Y' ? 0 : 1,
scene: v.sceneType scene: v.sceneType
}) })
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!