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 @@
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
......
......@@ -143,6 +143,8 @@ module.exports = {
"node/no-callback-literal": 'off',
"no-unused-expressions": "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
......@@ -37,3 +37,5 @@ dev_4.13.0 分支以上线并往 develop 以及 master 上合并
提测由于部署问题,直接从 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
dev_4.14.1 上线后已合并到主干上以及 dev_v4.14.2 上
紧急版本 dev_v4.14.1.2 上线后以合并到 develop 以及 master 主干上,版本代码已合并到提测版本 dev_v4.14.2 上
{
"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"
}
}
{
"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": "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-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"
}
}
{
"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 path2 = 'dj.api.smartcarlife.'
const path2 = "dj.api.smartcarlife."
export function getSummary(data) {
data.method = `${path2}goodsOrderProfitAllocation.statistics`
......@@ -45,10 +45,28 @@ export function getServiceListApi(data) {
export function getServiceSummaryApi(data) {
data.method = `${path2}goodsOrderProfitAllocation.count.service.merchant`
return request(data, 'post')
return request(data, "post")
}
export function exportAccountStatement(data) {
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) {
return request(data, "post")
}
//分页查询园区店
// 分页查询园区店
export function getyqMerchantList(data) {
data.method = `dj.smartcarlife.api.yqMerchant.pageList`
return request(data)
}
//分页查询服务商
// 分页查询服务商
export function getServiceList(data) {
data.method = `dj.smartcarlife.api.merchant.serviceList`
return request(data)
}
//获取4s店绑定的服务商和园区店信息
// 获取4s店绑定的服务商和园区店信息
export function querySceneRefByShop(data) {
data.method = `${path}scenemerchantref.querySceneRefByShop`
return request(data)
......@@ -177,6 +177,99 @@ export function addOrUpdateSceneMerchantRef(data) {
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) {
data.method = `${path2}serviceMerchant.getBaseInfo`
......@@ -188,3 +281,9 @@ export function updateCardCodeFlag(data) {
data.method = `${path2}serviceMerchant.updateCardCodeFlag`
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) {
data.method = `${path2}waitinputorder.markAsNoUse`
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 path = 'dj.api.serviceMerchant.'
const djPath = "dj.api."
const path = "dj.api.serviceMerchant."
// 分页查询服务门店
export function getListApi(data) {
data.method = `${path}listWithPage`
return request(data, 'post')
return request(data, "post")
}
// 注册线下商户
export function registerYseMerchantApi(data) {
data.method = `${djPath}yseMerchantOffline.register`
return request(data, 'post')
return request(data, "post")
}
// 注册线下商户_新版 registerYseMerchantApiNew
export function registerYseMerchantApiNew(data) {
data.method = `${djPath}yseMerchantOffline.registerNew`
return request(data, 'post')
return request(data, "post")
}
// 注册线下商户-存草稿
export function draftYseMerchantApi(data) {
data.method = `${djPath}yseMerchantOffline.saveDrafts`
return request(data, 'post')
return request(data, "post")
}
// 注册线下商户-存草稿_新版
export function draftYseMerchantApiNew(data) {
data.method = `${djPath}yseMerchantOffline.saveDraftsNew`
return request(data, 'post')
return request(data, "post")
}
// 获取商户虚拟对公账户详情
export function getDetailApi(data) {
data.method = `${djPath}yseMerchantOffline.getDetail`
return request(data, 'post')
return request(data, "post")
}
// 渠道级联dj.api.smartcarlife.get.merchant.level
export function getMerchantLevelApi(data) {
data.method = `${djPath}smartcarlife.get.merchant.level`
return request(data, 'post')
return request(data, "post")
}
// 分页搜索服务门店
export function getMerchantPageSearch(data) {
data.method = `${path}page.search`
return request(data, 'post')
return request(data, "post")
}
// 下载账户合同
export function downloadContract(data) {
data.method = `${path}yseMerchantOffline.downSign`
return request(data, 'post')
return request(data, "post")
}
// 获取省市区信息
export function getAreaInfoApi(data) {
data.method = `${djPath}yseMerchantOffline.getAreaInfo`
return request(data, 'post')
return request(data, "post")
}
// 根据开户支行编号查询区域信息
export function getAreaInfoByOpenAccBankTypeApi(data) {
data.method = `${djPath}yseMerchantOffline.getAreaInfoByOpenAccBankType`
return request(data, 'post')
return request(data, "post")
}
// 分账规则历史记录
export function getHistoryRecord(data) {
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) {
data.method = `${path}goods.type.list`
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) {
......@@ -77,3 +84,9 @@ export function uploadVideo(data) {
data.method = `${path}smartcarlife.common.uploadVideo`
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 @@
:visible.sync="visible"
:show-close="config.showClose"
class="noborder"
:append-to-body="config.appendToBody"
>
:append-to-body="config.appendToBody">
<slot />
<div
slot="footer"
v-if="config.isShowFooter"
>
v-if="config.isShowFooter">
<el-button
type="primary"
@click="confirmBtn"
>
@click="confirmBtn">
{{ config.confirm_name }}
</el-button>
<el-button @click="visible = false">
......
......@@ -3,14 +3,12 @@
<div
v-if="$slots.header"
class="d2-container-card-bs__header"
ref="header"
>
ref="header">
<slot name="header" />
</div>
<div
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-card">
<slot />
......@@ -20,8 +18,7 @@
<div
v-if="$slots.footer"
class="d2-container-card-bs__footer"
ref="footer"
>
ref="footer">
<slot name="footer" />
</div>
</div>
......
......@@ -3,14 +3,12 @@
<div
v-if="$slots.header"
class="d2-container-card__header"
ref="header"
>
ref="header">
<slot name="header" />
</div>
<div
class="d2-container-card__body"
ref="body"
>
ref="body">
<div class="d2-container-card__body-card">
<slot />
</div>
......@@ -18,8 +16,7 @@
<div
v-if="$slots.footer"
class="d2-container-card__footer"
ref="footer"
>
ref="footer">
<slot name="footer" />
</div>
</div>
......
......@@ -3,14 +3,12 @@
<div
v-if="$slots.header"
class="d2-container-full-bs__header"
ref="header"
>
ref="header">
<slot name="header" />
</div>
<div
class="d2-container-full-bs__body"
ref="wrapper"
>
ref="wrapper">
<div class="d2-container-full-bs__body-wrapper-inner">
<slot />
</div>
......@@ -18,8 +16,7 @@
<div
v-if="$slots.footer"
class="d2-container-full-bs__footer"
ref="footer"
>
ref="footer">
<slot name="footer" />
</div>
</div>
......
......@@ -5,22 +5,19 @@
v-if="$slots.header"
class="d2-container-full__header"
ref="header"
:class="this.active?'active':'close'"
>
:class="this.active?'active':'close'">
<slot name="header" />
<d2-header-switch />
</div>
<div
class="d2-container-full__body"
ref="body"
>
ref="body">
<slot />
</div>
<div
v-if="$slots.footer"
class="d2-container-full__footer"
ref="footer"
>
ref="footer">
<slot name="footer" />
</div>
<!-- </el-scrollbar> -->
......
......@@ -3,14 +3,12 @@
<div
v-if="$slots.header"
class="d2-container-ghost-bs__header"
ref="header"
>
ref="header">
<slot name="header" />
</div>
<div
class="d2-container-ghost-bs__body"
ref="wrapper"
>
ref="wrapper">
<div>
<slot />
</div>
......@@ -18,8 +16,7 @@
<div
v-if="$slots.footer"
class="d2-container-ghost-bs__footer"
ref="footer"
>
ref="footer">
<slot name="footer" />
</div>
</div>
......
......@@ -3,21 +3,18 @@
<div
v-if="$slots.header"
class="d2-container-ghost__header"
ref="header"
>
ref="header">
<slot name="header" />
</div>
<div
class="d2-container-ghost__body"
ref="body"
>
ref="body">
<slot />
</div>
<div
v-if="$slots.footer"
class="d2-container-ghost__footer"
ref="footer"
>
ref="footer">
<slot name="footer" />
</div>
</div>
......
......@@ -3,8 +3,7 @@
v-if="show"
class="d2-source"
:class="{ 'd2-source--active': isActive }"
@click="handleClick"
>
@click="handleClick">
<d2-icon name="code" /> 本页源码
</div>
</template>
......
......@@ -39,10 +39,8 @@ export default {
},
render(h) {
const slots = [this.$slots.default]
if (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.header) { slots.push(h("template", { slot: "header" }, [this.$slots.header])) }
if (this.$slots.footer) { slots.push(h("template", { slot: "footer" }, [this.$slots.footer])) }
return h(
"div",
{
......
<template>
<i
:class="`el-icon-${name}`"
aria-hidden="true"
/>
aria-hidden="true" />
</template>
<script>
......
No preview for this file type
......@@ -108,8 +108,9 @@
</template>
<script>
import _ from 'lodash'
import { limitPrice, warrantyProList } from '@/common/constants'
// import _ from 'lodash'
import { warrantyProList } from '@/common/constants'
import { limitPrice } from '@/common/format'
export default {
name: 'RelateProDialog',
data() {
......
......@@ -28,7 +28,7 @@
align="center">
<template slot-scope="scope">
<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>
</el-table-column>
<el-table-column prop="merchantName"
......@@ -36,7 +36,7 @@
align="center">
<template slot-scope="scope">
<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"
popper-class="tooltip-class"
effect="dark"
......
......@@ -2,8 +2,7 @@
<i
class="fa"
:class="`fa-${name}`"
aria-hidden="true"
/>
aria-hidden="true" />
</template>
<script>
......
......@@ -118,7 +118,7 @@
</template>
<script>
import { rangePickerOptions } from '@/common/constants'
import { rangePickerOptions } from '@/common/format'
export default {
name: 'D2Search',
data() {
......
......@@ -10,11 +10,21 @@
@sort-change="sortChange"
@selection-change="handleSelect"
:tree-props="{children: 'upgradeGoodsList'}"
:span-method="arraySpanMethod">
:span-method="arraySpanMethod"
v-bind="$attrs">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection"
align="center"
:selectable="selectableFn"
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"
align="center"
width="60px"
......@@ -44,7 +54,7 @@
:prop="item.prop"
:width="item.width" />
<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 v-else-if="item.tagLabel">
<el-tag v-if="!item.tagName"
......@@ -245,7 +255,7 @@ export default {
arraySpanMethod: {
type: Function,
default: null
},
}
},
mounted() {
......@@ -304,22 +314,22 @@ export default {
// this.tableParams.needUnique && (res[this.tableParams.listName].forEach((item) => {
// item[this.tableParams.mutiSelectUniqueKey]
// }))
//
//
if (this.filterListData) {
res[this.tableParams.listName] && res[this.tableParams.listName].forEach((val, index) => {
let shopPriceArr = []
const shopPriceArr = []
let stockTotal = 0
val.ownSerialNum = index
val.upgradeGoodsList && val.upgradeGoodsList.forEach(v => {
shopPriceArr.push(v.upgradePrice)
v.listShowShopPrice = v.upgradePrice
v.listShowStock = v.stock
v.listShowSpecificationData = v.specificationData
v.listShowSpecificationData = v.specificationData.replace(';~;', ' ')
v.goodsInfo.goodsName = val.baseGoodsName || v.goodsInfo.goodsName // 新数据显示商品名称,历史商品数据显示素材名称
stockTotal += v.stock
})
let minPrice = shopPriceArr.length ? Math.min(...shopPriceArr) : 0
let maxPrice = shopPriceArr.length ? Math.max(...shopPriceArr) : 0
const minPrice = shopPriceArr.length ? Math.min(...shopPriceArr) : 0
const maxPrice = shopPriceArr.length ? Math.max(...shopPriceArr) : 0
// 父商品规格数量
val.listShowSpecificationData = val.upgradeGoodsList && val.upgradeGoodsList.length > 0 ? 'X' + val.upgradeGoodsList.length : ''
val.listShowShopPrice = minPrice == maxPrice ? maxPrice : minPrice + '~' + maxPrice
......@@ -364,6 +374,13 @@ export default {
this.page.currentPage = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
},
refreshTable_noApi() {
this.page = {
pageSize: 20,
currentPage: 1
}
}
}
}
......
<template>
<div
class="d2-contentmenu-list"
@click="rowClick"
>
@click="rowClick">
<div
v-for="item in menulist"
:key="item.value"
:data-value="item.value"
class="d2-contentmenu-item"
flex="cross:center main:center"
>
flex="cross:center main:center">
<d2-el-icon
v-if="item.icon"
:name="item.icon"
/>
:name="item.icon" />
<div
class="d2-contentmenu-item-title"
flex-box="1"
v-text="item.title"
/>
v-text="item.title" />
</div>
</div>
</template>
......
......@@ -2,8 +2,7 @@
<div
class="d2-contextmenu"
v-show="flag"
:style="style"
>
:style="style">
<slot />
</div>
</template>
......
......@@ -11,8 +11,7 @@
<div
@click="click"
class="hamburger"
:class="{'is-active':isActive}"
>
:class="{'is-active':isActive}">
<d2-el-icon name="s-fold" />
</div>
</template>
......
......@@ -4,8 +4,7 @@
:value="value"
:predefine="predefine"
size="mini"
@change="set"
/>
@change="set" />
</template>
<script>
......
......@@ -2,22 +2,18 @@
<el-tooltip
effect="dark"
:content="active ? '退出全屏' : '全屏'"
placement="bottom"
>
placement="bottom">
<el-button
class="d2-mr btn-text can-hover"
type="text"
@click="toggle"
>
@click="toggle">
<d2-el-icon
v-if="active"
name="aim"
/>
name="aim" />
<d2-el-icon
v-else
name="full-screen"
style="font-size: 16px"
/>
style="font-size: 16px" />
</el-button>
</el-tooltip>
</template>
......
......@@ -2,27 +2,22 @@
<el-dropdown
placement="bottom"
size="small"
@command="onChangeLocale"
>
@command="onChangeLocale">
<el-button
class="d2-mr btn-text can-hover"
type="text"
>
type="text">
<d2-icon
name="language"
style="font-size: 16px;"
/>
style="font-size: 16px;" />
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
v-for="(language, index) in $languages"
:key="index"
:command="language.value"
>
:command="language.value">
<d2-icon
:name="$i18n.locale === language.value ? 'dot-circle-o' : 'circle-o'"
class="d2-mr-5"
/>
class="d2-mr-5" />
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......
......@@ -2,29 +2,24 @@
<el-tooltip
effect="dark"
:content="tooltipContent"
placement="bottom"
>
placement="bottom">
<el-button
class="d2-ml-0 d2-mr btn-text can-hover"
type="text"
@click="handleClick"
>
@click="handleClick">
<el-badge
v-if="logLength > 0"
:max="99"
:value="logLengthError"
:is-dot="logLengthError === 0"
>
:is-dot="logLengthError === 0">
<d2-icon
:name="logLengthError === 0 ? 'dot-circle-o' : 'bug'"
style="font-size: 20px"
/>
style="font-size: 20px" />
</el-badge>
<d2-icon
v-else
name="dot-circle-o"
style="font-size: 20px"
/>
style="font-size: 20px" />
</el-button>
</el-tooltip>
</template>
......
......@@ -2,12 +2,10 @@
<el-button
class="d2-mr btn-text can-hover"
type="text"
@click="handleClick"
>
@click="handleClick">
<d2-el-icon
name="search"
style="font-size: 18px;"
/>
style="font-size: 18px;" />
</el-button>
</template>
......
......@@ -2,27 +2,22 @@
<el-dropdown
placement="bottom"
size="small"
@command="handleChange"
>
@command="handleChange">
<el-button
class="d2-mr btn-text can-hover"
type="text"
>
type="text">
<d2-icon
name="font"
style="font-size: 16px;"
/>
style="font-size: 16px;" />
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
v-for="item in options"
:key="item.value"
:command="item.value"
>
:command="item.value">
<d2-icon
:name="iconName(item.value)"
class="d2-mr-5"
/>
class="d2-mr-5" />
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......
<template>
<el-table
:data="list"
v-bind="table"
>
v-bind="table">
<el-table-column
prop="title"
align="center"
width="160"
/>
width="160" />
<el-table-column
label="预览"
width="120"
>
width="120">
<div
slot-scope="scope"
class="theme-preview"
:style="{
backgroundImage: `url(${$baseUrl}${scope.row.preview})`
}"
/>
}" />
</el-table-column>
<el-table-column
prop="address"
align="center"
>
align="center">
<template slot-scope="scope">
<el-button
v-if="activeName === scope.row.name"
type="primary"
icon="el-icon-check"
class="btn-active-success"
round
>
round>
已激活
</el-button>
<el-button
v-else
round
@click="handleSelectTheme(scope.row)"
>
@click="handleSelectTheme(scope.row)">
使用
</el-button>
</template>
......
......@@ -3,25 +3,21 @@
<el-tooltip
effect="dark"
content="主题"
placement="bottom"
>
placement="bottom">
<el-button
class="d2-ml-0 d2-mr btn-text can-hover"
type="text"
@click="dialogVisible = true"
>
@click="dialogVisible = true">
<d2-el-icon
name="magic-stick"
style="font-size: 18px"
/>
style="font-size: 18px" />
</el-button>
</el-tooltip>
<el-dialog
title="主题"
width="600px"
:visible.sync="dialogVisible"
:append-to-body="true"
>
:append-to-body="true">
<d2-theme-list style="margin-top: -25px;" />
</el-dialog>
</div>
......
......@@ -2,20 +2,16 @@
<div
class="d2-panel-search-item"
:class="hoverMode ? 'can-hover' : ''"
flex
>
flex>
<div
class="d2-panel-search-item__icon"
flex-box="0"
>
flex-box="0">
<div
class="d2-panel-search-item__icon-box"
flex="main:center cross:center"
>
flex="main:center cross:center">
<d2-el-icon
v-if="item.icon"
:name="item.icon"
/>
:name="item.icon" />
<!-- <d2-icon-svg v-else-if="item.iconSvg" :name="item.iconSvg"/>
<d2-icon v-else name="file-o"/> -->
</div>
......@@ -23,25 +19,21 @@
<div
class="d2-panel-search-item__info"
flex-box="1"
flex="dir:top"
>
flex="dir:top">
<div
class="d2-panel-search-item__info-title"
flex-box="1"
flex="cross:center"
>
flex="cross:center">
<span />
</div>
<div
class="d2-panel-search-item__info-fullTitle"
flex-box="0"
>
flex-box="0">
<span />
</div>
<div
class="d2-panel-search-item__info-path"
flex-box="0"
>
flex-box="0">
<span />
</div>
</div>
......
<template>
<div
class="panel-search"
flex="dir:top"
>
flex="dir:top">
<div
class="panel-search__input-group"
flex-box="0"
flex="dir:top main:center cross:center"
@click.self="handlePanelClick"
>
@click.self="handlePanelClick">
<!-- <d2-icon-svg
class="panel-search__logo"
name="d2-admin-text"/> -->
<img
src="./image/logo.png"
alt=""
>
alt="">
<el-autocomplete
class="panel-search__input"
ref="input"
......@@ -26,12 +23,10 @@
:trigger-on-focus="false"
:clearable="true"
@keydown.esc.native="handleEsc"
@select="handleSelect"
>
@select="handleSelect">
<d2-panel-search-item
slot-scope="{ item }"
:item="item"
/>
:item="item" />
</el-autocomplete>
<div class="panel-search__tip">
您可以使用快捷键
......@@ -44,8 +39,7 @@
<div
v-if="resultsList.length > 0"
class="panel-search__results-group"
flex-box="1"
>
flex-box="1">
<el-card>
<div class="panel-search__results-group-inner">
<d2-panel-search-item
......@@ -53,8 +47,7 @@
:key="index"
:item="item"
:hover-mode="true"
@click.native="handleResultsGroupItemClick(item.path)"
/>
@click.native="handleResultsGroupItemClick(item.path)" />
</div>
</el-card>
</div>
......
......@@ -53,19 +53,16 @@
</div>-->
<div
class="panel-item"
@click="handleChangeAccount"
>
@click="handleChangeAccount">
<el-button
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}` : '管理员') : '未登录' }}
</el-button>
</div>
<div
class="panel-item"
@click="clear"
>
@click="clear">
<el-button type="text">
<i class="i el-icon-switch-button" />退出账户
</el-button>
......@@ -73,12 +70,10 @@
</div>
<personal-dialog
:visible="personalVisible"
:user="info"
/>
:user="info" />
<password-dialog
:visible="passwordVisible"
:user="info"
/>
:user="info" />
</div>
</template>
......
......@@ -7,66 +7,54 @@
:before-close="handleClose"
:append-to-body="true"
:close-on-click-modal="false"
width="600px"
>
width="600px">
<el-form
label-width="120px"
v-if="info"
:model="info"
:rules="rules"
ref="passwordForm"
>
ref="passwordForm">
<el-form-item
label="用户名:"
prop="userName"
>
prop="userName">
<el-input
disabled="disabled"
v-model="info.userName"
/>
v-model="info.userName" />
</el-form-item>
<el-form-item
label="原密码:"
prop="oldPassword"
>
prop="oldPassword">
<el-input
type="password"
maxlength="12"
:show-password="true"
v-model="info.oldPassword"
/>
v-model="info.oldPassword" />
</el-form-item>
<el-form-item
label="新密码:"
prop="newPassword"
>
prop="newPassword">
<el-input
type="password"
maxlength="12"
:show-password="true"
v-model="info.newPassword"
/>
v-model="info.newPassword" />
</el-form-item>
<el-form-item
label="确认密码:"
prop="confirm"
>
prop="confirm">
<el-input
type="password"
maxlength="12"
:show-password="true"
v-model="info.confirm"
/>
v-model="info.confirm" />
</el-form-item>
</el-form>
<div
slot="footer"
class="dialog-footer"
>
class="dialog-footer">
<el-button
type="primary"
@click="submit"
>
@click="submit">
保 存
</el-button>
<el-button @click="handleClose">
......
......@@ -7,72 +7,57 @@
:before-close="handleClose"
:append-to-body="true"
:close-on-click-modal="false"
width="600px"
>
width="600px">
<el-form
v-if="user"
label-width="120px"
:model="user"
>
:model="user">
<el-form-item
label="用户名:"
prop="loginName"
>
prop="loginName">
<el-input
disabled
v-model="user.loginName"
/>
v-model="user.loginName" />
</el-form-item>
<el-form-item
label="姓名:"
prop="userName"
>
prop="userName">
<el-input
disabled
v-model="user.userName"
/>
v-model="user.userName" />
</el-form-item>
<el-form-item
label="联系方式:"
prop="mobile"
>
prop="mobile">
<el-input
disabled
v-model="user.mobile"
/>
v-model="user.mobile" />
</el-form-item>
<el-form-item
label="所属公司:"
prop="companyName"
>
prop="companyName">
<el-input
disabled
v-model="user.companyName"
/>
v-model="user.companyName" />
</el-form-item>
<el-form-item
label="部门:"
prop="departName"
>
prop="departName">
<el-input
disabled
v-model="user.departName"
/>
v-model="user.departName" />
</el-form-item>
<el-form-item
label="职务:"
prop="postName"
>
prop="postName">
<el-input
disabled
v-model="user.postName"
/>
v-model="user.postName" />
</el-form-item>
</el-form>
<div
slot="footer"
class="dialog-footer"
>
class="dialog-footer">
<!-- <el-button type="primary" @click="personDialogVisible = false">确 定</el-button> -->
<el-button @click="handleClose">
确 定
......
<template>
<div
class="d2-multiple-page-control-group"
flex
>
flex>
<div
class="d2-multiple-page-control-content"
flex-box="1"
>
flex-box="1">
<div class="d2-multiple-page-control-content-inner">
<d2-contextmenu
:visible.sync="contextmenuFlag"
:x="contentmenuX"
:y="contentmenuY"
>
:y="contentmenuY">
<d2-contextmenu-list
:menulist="tagName === '/index' ? contextmenuListIndex : contextmenuList"
@rowClick="contextmenuClick"
/>
@rowClick="contextmenuClick" />
</d2-contextmenu>
<el-tabs
class="d2-multiple-page-control"
......@@ -25,13 +21,11 @@
:closable="true"
@tab-click="handleClick"
@edit="handleTabsEdit"
@contextmenu.native="handleContextmenu"
>
@contextmenu.native="handleContextmenu">
<el-tab-pane
v-for="page in opened"
: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>
</el-tab-pane>
</el-tabs>
......@@ -39,29 +33,24 @@
</div>
<div
class="d2-multiple-page-control-btn"
flex-box="0"
>
flex-box="0">
<el-button-group>
<el-button
icon="el-icon-error"
@click="closeAll"
/>
@click="closeAll" />
<el-tooltip
class="item"
effect="dark"
:content="cacheTip"
placement="bottom"
>
placement="bottom">
<el-button
:icon="kaIcon"
@click="handleCache"
/>
@click="handleCache" />
</el-tooltip>
<el-button
icon="el-icon-refresh"
@click="reload"
:disabled="current==='/index'"
/>
:disabled="current==='/index'" />
</el-button-group>
</div>
</div>
......
......@@ -2,15 +2,13 @@
<div
class="d2-layout-header-aside-group"
:style="styleLayoutMainGroup"
:class="{grayMode: grayActive}"
>
:class="{grayMode: grayActive}">
<!-- 半透明遮罩 -->
<div class="d2-layout-header-aside-mask" />
<!-- 主体内容 -->
<div
class="d2-layout-header-aside-content"
flex="dir:top"
>
flex="dir:top">
<!-- 顶栏 -->
<div
class="d2-theme-header"
......@@ -18,27 +16,22 @@
opacity: this.searchActive ? 0.5 : 1
}"
flex-box="0"
flex
>
flex>
<div
class="logo-group d2-theme-header-logo"
:class="asideCollapse ? 'logo-only' : 'logo-all'"
flex-box="0"
>
flex-box="0">
<img
v-if="asideCollapse"
src="../../assets/icon-only.png"
>
src="../../assets/icon-only.png">
<img
v-else
src="../../assets/all.png"
>
src="../../assets/all.png">
<!-- <img style="width: 32px; height: 32px;" src="../../assets/icon-only.png"> -->
</div>
<p
v-if="show"
class="d2-header-name"
>
class="d2-header-name">
{{ info ? info.detail.merchantName : '' }}
</p>
<!-- <hamburger :onClick="handleToggleAside" :isActive="asideCollapse" flex-box="0" class="toggle-aside-btn"></hamburger>
......@@ -47,8 +40,7 @@
<!-- 顶栏右侧 -->
<div
class="d2-header-right"
flex-box="0"
>
flex-box="0">
<!-- <d2-header-datetime /> -->
<!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" -->
<!-- <d2-header-search @click="handleSearchClick"/> -->
......@@ -65,28 +57,24 @@
class="d2-theme-header"
style="height: 40px; font-size: 14px; border-top: 1px solid #F0F2F5;"
flex-box="0"
flex
>
flex>
<div
class="logo-group d2-theme-header-logo"
style="height: 1px; margin-top: -1px;"
:class="asideCollapse ? 'logo-only' : 'logo-all'"
flex-box="0"
/>
flex-box="0" />
<hamburger
:on-click="handleToggleAside"
:is-active="asideCollapse"
flex-box="0"
class="toggle-aside-btn"
/>
class="toggle-aside-btn" />
<span class="header-title">{{ headerTitle }}</span>
</div>
<!-- 下面 主体 -->
<div
class="d2-theme-container"
flex-box="1"
flex
>
flex>
<!-- 主体 侧边栏 -->
<div
flex-box="0"
......@@ -95,8 +83,7 @@
:style="{
width: asideCollapse ? asideWidthCollapse : asideWidth,
opacity: this.searchActive ? 0.5 : 1
}"
>
}">
<d2-menu-side />
</div>
<!-- 主体 -->
......@@ -104,19 +91,16 @@
class="d2-theme-container-main"
:class="this.searchActive ? 'is-search' : ''"
flex-box="1"
flex
>
flex>
<!-- 搜索 -->
<transition name="fade-scale">
<div
v-if="searchActive"
class="d2-theme-container-main-layer"
flex
>
flex>
<d2-panel-search
ref="panelSearch"
@close="searchPanelClose"
/>
@close="searchPanelClose" />
</div>
</transition>
<!-- 内容 -->
......@@ -124,24 +108,20 @@
<div
v-if="!searchActive"
class="d2-theme-container-main-layer"
flex="dir:top"
>
flex="dir:top">
<!-- tab -->
<div
class="d2-theme-container-main-header"
flex-box="0"
>
flex-box="0">
<!-- <d2-tabs/> -->
</div>
<!-- 页面 -->
<div
class="d2-theme-container-main-body"
flex-box="1"
>
flex-box="1">
<transition
:name="transitionActive ? 'el-fade-in' : '' "
mode="out-in"
>
mode="out-in">
<keep-alive :include="keepAlive">
<router-view />
</keep-alive>
......
......@@ -13,29 +13,12 @@ import chaining from "@/plugin/chaining"
// 接入sentry
import * as Sentry from "@sentry/vue"
import { BrowserTracing } from "@sentry/tracing"
// import D2Crud from '@d2-projects/d2-crud'
// 菜单和路由设置
import router from "./router"
import "default-passive-events"
import notice from "@/common/notice"
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" &&
Sentry.init({
......@@ -55,8 +38,47 @@ process.env.NODE_ENV === "production" &&
logErrors: 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)
// 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 = {
axios: {
appkey: "d7ffc3346fc9a45bccaaa35300d59022",
......@@ -79,7 +101,35 @@ fetch(
)
.then((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)
new Vue({
router,
......@@ -88,6 +138,8 @@ fetch(
render: (h) => {
// data.axios.baseURL =
// 'http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router'
// data
console.log(data)
Vue.prototype.baseConfig = data
return h(App)
},
......
......@@ -51,7 +51,7 @@ router.beforeEach(async (to, from, next) => {
// 确认已经加载组件尺寸设置 https://github.com/d2-projects/d2-admin/issues/198
// await store.dispatch('d2admin/size/isLoaded')
// 设置当前页 下次登录 默认打开此页面
await setCurrent(to.fullPath)
// await setCurrent(to.fullPath)
// 进度条
NProgress.start()
// 关闭搜索面板
......@@ -60,7 +60,8 @@ router.beforeEach(async (to, from, next) => {
// 页面刷新 动态路由会失效 初始化路由与左侧菜单栏
await store.dispatch("d2admin/auth/init")
// await store.dispatch('d2admin/account/load')
next(to.path)
// next(to.path)
next(to.fullPath)
} else {
if (store.state.d2admin.user.info) {
// 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 {
* @param {Object} state state
*/
toggle(state) {
console.log("toggle")
state.active = !state.active
},
/**
......@@ -20,10 +21,23 @@ export default {
set(state, active) {
state.active = active
}
},
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
}
}
......
......@@ -171,7 +171,7 @@ export default {
// DB -> store 持久化数据加载全局尺寸
await dispatch("d2admin/size/load", null, { root: true })
// DB - > 初始化 基础数据
// await dispatch('d2admin/base/init', null, { root: true })
await dispatch('d2admin/base/init', null, { root: true })
// 后台接口 -> store
// await dispatch('d2admin/auth/init', null, { root: true })
// end
......
......@@ -33,6 +33,7 @@ export default {
async ([channelType, productType]) => {
state.channelType = channelType
state.productType = productType
// console.log(productType, "productType")
await dispatch("save2db", {
name: "",
value: state
......
......@@ -5,15 +5,13 @@
:is-visible.sync="cashVisible"
width="60%"
@confirmDialog="handleCashConfirm"
@closeDialog="handleCashClose"
>
@closeDialog="handleCashClose">
<span slot="sub-title">提现后不能撤回,确保资金安全,请谨慎操作!</span>
<el-form
ref="cashDialog"
:model="cashForm"
:rules="cashRules"
label-width="120px"
>
label-width="120px">
<el-form-item label="可提现余额:">
<span>¥ {{ cashForm.balance }}</span>
</el-form-item>
......@@ -26,20 +24,17 @@
</el-form-item>
<el-form-item
label="验证码:"
prop="smsCode"
>
prop="smsCode">
<el-input
v-model="cashForm.smsCode"
placeholder="请输入验证码"
style="width: 200px"
/>
style="width: 200px" />
<el-button
type="primary"
size="small"
@click="handleSend"
:disabled="isSend"
class="cash-btn"
>
class="cash-btn">
{{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }}
</el-button>
<p v-show="showtips">
......
......@@ -60,10 +60,10 @@
<div class="d2-container-content">
<d2-table-header :left-span="22">
<span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计分账金额<span
class="count-txt">{{ countObj.partnerDivisionMoneyCount }}</span>元,分账成功金额<span
class="count-txt">{{ countObj.partnerDivisionSuccessMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.partnerInDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.partnerDivisionFailureMoneyCount }}</span>元。</span>
class="count-txt">{{ countObj.partnerDivisionMoneyCount }}</span>元,分账成功金额<span
class="count-txt">{{ countObj.partnerDivisionSuccessMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.partnerInDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.partnerDivisionFailureMoneyCount }}</span>元。</span>
<el-button type="primary"
size="mini"
@click="handleExport">
......@@ -94,8 +94,8 @@
import { mapActions } from 'vuex'
import { Util, deepClone } from '@/common/util'
import cashDialog from './cashDialog'
import { getCurrentSixMonth, divisionTypeList, divisionStatusList } from '@/common/constants.js'
// import { getPartnerYqListApi } from '@api/editCustomer'
import { divisionTypeList, divisionStatusList } from '@/common/constants.js'
import { getCurrentSixMonth } from '@/common/format.js'
import { getListApi, getCountApi, exportApi, getBankBalanceApi, getPartnerYqListApi } from '@/api/account'
export default {
name: 'MyAccount',
......
......@@ -21,7 +21,7 @@
<div class="d2-container-content">
<d2-table-header :left-span="24">
<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 ref="merchantTable"
:get-list-api="getListApi"
......@@ -35,7 +35,8 @@
<script>
import { Util, deepClone } from '@/common/util'
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 {
name: 'MyAccountRecord',
data() {
......
......@@ -58,7 +58,7 @@
>未完成</span>
<span v-else>已完成</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> -->
</template>
</el-table-column>
......
......@@ -50,7 +50,7 @@
</el-select>
<span v-else>{{ form.merchantName }}</span>
&nbsp;&nbsp;&nbsp;<span class="warningFont"
v-if="nostoreError">暂无服务的4S店</span>
v-if="nostoreError">暂无服务的4S店</span>
</el-form-item>
<el-form-item id="adviser"
......
......@@ -7,8 +7,7 @@
<div class="appoint-table-content">
<table
cellpadding="0"
cellspacing="0"
>
cellspacing="0">
<tr class="appoint-table-header">
<td>邀约时间</td>
<td>邀约详情</td>
......@@ -17,14 +16,12 @@
<template v-if="detailData.length">
<tr
v-for="(item, index) in detailData"
:key="index"
>
:key="index">
<td>{{ item.time }}</td>
<td class="flex">
<img
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">
<p>{{ item.info.name }}</p>
<p>{{ item.info.project }}</p>
......@@ -32,13 +29,11 @@
<block class="detail-phone">
<p
class="secret-phone"
v-show="!item.info.phone"
>
v-show="!item.info.phone">
<span class="one-tip">手机号码已加密</span>
<span
class="two-tip"
@click="handleGetPhone(item, index)"
>获取虚拟手机号</span>
@click="handleGetPhone(item, index)">获取虚拟手机号</span>
</p>
<p v-show="item.info.phone">
{{ item.info.phone }}
......
......@@ -14,43 +14,34 @@
</div>
<p class="date-y-line" />
</block>
<el-button
icon="el-icon-d-arrow-left"
type="text"
class="arrow-left-icon"
:disabled="currentWeek === 1"
@click="handleWeek(false)"
/>
<el-button icon="el-icon-d-arrow-left"
type="text"
class="arrow-left-icon"
:disabled="currentWeek === 1"
@click="handleWeek(false)" />
<block>
<div class="date-picker">
<div
class="wrapper"
v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)"
:key="index"
>
<div class="wrapper"
v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)"
:key="index">
<span>
<p
v-for="(info, infoIndex) in appointData[index].infoList"
:key="infoIndex"
>
<el-popover
placement="bottom-start"
title=""
width="200"
open-delay="600"
trigger="hover"
:disabled="info.status === 0"
>
<p v-for="(info, infoIndex) in appointData[index].infoList"
:key="infoIndex">
<el-popover placement="bottom-start"
title=""
width="200"
open-delay="600"
trigger="hover"
:disabled="info.status === 0">
<div>
<p>1、客户姓名,时间,项目</p>
<p>2、客户姓名,时间,项目</p>
<p>余位数:8</p>
</div>
<el-button
:class="{'col-width': true, 'hour-block': true, 'status-full': info.status === 2, 'status-remain': info.status === 1 }"
slot="reference"
@click="handleAppoint(item, infoIndex)"
>{{ appointStatusList[info.status] }}</el-button>
<el-button :class="{'col-width': true, 'hour-block': true, 'status-full': info.status === 2, 'status-remain': info.status === 1 }"
slot="reference"
@click="handleAppoint(item, infoIndex)">
{{ appointStatusList[info.status] }}</el-button>
</el-popover>
</p>
</span>
......@@ -58,34 +49,28 @@
</div>
<p class="date-x-line" />
<div class="date-picker">
<div
class="wrapper"
v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)"
:key="index"
>
<el-button
type="text"
:class="{'date-btn': true, 'col-width': true, 'active': item.active}"
@click="handleSelectDate(index)"
>
<div class="wrapper"
v-for="(item, index) in dateList.slice(currentWeek * 7 - 7, currentWeek * 7)"
:key="index">
<el-button 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>{{ weekList[item.week] }}</p>
</el-button>
</div>
</div>
</block>
<el-button
icon="el-icon-d-arrow-right"
type="text"
:disabled="currentWeek === 5"
@click="handleWeek(true)"
/>
<el-button icon="el-icon-d-arrow-right"
type="text"
:disabled="currentWeek === 5"
@click="handleWeek(true)" />
</div>
</div>
</template>
<script>
import { appointDays } from '@/common/constants'
import { appointDays } from '@/common/format'
export default {
name: 'TimeDate',
data() {
......@@ -139,5 +124,5 @@ export default {
</script>
<style lang="scss" scoped>
@import './css/timeDateStyle.scss';
@import "./css/timeDateStyle.scss";
</style>
<!-- 邀约 -->
<template>
<d2-container class="invitation">
<div
class="header"
slot="header"
>
<div class="header"
slot="header">
<appoint-table />
<time-date
:appoint-data="appointData"
:hours-list="hoursList"
@handleAppoint="handleAppoint"
/>
<time-date :appoint-data="appointData"
:hours-list="hoursList"
@handleAppoint="handleAppoint" />
</div>
<div class="d2-container-content">
<el-form :inline="true">
<el-form-item label="日期:">
<el-date-picker
v-model="searchForm.date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
<el-date-picker v-model="searchForm.date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期" />
</el-form-item>
<el-form-item label="">
<el-input
v-model="searchForm.name"
placeholder="客户姓名或车架号"
/>
<el-input v-model="searchForm.name"
placeholder="客户姓名或车架号" />
</el-form-item>
<el-form-item>
<el-button
v-show="activeName === 'first'"
:id="tableParams.btnId"
size="small"
type="primary"
>
查询
<el-button v-show="activeName === 'first'"
:id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button
v-show="activeName === 'second'"
:id="tableSecondParams.btnId"
size="small"
type="primary"
style="margin-left: 0px;"
>
查询
<el-button v-show="activeName === 'second'"
:id="tableSecondParams.btnId"
size="small"
type="primary"
style="margin-left: 0px;">
查询
</el-button>
<el-button
size="small"
@click="handleReset"
>
重置
<el-button size="small"
@click="handleReset">
重置
</el-button>
</el-form-item>
</el-form>
<el-tabs
v-model="activeName"
type="card"
>
<el-tabs v-model="activeName"
type="card">
<el-tab-pane name="first">
<span slot="label"><i class="el-icon-date" />已预约({{ totalCount.inviteCount }})</span>
<d2-table
ref="invitationFirstTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
>
<template
slot="auth-button"
slot-scope="scope"
>
<auth-button
:data="scope.scope"
show-btn-ids="['9020301', '9020302', '9020303', '9020304']"
/>
<d2-table ref="invitationFirstTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi">
<template slot="auth-button"
slot-scope="scope">
<auth-button :data="scope.scope"
show-btn-ids="['9020301', '9020302', '9020303', '9020304']" />
</template>
</d2-table>
</el-tab-pane>
<el-tab-pane name="second">
<span slot="label"><i class="el-icon-date" />待预约({{ totalCount.customerCount }})</span>
<d2-table
ref="invitationSecondTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableSecondParams"
:get-list-api="getListApi"
>
<template
slot="auth-button"
slot-scope="scope"
>
<auth-button
:data="scope.scope"
show-btn-ids="['9020305', '9020306', '9020307']"
/>
<d2-table ref="invitationSecondTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableSecondParams"
:get-list-api="getListApi">
<template slot="auth-button"
slot-scope="scope">
<auth-button :data="scope.scope"
show-btn-ids="['9020305', '9020306', '9020307']" />
</template>
</d2-table>
</el-tab-pane>
</el-tabs>
</el-tabs>
</div>
<d2-dialog
title="正在为客户预约"
:is-visible="appointDialogVisible"
@closeDialog="handleAppointClose"
@confirmDialog="handleAppointConfirm"
>
<el-form
:model="appointForm"
label-width="120px"
>
<el-form-item
label="客户姓名:"
prop="name"
>
<el-input
v-model="appointForm.name"
placeholder="请输入客户姓名"
/>
<d2-dialog title="正在为客户预约"
:is-visible="appointDialogVisible"
@closeDialog="handleAppointClose"
@confirmDialog="handleAppointConfirm">
<el-form :model="appointForm"
label-width="120px">
<el-form-item label="客户姓名:"
prop="name">
<el-input v-model="appointForm.name"
placeholder="请输入客户姓名" />
</el-form-item>
<el-form-item
label="车架号后6位:"
prop="carNo"
>
<el-input
v-model="appointForm.carNo"
placeholder="请输入车架号后6位"
/>
<el-form-item label="车架号后6位:"
prop="carNo">
<el-input v-model="appointForm.carNo"
placeholder="请输入车架号后6位" />
</el-form-item>
<el-form-item label="具体时间:">
<el-col :span="10">
<el-date-picker
v-model="appointForm.date"
type="date"
placeholder="选择日期"
:picker-options="afterTodayOptions"
@change="handleChangeDate(1)"
/>
<el-date-picker v-model="appointForm.date"
type="date"
placeholder="选择日期"
:picker-options="afterTodayOptions"
@change="handleChangeDate(1)" />
</el-col>
<el-col :span="10">
<el-select
v-model="appointForm.hour"
placeholder="选择时间"
>
<el-option
v-for="(item, index) in hoursList"
:key="index"
:label="item.hour"
:value="item.hour"
:disabled="((appointForm.date == new Date().toLocaleDateString()) && (+item.hour.split(':')[0] <= new Date().getHours()) || fullList[index])"
/>
<el-select v-model="appointForm.hour"
placeholder="选择时间">
<el-option v-for="(item, index) in hoursList"
:key="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-col>
</el-form-item>
<el-form-item
label="预约项目:"
prop="project"
>
<el-select
v-model="appointForm.project"
placeholder="请输入预约项目"
/>
<el-form-item label="预约项目:"
prop="project">
<el-select v-model="appointForm.project"
placeholder="请输入预约项目" />
</el-form-item>
</el-form>
</d2-dialog>
......@@ -170,7 +120,7 @@
<script>
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 AppointTable from './invitation-component/AppointTable'
export default {
......
......@@ -7,7 +7,7 @@
class="show-search"
:search-form="searchForm"
:form-data="showFormData">
<!-- <p class="custom-input">
<!-- <p class="custom-input">
<el-input
size="small"
v-model="searchForm.standNoOrCustomerName"
......
......@@ -22,7 +22,7 @@
<div class="d2-container-content">
<d2-table-header :left-span="24">
<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 ref="accountRecordTable"
:get-list-api="getListApi"
......@@ -40,7 +40,8 @@
<script>
import { Util, deepClone } from '@/common/util'
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'
export default {
name: 'AccountRecord',
......
......@@ -23,7 +23,7 @@
<div class="d2-container-content">
<d2-table-header :left-span="20">
<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" />
</d2-table-header>
<el-table :data="tableList">
......@@ -83,7 +83,7 @@
prop="actualDivisionPlatform"
align="center"
width="100px">
<!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> -->
<!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> -->
</el-table-column>
<el-table-column label="实际分账金额"
prop="glActualDivisionMoney"
......@@ -144,7 +144,7 @@
prop="orderType"
align="center">
<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>
<el-pagination background
......
......@@ -23,11 +23,11 @@
<div class="d2-container-content">
<d2-table-header :left-span="20">
<span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计分账金额<span
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元,分账成功金额<span
class="count-txt">{{ countObj.divisionSuccessMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.divisionFailureMoneyCount }}</span>元,异常分账金额<span
class="count-txt">{{ countObj.divisionExceptionMoneyCount }}</span>元。</span>
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元,分账成功金额<span
class="count-txt">{{ countObj.divisionSuccessMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.divisionFailureMoneyCount }}</span>元,异常分账金额<span
class="count-txt">{{ countObj.divisionExceptionMoneyCount }}</span>元。</span>
<auth-button category="Button" />
</d2-table-header>
<el-table :data="tableList">
......@@ -87,7 +87,7 @@
prop="actualDivisionPlatform"
align="center"
width="100px">
<!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> -->
<!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> -->
</el-table-column>
<el-table-column label="实际分账金额"
prop="glActualDivisionMoney"
......@@ -162,7 +162,7 @@
prop="orderType"
align="center">
<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>
<el-pagination background
......
......@@ -5,15 +5,13 @@
:is-visible.sync="cashVisible"
width="60%"
@confirmDialog="handleCashConfirm"
@closeDialog="handleCashClose"
>
@closeDialog="handleCashClose">
<span slot="sub-title">提现后不能撤回,确保资金安全,请谨慎操作!</span>
<el-form
ref="cashDialog"
:model="cashForm"
:rules="cashRules"
label-width="120px"
>
label-width="120px">
<el-form-item label="可提现余额:">
<span>¥ {{ cashForm.balance }}</span>
</el-form-item>
......@@ -26,20 +24,17 @@
</el-form-item>
<el-form-item
label="验证码:"
prop="smsCode"
>
prop="smsCode">
<el-input
v-model="cashForm.smsCode"
placeholder="请输入验证码"
style="width: 200px"
/>
style="width: 200px" />
<el-button
type="primary"
size="small"
@click="handleSend"
:disabled="isSend"
class="cash-btn"
>
class="cash-btn">
{{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }}
</el-button>
<p v-show="showtips">
......
......@@ -21,7 +21,7 @@
<div class="d2-container-content">
<d2-table-header :left-span="24">
<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 ref="merchantTable"
:get-list-api="getListApi"
......@@ -35,7 +35,8 @@
<script>
import { Util, deepClone } from '@/common/util'
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 {
name: 'MyAccountRecord',
data() {
......
......@@ -23,7 +23,7 @@
<div class="d2-container-content">
<d2-table-header :left-span="22">
<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"
size="mini"
@click="handleExport">
......
......@@ -50,11 +50,11 @@
class="count-txt">{{countObj.divisionFailureMoneyCount}}</span>元,异常分账金额<span
class="count-txt">{{countObj.divisionExceptionMoneyCount}}</span>元。</span> -->
<span slot="left">共<span
class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线上分账成功金额<span
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.divisionFailureMoneyCount }}</span>元,待分账金额<span
class="count-txt">{{ countObj.waitingDivisionMoneyCount }}</span>元。</span>
class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线上分账成功金额<span
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.divisionFailureMoneyCount }}</span>元,待分账金额<span
class="count-txt">{{ countObj.waitingDivisionMoneyCount }}</span>元。</span>
<el-button type="primary"
size="mini"
@click="handleExport">
......@@ -70,7 +70,7 @@
slot-scope="scope">
<span v-if="scope.scope.divisionStatus">
<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 v-else>-</span>
</template>
......
......@@ -11,8 +11,7 @@
class="captcha_input_box row-center"
:style="customStyle"
type="tel"
maxlength="1"
>
maxlength="1">
</div>
</template>
......
......@@ -15,19 +15,16 @@
prop="merchantType">
<el-radio-group v-model="infoForm.merchantType"
@change="changeType">
<!-- <el-radio-button label="">全部</el-radio-button> -->
<el-radio-button label="2">
4S店
</el-radio-button>
<el-radio-button label="7">
服务商
</el-radio-button>
<el-radio-button label="6">
<el-radio-button label="6"
v-if="yqCheckVisible">
园区店
</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-form-item>
<el-form-item v-if="infoForm.merchantType == '7'"
......@@ -69,11 +66,9 @@
v-model="infoForm.payStartDate"
@change="changeStartDate"
style="width:185px" />
<!-- :picker-options="startDateOptions" -->
<div style="margin:0 15px;">
-
</div>
<!--style="width: 100%;" :picker-options="EndDateOptions" style="width: 100%;" -->
<el-date-picker type="date"
placeholder="选择结束日期"
value-format="yyyy-MM-dd"
......@@ -81,15 +76,6 @@
v-model="infoForm.payEndDate"
:picker-options="pickerOptions0"
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>
</d2-dialog>
......@@ -97,14 +83,11 @@
<script>
import {
// BaseData,
rangePickerOptions
} from '@/common/constants.js'
import dayjs from 'dayjs'
import { deepClone } from '@/common/util'
// import * as api from '@api/finance'
import { getMerchantPageSearch } from '@api/publicAccount'
// import { asyncExportExcel } from '@api/sys.base'
import { mapActions, mapState } from 'vuex'
export default {
name: 'DownloadAccountDialog',
......@@ -179,7 +162,8 @@ export default {
// 基本数据
baseData: {
merchantList: []
}
},
yqCheckVisible: true
}
},
......@@ -187,10 +171,15 @@ export default {
accountVisible: {
type: Boolean,
default: false
},
scene: {
type: String,
default: ''
}
},
watch: {
},
created() {
......@@ -204,6 +193,10 @@ export default {
},
mounted() {
if (this.scene == '0' || this.scene == '3') {
/** 1.0场景和1.3场景隐藏园区店对账单入口 */
this.yqCheckVisible = false
}
this.selectMerchant()
},
......@@ -225,11 +218,6 @@ export default {
getMerchantPageSearch(params).then(res => {
this.baseData.merchantList = res.list
})
// getMerchantList(params).then(res => {
// console.log(res)
// this.baseData.merchantList = res
// // this.baseData.merchantList = res.list
// })
},
clickMerchantType(e) {
......@@ -284,7 +272,6 @@ export default {
})
params.payStartDate = infoForm.payStartDate + ' 00:00:00'
params.payEndDate = infoForm.payEndDate + ' 23:59:59'
// params.merchantList = merchantList
merchantList.forEach((item, index) => {
const merchantName = `merchantList[${index}].merchantName`
const merchantId = `merchantList[${index}].merchantId`
......@@ -295,13 +282,9 @@ export default {
if (infoForm.merchantType == '7') {
params.reportType = infoForm.reportType
}
console.log('params', params)
// return
// params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatement.async'
params.sceneType = this.scene
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatementForAudit.async'
// params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatement'
console.log(params)
// asyncExportExcel({ exportParam: JSON.stringify(params) }).then(res => {
console.log('params', params)
const list = [
...this.dowloadList,
{
......@@ -315,7 +298,6 @@ export default {
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose()
// })
}
})
},
......@@ -326,40 +308,41 @@ export default {
}
}
</script>
<style>
<style scoped>
.dateItem {
display: flex;
}
.dateItem .el-form-item__content {
::v-deep .dateItem .el-form-item__content {
display: flex;
margin-left: 0 !important;
}
/*下拉选择框-多选-内容过长-用...代替 begin */
.el-tag.el-tag--info {
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
max-width: calc(100% - 50px);
/* white-space: nowrap;
::v-deep .accountDailog {
/*下拉选择框-多选-内容过长-用...代替 begin */
.el-tag.el-tag--info {
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
max-width: calc(100% - 50px);
/* white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;*/
}
.el-tag.el-tag--info {
width: calc(100% - 200px);
}
.el-tag.el-tag--info .el-select__tags-text {
width: calc(100% - 20px);
float: left;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
/*下拉选择框-多选-内容过长-用...代替 end */
.accountDailog .el-dialog {
min-width: 700px;
}
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
.el-tag.el-tag--info {
width: calc(100% - 200px);
}
.el-tag.el-tag--info .el-select__tags-text {
width: calc(100% - 20px);
float: left;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
/*下拉选择框-多选-内容过长-用...代替 end */
.accountDailog .el-dialog {
min-width: 700px;
}
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
}
</style>
......@@ -201,7 +201,7 @@
支付金额
</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 }}
</td>
<td v-show="((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y')))"
......@@ -209,7 +209,7 @@
{{ ((userInfo.beSuper && !isSubOrder) || (!userInfo.beSuper && (detail.partnerDeductChargeFlag === 'Y'))) ? '入账手续费' : '' }}
</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) : '' }}
</td>
<td v-show="(userInfo.beSuper && !isSubOrder)"
......
......@@ -7,12 +7,10 @@
width="700px"
:no-cancel="noCancel"
@confirmDialog="handleDetailClose"
@closeDialog="handleDetailClose"
>
@closeDialog="handleDetailClose">
<el-form
:inline="true"
label-width="0"
>
label-width="0">
<el-form-item>
<span class="picker-placeholder">
<el-date-picker
......@@ -30,13 +28,11 @@
picker.$emit('pick', '');
}
}]
}"
/>
}" />
</span>
<el-button
@click="getList"
type="primary"
>
type="primary">
查询
</el-button>
</el-form-item>
......@@ -44,28 +40,23 @@
<el-table
:data="tableData"
style="width: 100%"
border
>
border>
<el-table-column
label="序号"
type="index"
:align="align"
/>
:align="align" />
<el-table-column
prop="yqMerchantName"
label="园区店名称"
:align="align"
/>
:align="align" />
<el-table-column
prop="subNums"
label="订单笔数"
:align="align"
/>
:align="align" />
<el-table-column
prop="totalFranchiseeProfitMoney"
label="总收入(元)"
:align="align"
/>
:align="align" />
</el-table>
</d2-dialog>
</template>
......
......@@ -77,7 +77,7 @@
</p>
<p class="summary_label">
冠军店<span
class="summary_value">占{{ (summayData.firstYqMerchantRatio * 100).toFixed(2) }}%</span>
class="summary_value">占{{ (summayData.firstYqMerchantRatio * 100).toFixed(2) }}%</span>
</p>
</div>
</div>
......
......@@ -6,10 +6,10 @@
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:labelWidth="'100px'"
:label-width="'100px'"
:form-data="showFormData"
@handleChangeSelect="handleChangeSelect">
<!-- <p>
<!-- <p>
<el-input
size="small"
class="custom-input"
......@@ -48,43 +48,48 @@
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
:filterListData="true">
<div class="material" slot="img" slot-scope="scope">
<img
class="pro-img"
:src="scope.scope.goodsInfo.thumbUrl">
<span class="good_name">{{scope.scope.baseGoodsName || scope.scope.goodsInfo.goodsName}}</span>
:filter-list-data="true">
<div class="material"
slot="img"
slot-scope="scope">
<img class="pro-img"
:src="scope.scope.goodsInfo.thumbUrl">
<span
class="good_name">{{ scope.scope.baseGoodsName || scope.scope.goodsInfo.goodsName }}</span>
</div>
<template slot="merchantNames"
slot-scope="scope">
<div v-if="scope.scope.merchantNames && scope.scope.merchantNames.split('/').length > 1">
<span>{{scope.scope.merchantNames.split('/')[0]}}</span>/...
<el-popover
placement="top"
width="200"
trigger="hover"
:content="scope.scope.merchantNames">
<el-button slot="reference" type="text">{{`共${scope.scope.merchantNames.split('/').length}家`}}</el-button>
</el-popover>
</div>
<div v-else>
<span>{{scope.scope.merchantNames}}</span>
</div>
slot-scope="scope">
<div v-if="scope.scope.merchantNames && scope.scope.merchantNames.split('/').length > 1">
<span>{{ scope.scope.merchantNames.split('/')[0] }}</span>/...
<el-popover placement="top"
width="200"
trigger="hover"
:content="scope.scope.merchantNames">
<el-button slot="reference"
type="text">{{ `共${scope.scope.merchantNames.split('/').length}家` }}
</el-button>
</el-popover>
</div>
<div v-else>
<span>{{ scope.scope.merchantNames }}</span>
</div>
</template>
<template slot="yqMerchantNames"
slot-scope="scope">
<div v-if="scope.scope.yqMerchantNames && scope.scope.yqMerchantNames.split('/').length > 1">
<span>{{scope.scope.yqMerchantNames.split('/')[0]}}</span>/...
<el-popover
placement="top"
width="200"
trigger="hover"
:content="scope.scope.yqMerchantNames">
<el-button slot="reference" type="text">{{`共${scope.scope.yqMerchantNames.split('/').length}家`}}</el-button>
slot-scope="scope">
<div
v-if="scope.scope.yqMerchantNames && scope.scope.yqMerchantNames.split('/').length > 1">
<span>{{ scope.scope.yqMerchantNames.split('/')[0] }}</span>/...
<el-popover placement="top"
width="200"
trigger="hover"
:content="scope.scope.yqMerchantNames">
<el-button slot="reference"
type="text">{{ `共${scope.scope.yqMerchantNames.split('/').length}家` }}
</el-button>
</el-popover>
</div>
<div v-else>
<span>{{scope.scope.yqMerchantNames}}</span>
<span>{{ scope.scope.yqMerchantNames }}</span>
</div>
</template>
<div v-if="Object.keys(scope.scope).includes('upgradeGoodsList')"
......@@ -141,7 +146,7 @@ import { deepClone } from '@/common/util'
import { getList, baseGoodsUpOrDown, baseGoodsDelete, baseGoodsUpOrDownForChild, getBaseGoodsList, commodityAddSeviceMerchant } from '@api/commodity'
import { getProductTypeBySceneId } from '@api/product'
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 { mapActions, mapState } from 'vuex'
// import _ from 'lodash'
......@@ -180,7 +185,7 @@ export default {
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'scenCodeList'
optionsName: 'sceneCodeList'
}, {
label: '类目',
name: 'goodsType',
......@@ -232,14 +237,14 @@ export default {
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'reviewStatusList'
},
// {
// label: '创建时间',
// name: 'createTime',
// type: 'datePicker',
// isClear: true,
// pickerOptions: 'rangePickerOptions'
// }
}
// {
// label: '创建时间',
// name: 'createTime',
// type: 'datePicker',
// isClear: true,
// pickerOptions: 'rangePickerOptions'
// }
],
getListApi: getBaseGoodsList,
// 表格参数
......@@ -291,12 +296,12 @@ export default {
label: '可见门店',
name: '',
type: 'slot',
addHtml: 'merchantNames'
addHtml: 'merchantNames'
}, {
label: '可见园区',
name: '',
type: 'slot',
addHtml: 'yqMerchantNames'
addHtml: 'yqMerchantNames'
},
// {
// label: '品牌商',
......@@ -391,7 +396,7 @@ export default {
},
showMoreData: {},
showMoreVisible: false,
scenCodeList: []
sceneCodeList: []
}
},
......@@ -414,8 +419,8 @@ export default {
this.baseData.brandList.unshift(allOpt)
this.baseData.statusList.unshift(allOpt)
this.baseData.reviewStatusList.unshift(allOpt)
this.baseData.scenCodeList = deepClone(scenCodeList)
this.baseData.scenCodeList.unshift(allOpt)
this.baseData.sceneCodeList = deepClone(sceneCodeList)
this.baseData.sceneCodeList.unshift(allOpt)
// 获取全部类目
getProductTypeBySceneId({ sceneType: '' }).then(res => {
this.baseData.productTypeList = res
......@@ -713,13 +718,13 @@ export default {
</script>
<style scoped>
.material{
.material {
padding: 0 20px;
display: flex;
justify-content: left;
align-items: center;
}
.good_name{
.good_name {
margin-left: 20px;
}
</style>
......
......@@ -53,9 +53,9 @@
<el-form-item label="券码数量:"
prop="amount"
:rules="[
{ required: true, message: '请输入券码数量', trigger: 'blur'},
{ validator: validateAccount, trigger: 'blur' }
]">
{ required: true, message: '请输入券码数量', trigger: 'blur'},
{ validator: validateAccount, trigger: 'blur' }
]">
<el-input-number v-model="couponsForm.amount"
:min="1"
:max="999"
......
......@@ -5,60 +5,50 @@
:data="tableData"
style="width: 690px"
border
class="store-table"
>
class="store-table">
<el-table-column
label="序号"
align="center"
type="index"
width="64px"
/>
width="64px" />
<el-table-column
prop="yqMerchantName"
label="园区店名称"
align="center"
/>
align="center" />
<el-table-column
prop="merchantName"
label="4S店名称"
align="center"
/>
align="center" />
<el-table-column
prop="merchantId"
label="商户编号"
align="center"
/>
align="center" />
<el-table-column
prop="userType"
label="商户类型"
align="center"
>
align="center">
<template slot-scope="scope">
<span>{{ baseData[scope.row.channelType === 2 ? 'ghUserTypeList' : 'userTypeList'][scope.row.userType] }}</span>
</template>
</el-table-column>
<el-table-column
label="删除"
align="center"
>
align="center">
<template slot-scope="scope">
<el-button
class="el-icon-delete"
@click="handleDelete(scope.row)"
type="text"
/>
type="text" />
</template>
</el-table-column>
<el-table-column
label="券码数量(张)"
align="center"
width="160px"
>
width="160px">
<template slot-scope="scope">
<slot
name="num"
:scope="{row: scope.row, index: scope.$index}"
/>
:scope="{row: scope.row, index: scope.$index}" />
</template>
</el-table-column>
</el-table>
......
......@@ -11,17 +11,17 @@
<div class="shopSpeci-box" v-for="(item, index) in specificationValueList" :key="index">
<div class="top">
<div class="top-left">
<span class="title">商品{{index + 1}}:</span>
<span>{{baseGoodsName}}</span><span v-for="(val, idx) in item.specsValueList" :key="idx">{{val}}</span>
<span class="title">商品{{ index + 1 }}:</span>
<span>{{ baseGoodsName }}</span><span v-for="(val, idx) in item.specsValueList" :key="idx">{{ val }}</span>
</div>
<div class="top-center">>>></div>
<div class="top-right">
<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"-->
<el-select style="width: 430px;" @change="e => selectChange(e, index)"
filterable collapse-tags remote reserve-keyword :remote-method="remoteMethod"
v-model="item.selectedMerchantIds" multiple @visible-change="visibleChange" placeholder="请选择">
<el-select style="width: 430px;" @change="e => selectChange(e, index)"
filterable collapse-tags remote reserve-keyword :remote-method="remoteMethod"
v-model="item.selectedMerchantIds" multiple @visible-change="visibleChange" placeholder="请选择">
<el-option
v-for="(v, k) in merchantList"
v-show="!merchantName || (merchantName && v.isShowItem == 1)"
......@@ -37,7 +37,7 @@
<div style="margin-bottom: 15px;">已分配:</div>
<div class="merchant-tag">
<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>
......@@ -129,31 +129,31 @@ export default {
methods: {
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
},
remoteMethod(query) {
this.merchantName = query;
this.currentPage = 1;
this.interestsOptions = [];
this.interesLoading = true;
this.merchantName = query
this.currentPage = 1
this.interestsOptions = []
this.interesLoading = true
if (query) {
this.getSelectingList(); // 请求接口
this.getSelectingList() // 请求接口
}
},
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) this.merchantName = ''
},
interestsLoadmore(){
interestsLoadmore() {
setTimeout(() => {
this.currentPage = this.currentPage + 1;
this.currentPage = this.currentPage + 1
if (this.allPages < this.currentPage) {
this.currentPage = this.allPages
return;
return
}
this.getSelectingList();
}, 10);
this.getSelectingList()
}, 10)
},
getSelectingList() {
this.storeApi({
......@@ -164,7 +164,7 @@ export default {
}).then(res => {
this.interesLoading = false
this.allPages = res.pages
let arr = []
const arr = []
res.list && res.list.forEach(val => {
val.merchantId = val.merchantId ? val.merchantId : val.merchant?.merchantId
val.merchantName = val.merchantName ? val.merchantName : val.merchant?.merchantName
......@@ -196,7 +196,7 @@ export default {
handleSpeciRelateStoreConfirm() {
let [flag, index] = [true, 0]
for (var i = 0; i < this.specificationValueList.length; i++) {
let item = this.specificationValueList[i]
const item = this.specificationValueList[i]
if (!item.selectedMerchantIds.length) {
flag = false
index = i
......@@ -209,9 +209,9 @@ export default {
type: 'error'
})
}
let arr = []
const arr = []
this.specificationValueList.forEach(val => {
let merchantList = []
const merchantList = []
val.selectedMerchantList.forEach(v => {
merchantList.push({
merchantId: v.merchantId,
......@@ -252,8 +252,8 @@ export default {
}
.top-center{
font-weight: 600;
background-image: -webkit-linear-gradient(left, #3E69E4, #C5CFF8);
-webkit-background-clip: text;
background-image: -webkit-linear-gradient(left, #3E69E4, #C5CFF8);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.top-right{
......@@ -283,7 +283,7 @@ export default {
.flex_1{
flex: 0 0 50%;
margin: 5px 0;
}
}
}
......
......@@ -117,7 +117,8 @@
<script>
// import _ from 'lodash'
import { deepClone } from '@/common/util'
import { limitPrice, warrantyProList } from '@/common/constants'
import { warrantyProList } from '@/common/constants'
import { limitPrice } from '@/common/format'
// warrantyProList
export default {
name: 'RelateProDialog',
......
......@@ -29,7 +29,7 @@
align="center">
<template slot-scope="scope">
<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>
</el-table-column>
<el-table-column prop="merchantName"
......@@ -37,7 +37,7 @@
align="center">
<template slot-scope="scope">
<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"
popper-class="tooltip-class"
effect="dark"
......@@ -66,17 +66,17 @@
<el-table-column v-if="sourcePage != 'serviceStore'"
prop="yqMerchantName"
label="园区店名称"
align="center" >
<template slot-scope="scope">
<span>{{ scope.row.yqMerchantName }}</span>
</template>
align="center">
<template slot-scope="scope">
<span>{{ scope.row.yqMerchantName }}</span>
</template>
</el-table-column>
<el-table-column prop="merchantName"
label="4S店名称"
align="center" >
<template slot-scope="scope">
<span>{{ scope.row.merchantName}}</span>
</template>
align="center">
<template slot-scope="scope">
<span>{{ scope.row.merchantName }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="warrantyType"
label="选择质保"
......@@ -233,7 +233,7 @@ export default {
},
handleDelete(row) {
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)
},
handleCurrentChange(val) {
......
......@@ -10,7 +10,7 @@
<div class="d2-drawer-block title-block">
<p class="parentGoods">
{{ commodityInfo.goodsInfo.goodsName }}<span
class="parent-type">{{ commodityInfo.goodsInfo.goodsTypeName }}</span>
class="parent-type">{{ commodityInfo.goodsInfo.goodsTypeName }}</span>
</p>
<p class="examineP"
v-if="examineFlag">
......@@ -53,7 +53,7 @@
v-for="(item,index) in commodityInfo.upgradeGoodsList"
:key="index">
<p class="car-sub-head">
商品{{ index + 1 }}-{{ item.specificationData ? (item.goodsInfo.goodsName + ' ' + item.specificationData) : item.goodsInfo.goodsName }}
商品{{ index + 1 }}-{{ item.specificationData ? (item.goodsInfo.goodsName + ' ' + item.specificationData.replace(';~;', ' ')) : item.goodsInfo.goodsName }}
</p>
<!-- <el-form-item class="d2-drawer-item"
label="商品名称:">
......@@ -87,13 +87,13 @@
<span>{{ item.warrantyPeriod ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item> -->
<el-form-item
class="d2-drawer-item"
label="库存:">
class="d2-drawer-item"
label="库存:">
<span>{{ item.stock ? (item.stock) : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
label="质保年限:">
class="d2-drawer-item"
label="质保年限:">
<span>{{ item.warrantyPeriod ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item timeline-item_wrapper"
......
......@@ -29,7 +29,7 @@ import { mapActions } from 'vuex'
// import { limitPrice } from '@/common/constants'
import { deepClone } from '@/common/util'
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 {
name: 'EditCommodity',
components: {
......@@ -79,7 +79,7 @@ export default {
],
linkMerchants: [{ 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'] }]
},
comFormRef: 'com',
......@@ -90,66 +90,66 @@ export default {
// attr: 'thumbUrl'
// },
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',
label: '主图',
type: 'image',
blockWidth: '50%'
}
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',
label: '主图',
type: 'image',
blockWidth: '50%'
}
// {
// name: 'shopPrice',
// label: '产品成本',
......@@ -179,12 +179,12 @@ export default {
}, {
title: '配规格',
formBlock: [
{
name: 'specificationDetailList',
label: '',
type: 'addSpecifi',
inputValue: 'baseGoodsName'
}
{
name: 'specificationDetailList',
label: '',
type: 'addSpecifi',
inputValue: 'baseGoodsName'
}
]
}, {
title: '分配到门店',
......@@ -240,16 +240,15 @@ export default {
res && res.forEach(item => {
item.value = item.sceneType
item.label = item.sceneName
let twoChildren = []
const twoChildren = []
item.twoMenu && item.twoMenu.forEach((val, index) => {
twoChildren.push({
value: val.goodsType,
label: val.goodsTypeName,
children: []
})
let threeChildren = []
const threeChildren = []
val.threeMenu && val.threeMenu.forEach(v => {
v.value = v.id
v.label = v.goods_name
threeChildren.push(v)
......@@ -273,7 +272,7 @@ export default {
var linkMerchantIndex = this.editForm.findIndex(i => i.title === '分配到门店')
this.editForm[linkMerchantIndex].formBlock[0].name = res.distributionType == '0' ? 'linkMerchants' : 'speciLinkMerchants'
this.radioType = this.radioType ? this.radioType : (res.distributionType + '')
let specificationDetailList = []
const specificationDetailList = []
res.upgradeGoodsMerchantRefList && res.upgradeGoodsMerchantRefList.forEach(val => {
// 默认质保类型 0质保卡 1质保权益卡
val.warrantyType = !val.warrantyType ? 0 : val.warrantyType
......@@ -340,10 +339,10 @@ export default {
this.editForm[linkMerchantIndex].formBlock[0].name = data == '0' ? 'linkMerchants' : 'speciLinkMerchants'
},
handleAddConfirm(e, flag = false) {
let data = deepClone(e)
let [goodsSpecificationNameList, goodsSpecificationList] = [[], []]
const data = deepClone(e)
const [goodsSpecificationNameList, goodsSpecificationList] = [[], []]
data.specificationDetailList.length && data.specificationDetailList.map(val => {
let goodsSpecificationValueList = []
const goodsSpecificationValueList = []
val.specificationValueList.forEach(v => {
goodsSpecificationValueList.push({
id: v.id,
......@@ -360,7 +359,7 @@ export default {
var specificationData = ''
item.specsValueList.forEach((subItem, subIndex) => {
if (subIndex != 0) {
specificationData += '-'
specificationData += ';~;'
}
specificationData = specificationData + subItem
})
......@@ -391,7 +390,7 @@ export default {
if (flag) {
this.$refs.d2Form.confirmEvent()
} else {
this.$refs.d2Form.showMerchantsDialog(this.radioType || '0', res)
this.$refs.d2Form.showMerchantsDialog(this.radioType || '0', res)
}
})
// // 执行分配门店默认执行保存
......
<!-- 产品编辑(素材管理) -->
<template>
<d2-container class="edit-product">
<d2-form
v-if="show"
ref="d2ProductForm"
:rules="rules"
:add-or-edit="addOrEdit"
form-name="product"
:origin-data="editData"
:form-list="editForm"
:form-ref="proFormRef"
@handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose"
@handleChangeSelect="handleChangeSelect"
@handleAddBrandSupplyConfirm="handleAddBrandSupplyConfirm"
@handleEditBrandSupplyConfirm="handleEditBrandSupplyConfirm"
>
<p
slot="title"
class="edit-title"
>
<d2-form v-if="show"
ref="d2ProductForm"
:rules="rules"
:add-or-edit="addOrEdit"
form-name="product"
:origin-data="editData"
:form-list="editForm"
:form-ref="proFormRef"
@handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose"
@handleChangeSelect="handleChangeSelect"
@handleAddBrandSupplyConfirm="handleAddBrandSupplyConfirm"
@handleEditBrandSupplyConfirm="handleEditBrandSupplyConfirm">
<p slot="title"
class="edit-title">
{{ addOrEdit === 'add' ? '新增素材' : '编辑素材' }}
</p>
</d2-form>
......@@ -30,7 +26,7 @@
// import _ from 'lodash'
import { deepClone } from '@/common/util'
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'
export default {
name: 'EditProduct',
......@@ -42,7 +38,7 @@ export default {
rules: {
yqMerchantId: [{ 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' }],
sapCode: [{
validator: (rule, value, cb) => {
......@@ -190,8 +186,8 @@ export default {
}]
this.editData.goodsVideoList = []
// 获取场景下类目
if ((this.editData.sceneType??'') !== '') {
this.handleChangeSelect(this.editData.sceneType)
if ((this.editData.sceneType ?? '') !== '') {
this.getGoodTypeList(this.editData.sceneType)
}
if (this.editData.videoUrl) this.editData.goodsVideoList = [{ content: this.editData.videoUrl }]
this.editData.thumbUrlList[0].content = this.editData.thumbUrl
......@@ -206,7 +202,7 @@ export default {
this.getBrandSupplyList(1)
this.getBrandSupplyList(2)
this.getBaseData()
this.editForm[0].formBlock[1].optionList = scenCodeList
this.editForm[0].formBlock[1].optionList = sceneCodeList
},
methods: {
......@@ -239,7 +235,7 @@ export default {
}
data.goodsDescList = data.goodsDescList.filter(item => item.content)
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.videoUrl = data.goodsVideoList[0]?.content
data.brandMerchantCode && (data.brandMerchantName = this.editForm[0].formBlock[4].optionList.find(item => item.id === data.brandMerchantCode).relatedPartyName)
......@@ -262,7 +258,7 @@ export default {
thumbUrl: data.thumbUrl,
videoUrl: data.videoUrl,
goodsImgList: data.goodsImgList,
goodsDescList: data.goodsDescList,
goodsDescList: data.goodsDescList
}
params.goodsImgList.forEach(i => {
......@@ -286,18 +282,12 @@ export default {
},
// 根据所选场景获取类目
handleChangeSelect(value) {
if ((this.editData.sceneType??'') === '') {
this.editForm[0].formBlock[2].optionList = []
this.getBaseData()
return
}
this.$refs.d2ProductForm.clearGoodsType(this.editForm[0].formBlock[2])
this.getGoodTypeList(value)
},
getGoodTypeList(value) {
getProductTypeBySceneId({ sceneType: value }).then(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!