Sfoglia il codice sorgente

'2025年7月4日17:21:00'

master
wq 4 settimane fa
parent
commit
01cd1d073d

+ 1
- 1
src/crud/components/DialogCollapse.operation.vue Vedi File

<div style="background-color: #999; height: 1px; flex: 1"></div> <div style="background-color: #999; height: 1px; flex: 1"></div>
</div> </div>
<!-- 此处的width决定了是否要换行 v-show="!item.form.hide"--> <!-- 此处的width决定了是否要换行 v-show="!item.form.hide"-->
{{ form[item.form.prop ? item.form.prop : item.prop] }}
<!-- {{ form[item.form.prop ? item.form.prop : item.prop] }} -->
<el-form-item <el-form-item
style="position: relative" style="position: relative"
v-if=" v-if="

+ 2
- 2
src/crud/components/Search.operation.vue Vedi File

const upload = ref<UploadInstance>() const upload = ref<UploadInstance>()
function onSuccess(response: any) { function onSuccess(response: any) {
const { ossFilePath, originalFileName } = response.data const { ossFilePath, originalFileName } = response.data
const url = data.bucket + '/' + ossFilePath
// const url = data.bucket + '/' + ossFilePath
console.log(ossFilePath, originalFileName) console.log(ossFilePath, originalFileName)


emit('importData', url, originalFileName)
emit('importData', ossFilePath, originalFileName)
} }
const handleExceed: UploadProps['onExceed'] = (files) => { const handleExceed: UploadProps['onExceed'] = (files) => {
upload.value!.clearFiles() upload.value!.clearFiles()

+ 5
- 5
src/views/onlineBusinessHall/productManagement/releaseProduct/index.vue Vedi File

}) })
} }
} }
const totalPrices = ref(0)
const amount = ref(0)


const handleTotalPrices = (form) => { const handleTotalPrices = (form) => {
// let equityPrice = 0 // let equityPrice = 0
processingPrice = processingPrice < 0 ? 0 : processingPrice processingPrice = processingPrice < 0 ? 0 : processingPrice
} }


form.totalPrices = processingPrice / 100
form.amount = processingPrice / 100
console.log( console.log(
'总金额', '总金额',
form, form,
form.totalPrices, form.totalPrices,
dataForm.processingFeeList dataForm.processingFeeList
) )
totalPrices.value = form.totalPrices
amount.value = form.amount
} }
const handleChangeExpenseType = (value, form) => { const handleChangeExpenseType = (value, form) => {
field.value.dialogArray.forEach((item) => { field.value.dialogArray.forEach((item) => {
}, },
}, },
{ {
prop: 'totalPrices',
prop: 'amount',
label: '用户支付总金额', label: '用户支付总金额',
hide: true, hide: true,
unit: '元', unit: '元',
span: 3, span: 3,
funRuleStarts: true, funRuleStarts: true,
funRule: (val) => { funRule: (val) => {
return totalPrices.value
return amount.value
}, },
form: { form: {
funRuleStarts: true, funRuleStarts: true,

+ 72
- 7
src/views/system/gateway/singInfo/data.js Vedi File

label: "渠道编号", label: "渠道编号",
funRuleStarts: true, //是否启用转换规则 funRuleStarts: true, //是否启用转换规则
funRule: (value) => { funRule: (value) => {
console.log(value + '-------------------');
//自定义转换规则 //自定义转换规则
return value + '1111==================='
return value
}, },
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
}, },
{ {
prop: "mchId", prop: "mchId",
label: "商户号",
label: "微信商户号",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
disabled: false disabled: false
} }
}, },
{
prop: "version",
label: "版本",
form: {
formLabelWidth: formLabelWidth,
type: 'select',
required: true,
disabled: false,
listData: [
{
label: 'V2(蓝,绿)',
value: '2',
},
{
label: 'V3(黄)',
value: '3',
},
]
}
},
{ {
prop: "subAppId", prop: "subAppId",
label: "subAppId", label: "subAppId",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
hide: true,
required: true, required: true,
disabled: false disabled: false
} }
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
hide: true,
required: true, required: true,
disabled: false disabled: false
} }
}, },
{ {
prop: "version",
label: "版本",
prop: "planId",
label: "ETC授权扣费模板ID",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
hide: true,
required: true, required: true,
disabled: false disabled: false
} }
}
},
{
prop: "privateKey",
label: "微信V3私钥",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
},
{
prop: "serialNo",
label: "微信V3序列号",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
},
{
prop: "wxPublicKey",
label: "微信V3公钥",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
},
{
prop: "wxPublicKeyId",
label: "微信V3公钥ID",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
},
] ]
}); });



+ 28
- 1
src/views/system/gateway/singInfo/index.vue Vedi File

<template> <template>
<div> <div>
<crud-template ref="crudRef" class="as-weight" :submit-state="false" :home-data="field" :tableData="tableData" <crud-template ref="crudRef" class="as-weight" :submit-state="false" :home-data="field" :tableData="tableData"
@btnSearch="btnSearch" @CurrentChange="handleCurrentChange" @importData="importData"
@btnSearch="btnSearch" @CurrentChange="handleCurrentChange" @importData="importData" @customSelectorSelection="customSelectorSelection"
@refreshLeft="refreshLeft" @add="Adds" @cancel="cancel" @submit="submitAdd" @handleEdit="itemEdit"> @refreshLeft="refreshLeft" @add="Adds" @cancel="cancel" @submit="submitAdd" @handleEdit="itemEdit">
<template #search> <template #search>
<el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px" <el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px"
}) })
} }


//选择组件变化监听
function customSelectorSelection(value, title) {
console.log(value, title + '-----========');

if (title == 'version') {
crudRef.value.tableFrom.dialogArray.forEach((element, index) => {
//路由
if (element.prop == 'subAppId' || element.prop == 'subMchId') {
if (value == '2') {
crudRef.value.tableFrom.dialogArray[index].form.hide = false
} else {
crudRef.value.tableFrom.dialogArray[index].form.hide = true
}
}
if (element.prop == 'planId' || element.prop == 'privateKey' || element.prop == 'serialNo'
|| element.prop == 'wxPublicKey' || element.prop == 'wxPublicKeyId') {
if (value == '3') {
crudRef.value.tableFrom.dialogArray[index].form.hide = false
} else {
crudRef.value.tableFrom.dialogArray[index].form.hide = true
}
}
});
}
}


function getAgenCy() { function getAgenCy() {
BaseService.post('/userw/agency/agencyqueryall', {}).then((res: any) => { BaseService.post('/userw/agency/agencyqueryall', {}).then((res: any) => {
if (res && res.statusCode === 0) { if (res && res.statusCode === 0) {

+ 84
- 36
src/views/system/gateway/weChatInfo/data.js Vedi File

import { IsPermission } from "@/router/routerUtil"; import { IsPermission } from "@/router/routerUtil";
let formLabelWidth = '30%'; let formLabelWidth = '30%';
import {
computed
} from 'vue'
import $storeinitData from '@/store/initData' //引入tab vuex
const TRADE_TYPE = computed(() => {
return $storeinitData.state.dictData['TRADE_TYPE'] || []
})
// 表单数据配置(改为函数形式,接收route参数) // 表单数据配置(改为函数形式,接收route参数)
export const getZxqdFindConfig = (route) => ({
export const getZxqdFindConfig = (route, agencyIdList) => ({
tabSize: "small", //Table 的尺寸 large / default /small (默认default) tabSize: "small", //Table 的尺寸 large / default /small (默认default)
searchShow: true, //是否显示搜索模块(默认false) IsPermission(route, 'QUERY_BASE') searchShow: true, //是否显示搜索模块(默认false) IsPermission(route, 'QUERY_BASE')
border: true, //是否添加边框(默认false) border: true, //是否添加边框(默认false)
label: '微信', label: '微信',
value: 'WEIXINPAY', value: 'WEIXINPAY',
}, },
{
label: '支付宝',
value: 'ALIPAY',
},
]
}
}, {
prop: "wxPayVersion",
label: "微信支付版本",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
required: true,
disabled: false,
listData: [
{
label: 'V2',
value: '2',
},
{
label: 'V3',
value: '3',
},
// {
// label: '支付宝',
// value: 'ALIPAY',
// },
] ]
} }
}, { }, {
prop: "agencyId", prop: "agencyId",
label: "渠道编号", label: "渠道编号",
funRuleStarts: true, //是否启用转换规则
funRule: (value) => {
//自定义转换规则
return value
},
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input',
type: 'select',
required: true, required: true,
listData: agencyIdList
} }
}, },
{ {
disabled: false disabled: false
} }
}, },

{ {
prop: "payProductType", prop: "payProductType",
label: "支付产品类型",
label: "产品类型",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input',
type: 'select',
required: true, required: true,
disabled: false
disabled: false,
listData: TRADE_TYPE
} }
}, },
{ {
prop: "wxApiv3key",
label: "微信V3:apiV3Key",
prop: "wxAppId",
label: "微信appid",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
} }
}, },
{ {
prop: "wxAppId",
label: "微信appid",
prop: "wxMchId",
label: "微信商户号",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
disabled: false disabled: false
} }
}, },
{
prop: "wxPayVersion",
label: "支付版本",
form: {
formLabelWidth: formLabelWidth,
type: 'select',
required: true,
disabled: false,
listData: [
{
label: 'V2',
value: '2',
},
{
label: 'V3',
value: '3',
},
]
}
},
{ {
prop: "wxKey", prop: "wxKey",
label: "微信V2签名密钥", label: "微信V2签名密钥",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
hide: true,
required: true, required: true,
disabled: false disabled: false
} }
}, },
{ {
prop: "wxMchId",
label: "微信商户号",
prop: "wxApiv3key",
label: "微信V3:apiV3Key",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
hide: true,
required: true, required: true,
disabled: false disabled: false
} }
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
hide: true,
required: true, required: true,
disabled: false disabled: false
} }
{ {
prop: "wxSerialNo", prop: "wxSerialNo",
label: "微信V3证书序列号", label: "微信V3证书序列号",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
}, {
prop: "wxPublicKey",
label: "V3微信商户公钥",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
}, {
prop: "wxPublicKeyId",
label: "V3微信商户公钥ID",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'input', type: 'input',
required: true, required: true,
hide: true,
disabled: false disabled: false
} }
}, },
}, },
] ]
} }
}
}, {
prop: "wxSubMchId",
label: "微信子商户号",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
},
] ]
}); });



+ 56
- 2
src/views/system/gateway/weChatInfo/index.vue Vedi File

<div> <div>
<crud-template ref="crudRef" class="as-weight" :submit-state="false" :home-data="field" :tableData="tableData" <crud-template ref="crudRef" class="as-weight" :submit-state="false" :home-data="field" :tableData="tableData"
@btnSearch="btnSearch" @CurrentChange="handleCurrentChange" @importData="importData" @btnSearch="btnSearch" @CurrentChange="handleCurrentChange" @importData="importData"
@refreshLeft="refreshLeft" @add="Adds" @cancel="cancel" @submit="submitAdd" @handleEdit="itemEdit">
@customSelectorSelection="customSelectorSelection" @refreshLeft="refreshLeft" @add="Adds" @cancel="cancel"
@submit="submitAdd" @handleEdit="itemEdit">
<template #search> <template #search>
<el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px" <el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px"
placeholder="请输入渠道编号" /> placeholder="请输入渠道编号" />
//或取路由传入过来的对象数据 //或取路由传入过来的对象数据
const route = useRoute() const route = useRoute()
const widthBase = '120px'; const widthBase = '120px';
const field = ref(getZxqdFindConfig(route));;
const agencyIdList = ref([])
const field = ref(getZxqdFindConfig(route, agencyIdList));;
const crudRef = ref() const crudRef = ref()
//查询参数 //查询参数
const searchForm = ref({ agencyId: '' }) const searchForm = ref({ agencyId: '' })


onMounted(() => { onMounted(() => {
getList() getList()
getAgenCy()
}) })


//获取列表 //获取列表
itemStartValue.value = 2 itemStartValue.value = 2
} }


//选择组件变化监听
function customSelectorSelection(value, title) {
console.log(value, title + '-----========');

if (title == 'wxPayVersion') {
crudRef.value.tableFrom.dialogArray.forEach((element, index) => {
//路由
if (element.prop == 'wxKey') {
if (value == '2') {
crudRef.value.tableFrom.dialogArray[index].form.hide = false
} else {
crudRef.value.tableFrom.dialogArray[index].form.hide = true
}
}
if (element.prop == 'wxApiv3key' || element.prop == 'wxPrivatekey' || element.prop == 'wxSerialNo'
|| element.prop == 'wxPublicKey' || element.prop == 'wxPublicKeyId') {
if (value == '3') {
crudRef.value.tableFrom.dialogArray[index].form.hide = false
} else {
crudRef.value.tableFrom.dialogArray[index].form.hide = true
}
}
});
} else if (title == 'wxServiceType') {
crudRef.value.tableFrom.dialogArray.forEach((element, index) => {
//路由
if (element.prop == 'wxSubMchId') {
if (value == '2') {
crudRef.value.tableFrom.dialogArray[index].form.hide = false
} else {
crudRef.value.tableFrom.dialogArray[index].form.hide = true
}
}
});
}
}
function getAgenCy() {
BaseService.post('/userw/agency/agencyqueryall', {}).then((res: any) => {
if (res && res.statusCode === 0) {
//数据转换 .agencyQueryAllModels
let bizContent = res.data
agencyIdList.value = bizContent.map((item) => {
return { label: item.name, value: item.agencyId }
})
console.log(agencyIdList.value, 'agencyIdList.value')
} else {
ElMessage.error(res.message)
}
})
}

// 添加 // 添加
const submitAdd = (data: any) => { const submitAdd = (data: any) => {
request(data, itemStartValue.value) request(data, itemStartValue.value)

Loading…
Annulla
Salva