diff --git a/admin/components.d.ts b/admin/components.d.ts index 4268e5eb..a24ce0e0 100644 --- a/admin/components.d.ts +++ b/admin/components.d.ts @@ -21,6 +21,7 @@ declare module '@vue/runtime-core' { ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElContainer: typeof import('element-plus/es')['ElContainer'] + ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] @@ -40,8 +41,6 @@ declare module '@vue/runtime-core' { ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopover: typeof import('element-plus/es')['ElPopover'] - ElRadio: typeof import('element-plus/es')['ElRadio'] - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] @@ -51,9 +50,7 @@ declare module '@vue/runtime-core' { ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] - ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] - ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] ElUpload: typeof import('element-plus/es')['ElUpload'] ExportSure: typeof import('./src/components/export-sure/index.vue')['default'] HeatMap: typeof import('./src/components/heat-map/index.vue')['default'] diff --git a/admin/src/app/api/order_table.ts b/admin/src/app/api/order_table.ts index dbf4e14f..0b7a02fd 100644 --- a/admin/src/app/api/order_table.ts +++ b/admin/src/app/api/order_table.ts @@ -1,5 +1,9 @@ import request from '@/utils/request' + + + + // USER_CODE_BEGIN -- order_table /** * 获取订单列表 @@ -7,7 +11,7 @@ import request from '@/utils/request' * @returns */ export function getOrderTableList(params: Record) { - return request.get(`order_table/order_table`, { params }) + return request.get(`order_table/order_table`, {params}) } /** @@ -16,7 +20,7 @@ export function getOrderTableList(params: Record) { * @returns */ export function getOrderTableInfo(id: number) { - return request.get(`order_table/order_table/${id}`) + return request.get(`order_table/order_table/${id}`); } /** @@ -25,10 +29,7 @@ export function getOrderTableInfo(id: number) { * @returns */ export function addOrderTable(params: Record) { - return request.post('order_table/order_table', params, { - showErrorMessage: true, - showSuccessMessage: true, - }) + return request.post('order_table/order_table', params, { showErrorMessage: true, showSuccessMessage: true }) } /** @@ -38,10 +39,7 @@ export function addOrderTable(params: Record) { * @returns */ export function editOrderTable(params: Record) { - return request.put(`order_table/order_table/${params.id}`, params, { - showErrorMessage: true, - showSuccessMessage: true, - }) + return request.put(`order_table/order_table/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true }) } /** @@ -50,10 +48,17 @@ export function editOrderTable(params: Record) { * @returns */ export function deleteOrderTable(id: number) { - return request.delete(`order_table/order_table/${id}`, { - showErrorMessage: true, - showSuccessMessage: true, - }) + return request.delete(`order_table/order_table/${id}`, { showErrorMessage: true, showSuccessMessage: true }) +} + +export function getWithCustomerResourcesList(params: Record){ + return request.get('order_table/customer_resources_all', {params}) +}export function getWithCourseList(params: Record){ + return request.get('order_table/course_all', {params}) +}export function getWithClassGradeList(params: Record){ + return request.get('order_table/class_grade_all', {params}) +}export function getWithPersonnelList(params: Record){ + return request.get('order_table/personnel_all', {params}) } // USER_CODE_END -- order_table diff --git a/admin/src/app/api/physical_test.ts b/admin/src/app/api/physical_test.ts index e76fba51..c3b59a5d 100644 --- a/admin/src/app/api/physical_test.ts +++ b/admin/src/app/api/physical_test.ts @@ -1,5 +1,11 @@ import request from '@/utils/request' + + + + + + // USER_CODE_BEGIN -- physical_test /** * 获取体测列表 @@ -7,7 +13,7 @@ import request from '@/utils/request' * @returns */ export function getPhysicalTestList(params: Record) { - return request.get(`physical_test/physical_test`, { params }) + return request.get(`physical_test/physical_test`, {params}) } /** @@ -16,7 +22,7 @@ export function getPhysicalTestList(params: Record) { * @returns */ export function getPhysicalTestInfo(id: number) { - return request.get(`physical_test/physical_test/${id}`) + return request.get(`physical_test/physical_test/${id}`); } /** @@ -25,10 +31,7 @@ export function getPhysicalTestInfo(id: number) { * @returns */ export function addPhysicalTest(params: Record) { - return request.post('physical_test/physical_test', params, { - showErrorMessage: true, - showSuccessMessage: true, - }) + return request.post('physical_test/physical_test', params, { showErrorMessage: true, showSuccessMessage: true }) } /** @@ -38,10 +41,7 @@ export function addPhysicalTest(params: Record) { * @returns */ export function editPhysicalTest(params: Record) { - return request.put(`physical_test/physical_test/${params.id}`, params, { - showErrorMessage: true, - showSuccessMessage: true, - }) + return request.put(`physical_test/physical_test/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true }) } /** @@ -50,10 +50,15 @@ export function editPhysicalTest(params: Record) { * @returns */ export function deletePhysicalTest(id: number) { - return request.delete(`physical_test/physical_test/${id}`, { - showErrorMessage: true, - showSuccessMessage: true, - }) + return request.delete(`physical_test/physical_test/${id}`, { showErrorMessage: true, showSuccessMessage: true }) +} + +export function getWithCustomerResourcesList(params: Record){ + return request.get('physical_test/customer_resources_all', {params}) +}export function getWithStudentList(params: Record){ + return request.get('physical_test/student_all', {params}) +}export function getWithPersonnelList(params: Record){ + return request.get('physical_test/personnel_all', {params}) } // USER_CODE_END -- physical_test diff --git a/admin/src/app/lang/zh-cn/customer_resource_changes.customer_resource_changes.json b/admin/src/app/lang/zh-cn/customer_resource_changes.customer_resource_changes.json index cc01945e..514deb3e 100644 --- a/admin/src/app/lang/zh-cn/customer_resource_changes.customer_resource_changes.json +++ b/admin/src/app/lang/zh-cn/customer_resource_changes.customer_resource_changes.json @@ -18,4 +18,7 @@ "customerResourceChangesDeleteTips": "确定要删除该数据吗?", "startDate": "请选择开始时间", "endDate": "请选择结束时间" + + + } diff --git a/admin/src/app/lang/zh-cn/customer_resources.customer_resources.json b/admin/src/app/lang/zh-cn/customer_resources.customer_resources.json index 1a539222..429f9055 100644 --- a/admin/src/app/lang/zh-cn/customer_resources.customer_resources.json +++ b/admin/src/app/lang/zh-cn/customer_resources.customer_resources.json @@ -1,38 +1,107 @@ { - "source": "来源", - "sourcePlaceholder": "请输入来源", - "sourceChannel": "来源渠道", - "sourceChannelPlaceholder": "请输入来源渠道", - "consultant": "顾问", - "name": "姓名", - "namePlaceholder": "请输入姓名", - "age": "年龄", - "agePlaceholder": "请输入年龄", - "gender": "性别", - "genderPlaceholder": "请输入性别", - "phoneNumber": "联系电话", - "phoneNumberPlaceholder": "请输入联系电话", - "demand": "需求", - "demandPlaceholder": "请输入需求", - "purchasingPower": "购买力", - "purchasingPowerPlaceholder": "请输入购买力", - "cognitiveIdea": "认知理念", - "cognitiveIdeaPlaceholder": "请输入认知理念", - "optionalClassTime": "可选上课时间", - "optionalClassTimePlaceholder": "请输入可选上课时间", - "distance": "距离", - "distancePlaceholder": "请输入距离", - "decisionMaker": "决策人", - "decisionMakerPlaceholder": "请输入决策人", - "initialIntent": "客户初步意向度", - "initialIntentPlaceholder": "请输入客户初步意向度", - "campus": "所属校区", - "campusPlaceholder": "请输入所属校区", - "status": "客户状态", - "statusPlaceholder": "请输入客户状态", - "addCustomerResources": "添加客户资源", - "updateCustomerResources": "编辑客户资源", - "customerResourcesDeleteTips": "确定要删除该数据吗?", - "startDate": "请选择开始时间", - "endDate": "请选择结束时间" -} + "source":"来源", + "sourcePlaceholder":"请输入来源", + "sourceChannel":"来源渠道", + "sourceChannelPlaceholder":"请输入来源渠道", + "consultant":"顾问", + "name":"姓名", + "namePlaceholder":"请输入姓名", + "age":"年龄", + "agePlaceholder":"请输入年龄", + "gender":"性别", + "genderPlaceholder":"请输入性别", + "phoneNumber":"联系电话", + "phoneNumberPlaceholder":"请输入联系电话", + "demand":"需求", + "demandPlaceholder":"请输入需求", + "purchasingPower":"购买力", + "purchasingPowerPlaceholder":"请输入购买力", + "cognitiveIdea":"认知理念", + "cognitiveIdeaPlaceholder":"请输入认知理念", + "optionalClassTime":"可选上课时间", + "optionalClassTimePlaceholder":"请输入可选上课时间", + "distance":"距离", + "distancePlaceholder":"请输入距离", + "decisionMaker":"决策人", + "decisionMakerPlaceholder":"请输入决策人", + "initialIntent":"客户初步意向度", + "initialIntentPlaceholder":"请输入客户初步意向度", + "campus":"所属校区", + "campusPlaceholder":"请输入所属校区", + "status":"客户状态", + "statusPlaceholder":"请输入客户状态", + "addCustomerResources":"添加客户资源", + "updateCustomerResources":"编辑客户资源", + "customerResourcesDeleteTips":"确定要删除该数据吗?", + "startDate":"请选择开始时间", + "endDate":"请选择结束时间", + + + "resourceId":"资源", + "resourceIdPlaceholder":"请输入资源", + "orderStatus":"订单状态", + "orderStatusPlaceholder":"请输入订单状态", + "paymentType":"付款类型", + "paymentTypePlaceholder":"请输入付款类型", + "orderAmount":"订单金额", + "orderAmountPlaceholder":"请输入订单金额", + "courseId":"课程", + "courseIdPlaceholder":"请输入课程", + "classId":"班级", + "classIdPlaceholder":"请输入班级", + "staffId":"人员", + "paymentTime":"支付时间", + "addOrderTable":"添加订单", + "updateOrderTable":"编辑订单", + + + "resourceId":"客户姓名", + "resourceIdPlaceholder":"全部", + "studentId":"学员姓名", + "studentIdPlaceholder":"全部", + "height":"身高", + "heightPlaceholder":"请输入身高", + "createdAt":"创建时间", + "updatedAt":"修改时间", + "addPhysicalTest":"添加体测", + "updatePhysicalTest":"编辑体测", + "physicalTestDeleteTips":"确定要删除该数据吗?", + "startDate":"请选择开始时间", + "endDate":"请选择结束时间", + + "resourceId":"客户姓名", + "resourceIdPlaceholder":"全部", + "studentId":"学员姓名", + "studentIdPlaceholder":"全部", + "height":"身高", + "heightPlaceholder":"请输入身高", + "weight":"体重", + "weightPlaceholder":"请输入体重", + "coachId":"教练", + "coachIdPlaceholder":"请输入教练", + "seatedForwardBend":"坐位体前屈", + "seatedForwardBendPlaceholder":"请输入坐位体前屈", + "sitUps":"仰卧卷腹", + "sitUpsPlaceholder":"请输入仰卧卷腹", + "pushUps":"九十度仰卧撑", + "pushUpsPlaceholder":"请输入九十度仰卧撑", + "flamingoBalance":"火烈鸟平衡测试", + "flamingoBalancePlaceholder":"请输入火烈鸟平衡测试", + "thirtySecJump":"三十秒双脚连续跳", + "thirtySecJumpPlaceholder":"请输入三十秒双脚连续跳", + "standingLongJump":"立定跳远", + "standingLongJumpPlaceholder":"请输入立定跳远", + "agilityRun":"4乘10m灵敏折返跑", + "agilityRunPlaceholder":"请输入4乘10m灵敏折返跑", + "balanceBeam":"走平衡木", + "balanceBeamPlaceholder":"请输入走平衡木", + "tennisThrow":"网球掷远", + "tennisThrowPlaceholder":"请输入网球掷远", + "tenMeterShuttleRun":"十米往返跑", + "tenMeterShuttleRunPlaceholder":"请输入十米往返跑", + "addPhysicalTest":"添加体测", + "updatePhysicalTest":"编辑体测", + "physicalTestDeleteTips":"确定要删除该数据吗?", + "startDate":"请选择开始时间", + "endDate":"请选择结束时间" +} \ No newline at end of file diff --git a/admin/src/app/lang/zh-cn/order_table.order_table.json b/admin/src/app/lang/zh-cn/order_table.order_table.json index 7e371d1d..70f0dc1f 100644 --- a/admin/src/app/lang/zh-cn/order_table.order_table.json +++ b/admin/src/app/lang/zh-cn/order_table.order_table.json @@ -1,35 +1,21 @@ { - "id": "订单编号", - "idPlaceholder": "请输入订单编号", - "paymentId": "支付编号", - "paymentIdPlaceholder": "请输入支付编号", - "orderStatus": "订单状态: pending-待支付, paid-已支付", - "orderStatusPlaceholder": "请输入订单状态: pending-待支付, paid-已支付", - "paymentType": "付款类型: cash-现金支付, scan_code-扫码支付, subscription-订阅支付", - "paymentTypePlaceholder": "请输入付款类型: cash-现金支付, scan_code-扫码支付, subscription-订阅支付", - "orderAmount": "订单金额", - "orderAmountPlaceholder": "请输入订单金额", - "courseId": "课程ID", - "courseIdPlaceholder": "请输入课程ID", - "classId": "班级ID", - "classIdPlaceholder": "请输入班级ID", - "staffId": "人员ID", - "staffIdPlaceholder": "请输入人员ID", - "resourceId": "资源ID", - "resourceIdPlaceholder": "请输入资源ID", - "afterSalesStatus": "售后状态", - "afterSalesStatusPlaceholder": "请输入售后状态", - "afterSalesReason": "售后原因", - "afterSalesReasonPlaceholder": "请输入售后原因", - "afterSalesTime": "售后时间", - "afterSalesTimePlaceholder": "请输入售后时间", - "paymentTime": "支付时间", - "paymentTimePlaceholder": "请输入支付时间", - "subscriptionPaymentTime": "订阅支付生成时间", - "subscriptionPaymentTimePlaceholder": "请输入订阅支付生成时间", - "addOrderTable": "添加订单", - "updateOrderTable": "编辑订单", - "orderTableDeleteTips": "确定要删除该数据吗?", - "startDate": "请选择开始时间", - "endDate": "请选择结束时间" -} + "resourceId":"资源", + "resourceIdPlaceholder":"请输入资源", + "orderStatus":"订单状态", + "orderStatusPlaceholder":"请输入订单状态", + "paymentType":"付款类型", + "paymentTypePlaceholder":"请输入付款类型", + "orderAmount":"订单金额", + "orderAmountPlaceholder":"请输入订单金额", + "courseId":"课程", + "courseIdPlaceholder":"请输入课程", + "classId":"班级", + "classIdPlaceholder":"请输入班级", + "staffId":"人员", + "paymentTime":"支付时间", + "addOrderTable":"添加订单", + "updateOrderTable":"编辑订单", + "orderTableDeleteTips":"确定要删除该数据吗?", + "startDate":"请选择开始时间", + "endDate":"请选择结束时间" +} \ No newline at end of file diff --git a/admin/src/app/lang/zh-cn/physical_test.physical_test.json b/admin/src/app/lang/zh-cn/physical_test.physical_test.json index a216f974..478af9c2 100644 --- a/admin/src/app/lang/zh-cn/physical_test.physical_test.json +++ b/admin/src/app/lang/zh-cn/physical_test.physical_test.json @@ -1,17 +1,37 @@ { - "resourceId": "客户姓名", - "resourceIdPlaceholder": "请输入客户姓名", - "studentId": "学员姓名", - "studentIdPlaceholder": "请输入学员姓名", - "height": "身高", - "heightPlaceholder": "请输入身高", - "createdAt": "创建时间", - "createdAtPlaceholder": "请输入创建时间", - "updatedAt": "修改时间", - "updatedAtPlaceholder": "请输入修改时间", - "addPhysicalTest": "添加体测", - "updatePhysicalTest": "编辑体测", - "physicalTestDeleteTips": "确定要删除该数据吗?", - "startDate": "请选择开始时间", - "endDate": "请选择结束时间" -} + "resourceId":"客户姓名", + "resourceIdPlaceholder":"全部", + "studentId":"学员姓名", + "studentIdPlaceholder":"全部", + "height":"身高", + "heightPlaceholder":"请输入身高", + "weight":"体重", + "weightPlaceholder":"请输入体重", + "coachId":"教练", + "coachIdPlaceholder":"请输入教练", + "seatedForwardBend":"坐位体前屈", + "seatedForwardBendPlaceholder":"请输入坐位体前屈", + "sitUps":"仰卧卷腹", + "sitUpsPlaceholder":"请输入仰卧卷腹", + "pushUps":"九十度仰卧撑", + "pushUpsPlaceholder":"请输入九十度仰卧撑", + "flamingoBalance":"火烈鸟平衡测试", + "flamingoBalancePlaceholder":"请输入火烈鸟平衡测试", + "thirtySecJump":"三十秒双脚连续跳", + "thirtySecJumpPlaceholder":"请输入三十秒双脚连续跳", + "standingLongJump":"立定跳远", + "standingLongJumpPlaceholder":"请输入立定跳远", + "agilityRun":"4乘10m灵敏折返跑", + "agilityRunPlaceholder":"请输入4乘10m灵敏折返跑", + "balanceBeam":"走平衡木", + "balanceBeamPlaceholder":"请输入走平衡木", + "tennisThrow":"网球掷远", + "tennisThrowPlaceholder":"请输入网球掷远", + "tenMeterShuttleRun":"十米往返跑", + "tenMeterShuttleRunPlaceholder":"请输入十米往返跑", + "addPhysicalTest":"添加体测", + "updatePhysicalTest":"编辑体测", + "physicalTestDeleteTips":"确定要删除该数据吗?", + "startDate":"请选择开始时间", + "endDate":"请选择结束时间" +} \ No newline at end of file diff --git a/admin/src/app/lang/zh-cn/physical_test.physical_test_edit.json b/admin/src/app/lang/zh-cn/physical_test.physical_test_edit.json index e284d434..dc9a1bc5 100644 --- a/admin/src/app/lang/zh-cn/physical_test.physical_test_edit.json +++ b/admin/src/app/lang/zh-cn/physical_test.physical_test_edit.json @@ -1,39 +1,39 @@ { - "resourceId": "客户姓名", - "studentId": "学员姓名", - "height": "身高", - "weight": "体重", - "coachId": "教练", - "createdAt": "创建时间", - "updatedAt": "修改时间", - "seatedForwardBend": "坐位体前屈", - "sitUps": "仰卧卷腹", - "pushUps": "九十度仰卧撑", - "flamingoBalance": "火烈鸟平衡测试", - "thirtySecJump": "三十秒双脚连续跳", - "standingLongJump": "立定跳远", - "agilityRun": "4乘10m灵敏折返跑", - "balanceBeam": "走平衡木", - "tennisThrow": "网球掷远", - "tenMeterShuttleRun": "十米往返跑", - "resourceIdPlaceholder": "请输入客户姓名", - "studentIdPlaceholder": "请输入学员姓名", - "heightPlaceholder": "请输入身高", - "weightPlaceholder": "请输入体重", - "coachIdPlaceholder": "请输入教练", - "createdAtPlaceholder": "请输入创建时间", - "updatedAtPlaceholder": "请输入修改时间", - "seatedForwardBendPlaceholder": "请输入坐位体前屈", - "sitUpsPlaceholder": "请输入仰卧卷腹", - "pushUpsPlaceholder": "请输入九十度仰卧撑", - "flamingoBalancePlaceholder": "请输入火烈鸟平衡测试", - "thirtySecJumpPlaceholder": "请输入三十秒双脚连续跳", - "standingLongJumpPlaceholder": "请输入立定跳远", - "agilityRunPlaceholder": "请输入4乘10m灵敏折返跑", - "balanceBeamPlaceholder": "请输入走平衡木", - "tennisThrowPlaceholder": "请输入网球掷远", - "tenMeterShuttleRunPlaceholder": "请输入十米往返跑", - "addPhysicalTest": "添加体测", - "updatePhysicalTest": "编辑体测", - "physicalTestDeleteTips": "确定要删除该体测吗?" -} + "resourceId":"客户姓名", + "studentId":"学员姓名", + "height":"身高", + "weight":"体重", + "coachId":"教练", + "createdAt":"创建时间", + "updatedAt":"修改时间", + "seatedForwardBend":"坐位体前屈", + "sitUps":"仰卧卷腹", + "pushUps":"九十度仰卧撑", + "flamingoBalance":"火烈鸟平衡测试", + "thirtySecJump":"三十秒双脚连续跳", + "standingLongJump":"立定跳远", + "agilityRun":"4乘10m灵敏折返跑", + "balanceBeam":"走平衡木", + "tennisThrow":"网球掷远", + "tenMeterShuttleRun":"十米往返跑", + "resourceIdPlaceholder":"请选择客户姓名", + "studentIdPlaceholder":"请选择学员姓名", + "heightPlaceholder":"请输入身高", + "weightPlaceholder":"请输入体重", + "coachIdPlaceholder":"请选择教练", + "createdAtPlaceholder":"请输入创建时间", + "updatedAtPlaceholder":"请输入修改时间", + "seatedForwardBendPlaceholder":"请输入坐位体前屈", + "sitUpsPlaceholder":"请输入仰卧卷腹", + "pushUpsPlaceholder":"请输入九十度仰卧撑", + "flamingoBalancePlaceholder":"请输入火烈鸟平衡测试", + "thirtySecJumpPlaceholder":"请输入三十秒双脚连续跳", + "standingLongJumpPlaceholder":"请输入立定跳远", + "agilityRunPlaceholder":"请输入4乘10m灵敏折返跑", + "balanceBeamPlaceholder":"请输入走平衡木", + "tennisThrowPlaceholder":"请输入网球掷远", + "tenMeterShuttleRunPlaceholder":"请输入十米往返跑", + "addPhysicalTest":"添加体测", + "updatePhysicalTest":"编辑体测", + "physicalTestDeleteTips":"确定要删除该体测吗?" +} \ No newline at end of file diff --git a/admin/src/app/lang/zh-cn/tc_dialog.physical_test_edit.json b/admin/src/app/lang/zh-cn/tc_dialog.physical_test_edit.json new file mode 100644 index 00000000..478af9c2 --- /dev/null +++ b/admin/src/app/lang/zh-cn/tc_dialog.physical_test_edit.json @@ -0,0 +1,37 @@ +{ + "resourceId":"客户姓名", + "resourceIdPlaceholder":"全部", + "studentId":"学员姓名", + "studentIdPlaceholder":"全部", + "height":"身高", + "heightPlaceholder":"请输入身高", + "weight":"体重", + "weightPlaceholder":"请输入体重", + "coachId":"教练", + "coachIdPlaceholder":"请输入教练", + "seatedForwardBend":"坐位体前屈", + "seatedForwardBendPlaceholder":"请输入坐位体前屈", + "sitUps":"仰卧卷腹", + "sitUpsPlaceholder":"请输入仰卧卷腹", + "pushUps":"九十度仰卧撑", + "pushUpsPlaceholder":"请输入九十度仰卧撑", + "flamingoBalance":"火烈鸟平衡测试", + "flamingoBalancePlaceholder":"请输入火烈鸟平衡测试", + "thirtySecJump":"三十秒双脚连续跳", + "thirtySecJumpPlaceholder":"请输入三十秒双脚连续跳", + "standingLongJump":"立定跳远", + "standingLongJumpPlaceholder":"请输入立定跳远", + "agilityRun":"4乘10m灵敏折返跑", + "agilityRunPlaceholder":"请输入4乘10m灵敏折返跑", + "balanceBeam":"走平衡木", + "balanceBeamPlaceholder":"请输入走平衡木", + "tennisThrow":"网球掷远", + "tennisThrowPlaceholder":"请输入网球掷远", + "tenMeterShuttleRun":"十米往返跑", + "tenMeterShuttleRunPlaceholder":"请输入十米往返跑", + "addPhysicalTest":"添加体测", + "updatePhysicalTest":"编辑体测", + "physicalTestDeleteTips":"确定要删除该数据吗?", + "startDate":"请选择开始时间", + "endDate":"请选择结束时间" +} \ No newline at end of file diff --git a/admin/src/app/views/customer_resources/customer_resources.vue b/admin/src/app/views/customer_resources/customer_resources.vue index cc5316e9..ca1df18a 100644 --- a/admin/src/app/views/customer_resources/customer_resources.vue +++ b/admin/src/app/views/customer_resources/customer_resources.vue @@ -1,368 +1,368 @@ + /* 多行超出隐藏 */ + .multi-hidden { + word-break: break-all; + text-overflow: ellipsis; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + } + \ No newline at end of file diff --git a/admin/src/app/views/order_table/components/order-table-edit.vue b/admin/src/app/views/order_table/components/order-table-edit.vue index df702bf9..91d48266 100644 --- a/admin/src/app/views/order_table/components/order-table-edit.vue +++ b/admin/src/app/views/order_table/components/order-table-edit.vue @@ -1,343 +1,267 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/order_table/order_table.vue b/admin/src/app/views/order_table/order_table.vue index f569d1dc..8129b146 100644 --- a/admin/src/app/views/order_table/order_table.vue +++ b/admin/src/app/views/order_table/order_table.vue @@ -1,369 +1,238 @@ - - - - - + + + + + diff --git a/admin/src/app/views/physical_test/components/physical-test-edit.vue b/admin/src/app/views/physical_test/components/physical-test-edit.vue index 07e37708..fc37d730 100644 --- a/admin/src/app/views/physical_test/components/physical-test-edit.vue +++ b/admin/src/app/views/physical_test/components/physical-test-edit.vue @@ -1,399 +1,324 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/physical_test/physical_test.vue b/admin/src/app/views/physical_test/physical_test.vue index 2622d078..f185c9bb 100644 --- a/admin/src/app/views/physical_test/physical_test.vue +++ b/admin/src/app/views/physical_test/physical_test.vue @@ -1,247 +1,204 @@ - - - - - + + + + + diff --git a/admin/src/app/views/physical_test/physical_test_edit.vue b/admin/src/app/views/physical_test/physical_test_edit.vue index 54155aed..bf274a9d 100644 --- a/admin/src/app/views/physical_test/physical_test_edit.vue +++ b/admin/src/app/views/physical_test/physical_test_edit.vue @@ -1,383 +1,339 @@ - - - - - + + + + + diff --git a/admin/src/app/views/tc_dialog/tc_dialog.vue b/admin/src/app/views/tc_dialog/tc_dialog.vue new file mode 100644 index 00000000..9a4e3fac --- /dev/null +++ b/admin/src/app/views/tc_dialog/tc_dialog.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/niucloud/app/adminapi/controller/customer_resources/CustomerResources.php b/niucloud/app/adminapi/controller/customer_resources/CustomerResources.php index 3185a946..0564a1e4 100644 --- a/niucloud/app/adminapi/controller/customer_resources/CustomerResources.php +++ b/niucloud/app/adminapi/controller/customer_resources/CustomerResources.php @@ -22,16 +22,19 @@ use app\service\admin\customer_resources\CustomerResourcesService; */ class CustomerResources extends BaseAdminController { - /** - * 获取客户资源列表 - * @return \think\Response - */ - public function lists() - { + /** + * 获取客户资源列表 + * @return \think\Response + */ + public function lists(){ $data = $this->request->params([ - ["name", ""], - ["phone_number", ""], - ["type", "khzy"] + ["name",""], + ["age",""], + ["gender",""], + ["phone_number",""], + ["type","khzy"], + ["created_at",[]], + ["updated_at",[]], ]); return success((new CustomerResourcesService())->getPage($data)); } @@ -41,8 +44,7 @@ class CustomerResources extends BaseAdminController * @param int $id * @return \think\Response */ - public function info(int $id) - { + public function info(int $id){ return success((new CustomerResourcesService())->getInfo($id)); } @@ -50,37 +52,36 @@ class CustomerResources extends BaseAdminController * 添加客户资源 * @return \think\Response */ - public function add() - { + public function add(){ $data = $this->request->params([ - ["source", ""], - ["source_channel", ""], - ["name", ""], - ["age", 0], - ["gender", ""], - ["phone_number", ""], - ["demand", ""], - ["purchasing_power", ""], - ["cognitive_idea", ""], - ["optional_class_time", ""], - ["distance", ""], - ["decision_maker", ""], - ["initial_intent", ""], - ["campus", ""], - ["status", ""], - ["create_year_month", date("Y-m")], - ["create_date", date("Y-m-d")], - ["purchase_power", ""], - ["concept_awareness", ""], - ["preferred_class_time", ""], - ["distance_tow", ""], - ["communication", ""], - ["promised_visit_time", ""], - ["actual_visit_time", ""], - ["call_intent", ""], - ["first_visit_status", ""], - ["second_visit_status", ""], - ["is_closed", ""] + ["source",""], + ["source_channel",""], + ["name",""], + ["age",0], + ["gender",""], + ["phone_number",""], + ["demand",""], + ["purchasing_power",""], + ["cognitive_idea",""], + ["optional_class_time",""], + ["distance",""], + ["decision_maker",""], + ["initial_intent",""], + ["campus",""], + ["status",""], + ["create_year_month",date("Y-m")], + ["create_date",date("Y-m-d")], + ["purchase_power",""], + ["concept_awareness",""], + ["preferred_class_time",""], + ["distance_tow",""], + ["communication",""], + ["promised_visit_time",""], + ["actual_visit_time",""], + ["call_intent",""], + ["first_visit_status",""], + ["second_visit_status",""], + ["is_closed",""] ]); $this->validate($data, 'app\validate\customer_resources\CustomerResources.add'); @@ -92,38 +93,37 @@ class CustomerResources extends BaseAdminController * @param $id 客户资源id * @return \think\Response */ - public function edit(int $id) - { + public function edit(int $id){ $data = $this->request->params([ - ["source", ""], - ["source_channel", ""], - ["name", ""], - ["age", 0], - ["gender", ""], - ["phone_number", ""], - ["demand", ""], - ["purchasing_power", ""], - ["cognitive_idea", ""], - ["optional_class_time", ""], - ["distance", ""], - ["decision_maker", ""], - ["initial_intent", ""], - ["campus", ""], - ["status", ""], - ["create_year_month", date("Y-m")], - ["create_date", date("Y-m-d")], - - ["purchase_power", ""], - ["concept_awareness", ""], - ["preferred_class_time", ""], - ["distance_tow", ""], - ["communication", ""], - ["promised_visit_time", ""], - ["actual_visit_time", ""], - ["call_intent", ""], - ["first_visit_status", ""], - ["second_visit_status", ""], - ["is_closed", ""] + ["source",""], + ["source_channel",""], + ["name",""], + ["age",0], + ["gender",""], + ["phone_number",""], + ["demand",""], + ["purchasing_power",""], + ["cognitive_idea",""], + ["optional_class_time",""], + ["distance",""], + ["decision_maker",""], + ["initial_intent",""], + ["campus",""], + ["status",""], + ["create_year_month",date("Y-m")], + ["create_date",date("Y-m-d")], + + ["purchase_power",""], + ["concept_awareness",""], + ["preferred_class_time",""], + ["distance_tow",""], + ["communication",""], + ["promised_visit_time",""], + ["actual_visit_time",""], + ["call_intent",""], + ["first_visit_status",""], + ["second_visit_status",""], + ["is_closed",""] ]); $this->validate($data, 'app\validate\customer_resources\CustomerResources.edit'); @@ -135,35 +135,31 @@ class CustomerResources extends BaseAdminController * @param $id 客户资源id * @return \think\Response */ - public function del(int $id) - { + public function del(int $id){ (new CustomerResourcesService())->del($id); return success('DELETE_SUCCESS'); } - public function getPersonnelAll() - { + public function getPersonnelAll(){ $data = $this->request->params([ - ["role_id", ""], + ["role_id",""], ]); - return success((new CustomerResourcesService())->getPersonnelAll($data)); + return success(( new CustomerResourcesService())->getPersonnelAll($data)); } - public function getCampusAll() - { - return success((new CustomerResourcesService())->getCampusAll()); + public function getCampusAll(){ + return success(( new CustomerResourcesService())->getCampusAll()); } - public function fp_edit() - { + public function fp_edit(){ $data = $this->request->params([ - ["shared_id", ""], - ["shared_by", ""], + ["shared_id",""], + ["shared_by",""], ]); - return success((new CustomerResourcesService())->fp_edit($data)); + return success(( new CustomerResourcesService())->fp_edit($data)); } diff --git a/niucloud/app/adminapi/controller/order_table/OrderTable.php b/niucloud/app/adminapi/controller/order_table/OrderTable.php index a7ff3a05..567bc89f 100644 --- a/niucloud/app/adminapi/controller/order_table/OrderTable.php +++ b/niucloud/app/adminapi/controller/order_table/OrderTable.php @@ -28,19 +28,8 @@ class OrderTable extends BaseAdminController */ public function lists(){ $data = $this->request->params([ - ["payment_id",""], ["order_status",""], - ["payment_type",""], - ["order_amount",""], - ["course_id",""], - ["class_id",""], - ["staff_id",""], - ["resource_id",""], - ["after_sales_status",""], - ["after_sales_reason",""], - ["after_sales_time",""], - ["payment_time",""], - ["subscription_payment_time",""] + ["payment_type",""] ]); return success((new OrderTableService())->getPage($data)); } @@ -60,19 +49,13 @@ class OrderTable extends BaseAdminController */ public function add(){ $data = $this->request->params([ - ["payment_id",""], + ["resource_id",0], ["order_status",""], ["payment_type",""], ["order_amount",0.00], ["course_id",0], ["class_id",0], - ["staff_id",0], - ["resource_id",0], - ["after_sales_status",""], - ["after_sales_reason",""], - ["after_sales_time",1747388736], - ["payment_time",1747388736], - ["subscription_payment_time",1747388736] + ]); $this->validate($data, 'app\validate\order_table\OrderTable.add'); $id = (new OrderTableService())->add($data); @@ -86,19 +69,13 @@ class OrderTable extends BaseAdminController */ public function edit(int $id){ $data = $this->request->params([ - ["payment_id",""], + ["resource_id",0], ["order_status",""], ["payment_type",""], ["order_amount",0.00], ["course_id",0], ["class_id",0], - ["staff_id",0], - ["resource_id",0], - ["after_sales_status",""], - ["after_sales_reason",""], - ["after_sales_time",1747388736], - ["payment_time",1747388736], - ["subscription_payment_time",1747388736] + ]); $this->validate($data, 'app\validate\order_table\OrderTable.edit'); (new OrderTableService())->edit($id, $data); @@ -116,4 +93,20 @@ class OrderTable extends BaseAdminController } + public function getCustomerResourcesAll(){ + return success(( new OrderTableService())->getCustomerResourcesAll()); + } + + public function getCourseAll(){ + return success(( new OrderTableService())->getCourseAll()); + } + + public function getClassGradeAll(){ + return success(( new OrderTableService())->getClassGradeAll()); + } + + public function getPersonnelAll(){ + return success(( new OrderTableService())->getPersonnelAll()); + } + } diff --git a/niucloud/app/adminapi/controller/physical_test/PhysicalTest.php b/niucloud/app/adminapi/controller/physical_test/PhysicalTest.php index 01c1cdcb..e4b9dff2 100644 --- a/niucloud/app/adminapi/controller/physical_test/PhysicalTest.php +++ b/niucloud/app/adminapi/controller/physical_test/PhysicalTest.php @@ -29,10 +29,7 @@ class PhysicalTest extends BaseAdminController public function lists(){ $data = $this->request->params([ ["resource_id",""], - ["student_id",""], - ["height",""], - ["created_at",""], - ["updated_at",""] + ["student_id",""] ]); return success((new PhysicalTestService())->getPage($data)); } @@ -57,8 +54,6 @@ class PhysicalTest extends BaseAdminController ["height",0.00], ["weight",0.00], ["coach_id",0], - ["created_at",1747576653], - ["updated_at",1747576653], ["seated_forward_bend",0.00], ["sit_ups",0.00], ["push_ups",0.00], @@ -87,8 +82,6 @@ class PhysicalTest extends BaseAdminController ["height",0.00], ["weight",0.00], ["coach_id",0], - ["created_at",1747576653], - ["updated_at",1747576653], ["seated_forward_bend",0.00], ["sit_ups",0.00], ["push_ups",0.00], @@ -116,4 +109,16 @@ class PhysicalTest extends BaseAdminController } + public function getCustomerResourcesAll(){ + return success(( new PhysicalTestService())->getCustomerResourcesAll()); + } + + public function getStudentAll(){ + return success(( new PhysicalTestService())->getStudentAll()); + } + + public function getPersonnelAll(){ + return success(( new PhysicalTestService())->getPersonnelAll()); + } + } diff --git a/niucloud/app/adminapi/route/order_table.php b/niucloud/app/adminapi/route/order_table.php index 92a20d47..831b1170 100644 --- a/niucloud/app/adminapi/route/order_table.php +++ b/niucloud/app/adminapi/route/order_table.php @@ -14,6 +14,8 @@ use think\facade\Route; use app\adminapi\middleware\AdminCheckRole; use app\adminapi\middleware\AdminCheckToken; use app\adminapi\middleware\AdminLog; + + // USER_CODE_BEGIN -- order_table Route::group('order_table', function () { @@ -29,6 +31,14 @@ Route::group('order_table', function () { //删除订单 Route::delete('order_table/:id', 'order_table.OrderTable/del'); + Route::get('customer_resources_all','order_table.OrderTable/getCustomerResourcesAll'); + + Route::get('course_all','order_table.OrderTable/getCourseAll'); + + Route::get('class_grade_all','order_table.OrderTable/getClassGradeAll'); + + Route::get('personnel_all','order_table.OrderTable/getPersonnelAll'); + })->middleware([ AdminCheckToken::class, AdminCheckRole::class, diff --git a/niucloud/app/adminapi/route/physical_test.php b/niucloud/app/adminapi/route/physical_test.php index 16006893..4a6cce0f 100644 --- a/niucloud/app/adminapi/route/physical_test.php +++ b/niucloud/app/adminapi/route/physical_test.php @@ -16,6 +16,8 @@ use app\adminapi\middleware\AdminCheckToken; use app\adminapi\middleware\AdminLog; + + // USER_CODE_BEGIN -- physical_test Route::group('physical_test', function () { @@ -31,6 +33,12 @@ Route::group('physical_test', function () { //删除体测 Route::delete('physical_test/:id', 'physical_test.PhysicalTest/del'); + Route::get('customer_resources_all','physical_test.PhysicalTest/getCustomerResourcesAll'); + + Route::get('student_all','physical_test.PhysicalTest/getStudentAll'); + + Route::get('personnel_all','physical_test.PhysicalTest/getPersonnelAll'); + })->middleware([ AdminCheckToken::class, AdminCheckRole::class, diff --git a/niucloud/app/model/class_grade/ClassGrade.php b/niucloud/app/model/class_grade/ClassGrade.php new file mode 100644 index 00000000..7df2cbcf --- /dev/null +++ b/niucloud/app/model/class_grade/ClassGrade.php @@ -0,0 +1,226 @@ +where("id", $value); + } + } + + /** + * 搜索器:班级校区ID + * @param $value + * @param $data + */ + public function searchCampusIdAttr($query, $value, $data) + { + if ($value) { + $query->where("campus_id", $value); + } + } + + /** + * 搜索器:班级校区名称 + * @param $value + * @param $data + */ + public function searchCampusNameAttr($query, $value, $data) + { + if ($value) { + $query->where("campus_name", $value); + } + } + + /** + * 搜索器:班级班级名称 + * @param $value + * @param $data + */ + public function searchClassNameAttr($query, $value, $data) + { + if ($value) { + $query->where("class_name", $value); + } + } + + /** + * 搜索器:班级班级主教练 + * @param $value + * @param $data + */ + public function searchHeadCoachAttr($query, $value, $data) + { + if ($value) { + $query->where("head_coach", $value); + } + } + + /** + * 搜索器:班级班级授课年龄段 + * @param $value + * @param $data + */ + public function searchAgeGroupAttr($query, $value, $data) + { + if ($value) { + $query->where("age_group", $value); + } + } + + /** + * 搜索器:班级班级类型 + * @param $value + * @param $data + */ + public function searchClassTypeAttr($query, $value, $data) + { + if ($value) { + $query->where("class_type", $value); + } + } + + /** + * 搜索器:班级班级助教 + * @param $value + * @param $data + */ + public function searchAssistantCoachAttr($query, $value, $data) + { + if ($value) { + $query->where("assistant_coach", $value); + } + } + + /** + * 搜索器:班级创建时间 + * @param $value + * @param $data + */ + public function searchCreatedAtAttr($query, $value, $data) + { + if ($value) { + $query->where("created_at", $value); + } + } + + /** + * 搜索器:班级修改时间 + * @param $value + * @param $data + */ + public function searchUpdatedAtAttr($query, $value, $data) + { + if ($value) { + $query->where("updated_at", $value); + } + } + + /** + * 搜索器:班级逻辑删除时间 + * @param $value + * @param $data + */ + public function searchDeletedAtAttr($query, $value, $data) + { + if ($value) { + $query->where("deleted_at", $value); + } + } + + /** + * 搜索器:班级班级状态 + * @param $value + * @param $data + */ + public function searchStatusAttr($query, $value, $data) + { + if ($value) { + $query->where("status", $value); + } + } + + /** + * 搜索器:班级班级排序 + * @param $value + * @param $data + */ + public function searchSortOrderAttr($query, $value, $data) + { + if ($value) { + $query->where("sort_order", $value); + } + } + + /** + * 搜索器:班级班级备注 + * @param $value + * @param $data + */ + public function searchRemarksAttr($query, $value, $data) + { + if ($value) { + $query->where("remarks", $value); + } + } + + + + + + +} diff --git a/niucloud/app/model/order_table/OrderTable.php b/niucloud/app/model/order_table/OrderTable.php index 8be65af4..04532570 100644 --- a/niucloud/app/model/order_table/OrderTable.php +++ b/niucloud/app/model/order_table/OrderTable.php @@ -16,6 +16,14 @@ use think\model\concern\SoftDelete; use think\model\relation\HasMany; use think\model\relation\HasOne; +use app\model\customer_resources\CustomerResources; + +use app\model\course\Course; + +use app\model\class_grade\ClassGrade; + +use app\model\personnel\Personnel; + /** * 订单模型 * Class OrderTable @@ -43,31 +51,7 @@ class OrderTable extends BaseModel /** - * 搜索器:订单订单编号 - * @param $value - * @param $data - */ - public function searchIdAttr($query, $value, $data) - { - if ($value) { - $query->where("id", $value); - } - } - - /** - * 搜索器:订单支付编号 - * @param $value - * @param $data - */ - public function searchPaymentIdAttr($query, $value, $data) - { - if ($value) { - $query->where("payment_id", $value); - } - } - - /** - * 搜索器:订单订单状态: pending-待支付, paid-已支付 + * 搜索器:订单订单状态 * @param $value * @param $data */ @@ -79,7 +63,7 @@ class OrderTable extends BaseModel } /** - * 搜索器:订单付款类型: cash-现金支付, scan_code-扫码支付, subscription-订阅支付 + * 搜索器:订单付款类型 * @param $value * @param $data */ @@ -90,129 +74,25 @@ class OrderTable extends BaseModel } } - /** - * 搜索器:订单订单金额 - * @param $value - * @param $data - */ - public function searchOrderAmountAttr($query, $value, $data) - { - if ($value) { - $query->where("order_amount", $value); - } - } - - /** - * 搜索器:订单课程ID - * @param $value - * @param $data - */ - public function searchCourseIdAttr($query, $value, $data) - { - if ($value) { - $query->where("course_id", $value); - } - } - - /** - * 搜索器:订单班级ID - * @param $value - * @param $data - */ - public function searchClassIdAttr($query, $value, $data) - { - if ($value) { - $query->where("class_id", $value); - } - } - - /** - * 搜索器:订单人员ID - * @param $value - * @param $data - */ - public function searchStaffIdAttr($query, $value, $data) - { - if ($value) { - $query->where("staff_id", $value); - } - } - - /** - * 搜索器:订单资源ID - * @param $value - * @param $data - */ - public function searchResourceIdAttr($query, $value, $data) - { - if ($value) { - $query->where("resource_id", $value); - } - } - /** - * 搜索器:订单售后状态 - * @param $value - * @param $data - */ - public function searchAfterSalesStatusAttr($query, $value, $data) - { - if ($value) { - $query->where("after_sales_status", $value); - } - } + - /** - * 搜索器:订单售后原因 - * @param $value - * @param $data - */ - public function searchAfterSalesReasonAttr($query, $value, $data) - { - if ($value) { - $query->where("after_sales_reason", $value); - } - } + - /** - * 搜索器:订单售后时间 - * @param $value - * @param $data - */ - public function searchAfterSalesTimeAttr($query, $value, $data) - { - if ($value) { - $query->where("after_sales_time", $value); - } + public function customerResources(){ + return $this->hasOne(CustomerResources::class, 'id', 'resource_id')->joinType('left')->withField('name,id')->bind(['resource_id_name'=>'name']); } - - /** - * 搜索器:订单支付时间 - * @param $value - * @param $data - */ - public function searchPaymentTimeAttr($query, $value, $data) - { - if ($value) { - $query->where("payment_time", $value); - } + + public function course(){ + return $this->hasOne(Course::class, 'id', 'course_id')->joinType('left')->withField('course_name,id')->bind(['course_id_name'=>'course_name']); } - - /** - * 搜索器:订单订阅支付生成时间 - * @param $value - * @param $data - */ - public function searchSubscriptionPaymentTimeAttr($query, $value, $data) - { - if ($value) { - $query->where("subscription_payment_time", $value); - } + + public function classGrade(){ + return $this->hasOne(ClassGrade::class, 'id', 'class_id')->joinType('left')->withField('class_name,id')->bind(['class_id_name'=>'class_name']); } - - - + public function personnel(){ + return $this->hasOne(Personnel::class, 'id', 'staff_id')->joinType('left')->withField('name,id')->bind(['staff_id_name'=>'name']); + } - } diff --git a/niucloud/app/model/physical_test/PhysicalTest.php b/niucloud/app/model/physical_test/PhysicalTest.php index 97039146..c81da6ec 100644 --- a/niucloud/app/model/physical_test/PhysicalTest.php +++ b/niucloud/app/model/physical_test/PhysicalTest.php @@ -16,6 +16,12 @@ use think\model\concern\SoftDelete; use think\model\relation\HasMany; use think\model\relation\HasOne; +use app\model\customer_resources\CustomerResources; + +use app\model\student\Student; + +use app\model\personnel\Personnel; + /** * 体测模型 * Class PhysicalTest @@ -66,45 +72,21 @@ class PhysicalTest extends BaseModel } } - /** - * 搜索器:体测身高 - * @param $value - * @param $data - */ - public function searchHeightAttr($query, $value, $data) - { - if ($value) { - $query->where("height", $value); - } - } - - /** - * 搜索器:体测创建时间 - * @param $value - * @param $data - */ - public function searchCreatedAtAttr($query, $value, $data) - { - if ($value) { - $query->where("created_at", $value); - } - } - - /** - * 搜索器:体测修改时间 - * @param $value - * @param $data - */ - public function searchUpdatedAtAttr($query, $value, $data) - { - if ($value) { - $query->where("updated_at", $value); - } - } - + public function customerResources(){ + return $this->hasOne(CustomerResources::class, 'id', 'resource_id')->joinType('left')->withField('name,id')->bind(['resource_id_name'=>'name']); + } + + public function student(){ + return $this->hasOne(Student::class, 'id', 'student_id')->joinType('left')->withField('name,id')->bind(['student_id_name'=>'name']); + } + + public function personnel(){ + return $this->hasOne(Personnel::class, 'id', 'coach_id')->joinType('left')->withField('name,id')->bind(['coach_id_name'=>'name']); + } + } diff --git a/niucloud/app/service/admin/customer_resources/CustomerResourcesService.php b/niucloud/app/service/admin/customer_resources/CustomerResourcesService.php index e47c4a70..6f549033 100644 --- a/niucloud/app/service/admin/customer_resources/CustomerResourcesService.php +++ b/niucloud/app/service/admin/customer_resources/CustomerResourcesService.php @@ -42,6 +42,7 @@ class CustomerResourcesService extends BaseAdminService */ public function getPage(array $data = []) { +// dump($data);die; $field = 'a.*,b.id as shared_id'; $order = 'a.id desc'; $where = []; @@ -53,16 +54,39 @@ class CustomerResourcesService extends BaseAdminService $where[] = ['a.name','=',$data['name']]; } + if($data['age']){ + $where[] = ['a.age','=',$data['age']]; + } + + if($data['gender']){ + $where[] = ['a.gender','=',$data['gender']]; + } + if($data['type'] == 'yjfp'){ $where[] = ['b.shared_by','=',0]; } + + + + + $search_model = $this->model ->alias("a") ->join(['school_resource_sharing' => 'b'],'a.id = b.resource_id','left') ->where($where) ->with(['personnel'])->field($field)->order($order); + + if (isset($data['created_at'][0]) && isset($data['created_at'][1])) { + $search_model->whereBetweenTime('created_at', $data['created_at'][0]."00:00:00", $data['created_at'][1]."23:59:59"); + } + + if (isset($data['updated_at'][0]) && isset($data['updated_at'][1])) { + $search_model->whereBetweenTime('updated_at', $data['updated_at'][0]."00:00:00", $data['updated_at'][1]."23:59:59"); + } + + $list = $this->pageQuery($search_model); @@ -152,19 +176,19 @@ class CustomerResourcesService extends BaseAdminService public function edit(int $id, array $data) { $personnel = new Personnel(); - $data['consultant'] = $personnel->where(['sys_user_id' => $this->uid])->value("id"); - if(!$data['consultant']){ - return fail("操作失败"); - } +// $data['consultant'] = $personnel->where(['sys_user_id' => $this->uid])->value("id"); +// if(!$data['consultant']){ +// return fail("操作失败"); +// } -// $data['consultant'] = 1; + $data['consultant'] = 1; $res = $this->model->where([['id', '=', $id]])->findOrEmpty()->toArray(); $this->model->where([['id', '=', $id]])->update([ 'source' => $data['source'], 'source_channel' => $data['source_channel'], - 'consultant' => $data['consultant'], +// 'consultant' => $data['consultant'], 'name' => $data['name'], 'age' => $data['age'], 'gender' => $data['gender'], @@ -201,7 +225,7 @@ class CustomerResourcesService extends BaseAdminService if($data['purchase_power']){ $sixSpeedModificationLog = new SixSpeedModificationLog(); $six_id = $sixSpeed->where(['resource_id' => $id])->value("id"); - $data['staff_id'] = $data['consultant']; +// $data['staff_id'] = $data['consultant']; @@ -217,7 +241,7 @@ class CustomerResourcesService extends BaseAdminService 'first_visit_status' => $data['first_visit_status'], 'second_visit_status' => $data['second_visit_status'], 'is_closed' => $data['is_closed'], - 'staff_id' => $data['staff_id'], +// 'staff_id' => $data['staff_id'], 'resource_id' => $id ]; if($six_id){ diff --git a/niucloud/app/service/admin/order_table/OrderTableService.php b/niucloud/app/service/admin/order_table/OrderTableService.php index 665ce71b..82adfc4a 100644 --- a/niucloud/app/service/admin/order_table/OrderTableService.php +++ b/niucloud/app/service/admin/order_table/OrderTableService.php @@ -12,6 +12,10 @@ namespace app\service\admin\order_table; use app\model\order_table\OrderTable; +use app\model\customer_resources\CustomerResources; +use app\model\course\Course; +use app\model\class_grade\ClassGrade; +use app\model\personnel\Personnel; use core\base\BaseAdminService; @@ -36,10 +40,10 @@ class OrderTableService extends BaseAdminService */ public function getPage(array $where = []) { - $field = 'id,payment_id,order_status,payment_type,order_amount,course_id,class_id,staff_id,resource_id,after_sales_status,after_sales_reason,after_sales_time,created_at,updated_at,payment_time,subscription_payment_time'; + $field = 'id,resource_id,payment_id,order_status,payment_type,order_amount,course_id,class_id,staff_id,after_sales_status,after_sales_reason,after_sales_time,created_at,updated_at,payment_time,subscription_payment_time'; $order = 'id desc'; - $search_model = $this->model->withSearch(["id","payment_id","order_status","payment_type","order_amount","course_id","class_id","staff_id","resource_id","after_sales_status","after_sales_reason","after_sales_time","payment_time","subscription_payment_time"], $where)->field($field)->order($order); + $search_model = $this->model->withSearch(["order_status","payment_type"], $where)->with(['customerResources','course','classGrade','personnel'])->field($field)->order($order); $list = $this->pageQuery($search_model); return $list; } @@ -51,9 +55,9 @@ class OrderTableService extends BaseAdminService */ public function getInfo(int $id) { - $field = 'id,payment_id,order_status,payment_type,order_amount,course_id,class_id,staff_id,resource_id,after_sales_status,after_sales_reason,after_sales_time,created_at,updated_at,payment_time,subscription_payment_time'; + $field = 'id,resource_id,payment_id,order_status,payment_type,order_amount,course_id,class_id,staff_id,after_sales_status,after_sales_reason,after_sales_time,created_at,updated_at,payment_time,subscription_payment_time'; - $info = $this->model->field($field)->where([['id', "=", $id]])->findOrEmpty()->toArray(); + $info = $this->model->field($field)->where([['id', "=", $id]])->with(['customerResources','course','classGrade','personnel'])->findOrEmpty()->toArray(); return $info; } @@ -64,6 +68,14 @@ class OrderTableService extends BaseAdminService */ public function add(array $data) { + $personnel = new Personnel(); + $data['staff_id'] = $personnel->where(['sys_user_id' => $this->uid])->value("id"); + if(!$data['staff_id']){ + return fail("操作失败"); + } + +// $data['staff_id'] = 1; + $res = $this->model->create($data); return $res->id; @@ -94,6 +106,26 @@ class OrderTableService extends BaseAdminService return $res; } - + + public function getCustomerResourcesAll(){ + $customerResourcesModel = new CustomerResources(); + return $customerResourcesModel->select()->toArray(); + } + + public function getCourseAll(){ + $courseModel = new Course(); + return $courseModel->select()->toArray(); + } + + public function getClassGradeAll(){ + $classGradeModel = new ClassGrade(); + return $classGradeModel->select()->toArray(); + } + + public function getPersonnelAll(){ + $personnelModel = new Personnel(); + return $personnelModel->select()->toArray(); + } + } diff --git a/niucloud/app/service/admin/physical_test/PhysicalTestService.php b/niucloud/app/service/admin/physical_test/PhysicalTestService.php index 12ad6f23..175d8e18 100644 --- a/niucloud/app/service/admin/physical_test/PhysicalTestService.php +++ b/niucloud/app/service/admin/physical_test/PhysicalTestService.php @@ -12,6 +12,9 @@ namespace app\service\admin\physical_test; use app\model\physical_test\PhysicalTest; +use app\model\customer_resources\CustomerResources; +use app\model\student\Student; +use app\model\personnel\Personnel; use core\base\BaseAdminService; @@ -39,7 +42,7 @@ class PhysicalTestService extends BaseAdminService $field = 'id,resource_id,student_id,height,weight,coach_id,created_at,updated_at,seated_forward_bend,sit_ups,push_ups,flamingo_balance,thirty_sec_jump,standing_long_jump,agility_run,balance_beam,tennis_throw,ten_meter_shuttle_run'; $order = 'id desc'; - $search_model = $this->model->withSearch(["resource_id","student_id","height","created_at","updated_at"], $where)->field($field)->order($order); + $search_model = $this->model->withSearch(["resource_id","student_id"], $where)->with(['customerResources','student','personnel'])->field($field)->order($order); $list = $this->pageQuery($search_model); return $list; } @@ -53,7 +56,7 @@ class PhysicalTestService extends BaseAdminService { $field = 'id,resource_id,student_id,height,weight,coach_id,created_at,updated_at,seated_forward_bend,sit_ups,push_ups,flamingo_balance,thirty_sec_jump,standing_long_jump,agility_run,balance_beam,tennis_throw,ten_meter_shuttle_run'; - $info = $this->model->field($field)->where([['id', "=", $id]])->findOrEmpty()->toArray(); + $info = $this->model->field($field)->where([['id', "=", $id]])->with(['customerResources','student','personnel'])->findOrEmpty()->toArray(); return $info; } @@ -95,5 +98,20 @@ class PhysicalTestService extends BaseAdminService } + public function getCustomerResourcesAll(){ + $customerResourcesModel = new CustomerResources(); + return $customerResourcesModel->select()->toArray(); + } + + public function getStudentAll(){ + $studentModel = new Student(); + return $studentModel->select()->toArray(); + } + + public function getPersonnelAll(){ + $personnelModel = new Personnel(); + return $personnelModel->select()->toArray(); + } + } diff --git a/niucloud/app/validate/order_table/OrderTable.php b/niucloud/app/validate/order_table/OrderTable.php index 70ec8b69..e027bebf 100644 --- a/niucloud/app/validate/order_table/OrderTable.php +++ b/niucloud/app/validate/order_table/OrderTable.php @@ -20,30 +20,26 @@ class OrderTable extends BaseValidate { protected $rule = [ - 'payment_id' => 'require', + 'resource_id' => 'require', 'order_status' => 'require', 'payment_type' => 'require', 'order_amount' => 'require', 'course_id' => 'require', 'class_id' => 'require', - 'staff_id' => 'require', - 'resource_id' => 'require', ]; protected $message = [ - 'payment_id.require' => ['common_validate.require', ['payment_id']], + 'resource_id.require' => ['common_validate.require', ['resource_id']], 'order_status.require' => ['common_validate.require', ['order_status']], 'payment_type.require' => ['common_validate.require', ['payment_type']], 'order_amount.require' => ['common_validate.require', ['order_amount']], 'course_id.require' => ['common_validate.require', ['course_id']], 'class_id.require' => ['common_validate.require', ['class_id']], - 'staff_id.require' => ['common_validate.require', ['staff_id']], - 'resource_id.require' => ['common_validate.require', ['resource_id']], ]; protected $scene = [ - "add" => ['payment_id', 'order_status', 'payment_type', 'order_amount', 'course_id', 'class_id', 'staff_id', 'resource_id', 'after_sales_status', 'after_sales_reason', 'after_sales_time', 'payment_time', 'subscription_payment_time'], - "edit" => ['payment_id', 'order_status', 'payment_type', 'order_amount', 'course_id', 'class_id', 'staff_id', 'resource_id', 'after_sales_status', 'after_sales_reason', 'after_sales_time', 'payment_time', 'subscription_payment_time'] + "add" => ['resource_id', 'order_status', 'payment_type', 'order_amount', 'course_id', 'class_id'], + "edit" => ['resource_id', 'order_status', 'payment_type', 'order_amount', 'course_id', 'class_id'] ]; } diff --git a/niucloud/app/validate/physical_test/PhysicalTest.php b/niucloud/app/validate/physical_test/PhysicalTest.php index 712644e5..dfedafc4 100644 --- a/niucloud/app/validate/physical_test/PhysicalTest.php +++ b/niucloud/app/validate/physical_test/PhysicalTest.php @@ -36,8 +36,8 @@ class PhysicalTest extends BaseValidate ]; protected $scene = [ - "add" => ['resource_id', 'student_id', 'height', 'weight', 'coach_id', 'created_at', 'updated_at', 'seated_forward_bend', 'sit_ups', 'push_ups', 'flamingo_balance', 'thirty_sec_jump', 'standing_long_jump', 'agility_run', 'balance_beam', 'tennis_throw', 'ten_meter_shuttle_run'], - "edit" => ['resource_id', 'student_id', 'height', 'weight', 'coach_id', 'created_at', 'updated_at', 'seated_forward_bend', 'sit_ups', 'push_ups', 'flamingo_balance', 'thirty_sec_jump', 'standing_long_jump', 'agility_run', 'balance_beam', 'tennis_throw', 'ten_meter_shuttle_run'] + "add" => ['resource_id', 'student_id', 'height', 'weight', 'coach_id', 'seated_forward_bend', 'sit_ups', 'push_ups', 'flamingo_balance', 'thirty_sec_jump', 'standing_long_jump', 'agility_run', 'balance_beam', 'tennis_throw', 'ten_meter_shuttle_run'], + "edit" => ['resource_id', 'student_id', 'height', 'weight', 'coach_id', 'seated_forward_bend', 'sit_ups', 'push_ups', 'flamingo_balance', 'thirty_sec_jump', 'standing_long_jump', 'agility_run', 'balance_beam', 'tennis_throw', 'ten_meter_shuttle_run'] ]; }