|
@@ -0,0 +1,518 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-table border :data="dueDiligenceList">
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="尽调名称" align="center" prop="investigateName" />
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ label="尽调人员"
|
|
|
+ align="center"
|
|
|
+ prop="investigatePerson"
|
|
|
+ />
|
|
|
+ <el-table-column label="尽调费用" align="center" prop="investigateCost" />
|
|
|
+ <el-table-column label="描述" align="center" prop="describe" />
|
|
|
+ <el-table-column label="备注" align="center" prop="remark" />
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTime" />
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- <el-button
|
|
|
+ class="custom-blue-color"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ >查看尽调报告</el-button
|
|
|
+ > -->
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ <!-- <el-button
|
|
|
+ class="custom-red-color"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ >删除</el-button
|
|
|
+ > -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 添加或修改尽调申请 -->
|
|
|
+ <el-dialog
|
|
|
+ :title="dueDiligenceTit"
|
|
|
+ :visible.sync="dueDiligenceOpen"
|
|
|
+ width="1000px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ ref="dueForm"
|
|
|
+ class="special-el-form"
|
|
|
+ :model="dueForm"
|
|
|
+ :rules="dueRules"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
+ <el-form-item label="尽调名称" prop="investigateName">
|
|
|
+ <el-input
|
|
|
+ :disabled="dueDiligenceType === '3'"
|
|
|
+ v-model="dueForm.investigateName"
|
|
|
+ placeholder="请输入尽调名称"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="项目名称" prop="projectName">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="dueForm.projectName"
|
|
|
+ />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="尽调人员" prop="investigatePerson">
|
|
|
+ <div
|
|
|
+ class="el-input__inner inputSimulation"
|
|
|
+ @click="userVisible = true"
|
|
|
+ :class="{ show_disabled: dueDiligenceType === '3' }"
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ dueForm.investigatePerson
|
|
|
+ ? dueForm.investigatePerson
|
|
|
+ : "请选择尽调人员"
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="尽调费用" prop="investigateCost">
|
|
|
+ <el-input
|
|
|
+ :disabled="dueDiligenceType === '3'"
|
|
|
+ v-model="dueForm.investigateCost"
|
|
|
+ placeholder="请输入尽调费用"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="文件" prop="file" class="special-el-form-item">
|
|
|
+ <fileItem
|
|
|
+ :class="{ show_disabled: dueDiligenceType === '3' }"
|
|
|
+ ref="fileItems"
|
|
|
+ :id="dueForm.id"
|
|
|
+ @getFileList="getFileList"
|
|
|
+ ></fileItem>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="描述"
|
|
|
+ prop="describe"
|
|
|
+ class="special-el-form-item"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ :disabled="dueDiligenceType === '3'"
|
|
|
+ rows="4"
|
|
|
+ v-model="dueForm.describe"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remark" class="special-el-form-item">
|
|
|
+ <el-input
|
|
|
+ :disabled="dueDiligenceType === '3'"
|
|
|
+ rows="4"
|
|
|
+ type="textarea"
|
|
|
+ v-model="dueForm.remark"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitDueForm">确 定</el-button>
|
|
|
+ <el-button @click="cancelDueForm">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 添加或修改尽调报告 -->
|
|
|
+ <el-dialog
|
|
|
+ :title="dueDiligenceTit1"
|
|
|
+ :visible.sync="dueDiligenceOpen1"
|
|
|
+ width="1000px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <h3>尽调申请详情</h3>
|
|
|
+ <el-divider></el-divider>
|
|
|
+ <el-form
|
|
|
+ ref="duePeportForm"
|
|
|
+ class="special-el-form"
|
|
|
+ :model="duePeportForm"
|
|
|
+ :rules="dueRules1"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
+ <el-form-item label="尽调名称">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="dueForm.investigateName"
|
|
|
+ placeholder="请输入尽调名称"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="项目名称">
|
|
|
+ <el-input disabled v-model="dueForm.projectName" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="尽调人员">
|
|
|
+ <el-input disabled v-model="dueForm.investigatePerson" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="尽调费用">
|
|
|
+ <el-input disabled v-model="dueForm.investigateCost" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="文件" class="special-el-form-item">
|
|
|
+ <fileItem
|
|
|
+ class="show_disabled"
|
|
|
+ ref="fileItems1"
|
|
|
+ :id="dueForm.id"
|
|
|
+ @getFileList="getFileList"
|
|
|
+ ></fileItem>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="描述" class="special-el-form-item">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ rows="4"
|
|
|
+ v-model="dueForm.describe"
|
|
|
+ type="textarea"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" class="special-el-form-item">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ rows="4"
|
|
|
+ type="textarea"
|
|
|
+ v-model="dueForm.remark"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <h3>尽调报告</h3>
|
|
|
+ <el-divider></el-divider>
|
|
|
+ <el-form-item
|
|
|
+ label="文件"
|
|
|
+ prop="listFile"
|
|
|
+ class="special-el-form-item"
|
|
|
+ >
|
|
|
+ <fileItem
|
|
|
+ ref="reportFileItems"
|
|
|
+ :id="duePeportForm.id"
|
|
|
+ @getFileList="getreportFileList"
|
|
|
+ ></fileItem>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remark" class="special-el-form-item">
|
|
|
+ <el-input
|
|
|
+ rows="4"
|
|
|
+ type="textarea"
|
|
|
+ v-model="duePeportForm.remark"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitduePeportForm"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="cancelduePeportForm">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!--选择人员-->
|
|
|
+ <el-dialog
|
|
|
+ title="选择人员"
|
|
|
+ :visible.sync="userVisible"
|
|
|
+ width="60%"
|
|
|
+ :show-close="false"
|
|
|
+ >
|
|
|
+ <flow-user
|
|
|
+ :checkType="checkType"
|
|
|
+ :selectValues="selectValues"
|
|
|
+ @handleUserSelect="handleUserSelect"
|
|
|
+ ></flow-user>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="userVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="checkUserComplete">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { getInvestigatelist, getlistProjectPoolId } from "@/api/invest/pool";
|
|
|
+import projectItem from "./projectItem";
|
|
|
+import fileItem from "./fileItem";
|
|
|
+import selecDept from "./selecDept";
|
|
|
+import FlowUser from "@/components/flow/User";
|
|
|
+
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ projectId: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ dicts: ["up_way", "project_stage"],
|
|
|
+ components: { projectItem, fileItem, selecDept, FlowUser },
|
|
|
+ data() {
|
|
|
+ const validateLogo = (rule, value, callback) => {
|
|
|
+ if (this.reportFileList.length <= 0) {
|
|
|
+ callback(new Error("请上传文件"));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ return {
|
|
|
+ // 人员选择器
|
|
|
+ checkType: "multiple",
|
|
|
+ // 数据回显
|
|
|
+ selectValues: null,
|
|
|
+ userVisible: false,
|
|
|
+ dueDiligenceList: [],
|
|
|
+ total: null,
|
|
|
+ user: {
|
|
|
+ userId: null,
|
|
|
+ nickName: null,
|
|
|
+ },
|
|
|
+ dueDiligenceTit: "",
|
|
|
+ dueDiligenceOpen: false,
|
|
|
+ dueDiligenceTit1: "",
|
|
|
+ dueDiligenceOpen1: false,
|
|
|
+ duePeportForm: {
|
|
|
+ createBy: null,
|
|
|
+ createTime: null,
|
|
|
+ deptId: null,
|
|
|
+ deptName: null,
|
|
|
+ id: null,
|
|
|
+ investigatePerson: null,
|
|
|
+ investigatePersonId: null,
|
|
|
+ listFile: null,
|
|
|
+ projectInvestigateId: null,
|
|
|
+ remark: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null,
|
|
|
+ },
|
|
|
+ dueForm: {
|
|
|
+ id: null,
|
|
|
+ investigateName: null,
|
|
|
+ investigateCode: null,
|
|
|
+ projectPoolId: null,
|
|
|
+ investigatePerson: null,
|
|
|
+ investigatePersonId: null,
|
|
|
+ investigateCost: null,
|
|
|
+ describe: null,
|
|
|
+ remark: null,
|
|
|
+ delFlag: null,
|
|
|
+ createBy: null,
|
|
|
+ createTime: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null,
|
|
|
+ projectPoolId: null,
|
|
|
+ projectName: null,
|
|
|
+ },
|
|
|
+ dueRules1: {
|
|
|
+ listFile: [{ required: true, validator: validateLogo }],
|
|
|
+ remark: [{ required: true, trigger: "blur", message: "请输入" }],
|
|
|
+ },
|
|
|
+ dueRules: {
|
|
|
+ investigateName: [
|
|
|
+ { required: true, trigger: "blur", message: "请输入" },
|
|
|
+ ],
|
|
|
+ projectName: [{ required: true, trigger: "blur", message: "请输入" }],
|
|
|
+ investigatePerson: [
|
|
|
+ { required: true, trigger: "blur", message: "请选择" },
|
|
|
+ ],
|
|
|
+ investigateCost: [
|
|
|
+ { required: true, trigger: "blur", message: "请输入" },
|
|
|
+ ],
|
|
|
+ describe: [{ required: true, trigger: "blur", message: "请输入" }],
|
|
|
+ },
|
|
|
+ fileList: [],
|
|
|
+ reportFileList: [],
|
|
|
+ dueDiligenceType: "0",
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 查询文件资料列表 */
|
|
|
+ getList() {
|
|
|
+ // this.loading = true;
|
|
|
+ getInvestigatelist(this.projectId).then((response) => {
|
|
|
+ this.dueDiligenceList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ // this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 修改尽调申请
|
|
|
+ handleUpdate(row) {
|
|
|
+ let that = this;
|
|
|
+ this.resetDueForm();
|
|
|
+ const id = row.projectPoolId;
|
|
|
+ getlistProjectPoolId(id).then((response) => {
|
|
|
+ if (response.tProjectInvestigate) {
|
|
|
+ this.dueForm = response.tProjectInvestigate;
|
|
|
+ this.dueDiligenceTit = "修改尽调申请";
|
|
|
+ this.dueDiligenceOpen = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$refs.fileItems.getListFileBusinessId(this.dueForm.id);
|
|
|
+ }, 300);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /*用户选中赋值*/
|
|
|
+ checkUserComplete() {
|
|
|
+ this.userVisible = false;
|
|
|
+ this.checkType = "";
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取fileList
|
|
|
+ getFileList(fileList) {
|
|
|
+ this.fileList = fileList;
|
|
|
+ },
|
|
|
+ getreportFileList(fileList) {
|
|
|
+ this.reportFileList = fileList;
|
|
|
+ },
|
|
|
+ // 用户选中数据
|
|
|
+ handleUserSelect(selection) {
|
|
|
+ const that = this;
|
|
|
+ if (selection) {
|
|
|
+ if (selection instanceof Array) {
|
|
|
+ const userIds = selection.map((item) => item.userId);
|
|
|
+ const nickName = selection.map((item) => item.nickName);
|
|
|
+ this.dueForm.investigatePerson = nickName.join(",");
|
|
|
+ this.dueForm.investigatePersonId = userIds.join(",");
|
|
|
+ } else {
|
|
|
+ this.dueForm.investigatePerson = selection.nickName;
|
|
|
+ this.dueForm.investigatePersonId = selection.userId;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 发起尽调申请
|
|
|
+ handleSurvey(type, row) {
|
|
|
+ let that = this;
|
|
|
+ this.dueDiligenceType = type;
|
|
|
+ //type 1=发起 2=修改 3=上传
|
|
|
+ if (type === "1") {
|
|
|
+ this.resetDueForm();
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$refs.fileItems.fileList = [];
|
|
|
+ }, 300);
|
|
|
+ this.dueDiligenceTit = "发起尽调申请";
|
|
|
+ this.dueDiligenceOpen = true;
|
|
|
+ } else if (type === "2") {
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$refs.fileItems.getListFileBusinessId(this.dueForm.id);
|
|
|
+ }, 300);
|
|
|
+ this.dueDiligenceTit = "修改尽调申请";
|
|
|
+ this.dueDiligenceOpen = true;
|
|
|
+ } else if (type === "3") {
|
|
|
+ this.duePeportForm.projectInvestigateId = this.dueForm.id;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$refs.reportFileItems.fileList = [];
|
|
|
+ that.$refs.reportFileItems.getListFileBusinessId(
|
|
|
+ this.duePeportForm.id
|
|
|
+ );
|
|
|
+ that.$refs.fileItems1.getListFileBusinessId(this.dueForm.id);
|
|
|
+ }, 300);
|
|
|
+ this.dueDiligenceTit1 = "上传尽调报告";
|
|
|
+ getProjectInvestigateId(this.dueForm.id).then((response) => {
|
|
|
+ if (response.data) {
|
|
|
+ this.duePeportForm = response.data;
|
|
|
+ }
|
|
|
+ this.dueDiligenceOpen1 = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.dueForm.projectName = row.projectName;
|
|
|
+ this.dueForm.projectPoolId = row.id;
|
|
|
+ },
|
|
|
+ // 尽调报告
|
|
|
+ submitduePeportForm() {
|
|
|
+ this.$refs["duePeportForm"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.duePeportForm.projectPoolId = this.dueForm.projectPoolId;
|
|
|
+ this.duePeportForm.listFile = this.reportFileList;
|
|
|
+ addInvestigatePerson(this.duePeportForm).then((response) => {
|
|
|
+ this.$modal.msgSuccess("操作成功");
|
|
|
+ this.dueDiligenceOpen1 = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancelduePeportForm() {
|
|
|
+ this.dueDiligenceOpen1 = false;
|
|
|
+ this.resetduePeportForm();
|
|
|
+ },
|
|
|
+ resetduePeportForm() {
|
|
|
+ this.duePeportForm = {
|
|
|
+ createBy: null,
|
|
|
+ createTime: null,
|
|
|
+ deptId: null,
|
|
|
+ deptName: null,
|
|
|
+ id: null,
|
|
|
+ investigatePerson: null,
|
|
|
+ investigatePersonId: null,
|
|
|
+ listFile: null,
|
|
|
+ remark: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null,
|
|
|
+ projectInvestigateId: this.dueForm.id,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ // 尽调申请
|
|
|
+ submitDueForm() {
|
|
|
+ this.$refs["dueForm"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.dueForm.listFile = this.fileList;
|
|
|
+ if (this.dueForm.id != null) {
|
|
|
+ updateInvestigate(this.dueForm).then((response) => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.dueDiligenceOpen = false;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ addInvestigate(this.dueForm).then((response) => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.dueDiligenceOpen = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancelDueForm() {
|
|
|
+ this.dueDiligenceOpen = false;
|
|
|
+ this.resetDueForm();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ resetDueForm() {
|
|
|
+ this.dueForm = {
|
|
|
+ id: null,
|
|
|
+ investigateName: null,
|
|
|
+ investigateCode: null,
|
|
|
+ projectPoolId: null,
|
|
|
+ investigatePerson: null,
|
|
|
+ investigatePersonId: null,
|
|
|
+ investigateCost: null,
|
|
|
+ describe: null,
|
|
|
+ remark: null,
|
|
|
+ delFlag: null,
|
|
|
+ createBy: null,
|
|
|
+ createTime: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null,
|
|
|
+ projectPoolId: null,
|
|
|
+ projectName: null,
|
|
|
+ };
|
|
|
+ this.resetForm("dueForm");
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ const idsName = row.fileName ? row.fileName : this.idsName;
|
|
|
+ this.$modal
|
|
|
+ .confirm('是否确认删除"' + idsName + '"?')
|
|
|
+ .then(function () {
|
|
|
+ // return delInformation(ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|