Selaa lähdekoodia

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

master
wq 3 viikkoa sitten
vanhempi
commit
01cd1d073d

+ 1
- 1
src/crud/components/DialogCollapse.operation.vue Näytä tiedosto

@@ -35,7 +35,7 @@
<div style="background-color: #999; height: 1px; flex: 1"></div>
</div>
<!-- 此处的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
style="position: relative"
v-if="

+ 2
- 2
src/crud/components/Search.operation.vue Näytä tiedosto

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

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

+ 5
- 5
src/views/onlineBusinessHall/productManagement/releaseProduct/index.vue Näytä tiedosto

@@ -1279,7 +1279,7 @@ function customSelectorSelection(
})
}
}
const totalPrices = ref(0)
const amount = ref(0)

const handleTotalPrices = (form) => {
// let equityPrice = 0
@@ -1297,7 +1297,7 @@ const handleTotalPrices = (form) => {
processingPrice = processingPrice < 0 ? 0 : processingPrice
}

form.totalPrices = processingPrice / 100
form.amount = processingPrice / 100
console.log(
'总金额',
form,
@@ -1305,7 +1305,7 @@ const handleTotalPrices = (form) => {
form.totalPrices,
dataForm.processingFeeList
)
totalPrices.value = form.totalPrices
amount.value = form.amount
}
const handleChangeExpenseType = (value, form) => {
field.value.dialogArray.forEach((item) => {
@@ -2101,14 +2101,14 @@ let field = ref<any>({
},
},
{
prop: 'totalPrices',
prop: 'amount',
label: '用户支付总金额',
hide: true,
unit: '元',
span: 3,
funRuleStarts: true,
funRule: (val) => {
return totalPrices.value
return amount.value
},
form: {
funRuleStarts: true,

+ 72
- 7
src/views/system/gateway/singInfo/data.js Näytä tiedosto

@@ -62,10 +62,8 @@ export const getZxqdFindConfig = (route, agencyIdList) => ({
label: "渠道编号",
funRuleStarts: true, //是否启用转换规则
funRule: (value) => {
console.log(value + '-------------------');
//自定义转换规则
return value + '1111==================='
return value
},
form: {
formLabelWidth: formLabelWidth,
@@ -96,7 +94,7 @@ export const getZxqdFindConfig = (route, agencyIdList) => ({
},
{
prop: "mchId",
label: "商户号",
label: "微信商户号",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
@@ -114,12 +112,33 @@ export const getZxqdFindConfig = (route, agencyIdList) => ({
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",
label: "subAppId",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
@@ -130,20 +149,66 @@ export const getZxqdFindConfig = (route, agencyIdList) => ({
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
},
{
prop: "version",
label: "版本",
prop: "planId",
label: "ETC授权扣费模板ID",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
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 Näytä tiedosto

@@ -1,7 +1,7 @@
<template>
<div>
<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">
<template #search>
<el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px"
@@ -66,6 +66,33 @@ function getList() {
})
}

//选择组件变化监听
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() {
BaseService.post('/userw/agency/agencyqueryall', {}).then((res: any) => {
if (res && res.statusCode === 0) {

+ 84
- 36
src/views/system/gateway/weChatInfo/data.js Näytä tiedosto

@@ -1,7 +1,14 @@
import { IsPermission } from "@/router/routerUtil";
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参数)
export const getZxqdFindConfig = (route) => ({
export const getZxqdFindConfig = (route, agencyIdList) => ({
tabSize: "small", //Table 的尺寸 large / default /small (默认default)
searchShow: true, //是否显示搜索模块(默认false) IsPermission(route, 'QUERY_BASE')
border: true, //是否添加边框(默认false)
@@ -70,38 +77,25 @@ export const getZxqdFindConfig = (route) => ({
label: '微信',
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",
label: "渠道编号",
funRuleStarts: true, //是否启用转换规则
funRule: (value) => {
//自定义转换规则
return value
},
form: {
formLabelWidth: formLabelWidth,
type: 'input',
type: 'select',
required: true,
listData: agencyIdList
}
},
{
@@ -124,20 +118,20 @@ export const getZxqdFindConfig = (route) => ({
disabled: false
}
},

{
prop: "payProductType",
label: "支付产品类型",
label: "产品类型",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
type: 'select',
required: true,
disabled: false
disabled: false,
listData: TRADE_TYPE
}
},
{
prop: "wxApiv3key",
label: "微信V3:apiV3Key",
prop: "wxAppId",
label: "微信appid",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
@@ -146,8 +140,8 @@ export const getZxqdFindConfig = (route) => ({
}
},
{
prop: "wxAppId",
label: "微信appid",
prop: "wxMchId",
label: "微信商户号",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
@@ -155,22 +149,44 @@ export const getZxqdFindConfig = (route) => ({
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",
label: "微信V2签名密钥",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
},
{
prop: "wxMchId",
label: "微信商户号",
prop: "wxApiv3key",
label: "微信V3:apiV3Key",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
@@ -182,6 +198,7 @@ export const getZxqdFindConfig = (route) => ({
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
@@ -189,10 +206,31 @@ export const getZxqdFindConfig = (route) => ({
{
prop: "wxSerialNo",
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',
required: true,
hide: true,
disabled: false
}
},
@@ -215,7 +253,17 @@ export const getZxqdFindConfig = (route) => ({
},
]
}
}
}, {
prop: "wxSubMchId",
label: "微信子商户号",
form: {
formLabelWidth: formLabelWidth,
type: 'input',
hide: true,
required: true,
disabled: false
}
},
]
});


+ 56
- 2
src/views/system/gateway/weChatInfo/index.vue Näytä tiedosto

@@ -2,7 +2,8 @@
<div>
<crud-template ref="crudRef" class="as-weight" :submit-state="false" :home-data="field" :tableData="tableData"
@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>
<el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px"
placeholder="请输入渠道编号" />
@@ -23,7 +24,8 @@ import { useRoute } from 'vue-router'
//或取路由传入过来的对象数据
const route = useRoute()
const widthBase = '120px';
const field = ref(getZxqdFindConfig(route));;
const agencyIdList = ref([])
const field = ref(getZxqdFindConfig(route, agencyIdList));;
const crudRef = ref()
//查询参数
const searchForm = ref({ agencyId: '' })
@@ -32,6 +34,7 @@ const itemStartValue = ref("1")

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

//获取列表
@@ -73,6 +76,57 @@ function itemEdit(idx: any, row: any) {
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) => {
request(data, itemStartValue.value)

Loading…
Peruuta
Tallenna