Compare commits
76 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ec208de5c7 | ||
![]() |
75348cc796 | ||
![]() |
7e662aabf6 | ||
![]() |
3b6214d40e | ||
![]() |
20155577ee | ||
![]() |
1130fe0640 | ||
![]() |
3d622262af | ||
![]() |
7c5fae74fb | ||
![]() |
f2a4ea7dce | ||
![]() |
cb9cfdf0f2 | ||
![]() |
dd8682772e | ||
![]() |
04a4122641 | ||
![]() |
e50a2ae9ed | ||
![]() |
4442cd01b3 | ||
![]() |
5c38208f01 | ||
![]() |
4f523974e4 | ||
![]() |
c27afa15a0 | ||
![]() |
3f19b55b3a | ||
![]() |
a99a555ef9 | ||
![]() |
be86fee989 | ||
![]() |
fb97af61f2 | ||
![]() |
ae9ddf81d5 | ||
![]() |
caf22885f7 | ||
![]() |
5421d71140 | ||
![]() |
16c46dcf32 | ||
![]() |
ed8c15cc3b | ||
![]() |
c422239a05 | ||
![]() |
369e7a5c23 | ||
![]() |
58716ed3cc | ||
![]() |
48bc4f6331 | ||
![]() |
b0b1d53f8e | ||
![]() |
09cb9a43df | ||
![]() |
bf64e4d08b | ||
![]() |
f91a4f520b | ||
![]() |
943a7224e0 | ||
![]() |
79a2625328 | ||
![]() |
ccbafb95a0 | ||
![]() |
37aca92d81 | ||
![]() |
4e52a2c364 | ||
![]() |
5a9f9ae5f5 | ||
![]() |
e87ebdc5da | ||
![]() |
3cc548e5c6 | ||
![]() |
0f1bdc9215 | ||
![]() |
217d58da50 | ||
![]() |
4f12a72e28 | ||
![]() |
d1676f26d9 | ||
![]() |
61046a45d1 | ||
![]() |
085cc12542 | ||
![]() |
66e6c3889c | ||
![]() |
1a002ce6f2 | ||
![]() |
3cdf79a6e4 | ||
![]() |
b9c1d0684a | ||
![]() |
255719bb20 | ||
![]() |
0f8f13b629 | ||
![]() |
e6ee848d36 | ||
![]() |
805fa91f52 | ||
![]() |
37ac601469 | ||
![]() |
46680f8985 | ||
![]() |
dde799e222 | ||
![]() |
58dfac9a55 | ||
![]() |
2500669524 | ||
![]() |
c470fbc2dc | ||
![]() |
2d50a10cd0 | ||
![]() |
8c4c26f554 | ||
![]() |
4dfbb67c65 | ||
![]() |
82410a97a7 | ||
![]() |
3c12f41818 | ||
![]() |
68e15cdcb2 | ||
![]() |
35a0f3364f | ||
![]() |
793ce79b89 | ||
![]() |
288554451e | ||
![]() |
3f9a62fac1 | ||
![]() |
2ad137c5b7 | ||
![]() |
4e86927b77 | ||
![]() |
95c7d2e588 | ||
![]() |
177cc9db9f |
@ -1,5 +1,9 @@
|
||||
NODE_ENV = 'development'
|
||||
|
||||
VITE_APP_BASE_URL = 'https://ceshi-worker-task.lihaink.cn'
|
||||
# VITE_APP_BASE_URL = 'http://192.168.1.16:8000'
|
||||
|
||||
VITE_APP_BASE_URL = ''
|
||||
|
||||
# VITE_APP_BASE_URL = 'https://preview-worker-task.lihaink.cn'
|
||||
|
||||
# VITE_APP_BASE_URL = 'https://worker-task.lihaink.cn'
|
2495
package-lock.json
generated
2495
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useDark, useWindowSize, useThrottleFn } from '@vueuse/core'
|
||||
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
|
||||
// import zhCn from 'element-plus/lib/locale/lang/zh-cn'
|
||||
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
||||
import useAppStore from './stores/modules/app'
|
||||
import useSettingStore from './stores/modules/setting'
|
||||
import { ScreenEnum } from './enums/appEnums'
|
||||
|
@ -29,6 +29,12 @@ export function apiCompanyDetail(params: any) {
|
||||
export function apiSubordinateList(params: any) {
|
||||
return request.get({ url: '/company/subordinate', params })
|
||||
}
|
||||
|
||||
// 获取甲方公司类型
|
||||
export function getContractPartyACompanyTypeList(params: any) {
|
||||
return request.get({ url: '/setting.dict.dict_data/getContractPartyACompanyTypeList', params })
|
||||
}
|
||||
|
||||
// 重新发送短信
|
||||
export function sendMsgApi(params: any) {
|
||||
return request.get({ url: '/company/postsms', params })
|
||||
@ -41,6 +47,10 @@ export function initiate_contract(params: any) {
|
||||
export function generateGontract(params: any) {
|
||||
return request.get({ url: '/company/Draftingcontracts', params })
|
||||
}
|
||||
// 发送个人合同
|
||||
export function userGontract(params: any) {
|
||||
return request.get({ url: '/user.user/Draftingcontracts', params })
|
||||
}
|
||||
// 发送短信
|
||||
export function authentication(params: any) {
|
||||
return request.get({ url: '/company/authentication', params })
|
||||
@ -59,4 +69,21 @@ export function companyResponsibleArea(params: any) {
|
||||
// 人脸采集
|
||||
export function organizationFaceCreate(params: any) {
|
||||
return request.get({ url: '/company/organizationFaceCreate', params })
|
||||
}
|
||||
}
|
||||
|
||||
// 押金线下对公账号转账凭证录入接口
|
||||
export function depositRechargeTransferVoucher(params: any) {
|
||||
return request.post({ url: '/company/depositRechargeTransferVoucher', params })
|
||||
}
|
||||
|
||||
// 获取押金凭证录入列表
|
||||
export function getDepositRechargeTransferVoucherList(params: any) {
|
||||
return request.get({ url: '/company/getDepositRechargeTransferVoucherList', params })
|
||||
}
|
||||
|
||||
// 根据公司id获取甲方公司信息
|
||||
export function getPartyAbyCompanyId(params: any) {
|
||||
return request.get({ url: '/company/getPartyA', params })
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,3 +38,18 @@ export function creatContact(params: any) {
|
||||
export function sendMsgApi(params: any) {
|
||||
return request.get({ url: "/contract.contract/postsms", params });
|
||||
}
|
||||
|
||||
//公司下拉列表
|
||||
export function getCompanyList(params: any) {
|
||||
return request.get({ url: "/user.user/getCompanyList", params });
|
||||
}
|
||||
|
||||
//角色下拉列表
|
||||
export function getRolelist(params: any) {
|
||||
return request.get({ url: "/user.userRole/getlist", params });
|
||||
}
|
||||
|
||||
//创建用户
|
||||
export function userAdd(params: any) {
|
||||
return request.post({ url: "/user.user/add", params });
|
||||
}
|
||||
|
26
src/api/create_task_template.ts
Normal file
26
src/api/create_task_template.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 任务创建模板列表
|
||||
export function apiCreateTaskTemplateLists(params: any) {
|
||||
return request.get({ url: '/create_task_template.create_task_template/lists', params })
|
||||
}
|
||||
|
||||
// 添加任务创建模板
|
||||
export function apiCreateTaskTemplateAdd(params: any) {
|
||||
return request.post({ url: '/create_task_template.create_task_template/add', params })
|
||||
}
|
||||
|
||||
// 编辑任务创建模板
|
||||
export function apiCreateTaskTemplateEdit(params: any) {
|
||||
return request.post({ url: '/create_task_template.create_task_template/edit', params })
|
||||
}
|
||||
|
||||
// 删除任务创建模板
|
||||
export function apiCreateTaskTemplateDelete(params: any) {
|
||||
return request.post({ url: '/create_task_template.create_task_template/delete', params })
|
||||
}
|
||||
|
||||
// 任务创建模板详情
|
||||
export function apiCreateTaskTemplateDetail(params: any) {
|
||||
return request.get({ url: '/create_task_template.create_task_template/detail', params })
|
||||
}
|
@ -37,5 +37,10 @@ export function apiApproveList(params: any) {
|
||||
|
||||
// 任务审批(待审批列表)
|
||||
export function apiApproveAudit(params: any) {
|
||||
return request.get({ url: "/approve.approve/audit", params });
|
||||
return request.post({ url: "/approve.approve/audit", params });
|
||||
}
|
||||
|
||||
// 商户入驻,开通交易审批列表
|
||||
export function apiApproveList2(params: any) {
|
||||
return request.get({ url: "/approve.approve/lists2", params });
|
||||
}
|
||||
|
@ -59,3 +59,12 @@ export function dictDataDelete(params: any) {
|
||||
export function dictDataDetail(params: any) {
|
||||
return request.get({ url: '/setting.dict.dict_data/detail', params })
|
||||
}
|
||||
|
||||
// 审批任务类型
|
||||
export function getTaskApproveTypeList(params: any|undefined) {
|
||||
return request.get({ url: '/setting.dict.dict_data/getTaskApproveTypeList', params })
|
||||
}
|
||||
// 入股任务类型
|
||||
export function getShareholderMoneyTaskApproveTypeList() {
|
||||
return request.get({ url: '/setting.dict.dict_data/getShareholderMoneyTaskApproveTypeList' })
|
||||
}
|
||||
|
12
src/api/shareholdingReview.ts
Normal file
12
src/api/shareholdingReview.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 商户合同列表
|
||||
export function apiApproveLists(params: any) {
|
||||
return request.get({ url: '/approve.approve/lists3', params })
|
||||
}
|
||||
|
||||
|
||||
// 任务审批(待审批列表)
|
||||
export function apiApproveAudit(params: any) {
|
||||
return request.post({ url: "/approve.approve/shareholderMoneyTaskAudit", params });
|
||||
}
|
22
src/api/talk.ts
Normal file
22
src/api/talk.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import request from "@/utils/request/indexs";
|
||||
|
||||
/**
|
||||
* 绑定scoket
|
||||
*/
|
||||
export const bindScoket = (data: any) =>
|
||||
request.post({ url: "/common/im/doBindUid", data });
|
||||
// 发送消息
|
||||
export const sendMsgApi = (data: any) =>
|
||||
request.post({ url: "/common/im/sendTextMsg", data });
|
||||
// 发送文件
|
||||
export const sendFileApi = (data: any) =>
|
||||
request.post({ url: "/common/im/sendFileMsg", data });
|
||||
// 消息列表
|
||||
export const getMsgListApi = (data: any) =>
|
||||
request.post({ url: "/common/im/msgList", data });
|
||||
// 片区经理id
|
||||
export const getAreaManagerApi = (data: any) =>
|
||||
request.post({ url: "/common/im/getAreaManager", data });
|
||||
// 联系人列表
|
||||
export const getContactListApi = (data: any) =>
|
||||
request.post({ url: "/common/im/contactList", data });
|
@ -20,6 +20,7 @@ export function apiTaskDelete(params: any) {
|
||||
export function apiTaskList(params: any) {
|
||||
return request.get({ url: '/task_scheduling_plan.task_scheduling_plan/lists', params })
|
||||
}
|
||||
|
||||
//任务日程-详情
|
||||
export function apiTaskDetails(params: any) {
|
||||
return request.get({ url: '/task_scheduling_plan.task_scheduling_plan/detail', params })
|
||||
|
@ -29,3 +29,8 @@ export function apiTaskTemplateDetail(params: any) {
|
||||
export function apiTaskTypeList(params: any) {
|
||||
return request.get({ url: '/setting.dict.dict_data/lists', params })
|
||||
}
|
||||
|
||||
// 指定商品
|
||||
export function apiGetProductList(params: any) {
|
||||
return request.get({ url: '/task_template.task_template/getProductList', params })
|
||||
}
|
||||
|
BIN
src/assets/images/SP.png
Normal file
BIN
src/assets/images/SP.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
BIN
src/assets/images/XC.png
Normal file
BIN
src/assets/images/XC.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
@ -8,6 +8,7 @@ interface Options {
|
||||
fetchFun: (_arg: any) => Promise<any>;
|
||||
params?: Record<any, any>;
|
||||
firstLoading?: boolean;
|
||||
json: string | undefined; // 用户指定返回的数据中包含json时, 转换
|
||||
}
|
||||
|
||||
export function usePaging(options: Options) {
|
||||
@ -17,6 +18,7 @@ export function usePaging(options: Options) {
|
||||
fetchFun,
|
||||
params = {},
|
||||
firstLoading = false,
|
||||
json
|
||||
} = options;
|
||||
// 记录分页初始参数
|
||||
const paramsInit: Record<any, any> = Object.assign({}, toRaw(params));
|
||||
@ -43,6 +45,11 @@ export function usePaging(options: Options) {
|
||||
if(pager.lists==[]||pager.lists==null||pager.lists==undefined)res.list ? pager.lists = res.list: null;
|
||||
// pager.lists = res?.lists
|
||||
pager.extend = res?.extend;
|
||||
if(json){
|
||||
res.lists.forEach((item:any)=>{
|
||||
typeof item[json] == 'string' ? item[json] = JSON.parse(item[json]) : null ;
|
||||
})
|
||||
}
|
||||
return Promise.resolve(res);
|
||||
})
|
||||
.catch((err: any) => {
|
||||
|
131
src/utils/request/indexs.ts
Normal file
131
src/utils/request/indexs.ts
Normal file
@ -0,0 +1,131 @@
|
||||
import { merge } from "lodash";
|
||||
import configs from "@/config";
|
||||
import { Axios } from "./axios";
|
||||
import {
|
||||
ContentTypeEnum,
|
||||
RequestCodeEnum,
|
||||
RequestMethodsEnum,
|
||||
} from "@/enums/requestEnums";
|
||||
import type { AxiosHooks } from "./type";
|
||||
import { clearAuthInfo, getToken } from "../auth";
|
||||
import feedback from "../feedback";
|
||||
import NProgress from "nprogress";
|
||||
import { AxiosError, type AxiosRequestConfig } from "axios";
|
||||
import router from "@/router";
|
||||
import { PageEnum } from "@/enums/pageEnum";
|
||||
|
||||
// 处理axios的钩子函数
|
||||
const axiosHooks: AxiosHooks = {
|
||||
requestInterceptorsHook(config) {
|
||||
NProgress.start();
|
||||
const { withToken, isParamsToData } = config.requestOptions;
|
||||
const params = config.params || {};
|
||||
const headers = config.headers || {};
|
||||
|
||||
// 添加token
|
||||
if (withToken) {
|
||||
const token = getToken();
|
||||
headers.token = token;
|
||||
}
|
||||
// POST请求下如果无data,则将params视为data
|
||||
if (
|
||||
isParamsToData &&
|
||||
!Reflect.has(config, "data") &&
|
||||
config.method?.toUpperCase() === RequestMethodsEnum.POST
|
||||
) {
|
||||
config.data = params;
|
||||
config.params = {};
|
||||
}
|
||||
config.headers = headers;
|
||||
return config;
|
||||
},
|
||||
requestInterceptorsCatchHook(err) {
|
||||
NProgress.done();
|
||||
return err;
|
||||
},
|
||||
async responseInterceptorsHook(response) {
|
||||
NProgress.done();
|
||||
const { isTransformResponse, isReturnDefaultResponse } =
|
||||
response.config.requestOptions;
|
||||
|
||||
//返回默认响应,当需要获取响应头及其他数据时可使用
|
||||
if (isReturnDefaultResponse) {
|
||||
return response;
|
||||
}
|
||||
// 是否需要对数据进行处理
|
||||
if (!isTransformResponse) {
|
||||
return response.data;
|
||||
}
|
||||
const { code, data, show, msg } = response.data;
|
||||
switch (code) {
|
||||
case RequestCodeEnum.SUCCESS:
|
||||
if (show) {
|
||||
msg && feedback.msgSuccess(msg);
|
||||
}
|
||||
return data;
|
||||
case RequestCodeEnum.FAIL:
|
||||
if (show) {
|
||||
msg && feedback.msgError(msg);
|
||||
}
|
||||
return Promise.reject(data);
|
||||
case RequestCodeEnum.LOGIN_FAILURE:
|
||||
clearAuthInfo();
|
||||
router.push(PageEnum.LOGIN);
|
||||
return Promise.reject();
|
||||
case RequestCodeEnum.OPEN_NEW_PAGE:
|
||||
window.location.href = data.url;
|
||||
return data;
|
||||
default:
|
||||
return data;
|
||||
}
|
||||
},
|
||||
responseInterceptorsCatchHook(error) {
|
||||
NProgress.done();
|
||||
if (error.code !== AxiosError.ERR_CANCELED) {
|
||||
error.message && feedback.msgError(error.message);
|
||||
}
|
||||
return Promise.reject(error);
|
||||
},
|
||||
};
|
||||
|
||||
const defaultOptions: AxiosRequestConfig = {
|
||||
//接口超时时间
|
||||
timeout: configs.timeout,
|
||||
// 基础接口地
|
||||
baseURL: configs.baseUrl,
|
||||
|
||||
// baseURL: "http://192.168.1.11:8081/",
|
||||
|
||||
//请求头
|
||||
headers: { "Content-Type": ContentTypeEnum.JSON, version: configs.version },
|
||||
// 处理 axios的钩子函数
|
||||
axiosHooks: axiosHooks,
|
||||
// 每个接口可以单独配置
|
||||
requestOptions: {
|
||||
// 是否将params视为data参数,仅限post请求
|
||||
isParamsToData: true,
|
||||
//是否返回默认的响应
|
||||
isReturnDefaultResponse: false,
|
||||
// 需要对返回数据进行处理
|
||||
isTransformResponse: true,
|
||||
// 接口拼接地址
|
||||
urlPrefix: "",
|
||||
// 忽略重复请求
|
||||
ignoreCancelToken: false,
|
||||
// 是否携带token
|
||||
withToken: true,
|
||||
// 开启请求超时重新发起请求请求机制
|
||||
isOpenRetry: true,
|
||||
// 重新请求次数
|
||||
retryCount: 2,
|
||||
},
|
||||
};
|
||||
|
||||
function createAxios(opt?: Partial<AxiosRequestConfig>) {
|
||||
return new Axios(
|
||||
// 深度合并
|
||||
merge(defaultOptions, opt || {})
|
||||
);
|
||||
}
|
||||
const request = createAxios();
|
||||
export default request;
|
686
src/views/business/index.vue
Normal file
686
src/views/business/index.vue
Normal file
@ -0,0 +1,686 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="talk-list">
|
||||
<div class="mt-4 serch">
|
||||
<el-input v-model="queryUserName" placeholder="搜索联系人" class="input-with-select">
|
||||
<template #append>
|
||||
<el-button :icon="Search" @click="serchUserFn" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="height: 5vh;"></div>
|
||||
|
||||
<div class="contacts" v-for="(item, index) in userList" :key="index" @click="choseTalkFn(item, index)">
|
||||
<div class="l">
|
||||
<div style="position: relative;">
|
||||
<el-image style="width: 40px; height: 40px" :src="item.avatar" />
|
||||
<div class="brage" v-if="item.no_read_num">{{ item.no_read_num }}</div>
|
||||
</div>
|
||||
<div class="tit-a">
|
||||
<div>{{ item.name }}</div>
|
||||
<div v-if="item.last_msg_type == 'text'" class="value">{{ item.last_msg_content }}</div>
|
||||
<div v-if="item.last_msg_type == 'image'" class="value">[图片]</div>
|
||||
<div v-if="item.last_msg_type == 'video'" class="value">[视频]</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
{{ timeFn(item.last_msg_time) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="talk-detail" id="content">
|
||||
<div class="top">
|
||||
{{ talkDetail.name }}
|
||||
</div>
|
||||
<div style="height: 4vh"></div>
|
||||
<div class="center" id="center" @scroll="handleScroll">
|
||||
<div class="talk" v-for="(item, index) in talkDetail.talkList" :key="index">
|
||||
|
||||
<div style="text-align: center;" v-show="index % 5 == 0">{{ timeFn(item.create_time) }}</div>
|
||||
<!-- 我的消息 -->
|
||||
<div class="my_task" v-if="item.from_user_id == user_id">
|
||||
<div class="content">
|
||||
<!-- 文本 -->
|
||||
<div v-if="item.type == 'text'">
|
||||
<a :href="item.content" v-if="isLink(item.content)" target="_blank"
|
||||
style="color: #576B95;">{{
|
||||
item.content }}
|
||||
</a>
|
||||
<div v-else> {{ item.content }}</div>
|
||||
</div>
|
||||
<!-- 图片 -->
|
||||
<div v-if="item.type == 'image'">
|
||||
<el-image style="width: 100px;height: auto;" :src="item.content" :preview-src-list="srcList"
|
||||
@click="PreviewImgFn(item)"></el-image>
|
||||
</div>
|
||||
<!-- 视频 -->
|
||||
<div v-if="item.type == 'video'">
|
||||
<video controls :src="item.content"></video>
|
||||
</div>
|
||||
</div>
|
||||
<el-image style="width: 40px; height: 40px" :src="userStore.userInfo.avatar" />
|
||||
</div>
|
||||
<!-- 对方消息 -->
|
||||
<div class="to_task" v-else>
|
||||
<el-image style="width: 40px; height: 40px;margin-right: 5px;" :src="item.from_user_avatar" />
|
||||
<div class="content">
|
||||
<!-- 文本 -->
|
||||
<div v-if="item.type == 'text'">
|
||||
<a :href="item.content" target="_blank" v-if="isLink(item.content)"
|
||||
style="color: #576B95;">{{
|
||||
item.content }}
|
||||
</a>
|
||||
<div v-else> {{ item.content }}</div>
|
||||
</div>
|
||||
<!-- 图片 -->
|
||||
<div v-if="item.type == 'image'">
|
||||
<el-image style="width: 100px;height: auto;" :src="item.content" :preview-src-list="srcList"
|
||||
@click="PreviewImgFn(item)"></el-image>
|
||||
</div>
|
||||
<!-- 视频 -->
|
||||
<div v-if="item.type == 'video'">
|
||||
<video controls :src="item.content"></video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- 本地 -->
|
||||
<div v-show="item.status" class="my_task" v-for="item, index in local">
|
||||
<!-- <div></div> -->
|
||||
<!-- <div >上传中</div> -->
|
||||
<div class="content" v-loading="true">
|
||||
<div style="width: 120px;margin-right: 10px;">
|
||||
<video controls :src="item.localSrc" v-if="item.type == 'video'"></video>
|
||||
<img controls :src="item.localSrc" v-else />
|
||||
</div>
|
||||
<!-- <el-progress :text-inside="true" :stroke-width="14" :percentage="item.percentage" /> -->
|
||||
</div>
|
||||
<el-image style="width: 40px; height: 40px;margin-right: 10px;" :src="url" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div style="display: flex;">
|
||||
<el-upload :action="base_url + '/common/im/sendFileMsg'" :data="{
|
||||
from_user_id: user_id,
|
||||
to_user_id: talkDetail.to_user_id,
|
||||
scene: 1,
|
||||
type: 'image',
|
||||
msg_id: msg_id
|
||||
|
||||
}" multiple :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="changeFile">
|
||||
<img class="img_cls" src="@/assets/images/XC.png" style="width: 50px;height: 50px;" />
|
||||
</el-upload>
|
||||
<el-upload :action="base_url + '/common/im/sendFileMsg'" :data="{
|
||||
from_user_id: user_id,
|
||||
to_user_id: talkDetail.to_user_id,
|
||||
scene: 1,
|
||||
type: 'video',
|
||||
msg_id: msg_id
|
||||
}" multiple :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="changeFile1">
|
||||
|
||||
<img style="width: 50px; height: 50px" src="@/assets/images/SP.png" />
|
||||
</el-upload>
|
||||
</div>
|
||||
<el-input v-model="textarea" style="border: none;outline: none;" placeholder="请输入..."
|
||||
@keydown="keyup_submit(event)" />
|
||||
<div class="send-btn" @click="sendMsgFn">发送</div>
|
||||
</div>
|
||||
<!-- <div style="height: 30vh;"></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" scoped setup>
|
||||
import { reactive, ref, onBeforeUnmount } from 'vue';
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import feedback from '@/utils/feedback'
|
||||
import {
|
||||
sendMsgApi, getMsgListApi, bindScoket, sendFileApi, getContactListApi
|
||||
} from "@/api/talk"
|
||||
import { ElMessage } from 'element-plus'
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { inject } from "vue";
|
||||
const base_url: any = inject("base_url").replace('adminapi', '');
|
||||
const userStore = useUserStore();
|
||||
const user_id = userStore.userInfo.id
|
||||
let page_no = 1
|
||||
let to_id: any = null
|
||||
// 图片预览
|
||||
const srcList: any = reactive(
|
||||
[]
|
||||
)
|
||||
const PreviewImgFn = (item: any) => {
|
||||
srcList[0] = item.content
|
||||
}
|
||||
// 上拉加载
|
||||
const handleScroll = (e) => {
|
||||
let top = e.target.scrollTop
|
||||
if (top <= 0) {
|
||||
page_no++
|
||||
getMsgListApi({
|
||||
from_user_id: user_id,
|
||||
to_user_id: to_id,
|
||||
scene: 1,
|
||||
page_no: page_no,
|
||||
page_size: 10
|
||||
}).then(res2 => {
|
||||
if (res2.length <= 0) return
|
||||
talkDetail.talkList = res2.reverse().concat(talkDetail.talkList)
|
||||
e.target.scrollTop = 100
|
||||
})
|
||||
}
|
||||
}
|
||||
let bind = false
|
||||
// 获取用户列表
|
||||
const userList = reactive([])
|
||||
let queryList = reactive([])
|
||||
const talkDetail = reactive({
|
||||
name: "",
|
||||
to_user_id: "",
|
||||
talkList: [],
|
||||
index: 0,
|
||||
})
|
||||
getContactListApi({ user_id: user_id }).then(res => {
|
||||
res.forEach((element: any) => {
|
||||
userList.push(element)
|
||||
queryList.push(element)
|
||||
});
|
||||
// queryList = userList
|
||||
console.log(queryList, 6666)
|
||||
talkDetail.name = userList[0].name
|
||||
talkDetail.to_user_id = userList[0].id
|
||||
to_id = userList[0].id
|
||||
getMsgListApi({
|
||||
from_user_id: user_id,
|
||||
to_user_id: userList[0].id,
|
||||
scene: 1,
|
||||
page_no: 1,
|
||||
page_size: 10
|
||||
}).then(res2 => {
|
||||
talkDetail.talkList = res2.reverse()
|
||||
// console.log(talkDetail)
|
||||
})
|
||||
})
|
||||
const url = 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
|
||||
// 用户搜索
|
||||
const queryUserName = ref('')
|
||||
const serchUserFn = () => {
|
||||
getContactListApi({ user_id: user_id, keywords: queryUserName.value }).then(res => {
|
||||
userList.splice(0, userList.length);
|
||||
res.forEach((element: any) => {
|
||||
// @ts-ignore
|
||||
userList.push(element)
|
||||
// queryList.push(element)
|
||||
});
|
||||
})
|
||||
}
|
||||
// 发送文本消息
|
||||
const isLink = (text: string) => {
|
||||
var pattern = /^(https?:\/\/|www\.|.*\.com).*$/i;
|
||||
return pattern.test(text);
|
||||
}
|
||||
const textarea = ref("")
|
||||
const sendMsgFn = () => {
|
||||
if (!textarea.value) return
|
||||
sendMsgApi({
|
||||
from_user_id: user_id,
|
||||
to_user_id: talkDetail.to_user_id,
|
||||
type: "text",
|
||||
content: textarea.value,
|
||||
scene: 1,
|
||||
msg_id: msg_id.value
|
||||
}).then(res => {
|
||||
talkDetail.talkList.push(res)
|
||||
userList[talkDetail.index].last_msg_content = textarea.value
|
||||
userList[talkDetail.index].last_msg_time = res.create_time
|
||||
userList[talkDetail.index].last_msg_type = 'text'
|
||||
// userList[talkDetail.index].last_msg_content = textarea.value
|
||||
scrollFn()
|
||||
textarea.value = ""
|
||||
generateRandId()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
const keyup_submit = (evt: any) => {
|
||||
var evt = window.event || evt;
|
||||
if (evt.keyCode == 13) {
|
||||
sendMsgFn()
|
||||
}
|
||||
}
|
||||
// 发送媒体消息
|
||||
let msg_id: any = ref('')
|
||||
const generateRandId = () => {
|
||||
var d = new Date().getTime();
|
||||
var uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
|
||||
var r = (d + Math.random() * 16) % 16 | 0;
|
||||
d = Math.floor(d / 16);
|
||||
return (c == "x" ? r : r & 0x3 | 0x8).toString(16);
|
||||
});
|
||||
// return uuid;
|
||||
msg_id.value = uuid
|
||||
}
|
||||
generateRandId()
|
||||
const local = reactive([])
|
||||
let localData = () => {
|
||||
return {
|
||||
status: false,
|
||||
localType: null,
|
||||
localSrc: null,
|
||||
type: "",
|
||||
percentage: 0,
|
||||
msg_id: msg_id.value
|
||||
}
|
||||
}
|
||||
const changeFile = (res) => {
|
||||
console.log(res.type)
|
||||
|
||||
if (!res.type.includes('image')) {
|
||||
ElMessage.error('请选择正确的图片格式!!')
|
||||
return false
|
||||
}
|
||||
local.push(localData())
|
||||
let type = 'image'
|
||||
var localIndex = local.findIndex(function (element) {
|
||||
return element.msg_id === msg_id.value;
|
||||
});
|
||||
// userList[talkDetail.index].last_msg_type = type
|
||||
let file = res
|
||||
local[localIndex].type = type
|
||||
const blob = file;
|
||||
var reader = new FileReader();
|
||||
reader.readAsDataURL(blob);
|
||||
//监听文件读取结束后事件
|
||||
reader.onloadend = function (e) {
|
||||
local[localIndex].status = true
|
||||
local[localIndex].localSrc = e.target?.result
|
||||
scrollFn()
|
||||
generateRandId()
|
||||
};
|
||||
}
|
||||
const changeFile1 = (res) => {
|
||||
if (!res.type.includes('video')) {
|
||||
ElMessage.error('请选择正确的视频格式!!')
|
||||
return false
|
||||
}
|
||||
local.push(localData())
|
||||
let type = 'video'
|
||||
var localIndex = local.findIndex(function (element) {
|
||||
return element.msg_id === msg_id.value;
|
||||
});
|
||||
// userList[talkDetail.index].last_msg_type = type
|
||||
let file = res
|
||||
local[localIndex].type = type
|
||||
const blob = file;
|
||||
var reader = new FileReader();
|
||||
reader.readAsDataURL(blob);
|
||||
//监听文件读取结束后事件
|
||||
reader.onloadend = function (e) {
|
||||
local[localIndex].status = true
|
||||
local[localIndex].localSrc = e.target?.result
|
||||
scrollFn()
|
||||
generateRandId()
|
||||
};
|
||||
}
|
||||
const handleAvatarSuccess: any = (
|
||||
res: any
|
||||
) => {
|
||||
if (res.show == 0) {
|
||||
talkDetail.talkList.push(res.data)
|
||||
}
|
||||
else {
|
||||
feedback.msgError(res.msg)
|
||||
}
|
||||
var localIndex = local.findIndex(function (element) {
|
||||
return element.msg_id === res.data.msg_id;
|
||||
});
|
||||
local[localIndex].status = false
|
||||
userList[talkDetail.index].last_msg_type = res.data.type
|
||||
console.log(res.data)
|
||||
|
||||
}
|
||||
// 选择聊天
|
||||
const choseTalkFn = (item: any, index: number) => {
|
||||
userList[index].no_read_num = 0
|
||||
talkDetail.name = item.name
|
||||
talkDetail.to_user_id = item.id
|
||||
talkDetail.index = index
|
||||
to_id = item.id
|
||||
getMsgListApi({
|
||||
from_user_id: user_id,
|
||||
to_user_id: item.id,
|
||||
scene: 1,
|
||||
page_no: 1,
|
||||
page_size: 10
|
||||
}).then(res2 => {
|
||||
talkDetail.talkList = res2.reverse()
|
||||
scrollFn()
|
||||
|
||||
})
|
||||
}
|
||||
// 滚动底部
|
||||
let scrollTop: any = null
|
||||
onMounted(() => {
|
||||
scrollTop = document.getElementById('center')
|
||||
|
||||
})
|
||||
const scrollFn = () => {
|
||||
setTimeout(() => {
|
||||
scrollTop.scrollTop = 9999999
|
||||
}, 100)
|
||||
}
|
||||
// 时间处理
|
||||
const timeFn = (time) => {
|
||||
const currentDate = new Date(); // 当前日期对象
|
||||
const targetDate = new Date(time * 1000);
|
||||
if (isSameDay(currentDate, targetDate)) {
|
||||
const hours = targetDate.getHours(); // 小时
|
||||
const minutes = targetDate.getMinutes(); // 分钟
|
||||
return hours + ':' + (minutes < 10 ? '0' + minutes : minutes);
|
||||
|
||||
} else if (isYesterday(currentDate, targetDate)) {
|
||||
return '昨天';
|
||||
}
|
||||
const month = targetDate.getMonth() + 1; // 月份(注意月份从0开始,需要加1)
|
||||
const day = targetDate.getDate(); // 日期
|
||||
return month + '月' + day + '日';
|
||||
|
||||
|
||||
}
|
||||
const isSameDay = (date1, date2) => {
|
||||
return (
|
||||
date1.getFullYear() === date2.getFullYear() &&
|
||||
date1.getMonth() === date2.getMonth() &&
|
||||
date1.getDate() === date2.getDate()
|
||||
);
|
||||
}
|
||||
const isYesterday = (currentDate, targetDate) => {
|
||||
const yesterday = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate() - 1);
|
||||
return isSameDay(yesterday, targetDate);
|
||||
}
|
||||
// scoket
|
||||
const socket = new WebSocket('wss://worker-task.lihaink.cn/wss');
|
||||
const onSocketOpen = (event: any) => {
|
||||
console.log('WebSocket连接已打开');
|
||||
}
|
||||
const onSocketMessage = (event: any) => {
|
||||
let data = JSON.parse(event.data)
|
||||
if (!bind) {
|
||||
let client_id = (JSON.parse(event.data).client_id)
|
||||
bindScoket({
|
||||
client_id: client_id,
|
||||
user_id: user_id,
|
||||
scene: 1,
|
||||
}).then(res => {
|
||||
bind = true
|
||||
console.log('绑定成功')
|
||||
})
|
||||
}
|
||||
else if (data.id) {
|
||||
var index = userList.findIndex(function (element) {
|
||||
return element.id == data.from_user_id;
|
||||
});
|
||||
// talkDetail.talkList.push(data)
|
||||
if (data.from_user_id == talkDetail.to_user_id) {
|
||||
console.log(data, "收到scoket消息")
|
||||
talkDetail.talkList.push(data)
|
||||
userList[index].last_msg_content = data.content
|
||||
userList[index].last_msg_time = data.create_time
|
||||
userList[index].last_msg_type = data.type
|
||||
|
||||
scrollFn()
|
||||
} else {
|
||||
userList[index].no_read_num++
|
||||
userList[index].last_msg_content = data.content
|
||||
userList[index].last_msg_time = data.create_time
|
||||
userList[index].last_msg_type = data.type
|
||||
|
||||
// userList.forEach
|
||||
}
|
||||
}
|
||||
console.log(data)
|
||||
}
|
||||
const onSocketClose = (event: any) => {
|
||||
console.log('WebSocket连接已关闭');
|
||||
}
|
||||
const onSocketError = (event: any) => {
|
||||
console.error('WebSocket连接发生错误');
|
||||
}
|
||||
socket.addEventListener('open', onSocketOpen);
|
||||
socket.addEventListener('message', onSocketMessage);
|
||||
socket.addEventListener('close', onSocketClose);
|
||||
socket.addEventListener('error', onSocketError);
|
||||
onBeforeUnmount(() => {
|
||||
socket.close()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-input__wrapper) {
|
||||
box-shadow: none !important;
|
||||
// border-bottom: 1px solid black;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.box {
|
||||
display: flex;
|
||||
|
||||
.serch {
|
||||
background-color: #F6F6F6;
|
||||
position: fixed;
|
||||
top: 9vh;
|
||||
width: 17vw;
|
||||
z-index: 99;
|
||||
padding-left: 10px;
|
||||
padding-top: 10px;
|
||||
|
||||
}
|
||||
|
||||
.talk-list {
|
||||
width: 20vw;
|
||||
overflow: hidden;
|
||||
height: 85vh;
|
||||
position: relative;
|
||||
// background-color: #fff;
|
||||
cursor: pointer;
|
||||
|
||||
.contacts {
|
||||
// margin-bottom: 10px;
|
||||
// background-color: red;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.l {
|
||||
display: flex;
|
||||
|
||||
.tit-a {
|
||||
margin-left: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
|
||||
.value {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 8vw;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.contacts:active {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.contacts:hover {
|
||||
background-color: #fff;
|
||||
|
||||
}
|
||||
|
||||
.talk-list::-webkit-scrollbar {
|
||||
width: 2px;
|
||||
/* 滚动条宽度 */
|
||||
}
|
||||
|
||||
.talk-list::-webkit-scrollbar-thumb {
|
||||
background-color: #888;
|
||||
/* 滚动条颜色 */
|
||||
border-radius: 1px;
|
||||
/* 滚动条圆角 */
|
||||
}
|
||||
|
||||
.img_cls {
|
||||
|
||||
margin-right: 10PX;
|
||||
margin-bottom: 10PX;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.talk-list:hover {
|
||||
// background-color: #888;
|
||||
overflow: scroll;
|
||||
|
||||
}
|
||||
|
||||
.talk-detail {
|
||||
width: 80vw;
|
||||
height: 85vh;
|
||||
|
||||
.top {
|
||||
position: fixed;
|
||||
height: 4vh;
|
||||
width: 70vw;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
z-index: 9;
|
||||
border-bottom: 1px solid #EAE8E7;
|
||||
}
|
||||
|
||||
.center {
|
||||
height: 65vh;
|
||||
|
||||
overflow-y: scroll;
|
||||
background-color: #fff;
|
||||
|
||||
}
|
||||
|
||||
.bottom {
|
||||
position: fixed;
|
||||
background-color: white;
|
||||
height: 20vh;
|
||||
border-top: 1px solid #EAE8E7;
|
||||
width: 70vw;
|
||||
box-sizing: border-box;
|
||||
// padding-top: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
// overflow: scroll;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.center::-webkit-scrollbar {
|
||||
width: 2px;
|
||||
/* 滚动条宽度 */
|
||||
}
|
||||
|
||||
.center::-webkit-scrollbar-thumb {
|
||||
background-color: #888;
|
||||
/* 滚动条颜色 */
|
||||
border-radius: 5px;
|
||||
/* 滚动条圆角 */
|
||||
}
|
||||
|
||||
.talk {
|
||||
// height: 4vh;
|
||||
// background-color: #fff;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
background-color: green;
|
||||
color: white;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
float: right;
|
||||
margin-top: 5px;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.send-btn:active {
|
||||
background-color: yellowgreen;
|
||||
}
|
||||
|
||||
.my_task {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.content {
|
||||
background-color: #95EC69;
|
||||
border-radius: 5px;
|
||||
// height: 30px;
|
||||
padding: 5px;
|
||||
// height: 40px;
|
||||
// min-height: 40px;
|
||||
margin-right: 5px;
|
||||
line-height: 30px;
|
||||
max-width: 20vw;
|
||||
// overflow: hidden;
|
||||
word-break: break-all;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.to_task {
|
||||
display: flex;
|
||||
// justify-content: flex-end;
|
||||
|
||||
.content {
|
||||
background-color: #95EC69;
|
||||
border-radius: 5px;
|
||||
// height: 30px;
|
||||
padding: 5px 10px;
|
||||
// height: 40px;
|
||||
// min-height: 40px;
|
||||
margin-right: 5px;
|
||||
line-height: 30px;
|
||||
max-width: 20vw;
|
||||
word-break: break-all;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
.brage {
|
||||
background-color: red;
|
||||
color: white;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 16px;
|
||||
text-align: center;
|
||||
line-height: 16px;
|
||||
position: absolute;
|
||||
font-size: 12px;
|
||||
top: -8px;
|
||||
right: -5px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -69,6 +69,7 @@ import {
|
||||
apiCompanyLists,
|
||||
companyListTwo,
|
||||
apiCompanyDelete,
|
||||
getContractPartyACompanyTypeList,
|
||||
} from "@/api/company";
|
||||
import { defineEmits } from "vue";
|
||||
|
||||
@ -86,8 +87,10 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const typeList = props.companyTypeList.filter((item: any) => {
|
||||
return item.id == 30 || item.id == 16;
|
||||
// 可选公司类型
|
||||
const typeList = ref([]);
|
||||
getContractPartyACompanyTypeList({}).then((res) => {
|
||||
typeList.value = res;
|
||||
});
|
||||
|
||||
// 查询条件
|
||||
|
@ -1,223 +1,112 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="90px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<!-- <div style="font-size: 1.2rem; margin: 10px 0">公司基本信息创建</div> -->
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-col :span="24" class="pt-6 el-card">
|
||||
<div class="tit">公司基本信息创建</div>
|
||||
<el-row>
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
v-model="formData.company_name"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
:disabled="isDisabled"
|
||||
:style="{ width: '300px' }"
|
||||
></el-input>
|
||||
<el-input v-model="formData.company_name" placeholder="请输入公司名称" clearable :disabled="isDisabled"
|
||||
:style="{ width: '300px' }"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="社会代码" prop="organization_code">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.organization_code"
|
||||
placeholder="请输入社会代码"
|
||||
clearable
|
||||
:style="{ width: '300px' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.organization_code" placeholder="请输入社会代码" clearable
|
||||
:style="{ width: '300px' }"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="公司类型"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="company_type"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_type"
|
||||
placeholder="请选择公司类型"
|
||||
clearable
|
||||
@change="company_type_change"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.dictTypeLists"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-form-item label="对公账号" :rules="[
|
||||
{ required: true, message: '请输入对公账号', trigger: 'blur' },
|
||||
]" prop="qualification.corporate_account">
|
||||
<el-input v-model="formData.qualification.corporate_account" placeholder="请输入对公账号" clearable
|
||||
:disabled="isDisabled" :style="{ width: '300px' }"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="开户行名称" label-width="150px" prop="qualification.corporate_bank" :rules="[
|
||||
{ required: true, message: '请输入开户行名称', trigger: 'blur' },
|
||||
]">
|
||||
<el-input :disabled="isDisabled" v-model="formData.qualification.corporate_bank" placeholder="请输入开户行名称" clearable
|
||||
:style="{ width: '300px' }"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开户行地址">
|
||||
<el-input :disabled="isDisabled" v-model="formData.qualification.corporate_bank_address" placeholder="请输入开户行地址" clearable
|
||||
:style="{ width: '300px' }"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="公司类型" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" prop="company_type">
|
||||
<el-select :disabled="isDisabled" v-model="formData.company_type" placeholder="请选择公司类型" clearable
|
||||
@change="company_type_change">
|
||||
<el-option v-for="(item, index) in datas.dictTypeLists" :key="index" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="省"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="province"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.province"
|
||||
placeholder="请选择省"
|
||||
clearable
|
||||
@change="province_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.provinceOptions"
|
||||
:key="index"
|
||||
:label="item.province_name"
|
||||
:value="item.province_code"
|
||||
></el-option>
|
||||
<el-form-item label="省" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" prop="province">
|
||||
<el-select :disabled="isDisabled" v-model="formData.province" placeholder="请选择省" clearable
|
||||
@change="province_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.provinceOptions" :key="index" :label="item.province_name"
|
||||
:value="item.province_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="市"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="city"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.city"
|
||||
placeholder="请选择市"
|
||||
clearable
|
||||
@change="city_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.cityOptions"
|
||||
:key="index"
|
||||
:label="item.city_name"
|
||||
:value="item.city_code"
|
||||
></el-option>
|
||||
<el-form-item label="市" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" prop="city">
|
||||
<el-select :disabled="isDisabled" v-model="formData.city" placeholder="请选择市" clearable @change="city_change"
|
||||
:style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.cityOptions" :key="index" :label="item.city_name"
|
||||
:value="item.city_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isArea"
|
||||
label="区"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="area"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.area"
|
||||
placeholder="请选择区"
|
||||
clearable
|
||||
@change="area_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.areaOptions"
|
||||
:key="index"
|
||||
:label="item.area_name"
|
||||
:value="item.area_code"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
<el-form-item v-if="isArea" label="区" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="area">
|
||||
<el-select :disabled="isDisabled" v-model="formData.area" placeholder="请选择区" clearable @change="area_change"
|
||||
:style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.areaOptions" :key="index" :label="item.area_name"
|
||||
:value="item.area_code" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isStreet"
|
||||
label="镇"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="street"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.street"
|
||||
placeholder="请选择镇"
|
||||
clearable
|
||||
@change="street_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.streetOptions"
|
||||
:key="index"
|
||||
:label="item.street_name"
|
||||
:value="item.street_code"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
<el-form-item v-if="isStreet" label="镇" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="street">
|
||||
<el-select :disabled="isDisabled" v-model="formData.street" placeholder="请选择镇" clearable
|
||||
@change="street_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.streetOptions" :key="index" :label="item.street_name"
|
||||
:value="item.street_code" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isVillage"
|
||||
label="村"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="village"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.village"
|
||||
placeholder="请选择村"
|
||||
clearable
|
||||
@change="village_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.villageOptions"
|
||||
:key="index"
|
||||
:label="item.village_name"
|
||||
:value="item.village_code"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
<el-form-item v-if="isVillage" label="村" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="village">
|
||||
<el-select :disabled="isDisabled" v-model="formData.village" placeholder="请选择村" clearable
|
||||
@change="village_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.villageOptions" :key="index" :label="item.village_name"
|
||||
:value="item.village_code" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isBrigade"
|
||||
label="队"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="brigade"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.brigade"
|
||||
placeholder="请选择队"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.brigadeOptions"
|
||||
:key="index"
|
||||
:label="item.brigade_name"
|
||||
:value="item.id"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
<el-form-item v-if="isBrigade" label="队" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="brigade">
|
||||
<el-select :disabled="isDisabled" v-model="formData.brigade" placeholder="请选择队" clearable
|
||||
:style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.brigadeOptions" :key="index" :label="item.brigade_name"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.address"
|
||||
placeholder="请输入地址"
|
||||
clearable
|
||||
:style="{ width: '300px' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.address" placeholder="请输入地址" clearable
|
||||
:style="{ width: '300px' }"></el-input>
|
||||
</el-form-item>
|
||||
<el-col :span="23">
|
||||
<el-form-item label="负责区域" prop="region">
|
||||
<el-checkbox-group
|
||||
v-model="formData.responsible_area"
|
||||
@change="handleCheckedCitiesChange"
|
||||
:disabled="isDisabled"
|
||||
>
|
||||
<el-checkbox
|
||||
:disabled="
|
||||
formData[regionType] == city[regionType + '_code'] ||
|
||||
formData[regionType] == city.id ||
|
||||
city.disabled
|
||||
"
|
||||
v-for="city in datas[regionType + 'Options']"
|
||||
:key="city[regionType + '_name']"
|
||||
:label="
|
||||
regionType == 'brigade'
|
||||
? city.id + ''
|
||||
: city[regionType + '_code'] + ''
|
||||
"
|
||||
>{{ city[regionType + "_name"] }}</el-checkbox
|
||||
>
|
||||
<el-checkbox-group v-model="formData.responsible_area" @change="handleCheckedCitiesChange"
|
||||
:disabled="isDisabled || formData.company_type == 17">
|
||||
<el-checkbox :disabled="formData[regionType] == city[regionType + '_code'] ||
|
||||
formData[regionType] == city.id ||
|
||||
city.disabled
|
||||
" v-for="city in datas[regionType + 'Options']" :key="city[regionType + '_name']" :label="regionType == 'brigade'
|
||||
? city.id + ''
|
||||
: city[regionType + '_code'] + ''
|
||||
">{{ city[regionType + "_name"] }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-col :span="24" class="pt-6 el-card">
|
||||
<div class="tit">主要联系人</div>
|
||||
<!-- <div
|
||||
style="
|
||||
@ -233,22 +122,10 @@
|
||||
<el-aside width="190px" style="display: flex">
|
||||
<span style="color: #f56c6c; padding-left: 20px">*</span>
|
||||
<div class="headimg" style="margin-left: 5px">
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
:accept="acceptFileTypes"
|
||||
v-model="formData.avatar"
|
||||
class="avatar-uploader-head"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessAvatar"
|
||||
>
|
||||
<img
|
||||
v-if="formData.avatar"
|
||||
:src="formData.avatar"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isDisabled" :accept="acceptFileTypes" v-model="formData.avatar"
|
||||
class="avatar-uploader-head" :data="{ cid: 1 }" :headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'" :show-file-list="false" :on-success="handleAvatarSuccessAvatar">
|
||||
<img v-if="formData.avatar" :src="formData.avatar" class="avatar" />
|
||||
<div v-else class="avatar-uploader-icon">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
@ -263,60 +140,31 @@
|
||||
<div class="right" style="max-width: 1100px">
|
||||
<el-row>
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.master_name" placeholder="请输入姓名" clearable
|
||||
:style="{ width: '450px' }"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="职务" prop="master_position">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_position"
|
||||
placeholder="请输入职务"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.master_position" placeholder="请输入职务" clearable
|
||||
:style="{ width: '450px' }"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_phone"
|
||||
placeholder="请输入手机"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.master_phone" placeholder="请输入手机" clearable
|
||||
:style="{ width: '450px' }"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.master_email"
|
||||
placeholder="邮箱将由系统自动生成"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
<el-input disabled v-model="formData.master_email" placeholder="邮箱将由系统自动生成" clearable
|
||||
:style="{ width: '450px' }"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.sex"
|
||||
placeholder="请选择性别"
|
||||
:style="{ width: '450px' }"
|
||||
>
|
||||
<el-select :disabled="isDisabled" v-model="formData.sex" placeholder="请选择性别"
|
||||
:style="{ width: '450px' }">
|
||||
<el-option label="男" value="1" />
|
||||
<el-option label="女" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.id_card"
|
||||
placeholder="请输入身份证"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.id_card" placeholder="请输入身份证" clearable
|
||||
:style="{ width: '450px' }"></el-input>
|
||||
</el-form-item>
|
||||
<!--
|
||||
<el-form-item label="片区经理" prop="area_manager_name">
|
||||
@ -337,129 +185,71 @@
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-col :span="24" class="pt-6 el-card">
|
||||
<div class="tit">其他联系人</div>
|
||||
|
||||
<el-row>
|
||||
<template
|
||||
v-for="(item, index) in formData.other_contacts"
|
||||
:key="index"
|
||||
>
|
||||
<template v-for="(item, index) in formData.other_contacts" :key="index">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="field120">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="item.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="item.name" placeholder="请输入姓名" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职务" prop="field121">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="item.position"
|
||||
placeholder="请输入职务"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="item.position" placeholder="请输入职务" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机" prop="field122">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="item.phone"
|
||||
placeholder="请输入手机"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="item.phone" placeholder="请输入手机" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="item.email"
|
||||
placeholder="请输入邮箱"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="item.email" placeholder="请输入邮箱" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label prop="field126">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="isDisabled"
|
||||
size="medium"
|
||||
@click="other"
|
||||
>添加联系人</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="formData.other_contacts.length"
|
||||
type="primary"
|
||||
:disabled="isDisabled"
|
||||
size="medium"
|
||||
@click="otherdelete"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button type="primary" :disabled="isDisabled" size="medium" @click="other">添加联系人</el-button>
|
||||
<el-button v-if="formData.other_contacts.length" type="primary" :disabled="isDisabled" size="medium"
|
||||
@click="otherdelete">删除</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<!-- <div style="font-size: 1.2rem; margin: 10px 0">资质信息</div> -->
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-col :span="24" class="pt-6 el-card">
|
||||
<div class="tit">资质信息</div>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司资质" required>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
:accept="acceptFileTypes"
|
||||
v-model="formData.qualification.business_license"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.business_license"
|
||||
:src="formData.qualification.business_license"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isDisabled" :accept="acceptFileTypes"
|
||||
v-model="formData.qualification.business_license" class="pl-3 avatar-uploader" :data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }" :action="base_url + '/upload/image'" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccess">
|
||||
<img v-if="formData.qualification.business_license" :src="formData.qualification.business_license"
|
||||
class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item class="others" label="其他资质">
|
||||
<div
|
||||
v-for="(v, i) in formData.qualification.other_qualifications"
|
||||
:key="i"
|
||||
class="otherimg"
|
||||
>
|
||||
<div v-for="(v, i) in formData.qualification.other_qualifications" :key="i" class="otherimg">
|
||||
<img :src="v" @click="clickdelete(i)" />
|
||||
</div>
|
||||
<el-upload
|
||||
v-if="imgflag"
|
||||
:accept="acceptFileTypes"
|
||||
:disabled="isDisabled"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess_two"
|
||||
style="margin-bottom: 12px"
|
||||
>
|
||||
<el-upload v-if="imgflag" :accept="acceptFileTypes" :disabled="isDisabled" class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }" :headers="{ Token: userStore.token }" :action="base_url + '/upload/image'"
|
||||
:show-file-list="false" :on-success="handleAvatarSuccess_two" style="margin-bottom: 12px">
|
||||
<el-icon class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@ -468,22 +258,12 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label-width="120px" label="开户许可证" required>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
:accept="acceptFileTypes"
|
||||
v-model="formData.qualification.business_licenseB"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessB"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.business_licenseB"
|
||||
:src="formData.qualification.business_licenseB"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isDisabled" :accept="acceptFileTypes"
|
||||
v-model="formData.qualification.business_licenseB" class="pl-3 avatar-uploader" :data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }" :action="base_url + '/upload/image'" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessB">
|
||||
<img v-if="formData.qualification.business_licenseB" :src="formData.qualification.business_licenseB"
|
||||
class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@ -493,21 +273,15 @@
|
||||
</el-row>
|
||||
</el-col>
|
||||
<!-- <div style="font-size: 1.2rem; margin: 10px 0">电子合同</div> -->
|
||||
<!-- <el-col v-if="isshow" :span="24" class="el-card pt-6"> -->
|
||||
<el-col v-if="false" :span="24" class="el-card pt-6">
|
||||
<!-- <el-col v-if="isshow" :span="24" class="pt-6 el-card"> -->
|
||||
<el-col v-if="false" :span="24" class="pt-6 el-card">
|
||||
<div class="tit">电子合同</div>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="签约方" prop="field130">
|
||||
<el-input
|
||||
v-model="formData.party_a_name"
|
||||
placeholder="请选择签约方"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
:disabled="!partyDisabled || isDisabled"
|
||||
@click="openCompany"
|
||||
></el-input>
|
||||
<el-input v-model="formData.party_a_name" placeholder="请选择签约方" clearable :style="{ width: '100%' }"
|
||||
:disabled="!partyDisabled || isDisabled" @click="openCompany"></el-input>
|
||||
<!-- <el-select
|
||||
:disabled="partyDisabled"
|
||||
v-model="formData.party_a_name"
|
||||
@ -525,57 +299,30 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="100px"
|
||||
label="被签约公司"
|
||||
prop="field131"
|
||||
>
|
||||
<el-input
|
||||
:disabled="true"
|
||||
v-model="formData.company_name"
|
||||
placeholder="请输入被签约公司"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-form-item label-width="100px" label="被签约公司" prop="field131">
|
||||
<el-input :disabled="true" v-model="formData.company_name" placeholder="请输入被签约公司" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="100px"
|
||||
label="合同类型"
|
||||
prop="contract_type"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.contract.contract_type"
|
||||
placeholder="请选择合同类型"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.contract_type"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-form-item label-width="100px" label="合同类型" prop="contract_type">
|
||||
<el-select :disabled="isDisabled" v-model="formData.contract.contract_type" placeholder="请选择合同类型" clearable
|
||||
:style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.contract_type" :key="index" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label-width="100px" label="合同编号" prop="field133">
|
||||
<el-input
|
||||
placeholder="系统自动生成"
|
||||
v-model="formData.contract.contract_no"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
<el-input placeholder="系统自动生成" v-model="formData.contract.contract_no" clearable :style="{ width: '100%' }"
|
||||
:disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<!-- <el-col v-if="isshow" :span="24" class="el-card pt-6">
|
||||
<!-- <el-col v-if="isshow" :span="24" class="pt-6 el-card">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合同上传" required>
|
||||
@ -596,23 +343,11 @@
|
||||
</el-row>
|
||||
</el-col> -->
|
||||
|
||||
<el-col
|
||||
v-if="(isDisabled == false && isEdit == false) || isEdit"
|
||||
:span="24"
|
||||
class="el-card pt-6"
|
||||
>
|
||||
<el-col v-if="(isDisabled == false && isEdit == false) || isEdit" :span="24" class="pt-6 el-card">
|
||||
<el-form-item label prop="field139">
|
||||
<el-button v-if="isEdit" type="primary" size="medium" @click="create"
|
||||
>完成</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="isDisabled == false && isEdit == false"
|
||||
type="primary"
|
||||
:disabled="isDisabled"
|
||||
size="medium"
|
||||
@click="create"
|
||||
>创建</el-button
|
||||
>
|
||||
<el-button v-if="isEdit" type="primary" size="medium" @click="create">完成</el-button>
|
||||
<el-button v-if="isDisabled == false && isEdit == false" type="primary" :disabled="isDisabled" size="medium"
|
||||
@click="create">创建</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
@ -676,7 +411,6 @@ if (route.query.isshow) {
|
||||
}
|
||||
|
||||
const acceptFileTypes = ref(".png, .jpg, .jpeg, image/png, image/jpeg");
|
||||
console.log(isDisabled);
|
||||
// 公司类型
|
||||
const indexType = ref(0);
|
||||
|
||||
@ -700,6 +434,7 @@ if (route.query.edit) {
|
||||
}
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
|
||||
admin_id: "",
|
||||
admin_name: "",
|
||||
area_manager: "",
|
||||
@ -727,11 +462,14 @@ const formData = reactive({
|
||||
master_email: "",
|
||||
other_contacts: [],
|
||||
qualification: {
|
||||
corporate_account: "", //对公账号
|
||||
business_license: "",
|
||||
business_licenseB: "",
|
||||
other_qualifications: [],
|
||||
bank_accountB: [],
|
||||
bank_account: [],
|
||||
corporate_bank: "",
|
||||
corporate_bank_address: "",
|
||||
},
|
||||
contract: {
|
||||
contract_type: "",
|
||||
@ -878,6 +616,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
console.log(formData);
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
@ -962,7 +701,7 @@ function otherdelete() {
|
||||
email: "",
|
||||
});
|
||||
}
|
||||
function company_type_change(type: any) {
|
||||
function company_type_change(type: any, clear: boolean | undefined = true) {
|
||||
//区
|
||||
const arr = [30, 14, 15];
|
||||
if (arr.indexOf(type) > -1) {
|
||||
@ -976,7 +715,7 @@ function company_type_change(type: any) {
|
||||
regionType.value = "area";
|
||||
return true;
|
||||
}
|
||||
//镇
|
||||
//镇合伙人
|
||||
if (type == 16) {
|
||||
isArea.value = true;
|
||||
isStreet.value = true;
|
||||
@ -984,6 +723,12 @@ function company_type_change(type: any) {
|
||||
isBrigade.value = false;
|
||||
formData.village = "";
|
||||
formData.brigade = "";
|
||||
if (!formData.id) {
|
||||
// 创建公司时切换公司类型进行清空
|
||||
formData.street = "";
|
||||
formData.area = "";
|
||||
}
|
||||
if (clear) formData.responsible_area = []; // 同级别公司切换时清空已选择区域
|
||||
partyDisabled.value = true;
|
||||
indexType.value = 30;
|
||||
regionType.value = "street";
|
||||
@ -992,7 +737,7 @@ function company_type_change(type: any) {
|
||||
if (type != 16) {
|
||||
partyDisabled.value = false;
|
||||
}
|
||||
//镇
|
||||
//镇农科
|
||||
if (type == 41) {
|
||||
isArea.value = true;
|
||||
isStreet.value = true;
|
||||
@ -1000,6 +745,12 @@ function company_type_change(type: any) {
|
||||
isBrigade.value = false;
|
||||
formData.village = "";
|
||||
formData.brigade = "";
|
||||
if (!formData.id) {
|
||||
// 创建公司时切换公司类型进行清空
|
||||
formData.street = "";
|
||||
formData.area = "";
|
||||
}
|
||||
if (clear) formData.responsible_area = []; // 同级别公司切换时清空已选择区域
|
||||
// partyDisabled.value = true;
|
||||
// indexType.value = 30;
|
||||
regionType.value = "street";
|
||||
@ -1059,12 +810,12 @@ const getAreaList = async () => {
|
||||
};
|
||||
const getStreetList = async () => {
|
||||
const data = await apiStreetList({ street: formData.area });
|
||||
if (formData.company_type == 16) {
|
||||
if (formData.company_type == 16 || formData.company_type == 41) {
|
||||
const f = await companyResponsibleArea({
|
||||
key: "area",
|
||||
value: formData.area,
|
||||
company_type: formData.company_type,
|
||||
});
|
||||
console.log(f);
|
||||
|
||||
data.forEach((item: any) => {
|
||||
if (Object.values(f).find((t: any) => item.street_code == t + ""))
|
||||
@ -1080,6 +831,7 @@ const getVillageList = async () => {
|
||||
const f = await companyResponsibleArea({
|
||||
key: "street",
|
||||
value: formData.street,
|
||||
company_type: formData.company_type,
|
||||
});
|
||||
data.forEach((item: any) => {
|
||||
if (Object.values(f).find((t: any) => item.village_code == t + ""))
|
||||
@ -1095,6 +847,7 @@ const getBrigadeList = async () => {
|
||||
const f = await companyResponsibleArea({
|
||||
key: "village",
|
||||
value: formData.village,
|
||||
company_type: formData.company_type,
|
||||
});
|
||||
data.forEach((item: any) => {
|
||||
if (Object.values(f).find((t: any) => item.id == t + ""))
|
||||
@ -1126,14 +879,6 @@ const getDetails = async () => {
|
||||
partyDisabled.value = true;
|
||||
}
|
||||
Object.keys(formData).forEach((key) => {
|
||||
const stringArr = [
|
||||
"province",
|
||||
"city",
|
||||
"area",
|
||||
"street",
|
||||
"village",
|
||||
"brigade",
|
||||
];
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
formData[key] = data[key];
|
||||
// if (
|
||||
@ -1161,7 +906,17 @@ const getDetails = async () => {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (stringArr.includes(key)) formData[key] = formData[key].toString();
|
||||
});
|
||||
const stringArr = [
|
||||
"province",
|
||||
"city",
|
||||
"area",
|
||||
"street",
|
||||
"village",
|
||||
"brigade",
|
||||
];
|
||||
stringArr.forEach((key: string) => {
|
||||
formData[key] = formData[key].toString();
|
||||
});
|
||||
await getCityList();
|
||||
await getAreaList();
|
||||
@ -1174,7 +929,8 @@ const getDetails = async () => {
|
||||
// fileList.value[0].url = data.contract?.file
|
||||
// fileList.value[0].name = '合同文件'
|
||||
// }
|
||||
company_type_change(formData.company_type);
|
||||
|
||||
company_type_change(formData.company_type, false);
|
||||
};
|
||||
const clickdelete = (index) => {
|
||||
if (!route.query.read) {
|
||||
|
@ -213,7 +213,12 @@
|
||||
>详情</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button v-perms="['company/add:edit']" type="primary" link>
|
||||
<el-button
|
||||
v-if="row.is_authentication == 0"
|
||||
v-perms="['company/add:edit']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('company/add:edit'),
|
||||
|
@ -217,50 +217,7 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<el-form-item label="行驶证" prop="car_card">
|
||||
<el-upload
|
||||
v-model="formData.qualification.car_card"
|
||||
:disabled="flag"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarA"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.car_card"
|
||||
:src="formData.qualification.car_card"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
v-model="formData.qualification.car_card_b"
|
||||
:disabled="flag"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarB"
|
||||
:before-upload="beforeAvatarUpload_two"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.car_card_b"
|
||||
:src="formData.qualification.car_card_b"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<el-form-item label="银行卡号" prop="bank_account">
|
||||
<el-form-item label="银行卡" prop="bank_account">
|
||||
<el-upload
|
||||
v-model="formData.qualification.bank_account"
|
||||
:disabled="flag"
|
||||
@ -303,6 +260,50 @@
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-form-item label="行驶证" prop="car_card">
|
||||
<el-upload
|
||||
v-model="formData.qualification.car_card"
|
||||
:disabled="flag"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarA"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.car_card"
|
||||
:src="formData.qualification.car_card"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
v-model="formData.qualification.car_card_b"
|
||||
:disabled="flag"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarB"
|
||||
:before-upload="beforeAvatarUpload_two"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.car_card_b"
|
||||
:src="formData.qualification.car_card_b"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="disabledPartyA">
|
||||
<el-col :span="24">
|
||||
|
146
src/views/consumer/lists/dialog_index.vue
Normal file
146
src/views/consumer/lists/dialog_index.vue
Normal file
@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_name"
|
||||
clearable
|
||||
placeholder="请输入公司名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司类型" prop="company_type">
|
||||
<el-select
|
||||
v-model="queryParams.company_type"
|
||||
placeholder="公司类型"
|
||||
clearable
|
||||
@change="changeType"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in typeList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<!-- <el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_type"
|
||||
clearable
|
||||
placeholder="请输入公司类型"
|
||||
/> -->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||
<el-table-column label="公司名称" property="company_name" />
|
||||
<el-table-column label="公司类型" property="company_type">
|
||||
<template #default="{ row }">
|
||||
<span
|
||||
>{{typeList.find((item: any)=>item.id==row.company_type).name}}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="区县" property="area_name" />
|
||||
<el-table-column label="乡镇" property="street_name" />
|
||||
<el-table-column label="主联系人" property="master_name" />
|
||||
<el-table-column label="联系方式" property="master_phone" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="companyLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import {
|
||||
apiCompanyLists,
|
||||
companyListTwo,
|
||||
apiCompanyDelete,
|
||||
getContractPartyACompanyTypeList,
|
||||
} from "@/api/company";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import { defineEmits } from "vue";
|
||||
|
||||
// 当前类型
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
companyTypeList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// 可选公司类型
|
||||
const typeList = ref([]);
|
||||
dictDataLists({
|
||||
type_id: 6,
|
||||
}).then((res) => {
|
||||
typeList.value = res.lists;
|
||||
});
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
level_two: "",
|
||||
level_one: "",
|
||||
company_name: "",
|
||||
organization_code: "",
|
||||
city: "",
|
||||
area: "",
|
||||
street: "",
|
||||
company_type: "",
|
||||
master_name: "",
|
||||
master_position: "",
|
||||
master_phone: "",
|
||||
master_email: "",
|
||||
other_contacts: "",
|
||||
area_manager: "",
|
||||
is_contract: "",
|
||||
account: "",
|
||||
password: "",
|
||||
deposit: "",
|
||||
deposit_time: "",
|
||||
qualification: "",
|
||||
status: "",
|
||||
});
|
||||
|
||||
if (props.type) queryParams.company_type = props.type;
|
||||
|
||||
// 选中数据
|
||||
const emits = defineEmits(["customEvent"]);
|
||||
|
||||
// 选中数据子父传递
|
||||
const handleCurrentChange = (value: any) => {
|
||||
emits("customEvent", value);
|
||||
};
|
||||
|
||||
// 选择公司类型
|
||||
const changeType = (e: any) => {
|
||||
getLists();
|
||||
};
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: companyListTwo,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists();
|
||||
</script>
|
651
src/views/consumer/lists/edit.vue
Normal file
651
src/views/consumer/lists/edit.vue
Normal file
@ -0,0 +1,651 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-page-header content="新增用户" @back="$router.back()" />
|
||||
</el-card>
|
||||
<el-card class="mt-4 !border-none" shadow="never">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="rules"
|
||||
label-width="84px"
|
||||
>
|
||||
<div style="font-size: 1.2rem; margin: 10px 0">基本信息创建</div>
|
||||
<div class="headimg">
|
||||
<el-upload
|
||||
v-model="formData.avatar"
|
||||
class="avatar-uploader-head"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessAvatar"
|
||||
>
|
||||
<img v-if="formData.avatar" :src="formData.avatar" class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</div>
|
||||
<el-col class="pt-6 !border-none">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="公司" prop="company_name">
|
||||
<el-input
|
||||
v-model="formData.company_name"
|
||||
placeholder="请选择公司"
|
||||
readonly
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
@click="showCompany = true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-form-item label="角色" prop="group_id">
|
||||
<el-select
|
||||
v-model="formData.group_id"
|
||||
placeholder="请选择角色"
|
||||
readonly
|
||||
:style="{ width: '100%' }"
|
||||
@change="formRef?.clearValidate(['group_id'])"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in roleList"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="姓名" prop="nickname">
|
||||
<el-input
|
||||
v-model="formData.nickname"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-form-item label="性别" >
|
||||
<el-select
|
||||
v-model="formData.sex"
|
||||
placeholder="请选择性别"
|
||||
:style="{ width: '100%' }"
|
||||
@change="formRef?.clearValidate(['sex'])"
|
||||
>
|
||||
<el-option label="男" :value="1" />
|
||||
<el-option label="女" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="身份证号" >
|
||||
<el-input
|
||||
v-model="formData.id_card"
|
||||
placeholder="请输入身份证号"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-form-item label="联系电话" prop="account">
|
||||
<el-input
|
||||
v-model="formData.account"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="省" prop="province">
|
||||
<el-select
|
||||
v-model="formData.province_name"
|
||||
placeholder="请选择省"
|
||||
:disabled="flag"
|
||||
clearable
|
||||
@change="province_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.provinceOptions"
|
||||
:key="index"
|
||||
:label="item.province_name"
|
||||
:value="item.province_code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="市" prop="city">
|
||||
<el-select
|
||||
v-model="formData.city_name"
|
||||
placeholder="请选择市"
|
||||
clearable
|
||||
:disabled="flag"
|
||||
@change="city_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.cityOptions"
|
||||
:key="index"
|
||||
:label="item.city_name"
|
||||
:value="item.city_code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="区县" prop="area">
|
||||
<el-select
|
||||
v-model="formData.area_name"
|
||||
placeholder="请选择区县"
|
||||
:disabled="flag"
|
||||
clearable
|
||||
@change="area_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.areaOptions"
|
||||
:key="index"
|
||||
:label="item.area_name"
|
||||
:value="item.area_code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
v-if="formData.street_name"
|
||||
label="乡镇"
|
||||
prop="street"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.street_name"
|
||||
placeholder="请选择乡镇"
|
||||
:disabled="flag"
|
||||
clearable
|
||||
@change="street_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.streetOptions"
|
||||
:key="index"
|
||||
:label="item.street_name"
|
||||
:value="item.street_code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="formData.village_name"
|
||||
label="村社"
|
||||
prop="village"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.village_name"
|
||||
:disabled="flag"
|
||||
placeholder="请输入村社"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="formData.brigade_name"
|
||||
label="小队"
|
||||
prop="brigade"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.brigade_name"
|
||||
:disabled="flag"
|
||||
placeholder="请输入小队"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
<div style="font-size: 1.2rem; margin: 10px 0">资质信息</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<el-form-item label="身份证" >
|
||||
<el-upload
|
||||
v-model="formData.qualification.id_card"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessIdA"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.id_card"
|
||||
:src="formData.qualification.id_card"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
v-model="formData.qualification.id_card_b"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessIdB"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.id_card_b"
|
||||
:src="formData.qualification.id_card_b"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<el-form-item label="银行卡" >
|
||||
<el-upload
|
||||
v-model="formData.qualification.bank_account"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessBankA"
|
||||
:before-upload="beforeAvatarUpload_three"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.bank_account"
|
||||
:src="formData.qualification.bank_account"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
v-model="formData.qualification.bank_account_b"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessBankB"
|
||||
:before-upload="beforeAvatarUpload_three"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.bank_account_b"
|
||||
:src="formData.qualification.bank_account_b"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-form-item label="行驶证" prop="car_card">
|
||||
<el-upload
|
||||
v-model="formData.qualification.car_card"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarA"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.car_card"
|
||||
:src="formData.qualification.car_card"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
v-model="formData.qualification.car_card_b"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarB"
|
||||
:before-upload="beforeAvatarUpload_two"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.car_card_b"
|
||||
:src="formData.qualification.car_card_b"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-button type="primary" @click="submit">创建</el-button>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-dialog v-model="showCompany">
|
||||
<DialogIndex
|
||||
:companyTypeList="datas.dictTypeLists"
|
||||
:type="41"
|
||||
@customEvent="customEvent"
|
||||
></DialogIndex>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="consumerDetail">
|
||||
import {
|
||||
type FormInstance,
|
||||
type UploadProps,
|
||||
ElMessage,
|
||||
type UploadUserFile,
|
||||
} from "element-plus";
|
||||
import {
|
||||
upContact,
|
||||
userAdd,
|
||||
getRolelist,
|
||||
getCompanyList,
|
||||
} from "@/api/consumer";
|
||||
import {
|
||||
apiCityList,
|
||||
apiAreaList,
|
||||
apiStreetList,
|
||||
apiProvinceList,
|
||||
} from "@/api/common";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import { isEmpty } from "@/utils/util";
|
||||
import AccountAdjust from "../components/account-adjust.vue";
|
||||
import useMultipleTabs from "@/hooks/useMultipleTabs";
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import feedback from "@/utils/feedback";
|
||||
import DialogIndex from "./dialog_index.vue";
|
||||
import { inject } from "vue";
|
||||
const base_url: any = inject("base_url");
|
||||
const { removeTab } = useMultipleTabs();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const flag = ref(true);
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
sex: "",
|
||||
id_card: "",
|
||||
nickname: "",
|
||||
group_id: "",
|
||||
company_id: "",
|
||||
company_name: "",
|
||||
province: "",
|
||||
city: "",
|
||||
area: "",
|
||||
street: "",
|
||||
village: "",
|
||||
brigade: "",
|
||||
province_name: "",
|
||||
city_name: "",
|
||||
area_name: "",
|
||||
street_name: "",
|
||||
village_name: "",
|
||||
brigade_name: "",
|
||||
address: "",
|
||||
account: "",
|
||||
qualification: {
|
||||
id_card: "",
|
||||
id_card_b: "",
|
||||
car_card: "",
|
||||
car_card_b: "",
|
||||
bank_account: "",
|
||||
bank_account_b: "",
|
||||
},
|
||||
avatar: "",
|
||||
multipoint_login: 1,
|
||||
});
|
||||
|
||||
const rules = ref({
|
||||
company_name: [{ required: true, message: "请选择公司", trigger: "blur" }],
|
||||
group_id: [{ required: true, message: "请选择角色", trigger: "blur" }],
|
||||
nickname: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||
account: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
|
||||
|
||||
});
|
||||
|
||||
// 字典信息
|
||||
const datas: any = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
streetOptions: [],
|
||||
dictTypeLists: [],
|
||||
contract_type: [],
|
||||
contract: [],
|
||||
});
|
||||
|
||||
const showCompany = ref(false);
|
||||
const customEvent = (e: any) => {
|
||||
formData.company_id = e.id;
|
||||
formData.company_name = e.company_name;
|
||||
formData.province = e.province;
|
||||
formData.city = e.city;
|
||||
formData.area = e.area;
|
||||
formData.street = e.street;
|
||||
formData.village = e.village;
|
||||
formData.brigade = e.brigade;
|
||||
formData.province_name = e.province_name;
|
||||
formData.city_name = e.city_name;
|
||||
formData.area_name = e.area_name;
|
||||
formData.street_name = e.street_name;
|
||||
formData.village_name = e.village_name;
|
||||
formData.brigade_name = e.brigade_name;
|
||||
formRef.value?.clearValidate(["company_name"]);
|
||||
showCompany.value = false;
|
||||
};
|
||||
|
||||
// 角色列表
|
||||
const roleList = ref([]);
|
||||
getRolelist({}).then((res: any) => {
|
||||
roleList.value = res;
|
||||
});
|
||||
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const isEdit = ref(false);
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const fileList = ref<UploadUserFile[]>([]);
|
||||
// 图片上传成功返回的url
|
||||
const handleAvatarSuccessIdA: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.qualification.id_card = response.data.uri;
|
||||
};
|
||||
const handleAvatarSuccessAvatar: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.avatar = response.data.uri;
|
||||
};
|
||||
const handleAvatarSuccessIdB: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.qualification.id_card_b = response.data.uri;
|
||||
};
|
||||
const handleAvatarSuccessCarA: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.qualification.car_card = response.data.uri;
|
||||
};
|
||||
const handleAvatarSuccessCarB: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.qualification.car_card_b = response.data.uri;
|
||||
};
|
||||
const beforeAvatarUpload_two: UploadProps["beforeUpload"] = (rawFile) => {
|
||||
return true;
|
||||
};
|
||||
const handleAvatarSuccessBankA: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.qualification.bank_account = response.data.uri;
|
||||
};
|
||||
const handleAvatarSuccessBankB: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.qualification.bank_account_b = response.data.uri;
|
||||
};
|
||||
const handleAvatarSuccess_four: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.file = response.data.uri;
|
||||
upContact({ file: formData.file, id: route.query.mdoeid }).then((res) => [
|
||||
(mode.value = false),
|
||||
]);
|
||||
};
|
||||
const beforeAvatarUpload_three: UploadProps["beforeUpload"] = (rawFile) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
//获取省份
|
||||
function province_change(value: string) {
|
||||
getCityList();
|
||||
}
|
||||
function city_change(value: string) {
|
||||
getAreaList();
|
||||
}
|
||||
function area_change(value: string) {
|
||||
getStreetList();
|
||||
}
|
||||
function street_change(value: string) {
|
||||
formData.street = value;
|
||||
}
|
||||
const getProvinceList = async () => {
|
||||
const data = await apiProvinceList({});
|
||||
datas["provinceOptions"] = data;
|
||||
};
|
||||
const getCityList = async () => {
|
||||
const data = await apiCityList({ city: formData.province });
|
||||
datas["cityOptions"] = data;
|
||||
};
|
||||
const getAreaList = async () => {
|
||||
const data = await apiAreaList({ area: formData.city });
|
||||
datas["areaOptions"] = data;
|
||||
};
|
||||
const getStreetList = async () => {
|
||||
const data = await apiStreetList({ street: formData.area });
|
||||
datas["streetOptions"] = data;
|
||||
};
|
||||
|
||||
getProvinceList();
|
||||
|
||||
// 创建用户
|
||||
const submit = () => {
|
||||
formRef.value?.validate((e) => {
|
||||
if (e) {
|
||||
|
||||
userAdd(formData).then(() => {
|
||||
ElMessage.success("添加成功");
|
||||
router.back();
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.headimg {
|
||||
margin-top: 24px;
|
||||
width: 115px;
|
||||
height: 138px;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-uploader-head .el-upload {
|
||||
width: 115px;
|
||||
height: 138px;
|
||||
background-color: #fff;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload {
|
||||
width: 9.9vw;
|
||||
height: 6.3vw;
|
||||
background-color: #fff;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.el-icon.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
@ -25,6 +25,19 @@
|
||||
:params="queryParams"
|
||||
:page-size="pager.size"
|
||||
/>
|
||||
<el-button
|
||||
v-perms="['user.user/edit']"
|
||||
class="ml-2.5"
|
||||
type="primary"
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('user.user/edit'),
|
||||
}"
|
||||
>
|
||||
创建
|
||||
</router-link>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
@ -186,7 +186,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
@ -229,13 +229,13 @@ import {
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import { generateGontract, sendMsgApi } from "@/api/company";
|
||||
import { generateGontract, sendMsgApi,userGontract } from "@/api/company";
|
||||
const route = useRoute();
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
const datalist = ref([]);
|
||||
|
||||
let isIndividual=false
|
||||
//弹窗
|
||||
const showPop = ref(false);
|
||||
const showConctactPop = ref(false);
|
||||
@ -248,16 +248,29 @@ const showCreateConctPop = (row: any) => {
|
||||
(showConctactPop.value = true),
|
||||
(contract_id.value = row.id),
|
||||
(party_b_id.value = row.party_b);
|
||||
if(row.contract_type==22){
|
||||
isIndividual=true
|
||||
}
|
||||
};
|
||||
const offPop = () => {
|
||||
showPop.value = false;
|
||||
showConctactPop.value = false;
|
||||
};
|
||||
const creContct = async () => {
|
||||
|
||||
|
||||
if(isIndividual){
|
||||
await userGontract({
|
||||
id: party_b_id.value,
|
||||
contract_id: contract_id.value,
|
||||
});
|
||||
}else{
|
||||
await generateGontract({
|
||||
id: party_b_id.value,
|
||||
contract_id: contract_id.value,
|
||||
});
|
||||
}
|
||||
isIndividual=false
|
||||
getLists();
|
||||
offPop();
|
||||
};
|
||||
|
@ -99,15 +99,15 @@
|
||||
<el-col :span="24" class="el-card pt-6" v-if="formData.cars_info">
|
||||
<div class="tit">租赁信息</div>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-row v-for="(item,index) in formData.cars_info" :key="index">
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="120px" label="车牌号"><el-input v-model="formData.cars_info.license"
|
||||
<el-form-item label-width="120px" label="车牌号"><el-input v-model="item.license"
|
||||
placeholder="请输入车牌号" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="120px" label="车辆类型">
|
||||
<el-input v-model="formData.type" placeholder="请输入车辆类型" clearable
|
||||
<el-input v-model="item.type" placeholder="请输入车辆类型" clearable
|
||||
:style="{ width: '100%' }"></el-input></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -117,7 +117,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="120px" label="签约时间">
|
||||
<el-input v-model="formData.update_time" placeholder="请输入签约时间" clearable
|
||||
<el-input v-model="item.rent_time" placeholder="请输入签约时间" clearable
|
||||
:style="{ width: '100%' }"></el-input></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -127,9 +127,9 @@
|
||||
<!-- 小组公司申请车辆 -->
|
||||
<!-- {{ formData.contract_logistic_id }}
|
||||
{{ formData.type }} -->
|
||||
<div v-if="formData.contract_logistic_id && formData.type == '租赁车辆'" class="el-card pt-6">
|
||||
|
||||
<div v-if="formData.contract_logistic_id && formData.type == 0 && formData.status==0" class="el-card pt-6">
|
||||
<div class="tit">租赁信息</div>
|
||||
|
||||
<div style="padding: 0 2vw">
|
||||
<el-checkbox-group :max="formData.num" v-model="checkList" @change="handChangeFn">
|
||||
<el-checkbox :label="item.license" v-for="(item, index) in formData.car_list" :key="index" />
|
||||
@ -176,10 +176,16 @@ const formData = reactive({
|
||||
company_b_code: "",
|
||||
company_b_email: "@service.ebaoquan.org",
|
||||
num: "",
|
||||
cars_info: {
|
||||
cars_info:
|
||||
[
|
||||
{
|
||||
id: "",
|
||||
license: "",
|
||||
},
|
||||
type:"",
|
||||
rent_time:""
|
||||
}
|
||||
]
|
||||
,
|
||||
car_list: [],
|
||||
type: 0,
|
||||
status: 0,
|
||||
@ -204,6 +210,11 @@ const handChangeFn = (e) => {
|
||||
});
|
||||
});
|
||||
};
|
||||
const typeFn=(type)=>{
|
||||
if(type==0)return"租赁车辆"
|
||||
if(type==1)return"自有车辆"
|
||||
if(type==2)return"购买车辆"
|
||||
}
|
||||
const test = () => {
|
||||
window.open(formData.file, "_blank");
|
||||
};
|
||||
@ -211,7 +222,10 @@ leaseContractDetail({ id: route.query.id }).then((res) => {
|
||||
for (let key in formData) {
|
||||
formData[key] = res[key];
|
||||
}
|
||||
formData.type ? (formData.type = "自有车辆") : (formData.type = "租赁车辆");
|
||||
// formData.type ? (formData.type = "自有车辆") : (formData.type = "租赁车辆");
|
||||
formData.cars_info.forEach(item=>{
|
||||
item.type=typeFn(item.type)
|
||||
})
|
||||
});
|
||||
|
||||
const handleAvatarSuccess_three = (response, uploadFile) => {
|
||||
|
@ -52,7 +52,7 @@
|
||||
}">审核</router-link>
|
||||
</el-button>
|
||||
<el-button type="primary" link v-perms="['contract.contract/wind_control']"
|
||||
v-if="row.status > 0">
|
||||
v-if="row.status > 0 ||row.status==-1">
|
||||
<router-link :to="{
|
||||
path: 'vehicle_detail',
|
||||
query: {
|
||||
@ -60,7 +60,7 @@
|
||||
},
|
||||
}">详情</router-link>
|
||||
</el-button>
|
||||
<el-button v-if="row.status == 1 && row.contract_logistic_id != 0" type="primary" link
|
||||
<el-button v-if="row.status == 1 " type="primary" link
|
||||
@click="sendContractPopFn(row.id)">发送合同</el-button>
|
||||
<el-button v-if="row.status == 2" :disabled="row.nums > 0" @click="sendAgaintPopFn(row.id)" link
|
||||
type="primary">重新发送{{ row.nums ? row.nums + "s" : "" }}</el-button>
|
||||
@ -71,26 +71,34 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-model="showPop" @close="offPop">
|
||||
<h1>重要提醒</h1>
|
||||
<div class="content" v-if="!sendAgainPop">
|
||||
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
||||
</div>
|
||||
<div class="content" v-else>
|
||||
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
|
||||
</div>
|
||||
<p class="btn_menu">
|
||||
<el-button type="primary" size="large" v-if="!sendAgainPop" @click="sendContractFn">确认</el-button>
|
||||
<el-button type="primary" size="large" v-else @click="sendAgain">重新发送</el-button>
|
||||
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||
</p>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<el-dialog v-model="showPop" @close="offPop">
|
||||
<h1>重要提醒</h1>
|
||||
<div class="content" v-if="!sendAgainPop">
|
||||
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
||||
</div>
|
||||
<div class="content" v-else>
|
||||
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
|
||||
</div>
|
||||
<p class="btn_menu">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
v-if="!sendAgainPop"
|
||||
@click="sendContractFn"
|
||||
>确认</el-button
|
||||
>
|
||||
<el-button type="primary" size="large" v-else @click="sendAgain"
|
||||
>重新发送</el-button
|
||||
>
|
||||
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||
</p>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowTypeLists">
|
||||
@ -107,78 +115,81 @@ var contractId = 0;
|
||||
const showPop = ref(false);
|
||||
const sendAgainPop = ref(false);
|
||||
const sendAgain = () => {
|
||||
sendMsg({ id: contractId }).then((res) => {
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === contractId;
|
||||
});
|
||||
index.value = inde;
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
sendMsg({ id: contractId }).then((res) => {
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === contractId;
|
||||
});
|
||||
(sendAgainPop.value = true), (index.value = inde);
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
});
|
||||
};
|
||||
const timeFn = (i: number) => {
|
||||
const timers = setInterval(() => {
|
||||
pager.lists[i].nums--;
|
||||
if (pager.lists[i].nums <= 0) {
|
||||
clearInterval(timers);
|
||||
}
|
||||
}, 1000);
|
||||
const timers = setInterval(() => {
|
||||
pager.lists[i].nums--;
|
||||
if (pager.lists[i].nums <= 0) {
|
||||
clearInterval(timers);
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
const sendContractPopFn = (id: number) => {
|
||||
(showPop.value = true), (sendAgainPop.value = true), (contractId = id);
|
||||
(showPop.value = true), (sendAgainPop.value = false), (contractId = id);
|
||||
};
|
||||
const sendAgaintPopFn = (id: number) => {
|
||||
(showPop.value = true), (contractId = id);
|
||||
(showPop.value = true), (contractId = id);
|
||||
};
|
||||
const sendContractFn = () => {
|
||||
sendContract({ id: contractId }).then((res) => {
|
||||
feedback.msgSuccess("发送成功");
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === contractId;
|
||||
});
|
||||
index.value = inde;
|
||||
showPop.value = false;
|
||||
pager.lists[index.value].status = 2;
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
sendContract({ id: contractId }).then((res) => {
|
||||
feedback.msgSuccess("发送成功");
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === contractId;
|
||||
});
|
||||
index.value = inde;
|
||||
showPop.value = false;
|
||||
pager.lists[index.value].status = 2;
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
});
|
||||
};
|
||||
|
||||
const offPop = () => {
|
||||
showPop.value = false;
|
||||
// showConctactPop.value = false;
|
||||
showPop.value = false;
|
||||
// showConctactPop.value = false;
|
||||
};
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_name: "",
|
||||
contract_no: "",
|
||||
status: "",
|
||||
company_name: "",
|
||||
contract_no: "",
|
||||
status: "",
|
||||
});
|
||||
const statusFn = (status: number) => {
|
||||
switch (status) {
|
||||
case 0:
|
||||
return { tit: "待上传", color: "rgb(238, 190, 119)" };
|
||||
case 1:
|
||||
return { tit: "已上传", color: "rgb(103, 194, 58)" };
|
||||
case 2:
|
||||
return { tit: "签约中", color: "red" };
|
||||
case 3:
|
||||
return { tit: "已签约", color: "rgb(103, 194, 58)" };
|
||||
// default:
|
||||
// return { tit: "审核通过", color: "green" };
|
||||
switch (status) {
|
||||
case -1:{
|
||||
return { tit: "待审核", color: "black" }
|
||||
}
|
||||
case 0:
|
||||
return { tit: "待上传", color: "rgb(238, 190, 119)" };
|
||||
case 1:
|
||||
return { tit: "已上传", color: "rgb(103, 194, 58)" };
|
||||
case 2:
|
||||
return { tit: "签约中", color: "red" };
|
||||
case 3:
|
||||
return { tit: "已签约", color: "rgb(103, 194, 58)" };
|
||||
// default:
|
||||
// return { tit: "审核通过", color: "green" };
|
||||
}
|
||||
};
|
||||
const typeFn = (status: number) => {
|
||||
switch (status) {
|
||||
case 0:
|
||||
return "租赁合同";
|
||||
|
||||
case 1:
|
||||
return "自由车辆合同";
|
||||
|
||||
return "自有车辆合同";
|
||||
case 2:
|
||||
return "解除合同";
|
||||
case 3:
|
||||
return "购买合同";
|
||||
default:
|
||||
}
|
||||
};
|
||||
@ -187,47 +198,47 @@ const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData("");
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: leaseContractList,
|
||||
params: queryParams,
|
||||
fetchFun: leaseContractList,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists();
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.btn {
|
||||
position: absolute;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: red;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: red;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.info {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.btn_menu {
|
||||
margin-top: 10vh;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 10vh;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
</style>
|
||||
|
176
src/views/create_taskTemplate/edit.vue
Normal file
176
src/views/create_taskTemplate/edit.vue
Normal file
@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="主题" prop="title">
|
||||
<el-input v-model="formData.title" clearable placeholder="请输入主题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="admin_id">
|
||||
<el-input v-model="formData.admin_id" clearable placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务角色" prop="task_role_id">
|
||||
<el-select class="flex-1" v-model="formData.task_role_id" clearable placeholder="请选择任务角色">
|
||||
<el-option
|
||||
v-for="(item, index) in dictData.create_task_template_select_role"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="parseInt(item.value)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="type">
|
||||
<el-input v-model="formData.type" clearable placeholder="请输入任务类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="一阶天数" prop="stage_day_one">
|
||||
<el-input v-model="formData.stage_day_one" clearable placeholder="请输入一阶天数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="第一阶段金额" prop="money">
|
||||
<el-input v-model="formData.money" clearable placeholder="请输入第一阶段金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="一阶比例" prop="proportion_one">
|
||||
<el-input v-model="formData.proportion_one" clearable placeholder="请输入一阶比例" />
|
||||
</el-form-item>
|
||||
<el-form-item label="二阶天数" prop="stage_day_two">
|
||||
<el-input v-model="formData.stage_day_two" clearable placeholder="请输入二阶天数 0代表无天数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="二阶比例" prop="proportion_two">
|
||||
<el-input v-model="formData.proportion_two" clearable placeholder="请输入二阶比例" />
|
||||
</el-form-item>
|
||||
<el-form-item label="二阶段金额" prop="money_two">
|
||||
<el-input v-model="formData.money_two" clearable placeholder="请输入二阶段金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="三阶段天数" prop="stage_day_three">
|
||||
<el-input v-model="formData.stage_day_three" clearable placeholder="请输入三阶段天数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="三阶段金额" prop="new_money_three">
|
||||
<el-input v-model="formData.new_money_three" clearable placeholder="请输入三阶段金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="长期金额" prop="money_longtime">
|
||||
<el-input v-model="formData.money_longtime" clearable placeholder="请输入长期金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="阶段类型" prop="types">
|
||||
<el-input v-model="formData.types" clearable placeholder="请输入1循环2长期3单次" />
|
||||
</el-form-item>
|
||||
<el-form-item label="扩展字段" prop="extend">
|
||||
<el-input v-model="formData.extend" clearable placeholder="请输入扩展字段" />
|
||||
</el-form-item>
|
||||
<el-form-item label="充值金额" prop="recharge">
|
||||
<el-input v-model="formData.recharge" clearable placeholder="请输入充值金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务描述" prop="content">
|
||||
<el-input v-model="formData.content" clearable placeholder="请输入任务描述" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="createTaskTemplateEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCreateTaskTemplateAdd, apiCreateTaskTemplateEdit, apiCreateTaskTemplateDetail } from '@/api/create_task_template'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑任务创建模板' : '新增任务创建模板'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
title: '',
|
||||
admin_id: '',
|
||||
task_role_id: '',
|
||||
type: '',
|
||||
stage_day_one: '',
|
||||
money: '',
|
||||
proportion_one: '',
|
||||
stage_day_two: '',
|
||||
proportion_two: '',
|
||||
money_two: '',
|
||||
stage_day_three: '',
|
||||
new_money_three: '',
|
||||
money_longtime: '',
|
||||
types: '',
|
||||
extend: '',
|
||||
recharge: '',
|
||||
content: '',
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCreateTaskTemplateDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiCreateTaskTemplateEdit(data)
|
||||
: await apiCreateTaskTemplateAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
160
src/views/create_taskTemplate/index.vue
Normal file
160
src/views/create_taskTemplate/index.vue
Normal file
@ -0,0 +1,160 @@
|
||||
<!-- <template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px]"
|
||||
:model="queryParams"
|
||||
inline
|
||||
>
|
||||
<el-form-item label="主题" prop="title">
|
||||
<el-input class="w-[280px]" v-model="queryParams.title" clearable placeholder="请输入主题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务角色">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option
|
||||
v-for="(item, index) in dictData.create_task_template_select_role"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="type">
|
||||
<el-input class="w-[280px]" v-model="queryParams.type" clearable placeholder="请输入任务类型" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['create_task_template.create_task_template/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['create_task_template.create_task_template/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="主题" prop="title" show-overflow-tooltip />
|
||||
<el-table-column label="创建人" prop="admin_id" show-overflow-tooltip />
|
||||
<el-table-column label="任务角色" prop="task_role_id">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.create_task_template_select_role" :value="row.task_role_id" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务类型" prop="type" show-overflow-tooltip />
|
||||
<el-table-column label="一阶天数" prop="stage_day_one" show-overflow-tooltip />
|
||||
<el-table-column label="第一阶段金额" prop="money" show-overflow-tooltip />
|
||||
<el-table-column label="一阶比例" prop="proportion_one" show-overflow-tooltip />
|
||||
<el-table-column label="二阶天数" prop="stage_day_two" show-overflow-tooltip />
|
||||
<el-table-column label="二阶比例" prop="proportion_two" show-overflow-tooltip />
|
||||
<el-table-column label="二阶段金额" prop="money_two" show-overflow-tooltip />
|
||||
<el-table-column label="三阶段天数" prop="stage_day_three" show-overflow-tooltip />
|
||||
<el-table-column label="三阶段金额" prop="new_money_three" show-overflow-tooltip />
|
||||
<el-table-column label="长期金额" prop="money_longtime" show-overflow-tooltip />
|
||||
<el-table-column label="阶段类型" prop="types" show-overflow-tooltip />
|
||||
<el-table-column label="扩展字段" prop="extend" show-overflow-tooltip />
|
||||
<el-table-column label="充值金额" prop="recharge" show-overflow-tooltip />
|
||||
<el-table-column label="任务描述" prop="content" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['create_task_template.create_task_template/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['create_task_template.create_task_template/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="createTaskTemplateLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiCreateTaskTemplateLists, apiCreateTaskTemplateDelete } from '@/api/create_task_template'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
title: '',
|
||||
task_role_id: '',
|
||||
type: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('create_task_template_select_role')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiCreateTaskTemplateLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiCreateTaskTemplateDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
-->
|
326
src/views/examined/components/audit_other.vue
Normal file
326
src/views/examined/components/audit_other.vue
Normal file
@ -0,0 +1,326 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="800px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
:button="mode == 'edit'"
|
||||
:clickModalClose="mode == 'details'"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="ID" prop="id">
|
||||
<el-input readonly v-model="formData.id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务名称" prop="task.title">
|
||||
<el-input readonly v-model="formData.task.title" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务金额" prop="task.money">
|
||||
<el-input readonly v-model="formData.task.money" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="company_name">
|
||||
<el-input readonly v-model="formData.company_name" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="任务描述" prop="task.content">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="formData.task.content"
|
||||
clearable
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务提交时间" prop="id">
|
||||
<el-input readonly v-model="formData.task.update_time" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="片区经理" prop="flow_cate">
|
||||
<el-input readonly v-model="formData.area_manager" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider />
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="详情描述" prop="remark">
|
||||
<el-input
|
||||
readonly
|
||||
:value="formData.task?.extend?.other?.note"
|
||||
clearable
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="图片附件">
|
||||
<el-image
|
||||
class="attachment"
|
||||
v-for="(item, index) in formData.task?.extend?.other?.annex"
|
||||
:key="index"
|
||||
:src="item"
|
||||
:preview-src-list="formData.task?.extend?.other?.annex"
|
||||
:initial-index="index"
|
||||
fit="cover"
|
||||
></el-image>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="视频附件">
|
||||
<video
|
||||
class="video"
|
||||
:src="item"
|
||||
v-for="(item, index) in formData.task?.extend?.other
|
||||
?.video_annex"
|
||||
:key="index"
|
||||
controls
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider />
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="">
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
v-for="(activity, index) in activities"
|
||||
:key="index"
|
||||
:type="activity.type"
|
||||
:hollow="activity.hollow"
|
||||
:timestamp="activity.timestamp"
|
||||
>
|
||||
{{ activity.content }}
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="审核"
|
||||
prop="check_status"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-radio-group
|
||||
:disabled="mode == 'details'"
|
||||
v-model="formData.check_status"
|
||||
>
|
||||
<el-radio :label="2">通过</el-radio>
|
||||
<el-radio :label="3">驳回</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-row v-if="showInput.includes(formData.type)">
|
||||
<el-col>
|
||||
<el-form-item label="政策补贴金额" prop="amount" v-if="formData.type==6">
|
||||
<el-input
|
||||
:readonly="mode == 'details'"
|
||||
v-model="formData.amount"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="InputTit" prop="amount" v-else>
|
||||
<el-input
|
||||
:readonly="mode == 'details'"
|
||||
v-model="formData.amount"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
:readonly="mode == 'details'"
|
||||
v-model="formData.remark"
|
||||
clearable
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowEdit">
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import { apiApproveAudit } from "@/api/examined";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const isCompany = ref(false);
|
||||
const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
const showInput=reactive([7,6,8])
|
||||
const InputTit=ref("销售金额")
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == "edit" ? "审核" : "详情";
|
||||
});
|
||||
|
||||
const activities = ref([
|
||||
{
|
||||
content: "任务完成",
|
||||
timestamp: "2023-8-28 13:30:00",
|
||||
},
|
||||
{
|
||||
content: "张三三审核",
|
||||
timestamp: "2023-8-28 13:30:00",
|
||||
},
|
||||
{
|
||||
content: "李思思审核",
|
||||
timestamp: "2023-8-28 13:30:00",
|
||||
type: "primary",
|
||||
hollow: true,
|
||||
},
|
||||
]);
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
task: {},
|
||||
company_name: "",
|
||||
area_manager: "",
|
||||
check_status: 1,
|
||||
remark: "",
|
||||
amount:"",
|
||||
type:-1
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
check_status: [
|
||||
{
|
||||
required: true,
|
||||
validator: (rules: any, value: any, callback: any) => {
|
||||
if (value != 2 && value != 3) callback("请选择审核状态");
|
||||
else callback();
|
||||
},
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
// remark: [
|
||||
// {
|
||||
// required: false,
|
||||
// validator: (rules: any, value: any, callback: any) => {
|
||||
// if (formData.check_status == 3) callback("请填写备注");
|
||||
// else callback();
|
||||
// },
|
||||
// trigger: ["blur"],
|
||||
// },
|
||||
// ],
|
||||
});
|
||||
function customEvent(data: any) {
|
||||
isCompany.value = false;
|
||||
}
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
// let res = await apiFlowDetil(data.id);
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
// const data = await apiFlowDetail({
|
||||
// id: row.id,
|
||||
// });
|
||||
// setFormData(data);
|
||||
};
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
if (formData.check_status == 3 && formData.remark == "")
|
||||
return ElMessage.error("驳回必须填写备注");
|
||||
if(showInput.includes(formData.type) ){
|
||||
await apiApproveAudit({
|
||||
id: formData.id,
|
||||
check_status: formData.check_status,
|
||||
remark: formData.remark,
|
||||
amount:formData.amount
|
||||
});
|
||||
}else{
|
||||
await apiApproveAudit({
|
||||
id: formData.id,
|
||||
check_status: formData.check_status,
|
||||
remark: formData.remark,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit("close");
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-timeline-item__wrapper) {
|
||||
top: -8px !important;
|
||||
}
|
||||
.attachment {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
/* background-color: red; */
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.video {
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
/* background-color: red; */
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
311
src/views/examined/components/audit_town_market.vue
Normal file
311
src/views/examined/components/audit_town_market.vue
Normal file
@ -0,0 +1,311 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="800px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
:button="mode == 'edit'"
|
||||
:clickModalClose="mode == 'details'"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="ID" prop="id">
|
||||
<el-input readonly v-model="formData.id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务名称" prop="task.title">
|
||||
<el-input readonly v-model="formData.task.title" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务金额" prop="task.money">
|
||||
<el-input readonly v-model="formData.task.money" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="company_name">
|
||||
<el-input readonly v-model="formData.company_name" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="任务描述" prop="task.content">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="formData.task.content"
|
||||
clearable
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务提交时间" prop="id">
|
||||
<el-input readonly v-model="formData.task.update_time" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="片区经理" prop="flow_cate">
|
||||
<el-input readonly v-model="formData.area_manager" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider />
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="补充说明" prop="remark">
|
||||
<el-input
|
||||
readonly
|
||||
:value="taskExtend.remark"
|
||||
clearable
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="完成证明">
|
||||
<el-image
|
||||
class="attachment"
|
||||
v-for="(item, index) in taskExtend.file"
|
||||
:key="index"
|
||||
:src="item"
|
||||
:preview-src-list="taskExtend.file"
|
||||
:initial-index="index"
|
||||
fit="cover"
|
||||
></el-image>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider />
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="">
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
v-for="(activity, index) in activities"
|
||||
:key="index"
|
||||
:type="activity.type"
|
||||
:hollow="activity.hollow"
|
||||
:timestamp="activity.timestamp"
|
||||
>
|
||||
{{ activity.content }}
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="审核"
|
||||
prop="check_status"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-radio-group
|
||||
:disabled="mode == 'details'"
|
||||
v-model="formData.check_status"
|
||||
>
|
||||
<el-radio :label="2">通过</el-radio>
|
||||
<el-radio :label="3">驳回</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
:readonly="mode == 'details'"
|
||||
v-model="formData.remark"
|
||||
clearable
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowEdit">
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import { apiApproveAudit } from "@/api/examined";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const isCompany = ref(false);
|
||||
const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == "edit" ? "审核" : "详情";
|
||||
});
|
||||
|
||||
const activities = ref([
|
||||
{
|
||||
content: "任务完成",
|
||||
timestamp: "2023-8-28 13:30:00",
|
||||
},
|
||||
{
|
||||
content: "张三三审核",
|
||||
timestamp: "2023-8-28 13:30:00",
|
||||
},
|
||||
{
|
||||
content: "李思思审核",
|
||||
timestamp: "2023-8-28 13:30:00",
|
||||
type: "primary",
|
||||
hollow: true,
|
||||
},
|
||||
]);
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
task: {
|
||||
extend: [],
|
||||
},
|
||||
company_name: "",
|
||||
area_manager: "",
|
||||
check_status: 1,
|
||||
remark: "",
|
||||
});
|
||||
|
||||
const taskExtend = reactive({
|
||||
remark: "",
|
||||
file: [],
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
check_status: [
|
||||
{
|
||||
required: true,
|
||||
validator: (rules: any, value: any, callback: any) => {
|
||||
if (value != 2 && value != 3) callback("请选择审核状态");
|
||||
else callback();
|
||||
},
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
// remark: [
|
||||
// {
|
||||
// required: false,
|
||||
// validator: (rules: any, value: any, callback: any) => {
|
||||
// if (formData.check_status == 3) callback("请填写备注");
|
||||
// else callback();
|
||||
// },
|
||||
// trigger: ["blur"],
|
||||
// },
|
||||
// ],
|
||||
});
|
||||
function customEvent(data: any) {
|
||||
isCompany.value = false;
|
||||
}
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
// let res = await apiFlowDetil(data.id);
|
||||
if (typeof data.extend == "string") data.extend = JSON.parse(data.extend);
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
if (formData.task?.extend?.stage) {
|
||||
switch (+formData.task.extend.stage) {
|
||||
case 1:
|
||||
setTaskExtend(formData.task.extend.stage1);
|
||||
break;
|
||||
case 2:
|
||||
setTaskExtend(formData.task.extend.stage2);
|
||||
break;
|
||||
case 3:
|
||||
setTaskExtend(formData.task.extend.stage3);
|
||||
break;
|
||||
case 4:
|
||||
setTaskExtend(formData.task.extend.stage4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const setTaskExtend = (data: any) => {
|
||||
Object.keys(taskExtend).forEach((key: string) => {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
taskExtend[key] = data[key];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
// const data = await apiFlowDetail({
|
||||
// id: row.id,
|
||||
// });
|
||||
// setFormData(data);
|
||||
};
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
if (formData.check_status == 3 && formData.remark == "")
|
||||
return ElMessage.error("驳回必须填写备注");
|
||||
await apiApproveAudit({
|
||||
id: formData.id,
|
||||
check_status: formData.check_status,
|
||||
remark: formData.remark,
|
||||
});
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit("close");
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-timeline-item__wrapper) {
|
||||
top: -8px !important;
|
||||
}
|
||||
.attachment {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
/* background-color: red; */
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.video {
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
/* background-color: red; */
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
@ -112,13 +112,20 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup
|
||||
v-if="showEdit"
|
||||
ref="editRef"
|
||||
<audit-other-popup
|
||||
v-if="showEdit && showAuditOther"
|
||||
ref="auditOtherRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
<audit-town-market-popup
|
||||
v-else-if="showEdit && openType == 4"
|
||||
ref="auditTownMarketRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
@ -132,17 +139,23 @@ import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiApproveList } from "@/api/examined";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./index_list_popup.vue";
|
||||
import auditOtherPopup from "./components/audit_other.vue";
|
||||
import auditTownMarketPopup from "./components/audit_town_market.vue";
|
||||
import { getTaskApproveTypeList } from "@/api/setting/dict";
|
||||
import { show } from "dom7";
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
const auditOtherRef = shallowRef<InstanceType<typeof auditOtherPopup>>();
|
||||
const auditTownMarketRef =
|
||||
shallowRef<InstanceType<typeof auditTownMarketPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
const openType = ref(1);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
name: "",
|
||||
check_status: "",
|
||||
type: 1,
|
||||
type: "1,4",
|
||||
});
|
||||
|
||||
const checkStatusList = ref([
|
||||
@ -160,6 +173,12 @@ const checkStatusList = ref([
|
||||
},
|
||||
]);
|
||||
|
||||
// 显示默认审批界面的类型
|
||||
const showAuditTypeList = ref([1, 5, 6,7,8,9]);
|
||||
const showAuditOther = computed(() => {
|
||||
return showAuditTypeList.value.includes(openType.value);
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
@ -181,15 +200,24 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("add");
|
||||
auditOtherRef.value?.open("add");
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any, type = "edit") => {
|
||||
|
||||
console.log(data.type)
|
||||
|
||||
openType.value = data.type;
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open(type);
|
||||
editRef.value?.setFormData(data);
|
||||
if (showAuditOther.value) {
|
||||
auditOtherRef.value?.open(type);
|
||||
auditOtherRef.value?.setFormData(data);
|
||||
} else if (data.type == 4) {
|
||||
auditTownMarketRef.value?.open(type);
|
||||
auditTownMarketRef.value?.setFormData(data);
|
||||
}
|
||||
};
|
||||
|
||||
// 删除
|
||||
@ -199,6 +227,9 @@ const handleEdit = async (data: any, type = "edit") => {
|
||||
// getLists();
|
||||
// };
|
||||
|
||||
getLists();
|
||||
getTaskApproveTypeList().then((res) => {
|
||||
queryParams.type = res.join(",");
|
||||
getLists();
|
||||
});
|
||||
</script>
|
||||
|
@ -64,7 +64,7 @@
|
||||
<el-form-item label="详情描述" prop="remark">
|
||||
<el-input
|
||||
readonly
|
||||
:value="formData.task?.extend.other.note"
|
||||
:value="formData.task?.extend?.other?.note"
|
||||
clearable
|
||||
type="textarea"
|
||||
/>
|
||||
@ -74,10 +74,10 @@
|
||||
<el-form-item label="图片附件">
|
||||
<el-image
|
||||
class="attachment"
|
||||
v-for="(item, index) in formData.task.extend.other.annex"
|
||||
v-for="(item, index) in formData.task?.extend?.other?.annex"
|
||||
:key="index"
|
||||
:src="item"
|
||||
:preview-src-list="formData.task.extend.other.annex"
|
||||
:preview-src-list="formData.task?.extend?.other?.annex"
|
||||
:initial-index="index"
|
||||
fit="cover"
|
||||
></el-image>
|
||||
@ -88,7 +88,8 @@
|
||||
<video
|
||||
class="video"
|
||||
:src="item"
|
||||
v-for="(item, index) in formData.task.extend.other.video_annex"
|
||||
v-for="(item, index) in formData.task?.extend?.other
|
||||
?.video_annex"
|
||||
:key="index"
|
||||
controls
|
||||
/>
|
||||
@ -117,6 +118,7 @@
|
||||
prop="check_status"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
|
||||
>
|
||||
<el-radio-group
|
||||
:disabled="mode == 'details'"
|
||||
|
273
src/views/examined/store_application.vue
Normal file
273
src/views/examined/store_application.vue
Normal file
@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<!-- <el-form-item label="店铺名称" prop="name">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.name"
|
||||
clearable
|
||||
placeholder="请输入店铺名称"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="审批类型" prop="name">
|
||||
<el-select
|
||||
v-model="queryParams.type"
|
||||
placeholder="请选择审批类型"
|
||||
clearable
|
||||
class="w-[280px]"
|
||||
@select="getLists"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in typeList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="name">
|
||||
<el-select
|
||||
v-model="queryParams.check_status"
|
||||
placeholder="请选择审核状态"
|
||||
clearable
|
||||
class="w-[280px]"
|
||||
@select="getLists"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in checkStatusList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="ID" prop="id" />
|
||||
<el-table-column
|
||||
label="店铺名称"
|
||||
prop="extend.company_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="店铺类型"
|
||||
prop="extend.type_name"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="商户分类"
|
||||
prop="extend.category_name"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.type == 2" style="color: #4a5dff">{{
|
||||
row.name
|
||||
}}</span>
|
||||
<span v-else-if="row.type == 3" style="color: #67c23a">{{
|
||||
row.name
|
||||
}}</span>
|
||||
<span v-else>{{ row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="申请时间"
|
||||
prop="create_time"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="公司名称"
|
||||
prop="company_name"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="片区经理"
|
||||
prop="area_manager"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核状态"
|
||||
prop="check_status"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.check_status == 3" style="color: #f56c6c"
|
||||
>未通过</span
|
||||
>
|
||||
<span v-if="row.check_status == 2" style="color: #67c23a"
|
||||
>已通过</span
|
||||
>
|
||||
<span v-if="row.check_status == 1" style="color: #e6a23c"
|
||||
>待审核</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.check_status <= 1"
|
||||
v-perms="['flow/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row, 'edit')"
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row, 'details')"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<audit-other-popup
|
||||
v-if="showEdit && showAuditOther"
|
||||
ref="auditOtherRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
<audit-town-market-popup
|
||||
v-else-if="showEdit && openType == 4"
|
||||
ref="auditTownMarketRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiApproveList2 } from "@/api/examined";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import auditOtherPopup from "./components/audit_other.vue";
|
||||
import auditTownMarketPopup from "./components/audit_town_market.vue";
|
||||
import { watch } from "vue";
|
||||
import { extend } from "lodash-es";
|
||||
|
||||
const auditOtherRef = shallowRef<InstanceType<typeof auditOtherPopup>>();
|
||||
const auditTownMarketRef =
|
||||
shallowRef<InstanceType<typeof auditTownMarketPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
const openType = ref(1);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
name: "",
|
||||
check_status: "",
|
||||
type: "2,3",
|
||||
});
|
||||
|
||||
const typeList = ref([
|
||||
{
|
||||
id: "2,3",
|
||||
name: "全部",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "商户入驻审批",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
name: "开通交易审批",
|
||||
},
|
||||
]);
|
||||
|
||||
const checkStatusList = ref([
|
||||
{
|
||||
id: 1,
|
||||
name: "待审核",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "已通过",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "未通过",
|
||||
},
|
||||
]);
|
||||
|
||||
// 显示默认审批界面的类型
|
||||
const showAuditTypeList = ref([1, 5, 6]);
|
||||
const showAuditOther = computed(() => {
|
||||
return showAuditTypeList.value.includes(openType.value);
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiApproveList2,
|
||||
params: queryParams,
|
||||
json: "extend",
|
||||
});
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
auditOtherRef.value?.open("add");
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any, type = "edit") => {
|
||||
openType.value = data.type;
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
if (showAuditOther) {
|
||||
auditOtherRef.value?.open(type);
|
||||
auditOtherRef.value?.setFormData(data);
|
||||
} else if (data.type == 4) {
|
||||
auditTownMarketRef.value?.open(type);
|
||||
auditTownMarketRef.value?.setFormData(data);
|
||||
}
|
||||
};
|
||||
|
||||
// 删除
|
||||
// const handleDelete = async (id: number | any[]) => {
|
||||
// await feedback.confirm("确定要删除?");
|
||||
// await apiFlowDelete({ id });
|
||||
// getLists();
|
||||
// };
|
||||
|
||||
getLists();
|
||||
</script>
|
||||
|
@ -88,6 +88,7 @@
|
||||
:on-success="handleFile"
|
||||
:on-exceed="handleExceed"
|
||||
:before-upload="beforeUpload"
|
||||
:before-remove="removeFile"
|
||||
ref="upload"
|
||||
>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
@ -111,7 +112,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="withdrawEdit">
|
||||
import type { FormInstance, UploadRawFile } from "element-plus";
|
||||
import type {
|
||||
FormInstance,
|
||||
UploadRawFile,
|
||||
UploadFile,
|
||||
UploadFiles,
|
||||
} from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import {
|
||||
apiWithdrawAdd,
|
||||
@ -243,6 +249,11 @@ const handleExceed = (files: any) => {
|
||||
upload.value!.submit();
|
||||
};
|
||||
|
||||
const removeFile = (uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
||||
formData.voucher = "";
|
||||
return true;
|
||||
};
|
||||
|
||||
// 上传文件
|
||||
const handleFile = (e: any) => {
|
||||
if (e.code == 0 && e.show == 1) {
|
||||
|
@ -82,11 +82,11 @@
|
||||
/>
|
||||
<el-table-column
|
||||
label="公司收益"
|
||||
prop="deposit"
|
||||
prop="company_money"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span class="text-success">{{ row.deposit }}</span>
|
||||
<span class="text-success">{{ row.company_money }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="区县" prop="area" show-overflow-tooltip />
|
||||
|
290
src/views/finance/component/voucher.vue
Normal file
290
src/views/finance/component/voucher.vue
Normal file
@ -0,0 +1,290 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="580px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="120px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form-item label="甲方公司名称">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="partyA.company_name"
|
||||
clearable
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="甲方对公账号">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="partyA.qualification.corporate_account"
|
||||
clearable
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="formData.company_name"
|
||||
clearable
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主要联系人" prop="master_name">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="formData.master_name"
|
||||
clearable
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="master_phone">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="formData.master_phone"
|
||||
clearable
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="押金金额" prop="deposit">
|
||||
<el-input
|
||||
v-model="formData.deposit"
|
||||
type="number"
|
||||
:maxlength="10"
|
||||
clearable
|
||||
placeholder="请输入押金金额"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传凭证" prop="voucher">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
style="width: 100%"
|
||||
drag
|
||||
:accept="fileTypeList.join(', ')"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="actionUrl"
|
||||
:limit="1"
|
||||
:on-success="handleFile"
|
||||
:on-exceed="handleExceed"
|
||||
:before-upload="beforeUpload"
|
||||
:before-remove="removeFile"
|
||||
:on-preview="onPreview"
|
||||
ref="upload"
|
||||
>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">文件拖入或点击上传</div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">请上传JPG/JPEG/PNG/GIF/PDF文件</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="withdrawEdit">
|
||||
import type {
|
||||
FormInstance,
|
||||
UploadRawFile,
|
||||
UploadFile,
|
||||
UploadFiles,
|
||||
} from "element-plus";
|
||||
import { genFileId } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import { getPartyAbyCompanyId } from "@/api/company";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
import { depositRechargeTransferVoucher } from "@/api/company.ts";
|
||||
import { inject } from "vue";
|
||||
const base_url: any = inject("base_url");
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { rules } from "@/views/channel/wx_oa/menu_com/useMenuOa";
|
||||
const userStore = useUserStore();
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return "凭证录入";
|
||||
});
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
company_name: "",
|
||||
master_name: "",
|
||||
master_phone: "",
|
||||
deposit: "", // 钱
|
||||
voucher: "", // 凭证
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
deposit: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入押金金额",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
voucher: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传凭证",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// 文件选择
|
||||
const upload = ref(null);
|
||||
// 文件上传地址
|
||||
const actionUrl = ref("");
|
||||
const fileTypeList = [
|
||||
"application/pdf",
|
||||
"image/jpeg",
|
||||
"image/gif",
|
||||
"image/png",
|
||||
];
|
||||
// 限制上传类型
|
||||
const beforeUpload = (rawFile: UploadRawFile) => {
|
||||
if (!fileTypeList.includes(rawFile.type)) {
|
||||
ElMessage.error("请上传JPG/JPEG/PNG/GIF/PDF文件");
|
||||
return false;
|
||||
}
|
||||
if (rawFile.type != "application/pdf") {
|
||||
actionUrl.value = base_url + "/upload/image";
|
||||
} else {
|
||||
actionUrl.value = base_url + "/upload/file";
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const handleExceed = (files: any) => {
|
||||
upload.value!.clearFiles();
|
||||
const file = files[0] as UploadRawFile;
|
||||
file.uid = genFileId();
|
||||
upload.value!.handleStart(file);
|
||||
upload.value!.submit();
|
||||
};
|
||||
|
||||
const removeFile = (uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
||||
formData.voucher = "";
|
||||
return true;
|
||||
};
|
||||
|
||||
const onPreview = (event: any) => {
|
||||
if (event?.response?.data?.uri) openTransfer(event?.response?.data?.uri);
|
||||
else ElMessage("文件错误");
|
||||
};
|
||||
|
||||
// 查看凭证
|
||||
const openTransfer = (uri: any) => {
|
||||
window.open(uri);
|
||||
};
|
||||
|
||||
// 上传文件
|
||||
const handleFile = (e: any) => {
|
||||
if (e.code == 0 && e.show == 1) {
|
||||
formData.voucher = "";
|
||||
upload.value!.clearFiles();
|
||||
return ElMessage.error(e.msg || "上传失败");
|
||||
}
|
||||
formData.voucher = e.data.uri;
|
||||
};
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
let obj = {
|
||||
id: "",
|
||||
company_name: "",
|
||||
master_name: "",
|
||||
master_phone: "",
|
||||
};
|
||||
for (const key in obj) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
getDetail();
|
||||
};
|
||||
|
||||
// 甲方公司信息
|
||||
const partyA = reactive({
|
||||
company_name: "",
|
||||
qualification: {
|
||||
corporate_account: "",
|
||||
},
|
||||
});
|
||||
const getDetail = async () => {
|
||||
getPartyAbyCompanyId({
|
||||
company_id: formData.id,
|
||||
}).then((data) => {
|
||||
partyA["company_name"] = data["company_name"];
|
||||
if (typeof data.qualification == "string") {
|
||||
data.qualification = JSON.parse(data.qualification);
|
||||
partyA.qualification.corporate_account =
|
||||
data.qualification.corporate_account;
|
||||
} else {
|
||||
partyA.qualification.corporate_account =
|
||||
data.qualification.corporate_account;
|
||||
}
|
||||
if (!partyA.qualification.corporate_account) {
|
||||
ElMessage.error("甲方公司没有对公账号,请补充账号后再试");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (!partyA.company_name) return ElMessage.error("甲方公司不可为空");
|
||||
if (!partyA.qualification.corporate_account)
|
||||
return ElMessage.error("甲方公司对公账户不可为空");
|
||||
if (!formData.id) return ElMessage.error("请先选择公司");
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
await depositRechargeTransferVoucher({
|
||||
company_id: data.id,
|
||||
deposit: data.deposit,
|
||||
voucher: data.voucher,
|
||||
});
|
||||
ElMessage.success("录入成功");
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit("close");
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
});
|
||||
</script>
|
||||
|
253
src/views/finance/deposit.vue
Normal file
253
src/views/finance/deposit.vue
Normal file
@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px] formdata" :model="queryParams" inline>
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_name"
|
||||
clearable
|
||||
placeholder="请输入公司名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区" prop="area" v-show="company_type_show">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.area"
|
||||
clearable
|
||||
placeholder="请输入区"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="镇" prop="street" v-show="company_type_show">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.street"
|
||||
clearable
|
||||
placeholder="请输入镇"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="公司类型"
|
||||
prop="company_type"
|
||||
v-show="company_type_show"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.company_type"
|
||||
placeholder="请选择公司类型"
|
||||
clearable
|
||||
class="w-[280px]"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.dictTypeLists"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="片区经理" prop="area_manager">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.area_manager"
|
||||
clearable
|
||||
placeholder="请输入片区经理"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
label="ID"
|
||||
prop="id"
|
||||
show-overflow-tooltip
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
label="公司名称"
|
||||
prop="company_name"
|
||||
width="300"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="公司类型"
|
||||
prop="company_type"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="押金" prop="deposit" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span class="text-success">{{ row.deposit }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="区县" prop="area" show-overflow-tooltip />
|
||||
<el-table-column label="乡镇" prop="street" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
label="主联系人"
|
||||
prop="master_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="联系方式"
|
||||
prop="master_phone"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="片区经理"
|
||||
prop="area_manager"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="200"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex">
|
||||
<el-button type="primary" link @click="handleEdit(row)">
|
||||
凭证录入
|
||||
</el-button>
|
||||
<el-button type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('finance.depositList'),
|
||||
query: {
|
||||
company_id: row.id,
|
||||
},
|
||||
}"
|
||||
>凭证列表</router-link
|
||||
>
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<edit-popup
|
||||
v-if="showEdit"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="financeCompanyLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { apiCompanyLists } from "@/api/company";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import { getRoutePath } from "@/router";
|
||||
import { dictContractTypeList } from "@/utils/dict.ts";
|
||||
import EditPopup from "./component/voucher.vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
// console.log(userStore.userInfo.company_id);
|
||||
const route = useRoute();
|
||||
const company_type_show = ref(true);
|
||||
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
const editRef = ref(null);
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
|
||||
// 创建合同与发送短信结束
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_name: "",
|
||||
area: "",
|
||||
street: "",
|
||||
company_type: "",
|
||||
area_manager: "",
|
||||
// 是否签约
|
||||
is_contract: "",
|
||||
});
|
||||
|
||||
if (route.query.company_type) {
|
||||
company_type_show.value = false;
|
||||
queryParams["company_type"] = route.query.company_type?.toString() || "";
|
||||
}
|
||||
|
||||
const datas = reactive({
|
||||
dictTypeLists: [],
|
||||
});
|
||||
const getdictTypeLists = async () => {
|
||||
const data = await dictDataLists({ type_id: 6 });
|
||||
datas["dictTypeLists"] = data["lists"];
|
||||
};
|
||||
getdictTypeLists();
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiCompanyLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists();
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.btn {
|
||||
position: absolute;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: red;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.info {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.btn_menu {
|
||||
margin-top: 10vh;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.formdata {
|
||||
.el-form-item {
|
||||
width: 20%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
215
src/views/finance/depositList.vue
Normal file
215
src/views/finance/depositList.vue
Normal file
@ -0,0 +1,215 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px] formdata" :model="queryParams" inline>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card> -->
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button type="primary" @click="handleEdit(company_info)"
|
||||
>添加凭证</el-button
|
||||
>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
label="ID"
|
||||
prop="id"
|
||||
show-overflow-tooltip
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
label="公司名称"
|
||||
prop="company_name"
|
||||
width="300"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<span>{{ company_info.company_name }}</span>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="充值金额"
|
||||
prop="deposit"
|
||||
width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="凭证地址"
|
||||
prop="voucher"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
width="200"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
prop="update_time"
|
||||
width="200"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="100"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="openTransfer(row.voucher)"
|
||||
>
|
||||
查看凭证
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<edit-popup
|
||||
v-if="showEdit"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="financeCompanyLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import {
|
||||
apiCompanyLists,
|
||||
apiCompanyDetail,
|
||||
getDepositRechargeTransferVoucherList,
|
||||
} from "@/api/company";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import { getRoutePath } from "@/router";
|
||||
import { dictContractTypeList } from "@/utils/dict.ts";
|
||||
import EditPopup from "./component/voucher.vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
// console.log(userStore.userInfo.company_id);
|
||||
const route = useRoute();
|
||||
|
||||
// 是否显示添加框
|
||||
const showEdit = ref(false);
|
||||
const editRef = ref(null);
|
||||
// 添加
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
|
||||
const company_info = reactive({
|
||||
id: "",
|
||||
company_name: "",
|
||||
master_name: "",
|
||||
master_phone: "",
|
||||
});
|
||||
|
||||
const getCompanyInfo = () => {
|
||||
apiCompanyDetail({ id: queryParams.company_id }).then((data) => {
|
||||
for (const key in company_info) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
company_info[key] = data[key];
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 查看凭证
|
||||
const openTransfer = (uri: any) => {
|
||||
window.open(uri);
|
||||
};
|
||||
|
||||
// 创建合同与发送短信结束
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_id: "",
|
||||
});
|
||||
|
||||
if (route.query.company_id) {
|
||||
queryParams["company_id"] = route.query.company_id;
|
||||
getCompanyInfo();
|
||||
}
|
||||
|
||||
const datas = reactive({
|
||||
dictTypeLists: [],
|
||||
});
|
||||
const getdictTypeLists = async () => {
|
||||
const data = await dictDataLists({ type_id: 6 });
|
||||
datas["dictTypeLists"] = data["lists"];
|
||||
};
|
||||
getdictTypeLists();
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: getDepositRechargeTransferVoucherList,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists();
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.btn {
|
||||
position: absolute;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: red;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.info {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.btn_menu {
|
||||
margin-top: 10vh;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.formdata {
|
||||
.el-form-item {
|
||||
width: 20%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,126 +1,134 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
class="ls-form"
|
||||
ref="formRef"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
label-width="84px"
|
||||
>
|
||||
<el-form-item label="字典类型">
|
||||
<el-input
|
||||
:model-value="formData.type_value"
|
||||
placeholder="请输入字典类型"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入数据名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据值" prop="value">
|
||||
<el-input v-model="formData.value" placeholder="请输入数据值" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<div>
|
||||
<el-input-number v-model="formData.sort" :min="0" :max="9999" />
|
||||
<div class="form-tips">数值越大越排前</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" required prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="1">正常</el-radio>
|
||||
<el-radio :label="0">停用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="formData.remark"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 6 }"
|
||||
clearable
|
||||
maxlength="200"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
class="ls-form"
|
||||
ref="formRef"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
label-width="84px"
|
||||
>
|
||||
<el-form-item label="字典类型">
|
||||
<el-input
|
||||
:model-value="formData.type_value"
|
||||
placeholder="请输入字典类型"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据名称" prop="name">
|
||||
<el-input
|
||||
v-model="formData.name"
|
||||
placeholder="请输入数据名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据值" prop="value">
|
||||
<el-input
|
||||
v-model="formData.value"
|
||||
placeholder="请输入数据值"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<div>
|
||||
<el-input-number v-model="formData.sort" :min="0" :max="9999" />
|
||||
<div class="form-tips">数值越大越排前</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" required prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="1">正常</el-radio>
|
||||
<el-radio :label="0">停用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="formData.remark"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 6 }"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { dictDataAdd, dictDataEdit } from '@/api/setting/dict'
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import { dictDataAdd, dictDataEdit } from "@/api/setting/dict";
|
||||
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑字典数据' : '新增字典数据'
|
||||
})
|
||||
return mode.value == "edit" ? "编辑字典数据" : "新增字典数据";
|
||||
});
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
type_value: '',
|
||||
name: '',
|
||||
value: '',
|
||||
sort: 0,
|
||||
status: 1,
|
||||
remark: '',
|
||||
type_id: 0
|
||||
})
|
||||
id: "",
|
||||
type_value: "",
|
||||
name: "",
|
||||
value: "",
|
||||
sort: 0,
|
||||
status: 1,
|
||||
remark: "",
|
||||
type_id: 0,
|
||||
});
|
||||
|
||||
const rules = {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入数据名称',
|
||||
trigger: ['blur']
|
||||
}
|
||||
],
|
||||
value: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入数据值',
|
||||
trigger: ['blur']
|
||||
}
|
||||
]
|
||||
}
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入数据名称",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
value: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入数据值",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
mode.value == 'edit' ? await dictDataEdit(formData) : await dictDataAdd(formData)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
await formRef.value?.validate();
|
||||
mode.value == "edit"
|
||||
? await dictDataEdit(formData)
|
||||
: await dictDataAdd(formData);
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
emit("close");
|
||||
};
|
||||
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
||||
const setFormData = (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData
|
||||
})
|
||||
open,
|
||||
setFormData,
|
||||
});
|
||||
</script>
|
||||
|
222
src/views/shareholdingReview/components/audit_town_market.vue
Normal file
222
src/views/shareholdingReview/components/audit_town_market.vue
Normal file
@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="800px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
:button="mode == 'edit'"
|
||||
:clickModalClose="mode == 'details'"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="参股公司:">
|
||||
<div > {{ formData.company_b_name }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> <el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="被参股公司:">
|
||||
<div > {{ formData.company_a_name }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> <el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="金额:">
|
||||
<div > {{ taskExtend.amount }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="完成凭证:">
|
||||
<div v-if="taskExtend.file_type=='image'" >
|
||||
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="taskExtend.annex"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="[taskExtend.annex]"
|
||||
|
||||
fit="cover"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div style="cursor: pointer;color:blue" v-else @click="annexFn(taskExtend.annex)"> 查看凭证</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="审核"
|
||||
prop="check_status"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-radio-group
|
||||
:class="{disabled:mode == 'details'}"
|
||||
v-model="formData.check_status"
|
||||
>
|
||||
<el-radio :label="2">通过</el-radio>
|
||||
<el-radio :label="3">驳回</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
:readonly="mode == 'details'"
|
||||
v-model="formData.remark"
|
||||
clearable
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowEdit">
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import { apiApproveAudit } from "@/api/shareholdingReview";
|
||||
import type { PropType } from "vue";
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const isCompany = ref(false);
|
||||
const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == "edit" ? "审核" : "详情";
|
||||
});
|
||||
const annexFn=(href:string)=>{
|
||||
window.open(href, '_blank')
|
||||
}
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
check_status: 1,
|
||||
remark: "",
|
||||
company_a_name:"",
|
||||
company_b_name:"",
|
||||
});
|
||||
|
||||
const taskExtend = reactive({
|
||||
amount: "",
|
||||
annex: "",
|
||||
file_type:"",
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
check_status: [
|
||||
{
|
||||
required: true,
|
||||
validator: (rules: any, value: any, callback: any) => {
|
||||
if (value != 2 && value != 3) callback("请选择审核状态");
|
||||
else callback();
|
||||
},
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
});
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
|
||||
|
||||
// console.log(data)
|
||||
// return
|
||||
|
||||
formData.id=data.id
|
||||
for ( let key in taskExtend){
|
||||
//@ts-ignore
|
||||
taskExtend[key]=JSON.parse(data.extend)[key]
|
||||
}
|
||||
formData.company_a_name=data.company_a_name
|
||||
formData.company_b_name=data.company_b_name
|
||||
if(mode.value=='details'){
|
||||
formData.check_status=data.check_status
|
||||
formData.remark=data.remark
|
||||
|
||||
}
|
||||
};
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
if (formData.check_status == 3 && formData.remark == "")
|
||||
return ElMessage.error("驳回必须填写备注");
|
||||
await apiApproveAudit({
|
||||
id: formData.id,
|
||||
check_status: formData.check_status,
|
||||
remark: formData.remark,
|
||||
});
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit("close");
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-timeline-item__wrapper) {
|
||||
top: -8px !important;
|
||||
}
|
||||
.attachment {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
/* background-color: red; */
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.video {
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
/* background-color: red; */
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.disabled{
|
||||
pointer-events: none;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
182
src/views/shareholdingReview/index.vue
Normal file
182
src/views/shareholdingReview/index.vue
Normal file
@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="任务名称" prop="name">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.name"
|
||||
clearable
|
||||
placeholder="请输入任务名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="name">
|
||||
<el-select
|
||||
v-model="queryParams.check_status"
|
||||
placeholder="请选择审核状态"
|
||||
clearable
|
||||
class="w-[280px]"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in checkStatusList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" >
|
||||
<el-table-column label="ID" width="100" prop="id" />
|
||||
<el-table-column
|
||||
label="参股公司"
|
||||
prop="company_b_name"
|
||||
width="500"
|
||||
|
||||
show-overflow-tooltip
|
||||
align="center"
|
||||
|
||||
/>
|
||||
<el-table-column
|
||||
label="被参股公司"
|
||||
prop="company_a_name"
|
||||
show-overflow-tooltip
|
||||
width="500"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="参股金额"
|
||||
prop="amount"
|
||||
show-overflow-tooltip
|
||||
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.check_status <= 1"
|
||||
v-perms="['flow/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row, 'edit')"
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row, 'details')"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<audit-town-market-popup
|
||||
v-if="showEdit "
|
||||
ref="auditTownMarketRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiApproveLists } from "@/api/shareholdingReview";
|
||||
import {getShareholderMoneyTaskApproveTypeList} from "@/api/setting/dict";
|
||||
import auditTownMarketPopup from "./components/audit_town_market.vue";
|
||||
|
||||
const auditTownMarketRef =
|
||||
shallowRef<InstanceType<typeof auditTownMarketPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
const openType = ref(1);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
name: "",
|
||||
check_status: "",
|
||||
type: "10",
|
||||
});
|
||||
getShareholderMoneyTaskApproveTypeList().then((res) => {
|
||||
queryParams.type = res.join(",");
|
||||
getLists();
|
||||
});
|
||||
const checkStatusList = ref([
|
||||
{
|
||||
id: 1,
|
||||
name: "待审核",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "已通过",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "未通过",
|
||||
},
|
||||
]);
|
||||
|
||||
// 显示默认审批界面的类型
|
||||
const showAuditTypeList = ref([1, 5, 6]);
|
||||
const showAuditOther = computed(() => {
|
||||
return showAuditTypeList.value.includes(openType.value);
|
||||
});
|
||||
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
//@ts-ignore
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiApproveLists,
|
||||
params: queryParams,
|
||||
});
|
||||
// 编辑
|
||||
const handleEdit = async (data: any, type = "edit") => {
|
||||
|
||||
console.log(data.type)
|
||||
|
||||
openType.value = data.type;
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
|
||||
auditTownMarketRef.value?.open(type);
|
||||
auditTownMarketRef.value?.setFormData(data);
|
||||
|
||||
};
|
||||
|
||||
// 删除
|
||||
// const handleDelete = async (id: number | any[]) => {
|
||||
// await feedback.confirm("确定要删除?");
|
||||
// await apiFlowDelete({ id });
|
||||
// getLists();
|
||||
// };
|
||||
|
||||
// getTaskApproveTypeList().then((res) => {
|
||||
// queryParams.type = res.join(",");
|
||||
// });
|
||||
|
||||
</script>
|
||||
|
151
src/views/task_template/dialog_commodity.vue
Normal file
151
src/views/task_template/dialog_commodity.vue
Normal file
@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="商品名称" prop="company_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.keyword" clearable placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品编号" prop="company_type">
|
||||
<el-input class="w-[280px]" v-model="queryParams.no" clearable placeholder="商品编号" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<!-- <el-card class="!border-none" v-loading="pager.loading" shadow="never"> -->
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table ref="tableRef" :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="ID" property="product_id" />
|
||||
<el-table-column label="图片" property="image">
|
||||
<template #default="{ row }">
|
||||
<el-image :src="row.image" style="width: 80px; height: 80px" fit="cover"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" property="store_name" />
|
||||
<el-table-column label="价格" property="price" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" :pageSizes="[10]" />
|
||||
</div>
|
||||
<div class="flex justify-end mt-2">
|
||||
<el-button type="primary" @click="handleCurrentChange(changeList)">确认</el-button>
|
||||
<el-button @click="commodityClose">取消</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="companyLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiGetProductList } from "@/api/task_template";
|
||||
import { defineEmits, computed, watch } from "vue";
|
||||
|
||||
const tableRef = ref(null);
|
||||
|
||||
// 当前类型
|
||||
const props = defineProps({
|
||||
ids: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
|
||||
let goods_id = props?.ids?.split(",") || [];
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
keyword: "",
|
||||
no: "",
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const emits = defineEmits(["customEvent", "close"]);
|
||||
|
||||
// 选中数据子父传递
|
||||
const handleCurrentChange = (value: any) => {
|
||||
let arr: any = [];
|
||||
value.forEach((item: any) => {
|
||||
arr = [...arr, ...item];
|
||||
});
|
||||
// return console.log(value, arr);
|
||||
emits("customEvent", arr);
|
||||
};
|
||||
|
||||
const changeList = ref([[]]);
|
||||
let count = 0;
|
||||
const handleSelectionChange = (value: any[]) => {
|
||||
// 在翻页时,上一页的数据会被清空, 不得已使用二维数组存取数据
|
||||
let index = pager.page ? pager.page - 1 : 0;
|
||||
// 同一页选择多个商品时, 每选择一次, 此方法都会被调用, 所以选择多个时此方法会被调用多次, 在翻页时会出现漏选, 使用此方法避免
|
||||
if (index != count && value.length < changeList.value[index].length) {
|
||||
console.log("加载中");
|
||||
} else {
|
||||
count = index;
|
||||
changeList.value[index] = JSON.parse(JSON.stringify(value));
|
||||
console.log("加载完成");
|
||||
}
|
||||
}; // 多选
|
||||
|
||||
const commodityClose = () => {
|
||||
emits("close", null);
|
||||
};
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiGetProductList,
|
||||
params: queryParams,
|
||||
size: 10,
|
||||
});
|
||||
|
||||
getLists().then(res=>{
|
||||
for(let i=0;i<Math.ceil(pager.count / pager.size)-1;i++){
|
||||
changeList.value.push([])
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 监听数据变化进行勾选
|
||||
watch(
|
||||
() => pager.lists,
|
||||
(n, o) => {
|
||||
// 进行勾选
|
||||
nextTick(() => {
|
||||
n.forEach((item: any) => {
|
||||
item.product_id += "";
|
||||
// console.log("过滤前", goods_id);
|
||||
let f_ids = new Set(); // 删除选中的id
|
||||
// 对选择过的列表进行回显
|
||||
if (goods_id.includes(item.product_id)) {
|
||||
let index = pager.page ? pager.page - 1 : 0;
|
||||
if (
|
||||
!changeList.value[index]?.find(
|
||||
(e: any) => e.product_id == item.product_id
|
||||
)
|
||||
) {
|
||||
f_ids.add(item.product_id);
|
||||
changeList.value[index]?.push(item);
|
||||
}
|
||||
}
|
||||
goods_id = goods_id.filter((item: string) => !f_ids.has(item)); // 已选择过的进行删除
|
||||
// console.log("长度", goods_id);
|
||||
// console.log("已选", changeList.value);
|
||||
// 把changeList列表中的所有值进行勾选
|
||||
changeList.value.forEach((c: any) => {
|
||||
c.forEach((e: any) => {
|
||||
if (e.product_id == item.product_id) {
|
||||
tableRef.value.toggleRowSelection(item, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
</script>
|
@ -289,8 +289,13 @@ const formData = reactive({
|
||||
if (route.query.id) {
|
||||
formData.task_scheduling = route.query.id;
|
||||
}
|
||||
|
||||
let type_value = "xxx"
|
||||
if(route.query.company_type == 18) {
|
||||
type_value = "task_type"
|
||||
}
|
||||
//任务类型接口
|
||||
apiTaskTypeList({ type_value: "task_type" }).then((res) => {
|
||||
apiTaskTypeList({ type_value: type_value}).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
});
|
||||
|
||||
|
@ -14,13 +14,31 @@
|
||||
label-width="120px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form-item label="任务角色" prop="extend.task_role">
|
||||
<el-select
|
||||
v-model="formData.extend.task_role"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请选择任务角色"
|
||||
@change="changeTaskRole"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in taskRoleRow"
|
||||
:key="item.key"
|
||||
:value="item.key"
|
||||
:label="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="type">
|
||||
<el-select
|
||||
v-model="formData.type"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请输入任务类型"
|
||||
placeholder="请选择任务类型"
|
||||
@change="changeTaskType"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in datalist"
|
||||
@ -31,12 +49,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="阶段类型" prop="types">
|
||||
<div>
|
||||
<div style="width: 100%">
|
||||
<el-select
|
||||
v-model="formData.types"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请输入阶段类型"
|
||||
placeholder="请选择阶段类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in [
|
||||
@ -57,6 +76,41 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="目标金额" prop="extend.target">
|
||||
<el-input
|
||||
v-model="formData.extend.target"
|
||||
clearable
|
||||
placeholder="请输入目标金额"
|
||||
type="number"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item> -->
|
||||
|
||||
|
||||
<el-form-item v-if="showCommodity" label="商品" prop="extend.goods_id">
|
||||
<!-- <el-input
|
||||
readonly
|
||||
:value="formData.extend.store_name"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
type="textarea"
|
||||
autosize
|
||||
>
|
||||
</el-input> -->
|
||||
<div style="width: 100%">{{ formData.extend.store_name }}</div>
|
||||
<el-button class="mt-2" type="primary" @click="openCommodity"
|
||||
>选择商品</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="showTarget" label="目标数" prop="extend.target">
|
||||
<el-input
|
||||
v-model="formData.extend.target"
|
||||
clearable
|
||||
placeholder="请输入目标数"
|
||||
type="number"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="一阶段天数">
|
||||
<el-input
|
||||
v-model="formData.stage_day_one"
|
||||
@ -77,7 +131,10 @@
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="二阶段天数">
|
||||
<el-form-item
|
||||
v-if="showTow && formData.type_value != 'town_task_type_5'"
|
||||
label="二阶段天数"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.stage_day_two"
|
||||
clearable
|
||||
@ -87,7 +144,10 @@
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="二阶段金额">
|
||||
<el-form-item
|
||||
v-if="showTow && formData.type_value != 'town_task_type_5'"
|
||||
label="二阶段金额"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.money_two"
|
||||
clearable
|
||||
@ -97,7 +157,10 @@
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="noThreefilter(+formData.type)" label="三阶段天数">
|
||||
<el-form-item
|
||||
v-if="showThree && noThreefilter(formData.type_value)"
|
||||
label="三阶段天数"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.stage_day_three"
|
||||
clearable
|
||||
@ -107,7 +170,10 @@
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="noThreefilter(+formData.type)" label="三阶段金额">
|
||||
<el-form-item
|
||||
v-if="showThree && noThreefilter(formData.type_value)"
|
||||
label="三阶段金额"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.new_money_three"
|
||||
clearable
|
||||
@ -154,6 +220,13 @@
|
||||
:company_id="formData.company_id"
|
||||
></personnelPopup>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialogCommodity">
|
||||
<dialogCommodity
|
||||
:ids="formData.extend.goods_id"
|
||||
@customEvent="customEventCommodity"
|
||||
@close="commodityClose"
|
||||
></dialogCommodity>
|
||||
</el-dialog>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
@ -172,6 +245,7 @@ import type { PropType } from "vue";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import taskMap from "./map.vue";
|
||||
import personnelPopup from "./dialog_index_personnel.vue";
|
||||
import dialogCommodity from "./dialog_commodity.vue";
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
@ -184,6 +258,12 @@ const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
const datalist = ref([]);
|
||||
const route = useRoute();
|
||||
const taskType = ref("town_task_type");
|
||||
const taskRoleRow = ref([
|
||||
{ key: 1, value: "负责人" },
|
||||
{ key: 2, value: "市场部长" },
|
||||
{ key: 3, value: "服务部长" },
|
||||
]);
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
@ -191,20 +271,26 @@ const popupTitle = computed(() => {
|
||||
});
|
||||
|
||||
// 没有三阶段的任务类型ID, 使用以下方法过滤
|
||||
const noThreeList = reactive([45, 48, 49]);
|
||||
const noThreefilter = (id: number) => {
|
||||
if (noThreeList.includes(id)) return false;
|
||||
const noThreeList = reactive([
|
||||
"town_task_type_2",
|
||||
"town_task_type_5",
|
||||
"town_task_type_6",
|
||||
]);
|
||||
const noThreefilter = (type: string) => {
|
||||
if (noThreeList.includes(type)) return false;
|
||||
else return true;
|
||||
};
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
// task_role: 1,
|
||||
task_scheduling: 0,
|
||||
company_id: "",
|
||||
title: "",
|
||||
admin_id: "",
|
||||
type: "", // 任务类型
|
||||
type_value: "",
|
||||
status: "",
|
||||
content: "",
|
||||
stage_day_one: 0,
|
||||
@ -219,28 +305,105 @@ const formData = reactive({
|
||||
task_admin_name: "", //任务负责人
|
||||
recharge: "",
|
||||
extend: {
|
||||
// origin: {
|
||||
// address: "",
|
||||
// lnglat: [],
|
||||
// }, //起点
|
||||
transfer: {
|
||||
address: "",
|
||||
lnglat: [],
|
||||
}, //中转
|
||||
terminus: {
|
||||
address: "",
|
||||
lnglat: [],
|
||||
}, //终点
|
||||
task_role: "", // 任务角色
|
||||
target: "", //目标数量
|
||||
goods_id: "", //商品id
|
||||
store_name: "", // 商品名字
|
||||
},
|
||||
});
|
||||
|
||||
if (route.query.id) {
|
||||
formData.task_scheduling = route.query.id;
|
||||
}
|
||||
//任务类型接口
|
||||
apiTaskTypeList({ type_value: "town_task_type" }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
// apiTaskTypeList({ type_value: taskType.value }).then((res) => {
|
||||
// datalist.value = res.lists;
|
||||
// });
|
||||
|
||||
// 显示指定商品的任务类型
|
||||
const showCommodityTypeList = [
|
||||
"town_task_type_marketing_director_9",
|
||||
"town_task_type_marketing_director_8",
|
||||
"town_task_type_marketing_director_5",
|
||||
"town_task_type_marketing_director_4",
|
||||
];
|
||||
const showCommodity = computed(() => {
|
||||
let flag = false;
|
||||
if (showCommodityTypeList.includes(formData.type_value)) flag = true;
|
||||
return flag;
|
||||
});
|
||||
|
||||
// 显示目标数的任务类型
|
||||
const showTargetTypeList = [
|
||||
"town_task_type_marketing_director_9",
|
||||
"town_task_type_marketing_director_8",
|
||||
"town_task_type_marketing_director_6",
|
||||
"town_task_type_marketing_director_5",
|
||||
"town_task_type_marketing_director_4",
|
||||
"town_task_type_marketing_director_3",
|
||||
"town_task_type_marketing_director_2",
|
||||
'town_task_type_master_3',
|
||||
"town_task_type_master_7"
|
||||
];
|
||||
const showTarget = computed(() => {
|
||||
let flag = false;
|
||||
if (showTargetTypeList.includes(formData.type_value)) flag = true;
|
||||
return flag;
|
||||
});
|
||||
|
||||
// 不显示第二阶段的任务类型
|
||||
const noShowTowTypeList = [
|
||||
"town_task_type_marketing_director_9",
|
||||
"town_task_type_marketing_director_8",
|
||||
"town_task_type_marketing_director_6",
|
||||
"town_task_type_marketing_director_2",
|
||||
"town_task_type_marketing_director_1",
|
||||
];
|
||||
const showTow = computed(() => {
|
||||
let flag = true;
|
||||
if (noShowTowTypeList.includes(formData.type_value)) flag = false;
|
||||
return flag;
|
||||
});
|
||||
|
||||
// 不显示第三阶段的任务类型
|
||||
const noShowThreeTypeList = [
|
||||
"town_task_type_marketing_director_9",
|
||||
"town_task_type_marketing_director_8",
|
||||
"town_task_type_marketing_director_7",
|
||||
"town_task_type_marketing_director_6",
|
||||
"town_task_type_marketing_director_3",
|
||||
"town_task_type_marketing_director_2",
|
||||
"town_task_type_marketing_director_1",
|
||||
];
|
||||
const showThree = computed(() => {
|
||||
let flag = true;
|
||||
if (noShowThreeTypeList.includes(formData.type_value)) flag = false;
|
||||
return flag;
|
||||
});
|
||||
|
||||
// 指定商品弹窗
|
||||
const showDialogCommodity = ref(false);
|
||||
const openCommodity = () => {
|
||||
showDialogCommodity.value = true;
|
||||
};
|
||||
|
||||
const customEventCommodity = (e: any) => {
|
||||
let id: string[] | number[] = [];
|
||||
let name: string[] = [];
|
||||
e.forEach((item: any) => {
|
||||
id.push(item.product_id);
|
||||
name.push(item.store_name);
|
||||
});
|
||||
formData.extend.goods_id = id.join(",");
|
||||
formData.extend.store_name = name.join(";");
|
||||
formRef.value?.clearValidate("extend.goods_id");
|
||||
showDialogCommodity.value = false;
|
||||
};
|
||||
|
||||
const commodityClose = () => {
|
||||
showDialogCommodity.value = false;
|
||||
};
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
title: [
|
||||
@ -250,6 +413,13 @@ const formRules = reactive<any>({
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
"extend.task_role": [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择任务角色",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
admin_id: [
|
||||
{
|
||||
required: true,
|
||||
@ -260,7 +430,7 @@ const formRules = reactive<any>({
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入任务类型",
|
||||
message: "请选择任务类型",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
@ -274,7 +444,7 @@ const formRules = reactive<any>({
|
||||
types: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入阶段类型",
|
||||
message: "请选择阶段类型",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
@ -296,24 +466,21 @@ const formRules = reactive<any>({
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
"extend.origin.address": [
|
||||
"extend.target": [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择中转点",
|
||||
// message: "请输入目标数",
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (value <= 0) callback(new Error("不能小于0"));
|
||||
else callback();
|
||||
},
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
"extend.transfer.address": [
|
||||
"extend.goods_id": [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择中转点",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
"extend.terminus.address": [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择终点",
|
||||
message: "请选择商品",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
@ -327,9 +494,14 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
if (formData.type == 32) {
|
||||
mapShow.value = true;
|
||||
if (typeof formData.extend.goods_id != "string") {
|
||||
formData.extend.goods_id = "";
|
||||
}
|
||||
if (formData.extend?.task_role) {
|
||||
formData.extend.task_role = +formData.extend.task_role;
|
||||
changeTaskRole(formData.extend.task_role);
|
||||
}
|
||||
console.log(formData)
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
@ -346,35 +518,37 @@ const mapRef = shallowRef<InstanceType<typeof taskMap>>();
|
||||
// 选择任务类型
|
||||
const changeTaskType = async (e: any) => {
|
||||
datalist.value.forEach((item: any) => {
|
||||
if (item.id == e) formData.title = item.name;
|
||||
if (item.id == e) {
|
||||
formData.title = item.name;
|
||||
formData.type_value = item.value;
|
||||
console.log(item.value,9999)
|
||||
// console.log(item.id, formData.type_value);
|
||||
}
|
||||
});
|
||||
if (e == 32) {
|
||||
mapShow.value = true; //为三轮车时
|
||||
// await nextTick();
|
||||
// mapRef.value?.open();
|
||||
}
|
||||
};
|
||||
|
||||
// 当前点击的地图类型(起,转,终)点
|
||||
const mapType = ref("");
|
||||
const changeMap = async (e: number) => {
|
||||
let map_title = "";
|
||||
switch (e) {
|
||||
case 0:
|
||||
mapType.value = "origin";
|
||||
map_title = "起点";
|
||||
break;
|
||||
case 1:
|
||||
mapType.value = "transfer";
|
||||
map_title = "中转点";
|
||||
break;
|
||||
case 2:
|
||||
mapType.value = "terminus";
|
||||
map_title = "终点";
|
||||
break;
|
||||
// 选择任务角色
|
||||
const changeTaskRole = async (e: any) => {
|
||||
// 负责人
|
||||
if (e == 1) {
|
||||
taskType.value = "town_task_type_master";
|
||||
}
|
||||
await nextTick();
|
||||
mapRef.value?.open(map_title);
|
||||
// 市场部长
|
||||
if (e == 2) {
|
||||
taskType.value = "town_task_type_marketing_director";
|
||||
}
|
||||
// 服务部长
|
||||
if (e == 3) {
|
||||
taskType.value = "town_task_type";
|
||||
}
|
||||
apiTaskTypeList({ type_value: taskType.value }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
datalist.value.forEach((item: any) => {
|
||||
if (item.id == formData.type) {
|
||||
formData.type_value = item.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const setMap = (e: any) => {
|
||||
@ -398,7 +572,6 @@ const clickTaskAdmin = async () => {
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
if (data.type != 32) data.extend = {}; // 不为三轮车任务时,过滤三轮车配置
|
||||
mode.value == "edit"
|
||||
? await apiTaskTemplateEdit(data)
|
||||
: await apiTaskTemplateAdd(data);
|
||||
@ -410,6 +583,11 @@ const handleSubmit = async () => {
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
// if (type == "edit") {
|
||||
// apiTaskTypeList({ type_value: taskType.value }).then((res) => {
|
||||
// datalist.value = res.lists;
|
||||
// });
|
||||
// }
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
|
492
src/views/task_template/edit_village.vue
Normal file
492
src/views/task_template/edit_village.vue
Normal file
@ -0,0 +1,492 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="120px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<!-- <el-form-item label="任务角色" prop="extend.task_role">
|
||||
<el-select
|
||||
v-model="formData.extend.task_role"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请选择任务角色"
|
||||
@change="changeTaskRole"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in taskRoleRow"
|
||||
:key="item.key"
|
||||
:value="item.key"
|
||||
:label="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="任务类型" prop="type">
|
||||
<el-select
|
||||
v-model="formData.type"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请选择任务类型"
|
||||
@change="changeTaskType"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in datalist"
|
||||
:key="item.label"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="阶段类型" prop="types">
|
||||
<div style="width: 100%">
|
||||
<el-select
|
||||
v-model="formData.types"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请选择阶段类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ label: 1, name: '循环' },
|
||||
{ label: 2, name: '长期' },
|
||||
{ label: 3, name: '单次' },
|
||||
]"
|
||||
:key="item.label"
|
||||
:value="item.label"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
<div
|
||||
v-if="formData.types == 3"
|
||||
style="color: #e6a23c; font-size: 12px"
|
||||
>
|
||||
提示 : 单次任务不会每日结算,而是按阶段合计天数结算
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="showTarget" label="目标数" prop="extend.target">
|
||||
<el-input
|
||||
v-model="formData.extend.target"
|
||||
clearable
|
||||
placeholder="请输入目标数"
|
||||
type="number"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="一阶段天数">
|
||||
<el-input
|
||||
v-model="formData.stage_day_one"
|
||||
clearable
|
||||
placeholder="请输入天数"
|
||||
type="number"
|
||||
>
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="一阶段金额">
|
||||
<el-input
|
||||
v-model="formData.money"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="showTow && formData.type_value != 'town_task_type_5'"
|
||||
label="二阶段天数"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.stage_day_two"
|
||||
clearable
|
||||
placeholder="请输入天数"
|
||||
type="number"
|
||||
>
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="showTow && formData.type_value != 'town_task_type_5'"
|
||||
label="二阶段金额"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.money_two"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="showThree" label="三阶段天数">
|
||||
<el-input
|
||||
v-model="formData.stage_day_three"
|
||||
clearable
|
||||
placeholder="请输入天数"
|
||||
type="number"
|
||||
>
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="showThree" label="三阶段金额">
|
||||
<el-input
|
||||
v-model="formData.new_money_three"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="长期金额" v-if="+formData.types == 2">
|
||||
<el-input
|
||||
v-model="formData.money_three"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="1">显示</el-radio>
|
||||
<el-radio :label="0">隐藏</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务描述" prop="content">
|
||||
<el-input
|
||||
v-model="formData.content"
|
||||
clearable
|
||||
placeholder="请输入任务描述"
|
||||
type="textarea"
|
||||
autosize
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-dialog
|
||||
v-model="personnelShow"
|
||||
ref="personnelRef"
|
||||
title="选择负责人"
|
||||
width="60%"
|
||||
>
|
||||
<personnelPopup
|
||||
@custom-event="changePersonner"
|
||||
:company_id="formData.company_id"
|
||||
></personnelPopup>
|
||||
</el-dialog>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="taskTemplateEdit">
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import {
|
||||
apiTaskTemplateAdd,
|
||||
apiTaskTemplateEdit,
|
||||
apiTaskTemplateDetail,
|
||||
apiTaskTypeList,
|
||||
} from "@/api/task_template";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import taskMap from "./map.vue";
|
||||
import personnelPopup from "./dialog_index_personnel.vue";
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
const datalist = ref([]);
|
||||
const route = useRoute();
|
||||
const taskType = ref("village_task_type");
|
||||
const taskRoleRow = ref([
|
||||
{ key: 1, value: "负责人" },
|
||||
{ key: 2, value: "市场部长" },
|
||||
{ key: 3, value: "服务部长" },
|
||||
]);
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == "edit" ? "编辑任务安排" : "新增任务安排";
|
||||
});
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
// task_role: 1,
|
||||
task_scheduling: 0,
|
||||
company_id: "",
|
||||
title: "",
|
||||
admin_id: "",
|
||||
type: "", // 任务类型
|
||||
type_value: "",
|
||||
status: "",
|
||||
content: "",
|
||||
stage_day_one: 0,
|
||||
money: 0, // 一阶段金额
|
||||
stage_day_two: 0,
|
||||
money_two: 0, // 二阶段金额
|
||||
stage_day_three: 0,
|
||||
new_money_three: 0, // 三阶段金额
|
||||
money_three: 0, // 长期金额
|
||||
types: "", //阶段类型
|
||||
task_admin: "", //任务负责人
|
||||
task_admin_name: "", //任务负责人
|
||||
recharge: "",
|
||||
extend: {
|
||||
task_role: "", // 任务角色
|
||||
target: "", //目标数量
|
||||
},
|
||||
});
|
||||
if (route.query.id) {
|
||||
formData.task_scheduling = route.query.id;
|
||||
}
|
||||
|
||||
// 显示目标数的任务类型
|
||||
const showTargetTypeList = [
|
||||
"village_task_type_1",
|
||||
"village_task_type_4",
|
||||
"village_task_type_5"
|
||||
];
|
||||
const showTarget = computed(() => {
|
||||
let flag = false;
|
||||
if (showTargetTypeList.includes(formData.type_value)) flag = true;
|
||||
return flag;
|
||||
});
|
||||
|
||||
// 不显示第二阶段的任务类型
|
||||
const noShowTowTypeList = ["village_task_type_2"];
|
||||
const showTow = computed(() => {
|
||||
let flag = true;
|
||||
if (noShowTowTypeList.includes(formData.type_value)) flag = false;
|
||||
return flag;
|
||||
});
|
||||
|
||||
// 不显示第三阶段的任务类型
|
||||
const noShowThreeTypeList = [
|
||||
"village_task_type_1",
|
||||
"village_task_type_2",
|
||||
"village_task_type_3",
|
||||
"village_task_type_4",
|
||||
"village_task_type_5",
|
||||
"village_task_type_6",
|
||||
];
|
||||
const showThree = computed(() => {
|
||||
let flag = true;
|
||||
if (noShowThreeTypeList.includes(formData.type_value)) flag = false;
|
||||
return flag;
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
title: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入任务名称",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
"extend.task_role": [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择任务角色",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
admin_id: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入创建人",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择任务类型",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
status: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择状态",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
types: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择阶段类型",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
task_admin: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择负责人",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
recharge: [
|
||||
{
|
||||
required: true,
|
||||
// message: "请输入充值金额",
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (value <= 0) callback(new Error("充值金额不能小于0"));
|
||||
else callback();
|
||||
},
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
"extend.target": [
|
||||
{
|
||||
required: true,
|
||||
// message: "请输入目标数",
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (value <= 0) callback(new Error("不能小于0"));
|
||||
else callback();
|
||||
},
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
//任务类型接口
|
||||
apiTaskTypeList({ type_value: taskType.value }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
if (formData.type) {
|
||||
datalist.value.forEach((item: any) => {
|
||||
if (item.id == formData.type) {
|
||||
formData.title = item.name;
|
||||
formData.type_value = item.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiTaskTemplateDetail({
|
||||
id: row.id,
|
||||
});
|
||||
setFormData(data);
|
||||
};
|
||||
|
||||
// 地图控件
|
||||
const mapShow = ref(false);
|
||||
const mapRef = shallowRef<InstanceType<typeof taskMap>>();
|
||||
|
||||
// 选择任务类型
|
||||
const changeTaskType = async (e: any) => {
|
||||
datalist.value.forEach((item: any) => {
|
||||
if (item.id == e) {
|
||||
formData.title = item.name;
|
||||
formData.type_value = item.value;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 选择任务角色
|
||||
const changeTaskRole = async (e: any) => {
|
||||
// 负责人
|
||||
if (e == 1) {
|
||||
taskType.value = "town_task_type_master";
|
||||
}
|
||||
// 市场部长
|
||||
if (e == 2) {
|
||||
taskType.value = "town_task_type_marketing_director";
|
||||
}
|
||||
// 服务部长
|
||||
if (e == 3) {
|
||||
taskType.value = "town_task_type";
|
||||
}
|
||||
apiTaskTypeList({ type_value: taskType.value }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
datalist.value.forEach((item: any) => {
|
||||
if (item.id == formData.type) {
|
||||
formData.type_value = item.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const setMap = (e: any) => {
|
||||
formData.extend[mapType.value] = e[0];
|
||||
};
|
||||
|
||||
// 选择负责人
|
||||
const personnelShow = ref(false);
|
||||
const personnelRef = shallowRef<InstanceType<typeof personnelPopup>>();
|
||||
const changePersonner = (e: any) => {
|
||||
formData.task_admin = e.id;
|
||||
formData.task_admin_name = e.nickname;
|
||||
personnelShow.value = false;
|
||||
};
|
||||
|
||||
const clickTaskAdmin = async () => {
|
||||
personnelShow.value = true;
|
||||
};
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
mode.value == "edit"
|
||||
? await apiTaskTemplateEdit(data)
|
||||
: await apiTaskTemplateAdd(data);
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
// if (type == "add") {
|
||||
// apiTaskTypeList({ type_value: taskType.value }).then((res) => {
|
||||
// datalist.value = res.lists;
|
||||
// });
|
||||
// }
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit("close");
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail,
|
||||
});
|
||||
</script>
|
||||
|
@ -145,18 +145,25 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup
|
||||
v-if="showEdit && taskTypeId != 15"
|
||||
<edit-admin-popup
|
||||
v-if="showEdit && companyType == 16"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
<edit-admin-popup
|
||||
<edit-village-popup
|
||||
v-else-if="showEdit && companyType == 17"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
<edit-popup
|
||||
v-else-if="showEdit"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@ -177,6 +184,7 @@ import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./edit.vue";
|
||||
import EditAdminPopup from "./edit_admin.vue";
|
||||
import EditVillagePopup from "./edit_village.vue";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
const datalist = ref([]);
|
||||
@ -196,10 +204,10 @@ const queryParams = reactive({
|
||||
status: "",
|
||||
content: "",
|
||||
});
|
||||
const taskTypeId = ref(10);
|
||||
const companyType = ref(10);
|
||||
if (route.query?.id) queryParams.id = route.query.id;
|
||||
if (route.query?.company_id) queryParams.company_id = route.query.company_id;
|
||||
if (route.query?.company_type == 41) taskTypeId.value = 15;
|
||||
if (route.query?.company_type) companyType.value = route.query.company_type;
|
||||
const statusdata = reactive([
|
||||
{ id: 1, name: "显示" },
|
||||
{ id: 2, name: "隐藏" },
|
||||
|
@ -49,7 +49,7 @@
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="时间" prop="start_date">
|
||||
<el-input
|
||||
v-model="datas.start_date"
|
||||
v-model="datas.datas.start_date"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -29,7 +29,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="address">
|
||||
<el-input
|
||||
v-model="datas.address"
|
||||
v-model="datas.datas.address"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -41,7 +41,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人数" prop="people_count">
|
||||
<el-input
|
||||
v-model="datas.people_count"
|
||||
v-model="datas.datas.people_count"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -52,7 +52,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="请包办" prop="serve">
|
||||
<el-radio-group v-model="datas.serve" size="medium">
|
||||
<el-radio-group v-model="datas.datas.serve" size="medium">
|
||||
<el-radio label="2">酒店</el-radio>
|
||||
<el-radio label="1">一条龙</el-radio>
|
||||
<el-radio label="0">只请厨师</el-radio>
|
||||
@ -61,7 +61,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无歌舞表演" prop="perform">
|
||||
<el-radio-group v-model="datas.perform" size="medium">
|
||||
<el-radio-group v-model="datas.datas.perform" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -69,7 +69,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无交通工具" prop="vehicle">
|
||||
<el-radio-group v-model="datas.vehicle" size="medium">
|
||||
<el-radio-group v-model="datas.datas.vehicle" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -77,7 +77,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无住宿" prop="in_hotel">
|
||||
<el-radio-group v-model="datas.in_hotel" size="medium">
|
||||
<el-radio-group v-model="datas.datas.in_hotel" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -85,6 +85,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="时间" prop="start_date">
|
||||
<el-input
|
||||
v-model="datas.start_date"
|
||||
v-model="datas.datas.start_date"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -29,7 +29,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="address">
|
||||
<el-input
|
||||
v-model="datas.address"
|
||||
v-model="datas.datas.address"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -41,7 +41,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人数" prop="people_count">
|
||||
<el-input
|
||||
v-model="datas.people_count"
|
||||
v-model="datas.datas.people_count"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -52,7 +52,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="请包办" prop="serve">
|
||||
<el-radio-group v-model="datas.serve" size="medium">
|
||||
<el-radio-group v-model="datas.datas.serve" size="medium">
|
||||
<el-radio label="2">酒店</el-radio>
|
||||
<el-radio label="1">一条龙</el-radio>
|
||||
<el-radio label="0">只请厨师</el-radio>
|
||||
@ -61,7 +61,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无歌舞表演" prop="perform">
|
||||
<el-radio-group v-model="datas.perform" size="medium">
|
||||
<el-radio-group v-model="datas.datas.perform" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -69,7 +69,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无交通工具" prop="vehicle">
|
||||
<el-radio-group v-model="datas.vehicle" size="medium">
|
||||
<el-radio-group v-model="datas.datas.vehicle" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -77,7 +77,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无住宿" prop="in_hotel">
|
||||
<el-radio-group v-model="datas.in_hotel" size="medium">
|
||||
<el-radio-group v-model="datas.datas.in_hotel" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -85,6 +85,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="address">
|
||||
<el-input
|
||||
v-model="datas.address"
|
||||
v-model="datas.datas.address"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -29,7 +29,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人数" prop="people_count">
|
||||
<el-input
|
||||
v-model="datas.people_count"
|
||||
v-model="datas.datas.people_count"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -40,7 +40,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="请包办" prop="serve">
|
||||
<el-radio-group v-model="datas.serve" size="medium">
|
||||
<el-radio-group v-model="datas.datas.serve" size="medium">
|
||||
<el-radio label="2">酒店</el-radio>
|
||||
<el-radio label="1">一条龙</el-radio>
|
||||
<el-radio label="0">只请厨师</el-radio>
|
||||
@ -49,7 +49,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无歌舞表演" prop="perform">
|
||||
<el-radio-group v-model="datas.perform" size="medium">
|
||||
<el-radio-group v-model="datas.datas.perform" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -57,7 +57,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无主持仪式" prop="host">
|
||||
<el-radio-group v-model="datas.host" size="medium">
|
||||
<el-radio-group v-model="datas.datas.host" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -65,7 +65,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无交通工具" prop="vehicle">
|
||||
<el-radio-group v-model="datas.vehicle" size="medium">
|
||||
<el-radio-group v-model="datas.datas.vehicle" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -73,7 +73,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无住宿" prop="in_hotel">
|
||||
<el-radio-group v-model="datas.in_hotel" size="medium">
|
||||
<el-radio-group v-model="datas.datas.in_hotel" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -81,7 +81,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无墓地" prop="graveyard">
|
||||
<el-radio-group v-model="datas.graveyard" size="medium">
|
||||
<el-radio-group v-model="datas.datas.graveyard" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -89,6 +89,15 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="时间" prop="start_date">
|
||||
<el-input
|
||||
v-model="datas.start_date"
|
||||
v-model="datas.datas.start_date"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -29,7 +29,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="address">
|
||||
<el-input
|
||||
v-model="datas.address"
|
||||
v-model="datas.datas.address"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -41,7 +41,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人数" prop="people_count">
|
||||
<el-input
|
||||
v-model="datas.people_count"
|
||||
v-model="datas.datas.people_count"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -52,7 +52,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="请包办" prop="serve">
|
||||
<el-radio-group v-model="datas.serve" size="medium">
|
||||
<el-radio-group v-model="datas.datas.serve" size="medium">
|
||||
<el-radio label="2">酒店</el-radio>
|
||||
<el-radio label="1">一条龙</el-radio>
|
||||
<el-radio label="0">只请厨师</el-radio>
|
||||
@ -61,7 +61,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无歌舞表演" prop="perform">
|
||||
<el-radio-group v-model="datas.perform" size="medium">
|
||||
<el-radio-group v-model="datas.datas.perform" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -69,7 +69,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无主持仪式" prop="host">
|
||||
<el-radio-group v-model="datas.host" size="medium">
|
||||
<el-radio-group v-model="datas.datas.host" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -77,7 +77,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无交通工具" prop="vehicle">
|
||||
<el-radio-group v-model="datas.vehicle" size="medium">
|
||||
<el-radio-group v-model="datas.datas.vehicle" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -85,7 +85,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无住宿" prop="in_hotel">
|
||||
<el-radio-group v-model="datas.in_hotel" size="medium">
|
||||
<el-radio-group v-model="datas.datas.in_hotel" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -93,6 +93,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="时间" prop="start_date">
|
||||
<el-input
|
||||
v-model="datas.start_date"
|
||||
v-model="datas.datas.start_date"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -41,7 +41,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="address">
|
||||
<el-input
|
||||
v-model="datas.address"
|
||||
v-model="datas.datas.address"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -53,7 +53,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人数" prop="people_count">
|
||||
<el-input
|
||||
v-model="datas.people_count"
|
||||
v-model="datas.datas.people_count"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -64,7 +64,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="请包办" prop="serve">
|
||||
<el-radio-group v-model="datas.serve" size="medium">
|
||||
<el-radio-group v-model="datas.datas.serve" size="medium">
|
||||
<el-radio label="2">酒店</el-radio>
|
||||
<el-radio label="1">一条龙</el-radio>
|
||||
<el-radio label="0">只请厨师</el-radio>
|
||||
@ -73,7 +73,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无歌舞表演" prop="perform">
|
||||
<el-radio-group v-model="datas.perform" size="medium">
|
||||
<el-radio-group v-model="datas.datas.perform" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -81,7 +81,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无交通工具" prop="vehicle">
|
||||
<el-radio-group v-model="datas.vehicle" size="medium">
|
||||
<el-radio-group v-model="datas.datas.vehicle" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -89,7 +89,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无住宿" prop="in_hotel">
|
||||
<el-radio-group v-model="datas.in_hotel" size="medium">
|
||||
<el-radio-group v-model="datas.datas.in_hotel" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -97,6 +97,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无养殖培训" prop="breeding_training">
|
||||
<el-radio-group v-model="datas.breeding_training" size="medium">
|
||||
<el-radio-group v-model="datas.datas.breeding_training" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -24,7 +24,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无注册成立养殖公司" prop="breeding_company">
|
||||
<el-radio-group v-model="datas.breeding_company" size="medium">
|
||||
<el-radio-group v-model="datas.datas.breeding_company" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -46,7 +46,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="养殖类型" prop="breeding_type">
|
||||
<el-input
|
||||
v-model="datas.breeding_type"
|
||||
v-model="datas.datas.breeding_type"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -57,7 +57,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开始时间" prop="breeding_time">
|
||||
<el-input
|
||||
v-model="datas.breeding_time"
|
||||
v-model="datas.datas.breeding_time"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -68,7 +68,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="上市时间" prop="mature_time">
|
||||
<el-input
|
||||
v-model="datas.mature_time"
|
||||
v-model="datas.datas.mature_time"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -79,7 +79,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产量(斤)" prop="yield">
|
||||
<el-input
|
||||
v-model="datas.yield"
|
||||
v-model="datas.datas.yield"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -90,7 +90,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预计收益(元)" prop="estimated_income">
|
||||
<el-input
|
||||
v-model="datas.estimated_income"
|
||||
v-model="datas.datas.estimated_income"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -105,7 +105,7 @@
|
||||
prop="farm_tools"
|
||||
>
|
||||
<el-input
|
||||
v-model="datas.farm_tools"
|
||||
v-model="datas.datas.farm_tools"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -126,7 +126,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="现代化程度(%)" prop="modernization">
|
||||
<el-input
|
||||
v-model="datas.modernization"
|
||||
v-model="datas.datas.modernization"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -137,7 +137,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预售卖价格(元/500g)" prop="pre_price">
|
||||
<el-input
|
||||
v-model="datas.pre_price"
|
||||
v-model="datas.datas.pre_price"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -147,7 +147,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售方式" prop="method_sales">
|
||||
<el-radio-group v-model="datas.method_sales" size="medium">
|
||||
<el-radio-group v-model="datas.datas.method_sales" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -155,7 +155,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无加工仓储" prop="processing_storage">
|
||||
<el-radio-group v-model="datas.processing_storage" size="medium">
|
||||
<el-radio-group v-model="datas.datas.processing_storage" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -163,7 +163,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无宣传推广" prop="promote">
|
||||
<el-radio-group v-model="datas.promote" size="medium">
|
||||
<el-radio-group v-model="datas.datas.promote" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -171,7 +171,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无运输" prop="transportation">
|
||||
<el-radio-group v-model="datas.transportation" size="medium">
|
||||
<el-radio-group v-model="datas.datas.transportation" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -179,7 +179,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否有扩大经营需求" prop="expand_business_needs">
|
||||
<el-radio-group v-model="datas.expand_business_needs" size="medium">
|
||||
<el-radio-group v-model="datas.datas.expand_business_needs" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -188,7 +188,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="需求描述" prop="demand">
|
||||
<el-input
|
||||
v-model="datas.demand"
|
||||
v-model="datas.datas.demand"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -201,7 +201,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="政策补助" prop="policy_subsidies">
|
||||
<el-input
|
||||
v-model="datas.policy_subsidies"
|
||||
v-model="datas.datas.policy_subsidies"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -213,6 +213,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -16,16 +16,16 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否在经营" prop="is_manage">
|
||||
<el-radio-group v-model="datas.is_manage" size="medium">
|
||||
<el-radio-group v-model="datas.datas.is_manage" size="medium">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="datas.is_manage == 1">
|
||||
<template v-if="datas.datas.is_manage == 1">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无建设用地" prop="construction_land">
|
||||
<el-radio-group v-model="datas.construction_land" size="medium">
|
||||
<el-radio-group v-model="datas.datas.construction_land" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -34,7 +34,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="面积(m²)" prop="land_area">
|
||||
<el-input
|
||||
v-model="datas.land_area"
|
||||
v-model="datas.datas.land_area"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -43,7 +43,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营地点" prop="manage_place">
|
||||
<el-input
|
||||
v-model="datas.manage_place"
|
||||
v-model="datas.datas.manage_place"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -52,7 +52,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="材料来源" prop="source_materials">
|
||||
<el-input
|
||||
v-model="datas.source_materials"
|
||||
v-model="datas.datas.source_materials"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -60,7 +60,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无销售渠道" prop="marketing_channel">
|
||||
<el-radio-group v-model="datas.marketing_channel" size="medium">
|
||||
<el-radio-group v-model="datas.datas.marketing_channel" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -68,7 +68,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无技术指导" prop="technical_guidance">
|
||||
<el-radio-group v-model="datas.technical_guidance" size="medium">
|
||||
<el-radio-group v-model="datas.datas.technical_guidance" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -76,7 +76,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无品牌" prop="brand">
|
||||
<el-radio-group v-model="datas.brand" size="medium">
|
||||
<el-radio-group v-model="datas.datas.brand" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -84,7 +84,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无宣传推广" prop="advertising">
|
||||
<el-radio-group v-model="datas.advertising" size="medium">
|
||||
<el-radio-group v-model="datas.datas.advertising" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -92,7 +92,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无运输" prop="transport">
|
||||
<el-radio-group v-model="datas.transport" size="medium">
|
||||
<el-radio-group v-model="datas.datas.transport" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -101,7 +101,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营诉求" prop="business_appeal">
|
||||
<el-input
|
||||
v-model="datas.business_appeal"
|
||||
v-model="datas.datas.business_appeal"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -115,7 +115,7 @@
|
||||
<template v-else>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无建设用地" prop="construction_land">
|
||||
<el-radio-group v-model="datas.construction_land" size="medium">
|
||||
<el-radio-group v-model="datas.datas.construction_land" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -124,7 +124,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营类型" prop="manage_type">
|
||||
<el-select
|
||||
v-model="datas.manage_type"
|
||||
v-model="datas.datas.manage_type"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
@ -140,7 +140,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营地点" prop="manage_place">
|
||||
<el-input
|
||||
v-model="datas.manage_place"
|
||||
v-model="datas.datas.manage_place"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -149,7 +149,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人数" prop="people_count">
|
||||
<el-input
|
||||
v-model="datas.people_count"
|
||||
v-model="datas.datas.people_count"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -157,7 +157,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无食堂" prop="canteen">
|
||||
<el-radio-group v-model="datas.canteen" size="medium">
|
||||
<el-radio-group v-model="datas.datas.canteen" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -166,7 +166,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="材料来源" prop="source_materials">
|
||||
<el-input
|
||||
v-model="datas.source_materials"
|
||||
v-model="datas.datas.source_materials"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -175,7 +175,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="自动化办公程度" prop="automation">
|
||||
<el-input
|
||||
v-model="datas.automation"
|
||||
v-model="datas.datas.automation"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -183,7 +183,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无用工需求" prop="employment">
|
||||
<el-radio-group v-model="datas.employment" size="medium">
|
||||
<el-radio-group v-model="datas.datas.employment" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -191,7 +191,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无品牌" prop="brand">
|
||||
<el-radio-group v-model="datas.brand" size="medium">
|
||||
<el-radio-group v-model="datas.datas.brand" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -199,7 +199,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无宣传推广" prop="advertising">
|
||||
<el-radio-group v-model="datas.advertising" size="medium">
|
||||
<el-radio-group v-model="datas.datas.advertising" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -208,7 +208,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="库存情况" prop="repertory">
|
||||
<el-input
|
||||
v-model="datas.repertory"
|
||||
v-model="datas.datas.repertory"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -216,7 +216,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无运输" prop="transport">
|
||||
<el-radio-group v-model="datas.transport" size="medium">
|
||||
<el-radio-group v-model="datas.datas.transport" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -225,7 +225,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营诉求" prop="business_appeal">
|
||||
<el-input
|
||||
v-model="datas.business_appeal"
|
||||
v-model="datas.datas.business_appeal"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -238,6 +238,14 @@
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
label-width="180px"
|
||||
>
|
||||
<div class="tit">
|
||||
装房
|
||||
装房1
|
||||
<span class="time">更新于:{{ update_time }}</span>
|
||||
</div>
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="房屋面积(m²)" prop="house_area">
|
||||
<el-input
|
||||
v-model="datas.house_area"
|
||||
v-model="datas.datas.house_area"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -28,7 +28,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="装修风格" prop="decoration_style">
|
||||
<el-input
|
||||
v-model="datas.decoration_style"
|
||||
v-model="datas.datas.decoration_style"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -39,7 +39,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="装修地点" prop="decoration_site">
|
||||
<el-input
|
||||
v-model="datas.decoration_site"
|
||||
v-model="datas.datas.decoration_site"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -50,7 +50,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="装修预算" prop="budget">
|
||||
<el-input
|
||||
v-model="datas.budget"
|
||||
v-model="datas.datas.budget"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -60,7 +60,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="装修类型" prop="decoration_type">
|
||||
<el-radio-group v-model="datas.decoration_type" size="medium">
|
||||
<el-radio-group v-model="datas.datas.decoration_type" size="medium">
|
||||
<el-radio label="1">私人</el-radio>
|
||||
<el-radio label="0">公共建设</el-radio>
|
||||
</el-radio-group>
|
||||
@ -68,6 +68,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
@ -82,6 +90,8 @@ const props = defineProps({
|
||||
decoration_site: "",
|
||||
budget: "",
|
||||
decoration_type: "",
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
},
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="维护内容" prop="maintenance_contents">
|
||||
<el-input
|
||||
v-model="datas.maintenance_contents"
|
||||
v-model="datas.datas.maintenance_contents"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="true"
|
||||
@ -28,7 +28,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="维护类型" prop="maintenance_type">
|
||||
<el-radio-group v-model="datas.maintenance_type" size="medium">
|
||||
<el-radio-group v-model="datas.datas.maintenance_type" size="medium">
|
||||
<el-radio label="1">换</el-radio>
|
||||
<el-radio label="0">修</el-radio>
|
||||
</el-radio-group>
|
||||
@ -36,6 +36,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="修房类型" prop="construction_type">
|
||||
<el-radio-group v-model="datas.construction_type" size="medium">
|
||||
<el-radio-group v-model="datas.datas.construction_type" size="medium">
|
||||
<el-radio label="1">自建</el-radio>
|
||||
<el-radio label="0">外包</el-radio>
|
||||
</el-radio-group>
|
||||
@ -25,7 +25,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="建设面积(m²)" prop="construction_area">
|
||||
<el-input
|
||||
v-model="datas.construction_area"
|
||||
v-model="datas.datas.construction_area"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -36,7 +36,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="房屋风格" prop="house_style">
|
||||
<el-input
|
||||
v-model="datas.house_style"
|
||||
v-model="datas.datas.house_style"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -47,7 +47,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="修建地址" prop="construction_site">
|
||||
<el-input
|
||||
v-model="datas.construction_site"
|
||||
v-model="datas.datas.construction_site"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -58,7 +58,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预算" prop="budget">
|
||||
<el-input
|
||||
v-model="datas.budget"
|
||||
v-model="datas.datas.budget"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -68,7 +68,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无绿化" prop="afforest">
|
||||
<el-radio-group v-model="datas.afforest" size="medium">
|
||||
<el-radio-group v-model="datas.datas.afforest" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -76,7 +76,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无装修" prop="fitment">
|
||||
<el-radio-group v-model="datas.fitment" size="medium">
|
||||
<el-radio-group v-model="datas.datas.fitment" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -84,7 +84,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="房屋类型" prop="house_type">
|
||||
<el-radio-group v-model="datas.house_type" size="medium">
|
||||
<el-radio-group v-model="datas.datas.house_type" size="medium">
|
||||
<el-radio label="1">私人</el-radio>
|
||||
<el-radio label="0">公共建设</el-radio>
|
||||
</el-radio-group>
|
||||
@ -94,14 +94,22 @@
|
||||
<el-form-item label="修建地照片" prop="construction_site_img">
|
||||
<el-image
|
||||
style="width: 500px; height: 320px"
|
||||
:src="datas.construction_site_img"
|
||||
:preview-src-list="[datas.construction_site_img]"
|
||||
:src="datas.datas.construction_site_img"
|
||||
:preview-src-list="[datas.datas.construction_site_img]"
|
||||
fit="cover"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="place">
|
||||
<el-input
|
||||
v-model="datas.place"
|
||||
v-model="datas.datas.place"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -28,7 +28,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="房型" prop="house_type">
|
||||
<el-input
|
||||
v-model="datas.house_type"
|
||||
v-model="datas.datas.house_type"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -39,7 +39,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="几房" prop="rooms">
|
||||
<el-input
|
||||
v-model="datas.rooms"
|
||||
v-model="datas.datas.rooms"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -50,7 +50,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="面积(m²)" prop="house_area">
|
||||
<el-input
|
||||
v-model="datas.house_area"
|
||||
v-model="datas.datas.house_area"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -61,7 +61,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="朝向" prop="orientation">
|
||||
<el-input
|
||||
v-model="datas.orientation"
|
||||
v-model="datas.datas.orientation"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -72,7 +72,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="楼层" prop="floor">
|
||||
<el-input
|
||||
v-model="datas.floor"
|
||||
v-model="datas.datas.floor"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -82,7 +82,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="装修类型" prop="fitment">
|
||||
<el-radio-group v-model="datas.fitment" size="medium">
|
||||
<el-radio-group v-model="datas.datas.fitment" size="medium">
|
||||
<el-radio label="1">精装</el-radio>
|
||||
<el-radio label="0">清水</el-radio>
|
||||
</el-radio-group>
|
||||
@ -91,7 +91,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预算" prop="budget">
|
||||
<el-input
|
||||
v-model="datas.budget"
|
||||
v-model="datas.datas.budget"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -101,7 +101,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="付款类型" prop="payment_type">
|
||||
<el-radio-group v-model="datas.payment_type" size="medium">
|
||||
<el-radio-group v-model="datas.datas.payment_type" size="medium">
|
||||
<el-radio label="1">按揭</el-radio>
|
||||
<el-radio label="0">全款</el-radio>
|
||||
</el-radio-group>
|
||||
@ -109,6 +109,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="土地总面积(亩)" prop="cultivated_area">
|
||||
<el-input
|
||||
v-model="datas.cultivated_area"
|
||||
v-model="datas.datas.cultivated_area"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -29,7 +29,7 @@
|
||||
<el-form-item label="土地规划" prop="cultivated_area">
|
||||
<el-select
|
||||
:disabled="isCheck"
|
||||
v-model="datas.planning"
|
||||
v-model="datas.datas.planning"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
@ -44,7 +44,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无种植培训" prop="breeding_training">
|
||||
<el-radio-group v-model="datas.breeding_training" size="medium">
|
||||
<el-radio-group v-model="datas.datas.breeding_training" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -52,7 +52,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无注册成立种植公司" prop="planting_company">
|
||||
<el-radio-group v-model="datas.planting_company" size="medium">
|
||||
<el-radio-group v-model="datas.datas.planting_company" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -61,7 +61,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="notes">
|
||||
<el-input
|
||||
v-model="datas.notes"
|
||||
v-model="datas.datas.notes"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -74,7 +74,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="种植类型" prop="breeding_type">
|
||||
<el-input
|
||||
v-model="datas.breeding_type"
|
||||
v-model="datas.datas.breeding_type"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -85,7 +85,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="种植面积(亩)" prop="area">
|
||||
<el-input
|
||||
v-model="datas.area"
|
||||
v-model="datas.datas.area"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -96,7 +96,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开始时间" prop="breeding_time">
|
||||
<el-input
|
||||
v-model="datas.breeding_time"
|
||||
v-model="datas.datas.breeding_time"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -107,7 +107,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="上市时间" prop="mature_time">
|
||||
<el-input
|
||||
v-model="datas.mature_time"
|
||||
v-model="datas.datas.mature_time"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -118,7 +118,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产量(斤)" prop="yield">
|
||||
<el-input
|
||||
v-model="datas.yield"
|
||||
v-model="datas.datas.yield"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -129,7 +129,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预计收益(元)" prop="estimated_income">
|
||||
<el-input
|
||||
v-model="datas.estimated_income"
|
||||
v-model="datas.datas.estimated_income"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -144,7 +144,7 @@
|
||||
prop="farm_tools"
|
||||
>
|
||||
<el-input
|
||||
v-model="datas.farm_tools"
|
||||
v-model="datas.datas.farm_tools"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -156,7 +156,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否生态种植" prop="ecological_farming">
|
||||
<el-radio-group v-model="datas.ecological_farming" size="medium">
|
||||
<el-radio-group v-model="datas.datas.ecological_farming" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -165,7 +165,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="现代化程度(%)" prop="modernization">
|
||||
<el-input
|
||||
v-model="datas.modernization"
|
||||
v-model="datas.datas.modernization"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -176,7 +176,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预售卖价格(元/500g)" prop="pre_price">
|
||||
<el-input
|
||||
v-model="datas.pre_price"
|
||||
v-model="datas.datas.pre_price"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -186,7 +186,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售方式" prop="method_sales">
|
||||
<el-radio-group v-model="datas.method_sales" size="medium">
|
||||
<el-radio-group v-model="datas.datas.method_sales" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -194,7 +194,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无加工仓储" prop="processing_storage">
|
||||
<el-radio-group v-model="datas.processing_storage" size="medium">
|
||||
<el-radio-group v-model="datas.datas.processing_storage" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -202,7 +202,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无宣传推广" prop="promote">
|
||||
<el-radio-group v-model="datas.promote" size="medium">
|
||||
<el-radio-group v-model="datas.datas.promote" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -210,7 +210,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无运输" prop="transportation">
|
||||
<el-radio-group v-model="datas.transportation" size="medium">
|
||||
<el-radio-group v-model="datas.datas.transportation" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -218,7 +218,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否有扩大经营需求" prop="expand_business_needs">
|
||||
<el-radio-group v-model="datas.expand_business_needs" size="medium">
|
||||
<el-radio-group v-model="datas.datas.expand_business_needs" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -227,7 +227,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="需求描述" prop="demand">
|
||||
<el-input
|
||||
v-model="datas.demand"
|
||||
v-model="datas.datas.demand"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -240,7 +240,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="政策补助" prop="policy_subsidies">
|
||||
<el-input
|
||||
v-model="datas.policy_subsidies"
|
||||
v-model="datas.datas.policy_subsidies"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -252,6 +252,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无门面" prop="shop_front">
|
||||
<el-radio-group v-model="datas.shop_front" size="medium">
|
||||
<el-radio-group v-model="datas.datas.shop_front" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -25,7 +25,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="门面面积(m²)" prop="area">
|
||||
<el-input
|
||||
v-model="datas.area"
|
||||
v-model="datas.datas.area"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -36,7 +36,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营地点" prop="place">
|
||||
<el-input
|
||||
v-model="datas.place"
|
||||
v-model="datas.datas.place"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -48,7 +48,7 @@
|
||||
<el-form-item label="经营类型" prop="type">
|
||||
<el-select
|
||||
:disabled="isCheck"
|
||||
v-model="datas.type"
|
||||
v-model="datas.datas.type"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
@ -64,7 +64,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="门面环境" prop="environment">
|
||||
<el-input
|
||||
v-model="datas.environment"
|
||||
v-model="datas.datas.environment"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -75,7 +75,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="服务对象" prop="service">
|
||||
<el-input
|
||||
v-model="datas.service"
|
||||
v-model="datas.datas.service"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -85,7 +85,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无营业资质" prop="qualification">
|
||||
<el-radio-group v-model="datas.qualification" size="medium">
|
||||
<el-radio-group v-model="datas.datas.qualification" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -93,7 +93,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无进货渠道" prop="stock">
|
||||
<el-radio-group v-model="datas.stock" size="medium">
|
||||
<el-radio-group v-model="datas.datas.stock" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -102,7 +102,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="店铺规模" prop="scale">
|
||||
<el-input
|
||||
v-model="datas.scale"
|
||||
v-model="datas.datas.scale"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -113,7 +113,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品来源" prop="source">
|
||||
<el-input
|
||||
v-model="datas.source"
|
||||
v-model="datas.datas.source"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
@ -123,7 +123,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无线上展示" prop="brand">
|
||||
<el-radio-group v-model="datas.brand" size="medium">
|
||||
<el-radio-group v-model="datas.datas.brand" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -131,7 +131,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无品牌" prop="field134">
|
||||
<el-radio-group v-model="datas.brand" size="medium">
|
||||
<el-radio-group v-model="datas.datas.brand" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -139,7 +139,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="库存情况" prop="repertory">
|
||||
<el-radio-group v-model="datas.repertory" size="medium">
|
||||
<el-radio-group v-model="datas.datas.repertory" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -148,7 +148,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营诉求" prop="appeal">
|
||||
<el-input
|
||||
v-model="datas.appeal"
|
||||
v-model="datas.datas.appeal"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -160,6 +160,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -16,16 +16,16 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否在经营" prop="is_manage">
|
||||
<el-radio-group v-model="datas.is_manage" size="medium">
|
||||
<el-radio-group v-model="datas.datas.is_manage" size="medium">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="datas.is_manage == 1">
|
||||
<template v-if="datas.datas.is_manage == 1">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无建设用地" prop="construction_land">
|
||||
<el-radio-group v-model="datas.construction_land" size="medium">
|
||||
<el-radio-group v-model="datas.datas.construction_land" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -34,7 +34,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="面积(m²)" prop="land_area">
|
||||
<el-input
|
||||
v-model="datas.land_area"
|
||||
v-model="datas.datas.land_area"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -43,7 +43,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营地点" prop="manage_place">
|
||||
<el-input
|
||||
v-model="datas.manage_place"
|
||||
v-model="datas.datas.manage_place"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -52,7 +52,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="材料来源" prop="source_materials">
|
||||
<el-input
|
||||
v-model="datas.source_materials"
|
||||
v-model="datas.datas.source_materials"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -60,7 +60,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无销售渠道" prop="marketing_channel">
|
||||
<el-radio-group v-model="datas.marketing_channel" size="medium">
|
||||
<el-radio-group v-model="datas.datas.marketing_channel" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -68,7 +68,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无技术指导" prop="technical_guidance">
|
||||
<el-radio-group v-model="datas.technical_guidance" size="medium">
|
||||
<el-radio-group v-model="datas.datas.technical_guidance" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -76,7 +76,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无品牌" prop="brand">
|
||||
<el-radio-group v-model="datas.brand" size="medium">
|
||||
<el-radio-group v-model="datas.datas.brand" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -84,7 +84,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无宣传推广" prop="advertising">
|
||||
<el-radio-group v-model="datas.advertising" size="medium">
|
||||
<el-radio-group v-model="datas.datas.advertising" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -92,7 +92,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无运输" prop="transport">
|
||||
<el-radio-group v-model="datas.transport" size="medium">
|
||||
<el-radio-group v-model="datas.datas.transport" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -101,7 +101,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营诉求" prop="business_appeal">
|
||||
<el-input
|
||||
v-model="datas.business_appeal"
|
||||
v-model="datas.datas.business_appeal"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -115,7 +115,7 @@
|
||||
<template v-else>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无建设用地" prop="construction_land">
|
||||
<el-radio-group v-model="datas.construction_land" size="medium">
|
||||
<el-radio-group v-model="datas.datas.construction_land" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -124,7 +124,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营类型" prop="manage_type">
|
||||
<el-select
|
||||
v-model="datas.manage_type"
|
||||
v-model="datas.datas.manage_type"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
@ -140,7 +140,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营地点" prop="manage_place">
|
||||
<el-input
|
||||
v-model="datas.manage_place"
|
||||
v-model="datas.datas.manage_place"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -149,7 +149,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人数" prop="people_count">
|
||||
<el-input
|
||||
v-model="datas.people_count"
|
||||
v-model="datas.datas.people_count"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -157,7 +157,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无食堂" prop="canteen">
|
||||
<el-radio-group v-model="datas.canteen" size="medium">
|
||||
<el-radio-group v-model="datas.datas.canteen" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -166,7 +166,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="材料来源" prop="source_materials">
|
||||
<el-input
|
||||
v-model="datas.source_materials"
|
||||
v-model="datas.datas.source_materials"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -175,7 +175,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="自动化办公程度" prop="automation">
|
||||
<el-input
|
||||
v-model="datas.automation"
|
||||
v-model="datas.datas.automation"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -183,7 +183,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无用工需求" prop="employment">
|
||||
<el-radio-group v-model="datas.employment" size="medium">
|
||||
<el-radio-group v-model="datas.datas.employment" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -191,7 +191,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无品牌" prop="brand">
|
||||
<el-radio-group v-model="datas.brand" size="medium">
|
||||
<el-radio-group v-model="datas.datas.brand" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -199,7 +199,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无宣传推广" prop="advertising">
|
||||
<el-radio-group v-model="datas.advertising" size="medium">
|
||||
<el-radio-group v-model="datas.datas.advertising" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -208,7 +208,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="库存情况" prop="repertory">
|
||||
<el-input
|
||||
v-model="datas.repertory"
|
||||
v-model="datas.datas.repertory"
|
||||
clearable
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
@ -216,7 +216,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有无运输" prop="transport">
|
||||
<el-radio-group v-model="datas.transport" size="medium">
|
||||
<el-radio-group v-model="datas.datas.transport" size="medium">
|
||||
<el-radio label="1">有</el-radio>
|
||||
<el-radio label="0">无</el-radio>
|
||||
</el-radio-group>
|
||||
@ -225,7 +225,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营诉求" prop="business_appeal">
|
||||
<el-input
|
||||
v-model="datas.business_appeal"
|
||||
v-model="datas.datas.business_appeal"
|
||||
clearable
|
||||
autosize
|
||||
type="textarea"
|
||||
@ -238,6 +238,14 @@
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="datas.ai_question">
|
||||
<p class="tit"> 商机分析</p>
|
||||
<div >
|
||||
<div>AI提问:{{datas.ai_question}}</div><br/>
|
||||
<div>AI回答:{{datas.ai_aianalyse}}</div><br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -1,12 +1,6 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<el-form
|
||||
ref="elForm"
|
||||
:disabled="true"
|
||||
:model="formData"
|
||||
size="mini"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form ref="elForm" :disabled="true" :model="formData" size="mini" label-width="100px">
|
||||
<!-- <div style="font-size: 1.2rem; translate: 1vw 0; background-color: white">
|
||||
个人信息
|
||||
</div> -->
|
||||
@ -16,12 +10,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
v-model="formData.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="formData.name" placeholder="请输入姓名" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -35,44 +24,25 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input
|
||||
v-model="formData.age"
|
||||
placeholder="请输入年龄"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="formData.age" placeholder="请输入年龄" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input
|
||||
v-model="formData.phone"
|
||||
placeholder="请输入电话"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="formData.phone" placeholder="请输入电话" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="身份证号" prop="id_card">
|
||||
<el-input
|
||||
v-model="formData.id_card"
|
||||
placeholder="请输入身份证号"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="formData.id_card" placeholder="请输入身份证号" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="地址" prop="field104">
|
||||
<el-input
|
||||
v-model="formData.address"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="formData.address" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -84,36 +54,22 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="地址">
|
||||
<el-input
|
||||
:value="
|
||||
<el-input :value="
|
||||
formData.area_name +
|
||||
formData.street_name +
|
||||
formData.village_name
|
||||
"
|
||||
placeholder="请输入地址"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
" placeholder="请输入地址" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="详细地址" prop="address">
|
||||
<el-input
|
||||
v-model="formData.address"
|
||||
placeholder="请输入详细地址"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="formData.address" placeholder="请输入详细地址" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="汽车是否能到家"
|
||||
label-width="200px"
|
||||
prop="highway"
|
||||
>
|
||||
<el-form-item label="汽车是否能到家" label-width="200px" prop="highway">
|
||||
<el-radio-group v-model="formData.highway" size="medium">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
@ -121,11 +77,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="是否使用智能手机"
|
||||
label-width="200px"
|
||||
prop="smart_phone"
|
||||
>
|
||||
<el-form-item label="是否使用智能手机" label-width="200px" prop="smart_phone">
|
||||
<el-radio-group v-model="formData.smart_phone" size="medium">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
@ -134,12 +86,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="formData.smart_phone">
|
||||
<el-form-item label="微信号" prop="field119">
|
||||
<el-input
|
||||
v-model="formData.skills"
|
||||
placeholder="请输入微信号"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="formData.skills" placeholder="请输入微信号" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -152,52 +99,25 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
v-model="item.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="item.name" placeholder="请输入姓名" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="dates">
|
||||
<el-form-item label="出生日期" prop="field110">
|
||||
<el-date-picker
|
||||
:disabled="true"
|
||||
v-model="item.birth_time"
|
||||
style="width: 150%"
|
||||
placeholder="请输入出生日期"
|
||||
clearable
|
||||
></el-date-picker>
|
||||
<el-date-picker :disabled="true" v-model="item.birth_time" style="width: 150%" placeholder="请输入出生日期" clearable></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="就业情况" prop="field111">
|
||||
<el-select
|
||||
:disabled="true"
|
||||
v-model="item.situation"
|
||||
placeholder="请输入就业情况"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(items, indexs) in workLists"
|
||||
:key="indexs"
|
||||
:label="items.name"
|
||||
:value="items.id"
|
||||
></el-option>
|
||||
<el-select :disabled="true" v-model="item.situation" placeholder="请输入就业情况" clearable :style="{ width: '100%' }">
|
||||
<el-option v-for="(items, indexs) in workLists" :key="indexs" :label="items.name" :value="items.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="技能特长" prop="field119">
|
||||
<el-input
|
||||
v-model="item.skills"
|
||||
placeholder="请输入技能特长"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="item.skills" placeholder="请输入技能特长" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -216,35 +136,20 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年龄" prop="field134">
|
||||
<el-input
|
||||
v-model="item.age"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="item.age" clearable :disabled="true" :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="哺乳方式" prop="feeding">
|
||||
<el-radio-group v-model="item.feeding" size="medium">
|
||||
<el-radio
|
||||
v-for="(items, indexs) in datas.feedsList"
|
||||
:key="index"
|
||||
:label="items.value"
|
||||
>{{ items.label }}</el-radio
|
||||
>
|
||||
<el-radio v-for="(items, indexs) in datas.feedsList" :key="index" :label="items.value">{{ items.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="备注" prop="field157">
|
||||
<el-input
|
||||
v-model="item.notes"
|
||||
placeholder="请输入备注"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="item.notes" placeholder="请输入备注" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -254,23 +159,13 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年龄" prop="field134">
|
||||
<el-input
|
||||
v-model="item.age"
|
||||
clearable
|
||||
:disabled="true"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="item.age" clearable :disabled="true" :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="formData.child_arr[index].age >= 3">
|
||||
<el-form-item label="年级" prop="grade">
|
||||
<el-input
|
||||
v-model="item.grade"
|
||||
placeholder="请输入年级"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="item.grade" placeholder="请输入年级" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -284,38 +179,25 @@
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="item.is_lesson">
|
||||
<el-form-item label="补课情况" prop="lessons">
|
||||
<el-input
|
||||
v-model="item.lessons"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="item.lessons" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="备注" prop="field138">
|
||||
<el-input
|
||||
v-model="item.notes"
|
||||
placeholder="请输入备注"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-input v-model="item.notes" placeholder="请输入备注" clearable :style="{ width: '100%' }">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<component v-for="(item, card_index) in formData.datas" :key="item.id" :is="isComponent(item.category_child || item.category_id)" :datas="item" :update_time="item.update_time"></component>
|
||||
|
||||
<component
|
||||
v-for="(item, card_index) in formData.datas"
|
||||
:key="item.id"
|
||||
:is="isComponent(item.category_child || item.category_id)"
|
||||
:datas="item.datas"
|
||||
:update_time="item.update_time"
|
||||
></component>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="test">
|
||||
@ -714,7 +596,7 @@ fileManageDetil({ id: route.query.id }).then(async (res) => {
|
||||
formData.brigade_name +
|
||||
formData.address;
|
||||
|
||||
console.log(formData);
|
||||
// console.log(formData);
|
||||
// await getCityList();
|
||||
// await getAreaList();
|
||||
// await getStreetList();
|
||||
|
@ -100,6 +100,23 @@
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.aianalyse_status==1"
|
||||
v-perms="['user_informationg.user_informationg/details']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: 'user_informationg/details',
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
}"
|
||||
>
|
||||
查看商机
|
||||
</router-link>
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['user_informationg.user_informationg/details']"
|
||||
type="primary"
|
||||
|
@ -59,6 +59,8 @@
|
||||
<div class="mt-4">
|
||||
<el-table
|
||||
:data="pager.lists"
|
||||
default-expand-all
|
||||
:expand-all="true"
|
||||
@selection-change="handleSelectionChange"
|
||||
row-key="id"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
|
Loading…
x
Reference in New Issue
Block a user