数据权限
							parent
							
								
									0580b9876e
								
							
						
					
					
						commit
						a3e714aad9
					
				|  | @ -4,7 +4,10 @@ NODE_ENV=development | |||
| VITE_DEV=true | ||||
| 
 | ||||
| # 请求路径 | ||||
| VITE_BASE_URL='http://127.0.0.1:48080' | ||||
| # VITE_BASE_URL='http://8.130.12.151:48080' | ||||
| # VITE_BASE_URL='http://lhy.free.idcfengye.com' | ||||
| # VITE_BASE_URL='http://m94844f6.natappfree.cc' | ||||
| VITE_BASE_URL='http://172.22.3.168:48080' | ||||
| 
 | ||||
| # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务 | ||||
| VITE_UPLOAD_TYPE=server | ||||
|  |  | |||
|  | @ -100,3 +100,13 @@ export const getBusinessPageByContact = async (params) => { | |||
| export const transferBusiness = async (data: TransferReqVO) => { | ||||
|   return await request.put({ url: '/crm/business/transfer', data }) | ||||
| } | ||||
| 
 | ||||
| // 查询项目难度
 | ||||
| export const getDifficult = async (params) => { | ||||
|   return await request.get({ url: `/crm/project-difficulty/page`, params }) | ||||
| } | ||||
| 
 | ||||
| // 查询平台
 | ||||
| export const getTechnicalList = async (params) => { | ||||
|   return await request.get({ url: `/crm/technical-docking-checklist/page`, params }) | ||||
| } | ||||
|  |  | |||
|  | @ -50,3 +50,8 @@ export const deleteProduct = async (id: number) => { | |||
| export const exportProduct = async (params) => { | ||||
|   return await request.download({ url: `/crm/product/export-excel`, params }) | ||||
| } | ||||
| 
 | ||||
| // 查询产品列表
 | ||||
| export const getInsuranceList = async () => { | ||||
|   return await request.get({ url: `/crm/service-fee-collection-method/get-insurance-list` }) | ||||
| } | ||||
|  |  | |||
|  | @ -85,6 +85,11 @@ export const QuotationApi = { | |||
|     return await request.post({ url: `/crm/quotation/customer-confirm`, data }) | ||||
|   }, | ||||
| 
 | ||||
|   // 查询服务费收取方式
 | ||||
|   getServerMethodList: async (params: any) => { | ||||
|     return await request.get({ url: `/crm/service-fee-collection-method/page`, params }) | ||||
|   }, | ||||
| 
 | ||||
| // ==================== 子表(CRM 报价产品关联) ====================
 | ||||
| 
 | ||||
|   // 获得CRM 报价产品关联列表
 | ||||
|  |  | |||
|  | @ -0,0 +1,3 @@ | |||
| import processForm from './src/index.vue' | ||||
| 
 | ||||
| export { processForm } | ||||
|  | @ -0,0 +1,39 @@ | |||
| <template> | ||||
|   <el-form :model="model" :rules="rules" label-width="120px" v-loading="loading"> | ||||
|       <el-row> | ||||
|     <!-- 动态渲染插槽内容 --> | ||||
|     <template v-for="(field, index) in Object.keys(fields)" :key="index"> | ||||
|         <template v-if="!fields[field]"> | ||||
|           <!-- 显示 --> | ||||
|           <slot :name="field"></slot> | ||||
|         </template> | ||||
|     </template> | ||||
|       </el-row> | ||||
|   </el-form> | ||||
| </template> | ||||
| 
 | ||||
| <script lang="ts"> | ||||
| import { defineComponent, PropType } from 'vue'; | ||||
| 
 | ||||
| export default defineComponent({ | ||||
|   name: 'processForm', | ||||
|   props: { | ||||
|     model: { | ||||
|       type: Object as PropType<Record<string, any>>, | ||||
|       required: true, | ||||
|     }, | ||||
|     rules: { | ||||
|       type: Object as PropType<Record<string, any>>, | ||||
|       required: true, | ||||
|     }, | ||||
|     fields: { | ||||
|       type: Object as PropType<Record<string, { visible: boolean; readonly: boolean }>>, | ||||
|       required: true, | ||||
|     }, | ||||
|     loading: { | ||||
|       type: Boolean, | ||||
|       default: false, | ||||
|     }, | ||||
|   }, | ||||
| }); | ||||
| </script> | ||||
|  | @ -0,0 +1,3 @@ | |||
| import processTable from './src/index.vue' | ||||
| 
 | ||||
| export { processTable } | ||||
|  | @ -0,0 +1,52 @@ | |||
| <template> | ||||
|   <el-table :data="data" v-loading="loading" :stripe="stripe" :show-overflow-tooltip="showOverflowTooltip" style="width: 100%"> | ||||
|     <!-- 插槽内容 --> | ||||
|     <template v-for="(slotName, index) in Object.keys(fields)" :key="index"> | ||||
|       <template v-if="!fields[slotName]"> | ||||
|         <slot :name="slotName" :scope="scope"></slot> | ||||
|       </template> | ||||
|     </template> | ||||
|     <slot name="other" :scope="scope"></slot> | ||||
| 
 | ||||
|   </el-table> | ||||
| </template> | ||||
| 
 | ||||
| <script lang="ts"> | ||||
| import { defineComponent, PropType, useSlots } from 'vue'; | ||||
| 
 | ||||
| export default defineComponent({ | ||||
|   name: 'AuthTable', | ||||
|   props: { | ||||
|     data: { | ||||
|       type: Array as PropType<any[]>, | ||||
|       required: true, | ||||
|     }, | ||||
|     columns: { | ||||
|       type: Object as PropType<Record<string, { visible: boolean; label: string; width?: string }>>, | ||||
|       required: true, | ||||
|     }, | ||||
|     loading: { | ||||
|       type: Boolean, | ||||
|       default: false, | ||||
|     }, | ||||
|     stripe: { | ||||
|       type: Boolean, | ||||
|       default: true, | ||||
|     }, | ||||
|     showOverflowTooltip: { | ||||
|       type: Boolean, | ||||
|       default: true, | ||||
|     }, | ||||
|     fields: { | ||||
|       type: Object, | ||||
|       required: true, | ||||
|     }, | ||||
|   }, | ||||
|   setup() { | ||||
|     const slots = useSlots(); | ||||
|     return { | ||||
|       slots, | ||||
|     }; | ||||
|   }, | ||||
| }); | ||||
| </script> | ||||
|  | @ -64,6 +64,8 @@ import install from '@form-create/element-ui/auto-import' | |||
| 
 | ||||
| //======================= 自定义组件 =======================
 | ||||
| import { UploadFile, UploadImg, UploadImgs } from '@/components/UploadFile' | ||||
| import { processForm } from '@/components/processForm' | ||||
| import { processTable } from '@/components/processTable' | ||||
| import { useApiSelect } from '@/components/FormCreate' | ||||
| import { Editor } from '@/components/Editor' | ||||
| import DictSelect from '@/components/FormCreate/src/components/DictSelect.vue' | ||||
|  | @ -112,6 +114,8 @@ const components = [ | |||
|   UploadImg, | ||||
|   UploadImgs, | ||||
|   UploadFile, | ||||
|   processForm, | ||||
|   processTable, | ||||
|   DictSelect, | ||||
|   UserSelect, | ||||
|   DeptSelect, | ||||
|  |  | |||
|  | @ -894,7 +894,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ | |||
|         component: () => import('@/views/project/online/OnlineApplicationDetail.vue') | ||||
|       }, | ||||
|       { | ||||
|         path: 'briefWork/BriefWorkDetail', | ||||
|         path: 'briefWork/BriefWorkProcess', | ||||
|         name: 'DayReportDetail', | ||||
|         meta: { | ||||
|           title: '日报详情', | ||||
|  |  | |||
|  | @ -182,6 +182,30 @@ | |||
|             </el-radio-group> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="8"> | ||||
|           <el-form-item label="项目难度" prop="projectDifficultyId"> | ||||
|             <el-select v-model="formData.projectDifficultyId" :disabled="type" clearable placeholder="请选择项目难度"> | ||||
|               <el-option | ||||
|                 v-for="dict in difficultOptions" | ||||
|                 :key="dict.id" | ||||
|                 :label="dict.projectDifficulty" | ||||
|                 :value="dict.id" | ||||
|               /> | ||||
|             </el-select> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="8"> | ||||
|           <el-form-item label="平台" prop="platformId"> | ||||
|             <el-select v-model="formData.platformId" :disabled="type" clearable placeholder="请选择平台"> | ||||
|               <el-option | ||||
|                 v-for="dict in techOptions" | ||||
|                 :key="dict.id" | ||||
|                 :label="dict.name" | ||||
|                 :value="dict.id" | ||||
|               /> | ||||
|             </el-select> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="备注" prop="remark"> | ||||
|             <el-input type="textarea" :disabled="type" v-model="formData.remark" clearable :placeholder="formType ? '' : '请输入备注'" /> | ||||
|  | @ -301,6 +325,8 @@ const formRef = ref(); | |||
| const userOptions = ref<UserApi.UserVO[]>([]); | ||||
| const statusTypeList = ref([]); | ||||
| const customerList = ref([]); | ||||
| const techOptions = ref([]); | ||||
| const difficultOptions = ref([]); | ||||
| const deptTree = ref(); | ||||
| const props = defineProps({ | ||||
|   type: propTypes.number.def(undefined) | ||||
|  | @ -435,6 +461,11 @@ onMounted(async () => { | |||
|   customerList.value = await CustomerApi.getSelfCustomerSimpleList(); | ||||
|   statusTypeList.value = await BusinessStatusApi.getBusinessStatusTypeSimpleList(); | ||||
|   userOptions.value = await UserApi.getSimpleUserList(); | ||||
|   let techData = await BusinessApi.getTechnicalList({pageNo: 1, pageSize: 1000});//平台 | ||||
|   console.log('%csrc/views/crm/business/BusinessForm.vue:468 diffData', 'color: #007acc;', techData); | ||||
|   techOptions.value = techData.list | ||||
|   let diffData = await BusinessApi.getDifficult({pageNo: 1, pageSize: 1000});//困难度 | ||||
|   difficultOptions.value = diffData.list | ||||
|   deptTree.value = handleTree(await DeptApi.getSimpleDeptList()); | ||||
| }); | ||||
| </script> | ||||
|  |  | |||
|  | @ -1,63 +1,95 @@ | |||
| <template> | ||||
|   <Dialog :title="dialogTitle" v-model="dialogVisible"> | ||||
|   <Dialog :title="dialogTitle" v-model="dialogVisible" width="50%"> | ||||
|     <el-form | ||||
|       ref="formRef" | ||||
|       :model="formData" | ||||
|       :rules="formRules" | ||||
|       label-width="100px" | ||||
|       label-width="140px" | ||||
|       v-loading="formLoading" | ||||
|     > | ||||
|       <el-form-item label="项目编码" prop="projectCode"> | ||||
|         <el-input v-model="formData.projectCode" placeholder="请输入项目编码" /> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="结算账期" prop="paymentTerm"> | ||||
|         <el-select v-model="formData.paymentTerm" placeholder="请选择结算账期"> | ||||
|           <el-option | ||||
|             v-for="dict in getIntDictOptions(DICT_TYPE.PAYMENT_TERM)" | ||||
|             :key="dict.value" | ||||
|             :label="dict.label" | ||||
|             :value="dict.value" | ||||
|           /> | ||||
|         </el-select> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="授信方式" prop="creditMethod"> | ||||
|         <el-select v-model="formData.creditMethod" placeholder="请选择授信方式"> | ||||
|           <el-option | ||||
|             v-for="dict in getIntDictOptions(DICT_TYPE.CREDIT_METHOD)" | ||||
|             :key="dict.value" | ||||
|             :label="dict.label" | ||||
|             :value="dict.value" | ||||
|           /> | ||||
|         </el-select> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="适用项目" prop="applicableProjects"> | ||||
|         <el-select v-model="formData.applicableProjects" placeholder="请选择适用项目"> | ||||
|           <el-option | ||||
|             v-for="dict in getIntDictOptions(DICT_TYPE.CRM_APPLICABLE_PROJECTS)" | ||||
|             :key="dict.value" | ||||
|             :label="dict.label" | ||||
|             :value="dict.value" | ||||
|           /> | ||||
|         </el-select> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="计算周期" prop="creditCalcCycle"> | ||||
|         <el-input v-model="formData.creditCalcCycle" placeholder="请输入计算周期" /> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="出票周期" prop="ticketIssuanceCycle"> | ||||
|         <el-input v-model="formData.ticketIssuanceCycle" placeholder="请输入出票周期" /> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="结算周期" prop="settlementCycle"> | ||||
|         <el-input v-model="formData.settlementCycle" placeholder="请输入结算周期" /> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="使用天数" prop="usageDays"> | ||||
|         <el-input v-model="formData.usageDays" placeholder="请输入使用天数" /> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="年利率" prop="annualInterestRate"> | ||||
|         <el-input v-model="formData.annualInterestRate" placeholder="请输入年利率" /> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="备注" prop="remark"> | ||||
|         <el-input v-model="formData.remark" placeholder="请输入备注" /> | ||||
|       </el-form-item> | ||||
|       <el-row> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="项目编码" prop="projectCode"> | ||||
|             <el-input v-model="formData.projectCode" placeholder="请输入项目编码" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="结算账期" prop="paymentTerm"> | ||||
|             <el-select v-model="formData.paymentTerm" placeholder="请选择结算账期"> | ||||
|               <el-option | ||||
|                 v-for="dict in getIntDictOptions(DICT_TYPE.PAYMENT_TERM)" | ||||
|                 :key="dict.value" | ||||
|                 :label="dict.label" | ||||
|                 :value="dict.value" | ||||
|               /> | ||||
|             </el-select> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="授信方式" prop="creditMethod"> | ||||
|             <el-select v-model="formData.creditMethod" placeholder="请选择授信方式"> | ||||
|               <el-option | ||||
|                 v-for="dict in getIntDictOptions(DICT_TYPE.CREDIT_METHOD)" | ||||
|                 :key="dict.value" | ||||
|                 :label="dict.label" | ||||
|                 :value="dict.value" | ||||
|               /> | ||||
|             </el-select> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="适用项目" prop="applicableProjects"> | ||||
|             <el-select v-model="formData.applicableProjects" placeholder="请选择适用项目"> | ||||
|               <el-option | ||||
|                 v-for="dict in getIntDictOptions(DICT_TYPE.CRM_APPLICABLE_PROJECTS)" | ||||
|                 :key="dict.value" | ||||
|                 :label="dict.label" | ||||
|                 :value="dict.value" | ||||
|               /> | ||||
|             </el-select> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="计算周期" prop="creditCalcCycle"> | ||||
|             <el-input v-model="formData.creditCalcCycle" placeholder="请输入计算周期" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="出票周期" prop="ticketIssuanceCycle"> | ||||
|             <el-input v-model="formData.ticketIssuanceCycle" placeholder="请输入出票周期" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="结算周期" prop="settlementCycle"> | ||||
|             <el-input v-model="formData.settlementCycle" placeholder="请输入结算周期" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="使用天数" prop="usageDays"> | ||||
|             <el-input v-model="formData.usageDays" placeholder="请输入使用天数" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="年利率" prop="annualInterestRate"> | ||||
|             <el-input v-model="formData.annualInterestRate" placeholder="请输入年利率" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="比例收费" prop="proportionalFee"> | ||||
|             <el-input v-model="formData.proportionalFee" placeholder="请输入比例收费" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="授信额度计算周期" prop="creditLimitCalculationCycle"> | ||||
|             <el-input v-model="formData.creditLimitCalculationCycle" placeholder="请输入授信额度计算周期" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="备注" prop="remark"> | ||||
|             <el-input type="textarea" :rows="5" v-model="formData.remark" placeholder="请输入备注" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|       </el-row> | ||||
|     </el-form> | ||||
|     <template #footer> | ||||
|       <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> | ||||
|  | @ -102,6 +134,8 @@ const formRules = reactive({ | |||
|   settlementCycle: [{ required: true, message: '结算周期不能为空', trigger: 'blur' }], | ||||
|   usageDays: [{ required: true, message: '使用天数不能为空', trigger: 'blur' }], | ||||
|   annualInterestRate: [{ required: true, message: '年利率不能为空', trigger: 'blur' }], | ||||
|   proportionalFee: [{ required: true, message: '比例收费不能为空', trigger: 'blur' }], | ||||
|   creditLimitCalculationCycle: [{ required: true, message: '授信额度计算周期不能为空', trigger: 'blur' }], | ||||
| }) | ||||
| const formRef = ref() // 表单 Ref | ||||
| 
 | ||||
|  |  | |||
|  | @ -74,15 +74,15 @@ | |||
|   <!-- 列表 --> | ||||
|   <ContentWrap> | ||||
|     <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true"> | ||||
|       <el-table-column align="center" fixed="left" label="合同名称" prop="name" width="160"> | ||||
|       <!-- <el-table-column align="center" fixed="left" label="合同名称" prop="name" width="160"> | ||||
|         <template #default="scope"> | ||||
|           <el-link :underline="false" type="primary" @click="openDetail(scope.row)"> | ||||
|             {{ scope.row.name }} | ||||
|           </el-link> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column align="center" label="合同编号" prop="no" width="180" /> | ||||
|       <el-table-column align="center" label="客户名称" prop="customerName" width="120"> | ||||
|       </el-table-column> --> | ||||
|       <el-table-column align="center" label="目前额度(元)" prop="creditLimit"  /> | ||||
|       <el-table-column align="center" label="调整金额(元)" prop="changeAmount"> | ||||
|         <!-- <template #default="scope"> | ||||
|           <el-link | ||||
|             :underline="false" | ||||
|  | @ -106,9 +106,8 @@ | |||
|       </el-table-column> --> | ||||
|       <el-table-column | ||||
|         align="center" | ||||
|         label="合同金额(元)" | ||||
|         prop="totalPrice" | ||||
|         width="140" | ||||
|         label="最终额度(元)" | ||||
|         prop="afterAmount" | ||||
|         :formatter="erpPriceTableColumnFormatter" | ||||
|       /> | ||||
| <!--      <el-table-column | ||||
|  | @ -120,18 +119,17 @@ | |||
|       />--> | ||||
|       <el-table-column | ||||
|         align="center" | ||||
|         label="合同开始时间" | ||||
|         prop="startTime" | ||||
|         width="120" | ||||
|         label="调整金额截止日期" | ||||
|         prop="changeAmountDeadline" | ||||
|         :formatter="dateFormatter2" | ||||
|       /> | ||||
|       <el-table-column | ||||
|       <!-- <el-table-column | ||||
|         align="center" | ||||
|         label="合同结束时间" | ||||
|         prop="endTime" | ||||
|         width="120" | ||||
|         :formatter="dateFormatter2" | ||||
|       /> | ||||
|       /> --> | ||||
|         <!--  <el-table-column align="center" label="客户签约人" prop="signContactName" width="130"> | ||||
|          <template #default="scope"> | ||||
|             <el-link | ||||
|  | @ -170,7 +168,7 @@ | |||
|         prop="contactLastTime" | ||||
|         width="180px" | ||||
|       />--> | ||||
|       <el-table-column align="center" label="负责人" prop="ownerUserName" width="120" /> | ||||
|       <!-- <el-table-column align="center" label="负责人" prop="ownerUserName" width="120" /> | ||||
|       <el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" /> | ||||
|       <el-table-column | ||||
|         :formatter="dateFormatter" | ||||
|  | @ -186,13 +184,13 @@ | |||
|         prop="createTime" | ||||
|         width="180px" | ||||
|       /> | ||||
|       <el-table-column align="center" label="创建人" prop="creatorName" width="120" /> | ||||
|       <el-table-column align="center"  fixed="right" label="合同状态" prop="auditStatus" width="120"> | ||||
|       <el-table-column align="center" label="创建人" prop="creatorName" width="120" /> --> | ||||
|       <!-- <el-table-column align="center"  fixed="right" label="合同状态" prop="auditStatus" width="120"> | ||||
|         <template #default="scope"> | ||||
|           <dict-tag :type="DICT_TYPE.CRM_AUDIT_STATUS" :value="scope.row.auditStatus" /> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column align="center" fixed="right" label="操作" width="180"> | ||||
|       </el-table-column> --> | ||||
|       <el-table-column align="center" fixed="right" label="操作" width="120"> | ||||
|         <template #default="scope"> | ||||
|           <div style="display:flex"> | ||||
|           <el-button | ||||
|  |  | |||
|  | @ -71,6 +71,19 @@ | |||
|           </el-form-item> | ||||
|         </el-col> | ||||
| 
 | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="保险名称" prop="insuranceId"> | ||||
|             <el-select v-model="formData.insuranceId" class="w-1/1" placeholder="请选择保险名称"> | ||||
|               <el-option | ||||
|                 v-for="dict in insuranceList" | ||||
|                 :key="dict.id" | ||||
|                 :label="dict.productDetail" | ||||
|                 :value="dict.id" | ||||
|               /> | ||||
|             </el-select> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
| 
 | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="产品描述" prop="description"> | ||||
|             <el-input v-model="formData.description" placeholder="请输入产品描述"   type="textarea" :rows="3"/> | ||||
|  | @ -94,6 +107,7 @@ defineOptions({ name: 'CrmProductForm' }) | |||
| const { t } = useI18n() // 国际化 | ||||
| const message = useMessage() // 消息弹窗 | ||||
| 
 | ||||
| const insuranceList = ref([]) // 保险列表 | ||||
| const dialogVisible = ref(false) // 弹窗的是否展示 | ||||
| const dialogTitle = ref('') // 弹窗的标题 | ||||
| const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 | ||||
|  | @ -133,6 +147,9 @@ const open = async (type: string, id?: number) => { | |||
|       formLoading.value = false | ||||
|     } | ||||
|   } | ||||
|   //获取保险列表 | ||||
|   insuranceList.value = await ProductApi.getInsuranceList() | ||||
| 
 | ||||
| } | ||||
| defineExpose({ open }) // 提供 open 方法,用于打开弹窗 | ||||
| 
 | ||||
|  |  | |||
|  | @ -96,6 +96,21 @@ | |||
|             <el-input v-model="formData.consultantManagement" placeholder="请输入顾问管理" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="基础服务费" prop="basicServiceFee"> | ||||
|             <el-input v-model="formData.basicServiceFee" placeholder="请输入顾问管理" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="代订服务费" prop="bookingPaymentServiceFee"> | ||||
|             <el-input v-model="formData.bookingPaymentServiceFee" placeholder="请输入顾问管理" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="12"> | ||||
|           <el-form-item label="票据分拣服务费" prop="billSortingServiceFee"> | ||||
|             <el-input v-model="formData.billSortingServiceFee" placeholder="请输入顾问管理" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="备注" prop="remark"> | ||||
|             <el-input type="textarea" :rows="5" v-model="formData.remark" placeholder="请输入备注" /> | ||||
|  | @ -160,6 +175,9 @@ const formRules = reactive({ | |||
|   consultantOrderCost: [{ required: true, message: '顾问订单成本不能为空', trigger: 'blur' }], | ||||
|   markupCommission: [{ required: true, message: '溢价分佣不能为空', trigger: 'blur' }], | ||||
|   consultantManagement: [{ required: true, message: '顾问管理不能为空', trigger: 'blur' }], | ||||
|   basicServiceFee: [{ required: true, message: '基础服务费不能为空', trigger: 'blur' }], | ||||
|   bookingPaymentServiceFee: [{ required: true, message: '代订服务费不能为空', trigger: 'blur' }], | ||||
|   billSortingServiceFee: [{ required: true, message: '票据分拣服务费不能为空', trigger: 'blur' }], | ||||
| }) | ||||
| const formRef = ref() // 表单 Ref | ||||
| 
 | ||||
|  |  | |||
|  | @ -64,7 +64,11 @@ | |||
|   <!-- 列表 --> | ||||
|   <ContentWrap> | ||||
|     <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> | ||||
|       <el-table-column label="产品名称" align="center" prop="projectId" /> | ||||
|       <el-table-column label="产品名称" align="center" prop="projectId" width="180"> | ||||
|       <template #default="scope"> | ||||
|           {{getName(productList, scope.row.projectId)}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="产品编号" align="center" prop="projectCode" /> | ||||
|       <el-table-column label="产品类型" align="center" prop="projectCode" /> | ||||
|       <el-table-column label="明细类型" align="center" prop="projectCode" /> | ||||
|  | @ -95,7 +99,7 @@ | |||
|           <el-button | ||||
|             link | ||||
|             type="primary" | ||||
|             @click="openForm('update', scope.row.projectId)" | ||||
|             @click="openForm('update', scope.row.id)" | ||||
|             v-hasPermi="['crm:product-procurement-cost:update']" | ||||
|           > | ||||
|             编辑 | ||||
|  | @ -129,6 +133,9 @@ import { dateFormatter } from '@/utils/formatTime' | |||
| import download from '@/utils/download' | ||||
| import { ProductProcurementCostApi, ProductProcurementCostVO } from '@/api/crm/productprocurementcost' | ||||
| import ProductProcurementCostForm from './ProductProcurementCostForm.vue' | ||||
| import * as ProductApi from '@/api/crm/product' | ||||
| 
 | ||||
| const productList = ref<ProductApi.ProductVO[]>([]) // 产品列表 | ||||
| 
 | ||||
| /** 产品采购成本 列表 */ | ||||
| defineOptions({ name: 'ProductProcurementCost' }) | ||||
|  | @ -207,8 +214,15 @@ const handleExport = async () => { | |||
|   } | ||||
| } | ||||
| 
 | ||||
| const getName = (opt, val) => { | ||||
|   const arr = opt.filter(v => v.id == val) | ||||
|   return arr.length ? arr[0]['name'] : '' | ||||
| } | ||||
| 
 | ||||
| /** 初始化 **/ | ||||
| onMounted(() => { | ||||
| onMounted(async() => { | ||||
|   getList() | ||||
|   productList.value = await ProductApi.getProductSimpleList() | ||||
| 
 | ||||
| }) | ||||
| </script> | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ | |||
|       ref="formRef" | ||||
|       :model="formData" | ||||
|       :rules="formRules" | ||||
|       label-width="110px" | ||||
|       label-width="130px" | ||||
|       v-loading="formLoading" | ||||
|     > | ||||
|       <el-row> | ||||
|  | @ -203,7 +203,18 @@ | |||
|             <el-input v-model="formData.businessLicense" disabled /> | ||||
|           </el-form-item> | ||||
|         </el-col>--> | ||||
| 
 | ||||
|         <el-col :span="8"> | ||||
|           <el-form-item label="服务费收取方式" prop="serviceFeeCollectionMethodId"> | ||||
|             <el-select v-model="formData.serviceFeeCollectionMethodId" placeholder="请选择服务费收取方式"> | ||||
|               <el-option | ||||
|                 v-for="dict in serverMethodList" | ||||
|                 :key="dict.id" | ||||
|                 :label="dict.productDetail" | ||||
|                 :value="dict.id" | ||||
|               /> | ||||
|             </el-select> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|       </el-row> | ||||
|        | ||||
|       <el-row> | ||||
|  | @ -422,6 +433,7 @@ const deptTree = ref() // 部门树形结构 | |||
| const deptList = ref() // 部门 | ||||
| const orgList = ref([]) | ||||
| const handleType = ref('') | ||||
| const serverMethodList = ref([]) | ||||
| 
 | ||||
| const invoiceTemplateList = ref([])  | ||||
| const { proxy }: any = getCurrentInstance(); | ||||
|  | @ -437,6 +449,7 @@ const formData = ref({ | |||
|   invoiceTemplateId: undefined, | ||||
|   processInstanceId: undefined, | ||||
|   auditStatus: undefined, | ||||
|   serviceFeeCollectionMethodId: undefined, | ||||
|   ownerUserId: undefined, | ||||
|   expanderUserId: undefined, | ||||
|   pricingUserId: undefined, | ||||
|  | @ -498,6 +511,7 @@ const formRules = reactive({ | |||
|   creditMethod: [{ required: true, message: '授信方式不能为空', trigger: 'change' }], | ||||
|   creditCalcCycle: [{ required: true, message: '授信计算周期不能为空', trigger: 'change' }], | ||||
|   quotationTimes: [{ required: true, message: '第几次报价不能为空', trigger: 'change' }], | ||||
|   serviceFeeCollectionMethodId: [{ required: true, message: '服务费收取方式不能为空', trigger: 'change' }], | ||||
| }) | ||||
| const formRef = ref() // 表单 Ref | ||||
| 
 | ||||
|  | @ -539,8 +553,13 @@ const setSuccess = (val) => { | |||
| const RevenueAnalysisFormRef = ref('') | ||||
| const newProducts = ref([]) | ||||
| const handleClick = (val) => { | ||||
|   console.log('%csrc/views/crm/quotation/QuotationForm.vue:556 subTabsName.value ', 'color: #007acc;', subTabsName.value ); | ||||
|   if (subTabsName.value == 'RevenueAnalysis') return | ||||
| 
 | ||||
|   if(!formData.value.serviceFeeCollectionMethodId) return message.warning('请选择服务费收取方式') | ||||
| 
 | ||||
| console.log('%csrc/views/crm/quotation/QuotationForm.vue:561 1111', 'color: #007acc;', 1111); | ||||
|   newProducts.value = [] | ||||
|   console.log('%csrc/views/crm/quotation/QuotationForm.vue:540 val', 'color: #007acc;', subTabsName.value); | ||||
|   formData.value.products.forEach( item => { | ||||
|     newProducts.value.push({ | ||||
|       id: item.productId, | ||||
|  | @ -548,16 +567,17 @@ const handleClick = (val) => { | |||
|       offlinePrice: item.offlinePrice, | ||||
|       productUnit: item.productUnit, | ||||
|       productName: item.productName, | ||||
|       detailType: item.detailType, | ||||
|       category: item.category | ||||
|     }) | ||||
|   }) | ||||
|   let data = { | ||||
|     businessId: formData.value.businessId, | ||||
|     creditMethod: formData.value.creditMethod, | ||||
|     serviceFeeCollectionMethodId: formData.value.serviceFeeCollectionMethodId, | ||||
|     paymentTerm: formData.value.paymentTerm, | ||||
|     quotationProducts: newProducts.value | ||||
|   } | ||||
|   console.log('%csrc/views/crm/quotation/QuotationForm.vue:551 newProducts.value', 'color: #007acc;', newProducts.value); | ||||
| 
 | ||||
|   RevenueAnalysisFormRef.value.getData(data) | ||||
| } | ||||
|  | @ -654,6 +674,8 @@ const open = async (type: string) => { | |||
|     try { | ||||
|       formData.value = await QuotationApi.getQuotation(type) | ||||
|       formData.value.creditLimit = (formData.value.creditAmount || 0) + (formData.value.creditLimitNum || 0) | ||||
|       formData.value.serviceFeeCollectionMethodId = Number(formData.value.serviceFeeCollectionMethodId) | ||||
| 
 | ||||
|     } finally { | ||||
|       formLoading.value = false | ||||
|     } | ||||
|  | @ -762,6 +784,9 @@ onMounted(async () => { | |||
|   businessList.value = await BusinessApi.getSelfSimpleBusinessList() | ||||
|   // 获得部门树 | ||||
|   deptTree.value = handleTree(await DeptApi.getSimpleDeptList()) | ||||
|   //服务费收取方式 | ||||
|   let serverList = await QuotationApi.getServerMethodList({pageNo: 1, pageSize: 1000}) | ||||
|    serverMethodList.value = serverList.list | ||||
|   const org = await ContractApi.getOrg({ | ||||
|     pageNo: 1, | ||||
|     pageSize: 1000 | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| <template> | ||||
|     <el-table :data="formData" class="-mt-10px"> | ||||
|     <el-table :data="formData" class="-mt-10px" v-loading="loading" :summary-method="getSummaries" | ||||
|     show-summary> | ||||
|        <el-table-column label="产品类型" align="center" min-width="150"> | ||||
|         <template #default="{ row }"> | ||||
|           <dict-tag :type="DICT_TYPE.CRM_PRODUCT_CATEGORY" :value="row.category" /> | ||||
|  | @ -11,49 +12,51 @@ | |||
|             <dict-tag :type="DICT_TYPE.CRM_PRODUCT_DETAIL_TYPE" :value="row.detailType" /> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="销售额" align="center" min-width="150"> | ||||
|       <el-table-column label="销售额" align="center" prop="revenueAnalysisVO.salesVolume" min-width="150"> | ||||
|         <template #default="{ row }"> | ||||
|             {{row.revenueAnalysisVO.salesVolume}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="订单量" align="center" min-width="150"> | ||||
|       <el-table-column label="订单量" align="center" prop="revenueAnalysisVO.totalOrderVolume" min-width="150"> | ||||
|         <template #default="{ row }"> | ||||
|           {{row.revenueAnalysisVO.totalOrderVolume}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="营业收入" align="center" min-width="150"> | ||||
|       <el-table-column label="营业收入" align="center" prop="revenueAnalysisVO.totalIncome" min-width="150"> | ||||
|         <template #default="{ row }"> | ||||
|           {{row.revenueAnalysisVO.totalIncome}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|        <el-table-column label="收入利率" align="center" min-width="130"> | ||||
|        <el-table-column label="收入利率(%)" align="center" prop="revenueAnalysisVO.incomeInterestRate" min-width="130"> | ||||
|         <template #default="{ row }"> | ||||
|           {{(row.revenueAnalysisVO.incomeInterestRate * 100).toFixed(2) + '%'}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="应扣成本" align="center" min-width="150"> | ||||
|       <el-table-column label="应扣成本" align="center" prop="revenueAnalysisVO.deductibleCost" min-width="150"> | ||||
|         <template #default="{ row }"> | ||||
|           {{row.revenueAnalysisVO.deductibleCost}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="利润" align="center" min-width="150"> | ||||
|       <el-table-column label="利润" align="center" prop="revenueAnalysisVO.profit" min-width="150"> | ||||
|         <template #default="{ row }"> | ||||
|           {{row.revenueAnalysisVO.profit}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="利润率" align="center" min-width="250"> | ||||
|       <el-table-column label="利润率(%)" align="center" prop="revenueAnalysisVO.profitRate" min-width="250"> | ||||
|         <template #default="{ row }"> | ||||
|           {{(row.revenueAnalysisVO.profitRate * 100).toFixed(2) + '%'}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="您的分润比例" align="center" min-width="150"> | ||||
|       <el-table-column label="您的分润比例(%)" align="center" prop="revenueAnalysisVO.profitSharingRatio" min-width="150"> | ||||
|         <template #default="{ row }"> | ||||
|             <dict-tag :type="DICT_TYPE.CRM_SERVICE_FEE_INVOICE" :value="row.serviceInvoice" /> | ||||
|             <!-- <dict-tag :type="DICT_TYPE.CRM_SERVICE_FEE_INVOICE" :value="row.serviceInvoice" /> --> | ||||
|           {{(row.revenueAnalysisVO.profitSharingRatio * 100).toFixed(2) + '%'}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="您的分润收入" align="center" min-width="250"> | ||||
|       <el-table-column label="您的分润收入" align="center" prop="revenueAnalysisVO.profitSharingIncome" min-width="250"> | ||||
|         <template #default="{ row }"> | ||||
|             <dict-tag :type="DICT_TYPE.CRM_SERVICE_FEE_INVOICE_ITEMS" :value="row.serviceInvoiceItem" /> | ||||
|             <!-- <dict-tag :type="DICT_TYPE.CRM_SERVICE_FEE_INVOICE_ITEMS" :value="row.serviceInvoiceItem" /> --> | ||||
|           {{row.revenueAnalysisVO.profitSharingIncome}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|  | @ -69,14 +72,90 @@ const props = defineProps<{ | |||
|   products: undefined | ||||
| 
 | ||||
| }>() | ||||
| const loading = ref(true) // 列表的加载中 | ||||
| const formLoading = ref(false) // 表单的加载中 | ||||
| const formData = ref([]) | ||||
| interface RevenueAnalysisVO { | ||||
|   id: string | ||||
|   name: string | ||||
|   salesVolume: number | ||||
|   totalOrderVolume: number | ||||
|   totalIncome: number | ||||
|   incomeInterestRate: number | ||||
|   deductibleCost: number | ||||
|   profit: number | ||||
|   profitRate: number | ||||
| } | ||||
| 
 | ||||
| interface SummaryMethodProps<T = RevenueAnalysisVO> { | ||||
|   columns: TableColumnCtx<T>[] | ||||
|   data: T[] | ||||
| } | ||||
| 
 | ||||
| interface Product { | ||||
|   id: number | ||||
|   productName: string | ||||
|   revenueAnalysisVO: RevenueAnalysisVO | ||||
| } | ||||
| const getSummaries = (param: SummaryMethodProps<Product>) => { | ||||
|   const { columns, data } = param | ||||
|   const sums: string[] = [] | ||||
| 
 | ||||
|   columns.forEach((column, index) => { | ||||
|     if (index === 0) { | ||||
|       sums[index] = '合计' | ||||
|       return | ||||
|     } | ||||
| 
 | ||||
|     const property = column.property | ||||
|     // if(property === 'evenueAnalysisVO.profitSharingIncome' || property === 'revenueAnalysisVO.profitSharingRatio') { | ||||
| 
 | ||||
|     // } | ||||
|     const isNestedField = property ? property.includes('.') : '' | ||||
| 
 | ||||
|     let values: number[] = [] | ||||
| 
 | ||||
|     if (isNestedField) { | ||||
|       const [parentField, childField] = property.split('.') | ||||
|       values = data.map((item) => { | ||||
|         const parentValue = item[parentField as keyof Product] | ||||
|         return parentValue ? Number((parentValue as any)[childField]) : NaN | ||||
|       }) | ||||
|     } else { | ||||
|       values = data.map((item) => Number(item[property as keyof Product])) | ||||
|     } | ||||
| 
 | ||||
|     if (!values.every((value) => Number.isNaN(value))) { | ||||
|       let total = `${values.reduce((prev, curr) => { | ||||
|         const value = Number(curr) | ||||
|         if (!Number.isNaN(value)) { | ||||
|           return prev + value | ||||
|         } else { | ||||
|           return prev | ||||
|         } | ||||
|       }, 0)}` | ||||
|        // 检查是否是百分比字段 | ||||
|       if (column.label.includes('%')) { | ||||
|         sums[index] = `${(total * 100).toFixed(2)}%` // 转换为百分比格式 | ||||
|       } else { | ||||
|         sums[index] = `${Number(total).toFixed(2)}` // 保留两位小数 | ||||
|       } | ||||
|     } else { | ||||
|       sums[index] = '' | ||||
|     } | ||||
|   }) | ||||
| 
 | ||||
|   return sums | ||||
| } | ||||
| /** 表单值 */ | ||||
| const getData = async (data) => { | ||||
|   loading.value = true | ||||
|   try { | ||||
|   let list = await QuotationApi.getRevenueList(data) | ||||
|   console.log('%csrc/views/crm/quotation/components/RevenueAnalysis.vue:79 list.totalRevenueAnalysis', 'color: #007acc;', list.totalRevenueAnalysis); | ||||
|   formData.value = list.quotationProducts | ||||
|   } finally { | ||||
|     loading.value = false | ||||
|   } | ||||
| } | ||||
| const getName = (opt, val) => { | ||||
|   const arr = opt.filter(v => v.value == val) | ||||
|  |  | |||
|  | @ -1,79 +1,94 @@ | |||
| <template> | ||||
|   <ContentWrap> | ||||
|     <el-form | ||||
|     <processForm | ||||
|       ref="formRef" | ||||
|       :model="formData" | ||||
|       :rules="formRules" | ||||
|       :fields="formFields" | ||||
|       label-width="120px" | ||||
|       v-loading="formLoading" | ||||
|     > | ||||
|       <el-row> | ||||
|         <el-col :span="8"> | ||||
|           <el-form-item label="简报开始日期" prop="briefStartDate"> | ||||
|             <el-date-picker | ||||
|               v-model="formData.briefStartDate" | ||||
|               type="date" | ||||
|        <template #briefStartDate> | ||||
|           <el-col :span="8"> | ||||
|             <el-form-item label="简报开始日期" prop="briefStartDate"> | ||||
|               <el-date-picker | ||||
|                 v-model="formData.briefStartDate" | ||||
|                 type="date" | ||||
|                 disabled | ||||
|                 value-format="YYYY-MM-DD" | ||||
|                 placeholder="选择简报开始日期" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </template> | ||||
|         <template #briefEndDate> | ||||
|           <el-col :span="8"> | ||||
|             <el-form-item label="简报结束日期" prop="briefEndDate"> | ||||
|               <el-date-picker | ||||
|               disabled | ||||
|               value-format="YYYY-MM-DD" | ||||
|               placeholder="选择简报开始日期" | ||||
|             /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="8"> | ||||
|           <el-form-item label="简报结束日期" prop="briefEndDate"> | ||||
|             <el-date-picker | ||||
|             disabled | ||||
|               v-model="formData.briefEndDate" | ||||
|               type="date" | ||||
|               value-format="YYYY-MM-DD" | ||||
|               placeholder="选择简报结束日期" | ||||
|             /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="8"> | ||||
|           <el-form-item label="是否选择客户" prop="selectCustomer"> | ||||
|             <el-radio-group v-model="formData.selectCustomer" disabled> | ||||
|               <el-radio :label="true">是</el-radio> | ||||
|               <el-radio :label="false">否</el-radio> | ||||
|             </el-radio-group> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="24"> | ||||
|           <ContentWrap style="border: none;font-weight: 700" v-if="formData.selectCustomer"> | ||||
|             选择客户 | ||||
|           </ContentWrap> | ||||
|           <CustomerForm ref="customerFormRef" :userOptions="userOptions" :type="1" :dataList="formData.followUpRecords" v-if="formData.selectCustomer" /> | ||||
|           <ContentWrap style="border: none;font-weight: 700" > | ||||
|             选择任务 | ||||
|           </ContentWrap> | ||||
|           <TaskForm ref="taskFormRef" :type="1" :dataList="formData.tasks" /> | ||||
|           <!-- <ContentWrap style="border: none;font-weight: 700" > | ||||
|             日报信息 | ||||
|           </ContentWrap> | ||||
|           <DayReportForm :reportType="1" :type="1" ref="dayReportFormRef" :time="time" /> --> | ||||
|         </el-col> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="本周完成工作" prop="workComplate"> | ||||
|             <el-input type="textarea" disabled :rows="5" v-model="formData.workComplate" placeholder="请输入本日完成工作" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="下周工作计划" prop="workPlan"> | ||||
|             <el-input type="textarea" disabled :rows="5" v-model="formData.workPlan" placeholder="请输入明日工作计划" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="工作困难及协助" prop="workAssistance"> | ||||
|             <el-input type="textarea" disabled :rows="5" v-model="formData.workAssistance" placeholder="请输入工作困难及协助" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="附件" prop="attachment"> | ||||
|               <UploadFile v-model="formData.attachment" :disabled="!!formType" :limit="1" :fileType="['doc','docx']"/> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|       </el-row> | ||||
|     </el-form> | ||||
|                 v-model="formData.briefEndDate" | ||||
|                 type="date" | ||||
|                 value-format="YYYY-MM-DD" | ||||
|                 placeholder="选择简报结束日期" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </template> | ||||
|         <template #selectCustomer> | ||||
|           <el-col :span="8"> | ||||
|             <el-form-item label="是否选择客户" prop="selectCustomer"> | ||||
|               <el-radio-group v-model="formData.selectCustomer" disabled> | ||||
|                 <el-radio :label="true">是</el-radio> | ||||
|                 <el-radio :label="false">否</el-radio> | ||||
|               </el-radio-group> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </template> | ||||
|         <template #other> | ||||
|           <el-col :span="24"> | ||||
|               <ContentWrap style="border: none;font-weight: 700" v-if="formData.selectCustomer"> | ||||
|                 选择客户 | ||||
|               </ContentWrap> | ||||
|               <CustomerForm ref="customerFormRef" :formFields="formFields" :userOptions="userOptions" :type="1" :dataList="formData.followUpRecords" v-if="formData.selectCustomer" /> | ||||
|               <ContentWrap style="border: none;font-weight: 700" > | ||||
|                 选择任务 | ||||
|               </ContentWrap> | ||||
|               <TaskForm ref="taskFormRef" :formFields="formFields" :type="1" :dataList="formData.tasks" /> | ||||
|               <!-- <ContentWrap style="border: none;font-weight: 700" > | ||||
|                 日报信息 | ||||
|               </ContentWrap> | ||||
|               <DayReportForm :reportType="1" :type="1" ref="dayReportFormRef" :time="time" /> --> | ||||
|           </el-col> | ||||
|         </template> | ||||
|         <template #workComplate> | ||||
|           <el-col :span="24"> | ||||
|             <el-form-item label="本周完成工作" prop="workComplate"> | ||||
|               <el-input type="textarea" disabled :rows="5" v-model="formData.workComplate" placeholder="请输入本日完成工作" /> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </template> | ||||
|         <template #workPlan> | ||||
|           <el-col :span="24"> | ||||
|             <el-form-item label="下周工作计划" prop="workPlan"> | ||||
|               <el-input type="textarea" disabled :rows="5" v-model="formData.workPlan" placeholder="请输入明日工作计划" /> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </template> | ||||
|         <template #workAssistance> | ||||
|           <el-col :span="24"> | ||||
|             <el-form-item label="工作困难及协助" prop="workAssistance"> | ||||
|               <el-input type="textarea" disabled :rows="5" v-model="formData.workAssistance" placeholder="请输入工作困难及协助" /> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </template> | ||||
|         <template #attachment> | ||||
|           <el-col :span="24"> | ||||
|             <el-form-item label="附件" prop="attachment"> | ||||
|                 <UploadFile v-model="formData.attachment" :disabled="!!formType" :limit="1" :fileType="['doc','docx']"/> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </template> | ||||
|     </processForm> | ||||
|   </ContentWrap> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
|  | @ -99,6 +114,25 @@ const dialogTitle = ref('') // 弹窗的标题 | |||
| const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 | ||||
| const formType = ref('') // 表单的类型:create - 新增;update - 修改 | ||||
| const time = ref([]) //  | ||||
| const formFields = ref({ //字段显示隐藏权限控制,字段顺序就是显示的顺序 | ||||
|     briefStartDate: false, | ||||
|     briefEndDate: false, | ||||
|     selectCustomer: false, | ||||
|     other: false, | ||||
|     workComplate: false , | ||||
|     workPlan: false, | ||||
|     workAssistance: false, | ||||
|     attachment: false, | ||||
|     name: false, | ||||
|     followUpStatus: false , | ||||
|     contactLastContent: false, | ||||
|     contactLastTime: false, | ||||
|     followUpUserId: false, | ||||
|     taskName: false, | ||||
|     taskLevel: false, | ||||
|     userId: false, | ||||
|     taskDescribe: false, | ||||
|   }) | ||||
| const formData = ref({ | ||||
|   id: undefined, | ||||
|   briefType: 2, | ||||
|  | @ -192,7 +226,6 @@ const resetForm = () => { | |||
|     processInstanceId: undefined, | ||||
|     auditStatus: undefined | ||||
|   } | ||||
|   formRef.value?.resetFields() | ||||
| } | ||||
| 
 | ||||
| const route = useRoute(); | ||||
|  |  | |||
|  | @ -42,11 +42,11 @@ | |||
|           <ContentWrap style="border: none;font-weight: 700" v-if="formData.selectCustomer"> | ||||
|             选择客户 | ||||
|           </ContentWrap> | ||||
|           <CustomerForm ref="customerFormRef" :userOptions="userOptions" v-if="formData.selectCustomer" /> | ||||
|           <CustomerForm ref="customerFormRef" :formFields="formFields" :userOptions="userOptions" v-if="formData.selectCustomer" /> | ||||
|           <ContentWrap style="border: none;font-weight: 700" > | ||||
|             选择任务 | ||||
|           </ContentWrap> | ||||
|           <TaskForm ref="taskFormRef" :dataList="formData.tasks" /> | ||||
|           <TaskForm ref="taskFormRef" :formFields="formFields" :dataList="formData.tasks" /> | ||||
|           <ContentWrap style="border: none;font-weight: 700" > | ||||
|             日报信息 | ||||
|           </ContentWrap> | ||||
|  | @ -99,6 +99,17 @@ const dialogTitle = ref('') // 弹窗的标题 | |||
| const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 | ||||
| const formType = ref('') // 表单的类型:create - 新增;update - 修改 | ||||
| const time = ref([]) //  | ||||
| const formFields = ref({ //字段显示隐藏权限控制,字段顺序就是显示的顺序 | ||||
|     name: false, | ||||
|     followUpStatus: false , | ||||
|     contactLastContent: false, | ||||
|     contactLastTime: false, | ||||
|     followUpUserId: false, | ||||
|     taskName: false, | ||||
|     taskLevel: false, | ||||
|     userId: false, | ||||
|     taskDescribe: false, | ||||
|   }) | ||||
| const formData = ref({ | ||||
|   id: undefined, | ||||
|   briefType: 2, | ||||
|  |  | |||
|  | @ -1,35 +1,47 @@ | |||
| <template> | ||||
|   <!-- 列表 --> | ||||
|   <ContentWrap> | ||||
|     <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> | ||||
|     <AuthTable v-loading="loading" :fields="formFields" :data="list" :stripe="true" :show-overflow-tooltip="true"> | ||||
|       <!-- <el-table-column label="唯一主键" align="center" prop="id" /> --> | ||||
|       <!-- <el-table-column label="项目ID" align="center" prop="projectId" /> --> | ||||
|       <el-table-column label="单位名称" align="center" prop="name" /> | ||||
|       <el-table-column label="跟进类型" align="center" prop="followUpStatus"> | ||||
|         <template #default="scope"> | ||||
|           <dict-tag :type="DICT_TYPE.CRM_FOLLOW_UP_TYPE" :value="scope.row.followUpType" /> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="跟进内容" align="center" prop="contactLastContent" /> | ||||
|       <el-table-column label="跟进时间" align="center" prop="contactLastTime" :formatter="dateFormatter" /> | ||||
|       <el-table-column label="跟进人" align="center" prop="followUpUserId"> | ||||
|         <template #default="scope"> | ||||
|           {{getName(userOptions, scope.row.followUpUserId)}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="操作" align="center" min-width="120px" v-if="!type"> | ||||
|         <template #default="scope"> | ||||
|           <el-button | ||||
|             link | ||||
|             type="danger" | ||||
|             @click="handleDelete(scope.$index)" | ||||
|             v-hasPermi="['task:selectCustomer:delete']" | ||||
|           > | ||||
|             删除 | ||||
|           </el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|       <template #name> | ||||
|         <el-table-column label="单位名称" align="center" prop="name" /> | ||||
|       </template> | ||||
|       <template #followUpStatus> | ||||
|         <el-table-column label="跟进类型" align="center" prop="followUpStatus"> | ||||
|           <template #default="scope"> | ||||
|             <dict-tag :type="DICT_TYPE.CRM_FOLLOW_UP_TYPE" :value="scope.row.followUpType" /> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </template> | ||||
|       <template #contactLastContent> | ||||
|         <el-table-column label="跟进内容" align="center" prop="contactLastContent" /> | ||||
|       </template> | ||||
|       <template #contactLastTime> | ||||
|         <el-table-column label="跟进时间" align="center" prop="contactLastTime" :formatter="dateFormatter" /> | ||||
|       </template> | ||||
|       <template #followUpUserId> | ||||
|         <el-table-column label="跟进人" align="center" prop="followUpUserId"> | ||||
|           <template #default="scope"> | ||||
|             {{getName(userOptions, scope.row.followUpUserId)}} | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </template> | ||||
|       <template #other> | ||||
|         <el-table-column label="操作" align="center" width="120px" v-if="!type"> | ||||
|           <template #default="scope"> | ||||
|             <el-button | ||||
|               link | ||||
|               type="danger" | ||||
|               @click="handleDelete(scope.$index)" | ||||
|               v-hasPermi="['task:selectCustomer:delete']" | ||||
|             > | ||||
|               删除 | ||||
|             </el-button> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </template> | ||||
|     </AuthTable> | ||||
|     <el-row justify="center" class="mt-3" v-if="!type"> | ||||
|       <el-button @click="openForm" round>+ 添加</el-button> | ||||
|     </el-row> | ||||
|  | @ -72,6 +84,7 @@ const props = defineProps({ | |||
|   id: propTypes.number.def(undefined), | ||||
|   type: propTypes.number.def(undefined), | ||||
|   dataList: propTypes.object.def([]), | ||||
|   formFields: {}, | ||||
| }) | ||||
| const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表 | ||||
| const loading = ref(false) // 列表的加载中 | ||||
|  | @ -109,7 +122,6 @@ const getList = (val: []) => { | |||
|   } | ||||
|   val.forEach(item => { | ||||
|     if(!list.value.some(v => v.id === item.id)) { | ||||
|   console.log('%csrc/views/project/briefWeekWork/components/selectCustomer.vue:95 val', 'color: #007acc;', val); | ||||
|       val.forEach(item => { | ||||
|         list.value.push({ | ||||
|           "name": item.name, | ||||
|  | @ -120,7 +132,6 @@ const getList = (val: []) => { | |||
|           "id": item.id, | ||||
|         }) | ||||
|       }) | ||||
|       console.log('%csrc/views/project/briefWeekWork/components/selectCustomer.vue:122 list.value', 'color: #007acc;', list.value); | ||||
|     } | ||||
|   }) | ||||
|    | ||||
|  | @ -151,7 +162,6 @@ const handleDelete = async (i: number) => { | |||
|     // 删除的二次确认 | ||||
|     await message.delConfirm() | ||||
|     // 发起删除 | ||||
|     console.log('%csrc/views/task/briefWeekWork/components/selectCustomer.vue:132 i', 'color: #007acc;', i); | ||||
|     list.value.splice(i, 1) | ||||
|     message.success(t('common.delSuccess')) | ||||
|     // 刷新列表 | ||||
|  | @ -175,7 +185,6 @@ const handleExport = async () => { | |||
| } | ||||
| 
 | ||||
| const getName = (opt, val) => { | ||||
|   console.log('%csrc/views/project/briefWeekWork/components/selectCustomer.vue:176 opt,val', 'color: #007acc;', props.userOptions,val); | ||||
|   const arr = opt.filter(v => v.id == val) | ||||
|   return arr.length ? arr[0]['nickname'] : '' | ||||
| } | ||||
|  |  | |||
|  | @ -1,34 +1,44 @@ | |||
| <template> | ||||
|   <!-- 列表 --> | ||||
|   <ContentWrap> | ||||
|     <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> | ||||
|     <AuthTable v-loading="loading" :fields="formFields" :data="list" :stripe="true" :show-overflow-tooltip="true"> | ||||
|       <!-- <el-table-column label="唯一主键" align="center" prop="id" /> --> | ||||
|       <!-- <el-table-column label="项目ID" align="center" prop="projectId" /> --> | ||||
|       <el-table-column label="任务标题" align="center" prop="taskName" /> | ||||
|       <el-table-column label="任务优先级" align="center" prop="taskLevel"> | ||||
|         <template #default="scope"> | ||||
|           <dict-tag :type="DICT_TYPE.TTS_TASK_LEVEL" :value="scope.row.taskLevel" /> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="任务负责人" align="center" prop="userId"> | ||||
|         <template #default="scope"> | ||||
|           {{getName(userOptions, scope.row.userId)}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="任务描述" align="center" prop="taskDescribe" /> | ||||
|       <el-table-column label="操作" align="center" min-width="120px" v-if="!type"> | ||||
|         <template #default="scope"> | ||||
|           <el-button | ||||
|             link | ||||
|             type="danger" | ||||
|             @click="handleDelete(scope.$index)" | ||||
|             v-hasPermi="['task:selectTask:delete']" | ||||
|           > | ||||
|             删除 | ||||
|           </el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|       <template #taskName> | ||||
|         <el-table-column label="任务标题" align="center" prop="taskName" /> | ||||
|       </template> | ||||
|       <template #taskLevel> | ||||
|         <el-table-column label="任务优先级" align="center" prop="taskLevel"> | ||||
|           <template #default="scope"> | ||||
|             <dict-tag :type="DICT_TYPE.TTS_TASK_LEVEL" :value="scope.row.taskLevel" /> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </template> | ||||
|       <template #userId> | ||||
|         <el-table-column label="任务负责人" align="center" prop="userId"> | ||||
|           <template #default="scope"> | ||||
|             {{getName(userOptions, scope.row.userId)}} | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </template> | ||||
|       <template #taskDescribe> | ||||
|         <el-table-column label="任务描述" align="center" prop="taskDescribe" /> | ||||
|       </template> | ||||
|       <template #other> | ||||
|         <el-table-column label="操作" align="center" min-width="120px" v-if="!type"> | ||||
|           <template #default="scope"> | ||||
|             <el-button | ||||
|               link | ||||
|               type="danger" | ||||
|               @click="handleDelete(scope.$index)" | ||||
|               v-hasPermi="['task:selectTask:delete']" | ||||
|             > | ||||
|               删除 | ||||
|             </el-button> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </template> | ||||
|     </AuthTable> | ||||
|     <el-row justify="center" class="mt-3" v-if="!type"> | ||||
|       <el-button @click="openForm" round>+ 添加</el-button> | ||||
|     </el-row> | ||||
|  | @ -59,6 +69,7 @@ const props = defineProps({ | |||
|   id: propTypes.number.def(undefined), | ||||
|   type: propTypes.number.def(undefined), | ||||
|   dataList: propTypes.object.def([]), | ||||
|   formFields: {}, | ||||
| }) | ||||
| const loading = ref(false) // 列表的加载中 | ||||
| const list = ref<ProjectBonusVO[]>([]) // 列表的数据 | ||||
|  |  | |||
|  | @ -1,46 +1,57 @@ | |||
| <template> | ||||
|   <ContentWrap> | ||||
|     <el-form | ||||
|     <processForm | ||||
|       ref="formRef" | ||||
|       :model="formData" | ||||
|       :rules="formRules" | ||||
|       :fields="formFields" | ||||
|       label-width="120px" | ||||
|       v-loading="formLoading" | ||||
|     > | ||||
|       <el-row> | ||||
|         <el-col :span="8"> | ||||
|           <el-form-item label="简报日期" prop="briefStartDate"> | ||||
|             <el-date-picker | ||||
|             disabled | ||||
|               v-model="formData.briefStartDate" | ||||
|               type="date" | ||||
|               value-format="YYYY-MM-DD" | ||||
|               placeholder="选择简报日期" | ||||
|             /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|      | ||||
|        <template #briefStartDate> | ||||
|           <el-col :span="8"> | ||||
|             <el-form-item label="简报日期" prop="briefStartDate"> | ||||
|               <el-date-picker | ||||
|               disabled | ||||
|                 v-model="formData.briefStartDate" | ||||
|                 type="date" | ||||
|                 value-format="YYYY-MM-DD" | ||||
|                 placeholder="选择简报日期" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </template> | ||||
|         <template #workComplate> | ||||
|          | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="本日完成工作" prop="workComplate"> | ||||
|             <el-input type="textarea" disabled :rows="5" v-model="formData.workComplate" placeholder="请输入本日完成工作" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|       </template> | ||||
|       <template #workPlan> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="明日工作计划" prop="workPlan"> | ||||
|             <el-input type="textarea" disabled :rows="5" v-model="formData.workPlan" placeholder="请输入明日工作计划" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|       </template> | ||||
|       <template #workAssistance> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="工作困难及协助" prop="workAssistance"> | ||||
|             <el-input type="textarea" disabled :rows="5" v-model="formData.workAssistance" placeholder="请输入工作困难及协助" /> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|       </template> | ||||
|       <template #attachment> | ||||
|         <el-col :span="24"> | ||||
|           <el-form-item label="附件" prop="attachment"> | ||||
|               <UploadFile v-model="formData.attachment" :disabled="!!formType" :limit="1" :fileType="['doc','docx']"/> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|       </el-row> | ||||
|     </el-form> | ||||
|       </template> | ||||
|     </processForm> | ||||
|   </ContentWrap> | ||||
| </template> | ||||
| <script setup lang="ts"> | ||||
|  | @ -61,6 +72,14 @@ const props = defineProps({ | |||
| const dialogTitle = ref('') // 弹窗的标题 | ||||
| const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 | ||||
| const formType = ref('') // 表单的类型:create - 新增;update - 修改 | ||||
| const authType = ref('') // 是否流程审批页面 | ||||
| const formFields = ref({ //字段显示隐藏权限控制 | ||||
|         briefStartDate: false, | ||||
|         workComplate: false , | ||||
|         workPlan: false, | ||||
|         workAssistance: false, | ||||
|         attachment: false  | ||||
|       }) | ||||
| const formData = ref({ | ||||
|   id: undefined, | ||||
|   briefType: 1, | ||||
|  | @ -85,7 +104,7 @@ const formRef = ref() // 表单 Ref | |||
| 
 | ||||
| /** 打开弹窗 */ | ||||
| const open = async (id?: number) => { | ||||
|   resetForm() | ||||
|   // resetForm() | ||||
|   // 修改时,设置数据 | ||||
|   if (id) { | ||||
|     formLoading.value = true | ||||
|  | @ -98,6 +117,10 @@ const open = async (id?: number) => { | |||
| } | ||||
| defineExpose({ open }) // 提供 open 方法,用于打开弹窗 | ||||
| 
 | ||||
| const openAuth = () => { | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| /** 提交表单 */ | ||||
| const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 | ||||
| const submitForm = async () => { | ||||
|  | @ -151,10 +174,15 @@ const resetForm = () => { | |||
| const route = useRoute(); | ||||
| onMounted(async () => { | ||||
|   formType.value = props.id || route.query.id | ||||
|   authType.value = route.query.authId | ||||
| 
 | ||||
| 
 | ||||
|   if (formType.value) await open(formType.value) | ||||
| 
 | ||||
|   if (!authType.value) await openAuth() | ||||
| 
 | ||||
|    | ||||
| 
 | ||||
| 
 | ||||
|   if (!formType.value) { | ||||
|     formData.value.userId = useUserStore().getUser.id | ||||
|  |  | |||
|  | @ -209,7 +209,7 @@ const openFormAdd =  () => { | |||
| 
 | ||||
| //详情 | ||||
| const openFormDetail = (row: Object) => { | ||||
|   router.push({ name: 'DayReportDetail', query: { id: row.id} }) | ||||
|   router.push({ name: 'DayReportDetail', query: { id: row.id, authType: 1} }) | ||||
| } | ||||
| 
 | ||||
| /** 查看审批 */ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 zy
						zy