| | |
| | | "v-ripple" |
| | | ], |
| | | "vscodeCustomCodeColor.highlightValueColor": "#b392f0", |
| | | // "typescript.tsdk": "node_modules/typescript/lib", |
| | | "vetur.validation.script": false |
| | | } |
| | |
| | | |
| | | import { http } from "@/utils/http"; |
| | | import { baseUrlApi } from "../util"; |
| | | type Result = { |
| | | success: boolean; |
| | | data: Array<any>; |
| | | }; |
| | | import type { Result } from "../types"; |
| | | |
| | | export const login = (data?: object) => { |
| | | return http.request("post", baseUrlApi("/api/auth/loginPhone"), { data }); |
| | | return http.request<Result>("post", baseUrlApi("/api/auth/loginPhone"), { |
| | | data |
| | | }); |
| | | }; |
| | |
| | | |
| | | import { http } from "@/utils/http"; |
| | | import { baseUrlApi } from "./util"; |
| | | type Result = { |
| | | success: boolean; |
| | | data: Array<any>; |
| | | }; |
| | | import type { Result } from "./types"; |
| | | |
| | | // 获取个人中心数据 |
| | | export const cusExtendInfo = (data?: object) => { |
| | | return http.request("post", baseUrlApi("/api/customer/cusExtendInfo"), { data }); |
| | | return http.request<Result>( |
| | | "post", |
| | | baseUrlApi("/api/customer/cusExtendInfo"), |
| | | { |
| | | data |
| | | } |
| | | ); |
| | | }; |
| | | |
| | | // 修改个人中心数据 |
| | | export const changeCusExtend = (data?: object) => { |
| | | return http.request("post", baseUrlApi("/api/customer/changeCusExtend"), { data }); |
| | | return http.request("post", baseUrlApi("/api/customer/changeCusExtend"), { |
| | | data |
| | | }); |
| | | }; |
| | |
| | | |
| | | import { http } from "@/utils/http"; |
| | | import { baseUrlApi } from "../util"; |
| | | type Result = { |
| | | success: boolean; |
| | | data: Array<any>; |
| | | }; |
| | | import type { Result, CaptchaResult } from "../types"; |
| | | |
| | | export const register = (data?: object) => { |
| | | return http.request( |
| | | return http.request<Result>( |
| | | "post", |
| | | baseUrlApi("/api/customer/customerRegistration"), |
| | | { data } |
| | |
| | | }; |
| | | |
| | | export const captcha = () => { |
| | | return http.request<Result>("get", baseUrlApi("/api/zCSMS/captcha")); |
| | | return http.request<CaptchaResult>("get", baseUrlApi("/api/zCSMS/captcha")); |
| | | }; |
| | | |
| | | //获取角色 |
| | |
| | | }; |
| | | |
| | | // 获取手机验证码 |
| | | export const phoneNumberCode = (params?: object) => { |
| | | return http.request( |
| | | export const phoneNumberCode = params => { |
| | | return http.request<Result>( |
| | | "post", |
| | | baseUrlApi( |
| | | `/api/zCSMS/sendSMS/${params.phone}/${params.code}/${params.codeId}` |
| | |
| | | |
| | | // 注册角色用户资料 |
| | | export const createrExRolsInformation = (data?: object) => { |
| | | return http.request( |
| | | return http.request<Result>( |
| | | "post", |
| | | baseUrlApi("/api/customer/createrExRolsInformation"), |
| | | { data } |
| | |
| | | |
| | | // 获取企业类型 |
| | | export const enterpriseTypes = (data?: object) => { |
| | | return http.request("post", baseUrlApi("/api/customer/enterpriseTypes"), { |
| | | data |
| | | }); |
| | | return http.request<Result>( |
| | | "post", |
| | | baseUrlApi("/api/customer/enterpriseTypes"), |
| | | { |
| | | data |
| | | } |
| | | ); |
| | | }; |
New file |
| | |
| | | export type Result = { |
| | | success: boolean; |
| | | result: Array<any>; |
| | | code: string | number; |
| | | message: string; |
| | | }; |
| | | |
| | | type captchaImg = { |
| | | expirySeconds: number; |
| | | message: string; |
| | | img: string; |
| | | id: string; |
| | | }; |
| | | |
| | | export type CaptchaResult = { |
| | | success: boolean; |
| | | result: captchaImg; |
| | | code: string | number; |
| | | }; |
| | |
| | | * (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参) |
| | | * |
| | | * 上传api接口集合 |
| | | * @method register 注册 |
| | | * @method captcha 获取验证码 |
| | | */ |
| | | |
| | | import { http } from "@/utils/http"; |
| | | import { baseUrlApi } from "../util"; |
| | | type Result = { |
| | | success: boolean; |
| | | data: Array<any>; |
| | | }; |
| | | import type { Result } from "../types"; |
| | | |
| | | //上传和识别营业执照 |
| | | export const upBizLicense = (data?: object) => { |
| | | return http.request("post", baseUrlApi("/api/upFile/upBizLicense"), { data }); |
| | | return http.request<Result>("post", baseUrlApi("/api/upFile/upBizLicense"), { |
| | | data |
| | | }); |
| | | }; |
| | | |
| | | // 上传身份证 |
| | | export const uploadIdCord = (params?: object) => { |
| | | return http.request("post", baseUrlApi("/api/upFile/uploadIdCord"), { |
| | | return http.request<Result>("post", baseUrlApi("/api/upFile/uploadIdCord"), { |
| | | params |
| | | }); |
| | | }; |
| | |
| | | }; |
| | | }; |
| | | |
| | | export type LoginResult = { |
| | | success: boolean; |
| | | code: string | number; |
| | | result: { |
| | | /** 头像 */ |
| | | avatar: string; |
| | | /** 用户名 */ |
| | | username: string; |
| | | /** 昵称 */ |
| | | nickname: string; |
| | | /** 当前登录用户的角色 */ |
| | | exRoles: Array<string>; |
| | | /** 按钮级别权限 */ |
| | | permissions: Array<string>; |
| | | /** `token` */ |
| | | accessToken: string; |
| | | /** 用于调用刷新`accessToken`的接口时所需的`token` */ |
| | | refreshToken: string; |
| | | /** `accessToken`的过期时间(格式'xxxx/xx/xx xx:xx:xx') */ |
| | | expires: Date; |
| | | }; |
| | | }; |
| | | |
| | | export type RefreshTokenResult = { |
| | | success: boolean; |
| | | data: { |
| | |
| | | |
| | | /** 登录 */ |
| | | export const getLogin = (data?: object) => { |
| | | return http.request("post", baseUrlApi("/api/auth/loginPhone"), { data }); |
| | | return http.request<LoginResult>("post", baseUrlApi("/api/auth/loginPhone"), { |
| | | data |
| | | }); |
| | | // return http.request<UserResult>("post", "/login", { data }); |
| | | }; |
| | | |
| | |
| | | // }, |
| | | { |
| | | path: "/index", |
| | | name: "Main", |
| | | name: "MainPage", |
| | | component: () => import("@/views/home/index.vue"), |
| | | meta: { |
| | | title: "首页", |
| | |
| | | storageLocal |
| | | } from "../utils"; |
| | | import { |
| | | type UserResult, |
| | | type LoginResult, |
| | | type RefreshTokenResult, |
| | | getLogin, |
| | | refreshTokenApi |
| | |
| | | }, |
| | | /** 登入 */ |
| | | async loginByUsername(data) { |
| | | return new Promise<UserResult>((resolve, reject) => { |
| | | return new Promise<LoginResult>((resolve, reject) => { |
| | | getLogin(data) |
| | | .then(data => { |
| | | console.log(data, "这是什么?"); |
| | | |
| | | if (data?.code == 200) setToken(data.result); |
| | | resolve(data); |
| | | }) |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"></script> |
| | | <script lang="ts" setup> |
| | | defineOptions({ |
| | | name: "MyFooter" |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .myfooter { |
| | |
| | | |
| | | <script lang="ts" setup> |
| | | import { onMounted, ref, computed, reactive } from "vue"; |
| | | import myFooter from "./component/myFooter.vue"; |
| | | import MyFooter from "./component/myFooter.vue"; |
| | | import { useUserStoreHook } from "@/store/modules/user"; |
| | | import { exRole } from "@/api/register/index.ts"; |
| | | import { exRole } from "@/api/register/index"; |
| | | import { storageLocal, isString, isIncludeAllChildren } from "@pureadmin/utils"; |
| | | |
| | | import { getToken } from "@/utils/auth"; |
| | |
| | | // 访问 state 属性 |
| | | // console.log(userStore.roles,'-'); // 直接获取值 |
| | | defineOptions({ |
| | | name: "Main" |
| | | name: "MainPage" |
| | | }); |
| | | let activeName = ref("first"); |
| | | /** 角色(如果昵称为空则显示用户名) */ |
| | |
| | | <script lang="ts" name="procurementComplaint" setup> |
| | | import { ref, reactive, onMounted } from 'vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import type { FormRules } from 'element-plus'; |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | import { useProcurementComplaintApi } from '/@/api/fb_p_complaints/procurementComplaint'; |
| | | import { log } from 'console'; |
| | | import { ref, reactive, onMounted } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import type { FormRules } from "element-plus"; |
| | | import { formatDate } from "/@/utils/formatTime"; |
| | | import { useProcurementComplaintApi } from "/@/api/fb_p_complaints/procurementComplaint"; |
| | | import { log } from "console"; |
| | | |
| | | //父级传递来的函数,用于回调 |
| | | const emit = defineEmits(['reloadTable']); |
| | | const emit = defineEmits(["reloadTable"]); |
| | | const procurementComplaintApi = useProcurementComplaintApi(); |
| | | const ruleFormRef = ref(); |
| | | |
| | | const state = reactive({ |
| | | title: '', |
| | | loading: false, |
| | | showDialog: false, |
| | | ruleForm: { |
| | | complaints: [{ itemDescription: '' }], |
| | | } as any, |
| | | stores: {}, |
| | | dropdownData: {} as any, |
| | | title: "", |
| | | loading: false, |
| | | showDialog: false, |
| | | ruleForm: { |
| | | complaints: [{ itemDescription: "" }] |
| | | } as any, |
| | | stores: {}, |
| | | dropdownData: {} as any |
| | | }); |
| | | |
| | | const handlingStatus = [ |
| | | { value: 0, label: '其它' }, |
| | | { value: 1, label: '成立' }, |
| | | { value: 2, label: '驳回' }, |
| | | { value: 3, label: '部分成立' }, |
| | | { value: 0, label: "其它" }, |
| | | { value: 1, label: "成立" }, |
| | | { value: 2, label: "驳回" }, |
| | | { value: 3, label: "部分成立" } |
| | | ]; |
| | | |
| | | // 自行添加其他规则 |
| | | const rules = ref<FormRules>({ |
| | | projectCode: [{ required: true, message: '请选择项目编号!', trigger: 'blur' }], |
| | | projectName: [{ required: true, message: '请选择项目名称!', trigger: 'blur' }], |
| | | decisionDate: [{ required: true, message: '请选择决定日期!', trigger: 'change' }], |
| | | purchaser: [{ required: true, message: '请选择采购人!', trigger: 'blur' }], |
| | | procurementAgency: [{ required: true, message: '请选择采购代理机构!', trigger: 'blur' }], |
| | | projectCode: [ |
| | | { required: true, message: "请选择项目编号!", trigger: "blur" } |
| | | ], |
| | | projectName: [ |
| | | { required: true, message: "请选择项目名称!", trigger: "blur" } |
| | | ], |
| | | decisionDate: [ |
| | | { required: true, message: "请选择决定日期!", trigger: "change" } |
| | | ], |
| | | purchaser: [{ required: true, message: "请选择采购人!", trigger: "blur" }], |
| | | procurementAgency: [ |
| | | { required: true, message: "请选择采购代理机构!", trigger: "blur" } |
| | | ] |
| | | }); |
| | | |
| | | // 页面加载时 |
| | |
| | | |
| | | // 打开弹窗 |
| | | const openDialog = async (row: any, title: string) => { |
| | | state.title = title; |
| | | row = row ?? { complaints: [{ itemDescription: '' }] }; |
| | | state.ruleForm = row.id ? await procurementComplaintApi.detail(row.id).then((res) => res.data.result) : JSON.parse(JSON.stringify(row)); |
| | | state.showDialog = true; |
| | | console.log(state.ruleForm.complaints, state.ruleForm.complaints.length); |
| | | state.title = title; |
| | | row = row ?? { complaints: [{ itemDescription: "" }] }; |
| | | state.ruleForm = row.id |
| | | ? await procurementComplaintApi.detail(row.id).then(res => res.data.result) |
| | | : JSON.parse(JSON.stringify(row)); |
| | | state.showDialog = true; |
| | | console.log(state.ruleForm.complaints, state.ruleForm.complaints.length); |
| | | }; |
| | | |
| | | // 关闭弹窗 |
| | | const closeDialog = () => { |
| | | emit('reloadTable'); |
| | | state.showDialog = false; |
| | | emit("reloadTable"); |
| | | state.showDialog = false; |
| | | }; |
| | | |
| | | // 提交 |
| | | const submit = async () => { |
| | | ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { |
| | | if (isValid) { |
| | | let values = state.ruleForm; |
| | | await procurementComplaintApi[state.ruleForm.id ? 'update' : 'add'](values); |
| | | closeDialog(); |
| | | } else { |
| | | ElMessage({ |
| | | message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`, |
| | | type: 'error', |
| | | }); |
| | | } |
| | | }); |
| | | ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { |
| | | if (isValid) { |
| | | let values = state.ruleForm; |
| | | await procurementComplaintApi[state.ruleForm.id ? "update" : "add"]( |
| | | values |
| | | ); |
| | | closeDialog(); |
| | | } else { |
| | | ElMessage({ |
| | | message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`, |
| | | type: "error" |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const changeComplaints = (index:any,txt: String) => { |
| | | if (txt == 'add') { |
| | | state.ruleForm.complaints.splice(index+1, 0, { itemDescription: '' }) |
| | | } else { |
| | | state.ruleForm.complaints.splice(index, 1) |
| | | } |
| | | const changeComplaints = (index: any, txt: String) => { |
| | | if (txt == "add") { |
| | | state.ruleForm.complaints.splice(index + 1, 0, { itemDescription: "" }); |
| | | } else { |
| | | state.ruleForm.complaints.splice(index, 1); |
| | | } |
| | | }; |
| | | |
| | | //将属性或者函数暴露给父组件 |
| | |
| | | </script> |
| | | <template> |
| | | <div class="procurementComplaint-container"> |
| | | <el-dialog v-model="state.showDialog" :width="900" draggable :close-on-click-modal="false"> |
| | | <el-dialog |
| | | v-model="state.showDialog" |
| | | :width="900" |
| | | draggable |
| | | :close-on-click-modal="false" |
| | | > |
| | | <template #header> |
| | | <div style="color: #fff"> |
| | | <span>{{ state.title }}</span> |
| | | </div> |
| | | </template> |
| | | <el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules"> |
| | | <el-form |
| | | ref="ruleFormRef" |
| | | :model="state.ruleForm" |
| | | label-width="auto" |
| | | :rules="rules" |
| | | > |
| | | <el-row :gutter="35"> |
| | | <el-form-item v-show="false"> |
| | | <el-input v-model="state.ruleForm.id" /> |
| | | </el-form-item> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="决定日期" prop="decisionDate"> |
| | | <el-date-picker v-model="state.ruleForm.decisionDate" type="date" placeholder="请选择决定日期" /> |
| | | <el-date-picker |
| | | v-model="state.ruleForm.decisionDate" |
| | | type="date" |
| | | placeholder="请选择决定日期" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="项目名称" prop="projectName"> |
| | | <el-input v-model="state.ruleForm.projectName" placeholder="请输入项目名称" maxlength="200" show-word-limit |
| | | clearable /> |
| | | <el-input |
| | | v-model="state.ruleForm.projectName" |
| | | placeholder="请输入项目名称" |
| | | maxlength="200" |
| | | show-word-limit |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="项目编号" prop="projectCode"> |
| | | <el-input v-model="state.ruleForm.projectCode" placeholder="请输入项目编号" maxlength="50" show-word-limit |
| | | clearable /> |
| | | <el-input |
| | | v-model="state.ruleForm.projectCode" |
| | | placeholder="请输入项目编号" |
| | | maxlength="50" |
| | | show-word-limit |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="采购人" prop="purchaser"> |
| | | <el-input v-model="state.ruleForm.purchaser" placeholder="请输入采购人" maxlength="100" show-word-limit |
| | | clearable /> |
| | | <el-input |
| | | v-model="state.ruleForm.purchaser" |
| | | placeholder="请输入采购人" |
| | | maxlength="100" |
| | | show-word-limit |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="采购代理机构" prop="procurementAgency"> |
| | | <el-input v-model="state.ruleForm.procurementAgency" placeholder="请输入采购代理机构" maxlength="100" |
| | | show-word-limit clearable /> |
| | | <el-input |
| | | v-model="state.ruleForm.procurementAgency" |
| | | placeholder="请输入采购代理机构" |
| | | maxlength="100" |
| | | show-word-limit |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="采购监督部门" prop="procurementSupervisionDepartment"> |
| | | <el-input v-model="state.ruleForm.procurementSupervisionDepartment" placeholder="请输入采购监督部门" |
| | | maxlength="100" show-word-limit clearable /> |
| | | <el-form-item |
| | | label="采购监督部门" |
| | | prop="procurementSupervisionDepartment" |
| | | > |
| | | <el-input |
| | | v-model="state.ruleForm.procurementSupervisionDepartment" |
| | | placeholder="请输入采购监督部门" |
| | | maxlength="100" |
| | | show-word-limit |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="投诉人" prop="complainant"> |
| | | <el-input v-model="state.ruleForm.complainant" placeholder="请输入投诉人" maxlength="100" show-word-limit |
| | | clearable /> |
| | | <el-input |
| | | v-model="state.ruleForm.complainant" |
| | | placeholder="请输入投诉人" |
| | | maxlength="100" |
| | | show-word-limit |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="线上地址" prop="url"> |
| | | <el-input v-model="state.ruleForm.url" placeholder="请输入线上地址" maxlength="255" show-word-limit clearable /> |
| | | <el-input |
| | | v-model="state.ruleForm.url" |
| | | placeholder="请输入线上地址" |
| | | maxlength="255" |
| | | show-word-limit |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <template v-for="(item,index) in state.ruleForm.complaints" :key="index"> |
| | | <template |
| | | v-for="(item, index) in state.ruleForm.complaints" |
| | | :key="index" |
| | | > |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item :label="`投诉事项${index==0?'':index}`" prop="complaints"> |
| | | <el-input v-model="item.itemDescription" type="textarea" :placeholder="`请输入投诉事项${index==0?'':index}`" |
| | | maxlength="1000" show-word-limit clearable /> |
| | | <el-form-item |
| | | :label="`投诉事项${index == 0 ? '' : index}`" |
| | | prop="complaints" |
| | | > |
| | | <el-input |
| | | v-model="item.itemDescription" |
| | | type="textarea" |
| | | :placeholder="`请输入投诉事项${index == 0 ? '' : index}`" |
| | | maxlength="1000" |
| | | show-word-limit |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12" class=""> |
| | | <el-form-item :label="`处理描述${index==0?'':index}`" prop="complaints"> |
| | | <el-input v-model="item.handlingResult" type="textarea" :placeholder="`请输入处理描述${index==0?'':index}`" |
| | | maxlength="1000" show-word-limit clearable /> |
| | | <el-form-item |
| | | :label="`处理描述${index == 0 ? '' : index}`" |
| | | prop="complaints" |
| | | > |
| | | <el-input |
| | | v-model="item.handlingResult" |
| | | type="textarea" |
| | | :placeholder="`请输入处理描述${index == 0 ? '' : index}`" |
| | | maxlength="1000" |
| | | show-word-limit |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="6" :sm="6" :md="6" :lg="6" :xl="6" class="mb20"> |
| | | <el-form-item :label="`投诉状态${index==0?'':index}`" prop="complaints"> |
| | | <el-form-item |
| | | :label="`投诉状态${index == 0 ? '' : index}`" |
| | | prop="complaints" |
| | | > |
| | | <el-select v-model="item.handlingStatus"> |
| | | <el-option v-for="item in handlingStatus" :key="item.value" :label="item.label" :value="item.value" /> |
| | | <el-option |
| | | v-for="item in handlingStatus" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="1" :sm="1" :md="1" :lg="1" :xl="1" class="mb20"> |
| | | <el-button type="primary" @click="changeComplaints(index,'add')">+</el-button> |
| | | <el-button type="primary" @click="changeComplaints(index, 'add')" |
| | | >+</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :xs="1" :sm="1" :md="1" :lg="1" :xl="1" class="mb20" |
| | | v-if="state.ruleForm.complaints&&state.ruleForm.complaints.length>1"> |
| | | <el-button type="primary" @click="changeComplaints(index)">-</el-button> |
| | | <el-col |
| | | v-if=" |
| | | state.ruleForm.complaints && |
| | | state.ruleForm.complaints.length > 1 |
| | | " |
| | | :xs="1" |
| | | :sm="1" |
| | | :md="1" |
| | | :lg="1" |
| | | :xl="1" |
| | | class="mb20" |
| | | > |
| | | <el-button type="primary" @click="changeComplaints(index)" |
| | | >-</el-button |
| | | > |
| | | </el-col> |
| | | <el-divider v-if="state.ruleForm.complaints&&state.ruleForm.complaints.length>1" /> |
| | | <el-divider |
| | | v-if=" |
| | | state.ruleForm.complaints && |
| | | state.ruleForm.complaints.length > 1 |
| | | " |
| | | /> |
| | | </template> |
| | | |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="() => state.showDialog = false">取 消</el-button> |
| | | <el-button @click="submit" type="primary" v-reclick="1000">确 定</el-button> |
| | | <el-button @click="() => (state.showDialog = false)">取 消</el-button> |
| | | <el-button v-reclick="1000" type="primary" @click="submit" |
| | | >确 定</el-button |
| | | > |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <style lang="scss" scoped> |
| | | :deep(.el-select), |
| | | :deep(.el-input-number) { |
| | | width: 100%; |
| | | width: 100%; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | import { ref, reactive, onMounted } from "vue"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | // import { downloadStreamFile } from "@/utils/download"; |
| | | import { useProcurementComplaintApi } from "/@/api/fb_p_complaints/procurementComplaint"; |
| | | import editDialog from "/@/views/fb_p_complaints/procurementComplaint/component/editDialog.vue"; |
| | | import printDialog from "/@/views/system/print/component/hiprint/preview.vue"; |
| | | // import { useProcurementComplaintApi } from "/@/api/fb_p_complaints/procurementComplaint"; |
| | | import { shouyeOrder } from "@/api/item/index"; |
| | | // import editDialog from "/@/views/fb_p_complaints/procurementComplaint/component/editDialog.vue"; |
| | | // import printDialog from "/@/views/system/print/component/hiprint/preview.vue"; |
| | | import ModifyRecord from "/@/components/table/modifyRecord.vue"; |
| | | import ImportData from "/@/components/table/importData.vue"; |
| | | import commonFunction from "@/utils/commonFunction"; |
| | | // import ImportData from "/@/components/table/importData.vue"; |
| | | // import commonFunction from "@/utils/commonFunction"; |
| | | |
| | | const { dateFormatYMD } = commonFunction(); |
| | | const procurementComplaintApi = useProcurementComplaintApi(); |
| | | // const { dateFormatYMD } = commonFunction(); |
| | | // const procurementComplaintApi = useProcurementComplaintApi(); |
| | | const printDialogRef = ref(); |
| | | const editDialogRef = ref(); |
| | | const importDataRef = ref(); |
| | |
| | | }); |
| | | |
| | | // 页面加载时 |
| | | onMounted(async () => {}); |
| | | onMounted(async () => { |
| | | handleQuery(); |
| | | }); |
| | | |
| | | // 查询操作 |
| | | const handleQuery = async (params: any = {}) => { |
| | | state.tableLoading = true; |
| | | state.tableParams = Object.assign(state.tableParams, params); |
| | | const result = await procurementComplaintApi |
| | | .page(Object.assign(state.tableQueryParams, state.tableParams)) |
| | | .then(res => res.data.result); |
| | | const result = await shouyeOrder(); |
| | | console.log(result); |
| | | |
| | | // .page(Object.assign(state.tableQueryParams, state.tableParams)) |
| | | // .then(res => res.data.result); |
| | | state.tableParams.total = result?.total; |
| | | state.tableData = result?.items ?? []; |
| | | state.tableLoading = false; |
| | |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | // 导出数据 |
| | | const exportProcurementComplaintCommand = async (command: string) => { |
| | | try { |
| | | state.exportLoading = true; |
| | | if (command === "select") { |
| | | const params = Object.assign( |
| | | {}, |
| | | state.tableQueryParams, |
| | | state.tableParams, |
| | | { selectKeyList: state.selectData.map(u => u.id) } |
| | | ); |
| | | await procurementComplaintApi |
| | | .exportData(params) |
| | | .then(res => downloadStreamFile(res)); |
| | | } else if (command === "current") { |
| | | const params = Object.assign( |
| | | {}, |
| | | state.tableQueryParams, |
| | | state.tableParams |
| | | ); |
| | | await procurementComplaintApi |
| | | .exportData(params) |
| | | .then(res => downloadStreamFile(res)); |
| | | } else if (command === "all") { |
| | | const params = Object.assign( |
| | | {}, |
| | | state.tableQueryParams, |
| | | state.tableParams, |
| | | { page: 1, pageSize: 99999999 } |
| | | ); |
| | | await procurementComplaintApi |
| | | .exportData(params) |
| | | .then(res => downloadStreamFile(res)); |
| | | } |
| | | } finally { |
| | | state.exportLoading = false; |
| | | } |
| | | }; |
| | | |
| | | handleQuery(); |
| | | </script> |
| | | <template> |
| | |
| | | <el-button |
| | | v-reclick="1000" |
| | | type="primary" |
| | | icon="ele-Search" |
| | | icon="Search" |
| | | @click="handleQuery" |
| | | > |
| | | 查询 |
| | |
| | | > |
| | | 重置 |
| | | </el-button> |
| | | <el-button |
| | | <!-- <el-button |
| | | v-if="!state.showAdvanceQueryUI" |
| | | icon="ele-ZoomIn" |
| | | style="margin-left: 5px" |
| | | @click="() => (state.showAdvanceQueryUI = true)" |
| | | > |
| | | 高级查询 |
| | | </el-button> |
| | | </el-button> --> |
| | | <el-button |
| | | v-if="state.showAdvanceQueryUI" |
| | | icon="ele-ZoomOut" |
| | |
| | | <el-button |
| | | type="danger" |
| | | style="margin-left: 5px" |
| | | icon="ele-Delete" |
| | | icon="Delete" |
| | | :disabled="state.selectData.length == 0" |
| | | @click="batchDelProcurementComplaint" |
| | | > |
| | |
| | | sortable |
| | | > |
| | | <template #default="{ row }"> |
| | | <span>{{ dateFormatYMD(null, null, row.decisionDate) }}</span> |
| | | <span>{{ row.decisionDate }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | @size-change="(val: any) => handleQuery({ pageSize: val })" |
| | | @current-change="(val: any) => handleQuery({ page: val })" |
| | | /> |
| | | <ImportData |
| | | ref="importDataRef" |
| | | :import="procurementComplaintApi.importData" |
| | | :download="procurementComplaintApi.downloadTemplate" |
| | | @refresh="handleQuery" |
| | | /> |
| | | |
| | | <printDialog |
| | | ref="printDialogRef" |
| | | :title="'打印政府采购投诉数据处理'" |
| | |
| | | // import darkIcon from "@/assets/svg/dark.svg?component"; |
| | | import Lock from "~icons/ri/lock-fill"; |
| | | import User from "~icons/ri/user-3-fill"; |
| | | import { captcha, phoneNumberCode, exRole } from "@/api/register/index.ts"; |
| | | import { captcha, phoneNumberCode, exRole } from "@/api/register/index"; |
| | | |
| | | defineOptions({ |
| | | name: "Login" |
| | |
| | | // 获取验证码 |
| | | const getCaptcha = async () => { |
| | | // if (!state.captchaEnabled) return; |
| | | |
| | | state.ruleForm.code = ""; |
| | | const res = await captcha(); |
| | | console.log(res); |
| | | |
| | | state.captchaImage = "data:text/html;base64," + res.result?.img; |
| | | state.expirySeconds = res.result?.expirySeconds; |
| | | state.ruleForm.codeId = res.result?.id; |
| | |
| | | nickName: "", |
| | | phone: "", |
| | | phoneVCode: "", |
| | | // tenantId: props.tenantInfo.id, |
| | | code: "", |
| | | codeId: 0, |
| | | codeId: "", |
| | | email: "", |
| | | exRoleCode: "" |
| | | }, |
| | |
| | | |
| | | // 获取验证码 |
| | | getCaptcha(); |
| | | |
| | | exRole().then(res => { |
| | | state.roleList = res.result; |
| | | const role = route.query; |
| | |
| | | } else { |
| | | state.nowRole = state.roleList[0]; |
| | | } |
| | | state.ruleForm.exRoleCode = state.nowRole?.code; |
| | | state.ruleForm.exRoleCode = state.nowRole.code; |
| | | }); |
| | | // 注册验证码过期计时器 |
| | | // if (state.captchaEnabled) { |
| | |
| | | if (!formEl) return; |
| | | await formEl.validate(valid => { |
| | | if (valid) { |
| | | let obj = { |
| | | phone: state.ruleForm.phone, |
| | | code: state.ruleForm.phoneVCode, |
| | | exRuleCode: state.ruleForm.exRoleCode |
| | | }; |
| | | loading.value = true; |
| | | useUserStoreHook() |
| | | .loginByUsername({ |
| | | phone: state.ruleForm.phone, |
| | | code: state.ruleForm.phoneVCode, |
| | | exRuleCode: state.ruleForm.exRoleCode |
| | | }) |
| | | .loginByUsername(obj) |
| | | .then(res => { |
| | | if (res.code == 200) { |
| | | // 获取后端路由 |
| | | return initRouter().then(() => { |
| | | console.log(res, "=-=-=-="); |
| | | if (!res.result.exRoles.hasFlsh) { |
| | | console.log(res, "=-=-=-=", res.result.exRoles[0].hasFlsh); |
| | | if (!res.result.exRoles[0].hasFlsh) { |
| | | disabled.value = true; |
| | | router |
| | | .replace({ |
| | | name: "RegisterNav", |
| | | query: { code: res?.result?.exRoles.code } |
| | | query: { code: res.result.exRoles[0].code } |
| | | }) |
| | | .then(() => { |
| | | message("登录成功", { type: "success" }); |
| | |
| | | if (res.code == 200) { |
| | | state.userInfo = res.result; |
| | | } else { |
| | | message(res.message || res.result, { |
| | | message(res.message, { |
| | | type: "error" |
| | | }); |
| | | } |
| | | }); |
| | | const showImg = name => { |
| | | console.log("点击率"); |
| | | addDialog({ |
| | | width: "40%", |
| | | title: "查看营业执照", |
| | |
| | | <span |
| | | id="suffix-span-2" |
| | | ref="spanRef" |
| | | @click="sendValidationCode(state.ruleForm.phone)" |
| | | @click="sendValidationCode" |
| | | > |
| | | 获取验证码 |
| | | </span> |
| | |
| | | phoneNumberCode, |
| | | register, |
| | | exRole |
| | | } from "@/api/register/index.ts"; |
| | | } from "@/api/register/index"; |
| | | import { useRoute, useRouter } from "vue-router"; |
| | | import { message } from "@/utils/message"; |
| | | defineOptions({ |
| | |
| | | phoneVCode: "", |
| | | // tenantId: props.tenantInfo.id, |
| | | code: "", |
| | | codeId: 0, |
| | | codeId: "", |
| | | email: "", |
| | | exRoleCode: "" |
| | | }, |
| | |
| | | // 获取验证码 |
| | | const getCaptcha = async () => { |
| | | // if (!state.captchaEnabled) return; |
| | | |
| | | state.ruleForm.code = ""; |
| | | const res = await captcha(); |
| | | console.log(res); |
| | | |
| | | state.captchaImage = "data:text/html;base64," + res.result?.img; |
| | | state.expirySeconds = res.result?.expirySeconds; |
| | | state.ruleForm.codeId = res.result?.id; |
| | |
| | | const spanRef = ref(); |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return; |
| | | await formEl.validate((valid, fields) => { |
| | | await formEl.validate(valid => { |
| | | if (valid) { |
| | | state.ruleForm.account = state.ruleForm.phone; |
| | | register(state.ruleForm).then(res => { |
| | |
| | | <!-- <p class="text-center xieyi">注册协议</p> --> |
| | | </div> |
| | | </div> |
| | | <div v-else-if="active == 1" class="flex justify-center mt-5"> |
| | | <div |
| | | v-else-if="active == 1" |
| | | v-loading="isLoading" |
| | | class="flex justify-center mt-5" |
| | | > |
| | | <el-form |
| | | ref="ruleFormRef" |
| | | style="width: 95%" |
| | |
| | | import { |
| | | enterpriseTypes, |
| | | createrExRolsInformation |
| | | } from "@/api/register/index.ts"; |
| | | } from "@/api/register/index"; |
| | | import { cloneDeep } from "@pureadmin/utils"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { useRoute, useRouter } from "vue-router"; |
| | |
| | | name: "RegisterNav" |
| | | }); |
| | | const ruleFormRef = ref<FormInstance>(); |
| | | const isLoading = ref(false); |
| | | const state = reactive({ |
| | | headers: { |
| | | // Accept: "application/json, text/plain, */*", |
| | |
| | | enterpriseType: [ |
| | | { required: true, message: "请选择企业类型", trigger: "change" } |
| | | ], |
| | | // transactionCode: [ |
| | | // { required: true, message: "请输入交易主体代码", trigger: "blur" }, |
| | | // { min: 1, message: "交易主体代码最小长度为1", trigger: "blur" } |
| | | // ], |
| | | // transactionName: [ |
| | | // { required: true, message: "请输入交易主体名称", trigger: "blur" } |
| | | // ], |
| | | businessLicense: [ |
| | | { required: true, message: "请上传营业执照", trigger: "change" } |
| | | ], |
| | |
| | | } else { |
| | | state.ruleForm.transactionCode = route.query.code; |
| | | } |
| | | // 企业类型 |
| | | |
| | | let res = await enterpriseTypes(); |
| | | state.enterpriseList = res?.result; |
| | | }); |
| | |
| | | type: "error" |
| | | }); |
| | | } |
| | | isLoading.value = false; |
| | | }; |
| | | |
| | | const handleAvatarSuccessLegalRepresentative: UploadProps["onSuccess"] = ( |
| | |
| | | type: "error" |
| | | }); |
| | | } |
| | | isLoading.value = false; |
| | | }; |
| | | |
| | | const handleAvatarSuccessOperator: UploadProps["onSuccess"] = ( |
| | |
| | | type: "error" |
| | | }); |
| | | } |
| | | isLoading.value = false; |
| | | }; |
| | | |
| | | const beforeAvatarUpload: UploadProps["beforeUpload"] = rawFile => { |
| | | isLoading.value = true; |
| | | // if (rawFile.type !== "image/jpeg") { |
| | | // message(`请上传jpeg类型的图片`, { |
| | | // type: "error" |
| | |
| | | "compilerOptions": { |
| | | "target": "ESNext", |
| | | "module": "ESNext", |
| | | "moduleResolution": "bundler", |
| | | "moduleResolution": "node", |
| | | "strict": false, |
| | | "strictFunctionTypes": false, |
| | | "noImplicitThis": true, |