Commit 570c4d52 by 前端

Merge branch 'fix_v4.14.2' into 'develop'

Fix v4.14.2

See merge request !33
2 parents 31a3431c f22f5e73
Showing 193 changed files with 1908 additions and 1063 deletions
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
VUE_APP_TITLE=D+ VUE_APP_TITLE=D+
# 静态资源基础路径 # 静态资源基础路径
VUE_APP_PUBLIC_PATH = /dj-carlife-web/ VUE_APP_PUBLIC_PATH = '/dj-carlife-web/'
# 仓库地址 # 仓库地址
VUE_APP_REPO=https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config VUE_APP_REPO=https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config
......
...@@ -143,6 +143,8 @@ module.exports = { ...@@ -143,6 +143,8 @@ module.exports = {
"node/no-callback-literal": 'off', "node/no-callback-literal": 'off',
"no-unused-expressions": "off", "no-unused-expressions": "off",
camelcase: 'off', camelcase: 'off',
"no-undef": 'off' "no-undef": 'off',
"vue/html-self-closing": 'off',
"array-callback-return": 'off'
} }
} }
[![Build Status](https://www.travis-ci.org/d2-projects/d2-admin-start-kit.svg?branch=master)](https://www.travis-ci.org/d2-projects/d2-admin-start-kit) # 嘀加智享车生活后台 http://192.168.3.233:8090/saas_plus/dj-car-life-system
[D2Admin](https://github.com/d2-projects/d2-admin) simplified version of the start template, delete all the sample code in the full version, retain all core functions. # 测试环境(http://frontend.test.glsx.com.cn/dj-carlife-web/#/login) glsadmin admin123
[Gitee](https://gitee.com/fairyever/d2-admin-start-kit) # 生产环境(http://dj.glsx.com.cn/dj-carlife-web/#/login) liushiquan1 liushiq123
预发布账号: yfbyyb a123456 预发布账号: yfbyyb a123456
...@@ -37,3 +37,5 @@ dev_4.13.0 分支以上线并往 develop 以及 master 上合并 ...@@ -37,3 +37,5 @@ dev_4.13.0 分支以上线并往 develop 以及 master 上合并
提测由于部署问题,直接从 dev_4.14.0 拉取 dev_4.14.1 代码相同的分支做部署 提测由于部署问题,直接从 dev_4.14.0 拉取 dev_4.14.1 代码相同的分支做部署
12 月大版本下部分 从测试中的分支 dev_4.14.1 拉取 dev_4.14.2 分支去做 清分及对账优化 版本,待 dev_4.14.1 上线后将代码合并进开发中的 dev_4.14.2 12 月大版本下部分 从测试中的分支 dev_4.14.1 拉取 dev_4.14.2 分支去做 清分及对账优化 版本,待 dev_4.14.1 上线后将代码合并进开发中的 dev_4.14.2
dev_4.14.1 上线后已合并到主干上以及 dev_v4.14.2 上
紧急版本 dev_v4.14.1.2 上线后以合并到 develop 以及 master 主干上,版本代码已合并到提测版本 dev_v4.14.2 上
{ {
"name": "dj-car-life-system", "name": "dj-car-life-system",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"备注": "去掉nomock配置命令", "备注": "去掉nomock配置命令",
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"start": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve", "start": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve", "dev": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"build": " vue-cli-service build --no-module", "build": " vue-cli-service build --no-module",
"build:nomock": "vue-cli-service build --mode nomock", "build:nomock": "vue-cli-service build --mode nomock",
"build:travis": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode travis", "build:travis": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode travis",
"lint": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint --fix", "lint": "vue-cli-service lint --fix",
"test:unit": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service test:unit", "test:unit": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service test:unit",
"report": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --report" "report": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --report"
}, },
"dependencies": { "dependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.17.12", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.17.12",
"@babel/plugin-proposal-optional-chaining": "7.13.12", "@babel/plugin-proposal-optional-chaining": "7.13.12",
"@sentry/browser": "^7.12.1", "@sentry/browser": "^7.12.1",
"@sentry/integrations": "^7.12.1", "@sentry/integrations": "^7.12.1",
"@sentry/tracing": "^7.3.0", "@sentry/tracing": "^7.3.0",
"@sentry/vue": "^7.3.0", "@sentry/vue": "^7.3.0",
"@sentry/webpack-plugin": "^1.18.9", "@sentry/webpack-plugin": "^1.18.9",
"axios": "^0.18.0", "axios": "^0.18.0",
"better-scroll": "^1.15.2", "better-scroll": "^1.15.2",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"dayjs": "^1.8.12", "dayjs": "^1.8.12",
"default-passive-events": "^2.0.0", "default-passive-events": "^2.0.0",
"echarts": "^5.3.2", "echarts": "^5.3.2",
"element-ui": "^2.13.1", "element-ui": "^2.13.1",
"eslint-plugin-standard": "^5.0.0", "eslint-plugin-standard": "^5.0.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"flex.css": "^1.1.7", "flex.css": "^1.1.7",
"fuse.js": "^3.4.4", "fuse.js": "^3.4.4",
"hotkeys-js": "^3.6.2", "hotkeys-js": "^3.6.2",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"jspdf": "^2.5.1", "jspdf": "^2.5.1",
"lowdb": "^1.0.0", "lowdb": "^1.0.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"qs": "^6.8.0", "qs": "^6.8.0",
"rfdc": "^1.3.0", "rfdc": "^1.3.0",
"screenfull": "^4.2.0", "screenfull": "^4.2.0",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"speed-measure-webpack-plugin": "^1.5.0", "speed-measure-webpack-plugin": "^1.5.0",
"svg-sprite-loader": "^6.0.11", "svg-sprite-loader": "^6.0.11",
"ua-parser-js": "^0.7.19", "ua-parser-js": "^0.7.19",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-qr": "^2.5.0", "vue-router": "3.0.5",
"vue-router": "3.0.5", "vue2-org-tree": "^1.3.6",
"vue2-org-tree": "^1.3.6", "vuex": "^3.0.1",
"vuex": "^3.0.1", "webpack-theme-color-replacer": "^1.4.2",
"webpack-theme-color-replacer": "^1.4.2", "webpack5-svg-sprite-loader": "^5.1.1",
"webpack5-svg-sprite-loader": "^5.1.1", "xlsx": "^0.16.9",
"xlsx": "^0.16.9", "yarn": "^1.22.19"
"yarn": "^1.22.19" },
}, "devDependencies": {
"devDependencies": { "@babel/core": "^7.12.16",
"@babel/core": "^7.12.16", "@babel/eslint-parser": "^7.12.16",
"@babel/eslint-parser": "^7.12.16", "@kazupon/vue-i18n-loader": "^0.4.1",
"@kazupon/vue-i18n-loader": "^0.4.1", "@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-babel": "~5.0.8", "@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8", "@vue/cli-plugin-unit-jest": "~5.0.8",
"@vue/cli-plugin-unit-jest": "~5.0.8", "@vue/cli-service": "~5.0.8",
"@vue/cli-service": "~5.0.8", "@vue/eslint-config-standard": "^6.1.0",
"@vue/eslint-config-standard": "^6.1.0", "@vue/test-utils": "1.0.0-beta.29",
"@vue/test-utils": "1.0.0-beta.29", "@vue/vue2-jest": "^27.0.0-alpha.3",
"@vue/vue2-jest": "^27.0.0-alpha.3", "babel-core": "7.0.0-bridge.0",
"babel-core": "7.0.0-bridge.0", "babel-jest": "^23.6.0",
"babel-jest": "^23.6.0", "eslint": "^7.32.0",
"eslint": "^7.32.0", "eslint-plugin-import": "^2.25.3",
"eslint-plugin-import": "^2.25.3", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^5.1.0",
"eslint-plugin-promise": "^5.1.0", "eslint-plugin-vue": "^7.0.0",
"eslint-plugin-vue": "^7.0.0", "jest": "^27.1.0",
"jest": "^27.1.0", "postcss-preset-env": "^7.7.2",
"postcss-preset-env": "^7.7.2", "postcss-px-to-viewport": "^1.1.1",
"postcss-px-to-viewport": "^1.1.1", "sass": "^1.18.0",
"sass": "^1.18.0", "sass-loader": "^7.1.0",
"sass-loader": "^7.1.0", "script-loader": "^0.7.2",
"script-loader": "^0.7.2", "vue-template-compiler": "^2.5.21",
"vue-template-compiler": "^2.5.21", "webpack": "^5.74.0"
"webpack": "^5.74.0" }
} }
}
{
"name": "dj-car-life-system",
"version": "0.1.0",
"private": true,
"scripts": {
"备注": "去掉nomock配置命令",
"serve": "vue-cli-service serve",
"start": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"build": " vue-cli-service build --no-module",
"build:nomock": "vue-cli-service build --mode nomock",
"build:travis": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode travis",
"lint": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint --fix",
"test:unit": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service test:unit",
"report": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --report"
},
"dependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.17.12",
"@babel/plugin-proposal-optional-chaining": "7.13.12",
"@sentry/browser": "^7.12.1",
"@sentry/integrations": "^7.12.1",
"@sentry/tracing": "^7.3.0",
"@sentry/vue": "^7.3.0",
"@sentry/webpack-plugin": "^1.18.9",
"axios": "^0.18.0",
"better-scroll": "^1.15.2",
"core-js": "^3.8.3",
"dayjs": "^1.8.12",
"default-passive-events": "^2.0.0",
"echarts": "^5.3.2",
"element-ui": "^2.13.1",
"eslint-plugin-standard": "^5.0.0",
"file-saver": "^2.0.5",
"flex.css": "^1.1.7",
"fuse.js": "^3.4.4",
"hotkeys-js": "^3.6.2",
"html2canvas": "^1.4.1",
"js-cookie": "^2.2.0",
"js-md5": "^0.7.3",
"jspdf": "^2.5.1",
"lowdb": "^1.0.0",
"nprogress": "^0.2.0",
"qrcodejs2": "^0.0.2",
"qs": "^6.8.0",
"rfdc": "^1.3.0",
"screenfull": "^4.2.0",
"sha1": "^1.1.1",
"speed-measure-webpack-plugin": "^1.5.0",
"svg-sprite-loader": "^6.0.11",
"ua-parser-js": "^0.7.19",
"vue": "^2.6.10",
"vue-qr": "^2.5.0",
"vue-router": "3.0.5",
"vue2-org-tree": "^1.3.6",
"vuex": "^3.0.1",
"webpack-theme-color-replacer": "^1.4.2",
"webpack5-svg-sprite-loader": "^5.1.1",
"xlsx": "^0.16.9",
"yarn": "^1.22.19"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@kazupon/vue-i18n-loader": "^0.4.1",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-unit-jest": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"@vue/eslint-config-standard": "^6.1.0",
"@vue/test-utils": "1.0.0-beta.29",
"@vue/vue2-jest": "^27.0.0-alpha.3",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^7.0.0",
"jest": "^27.1.0",
"postcss-preset-env": "^7.7.2",
"postcss-px-to-viewport": "^1.1.1",
"sass": "^1.18.0",
"sass-loader": "^7.1.0",
"script-loader": "^0.7.2",
"vue-template-compiler": "^2.5.21",
"webpack": "^5.74.0",
"vue-loader": "^15.10.0",
"vue-demi": "^0.13.1"
},
"eslintConfig": {
"parserOptions": {
"//": "由 babel-eslint 替换 @babel/eslint-parser",
"parser": "@babel/eslint-parser"
}
}
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife.feeCategory."
// 分页查询费用类目
export function selectFeeCategoryList(data) {
data.method = `${path}selectFeeCategoryList`
return request(data)
}
// 新增费用类目
export function addFeeCategory(data) {
data.method = `${path}addFeeCategory`
return request(data, RequestMethods.POST)
}
// 修改费用类目
export function editFeeCategory(data) {
data.method = `${path}editFeeCategory`
return request(data, RequestMethods.POST)
}
// 删除费用类目
export function deleteFeeCategory(data) {
data.method = `${path}deleteFeeCategory`
return request(data, RequestMethods.POST)
}
// 根据id 查询详情
export function queryById(data) {
data.method = `${path}queryListById`
return request(data, RequestMethods.POST)
}
// 参考demo.js 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
import * as common from 'glsx-common'
import Vue from 'vue'
import { Message as message } from 'element-ui'
import util from '@/libs/util.js'
const token = util.cookies.get('token')
const fetchConfig = function(isEnv = true) {
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
// 生产环境
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=marketing').then(res => res.data)
// 测试环境
return new common.Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
};
(async function() {
const { response, request, request2, sign, secret, sign_common, request_common, request_merchant } = await fetchConfig(false)
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: message.error, headers: { TGT: token } })
})()
const modulesFiles = require.context('./', true, /\.js$/)
// eslint-disable-next-line array-callback-return
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
if (moduleName != 'entry') {
const value = modulesFiles(modulePath)
modules[moduleName] = value.default
}
return modules
}, {})
export default modules
import request from './request' import request from "./request"
// const path = 'dj.api.' // const path = 'dj.api.'
const path2 = 'dj.api.smartcarlife.' const path2 = "dj.api.smartcarlife."
export function getSummary(data) { export function getSummary(data) {
data.method = `${path2}goodsOrderProfitAllocation.statistics` data.method = `${path2}goodsOrderProfitAllocation.statistics`
...@@ -45,10 +45,28 @@ export function getServiceListApi(data) { ...@@ -45,10 +45,28 @@ export function getServiceListApi(data) {
export function getServiceSummaryApi(data) { export function getServiceSummaryApi(data) {
data.method = `${path2}goodsOrderProfitAllocation.count.service.merchant` data.method = `${path2}goodsOrderProfitAllocation.count.service.merchant`
return request(data, 'post') return request(data, "post")
} }
export function exportAccountStatement(data) { export function exportAccountStatement(data) {
data.method = `${path2}goodsOrderProfitAllocation.exportAccountStatement` data.method = `${path2}goodsOrderProfitAllocation.exportAccountStatement`
return request(data, 'post') return request(data, "post")
}
// 财务列表主订单明细
export function mainOrderDetail(data) {
data.method = `${path2}goodsOrderProfitAllocation.mainOrder.detail`
return request(data)
}
// 财务列表子订单明细
export function subOrderDetail(data) {
data.method = `${path2}goodsOrderProfitAllocation.subOrder.detail`
return request(data)
}
// 根据4s店获取服务商列表
export function queryServiceRefByShop() {
data.method = `${path2}scenemerchantref.queryServiceRefByShop`
return request(data, "post")
} }
...@@ -153,19 +153,19 @@ export function removeContact(data) { ...@@ -153,19 +153,19 @@ export function removeContact(data) {
return request(data, "post") return request(data, "post")
} }
//分页查询园区店 // 分页查询园区店
export function getyqMerchantList(data) { export function getyqMerchantList(data) {
data.method = `dj.smartcarlife.api.yqMerchant.pageList` data.method = `dj.smartcarlife.api.yqMerchant.pageList`
return request(data) return request(data)
} }
//分页查询服务商 // 分页查询服务商
export function getServiceList(data) { export function getServiceList(data) {
data.method = `dj.smartcarlife.api.merchant.serviceList` data.method = `dj.smartcarlife.api.merchant.serviceList`
return request(data) return request(data)
} }
//获取4s店绑定的服务商和园区店信息 // 获取4s店绑定的服务商和园区店信息
export function querySceneRefByShop(data) { export function querySceneRefByShop(data) {
data.method = `${path}scenemerchantref.querySceneRefByShop` data.method = `${path}scenemerchantref.querySceneRefByShop`
return request(data) return request(data)
...@@ -177,6 +177,99 @@ export function addOrUpdateSceneMerchantRef(data) { ...@@ -177,6 +177,99 @@ export function addOrUpdateSceneMerchantRef(data) {
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 获取商户最新的财务分账规则
export function merchantSettleDistributeRuleLastRule(data) {
data.method = `${path2}merchantSettleDistributeRule.lastRule`
return request(data, RequestMethods.POST)
}
// 保存财务分账规则
export function merchantSettleDistributeRule(data) {
data.method = `${path2}merchantSettleDistributeRule.save`
return request(data, RequestMethods.POST)
}
// 历史记录(对账、分账)
// 分账规则历史记录
export function getLedgerHistoryRecordApi(data) {
data.method = `${path2}divisionRuleEffectRecord.getHistoryRecord`
return request(data, "post")
}
// 对账规则历史记录
export function getReconciliationHistoryRecordApi(data) {
data.method = `${path2}reconciliationRuleEffectRecord.getHistoryRecord`
return request(data, "post")
}
// // 查看详情(对账、分账)
// 分账
export function getDistributeRuleApi(data) {
data.method = `${path2}merchantSettleDistributeRule.lastRule`
return request(data, "post")
}
// 对账
export function getEffectRuleApi(data) {
data.method = `${path2}reconciliation.getEffectRule`
return request(data, "post")
}
// 对账提交
// 保存
export function saveRuleApi(data) {
data.method = `${path2}reconciliation.saveRule`
return request(data, "post")
}
// 查询服务商列表
export function listPartnerMerchantApi(data) {
data.method = `${path2}shopMerchant.listPartnerMerchant`
return request(data, "post")
}
// 查询4s店及上级列表 参数 channelType=1(流量方对象)
export function getMerchantLevelListApi(data) {
data.method = `${path2}get.merchantLevelList`
return request(data, "post")
}
// 按照场景类型和应用对象查询:表头
export function getQueryFeeCategoryByTypeApi(data) {
data.method = `${path2}feeCategory.queryFeeCategoryByType`
return request(data, "post")
}
// 管理员手机号
export function getmerchantCompantSmsApi(data) {
data.method = `${path2}smartcarlife.sms.merchantCompantSms.adminInfo`
return request(data, "post")
}
// 分账测算
export function merchantSettleDistributeRuleTestRule(data) {
data.method = `${path2}merchantSettleDistributeRule.testRule`
return request(data, RequestMethods.POST)
}
// 根据4s店获取服务商列表
export function scenemerchantrefQueryServiceRefByShop(data) {
data.method = `${path}scenemerchantref.queryServiceRefByShop`
return request(data, RequestMethods.POST)
}
// 获取商户财务设置进度
export function divisionRuleTestGet(data) {
data.method = `${path2}divisionRuleTest.get`
return request(data, RequestMethods.POST)
}
// 分账测试验证分账金额
export function divisionRuleTestMoneyValid(data) {
data.method = `${path2}divisionRuleTest.money.valid`
return request(data, RequestMethods.POST)
}
// // 分账测算
// export function merchantSettleDistributeRuleTestRule(data) {
// data.method = `${path}merchantSettleDistributeRule.testRule`
// return request(data, RequestMethods.POST)
// }
// 获取商户基础信息 // 获取商户基础信息
export function getBaseInfo(data) { export function getBaseInfo(data) {
data.method = `${path2}serviceMerchant.getBaseInfo` data.method = `${path2}serviceMerchant.getBaseInfo`
...@@ -188,3 +281,9 @@ export function updateCardCodeFlag(data) { ...@@ -188,3 +281,9 @@ export function updateCardCodeFlag(data) {
data.method = `${path2}serviceMerchant.updateCardCodeFlag` data.method = `${path2}serviceMerchant.updateCardCodeFlag`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 删除商户关联关系
export function deleteShopRef(data) {
data.method = `${path}scenemerchantref.deleteShopRef`
return request(data, RequestMethods.POST)
}
...@@ -76,3 +76,33 @@ export function markAsNoUse(data) { ...@@ -76,3 +76,33 @@ export function markAsNoUse(data) {
data.method = `${path2}waitinputorder.markAsNoUse` data.method = `${path2}waitinputorder.markAsNoUse`
return request(data, "post") return request(data, "post")
} }
// 众筹活动订单查询列表
export function shopmallOrderList(data) {
data.method = `${path2}shopmallOrder.pageList`
return request(data)
}
// 关联活动订单
export function relatedActivityOrder(data) {
data.method = `${path2}waitinputorder.relatedActivityOrder`
return request(data, "post")
}
// 取消待确认补录(更新为待补录)
export function batchUpdateToNotInput(data) {
data.method = `${path2}waitinputorder.batchUpdateToNotInput`
return request(data, "post")
}
// 待确认补录订单批量标记为确认补录
export function batchUpdateConfirmInput(data) {
data.method = `${path2}waitinputorder.batchUpdateConfirmInput`
return request(data, "post")
}
// 订单详情
export function goodsOrderDetail(data) {
data.method = `${path2}goodsOrder.detail`
return request(data, "post")
}
import request from './request' import request from "./request"
const djPath = 'dj.api.' const djPath = "dj.api."
const path = 'dj.api.serviceMerchant.' const path = "dj.api.serviceMerchant."
// 分页查询服务门店 // 分页查询服务门店
export function getListApi(data) { export function getListApi(data) {
data.method = `${path}listWithPage` data.method = `${path}listWithPage`
return request(data, 'post') return request(data, "post")
} }
// 注册线下商户 // 注册线下商户
export function registerYseMerchantApi(data) { export function registerYseMerchantApi(data) {
data.method = `${djPath}yseMerchantOffline.register` data.method = `${djPath}yseMerchantOffline.register`
return request(data, 'post') return request(data, "post")
} }
// 注册线下商户_新版 registerYseMerchantApiNew // 注册线下商户_新版 registerYseMerchantApiNew
export function registerYseMerchantApiNew(data) { export function registerYseMerchantApiNew(data) {
data.method = `${djPath}yseMerchantOffline.registerNew` data.method = `${djPath}yseMerchantOffline.registerNew`
return request(data, 'post') return request(data, "post")
} }
// 注册线下商户-存草稿 // 注册线下商户-存草稿
export function draftYseMerchantApi(data) { export function draftYseMerchantApi(data) {
data.method = `${djPath}yseMerchantOffline.saveDrafts` data.method = `${djPath}yseMerchantOffline.saveDrafts`
return request(data, 'post') return request(data, "post")
} }
// 注册线下商户-存草稿_新版 // 注册线下商户-存草稿_新版
export function draftYseMerchantApiNew(data) { export function draftYseMerchantApiNew(data) {
data.method = `${djPath}yseMerchantOffline.saveDraftsNew` data.method = `${djPath}yseMerchantOffline.saveDraftsNew`
return request(data, 'post') return request(data, "post")
} }
// 获取商户虚拟对公账户详情 // 获取商户虚拟对公账户详情
export function getDetailApi(data) { export function getDetailApi(data) {
data.method = `${djPath}yseMerchantOffline.getDetail` data.method = `${djPath}yseMerchantOffline.getDetail`
return request(data, 'post') return request(data, "post")
} }
// 渠道级联dj.api.smartcarlife.get.merchant.level // 渠道级联dj.api.smartcarlife.get.merchant.level
export function getMerchantLevelApi(data) { export function getMerchantLevelApi(data) {
data.method = `${djPath}smartcarlife.get.merchant.level` data.method = `${djPath}smartcarlife.get.merchant.level`
return request(data, 'post') return request(data, "post")
} }
// 分页搜索服务门店 // 分页搜索服务门店
export function getMerchantPageSearch(data) { export function getMerchantPageSearch(data) {
data.method = `${path}page.search` data.method = `${path}page.search`
return request(data, 'post') return request(data, "post")
} }
// 下载账户合同 // 下载账户合同
export function downloadContract(data) { export function downloadContract(data) {
data.method = `${path}yseMerchantOffline.downSign` data.method = `${path}yseMerchantOffline.downSign`
return request(data, 'post') return request(data, "post")
} }
// 获取省市区信息 // 获取省市区信息
export function getAreaInfoApi(data) { export function getAreaInfoApi(data) {
data.method = `${djPath}yseMerchantOffline.getAreaInfo` data.method = `${djPath}yseMerchantOffline.getAreaInfo`
return request(data, 'post') return request(data, "post")
} }
// 根据开户支行编号查询区域信息 // 根据开户支行编号查询区域信息
export function getAreaInfoByOpenAccBankTypeApi(data) { export function getAreaInfoByOpenAccBankTypeApi(data) {
data.method = `${djPath}yseMerchantOffline.getAreaInfoByOpenAccBankType` data.method = `${djPath}yseMerchantOffline.getAreaInfoByOpenAccBankType`
return request(data, 'post') return request(data, "post")
} }
// 分账规则历史记录 // 分账规则历史记录
export function getHistoryRecord(data) { export function getHistoryRecord(data) {
data.method = `${djPath}smartcarlife.divisionRuleEffectRecord.getHistoryRecord` data.method = `${djPath}smartcarlife.divisionRuleEffectRecord.getHistoryRecord`
return request(data, 'post') return request(data, "post")
}
// 虚拟对公账户-同步操作
export function synchronizeBusinessInformation(data) {
data.method = `${path}synchronizeBusinessInformation`
return request(data, "post")
} }
import request from './request'
const path = 'fims.'
export function searchReportLog(data) {
data.method = `${path}reportlog.search`
return request(data)
}
export function searchDepot(data) {
data.method = 'fims.configuration.from.conftype'
return request(data)
}
...@@ -17,6 +17,13 @@ export function getProductType(data) { ...@@ -17,6 +17,13 @@ export function getProductType(data) {
data.method = `${path}goods.type.list` data.method = `${path}goods.type.list`
return request(data) return request(data)
} }
// 获取不同场景的商品分类
export function getGoodsCategoryConfiguration(data) {
data.currentPage = 1
data.pageSize = 999999
data.method = `${path}goodsCategoryConfiguration.page`
return request(data)
}
// 获取渠道列表 // 获取渠道列表
export function getChannelType(data) { export function getChannelType(data) {
...@@ -77,3 +84,9 @@ export function uploadVideo(data) { ...@@ -77,3 +84,9 @@ export function uploadVideo(data) {
data.method = `${path}smartcarlife.common.uploadVideo` data.method = `${path}smartcarlife.common.uploadVideo`
return request(data, RequestMethods.POST, ["file"]) return request(data, RequestMethods.POST, ["file"])
} }
// 类目列表获取
export function queryFeeCategoryByType(data) {
data.method = `${path}smartcarlife.feeCategory.queryFeeCategoryByType`
return request(data, RequestMethods.POST)
}
import request from './request'
const path = 'fims.system.'
function getListApi(data) {
data.method = `${path}list`
return request(data)
}
function reportApi(data) {
data.method = `${path}report`
return request(data)
}
function exportApi(data) {
data.method = `${path}export`
return request(data)
}
export {
getListApi,
reportApi,
exportApi
}
// 财务管理-费用管理-费用类别-费用类别计算方式
export const defaultSelectOptions = [
{
expenseCategoryCalculateType: 1,
label: "按毛利比例"
},
{
expenseCategoryCalculateType: 2,
label: "按收入比例"
},
{
expenseCategoryCalculateType: 3,
label: "按固定金额"
}
]
// 财务管理-费用管理-费用类别-费用类别计算方式
export const severSelectOptions = [
{
expenseCategoryCalculateType: 1,
label: "按毛利比例"
},
{
expenseCategoryCalculateType: 2,
label: "按收入比例"
},
{
expenseCategoryCalculateType: 3,
label: "按固定金额"
},
{
expenseCategoryCalculateType: 4,
label: "按(产值-流量成本)比例"
},
{
expenseCategoryCalculateType: 5,
label: "按(产值-流量成本-其他费用不包含产品成本))比例"
},
{
expenseCategoryCalculateType: 6,
label: "按(产值-流量成本-其他费用包含产品成本)比例"
}
]
// 回显财务管理-费用管理-费用类别-费用类
export const severSelectOptionsLabel = {
1: "按毛利比例",
2: "按收入比例",
3: "按固定金额",
4: "按(产值-流量成本)比例",
5: "按(产值-流量成本-其他费用不包含产品成本))比例",
6: "按(产值-流量成本-其他费用包含产品成本)比例"
}
// 获取最近n个月,默认6个月
export function getCurrentSixMonth(n = 5) {
return [new Date(new Date().setMonth(new Date().getMonth() - n)), new Date()]
}
// 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则
export function limitPrice(
newValue,
oldValue,
intergerDigit,
pointDigit,
minValue,
maxValue,
regRule
) {
var reg = {
priceReg: /^\d[\d\.]*$/, // eslint-disable-line
numReg: /^[1-9]\d*$/
}
regRule = regRule || "priceReg"
if (
newValue &&
((minValue && newValue < minValue) || (maxValue && newValue > maxValue))
) {
return oldValue || ""
}
if (newValue && reg[regRule].test(newValue + "")) {
if (/\./.test(newValue)) {
newValue = newValue + ""
var interger = newValue.split(".")[0]
var point = newValue.split(".")[1]
var intergerNum =
interger.length > intergerDigit ? oldValue.split(".")[0] : interger
var pointNum =
point.length > pointDigit ? point.slice(0, pointDigit) : point
newValue = pointDigit
? intergerNum + "." + pointNum
: newValue.split(".")[0]
} else {
newValue =
newValue.length > intergerDigit
? oldValue.slice(0, intergerDigit)
: newValue
}
return newValue
} else {
return newValue ? oldValue : ""
}
}
/**
* 时间控件-限制月份
*/
export const rangePickerOptions = {
disabledDate(date) {
console.log(date)
console.log(new Date())
if (date > new Date()) {
return true
}
return false
}
}
/**
* 时间控件-(0-30天内的日期)
*/
export const appointDays = 35
export const afterTodayOptions = {
disabledDate(date) {
if (
date < new Date(new Date().toLocaleDateString()) ||
date >
new Date(new Date().setDate(new Date().getDate() + (appointDays - 1)))
) {
return true
}
return false
}
}
...@@ -9,17 +9,14 @@ ...@@ -9,17 +9,14 @@
:visible.sync="visible" :visible.sync="visible"
:show-close="config.showClose" :show-close="config.showClose"
class="noborder" class="noborder"
:append-to-body="config.appendToBody" :append-to-body="config.appendToBody">
>
<slot /> <slot />
<div <div
slot="footer" slot="footer"
v-if="config.isShowFooter" v-if="config.isShowFooter">
>
<el-button <el-button
type="primary" type="primary"
@click="confirmBtn" @click="confirmBtn">
>
{{ config.confirm_name }} {{ config.confirm_name }}
</el-button> </el-button>
<el-button @click="visible = false"> <el-button @click="visible = false">
......
...@@ -3,14 +3,12 @@ ...@@ -3,14 +3,12 @@
<div <div
v-if="$slots.header" v-if="$slots.header"
class="d2-container-card-bs__header" class="d2-container-card-bs__header"
ref="header" ref="header">
>
<slot name="header" /> <slot name="header" />
</div> </div>
<div <div
class="d2-container-card-bs__body" class="d2-container-card-bs__body"
ref="wrapper" ref="wrapper">
>
<div class="d2-container-card-bs__body-wrapper-inner"> <div class="d2-container-card-bs__body-wrapper-inner">
<div class="d2-container-card-bs__body-card"> <div class="d2-container-card-bs__body-card">
<slot /> <slot />
...@@ -20,8 +18,7 @@ ...@@ -20,8 +18,7 @@
<div <div
v-if="$slots.footer" v-if="$slots.footer"
class="d2-container-card-bs__footer" class="d2-container-card-bs__footer"
ref="footer" ref="footer">
>
<slot name="footer" /> <slot name="footer" />
</div> </div>
</div> </div>
......
...@@ -3,14 +3,12 @@ ...@@ -3,14 +3,12 @@
<div <div
v-if="$slots.header" v-if="$slots.header"
class="d2-container-card__header" class="d2-container-card__header"
ref="header" ref="header">
>
<slot name="header" /> <slot name="header" />
</div> </div>
<div <div
class="d2-container-card__body" class="d2-container-card__body"
ref="body" ref="body">
>
<div class="d2-container-card__body-card"> <div class="d2-container-card__body-card">
<slot /> <slot />
</div> </div>
...@@ -18,8 +16,7 @@ ...@@ -18,8 +16,7 @@
<div <div
v-if="$slots.footer" v-if="$slots.footer"
class="d2-container-card__footer" class="d2-container-card__footer"
ref="footer" ref="footer">
>
<slot name="footer" /> <slot name="footer" />
</div> </div>
</div> </div>
......
...@@ -3,14 +3,12 @@ ...@@ -3,14 +3,12 @@
<div <div
v-if="$slots.header" v-if="$slots.header"
class="d2-container-full-bs__header" class="d2-container-full-bs__header"
ref="header" ref="header">
>
<slot name="header" /> <slot name="header" />
</div> </div>
<div <div
class="d2-container-full-bs__body" class="d2-container-full-bs__body"
ref="wrapper" ref="wrapper">
>
<div class="d2-container-full-bs__body-wrapper-inner"> <div class="d2-container-full-bs__body-wrapper-inner">
<slot /> <slot />
</div> </div>
...@@ -18,8 +16,7 @@ ...@@ -18,8 +16,7 @@
<div <div
v-if="$slots.footer" v-if="$slots.footer"
class="d2-container-full-bs__footer" class="d2-container-full-bs__footer"
ref="footer" ref="footer">
>
<slot name="footer" /> <slot name="footer" />
</div> </div>
</div> </div>
......
...@@ -5,22 +5,19 @@ ...@@ -5,22 +5,19 @@
v-if="$slots.header" v-if="$slots.header"
class="d2-container-full__header" class="d2-container-full__header"
ref="header" ref="header"
:class="this.active?'active':'close'" :class="this.active?'active':'close'">
>
<slot name="header" /> <slot name="header" />
<d2-header-switch /> <d2-header-switch />
</div> </div>
<div <div
class="d2-container-full__body" class="d2-container-full__body"
ref="body" ref="body">
>
<slot /> <slot />
</div> </div>
<div <div
v-if="$slots.footer" v-if="$slots.footer"
class="d2-container-full__footer" class="d2-container-full__footer"
ref="footer" ref="footer">
>
<slot name="footer" /> <slot name="footer" />
</div> </div>
<!-- </el-scrollbar> --> <!-- </el-scrollbar> -->
......
...@@ -3,14 +3,12 @@ ...@@ -3,14 +3,12 @@
<div <div
v-if="$slots.header" v-if="$slots.header"
class="d2-container-ghost-bs__header" class="d2-container-ghost-bs__header"
ref="header" ref="header">
>
<slot name="header" /> <slot name="header" />
</div> </div>
<div <div
class="d2-container-ghost-bs__body" class="d2-container-ghost-bs__body"
ref="wrapper" ref="wrapper">
>
<div> <div>
<slot /> <slot />
</div> </div>
...@@ -18,8 +16,7 @@ ...@@ -18,8 +16,7 @@
<div <div
v-if="$slots.footer" v-if="$slots.footer"
class="d2-container-ghost-bs__footer" class="d2-container-ghost-bs__footer"
ref="footer" ref="footer">
>
<slot name="footer" /> <slot name="footer" />
</div> </div>
</div> </div>
......
...@@ -3,21 +3,18 @@ ...@@ -3,21 +3,18 @@
<div <div
v-if="$slots.header" v-if="$slots.header"
class="d2-container-ghost__header" class="d2-container-ghost__header"
ref="header" ref="header">
>
<slot name="header" /> <slot name="header" />
</div> </div>
<div <div
class="d2-container-ghost__body" class="d2-container-ghost__body"
ref="body" ref="body">
>
<slot /> <slot />
</div> </div>
<div <div
v-if="$slots.footer" v-if="$slots.footer"
class="d2-container-ghost__footer" class="d2-container-ghost__footer"
ref="footer" ref="footer">
>
<slot name="footer" /> <slot name="footer" />
</div> </div>
</div> </div>
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
v-if="show" v-if="show"
class="d2-source" class="d2-source"
:class="{ 'd2-source--active': isActive }" :class="{ 'd2-source--active': isActive }"
@click="handleClick" @click="handleClick">
>
<d2-icon name="code" /> 本页源码 <d2-icon name="code" /> 本页源码
</div> </div>
</template> </template>
......
...@@ -39,10 +39,8 @@ export default { ...@@ -39,10 +39,8 @@ export default {
}, },
render(h) { render(h) {
const slots = [this.$slots.default] const slots = [this.$slots.default]
if (this.$slots.header) if (this.$slots.header) { slots.push(h("template", { slot: "header" }, [this.$slots.header])) }
slots.push(h("template", { slot: "header" }, [this.$slots.header])) if (this.$slots.footer) { slots.push(h("template", { slot: "footer" }, [this.$slots.footer])) }
if (this.$slots.footer)
slots.push(h("template", { slot: "footer" }, [this.$slots.footer]))
return h( return h(
"div", "div",
{ {
......
<template> <template>
<i <i
:class="`el-icon-${name}`" :class="`el-icon-${name}`"
aria-hidden="true" aria-hidden="true" />
/>
</template> </template>
<script> <script>
......
No preview for this file type
...@@ -108,8 +108,9 @@ ...@@ -108,8 +108,9 @@
</template> </template>
<script> <script>
import _ from 'lodash' // import _ from 'lodash'
import { limitPrice, warrantyProList } from '@/common/constants' import { warrantyProList } from '@/common/constants'
import { limitPrice } from '@/common/format'
export default { export default {
name: 'RelateProDialog', name: 'RelateProDialog',
data() { data() {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
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"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
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"
popper-class="tooltip-class" popper-class="tooltip-class"
effect="dark" effect="dark"
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<i <i
class="fa" class="fa"
:class="`fa-${name}`" :class="`fa-${name}`"
aria-hidden="true" aria-hidden="true" />
/>
</template> </template>
<script> <script>
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
</template> </template>
<script> <script>
import { rangePickerOptions } from '@/common/constants' import { rangePickerOptions } from '@/common/format'
export default { export default {
name: 'D2Search', name: 'D2Search',
data() { data() {
......
...@@ -10,11 +10,21 @@ ...@@ -10,11 +10,21 @@
@sort-change="sortChange" @sort-change="sortChange"
@selection-change="handleSelect" @selection-change="handleSelect"
:tree-props="{children: 'upgradeGoodsList'}" :tree-props="{children: 'upgradeGoodsList'}"
:span-method="arraySpanMethod"> :span-method="arraySpanMethod"
v-bind="$attrs">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" <el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection" type="selection"
align="center"
:selectable="selectableFn" :selectable="selectableFn"
width="55" /> width="55" />
<el-table-column v-if="tableParams.singleSelectUniqueKey"
align="center"
width="55">
<template slot-scope="scope">
<slot name="single-button"
:scope="scope.row" />
</template>
</el-table-column>
<el-table-column v-if="hasNum" <el-table-column v-if="hasNum"
align="center" align="center"
width="60px" width="60px"
...@@ -44,7 +54,7 @@ ...@@ -44,7 +54,7 @@
:prop="item.prop" :prop="item.prop"
:width="item.width" /> :width="item.width" />
<template v-else-if="item.type == 'ownSerialNum'"> <template v-else-if="item.type == 'ownSerialNum'">
<span>{{scope.row[item.prop] >= 0 ? (scope.row[item.prop]+((pagination.currentPage?pagination.currentPage:page.currentPage) - 1) * (pagination.pageSize?pagination.pageSize:page.pageSize) + 1) : ''}}</span> <span>{{ scope.row[item.prop] >= 0 ? (scope.row[item.prop]+((pagination.currentPage?pagination.currentPage:page.currentPage) - 1) * (pagination.pageSize?pagination.pageSize:page.pageSize) + 1) : '' }}</span>
</template> </template>
<template v-else-if="item.tagLabel"> <template v-else-if="item.tagLabel">
<el-tag v-if="!item.tagName" <el-tag v-if="!item.tagName"
...@@ -245,7 +255,7 @@ export default { ...@@ -245,7 +255,7 @@ export default {
arraySpanMethod: { arraySpanMethod: {
type: Function, type: Function,
default: null default: null
}, }
}, },
mounted() { mounted() {
...@@ -304,22 +314,22 @@ export default { ...@@ -304,22 +314,22 @@ export default {
// this.tableParams.needUnique && (res[this.tableParams.listName].forEach((item) => { // this.tableParams.needUnique && (res[this.tableParams.listName].forEach((item) => {
// item[this.tableParams.mutiSelectUniqueKey] // item[this.tableParams.mutiSelectUniqueKey]
// })) // }))
// //
if (this.filterListData) { if (this.filterListData) {
res[this.tableParams.listName] && res[this.tableParams.listName].forEach((val, index) => { res[this.tableParams.listName] && res[this.tableParams.listName].forEach((val, index) => {
let shopPriceArr = [] const shopPriceArr = []
let stockTotal = 0 let stockTotal = 0
val.ownSerialNum = index val.ownSerialNum = index
val.upgradeGoodsList && val.upgradeGoodsList.forEach(v => { val.upgradeGoodsList && val.upgradeGoodsList.forEach(v => {
shopPriceArr.push(v.upgradePrice) shopPriceArr.push(v.upgradePrice)
v.listShowShopPrice = v.upgradePrice v.listShowShopPrice = v.upgradePrice
v.listShowStock = v.stock v.listShowStock = v.stock
v.listShowSpecificationData = v.specificationData v.listShowSpecificationData = v.specificationData.replace(';~;', ' ')
v.goodsInfo.goodsName = val.baseGoodsName || v.goodsInfo.goodsName // 新数据显示商品名称,历史商品数据显示素材名称 v.goodsInfo.goodsName = val.baseGoodsName || v.goodsInfo.goodsName // 新数据显示商品名称,历史商品数据显示素材名称
stockTotal += v.stock stockTotal += v.stock
}) })
let minPrice = shopPriceArr.length ? Math.min(...shopPriceArr) : 0 const minPrice = shopPriceArr.length ? Math.min(...shopPriceArr) : 0
let maxPrice = shopPriceArr.length ? Math.max(...shopPriceArr) : 0 const maxPrice = shopPriceArr.length ? Math.max(...shopPriceArr) : 0
// 父商品规格数量 // 父商品规格数量
val.listShowSpecificationData = val.upgradeGoodsList && val.upgradeGoodsList.length > 0 ? 'X' + val.upgradeGoodsList.length : '' val.listShowSpecificationData = val.upgradeGoodsList && val.upgradeGoodsList.length > 0 ? 'X' + val.upgradeGoodsList.length : ''
val.listShowShopPrice = minPrice == maxPrice ? maxPrice : minPrice + '~' + maxPrice val.listShowShopPrice = minPrice == maxPrice ? maxPrice : minPrice + '~' + maxPrice
...@@ -364,6 +374,13 @@ export default { ...@@ -364,6 +374,13 @@ export default {
this.page.currentPage = value this.page.currentPage = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page) this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
}, },
refreshTable_noApi() {
this.page = {
pageSize: 20,
currentPage: 1
}
}
} }
} }
......
<template> <template>
<div <div
class="d2-contentmenu-list" class="d2-contentmenu-list"
@click="rowClick" @click="rowClick">
>
<div <div
v-for="item in menulist" v-for="item in menulist"
:key="item.value" :key="item.value"
:data-value="item.value" :data-value="item.value"
class="d2-contentmenu-item" class="d2-contentmenu-item"
flex="cross:center main:center" flex="cross:center main:center">
>
<d2-el-icon <d2-el-icon
v-if="item.icon" v-if="item.icon"
:name="item.icon" :name="item.icon" />
/>
<div <div
class="d2-contentmenu-item-title" class="d2-contentmenu-item-title"
flex-box="1" flex-box="1"
v-text="item.title" v-text="item.title" />
/>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<div <div
class="d2-contextmenu" class="d2-contextmenu"
v-show="flag" v-show="flag"
:style="style" :style="style">
>
<slot /> <slot />
</div> </div>
</template> </template>
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
<div <div
@click="click" @click="click"
class="hamburger" class="hamburger"
:class="{'is-active':isActive}" :class="{'is-active':isActive}">
>
<d2-el-icon name="s-fold" /> <d2-el-icon name="s-fold" />
</div> </div>
</template> </template>
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
:value="value" :value="value"
:predefine="predefine" :predefine="predefine"
size="mini" size="mini"
@change="set" @change="set" />
/>
</template> </template>
<script> <script>
......
...@@ -2,22 +2,18 @@ ...@@ -2,22 +2,18 @@
<el-tooltip <el-tooltip
effect="dark" effect="dark"
:content="active ? '退出全屏' : '全屏'" :content="active ? '退出全屏' : '全屏'"
placement="bottom" placement="bottom">
>
<el-button <el-button
class="d2-mr btn-text can-hover" class="d2-mr btn-text can-hover"
type="text" type="text"
@click="toggle" @click="toggle">
>
<d2-el-icon <d2-el-icon
v-if="active" v-if="active"
name="aim" name="aim" />
/>
<d2-el-icon <d2-el-icon
v-else v-else
name="full-screen" name="full-screen"
style="font-size: 16px" style="font-size: 16px" />
/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</template> </template>
......
...@@ -2,27 +2,22 @@ ...@@ -2,27 +2,22 @@
<el-dropdown <el-dropdown
placement="bottom" placement="bottom"
size="small" size="small"
@command="onChangeLocale" @command="onChangeLocale">
>
<el-button <el-button
class="d2-mr btn-text can-hover" class="d2-mr btn-text can-hover"
type="text" type="text">
>
<d2-icon <d2-icon
name="language" name="language"
style="font-size: 16px;" style="font-size: 16px;" />
/>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
v-for="(language, index) in $languages" v-for="(language, index) in $languages"
:key="index" :key="index"
:command="language.value" :command="language.value">
>
<d2-icon <d2-icon
:name="$i18n.locale === language.value ? 'dot-circle-o' : 'circle-o'" :name="$i18n.locale === language.value ? 'dot-circle-o' : 'circle-o'"
class="d2-mr-5" class="d2-mr-5" />
/>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
......
...@@ -2,29 +2,24 @@ ...@@ -2,29 +2,24 @@
<el-tooltip <el-tooltip
effect="dark" effect="dark"
:content="tooltipContent" :content="tooltipContent"
placement="bottom" placement="bottom">
>
<el-button <el-button
class="d2-ml-0 d2-mr btn-text can-hover" class="d2-ml-0 d2-mr btn-text can-hover"
type="text" type="text"
@click="handleClick" @click="handleClick">
>
<el-badge <el-badge
v-if="logLength > 0" v-if="logLength > 0"
:max="99" :max="99"
:value="logLengthError" :value="logLengthError"
:is-dot="logLengthError === 0" :is-dot="logLengthError === 0">
>
<d2-icon <d2-icon
:name="logLengthError === 0 ? 'dot-circle-o' : 'bug'" :name="logLengthError === 0 ? 'dot-circle-o' : 'bug'"
style="font-size: 20px" style="font-size: 20px" />
/>
</el-badge> </el-badge>
<d2-icon <d2-icon
v-else v-else
name="dot-circle-o" name="dot-circle-o"
style="font-size: 20px" style="font-size: 20px" />
/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</template> </template>
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
<el-button <el-button
class="d2-mr btn-text can-hover" class="d2-mr btn-text can-hover"
type="text" type="text"
@click="handleClick" @click="handleClick">
>
<d2-el-icon <d2-el-icon
name="search" name="search"
style="font-size: 18px;" style="font-size: 18px;" />
/>
</el-button> </el-button>
</template> </template>
......
...@@ -2,27 +2,22 @@ ...@@ -2,27 +2,22 @@
<el-dropdown <el-dropdown
placement="bottom" placement="bottom"
size="small" size="small"
@command="handleChange" @command="handleChange">
>
<el-button <el-button
class="d2-mr btn-text can-hover" class="d2-mr btn-text can-hover"
type="text" type="text">
>
<d2-icon <d2-icon
name="font" name="font"
style="font-size: 16px;" style="font-size: 16px;" />
/>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
:command="item.value" :command="item.value">
>
<d2-icon <d2-icon
:name="iconName(item.value)" :name="iconName(item.value)"
class="d2-mr-5" class="d2-mr-5" />
/>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
......
<template> <template>
<el-table <el-table
:data="list" :data="list"
v-bind="table" v-bind="table">
>
<el-table-column <el-table-column
prop="title" prop="title"
align="center" align="center"
width="160" width="160" />
/>
<el-table-column <el-table-column
label="预览" label="预览"
width="120" width="120">
>
<div <div
slot-scope="scope" slot-scope="scope"
class="theme-preview" class="theme-preview"
:style="{ :style="{
backgroundImage: `url(${$baseUrl}${scope.row.preview})` backgroundImage: `url(${$baseUrl}${scope.row.preview})`
}" }" />
/>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
align="center" align="center">
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="activeName === scope.row.name" v-if="activeName === scope.row.name"
type="primary" type="primary"
icon="el-icon-check" icon="el-icon-check"
class="btn-active-success" class="btn-active-success"
round round>
>
已激活 已激活
</el-button> </el-button>
<el-button <el-button
v-else v-else
round round
@click="handleSelectTheme(scope.row)" @click="handleSelectTheme(scope.row)">
>
使用 使用
</el-button> </el-button>
</template> </template>
......
...@@ -3,25 +3,21 @@ ...@@ -3,25 +3,21 @@
<el-tooltip <el-tooltip
effect="dark" effect="dark"
content="主题" content="主题"
placement="bottom" placement="bottom">
>
<el-button <el-button
class="d2-ml-0 d2-mr btn-text can-hover" class="d2-ml-0 d2-mr btn-text can-hover"
type="text" type="text"
@click="dialogVisible = true" @click="dialogVisible = true">
>
<d2-el-icon <d2-el-icon
name="magic-stick" name="magic-stick"
style="font-size: 18px" style="font-size: 18px" />
/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-dialog <el-dialog
title="主题" title="主题"
width="600px" width="600px"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:append-to-body="true" :append-to-body="true">
>
<d2-theme-list style="margin-top: -25px;" /> <d2-theme-list style="margin-top: -25px;" />
</el-dialog> </el-dialog>
</div> </div>
......
...@@ -2,20 +2,16 @@ ...@@ -2,20 +2,16 @@
<div <div
class="d2-panel-search-item" class="d2-panel-search-item"
:class="hoverMode ? 'can-hover' : ''" :class="hoverMode ? 'can-hover' : ''"
flex flex>
>
<div <div
class="d2-panel-search-item__icon" class="d2-panel-search-item__icon"
flex-box="0" flex-box="0">
>
<div <div
class="d2-panel-search-item__icon-box" class="d2-panel-search-item__icon-box"
flex="main:center cross:center" flex="main:center cross:center">
>
<d2-el-icon <d2-el-icon
v-if="item.icon" v-if="item.icon"
:name="item.icon" :name="item.icon" />
/>
<!-- <d2-icon-svg v-else-if="item.iconSvg" :name="item.iconSvg"/> <!-- <d2-icon-svg v-else-if="item.iconSvg" :name="item.iconSvg"/>
<d2-icon v-else name="file-o"/> --> <d2-icon v-else name="file-o"/> -->
</div> </div>
...@@ -23,25 +19,21 @@ ...@@ -23,25 +19,21 @@
<div <div
class="d2-panel-search-item__info" class="d2-panel-search-item__info"
flex-box="1" flex-box="1"
flex="dir:top" flex="dir:top">
>
<div <div
class="d2-panel-search-item__info-title" class="d2-panel-search-item__info-title"
flex-box="1" flex-box="1"
flex="cross:center" flex="cross:center">
>
<span /> <span />
</div> </div>
<div <div
class="d2-panel-search-item__info-fullTitle" class="d2-panel-search-item__info-fullTitle"
flex-box="0" flex-box="0">
>
<span /> <span />
</div> </div>
<div <div
class="d2-panel-search-item__info-path" class="d2-panel-search-item__info-path"
flex-box="0" flex-box="0">
>
<span /> <span />
</div> </div>
</div> </div>
......
<template> <template>
<div <div
class="panel-search" class="panel-search"
flex="dir:top" flex="dir:top">
>
<div <div
class="panel-search__input-group" class="panel-search__input-group"
flex-box="0" flex-box="0"
flex="dir:top main:center cross:center" flex="dir:top main:center cross:center"
@click.self="handlePanelClick" @click.self="handlePanelClick">
>
<!-- <d2-icon-svg <!-- <d2-icon-svg
class="panel-search__logo" class="panel-search__logo"
name="d2-admin-text"/> --> name="d2-admin-text"/> -->
<img <img
src="./image/logo.png" src="./image/logo.png"
alt="" alt="">
>
<el-autocomplete <el-autocomplete
class="panel-search__input" class="panel-search__input"
ref="input" ref="input"
...@@ -26,12 +23,10 @@ ...@@ -26,12 +23,10 @@
:trigger-on-focus="false" :trigger-on-focus="false"
:clearable="true" :clearable="true"
@keydown.esc.native="handleEsc" @keydown.esc.native="handleEsc"
@select="handleSelect" @select="handleSelect">
>
<d2-panel-search-item <d2-panel-search-item
slot-scope="{ item }" slot-scope="{ item }"
:item="item" :item="item" />
/>
</el-autocomplete> </el-autocomplete>
<div class="panel-search__tip"> <div class="panel-search__tip">
您可以使用快捷键 您可以使用快捷键
...@@ -44,8 +39,7 @@ ...@@ -44,8 +39,7 @@
<div <div
v-if="resultsList.length > 0" v-if="resultsList.length > 0"
class="panel-search__results-group" class="panel-search__results-group"
flex-box="1" flex-box="1">
>
<el-card> <el-card>
<div class="panel-search__results-group-inner"> <div class="panel-search__results-group-inner">
<d2-panel-search-item <d2-panel-search-item
...@@ -53,8 +47,7 @@ ...@@ -53,8 +47,7 @@
:key="index" :key="index"
:item="item" :item="item"
:hover-mode="true" :hover-mode="true"
@click.native="handleResultsGroupItemClick(item.path)" @click.native="handleResultsGroupItemClick(item.path)" />
/>
</div> </div>
</el-card> </el-card>
</div> </div>
......
...@@ -53,19 +53,16 @@ ...@@ -53,19 +53,16 @@
</div>--> </div>-->
<div <div
class="panel-item" class="panel-item"
@click="handleChangeAccount" @click="handleChangeAccount">
>
<el-button <el-button
type="text" type="text"
:disabled="accountInfo.accountList.length == 1" :disabled="accountInfo.accountList.length == 1">
>
<i class="i el-icon-sort" />{{ user && user.merchantAccountLevel ? (user.merchantAccountLevel == 4 ? `${user.detail.userName}` : '管理员') : '未登录' }} <i class="i el-icon-sort" />{{ user && user.merchantAccountLevel ? (user.merchantAccountLevel == 4 ? `${user.detail.userName}` : '管理员') : '未登录' }}
</el-button> </el-button>
</div> </div>
<div <div
class="panel-item" class="panel-item"
@click="clear" @click="clear">
>
<el-button type="text"> <el-button type="text">
<i class="i el-icon-switch-button" />退出账户 <i class="i el-icon-switch-button" />退出账户
</el-button> </el-button>
...@@ -73,12 +70,10 @@ ...@@ -73,12 +70,10 @@
</div> </div>
<personal-dialog <personal-dialog
:visible="personalVisible" :visible="personalVisible"
:user="info" :user="info" />
/>
<password-dialog <password-dialog
:visible="passwordVisible" :visible="passwordVisible"
:user="info" :user="info" />
/>
</div> </div>
</template> </template>
......
...@@ -7,66 +7,54 @@ ...@@ -7,66 +7,54 @@
:before-close="handleClose" :before-close="handleClose"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
width="600px" width="600px">
>
<el-form <el-form
label-width="120px" label-width="120px"
v-if="info" v-if="info"
:model="info" :model="info"
:rules="rules" :rules="rules"
ref="passwordForm" ref="passwordForm">
>
<el-form-item <el-form-item
label="用户名:" label="用户名:"
prop="userName" prop="userName">
>
<el-input <el-input
disabled="disabled" disabled="disabled"
v-model="info.userName" v-model="info.userName" />
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="原密码:" label="原密码:"
prop="oldPassword" prop="oldPassword">
>
<el-input <el-input
type="password" type="password"
maxlength="12" maxlength="12"
:show-password="true" :show-password="true"
v-model="info.oldPassword" v-model="info.oldPassword" />
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="新密码:" label="新密码:"
prop="newPassword" prop="newPassword">
>
<el-input <el-input
type="password" type="password"
maxlength="12" maxlength="12"
:show-password="true" :show-password="true"
v-model="info.newPassword" v-model="info.newPassword" />
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="确认密码:" label="确认密码:"
prop="confirm" prop="confirm">
>
<el-input <el-input
type="password" type="password"
maxlength="12" maxlength="12"
:show-password="true" :show-password="true"
v-model="info.confirm" v-model="info.confirm" />
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div <div
slot="footer" slot="footer"
class="dialog-footer" class="dialog-footer">
>
<el-button <el-button
type="primary" type="primary"
@click="submit" @click="submit">
>
保 存 保 存
</el-button> </el-button>
<el-button @click="handleClose"> <el-button @click="handleClose">
......
...@@ -7,72 +7,57 @@ ...@@ -7,72 +7,57 @@
:before-close="handleClose" :before-close="handleClose"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
width="600px" width="600px">
>
<el-form <el-form
v-if="user" v-if="user"
label-width="120px" label-width="120px"
:model="user" :model="user">
>
<el-form-item <el-form-item
label="用户名:" label="用户名:"
prop="loginName" prop="loginName">
>
<el-input <el-input
disabled disabled
v-model="user.loginName" v-model="user.loginName" />
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="姓名:" label="姓名:"
prop="userName" prop="userName">
>
<el-input <el-input
disabled disabled
v-model="user.userName" v-model="user.userName" />
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="联系方式:" label="联系方式:"
prop="mobile" prop="mobile">
>
<el-input <el-input
disabled disabled
v-model="user.mobile" v-model="user.mobile" />
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="所属公司:" label="所属公司:"
prop="companyName" prop="companyName">
>
<el-input <el-input
disabled disabled
v-model="user.companyName" v-model="user.companyName" />
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="部门:" label="部门:"
prop="departName" prop="departName">
>
<el-input <el-input
disabled disabled
v-model="user.departName" v-model="user.departName" />
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="职务:" label="职务:"
prop="postName" prop="postName">
>
<el-input <el-input
disabled disabled
v-model="user.postName" v-model="user.postName" />
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div <div
slot="footer" slot="footer"
class="dialog-footer" class="dialog-footer">
>
<!-- <el-button type="primary" @click="personDialogVisible = false">确 定</el-button> --> <!-- <el-button type="primary" @click="personDialogVisible = false">确 定</el-button> -->
<el-button @click="handleClose"> <el-button @click="handleClose">
确 定 确 定
......
<template> <template>
<div <div
class="d2-multiple-page-control-group" class="d2-multiple-page-control-group"
flex flex>
>
<div <div
class="d2-multiple-page-control-content" class="d2-multiple-page-control-content"
flex-box="1" flex-box="1">
>
<div class="d2-multiple-page-control-content-inner"> <div class="d2-multiple-page-control-content-inner">
<d2-contextmenu <d2-contextmenu
:visible.sync="contextmenuFlag" :visible.sync="contextmenuFlag"
:x="contentmenuX" :x="contentmenuX"
:y="contentmenuY" :y="contentmenuY">
>
<d2-contextmenu-list <d2-contextmenu-list
:menulist="tagName === '/index' ? contextmenuListIndex : contextmenuList" :menulist="tagName === '/index' ? contextmenuListIndex : contextmenuList"
@rowClick="contextmenuClick" @rowClick="contextmenuClick" />
/>
</d2-contextmenu> </d2-contextmenu>
<el-tabs <el-tabs
class="d2-multiple-page-control" class="d2-multiple-page-control"
...@@ -25,13 +21,11 @@ ...@@ -25,13 +21,11 @@
:closable="true" :closable="true"
@tab-click="handleClick" @tab-click="handleClick"
@edit="handleTabsEdit" @edit="handleTabsEdit"
@contextmenu.native="handleContextmenu" @contextmenu.native="handleContextmenu">
>
<el-tab-pane <el-tab-pane
v-for="page in opened" v-for="page in opened"
:key="page.fullPath" :key="page.fullPath"
:name="page.fullPath" :name="page.fullPath">
>
<span slot="label"><d2-el-icon :name="page.meta.icon" /> <span v-text="(page.meta && page.meta.title) || '未命名'" /></span> <span slot="label"><d2-el-icon :name="page.meta.icon" /> <span v-text="(page.meta && page.meta.title) || '未命名'" /></span>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -39,29 +33,24 @@ ...@@ -39,29 +33,24 @@
</div> </div>
<div <div
class="d2-multiple-page-control-btn" class="d2-multiple-page-control-btn"
flex-box="0" flex-box="0">
>
<el-button-group> <el-button-group>
<el-button <el-button
icon="el-icon-error" icon="el-icon-error"
@click="closeAll" @click="closeAll" />
/>
<el-tooltip <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
:content="cacheTip" :content="cacheTip"
placement="bottom" placement="bottom">
>
<el-button <el-button
:icon="kaIcon" :icon="kaIcon"
@click="handleCache" @click="handleCache" />
/>
</el-tooltip> </el-tooltip>
<el-button <el-button
icon="el-icon-refresh" icon="el-icon-refresh"
@click="reload" @click="reload"
:disabled="current==='/index'" :disabled="current==='/index'" />
/>
</el-button-group> </el-button-group>
</div> </div>
</div> </div>
......
...@@ -2,15 +2,13 @@ ...@@ -2,15 +2,13 @@
<div <div
class="d2-layout-header-aside-group" class="d2-layout-header-aside-group"
:style="styleLayoutMainGroup" :style="styleLayoutMainGroup"
:class="{grayMode: grayActive}" :class="{grayMode: grayActive}">
>
<!-- 半透明遮罩 --> <!-- 半透明遮罩 -->
<div class="d2-layout-header-aside-mask" /> <div class="d2-layout-header-aside-mask" />
<!-- 主体内容 --> <!-- 主体内容 -->
<div <div
class="d2-layout-header-aside-content" class="d2-layout-header-aside-content"
flex="dir:top" flex="dir:top">
>
<!-- 顶栏 --> <!-- 顶栏 -->
<div <div
class="d2-theme-header" class="d2-theme-header"
...@@ -18,27 +16,22 @@ ...@@ -18,27 +16,22 @@
opacity: this.searchActive ? 0.5 : 1 opacity: this.searchActive ? 0.5 : 1
}" }"
flex-box="0" flex-box="0"
flex flex>
>
<div <div
class="logo-group d2-theme-header-logo" class="logo-group d2-theme-header-logo"
:class="asideCollapse ? 'logo-only' : 'logo-all'" :class="asideCollapse ? 'logo-only' : 'logo-all'"
flex-box="0" flex-box="0">
>
<img <img
v-if="asideCollapse" v-if="asideCollapse"
src="../../assets/icon-only.png" src="../../assets/icon-only.png">
>
<img <img
v-else v-else
src="../../assets/all.png" src="../../assets/all.png">
>
<!-- <img style="width: 32px; height: 32px;" src="../../assets/icon-only.png"> --> <!-- <img style="width: 32px; height: 32px;" src="../../assets/icon-only.png"> -->
</div> </div>
<p <p
v-if="show" v-if="show"
class="d2-header-name" class="d2-header-name">
>
{{ info ? info.detail.merchantName : '' }} {{ info ? info.detail.merchantName : '' }}
</p> </p>
<!-- <hamburger :onClick="handleToggleAside" :isActive="asideCollapse" flex-box="0" class="toggle-aside-btn"></hamburger> <!-- <hamburger :onClick="handleToggleAside" :isActive="asideCollapse" flex-box="0" class="toggle-aside-btn"></hamburger>
...@@ -47,8 +40,7 @@ ...@@ -47,8 +40,7 @@
<!-- 顶栏右侧 --> <!-- 顶栏右侧 -->
<div <div
class="d2-header-right" class="d2-header-right"
flex-box="0" flex-box="0">
>
<!-- <d2-header-datetime /> --> <!-- <d2-header-datetime /> -->
<!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" --> <!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" -->
<!-- <d2-header-search @click="handleSearchClick"/> --> <!-- <d2-header-search @click="handleSearchClick"/> -->
...@@ -65,28 +57,24 @@ ...@@ -65,28 +57,24 @@
class="d2-theme-header" class="d2-theme-header"
style="height: 40px; font-size: 14px; border-top: 1px solid #F0F2F5;" style="height: 40px; font-size: 14px; border-top: 1px solid #F0F2F5;"
flex-box="0" flex-box="0"
flex flex>
>
<div <div
class="logo-group d2-theme-header-logo" class="logo-group d2-theme-header-logo"
style="height: 1px; margin-top: -1px;" style="height: 1px; margin-top: -1px;"
:class="asideCollapse ? 'logo-only' : 'logo-all'" :class="asideCollapse ? 'logo-only' : 'logo-all'"
flex-box="0" flex-box="0" />
/>
<hamburger <hamburger
:on-click="handleToggleAside" :on-click="handleToggleAside"
:is-active="asideCollapse" :is-active="asideCollapse"
flex-box="0" flex-box="0"
class="toggle-aside-btn" class="toggle-aside-btn" />
/>
<span class="header-title">{{ headerTitle }}</span> <span class="header-title">{{ headerTitle }}</span>
</div> </div>
<!-- 下面 主体 --> <!-- 下面 主体 -->
<div <div
class="d2-theme-container" class="d2-theme-container"
flex-box="1" flex-box="1"
flex flex>
>
<!-- 主体 侧边栏 --> <!-- 主体 侧边栏 -->
<div <div
flex-box="0" flex-box="0"
...@@ -95,8 +83,7 @@ ...@@ -95,8 +83,7 @@
:style="{ :style="{
width: asideCollapse ? asideWidthCollapse : asideWidth, width: asideCollapse ? asideWidthCollapse : asideWidth,
opacity: this.searchActive ? 0.5 : 1 opacity: this.searchActive ? 0.5 : 1
}" }">
>
<d2-menu-side /> <d2-menu-side />
</div> </div>
<!-- 主体 --> <!-- 主体 -->
...@@ -104,19 +91,16 @@ ...@@ -104,19 +91,16 @@
class="d2-theme-container-main" class="d2-theme-container-main"
:class="this.searchActive ? 'is-search' : ''" :class="this.searchActive ? 'is-search' : ''"
flex-box="1" flex-box="1"
flex flex>
>
<!-- 搜索 --> <!-- 搜索 -->
<transition name="fade-scale"> <transition name="fade-scale">
<div <div
v-if="searchActive" v-if="searchActive"
class="d2-theme-container-main-layer" class="d2-theme-container-main-layer"
flex flex>
>
<d2-panel-search <d2-panel-search
ref="panelSearch" ref="panelSearch"
@close="searchPanelClose" @close="searchPanelClose" />
/>
</div> </div>
</transition> </transition>
<!-- 内容 --> <!-- 内容 -->
...@@ -124,24 +108,20 @@ ...@@ -124,24 +108,20 @@
<div <div
v-if="!searchActive" v-if="!searchActive"
class="d2-theme-container-main-layer" class="d2-theme-container-main-layer"
flex="dir:top" flex="dir:top">
>
<!-- tab --> <!-- tab -->
<div <div
class="d2-theme-container-main-header" class="d2-theme-container-main-header"
flex-box="0" flex-box="0">
>
<!-- <d2-tabs/> --> <!-- <d2-tabs/> -->
</div> </div>
<!-- 页面 --> <!-- 页面 -->
<div <div
class="d2-theme-container-main-body" class="d2-theme-container-main-body"
flex-box="1" flex-box="1">
>
<transition <transition
:name="transitionActive ? 'el-fade-in' : '' " :name="transitionActive ? 'el-fade-in' : '' "
mode="out-in" mode="out-in">
>
<keep-alive :include="keepAlive"> <keep-alive :include="keepAlive">
<router-view /> <router-view />
</keep-alive> </keep-alive>
......
...@@ -13,29 +13,12 @@ import chaining from "@/plugin/chaining" ...@@ -13,29 +13,12 @@ import chaining from "@/plugin/chaining"
// 接入sentry // 接入sentry
import * as Sentry from "@sentry/vue" import * as Sentry from "@sentry/vue"
import { BrowserTracing } from "@sentry/tracing" import { BrowserTracing } from "@sentry/tracing"
// import D2Crud from '@d2-projects/d2-crud' // import D2Crud from '@d2-projects/d2-crud'
// 菜单和路由设置 // 菜单和路由设置
import router from "./router" import router from "./router"
import "default-passive-events" import "default-passive-events"
import notice from "@/common/notice" import notice from "@/common/notice"
import "element-ui/lib/theme-chalk/index.css" import "element-ui/lib/theme-chalk/index.css"
// d2Admin 已导入
// import ElementUI from 'element-ui'
// Vue.use(ElementUI)
// 核心插件
Vue.use(d2Admin)
Vue.use(chaining)
Vue.prototype.notice = notice
const isProd = process.env.NODE_ENV === "production"
// console.log(isProd)
if (!isProd) {
Vue.config.devtools = true
}
// 实例化 // 实例化
process.env.NODE_ENV === "production" && process.env.NODE_ENV === "production" &&
Sentry.init({ Sentry.init({
...@@ -55,8 +38,47 @@ process.env.NODE_ENV === "production" && ...@@ -55,8 +38,47 @@ process.env.NODE_ENV === "production" &&
logErrors: true logErrors: true
// "send-default-pii": true // "send-default-pii": true
}) })
// d2Admin 已导入
// import ElementUI from 'element-ui'
// Vue.use(ElementUI)
// 核心插件
Vue.use(d2Admin)
Vue.use(chaining)
Vue.prototype.notice = notice
const isProd = process.env.NODE_ENV === "production"
// console.log(isProd)
if (!isProd) {
Vue.config.devtools = true
}
// console.log(test) // console.log(test)
// Vue.use(D2Crud) // Vue.use(D2Crud)
// 动态导入vuex 模块
// Vue.use(function () {
// Vue.mixin({
// beforeCreate: function () {
// // $options是组件选项,包含组件.vue文件的 `export default` 的属性
// // 为了拿到在组件定义的是否按需加载的属性值 `isNeedVuex`
// // console.log(this.$options.isNeedVuex)
// if (this.$options.isNeedVuex) {
// // 需要设置.vue文件的name属性,跟单文件组件名字命名一样
// const name = this.$options.name
// // console.log(name)
// import(`./store/modules/${name}/index`).then((res) => {
// // console.log("res", res)
// // res.default就是代表我们在store/modules文件夹下对应文件的export default对象
// // registerModule是vuex自带的方法,请自行搜索
// // 第一个参数是动态注入的模块名,第二个参数是模块导出对象
// this.$store.registerModule(name, res.default)
// })
// }
// }
// })
// })
var baseConfig = { var baseConfig = {
axios: { axios: {
appkey: "d7ffc3346fc9a45bccaaa35300d59022", appkey: "d7ffc3346fc9a45bccaaa35300d59022",
...@@ -79,7 +101,35 @@ fetch( ...@@ -79,7 +101,35 @@ fetch(
) )
.then((response) => { .then((response) => {
const { code, data } = response const { code, data } = response
// console.log(response) // const code = "200"
// // console.log(response)
// const data = {
// // 系统名字
// sysName: "嘀加智享车生活",
// // 系统说明
// subName: "让你的生意慧简单",
// // 是否需要注册-true;false
// hasReg: false,
// // 是否需要配置账号权限;true-有权限,从后台获取权限信息;false-无需权限
// hasAuth: true,
// env: "develop",
// alipayPath: "https://zlsdev.glsx.com.cn/#/alipay",
// css_url:
// "https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/index.css",
// axios: {
// baseURL: "http://192.168.3.226:9203/rop-dj-smartcarlife/router",
// appkey: "48e5e13229b82c1b4e6e8c96151f0637",
// secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b",
// timeout: 50000,
// result: {
// data_key: "data",
// message_key: "message",
// code_key: "code",
// code_success_value: 0,
// code_message_map: {}
// }
// }
// }
code == "200" && (baseConfig = data) code == "200" && (baseConfig = data)
new Vue({ new Vue({
router, router,
...@@ -88,6 +138,8 @@ fetch( ...@@ -88,6 +138,8 @@ fetch(
render: (h) => { render: (h) => {
// data.axios.baseURL = // data.axios.baseURL =
// 'http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router' // 'http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router'
// data
console.log(data)
Vue.prototype.baseConfig = data Vue.prototype.baseConfig = data
return h(App) return h(App)
}, },
......
...@@ -51,7 +51,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -51,7 +51,7 @@ router.beforeEach(async (to, from, next) => {
// 确认已经加载组件尺寸设置 https://github.com/d2-projects/d2-admin/issues/198 // 确认已经加载组件尺寸设置 https://github.com/d2-projects/d2-admin/issues/198
// await store.dispatch('d2admin/size/isLoaded') // await store.dispatch('d2admin/size/isLoaded')
// 设置当前页 下次登录 默认打开此页面 // 设置当前页 下次登录 默认打开此页面
await setCurrent(to.fullPath) // await setCurrent(to.fullPath)
// 进度条 // 进度条
NProgress.start() NProgress.start()
// 关闭搜索面板 // 关闭搜索面板
...@@ -60,7 +60,8 @@ router.beforeEach(async (to, from, next) => { ...@@ -60,7 +60,8 @@ router.beforeEach(async (to, from, next) => {
// 页面刷新 动态路由会失效 初始化路由与左侧菜单栏 // 页面刷新 动态路由会失效 初始化路由与左侧菜单栏
await store.dispatch("d2admin/auth/init") await store.dispatch("d2admin/auth/init")
// await store.dispatch('d2admin/account/load') // await store.dispatch('d2admin/account/load')
next(to.path) // next(to.path)
next(to.fullPath)
} else { } else {
if (store.state.d2admin.user.info) { if (store.state.d2admin.user.info) {
// sessionstorage 用户存在继续当前路由 不存在 跳转登录 防止页面关闭还可以打开页面 // sessionstorage 用户存在继续当前路由 不存在 跳转登录 防止页面关闭还可以打开页面
......
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
902: {
path: "/flowManage",
name: "flowManage",
meta: {
title: "流量管理",
authId: "902",
parentId: "1",
cache: false
}
},
90201: {
path: "/customerList",
name: "customerList",
meta: {
title: "客户列表",
authId: "90201",
parentId: "902",
cache: false
},
auth: [
{
authId: "9020101",
parentId: "90201",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("customer/customerList")
},
90202: {
path: "/recordList",
name: "recordList",
meta: {
title: "预录信息",
authId: "90202",
parentId: "902",
cache: false
},
auth: [
{
authId: "9020201",
parentId: "90202",
label: "预录客户",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd",
addRoutePath: [
{
authId: "901",
name: "预录客户",
parentId: "90202"
}
]
},
{
authId: "9020202",
parentId: "90202",
label: "一键导入",
category: "Button",
type: "primary",
handle: "handleImport"
},
{
authId: "9020203",
parentId: "90202",
label: "编辑",
handle: "handleEdit",
addRoutePath: [
{
authId: "901",
name: "预录客户",
parentId: "90202"
}
]
}
],
component: _import("customer/recordList")
},
90203: {
path: "/invitation",
name: "invitation",
meta: {
title: "邀约管理",
authId: "90203",
parentId: "902",
cache: false
},
auth: [
{
authId: "9020301",
parentId: "90203",
label: "再次电联",
handle: "handleMoreCall"
// ruleObj: {
// attr: 'status',
// rule: {
// 0: '上架',
// 1: '下架'
// }
// }
},
{
authId: "9020302",
parentId: "90203",
label: "取消预约",
handle: "handleCancel"
},
{
authId: "9020303",
parentId: "90203",
label: "更新备注",
handle: "handleUpdateRemark"
},
{
authId: "9020304",
parentId: "90203",
label: "修改时间",
handle: "handleChangeTime"
},
{
authId: "9020305",
parentId: "90203",
label: "电联一下",
handle: "handleCall"
},
{
authId: "9020306",
parentId: "90203",
label: "预约时间",
handle: "handleAppoint"
},
{
authId: "9020307",
parentId: "90203",
label: "更新备注",
handle: "handleUpdateRemark"
}
],
component: _import("customer/invitation")
},
901: {
path: "/editCustomer",
name: "editCustomer",
meta: {
title: "预录客户",
authId: "901",
parentId: "90202",
cache: false,
sideHidden: false,
activePath: "/recordList"
},
component: _import("customer/editCustomer")
}
}
// { routerName }
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
903: {
path: "/goods",
name: "goods",
meta: {
title: "商品库",
authId: "903",
parentId: "1",
cache: false
}
},
90301: {
path: "/product",
name: "product",
meta: {
title: "素材管理",
authId: "90301",
parentId: "903",
cache: false
},
auth: [
{
authId: "9030101",
parentId: "90301",
label: "新增素材",
category: "Button",
type: "primary",
handle: "handleAdd",
addRoutePath: [
{
authId: "90304",
name: "素材编辑",
parentId: "90301"
}
]
},
{
authId: "9030103",
parentId: "90301",
label: "导出",
category: "Button",
handle: "handleExport"
},
{
authId: "9030102",
parentId: "90301",
label: "修改",
handle: "handleEdit",
addRoutePath: [
{
authId: "90304",
name: "素材编辑",
parentId: "90301"
}
]
},
{
authId: "9030104",
parentId: "90301",
label: "删除",
handle: "handleUpOrDown",
ruleObj: {
attr: "status",
rule: {
0: "使用",
1: "删除"
}
}
}
],
component: _import("goods/product")
},
90302: {
path: "/commodity",
name: "commodity",
meta: {
title: "商品管理",
authId: "90302",
parentId: "903",
cache: false
},
auth: [
{
authId: "9030201",
parentId: "90302",
label: "新增商品",
category: "Button",
type: "primary",
handle: "handleAdd",
addRoutePath: [
{
authId: "90305",
name: "商品编辑",
parentId: "90302"
}
]
},
{
authId: "9030202",
parentId: "90302",
label: "导出",
category: "Button",
handle: "handleExport"
},
{
authId: "9030203",
parentId: "90302",
label: "编辑",
handle: "handleEdit",
addRoutePath: [
{
authId: "90305",
name: "商品编辑",
parentId: "90302"
}
]
// judgeShow: true
},
{
authId: "9030205",
parentId: "90302",
label: "上架",
handle: "handleUpOrDown",
// judgeShow: true,
ruleObj: {
attr: "status",
rule: {
0: "上架",
1: "下架"
}
}
},
{
authId: "9030206",
parentId: "90302",
label: "删除",
// judgeShow: true,
handle: "handleDelete"
},
{
authId: "9030207",
parentId: "90302",
label: "审核",
category: "Button",
handle: "handleExamine"
},
{
authId: "9030208",
parentId: "90302",
label: "单独上架",
handle: "handleUpOrDownForChild",
// judgeShow: true,
ruleObj: {
attr: "status",
rule: {
0: "单独上架",
1: "单独下架"
}
}
}
],
component: _import("goods/commodity")
},
90304: {
path: "/editProduct",
name: "editProduct",
meta: {
title: "素材编辑",
authId: "90304",
parentId: "90301",
cache: false,
sideHidden: true,
activePath: "/product"
},
component: _import("goods/editProduct")
},
90305: {
path: "/editCommodity",
name: "editCommodity",
meta: {
title: "商品编辑",
authId: "90305",
parentId: "90302",
// cache: false,
sideHidden: true,
activePath: "/commodity"
},
component: _import("goods/editCommodity")
},
90306: {
path: "/coupons",
name: "coupons",
meta: {
title: "发券宝",
authId: "90306",
parentId: "903",
cache: false
},
auth: [
{
authId: "9030601",
parentId: "90306",
label: "新增",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9030604",
parentId: "90306",
label: "编辑",
handle: "handleEdit"
},
{
authId: "9030602",
parentId: "90306",
label: "停用",
handle: "handleDisabled",
ruleObj: {
attr: "enabledFlag",
rule: {
Y: "停用",
N: "启用"
}
}
},
{
authId: "9030603",
parentId: "90306",
label: "删除",
handle: "handleDelete"
},
{
authId: "9030605",
parentId: "90306",
label: "导出",
category: "Button",
handle: "handleExport"
}
],
component: _import("goods/coupons")
}
}
// const _import = require("@/libs/util.import." + process.env.NODE_ENV)
// export const routerName = {}
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
904: {
path: "/orderManage",
name: "orderManage",
meta: {
title: "订单管理",
authId: "904",
parentId: "1",
cache: false
}
},
90401: {
path: "/orderList",
name: "orderList",
meta: {
title: "订单列表",
authId: "90401",
parentId: "904",
cache: false
},
auth: [
{
authId: "9040104",
parentId: "90401",
label: "导入订单",
category: "Button",
type: "primary",
handle: "handleImport"
},
{
authId: "9040101",
parentId: "90401",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9040102",
parentId: "90401",
label: "查看详情",
handle: "handleDetail",
addRoutePath: [
{
authId: "90402",
name: "订单详情",
parentId: "90401"
}
]
},
{
authId: "9040103",
parentId: "90401",
label: "待补录订单",
category: "Button",
type: "primary",
handle: "handlMakeUpOrder",
addRoutePath: [
{
authId: "90403",
name: "补录订单",
parentId: "90401"
}
]
},
{
authId: "9040105",
parentId: "90401",
label: "标记退款",
category: "Button",
type: "primary",
handle: "signRefund"
}
],
component: _import("orderManage/orderList")
},
90402: {
path: "/orderDetail",
name: "orderDetail",
meta: {
title: "订单详情",
authId: "90402",
parentId: "90401",
cache: false,
activePath: "/orderList"
},
component: _import("orderManage/orderDetail")
},
90403: {
path: "/orderSupplement",
name: "orderSupplement",
meta: {
title: "订单补录",
authId: "90403",
parentId: "90401",
cache: false,
activePath: "/orderList"
},
component: _import("orderManage/orderSupplement")
}
}
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
905: {
path: "/financeManage",
name: "financeManage",
meta: {
title: "财务管理",
authId: "905",
parentId: "1",
cache: false
}
},
90501: {
path: "/financeList",
name: "financeList",
meta: {
title: "财务列表",
authId: "90501",
parentId: "905",
cache: false
},
auth: [
// {
// authId: '9050103',
// parentId: '90501',
// label: '下载对账单',
// icon: 'download',
// category: 'Button',
// type: 'primary',
// handle: 'downloadAccount'
// },
{
authId: "9050101",
parentId: "90501",
label: "合并导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9050102",
parentId: "90501",
label: "查看明细",
handle: "handleDetail",
addRoutePath: [
{
authId: "90502",
name: "对账详情",
parentId: "90501"
}
]
}
],
component: _import("financeManage/index")
},
90502: {
path: "/financeDetail",
name: "financeDetail",
meta: {
title: "对账详情",
authId: "90502",
parentId: "90501",
cache: false,
activePath: "/financeList"
},
component: _import("financeManage/financeDetailNew")
},
90503: {
path: "/onlineAccountList",
name: "onlineAccountList",
meta: {
title: "我的分账",
authId: "90503",
parentId: "905",
cache: false
},
auth: [
// {
// authId: '9050301',
// parentId: '90503',
// label: '提现记录',
// category: 'Button',
// type: 'primary',
// handle: 'handleRecord'
// },
{
authId: "9050302",
parentId: "90503",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("financeManage/account/index")
},
90504: {
path: "/accountRecord",
name: "accountRecord",
meta: {
title: "提现记录",
authId: "90504",
parentId: "90503",
cache: false,
activePath: "/onlineAccountList"
},
component: _import("financeManage/account/accountRecord")
}
}
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
90703: {
path: "/outputValue",
name: "outputValue",
meta: {
title: "企微推送对象",
authId: "90703",
parentId: "907",
cache: false,
sideHidden: true,
activePath: "/outputValue"
},
auth: [
{
authId: "9070301",
parentId: "90703",
label: "新增",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9070303",
parentId: "90703",
label: "导入",
category: "Button",
handle: "handleImport"
},
{
authId: "9070302",
parentId: "90703",
label: "编辑",
handle: "handleEdit"
},
{
authId: "9070304",
parentId: "90703",
label: "删除",
handle: "handleDelete"
}
],
component: _import("index/outputValue")
}
}
...@@ -10,6 +10,7 @@ export default { ...@@ -10,6 +10,7 @@ export default {
* @param {Object} state state * @param {Object} state state
*/ */
toggle(state) { toggle(state) {
console.log("toggle")
state.active = !state.active state.active = !state.active
}, },
/** /**
...@@ -20,10 +21,23 @@ export default { ...@@ -20,10 +21,23 @@ export default {
set(state, active) { set(state, active) {
state.active = active state.active = active
} }
}, },
actions: { actions: {
reset({ state }) { // get4sService({ state }, { scene, merchantId } = {}) {
// console.log("get4sService")
// // const params = {
// // scene,
// // merchantId
// // }
// // console.log("params", params)
// // console.log(scenemerchantrefQueryServiceRefByShop)
// // scenemerchantrefQueryServiceRefByShop(params).then((res) => {
// // console.log(res)
// // })
// },
reset({ state }, { scene, merchantId }) {
console.log("reset")
console.log("scene", scene)
state.active = true state.active = true
} }
} }
......
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
// DB -> store 持久化数据加载全局尺寸 // DB -> store 持久化数据加载全局尺寸
await dispatch("d2admin/size/load", null, { root: true }) await dispatch("d2admin/size/load", null, { root: true })
// DB - > 初始化 基础数据 // DB - > 初始化 基础数据
// await dispatch('d2admin/base/init', null, { root: true }) await dispatch('d2admin/base/init', null, { root: true })
// 后台接口 -> store // 后台接口 -> store
// await dispatch('d2admin/auth/init', null, { root: true }) // await dispatch('d2admin/auth/init', null, { root: true })
// end // end
......
...@@ -33,6 +33,7 @@ export default { ...@@ -33,6 +33,7 @@ export default {
async ([channelType, productType]) => { async ([channelType, productType]) => {
state.channelType = channelType state.channelType = channelType
state.productType = productType state.productType = productType
// console.log(productType, "productType")
await dispatch("save2db", { await dispatch("save2db", {
name: "", name: "",
value: state value: state
......
...@@ -5,15 +5,13 @@ ...@@ -5,15 +5,13 @@
:is-visible.sync="cashVisible" :is-visible.sync="cashVisible"
width="60%" width="60%"
@confirmDialog="handleCashConfirm" @confirmDialog="handleCashConfirm"
@closeDialog="handleCashClose" @closeDialog="handleCashClose">
>
<span slot="sub-title">提现后不能撤回,确保资金安全,请谨慎操作!</span> <span slot="sub-title">提现后不能撤回,确保资金安全,请谨慎操作!</span>
<el-form <el-form
ref="cashDialog" ref="cashDialog"
:model="cashForm" :model="cashForm"
:rules="cashRules" :rules="cashRules"
label-width="120px" label-width="120px">
>
<el-form-item label="可提现余额:"> <el-form-item label="可提现余额:">
<span>¥ {{ cashForm.balance }}</span> <span>¥ {{ cashForm.balance }}</span>
</el-form-item> </el-form-item>
...@@ -26,20 +24,17 @@ ...@@ -26,20 +24,17 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="验证码:" label="验证码:"
prop="smsCode" prop="smsCode">
>
<el-input <el-input
v-model="cashForm.smsCode" v-model="cashForm.smsCode"
placeholder="请输入验证码" placeholder="请输入验证码"
style="width: 200px" style="width: 200px" />
/>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="handleSend" @click="handleSend"
:disabled="isSend" :disabled="isSend"
class="cash-btn" class="cash-btn">
>
{{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }} {{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }}
</el-button> </el-button>
<p v-show="showtips"> <p v-show="showtips">
......
...@@ -60,10 +60,10 @@ ...@@ -60,10 +60,10 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="22"> <d2-table-header :left-span="22">
<span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计分账金额<span <span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计分账金额<span
class="count-txt">{{ countObj.partnerDivisionMoneyCount }}</span>元,分账成功金额<span class="count-txt">{{ countObj.partnerDivisionMoneyCount }}</span>元,分账成功金额<span
class="count-txt">{{ countObj.partnerDivisionSuccessMoneyCount }}</span>元,分账中金额<span class="count-txt">{{ countObj.partnerDivisionSuccessMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.partnerInDivisionMoneyCount }}</span>元,分账失败金额<span class="count-txt">{{ countObj.partnerInDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.partnerDivisionFailureMoneyCount }}</span>元。</span> class="count-txt">{{ countObj.partnerDivisionFailureMoneyCount }}</span>元。</span>
<el-button type="primary" <el-button type="primary"
size="mini" size="mini"
@click="handleExport"> @click="handleExport">
...@@ -94,8 +94,8 @@ ...@@ -94,8 +94,8 @@
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import cashDialog from './cashDialog' import cashDialog from './cashDialog'
import { getCurrentSixMonth, divisionTypeList, divisionStatusList } from '@/common/constants.js' import { divisionTypeList, divisionStatusList } from '@/common/constants.js'
// import { getPartnerYqListApi } from '@api/editCustomer' import { getCurrentSixMonth } from '@/common/format.js'
import { getListApi, getCountApi, exportApi, getBankBalanceApi, getPartnerYqListApi } from '@/api/account' import { getListApi, getCountApi, exportApi, getBankBalanceApi, getPartnerYqListApi } from '@/api/account'
export default { export default {
name: 'MyAccount', name: 'MyAccount',
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="24"> <d2-table-header :left-span="24">
<span slot="left">共提现<span class="count-txt">{{ countObj.recordCount }}</span>次,累计分账金额<span <span slot="left">共提现<span class="count-txt">{{ countObj.recordCount }}</span>次,累计分账金额<span
class="count-txt">{{ countObj.totalAmount }}</span>元。</span> class="count-txt">{{ countObj.totalAmount }}</span>元。</span>
</d2-table-header> </d2-table-header>
<d2-table ref="merchantTable" <d2-table ref="merchantTable"
:get-list-api="getListApi" :get-list-api="getListApi"
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { getWithdrawList, getWithdrawCountApi } from '@/api/account' import { getWithdrawList, getWithdrawCountApi } from '@/api/account'
import { getCurrentSixMonth, withdrawStatusList, withdrawChannelList } from '@/common/constants.js' import { withdrawStatusList, withdrawChannelList } from '@/common/constants.js'
import { getCurrentSixMonth } from '@/common/format.js'
export default { export default {
name: 'MyAccountRecord', name: 'MyAccountRecord',
data() { data() {
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
>未完成</span> >未完成</span>
<span v-else>已完成</span> --> <span v-else>已完成</span> -->
<span <span
:class="{ 'red': scope.row.status === 1 }">{{ baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel }}</span> :class="{ 'red': scope.row.status === 1 }">{{ baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel }}</span>
<!-- <span>{{scope.row.status}}</span> --> <!-- <span>{{scope.row.status}}</span> -->
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</el-select> </el-select>
<span v-else>{{ form.merchantName }}</span> <span v-else>{{ form.merchantName }}</span>
&nbsp;&nbsp;&nbsp;<span class="warningFont" &nbsp;&nbsp;&nbsp;<span class="warningFont"
v-if="nostoreError">暂无服务的4S店</span> v-if="nostoreError">暂无服务的4S店</span>
</el-form-item> </el-form-item>
<el-form-item id="adviser" <el-form-item id="adviser"
......
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
<div class="appoint-table-content"> <div class="appoint-table-content">
<table <table
cellpadding="0" cellpadding="0"
cellspacing="0" cellspacing="0">
>
<tr class="appoint-table-header"> <tr class="appoint-table-header">
<td>邀约时间</td> <td>邀约时间</td>
<td>邀约详情</td> <td>邀约详情</td>
...@@ -17,14 +16,12 @@ ...@@ -17,14 +16,12 @@
<template v-if="detailData.length"> <template v-if="detailData.length">
<tr <tr
v-for="(item, index) in detailData" v-for="(item, index) in detailData"
:key="index" :key="index">
>
<td>{{ item.time }}</td> <td>{{ item.time }}</td>
<td class="flex"> <td class="flex">
<img <img
class="detail-header" class="detail-header"
:src="item.info.sex === 1 ? './images/header-man-grey.png' : './images/header-woman.png'" :src="item.info.sex === 1 ? './images/header-man-grey.png' : './images/header-woman.png'">
>
<block class="detail-info"> <block class="detail-info">
<p>{{ item.info.name }}</p> <p>{{ item.info.name }}</p>
<p>{{ item.info.project }}</p> <p>{{ item.info.project }}</p>
...@@ -32,13 +29,11 @@ ...@@ -32,13 +29,11 @@
<block class="detail-phone"> <block class="detail-phone">
<p <p
class="secret-phone" class="secret-phone"
v-show="!item.info.phone" v-show="!item.info.phone">
>
<span class="one-tip">手机号码已加密</span> <span class="one-tip">手机号码已加密</span>
<span <span
class="two-tip" class="two-tip"
@click="handleGetPhone(item, index)" @click="handleGetPhone(item, index)">获取虚拟手机号</span>
>获取虚拟手机号</span>
</p> </p>
<p v-show="item.info.phone"> <p v-show="item.info.phone">
{{ item.info.phone }} {{ item.info.phone }}
......
...@@ -14,43 +14,34 @@ ...@@ -14,43 +14,34 @@
</div> </div>
<p class="date-y-line" /> <p class="date-y-line" />
</block> </block>
<el-button <el-button icon="el-icon-d-arrow-left"
icon="el-icon-d-arrow-left" type="text"
type="text" class="arrow-left-icon"
class="arrow-left-icon" :disabled="currentWeek === 1"
:disabled="currentWeek === 1" @click="handleWeek(false)" />
@click="handleWeek(false)"
/>
<block> <block>
<div class="date-picker"> <div class="date-picker">
<div <div class="wrapper"
class="wrapper" v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)"
v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)" :key="index">
:key="index"
>
<span> <span>
<p <p v-for="(info, infoIndex) in appointData[index].infoList"
v-for="(info, infoIndex) in appointData[index].infoList" :key="infoIndex">
:key="infoIndex" <el-popover placement="bottom-start"
> title=""
<el-popover width="200"
placement="bottom-start" open-delay="600"
title="" trigger="hover"
width="200" :disabled="info.status === 0">
open-delay="600"
trigger="hover"
:disabled="info.status === 0"
>
<div> <div>
<p>1、客户姓名,时间,项目</p> <p>1、客户姓名,时间,项目</p>
<p>2、客户姓名,时间,项目</p> <p>2、客户姓名,时间,项目</p>
<p>余位数:8</p> <p>余位数:8</p>
</div> </div>
<el-button <el-button :class="{'col-width': true, 'hour-block': true, 'status-full': info.status === 2, 'status-remain': info.status === 1 }"
:class="{'col-width': true, 'hour-block': true, 'status-full': info.status === 2, 'status-remain': info.status === 1 }" slot="reference"
slot="reference" @click="handleAppoint(item, infoIndex)">
@click="handleAppoint(item, infoIndex)" {{ appointStatusList[info.status] }}</el-button>
>{{ appointStatusList[info.status] }}</el-button>
</el-popover> </el-popover>
</p> </p>
</span> </span>
...@@ -58,34 +49,28 @@ ...@@ -58,34 +49,28 @@
</div> </div>
<p class="date-x-line" /> <p class="date-x-line" />
<div class="date-picker"> <div class="date-picker">
<div <div class="wrapper"
class="wrapper" v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)"
v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)" :key="index">
:key="index" <el-button type="text"
> :class="{'date-btn': true, 'col-width': true, 'active': item.active}"
<el-button @click="handleSelectDate(index)">
type="text"
:class="{'date-btn': true, 'col-width': true, 'active': item.active}"
@click="handleSelectDate(index)"
>
<p>{{ item.date.split('/')[1] + '.' + item.date.split('/')[2] }}</p> <p>{{ item.date.split('/')[1] + '.' + item.date.split('/')[2] }}</p>
<p>{{ weekList[item.week] }}</p> <p>{{ weekList[item.week] }}</p>
</el-button> </el-button>
</div> </div>
</div> </div>
</block> </block>
<el-button <el-button icon="el-icon-d-arrow-right"
icon="el-icon-d-arrow-right" type="text"
type="text" :disabled="currentWeek === 5"
:disabled="currentWeek === 5" @click="handleWeek(true)" />
@click="handleWeek(true)"
/>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { appointDays } from '@/common/constants' import { appointDays } from '@/common/format'
export default { export default {
name: 'TimeDate', name: 'TimeDate',
data() { data() {
...@@ -139,5 +124,5 @@ export default { ...@@ -139,5 +124,5 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import './css/timeDateStyle.scss'; @import "./css/timeDateStyle.scss";
</style> </style>
<!-- 邀约 --> <!-- 邀约 -->
<template> <template>
<d2-container class="invitation"> <d2-container class="invitation">
<div <div class="header"
class="header" slot="header">
slot="header"
>
<appoint-table /> <appoint-table />
<time-date <time-date :appoint-data="appointData"
:appoint-data="appointData" :hours-list="hoursList"
:hours-list="hoursList" @handleAppoint="handleAppoint" />
@handleAppoint="handleAppoint"
/>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<el-form :inline="true"> <el-form :inline="true">
<el-form-item label="日期:"> <el-form-item label="日期:">
<el-date-picker <el-date-picker v-model="searchForm.date"
v-model="searchForm.date" type="daterange"
type="daterange" range-separator="至"
range-separator="至" start-placeholder="开始日期"
start-placeholder="开始日期" end-placeholder="结束日期" />
end-placeholder="结束日期"
/>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-input <el-input v-model="searchForm.name"
v-model="searchForm.name" placeholder="客户姓名或车架号" />
placeholder="客户姓名或车架号"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button v-show="activeName === 'first'"
v-show="activeName === 'first'" :id="tableParams.btnId"
:id="tableParams.btnId" size="small"
size="small" type="primary">
type="primary" 查询
>
查询
</el-button> </el-button>
<el-button <el-button v-show="activeName === 'second'"
v-show="activeName === 'second'" :id="tableSecondParams.btnId"
:id="tableSecondParams.btnId" size="small"
size="small" type="primary"
type="primary" style="margin-left: 0px;">
style="margin-left: 0px;" 查询
>
查询
</el-button> </el-button>
<el-button <el-button size="small"
size="small" @click="handleReset">
@click="handleReset" 重置
>
重置
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tabs <el-tabs v-model="activeName"
v-model="activeName" type="card">
type="card"
>
<el-tab-pane name="first"> <el-tab-pane name="first">
<span slot="label"><i class="el-icon-date" />已预约({{ totalCount.inviteCount }})</span> <span slot="label"><i class="el-icon-date" />已预约({{ totalCount.inviteCount }})</span>
<d2-table <d2-table ref="invitationFirstTable"
ref="invitationFirstTable" :has-num="false"
:has-num="false" :search-form="searchForm"
:search-form="searchForm" :table-params="tableParams"
:table-params="tableParams" :get-list-api="getListApi">
:get-list-api="getListApi" <template slot="auth-button"
> slot-scope="scope">
<template <auth-button :data="scope.scope"
slot="auth-button" show-btn-ids="['9020301', '9020302', '9020303', '9020304']" />
slot-scope="scope"
>
<auth-button
:data="scope.scope"
show-btn-ids="['9020301', '9020302', '9020303', '9020304']"
/>
</template> </template>
</d2-table> </d2-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="second"> <el-tab-pane name="second">
<span slot="label"><i class="el-icon-date" />待预约({{ totalCount.customerCount }})</span> <span slot="label"><i class="el-icon-date" />待预约({{ totalCount.customerCount }})</span>
<d2-table <d2-table ref="invitationSecondTable"
ref="invitationSecondTable" :has-num="false"
:has-num="false" :search-form="searchForm"
:search-form="searchForm" :table-params="tableSecondParams"
:table-params="tableSecondParams" :get-list-api="getListApi">
:get-list-api="getListApi" <template slot="auth-button"
> slot-scope="scope">
<template <auth-button :data="scope.scope"
slot="auth-button" show-btn-ids="['9020305', '9020306', '9020307']" />
slot-scope="scope"
>
<auth-button
:data="scope.scope"
show-btn-ids="['9020305', '9020306', '9020307']"
/>
</template> </template>
</d2-table> </d2-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<d2-dialog <d2-dialog title="正在为客户预约"
title="正在为客户预约" :is-visible="appointDialogVisible"
:is-visible="appointDialogVisible" @closeDialog="handleAppointClose"
@closeDialog="handleAppointClose" @confirmDialog="handleAppointConfirm">
@confirmDialog="handleAppointConfirm" <el-form :model="appointForm"
> label-width="120px">
<el-form <el-form-item label="客户姓名:"
:model="appointForm" prop="name">
label-width="120px" <el-input v-model="appointForm.name"
> placeholder="请输入客户姓名" />
<el-form-item
label="客户姓名:"
prop="name"
>
<el-input
v-model="appointForm.name"
placeholder="请输入客户姓名"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="车架号后6位:"
label="车架号后6位:" prop="carNo">
prop="carNo" <el-input v-model="appointForm.carNo"
> placeholder="请输入车架号后6位" />
<el-input
v-model="appointForm.carNo"
placeholder="请输入车架号后6位"
/>
</el-form-item> </el-form-item>
<el-form-item label="具体时间:"> <el-form-item label="具体时间:">
<el-col :span="10"> <el-col :span="10">
<el-date-picker <el-date-picker v-model="appointForm.date"
v-model="appointForm.date" type="date"
type="date" placeholder="选择日期"
placeholder="选择日期" :picker-options="afterTodayOptions"
:picker-options="afterTodayOptions" @change="handleChangeDate(1)" />
@change="handleChangeDate(1)"
/>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-select <el-select v-model="appointForm.hour"
v-model="appointForm.hour" placeholder="选择时间">
placeholder="选择时间" <el-option v-for="(item, index) in hoursList"
> :key="index"
<el-option :label="item.hour"
v-for="(item, index) in hoursList" :value="item.hour"
:key="index" :disabled="((appointForm.date == new Date().toLocaleDateString()) && (+item.hour.split(':')[0] <= new Date().getHours()) || fullList[index])" />
:label="item.hour"
:value="item.hour"
:disabled="((appointForm.date == new Date().toLocaleDateString()) && (+item.hour.split(':')[0] <= new Date().getHours()) || fullList[index])"
/>
</el-select> </el-select>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="预约项目:"
label="预约项目:" prop="project">
prop="project" <el-select v-model="appointForm.project"
> placeholder="请输入预约项目" />
<el-select
v-model="appointForm.project"
placeholder="请输入预约项目"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</d2-dialog> </d2-dialog>
...@@ -170,7 +120,7 @@ ...@@ -170,7 +120,7 @@
<script> <script>
import { getList, getTotalCount } from '@api/invitation' import { getList, getTotalCount } from '@api/invitation'
import { afterTodayOptions, appointDays } from '@/common/constants' import { afterTodayOptions, appointDays } from '@/common/format'
import TimeDate from './invitation-component/TimeDate' import TimeDate from './invitation-component/TimeDate'
import AppointTable from './invitation-component/AppointTable' import AppointTable from './invitation-component/AppointTable'
export default { export default {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData"> :form-data="showFormData">
<!-- <p class="custom-input"> <!-- <p class="custom-input">
<el-input <el-input
size="small" size="small"
v-model="searchForm.standNoOrCustomerName" v-model="searchForm.standNoOrCustomerName"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="24"> <d2-table-header :left-span="24">
<span slot="left">共提现<span class="count-txt">{{ countObj.recordCount }}</span>次,累计分账金额<span <span slot="left">共提现<span class="count-txt">{{ countObj.recordCount }}</span>次,累计分账金额<span
class="count-txt">{{ countObj.totalAmount }}</span>元。</span> class="count-txt">{{ countObj.totalAmount }}</span>元。</span>
</d2-table-header> </d2-table-header>
<d2-table ref="accountRecordTable" <d2-table ref="accountRecordTable"
:get-list-api="getListApi" :get-list-api="getListApi"
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { BaseData, getCurrentSixMonth, withdrawStatusList, withdrawChannelList } from '@/common/constants.js' import { BaseData, withdrawStatusList, withdrawChannelList } from '@/common/constants.js'
import { getCurrentSixMonth } from '@/common/format.js'
import { getWithdrawList, getWithdrawCountApi } from '@/api/account' import { getWithdrawList, getWithdrawCountApi } from '@/api/account'
export default { export default {
name: 'AccountRecord', name: 'AccountRecord',
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="20"> <d2-table-header :left-span="20">
<span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线下分账金额<span <span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线下分账金额<span
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元。</span> class="count-txt">{{ countObj.divisionMoneyCount }}</span>元。</span>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<el-table :data="tableList"> <el-table :data="tableList">
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
prop="actualDivisionPlatform" prop="actualDivisionPlatform"
align="center" align="center"
width="100px"> width="100px">
<!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> --> <!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> -->
</el-table-column> </el-table-column>
<el-table-column label="实际分账金额" <el-table-column label="实际分账金额"
prop="glActualDivisionMoney" prop="glActualDivisionMoney"
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
prop="orderType" prop="orderType"
align="center"> align="center">
<span <span
slot-scope="scope">{{ scope.row.goodsOrder ? baseData.orderTypeList.find(item => +item.confId === scope.row.goodsOrder.orderType).confLabel : '-' }}</span> slot-scope="scope">{{ scope.row.goodsOrder ? baseData.orderTypeList.find(item => +item.confId === scope.row.goodsOrder.orderType).confLabel : '-' }}</span>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination background <el-pagination background
......
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="20"> <d2-table-header :left-span="20">
<span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计分账金额<span <span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计分账金额<span
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元,分账成功金额<span class="count-txt">{{ countObj.divisionMoneyCount }}</span>元,分账成功金额<span
class="count-txt">{{ countObj.divisionSuccessMoneyCount }}</span>元,分账中金额<span class="count-txt">{{ countObj.divisionSuccessMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span class="count-txt">{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.divisionFailureMoneyCount }}</span>元,异常分账金额<span class="count-txt">{{ countObj.divisionFailureMoneyCount }}</span>元,异常分账金额<span
class="count-txt">{{ countObj.divisionExceptionMoneyCount }}</span>元。</span> class="count-txt">{{ countObj.divisionExceptionMoneyCount }}</span>元。</span>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<el-table :data="tableList"> <el-table :data="tableList">
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
prop="actualDivisionPlatform" prop="actualDivisionPlatform"
align="center" align="center"
width="100px"> width="100px">
<!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> --> <!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> -->
</el-table-column> </el-table-column>
<el-table-column label="实际分账金额" <el-table-column label="实际分账金额"
prop="glActualDivisionMoney" prop="glActualDivisionMoney"
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
prop="orderType" prop="orderType"
align="center"> align="center">
<span <span
slot-scope="scope">{{ scope.row.goodsOrder ? baseData.orderTypeList.find(item => +item.confId === scope.row.goodsOrder.orderType).confLabel : '-' }}</span> slot-scope="scope">{{ scope.row.goodsOrder ? baseData.orderTypeList.find(item => +item.confId === scope.row.goodsOrder.orderType).confLabel : '-' }}</span>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination background <el-pagination background
......
...@@ -5,15 +5,13 @@ ...@@ -5,15 +5,13 @@
:is-visible.sync="cashVisible" :is-visible.sync="cashVisible"
width="60%" width="60%"
@confirmDialog="handleCashConfirm" @confirmDialog="handleCashConfirm"
@closeDialog="handleCashClose" @closeDialog="handleCashClose">
>
<span slot="sub-title">提现后不能撤回,确保资金安全,请谨慎操作!</span> <span slot="sub-title">提现后不能撤回,确保资金安全,请谨慎操作!</span>
<el-form <el-form
ref="cashDialog" ref="cashDialog"
:model="cashForm" :model="cashForm"
:rules="cashRules" :rules="cashRules"
label-width="120px" label-width="120px">
>
<el-form-item label="可提现余额:"> <el-form-item label="可提现余额:">
<span>¥ {{ cashForm.balance }}</span> <span>¥ {{ cashForm.balance }}</span>
</el-form-item> </el-form-item>
...@@ -26,20 +24,17 @@ ...@@ -26,20 +24,17 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="验证码:" label="验证码:"
prop="smsCode" prop="smsCode">
>
<el-input <el-input
v-model="cashForm.smsCode" v-model="cashForm.smsCode"
placeholder="请输入验证码" placeholder="请输入验证码"
style="width: 200px" style="width: 200px" />
/>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="handleSend" @click="handleSend"
:disabled="isSend" :disabled="isSend"
class="cash-btn" class="cash-btn">
>
{{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }} {{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }}
</el-button> </el-button>
<p v-show="showtips"> <p v-show="showtips">
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="24"> <d2-table-header :left-span="24">
<span slot="left">共提现<span class="count-txt">{{ countObj.recordCount }}</span>次,累计分账金额<span <span slot="left">共提现<span class="count-txt">{{ countObj.recordCount }}</span>次,累计分账金额<span
class="count-txt">{{ countObj.totalAmount }}</span>元。</span> class="count-txt">{{ countObj.totalAmount }}</span>元。</span>
</d2-table-header> </d2-table-header>
<d2-table ref="merchantTable" <d2-table ref="merchantTable"
:get-list-api="getListApi" :get-list-api="getListApi"
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { getWithdrawList, getWithdrawCountApi } from '@/api/account' import { getWithdrawList, getWithdrawCountApi } from '@/api/account'
import { getCurrentSixMonth, withdrawStatusList, withdrawChannelList } from '@/common/constants.js' import { withdrawStatusList, withdrawChannelList } from '@/common/constants.js'
import { getCurrentSixMonth } from '@/common/format.js'
export default { export default {
name: 'MyAccountRecord', name: 'MyAccountRecord',
data() { data() {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="22"> <d2-table-header :left-span="22">
<span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线下分账金额<span <span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线下分账金额<span
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元。</span> class="count-txt">{{ countObj.divisionMoneyCount }}</span>元。</span>
<el-button type="primary" <el-button type="primary"
size="mini" size="mini"
@click="handleExport"> @click="handleExport">
......
...@@ -50,11 +50,11 @@ ...@@ -50,11 +50,11 @@
class="count-txt">{{countObj.divisionFailureMoneyCount}}</span>元,异常分账金额<span class="count-txt">{{countObj.divisionFailureMoneyCount}}</span>元,异常分账金额<span
class="count-txt">{{countObj.divisionExceptionMoneyCount}}</span>元。</span> --> class="count-txt">{{countObj.divisionExceptionMoneyCount}}</span>元。</span> -->
<span slot="left">共<span <span slot="left">共<span
class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线上分账成功金额<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线上分账成功金额<span
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元,分账中金额<span class="count-txt">{{ countObj.divisionMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span class="count-txt">{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.divisionFailureMoneyCount }}</span>元,待分账金额<span class="count-txt">{{ countObj.divisionFailureMoneyCount }}</span>元,待分账金额<span
class="count-txt">{{ countObj.waitingDivisionMoneyCount }}</span>元。</span> class="count-txt">{{ countObj.waitingDivisionMoneyCount }}</span>元。</span>
<el-button type="primary" <el-button type="primary"
size="mini" size="mini"
@click="handleExport"> @click="handleExport">
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
slot-scope="scope"> slot-scope="scope">
<span v-if="scope.scope.divisionStatus"> <span v-if="scope.scope.divisionStatus">
<span <span
:style="{ 'color': [4, 5].includes(+scope.scope.divisionStatus) ? 'red' : '#606266' }">{{ baseData.divisionStatusList.find(item => +item.confId === scope.scope.divisionStatus).confLabel }}</span> :style="{ 'color': [4, 5].includes(+scope.scope.divisionStatus) ? 'red' : '#606266' }">{{ baseData.divisionStatusList.find(item => +item.confId === scope.scope.divisionStatus).confLabel }}</span>
</span> </span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
class="captcha_input_box row-center" class="captcha_input_box row-center"
:style="customStyle" :style="customStyle"
type="tel" type="tel"
maxlength="1" maxlength="1">
>
</div> </div>
</template> </template>
......
...@@ -15,19 +15,16 @@ ...@@ -15,19 +15,16 @@
prop="merchantType"> prop="merchantType">
<el-radio-group v-model="infoForm.merchantType" <el-radio-group v-model="infoForm.merchantType"
@change="changeType"> @change="changeType">
<!-- <el-radio-button label="">全部</el-radio-button> -->
<el-radio-button label="2"> <el-radio-button label="2">
4S店 4S店
</el-radio-button> </el-radio-button>
<el-radio-button label="7"> <el-radio-button label="7">
服务商 服务商
</el-radio-button> </el-radio-button>
<el-radio-button label="6"> <el-radio-button label="6"
v-if="yqCheckVisible">
园区店 园区店
</el-radio-button> </el-radio-button>
<!-- <el-radio-button label="2" @click.native.prevent="clickMerchantType('2')">4S店</el-radio-button>
<el-radio-button label="7" @click.native.prevent="clickMerchantType('7')">服务商</el-radio-button>
<el-radio-button label="6" @click.native.prevent="clickMerchantType('6')">园区店</el-radio-button> -->
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="infoForm.merchantType == '7'" <el-form-item v-if="infoForm.merchantType == '7'"
...@@ -69,11 +66,9 @@ ...@@ -69,11 +66,9 @@
v-model="infoForm.payStartDate" v-model="infoForm.payStartDate"
@change="changeStartDate" @change="changeStartDate"
style="width:185px" /> style="width:185px" />
<!-- :picker-options="startDateOptions" -->
<div style="margin:0 15px;"> <div style="margin:0 15px;">
- -
</div> </div>
<!--style="width: 100%;" :picker-options="EndDateOptions" style="width: 100%;" -->
<el-date-picker type="date" <el-date-picker type="date"
placeholder="选择结束日期" placeholder="选择结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
...@@ -81,15 +76,6 @@ ...@@ -81,15 +76,6 @@
v-model="infoForm.payEndDate" v-model="infoForm.payEndDate"
:picker-options="pickerOptions0" :picker-options="pickerOptions0"
style="width:185px" /> style="width:185px" />
<!-- <el-date-picker v-model="infoForm.time"
type="daterange"
value-format="yyyy-MM-dd"
clearable
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOption['rangePickerOptions']">
</el-date-picker> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
</d2-dialog> </d2-dialog>
...@@ -97,14 +83,11 @@ ...@@ -97,14 +83,11 @@
<script> <script>
import { import {
// BaseData,
rangePickerOptions rangePickerOptions
} from '@/common/constants.js' } from '@/common/constants.js'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
// import * as api from '@api/finance'
import { getMerchantPageSearch } from '@api/publicAccount' import { getMerchantPageSearch } from '@api/publicAccount'
// import { asyncExportExcel } from '@api/sys.base'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'DownloadAccountDialog', name: 'DownloadAccountDialog',
...@@ -179,7 +162,8 @@ export default { ...@@ -179,7 +162,8 @@ export default {
// 基本数据 // 基本数据
baseData: { baseData: {
merchantList: [] merchantList: []
} },
yqCheckVisible: true
} }
}, },
...@@ -187,10 +171,15 @@ export default { ...@@ -187,10 +171,15 @@ export default {
accountVisible: { accountVisible: {
type: Boolean, type: Boolean,
default: false default: false
},
scene: {
type: String,
default: ''
} }
}, },
watch: { watch: {
}, },
created() { created() {
...@@ -204,6 +193,10 @@ export default { ...@@ -204,6 +193,10 @@ export default {
}, },
mounted() { mounted() {
if (this.scene == '0' || this.scene == '3') {
/** 1.0场景和1.3场景隐藏园区店对账单入口 */
this.yqCheckVisible = false
}
this.selectMerchant() this.selectMerchant()
}, },
...@@ -225,11 +218,6 @@ export default { ...@@ -225,11 +218,6 @@ export default {
getMerchantPageSearch(params).then(res => { getMerchantPageSearch(params).then(res => {
this.baseData.merchantList = res.list this.baseData.merchantList = res.list
}) })
// getMerchantList(params).then(res => {
// console.log(res)
// this.baseData.merchantList = res
// // this.baseData.merchantList = res.list
// })
}, },
clickMerchantType(e) { clickMerchantType(e) {
...@@ -284,7 +272,6 @@ export default { ...@@ -284,7 +272,6 @@ export default {
}) })
params.payStartDate = infoForm.payStartDate + ' 00:00:00' params.payStartDate = infoForm.payStartDate + ' 00:00:00'
params.payEndDate = infoForm.payEndDate + ' 23:59:59' params.payEndDate = infoForm.payEndDate + ' 23:59:59'
// params.merchantList = merchantList
merchantList.forEach((item, index) => { merchantList.forEach((item, index) => {
const merchantName = `merchantList[${index}].merchantName` const merchantName = `merchantList[${index}].merchantName`
const merchantId = `merchantList[${index}].merchantId` const merchantId = `merchantList[${index}].merchantId`
...@@ -295,13 +282,9 @@ export default { ...@@ -295,13 +282,9 @@ export default {
if (infoForm.merchantType == '7') { if (infoForm.merchantType == '7') {
params.reportType = infoForm.reportType params.reportType = infoForm.reportType
} }
console.log('params', params) params.sceneType = this.scene
// return
// params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatement.async'
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatementForAudit.async' params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatementForAudit.async'
// params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatement' console.log('params', params)
console.log(params)
// asyncExportExcel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
...@@ -315,7 +298,6 @@ export default { ...@@ -315,7 +298,6 @@ export default {
] ]
this.actionSetDownloadList({ list, type: 'dowloadList' }) this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose() this.handleClose()
// })
} }
}) })
}, },
...@@ -326,40 +308,41 @@ export default { ...@@ -326,40 +308,41 @@ export default {
} }
} }
</script> </script>
<style> <style scoped>
.dateItem { .dateItem {
display: flex; display: flex;
} }
.dateItem .el-form-item__content { ::v-deep .dateItem .el-form-item__content {
display: flex; display: flex;
margin-left: 0 !important; margin-left: 0 !important;
} }
::v-deep .accountDailog {
/*下拉选择框-多选-内容过长-用...代替 begin */ /*下拉选择框-多选-内容过长-用...代替 begin */
.el-tag.el-tag--info { .el-tag.el-tag--info {
background-color: #f4f4f5; background-color: #f4f4f5;
border-color: #e9e9eb; border-color: #e9e9eb;
color: #909399; color: #909399;
max-width: calc(100% - 50px); max-width: calc(100% - 50px);
/* white-space: nowrap; /* white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden;*/ overflow: hidden;*/
} }
.el-tag.el-tag--info { .el-tag.el-tag--info {
width: calc(100% - 200px); width: calc(100% - 200px);
} }
.el-tag.el-tag--info .el-select__tags-text { .el-tag.el-tag--info .el-select__tags-text {
width: calc(100% - 20px); width: calc(100% - 20px);
float: left; float: left;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
/*下拉选择框-多选-内容过长-用...代替 end */ /*下拉选择框-多选-内容过长-用...代替 end */
.accountDailog .el-dialog { .accountDailog .el-dialog {
min-width: 700px; min-width: 700px;
} }
.accountDailog .el-select-dropdown__item { .accountDailog .el-select-dropdown__item {
width: 395px !important; width: 395px !important;
}
} }
</style> </style>
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
支付金额 支付金额
</td> </td>
<td <td
:colspan="userInfo.beSuper ? (!isSubOrder ? 1 : 6) : ((detail.partnerDeductChargeFlag === 'Y') ? 1 : 6)"> :colspan="userInfo.beSuper ? (!isSubOrder ? 1 : 6) : ((detail.partnerDeductChargeFlag === 'Y') ? 1 : 6)">
{{ detail.paidMoney }} {{ detail.paidMoney }}
</td> </td>
<td v-show="((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y')))" <td v-show="((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y')))"
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
{{ ((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y'))) ? '入账手续费' : '' }} {{ ((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y'))) ? '入账手续费' : '' }}
</td> </td>
<td <td
v-show="((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y')))"> v-show="((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y')))">
{{ ((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y'))) ? (detail.serviceCharge === '¥0' ? '-' : detail.serviceCharge) : '' }} {{ ((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y'))) ? (detail.serviceCharge === '¥0' ? '-' : detail.serviceCharge) : '' }}
</td> </td>
<td v-show="(userInfo.beSuper && !isSubOrder)" <td v-show="(userInfo.beSuper && !isSubOrder)"
......
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
width="700px" width="700px"
:no-cancel="noCancel" :no-cancel="noCancel"
@confirmDialog="handleDetailClose" @confirmDialog="handleDetailClose"
@closeDialog="handleDetailClose" @closeDialog="handleDetailClose">
>
<el-form <el-form
:inline="true" :inline="true"
label-width="0" label-width="0">
>
<el-form-item> <el-form-item>
<span class="picker-placeholder"> <span class="picker-placeholder">
<el-date-picker <el-date-picker
...@@ -30,13 +28,11 @@ ...@@ -30,13 +28,11 @@
picker.$emit('pick', ''); picker.$emit('pick', '');
} }
}] }]
}" }" />
/>
</span> </span>
<el-button <el-button
@click="getList" @click="getList"
type="primary" type="primary">
>
查询 查询
</el-button> </el-button>
</el-form-item> </el-form-item>
...@@ -44,28 +40,23 @@ ...@@ -44,28 +40,23 @@
<el-table <el-table
:data="tableData" :data="tableData"
style="width: 100%" style="width: 100%"
border border>
>
<el-table-column <el-table-column
label="序号" label="序号"
type="index" type="index"
:align="align" :align="align" />
/>
<el-table-column <el-table-column
prop="yqMerchantName" prop="yqMerchantName"
label="园区店名称" label="园区店名称"
:align="align" :align="align" />
/>
<el-table-column <el-table-column
prop="subNums" prop="subNums"
label="订单笔数" label="订单笔数"
:align="align" :align="align" />
/>
<el-table-column <el-table-column
prop="totalFranchiseeProfitMoney" prop="totalFranchiseeProfitMoney"
label="总收入(元)" label="总收入(元)"
:align="align" :align="align" />
/>
</el-table> </el-table>
</d2-dialog> </d2-dialog>
</template> </template>
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</p> </p>
<p class="summary_label"> <p class="summary_label">
冠军店<span 冠军店<span
class="summary_value">占{{ (summayData.firstYqMerchantRatio * 100).toFixed(2) }}%</span> class="summary_value">占{{ (summayData.firstYqMerchantRatio * 100).toFixed(2) }}%</span>
</p> </p>
</div> </div>
</div> </div>
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
<d2-search ref="showSearch" <d2-search ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:labelWidth="'100px'" :label-width="'100px'"
:form-data="showFormData" :form-data="showFormData"
@handleChangeSelect="handleChangeSelect"> @handleChangeSelect="handleChangeSelect">
<!-- <p> <!-- <p>
<el-input <el-input
size="small" size="small"
class="custom-input" class="custom-input"
...@@ -48,43 +48,48 @@ ...@@ -48,43 +48,48 @@
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
:filterListData="true"> :filter-list-data="true">
<div class="material" slot="img" slot-scope="scope"> <div class="material"
<img slot="img"
class="pro-img" slot-scope="scope">
:src="scope.scope.goodsInfo.thumbUrl"> <img class="pro-img"
<span class="good_name">{{scope.scope.baseGoodsName || scope.scope.goodsInfo.goodsName}}</span> :src="scope.scope.goodsInfo.thumbUrl">
<span
class="good_name">{{ scope.scope.baseGoodsName || scope.scope.goodsInfo.goodsName }}</span>
</div> </div>
<template slot="merchantNames" <template slot="merchantNames"
slot-scope="scope"> slot-scope="scope">
<div v-if="scope.scope.merchantNames && scope.scope.merchantNames.split('/').length > 1"> <div v-if="scope.scope.merchantNames && scope.scope.merchantNames.split('/').length > 1">
<span>{{scope.scope.merchantNames.split('/')[0]}}</span>/... <span>{{ scope.scope.merchantNames.split('/')[0] }}</span>/...
<el-popover <el-popover placement="top"
placement="top" width="200"
width="200" trigger="hover"
trigger="hover" :content="scope.scope.merchantNames">
:content="scope.scope.merchantNames"> <el-button slot="reference"
<el-button slot="reference" type="text">{{`共${scope.scope.merchantNames.split('/').length}家`}}</el-button> type="text">{{ `共${scope.scope.merchantNames.split('/').length}家` }}
</el-popover> </el-button>
</div> </el-popover>
<div v-else> </div>
<span>{{scope.scope.merchantNames}}</span> <div v-else>
</div> <span>{{ scope.scope.merchantNames }}</span>
</div>
</template> </template>
<template slot="yqMerchantNames" <template slot="yqMerchantNames"
slot-scope="scope"> slot-scope="scope">
<div v-if="scope.scope.yqMerchantNames && scope.scope.yqMerchantNames.split('/').length > 1"> <div
<span>{{scope.scope.yqMerchantNames.split('/')[0]}}</span>/... v-if="scope.scope.yqMerchantNames && scope.scope.yqMerchantNames.split('/').length > 1">
<el-popover <span>{{ scope.scope.yqMerchantNames.split('/')[0] }}</span>/...
placement="top" <el-popover placement="top"
width="200" width="200"
trigger="hover" trigger="hover"
:content="scope.scope.yqMerchantNames"> :content="scope.scope.yqMerchantNames">
<el-button slot="reference" type="text">{{`共${scope.scope.yqMerchantNames.split('/').length}家`}}</el-button> <el-button slot="reference"
type="text">{{ `共${scope.scope.yqMerchantNames.split('/').length}家` }}
</el-button>
</el-popover> </el-popover>
</div> </div>
<div v-else> <div v-else>
<span>{{scope.scope.yqMerchantNames}}</span> <span>{{ scope.scope.yqMerchantNames }}</span>
</div> </div>
</template> </template>
<div v-if="Object.keys(scope.scope).includes('upgradeGoodsList')" <div v-if="Object.keys(scope.scope).includes('upgradeGoodsList')"
...@@ -141,7 +146,7 @@ import { deepClone } from '@/common/util' ...@@ -141,7 +146,7 @@ import { deepClone } from '@/common/util'
import { getList, baseGoodsUpOrDown, baseGoodsDelete, baseGoodsUpOrDownForChild, getBaseGoodsList, commodityAddSeviceMerchant } from '@api/commodity' import { getList, baseGoodsUpOrDown, baseGoodsDelete, baseGoodsUpOrDownForChild, getBaseGoodsList, commodityAddSeviceMerchant } from '@api/commodity'
import { getProductTypeBySceneId } from '@api/product' import { getProductTypeBySceneId } from '@api/product'
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
import { BaseData, brandMerchantList, scenCodeList } from '@/common/constants.js' import { BaseData, brandMerchantList, sceneCodeList } from '@/common/constants.js'
// import { exportJsonToExcel } from '@/common/Export2Excel.js' // import { exportJsonToExcel } from '@/common/Export2Excel.js'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
// import _ from 'lodash' // import _ from 'lodash'
...@@ -180,7 +185,7 @@ export default { ...@@ -180,7 +185,7 @@ export default {
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'scenCodeList' optionsName: 'sceneCodeList'
}, { }, {
label: '类目', label: '类目',
name: 'goodsType', name: 'goodsType',
...@@ -232,14 +237,14 @@ export default { ...@@ -232,14 +237,14 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'reviewStatusList' optionsName: 'reviewStatusList'
}, }
// { // {
// label: '创建时间', // label: '创建时间',
// name: 'createTime', // name: 'createTime',
// type: 'datePicker', // type: 'datePicker',
// isClear: true, // isClear: true,
// pickerOptions: 'rangePickerOptions' // pickerOptions: 'rangePickerOptions'
// } // }
], ],
getListApi: getBaseGoodsList, getListApi: getBaseGoodsList,
// 表格参数 // 表格参数
...@@ -291,12 +296,12 @@ export default { ...@@ -291,12 +296,12 @@ export default {
label: '可见门店', label: '可见门店',
name: '', name: '',
type: 'slot', type: 'slot',
addHtml: 'merchantNames' addHtml: 'merchantNames'
}, { }, {
label: '可见园区', label: '可见园区',
name: '', name: '',
type: 'slot', type: 'slot',
addHtml: 'yqMerchantNames' addHtml: 'yqMerchantNames'
}, },
// { // {
// label: '品牌商', // label: '品牌商',
...@@ -391,7 +396,7 @@ export default { ...@@ -391,7 +396,7 @@ export default {
}, },
showMoreData: {}, showMoreData: {},
showMoreVisible: false, showMoreVisible: false,
scenCodeList: [] sceneCodeList: []
} }
}, },
...@@ -414,8 +419,8 @@ export default { ...@@ -414,8 +419,8 @@ export default {
this.baseData.brandList.unshift(allOpt) this.baseData.brandList.unshift(allOpt)
this.baseData.statusList.unshift(allOpt) this.baseData.statusList.unshift(allOpt)
this.baseData.reviewStatusList.unshift(allOpt) this.baseData.reviewStatusList.unshift(allOpt)
this.baseData.scenCodeList = deepClone(scenCodeList) this.baseData.sceneCodeList = deepClone(sceneCodeList)
this.baseData.scenCodeList.unshift(allOpt) this.baseData.sceneCodeList.unshift(allOpt)
// 获取全部类目 // 获取全部类目
getProductTypeBySceneId({ sceneType: '' }).then(res => { getProductTypeBySceneId({ sceneType: '' }).then(res => {
this.baseData.productTypeList = res this.baseData.productTypeList = res
...@@ -713,13 +718,13 @@ export default { ...@@ -713,13 +718,13 @@ export default {
</script> </script>
<style scoped> <style scoped>
.material{ .material {
padding: 0 20px; padding: 0 20px;
display: flex; display: flex;
justify-content: left; justify-content: left;
align-items: center; align-items: center;
} }
.good_name{ .good_name {
margin-left: 20px; margin-left: 20px;
} }
</style> </style>
......
...@@ -53,9 +53,9 @@ ...@@ -53,9 +53,9 @@
<el-form-item label="券码数量:" <el-form-item label="券码数量:"
prop="amount" prop="amount"
:rules="[ :rules="[
{ required: true, message: '请输入券码数量', trigger: 'blur'}, { required: true, message: '请输入券码数量', trigger: 'blur'},
{ validator: validateAccount, trigger: 'blur' } { validator: validateAccount, trigger: 'blur' }
]"> ]">
<el-input-number v-model="couponsForm.amount" <el-input-number v-model="couponsForm.amount"
:min="1" :min="1"
:max="999" :max="999"
......
...@@ -5,60 +5,50 @@ ...@@ -5,60 +5,50 @@
:data="tableData" :data="tableData"
style="width: 690px" style="width: 690px"
border border
class="store-table" class="store-table">
>
<el-table-column <el-table-column
label="序号" label="序号"
align="center" align="center"
type="index" type="index"
width="64px" width="64px" />
/>
<el-table-column <el-table-column
prop="yqMerchantName" prop="yqMerchantName"
label="园区店名称" label="园区店名称"
align="center" align="center" />
/>
<el-table-column <el-table-column
prop="merchantName" prop="merchantName"
label="4S店名称" label="4S店名称"
align="center" align="center" />
/>
<el-table-column <el-table-column
prop="merchantId" prop="merchantId"
label="商户编号" label="商户编号"
align="center" align="center" />
/>
<el-table-column <el-table-column
prop="userType" prop="userType"
label="商户类型" label="商户类型"
align="center" align="center">
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ baseData[scope.row.channelType === 2 ? 'ghUserTypeList' : 'userTypeList'][scope.row.userType] }}</span> <span>{{ baseData[scope.row.channelType === 2 ? 'ghUserTypeList' : 'userTypeList'][scope.row.userType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="删除" label="删除"
align="center" align="center">
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
class="el-icon-delete" class="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
type="text" type="text" />
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="券码数量(张)" label="券码数量(张)"
align="center" align="center"
width="160px" width="160px">
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot <slot
name="num" name="num"
:scope="{row: scope.row, index: scope.$index}" :scope="{row: scope.row, index: scope.$index}" />
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -11,17 +11,17 @@ ...@@ -11,17 +11,17 @@
<div class="shopSpeci-box" v-for="(item, index) in specificationValueList" :key="index"> <div class="shopSpeci-box" v-for="(item, index) in specificationValueList" :key="index">
<div class="top"> <div class="top">
<div class="top-left"> <div class="top-left">
<span class="title">商品{{index + 1}}:</span> <span class="title">商品{{ index + 1 }}:</span>
<span>{{baseGoodsName}}</span><span v-for="(val, idx) in item.specsValueList" :key="idx">{{val}}</span> <span>{{ baseGoodsName }}</span><span v-for="(val, idx) in item.specsValueList" :key="idx">{{ val }}</span>
</div> </div>
<div class="top-center">>>></div> <div class="top-center">>>></div>
<div class="top-right"> <div class="top-right">
<span class="title"><span class="text-red">*</span>门店:</span> <span class="title"><span class="text-red">*</span>门店:</span>
<!-- v-el-select-loadmore="interestsLoadmore" remote reserve-keyword :remote-method="remoteMethod" <!-- v-el-select-loadmore="interestsLoadmore" remote reserve-keyword :remote-method="remoteMethod"
:loading="interesLoading"--> :loading="interesLoading"-->
<el-select style="width: 430px;" @change="e => selectChange(e, index)" <el-select style="width: 430px;" @change="e => selectChange(e, index)"
filterable collapse-tags remote reserve-keyword :remote-method="remoteMethod" filterable collapse-tags remote reserve-keyword :remote-method="remoteMethod"
v-model="item.selectedMerchantIds" multiple @visible-change="visibleChange" placeholder="请选择"> v-model="item.selectedMerchantIds" multiple @visible-change="visibleChange" placeholder="请选择">
<el-option <el-option
v-for="(v, k) in merchantList" v-for="(v, k) in merchantList"
v-show="!merchantName || (merchantName && v.isShowItem == 1)" v-show="!merchantName || (merchantName && v.isShowItem == 1)"
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div style="margin-bottom: 15px;">已分配:</div> <div style="margin-bottom: 15px;">已分配:</div>
<div class="merchant-tag"> <div class="merchant-tag">
<div class="flex_1" v-for="(subItem, subIndex) in item.selectedMerchantList" :key="subIndex"> <div class="flex_1" v-for="(subItem, subIndex) in item.selectedMerchantList" :key="subIndex">
<el-tag closable @close="handleSpescDelete(subItem, index)">{{subItem.merchantName + ' ' + subItem.merchantId}}</el-tag> <el-tag closable @close="handleSpescDelete(subItem, index)">{{ subItem.merchantName + ' ' + subItem.merchantId }}</el-tag>
</div> </div>
</div> </div>
</div> </div>
...@@ -129,31 +129,31 @@ export default { ...@@ -129,31 +129,31 @@ export default {
methods: { methods: {
selectChange(e, index) { selectChange(e, index) {
let arr = this.merchantList.filter(val => e.indexOf(val.merchantId) > -1) const arr = this.merchantList.filter(val => e.indexOf(val.merchantId) > -1)
this.specificationValueList[index].selectedMerchantList = arr this.specificationValueList[index].selectedMerchantList = arr
}, },
remoteMethod(query) { remoteMethod(query) {
this.merchantName = query; this.merchantName = query
this.currentPage = 1; this.currentPage = 1
this.interestsOptions = []; this.interestsOptions = []
this.interesLoading = true; this.interesLoading = true
if (query) { if (query) {
this.getSelectingList(); // 请求接口 this.getSelectingList() // 请求接口
} }
}, },
visibleChange(data) { visibleChange(data) {
// 获取焦点重新渲染下拉框数据 // 获取焦点重新渲染下拉框数据
if (data) this.merchantName = '' if (data) this.merchantName = ''
}, },
interestsLoadmore(){ interestsLoadmore() {
setTimeout(() => { setTimeout(() => {
this.currentPage = this.currentPage + 1; this.currentPage = this.currentPage + 1
if (this.allPages < this.currentPage) { if (this.allPages < this.currentPage) {
this.currentPage = this.allPages this.currentPage = this.allPages
return; return
} }
this.getSelectingList(); this.getSelectingList()
}, 10); }, 10)
}, },
getSelectingList() { getSelectingList() {
this.storeApi({ this.storeApi({
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
}).then(res => { }).then(res => {
this.interesLoading = false this.interesLoading = false
this.allPages = res.pages this.allPages = res.pages
let arr = [] const arr = []
res.list && res.list.forEach(val => { res.list && res.list.forEach(val => {
val.merchantId = val.merchantId ? val.merchantId : val.merchant?.merchantId val.merchantId = val.merchantId ? val.merchantId : val.merchant?.merchantId
val.merchantName = val.merchantName ? val.merchantName : val.merchant?.merchantName val.merchantName = val.merchantName ? val.merchantName : val.merchant?.merchantName
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
handleSpeciRelateStoreConfirm() { handleSpeciRelateStoreConfirm() {
let [flag, index] = [true, 0] let [flag, index] = [true, 0]
for (var i = 0; i < this.specificationValueList.length; i++) { for (var i = 0; i < this.specificationValueList.length; i++) {
let item = this.specificationValueList[i] const item = this.specificationValueList[i]
if (!item.selectedMerchantIds.length) { if (!item.selectedMerchantIds.length) {
flag = false flag = false
index = i index = i
...@@ -209,9 +209,9 @@ export default { ...@@ -209,9 +209,9 @@ export default {
type: 'error' type: 'error'
}) })
} }
let arr = [] const arr = []
this.specificationValueList.forEach(val => { this.specificationValueList.forEach(val => {
let merchantList = [] const merchantList = []
val.selectedMerchantList.forEach(v => { val.selectedMerchantList.forEach(v => {
merchantList.push({ merchantList.push({
merchantId: v.merchantId, merchantId: v.merchantId,
...@@ -252,8 +252,8 @@ export default { ...@@ -252,8 +252,8 @@ export default {
} }
.top-center{ .top-center{
font-weight: 600; font-weight: 600;
background-image: -webkit-linear-gradient(left, #3E69E4, #C5CFF8); background-image: -webkit-linear-gradient(left, #3E69E4, #C5CFF8);
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
} }
.top-right{ .top-right{
...@@ -283,7 +283,7 @@ export default { ...@@ -283,7 +283,7 @@ export default {
.flex_1{ .flex_1{
flex: 0 0 50%; flex: 0 0 50%;
margin: 5px 0; margin: 5px 0;
} }
} }
} }
......
...@@ -117,7 +117,8 @@ ...@@ -117,7 +117,8 @@
<script> <script>
// import _ from 'lodash' // import _ from 'lodash'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { limitPrice, warrantyProList } from '@/common/constants' import { warrantyProList } from '@/common/constants'
import { limitPrice } from '@/common/format'
// warrantyProList // warrantyProList
export default { export default {
name: 'RelateProDialog', name: 'RelateProDialog',
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
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"
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
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"
popper-class="tooltip-class" popper-class="tooltip-class"
effect="dark" effect="dark"
...@@ -66,17 +66,17 @@ ...@@ -66,17 +66,17 @@
<el-table-column v-if="sourcePage != 'serviceStore'" <el-table-column v-if="sourcePage != 'serviceStore'"
prop="yqMerchantName" prop="yqMerchantName"
label="园区店名称" label="园区店名称"
align="center" > align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.yqMerchantName }}</span> <span>{{ 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>{{ scope.row.merchantName}}</span> <span>{{ scope.row.merchantName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="warrantyType" <!-- <el-table-column prop="warrantyType"
label="选择质保" label="选择质保"
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
}, },
handleDelete(row) { handleDelete(row) {
this.selectedData = this.selectedData.filter(item => item.merchantId !== row.merchantId) this.selectedData = this.selectedData.filter(item => item.merchantId !== row.merchantId)
let obj = this.selectingData.find(v => v.merchantId == row.merchantId) const obj = this.selectingData.find(v => v.merchantId == row.merchantId)
this.$refs.seletingTable.toggleRowSelection(obj) this.$refs.seletingTable.toggleRowSelection(obj)
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="d2-drawer-block title-block"> <div class="d2-drawer-block title-block">
<p class="parentGoods"> <p class="parentGoods">
{{ commodityInfo.goodsInfo.goodsName }}<span {{ commodityInfo.goodsInfo.goodsName }}<span
class="parent-type">{{ commodityInfo.goodsInfo.goodsTypeName }}</span> class="parent-type">{{ commodityInfo.goodsInfo.goodsTypeName }}</span>
</p> </p>
<p class="examineP" <p class="examineP"
v-if="examineFlag"> v-if="examineFlag">
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
v-for="(item,index) in commodityInfo.upgradeGoodsList" v-for="(item,index) in commodityInfo.upgradeGoodsList"
:key="index"> :key="index">
<p class="car-sub-head"> <p class="car-sub-head">
商品{{ index + 1 }}-{{ item.specificationData ? (item.goodsInfo.goodsName + ' ' + item.specificationData) : item.goodsInfo.goodsName }} 商品{{ index + 1 }}-{{ item.specificationData ? (item.goodsInfo.goodsName + ' ' + item.specificationData.replace(';~;', ' ')) : item.goodsInfo.goodsName }}
</p> </p>
<!-- <el-form-item class="d2-drawer-item" <!-- <el-form-item class="d2-drawer-item"
label="商品名称:"> label="商品名称:">
...@@ -87,13 +87,13 @@ ...@@ -87,13 +87,13 @@
<span>{{ item.warrantyPeriod ? (item.warrantyPeriod + '年') : '无' }}</span> <span>{{ item.warrantyPeriod ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item> --> </el-form-item> -->
<el-form-item <el-form-item
class="d2-drawer-item" class="d2-drawer-item"
label="库存:"> label="库存:">
<span>{{ item.stock ? (item.stock) : '无' }}</span> <span>{{ item.stock ? (item.stock) : '无' }}</span>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
class="d2-drawer-item" class="d2-drawer-item"
label="质保年限:"> label="质保年限:">
<span>{{ item.warrantyPeriod ? (item.warrantyPeriod + '年') : '无' }}</span> <span>{{ item.warrantyPeriod ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item timeline-item_wrapper" <el-form-item class="d2-drawer-item timeline-item_wrapper"
......
...@@ -29,7 +29,7 @@ import { mapActions } from 'vuex' ...@@ -29,7 +29,7 @@ import { mapActions } from 'vuex'
// import { limitPrice } from '@/common/constants' // import { limitPrice } from '@/common/constants'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import d2FormGoods from './d2-form/index' import d2FormGoods from './d2-form/index'
import { commodityAddSeviceMerchant, getGoodsList, baseGoodsAdd, baseGoodsUpdate, getGoodsInfoById, addOrEditBaseGoods, getMerchantListByScene, getThiredMaterialList } from '@/api/commodity' import { commodityAddSeviceMerchant, getGoodsInfoById, addOrEditBaseGoods, getMerchantListByScene, getThiredMaterialList } from '@/api/commodity'
export default { export default {
name: 'EditCommodity', name: 'EditCommodity',
components: { components: {
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
], ],
linkMerchants: [{ required: true, message: '请选择关联门店', trigger: 'change' }], linkMerchants: [{ required: true, message: '请选择关联门店', trigger: 'change' }],
speciLinkMerchants: [{ required: true, message: '请选择关联门店', trigger: 'change' }], speciLinkMerchants: [{ required: true, message: '请选择关联门店', trigger: 'change' }],
specificationDetailList: [{ required: true, message: '请添加规格并保存', trigger: 'change' }], specificationDetailList: [{ required: true, message: '请添加规格并保存', trigger: 'change' }]
// baseGoodsName: [{ required: true, message: '请输入商品名称', trigger: ['blur', 'change'] }] // baseGoodsName: [{ required: true, message: '请输入商品名称', trigger: ['blur', 'change'] }]
}, },
comFormRef: 'com', comFormRef: 'com',
...@@ -90,66 +90,66 @@ export default { ...@@ -90,66 +90,66 @@ export default {
// attr: 'thumbUrl' // attr: 'thumbUrl'
// }, // },
formBlock: [ formBlock: [
{
name: 'goodsId',
label: '选择素材',
isRequired: true,
type: 'cascader',
isClear: false,
optionList: [],
optionId: 'goodsId',
optionLabel: 'goodsName',
width: '400px'
},
{
name: 'sceneName',
label: '所属场景',
type: 'spanText',
isDisabled: true,
width: '400px',
blockWidth: '50%'
},
{
name: 'goodsTypeName',
label: '类目',
type: 'spanText',
isDisabled: true,
width: '400px',
blockWidth: '50%'
},
// {
// name: '',
// label: '',
// type: 'span'
// },
{
name: 'brandMerchantName',
label: '品牌方',
type: 'spanText',
isDisabled: true,
width: '400px',
blockWidth: '50%'
},
{
name: 'supplierName',
label: '供应方',
type: 'spanText',
isDisabled: true,
width: '400px',
blockWidth: '50%'
},
{
name: 'thumbUrl',
label: '缩略图',
type: 'image',
blockWidth: '50%'
},
{ {
name: 'goodsImgList', name: 'goodsId',
label: '主图', label: '选择素材',
type: 'image', isRequired: true,
blockWidth: '50%' type: 'cascader',
} isClear: false,
optionList: [],
optionId: 'goodsId',
optionLabel: 'goodsName',
width: '400px'
},
{
name: 'sceneName',
label: '所属场景',
type: 'spanText',
isDisabled: true,
width: '400px',
blockWidth: '50%'
},
{
name: 'goodsTypeName',
label: '类目',
type: 'spanText',
isDisabled: true,
width: '400px',
blockWidth: '50%'
},
// {
// name: '',
// label: '',
// type: 'span'
// },
{
name: 'brandMerchantName',
label: '品牌方',
type: 'spanText',
isDisabled: true,
width: '400px',
blockWidth: '50%'
},
{
name: 'supplierName',
label: '供应方',
type: 'spanText',
isDisabled: true,
width: '400px',
blockWidth: '50%'
},
{
name: 'thumbUrl',
label: '缩略图',
type: 'image',
blockWidth: '50%'
},
{
name: 'goodsImgList',
label: '主图',
type: 'image',
blockWidth: '50%'
}
// { // {
// name: 'shopPrice', // name: 'shopPrice',
// label: '产品成本', // label: '产品成本',
...@@ -179,12 +179,12 @@ export default { ...@@ -179,12 +179,12 @@ export default {
}, { }, {
title: '配规格', title: '配规格',
formBlock: [ formBlock: [
{ {
name: 'specificationDetailList', name: 'specificationDetailList',
label: '', label: '',
type: 'addSpecifi', type: 'addSpecifi',
inputValue: 'baseGoodsName' inputValue: 'baseGoodsName'
} }
] ]
}, { }, {
title: '分配到门店', title: '分配到门店',
...@@ -240,16 +240,15 @@ export default { ...@@ -240,16 +240,15 @@ export default {
res && res.forEach(item => { res && res.forEach(item => {
item.value = item.sceneType item.value = item.sceneType
item.label = item.sceneName item.label = item.sceneName
let twoChildren = [] const twoChildren = []
item.twoMenu && item.twoMenu.forEach((val, index) => { item.twoMenu && item.twoMenu.forEach((val, index) => {
twoChildren.push({ twoChildren.push({
value: val.goodsType, value: val.goodsType,
label: val.goodsTypeName, label: val.goodsTypeName,
children: [] children: []
}) })
let threeChildren = [] const threeChildren = []
val.threeMenu && val.threeMenu.forEach(v => { val.threeMenu && val.threeMenu.forEach(v => {
v.value = v.id v.value = v.id
v.label = v.goods_name v.label = v.goods_name
threeChildren.push(v) threeChildren.push(v)
...@@ -273,7 +272,7 @@ export default { ...@@ -273,7 +272,7 @@ export default {
var linkMerchantIndex = this.editForm.findIndex(i => i.title === '分配到门店') var linkMerchantIndex = this.editForm.findIndex(i => i.title === '分配到门店')
this.editForm[linkMerchantIndex].formBlock[0].name = res.distributionType == '0' ? 'linkMerchants' : 'speciLinkMerchants' this.editForm[linkMerchantIndex].formBlock[0].name = res.distributionType == '0' ? 'linkMerchants' : 'speciLinkMerchants'
this.radioType = this.radioType ? this.radioType : (res.distributionType + '') this.radioType = this.radioType ? this.radioType : (res.distributionType + '')
let specificationDetailList = [] const specificationDetailList = []
res.upgradeGoodsMerchantRefList && res.upgradeGoodsMerchantRefList.forEach(val => { res.upgradeGoodsMerchantRefList && res.upgradeGoodsMerchantRefList.forEach(val => {
// 默认质保类型 0质保卡 1质保权益卡 // 默认质保类型 0质保卡 1质保权益卡
val.warrantyType = !val.warrantyType ? 0 : val.warrantyType val.warrantyType = !val.warrantyType ? 0 : val.warrantyType
...@@ -340,10 +339,10 @@ export default { ...@@ -340,10 +339,10 @@ export default {
this.editForm[linkMerchantIndex].formBlock[0].name = data == '0' ? 'linkMerchants' : 'speciLinkMerchants' this.editForm[linkMerchantIndex].formBlock[0].name = data == '0' ? 'linkMerchants' : 'speciLinkMerchants'
}, },
handleAddConfirm(e, flag = false) { handleAddConfirm(e, flag = false) {
let data = deepClone(e) const data = deepClone(e)
let [goodsSpecificationNameList, goodsSpecificationList] = [[], []] const [goodsSpecificationNameList, goodsSpecificationList] = [[], []]
data.specificationDetailList.length && data.specificationDetailList.map(val => { data.specificationDetailList.length && data.specificationDetailList.map(val => {
let goodsSpecificationValueList = [] const goodsSpecificationValueList = []
val.specificationValueList.forEach(v => { val.specificationValueList.forEach(v => {
goodsSpecificationValueList.push({ goodsSpecificationValueList.push({
id: v.id, id: v.id,
...@@ -360,7 +359,7 @@ export default { ...@@ -360,7 +359,7 @@ export default {
var specificationData = '' var specificationData = ''
item.specsValueList.forEach((subItem, subIndex) => { item.specsValueList.forEach((subItem, subIndex) => {
if (subIndex != 0) { if (subIndex != 0) {
specificationData += '-' specificationData += ';~;'
} }
specificationData = specificationData + subItem specificationData = specificationData + subItem
}) })
...@@ -391,7 +390,7 @@ export default { ...@@ -391,7 +390,7 @@ export default {
if (flag) { if (flag) {
this.$refs.d2Form.confirmEvent() this.$refs.d2Form.confirmEvent()
} else { } else {
this.$refs.d2Form.showMerchantsDialog(this.radioType || '0', res) this.$refs.d2Form.showMerchantsDialog(this.radioType || '0', res)
} }
}) })
// // 执行分配门店默认执行保存 // // 执行分配门店默认执行保存
......
<!-- 产品编辑(素材管理) --> <!-- 产品编辑(素材管理) -->
<template> <template>
<d2-container class="edit-product"> <d2-container class="edit-product">
<d2-form <d2-form v-if="show"
v-if="show" ref="d2ProductForm"
ref="d2ProductForm" :rules="rules"
:rules="rules" :add-or-edit="addOrEdit"
:add-or-edit="addOrEdit" form-name="product"
form-name="product" :origin-data="editData"
:origin-data="editData" :form-list="editForm"
:form-list="editForm" :form-ref="proFormRef"
:form-ref="proFormRef" @handleAddConfirm="handleAddConfirm"
@handleAddConfirm="handleAddConfirm" @handleClose="handleAddClose"
@handleClose="handleAddClose" @handleChangeSelect="handleChangeSelect"
@handleChangeSelect="handleChangeSelect" @handleAddBrandSupplyConfirm="handleAddBrandSupplyConfirm"
@handleAddBrandSupplyConfirm="handleAddBrandSupplyConfirm" @handleEditBrandSupplyConfirm="handleEditBrandSupplyConfirm">
@handleEditBrandSupplyConfirm="handleEditBrandSupplyConfirm" <p slot="title"
> class="edit-title">
<p
slot="title"
class="edit-title"
>
{{ addOrEdit === 'add' ? '新增素材' : '编辑素材' }} {{ addOrEdit === 'add' ? '新增素材' : '编辑素材' }}
</p> </p>
</d2-form> </d2-form>
...@@ -30,7 +26,7 @@ ...@@ -30,7 +26,7 @@
// import _ from 'lodash' // import _ from 'lodash'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { BaseData, brandMerchantList, scenCodeList } from '@/common/constants.js' import { BaseData, brandMerchantList, sceneCodeList } from '@/common/constants.js'
import { addGoods, editGoods, getBrandSupplyMerchant, addBrandSupplyMerchant, editBrandSupplyMerchant, getProductTypeBySceneId } from '@/api/product' import { addGoods, editGoods, getBrandSupplyMerchant, addBrandSupplyMerchant, editBrandSupplyMerchant, getProductTypeBySceneId } from '@/api/product'
export default { export default {
name: 'EditProduct', name: 'EditProduct',
...@@ -42,7 +38,7 @@ export default { ...@@ -42,7 +38,7 @@ export default {
rules: { rules: {
yqMerchantId: [{ required: true, message: '请选择园区店', trigger: 'change' }], yqMerchantId: [{ required: true, message: '请选择园区店', trigger: 'change' }],
goodsName: [{ required: true, message: '请输入产品名称', trigger: 'change' }], goodsName: [{ required: true, message: '请输入产品名称', trigger: 'change' }],
sceneType: [{ required: true, message: '请选择所属场景', trigger: 'change'}], sceneType: [{ required: true, message: '请选择所属场景', trigger: 'change' }],
goodsType: [{ required: true, message: '请选择类目', trigger: 'change' }], goodsType: [{ required: true, message: '请选择类目', trigger: 'change' }],
sapCode: [{ sapCode: [{
validator: (rule, value, cb) => { validator: (rule, value, cb) => {
...@@ -190,8 +186,8 @@ export default { ...@@ -190,8 +186,8 @@ export default {
}] }]
this.editData.goodsVideoList = [] this.editData.goodsVideoList = []
// 获取场景下类目 // 获取场景下类目
if ((this.editData.sceneType??'') !== '') { if ((this.editData.sceneType ?? '') !== '') {
this.handleChangeSelect(this.editData.sceneType) this.getGoodTypeList(this.editData.sceneType)
} }
if (this.editData.videoUrl) this.editData.goodsVideoList = [{ content: this.editData.videoUrl }] if (this.editData.videoUrl) this.editData.goodsVideoList = [{ content: this.editData.videoUrl }]
this.editData.thumbUrlList[0].content = this.editData.thumbUrl this.editData.thumbUrlList[0].content = this.editData.thumbUrl
...@@ -206,7 +202,7 @@ export default { ...@@ -206,7 +202,7 @@ export default {
this.getBrandSupplyList(1) this.getBrandSupplyList(1)
this.getBrandSupplyList(2) this.getBrandSupplyList(2)
this.getBaseData() this.getBaseData()
this.editForm[0].formBlock[1].optionList = scenCodeList this.editForm[0].formBlock[1].optionList = sceneCodeList
}, },
methods: { methods: {
...@@ -239,7 +235,7 @@ export default { ...@@ -239,7 +235,7 @@ export default {
} }
data.goodsDescList = data.goodsDescList.filter(item => item.content) data.goodsDescList = data.goodsDescList.filter(item => item.content)
data.goodsTypeName = this.editForm[0].formBlock[2].optionList.find(item => item.categoryType === data.goodsType).categoryName data.goodsTypeName = this.editForm[0].formBlock[2].optionList.find(item => item.categoryType === data.goodsType).categoryName
data.sceneName = scenCodeList.find(item => item.confId === data.sceneType).confValue data.sceneName = this.editForm[0].formBlock[1].optionList.find(item => item.confId === data.sceneType).confValue
data.thumbUrl = data.thumbUrlList[0].content data.thumbUrl = data.thumbUrlList[0].content
data.videoUrl = data.goodsVideoList[0]?.content data.videoUrl = data.goodsVideoList[0]?.content
data.brandMerchantCode && (data.brandMerchantName = this.editForm[0].formBlock[4].optionList.find(item => item.id === data.brandMerchantCode).relatedPartyName) data.brandMerchantCode && (data.brandMerchantName = this.editForm[0].formBlock[4].optionList.find(item => item.id === data.brandMerchantCode).relatedPartyName)
...@@ -262,7 +258,7 @@ export default { ...@@ -262,7 +258,7 @@ export default {
thumbUrl: data.thumbUrl, thumbUrl: data.thumbUrl,
videoUrl: data.videoUrl, videoUrl: data.videoUrl,
goodsImgList: data.goodsImgList, goodsImgList: data.goodsImgList,
goodsDescList: data.goodsDescList, goodsDescList: data.goodsDescList
} }
params.goodsImgList.forEach(i => { params.goodsImgList.forEach(i => {
...@@ -286,18 +282,12 @@ export default { ...@@ -286,18 +282,12 @@ export default {
}, },
// 根据所选场景获取类目 // 根据所选场景获取类目
handleChangeSelect(value) { handleChangeSelect(value) {
if ((this.editData.sceneType??'') === '') { this.$refs.d2ProductForm.clearGoodsType(this.editForm[0].formBlock[2])
this.editForm[0].formBlock[2].optionList = [] this.getGoodTypeList(value)
this.getBaseData() },
return getGoodTypeList(value) {
}
getProductTypeBySceneId({ sceneType: value }).then(res => { getProductTypeBySceneId({ sceneType: value }).then(res => {
this.editForm[0].formBlock[2].optionList = res this.editForm[0].formBlock[2].optionList = res
if (!res.find(v => v.categoryType === this.editData.goodsType)) {
this.editData.goodsType = ''
}
console.log(this.editData)
this.getBaseData()
}) })
}, },
// 获取品牌/供应方 // 获取品牌/供应方
......
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!