1635 changed files with 5036 additions and 42441 deletions
@ -0,0 +1,8 @@ |
|||||
|
# api请求地址 |
||||
|
VITE_APP_BASE_URL='http://zhjwxt.test/adminapi/' |
||||
|
|
||||
|
# 图片服务器地址 |
||||
|
VITE_IMG_DOMAIN='' |
||||
|
|
||||
|
# 请求时header中token的参数名 |
||||
|
VITE_REQUEST_HEADER_TOKEN_KEY='token' |
||||
@ -0,0 +1,9 @@ |
|||||
|
# api请求地址 |
||||
|
VITE_APP_BASE_URL='http://146.56.228.75:20024/adminapi/' |
||||
|
# VITE_APP_BASE_URL='https://zh.hnhbty.cn/adminapi/' |
||||
|
|
||||
|
# 图片服务器地址 |
||||
|
VITE_IMG_DOMAIN='' |
||||
|
|
||||
|
# 请求时header中token的参数名 |
||||
|
VITE_REQUEST_HEADER_TOKEN_KEY='token' |
||||
@ -0,0 +1,5 @@ |
|||||
|
// Generated by 'unplugin-auto-import'
|
||||
|
export {} |
||||
|
declare global { |
||||
|
const ElNotification: typeof import('element-plus/es')['ElNotification'] |
||||
|
} |
||||
@ -0,0 +1,60 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
// USER_CODE_BEGIN -- campus_pay
|
||||
|
/** |
||||
|
* 获取账户及资金管理列表 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getCampusPayList(params: Record<string, any>) { |
||||
|
return request.get(`campus_pay/campus_pay`, {params}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取账户及资金管理详情 |
||||
|
* @param id 账户及资金管理id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getCampusPayInfo(id: number) { |
||||
|
return request.get(`campus_pay/campus_pay/${id}`); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加账户及资金管理 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function addCampusPay(params: Record<string, any>) { |
||||
|
return request.post('campus_pay/campus_pay', params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑账户及资金管理 |
||||
|
* @param id |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function editCampusPay(params: Record<string, any>) { |
||||
|
return request.put(`campus_pay/campus_pay/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除账户及资金管理 |
||||
|
* @param id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function deleteCampusPay(id: number) { |
||||
|
return request.delete(`campus_pay/campus_pay/${id}`, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
export function getWithCampusList(params: Record<string,any>){ |
||||
|
return request.get('campus_pay/campus_all', {params}) |
||||
|
} |
||||
|
|
||||
|
// USER_CODE_END -- campus_pay
|
||||
@ -0,0 +1,25 @@ |
|||||
|
{ |
||||
|
"id":"", |
||||
|
"idPlaceholder":"请输入", |
||||
|
"campusId":"校区", |
||||
|
"campusIdPlaceholder":"全部", |
||||
|
"mchid":"商户号", |
||||
|
"mchidPlaceholder":"请输入商户号", |
||||
|
"paySignKey":"APIv3密钥", |
||||
|
"paySignKeyPlaceholder":"请输入APIv3密钥", |
||||
|
"apiclientKey":"商户私钥", |
||||
|
"apiclientKeyPlaceholder":"请输入商户私钥", |
||||
|
"apiclientCert":"商户公钥", |
||||
|
"apiclientCertPlaceholder":"请输入商户公钥", |
||||
|
"wxPayKey":"微信支付公钥", |
||||
|
"wxPayKeyPlaceholder":"请输入微信支付公钥", |
||||
|
"wxPayKeyId":"微信支付公钥ID", |
||||
|
"wxPayKeyIdPlaceholder":"请输入微信支付公钥ID", |
||||
|
"createdAt":"创建时间", |
||||
|
"createdAtPlaceholder":"请输入创建时间", |
||||
|
"addCampusPay":"添加账户及资金管理", |
||||
|
"updateCampusPay":"编辑账户及资金管理", |
||||
|
"campusPayDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间" |
||||
|
} |
||||
@ -1,21 +1,20 @@ |
|||||
{ |
{ |
||||
"id": "报销编号", |
"applicantId":"申请人", |
||||
"idPlaceholder": "请输入报销编号", |
"applicantIdPlaceholder":"请输入申请人", |
||||
"applicantId": "申请人ID", |
"amount":"报销金额", |
||||
"applicantIdPlaceholder": "请输入申请人ID", |
"amountPlaceholder":"请输入报销金额", |
||||
"amount": "报销金额", |
"description":"报销描述", |
||||
"amountPlaceholder": "请输入报销金额", |
"descriptionPlaceholder":"请输入报销描述", |
||||
"description": "报销描述", |
"receiptUrl":"发票或收据", |
||||
"descriptionPlaceholder": "请输入报销描述", |
"receiptUrlPlaceholder":"请输入发票或收据", |
||||
"receiptUrl": "发票或收据URL", |
"status":"状态", |
||||
"receiptUrlPlaceholder": "请输入发票或收据URL", |
"statusPlaceholder":"请输入状态", |
||||
"status": "状态", |
"createdAt":"创建时间", |
||||
"statusPlaceholder": "请输入状态", |
"createdAtPlaceholder":"请输入创建时间", |
||||
"processId": "关联的审批流程ID", |
"updatedAt":"修改时间", |
||||
"processIdPlaceholder": "请输入关联的审批流程ID", |
"addReimbursement":"添加报销记录", |
||||
"addReimbursement": "添加报销记录", |
"updateReimbursement":"编辑报销记录", |
||||
"updateReimbursement": "编辑报销记录", |
"reimbursementDeleteTips":"确定要删除该数据吗?", |
||||
"reimbursementDeleteTips": "确定要删除该数据吗?", |
"startDate":"请选择开始时间", |
||||
"startDate": "请选择开始时间", |
"endDate":"请选择结束时间" |
||||
"endDate": "请选择结束时间" |
|
||||
} |
} |
||||
@ -1,33 +1,31 @@ |
|||||
{ |
{ |
||||
"id": "工资编号", |
"staffId":"员工", |
||||
"idPlaceholder": "请输入工资编号", |
"staffIdPlaceholder":"全部", |
||||
"staffId": "员工ID", |
"departmentId":"部门", |
||||
"staffIdPlaceholder": "请输入员工ID", |
"departmentIdPlaceholder":"全部", |
||||
"baseSalary": "底薪", |
"baseSalary":"底薪", |
||||
"baseSalaryPlaceholder": "请输入底薪", |
"baseSalaryPlaceholder":"请输入底薪", |
||||
"performanceBonus": "绩效", |
"performanceBonus":"绩效", |
||||
"performanceBonusPlaceholder": "请输入绩效", |
"performanceBonusPlaceholder":"请输入绩效", |
||||
"deductions": "扣款", |
"deductions":"扣款", |
||||
"deductionsPlaceholder": "请输入扣款", |
"deductionsPlaceholder":"请输入扣款", |
||||
"otherSubsidies": "其他补贴", |
"otherSubsidies":"其他补贴", |
||||
"otherSubsidiesPlaceholder": "请输入其他补贴", |
"otherSubsidiesPlaceholder":"请输入其他补贴", |
||||
"netSalary": "实发工资", |
"netSalary":"实发工资", |
||||
"netSalaryPlaceholder": "请输入实发工资", |
"paymentStatus":"发放状态", |
||||
"paymentStatus": "发放状态", |
"paymentStatusPlaceholder":"请输入发放状态", |
||||
"paymentStatusPlaceholder": "请输入发放状态", |
"paymentMethod":"发放方式", |
||||
"paymentMethod": "发放方式", |
"paymentMethodPlaceholder":"请输入发放方式", |
||||
"paymentMethodPlaceholder": "请输入发放方式", |
"remarks":"备注", |
||||
"remarks": "备注", |
"remarksPlaceholder":"请输入备注", |
||||
"remarksPlaceholder": "请输入备注", |
"salaryMonth":"工资月份", |
||||
"salaryMonth": "工资月份", |
"salaryMonthPlaceholder":"请输入工资月份", |
||||
"salaryMonthPlaceholder": "请输入工资月份", |
"createdAt":"创建时间", |
||||
"departmentId": "部门ID", |
"createdAtPlaceholder":"请输入创建时间", |
||||
"departmentIdPlaceholder": "请输入部门ID", |
"updatedAt":"修改时间", |
||||
"processId": "关联的审批流程ID", |
"addSalary":"添加工资", |
||||
"processIdPlaceholder": "请输入关联的审批流程ID", |
"updateSalary":"编辑工资", |
||||
"addSalary": "添加工资", |
"salaryDeleteTips":"确定要删除该数据吗?", |
||||
"updateSalary": "编辑工资", |
"startDate":"请选择开始时间", |
||||
"salaryDeleteTips": "确定要删除该数据吗?", |
"endDate":"请选择结束时间" |
||||
"startDate": "请选择开始时间", |
|
||||
"endDate": "请选择结束时间" |
|
||||
} |
} |
||||
@ -1,29 +1,27 @@ |
|||||
{ |
{ |
||||
"id": "服务编号", |
"serviceName":"服务名称", |
||||
"idPlaceholder": "请输入服务编号", |
"serviceNamePlaceholder":"请输入服务名称", |
||||
"serviceName": "服务名称", |
"previewImageUrl":"服务预览图", |
||||
"serviceNamePlaceholder": "请输入服务名称", |
"previewImageUrlPlaceholder":"请输入服务预览图", |
||||
"previewImageUrl": "服务预览图URL", |
"description":"服务描述", |
||||
"previewImageUrlPlaceholder": "请输入服务预览图URL", |
"descriptionPlaceholder":"请输入服务描述", |
||||
"description": "服务描述", |
"serviceType":"服务类型", |
||||
"descriptionPlaceholder": "请输入服务描述", |
"serviceTypePlaceholder":"请输入服务类型", |
||||
"serviceType": "服务类型", |
"executionRules":"服务执行规则", |
||||
"serviceTypePlaceholder": "请输入服务类型", |
"executionRulesPlaceholder":"请输入服务执行规则", |
||||
"executionRules": "服务执行规则", |
"staffReminder":"是否员工提醒", |
||||
"executionRulesPlaceholder": "请输入服务执行规则", |
"staffReminderPlaceholder":"请输入是否员工提醒", |
||||
"staffReminder": "是否员工提醒: 1-是, 0-否", |
"customerReminder":"是否客户提醒", |
||||
"staffReminderPlaceholder": "请输入是否员工提醒: 1-是, 0-否", |
"customerReminderPlaceholder":"请输入是否客户提醒", |
||||
"customerReminder": "是否客户提醒: 1-是, 0-否", |
"customerConfirmation":"是否客户确认", |
||||
"customerReminderPlaceholder": "请输入是否客户提醒: 1-是, 0-否", |
"customerConfirmationPlaceholder":"请输入是否客户确认", |
||||
"customerConfirmation": "是否客户确认: 1-是, 0-否", |
"customerFeedback":"客户反馈内容", |
||||
"customerConfirmationPlaceholder": "请输入是否客户确认: 1-是, 0-否", |
"customerFeedbackPlaceholder":"请输入客户反馈内容", |
||||
"customerFeedback": "客户反馈内容", |
"status":"状态", |
||||
"customerFeedbackPlaceholder": "请输入客户反馈内容", |
"statusPlaceholder":"请输入状态", |
||||
"status": "状态", |
"addService":"添加服务", |
||||
"statusPlaceholder": "请输入状态", |
"updateService":"编辑服务", |
||||
"addService": "添加服务", |
"serviceDeleteTips":"确定要删除该数据吗?", |
||||
"updateService": "编辑服务", |
"startDate":"请选择开始时间", |
||||
"serviceDeleteTips": "确定要删除该数据吗?", |
"endDate":"请选择结束时间" |
||||
"startDate": "请选择开始时间", |
|
||||
"endDate": "请选择结束时间" |
|
||||
} |
} |
||||
@ -1,15 +1,13 @@ |
|||||
{ |
{ |
||||
"id": "反馈编号", |
"userId":"客户名称", |
||||
"idPlaceholder": "请输入反馈编号", |
"userIdPlaceholder":"全部", |
||||
"userId": "用户ID", |
"feedbackText":"反馈内容", |
||||
"userIdPlaceholder": "请输入用户ID", |
"feedbackTextPlaceholder":"请输入反馈内容", |
||||
"feedbackText": "反馈内容", |
"attachmentUrl":"附件", |
||||
"feedbackTextPlaceholder": "请输入反馈内容", |
"attachmentUrlPlaceholder":"请输入附件", |
||||
"attachmentUrl": "附件URL(OSS对象存储)", |
"addUserFeedback":"添加用户反馈信息", |
||||
"attachmentUrlPlaceholder": "请输入附件URL(OSS对象存储)", |
"updateUserFeedback":"查看用户反馈信息", |
||||
"addUserFeedback": "添加用户反馈信息", |
"userFeedbackDeleteTips":"确定要删除该数据吗?", |
||||
"updateUserFeedback": "编辑用户反馈信息", |
"startDate":"请选择开始时间", |
||||
"userFeedbackDeleteTips": "确定要删除该数据吗?", |
"endDate":"请选择结束时间" |
||||
"startDate": "请选择开始时间", |
|
||||
"endDate": "请选择结束时间" |
|
||||
} |
} |
||||
@ -0,0 +1,183 @@ |
|||||
|
<template> |
||||
|
<div class="main-container"> |
||||
|
<el-card class="box-card !border-none" shadow="never"> |
||||
|
|
||||
|
<div class="flex justify-between items-center"> |
||||
|
<span class="text-lg">{{pageName}}</span> |
||||
|
<el-button type="primary" @click="addEvent"> |
||||
|
{{ t('addCampusPay') }} |
||||
|
</el-button> |
||||
|
</div> |
||||
|
|
||||
|
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
||||
|
<el-form :inline="true" :model="campusPayTable.searchParam" ref="searchFormRef"> |
||||
|
|
||||
|
<el-form-item :label="t('campusId')" prop="campus_id"> |
||||
|
<el-select class="w-[280px]" v-model="campusPayTable.searchParam.campus_id" clearable :placeholder="t('campusIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in campusIdList" |
||||
|
:key="index" |
||||
|
:label="item['campus_name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('createdAt')" prop="created_at"> |
||||
|
<el-date-picker v-model="campusPayTable.searchParam.created_at" type="datetimerange" format="YYYY-MM-DD hh:mm:ss" |
||||
|
:start-placeholder="t('startDate')" :end-placeholder="t('endDate')" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="loadCampusPayList()">{{ t('search') }}</el-button> |
||||
|
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
|
||||
|
<div class="mt-[10px]"> |
||||
|
<el-table :data="campusPayTable.data" size="large" v-loading="campusPayTable.loading"> |
||||
|
<template #empty> |
||||
|
<span>{{ !campusPayTable.loading ? t('emptyData') : '' }}</span> |
||||
|
</template> |
||||
|
<el-table-column prop="campus_id_name" :label="t('campusId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="mchid" :label="t('mchid')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="created_at" :label="t('createdAt')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column :label="t('operation')" fixed="right" min-width="120"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button> |
||||
|
<el-button type="primary" link @click="deleteEvent(row.id)">{{ t('delete') }}</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
</el-table> |
||||
|
<div class="mt-[16px] flex justify-end"> |
||||
|
<el-pagination v-model:current-page="campusPayTable.page" v-model:page-size="campusPayTable.limit" |
||||
|
layout="total, sizes, prev, pager, next, jumper" :total="campusPayTable.total" |
||||
|
@size-change="loadCampusPayList()" @current-change="loadCampusPayList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<edit ref="editCampusPayDialog" @complete="loadCampusPayList" /> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import { getCampusPayList, deleteCampusPay, getWithCampusList } from '@/app/api/campus_pay' |
||||
|
import { img } from '@/utils/common' |
||||
|
import { ElMessageBox,FormInstance } from 'element-plus' |
||||
|
import Edit from '@/app/views/campus_pay/components/campus-pay-edit.vue' |
||||
|
import { useRoute } from 'vue-router' |
||||
|
const route = useRoute() |
||||
|
const pageName = route.meta.title; |
||||
|
|
||||
|
let campusPayTable = reactive({ |
||||
|
page: 1, |
||||
|
limit: 10, |
||||
|
total: 0, |
||||
|
loading: true, |
||||
|
data: [], |
||||
|
searchParam:{ |
||||
|
"campus_id":"", |
||||
|
"created_at":[] |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const searchFormRef = ref<FormInstance>() |
||||
|
|
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取账户及资金管理列表 |
||||
|
*/ |
||||
|
const loadCampusPayList = (page: number = 1) => { |
||||
|
campusPayTable.loading = true |
||||
|
campusPayTable.page = page |
||||
|
|
||||
|
getCampusPayList({ |
||||
|
page: campusPayTable.page, |
||||
|
limit: campusPayTable.limit, |
||||
|
...campusPayTable.searchParam |
||||
|
}).then(res => { |
||||
|
campusPayTable.loading = false |
||||
|
campusPayTable.data = res.data.data |
||||
|
campusPayTable.total = res.data.total |
||||
|
}).catch(() => { |
||||
|
campusPayTable.loading = false |
||||
|
}) |
||||
|
} |
||||
|
loadCampusPayList() |
||||
|
|
||||
|
const editCampusPayDialog: Record<string, any> | null = ref(null) |
||||
|
|
||||
|
/** |
||||
|
* 添加账户及资金管理 |
||||
|
*/ |
||||
|
const addEvent = () => { |
||||
|
editCampusPayDialog.value.setFormData() |
||||
|
editCampusPayDialog.value.showDialog = true |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑账户及资金管理 |
||||
|
* @param data |
||||
|
*/ |
||||
|
const editEvent = (data: any) => { |
||||
|
editCampusPayDialog.value.setFormData(data) |
||||
|
editCampusPayDialog.value.showDialog = true |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除账户及资金管理 |
||||
|
*/ |
||||
|
const deleteEvent = (id: number) => { |
||||
|
ElMessageBox.confirm(t('campusPayDeleteTips'), t('warning'), |
||||
|
{ |
||||
|
confirmButtonText: t('confirm'), |
||||
|
cancelButtonText: t('cancel'), |
||||
|
type: 'warning', |
||||
|
} |
||||
|
).then(() => { |
||||
|
deleteCampusPay(id).then(() => { |
||||
|
loadCampusPayList() |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const campusIdList = ref([]) |
||||
|
const setCampusIdList = async () => { |
||||
|
campusIdList.value = await (await getWithCampusList({})).data |
||||
|
} |
||||
|
setCampusIdList() |
||||
|
|
||||
|
const resetForm = (formEl: FormInstance | undefined) => { |
||||
|
if (!formEl) return |
||||
|
formEl.resetFields() |
||||
|
loadCampusPayList() |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
/* 多行超出隐藏 */ |
||||
|
.multi-hidden { |
||||
|
word-break: break-all; |
||||
|
text-overflow: ellipsis; |
||||
|
overflow: hidden; |
||||
|
display: -webkit-box; |
||||
|
-webkit-line-clamp: 2; |
||||
|
-webkit-box-orient: vertical; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,216 @@ |
|||||
|
<template> |
||||
|
<el-dialog v-model="showDialog" :title="formData.id ? t('updateCampusPay') : t('addCampusPay')" width="50%" class="diy-dialog-wrap" :destroy-on-close="true"> |
||||
|
<el-form :model="formData" label-width="120px" ref="formRef" :rules="formRules" class="page-form" v-loading="loading"> |
||||
|
<el-form-item :label="t('campusId')" prop="campus_id"> |
||||
|
<el-select class="input-width" v-model="formData.campus_id" clearable :placeholder="t('campusIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in campusIdList" |
||||
|
:key="index" |
||||
|
:label="item['campus_name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('mchid')" prop="mchid"> |
||||
|
<el-input v-model="formData.mchid" clearable :placeholder="t('mchidPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('paySignKey')" prop="pay_sign_key"> |
||||
|
<el-input v-model="formData.pay_sign_key" clearable :placeholder="t('paySignKeyPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('apiclientKey')"> |
||||
|
<upload-file v-model="formData.apiclient_key" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('apiclientCert')"> |
||||
|
<upload-file v-model="formData.apiclient_cert" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('wxPayKey')"> |
||||
|
<upload-file v-model="formData.wx_pay_key" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('wxPayKeyId')" prop="wx_pay_key_id"> |
||||
|
<el-input v-model="formData.wx_pay_key_id" clearable :placeholder="t('wxPayKeyIdPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
</el-form> |
||||
|
|
||||
|
<template #footer> |
||||
|
<span class="dialog-footer"> |
||||
|
<el-button @click="showDialog = false">{{ t('cancel') }}</el-button> |
||||
|
<el-button type="primary" :loading="loading" @click="confirm(formRef)">{{ |
||||
|
t('confirm') |
||||
|
}}</el-button> |
||||
|
</span> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { ref, reactive, computed, watch } from 'vue' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import { t } from '@/lang' |
||||
|
import type { FormInstance } from 'element-plus' |
||||
|
import { addCampusPay, editCampusPay, getCampusPayInfo, getWithCampusList } from '@/app/api/campus_pay' |
||||
|
|
||||
|
let showDialog = ref(false) |
||||
|
const loading = ref(false) |
||||
|
|
||||
|
/** |
||||
|
* 表单数据 |
||||
|
*/ |
||||
|
const initialFormData = { |
||||
|
id: '', |
||||
|
campus_id: '', |
||||
|
mchid: '', |
||||
|
pay_sign_key: '', |
||||
|
apiclient_key: '', |
||||
|
apiclient_cert: '', |
||||
|
wx_pay_key: '', |
||||
|
wx_pay_key_id: '', |
||||
|
} |
||||
|
const formData: Record<string, any> = reactive({ ...initialFormData }) |
||||
|
|
||||
|
const formRef = ref<FormInstance>() |
||||
|
|
||||
|
// 表单验证规则 |
||||
|
const formRules = computed(() => { |
||||
|
return { |
||||
|
campus_id: [ |
||||
|
{ required: true, message: t('campusIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
mchid: [ |
||||
|
{ required: true, message: t('mchidPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
pay_sign_key: [ |
||||
|
{ required: true, message: t('paySignKeyPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
apiclient_key: [ |
||||
|
{ required: true, message: t('apiclientKeyPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
apiclient_cert: [ |
||||
|
{ required: true, message: t('apiclientCertPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
wx_pay_key: [ |
||||
|
{ required: true, message: t('wxPayKeyPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
wx_pay_key_id: [ |
||||
|
{ required: true, message: t('wxPayKeyIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const emit = defineEmits(['complete']) |
||||
|
|
||||
|
/** |
||||
|
* 确认 |
||||
|
* @param formEl |
||||
|
*/ |
||||
|
const confirm = async (formEl: FormInstance | undefined) => { |
||||
|
if (loading.value || !formEl) return |
||||
|
let save = formData.id ? editCampusPay : addCampusPay |
||||
|
|
||||
|
await formEl.validate(async (valid) => { |
||||
|
if (valid) { |
||||
|
loading.value = true |
||||
|
|
||||
|
let data = formData |
||||
|
|
||||
|
save(data).then(res => { |
||||
|
loading.value = false |
||||
|
showDialog.value = false |
||||
|
emit('complete') |
||||
|
}).catch(err => { |
||||
|
loading.value = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 获取字典数据 |
||||
|
|
||||
|
|
||||
|
|
||||
|
const campusIdList = ref([] as any[]) |
||||
|
const setCampusIdList = async () => { |
||||
|
campusIdList.value = await (await getWithCampusList({})).data |
||||
|
} |
||||
|
setCampusIdList() |
||||
|
const setFormData = async (row: any = null) => { |
||||
|
Object.assign(formData, initialFormData) |
||||
|
loading.value = true |
||||
|
if(row){ |
||||
|
const data = await (await getCampusPayInfo(row.id)).data |
||||
|
if (data) Object.keys(formData).forEach((key: string) => { |
||||
|
if (data[key] != undefined) formData[key] = data[key] |
||||
|
}) |
||||
|
} |
||||
|
loading.value = false |
||||
|
} |
||||
|
|
||||
|
// 验证手机号格式 |
||||
|
const mobileVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^1[3-9]\d{9}$/.test(value)) { |
||||
|
callback(new Error(t('generateMobile'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证身份证号 |
||||
|
const idCardVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value)) { |
||||
|
callback(new Error(t('generateIdCard'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证邮箱号 |
||||
|
const emailVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(value)) { |
||||
|
callback(new Error(t('generateEmail'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证请输入整数 |
||||
|
const numberVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (!Number.isInteger(value)) { |
||||
|
callback(new Error(t('generateNumber'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
defineExpose({ |
||||
|
showDialog, |
||||
|
setFormData |
||||
|
}) |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped></style> |
||||
|
<style lang="scss"> |
||||
|
.diy-dialog-wrap .el-form-item__label{ |
||||
|
height: auto !important; |
||||
|
} |
||||
|
</style> |
||||
@ -1,496 +1,396 @@ |
|||||
<template> |
<template> |
||||
<div class="main-container"> |
<div class="main-container"> |
||||
<el-card class="box-card !border-none" shadow="never"> |
<el-card class="box-card !border-none" shadow="never"> |
||||
<div class="flex justify-between items-center"> |
|
||||
<span class="text-lg">{{ pageName }}</span> |
<div class="flex justify-between items-center"> |
||||
<el-button |
<span class="text-lg">{{pageName}}</span> |
||||
type="primary" |
<el-button type="primary" @click="addEvent" v-if="customerResourcesTable.searchParam.type == 'khzy'"> |
||||
@click="addEvent" |
{{ t('addCustomerResources') }} |
||||
v-if="customerResourcesTable.searchParam.type == 'khzy'" |
</el-button> |
||||
> |
</div> |
||||
{{ t('addCustomerResources') }} |
|
||||
</el-button> |
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
||||
</div> |
<el-form :inline="true" :model="customerResourcesTable.searchParam" ref="searchFormRef"> |
||||
|
<el-form-item :label="t('name')" prop="name"> |
||||
<el-card |
<el-input v-model="customerResourcesTable.searchParam.name" |
||||
class="box-card !border-none my-[10px] table-search-wrap" |
:placeholder="t('namePlaceholder')" /> |
||||
shadow="never" |
</el-form-item> |
||||
> |
|
||||
<el-form |
<el-form-item label="年龄" prop="age"> |
||||
:inline="true" |
<el-input v-model="customerResourcesTable.searchParam.age" placeholder="请输入年龄" /> |
||||
:model="customerResourcesTable.searchParam" |
</el-form-item> |
||||
ref="searchFormRef" |
|
||||
> |
|
||||
<el-form-item :label="t('name')" prop="name"> |
<el-form-item label="性别" prop="gender"> |
||||
<el-input |
<el-select v-model="customerResourcesTable.searchParam.gender" placeholder="请选择性别"> |
||||
v-model="customerResourcesTable.searchParam.name" |
<el-option label="男性" value="male" /> |
||||
:placeholder="t('namePlaceholder')" |
<el-option label="女性" value="female" /> |
||||
/> |
<el-option label="其他" value="other" /> |
||||
</el-form-item> |
</el-select> |
||||
|
</el-form-item> |
||||
<el-form-item label="年龄" prop="age"> |
|
||||
<el-input |
|
||||
v-model="customerResourcesTable.searchParam.age" |
|
||||
placeholder="请输入年龄" |
<el-form-item :label="t('phoneNumber')" prop="phone_number"> |
||||
/> |
<el-input v-model="customerResourcesTable.searchParam.phone_number" |
||||
</el-form-item> |
:placeholder="t('phoneNumberPlaceholder')" /> |
||||
|
</el-form-item> |
||||
<el-form-item label="性别" prop="gender"> |
|
||||
<el-select |
|
||||
v-model="customerResourcesTable.searchParam.gender" |
<el-form-item label="创建时间"> |
||||
placeholder="请选择性别" |
<el-date-picker v-model="customerResourcesTable.searchParam.created_at" type="daterange" range-separator="至" |
||||
> |
start-placeholder="开始日期" end-placeholder="结束日期" format="YYYY-MM-DD" |
||||
<el-option label="男性" value="male" /> |
value-format="YYYY-MM-DD" /> |
||||
<el-option label="女性" value="female" /> |
</el-form-item> |
||||
<el-option label="其他" value="other" /> |
|
||||
</el-select> |
<!-- 更新时间 --> |
||||
</el-form-item> |
<el-form-item label="更新时间"> |
||||
|
<el-date-picker v-model="customerResourcesTable.searchParam.updated_at" type="daterange" range-separator="至" |
||||
<el-form-item :label="t('phoneNumber')" prop="phone_number"> |
start-placeholder="开始日期" end-placeholder="结束日期" format="YYYY-MM-DD" |
||||
<el-input |
value-format="YYYY-MM-DD" /> |
||||
v-model="customerResourcesTable.searchParam.phone_number" |
</el-form-item> |
||||
:placeholder="t('phoneNumberPlaceholder')" |
|
||||
/> |
|
||||
</el-form-item> |
<el-form-item> |
||||
|
<el-button type="primary" @click="loadCustomerResourcesList()">{{ t('search') }}</el-button> |
||||
<el-form-item label="创建时间"> |
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
||||
<el-date-picker |
</el-form-item> |
||||
v-model="customerResourcesTable.searchParam.created_at" |
</el-form> |
||||
type="daterange" |
</el-card> |
||||
range-separator="至" |
|
||||
start-placeholder="开始日期" |
<div class="mt-[10px]"> |
||||
end-placeholder="结束日期" |
<el-table :data="customerResourcesTable.data" size="large" v-loading="customerResourcesTable.loading"> |
||||
format="YYYY-MM-DD" |
<template #empty> |
||||
value-format="YYYY-MM-DD" |
<span>{{ !customerResourcesTable.loading ? t('emptyData') : '' }}</span> |
||||
/> |
</template> |
||||
</el-form-item> |
<el-table-column :label="t('source')" min-width="180" align="center" :show-overflow-tooltip="true"> |
||||
|
<template #default="{ row }"> |
||||
<!-- 更新时间 --> |
<div v-for="(item, index) in sourceList"> |
||||
<el-form-item label="更新时间"> |
<div v-if="item.value == row.source">{{ item.name }}</div> |
||||
<el-date-picker |
</div> |
||||
v-model="customerResourcesTable.searchParam.updated_at" |
</template> |
||||
type="daterange" |
</el-table-column> |
||||
range-separator="至" |
|
||||
start-placeholder="开始日期" |
<el-table-column prop="consultant_name" :label="t('consultant')" min-width="120" |
||||
end-placeholder="结束日期" |
:show-overflow-tooltip="true" /> |
||||
format="YYYY-MM-DD" |
|
||||
value-format="YYYY-MM-DD" |
<el-table-column prop="name" :label="t('name')" min-width="120" :show-overflow-tooltip="true" /> |
||||
/> |
|
||||
</el-form-item> |
<el-table-column prop="age" :label="t('age')" min-width="50" :show-overflow-tooltip="true" /> |
||||
|
|
||||
<el-form-item> |
<el-table-column :label="t('gender')" min-width="60" align="center" :show-overflow-tooltip="true"> |
||||
<el-button type="primary" @click="loadCustomerResourcesList()">{{ |
<template #default="{ row }"> |
||||
t('search') |
<div v-for="(item, index) in genderList"> |
||||
}}</el-button> |
<div v-if="item.value == row.gender">{{ item.name }}</div> |
||||
<el-button @click="resetForm(searchFormRef)">{{ |
</div> |
||||
t('reset') |
</template> |
||||
}}</el-button> |
</el-table-column> |
||||
</el-form-item> |
|
||||
</el-form> |
<el-table-column prop="phone_number" :label="t('phoneNumber')" min-width="120" |
||||
</el-card> |
:show-overflow-tooltip="true" /> |
||||
|
|
||||
<div class="mt-[10px]"> |
<el-table-column prop="decision_maker" :label="t('decisionMaker')" min-width="120" |
||||
<el-table |
:show-overflow-tooltip="true" /> |
||||
:data="customerResourcesTable.data" |
|
||||
size="large" |
|
||||
v-loading="customerResourcesTable.loading" |
<el-table-column |
||||
> |
prop="member_label" |
||||
<template #empty> |
label="会员标签" |
||||
<span>{{ |
min-width="120" |
||||
!customerResourcesTable.loading ? t('emptyData') : '' |
align="center" |
||||
}}</span> |
> |
||||
</template> |
<template #default="{ row }"> |
||||
<el-table-column |
<div class="flex flex-col items-center"> |
||||
:label="t('source')" |
<div |
||||
min-width="180" |
v-for="(item, key) in row.member_label_array" |
||||
align="center" |
class="my-[3px]" |
||||
:show-overflow-tooltip="true" |
:key="key" |
||||
> |
> |
||||
<template #default="{ row }"> |
<el-tag type="info">{{ item.label_name }}</el-tag> |
||||
<div v-for="(item, index) in sourceList"> |
</div> |
||||
<div v-if="item.value == row.source">{{ item.name }}</div> |
</div> |
||||
</div> |
</template> |
||||
</template> |
</el-table-column> |
||||
</el-table-column> |
|
||||
|
|
||||
<el-table-column |
<el-table-column prop="created_at" label="添加时间" min-width="120" :show-overflow-tooltip="true" /> |
||||
prop="consultant_name" |
|
||||
:label="t('consultant')" |
<el-table-column prop="updated_at" label="修改时间" min-width="120" :show-overflow-tooltip="true" /> |
||||
min-width="120" |
|
||||
:show-overflow-tooltip="true" |
|
||||
/> |
<el-table-column :label="t('operation')" fixed="right" min-width="200" v-if="customerResourcesTable.searchParam.type == 'khzy'"> |
||||
|
<template #default="{ row }"> |
||||
<el-table-column |
<el-button type="primary" link @click="modificationLog(row.id)">六要素修改记录</el-button> |
||||
prop="name" |
<el-button type="primary" link @click="resourceChanges(row.id)">客户信息修改记录</el-button> |
||||
:label="t('name')" |
<el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button> |
||||
min-width="120" |
<el-button type="primary" link @click="deleteEvent(row.id)">{{ t('delete') }}</el-button> |
||||
:show-overflow-tooltip="true" |
|
||||
/> |
</template> |
||||
|
</el-table-column> |
||||
<el-table-column |
|
||||
prop="age" |
|
||||
:label="t('age')" |
|
||||
min-width="50" |
<el-table-column :label="t('operation')" fixed="right" min-width="200" |
||||
:show-overflow-tooltip="true" |
v-if="customerResourcesTable.searchParam.type == 'yjfp'"> |
||||
/> |
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="fpEvent(row)">分配</el-button> |
||||
<el-table-column |
</template> |
||||
:label="t('gender')" |
</el-table-column> |
||||
min-width="60" |
|
||||
align="center" |
|
||||
:show-overflow-tooltip="true" |
<el-table-column :label="t('operation')" fixed="right" min-width="200" |
||||
> |
v-if="customerResourcesTable.searchParam.type == 'zylb'"> |
||||
<template #default="{ row }"> |
<template #default="{ row }"> |
||||
<div v-for="(item, index) in genderList"> |
<el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button> |
||||
<div v-if="item.value == row.gender">{{ item.name }}</div> |
|
||||
</div> |
<el-button type="primary" link @click="addOrder({'resource_id':row.id})">添加订单</el-button> |
||||
</template> |
|
||||
</el-table-column> |
<el-button type="primary" link @click="tcEvent({'resource_id':row.id})">体测</el-button> |
||||
|
</template> |
||||
<el-table-column |
</el-table-column> |
||||
prop="phone_number" |
|
||||
:label="t('phoneNumber')" |
</el-table> |
||||
min-width="120" |
<div class="mt-[16px] flex justify-end"> |
||||
:show-overflow-tooltip="true" |
<el-pagination v-model:current-page="customerResourcesTable.page" |
||||
/> |
v-model:page-size="customerResourcesTable.limit" |
||||
|
layout="total, sizes, prev, pager, next, jumper" :total="customerResourcesTable.total" |
||||
<el-table-column |
@size-change="loadCustomerResourcesList()" @current-change="loadCustomerResourcesList" /> |
||||
prop="decision_maker" |
</div> |
||||
:label="t('decisionMaker')" |
</div> |
||||
min-width="120" |
|
||||
:show-overflow-tooltip="true" |
<edit ref="editCustomerResourcesDialog" @complete="loadCustomerResourcesList" /> |
||||
/> |
|
||||
|
<fp ref="fpCustomerResourcesDialog" @complete="loadCustomerResourcesList" /> |
||||
<el-table-column |
|
||||
prop="created_at" |
<Order ref="editOrderTableDialog" @complete="loadCustomerResourcesList" /> |
||||
label="添加时间" |
|
||||
min-width="120" |
<tc ref="TcCustomerResourcesDialog" @complete="loadCustomerResourcesList" /> |
||||
:show-overflow-tooltip="true" |
|
||||
/> |
</el-card> |
||||
|
</div> |
||||
<el-table-column |
|
||||
prop="updated_at" |
|
||||
label="修改时间" |
|
||||
min-width="120" |
|
||||
:show-overflow-tooltip="true" |
|
||||
/> |
|
||||
|
|
||||
<el-table-column |
|
||||
:label="t('operation')" |
|
||||
fixed="right" |
|
||||
min-width="200" |
|
||||
v-if="customerResourcesTable.searchParam.type == 'khzy'" |
|
||||
> |
|
||||
<template #default="{ row }"> |
|
||||
<el-button type="primary" link @click="modificationLog(row.id)" |
|
||||
>六要素修改记录</el-button |
|
||||
> |
|
||||
<el-button type="primary" link @click="resourceChanges(row.id)" |
|
||||
>客户信息修改记录</el-button |
|
||||
> |
|
||||
<el-button type="primary" link @click="editEvent(row)">{{ |
|
||||
t('edit') |
|
||||
}}</el-button> |
|
||||
<el-button type="primary" link @click="deleteEvent(row.id)">{{ |
|
||||
t('delete') |
|
||||
}}</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
|
|
||||
<el-table-column |
|
||||
:label="t('operation')" |
|
||||
fixed="right" |
|
||||
min-width="200" |
|
||||
v-if="customerResourcesTable.searchParam.type == 'yjfp'" |
|
||||
> |
|
||||
<template #default="{ row }"> |
|
||||
<el-button type="primary" link @click="fpEvent(row)" |
|
||||
>分配</el-button |
|
||||
> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
|
|
||||
<el-table-column |
|
||||
:label="t('operation')" |
|
||||
fixed="right" |
|
||||
min-width="200" |
|
||||
v-if="customerResourcesTable.searchParam.type == 'zylb'" |
|
||||
> |
|
||||
<template #default="{ row }"> |
|
||||
<el-button type="primary" link @click="editEvent(row)">{{ |
|
||||
t('edit') |
|
||||
}}</el-button> |
|
||||
|
|
||||
<el-button |
|
||||
type="primary" |
|
||||
link |
|
||||
@click="addOrder({ resource_id: row.id })" |
|
||||
>添加订单</el-button |
|
||||
> |
|
||||
|
|
||||
<el-button |
|
||||
type="primary" |
|
||||
link |
|
||||
@click="tcEvent({ resource_id: row.id })" |
|
||||
>体测</el-button |
|
||||
> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<div class="mt-[16px] flex justify-end"> |
|
||||
<el-pagination |
|
||||
v-model:current-page="customerResourcesTable.page" |
|
||||
v-model:page-size="customerResourcesTable.limit" |
|
||||
layout="total, sizes, prev, pager, next, jumper" |
|
||||
:total="customerResourcesTable.total" |
|
||||
@size-change="loadCustomerResourcesList()" |
|
||||
@current-change="loadCustomerResourcesList" |
|
||||
/> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<edit |
|
||||
ref="editCustomerResourcesDialog" |
|
||||
@complete="loadCustomerResourcesList" |
|
||||
/> |
|
||||
|
|
||||
<fp |
|
||||
ref="fpCustomerResourcesDialog" |
|
||||
@complete="loadCustomerResourcesList" |
|
||||
/> |
|
||||
|
|
||||
<Order ref="editOrderTableDialog" @complete="loadCustomerResourcesList" /> |
|
||||
|
|
||||
<tc |
|
||||
ref="TcCustomerResourcesDialog" |
|
||||
@complete="loadCustomerResourcesList" |
|
||||
/> |
|
||||
</el-card> |
|
||||
</div> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script lang="ts" setup> |
<script lang="ts" setup> |
||||
import { reactive, ref, watch } from 'vue' |
import { reactive, ref, watch } from 'vue' |
||||
import { t } from '@/lang' |
import { t } from '@/lang' |
||||
import { useDictionary } from '@/app/api/dict' |
import { useDictionary } from '@/app/api/dict' |
||||
import { |
import { getCustomerResourcesList, deleteCustomerResources, getWithPersonnelList, getWithCampusList } from '@/app/api/customer_resources' |
||||
getCustomerResourcesList, |
import { img } from '@/utils/common' |
||||
deleteCustomerResources, |
import { ElMessageBox, FormInstance } from 'element-plus' |
||||
getWithPersonnelList, |
import Edit from '@/app/views/customer_resources/components/customer-resources-edit.vue' |
||||
getWithCampusList, |
import Fp from '@/app/views/customer_resources/components/fp.vue' |
||||
} from '@/app/api/customer_resources' |
import Order from '@/app/views/order_table/components/order-table-edit.vue' |
||||
import { img } from '@/utils/common' |
import Tc from '@/app/views/tc_dialog/tc_dialog.vue' |
||||
import { ElMessageBox, FormInstance } from 'element-plus' |
|
||||
import Edit from '@/app/views/customer_resources/components/customer-resources-edit.vue' |
import { getMemberLabelAll } from '@/app/api/member' |
||||
import Fp from '@/app/views/customer_resources/components/fp.vue' |
|
||||
import Order from '@/app/views/order_table/components/order-table-edit.vue' |
import { useRouter, useRoute } from 'vue-router' |
||||
|
const route = useRoute() |
||||
import Tc from '@/app/views/tc_dialog/tc_dialog.vue' |
const pageName = route.meta.title; |
||||
|
const router = useRouter() |
||||
import { useRouter, useRoute } from 'vue-router' |
|
||||
const route = useRoute() |
let customerResourcesTable = reactive({ |
||||
const pageName = route.meta.title |
page: 1, |
||||
const router = useRouter() |
limit: 10, |
||||
|
total: 0, |
||||
let customerResourcesTable = reactive({ |
loading: true, |
||||
page: 1, |
data: [], |
||||
limit: 10, |
searchParam: { |
||||
total: 0, |
"name": "", |
||||
loading: true, |
"age": "", |
||||
data: [], |
"gender": "", |
||||
searchParam: { |
"phone_number": "", |
||||
name: '', |
"member_label" : "", |
||||
age: '', |
'type': '', |
||||
gender: '', |
"created_at" : "", |
||||
phone_number: '', |
"updated_at" : "" |
||||
type: '', |
} |
||||
created_at: '', |
}) |
||||
updated_at: '', |
|
||||
}, |
if (pageName == '业绩分配') { |
||||
}) |
customerResourcesTable.searchParam.type = 'yjfp'; |
||||
|
} else if (pageName == '客户资源列表') { |
||||
if (pageName == '业绩分配') { |
customerResourcesTable.searchParam.type = 'khzy'; |
||||
customerResourcesTable.searchParam.type = 'yjfp' |
} else if (pageName == '资源列表') { |
||||
} else if (pageName == '客户资源列表') { |
customerResourcesTable.searchParam.type = 'zylb'; |
||||
customerResourcesTable.searchParam.type = 'khzy' |
} |
||||
} else if (pageName == '资源列表') { |
|
||||
customerResourcesTable.searchParam.type = 'zylb' |
// const type = pageName == '业绩分配' ? 'yjfp' : 'khzy'; |
||||
} |
|
||||
|
// 获取全部标签 |
||||
// const type = pageName == '业绩分配' ? 'yjfp' : 'khzy'; |
const labelSelectData = ref([]) |
||||
|
const getMemberLabelAllFn = async () => { |
||||
const modificationLog = (id: number) => { |
labelSelectData.value = await (await getMemberLabelAll()).data |
||||
router.push({ |
} |
||||
path: '/six_speed_modification_log/six_speed_modification_log', |
getMemberLabelAllFn() |
||||
query: { id: id }, |
|
||||
}) |
|
||||
} |
const modificationLog = (id : number) => { |
||||
|
router.push({ path: '/six_speed_modification_log/six_speed_modification_log', query: { id: id } }) |
||||
const resourceChanges = (id: number) => { |
} |
||||
router.push({ |
|
||||
path: '/customer_resource_changes/customer_resource_changes', |
const resourceChanges = (id : number) => { |
||||
query: { id: id }, |
router.push({ path: '/customer_resource_changes/customer_resource_changes', query: { id: id } }) |
||||
}) |
} |
||||
} |
|
||||
|
|
||||
/** |
/** |
||||
* 添加订单 |
* 添加订单 |
||||
*/ |
*/ |
||||
const editOrderTableDialog: Record<string, any> | null = ref(null) |
const editOrderTableDialog : Record<string, any> | null = ref(null) |
||||
const addOrder = (row: any) => { |
const addOrder = (row : any) => { |
||||
console.log(row) |
|
||||
editOrderTableDialog.value.setFormData(row) |
console.log(row); |
||||
editOrderTableDialog.value.showDialog = true |
editOrderTableDialog.value.setFormData(row) |
||||
} |
editOrderTableDialog.value.showDialog = true |
||||
|
} |
||||
const TcCustomerResourcesDialog: Record<string, any> | null = ref(null) |
|
||||
const tcEvent = (row: any) => { |
|
||||
TcCustomerResourcesDialog.value.setFormData(row) |
const TcCustomerResourcesDialog : Record<string, any> | null = ref(null) |
||||
TcCustomerResourcesDialog.value.showDialog = true |
const tcEvent = (row : any) => { |
||||
} |
TcCustomerResourcesDialog.value.setFormData(row) |
||||
|
TcCustomerResourcesDialog.value.showDialog = true |
||||
const searchFormRef = ref<FormInstance>() |
} |
||||
|
|
||||
// 选中数据 |
|
||||
const selectData = ref<any[]>([]) |
|
||||
|
|
||||
// 字典数据 |
const searchFormRef = ref<FormInstance>() |
||||
const sourceList = ref([] as any[]) |
|
||||
const sourceDictList = async () => { |
// 选中数据 |
||||
sourceList.value = await (await useDictionary('source')).data.dictionary |
const selectData = ref<any[]>([]) |
||||
} |
|
||||
sourceDictList() |
// 字典数据 |
||||
const source_channelList = ref([] as any[]) |
const sourceList = ref([] as any[]) |
||||
const source_channelDictList = async () => { |
const sourceDictList = async () => { |
||||
source_channelList.value = await ( |
sourceList.value = await (await useDictionary('source')).data.dictionary |
||||
await useDictionary('SourceChannel') |
} |
||||
).data.dictionary |
sourceDictList(); |
||||
} |
const source_channelList = ref([] as any[]) |
||||
source_channelDictList() |
const source_channelDictList = async () => { |
||||
const genderList = ref([] as any[]) |
source_channelList.value = await (await useDictionary('SourceChannel')).data.dictionary |
||||
const genderDictList = async () => { |
} |
||||
genderList.value = await (await useDictionary('zy_sex')).data.dictionary |
source_channelDictList(); |
||||
} |
const genderList = ref([] as any[]) |
||||
genderDictList() |
const genderDictList = async () => { |
||||
const purchasing_powerList = ref([] as any[]) |
genderList.value = await (await useDictionary('zy_sex')).data.dictionary |
||||
const purchasing_powerDictList = async () => { |
} |
||||
purchasing_powerList.value = await ( |
genderDictList(); |
||||
await useDictionary('customer_purchasing_power') |
const purchasing_powerList = ref([] as any[]) |
||||
).data.dictionary |
const purchasing_powerDictList = async () => { |
||||
} |
purchasing_powerList.value = await (await useDictionary('customer_purchasing_power')).data.dictionary |
||||
purchasing_powerDictList() |
} |
||||
const cognitive_ideaList = ref([] as any[]) |
purchasing_powerDictList(); |
||||
const cognitive_ideaDictList = async () => { |
const cognitive_ideaList = ref([] as any[]) |
||||
cognitive_ideaList.value = await ( |
const cognitive_ideaDictList = async () => { |
||||
await useDictionary('cognitive_concept') |
cognitive_ideaList.value = await (await useDictionary('cognitive_concept')).data.dictionary |
||||
).data.dictionary |
} |
||||
} |
cognitive_ideaDictList(); |
||||
cognitive_ideaDictList() |
const initial_intentList = ref([] as any[]) |
||||
const initial_intentList = ref([] as any[]) |
const initial_intentDictList = async () => { |
||||
const initial_intentDictList = async () => { |
initial_intentList.value = await (await useDictionary('preliminarycustomerintention')).data.dictionary |
||||
initial_intentList.value = await ( |
} |
||||
await useDictionary('preliminarycustomerintention') |
initial_intentDictList(); |
||||
).data.dictionary |
const statusList = ref([] as any[]) |
||||
} |
const statusDictList = async () => { |
||||
initial_intentDictList() |
statusList.value = await (await useDictionary('kh_status')).data.dictionary |
||||
const statusList = ref([] as any[]) |
} |
||||
const statusDictList = async () => { |
statusDictList(); |
||||
statusList.value = await (await useDictionary('kh_status')).data.dictionary |
|
||||
} |
|
||||
statusDictList() |
/** |
||||
|
* 获取客户资源列表 |
||||
/** |
*/ |
||||
* 获取客户资源列表 |
const loadCustomerResourcesList = (page : number = 1) => { |
||||
*/ |
customerResourcesTable.loading = true |
||||
const loadCustomerResourcesList = (page: number = 1) => { |
customerResourcesTable.page = page |
||||
customerResourcesTable.loading = true |
|
||||
customerResourcesTable.page = page |
getCustomerResourcesList({ |
||||
|
page: customerResourcesTable.page, |
||||
getCustomerResourcesList({ |
limit: customerResourcesTable.limit, |
||||
page: customerResourcesTable.page, |
...customerResourcesTable.searchParam |
||||
limit: customerResourcesTable.limit, |
}).then(res => { |
||||
...customerResourcesTable.searchParam, |
customerResourcesTable.loading = false |
||||
}) |
customerResourcesTable.data = res.data.data |
||||
.then((res) => { |
customerResourcesTable.total = res.data.total |
||||
customerResourcesTable.loading = false |
}).catch(() => { |
||||
customerResourcesTable.data = res.data.data |
customerResourcesTable.loading = false |
||||
customerResourcesTable.total = res.data.total |
}) |
||||
}) |
} |
||||
.catch(() => { |
loadCustomerResourcesList() |
||||
customerResourcesTable.loading = false |
|
||||
}) |
const editCustomerResourcesDialog : Record<string, any> | null = ref(null) |
||||
} |
|
||||
loadCustomerResourcesList() |
const fpCustomerResourcesDialog : Record<string, any> | null = ref(null) |
||||
|
|
||||
const editCustomerResourcesDialog: Record<string, any> | null = ref(null) |
/** |
||||
|
* 添加客户资源 |
||||
const fpCustomerResourcesDialog: Record<string, any> | null = ref(null) |
*/ |
||||
|
const addEvent = () => { |
||||
/** |
editCustomerResourcesDialog.value.setFormData() |
||||
* 添加客户资源 |
editCustomerResourcesDialog.value.showDialog = true |
||||
*/ |
} |
||||
const addEvent = () => { |
|
||||
editCustomerResourcesDialog.value.setFormData() |
/** |
||||
editCustomerResourcesDialog.value.showDialog = true |
* 编辑客户资源 |
||||
} |
* @param data |
||||
|
*/ |
||||
/** |
const editEvent = (data : any) => { |
||||
* 编辑客户资源 |
editCustomerResourcesDialog.value.setFormData(data) |
||||
* @param data |
editCustomerResourcesDialog.value.showDialog = true |
||||
*/ |
} |
||||
const editEvent = (data: any) => { |
|
||||
editCustomerResourcesDialog.value.setFormData(data) |
const fpEvent = (data : any) => { |
||||
editCustomerResourcesDialog.value.showDialog = true |
fpCustomerResourcesDialog.value.setFormData(data) |
||||
} |
fpCustomerResourcesDialog.value.showDialog = true |
||||
|
} |
||||
const fpEvent = (data: any) => { |
|
||||
fpCustomerResourcesDialog.value.setFormData(data) |
|
||||
fpCustomerResourcesDialog.value.showDialog = true |
/** |
||||
} |
* 删除客户资源 |
||||
|
*/ |
||||
/** |
const deleteEvent = (id : number) => { |
||||
* 删除客户资源 |
ElMessageBox.confirm(t('customerResourcesDeleteTips'), t('warning'), |
||||
*/ |
{ |
||||
const deleteEvent = (id: number) => { |
confirmButtonText: t('confirm'), |
||||
ElMessageBox.confirm(t('customerResourcesDeleteTips'), t('warning'), { |
cancelButtonText: t('cancel'), |
||||
confirmButtonText: t('confirm'), |
type: 'warning', |
||||
cancelButtonText: t('cancel'), |
} |
||||
type: 'warning', |
).then(() => { |
||||
}).then(() => { |
deleteCustomerResources(id).then(() => { |
||||
deleteCustomerResources(id) |
loadCustomerResourcesList() |
||||
.then(() => { |
}).catch(() => { |
||||
loadCustomerResourcesList() |
}) |
||||
}) |
}) |
||||
.catch(() => {}) |
} |
||||
}) |
|
||||
} |
|
||||
|
const consultantList = ref([]) |
||||
const consultantList = ref([]) |
const setConsultantList = async () => { |
||||
const setConsultantList = async () => { |
consultantList.value = await (await getWithPersonnelList({})).data |
||||
consultantList.value = await (await getWithPersonnelList({})).data |
} |
||||
} |
setConsultantList() |
||||
setConsultantList() |
const campusList = ref([]) |
||||
const campusList = ref([]) |
const setCampusList = async () => { |
||||
const setCampusList = async () => { |
campusList.value = await (await getWithCampusList({})).data |
||||
campusList.value = await (await getWithCampusList({})).data |
} |
||||
} |
setCampusList() |
||||
setCampusList() |
|
||||
|
const resetForm = (formEl : FormInstance | undefined) => { |
||||
const resetForm = (formEl: FormInstance | undefined) => { |
if (!formEl) return |
||||
if (!formEl) return |
formEl.resetFields() |
||||
formEl.resetFields() |
loadCustomerResourcesList() |
||||
loadCustomerResourcesList() |
} |
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
/* 多行超出隐藏 */ |
/* 多行超出隐藏 */ |
||||
.multi-hidden { |
.multi-hidden { |
||||
word-break: break-all; |
word-break: break-all; |
||||
text-overflow: ellipsis; |
text-overflow: ellipsis; |
||||
overflow: hidden; |
overflow: hidden; |
||||
display: -webkit-box; |
display: -webkit-box; |
||||
-webkit-line-clamp: 2; |
-webkit-line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
-webkit-box-orient: vertical; |
||||
} |
} |
||||
</style> |
</style> |
||||
@ -0,0 +1,102 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace app\adminapi\controller\campus_pay; |
||||
|
|
||||
|
use core\base\BaseAdminController; |
||||
|
use app\service\admin\campus_pay\CampusPayService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 账户及资金管理控制器 |
||||
|
* Class CampusPay |
||||
|
* @package app\adminapi\controller\campus_pay |
||||
|
*/ |
||||
|
class CampusPay extends BaseAdminController |
||||
|
{ |
||||
|
/** |
||||
|
* 获取账户及资金管理列表 |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function lists(){ |
||||
|
$data = $this->request->params([ |
||||
|
["campus_id",""], |
||||
|
["created_at",["",""]] |
||||
|
]); |
||||
|
return success((new CampusPayService())->getPage($data)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 账户及资金管理详情 |
||||
|
* @param int $id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function info(int $id){ |
||||
|
return success((new CampusPayService())->getInfo($id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加账户及资金管理 |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function add(){ |
||||
|
$data = $this->request->params([ |
||||
|
["campus_id",0], |
||||
|
["mchid",""], |
||||
|
["pay_sign_key",""], |
||||
|
["apiclient_key",""], |
||||
|
["apiclient_cert",""], |
||||
|
["wx_pay_key",""], |
||||
|
["wx_pay_key_id",""], |
||||
|
|
||||
|
]); |
||||
|
$this->validate($data, 'app\validate\campus_pay\CampusPay.add'); |
||||
|
$id = (new CampusPayService())->add($data); |
||||
|
return success('ADD_SUCCESS', ['id' => $id]); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 账户及资金管理编辑 |
||||
|
* @param $id 账户及资金管理id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function edit(int $id){ |
||||
|
$data = $this->request->params([ |
||||
|
["campus_id",0], |
||||
|
["mchid",""], |
||||
|
["pay_sign_key",""], |
||||
|
["apiclient_key",""], |
||||
|
["apiclient_cert",""], |
||||
|
["wx_pay_key",""], |
||||
|
["wx_pay_key_id",""], |
||||
|
|
||||
|
]); |
||||
|
$this->validate($data, 'app\validate\campus_pay\CampusPay.edit'); |
||||
|
(new CampusPayService())->edit($id, $data); |
||||
|
return success('EDIT_SUCCESS'); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 账户及资金管理删除 |
||||
|
* @param $id 账户及资金管理id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function del(int $id){ |
||||
|
(new CampusPayService())->del($id); |
||||
|
return success('DELETE_SUCCESS'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function getCampusAll(){ |
||||
|
return success(( new CampusPayService())->getCampusAll()); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,42 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
use think\facade\Route; |
||||
|
|
||||
|
use app\adminapi\middleware\AdminCheckRole; |
||||
|
use app\adminapi\middleware\AdminCheckToken; |
||||
|
use app\adminapi\middleware\AdminLog; |
||||
|
|
||||
|
|
||||
|
|
||||
|
// USER_CODE_BEGIN -- campus_pay |
||||
|
|
||||
|
Route::group('campus_pay', function () { |
||||
|
|
||||
|
//账户及资金管理列表 |
||||
|
Route::get('campus_pay', 'campus_pay.CampusPay/lists'); |
||||
|
//账户及资金管理详情 |
||||
|
Route::get('campus_pay/:id', 'campus_pay.CampusPay/info'); |
||||
|
//添加账户及资金管理 |
||||
|
Route::post('campus_pay', 'campus_pay.CampusPay/add'); |
||||
|
//编辑账户及资金管理 |
||||
|
Route::put('campus_pay/:id', 'campus_pay.CampusPay/edit'); |
||||
|
//删除账户及资金管理 |
||||
|
Route::delete('campus_pay/:id', 'campus_pay.CampusPay/del'); |
||||
|
|
||||
|
Route::get('campus_all','campus_pay.CampusPay/getCampusAll'); |
||||
|
|
||||
|
})->middleware([ |
||||
|
AdminCheckToken::class, |
||||
|
AdminCheckRole::class, |
||||
|
AdminLog::class |
||||
|
]); |
||||
|
// USER_CODE_END -- campus_pay |
||||
@ -0,0 +1,98 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace app\model\campus_pay; |
||||
|
|
||||
|
use core\base\BaseModel; |
||||
|
use think\model\concern\SoftDelete; |
||||
|
use think\model\relation\HasMany; |
||||
|
use think\model\relation\HasOne; |
||||
|
|
||||
|
use app\model\campus\Campus; |
||||
|
|
||||
|
/** |
||||
|
* 账户及资金管理模型 |
||||
|
* Class CampusPay |
||||
|
* @package app\model\campus_pay |
||||
|
*/ |
||||
|
class CampusPay extends BaseModel |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 数据表主键 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $pk = 'id'; |
||||
|
|
||||
|
/** |
||||
|
* 模型名称 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $name = 'campus_pay'; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 搜索器:账户及资金管理 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchIdAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("id", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:账户及资金管理校区 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchCampusIdAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("campus_id", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:账户及资金管理创建时间 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchCreatedAtAttr($query, $value, $data) |
||||
|
{ |
||||
|
$start = empty($value[0]) ? 0 : strtotime($value[0]); |
||||
|
$end = empty($value[1]) ? 0 : strtotime($value[1]); |
||||
|
if ($start > 0 && $end > 0) { |
||||
|
$query->where([["created_at", "between", [$start, $end]]]); |
||||
|
} else if ($start > 0 && $end == 0) { |
||||
|
$query->where([["created_at", ">=", $start]]); |
||||
|
} else if ($start == 0 && $end > 0) { |
||||
|
$query->where([["created_at", "<=", $end]]); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
public function campus(){ |
||||
|
return $this->hasOne(Campus::class, 'id', 'campus_id')->joinType('left')->withField('campus_name,id')->bind(['campus_id_name'=>'campus_name']); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,105 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace app\service\admin\campus_pay; |
||||
|
|
||||
|
use app\model\campus_pay\CampusPay; |
||||
|
use app\model\campus\Campus; |
||||
|
|
||||
|
use core\base\BaseAdminService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 账户及资金管理服务层 |
||||
|
* Class CampusPayService |
||||
|
* @package app\service\admin\campus_pay |
||||
|
*/ |
||||
|
class CampusPayService extends BaseAdminService |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
$this->model = new CampusPay(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取账户及资金管理列表 |
||||
|
* @param array $where |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function getPage(array $where = []) |
||||
|
{ |
||||
|
$field = 'id,campus_id,mchid,pay_sign_key,apiclient_key,apiclient_cert,wx_pay_key,wx_pay_key_id,created_at,updated_at'; |
||||
|
$order = 'id desc'; |
||||
|
|
||||
|
$search_model = $this->model->withSearch(["id","campus_id","created_at"], $where)->with(['campus'])->field($field)->order($order); |
||||
|
$list = $this->pageQuery($search_model); |
||||
|
return $list; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取账户及资金管理信息 |
||||
|
* @param int $id |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function getInfo(int $id) |
||||
|
{ |
||||
|
$field = 'id,campus_id,mchid,pay_sign_key,apiclient_key,apiclient_cert,wx_pay_key,wx_pay_key_id,created_at,updated_at'; |
||||
|
|
||||
|
$info = $this->model->field($field)->where([['id', "=", $id]])->with(['campus'])->findOrEmpty()->toArray(); |
||||
|
return $info; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加账户及资金管理 |
||||
|
* @param array $data |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function add(array $data) |
||||
|
{ |
||||
|
$res = $this->model->create($data); |
||||
|
return $res->id; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 账户及资金管理编辑 |
||||
|
* @param int $id |
||||
|
* @param array $data |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function edit(int $id, array $data) |
||||
|
{ |
||||
|
|
||||
|
$this->model->where([['id', '=', $id]])->update($data); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除账户及资金管理 |
||||
|
* @param int $id |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function del(int $id) |
||||
|
{ |
||||
|
$model = $this->model->where([['id', '=', $id]])->find(); |
||||
|
$res = $model->delete(); |
||||
|
return $res; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function getCampusAll(){ |
||||
|
$campusModel = new Campus(); |
||||
|
return $campusModel->select()->toArray(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace app\validate\campus_pay; |
||||
|
use core\base\BaseValidate; |
||||
|
/** |
||||
|
* 账户及资金管理验证器 |
||||
|
* Class CampusPay |
||||
|
* @package addon\app\validate\campus_pay |
||||
|
*/ |
||||
|
class CampusPay extends BaseValidate |
||||
|
{ |
||||
|
|
||||
|
protected $rule = [ |
||||
|
'campus_id' => 'require', |
||||
|
'mchid' => 'require', |
||||
|
'pay_sign_key' => 'require', |
||||
|
'apiclient_key' => 'require', |
||||
|
'apiclient_cert' => 'require', |
||||
|
'wx_pay_key' => 'require', |
||||
|
'wx_pay_key_id' => 'require', |
||||
|
]; |
||||
|
|
||||
|
protected $message = [ |
||||
|
'campus_id.require' => ['common_validate.require', ['campus_id']], |
||||
|
'mchid.require' => ['common_validate.require', ['mchid']], |
||||
|
'pay_sign_key.require' => ['common_validate.require', ['pay_sign_key']], |
||||
|
'apiclient_key.require' => ['common_validate.require', ['apiclient_key']], |
||||
|
'apiclient_cert.require' => ['common_validate.require', ['apiclient_cert']], |
||||
|
'wx_pay_key.require' => ['common_validate.require', ['wx_pay_key']], |
||||
|
'wx_pay_key_id.require' => ['common_validate.require', ['wx_pay_key_id']], |
||||
|
]; |
||||
|
|
||||
|
protected $scene = [ |
||||
|
"add" => ['campus_id', 'mchid', 'pay_sign_key', 'apiclient_key', 'apiclient_cert', 'wx_pay_key', 'wx_pay_key_id'], |
||||
|
"edit" => ['campus_id', 'mchid', 'pay_sign_key', 'apiclient_key', 'apiclient_cert', 'wx_pay_key', 'wx_pay_key_id'] |
||||
|
]; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
.error[data-v-4f4088b5]{text-align:center;height:100vh;display:flex;justify-content:center;align-items:center}.error .error-code[data-v-4f4088b5]{color:var(--el-color-primary);font-size:150px}.error .error-text[data-v-4f4088b5]{color:#0e77fd}.error .el-button[data-v-4f4088b5]{width:176px;background-color:#0e77fd;color:#fff} |
||||
@ -1 +0,0 @@ |
|||||
import{d as l,r as d,o as i,c as p,a as t,b as u,e as m,w as x,u as v,f,E as h,p as g,g as I,h as b,i as w,t as S}from"./index-f5d841af.js";/* empty css */import{_ as B}from"./_plugin-vue_export-helper-c27b6911.js";const k=""+new URL("error-ab7e4004.png",import.meta.url).href,o=e=>(g("data-v-c0934944"),e=e(),I(),e),y={class:"error"},C={class:"flex items-center"},E=o(()=>t("div",null,[t("img",{class:"w-[240px]",src:k})],-1)),N={class:"text-left ml-[100px]"},R=o(()=>t("div",{class:"error-text text-[28px] font-bold"},"404错误!",-1)),U=o(()=>t("div",{class:"text-[#222] text-[20px] mt-[15px]"}," 哎呀,出错了!您访问的页面不存在... ",-1)),V=o(()=>t("div",{class:"text-[#c4c2c2] text-[12px] mt-[5px]"}," 尝试检查URL的错误,然后点击浏览器刷新按钮。 ",-1)),L={class:"mt-[40px]"},$=l({__name:"404",setup(e){let s=null;const a=d(5),c=f();return s=setInterval(()=>{a.value===0?(clearInterval(s),c.go(-1)):a.value--},1e3),i(()=>{s&&clearInterval(s)}),(r,n)=>{const _=h;return b(),p("div",y,[t("div",C,[u(r.$slots,"content",{},()=>[E],!0),t("div",N,[R,U,V,t("div",L,[m(_,{class:"bottom",onClick:n[0]||(n[0]=D=>v(c).go(-1))},{default:x(()=>[w(S(a.value)+" 秒后返回上一页",1)]),_:1})])])])])}}});const z=B($,[["__scopeId","data-v-c0934944"]]);export{z as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{d as l,r as d,o as i,c as p,a as t,b as u,e as m,w as x,u as v,f,E as h,p as b,g,h as I,i as w,t as S}from"./index-1dc7b228.js";/* empty css */import{_ as B}from"./_plugin-vue_export-helper-c27b6911.js";const k=""+new URL("error-ab7e4004.png",import.meta.url).href,o=e=>(b("data-v-4f4088b5"),e=e(),g(),e),y={class:"error"},C={class:"flex items-center"},E=o(()=>t("div",null,[t("img",{class:"w-[240px]",src:k})],-1)),N={class:"text-left ml-[100px]"},R=o(()=>t("div",{class:"error-text text-[28px] font-bold"},"404错误!",-1)),U=o(()=>t("div",{class:"text-[#222] text-[20px] mt-[15px]"},"哎呀,出错了!您访问的页面不存在...",-1)),V=o(()=>t("div",{class:"text-[#c4c2c2] text-[12px] mt-[5px]"},"尝试检查URL的错误,然后点击浏览器刷新按钮。",-1)),L={class:"mt-[40px]"},$=l({__name:"404",setup(e){let s=null;const a=d(5),n=f();return s=setInterval(()=>{a.value===0?(clearInterval(s),n.go(-1)):a.value--},1e3),i(()=>{s&&clearInterval(s)}),(r,c)=>{const _=h;return I(),p("div",y,[t("div",C,[u(r.$slots,"content",{},()=>[E],!0),t("div",N,[R,U,V,t("div",L,[m(_,{class:"bottom",onClick:c[0]||(c[0]=D=>v(n).go(-1))},{default:x(()=>[w(S(a.value)+" 秒后返回上一页",1)]),_:1})])])])])}}});const z=B($,[["__scopeId","data-v-4f4088b5"]]);export{z as default}; |
||||
@ -1 +0,0 @@ |
|||||
.error[data-v-c0934944]{text-align:center;height:100vh;display:flex;justify-content:center;align-items:center}.error .error-code[data-v-c0934944]{color:var(--el-color-primary);font-size:150px}.error .error-text[data-v-c0934944]{color:#0e77fd}.error .el-button[data-v-c0934944]{width:176px;background-color:#0e77fd;color:#fff} |
|
||||
@ -1 +0,0 @@ |
|||||
import{c5 as f}from"./index-f5d841af.js";export{f as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{c2 as f}from"./index-1dc7b228.js";export{f as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./Jump-lesson-library-edit.vue_vue_type_style_index_0_lang-a658c3b6.js";import"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-bd01ed10.js";import"./index.vue_vue_type_style_index_0_lang-7d665fb9.js";import"./attachment-740d9717.js";import"./index.vue_vue_type_script_setup_true_lang-f45dcca3.js";/* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-1f394a8b.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-30796a48.js";import"./sys-4eb1a831.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index.vue_vue_type_style_index_0_lang-b7271466.js";import"./index.vue_vue_type_style_index_0_lang-3c1b8cd7.js";import"./index-21a2ccda.js";import"./sortable.esm-be94e56d.js";import"./dict-f88a0e26.js";import"./lesson_course_teaching-fdaaef77.js";import"./future_ontent-5dabe1b5.js";export{o as default}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./Jump-lesson-library-edit.vue_vue_type_style_index_0_lang-a1f23d9d.js";import"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-bd01ed10.js";import"./index.vue_vue_type_style_index_0_lang-7d665fb9.js";import"./attachment-740d9717.js";import"./index.vue_vue_type_script_setup_true_lang-f45dcca3.js";/* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-1f394a8b.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-30796a48.js";import"./sys-4eb1a831.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index.vue_vue_type_style_index_0_lang-b7271466.js";import"./index.vue_vue_type_style_index_0_lang-3c1b8cd7.js";import"./index-21a2ccda.js";import"./sortable.esm-be94e56d.js";import"./dict-f88a0e26.js";import"./lesson_course_teaching-fdaaef77.js";import"./future_ontent-5dabe1b5.js";export{o as default}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./Jump-lesson-library-edit.vue_vue_type_style_index_0_lang-0fbc701d.js";import"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-bd01ed10.js";import"./index.vue_vue_type_style_index_0_lang-7d665fb9.js";import"./attachment-740d9717.js";import"./index.vue_vue_type_script_setup_true_lang-f45dcca3.js";/* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-1f394a8b.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-30796a48.js";import"./sys-4eb1a831.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index.vue_vue_type_style_index_0_lang-b7271466.js";import"./index.vue_vue_type_style_index_0_lang-3c1b8cd7.js";import"./index-21a2ccda.js";import"./sortable.esm-be94e56d.js";import"./dict-f88a0e26.js";import"./lesson_course_teaching-fdaaef77.js";import"./instructional_material-aec0964c.js";export{o as default}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./Jump-lesson-library-edit.vue_vue_type_style_index_0_lang-91677b3b.js";import"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-bd01ed10.js";import"./index.vue_vue_type_style_index_0_lang-7d665fb9.js";import"./attachment-740d9717.js";import"./index.vue_vue_type_script_setup_true_lang-f45dcca3.js";/* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-1f394a8b.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-30796a48.js";import"./sys-4eb1a831.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index.vue_vue_type_style_index_0_lang-b7271466.js";import"./index.vue_vue_type_style_index_0_lang-3c1b8cd7.js";import"./index-21a2ccda.js";import"./sortable.esm-be94e56d.js";import"./dict-f88a0e26.js";import"./lesson_course_teaching-fdaaef77.js";import"./future_ontent-5dabe1b5.js";export{o as default}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./Jump-lesson-library-edit.vue_vue_type_style_index_0_lang-9c5c9cc4.js";import"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-bd01ed10.js";import"./index.vue_vue_type_style_index_0_lang-7d665fb9.js";import"./attachment-740d9717.js";import"./index.vue_vue_type_script_setup_true_lang-f45dcca3.js";/* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-1f394a8b.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-30796a48.js";import"./sys-4eb1a831.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index.vue_vue_type_style_index_0_lang-b7271466.js";import"./index.vue_vue_type_style_index_0_lang-3c1b8cd7.js";import"./index-21a2ccda.js";import"./sortable.esm-be94e56d.js";import"./dict-f88a0e26.js";import"./lesson_course_teaching-fdaaef77.js";export{o as default}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./Jump-lesson-library-edit.vue_vue_type_style_index_0_lang-5df4a241.js";import"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-bd01ed10.js";import"./index.vue_vue_type_style_index_0_lang-7d665fb9.js";import"./attachment-740d9717.js";import"./index.vue_vue_type_script_setup_true_lang-f45dcca3.js";/* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-1f394a8b.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-30796a48.js";import"./sys-4eb1a831.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index.vue_vue_type_style_index_0_lang-b7271466.js";import"./index.vue_vue_type_style_index_0_lang-3c1b8cd7.js";import"./index-21a2ccda.js";import"./sortable.esm-be94e56d.js";import"./dict-f88a0e26.js";import"./lesson_course_teaching-fdaaef77.js";import"./future_ontent-5dabe1b5.js";export{o as default}; |
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
|||||
.map-picker[data-v-fcaa04a3]{display:flex;flex-direction:column;gap:16px}.map-container[data-v-fcaa04a3]{width:100%;height:400px;border:1px solid #dcdfe6;border-radius:4px;position:relative}.map-placeholder[data-v-fcaa04a3]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#909399;font-size:14px}.address-search[data-v-fcaa04a3]{display:flex;gap:8px;margin-top:20px} |
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue