Commit b6475fed by 张立顺

Merge branch 'dev_v4.11.0' of http://192.168.3.233:8090/glsx-business/dj-car-lif…

…e-system into dev_v4.11.0
2 parents 5b05a657 8de265be
......@@ -17475,6 +17475,11 @@
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true
},
"yarn": {
"version": "1.22.19",
"resolved": "https://registry.npmmirror.com/yarn/-/yarn-1.22.19.tgz",
"integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ=="
},
"yorkie": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/yorkie/-/yorkie-2.0.0.tgz",
......
......@@ -54,7 +54,8 @@
"vuex": "^3.0.1",
"webpack-theme-color-replacer": "^1.4.1",
"webpack5-svg-sprite-loader": "^5.1.1",
"xlsx": "^0.16.9"
"xlsx": "^0.16.9",
"yarn": "^1.22.19"
},
"devDependencies": {
"@babel/core": "^7.12.16",
......
......@@ -319,6 +319,7 @@ export const Util = {
fieldShow: function (field, show) {
return field || show
},
// 整数补零显示两位小数
returnFloat: function(num) {
num = num.toString();
if (num.indexOf(".") != -1) {
......
......@@ -322,7 +322,7 @@
align="center" />
<el-table-column prop="shopProfitType"
label="流量方比例"
width="100"
width="120"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.shopProfitType">按{{ shopProfitTypeOpts[scope.row.shopProfitType]
......@@ -576,6 +576,7 @@ import downloadAccountDialog from './downloadAccountDialog'
import warehouseDetail from './warehouseDetail'
import * as echarts from 'echarts'
import { asyncExportExcel } from '@api/sys.base'
import { returnFloat } from '@/common/util'
export default {
name: 'FinanceList',
components: {
......@@ -1020,10 +1021,19 @@ export default {
'marketingCost',
'rewardAndPenaltyCost'
]
const rateToFloat = [ // 分润比例整数补零字段
'franchiseeProfitPer',
'shopProfitPer',
'yqProfitPer',
'glProfitPer',
]
for (const key in item) {
if (moneyLabels.indexOf(key) > -1) {
item[key] = typeof item[key] === 'number' ? `¥${item[key]}` : '-'
}
if (rateToFloat.indexOf(key) > -1) {
item[key] = item[key] && returnFloat(item[key])
}
}
return item
},
......
......@@ -5,9 +5,8 @@
slot="header">
<d2-search ref="showSearch"
class="show-search"
:searchForm="searchForm"
:formData="showFormData">
</d2-search>
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
......@@ -20,16 +19,16 @@
<d2-table-header>
<span slot="left">
<auth-button category="Button"
:showBtnIds="['9070301']"></auth-button>
:show-btn-ids="['9070301']" />
</span>
<auth-button category="Button"
:showBtnIds="['9070303']"></auth-button>
:show-btn-ids="['9070303']" />
</d2-table-header>
<d2-table ref="outputValueTable"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:getListApi="getListApi"
:beforeSearchFn="beforeSearchFn">
:search-form="tableSearchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="concatType"
slot-scope="scope">
<p v-if="scope.scope.concatType == 1">督导</p>
......@@ -37,11 +36,11 @@
</div>
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope"></auth-button>
:data="scope.scope" />
</d2-table>
</div>
<d2-dialog :title="'上传文件'"
:isVisible="fileVisible"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
......@@ -53,7 +52,7 @@
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName"></el-input>
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
......@@ -62,7 +61,7 @@
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)" />
@change="importFile($event)">
<el-link href="http://img01.glsx.com.cn/upload/salesexcel/企微推送对象导入模板.xlsx"
type="primary"
class="import-template"
......@@ -76,7 +75,7 @@
<d2-dialog :title="chooseType"
@closeDialog="handleObject"
@confirmDialog="handleConfirmObject"
:isVisible="pushVisible">
:is-visible="pushVisible">
<slot>
<el-form :model="pushForm"
ref="pushForm"
......@@ -92,19 +91,20 @@
<el-option v-for="item in state"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="商户:"
prop="merchantName">
<el-select v-model="pushForm.merchantName"
clearable
filterable
style="width: 280px;"
placeholder="请选择">
<el-option v-for="item in changeList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantName"></el-option>
:value="item.merchantName" />
</el-select>
</el-form-item>
<el-form-item label="姓名:"
......@@ -112,7 +112,7 @@
<el-input v-model="pushForm.name"
style="width: 280px;"
placeholder="请输入姓名"
clearable></el-input>
clearable />
</el-form-item>
<el-form-item label="手机号:"
prop="phone"
......@@ -120,7 +120,7 @@
<el-input v-model="pushForm.phone"
style="width: 280px;"
placeholder="请输入手机号"
clearable></el-input>
clearable />
</el-form-item>
</el-form>
</slot>
......@@ -144,7 +144,7 @@ const state = [
}
]
export default {
name: 'outputValue',
name: 'OutputValue',
data() {
return {
state,
......@@ -217,13 +217,13 @@ export default {
merchantName: [{ required: true, message: '请选择商户', trigger: 'change' }],
name: [{ required: true, message: '请输入姓名', trigger: 'change' }],
phone: [{ required: true, message: '请输入手机号', trigger: 'change' },
{
validator: (rule, value, callback) => {
const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
},
trigger: 'change'
}
{
validator: (rule, value, callback) => {
const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
},
trigger: 'change'
}
]
},
fileRules: {
......@@ -237,7 +237,7 @@ export default {
},
computed: {
...mapState({
'updateList': (state) => state.d2admin.user.updateList
updateList: (state) => state.d2admin.user.updateList
})
},
watch: {
......
......@@ -423,6 +423,7 @@ export default {
this.getDetail()
} else {
this.setAccountRule(this.merchantInfo.settleRule)
console.log(this.merchantInfo.divisionRule)
this.setDivisionRule(deepClone(this.merchantInfo.divisionRule))
// const res = Object.assign(this.merchantInfo.settleRule, this.merchantInfo.divisionRule)
// this.setDivisionRule(res)
......@@ -485,6 +486,10 @@ export default {
if (res) {
// console.log('483', deepClone(res.goodsTypeSettleRuleList))
// console.log('483', util.deepClone(res.goodsTypeSettleRuleList))
res.goodsTypeSettleRuleList && res.goodsTypeSettleRuleList.forEach(val => {
if (val.merchantProfitValue) val.merchantProfitValue = returnFloat(val.merchantProfitValue)
if (val.partnerProfitPer) val.partnerProfitPer = returnFloat(val.partnerProfitPer)
})
this.settleRuleList = deepClone(res.goodsTypeSettleRuleList)
// console.log(res.goodsTypeSettleRuleList)
this.merchantInfo.deductChargeFlag = res.deductChargeFlag
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!