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 @@
"file-saver": "^2.0.5",
"flex.css": "^1.1.7",
"fuse.js": "^3.4.4",
"glsk-oss-jssdk": "^1.0.3",
"glsk-oss-jssdk": "^1.0.5",
"glsx-common-sdk": "^0.3.0",
"hash.js": "^1.0.0",
"hotkeys-js": "^3.6.2",
......
......@@ -106,3 +106,9 @@ export function insertOrUpdatePrivacyAgreement(data) {
data.method = `${path2}privacyAgreement.insertOrUpdate`
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) {
}
/**
*
* 获取车品牌列表
*/
export function getCarBrandList (data = {}) {
data.method = 'dj.api.smartcarlife.common.car.brand.list'
export function getCarBrandList(data = {}) {
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)
}
......@@ -103,7 +103,8 @@ export function yseMerchantGetDetail(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")
}
......@@ -112,3 +113,9 @@ export function updateAccountMode(data) {
data.method = `${djPath}yseMerchant.updateReceiptMode`
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 = (
) => {
// 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = ""
console.log("params.method", params)
// console.log("params.method", params)
if (params.method.includes("dj.api.smartcarlife")) {
apiName = "dj"
} else if (params.method.includes("dj.api.script")) {
......
......@@ -3,135 +3,141 @@ import request from "./request"
const path = "dj.smartcarlife.api."
// 分页查询园区店服务商列表
export function getList (data) {
export function getList(data) {
// data.method = `${path}partnerMerchant.serviceRef.page`
data.method = `${path}yqPartnerMerchant.ref.page`
return request(data, "post")
}
// 获取商户列表(园区店和服务商)
export function getMerchantList (data) {
export function getMerchantList(data) {
data.method = `${path}merchant.list`
return request(data, "post")
}
// 给园区店添加服务商
export function addParentMerchant (data) {
export function addParentMerchant(data) {
data.method = `${path}partnerMerchant.serviceRef.add`
return request(data, "post")
}
// 保存园区店服务商关联
export function saveParentMerchant (data) {
export function saveParentMerchant(data) {
data.method = `${path}partnerMerchant.serviceRef.save`
return request(data, "post")
}
// 删除关联服务商
export function deleteParentMerchant (data) {
export function deleteParentMerchant(data) {
data.method = `${path}partnerMerchant.serviceRef.delete`
return request(data, "post")
}
// 获取园区店列表
export function getYqMerchantConfig (data) {
export function getYqMerchantConfig(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.page`
return request(data, "GET")
}
// 获取园区店列表-获取园区店配置项
export function GETYQMERCHANTCONFIGDETAIL (data) {
export function GETYQMERCHANTCONFIGDETAIL(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.detail`
return request(data, "GET")
}
// 获取园区店列表-修改园区店配置项
export function UPDATEYQMERCHANTCONFIG (data) {
export function UPDATEYQMERCHANTCONFIG(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.modify`
return request(data, "post")
}
// 生成小程序码
export function createWeappQrcode (data) {
export function createWeappQrcode(data) {
data.method = `dj.api.smartcarlife.common.createWeappQrcode.new`
return request(data, "post")
}
// 获取园区店支付宝页面二维码
export function alipayQrcode (data) {
export function alipayQrcode(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.alipay.qrcode`
return request(data, "post")
}
// 获取园区店配置项
export function yqMerchantConfigDetail (data) {
export function yqMerchantConfigDetail(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.detail`
return request(data, "post")
}
// 关联园区店加企微二维码
export function serviceMerchantRelateQrcode (data) {
export function serviceMerchantRelateQrcode(data) {
data.method = `dj.api.smartcarlife.serviceMerchant.relate.qrcode`
return request(data, "post")
}
// 获取园区店配置的场景入口
export function getYqMerchantSceneConfigAPI (data) {
export function getYqMerchantSceneConfigAPI(data) {
data.method = `dj.api.smartcarlife.select.openScene.info`
return request(data, "post")
}
// 配置园区店场景入口
export function settingYqMerchantSceneAPI (data) {
export function settingYqMerchantSceneAPI(data) {
data.method = `dj.api.smartcarlife.update.openScene.info`
return request(data, "post")
}
// 获取服务商数据
export function getServiceListAPI (data) {
export function getServiceListAPI(data) {
data.method = "dj.api.smarcarlife.yqMerchantConfig.partnerMerchantDetail"
return request(data, "post")
}
// 获取服务商配置
export function getProviderProcurementInfo (data) {
export function getProviderProcurementInfo(data) {
data.method =
"dj.smartcarlife.api.yqPartnerMerchant.selectProviderProcurementInfo"
return request(data, "post")
}
// 配置服务商
export function updateProviderProcurementInfo (data) {
export function updateProviderProcurementInfo(data) {
data.method =
"dj.smartcarlife.api.yqPartnerMerchant.updateProviderProcurementInfo"
return request(data, "post")
}
// 获取发货主体
export function getShippingEntityInfoAll (data) {
export function getShippingEntityInfoAll(data) {
data.method =
"dj.smartcarlife.api.yqPartnerMerchant.selectShippingEntityInfoAll"
return request(data, "post")
}
// 获取下级商户
export function searchServiceMerchant (data) {
export function searchServiceMerchant(data) {
data.method = "dj.api.serviceMerchant.page.search"
return request(data, "post")
}
/**根据4s店商户号查找员工设备列表 */
export function getMerchantEmployeeList (data) {
export function getMerchantEmployeeList(data) {
data.method = "dj.api.mindworkplate.badge.findPhoneListByShopMerchantNo"
return request(data, "post")
}
/**获取阿里云token */
export function getAliOSSToken (data = {}) {
data.method = 'dj.api.mindworkplate.badge.getToken'
export function getAliOSSToken(data = {}) {
data.method = "dj.api.mindworkplate.badge.getToken"
return request(data, "post")
}
/** 录音文件批量新增 */
export function updateRecordings (data) {
export function updateRecordings(data) {
data.method = "dj.api.smartcarlife.inspection.conversation.recordings"
return request(data, "post")
}
\ 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 = [
{ confId: 1, 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 = [
{ confId: 2, confValue: "轻改" },
{ confId: 3, confValue: "权益" },
......
import { baseConfig } from "@/main"
const OSS = require("ali-oss")
class GlOssApi {
constructor(params = {}) {
this.baseConfig = params.baseConfig
}
export default {
/**
* 分片上传大文件到阿里云OSS(带断点续传和重试机制)
* @param {*} file 文件流(大文件)
* 阿里云oss sdk文件上传 dir 上传到的文件位置
* @param {*} file 文件流
* @param {*} successCallback 成功回调
* @param {*} errCallBack 失败回调
* @param {*} bucketName 桶名(可选)
* @param {*} dir 上传目录(可选)
* @param {*} partSize 分片大小(单位 KB,默认500KB)
* @param {*} maxRetries 最大重试次数(默认3次)
* @param {*} bucketName 阿里云桶名(可以指定多个桶名)
* @param {*} dir 上传文件夹路径 譬如images
*/
multipartUpload(
bucketUpload(
file,
successCallback = new Function(),
errCallBack = new Function(),
bucketName = "zzl-filerepostorypublic",
dir = "image",
partSize = 500, // 默认分片大小为500KB
maxRetries = 3 // 最大重试次数
dir = "image"
) {
const { baseConfig } = this
if (!baseConfig) errCallBack(new Error("初始化缺少baseConfig配置"))
const fileName = file.name
const fileName = file.name // 先获取上传要的资料签名
// 实例化一个上传客户端
const client = new OSS({
accessKeyId: baseConfig.alyOss2.accessKeyId,
accessKeySecret: baseConfig.alyOss2.accessKeySecret,
bucket: baseConfig.alyOss2.bucket,
endpoint: baseConfig.alyOss2.endpoint
// yourRegion填写Bucket所在地域。Region填写为oss-cn-hangzhou。
// region: "oss-cn-beijing", //我的存储是北京,可根据具体配置自行修改
// region: "oss-cn-shanghai",
// 从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
}
// 确保目录以斜杠结尾
if (!dir.endsWith("/")) {
try {
// 为保证唯一性,可以通过uuid将文件名替换
// let uuid = uuidv4() + fileName.substring(fileName.lastIndexOf('.'))if (dir.substring(dir.length - 1, 1) !== '/') {
dir += "/"
}
const uniqueDir =
dir + Date.now() + "_" + Math.floor(Math.random() * 10000) + "/"
const key = uniqueDir + fileName
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 result = client.put(dir + fileName, file)
result
.then((res) => {
console.log(res, "返回文件名和文件地址")
const size =
file.size > 1000000
? parseFloat(file.size / 1000000).toFixed(2) + "M"
: 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({
attachment: fileName,
aliyunAddress:
"https:" + encodeOSSFilename(decodeURIComponent(url)),
aliyunAddress: res.url,
size: size
})
})
.catch((err) => {
console.error("分片上传失败", err)
if (retryCount < maxRetries) {
retryCount++
console.log(`第${retryCount}次重试上传...`)
setTimeout(() => {
uploadWithRetry()
}, 3000) // 3秒后重试
} else {
errCallBack(err)
}
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(
const type = Object.prototype.toString.call(config.data)
const methodList = [
"dj.api.common.uploadImg",
"dj.api.common.ocr.recognition",
"dj.api.smartcarlife.sms.sendSmsCode"
"dj.api.common.ocr.recognition"
// "dj.api.smartcarlife.sms.sendSmsCode"
]
if (
type == "[object Object]" &&
......
......@@ -352,6 +352,11 @@ export const routerName = {
authId: "90611",
name: "申请虚拟账户成本",
parentId: "90610"
},
{
authId: "90632",
name: "申请虚拟账户成本-通联",
parentId: "90610"
}
]
},
......@@ -400,7 +405,7 @@ export const routerName = {
path: "/applyAccount_new",
name: "applyAccount_new",
meta: {
title: "申请虚拟账户成本",
title: "申请银盛&嘀加智慧云虚拟账户",
authId: "90611",
parentId: "90610",
cache: false,
......@@ -408,6 +413,18 @@ export const routerName = {
},
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: {
path: "/sceneCategoryManage",
name: "sceneCategoryManage",
......
......@@ -358,7 +358,8 @@ export const routerName = {
title: "素材配置",
authId: "91310",
parentId: "91309",
cache: false
cache: false,
activePath: "/packageConfig"
},
auth: [],
component: _import("contentManager/packageConfig/edit")
......@@ -370,7 +371,8 @@ export const routerName = {
title: "配置详情",
authId: "91311",
parentId: "91309",
cache: false
cache: false,
activePath: "/packageConfig"
},
component: _import("contentManager/packageConfig/addEquity")
},
......
import { getGoodsCategoryConfiguration } from "@/api/sys.base.js"
import { getAllGoodsList } from "@api/grounding"
import { merchantSettleDistributeRuleLastRule } from "@api/shelfManage"
import { set } from "nprogress"
import { paymentChannelList } from "@api/merchant"
export default {
namespaced: true,
state: {
......@@ -60,7 +60,10 @@ export default {
isLoadingGoods: false, // 加载状态
merchantSettleDistributeRuleLastRule: null,
firstLineSunshineOnlinePointsFlag: null,
firstLineSunshine2OnlinePointsFlag: null
firstLineSunshine2OnlinePointsFlag: null,
paymentChannelList: [],
isLoadingPaymentChannelList: null,
promiseGetPaymentChannelList: null
},
mutations: {
/**
......@@ -213,6 +216,43 @@ export default {
}) // 清除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) {
console.log(id, "getMerchantSettleDistributeRuleLastRule")
if (state.merchantSettleDistributeRuleLastRule) {
......
......@@ -148,6 +148,8 @@
</template>
</el-table-column>
<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="orderType" align="center">
<!-- goodsOrder.orderType 为null表示空 -->
......@@ -171,7 +173,7 @@ import { mapActions, mapState } from 'vuex'
import { getParkStore } from '@api/editCustomer'
import { divisionStatusList, orderTypeList, orderBusinessType } from '@/common/constants.js'
import { getListApi, getCountApi } from '@/api/account'
import { getPlatformMerchantList } from '@api/index'
import { getPlatformMerchantList, paymentChannelList } from '@api/index'
// import { asyncExportExcel } from '@api/sys.base'
export default {
name: 'OnlineAccountList',
......@@ -188,7 +190,8 @@ export default {
divisionStatus: '',
yqMerchantId: '',
realityPlatformMerchantId: '',
orderType: ''
orderType: '',
paymentChannelId: ''
},
searchSelectObj: {
orderOrTrade: {
......@@ -273,6 +276,14 @@ export default {
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'PlatformMerchantList'
}, {
label: '支付渠道',
name: 'paymentChannelId',
type: 'select',
optionList: [],
optionId: 'paymentChannelId',
optionLabel: 'paymentChannelName',
optionsName: 'payChannelList'
}],
// 表格
tableList: [],
......@@ -285,7 +296,8 @@ export default {
parkServiceList: [],
divisionStatusList: deepClone(divisionStatusList),
orderTypeList: deepClone(orderTypeList),
PlatformMerchantList: []
PlatformMerchantList: [],
payChannelList: []
}
}
},
......@@ -298,6 +310,7 @@ export default {
mounted() {
// this.searchForm.divisionDate = getCurrentSixMonth()
this.paymentChannelList()
this.userInfo.beSuper && getParkStore({}).then(res => {
res.forEach(item => {
item.merchantId = item.merchantNo
......@@ -408,7 +421,8 @@ export default {
divisionDate: '',
divisionStatus: '',
yqMerchantId: '',
realityPlatformMerchantId: ''
realityPlatformMerchantId: '',
paymentChannelId: ''
}
this.searchSelectObj = {
orderOrTrade: {
......@@ -463,6 +477,12 @@ export default {
this.actionSetDownloadList({ list, type: 'dowloadList' })
// this.handleClose()
// })
},
paymentChannelList() {
paymentChannelList({}).then(res => {
this.baseData.payChannelList = res
})
}
}
}
......
......@@ -6,27 +6,35 @@
</div>
<div style="padding: 20px">
<el-form ref="divisionRuleRef" :model="financialObj" label-suffix=":" label-width="154px">
<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 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>:
<el-form-item class="settlementTimeMethod" label="" prop=""
v-for="(item, index) in financialObj.divisionRuleAutos" :key="index">
<span class="payChannel" slot="label">
<span class="">
{{ item.paymentChannelName }}
</span>
</span>
<div class="block_item" style="margin-bottom: 20px">
<span>
分账周期 T+{{ settleTimeObj.first }}日
<span v-show="financialObj.settleTimeType == 1">(分账后第2天到分账方对公账户)</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>
</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 label="流量方分账方">
<span>{{ financialObj.realityShopMerchantName }}</span>
......@@ -73,7 +81,7 @@
</el-form>
</div>
<tableAccount ref="tableAccount" :merchant-distribution-rules="financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.merchantDistributionRules
.merchantDistributionRules
"
:owningMerchantDistributionRules="financialObj.goodsTypeGroupRules[editableTabsValue - 1].owningMerchantDistributionRules"
:table-select-options="tableSelectOptions" :classification-obj-select="tableClassificationObjSelect" />
......@@ -347,5 +355,17 @@ export default {
}
</script>
<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";
</style>
......@@ -6,8 +6,43 @@
<el-button icon="el-icon-plus" type="primary" size="small" plain v-if="addVisible" @click="addTab">新增</el-button>
</div>
<div class="publicContainer">
<el-form ref="divisionRuleRef" :model="financialObj" :rules="rules" label-suffix=":" label-width="180px">
<el-form-item label="" prop="autoFlag">
<el-form ref="divisionRuleRef" class="divisionRuleRef" :model="financialObj" :rules="rules" label-suffix=":"
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-label">线上自动分账</span>
<el-tooltip popper-class="tooltip-class" effect="dark" content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
......@@ -33,7 +68,7 @@
</el-radio>
</div>
</el-radio-group>
</el-form-item>
</el-form-item> -->
<!-- <el-form-item label="流量方分账方" prop="realityShopMerchantId" required>
<el-select v-model="financialObj.realityShopMerchantId" placeholder="请选择流量方分账方">
<el-option v-for="item in baseData.merchantLevelList" :key="item.merchantId" :label="item.showMerchantName"
......@@ -144,7 +179,8 @@ export default {
multiPlatformMerchantFlag: "N", // 是否多平台
goodsTypeGroupRules: [],
partnerMerchantId: "",
partnerMerchantName: ""
partnerMerchantName: "",
divisionRuleAutos: []
},
// 结算周期
settleTimeObj: {
......@@ -338,6 +374,7 @@ export default {
},
mounted() {
this.getGoodsCategoryConfigurationData() // 商品分类
this.initPaymentChannelList()
// 平台方
// this.$EventBus.$on("shelfUpdateContractMer", (obj) => {
// this.$set(this.financialObj, "realityPlatformMerchantId", obj.merchantId)
......@@ -359,7 +396,8 @@ export default {
...mapActions("goodsInfoData", [
"getGoodsCategoryConfiguration",
"getGoods",
"getMerchantSettleDistributeRuleLastRule"
"getMerchantSettleDistributeRuleLastRule",
"getPaymentChannelList"
]),
...mapMutations("FinancialRules", ["toggle", "set4sService"]),
initDjzhySubMerchant() {
......@@ -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) {
// 先取默认值
this.financialObj = Object.assign(this.financialObj, {
......@@ -488,6 +543,18 @@ export default {
result = result?.merchantSettleDistributeRule || this.financialObj
result.autoFlag = result.autoFlag ? result.autoFlag : "N"
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 && result.divisionRuleId && (this.financialObj = result)
result.multiPlatformMerchantFlag = result.multiPlatformMerchantFlag || "N"
......@@ -1490,7 +1557,30 @@ export default {
@import "../../style/editdetailCon.scss";
.publicContainer {
// display: flex;
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 {
......
......@@ -2,8 +2,19 @@
<template>
<d2-container class="order-list m-t-40">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'150px'"
:form-data="showFormData" />
<d2-search 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">
<el-button @click="handleSearch" size="small" type="primary">
查询
......@@ -110,6 +121,29 @@
</span>
</template>
</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">
<template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
......@@ -314,6 +348,7 @@ import { getParkStore } from "@api/editCustomer"
import chooseRuleDialog from './chooseRuleDialog'
import ruleInfoDialog from './ruleInfoDialog'
import { deepClone } from "@/common/util"
import { getAllCategory } from '@api/product'
export default {
name: "CarDamage",
components: {
......@@ -571,6 +606,10 @@ export default {
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'zyVoucherStatusOpt'
}, {
label: "商品类目",
name: "goodsType",
addHtml: "goodsCascader"
}
],
searchForm: {
......@@ -592,7 +631,10 @@ export default {
invoiceStatus: '',
salesType: '',
zyVoucherStatus: '',
profitAllocationStatus: ''
profitAllocationStatus: '',
goodsType: '',
secondaryGoodsType: '',
thirdLevelGoodsType: '',
},
baseData: {
orderStatusList: [
......@@ -734,7 +776,8 @@ export default {
confLabel: '售后'
}
],
zyVoucherStatusOpt: Util.deepClone(zyVoucherStatusOpt)
zyVoucherStatusOpt: Util.deepClone(zyVoucherStatusOpt),
productTypeList: []
},
tableData: [],
total: 0,
......@@ -748,7 +791,8 @@ export default {
subShopMerchanShowHide: true,
ruleVisible: false,
recordInfo: null,
ruleInfoVisible: false
ruleInfoVisible: false,
tempGoodsType: []
}
},
computed: {
......@@ -811,6 +855,10 @@ export default {
this.getList()
this.getOrderCount()
this.getProvinceList()
// 获取全部类目
getAllCategory({ pageSize: 9999, currentPage: 1 }).then(res => {
this.baseData.productTypeList = res?.list || []
})
},
watch: {
updateRefesh(val) {
......@@ -843,6 +891,18 @@ export default {
this.baseData.channelTypeList = await this.get(BaseData.channelType)
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() {
listShop4sByRef({
scene: 0
......@@ -956,6 +1016,7 @@ export default {
zyVoucherStatus: '',
profitAllocationStatus: ''
}
this.tempGoodsType = []
// this.baseData.storeIdList = []
this.handleSearch()
this.getAllServiceStore()
......@@ -1024,7 +1085,7 @@ export default {
}
// 去除为null的值
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]
}
}
......
......@@ -2,8 +2,21 @@
<template>
<d2-container class="order-list m-t-40">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'150px'"
:form-data="showFormData" />
<d2-search
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">
<el-button @click="handleSearch" size="small" type="primary">
查询
......@@ -130,6 +143,29 @@
</span>
</template>
</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">
<template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
......@@ -324,6 +360,7 @@ import { mapActions, mapState, mapMutations } from "vuex"
import { getParkStore } from "@api/editCustomer"
import chooseRuleDialog from "./chooseRuleDialog"
import ruleInfoDialog from "./ruleInfoDialog"
import { getAllCategory } from '@api/product'
export default {
name: "OrderList",
components: {
......@@ -564,6 +601,11 @@ export default {
optionId: "confId",
optionLabel: "confLabel",
optionsName: "salesTypeList"
},
{
label: "商品类目",
name: "goodsType",
addHtml: "goodsCascader"
}
],
searchForm: {
......@@ -583,7 +625,10 @@ export default {
paySuccessDate: "",
provinceId: "",
invoiceStatus: "",
salesType: ""
salesType: "",
goodsType: '',
secondaryGoodsType: '',
thirdLevelGoodsType: '',
},
baseData: {
orderStatusList: [
......@@ -712,7 +757,8 @@ export default {
confId: "1",
confLabel: "售后"
}
]
],
productTypeList: []
},
tableData: [],
total: 0,
......@@ -745,7 +791,8 @@ export default {
name: "fields",
addHtml: "fieldsHtml"
}
]
],
tempGoodsType: []
}
},
computed: {
......@@ -806,6 +853,10 @@ export default {
this.getList()
this.getOrderCount()
this.getProvinceList()
// 获取全部类目
getAllCategory({ pageSize: 9999, currentPage: 1 }).then(res => {
this.baseData.productTypeList = res?.list || []
})
},
watch: {
updateRefesh(val) {
......@@ -841,6 +892,19 @@ export default {
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() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
......@@ -928,7 +992,9 @@ export default {
provinceId: "",
invoiceStatus: ""
}
this.tempGoodsType = []
// this.baseData.storeIdList = []
this.handleSearch()
this.getOptionsList()
},
getServiceStore(merchantIds) {
......@@ -1018,7 +1084,7 @@ export default {
if (
params[key] === null ||
params[key] === "" ||
params[key].length == 0
params[key]?.length == 0
) {
delete params[key]
}
......
......@@ -4,16 +4,26 @@
<!-- class="order-detail" -->
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header" 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="header"
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">
<el-button @click="handleSearch" size="small" type="primary">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
<el-button size="small"
@click="handleReset">
重置
</el-button>
<el-button size="small" @click="handleRecord">
<el-button size="small"
@click="handleRecord">
返回
</el-button>
</div>
......@@ -22,10 +32,16 @@
<d2-container> -->
<div class="d2-container-content">
<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>条,未补录<span class="count-txt">{{ countObj.waitInputCount }}</span>条,未关联<span class="count-txt">{{
<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>条,未补录<span
class="count-txt">{{ countObj.waitInputCount }}</span>条,未关联<span
class="count-txt">{{
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> -->
......@@ -39,16 +55,28 @@
<el-button type="primary" @click="handleExport">
导出
</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>
<!-- :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">
<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>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
: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>
<template slot="auth-button" slot-scope="scope">
<template slot="auth-button"
slot-scope="scope">
<!-- 已分帐无可操作内容 -->
<div v-if="scope.scope.distributeStatus != '1'">
<!-- <el-button type="text" v-if="scope.scope.inputStatus == '1'" @click="orderDetail(scope.scope)">
......@@ -95,15 +123,31 @@
</div>
</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>
</template>
......@@ -119,6 +163,7 @@ import relatActivityOrderDialog from './relatActivityOrderDialog'
import chooseRuleDialog from './chooseRuleDialog'
import ruleInfoDialog from './ruleInfoDialog'
import newSignRefundDialog from './components/newSignRefundDialog'
import { paymentChannelList } from '@api/index'
const clonePayTypeList = deepClone(payTypeList)
clonePayTypeList.splice(1, 1)
export default {
......@@ -143,7 +188,8 @@ export default {
payType: '',
shopMerchantId: '',
distributeStatus: '',
refundStatus: ''
refundStatus: '',
paymentChannelId: ''
},
searchFormSearch: {},
searchSelectObj: {
......@@ -251,6 +297,14 @@ export default {
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'refundStatusList'
}, {
label: '支付渠道',
name: 'paymentChannelId',
type: 'select',
optionList: [],
optionId: 'paymentChannelId',
optionLabel: 'paymentChannelName',
optionsName: 'payChannelList'
}],
getListApi: waitinputorderPage,
tableParams: {
......@@ -281,6 +335,10 @@ export default {
return cellValue.accountDate ? Util.dateFormate(cellValue.accountDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
}, {
label: '支付渠道',
prop: 'paymentChannelName',
width: '150px'
}, {
label: '收款来源',
prop: 'payType',
width: '100px',
......@@ -415,7 +473,8 @@ export default {
}, {
confId: '2',
confLabel: '已退款'
}]
}],
payChannelList: []
},
merchantDialogVisible: false,
......@@ -435,6 +494,7 @@ export default {
})
},
mounted() {
this.paymentChannelList()
this.getAllServiceStore()
this.userInfo.beSuper && getParkStore({}).then(res => {
res.forEach(item => {
......@@ -520,7 +580,8 @@ export default {
payType: '',
shopMerchantId: '',
distributeStatus: '',
refundStatus: ''
refundStatus: '',
paymentChannelId: ''
}
this.searchSelectObj = {
orderOrTrade: {
......@@ -845,6 +906,12 @@ export default {
if (flag) {
this.$refs.recordTable.refreshTable()
}
},
paymentChannelList() {
paymentChannelList({}).then(res => {
this.baseData.payChannelList = res
})
}
}
}
......
<template>
<d2-dialog title="收款二维码"
:is-visible="qRcodeVisible"
class="qRcodeDailog"
width="750px"
btn-ok-label="全部下载"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<d2-dialog title="收款二维码" :is-visible="qRcodeVisible" class="qRcodeDailog" width="750px" btn-ok-label="全部下载"
@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="wxcon">
<div class="codeDiv"
id="wxview">
<img style="width:100%;height:100%"
src="../../images/code3.png">
<div class="codeDiv" id="wxview">
<img style="width:100%;height:100%" src="../../images/code3.png">
<!-- v-if="qrCodeURL" <div class="imgDiv"> -->
<img v-if="qrCodeURL"
class="qrImg"
crossorigin="anonymous"
:src="qrCodeURL">
<img v-if="qrCodeURL" class="qrImg" crossorigin="anonymous" :src="qrCodeURL">
<!-- crossorigin="anonymous" -->
<div v-if="!qrCodeURL"
class="el-icon-loading loadingIcon" />
<div v-if="!qrCodeURL" class="el-icon-loading loadingIcon" />
<!-- </div> -->
<div class="merchantNameDiv">{{ info.merchantName }}</div>
</div>
<el-button style="marginTop:20px"
type="primary "
@click="takeScreenshot('wxview', `${info.merchantName}微信支付收款码`)">下载</el-button>
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('wxview', `${info.merchantName}微信支付收款码`)">下载</el-button>
</div>
<div class="alicon">
<div class="codeDiv"
id="aliview">
<img style="width:100%;height:100%"
src="../../images/alipay.png">
<div class="codeDiv" id="aliview">
<img style="width:100%;height:100%" src="../../images/alipay.png">
<!-- <img v-if="aliqrCodeURL"
class="qrImg imgs"
:src="aliqrCodeURL"
crossorigin="anonymous"> -->
<div id="qrcodeDiv"
class="qrImg" />
<div id="qrcodeDiv" class="qrImg" />
<!-- -->
<!-- :src="aliqrCodeURL"> -->
<div v-if="!aliqrCodeURL"
class="el-icon-loading loadingIcon" />
<div v-if="!aliqrCodeURL" class="el-icon-loading loadingIcon" />
<!-- </div> -->
<div class="merchantNameDiv">{{ info.merchantName }}</div>
</div>
<el-button style="marginTop:20px"
type="primary "
@click="takeScreenshot('aliview', `${info.merchantName}支付宝支付收款码`)">下载
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('aliview', `${info.merchantName}支付宝支付收款码`)">下载
</el-button>
</div>
</div>
......@@ -56,8 +48,8 @@
</template>
<script>
// alipayQrcode
import { createWeappQrcode } from '@api/serviceManage'
import { createWeappQrcode, setDefaultPaymentChannel } from '@api/serviceManage'
import { paymentChannelList } from "@api/merchant"
import { baseConfig } from '@/main'
import html2canvas from 'html2canvas'
import QRCode from "qrcodejs2"
......@@ -65,6 +57,8 @@ export default {
name: 'QRcodeDialog',
data() {
return {
paymentChannelList: [],
paymentChannelId: '',
infoForm: {
merchantType: '',
merchant: [],
......@@ -78,6 +72,7 @@ export default {
},
qrCodeURL: '',
aliqrCodeURL: '',
qrcode: '',
defaultImg: require('../../images/defaultImg.png')
}
},
......@@ -101,13 +96,30 @@ export default {
components: {},
mounted() {
console.log(this.info)
this.createQrcodeImage()
this.paymentChannelId = this.info.paymentChannelId
// console.log(this.info)
this.initPaymentChannelList()
// this.createQrcodeImage()
this.alipayQrcode()
},
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
* @param {String} url 需要转换的图片原链接(http://....jpg)
......@@ -136,12 +148,12 @@ export default {
createQrcodeImage() {
const oParams = {}
oParams.channelType = 1
oParams.appId = 'wx06d1198e751435d1'
oParams.appId = this.paymentChannelList.find(item => item.paymentChannelId == this.paymentChannelId)?.payPlatform == 'allinpay' ? 'wx3d2ee7f8bda398cc' : 'wx06d1198e751435d1'
// oParams.appId = 'wx902f0b9c4b2c669d'
oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'packagesPayment/pages/QRPayment/QRPayment'
// 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 => {
this.qrCodeURL = res
......@@ -226,19 +238,23 @@ export default {
// this
// const that = this
// 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(shareUrl)
setTimeout(() => {
console.log(document.getElementById('qrcodeDiv'))
const qrcode = new QRCode("qrcodeDiv", {
text: shareUrl,
width: 150, // 图像宽度
height: 150 // 图像高度
})
qrcode.clear() // 清除二维码
qrcode.makeCode(shareUrl) // 生成另一个新的二维码
this.aliqrCodeURL = qrcode
if (this.qrcode) {
this.qrcode.clear() // 清除二维码
} else {
this.qrcode = new QRCode("qrcodeDiv", {
text: shareUrl,
width: 150, // 图像宽度
height: 150 // 图像高度
})
}
// qrcode.clear() // 清除二维码
this.qrcode.makeCode(shareUrl) // 生成另一个新的二维码
this.aliqrCodeURL = this.qrcode
}, 500)
// this.$nextTick(() => {
......@@ -284,7 +300,7 @@ export default {
}
}
</script>
<style scoped>
<style scoped lang="scss">
.qrcon {
display: flex;
}
......@@ -311,7 +327,7 @@ export default {
width: 150px;
height: 150px;
left: 50%;
top: 42%;
top: 40%;
/* transform: translateX(-50%); */
transform: translate(-50%, -50%);
/* background-color: #d8d8d8; */
......@@ -341,7 +357,7 @@ export default {
/* height: 20px; */
position: absolute;
left: 50%;
top: 63%;
top: 60%;
transform: translate(-50%, -50%);
text-align: center;
font-size: 14px;
......@@ -360,4 +376,12 @@ export default {
/* 自定义行数 */
-webkit-line-clamp: 2;
}
.channelBox {
margin: auto;
.elSelect {
margin: 0 10px 10px;
}
}
</style>
<!-- 商户关联 -->
<template>
<d2-dialog title="商户关联" :is-visible="subordinateMerchantVisible" class="accountDailog" @closeDialog="handleClose"
width="850px" @confirmDialog="handleAddConfirm">
<div class="yseUserCode">虚账编码: {{ subShopMerchantInfo.yseUserCode }}</div>
<d2-dialog title="商户关联"
:is-visible="subordinateMerchantVisible"
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">
<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">
<el-table :data="form.tableData" border>
<el-table-column type="index" label="序号" :index="index => index + 1" width="50" align="center" />
<el-table-column label="商户名称" width="400" align="center">
<el-table :data="form.tableData"
border>
<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">
<div class="inputCol">
<el-form-item :prop="'tableData.' + scope.$index + '.merchantId'"
:rules="[{ required: true, message: '请选择商户', trigger: 'change' }]">
<el-select v-model="scope.row.merchantId" filterable remote 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-select v-model="scope.row.merchantId"
filterable
remote
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-select>
</el-form-item>
</div>
</template>
</el-table-column>
<el-table-column label="商户号" align="center" prop="merchantId" width="138" />
<el-table-column label="商户分类" align="center" prop="merchantId" width="138">
<el-table-column label="商户号"
align="center"
prop="merchantId"
width="138" />
<el-table-column label="商户分类"
align="center"
prop="merchantId"
width="138">
<template slot-scope="scope">
<!-- {{ scope.row.merchantType }} -->
{{ scope.row.merchantType ? merchantClassifyList.find(item => item.confId ==
scope.row.merchantType).confLabel : '' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<el-table-column label="操作"
align="center">
<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>
</el-table-column>
</el-table>
<div class="add-btn">
<el-button type="primary" @click="handleAddMerchant">添加一行</el-button>
<el-button type="primary"
@click="handleAddMerchant">添加一行</el-button>
</div>
</el-form>
<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="管理员手机号验证">
{{ adminInfo.name }} {{ adminInfo.phone }}
<el-button size="small" @click="handleSend" :disabled="isSend">
<el-button size="small"
@click="handleSend"
:disabled="isSend">
{{ isSend ? sendMsg + '秒后,重试' : '发送验证短信' }}
</el-button>
</el-form-item>
<el-form-item label="验证码" prop="smsCode">
<el-input placeholder="请填写验证码" v-model="form.smsCode" size="small" style="width: 220px;" />
<el-form-item label="验证码"
prop="smsCode">
<el-input placeholder="请填写验证码"
v-model="form.smsCode"
size="small"
style="width: 220px;" />
</el-form-item>
</el-form>
</div>
......@@ -208,7 +255,7 @@ export default {
this.loading = true
setTimeout(() => {
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 => {
if (res.list) {
res.list = res.list.map(item => {
......@@ -220,7 +267,11 @@ export default {
})
}
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)
} else {
......@@ -299,7 +350,7 @@ export default {
.yseUserCode {
height: 40px;
background: #F6F9FF;
background: #f6f9ff;
line-height: 40px;
padding-left: 16px;
font-family: PingFangSC-Medium;
......
<!-- 历史虚拟操作规则 -->
<template>
<baseDialog :is-show.sync="visible" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
<div class="yseUserCode">虚账编码: {{ merchantRow.yseUserCode }}</div>
@closeDialog="handleDetailClose">
<div class="yseUserCode">虚账编码: {{ merchantRow.yseUserCode }} <span style="margin-left: 50px;">支付渠道: {{
merchantRow.paymentChannelName }}</span></div>
<div class="account-detail" ref="accountDetail">
<div v-if="formArray && formArray.length">
<div v-for="(formItem, index) in formArray" v-resize="resetTableHeight" :ref="'resize' + index" :key="index">
......@@ -12,7 +13,7 @@
<span v-if="formItem.formatEffectStartDate"> - </span>
<span :class="{ 'labelColor': !formItem.formatEffectEndDate }">{{
formItem.formatEffectStartDate ? formItem.formatEffectEndDate ? formItem.formatEffectEndDate : '生效中' :
'待生效'
'待生效'
}}</span>
</span>
<span class="updatedInfo">
......@@ -24,7 +25,7 @@
</p>
<el-collapse-transition>
<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>
</div>
</div>
......
<!-- 图片上传 -->
<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])">
<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">
<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" />
<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">
<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">
<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="图片">
<img width="100%"
:src="picObj[formObj[attrName]].url"
alt="图片">
</el-dialog>
</div>
</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>
<div>
<div class="d2-container-content" style="padding: 10px 20px;">
<div class=" header" slot="header">
<d2-search ref="showSearch" :search-form="searchForm" :form-data="showFormData">
<div class="d2-container-content"
style="padding: 10px 20px;">
<div class=" header"
slot="header">
<d2-search ref="showSearch"
:search-form="searchForm"
:form-data="showFormData">
</d2-search>
<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 size="small" @click="handleReset">
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
......@@ -19,45 +26,62 @@
<!-- <span slot="left">
<auth-button category="Button" :show-btn-ids="['9061003']" />
</span> -->
<d2-table ref="merchantTable" :get-list-api="getListApi" :search-form="searchFormSearch"
:table-params="tableParams" :before-search-fn="beforeSearchFn">
<template slot="yqMerchantName" slot-scope="scope">
<d2-table ref="merchantTable"
:get-list-api="getListApi"
: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">
<!-- width="200" -->
<el-popover placement="top" trigger="hover">
<el-popover placement="top"
trigger="hover">
<div class="merchant-name-box">
<!-- <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 }})
</div>
</div>
<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>
</div>
</el-popover>
</div>
<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>
</template>
<!-- <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="['9061004', '9061005', '9061006']" :data="scope.scope" />
<auth-button slot="auth-button"
:show-btn-ids="['9061004', '9061005', '9061006']"
:data="scope.scope" />
</div>
</d2-table>
</div>
<subordinateMerchantDialog v-if="subordinateMerchantVisible"
:subordinate-merchant-visible="subordinateMerchantVisible" :sub-shop-merchant-info="merchantRow"
@dialogClose="colseSubordinateMerchant"></subordinateMerchantDialog>
:subordinate-merchant-visible="subordinateMerchantVisible"
:sub-shop-merchant-info="merchantRow"
@dialogClose="colseSubordinateMerchant"></subordinateMerchantDialog>
<virtualAccountManagementDetailDialog :account-detail-visible="accountDetailVisibleDialog"
:merchant-row="merchantRow" @dialogClose="accountDetailVisibleDialog = false">
:merchant-row="merchantRow"
@dialogClose="accountDetailVisibleDialog = false">
</virtualAccountManagementDetailDialog>
<baseDialog :is-show.sync="accountDetailVisible" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
<account-detail v-if="accountDetailVisible" :account-detail-visible="accountDetailVisible"
:merchant-row="merchantRow" />
<baseDialog :is-show.sync="accountDetailVisible"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
<account-detail v-if="accountDetailVisible"
:account-detail-visible="accountDetailVisible"
:merchant-row="merchantRow" />
</baseDialog>
</div>
</template>
......@@ -70,6 +94,7 @@ import { merchantClassifyList, receiptModeList } from '@/common/constants'
import subordinateMerchantDialog from './components/subordinateMerchantDialog'
import virtualAccountManagementDetailDialog from './components/virtualAccountManagementDetailDialog'
import accountDetail from './accountDetail'
import { paymentChannelList } from '@api/index'
export default {
name: 'VirtualAccountManagement',
components: {
......@@ -105,7 +130,8 @@ export default {
yseUserCode: '',
merchantName: '',
merchantIdFuzzy: '',
receiptMode: ''
receiptMode: '',
paymentChannelId: ''
},
searchFormSearch: {},
showFormData: [
......@@ -144,6 +170,14 @@ export default {
optionId: "confId",
optionLabel: "confValue",
optionsName: "receiptModeList"
}, {
label: '支付渠道',
name: 'paymentChannelId',
type: 'select',
optionList: [],
optionId: 'paymentChannelId',
optionLabel: 'paymentChannelName',
optionsName: 'payChannelList'
}
],
// 表格
......@@ -168,6 +202,10 @@ export default {
type: 'slot',
addHtml: 'yqMerchantName',
width: 140
}, {
label: '支付渠道',
prop: 'paymentChannelName',
width: '150px'
},
{
label: '创建时间',
......@@ -201,7 +239,8 @@ export default {
}]
},
baseData: {
receiptModeList: JSON.parse(JSON.stringify(receiptModeList))
receiptModeList: JSON.parse(JSON.stringify(receiptModeList)),
payChannelList: []
},
dialogConfig: {
setting: {
......@@ -219,6 +258,7 @@ export default {
}
},
mounted() {
this.paymentChannelList()
this.getBaseData()
},
......@@ -234,6 +274,7 @@ export default {
handleDetail(row) {
this.merchantRow = row
this.merchantRow.merchantId = row.id
this.merchantRow.fromPage = 'virtualAccountManagement'
this.accountDetailVisible = true
// yseMerchantGetDetail({ merchantId: row.id }).then(res => {
// console.log(res, 'res')
......@@ -277,7 +318,8 @@ export default {
yseUserCode: '',
merchantName: '',
merchantIdFuzzy: '',
receiptMode: ''
receiptMode: '',
paymentChannelId: ''
}
this.$refs.merchantTable.resetRefreshTable()
},
......@@ -296,6 +338,13 @@ export default {
handleDetailClose() {
// console.log('visible')
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>
<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="wxcon">
<div class="codeDiv" id="wxview">
......@@ -13,7 +13,7 @@
<div class="merchantNameDiv">{{ info.merchantName }}</div>
</div>
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('wxview', `${info.merchantName}微信支付收款码`)">下载</el-button>
@click="takeScreenshot('wxview', `${info.merchantName}微信支付收款码`)">下载</el-button>
</div>
<div class="alicon">
<div class="codeDiv" id="aliview">
......@@ -30,7 +30,7 @@
<div class="merchantNameDiv">{{ info.merchantName }}</div>
</div>
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('aliview', `${info.merchantName}支付宝支付收款码`)">下载
@click="takeScreenshot('aliview', `${info.merchantName}支付宝支付收款码`)">下载
</el-button>
</div>
</div>
......@@ -41,6 +41,7 @@
<script>
// alipayQrcode
import { createWeappQrcode } from '@api/serviceManage'
import { paymentChannelList } from "@api/merchant"
import { baseConfig } from '@/main'
import html2canvas from 'html2canvas'
import QRCode from "qrcodejs2"
......@@ -48,6 +49,8 @@ export default {
name: 'QRcodeDialog',
data() {
return {
paymentChannelList: [],
paymentChannelId: '',
infoForm: {
merchantType: '',
merchant: [],
......@@ -84,6 +87,8 @@ export default {
components: {},
mounted() {
this.paymentChannelId = this.info.paymentChannelId
this.initPaymentChannelList()
this.createQrcodeImage()
this.alipayQrcode()
},
......@@ -292,7 +297,7 @@ export default {
width: 150px;
height: 150px;
left: 50%;
top: 42%;
top: 40%;
/* transform: translateX(-50%); */
transform: translate(-50%, -50%);
/* background-color: #d8d8d8; */
......@@ -322,7 +327,7 @@ export default {
/* height: 20px; */
position: absolute;
left: 50%;
top: 63%;
top: 60%;
transform: translate(-50%, -50%);
text-align: center;
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 @@
:visible.sync="tipsDialogVisible" />
<financialCalculationDialog v-if="financialCalculationVisible" v-on="$listeners"
:financial-calculation-obj="financialCalculationObj" :visible.sync="financialCalculationVisible" />
<channelSelectDialog v-if="channelSelectDialogVisible" v-on="$listeners" :divisionRuleTests="divisionRuleTests"
@handleConfirm="channelConfirm" :visible.sync="channelSelectDialogVisible" />
</div>
</template>
......@@ -800,13 +802,15 @@ import {
goodsSourceList
} from "@/common/constant/merchant"
import tipsDialog from "./tipsDialog"
import financialCalculationDialog from "./financialCalculationDialog.vue"
import financialCalculationDialog from "./financialCalculationDialog"
import channelSelectDialog from "./channelSelectDialog"
export default {
name: "ClassificationCpt",
components: {
tableAccount,
tipsDialog,
financialCalculationDialog
financialCalculationDialog,
channelSelectDialog
},
props: {
goodsTypeGroupRules: {
......@@ -961,6 +965,8 @@ export default {
}
}
return {
channelSelectDialogVisible: false,
divisionRuleTests: [],
financialCalculationVisible: false,
tipsDialogVisible: false,
accountValidMerchants: [],
......@@ -1224,7 +1230,7 @@ export default {
// "this.tabItem.groupDivisionRuleId"
// )
const id =
this.tabItem.testFlag != "Y" ? this.tabItem.groupDivisionRuleId : false
this.tabItem.testFlag == "N" ? this.tabItem.groupDivisionRuleId : false
return id || false
}
},
......@@ -1563,20 +1569,42 @@ export default {
divisionRuleTestGet({
goodsTypeGroupDivisionId: this.goodsTypeGroupDivisionId
}).then((result) => {
const { subProgress, accountValidMerchants } = result
// 没有虚拟对公账户
if (subProgress == 32) {
// const { notInForceAccountMerchantMap, divisionRuleTestMap } = result
const { notInForceAccountMerchants, divisionRuleTests } = result
// 如果有没有管理的虚拟对公账户
if (notInForceAccountMerchants) {
this.tipsDialogVisible = true
this.accountValidMerchants = accountValidMerchants
this.accountValidMerchants = notInForceAccountMerchants
return
}
console.log([34, 35, 36, 31].includes(subProgress))
if ([34, 35, 36, 31].includes(subProgress)) {
this.financialCalculationVisible = true
this.financialCalculationObj = result
// const { subProgress, accountValidMerchants } = result
// 没有虚拟对公账户
// if (subProgress == 32) {
// 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)
})
},
channelConfirm(result) {
// if (divisionRuleTests) {
console.log(result, "result")
this.financialCalculationVisible = true
this.financialCalculationObj = { ...result, ...result.divisionRuleTestItem }
// }
},
ruleTest() {
this.$emit("rulesTest")
},
......
<!-- 财务分账测试 -->
<template>
<!-- btn-ok-label="全部下载" -->
<d2-dialog title="提示"
:is-visible="verificationCodeVisible"
class="verificationCode"
width="750px"
btn-ok-label="申请虚拟对公账户"
@closeDialog="handleClose"
@confirmDialog="handleConfirm">
<d2-dialog title="提示" :is-visible="verificationCodeVisible" class="verificationCode" width="750px"
btn-ok-label="申请虚拟对公账户" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<!-- <div>55</div> -->
<p>分账对象未开通虚拟对公账户,请继续前往申请开通:</p>
<div class="container">
<p v-for="(item,index) in accountValidMerchants"
:key="index">
<span class="label">名称: {{ item.merchantName }} </span>
</p>
<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>
<!-- <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>
</template>
......@@ -82,4 +96,14 @@ export default {
color: #333333;
background: #f6f8fa;
}
.channel {
color: #333333;
font-size: 16px;
}
.info {
color: #666666;
font-size: 14px;
}
</style>
......@@ -109,7 +109,7 @@
@confirmDialog="brandOkButton" @closeDialog="brandSettingsButton">
<span slot="sub-title" class="second_title">{{
`${rowData.merchantName}${rowData.merchantId}`
}}</span>
}}</span>
<div class="brandBox">
<div class="leftBox">
<div class="brand-top">
......
......@@ -11,7 +11,6 @@
</div>
<div class="content" v-for="(item, index) in items.goodsTypeGroupRules.filter((v, i) => i == activeType)"
:key="index + 'ledger'">
<!-- <template v-if="(activeType == index)"> -->
<div class="part1">
<div class="tit">
<div class="line"></div>
......@@ -35,26 +34,30 @@
<div class="line"></div>
分账类型
</div>
<div class="cont">
<div class="msg">
<div class="msg-title">分账类型:</div>
<div class="msg-val">{{ getLederType(items.autoFlag, items.testFlag) }}</div>
</div>
<div class="msg">
<div class="msg-title">分账周期:</div>
<div class="msg-val"> T + {{ items.settleTime }}</div>
</div>
<div class="msg">
<div class="msg-title">费用归属设置:</div>
<div class="msg-val" v-html="getDistribute(item.owningMerchantDistributionRules)">
<div class="cont channelList" v-for="(child, childIndex) in items.divisionRuleAutos" :key="childIndex">
<div class="channel">
<div class="msg channel-item">
<div class="msg-title">分账渠道:</div>
<div class="msg-val">{{ child.paymentChannelName }}</div>
</div>
<div class="msg channel-item">
<div class="msg-title">分账类型:</div>
<div class="msg-val">{{ getLederType(child.autoFlag, child.testFlag) }}</div>
</div>
<div class="msg channel-item">
<div class="msg-title">分账周期:</div>
<div class="msg-val"> T + {{ child.settleTime }}</div>
</div>
</div>
</div>
<div class="cont">
<div class="msg">
<div class="msg-title">实际分账设置:</div>
<div class="msg-title">金额分配设置:</div>
<div class="msg-val" v-html="getDistribute(item.merchantDistributionRules)">
</div>
</div>
</div>
</div>
<div class="part1 part3">
<div class="tit">
......@@ -640,6 +643,32 @@ export default {
</script>
<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 {
.datePicker {
position: absolute;
......
......@@ -20,13 +20,15 @@
<!-- 分账 -->
<template v-if="activeName == 'first'">
<ledgerAccount :items="checkDetailItem" />
<ledgerAccount v-if="checkDetailItem" :items="checkDetailItem" />
<span v-else>暂无财务规则</span>
</template>
<!-- 对账 -->
<template v-if="activeName == 'second'">
<reconciliation v-if="checkRecordList" :form-item="checkRecordList"
:items="checkRecordList.goodsTypeGroupReconciliationRules || []" />
:items="checkRecordList.goodsTypeGroupReconciliationRules || []" />
<span v-else>暂无对账规则</span>
</template>
<div class="btns">
......@@ -327,7 +329,8 @@ $color: #2a58ad;
.type2 {
width: 66.66%;
.type-val{
.type-val {
display: inline-block !important;
width: calc(100% - 90px);
white-space: nowrap;
......
......@@ -12,17 +12,21 @@
</div>
</template>
</div>
<div class="content" v-for="(item, index) in detailInfo.goodsTypeGroupRules.filter((v, i) => i == activeType)"
:key="index + 'ledger'">
<div class="content channelList"
v-for="(item, index) in detailInfo.goodsTypeGroupRules.filter((v, i) => i == activeType)" :key="index + 'ledger'">
<!-- <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="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 class="type1">
<div class="type-name">分账周期:</div>
<div class="type-val"> T + {{ detailInfo.settleTime }}</div>
<div class="type-val"> T + {{ child.settleTime }}</div>
</div>
</div>
<div class="part1">
......@@ -608,10 +612,10 @@ $color: #2a58ad;
.type1 {
display: flex;
width: 50%;
width: 33%;
height: 38px;
line-height: 38px;
border-bottom: 1px solid #e5e5e5;
// border-bottom: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
box-sizing: border-box;
......@@ -644,6 +648,10 @@ $color: #2a58ad;
}
}
.white-table+.white-table {
border-bottom: 1px solid #e5e5e5;
}
.content {
.datePicker {
position: absolute;
......@@ -769,6 +777,23 @@ $color: #2a58ad;
}
}
.channelList {
padding-bottom: 0px;
.type1 {
flex: 1
}
}
.channelList {
padding-bottom: 0px !important;
.msg {
padding-bottom: 0px !important;
}
}
.more {
display: flex;
flex-direction: column;
......
......@@ -10,17 +10,13 @@
<div class="tips">说明:红色内容为本次规则的新增或修改部分</div>
<div class="merchant-info">
<!-- 分账 -->
<ledgerAccount v-if="merchantRow.ruleType == 1"
:items="checkDetailItem" :effectDateType="effectDateType" />
<ledgerAccount v-if="merchantRow.ruleType == 1" :items="checkDetailItem" :effectDateType="effectDateType" />
<!-- 对账 -->
<reconciliation v-if="merchantRow.ruleType == 3"
:form-item="checkRecordList"
:items="checkRecordList.goodsTypeGroupReconciliationRuleCTs || []"
:effectDateType="effectDateType"/>
<reconciliation v-if="merchantRow.ruleType == 3" :form-item="checkRecordList"
:items="checkRecordList.goodsTypeGroupReconciliationRuleCTs || []" :effectDateType="effectDateType" />
</div>
<div class="btns">
<el-button @click="handleConfirm"
type="primary">
<el-button @click="handleConfirm" type="primary">
审核
</el-button>
<el-button @click="cacel">
......@@ -123,10 +119,9 @@ $color: #2a58ad;
padding-bottom: 20px;
// overflow-y: auto;
.title {
}
.title {}
.tips{
.tips {
margin: 15px 0;
color: #F56C6C;
}
......@@ -138,6 +133,7 @@ $color: #2a58ad;
align-items: center;
justify-content: space-between;
}
.merchant-info {
margin-top: 20px;
}
......@@ -244,11 +240,10 @@ $color: #2a58ad;
font-size: 14px;
color: #666666;
.manner {
}
.manner {}
.online {
& + .online {
&+.online {
margin-left: 44px;
}
......@@ -301,7 +296,8 @@ $color: #2a58ad;
.type2 {
width: 66.66%;
.type-val{
.type-val {
display: inline-block !important;
width: calc(100% - 90px);
white-space: nowrap;
......@@ -311,6 +307,10 @@ $color: #2a58ad;
}
}
// .white-table:nth-child(2) {
// border-bottom: 1px solid #e5e5e5;
// }
.title-table {
font-size: 14px;
color: #333333;
......@@ -324,7 +324,7 @@ $color: #2a58ad;
background: #f2f4f7;
.cost {
& + .cost {
&+.cost {
border-left: 1px solid #e8e8ea;
}
......@@ -343,7 +343,7 @@ $color: #2a58ad;
justify-content: center;
align-items: center;
& + .detail-i {
&+.detail-i {
border-left: 1px solid #e8e8ea;
}
......@@ -371,7 +371,12 @@ $color: #2a58ad;
align-items: center;
}
}
.isRed{
.isRed {
color: #F56C6C !important;
}
.white-table+.white-table {
border-bottom: 1px solid #e5e5e5;
}
</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>
<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="wxcon">
<div class="codeDiv" id="wxview">
......@@ -13,7 +22,7 @@
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div>
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button>
@click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button>
</div>
<div class="alicon">
<div class="codeDiv" id="aliview">
......@@ -30,7 +39,7 @@
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div>
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载
@click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载
</el-button>
</div>
</div>
......@@ -39,8 +48,8 @@
</template>
<script>
// alipayQrcode
import { createWeappQrcode } from '@api/serviceManage'
import { createWeappQrcode, setDefaultPaymentChannel } from '@api/serviceManage'
import { paymentChannelList } from "@api/merchant"
import { baseConfig } from '@/main'
import html2canvas from 'html2canvas'
import QRCode from "qrcodejs2"
......@@ -48,6 +57,8 @@ export default {
name: 'QRcodeDialog',
data() {
return {
paymentChannelList: [],
paymentChannelId: '',
infoForm: {
merchantType: '',
merchant: [],
......@@ -61,7 +72,8 @@ export default {
},
qrCodeURL: '',
aliqrCodeURL: '',
defaultImg: require('./images/defaultImg.png')
defaultImg: require('./images/defaultImg.png'),
qrcode: ''
}
},
......@@ -84,11 +96,29 @@ export default {
components: {},
mounted() {
this.createQrcodeImage()
this.paymentChannelId = this.info.paymentChannelId
this.initPaymentChannelList()
this.alipayQrcode()
},
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
* @param {String} url 需要转换的图片原链接(http://....jpg)
......@@ -115,55 +145,23 @@ export default {
})
},
createQrcodeImage() {
console.log(this.paymentChannelList)
console.log(this.paymentChannelList.find(item => item.paymentChannelId == this.paymentChannelId))
const oParams = {}
oParams.channelType = 1
oParams.appId = 'wx06d1198e751435d1'
// oParams.appId = 'wx902f0b9c4b2c669d'
oParams.appId = this.paymentChannelList.find(item => item.paymentChannelId == this.paymentChannelId)?.payPlatform == 'allinpay' ? 'wx3d2ee7f8bda398cc' : 'wx06d1198e751435d1'
// oParams.appId = this.paymentChannelId == '8881A96B22B84A348263EE4F314A2A23' ? 'wx06d1198e751435d1' : 'wx3d2ee7f8bda398cc'
oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'packagesPayment/pages/QRPayment/QRPayment'
oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}`
// 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/#/`
oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}&paymentChannelId=${this.paymentChannelId}`
createWeappQrcode(oParams).then(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) {
// const opts = {
// useCORS: true
// }
const that = this
html2canvas(document.getElementById(eleId), {
backgroundColor: null,
......@@ -211,19 +209,24 @@ export default {
// 生成支付宝中间二维码
alipayQrcode() {
// 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(shareUrl)
setTimeout(() => {
console.log(document.getElementById('qrcodeDiv'))
const qrcode = new QRCode("qrcodeDiv", {
text: shareUrl,
width: 150, // 图像宽度
height: 150 // 图像高度
})
qrcode.clear() // 清除二维码
qrcode.makeCode(shareUrl) // 生成另一个新的二维码
this.aliqrCodeURL = qrcode
if (this.qrcode) {
this.qrcode.clear() // 清除二维码
} else {
this.qrcode = new QRCode("qrcodeDiv", {
text: shareUrl,
width: 150, // 图像宽度
height: 150 // 图像高度
})
}
// qrcode.clear() // 清除二维码
this.qrcode.makeCode(shareUrl) // 生成另一个新的二维码
this.aliqrCodeURL = this.qrcode
}, 500)
// this.$nextTick(() => {
......@@ -269,7 +272,7 @@ export default {
}
}
</script>
<style scoped>
<style scoped lang="scss">
.qrcon {
display: flex;
}
......@@ -288,7 +291,6 @@ export default {
height: 468px;
margin: 0px auto;
position: relative;
/* background-image: url('./images/code3.png'); */
}
.qrImg {
......@@ -296,10 +298,8 @@ export default {
width: 150px;
height: 150px;
left: 50%;
top: 42%;
/* transform: translateX(-50%); */
top: 40%;
transform: translate(-50%, -50%);
/* background-color: #d8d8d8; */
z-index: 2;
object-fit: contain;
/* transform: scale(0.95); */
......@@ -326,7 +326,7 @@ export default {
/* height: 20px; */
position: absolute;
left: 50%;
top: 63%;
top: 60%;
transform: translate(-50%, -50%);
text-align: center;
font-size: 14px;
......@@ -345,4 +345,12 @@ export default {
/* 自定义行数 */
-webkit-line-clamp: 2;
}
.channelBox {
margin: auto;
.elSelect {
margin: 0 10px 10px;
}
}
</style>
......@@ -18,33 +18,24 @@
<auth-button category="Button" />
</d2-table-header>
<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>
</d2-table>
<qrcode-dialog :q-rcode-visible="qRcodeVisible" :info="recordInfo" v-if="qRcodeVisible"
@dialogClose="dialogClose" />
@dialogClose="dialogClose" />
</div>
<wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog" v-if="QRcodeDialog" :merchant-info="recordInfo" />
<scene-entry-dialog :scene-entry-visible="sceneEntryVisible" :info="recordInfo" v-if="sceneEntryVisible"
@dialogClose="sceneDialogClose" />
@dialogClose="sceneDialogClose" />
</d2-container>
</template>
<script>
import { Util, deepClone } from '@/common/util'
// import _ from 'lodash'
import {
// getList,
// getMerchantList,
// addParentMerchant,
// deleteParentMerchant,
getYqMerchantConfig
} from '@api/serviceManage'
import { getYqMerchantConfig } from '@api/serviceManage'
import { mapActions } from 'vuex'
import { BaseData, manageTypeList } from '@/common/constants.js'
// import { sendSms, getAdminInfo } from '@api/merchant'
// import { getParkStore } from '@api/editCustomer'
import qrcodeDialog from './qRcodeDialog'
import wxQRcodeDialog from './wxQRcodeDialog'
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!