Commit 7f68e51f by 张立顺

v4.11.0 bug修复

1 parent 19ff6bb0
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* @Last Modified by: chenwq * @Last Modified by: chenwq
* @Last Modified time: 2021-06-18 10:04:32 * @Last Modified time: 2021-06-18 10:04:32
*/ */
import sha1 from 'sha1' import sha1 from "sha1"
import qs from 'qs' import qs from "qs"
import { baseConfig } from '@/main' import { baseConfig } from "@/main"
// // const secret = // // const secret =
// // window.location.href.includes('dj.glsx.com.cn') || // // window.location.href.includes('dj.glsx.com.cn') ||
...@@ -21,32 +21,33 @@ const sign = (params, noSignAttr = []) => { ...@@ -21,32 +21,33 @@ const sign = (params, noSignAttr = []) => {
// console.log(secret) // console.log(secret)
delete params.sign delete params.sign
var objStr = qs.stringify(_.cloneDeep(params), { var objStr = qs.stringify(_.cloneDeep(params), {
arrayFormat: 'indices', arrayFormat: "indices",
allowDots: true, allowDots: true,
encodeValuesOnly: true encodeValuesOnly: true
}) })
var objVal = objStr.split('&') var objVal = objStr.split("&")
var realObj = {} var realObj = {}
objVal.forEach(item => { objVal.forEach((item) => {
const idx = item.indexOf('=') const idx = item.indexOf("=")
realObj[item.split('=')[0]] = decodeURIComponent(item.slice(idx + 1)) realObj[item.split("=")[0]] = decodeURIComponent(item.slice(idx + 1))
}) })
// console.log(realObj)
const keys = Object.keys(realObj).sort() const keys = Object.keys(realObj).sort()
var str = [] var str = []
var obj = null var obj = null
for (const key in realObj) { for (const key in realObj) {
obj = realObj[key] obj = realObj[key]
if (obj === null) { if (obj === null) {
obj = '' obj = ""
} else if (typeof obj === 'object') { } else if (typeof obj === "object") {
obj = JSON.stringify(obj) obj = JSON.stringify(obj)
} }
realObj[key] = obj realObj[key] = obj
} }
keys.forEach(e => { keys.forEach((e) => {
!noSignAttr.includes(e) && str.push(e + realObj[e]) !noSignAttr.includes(e) && str.push(e + realObj[e])
}) })
realObj.sign = sha1(secret + str.join('') + secret).toUpperCase() realObj.sign = sha1(secret + str.join("") + secret).toUpperCase()
return realObj return realObj
} }
export default sign export default sign
...@@ -224,29 +224,29 @@ export const Util = { ...@@ -224,29 +224,29 @@ export const Util = {
// * console.log(bar===foo) false // * console.log(bar===foo) false
// * @param {*} obj // * @param {*} obj
// */ // */
// deepClone: function (obj) { deepClone: function (obj) {
// // Handle the 3 simple types, and null or undefined or function // Handle the 3 simple types, and null or undefined or function
// if (obj == null || typeof obj !== "object") return obj if (obj == null || typeof obj !== "object") return obj
// // Handle Date // Handle Date
// if (obj instanceof Date) { if (obj instanceof Date) {
// const copy = new Date() const copy = new Date()
// copy.setTime(obj.getTime()) copy.setTime(obj.getTime())
// return copy return copy
// } }
// // Handle Array or Object // Handle Array or Object
// if ((obj instanceof Array) | (obj instanceof Object)) { if ((obj instanceof Array) | (obj instanceof Object)) {
// const copy = obj instanceof Array ? [] : {} const copy = obj instanceof Array ? [] : {}
// for (var attr in obj) { for (var attr in obj) {
// // if (Object.prototype.hasOwnProperty.call(attr)) { // if (Object.prototype.hasOwnProperty.call(attr)) {
// if (obj.hasOwnProperty(attr)) { if (obj.hasOwnProperty(attr)) {
// copy[attr] = Util.deepClone(obj[attr]) copy[attr] = Util.deepClone(obj[attr])
// console.log("copy[attr] ", copy[attr]) // console.log("copy[attr] ", copy[attr])
// } }
// } }
// return copy return copy
// } }
// throw new Error("Unable to clone obj! Its type isn't supported.") throw new Error("Unable to clone obj! Its type isn't supported.")
// }, },
/** /**
* url下载文件 * url下载文件
...@@ -320,19 +320,19 @@ export const Util = { ...@@ -320,19 +320,19 @@ export const Util = {
return field || show return field || show
}, },
// 整数补零显示两位小数 // 整数补零显示两位小数
returnFloat: function(num) { returnFloat: function (num) {
num = num.toString(); num = num.toString()
if (num.indexOf(".") != -1) { if (num.indexOf(".") != -1) {
let newVal = num.split("."); let newVal = num.split(".")
if (newVal[1].length == 1) { if (newVal[1].length == 1) {
newVal = newVal.join("."); newVal = newVal.join(".")
newVal += "0"; newVal += "0"
num = newVal; num = newVal
} }
} else { } else {
num += ".00"; num += ".00"
} }
return num; return num
} }
} }
...@@ -340,6 +340,6 @@ export const showModal = Util.msg ...@@ -340,6 +340,6 @@ export const showModal = Util.msg
export const showToast = Util.Info export const showToast = Util.Info
export const showLoading = Util.loading export const showLoading = Util.loading
export const hideLoading = Util.closeLoading export const hideLoading = Util.closeLoading
// export const deepClone = Util.deepClone export const deepClone = Util.deepClone
export const downLoadFile = Util.downLoadFile export const downLoadFile = Util.downLoadFile
export const returnFloat = Util.returnFloat export const returnFloat = Util.returnFloat
...@@ -78,9 +78,12 @@ util.deepCloneObj = (target) => { ...@@ -78,9 +78,12 @@ util.deepCloneObj = (target) => {
if ([Date, RegExp].includes(data.constructor)) { if ([Date, RegExp].includes(data.constructor)) {
return new data.constructor(data) return new data.constructor(data)
} }
// 会在生产环境的clone props对象报错 导致报错 弃用
if (typeof data === "function") { if (typeof data === "function") {
return new Function("return " + data.toString())() return new Function("return " + data.toString())()
} }
const exist = map.get(data) const exist = map.get(data)
if (exist) { if (exist) {
return exist return exist
......
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
// util.permision.flatten(Object.values(localRoutes)) // util.permision.flatten(Object.values(localRoutes))
// .map(obj => ({ authId: obj.authId, parentId: obj.parentId })) : // .map(obj => ({ authId: obj.authId, parentId: obj.parentId })) :
// tempAuths // tempAuths
console.log(tempAuths) // console.log(tempAuths)
const authes = tempAuths const authes = tempAuths
await dispatch("d2admin/auth/set", authes, { root: true }) await dispatch("d2admin/auth/set", authes, { root: true })
// delete accountInfo.authes // delete accountInfo.authes
......
...@@ -69,7 +69,9 @@ import { getParkStore } from '@api/editCustomer' ...@@ -69,7 +69,9 @@ import { getParkStore } from '@api/editCustomer'
// waitinputorderExport // waitinputorderExport
import { payTypeList } from '@/common/constants.js' import { payTypeList } from '@/common/constants.js'
import { waitinputorderCount, waitinputorderPage, getList } from '@api/order' import { waitinputorderCount, waitinputorderPage, getList } from '@api/order'
import { asyncExportExcel } from '@api/sys.base' // import { asyncExportExcel } from '@api/sys.base'
const clonePayTypeList = _.cloneDeep(payTypeList)
clonePayTypeList.splice(1, 1)
export default { export default {
name: 'OrderSupplement', name: 'OrderSupplement',
data() { data() {
...@@ -241,7 +243,7 @@ export default { ...@@ -241,7 +243,7 @@ export default {
confLabel: '未补录' confLabel: '未补录'
} }
], ],
payTypeList: _.cloneDeep(payTypeList) payTypeList: clonePayTypeList
} }
} }
}, },
......
<!-- 历史财务规则 --> <!-- 历史财务规则 -->
<template> <template>
<div <div class="account-detail"
class="account-detail" ref="accountDetail">
ref="accountDetail"
>
<!-- v-resize="resetTableHeight" <!-- v-resize="resetTableHeight"
:ref="'resize' + index" --> :ref="'resize' + index" -->
<div v-if="formArray&&formArray.length"> <div v-if="formArray&&formArray.length">
<div <div v-for="(formItem,index) in formArray"
v-for="(formItem,index) in formArray"
v-resize="resetTableHeight" v-resize="resetTableHeight"
:ref="'resize' + index" :ref="'resize' + index"
:key="index" :key="index">
> <p class="edit-sub-title "
<p :class="{'sub-border':!formItem.show}">
class="edit-sub-title "
:class="{'sub-border':!formItem.show}"
>
<span class="label"> <span class="label">
<span>{{ formItem.formatEffectStartDate }}</span> <span>{{ formItem.formatEffectStartDate }}</span>
<span v-if="formItem.formatEffectStartDate"> - </span> <span v-if="formItem.formatEffectStartDate"> - </span>
<span <span
:class="{'labelColor':!formItem.formatEffectEndDate}" :class="{'labelColor':!formItem.formatEffectEndDate}">{{ formItem.formatEffectStartDate?formItem.formatEffectEndDate?formItem.formatEffectEndDate:'生效中':'待生效' }}</span>
>{{ formItem.formatEffectStartDate?formItem.formatEffectEndDate?formItem.formatEffectEndDate:'生效中':'待生效' }}</span>
</span> </span>
<span class="updatedInfo"> <span class="updatedInfo">
操作人: {{ formItem.updatedBy }} 操作时间: {{ formItem.formatUpdatedDate }} 操作人: {{ formItem.updatedBy }} 操作时间: {{ formItem.formatUpdatedDate }}
</span> </span>
<span <span class="collapse"
class="collapse" @click="collapseItem(index)">
@click="collapseItem(index)" <i :class="{'move':!formItem.show}"
> class="arrow el-icon-arrow-down" />
<i
:class="{'move':!formItem.show}"
class="arrow el-icon-arrow-down"
/>
{{ formItem.show?'收起':'展开' }} </span> {{ formItem.show?'收起':'展开' }} </span>
</p> </p>
<el-collapse-transition> <el-collapse-transition>
<viewDetail <viewDetail :is-get-detail="false"
:is-get-detail="false"
v-if="formItem.show" v-if="formItem.show"
:merchant-info="formItem" :merchant-info="formItem"
:view-detail-visible="formItem.show" :view-detail-visible="formItem.show" />
/>
</el-collapse-transition> </el-collapse-transition>
</div> </div>
</div> </div>
<div <div v-else
v-else class="nothingtips">
class="nothingtips" <img style="height: 109px; width: 109px;"
> src="../images/empty.png">
<img
style="height: 109px; width: 109px;"
src="../images/empty.png"
>
<p class="title"> <p class="title">
暂无财务规则 暂无财务规则
</p> </p>
......
<!-- 商户管理 --> <!-- 商户管理 -->
<template> <template>
<d2-container class="merchant_manage"> <d2-container class="merchant_manage">
<div class="header" slot="header"> <div class="header"
<d2-search slot="header">
ref="showSearch" <d2-search ref="showSearch"
class="merchant_manage_search" class="merchant_manage_search"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData" :form-data="showFormData"
label-width="100px" /> label-width="100px" />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button :id="tableParams.btnId"
size="small"
type="primary">
查询 查询
</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">
...@@ -20,19 +23,16 @@ ...@@ -20,19 +23,16 @@
<span slot="left">园区店导流方关联列表</span> <span slot="left">园区店导流方关联列表</span>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table <d2-table ref="merchantTable"
ref="merchantTable"
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchForm" :search-form="searchForm"
:table-params="tableParams"> :table-params="tableParams">
<auth-button <auth-button slot="auth-button"
slot="auth-button"
slot-scope="scope" slot-scope="scope"
:data="scope.scope" /> :data="scope.scope" />
</d2-table> </d2-table>
</div> </div>
<relate-store-mer-dialog <relate-store-mer-dialog v-if="relateStoreVisible"
v-if="relateStoreVisible"
ref="relateStore" ref="relateStore"
:relate-store-visible="relateStoreVisible" :relate-store-visible="relateStoreVisible"
:source-page="sourcePage" :source-page="sourcePage"
...@@ -42,37 +42,31 @@ ...@@ -42,37 +42,31 @@
@handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreConfirm="handleRelateStoreConfirm"
@handleRelateStoreClose="handleRelateStoreClose"> @handleRelateStoreClose="handleRelateStoreClose">
<el-row slot> <el-row slot>
<el-form <el-form :model="storeSearchForm"
:model="storeSearchForm"
:rules="rules" :rules="rules"
ref="relate" ref="relate"
:inline="true" :inline="true"
label-width="140px"> label-width="140px">
<el-col> <el-col>
<el-form-item <el-form-item id="yqMerchantId"
id="yqMerchantId"
label="选择关联园区店:" label="选择关联园区店:"
prop="yqMerchantId" prop="yqMerchantId"
v-show="userInfo.beSuper"> v-show="userInfo.beSuper">
<el-select <el-select v-model="storeSearchForm.yqMerchantId"
v-model="storeSearchForm.yqMerchantId"
placeholder="请选择" placeholder="请选择"
filterable filterable
@change="handleMerchantChange"> @change="handleMerchantChange">
<el-option <el-option v-for="x in parkServiceList"
v-for="x in parkServiceList"
:key="x.merchantId" :key="x.merchantId"
:value="x.merchantId" :value="x.merchantId"
:label="x.merchantName" /> :label="x.merchantName" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<p class="relate-service"> <p class="relate-service">
<span <span v-if="
v-if="
storeSearchForm.yqMerchantId && storeSearchForm.yqMerchantId &&
!relateMerchantObj.partnerMerchantName !relateMerchantObj.partnerMerchantName
">该园区店暂未关联服务商<a ">该园区店暂未关联服务商<a href="#/serviceManage"
href="#/serviceManage"
target="_blank" target="_blank"
rel="opener" rel="opener"
style="margin-left: 20px">关联服务商></a></span> style="margin-left: 20px">关联服务商></a></span>
...@@ -85,8 +79,7 @@ ...@@ -85,8 +79,7 @@
</el-col> </el-col>
<el-form-item label="选择渠道:"> <el-form-item label="选择渠道:">
<el-select v-model="storeSearchForm.channelType"> <el-select v-model="storeSearchForm.channelType">
<el-option <el-option v-for="item in baseData.channelTypeList.filter(
v-for="item in baseData.channelTypeList.filter(
(item) => item.value !== '' (item) => item.value !== ''
)" )"
:key="item.value" :key="item.value"
...@@ -95,50 +88,49 @@ ...@@ -95,50 +88,49 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-col :span="8"> --> <!-- <el-col :span="8"> -->
<el-input <el-input v-model.trim="storeSearchForm.merchantIdName"
v-model.trim="storeSearchForm.merchantIdName"
placeholder="支持4S店名称、4S店编号搜索" placeholder="支持4S店名称、4S店编号搜索"
style="width: 300px; margin: 0 20px 20px 0" style="width: 300px; margin: 0 20px 20px 0"
clearable /> clearable />
<!-- </el-col> --> <!-- </el-col> -->
<el-button type="primary" @click="handleSearchStore"> <el-button type="primary"
@click="handleSearchStore">
搜索 搜索
</el-button> </el-button>
</el-form> </el-form>
</el-row> </el-row>
</relate-store-mer-dialog> </relate-store-mer-dialog>
<d2-dialog <d2-dialog title="查看详情"
title="查看详情"
:is-visible.sync="viewDetailVisible" :is-visible.sync="viewDetailVisible"
width="900px" width="900px"
btn-ok-label="确定" btn-ok-label="确定"
:no-cancel="true" :no-cancel="true"
@confirmDialog="handleViewClose" @confirmDialog="handleViewClose"
@closeDialog="handleViewClose"> @closeDialog="handleViewClose">
<el-tabs v-model="detailActiveName" type="border-card"> <el-tabs v-model="detailActiveName"
<el-tab-pane label="B端转化业务" name="first"> type="border-card">
<view-detail <el-tab-pane label="B端转化业务"
v-if="viewDetailVisible" name="first">
<view-detail v-if="viewDetailVisible"
:view-detail-visible="viewDetailVisible" :view-detail-visible="viewDetailVisible"
:merchant-info="viewDetailData" /> :merchant-info="viewDetailData" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="C端零售业务" name="second" :disabled="true"> <el-tab-pane label="C端零售业务"
name="second"
:disabled="true">
配置管理 配置管理
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</d2-dialog> </d2-dialog>
<baseDialog <baseDialog :is-show.sync="financialRulesDetailVisible"
:is-show.sync="financialRulesDetailVisible"
:config="dialogConfig.setting" :config="dialogConfig.setting"
:dialog-config="dialogConfig.config" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose"> @closeDialog="handleDetailClose">
<financialRulesDetail <financialRulesDetail v-if="financialRulesDetailVisible"
v-if="financialRulesDetailVisible"
:merchant-id="merchantInfo.merchantId" :merchant-id="merchantInfo.merchantId"
:account-detail-visible="financialRulesDetailVisible" /> :account-detail-visible="financialRulesDetailVisible" />
</baseDialog> </baseDialog>
<d2-dialog <d2-dialog title="品牌设置"
title="品牌设置"
class="brandStyle" class="brandStyle"
:is-visible.sync="brandSettingsStatus" :is-visible.sync="brandSettingsStatus"
width="856px" width="856px"
...@@ -152,14 +144,12 @@ ...@@ -152,14 +144,12 @@
<span class="brand-main">主营品牌</span> <span class="brand-main">主营品牌</span>
<span class="brand-describe">主营品牌请在账户中心设置,此处仅可选车系</span> <span class="brand-describe">主营品牌请在账户中心设置,此处仅可选车系</span>
</div> </div>
<el-input <el-input placeholder="输入搜索关键字"
placeholder="输入搜索关键字"
clearable clearable
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
class="brand-input" class="brand-input"
v-model="filterText" /> v-model="filterText" />
<el-tree <el-tree class="filter-tree"
class="filter-tree"
:data="data" :data="data"
:filter-node-method="filterNode" :filter-node-method="filterNode"
node-key="id" node-key="id"
...@@ -174,29 +164,30 @@ ...@@ -174,29 +164,30 @@
<div class="rightBox"> <div class="rightBox">
<div class="carSeries-top"> <div class="carSeries-top">
<span class="carSeries-choose">已选车系 ({{ carSeries.length }})</span> <span class="carSeries-choose">已选车系 ({{ carSeries.length }})</span>
<span class="clear" @click="clearData">清空</span> <span class="clear"
@click="clearData">清空</span>
</div> </div>
<div style="overflow: auto; height: 511px"> <div style="overflow: auto; height: 511px">
<div v-for="(item, index) in filterList" :key="index"> <div v-for="(item, index) in filterList"
<div class="car-title" v-if="item.children.length"> :key="index">
<div class="car-title"
v-if="item.children.length">
{{ item.title }} {{ item.title }}
</div> </div>
<div <div class="carSeries-list"
class="carSeries-list"
v-for="(val, i) in item.children" v-for="(val, i) in item.children"
:key="i"> :key="i">
<span class="carSeries-name">{{ val.name }}</span> <span class="carSeries-name">{{ val.name }}</span>
<el-select <el-select v-model="val.modelType"
v-model="val.modelType"
placeholder="选择车系类型" placeholder="选择车系类型"
style="width: 144px; height: 40px"> style="width: 144px; height: 40px">
<el-option <el-option v-for="item in status"
v-for="item in status"
:key="item.modelType" :key="item.modelType"
:label="item.label" :label="item.label"
:value="item.modelType" /> :value="item.modelType" />
</el-select> </el-select>
<i class="el-icon-error icon" @click="del(val.id)" /> <i class="el-icon-error icon"
@click="del(val.id)" />
</div> </div>
</div> </div>
</div> </div>
......
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
<script> <script>
import { Util, returnFloat } from '@/common/util' import { Util, returnFloat } from '@/common/util'
import { deepClone } from '@/libs/util' // import { deepClone } from '@/libs/util'
// import { Util, deepClone, returnFloat } from '@/common/util' // import { Util, deepClone, returnFloat } from '@/common/util'
import { getAccountRule, getDivisionRuleApi, entrydateUpdate } from '@api/merchant' import { getAccountRule, getDivisionRuleApi, entrydateUpdate } from '@api/merchant'
// deductChargeFlagObj // deductChargeFlagObj
...@@ -424,7 +424,7 @@ export default { ...@@ -424,7 +424,7 @@ export default {
} else { } else {
this.setAccountRule(this.merchantInfo.settleRule) this.setAccountRule(this.merchantInfo.settleRule)
console.log(this.merchantInfo.divisionRule) console.log(this.merchantInfo.divisionRule)
this.setDivisionRule(deepClone(this.merchantInfo.divisionRule)) this.setDivisionRule(Util.deepClone(this.merchantInfo.divisionRule))
// const res = Object.assign(this.merchantInfo.settleRule, this.merchantInfo.divisionRule) // const res = Object.assign(this.merchantInfo.settleRule, this.merchantInfo.divisionRule)
// this.setDivisionRule(res) // this.setDivisionRule(res)
} }
...@@ -490,7 +490,7 @@ export default { ...@@ -490,7 +490,7 @@ export default {
if (val.merchantProfitValue) val.merchantProfitValue = returnFloat(val.merchantProfitValue) if (val.merchantProfitValue) val.merchantProfitValue = returnFloat(val.merchantProfitValue)
if (val.partnerProfitPer) val.partnerProfitPer = returnFloat(val.partnerProfitPer) if (val.partnerProfitPer) val.partnerProfitPer = returnFloat(val.partnerProfitPer)
}) })
this.settleRuleList = deepClone(res.goodsTypeSettleRuleList) this.settleRuleList = Util.deepClone(res.goodsTypeSettleRuleList)
// console.log(res.goodsTypeSettleRuleList) // console.log(res.goodsTypeSettleRuleList)
this.merchantInfo.deductChargeFlag = res.deductChargeFlag this.merchantInfo.deductChargeFlag = res.deductChargeFlag
this.settleRuleList.unshift({ this.settleRuleList.unshift({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!