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": "报销编号", |
|||
"idPlaceholder": "请输入报销编号", |
|||
"applicantId": "申请人ID", |
|||
"applicantIdPlaceholder": "请输入申请人ID", |
|||
"amount": "报销金额", |
|||
"amountPlaceholder": "请输入报销金额", |
|||
"description": "报销描述", |
|||
"descriptionPlaceholder": "请输入报销描述", |
|||
"receiptUrl": "发票或收据URL", |
|||
"receiptUrlPlaceholder": "请输入发票或收据URL", |
|||
"status": "状态", |
|||
"statusPlaceholder": "请输入状态", |
|||
"processId": "关联的审批流程ID", |
|||
"processIdPlaceholder": "请输入关联的审批流程ID", |
|||
"addReimbursement": "添加报销记录", |
|||
"updateReimbursement": "编辑报销记录", |
|||
"reimbursementDeleteTips": "确定要删除该数据吗?", |
|||
"startDate": "请选择开始时间", |
|||
"endDate": "请选择结束时间" |
|||
"applicantId":"申请人", |
|||
"applicantIdPlaceholder":"请输入申请人", |
|||
"amount":"报销金额", |
|||
"amountPlaceholder":"请输入报销金额", |
|||
"description":"报销描述", |
|||
"descriptionPlaceholder":"请输入报销描述", |
|||
"receiptUrl":"发票或收据", |
|||
"receiptUrlPlaceholder":"请输入发票或收据", |
|||
"status":"状态", |
|||
"statusPlaceholder":"请输入状态", |
|||
"createdAt":"创建时间", |
|||
"createdAtPlaceholder":"请输入创建时间", |
|||
"updatedAt":"修改时间", |
|||
"addReimbursement":"添加报销记录", |
|||
"updateReimbursement":"编辑报销记录", |
|||
"reimbursementDeleteTips":"确定要删除该数据吗?", |
|||
"startDate":"请选择开始时间", |
|||
"endDate":"请选择结束时间" |
|||
} |
|||
@ -1,33 +1,31 @@ |
|||
{ |
|||
"id": "工资编号", |
|||
"idPlaceholder": "请输入工资编号", |
|||
"staffId": "员工ID", |
|||
"staffIdPlaceholder": "请输入员工ID", |
|||
"baseSalary": "底薪", |
|||
"baseSalaryPlaceholder": "请输入底薪", |
|||
"performanceBonus": "绩效", |
|||
"performanceBonusPlaceholder": "请输入绩效", |
|||
"deductions": "扣款", |
|||
"deductionsPlaceholder": "请输入扣款", |
|||
"otherSubsidies": "其他补贴", |
|||
"otherSubsidiesPlaceholder": "请输入其他补贴", |
|||
"netSalary": "实发工资", |
|||
"netSalaryPlaceholder": "请输入实发工资", |
|||
"paymentStatus": "发放状态", |
|||
"paymentStatusPlaceholder": "请输入发放状态", |
|||
"paymentMethod": "发放方式", |
|||
"paymentMethodPlaceholder": "请输入发放方式", |
|||
"remarks": "备注", |
|||
"remarksPlaceholder": "请输入备注", |
|||
"salaryMonth": "工资月份", |
|||
"salaryMonthPlaceholder": "请输入工资月份", |
|||
"departmentId": "部门ID", |
|||
"departmentIdPlaceholder": "请输入部门ID", |
|||
"processId": "关联的审批流程ID", |
|||
"processIdPlaceholder": "请输入关联的审批流程ID", |
|||
"addSalary": "添加工资", |
|||
"updateSalary": "编辑工资", |
|||
"salaryDeleteTips": "确定要删除该数据吗?", |
|||
"startDate": "请选择开始时间", |
|||
"endDate": "请选择结束时间" |
|||
"staffId":"员工", |
|||
"staffIdPlaceholder":"全部", |
|||
"departmentId":"部门", |
|||
"departmentIdPlaceholder":"全部", |
|||
"baseSalary":"底薪", |
|||
"baseSalaryPlaceholder":"请输入底薪", |
|||
"performanceBonus":"绩效", |
|||
"performanceBonusPlaceholder":"请输入绩效", |
|||
"deductions":"扣款", |
|||
"deductionsPlaceholder":"请输入扣款", |
|||
"otherSubsidies":"其他补贴", |
|||
"otherSubsidiesPlaceholder":"请输入其他补贴", |
|||
"netSalary":"实发工资", |
|||
"paymentStatus":"发放状态", |
|||
"paymentStatusPlaceholder":"请输入发放状态", |
|||
"paymentMethod":"发放方式", |
|||
"paymentMethodPlaceholder":"请输入发放方式", |
|||
"remarks":"备注", |
|||
"remarksPlaceholder":"请输入备注", |
|||
"salaryMonth":"工资月份", |
|||
"salaryMonthPlaceholder":"请输入工资月份", |
|||
"createdAt":"创建时间", |
|||
"createdAtPlaceholder":"请输入创建时间", |
|||
"updatedAt":"修改时间", |
|||
"addSalary":"添加工资", |
|||
"updateSalary":"编辑工资", |
|||
"salaryDeleteTips":"确定要删除该数据吗?", |
|||
"startDate":"请选择开始时间", |
|||
"endDate":"请选择结束时间" |
|||
} |
|||
@ -1,29 +1,27 @@ |
|||
{ |
|||
"id": "服务编号", |
|||
"idPlaceholder": "请输入服务编号", |
|||
"serviceName": "服务名称", |
|||
"serviceNamePlaceholder": "请输入服务名称", |
|||
"previewImageUrl": "服务预览图URL", |
|||
"previewImageUrlPlaceholder": "请输入服务预览图URL", |
|||
"description": "服务描述", |
|||
"descriptionPlaceholder": "请输入服务描述", |
|||
"serviceType": "服务类型", |
|||
"serviceTypePlaceholder": "请输入服务类型", |
|||
"executionRules": "服务执行规则", |
|||
"executionRulesPlaceholder": "请输入服务执行规则", |
|||
"staffReminder": "是否员工提醒: 1-是, 0-否", |
|||
"staffReminderPlaceholder": "请输入是否员工提醒: 1-是, 0-否", |
|||
"customerReminder": "是否客户提醒: 1-是, 0-否", |
|||
"customerReminderPlaceholder": "请输入是否客户提醒: 1-是, 0-否", |
|||
"customerConfirmation": "是否客户确认: 1-是, 0-否", |
|||
"customerConfirmationPlaceholder": "请输入是否客户确认: 1-是, 0-否", |
|||
"customerFeedback": "客户反馈内容", |
|||
"customerFeedbackPlaceholder": "请输入客户反馈内容", |
|||
"status": "状态", |
|||
"statusPlaceholder": "请输入状态", |
|||
"addService": "添加服务", |
|||
"updateService": "编辑服务", |
|||
"serviceDeleteTips": "确定要删除该数据吗?", |
|||
"startDate": "请选择开始时间", |
|||
"endDate": "请选择结束时间" |
|||
"serviceName":"服务名称", |
|||
"serviceNamePlaceholder":"请输入服务名称", |
|||
"previewImageUrl":"服务预览图", |
|||
"previewImageUrlPlaceholder":"请输入服务预览图", |
|||
"description":"服务描述", |
|||
"descriptionPlaceholder":"请输入服务描述", |
|||
"serviceType":"服务类型", |
|||
"serviceTypePlaceholder":"请输入服务类型", |
|||
"executionRules":"服务执行规则", |
|||
"executionRulesPlaceholder":"请输入服务执行规则", |
|||
"staffReminder":"是否员工提醒", |
|||
"staffReminderPlaceholder":"请输入是否员工提醒", |
|||
"customerReminder":"是否客户提醒", |
|||
"customerReminderPlaceholder":"请输入是否客户提醒", |
|||
"customerConfirmation":"是否客户确认", |
|||
"customerConfirmationPlaceholder":"请输入是否客户确认", |
|||
"customerFeedback":"客户反馈内容", |
|||
"customerFeedbackPlaceholder":"请输入客户反馈内容", |
|||
"status":"状态", |
|||
"statusPlaceholder":"请输入状态", |
|||
"addService":"添加服务", |
|||
"updateService":"编辑服务", |
|||
"serviceDeleteTips":"确定要删除该数据吗?", |
|||
"startDate":"请选择开始时间", |
|||
"endDate":"请选择结束时间" |
|||
} |
|||
@ -1,15 +1,13 @@ |
|||
{ |
|||
"id": "反馈编号", |
|||
"idPlaceholder": "请输入反馈编号", |
|||
"userId": "用户ID", |
|||
"userIdPlaceholder": "请输入用户ID", |
|||
"feedbackText": "反馈内容", |
|||
"feedbackTextPlaceholder": "请输入反馈内容", |
|||
"attachmentUrl": "附件URL(OSS对象存储)", |
|||
"attachmentUrlPlaceholder": "请输入附件URL(OSS对象存储)", |
|||
"addUserFeedback": "添加用户反馈信息", |
|||
"updateUserFeedback": "编辑用户反馈信息", |
|||
"userFeedbackDeleteTips": "确定要删除该数据吗?", |
|||
"startDate": "请选择开始时间", |
|||
"endDate": "请选择结束时间" |
|||
"userId":"客户名称", |
|||
"userIdPlaceholder":"全部", |
|||
"feedbackText":"反馈内容", |
|||
"feedbackTextPlaceholder":"请输入反馈内容", |
|||
"attachmentUrl":"附件", |
|||
"attachmentUrlPlaceholder":"请输入附件", |
|||
"addUserFeedback":"添加用户反馈信息", |
|||
"updateUserFeedback":"查看用户反馈信息", |
|||
"userFeedbackDeleteTips":"确定要删除该数据吗?", |
|||
"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> |
|||
<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" |
|||
v-if="customerResourcesTable.searchParam.type == 'khzy'" |
|||
> |
|||
{{ t('addCustomerResources') }} |
|||
</el-button> |
|||
</div> |
|||
|
|||
<el-card |
|||
class="box-card !border-none my-[10px] table-search-wrap" |
|||
shadow="never" |
|||
> |
|||
<el-form |
|||
:inline="true" |
|||
:model="customerResourcesTable.searchParam" |
|||
ref="searchFormRef" |
|||
> |
|||
<el-form-item :label="t('name')" prop="name"> |
|||
<el-input |
|||
v-model="customerResourcesTable.searchParam.name" |
|||
:placeholder="t('namePlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="年龄" prop="age"> |
|||
<el-input |
|||
v-model="customerResourcesTable.searchParam.age" |
|||
placeholder="请输入年龄" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="性别" prop="gender"> |
|||
<el-select |
|||
v-model="customerResourcesTable.searchParam.gender" |
|||
placeholder="请选择性别" |
|||
> |
|||
<el-option label="男性" value="male" /> |
|||
<el-option label="女性" value="female" /> |
|||
<el-option label="其他" value="other" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('phoneNumber')" prop="phone_number"> |
|||
<el-input |
|||
v-model="customerResourcesTable.searchParam.phone_number" |
|||
:placeholder="t('phoneNumberPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="创建时间"> |
|||
<el-date-picker |
|||
v-model="customerResourcesTable.searchParam.created_at" |
|||
type="daterange" |
|||
range-separator="至" |
|||
start-placeholder="开始日期" |
|||
end-placeholder="结束日期" |
|||
format="YYYY-MM-DD" |
|||
value-format="YYYY-MM-DD" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<!-- 更新时间 --> |
|||
<el-form-item label="更新时间"> |
|||
<el-date-picker |
|||
v-model="customerResourcesTable.searchParam.updated_at" |
|||
type="daterange" |
|||
range-separator="至" |
|||
start-placeholder="开始日期" |
|||
end-placeholder="结束日期" |
|||
format="YYYY-MM-DD" |
|||
value-format="YYYY-MM-DD" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" @click="loadCustomerResourcesList()">{{ |
|||
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="customerResourcesTable.data" |
|||
size="large" |
|||
v-loading="customerResourcesTable.loading" |
|||
> |
|||
<template #empty> |
|||
<span>{{ |
|||
!customerResourcesTable.loading ? t('emptyData') : '' |
|||
}}</span> |
|||
</template> |
|||
<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"> |
|||
<div v-if="item.value == row.source">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="consultant_name" |
|||
:label="t('consultant')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="name" |
|||
:label="t('name')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="age" |
|||
:label="t('age')" |
|||
min-width="50" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
:label="t('gender')" |
|||
min-width="60" |
|||
align="center" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
<template #default="{ row }"> |
|||
<div v-for="(item, index) in genderList"> |
|||
<div v-if="item.value == row.gender">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="phone_number" |
|||
:label="t('phoneNumber')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="decision_maker" |
|||
:label="t('decisionMaker')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="created_at" |
|||
label="添加时间" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<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> |
|||
<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" v-if="customerResourcesTable.searchParam.type == 'khzy'"> |
|||
{{ t('addCustomerResources') }} |
|||
</el-button> |
|||
</div> |
|||
|
|||
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
|||
<el-form :inline="true" :model="customerResourcesTable.searchParam" ref="searchFormRef"> |
|||
<el-form-item :label="t('name')" prop="name"> |
|||
<el-input v-model="customerResourcesTable.searchParam.name" |
|||
:placeholder="t('namePlaceholder')" /> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="年龄" prop="age"> |
|||
<el-input v-model="customerResourcesTable.searchParam.age" placeholder="请输入年龄" /> |
|||
</el-form-item> |
|||
|
|||
|
|||
<el-form-item label="性别" prop="gender"> |
|||
<el-select v-model="customerResourcesTable.searchParam.gender" placeholder="请选择性别"> |
|||
<el-option label="男性" value="male" /> |
|||
<el-option label="女性" value="female" /> |
|||
<el-option label="其他" value="other" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
|
|||
|
|||
<el-form-item :label="t('phoneNumber')" prop="phone_number"> |
|||
<el-input v-model="customerResourcesTable.searchParam.phone_number" |
|||
:placeholder="t('phoneNumberPlaceholder')" /> |
|||
</el-form-item> |
|||
|
|||
|
|||
<el-form-item label="创建时间"> |
|||
<el-date-picker v-model="customerResourcesTable.searchParam.created_at" type="daterange" range-separator="至" |
|||
start-placeholder="开始日期" end-placeholder="结束日期" format="YYYY-MM-DD" |
|||
value-format="YYYY-MM-DD" /> |
|||
</el-form-item> |
|||
|
|||
<!-- 更新时间 --> |
|||
<el-form-item label="更新时间"> |
|||
<el-date-picker v-model="customerResourcesTable.searchParam.updated_at" type="daterange" range-separator="至" |
|||
start-placeholder="开始日期" end-placeholder="结束日期" format="YYYY-MM-DD" |
|||
value-format="YYYY-MM-DD" /> |
|||
</el-form-item> |
|||
|
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" @click="loadCustomerResourcesList()">{{ 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="customerResourcesTable.data" size="large" v-loading="customerResourcesTable.loading"> |
|||
<template #empty> |
|||
<span>{{ !customerResourcesTable.loading ? t('emptyData') : '' }}</span> |
|||
</template> |
|||
<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"> |
|||
<div v-if="item.value == row.source">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="consultant_name" :label="t('consultant')" min-width="120" |
|||
:show-overflow-tooltip="true" /> |
|||
|
|||
<el-table-column prop="name" :label="t('name')" min-width="120" :show-overflow-tooltip="true" /> |
|||
|
|||
<el-table-column prop="age" :label="t('age')" min-width="50" :show-overflow-tooltip="true" /> |
|||
|
|||
<el-table-column :label="t('gender')" min-width="60" align="center" :show-overflow-tooltip="true"> |
|||
<template #default="{ row }"> |
|||
<div v-for="(item, index) in genderList"> |
|||
<div v-if="item.value == row.gender">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="phone_number" :label="t('phoneNumber')" min-width="120" |
|||
:show-overflow-tooltip="true" /> |
|||
|
|||
<el-table-column prop="decision_maker" :label="t('decisionMaker')" min-width="120" |
|||
:show-overflow-tooltip="true" /> |
|||
|
|||
|
|||
<el-table-column |
|||
prop="member_label" |
|||
label="会员标签" |
|||
min-width="120" |
|||
align="center" |
|||
> |
|||
<template #default="{ row }"> |
|||
<div class="flex flex-col items-center"> |
|||
<div |
|||
v-for="(item, key) in row.member_label_array" |
|||
class="my-[3px]" |
|||
:key="key" |
|||
> |
|||
<el-tag type="info">{{ item.label_name }}</el-tag> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
|
|||
<el-table-column prop="created_at" label="添加时间" min-width="120" :show-overflow-tooltip="true" /> |
|||
|
|||
<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> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, watch } from 'vue' |
|||
import { t } from '@/lang' |
|||
import { useDictionary } from '@/app/api/dict' |
|||
import { |
|||
getCustomerResourcesList, |
|||
deleteCustomerResources, |
|||
getWithPersonnelList, |
|||
getWithCampusList, |
|||
} from '@/app/api/customer_resources' |
|||
import { img } from '@/utils/common' |
|||
import { ElMessageBox, FormInstance } from 'element-plus' |
|||
import Edit from '@/app/views/customer_resources/components/customer-resources-edit.vue' |
|||
import Fp from '@/app/views/customer_resources/components/fp.vue' |
|||
import Order from '@/app/views/order_table/components/order-table-edit.vue' |
|||
|
|||
import Tc from '@/app/views/tc_dialog/tc_dialog.vue' |
|||
|
|||
import { useRouter, useRoute } from 'vue-router' |
|||
const route = useRoute() |
|||
const pageName = route.meta.title |
|||
const router = useRouter() |
|||
|
|||
let customerResourcesTable = reactive({ |
|||
page: 1, |
|||
limit: 10, |
|||
total: 0, |
|||
loading: true, |
|||
data: [], |
|||
searchParam: { |
|||
name: '', |
|||
age: '', |
|||
gender: '', |
|||
phone_number: '', |
|||
type: '', |
|||
created_at: '', |
|||
updated_at: '', |
|||
}, |
|||
}) |
|||
|
|||
if (pageName == '业绩分配') { |
|||
customerResourcesTable.searchParam.type = 'yjfp' |
|||
} else if (pageName == '客户资源列表') { |
|||
customerResourcesTable.searchParam.type = 'khzy' |
|||
} else if (pageName == '资源列表') { |
|||
customerResourcesTable.searchParam.type = 'zylb' |
|||
} |
|||
|
|||
// const type = pageName == '业绩分配' ? 'yjfp' : 'khzy'; |
|||
|
|||
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', |
|||
query: { id: id }, |
|||
}) |
|||
} |
|||
|
|||
/** |
|||
* 添加订单 |
|||
*/ |
|||
const editOrderTableDialog: Record<string, any> | null = ref(null) |
|||
const addOrder = (row: any) => { |
|||
console.log(row) |
|||
editOrderTableDialog.value.setFormData(row) |
|||
editOrderTableDialog.value.showDialog = true |
|||
} |
|||
|
|||
const TcCustomerResourcesDialog: Record<string, any> | null = ref(null) |
|||
const tcEvent = (row: any) => { |
|||
TcCustomerResourcesDialog.value.setFormData(row) |
|||
TcCustomerResourcesDialog.value.showDialog = true |
|||
} |
|||
|
|||
const searchFormRef = ref<FormInstance>() |
|||
|
|||
// 选中数据 |
|||
const selectData = ref<any[]>([]) |
|||
|
|||
// 字典数据 |
|||
const sourceList = ref([] as any[]) |
|||
const sourceDictList = async () => { |
|||
sourceList.value = await (await useDictionary('source')).data.dictionary |
|||
} |
|||
sourceDictList() |
|||
const source_channelList = ref([] as any[]) |
|||
const source_channelDictList = async () => { |
|||
source_channelList.value = await ( |
|||
await useDictionary('SourceChannel') |
|||
).data.dictionary |
|||
} |
|||
source_channelDictList() |
|||
const genderList = ref([] as any[]) |
|||
const genderDictList = async () => { |
|||
genderList.value = await (await useDictionary('zy_sex')).data.dictionary |
|||
} |
|||
genderDictList() |
|||
const purchasing_powerList = ref([] as any[]) |
|||
const purchasing_powerDictList = async () => { |
|||
purchasing_powerList.value = await ( |
|||
await useDictionary('customer_purchasing_power') |
|||
).data.dictionary |
|||
} |
|||
purchasing_powerDictList() |
|||
const cognitive_ideaList = ref([] as any[]) |
|||
const cognitive_ideaDictList = async () => { |
|||
cognitive_ideaList.value = await ( |
|||
await useDictionary('cognitive_concept') |
|||
).data.dictionary |
|||
} |
|||
cognitive_ideaDictList() |
|||
const initial_intentList = ref([] as any[]) |
|||
const initial_intentDictList = async () => { |
|||
initial_intentList.value = await ( |
|||
await useDictionary('preliminarycustomerintention') |
|||
).data.dictionary |
|||
} |
|||
initial_intentDictList() |
|||
const statusList = ref([] as any[]) |
|||
const statusDictList = async () => { |
|||
statusList.value = await (await useDictionary('kh_status')).data.dictionary |
|||
} |
|||
statusDictList() |
|||
|
|||
/** |
|||
* 获取客户资源列表 |
|||
*/ |
|||
const loadCustomerResourcesList = (page: number = 1) => { |
|||
customerResourcesTable.loading = true |
|||
customerResourcesTable.page = page |
|||
|
|||
getCustomerResourcesList({ |
|||
page: customerResourcesTable.page, |
|||
limit: customerResourcesTable.limit, |
|||
...customerResourcesTable.searchParam, |
|||
}) |
|||
.then((res) => { |
|||
customerResourcesTable.loading = false |
|||
customerResourcesTable.data = res.data.data |
|||
customerResourcesTable.total = res.data.total |
|||
}) |
|||
.catch(() => { |
|||
customerResourcesTable.loading = false |
|||
}) |
|||
} |
|||
loadCustomerResourcesList() |
|||
|
|||
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 |
|||
} |
|||
|
|||
/** |
|||
* 编辑客户资源 |
|||
* @param data |
|||
*/ |
|||
const editEvent = (data: any) => { |
|||
editCustomerResourcesDialog.value.setFormData(data) |
|||
editCustomerResourcesDialog.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'), { |
|||
confirmButtonText: t('confirm'), |
|||
cancelButtonText: t('cancel'), |
|||
type: 'warning', |
|||
}).then(() => { |
|||
deleteCustomerResources(id) |
|||
.then(() => { |
|||
loadCustomerResourcesList() |
|||
}) |
|||
.catch(() => {}) |
|||
}) |
|||
} |
|||
|
|||
const consultantList = ref([]) |
|||
const setConsultantList = async () => { |
|||
consultantList.value = await (await getWithPersonnelList({})).data |
|||
} |
|||
setConsultantList() |
|||
const campusList = ref([]) |
|||
const setCampusList = async () => { |
|||
campusList.value = await (await getWithCampusList({})).data |
|||
} |
|||
setCampusList() |
|||
|
|||
const resetForm = (formEl: FormInstance | undefined) => { |
|||
if (!formEl) return |
|||
formEl.resetFields() |
|||
loadCustomerResourcesList() |
|||
} |
|||
import { reactive, ref, watch } from 'vue' |
|||
import { t } from '@/lang' |
|||
import { useDictionary } from '@/app/api/dict' |
|||
import { getCustomerResourcesList, deleteCustomerResources, getWithPersonnelList, getWithCampusList } from '@/app/api/customer_resources' |
|||
import { img } from '@/utils/common' |
|||
import { ElMessageBox, FormInstance } from 'element-plus' |
|||
import Edit from '@/app/views/customer_resources/components/customer-resources-edit.vue' |
|||
import Fp from '@/app/views/customer_resources/components/fp.vue' |
|||
import Order from '@/app/views/order_table/components/order-table-edit.vue' |
|||
import Tc from '@/app/views/tc_dialog/tc_dialog.vue' |
|||
|
|||
import { getMemberLabelAll } from '@/app/api/member' |
|||
|
|||
import { useRouter, useRoute } from 'vue-router' |
|||
const route = useRoute() |
|||
const pageName = route.meta.title; |
|||
const router = useRouter() |
|||
|
|||
let customerResourcesTable = reactive({ |
|||
page: 1, |
|||
limit: 10, |
|||
total: 0, |
|||
loading: true, |
|||
data: [], |
|||
searchParam: { |
|||
"name": "", |
|||
"age": "", |
|||
"gender": "", |
|||
"phone_number": "", |
|||
"member_label" : "", |
|||
'type': '', |
|||
"created_at" : "", |
|||
"updated_at" : "" |
|||
} |
|||
}) |
|||
|
|||
if (pageName == '业绩分配') { |
|||
customerResourcesTable.searchParam.type = 'yjfp'; |
|||
} else if (pageName == '客户资源列表') { |
|||
customerResourcesTable.searchParam.type = 'khzy'; |
|||
} else if (pageName == '资源列表') { |
|||
customerResourcesTable.searchParam.type = 'zylb'; |
|||
} |
|||
|
|||
// const type = pageName == '业绩分配' ? 'yjfp' : 'khzy'; |
|||
|
|||
// 获取全部标签 |
|||
const labelSelectData = ref([]) |
|||
const getMemberLabelAllFn = async () => { |
|||
labelSelectData.value = await (await getMemberLabelAll()).data |
|||
} |
|||
getMemberLabelAllFn() |
|||
|
|||
|
|||
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', query: { id: id } }) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 添加订单 |
|||
*/ |
|||
const editOrderTableDialog : Record<string, any> | null = ref(null) |
|||
const addOrder = (row : any) => { |
|||
|
|||
console.log(row); |
|||
editOrderTableDialog.value.setFormData(row) |
|||
editOrderTableDialog.value.showDialog = true |
|||
} |
|||
|
|||
|
|||
const TcCustomerResourcesDialog : Record<string, any> | null = ref(null) |
|||
const tcEvent = (row : any) => { |
|||
TcCustomerResourcesDialog.value.setFormData(row) |
|||
TcCustomerResourcesDialog.value.showDialog = true |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
const searchFormRef = ref<FormInstance>() |
|||
|
|||
// 选中数据 |
|||
const selectData = ref<any[]>([]) |
|||
|
|||
// 字典数据 |
|||
const sourceList = ref([] as any[]) |
|||
const sourceDictList = async () => { |
|||
sourceList.value = await (await useDictionary('source')).data.dictionary |
|||
} |
|||
sourceDictList(); |
|||
const source_channelList = ref([] as any[]) |
|||
const source_channelDictList = async () => { |
|||
source_channelList.value = await (await useDictionary('SourceChannel')).data.dictionary |
|||
} |
|||
source_channelDictList(); |
|||
const genderList = ref([] as any[]) |
|||
const genderDictList = async () => { |
|||
genderList.value = await (await useDictionary('zy_sex')).data.dictionary |
|||
} |
|||
genderDictList(); |
|||
const purchasing_powerList = ref([] as any[]) |
|||
const purchasing_powerDictList = async () => { |
|||
purchasing_powerList.value = await (await useDictionary('customer_purchasing_power')).data.dictionary |
|||
} |
|||
purchasing_powerDictList(); |
|||
const cognitive_ideaList = ref([] as any[]) |
|||
const cognitive_ideaDictList = async () => { |
|||
cognitive_ideaList.value = await (await useDictionary('cognitive_concept')).data.dictionary |
|||
} |
|||
cognitive_ideaDictList(); |
|||
const initial_intentList = ref([] as any[]) |
|||
const initial_intentDictList = async () => { |
|||
initial_intentList.value = await (await useDictionary('preliminarycustomerintention')).data.dictionary |
|||
} |
|||
initial_intentDictList(); |
|||
const statusList = ref([] as any[]) |
|||
const statusDictList = async () => { |
|||
statusList.value = await (await useDictionary('kh_status')).data.dictionary |
|||
} |
|||
statusDictList(); |
|||
|
|||
|
|||
/** |
|||
* 获取客户资源列表 |
|||
*/ |
|||
const loadCustomerResourcesList = (page : number = 1) => { |
|||
customerResourcesTable.loading = true |
|||
customerResourcesTable.page = page |
|||
|
|||
getCustomerResourcesList({ |
|||
page: customerResourcesTable.page, |
|||
limit: customerResourcesTable.limit, |
|||
...customerResourcesTable.searchParam |
|||
}).then(res => { |
|||
customerResourcesTable.loading = false |
|||
customerResourcesTable.data = res.data.data |
|||
customerResourcesTable.total = res.data.total |
|||
}).catch(() => { |
|||
customerResourcesTable.loading = false |
|||
}) |
|||
} |
|||
loadCustomerResourcesList() |
|||
|
|||
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 |
|||
} |
|||
|
|||
/** |
|||
* 编辑客户资源 |
|||
* @param data |
|||
*/ |
|||
const editEvent = (data : any) => { |
|||
editCustomerResourcesDialog.value.setFormData(data) |
|||
editCustomerResourcesDialog.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'), |
|||
{ |
|||
confirmButtonText: t('confirm'), |
|||
cancelButtonText: t('cancel'), |
|||
type: 'warning', |
|||
} |
|||
).then(() => { |
|||
deleteCustomerResources(id).then(() => { |
|||
loadCustomerResourcesList() |
|||
}).catch(() => { |
|||
}) |
|||
}) |
|||
} |
|||
|
|||
|
|||
const consultantList = ref([]) |
|||
const setConsultantList = async () => { |
|||
consultantList.value = await (await getWithPersonnelList({})).data |
|||
} |
|||
setConsultantList() |
|||
const campusList = ref([]) |
|||
const setCampusList = async () => { |
|||
campusList.value = await (await getWithCampusList({})).data |
|||
} |
|||
setCampusList() |
|||
|
|||
const resetForm = (formEl : FormInstance | undefined) => { |
|||
if (!formEl) return |
|||
formEl.resetFields() |
|||
loadCustomerResourcesList() |
|||
} |
|||
</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; |
|||
} |
|||
/* 多行超出隐藏 */ |
|||
.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,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