Commit 1dca9cb8 by 张立顺

Merge branch 'SAAS+V4.55.1' into SAAS+V4.56.0-0908

2 parents 2f572847 6a67d162
Showing 55 changed files with 1349 additions and 466 deletions
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"flex.css": "^1.1.7", "flex.css": "^1.1.7",
"fuse.js": "^3.4.4", "fuse.js": "^3.4.4",
"glsk-oss-jssdk": "^1.0.3", "glsk-oss-jssdk": "^1.0.5",
"glsx-common-sdk": "^0.3.0", "glsx-common-sdk": "^0.3.0",
"hash.js": "^1.0.0", "hash.js": "^1.0.0",
"hotkeys-js": "^3.6.2", "hotkeys-js": "^3.6.2",
......
...@@ -106,3 +106,9 @@ export function insertOrUpdatePrivacyAgreement(data) { ...@@ -106,3 +106,9 @@ export function insertOrUpdatePrivacyAgreement(data) {
data.method = `${path2}privacyAgreement.insertOrUpdate` data.method = `${path2}privacyAgreement.insertOrUpdate`
return request(data, "post") return request(data, "post")
} }
// 获取支付渠道列表
export function paymentChannelList(data) {
data.method = `${path2}paymentChannel.list`
return request(data, "post")
}
...@@ -382,10 +382,16 @@ export function get4sAndServiceMerchantListApi(data) { ...@@ -382,10 +382,16 @@ export function get4sAndServiceMerchantListApi(data) {
} }
/** /**
*
* 获取车品牌列表 * 获取车品牌列表
*/ */
export function getCarBrandList (data = {}) { export function getCarBrandList(data = {}) {
data.method = 'dj.api.smartcarlife.common.car.brand.list' data.method = "dj.api.smartcarlife.common.car.brand.list"
return request(data, RequestMethods.POST)
}
/**
* 获取支付渠道列表
*/
export function paymentChannelList(data = {}) {
data.method = "dj.api.smartcarlife.paymentChannel.list"
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
...@@ -103,7 +103,8 @@ export function yseMerchantGetDetail(data) { ...@@ -103,7 +103,8 @@ export function yseMerchantGetDetail(data) {
} }
// 银盛虚账可选商户列表 // 银盛虚账可选商户列表
export function listWithPageAccountStatuses(data) { export function listWithPageAccountStatuses(data) {
data.method = `dj.api.serviceMerchant.listWithPage` // data.method = `dj.api.serviceMerchant.listWithPage`
data.method = `dj.api.smartcarlife.merchant.paymentChannel.account.page`
return request(data, "post") return request(data, "post")
} }
...@@ -112,3 +113,9 @@ export function updateAccountMode(data) { ...@@ -112,3 +113,9 @@ export function updateAccountMode(data) {
data.method = `${djPath}yseMerchant.updateReceiptMode` data.method = `${djPath}yseMerchant.updateReceiptMode`
return request(data, "post") return request(data, "post")
} }
// 分页查询商户各支付渠道的虚账信息
export function accountPage(data) {
data.method = `${djPath2}merchant.paymentChannel.account.page`
return request(data, "post")
}
...@@ -20,7 +20,7 @@ const request = ( ...@@ -20,7 +20,7 @@ const request = (
) => { ) => {
// 兼容线上dj和scrm appkey和secret不一样的情况 // 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = "" let apiName = ""
console.log("params.method", params) // console.log("params.method", params)
if (params.method.includes("dj.api.smartcarlife")) { if (params.method.includes("dj.api.smartcarlife")) {
apiName = "dj" apiName = "dj"
} else if (params.method.includes("dj.api.script")) { } else if (params.method.includes("dj.api.script")) {
......
...@@ -3,135 +3,141 @@ import request from "./request" ...@@ -3,135 +3,141 @@ import request from "./request"
const path = "dj.smartcarlife.api." const path = "dj.smartcarlife.api."
// 分页查询园区店服务商列表 // 分页查询园区店服务商列表
export function getList (data) { export function getList(data) {
// data.method = `${path}partnerMerchant.serviceRef.page` // data.method = `${path}partnerMerchant.serviceRef.page`
data.method = `${path}yqPartnerMerchant.ref.page` data.method = `${path}yqPartnerMerchant.ref.page`
return request(data, "post") return request(data, "post")
} }
// 获取商户列表(园区店和服务商) // 获取商户列表(园区店和服务商)
export function getMerchantList (data) { export function getMerchantList(data) {
data.method = `${path}merchant.list` data.method = `${path}merchant.list`
return request(data, "post") return request(data, "post")
} }
// 给园区店添加服务商 // 给园区店添加服务商
export function addParentMerchant (data) { export function addParentMerchant(data) {
data.method = `${path}partnerMerchant.serviceRef.add` data.method = `${path}partnerMerchant.serviceRef.add`
return request(data, "post") return request(data, "post")
} }
// 保存园区店服务商关联 // 保存园区店服务商关联
export function saveParentMerchant (data) { export function saveParentMerchant(data) {
data.method = `${path}partnerMerchant.serviceRef.save` data.method = `${path}partnerMerchant.serviceRef.save`
return request(data, "post") return request(data, "post")
} }
// 删除关联服务商 // 删除关联服务商
export function deleteParentMerchant (data) { export function deleteParentMerchant(data) {
data.method = `${path}partnerMerchant.serviceRef.delete` data.method = `${path}partnerMerchant.serviceRef.delete`
return request(data, "post") return request(data, "post")
} }
// 获取园区店列表 // 获取园区店列表
export function getYqMerchantConfig (data) { export function getYqMerchantConfig(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.page` data.method = `dj.api.smarcarlife.yqMerchantConfig.page`
return request(data, "GET") return request(data, "GET")
} }
// 获取园区店列表-获取园区店配置项 // 获取园区店列表-获取园区店配置项
export function GETYQMERCHANTCONFIGDETAIL (data) { export function GETYQMERCHANTCONFIGDETAIL(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.detail` data.method = `dj.api.smarcarlife.yqMerchantConfig.detail`
return request(data, "GET") return request(data, "GET")
} }
// 获取园区店列表-修改园区店配置项 // 获取园区店列表-修改园区店配置项
export function UPDATEYQMERCHANTCONFIG (data) { export function UPDATEYQMERCHANTCONFIG(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.modify` data.method = `dj.api.smarcarlife.yqMerchantConfig.modify`
return request(data, "post") return request(data, "post")
} }
// 生成小程序码 // 生成小程序码
export function createWeappQrcode (data) { export function createWeappQrcode(data) {
data.method = `dj.api.smartcarlife.common.createWeappQrcode.new` data.method = `dj.api.smartcarlife.common.createWeappQrcode.new`
return request(data, "post") return request(data, "post")
} }
// 获取园区店支付宝页面二维码 // 获取园区店支付宝页面二维码
export function alipayQrcode (data) { export function alipayQrcode(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.alipay.qrcode` data.method = `dj.api.smarcarlife.yqMerchantConfig.alipay.qrcode`
return request(data, "post") return request(data, "post")
} }
// 获取园区店配置项 // 获取园区店配置项
export function yqMerchantConfigDetail (data) { export function yqMerchantConfigDetail(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.detail` data.method = `dj.api.smarcarlife.yqMerchantConfig.detail`
return request(data, "post") return request(data, "post")
} }
// 关联园区店加企微二维码 // 关联园区店加企微二维码
export function serviceMerchantRelateQrcode (data) { export function serviceMerchantRelateQrcode(data) {
data.method = `dj.api.smartcarlife.serviceMerchant.relate.qrcode` data.method = `dj.api.smartcarlife.serviceMerchant.relate.qrcode`
return request(data, "post") return request(data, "post")
} }
// 获取园区店配置的场景入口 // 获取园区店配置的场景入口
export function getYqMerchantSceneConfigAPI (data) { export function getYqMerchantSceneConfigAPI(data) {
data.method = `dj.api.smartcarlife.select.openScene.info` data.method = `dj.api.smartcarlife.select.openScene.info`
return request(data, "post") return request(data, "post")
} }
// 配置园区店场景入口 // 配置园区店场景入口
export function settingYqMerchantSceneAPI (data) { export function settingYqMerchantSceneAPI(data) {
data.method = `dj.api.smartcarlife.update.openScene.info` data.method = `dj.api.smartcarlife.update.openScene.info`
return request(data, "post") return request(data, "post")
} }
// 获取服务商数据 // 获取服务商数据
export function getServiceListAPI (data) { export function getServiceListAPI(data) {
data.method = "dj.api.smarcarlife.yqMerchantConfig.partnerMerchantDetail" data.method = "dj.api.smarcarlife.yqMerchantConfig.partnerMerchantDetail"
return request(data, "post") return request(data, "post")
} }
// 获取服务商配置 // 获取服务商配置
export function getProviderProcurementInfo (data) { export function getProviderProcurementInfo(data) {
data.method = data.method =
"dj.smartcarlife.api.yqPartnerMerchant.selectProviderProcurementInfo" "dj.smartcarlife.api.yqPartnerMerchant.selectProviderProcurementInfo"
return request(data, "post") return request(data, "post")
} }
// 配置服务商 // 配置服务商
export function updateProviderProcurementInfo (data) { export function updateProviderProcurementInfo(data) {
data.method = data.method =
"dj.smartcarlife.api.yqPartnerMerchant.updateProviderProcurementInfo" "dj.smartcarlife.api.yqPartnerMerchant.updateProviderProcurementInfo"
return request(data, "post") return request(data, "post")
} }
// 获取发货主体 // 获取发货主体
export function getShippingEntityInfoAll (data) { export function getShippingEntityInfoAll(data) {
data.method = data.method =
"dj.smartcarlife.api.yqPartnerMerchant.selectShippingEntityInfoAll" "dj.smartcarlife.api.yqPartnerMerchant.selectShippingEntityInfoAll"
return request(data, "post") return request(data, "post")
} }
// 获取下级商户 // 获取下级商户
export function searchServiceMerchant (data) { export function searchServiceMerchant(data) {
data.method = "dj.api.serviceMerchant.page.search" data.method = "dj.api.serviceMerchant.page.search"
return request(data, "post") return request(data, "post")
} }
/**根据4s店商户号查找员工设备列表 */ /**根据4s店商户号查找员工设备列表 */
export function getMerchantEmployeeList (data) { export function getMerchantEmployeeList(data) {
data.method = "dj.api.mindworkplate.badge.findPhoneListByShopMerchantNo" data.method = "dj.api.mindworkplate.badge.findPhoneListByShopMerchantNo"
return request(data, "post") return request(data, "post")
} }
/**获取阿里云token */ /**获取阿里云token */
export function getAliOSSToken (data = {}) { export function getAliOSSToken(data = {}) {
data.method = 'dj.api.mindworkplate.badge.getToken' data.method = "dj.api.mindworkplate.badge.getToken"
return request(data, "post") return request(data, "post")
} }
/** 录音文件批量新增 */ /** 录音文件批量新增 */
export function updateRecordings (data) { export function updateRecordings(data) {
data.method = "dj.api.smartcarlife.inspection.conversation.recordings" data.method = "dj.api.smartcarlife.inspection.conversation.recordings"
return request(data, "post") return request(data, "post")
}
\ No newline at end of file \ No newline at end of file
}
/** 设置商户默认的支付渠道 */
export function setDefaultPaymentChannel(data) {
data.method = "dj.api.serviceMerchant.setDefaultPaymentChannel"
return request(data, "post")
}
...@@ -1382,6 +1382,23 @@ export const transferStatusOpt = [ ...@@ -1382,6 +1382,23 @@ export const transferStatusOpt = [
{ confId: 1, confValue: "推送付款单" }, { confId: 1, confValue: "推送付款单" },
{ confId: 2, confValue: "重推付款单" } { confId: 2, confValue: "重推付款单" }
] ]
// 申请虚拟账户成本-通联 证件类型
export const legalCertTypeOpt = [
{ confId: "00", confValue: "身份证" },
{ confId: "01", confValue: "中国护照" },
{ confId: "03", confValue: "警官证" },
{ confId: "04", confValue: "户口簿" },
{ confId: "05", confValue: "临时身份证" },
{ confId: "07", confValue: "港澳通行证" },
{ confId: "08", confValue: "台胞通行证" },
{ confId: "14", confValue: "军官证" },
{ confId: "16", confValue: "军人士兵证" },
{ confId: "17", confValue: "武警士兵证" },
{ confId: "19", confValue: "营业执照" },
{ confId: "24", confValue: "外国人居留证" },
{ confId: "99", confValue: "其他证件" }
]
export const label_businessOpt = [ export const label_businessOpt = [
{ confId: 2, confValue: "轻改" }, { confId: 2, confValue: "轻改" },
{ confId: 3, confValue: "权益" }, { confId: 3, confValue: "权益" },
......
import { baseConfig } from "@/main"
const OSS = require("ali-oss") const OSS = require("ali-oss")
class GlOssApi { export default {
constructor(params = {}) {
this.baseConfig = params.baseConfig
}
/** /**
* 分片上传大文件到阿里云OSS(带断点续传和重试机制) * 阿里云oss sdk文件上传 dir 上传到的文件位置
* @param {*} file 文件流(大文件) * @param {*} file 文件流
* @param {*} successCallback 成功回调 * @param {*} successCallback 成功回调
* @param {*} errCallBack 失败回调 * @param {*} errCallBack 失败回调
* @param {*} bucketName 桶名(可选) * @param {*} bucketName 阿里云桶名(可以指定多个桶名)
* @param {*} dir 上传目录(可选) * @param {*} dir 上传文件夹路径 譬如images
* @param {*} partSize 分片大小(单位 KB,默认500KB)
* @param {*} maxRetries 最大重试次数(默认3次)
*/ */
multipartUpload(
bucketUpload(
file, file,
successCallback = new Function(), successCallback = new Function(),
errCallBack = new Function(), errCallBack = new Function(),
bucketName = "zzl-filerepostorypublic", bucketName = "zzl-filerepostorypublic",
dir = "image", dir = "image"
partSize = 500, // 默认分片大小为500KB
maxRetries = 3 // 最大重试次数
) { ) {
const { baseConfig } = this const fileName = file.name // 先获取上传要的资料签名
if (!baseConfig) errCallBack(new Error("初始化缺少baseConfig配置")) // 实例化一个上传客户端
const fileName = file.name
const client = new OSS({ const client = new OSS({
accessKeyId: baseConfig.alyOss2.accessKeyId, // yourRegion填写Bucket所在地域。Region填写为oss-cn-hangzhou。
accessKeySecret: baseConfig.alyOss2.accessKeySecret, // region: "oss-cn-beijing", //我的存储是北京,可根据具体配置自行修改
bucket: baseConfig.alyOss2.bucket, // region: "oss-cn-shanghai",
endpoint: baseConfig.alyOss2.endpoint // 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。)(后台接口返回)
accessKeyId: baseConfig.alyOss.accessKeyId,
accessKeySecret: baseConfig.alyOss.accessKeySecret,
// 从STS服务获取的安全令牌(SecurityToken)。
// stsToken: obj.securityToken,
// 填写Bucket名称。
bucket: baseConfig.alyOss.bucket,
endpoint: baseConfig.alyOss.endpoint
}) })
if (partSize < 100) {
console.error("分片大小不能小于100KB")
errCallBack(new Error("分片大小不能小于100KB"))
return
}
// 确保目录以斜杠结尾 try {
if (!dir.endsWith("/")) { // 为保证唯一性,可以通过uuid将文件名替换
// let uuid = uuidv4() + fileName.substring(fileName.lastIndexOf('.'))if (dir.substring(dir.length - 1, 1) !== '/') {
dir += "/" dir += "/"
} const result = client.put(dir + fileName, file)
const uniqueDir = result
dir + Date.now() + "_" + Math.floor(Math.random() * 10000) + "/" .then((res) => {
const key = uniqueDir + fileName console.log(res, "返回文件名和文件地址")
let retryCount = 0
let currentCheckpoint = null
const uploadWithRetry = () => {
client
.multipartUpload(key, file, {
partSize: partSize * 1024, // 转换为字节
checkpoint: currentCheckpoint, // 使用上次的断点信息
progress: function (p, checkpoint) {
currentCheckpoint = checkpoint
console.log(`上传进度: ${p * 100}%`)
}
})
.then((result) => {
const size = const size =
file.size > 1000000 file.size > 1000000
? parseFloat(file.size / 1000000).toFixed(2) + "M" ? parseFloat(file.size / 1000000).toFixed(2) + "M"
: parseFloat(file.size / 1000).toFixed(2) + "KB" : parseFloat(file.size / 1000).toFixed(2) + "KB"
console.log(result.res)
let [aliyunAddress] = result.res.requestUrls
console.log(aliyunAddress, "aliyunAddress")
let url = aliyunAddress.split("?")[0].split("https:")[1]
console.log(url, "url")
successCallback({ successCallback({
attachment: fileName, attachment: fileName,
aliyunAddress: aliyunAddress: res.url,
"https:" + encodeOSSFilename(decodeURIComponent(url)),
size: size size: size
}) })
}) })
.catch((err) => { .catch((err) => {
console.error("分片上传失败", err) errCallBack(err)
if (retryCount < maxRetries) {
retryCount++
console.log(`第${retryCount}次重试上传...`)
setTimeout(() => {
uploadWithRetry()
}, 3000) // 3秒后重试
} else {
errCallBack(err)
}
}) })
} catch (e) {
console.log(e)
} }
const encodeOSSFilename = (filename) => {
// 定义需要转码的特殊字符(包括空格)
const specialChars = '? \\ * | " < > [ ] { } % # & + = ^ ` ~ ; '
// 创建正则表达式匹配所有特殊字符
const escapeRegex = new RegExp(
`[${specialChars.replace(/ /g, "").replace(/(.)/g, "\\$1")}]`,
"g"
)
// 转码函数:将字符转为百分号编码
return filename.replace(escapeRegex, (char) => {
// 获取字符的UTF-8编码
const code = char.charCodeAt(0)
// 空格特殊处理为%20,其他转为大写十六进制
return code === 32 ? "%20" : `%${code.toString(16).toUpperCase()}`
})
}
uploadWithRetry() // 启动上传流程
} }
} }
export default GlOssApi
...@@ -76,8 +76,8 @@ service.interceptors.request.use( ...@@ -76,8 +76,8 @@ service.interceptors.request.use(
const type = Object.prototype.toString.call(config.data) const type = Object.prototype.toString.call(config.data)
const methodList = [ const methodList = [
"dj.api.common.uploadImg", "dj.api.common.uploadImg",
"dj.api.common.ocr.recognition", "dj.api.common.ocr.recognition"
"dj.api.smartcarlife.sms.sendSmsCode" // "dj.api.smartcarlife.sms.sendSmsCode"
] ]
if ( if (
type == "[object Object]" && type == "[object Object]" &&
......
...@@ -352,6 +352,11 @@ export const routerName = { ...@@ -352,6 +352,11 @@ export const routerName = {
authId: "90611", authId: "90611",
name: "申请虚拟账户成本", name: "申请虚拟账户成本",
parentId: "90610" parentId: "90610"
},
{
authId: "90632",
name: "申请虚拟账户成本-通联",
parentId: "90610"
} }
] ]
}, },
...@@ -400,7 +405,7 @@ export const routerName = { ...@@ -400,7 +405,7 @@ export const routerName = {
path: "/applyAccount_new", path: "/applyAccount_new",
name: "applyAccount_new", name: "applyAccount_new",
meta: { meta: {
title: "申请虚拟账户成本", title: "申请银盛&嘀加智慧云虚拟账户",
authId: "90611", authId: "90611",
parentId: "90610", parentId: "90610",
cache: false, cache: false,
...@@ -408,6 +413,18 @@ export const routerName = { ...@@ -408,6 +413,18 @@ export const routerName = {
}, },
component: _import("systemConfig/accountNew/applyAccount") component: _import("systemConfig/accountNew/applyAccount")
}, },
90632: {
path: "/applyAccount_tonglian",
name: "applyAccount_tonglian",
meta: {
title: "申请通联&广联数科虚拟账户",
authId: "90632",
parentId: "90610",
cache: false,
activePath: "/applyAccount_tonglian"
},
component: _import("systemConfig/accountNew/applyAccount_tonglian")
},
90612: { 90612: {
path: "/sceneCategoryManage", path: "/sceneCategoryManage",
name: "sceneCategoryManage", name: "sceneCategoryManage",
......
...@@ -358,7 +358,8 @@ export const routerName = { ...@@ -358,7 +358,8 @@ export const routerName = {
title: "素材配置", title: "素材配置",
authId: "91310", authId: "91310",
parentId: "91309", parentId: "91309",
cache: false cache: false,
activePath: "/packageConfig"
}, },
auth: [], auth: [],
component: _import("contentManager/packageConfig/edit") component: _import("contentManager/packageConfig/edit")
...@@ -370,7 +371,8 @@ export const routerName = { ...@@ -370,7 +371,8 @@ export const routerName = {
title: "配置详情", title: "配置详情",
authId: "91311", authId: "91311",
parentId: "91309", parentId: "91309",
cache: false cache: false,
activePath: "/packageConfig"
}, },
component: _import("contentManager/packageConfig/addEquity") component: _import("contentManager/packageConfig/addEquity")
}, },
......
import { getGoodsCategoryConfiguration } from "@/api/sys.base.js" import { getGoodsCategoryConfiguration } from "@/api/sys.base.js"
import { getAllGoodsList } from "@api/grounding" import { getAllGoodsList } from "@api/grounding"
import { merchantSettleDistributeRuleLastRule } from "@api/shelfManage" import { merchantSettleDistributeRuleLastRule } from "@api/shelfManage"
import { set } from "nprogress" import { paymentChannelList } from "@api/merchant"
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
...@@ -60,7 +60,10 @@ export default { ...@@ -60,7 +60,10 @@ export default {
isLoadingGoods: false, // 加载状态 isLoadingGoods: false, // 加载状态
merchantSettleDistributeRuleLastRule: null, merchantSettleDistributeRuleLastRule: null,
firstLineSunshineOnlinePointsFlag: null, firstLineSunshineOnlinePointsFlag: null,
firstLineSunshine2OnlinePointsFlag: null firstLineSunshine2OnlinePointsFlag: null,
paymentChannelList: [],
isLoadingPaymentChannelList: null,
promiseGetPaymentChannelList: null
}, },
mutations: { mutations: {
/** /**
...@@ -213,6 +216,43 @@ export default { ...@@ -213,6 +216,43 @@ export default {
}) // 清除Promise }) // 清除Promise
} }
}, },
async getPaymentChannelList({ commit, state }) {
if (state.paymentChannelList && state.paymentChannelList.length) {
return state.paymentChannelList
}
// 正在请求,返回现有Promise
if (state.promiseGetPaymentChannelList) {
return state.promiseGetPaymentChannelList
}
try {
commit("SET_LOADING", {
isLoading: true,
name: "isLoadingPaymentChannelList"
})
const promise = paymentChannelList({}) // 替换为你的API调用
commit("SET_PROMISE", {
promise,
name: "promiseGetPaymentChannelList"
})
const response = await promise
console.log(response, "getGoods")
commit("SET_DATA", {
data: response,
name: "paymentChannelList"
})
return response
} finally {
commit("SET_LOADING", {
isLoading: false,
name: "isLoadingPaymentChannelList"
})
commit("SET_PROMISE", {
promise: null,
name: "promiseGetPaymentChannelList"
}) // 清除Promise
}
},
async getMerchantSettleDistributeRuleLastRule({ commit, state }, id) { async getMerchantSettleDistributeRuleLastRule({ commit, state }, id) {
console.log(id, "getMerchantSettleDistributeRuleLastRule") console.log(id, "getMerchantSettleDistributeRuleLastRule")
if (state.merchantSettleDistributeRuleLastRule) { if (state.merchantSettleDistributeRuleLastRule) {
......
...@@ -148,6 +148,8 @@ ...@@ -148,6 +148,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="分账时间" prop="divisionDateStr" align="center" width="160px" /> <el-table-column label="分账时间" prop="divisionDateStr" align="center" width="160px" />
<el-table-column label="支付渠道" prop="paymentChannelName" width="150px" align="center">
</el-table-column>
<el-table-column label="订单支付时间" prop="successDateStr" align="center" width="160px" /> <el-table-column label="订单支付时间" prop="successDateStr" align="center" width="160px" />
<el-table-column label="订单类型" prop="orderType" align="center"> <el-table-column label="订单类型" prop="orderType" align="center">
<!-- goodsOrder.orderType 为null表示空 --> <!-- goodsOrder.orderType 为null表示空 -->
...@@ -171,7 +173,7 @@ import { mapActions, mapState } from 'vuex' ...@@ -171,7 +173,7 @@ import { mapActions, mapState } from 'vuex'
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
import { divisionStatusList, orderTypeList, orderBusinessType } from '@/common/constants.js' import { divisionStatusList, orderTypeList, orderBusinessType } from '@/common/constants.js'
import { getListApi, getCountApi } from '@/api/account' import { getListApi, getCountApi } from '@/api/account'
import { getPlatformMerchantList } from '@api/index' import { getPlatformMerchantList, paymentChannelList } from '@api/index'
// import { asyncExportExcel } from '@api/sys.base' // import { asyncExportExcel } from '@api/sys.base'
export default { export default {
name: 'OnlineAccountList', name: 'OnlineAccountList',
...@@ -188,7 +190,8 @@ export default { ...@@ -188,7 +190,8 @@ export default {
divisionStatus: '', divisionStatus: '',
yqMerchantId: '', yqMerchantId: '',
realityPlatformMerchantId: '', realityPlatformMerchantId: '',
orderType: '' orderType: '',
paymentChannelId: ''
}, },
searchSelectObj: { searchSelectObj: {
orderOrTrade: { orderOrTrade: {
...@@ -273,6 +276,14 @@ export default { ...@@ -273,6 +276,14 @@ export default {
optionId: 'merchantId', optionId: 'merchantId',
optionLabel: 'merchantName', optionLabel: 'merchantName',
optionsName: 'PlatformMerchantList' optionsName: 'PlatformMerchantList'
}, {
label: '支付渠道',
name: 'paymentChannelId',
type: 'select',
optionList: [],
optionId: 'paymentChannelId',
optionLabel: 'paymentChannelName',
optionsName: 'payChannelList'
}], }],
// 表格 // 表格
tableList: [], tableList: [],
...@@ -285,7 +296,8 @@ export default { ...@@ -285,7 +296,8 @@ export default {
parkServiceList: [], parkServiceList: [],
divisionStatusList: deepClone(divisionStatusList), divisionStatusList: deepClone(divisionStatusList),
orderTypeList: deepClone(orderTypeList), orderTypeList: deepClone(orderTypeList),
PlatformMerchantList: [] PlatformMerchantList: [],
payChannelList: []
} }
} }
}, },
...@@ -298,6 +310,7 @@ export default { ...@@ -298,6 +310,7 @@ export default {
mounted() { mounted() {
// this.searchForm.divisionDate = getCurrentSixMonth() // this.searchForm.divisionDate = getCurrentSixMonth()
this.paymentChannelList()
this.userInfo.beSuper && getParkStore({}).then(res => { this.userInfo.beSuper && getParkStore({}).then(res => {
res.forEach(item => { res.forEach(item => {
item.merchantId = item.merchantNo item.merchantId = item.merchantNo
...@@ -408,7 +421,8 @@ export default { ...@@ -408,7 +421,8 @@ export default {
divisionDate: '', divisionDate: '',
divisionStatus: '', divisionStatus: '',
yqMerchantId: '', yqMerchantId: '',
realityPlatformMerchantId: '' realityPlatformMerchantId: '',
paymentChannelId: ''
} }
this.searchSelectObj = { this.searchSelectObj = {
orderOrTrade: { orderOrTrade: {
...@@ -463,6 +477,12 @@ export default { ...@@ -463,6 +477,12 @@ export default {
this.actionSetDownloadList({ list, type: 'dowloadList' }) this.actionSetDownloadList({ list, type: 'dowloadList' })
// this.handleClose() // this.handleClose()
// }) // })
},
paymentChannelList() {
paymentChannelList({}).then(res => {
this.baseData.payChannelList = res
})
} }
} }
} }
......
...@@ -6,27 +6,35 @@ ...@@ -6,27 +6,35 @@
</div> </div>
<div style="padding: 20px"> <div style="padding: 20px">
<el-form ref="divisionRuleRef" :model="financialObj" label-suffix=":" label-width="154px"> <el-form ref="divisionRuleRef" :model="financialObj" label-suffix=":" label-width="154px">
<el-form-item label="" prop="autoFlag"> <el-form-item class="settlementTimeMethod" label="" prop=""
<span class="tips-block" slot="label"> v-for="(item, index) in financialObj.divisionRuleAutos" :key="index">
<span class="tips-label">线上自动分账</span> <span class="payChannel" slot="label">
<el-tooltip popper-class="tooltip-class" effect="dark" content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。" <span class="">
placement="top"> {{ item.paymentChannelName }}
<span class="tips-icon" /> </el-tooltip>: </span>
</span>
<el-switch v-model="financialObj.autoFlag" active-value="Y" disabled inactive-value="N" />
</el-form-item>
<el-form-item label="结算时间方式">
<span class="tips-block" slot="label">
<span class="tips-label">分账周期</span>
<el-tooltip popper-class="tooltip-class" effect="dark" content="用户支付的款项可按T+1或指定日自动打款给商户。" placement="top">
<span class="tips-icon" /> </el-tooltip>:
</span> </span>
<div class="block_item" style="margin-bottom: 20px"> <el-form-item label="" prop="autoFlag">
<span> <span class="tips-block" slot="label">
分账周期 T+{{ settleTimeObj.first }}日 <span class="tips-label">线上自动分账</span>
<span v-show="financialObj.settleTimeType == 1">(分账后第2天到分账方对公账户)</span> <el-tooltip popper-class="tooltip-class" effect="dark" content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
placement="top">
<span class="tips-icon" /> </el-tooltip>:
</span> </span>
</div> <el-switch class="switch" v-model="item.autoFlag" active-value="Y" disabled inactive-value="N" />
</el-form-item>
<el-form-item label="结算时间方式">
<span class="tips-block" slot="label">
<span class="tips-label">分账周期</span>
<el-tooltip popper-class="tooltip-class" effect="dark" content="用户支付的款项可按T+1或指定日自动打款给商户。" placement="top">
<span class="tips-icon" /> </el-tooltip>:
</span>
<span class="block_item" style="margin-bottom: 20px">
<span>
分账周期 T+{{ item.settleTime }}日
<span v-show="item.settleTimeType == 1">(分账后第2天到分账方对公账户)</span>
</span>
</span>
</el-form-item>
</el-form-item> </el-form-item>
<el-form-item label="流量方分账方"> <el-form-item label="流量方分账方">
<span>{{ financialObj.realityShopMerchantName }}</span> <span>{{ financialObj.realityShopMerchantName }}</span>
...@@ -73,7 +81,7 @@ ...@@ -73,7 +81,7 @@
</el-form> </el-form>
</div> </div>
<tableAccount ref="tableAccount" :merchant-distribution-rules="financialObj.goodsTypeGroupRules[editableTabsValue - 1] <tableAccount ref="tableAccount" :merchant-distribution-rules="financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.merchantDistributionRules .merchantDistributionRules
" "
:owningMerchantDistributionRules="financialObj.goodsTypeGroupRules[editableTabsValue - 1].owningMerchantDistributionRules" :owningMerchantDistributionRules="financialObj.goodsTypeGroupRules[editableTabsValue - 1].owningMerchantDistributionRules"
:table-select-options="tableSelectOptions" :classification-obj-select="tableClassificationObjSelect" /> :table-select-options="tableSelectOptions" :classification-obj-select="tableClassificationObjSelect" />
...@@ -347,5 +355,17 @@ export default { ...@@ -347,5 +355,17 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.settlementTimeMethod {
::v-deep.el-form-item__content {
display: flex;
// align-items: center;
flex-wrap: wrap;
}
.switch {
margin-top: 5px;
}
}
@import "../../style/editdetailCon.scss"; @import "../../style/editdetailCon.scss";
</style> </style>
...@@ -6,8 +6,43 @@ ...@@ -6,8 +6,43 @@
<el-button icon="el-icon-plus" type="primary" size="small" plain v-if="addVisible" @click="addTab">新增</el-button> <el-button icon="el-icon-plus" type="primary" size="small" plain v-if="addVisible" @click="addTab">新增</el-button>
</div> </div>
<div class="publicContainer"> <div class="publicContainer">
<el-form ref="divisionRuleRef" :model="financialObj" :rules="rules" label-suffix=":" label-width="180px"> <el-form ref="divisionRuleRef" class="divisionRuleRef" :model="financialObj" :rules="rules" label-suffix=":"
<el-form-item label="" prop="autoFlag"> label-width="180px">
<el-form-item label="" prop="" v-for="(item, index) in financialObj.divisionRuleAutos" :key="index">
<span class="payChannel" slot="label">
<span class="">
{{ item.paymentChannelName }}
</span>
</span>
<el-form-item label="" prop="autoFlag">
<span class="tips-block" slot="label">
<span class="tips-label">线上自动分账</span>
<el-tooltip popper-class="tooltip-class" effect="dark" content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
placement="top">
<span class="tips-icon" /> </el-tooltip>:
</span>
<el-switch class="switch" v-model="item.autoFlag" active-value="Y" inactive-value="N" />
</el-form-item>
<el-form-item label="结算时间方式" prop="settleTimeType">
<span class="tips-block" slot="label">
<span class="tips-label">分账周期</span>
<el-tooltip popper-class="tooltip-class" effect="dark" content="用户支付的款项可按T+1或指定日自动打款给商户。" placement="top">
<span class="tips-icon" /> </el-tooltip>:
</span>
<el-radio-group v-model="item.settleTimeType" :disabled="item.autoFlag === 'N'">
<div class="block_item" style="margin-bottom: 20px">
<el-radio :label="1">
分账周期 T+
<el-input-number v-model="item.settleTime" controls-position="right" size="small" :min="0" :max="20"
:disabled="item.autoFlag === 'N'" />
日
<span v-show="item.settleTimeType == 1">(分账后第2天到分账方对公账户)</span>
</el-radio>
</div>
</el-radio-group>
</el-form-item>
</el-form-item>
<!-- <el-form-item label="" prop="autoFlag">
<span class="tips-block" slot="label"> <span class="tips-block" slot="label">
<span class="tips-label">线上自动分账</span> <span class="tips-label">线上自动分账</span>
<el-tooltip popper-class="tooltip-class" effect="dark" content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。" <el-tooltip popper-class="tooltip-class" effect="dark" content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
...@@ -33,7 +68,7 @@ ...@@ -33,7 +68,7 @@
</el-radio> </el-radio>
</div> </div>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item> -->
<!-- <el-form-item label="流量方分账方" prop="realityShopMerchantId" required> <!-- <el-form-item label="流量方分账方" prop="realityShopMerchantId" required>
<el-select v-model="financialObj.realityShopMerchantId" placeholder="请选择流量方分账方"> <el-select v-model="financialObj.realityShopMerchantId" placeholder="请选择流量方分账方">
<el-option v-for="item in baseData.merchantLevelList" :key="item.merchantId" :label="item.showMerchantName" <el-option v-for="item in baseData.merchantLevelList" :key="item.merchantId" :label="item.showMerchantName"
...@@ -144,7 +179,8 @@ export default { ...@@ -144,7 +179,8 @@ export default {
multiPlatformMerchantFlag: "N", // 是否多平台 multiPlatformMerchantFlag: "N", // 是否多平台
goodsTypeGroupRules: [], goodsTypeGroupRules: [],
partnerMerchantId: "", partnerMerchantId: "",
partnerMerchantName: "" partnerMerchantName: "",
divisionRuleAutos: []
}, },
// 结算周期 // 结算周期
settleTimeObj: { settleTimeObj: {
...@@ -338,6 +374,7 @@ export default { ...@@ -338,6 +374,7 @@ export default {
}, },
mounted() { mounted() {
this.getGoodsCategoryConfigurationData() // 商品分类 this.getGoodsCategoryConfigurationData() // 商品分类
this.initPaymentChannelList()
// 平台方 // 平台方
// this.$EventBus.$on("shelfUpdateContractMer", (obj) => { // this.$EventBus.$on("shelfUpdateContractMer", (obj) => {
// this.$set(this.financialObj, "realityPlatformMerchantId", obj.merchantId) // this.$set(this.financialObj, "realityPlatformMerchantId", obj.merchantId)
...@@ -359,7 +396,8 @@ export default { ...@@ -359,7 +396,8 @@ export default {
...mapActions("goodsInfoData", [ ...mapActions("goodsInfoData", [
"getGoodsCategoryConfiguration", "getGoodsCategoryConfiguration",
"getGoods", "getGoods",
"getMerchantSettleDistributeRuleLastRule" "getMerchantSettleDistributeRuleLastRule",
"getPaymentChannelList"
]), ]),
...mapMutations("FinancialRules", ["toggle", "set4sService"]), ...mapMutations("FinancialRules", ["toggle", "set4sService"]),
initDjzhySubMerchant() { initDjzhySubMerchant() {
...@@ -372,6 +410,23 @@ export default { ...@@ -372,6 +410,23 @@ export default {
} }
}) })
}, },
async initPaymentChannelList() {
// paymentChannelList().then((res) => {
// console.log(res, "paymentChannelList")
const res = await this.getPaymentChannelList()
console.log(res, 'initPaymentChannelList')
this.financialObj.divisionRuleAutos = res.map(item => {
return {
paymentChannelId: item.paymentChannelId,
paymentChannelName: item.paymentChannelName,
autoFlag: "N", // 自动分账标识(Y是,N否)
settleTimeType: 1, // 分账时间方式(1:T+1,2:每月)
settleTime: "" // 分账时间每月几号
}
})
// this.paymentChannelList = res
// })
},
initFinancialObj(merchantId) { initFinancialObj(merchantId) {
// 先取默认值 // 先取默认值
this.financialObj = Object.assign(this.financialObj, { this.financialObj = Object.assign(this.financialObj, {
...@@ -488,6 +543,18 @@ export default { ...@@ -488,6 +543,18 @@ export default {
result = result?.merchantSettleDistributeRule || this.financialObj result = result?.merchantSettleDistributeRule || this.financialObj
result.autoFlag = result.autoFlag ? result.autoFlag : "N" result.autoFlag = result.autoFlag ? result.autoFlag : "N"
result.settleTimeType = result.settleTimeType ? result.settleTimeType : 1 result.settleTimeType = result.settleTimeType ? result.settleTimeType : 1
if (result?.divisionRuleAutos.length) {
console.log()
const list = []
this.financialObj.divisionRuleAutos.forEach((item) => {
const findItem = result.divisionRuleAutos.find(item2 => item.paymentChannelId == item2.paymentChannelId)
list.push(findItem || item)
})
console.log('result.divisionRuleAutos', list)
result.divisionRuleAutos = list
} else {
result.divisionRuleAutos = deepClone(this.financialObj.divisionRuleAutos)
}
result.realityShopLevel = result?.realityShopLevel || 1 result.realityShopLevel = result?.realityShopLevel || 1
result && result.divisionRuleId && (this.financialObj = result) result && result.divisionRuleId && (this.financialObj = result)
result.multiPlatformMerchantFlag = result.multiPlatformMerchantFlag || "N" result.multiPlatformMerchantFlag = result.multiPlatformMerchantFlag || "N"
...@@ -1490,7 +1557,30 @@ export default { ...@@ -1490,7 +1557,30 @@ export default {
@import "../../style/editdetailCon.scss"; @import "../../style/editdetailCon.scss";
.publicContainer { .publicContainer {
// display: flex;
margin: 20px; margin: 20px;
.divisionRuleRef {
::v-deep.el-form-item__content {
display: flex;
}
}
.payChannel {
display: inline-block;
width: 200px;
height: 32px;
opacity: 1;
background: #f5f7fa;
text-align: center;
line-height: 32px;
color: #333333;
font-size: 14px;
}
.switch {
margin-top: 8px;
}
} }
.title { .title {
......
...@@ -2,8 +2,19 @@ ...@@ -2,8 +2,19 @@
<template> <template>
<d2-container class="order-list m-t-40"> <d2-container class="order-list m-t-40">
<div class="header" slot="header"> <div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'150px'" <d2-search ref="showSearch"
:form-data="showFormData" /> class="show-search"
:search-form="searchForm"
:label-width="'150px'"
:form-data="showFormData">
<template slot="goodsCascader">
<el-cascader :options="baseData.productTypeList" style="width: 100%;"
v-model="tempGoodsType" :placeholder="'请选择'" filterable
@change="selectAddAttr($event)" clearable
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader>
</template>
</d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
查询 查询
...@@ -110,6 +121,29 @@ ...@@ -110,6 +121,29 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品类目" align="center" width="180" prop="goodsTypeName">
<template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p>
<el-tooltip
class="item"
:content="getGoodsTypeName(item)"
placement="right"
>
<span>
{{
getGoodsTypeName(item)
? getGoodsTypeName(item).length > 10
? getGoodsTypeName(item).substring(0, 10) + "..."
: getGoodsTypeName(item)
: "-"
}}
</span>
</el-tooltip>
</p>
</span>
</template>
</el-table-column>
<el-table-column label="商品别名" align="center" width="180" prop="subOrderList"> <el-table-column label="商品别名" align="center" width="180" prop="subOrderList">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index"> <span v-for="(item, index) in scope.row.subOrderList" :key="index">
...@@ -314,6 +348,7 @@ import { getParkStore } from "@api/editCustomer" ...@@ -314,6 +348,7 @@ import { getParkStore } from "@api/editCustomer"
import chooseRuleDialog from './chooseRuleDialog' import chooseRuleDialog from './chooseRuleDialog'
import ruleInfoDialog from './ruleInfoDialog' import ruleInfoDialog from './ruleInfoDialog'
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { getAllCategory } from '@api/product'
export default { export default {
name: "CarDamage", name: "CarDamage",
components: { components: {
...@@ -571,6 +606,10 @@ export default { ...@@ -571,6 +606,10 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'zyVoucherStatusOpt' optionsName: 'zyVoucherStatusOpt'
}, {
label: "商品类目",
name: "goodsType",
addHtml: "goodsCascader"
} }
], ],
searchForm: { searchForm: {
...@@ -592,7 +631,10 @@ export default { ...@@ -592,7 +631,10 @@ export default {
invoiceStatus: '', invoiceStatus: '',
salesType: '', salesType: '',
zyVoucherStatus: '', zyVoucherStatus: '',
profitAllocationStatus: '' profitAllocationStatus: '',
goodsType: '',
secondaryGoodsType: '',
thirdLevelGoodsType: '',
}, },
baseData: { baseData: {
orderStatusList: [ orderStatusList: [
...@@ -734,7 +776,8 @@ export default { ...@@ -734,7 +776,8 @@ export default {
confLabel: '售后' confLabel: '售后'
} }
], ],
zyVoucherStatusOpt: Util.deepClone(zyVoucherStatusOpt) zyVoucherStatusOpt: Util.deepClone(zyVoucherStatusOpt),
productTypeList: []
}, },
tableData: [], tableData: [],
total: 0, total: 0,
...@@ -748,7 +791,8 @@ export default { ...@@ -748,7 +791,8 @@ export default {
subShopMerchanShowHide: true, subShopMerchanShowHide: true,
ruleVisible: false, ruleVisible: false,
recordInfo: null, recordInfo: null,
ruleInfoVisible: false ruleInfoVisible: false,
tempGoodsType: []
} }
}, },
computed: { computed: {
...@@ -811,6 +855,10 @@ export default { ...@@ -811,6 +855,10 @@ export default {
this.getList() this.getList()
this.getOrderCount() this.getOrderCount()
this.getProvinceList() this.getProvinceList()
// 获取全部类目
getAllCategory({ pageSize: 9999, currentPage: 1 }).then(res => {
this.baseData.productTypeList = res?.list || []
})
}, },
watch: { watch: {
updateRefesh(val) { updateRefesh(val) {
...@@ -843,6 +891,18 @@ export default { ...@@ -843,6 +891,18 @@ export default {
this.baseData.channelTypeList = await this.get(BaseData.channelType) this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList() this.getOptionsList()
}, },
selectAddAttr(value) {
this.searchForm.goodsType = value?.[0]
this.searchForm.secondaryGoodsType = value?.[1]
this.searchForm.thirdLevelGoodsType = value?.[2]
},
getGoodsTypeName(item) {
const { upgradeGoodsTypeName, upgradeSecondaryGoodsTypeName, upgradeThirdLevelGoodsTypeName } = item || {}
const types = [upgradeGoodsTypeName, upgradeSecondaryGoodsTypeName, upgradeThirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
return result
},
getAllServiceStore() { getAllServiceStore() {
listShop4sByRef({ listShop4sByRef({
scene: 0 scene: 0
...@@ -956,6 +1016,7 @@ export default { ...@@ -956,6 +1016,7 @@ export default {
zyVoucherStatus: '', zyVoucherStatus: '',
profitAllocationStatus: '' profitAllocationStatus: ''
} }
this.tempGoodsType = []
// this.baseData.storeIdList = [] // this.baseData.storeIdList = []
this.handleSearch() this.handleSearch()
this.getAllServiceStore() this.getAllServiceStore()
...@@ -1024,7 +1085,7 @@ export default { ...@@ -1024,7 +1085,7 @@ export default {
} }
// 去除为null的值 // 去除为null的值
for (const key in params) { for (const key in params) {
if (params[key] === null || params[key] === '' || params[key].length == 0) { if (params[key] === null || params[key] === '' || params[key]?.length == 0) {
delete params[key] delete params[key]
} }
} }
......
...@@ -2,8 +2,21 @@ ...@@ -2,8 +2,21 @@
<template> <template>
<d2-container class="order-list m-t-40"> <d2-container class="order-list m-t-40">
<div class="header" slot="header"> <div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'150px'" <d2-search
:form-data="showFormData" /> ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'150px'"
:form-data="showFormData"
>
<template slot="goodsCascader">
<el-cascader :options="baseData.productTypeList" style="width: 100%;"
v-model="tempGoodsType" :placeholder="'请选择'" filterable
@change="selectAddAttr($event)" clearable
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader>
</template>
</d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
查询 查询
...@@ -130,6 +143,29 @@ ...@@ -130,6 +143,29 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品类目" align="center" width="180" prop="goodsTypeName">
<template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p>
<el-tooltip
class="item"
:content="getGoodsTypeName(item)"
placement="right"
>
<span>
{{
getGoodsTypeName(item)
? getGoodsTypeName(item).length > 10
? getGoodsTypeName(item).substring(0, 10) + "..."
: getGoodsTypeName(item)
: "-"
}}
</span>
</el-tooltip>
</p>
</span>
</template>
</el-table-column>
<el-table-column label="部位" align="center" width="150" prop="subOrderList"> <el-table-column label="部位" align="center" width="150" prop="subOrderList">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index"> <span v-for="(item, index) in scope.row.subOrderList" :key="index">
...@@ -324,6 +360,7 @@ import { mapActions, mapState, mapMutations } from "vuex" ...@@ -324,6 +360,7 @@ import { mapActions, mapState, mapMutations } from "vuex"
import { getParkStore } from "@api/editCustomer" import { getParkStore } from "@api/editCustomer"
import chooseRuleDialog from "./chooseRuleDialog" import chooseRuleDialog from "./chooseRuleDialog"
import ruleInfoDialog from "./ruleInfoDialog" import ruleInfoDialog from "./ruleInfoDialog"
import { getAllCategory } from '@api/product'
export default { export default {
name: "OrderList", name: "OrderList",
components: { components: {
...@@ -564,6 +601,11 @@ export default { ...@@ -564,6 +601,11 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confLabel", optionLabel: "confLabel",
optionsName: "salesTypeList" optionsName: "salesTypeList"
},
{
label: "商品类目",
name: "goodsType",
addHtml: "goodsCascader"
} }
], ],
searchForm: { searchForm: {
...@@ -583,7 +625,10 @@ export default { ...@@ -583,7 +625,10 @@ export default {
paySuccessDate: "", paySuccessDate: "",
provinceId: "", provinceId: "",
invoiceStatus: "", invoiceStatus: "",
salesType: "" salesType: "",
goodsType: '',
secondaryGoodsType: '',
thirdLevelGoodsType: '',
}, },
baseData: { baseData: {
orderStatusList: [ orderStatusList: [
...@@ -712,7 +757,8 @@ export default { ...@@ -712,7 +757,8 @@ export default {
confId: "1", confId: "1",
confLabel: "售后" confLabel: "售后"
} }
] ],
productTypeList: []
}, },
tableData: [], tableData: [],
total: 0, total: 0,
...@@ -745,7 +791,8 @@ export default { ...@@ -745,7 +791,8 @@ export default {
name: "fields", name: "fields",
addHtml: "fieldsHtml" addHtml: "fieldsHtml"
} }
] ],
tempGoodsType: []
} }
}, },
computed: { computed: {
...@@ -806,6 +853,10 @@ export default { ...@@ -806,6 +853,10 @@ export default {
this.getList() this.getList()
this.getOrderCount() this.getOrderCount()
this.getProvinceList() this.getProvinceList()
// 获取全部类目
getAllCategory({ pageSize: 9999, currentPage: 1 }).then(res => {
this.baseData.productTypeList = res?.list || []
})
}, },
watch: { watch: {
updateRefesh(val) { updateRefesh(val) {
...@@ -841,6 +892,19 @@ export default { ...@@ -841,6 +892,19 @@ export default {
this.getOptionsList() this.getOptionsList()
}, },
selectAddAttr(value) {
this.searchForm.goodsType = value?.[0]
this.searchForm.secondaryGoodsType = value?.[1]
this.searchForm.thirdLevelGoodsType = value?.[2]
},
getGoodsTypeName(item) {
const { upgradeGoodsTypeName, upgradeSecondaryGoodsTypeName, upgradeThirdLevelGoodsTypeName } = item || {}
const types = [upgradeGoodsTypeName, upgradeSecondaryGoodsTypeName, upgradeThirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
return result
},
handleImport() { handleImport() {
this.fileVisible = !this.fileVisible this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields() this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
...@@ -928,7 +992,9 @@ export default { ...@@ -928,7 +992,9 @@ export default {
provinceId: "", provinceId: "",
invoiceStatus: "" invoiceStatus: ""
} }
this.tempGoodsType = []
// this.baseData.storeIdList = [] // this.baseData.storeIdList = []
this.handleSearch()
this.getOptionsList() this.getOptionsList()
}, },
getServiceStore(merchantIds) { getServiceStore(merchantIds) {
...@@ -1018,7 +1084,7 @@ export default { ...@@ -1018,7 +1084,7 @@ export default {
if ( if (
params[key] === null || params[key] === null ||
params[key] === "" || params[key] === "" ||
params[key].length == 0 params[key]?.length == 0
) { ) {
delete params[key] delete params[key]
} }
......
...@@ -4,16 +4,26 @@ ...@@ -4,16 +4,26 @@
<!-- class="order-detail" --> <!-- class="order-detail" -->
<d2-container> <d2-container>
<!-- <div class="offline-account"> --> <!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px;"> <div class="header"
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :search-select-obj="searchSelectObj" :form-data="showFormData" /> slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:search-select-obj="searchSelectObj"
:form-data="showFormData" />
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch"
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> <el-button size="small"
@click="handleReset">
重置 重置
</el-button> </el-button>
<el-button size="small" @click="handleRecord"> <el-button size="small"
@click="handleRecord">
返回 返回
</el-button> </el-button>
</div> </div>
...@@ -22,10 +32,16 @@ ...@@ -22,10 +32,16 @@
<d2-container> --> <d2-container> -->
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="13"> <d2-table-header :left-span="13">
<span slot="left" class="leftSpan">共<span class="count-txt">{{ countObj.totalCount }}</span>条交易记录,总金额<span class="count-txt">{{ countObj.totalAmount }}</span>元,已补录<span class="count-txt">{{ countObj.inputtedCount <span slot="left"
}}</span>条,未补录<span class="count-txt">{{ countObj.waitInputCount }}</span>条,未关联<span class="count-txt">{{ class="leftSpan">共<span
class="count-txt">{{ countObj.totalCount }}</span>条交易记录,总金额<span
class="count-txt">{{ countObj.totalAmount }}</span>元,已补录<span class="count-txt">{{ countObj.inputtedCount
}}</span>条,未补录<span
class="count-txt">{{ countObj.waitInputCount }}</span>条,未关联<span
class="count-txt">{{
countObj.notAssociatedCount }}</span>条,无需补录<span class="count-txt">{{ countObj.needNoSupplementCount countObj.notAssociatedCount }}</span>条,无需补录<span class="count-txt">{{ countObj.needNoSupplementCount
}}</span>条,待确认补录<span class="count-txt">{{ countObj.waitConfirmInputCount }}</span>条。</span> }}</span>条,待确认补录<span
class="count-txt">{{ countObj.waitConfirmInputCount }}</span>条。</span>
<!-- <el-button type="primary" @click="batchRecord"> <!-- <el-button type="primary" @click="batchRecord">
批量确认补录 批量确认补录
</el-button> --> </el-button> -->
...@@ -39,16 +55,28 @@ ...@@ -39,16 +55,28 @@
<el-button type="primary" @click="handleExport"> <el-button type="primary" @click="handleExport">
导出 导出
</el-button> --> </el-button> -->
<auth-button :show-btn-ids="['9040206', '9040201', '9040202', '9040203', '9040205']" category="Button" /> <auth-button :show-btn-ids="['9040206', '9040201', '9040202', '9040203', '9040205']"
category="Button" />
</d2-table-header> </d2-table-header>
<!-- :beforeSearchFn="beforeSearchFn" --> <!-- :beforeSearchFn="beforeSearchFn" -->
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn" :selectable-fn="selectableFn" @setTableFinishFun="setTableFinishFun"> <d2-table ref="recordTable"
<div slot="inputtedOrderCode" slot-scope="scope"> :get-list-api="getListApi"
<div v-for="(item, idx) in scope.scope.inputtedOrderCodeList" :key="idx"> :search-form="searchFormSearch"
<span class="code-link" @click="orderDetail(scope.scope)">{{item}}</span> :table-params="tableParams"
<span v-if="idx != (scope.scope.inputtedOrderCodeList.length - 1)">,</span></div> :before-search-fn="beforeSearchFn"
:selectable-fn="selectableFn"
@setTableFinishFun="setTableFinishFun">
<div slot="inputtedOrderCode"
slot-scope="scope">
<div v-for="(item, idx) in scope.scope.inputtedOrderCodeList"
:key="idx">
<span class="code-link"
@click="orderDetail(scope.scope)">{{ item }}</span>
<span v-if="idx != (scope.scope.inputtedOrderCodeList.length - 1)">,</span>
</div>
</div> </div>
<template slot="auth-button" slot-scope="scope"> <template slot="auth-button"
slot-scope="scope">
<!-- 已分帐无可操作内容 --> <!-- 已分帐无可操作内容 -->
<div v-if="scope.scope.distributeStatus != '1'"> <div v-if="scope.scope.distributeStatus != '1'">
<!-- <el-button type="text" v-if="scope.scope.inputStatus == '1'" @click="orderDetail(scope.scope)"> <!-- <el-button type="text" v-if="scope.scope.inputStatus == '1'" @click="orderDetail(scope.scope)">
...@@ -95,15 +123,31 @@ ...@@ -95,15 +123,31 @@
</div> </div>
</d2-container> </d2-container>
<!-- 批量修改所属园区店 --> <!-- 批量修改所属园区店 -->
<update-yqMerchant-dialog :merchant-visible="merchantDialogVisible" :id-list="ids" v-if="merchantDialogVisible" @dialogClose="dialogClose" /> <update-yqMerchant-dialog :merchant-visible="merchantDialogVisible"
:id-list="ids"
v-if="merchantDialogVisible"
@dialogClose="dialogClose" />
<!-- 关联活动订单 --> <!-- 关联活动订单 -->
<relat-activity-order-dialog :relat-activity-visible="relatActivityVisible" :order-id="orderId" v-if="relatActivityVisible" @dialogClose="relatDialogClose" /> <relat-activity-order-dialog :relat-activity-visible="relatActivityVisible"
:order-id="orderId"
v-if="relatActivityVisible"
@dialogClose="relatDialogClose" />
<!-- 选择分账规则 --> <!-- 选择分账规则 -->
<choose-rule-dialog :rule-visible="ruleVisible" :record-info="recordInfo" v-if="ruleVisible" @dialogClose="ruleDialogClose" /> <choose-rule-dialog :rule-visible="ruleVisible"
:record-info="recordInfo"
v-if="ruleVisible"
@dialogClose="ruleDialogClose" />
<!-- 选择分账规则 --> <!-- 选择分账规则 -->
<rule-info-dialog :rule-info-visible="ruleInfoVisible" :record-info="recordInfo" v-if="ruleInfoVisible" @dialogClose="ruleInfoDialogClose" /> <rule-info-dialog :rule-info-visible="ruleInfoVisible"
:record-info="recordInfo"
v-if="ruleInfoVisible"
@dialogClose="ruleInfoDialogClose" />
<!-- 发起退款 --> <!-- 发起退款 -->
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible" :order-list="infoList" :order-type="2" v-if="signRefundVisible" @dialogClose="refundDialogClose" /> <new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
:order-list="infoList"
:order-type="2"
v-if="signRefundVisible"
@dialogClose="refundDialogClose" />
</div> </div>
</template> </template>
...@@ -119,6 +163,7 @@ import relatActivityOrderDialog from './relatActivityOrderDialog' ...@@ -119,6 +163,7 @@ import relatActivityOrderDialog from './relatActivityOrderDialog'
import chooseRuleDialog from './chooseRuleDialog' import chooseRuleDialog from './chooseRuleDialog'
import ruleInfoDialog from './ruleInfoDialog' import ruleInfoDialog from './ruleInfoDialog'
import newSignRefundDialog from './components/newSignRefundDialog' import newSignRefundDialog from './components/newSignRefundDialog'
import { paymentChannelList } from '@api/index'
const clonePayTypeList = deepClone(payTypeList) const clonePayTypeList = deepClone(payTypeList)
clonePayTypeList.splice(1, 1) clonePayTypeList.splice(1, 1)
export default { export default {
...@@ -143,7 +188,8 @@ export default { ...@@ -143,7 +188,8 @@ export default {
payType: '', payType: '',
shopMerchantId: '', shopMerchantId: '',
distributeStatus: '', distributeStatus: '',
refundStatus: '' refundStatus: '',
paymentChannelId: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
searchSelectObj: { searchSelectObj: {
...@@ -251,6 +297,14 @@ export default { ...@@ -251,6 +297,14 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'refundStatusList' optionsName: 'refundStatusList'
}, {
label: '支付渠道',
name: 'paymentChannelId',
type: 'select',
optionList: [],
optionId: 'paymentChannelId',
optionLabel: 'paymentChannelName',
optionsName: 'payChannelList'
}], }],
getListApi: waitinputorderPage, getListApi: waitinputorderPage,
tableParams: { tableParams: {
...@@ -281,6 +335,10 @@ export default { ...@@ -281,6 +335,10 @@ export default {
return cellValue.accountDate ? Util.dateFormate(cellValue.accountDate, 'YYYY-MM-DD HH:mm:ss') : '' return cellValue.accountDate ? Util.dateFormate(cellValue.accountDate, 'YYYY-MM-DD HH:mm:ss') : ''
} }
}, { }, {
label: '支付渠道',
prop: 'paymentChannelName',
width: '150px'
}, {
label: '收款来源', label: '收款来源',
prop: 'payType', prop: 'payType',
width: '100px', width: '100px',
...@@ -415,7 +473,8 @@ export default { ...@@ -415,7 +473,8 @@ export default {
}, { }, {
confId: '2', confId: '2',
confLabel: '已退款' confLabel: '已退款'
}] }],
payChannelList: []
}, },
merchantDialogVisible: false, merchantDialogVisible: false,
...@@ -435,6 +494,7 @@ export default { ...@@ -435,6 +494,7 @@ export default {
}) })
}, },
mounted() { mounted() {
this.paymentChannelList()
this.getAllServiceStore() this.getAllServiceStore()
this.userInfo.beSuper && getParkStore({}).then(res => { this.userInfo.beSuper && getParkStore({}).then(res => {
res.forEach(item => { res.forEach(item => {
...@@ -520,7 +580,8 @@ export default { ...@@ -520,7 +580,8 @@ export default {
payType: '', payType: '',
shopMerchantId: '', shopMerchantId: '',
distributeStatus: '', distributeStatus: '',
refundStatus: '' refundStatus: '',
paymentChannelId: ''
} }
this.searchSelectObj = { this.searchSelectObj = {
orderOrTrade: { orderOrTrade: {
...@@ -845,6 +906,12 @@ export default { ...@@ -845,6 +906,12 @@ export default {
if (flag) { if (flag) {
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
} }
},
paymentChannelList() {
paymentChannelList({}).then(res => {
this.baseData.payChannelList = res
})
} }
} }
} }
......
<template> <template>
<d2-dialog title="收款二维码" <d2-dialog title="收款二维码" :is-visible="qRcodeVisible" class="qRcodeDailog" width="750px" btn-ok-label="全部下载"
:is-visible="qRcodeVisible" @closeDialog="handleClose" @confirmDialog="handleAddConfirm">
class="qRcodeDailog" <div class="channelBox">
width="750px" <span>支付渠道: </span>
btn-ok-label="全部下载" <el-select v-model="paymentChannelId" placeholder="请选择" class="elSelect">
@closeDialog="handleClose" <el-option v-for="item in paymentChannelList" :key="item.paymentChannelId" :label="item.paymentChannelName"
@confirmDialog="handleAddConfirm"> :value="item.paymentChannelId">
</el-option>
</el-select>
<el-button type="primary" @click="savaAll">保存并重新生成</el-button>
</div>
<div class="qrcon"> <div class="qrcon">
<div class="wxcon"> <div class="wxcon">
<div class="codeDiv" <div class="codeDiv" id="wxview">
id="wxview"> <img style="width:100%;height:100%" src="../../images/code3.png">
<img style="width:100%;height:100%"
src="../../images/code3.png">
<!-- v-if="qrCodeURL" <div class="imgDiv"> --> <!-- v-if="qrCodeURL" <div class="imgDiv"> -->
<img v-if="qrCodeURL" <img v-if="qrCodeURL" class="qrImg" crossorigin="anonymous" :src="qrCodeURL">
class="qrImg"
crossorigin="anonymous"
:src="qrCodeURL">
<!-- crossorigin="anonymous" --> <!-- crossorigin="anonymous" -->
<div v-if="!qrCodeURL" <div v-if="!qrCodeURL" class="el-icon-loading loadingIcon" />
class="el-icon-loading loadingIcon" />
<!-- </div> --> <!-- </div> -->
<div class="merchantNameDiv">{{ info.merchantName }}</div> <div class="merchantNameDiv">{{ info.merchantName }}</div>
</div> </div>
<el-button style="marginTop:20px" <el-button style="marginTop:20px" type="primary "
type="primary " @click="takeScreenshot('wxview', `${info.merchantName}微信支付收款码`)">下载</el-button>
@click="takeScreenshot('wxview', `${info.merchantName}微信支付收款码`)">下载</el-button>
</div> </div>
<div class="alicon"> <div class="alicon">
<div class="codeDiv" <div class="codeDiv" id="aliview">
id="aliview"> <img style="width:100%;height:100%" src="../../images/alipay.png">
<img style="width:100%;height:100%"
src="../../images/alipay.png">
<!-- <img v-if="aliqrCodeURL" <!-- <img v-if="aliqrCodeURL"
class="qrImg imgs" class="qrImg imgs"
:src="aliqrCodeURL" :src="aliqrCodeURL"
crossorigin="anonymous"> --> crossorigin="anonymous"> -->
<div id="qrcodeDiv" <div id="qrcodeDiv" class="qrImg" />
class="qrImg" />
<!-- --> <!-- -->
<!-- :src="aliqrCodeURL"> --> <!-- :src="aliqrCodeURL"> -->
<div v-if="!aliqrCodeURL" <div v-if="!aliqrCodeURL" class="el-icon-loading loadingIcon" />
class="el-icon-loading loadingIcon" />
<!-- </div> --> <!-- </div> -->
<div class="merchantNameDiv">{{ info.merchantName }}</div> <div class="merchantNameDiv">{{ info.merchantName }}</div>
</div> </div>
<el-button style="marginTop:20px" <el-button style="marginTop:20px" type="primary "
type="primary " @click="takeScreenshot('aliview', `${info.merchantName}支付宝支付收款码`)">下载
@click="takeScreenshot('aliview', `${info.merchantName}支付宝支付收款码`)">下载
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -56,8 +48,8 @@ ...@@ -56,8 +48,8 @@
</template> </template>
<script> <script>
// alipayQrcode import { createWeappQrcode, setDefaultPaymentChannel } from '@api/serviceManage'
import { createWeappQrcode } from '@api/serviceManage' import { paymentChannelList } from "@api/merchant"
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
import html2canvas from 'html2canvas' import html2canvas from 'html2canvas'
import QRCode from "qrcodejs2" import QRCode from "qrcodejs2"
...@@ -65,6 +57,8 @@ export default { ...@@ -65,6 +57,8 @@ export default {
name: 'QRcodeDialog', name: 'QRcodeDialog',
data() { data() {
return { return {
paymentChannelList: [],
paymentChannelId: '',
infoForm: { infoForm: {
merchantType: '', merchantType: '',
merchant: [], merchant: [],
...@@ -78,6 +72,7 @@ export default { ...@@ -78,6 +72,7 @@ export default {
}, },
qrCodeURL: '', qrCodeURL: '',
aliqrCodeURL: '', aliqrCodeURL: '',
qrcode: '',
defaultImg: require('../../images/defaultImg.png') defaultImg: require('../../images/defaultImg.png')
} }
}, },
...@@ -101,13 +96,30 @@ export default { ...@@ -101,13 +96,30 @@ export default {
components: {}, components: {},
mounted() { mounted() {
console.log(this.info) this.paymentChannelId = this.info.paymentChannelId
// console.log(this.info)
this.createQrcodeImage() this.initPaymentChannelList()
// this.createQrcodeImage()
this.alipayQrcode() this.alipayQrcode()
}, },
methods: { methods: {
savaAll() {
setDefaultPaymentChannel({
paymentChannelId: this.paymentChannelId,
merchantId: this.info.merchantId
})
this.createQrcodeImage()
this.alipayQrcode()
// this.takeScreenshot('wxview', `${this.info.yqMerchantName}微信支付收款码`)
// this.takeScreenshot('aliview', `${this.info.yqMerchantName}支付宝支付收款码`)
},
initPaymentChannelList() {
paymentChannelList().then((res) => {
this.paymentChannelList = res
this.createQrcodeImage()
})
},
/** /**
* @description: 图片转base64 * @description: 图片转base64
* @param {String} url 需要转换的图片原链接(http://....jpg) * @param {String} url 需要转换的图片原链接(http://....jpg)
...@@ -136,12 +148,12 @@ export default { ...@@ -136,12 +148,12 @@ export default {
createQrcodeImage() { createQrcodeImage() {
const oParams = {} const oParams = {}
oParams.channelType = 1 oParams.channelType = 1
oParams.appId = 'wx06d1198e751435d1' oParams.appId = this.paymentChannelList.find(item => item.paymentChannelId == this.paymentChannelId)?.payPlatform == 'allinpay' ? 'wx3d2ee7f8bda398cc' : 'wx06d1198e751435d1'
// oParams.appId = 'wx902f0b9c4b2c669d' // oParams.appId = 'wx902f0b9c4b2c669d'
oParams.qrcodeType = 'QR_WXA_UNLIMIT' oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'packagesPayment/pages/QRPayment/QRPayment' oParams.path = 'packagesPayment/pages/QRPayment/QRPayment'
// oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}` // oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}`
oParams.scene = `shopMerchantId=${this.info.merchantId}&shopMerchantName=${this.info.merchantName}` oParams.scene = `shopMerchantId=${this.info.merchantId}&shopMerchantName=${this.info.merchantName}&paymentChannelId=${this.paymentChannelId}`
createWeappQrcode(oParams).then(res => { createWeappQrcode(oParams).then(res => {
this.qrCodeURL = res this.qrCodeURL = res
...@@ -226,19 +238,23 @@ export default { ...@@ -226,19 +238,23 @@ export default {
// this // this
// const that = this // const that = this
// let shareUrl = `https://www.baidu.com/`; // let shareUrl = `https://www.baidu.com/`;
const shareUrl = `${baseConfig.alipayPath}?shopMerchantId=${this.info.merchantId}&shopMerchantName=${this.info.merchantName}` const shareUrl = `${baseConfig.alipayPath}?SM=${this.info.merchantId}&SMN=${this.info.merchantName}&P=${this.paymentChannelId}`
console.log(baseConfig.alipayPath) console.log(baseConfig.alipayPath)
console.log(shareUrl) console.log(shareUrl)
setTimeout(() => { setTimeout(() => {
console.log(document.getElementById('qrcodeDiv')) console.log(document.getElementById('qrcodeDiv'))
const qrcode = new QRCode("qrcodeDiv", { if (this.qrcode) {
text: shareUrl, this.qrcode.clear() // 清除二维码
width: 150, // 图像宽度 } else {
height: 150 // 图像高度 this.qrcode = new QRCode("qrcodeDiv", {
}) text: shareUrl,
qrcode.clear() // 清除二维码 width: 150, // 图像宽度
qrcode.makeCode(shareUrl) // 生成另一个新的二维码 height: 150 // 图像高度
this.aliqrCodeURL = qrcode })
}
// qrcode.clear() // 清除二维码
this.qrcode.makeCode(shareUrl) // 生成另一个新的二维码
this.aliqrCodeURL = this.qrcode
}, 500) }, 500)
// this.$nextTick(() => { // this.$nextTick(() => {
...@@ -284,7 +300,7 @@ export default { ...@@ -284,7 +300,7 @@ export default {
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.qrcon { .qrcon {
display: flex; display: flex;
} }
...@@ -311,7 +327,7 @@ export default { ...@@ -311,7 +327,7 @@ export default {
width: 150px; width: 150px;
height: 150px; height: 150px;
left: 50%; left: 50%;
top: 42%; top: 40%;
/* transform: translateX(-50%); */ /* transform: translateX(-50%); */
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
/* background-color: #d8d8d8; */ /* background-color: #d8d8d8; */
...@@ -341,7 +357,7 @@ export default { ...@@ -341,7 +357,7 @@ export default {
/* height: 20px; */ /* height: 20px; */
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 63%; top: 60%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
...@@ -360,4 +376,12 @@ export default { ...@@ -360,4 +376,12 @@ export default {
/* 自定义行数 */ /* 自定义行数 */
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
} }
.channelBox {
margin: auto;
.elSelect {
margin: 0 10px 10px;
}
}
</style> </style>
<!-- 商户关联 --> <!-- 商户关联 -->
<template> <template>
<d2-dialog title="商户关联" :is-visible="subordinateMerchantVisible" class="accountDailog" @closeDialog="handleClose" <d2-dialog title="商户关联"
width="850px" @confirmDialog="handleAddConfirm"> :is-visible="subordinateMerchantVisible"
<div class="yseUserCode">虚账编码: {{ subShopMerchantInfo.yseUserCode }}</div> class="accountDailog"
@closeDialog="handleClose"
width="850px"
@confirmDialog="handleAddConfirm">
<div class="yseUserCode">虚账编码: {{ subShopMerchantInfo.yseUserCode }} <span
style="margin-left: 50px;">支付渠道: {{
subShopMerchantInfo.paymentChannelName
}}</span></div>
<div class="content"> <div class="content">
<el-form ref="editSubordinateMerchantFrom" class="editSubordinateMerchantFrom " :model="form" label-width="150px" <el-form ref="editSubordinateMerchantFrom"
class="editSubordinateMerchantFrom "
:model="form"
label-width="150px"
v-loading="$store.state.d2admin.loading.value"> v-loading="$store.state.d2admin.loading.value">
<el-table :data="form.tableData" border> <el-table :data="form.tableData"
<el-table-column type="index" label="序号" :index="index => index + 1" width="50" align="center" /> border>
<el-table-column label="商户名称" width="400" align="center"> <el-table-column type="index"
label="序号"
:index="index => index + 1"
width="50"
align="center" />
<el-table-column label="商户名称"
width="400"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="inputCol"> <div class="inputCol">
<el-form-item :prop="'tableData.' + scope.$index + '.merchantId'" <el-form-item :prop="'tableData.' + scope.$index + '.merchantId'"
:rules="[{ required: true, message: '请选择商户', trigger: 'change' }]"> :rules="[{ required: true, message: '请选择商户', trigger: 'change' }]">
<el-select v-model="scope.row.merchantId" filterable remote reserve-keyword placeholder="请输入关键字" <el-select v-model="scope.row.merchantId"
style="width: 350px" :remote-method="remoteMethod" @change="changeOpt" :loading="loading"> filterable
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" remote
:value="item.merchantId" :disabled="setDisabled(item.merchantId)"> reserve-keyword
placeholder="请输入关键字"
style="width: 350px"
:remote-method="remoteMethod"
@change="changeOpt"
:loading="loading">
<el-option v-for="(item, index) in options"
:key="index"
:label="item.merchantName"
:value="item.merchantId"
:disabled="setDisabled(item.merchantId)">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商户号" align="center" prop="merchantId" width="138" /> <el-table-column label="商户号"
<el-table-column label="商户分类" align="center" prop="merchantId" width="138"> align="center"
prop="merchantId"
width="138" />
<el-table-column label="商户分类"
align="center"
prop="merchantId"
width="138">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- {{ scope.row.merchantType }} --> <!-- {{ scope.row.merchantType }} -->
{{ scope.row.merchantType ? merchantClassifyList.find(item => item.confId == {{ scope.row.merchantType ? merchantClassifyList.find(item => item.confId ==
scope.row.merchantType).confLabel : '' }} scope.row.merchantType).confLabel : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" style="color: red;" @click="handleDelMerchant(scope.$index)">删除</el-button> <el-button type="text"
style="color: red;"
@click="handleDelMerchant(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="add-btn"> <div class="add-btn">
<el-button type="primary" @click="handleAddMerchant">添加一行</el-button> <el-button type="primary"
@click="handleAddMerchant">添加一行</el-button>
</div> </div>
</el-form> </el-form>
<div class="tips">说明:关联商户完成后,生效后对应商户的分润金额将自动清分至关联的虚拟对公账户; 若商户的关联虚账发生变化,商户需重新做分账测试,请谨慎操作。</div> <div class="tips">说明:关联商户完成后,生效后对应商户的分润金额将自动清分至关联的虚拟对公账户; 若商户的关联虚账发生变化,商户需重新做分账测试,请谨慎操作。</div>
<el-form ref="form" :model="form" :rules="rules" label-suffix=":" label-width="140px"> <el-form ref="form"
:model="form"
:rules="rules"
label-suffix=":"
label-width="140px">
<el-form-item label="管理员手机号验证"> <el-form-item label="管理员手机号验证">
{{ adminInfo.name }} {{ adminInfo.phone }} {{ adminInfo.name }} {{ adminInfo.phone }}
<el-button size="small" @click="handleSend" :disabled="isSend"> <el-button size="small"
@click="handleSend"
:disabled="isSend">
{{ isSend ? sendMsg + '秒后,重试' : '发送验证短信' }} {{ isSend ? sendMsg + '秒后,重试' : '发送验证短信' }}
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item label="验证码" prop="smsCode"> <el-form-item label="验证码"
<el-input placeholder="请填写验证码" v-model="form.smsCode" size="small" style="width: 220px;" /> prop="smsCode">
<el-input placeholder="请填写验证码"
v-model="form.smsCode"
size="small"
style="width: 220px;" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -208,7 +255,7 @@ export default { ...@@ -208,7 +255,7 @@ export default {
this.loading = true this.loading = true
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
var params = { currentPage: 1, pageSize: 1000, accountStatuses: [1, 3, 4], merchantName: queryString, ysemRefedFlag: 'N' } var params = { currentPage: 1, pageSize: 1000, accountStatuses: [1, 3, 4], merchantName: queryString, ysemRefedFlag: 'N', paymentChannelId: this.subShopMerchantInfo.paymentChannelId }
listWithPageAccountStatuses(params).then(res => { listWithPageAccountStatuses(params).then(res => {
if (res.list) { if (res.list) {
res.list = res.list.map(item => { res.list = res.list.map(item => {
...@@ -220,7 +267,11 @@ export default { ...@@ -220,7 +267,11 @@ export default {
}) })
} }
const list = this.subShopMerchantInfo.yseMerchantRefs || [] const list = this.subShopMerchantInfo.yseMerchantRefs || []
this.options = [...list, ...res.list || []] const options = [...list, ...res.list || []]
// 对数据对象去重过滤
this.options = Array.from(new Map(
options.map(item => [item.merchantId, item]) // [key, value],key 是 merchantId,value 是整个对象
).values())
}) })
}, 200) }, 200)
} else { } else {
...@@ -299,7 +350,7 @@ export default { ...@@ -299,7 +350,7 @@ export default {
.yseUserCode { .yseUserCode {
height: 40px; height: 40px;
background: #F6F9FF; background: #f6f9ff;
line-height: 40px; line-height: 40px;
padding-left: 16px; padding-left: 16px;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
......
<!-- 历史虚拟操作规则 --> <!-- 历史虚拟操作规则 -->
<template> <template>
<baseDialog :is-show.sync="visible" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" <baseDialog :is-show.sync="visible" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose"> @closeDialog="handleDetailClose">
<div class="yseUserCode">虚账编码: {{ merchantRow.yseUserCode }}</div> <div class="yseUserCode">虚账编码: {{ merchantRow.yseUserCode }} <span style="margin-left: 50px;">支付渠道: {{
merchantRow.paymentChannelName }}</span></div>
<div class="account-detail" ref="accountDetail"> <div class="account-detail" ref="accountDetail">
<div v-if="formArray && formArray.length"> <div v-if="formArray && formArray.length">
<div v-for="(formItem, index) in formArray" v-resize="resetTableHeight" :ref="'resize' + index" :key="index"> <div v-for="(formItem, index) in formArray" v-resize="resetTableHeight" :ref="'resize' + index" :key="index">
...@@ -12,7 +13,7 @@ ...@@ -12,7 +13,7 @@
<span v-if="formItem.formatEffectStartDate"> - </span> <span v-if="formItem.formatEffectStartDate"> - </span>
<span :class="{ 'labelColor': !formItem.formatEffectEndDate }">{{ <span :class="{ 'labelColor': !formItem.formatEffectEndDate }">{{
formItem.formatEffectStartDate ? formItem.formatEffectEndDate ? formItem.formatEffectEndDate : '生效中' : formItem.formatEffectStartDate ? formItem.formatEffectEndDate ? formItem.formatEffectEndDate : '生效中' :
'待生效' '待生效'
}}</span> }}</span>
</span> </span>
<span class="updatedInfo"> <span class="updatedInfo">
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
</p> </p>
<el-collapse-transition> <el-collapse-transition>
<d2-table v-if="formItem.show" :table-data="formItem.yseMerchantRefs" :table-params="tableDetailParams" <d2-table v-if="formItem.show" :table-data="formItem.yseMerchantRefs" :table-params="tableDetailParams"
:has-page="false"></d2-table> :has-page="false"></d2-table>
</el-collapse-transition> </el-collapse-transition>
</div> </div>
</div> </div>
......
<!-- 图片上传 --> <!-- 图片上传 -->
<template> <template>
<div <div class="gl-upload-img"
class="gl-upload-img" v-if="show">
v-if="show"> <el-upload action=""
<el-upload list-type="picture-card"
action="" accept=".jpg,.png"
list-type="picture-card" :auto-upload="false"
accept=".jpg,.png" :show-file-list="false"
:auto-upload="false" :disabled="!!picObj[formObj[attrName]].url"
:show-file-list="false" :on-change="e => handleChange(e, formObj[attrName], formObj)"
:disabled="!!picObj[formObj[attrName]].url" :on-preview="e => handlePreview(e, formObj[attrName])"
:on-change="e => handleChange(e, formObj[attrName], formObj)" :on-remove="e => handleRemove(e, formObj[attrName])">
:on-preview="e => handlePreview(e, formObj[attrName])"
:on-remove="e => handleRemove(e, formObj[attrName])">
<span class="img-btn"> <span class="img-btn">
<img <img v-if="picObj[formObj[attrName]].url"
v-if="picObj[formObj[attrName]].url" :src="picObj[formObj[attrName]].url"
:src="picObj[formObj[attrName]].url" class="rectImg">
class="rectImg">
<span class="img-btns"> <span class="img-btns">
<span class="btn-item"> <span class="btn-item">
<i <i @click.stop="handleRemove(formObj[attrName], formObj)"
@click.stop="handleRemove(formObj[attrName], formObj)" class="el-icon-delete" />
class="el-icon-delete" /> <i @click.stop="handleImgLook"
<i class="el-icon-zoom-in" />
@click.stop="handleImgLook"
class="el-icon-zoom-in" />
</span> </span>
</span> </span>
</span> </span>
<i <i v-if="!picObj[formObj[attrName]].url && formObj.useDefaultImg"
v-if="!picObj[formObj[attrName]].url && formObj.useDefaultImg" class="el-icon-plus avatar-uploader-icon"
class="el-icon-plus avatar-uploader-icon" style="color: #8c939d;" />
style="color: #8c939d;" /> <img v-if="!picObj[formObj[attrName]].url && !formObj.useDefaultImg"
<img :src="examplePicUrl"
v-if="!picObj[formObj[attrName]].url && !formObj.useDefaultImg" class="rectImg">
:src="examplePicUrl"
class="rectImg">
</el-upload> </el-upload>
<span v-if="txtDescript">{{ txtDescript }}</span> <span v-if="txtDescript">{{ txtDescript }}</span>
<p <p v-show="!picObj[formObj[attrName]].url"
v-show="!picObj[formObj[attrName]].url" slot="errorTips"
slot="errorTips" class="car-error-txt">
class="car-error-txt">
请上传{{ txtDescript }} 请上传{{ txtDescript }}
</p> </p>
<el-dialog :visible.sync="lookImgVisible"> <el-dialog :visible.sync="lookImgVisible">
<img <img width="100%"
width="100%" :src="picObj[formObj[attrName]].url"
:src="picObj[formObj[attrName]].url" alt="图片">
alt="图片">
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
......
<!-- 图片上传 -->
<template>
<div class="gl-upload-img"
v-if="show">
<el-upload action=""
list-type="picture-card"
accept=".jpg,.png"
:auto-upload="false"
:show-file-list="false"
:disabled="!!picObj[formObj[attrName]].url"
:on-change="e => handleChange(e, formObj[attrName], formObj)"
:on-preview="e => handlePreview(e, formObj[attrName])"
:on-remove="e => handleRemove(e, formObj[attrName])">
<span class="img-btn">
<img v-if="picObj[formObj[attrName]].url"
:src="picObj[formObj[attrName]].url"
class="rectImg">
<span class="img-btns">
<span class="btn-item">
<i @click.stop="handleRemove(formObj[attrName], formObj)"
class="el-icon-delete" />
<i @click.stop="handleImgLook"
class="el-icon-zoom-in" />
</span>
</span>
</span>
<i v-if="!picObj[formObj[attrName]].url && formObj.useDefaultImg"
class="el-icon-plus avatar-uploader-icon"
style="color: #8c939d;" />
<img v-if="!picObj[formObj[attrName]].url && !formObj.useDefaultImg"
:src="examplePicUrl"
class="rectImg">
</el-upload>
<span v-if="txtDescript">{{ txtDescript }}</span>
<p v-show="!picObj[formObj[attrName]].url"
slot="errorTips"
class="car-error-txt">
请上传{{ txtDescript }}
</p>
<el-dialog :visible.sync="lookImgVisible">
<img width="100%"
:src="picObj[formObj[attrName]].url"
alt="图片">
</el-dialog>
</div>
</template>
<script>
export default {
name: 'GlUploadImg',
data() {
return {
examplePicUrl: '',
lookImgVisible: false
}
},
props: {
// 表单对象
formObj: {
type: Object,
default: () => { }
},
// 标记拿绑定哪个属性
attrName: {
type: String,
default: 'slotName'
},
// 图片绑定的属性
picObj: {
type: Object,
default: () => { }
},
// 文字说明
txtDescript: {
type: String,
default: ''
},
// 显示/隐藏
show: {
type: Boolean,
default: true
}
},
mounted() {
// public 文件需要使用绝对路径引入
this.examplePicUrl = `${process.env.VUE_APP_PUBLIC_PATH}account/` + this.formObj[this.attrName] + '.png'
// console.log(this.picObj[this.formObj[this.attrName]])
// console.log(this.formObj[this.attrName])
},
methods: {
handleImgLook() {
this.lookImgVisible = !this.lookImgVisible
},
handleChange(file, attrName, targetItem) {
if (!(file.size / 1024 / 1024 < 2)) {
this.$message.error('请上传小于2M的图片')
return false
}
this.$emit('handleImgChange', { file: file, attrName: attrName, targetItem: targetItem })
},
handlePreview() { },
handleRemove(attrName, targetItem) {
this.$emit('handleImgRemove', { attrName: attrName, targetItem: targetItem })
}
}
}
</script>
<style>
.gl-upload-img .disabled .el-upload--picture-card {
display: none;
}
.gl-upload-img .el-upload--picture-card {
width: 140px;
height: 92px;
line-height: 98px;
}
.gl-upload-img .rectImg {
width: 137px;
height: 90px;
}
.gl-upload-img .img-btn {
display: inline-block;
position: relative;
}
.img-btn .img-btns {
display: none;
position: absolute;
width: 140px;
height: 92px;
left: 0;
top: 0;
z-index: 2;
color: #fff;
background: rgba(0, 0, 0, 0.5);
}
.img-btn .img-btns .btn-item {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.img-btn .img-btns .btn-item {
display: flex;
width: 70%;
justify-content: space-around;
}
.img-btn:hover .img-btns {
display: block;
}
.gl-upload-img .el-upload--picture-card i {
color: #fff;
}
.gl-upload-img .car-error-txt {
font-size: 12px;
line-height: 6px;
margin: 0 0;
}
</style>
<!-- 虚拟管理 --> <!-- 虚拟管理 -->
<template> <template>
<div> <div>
<div class="d2-container-content" style="padding: 10px 20px;"> <div class="d2-container-content"
<div class=" header" slot="header"> style="padding: 10px 20px;">
<d2-search ref="showSearch" :search-form="searchForm" :form-data="showFormData"> <div class=" header"
slot="header">
<d2-search ref="showSearch"
:search-form="searchForm"
:form-data="showFormData">
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button :id="tableParams.btnId"
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> <el-button size="small"
@click="handleReset">
重置 重置
</el-button> </el-button>
</div> </div>
...@@ -19,45 +26,62 @@ ...@@ -19,45 +26,62 @@
<!-- <span slot="left"> <!-- <span slot="left">
<auth-button category="Button" :show-btn-ids="['9061003']" /> <auth-button category="Button" :show-btn-ids="['9061003']" />
</span> --> </span> -->
<d2-table ref="merchantTable" :get-list-api="getListApi" :search-form="searchFormSearch" <d2-table ref="merchantTable"
:table-params="tableParams" :before-search-fn="beforeSearchFn"> :get-list-api="getListApi"
<template slot="yqMerchantName" slot-scope="scope"> :search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<template slot="yqMerchantName"
slot-scope="scope">
<div v-if="scope.scope.yseMerchantRefs && scope.scope.yseMerchantRefs.length > 0"> <div v-if="scope.scope.yseMerchantRefs && scope.scope.yseMerchantRefs.length > 0">
<!-- width="200" --> <!-- width="200" -->
<el-popover placement="top" trigger="hover"> <el-popover placement="top"
trigger="hover">
<div class="merchant-name-box"> <div class="merchant-name-box">
<!-- <div class="title">关联门店</div> --> <!-- <div class="title">关联门店</div> -->
<div class="merchant-item" v-for="(subItem, subIndex) in scope.scope.yseMerchantRefs" :key="subIndex"> <div class="merchant-item"
v-for="(subItem, subIndex) in scope.scope.yseMerchantRefs"
:key="subIndex">
{{ subItem.merchantName }}( {{ subItem.merchantId }}) {{ subItem.merchantName }}( {{ subItem.merchantId }})
</div> </div>
</div> </div>
<div slot="reference"> <div slot="reference">
<img style="width: 14px;height: 13px;" src="../images/merchant_icon.png"> <img style="width: 14px;height: 13px;"
src="../images/merchant_icon.png">
<span>x {{ scope.scope.yseMerchantRefs.length }}</span> <span>x {{ scope.scope.yseMerchantRefs.length }}</span>
</div> </div>
</el-popover> </el-popover>
</div> </div>
<div v-else> <div v-else>
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span> <span
style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span>
</div> </div>
</template> </template>
<!-- <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" /> --> <!-- <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" /> -->
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button"
slot-scope="scope">
<!-- <auth-button slot="auth-button" :show-btn-ids="['9061001']" :data="scope.scope" /> --> <!-- <auth-button slot="auth-button" :show-btn-ids="['9061001']" :data="scope.scope" /> -->
<auth-button slot="auth-button" :show-btn-ids="['9061004', '9061005', '9061006']" :data="scope.scope" /> <auth-button slot="auth-button"
:show-btn-ids="['9061004', '9061005', '9061006']"
:data="scope.scope" />
</div> </div>
</d2-table> </d2-table>
</div> </div>
<subordinateMerchantDialog v-if="subordinateMerchantVisible" <subordinateMerchantDialog v-if="subordinateMerchantVisible"
:subordinate-merchant-visible="subordinateMerchantVisible" :sub-shop-merchant-info="merchantRow" :subordinate-merchant-visible="subordinateMerchantVisible"
@dialogClose="colseSubordinateMerchant"></subordinateMerchantDialog> :sub-shop-merchant-info="merchantRow"
@dialogClose="colseSubordinateMerchant"></subordinateMerchantDialog>
<virtualAccountManagementDetailDialog :account-detail-visible="accountDetailVisibleDialog" <virtualAccountManagementDetailDialog :account-detail-visible="accountDetailVisibleDialog"
:merchant-row="merchantRow" @dialogClose="accountDetailVisibleDialog = false"> :merchant-row="merchantRow"
@dialogClose="accountDetailVisibleDialog = false">
</virtualAccountManagementDetailDialog> </virtualAccountManagementDetailDialog>
<baseDialog :is-show.sync="accountDetailVisible" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" <baseDialog :is-show.sync="accountDetailVisible"
@closeDialog="handleDetailClose"> :config="dialogConfig.setting"
<account-detail v-if="accountDetailVisible" :account-detail-visible="accountDetailVisible" :dialog-config="dialogConfig.config"
:merchant-row="merchantRow" /> @closeDialog="handleDetailClose">
<account-detail v-if="accountDetailVisible"
:account-detail-visible="accountDetailVisible"
:merchant-row="merchantRow" />
</baseDialog> </baseDialog>
</div> </div>
</template> </template>
...@@ -70,6 +94,7 @@ import { merchantClassifyList, receiptModeList } from '@/common/constants' ...@@ -70,6 +94,7 @@ import { merchantClassifyList, receiptModeList } from '@/common/constants'
import subordinateMerchantDialog from './components/subordinateMerchantDialog' import subordinateMerchantDialog from './components/subordinateMerchantDialog'
import virtualAccountManagementDetailDialog from './components/virtualAccountManagementDetailDialog' import virtualAccountManagementDetailDialog from './components/virtualAccountManagementDetailDialog'
import accountDetail from './accountDetail' import accountDetail from './accountDetail'
import { paymentChannelList } from '@api/index'
export default { export default {
name: 'VirtualAccountManagement', name: 'VirtualAccountManagement',
components: { components: {
...@@ -105,7 +130,8 @@ export default { ...@@ -105,7 +130,8 @@ export default {
yseUserCode: '', yseUserCode: '',
merchantName: '', merchantName: '',
merchantIdFuzzy: '', merchantIdFuzzy: '',
receiptMode: '' receiptMode: '',
paymentChannelId: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [ showFormData: [
...@@ -144,6 +170,14 @@ export default { ...@@ -144,6 +170,14 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "receiptModeList" optionsName: "receiptModeList"
}, {
label: '支付渠道',
name: 'paymentChannelId',
type: 'select',
optionList: [],
optionId: 'paymentChannelId',
optionLabel: 'paymentChannelName',
optionsName: 'payChannelList'
} }
], ],
// 表格 // 表格
...@@ -168,6 +202,10 @@ export default { ...@@ -168,6 +202,10 @@ export default {
type: 'slot', type: 'slot',
addHtml: 'yqMerchantName', addHtml: 'yqMerchantName',
width: 140 width: 140
}, {
label: '支付渠道',
prop: 'paymentChannelName',
width: '150px'
}, },
{ {
label: '创建时间', label: '创建时间',
...@@ -201,7 +239,8 @@ export default { ...@@ -201,7 +239,8 @@ export default {
}] }]
}, },
baseData: { baseData: {
receiptModeList: JSON.parse(JSON.stringify(receiptModeList)) receiptModeList: JSON.parse(JSON.stringify(receiptModeList)),
payChannelList: []
}, },
dialogConfig: { dialogConfig: {
setting: { setting: {
...@@ -219,6 +258,7 @@ export default { ...@@ -219,6 +258,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.paymentChannelList()
this.getBaseData() this.getBaseData()
}, },
...@@ -234,6 +274,7 @@ export default { ...@@ -234,6 +274,7 @@ export default {
handleDetail(row) { handleDetail(row) {
this.merchantRow = row this.merchantRow = row
this.merchantRow.merchantId = row.id this.merchantRow.merchantId = row.id
this.merchantRow.fromPage = 'virtualAccountManagement'
this.accountDetailVisible = true this.accountDetailVisible = true
// yseMerchantGetDetail({ merchantId: row.id }).then(res => { // yseMerchantGetDetail({ merchantId: row.id }).then(res => {
// console.log(res, 'res') // console.log(res, 'res')
...@@ -277,7 +318,8 @@ export default { ...@@ -277,7 +318,8 @@ export default {
yseUserCode: '', yseUserCode: '',
merchantName: '', merchantName: '',
merchantIdFuzzy: '', merchantIdFuzzy: '',
receiptMode: '' receiptMode: '',
paymentChannelId: ''
} }
this.$refs.merchantTable.resetRefreshTable() this.$refs.merchantTable.resetRefreshTable()
}, },
...@@ -296,6 +338,13 @@ export default { ...@@ -296,6 +338,13 @@ export default {
handleDetailClose() { handleDetailClose() {
// console.log('visible') // console.log('visible')
this.accountDetailVisible = !this.accountDetailVisible this.accountDetailVisible = !this.accountDetailVisible
},
paymentChannelList() {
paymentChannelList({}).then(res => {
this.baseData.payChannelList = res
this.getOptionsList()
})
} }
} }
} }
......

29.1 KB | W: | H:

44.1 KB | W: | H:

src/views/systemConfig/images/alipay.png
src/views/systemConfig/images/alipay.png
src/views/systemConfig/images/alipay.png
src/views/systemConfig/images/alipay.png
  • 2-up
  • Swipe
  • Onion skin

16.7 KB | W: | H:

36.9 KB | W: | H:

src/views/systemConfig/images/code3.png
src/views/systemConfig/images/code3.png
src/views/systemConfig/images/code3.png
src/views/systemConfig/images/code3.png
  • 2-up
  • Swipe
  • Onion skin
<template> <template>
<d2-dialog title="收款二维码" :is-visible="qRcodeVisible" class="qRcodeDailog" width="750px" btn-ok-label="全部下载" <d2-dialog title="收款二维码" :is-visible="qRcodeVisible" class="qRcodeDailog" width="750px" btn-ok-label="全部下载"
@closeDialog="handleClose" @confirmDialog="handleAddConfirm"> @closeDialog="handleClose" @confirmDialog="handleAddConfirm">
<div class="qrcon"> <div class="qrcon">
<div class="wxcon"> <div class="wxcon">
<div class="codeDiv" id="wxview"> <div class="codeDiv" id="wxview">
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="merchantNameDiv">{{ info.merchantName }}</div> <div class="merchantNameDiv">{{ info.merchantName }}</div>
</div> </div>
<el-button style="marginTop:20px" type="primary " <el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('wxview', `${info.merchantName}微信支付收款码`)">下载</el-button> @click="takeScreenshot('wxview', `${info.merchantName}微信支付收款码`)">下载</el-button>
</div> </div>
<div class="alicon"> <div class="alicon">
<div class="codeDiv" id="aliview"> <div class="codeDiv" id="aliview">
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<div class="merchantNameDiv">{{ info.merchantName }}</div> <div class="merchantNameDiv">{{ info.merchantName }}</div>
</div> </div>
<el-button style="marginTop:20px" type="primary " <el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('aliview', `${info.merchantName}支付宝支付收款码`)">下载 @click="takeScreenshot('aliview', `${info.merchantName}支付宝支付收款码`)">下载
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<script> <script>
// alipayQrcode // alipayQrcode
import { createWeappQrcode } from '@api/serviceManage' import { createWeappQrcode } from '@api/serviceManage'
import { paymentChannelList } from "@api/merchant"
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
import html2canvas from 'html2canvas' import html2canvas from 'html2canvas'
import QRCode from "qrcodejs2" import QRCode from "qrcodejs2"
...@@ -48,6 +49,8 @@ export default { ...@@ -48,6 +49,8 @@ export default {
name: 'QRcodeDialog', name: 'QRcodeDialog',
data() { data() {
return { return {
paymentChannelList: [],
paymentChannelId: '',
infoForm: { infoForm: {
merchantType: '', merchantType: '',
merchant: [], merchant: [],
...@@ -84,6 +87,8 @@ export default { ...@@ -84,6 +87,8 @@ export default {
components: {}, components: {},
mounted() { mounted() {
this.paymentChannelId = this.info.paymentChannelId
this.initPaymentChannelList()
this.createQrcodeImage() this.createQrcodeImage()
this.alipayQrcode() this.alipayQrcode()
}, },
...@@ -292,7 +297,7 @@ export default { ...@@ -292,7 +297,7 @@ export default {
width: 150px; width: 150px;
height: 150px; height: 150px;
left: 50%; left: 50%;
top: 42%; top: 40%;
/* transform: translateX(-50%); */ /* transform: translateX(-50%); */
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
/* background-color: #d8d8d8; */ /* background-color: #d8d8d8; */
...@@ -322,7 +327,7 @@ export default { ...@@ -322,7 +327,7 @@ export default {
/* height: 20px; */ /* height: 20px; */
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 63%; top: 60%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
......
<!-- 分账测试渠道 -->
<template>
<d2-dialog title="选择分账测试渠道" :is-visible="verificationCodeVisible" width="750px" @closeDialog="handleClose"
@confirmDialog="handleConfirm">
<!-- <div class="box" v-for="(item, index) in accountValidMerchants" :key="index"> -->
<el-radio-group v-model="paymentChannelId">
<el-radio :label="item.paymentChannelId" class="verificationCode" v-for="(item, index) in divisionRuleTests"
:key="index">{{
item.paymentChannelName }}</el-radio>
</el-radio-group>
<!-- </div> -->
</d2-dialog>
</template>
<script>
// import { sendSms, getAdminInfo } from '@api/merchant'
import { mapActions } from 'vuex'
export default {
name: 'ChannelSelectDialog',
props: {
visible: {
// 弹窗是否展示
type: Boolean,
default: false
},
accountValidMerchants: {
type: Array,
default: () => []
},
divisionRuleTests: {
type: Array,
default: () => []
}
},
computed: {
verificationCodeVisible: {
// return this.
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', false)
}
},
paymentChannelObj() {
return this.divisionRuleTests.find(item => item.paymentChannelId === this.paymentChannelId)
}
},
data() {
return {
paymentChannelId: ''
}
},
mounted() {
console.log(this.divisionRuleTests, 'divisionRuleTests')
},
methods: {
...mapActions({
close: 'd2admin/page/close'
}),
handleClose() {
// this.$emit('dialogClose')
// this.$update
this.verificationCodeVisible = false
},
// handleApply() {
// },
// 选择并确认
handleConfirm() {
if (!this.paymentChannelId) {
return this.$message.error('请选择渠道');
}
this.$emit('handleConfirm', this.paymentChannelObj)
this.handleClose()
// this.$router.push({ name: 'accountList_new' })
// this.close({ tagName: '/merchantDetail' })
}
}
}
</script>
<style scoped lang="scss">
.verificationCode {
&+.verificationCode {
margin-top: 20px;
}
width: 100%;
}
.container {
padding: 16px 44px;
color: #333333;
background: #f6f8fa;
}
.channel {
color: #333333;
font-size: 16px;
}
.info {
color: #666666;
font-size: 14px;
}
</style>
...@@ -778,6 +778,8 @@ ...@@ -778,6 +778,8 @@
:visible.sync="tipsDialogVisible" /> :visible.sync="tipsDialogVisible" />
<financialCalculationDialog v-if="financialCalculationVisible" v-on="$listeners" <financialCalculationDialog v-if="financialCalculationVisible" v-on="$listeners"
:financial-calculation-obj="financialCalculationObj" :visible.sync="financialCalculationVisible" /> :financial-calculation-obj="financialCalculationObj" :visible.sync="financialCalculationVisible" />
<channelSelectDialog v-if="channelSelectDialogVisible" v-on="$listeners" :divisionRuleTests="divisionRuleTests"
@handleConfirm="channelConfirm" :visible.sync="channelSelectDialogVisible" />
</div> </div>
</template> </template>
...@@ -800,13 +802,15 @@ import { ...@@ -800,13 +802,15 @@ import {
goodsSourceList goodsSourceList
} from "@/common/constant/merchant" } from "@/common/constant/merchant"
import tipsDialog from "./tipsDialog" import tipsDialog from "./tipsDialog"
import financialCalculationDialog from "./financialCalculationDialog.vue" import financialCalculationDialog from "./financialCalculationDialog"
import channelSelectDialog from "./channelSelectDialog"
export default { export default {
name: "ClassificationCpt", name: "ClassificationCpt",
components: { components: {
tableAccount, tableAccount,
tipsDialog, tipsDialog,
financialCalculationDialog financialCalculationDialog,
channelSelectDialog
}, },
props: { props: {
goodsTypeGroupRules: { goodsTypeGroupRules: {
...@@ -961,6 +965,8 @@ export default { ...@@ -961,6 +965,8 @@ export default {
} }
} }
return { return {
channelSelectDialogVisible: false,
divisionRuleTests: [],
financialCalculationVisible: false, financialCalculationVisible: false,
tipsDialogVisible: false, tipsDialogVisible: false,
accountValidMerchants: [], accountValidMerchants: [],
...@@ -1224,7 +1230,7 @@ export default { ...@@ -1224,7 +1230,7 @@ export default {
// "this.tabItem.groupDivisionRuleId" // "this.tabItem.groupDivisionRuleId"
// ) // )
const id = const id =
this.tabItem.testFlag != "Y" ? this.tabItem.groupDivisionRuleId : false this.tabItem.testFlag == "N" ? this.tabItem.groupDivisionRuleId : false
return id || false return id || false
} }
}, },
...@@ -1563,20 +1569,42 @@ export default { ...@@ -1563,20 +1569,42 @@ export default {
divisionRuleTestGet({ divisionRuleTestGet({
goodsTypeGroupDivisionId: this.goodsTypeGroupDivisionId goodsTypeGroupDivisionId: this.goodsTypeGroupDivisionId
}).then((result) => { }).then((result) => {
const { subProgress, accountValidMerchants } = result // const { notInForceAccountMerchantMap, divisionRuleTestMap } = result
// 没有虚拟对公账户 const { notInForceAccountMerchants, divisionRuleTests } = result
if (subProgress == 32) {
// 如果有没有管理的虚拟对公账户
if (notInForceAccountMerchants) {
this.tipsDialogVisible = true this.tipsDialogVisible = true
this.accountValidMerchants = accountValidMerchants this.accountValidMerchants = notInForceAccountMerchants
return
} }
console.log([34, 35, 36, 31].includes(subProgress)) // const { subProgress, accountValidMerchants } = result
if ([34, 35, 36, 31].includes(subProgress)) { // 没有虚拟对公账户
this.financialCalculationVisible = true // if (subProgress == 32) {
this.financialCalculationObj = result // this.tipsDialogVisible = true
// this.accountValidMerchants = accountValidMerchants
// }
// console.log([34, 35, 36, 31].includes(subProgress))
// [34, 35, 36, 31].includes(subProgress)
// 需要做分账测算
if (divisionRuleTests) {
if (divisionRuleTests.length == 1) {
this.channelConfirm(divisionRuleTests[0])
} else {
this.channelSelectDialogVisible = true
this.divisionRuleTests = divisionRuleTests
}
} }
console.log("result", result) console.log("result", result)
}) })
}, },
channelConfirm(result) {
// if (divisionRuleTests) {
console.log(result, "result")
this.financialCalculationVisible = true
this.financialCalculationObj = { ...result, ...result.divisionRuleTestItem }
// }
},
ruleTest() { ruleTest() {
this.$emit("rulesTest") this.$emit("rulesTest")
}, },
......
<!-- 财务分账测试 --> <!-- 财务分账测试 -->
<template> <template>
<!-- btn-ok-label="全部下载" --> <!-- btn-ok-label="全部下载" -->
<d2-dialog title="提示" <d2-dialog title="提示" :is-visible="verificationCodeVisible" class="verificationCode" width="750px"
:is-visible="verificationCodeVisible" btn-ok-label="申请虚拟对公账户" @closeDialog="handleClose" @confirmDialog="handleConfirm">
class="verificationCode"
width="750px"
btn-ok-label="申请虚拟对公账户"
@closeDialog="handleClose"
@confirmDialog="handleConfirm">
<!-- <div>55</div> --> <!-- <div>55</div> -->
<p>分账对象未开通虚拟对公账户,请继续前往申请开通:</p> <div class="box" v-for="(item, index) in accountValidMerchants" :key="index">
<div class="container"> <p class="channel">渠道: {{ item.paymentChannelName }}分账对象未开通虚拟对公账户,请继续前往申请开通:</p>
<p v-for="(item,index) in accountValidMerchants" <div class="info" v-if="item.shopMerchants.length">
:key="index"> 流量方: <span v-for="(child, childIndex) in item.shopMerchants" :key='childIndex'>{{ child.merchantName }}</span>
<span class="label">名称: {{ item.merchantName }} </span> </div>
</p> <div class="info" v-if="item.partners.length">
服务商: <span v-for="(child, childIndex) in item.partners" :key='childIndex'>{{ child.merchantName }}</span>
</div>
<div class="info" v-if="item.platformMerchants.length">
平台方: <span v-for="(child, childIndex) in item.platformMerchants" :key='childIndex'>{{ child.merchantName
}}</span>
</div>
</div> </div>
<!-- <div class="box" v-for="(item, index) in accountValidMerchants" :key="index">
<p class="channel">渠道: {{ item.paymentChannelName }}分账对象未开通虚拟对公账户,请继续前往申请开通:</p>
<div class="info" v-if="item.shopMerchants.length">
流量方: <span v-for="(child, childIndex) in item.shopMerchants" :key='childIndex'>{{ child.merchantName }}</span>
</div>
<div class="info" v-if="item.partners.length">
服务商: <span v-for="(child, childIndex) in item.partners" :key='childIndex'>{{ child.merchantName }}</span>
</div>
<div class="info" v-if="item.platformMerchants.length">
平台方: <span v-for="(child, childIndex) in item.platformMerchants" :key='childIndex'>{{ child.merchantName
}}</span>
</div>
</div> -->
</d2-dialog> </d2-dialog>
</template> </template>
...@@ -82,4 +96,14 @@ export default { ...@@ -82,4 +96,14 @@ export default {
color: #333333; color: #333333;
background: #f6f8fa; background: #f6f8fa;
} }
.channel {
color: #333333;
font-size: 16px;
}
.info {
color: #666666;
font-size: 14px;
}
</style> </style>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
@confirmDialog="brandOkButton" @closeDialog="brandSettingsButton"> @confirmDialog="brandOkButton" @closeDialog="brandSettingsButton">
<span slot="sub-title" class="second_title">{{ <span slot="sub-title" class="second_title">{{
`${rowData.merchantName}${rowData.merchantId}` `${rowData.merchantName}${rowData.merchantId}`
}}</span> }}</span>
<div class="brandBox"> <div class="brandBox">
<div class="leftBox"> <div class="leftBox">
<div class="brand-top"> <div class="brand-top">
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
</div> </div>
<div class="content" v-for="(item, index) in items.goodsTypeGroupRules.filter((v, i) => i == activeType)" <div class="content" v-for="(item, index) in items.goodsTypeGroupRules.filter((v, i) => i == activeType)"
:key="index + 'ledger'"> :key="index + 'ledger'">
<!-- <template v-if="(activeType == index)"> -->
<div class="part1"> <div class="part1">
<div class="tit"> <div class="tit">
<div class="line"></div> <div class="line"></div>
...@@ -35,26 +34,30 @@ ...@@ -35,26 +34,30 @@
<div class="line"></div> <div class="line"></div>
分账类型 分账类型
</div> </div>
<div class="cont"> <div class="cont channelList" v-for="(child, childIndex) in items.divisionRuleAutos" :key="childIndex">
<div class="msg"> <div class="channel">
<div class="msg-title">分账类型:</div> <div class="msg channel-item">
<div class="msg-val">{{ getLederType(items.autoFlag, items.testFlag) }}</div> <div class="msg-title">分账渠道:</div>
</div> <div class="msg-val">{{ child.paymentChannelName }}</div>
<div class="msg"> </div>
<div class="msg-title">分账周期:</div> <div class="msg channel-item">
<div class="msg-val"> T + {{ items.settleTime }}</div> <div class="msg-title">分账类型:</div>
</div> <div class="msg-val">{{ getLederType(child.autoFlag, child.testFlag) }}</div>
<div class="msg"> </div>
<div class="msg-title">费用归属设置:</div> <div class="msg channel-item">
<div class="msg-val" v-html="getDistribute(item.owningMerchantDistributionRules)"> <div class="msg-title">分账周期:</div>
<div class="msg-val"> T + {{ child.settleTime }}</div>
</div> </div>
</div> </div>
</div>
<div class="cont">
<div class="msg"> <div class="msg">
<div class="msg-title">实际分账设置:</div> <div class="msg-title">金额分配设置:</div>
<div class="msg-val" v-html="getDistribute(item.merchantDistributionRules)"> <div class="msg-val" v-html="getDistribute(item.merchantDistributionRules)">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="part1 part3"> <div class="part1 part3">
<div class="tit"> <div class="tit">
...@@ -640,6 +643,32 @@ export default { ...@@ -640,6 +643,32 @@ export default {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.merchant-checkdetail .content .part1 .channelList {
padding-bottom: 0px;
.msg {
flex: 1
}
}
.channelList {
padding-bottom: 0px !important;
.msg {
padding-bottom: 0px !important;
}
}
.channel {
display: flex;
justify-content: space-between;
.channel-item {
width: 33%;
}
}
.content { .content {
.datePicker { .datePicker {
position: absolute; position: absolute;
......
...@@ -20,13 +20,15 @@ ...@@ -20,13 +20,15 @@
<!-- 分账 --> <!-- 分账 -->
<template v-if="activeName == 'first'"> <template v-if="activeName == 'first'">
<ledgerAccount :items="checkDetailItem" /> <ledgerAccount v-if="checkDetailItem" :items="checkDetailItem" />
<span v-else>暂无财务规则</span>
</template> </template>
<!-- 对账 --> <!-- 对账 -->
<template v-if="activeName == 'second'"> <template v-if="activeName == 'second'">
<reconciliation v-if="checkRecordList" :form-item="checkRecordList" <reconciliation v-if="checkRecordList" :form-item="checkRecordList"
:items="checkRecordList.goodsTypeGroupReconciliationRules || []" /> :items="checkRecordList.goodsTypeGroupReconciliationRules || []" />
<span v-else>暂无对账规则</span>
</template> </template>
<div class="btns"> <div class="btns">
...@@ -327,7 +329,8 @@ $color: #2a58ad; ...@@ -327,7 +329,8 @@ $color: #2a58ad;
.type2 { .type2 {
width: 66.66%; width: 66.66%;
.type-val{
.type-val {
display: inline-block !important; display: inline-block !important;
width: calc(100% - 90px); width: calc(100% - 90px);
white-space: nowrap; white-space: nowrap;
......
...@@ -12,17 +12,21 @@ ...@@ -12,17 +12,21 @@
</div> </div>
</template> </template>
</div> </div>
<div class="content" v-for="(item, index) in detailInfo.goodsTypeGroupRules.filter((v, i) => i == activeType)" <div class="content channelList"
:key="index + 'ledger'"> v-for="(item, index) in detailInfo.goodsTypeGroupRules.filter((v, i) => i == activeType)" :key="index + 'ledger'">
<!-- <template v-if="(activeType == index)"> --> <!-- <template v-if="(activeType == index)"> -->
<div class="white-table"> <div class="white-table" v-for="(child, childIndex) in detailInfo.divisionRuleAutos" :key="childIndex">
<div class="type1">
<div class="type-name">分账渠道:</div>
<div class="type-val">{{ child.paymentChannelName }}</div>
</div>
<div class="type1"> <div class="type1">
<div class="type-name">分账类型:</div> <div class="type-name">分账类型:</div>
<div class="type-val">{{ getLederType(detailInfo.autoFlag, detailInfo.testFlag) }}</div> <div class="type-val">{{ getLederType(child.autoFlag, child.testFlag) }}</div>
</div> </div>
<div class="type1"> <div class="type1">
<div class="type-name">分账周期:</div> <div class="type-name">分账周期:</div>
<div class="type-val"> T + {{ detailInfo.settleTime }}</div> <div class="type-val"> T + {{ child.settleTime }}</div>
</div> </div>
</div> </div>
<div class="part1"> <div class="part1">
...@@ -608,10 +612,10 @@ $color: #2a58ad; ...@@ -608,10 +612,10 @@ $color: #2a58ad;
.type1 { .type1 {
display: flex; display: flex;
width: 50%; width: 33%;
height: 38px; height: 38px;
line-height: 38px; line-height: 38px;
border-bottom: 1px solid #e5e5e5; // border-bottom: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5; border-right: 1px solid #e5e5e5;
box-sizing: border-box; box-sizing: border-box;
...@@ -644,6 +648,10 @@ $color: #2a58ad; ...@@ -644,6 +648,10 @@ $color: #2a58ad;
} }
} }
.white-table+.white-table {
border-bottom: 1px solid #e5e5e5;
}
.content { .content {
.datePicker { .datePicker {
position: absolute; position: absolute;
...@@ -769,6 +777,23 @@ $color: #2a58ad; ...@@ -769,6 +777,23 @@ $color: #2a58ad;
} }
} }
.channelList {
padding-bottom: 0px;
.type1 {
flex: 1
}
}
.channelList {
padding-bottom: 0px !important;
.msg {
padding-bottom: 0px !important;
}
}
.more { .more {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -10,17 +10,13 @@ ...@@ -10,17 +10,13 @@
<div class="tips">说明:红色内容为本次规则的新增或修改部分</div> <div class="tips">说明:红色内容为本次规则的新增或修改部分</div>
<div class="merchant-info"> <div class="merchant-info">
<!-- 分账 --> <!-- 分账 -->
<ledgerAccount v-if="merchantRow.ruleType == 1" <ledgerAccount v-if="merchantRow.ruleType == 1" :items="checkDetailItem" :effectDateType="effectDateType" />
:items="checkDetailItem" :effectDateType="effectDateType" />
<!-- 对账 --> <!-- 对账 -->
<reconciliation v-if="merchantRow.ruleType == 3" <reconciliation v-if="merchantRow.ruleType == 3" :form-item="checkRecordList"
:form-item="checkRecordList" :items="checkRecordList.goodsTypeGroupReconciliationRuleCTs || []" :effectDateType="effectDateType" />
:items="checkRecordList.goodsTypeGroupReconciliationRuleCTs || []"
:effectDateType="effectDateType"/>
</div> </div>
<div class="btns"> <div class="btns">
<el-button @click="handleConfirm" <el-button @click="handleConfirm" type="primary">
type="primary">
审核 审核
</el-button> </el-button>
<el-button @click="cacel"> <el-button @click="cacel">
...@@ -123,10 +119,9 @@ $color: #2a58ad; ...@@ -123,10 +119,9 @@ $color: #2a58ad;
padding-bottom: 20px; padding-bottom: 20px;
// overflow-y: auto; // overflow-y: auto;
.title { .title {}
}
.tips{ .tips {
margin: 15px 0; margin: 15px 0;
color: #F56C6C; color: #F56C6C;
} }
...@@ -138,6 +133,7 @@ $color: #2a58ad; ...@@ -138,6 +133,7 @@ $color: #2a58ad;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.merchant-info { .merchant-info {
margin-top: 20px; margin-top: 20px;
} }
...@@ -244,11 +240,10 @@ $color: #2a58ad; ...@@ -244,11 +240,10 @@ $color: #2a58ad;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
.manner { .manner {}
}
.online { .online {
& + .online { &+.online {
margin-left: 44px; margin-left: 44px;
} }
...@@ -301,7 +296,8 @@ $color: #2a58ad; ...@@ -301,7 +296,8 @@ $color: #2a58ad;
.type2 { .type2 {
width: 66.66%; width: 66.66%;
.type-val{
.type-val {
display: inline-block !important; display: inline-block !important;
width: calc(100% - 90px); width: calc(100% - 90px);
white-space: nowrap; white-space: nowrap;
...@@ -311,6 +307,10 @@ $color: #2a58ad; ...@@ -311,6 +307,10 @@ $color: #2a58ad;
} }
} }
// .white-table:nth-child(2) {
// border-bottom: 1px solid #e5e5e5;
// }
.title-table { .title-table {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
...@@ -324,7 +324,7 @@ $color: #2a58ad; ...@@ -324,7 +324,7 @@ $color: #2a58ad;
background: #f2f4f7; background: #f2f4f7;
.cost { .cost {
& + .cost { &+.cost {
border-left: 1px solid #e8e8ea; border-left: 1px solid #e8e8ea;
} }
...@@ -343,7 +343,7 @@ $color: #2a58ad; ...@@ -343,7 +343,7 @@ $color: #2a58ad;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
& + .detail-i { &+.detail-i {
border-left: 1px solid #e8e8ea; border-left: 1px solid #e8e8ea;
} }
...@@ -371,7 +371,12 @@ $color: #2a58ad; ...@@ -371,7 +371,12 @@ $color: #2a58ad;
align-items: center; align-items: center;
} }
} }
.isRed{
.isRed {
color: #F56C6C !important; color: #F56C6C !important;
} }
.white-table+.white-table {
border-bottom: 1px solid #e5e5e5;
}
</style> </style>

29.1 KB | W: | H:

44.1 KB | W: | H:

src/views/systemConfig/yqStoreManage/images/alipay.png
src/views/systemConfig/yqStoreManage/images/alipay.png
src/views/systemConfig/yqStoreManage/images/alipay.png
src/views/systemConfig/yqStoreManage/images/alipay.png
  • 2-up
  • Swipe
  • Onion skin

16.7 KB | W: | H:

36.9 KB | W: | H:

src/views/systemConfig/yqStoreManage/images/code3.png
src/views/systemConfig/yqStoreManage/images/code3.png
src/views/systemConfig/yqStoreManage/images/code3.png
src/views/systemConfig/yqStoreManage/images/code3.png
  • 2-up
  • Swipe
  • Onion skin
<template> <template>
<d2-dialog title="收款二维码" :is-visible="qRcodeVisible" class="qRcodeDailog" width="750px" btn-ok-label="全部下载" <d2-dialog title="收款二维码" :is-visible="qRcodeVisible" class="qRcodeDailog" width="750px" btn-ok-label="全部下载"
@closeDialog="handleClose" @confirmDialog="handleAddConfirm"> @closeDialog="handleClose" @confirmDialog="handleAddConfirm">
<div class="channelBox">
<span>支付渠道: </span>
<el-select v-model="paymentChannelId" placeholder="请选择" class="elSelect">
<el-option v-for="item in paymentChannelList" :key="item.paymentChannelId" :label="item.paymentChannelName"
:value="item.paymentChannelId">
</el-option>
</el-select>
<el-button type="primary" @click="savaAll">保存并重新生成</el-button>
</div>
<div class="qrcon"> <div class="qrcon">
<div class="wxcon"> <div class="wxcon">
<div class="codeDiv" id="wxview"> <div class="codeDiv" id="wxview">
...@@ -13,7 +22,7 @@ ...@@ -13,7 +22,7 @@
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div> <div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div> </div>
<el-button style="marginTop:20px" type="primary " <el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button> @click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button>
</div> </div>
<div class="alicon"> <div class="alicon">
<div class="codeDiv" id="aliview"> <div class="codeDiv" id="aliview">
...@@ -30,7 +39,7 @@ ...@@ -30,7 +39,7 @@
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div> <div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div> </div>
<el-button style="marginTop:20px" type="primary " <el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载 @click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -39,8 +48,8 @@ ...@@ -39,8 +48,8 @@
</template> </template>
<script> <script>
// alipayQrcode import { createWeappQrcode, setDefaultPaymentChannel } from '@api/serviceManage'
import { createWeappQrcode } from '@api/serviceManage' import { paymentChannelList } from "@api/merchant"
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
import html2canvas from 'html2canvas' import html2canvas from 'html2canvas'
import QRCode from "qrcodejs2" import QRCode from "qrcodejs2"
...@@ -48,6 +57,8 @@ export default { ...@@ -48,6 +57,8 @@ export default {
name: 'QRcodeDialog', name: 'QRcodeDialog',
data() { data() {
return { return {
paymentChannelList: [],
paymentChannelId: '',
infoForm: { infoForm: {
merchantType: '', merchantType: '',
merchant: [], merchant: [],
...@@ -61,7 +72,8 @@ export default { ...@@ -61,7 +72,8 @@ export default {
}, },
qrCodeURL: '', qrCodeURL: '',
aliqrCodeURL: '', aliqrCodeURL: '',
defaultImg: require('./images/defaultImg.png') defaultImg: require('./images/defaultImg.png'),
qrcode: ''
} }
}, },
...@@ -84,11 +96,29 @@ export default { ...@@ -84,11 +96,29 @@ export default {
components: {}, components: {},
mounted() { mounted() {
this.createQrcodeImage() this.paymentChannelId = this.info.paymentChannelId
this.initPaymentChannelList()
this.alipayQrcode() this.alipayQrcode()
}, },
methods: { methods: {
savaAll() {
setDefaultPaymentChannel({
paymentChannelId: this.paymentChannelId,
merchantId: this.info.yqMerchantId
})
this.createQrcodeImage()
this.alipayQrcode()
// this.takeScreenshot('wxview', `${this.info.yqMerchantName}微信支付收款码`)
// this.takeScreenshot('aliview', `${this.info.yqMerchantName}支付宝支付收款码`)
},
initPaymentChannelList() {
paymentChannelList().then((res) => {
this.paymentChannelList = res
this.createQrcodeImage()
})
},
/** /**
* @description: 图片转base64 * @description: 图片转base64
* @param {String} url 需要转换的图片原链接(http://....jpg) * @param {String} url 需要转换的图片原链接(http://....jpg)
...@@ -115,55 +145,23 @@ export default { ...@@ -115,55 +145,23 @@ export default {
}) })
}, },
createQrcodeImage() { createQrcodeImage() {
console.log(this.paymentChannelList)
console.log(this.paymentChannelList.find(item => item.paymentChannelId == this.paymentChannelId))
const oParams = {} const oParams = {}
oParams.channelType = 1 oParams.channelType = 1
oParams.appId = 'wx06d1198e751435d1' oParams.appId = this.paymentChannelList.find(item => item.paymentChannelId == this.paymentChannelId)?.payPlatform == 'allinpay' ? 'wx3d2ee7f8bda398cc' : 'wx06d1198e751435d1'
// oParams.appId = 'wx902f0b9c4b2c669d' // oParams.appId = this.paymentChannelId == '8881A96B22B84A348263EE4F314A2A23' ? 'wx06d1198e751435d1' : 'wx3d2ee7f8bda398cc'
oParams.qrcodeType = 'QR_WXA_UNLIMIT' oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'packagesPayment/pages/QRPayment/QRPayment' oParams.path = 'packagesPayment/pages/QRPayment/QRPayment'
oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}` oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}&paymentChannelId=${this.paymentChannelId}`
// oParams.appId = 'wx902f0b9c4b2c669d'
// oParams.appId = 'wx570d9331f9ace0bd'
// oParams.qrcodeType = 'QR_WXA_UNLIMIT'
// oParams.path = 'pages/accountItems/accountItems'
// oParams.scene = `noLogin=15816539334`
// oParams.path = 'pages/webpage/webpage'
// oParams.scene = `jumpLink=https://frontend.test.glsx.com.cn/dj-car-boutique-work-wechat/#/`
createWeappQrcode(oParams).then(res => { createWeappQrcode(oParams).then(res => {
this.qrCodeURL = res this.qrCodeURL = res
// function getBase64(imgUrl) {
// window.URL = window.URL || window.webkitURL
// var xhr = new XMLHttpRequest()
// xhr.open('get', imgUrl, true)
// xhr.responseType = 'blob'
// xhr.onload = function () {
// if (this.status == 200) {
// // 得到一个blob对象
// var blob = this.response
// console.log('blob', blob)
// // 至关重要
// const oFileReader = new FileReader()
// oFileReader.onloadend = function (e) {
// // 此处拿到的已经是base64的图片了,可以赋值做相应的处理
// console.log(e.target.result)
// }
// oFileReader.readAsDataURL(blob)
// }
// }
// xhr.send()
// }
// console.log(getBase64(res))
// getBase64('需要转成base64的图片url')
}) })
}, },
// 下载保存图片 // 下载保存图片
takeScreenshot(eleId, name) { takeScreenshot(eleId, name) {
// const opts = {
// useCORS: true
// }
const that = this const that = this
html2canvas(document.getElementById(eleId), { html2canvas(document.getElementById(eleId), {
backgroundColor: null, backgroundColor: null,
...@@ -211,19 +209,24 @@ export default { ...@@ -211,19 +209,24 @@ export default {
// 生成支付宝中间二维码 // 生成支付宝中间二维码
alipayQrcode() { alipayQrcode() {
// const that = this // const that = this
const shareUrl = `${baseConfig.alipayPath}?merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}` // pay 支付渠道
const shareUrl = `${baseConfig.alipayPath}?M=${this.info.yqMerchantId}&MN=${this.info.yqMerchantName}&P=${this.paymentChannelId}`
console.log(baseConfig.alipayPath) console.log(baseConfig.alipayPath)
console.log(shareUrl) console.log(shareUrl)
setTimeout(() => { setTimeout(() => {
console.log(document.getElementById('qrcodeDiv')) console.log(document.getElementById('qrcodeDiv'))
const qrcode = new QRCode("qrcodeDiv", { if (this.qrcode) {
text: shareUrl, this.qrcode.clear() // 清除二维码
width: 150, // 图像宽度 } else {
height: 150 // 图像高度 this.qrcode = new QRCode("qrcodeDiv", {
}) text: shareUrl,
qrcode.clear() // 清除二维码 width: 150, // 图像宽度
qrcode.makeCode(shareUrl) // 生成另一个新的二维码 height: 150 // 图像高度
this.aliqrCodeURL = qrcode })
}
// qrcode.clear() // 清除二维码
this.qrcode.makeCode(shareUrl) // 生成另一个新的二维码
this.aliqrCodeURL = this.qrcode
}, 500) }, 500)
// this.$nextTick(() => { // this.$nextTick(() => {
...@@ -269,7 +272,7 @@ export default { ...@@ -269,7 +272,7 @@ export default {
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.qrcon { .qrcon {
display: flex; display: flex;
} }
...@@ -288,7 +291,6 @@ export default { ...@@ -288,7 +291,6 @@ export default {
height: 468px; height: 468px;
margin: 0px auto; margin: 0px auto;
position: relative; position: relative;
/* background-image: url('./images/code3.png'); */
} }
.qrImg { .qrImg {
...@@ -296,10 +298,8 @@ export default { ...@@ -296,10 +298,8 @@ export default {
width: 150px; width: 150px;
height: 150px; height: 150px;
left: 50%; left: 50%;
top: 42%; top: 40%;
/* transform: translateX(-50%); */
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
/* background-color: #d8d8d8; */
z-index: 2; z-index: 2;
object-fit: contain; object-fit: contain;
/* transform: scale(0.95); */ /* transform: scale(0.95); */
...@@ -326,7 +326,7 @@ export default { ...@@ -326,7 +326,7 @@ export default {
/* height: 20px; */ /* height: 20px; */
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 63%; top: 60%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
...@@ -345,4 +345,12 @@ export default { ...@@ -345,4 +345,12 @@ export default {
/* 自定义行数 */ /* 自定义行数 */
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
} }
.channelBox {
margin: auto;
.elSelect {
margin: 0 10px 10px;
}
}
</style> </style>
...@@ -18,33 +18,24 @@ ...@@ -18,33 +18,24 @@
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="serviceStoreTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi" <d2-table ref="serviceStoreTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope"> <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope">
</auth-button> </auth-button>
</d2-table> </d2-table>
<qrcode-dialog :q-rcode-visible="qRcodeVisible" :info="recordInfo" v-if="qRcodeVisible" <qrcode-dialog :q-rcode-visible="qRcodeVisible" :info="recordInfo" v-if="qRcodeVisible"
@dialogClose="dialogClose" /> @dialogClose="dialogClose" />
</div> </div>
<wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog" v-if="QRcodeDialog" :merchant-info="recordInfo" /> <wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog" v-if="QRcodeDialog" :merchant-info="recordInfo" />
<scene-entry-dialog :scene-entry-visible="sceneEntryVisible" :info="recordInfo" v-if="sceneEntryVisible" <scene-entry-dialog :scene-entry-visible="sceneEntryVisible" :info="recordInfo" v-if="sceneEntryVisible"
@dialogClose="sceneDialogClose" /> @dialogClose="sceneDialogClose" />
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
// import _ from 'lodash' import { getYqMerchantConfig } from '@api/serviceManage'
import {
// getList,
// getMerchantList,
// addParentMerchant,
// deleteParentMerchant,
getYqMerchantConfig
} from '@api/serviceManage'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { BaseData, manageTypeList } from '@/common/constants.js' import { BaseData, manageTypeList } from '@/common/constants.js'
// import { sendSms, getAdminInfo } from '@api/merchant'
// import { getParkStore } from '@api/editCustomer'
import qrcodeDialog from './qRcodeDialog' import qrcodeDialog from './qRcodeDialog'
import wxQRcodeDialog from './wxQRcodeDialog' import wxQRcodeDialog from './wxQRcodeDialog'
import sceneEntryDialog from './sceneEntryDialog' import sceneEntryDialog from './sceneEntryDialog'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!