|
@@ -1,6 +1,16 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-row :gutter="10" class="mb8" v-if="this.source == 'BoDetails' ? this.bo.winningState == 0 ? true : false : true">
|
|
|
+ <el-row
|
|
|
+ :gutter="10"
|
|
|
+ class="mb8"
|
|
|
+ v-if="
|
|
|
+ this.source == 'BoDetails'
|
|
|
+ ? this.bo.winningState == 0
|
|
|
+ ? true
|
|
|
+ : false
|
|
|
+ : true
|
|
|
+ "
|
|
|
+ >
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -8,9 +18,11 @@
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
- >新增</el-button>
|
|
|
+ v-if="this.boAuthority.boAuthority.taskAdd"
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="success"
|
|
|
plain
|
|
@@ -18,7 +30,8 @@
|
|
|
size="mini"
|
|
|
:disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
- >修改</el-button>
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -28,69 +41,123 @@
|
|
|
size="mini"
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
- >删除</el-button>
|
|
|
- </el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </el-col> -->
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="taskList" @selection-change="handleSelectionChange" >
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="taskList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<!-- <el-table-column label="商机id" align="center" prop="bo" v-if="source == 'Task'"/> -->
|
|
|
- <el-table-column label="商机名称" align="center" prop="boName" v-if="source == 'Task'"/>
|
|
|
+ <el-table-column
|
|
|
+ label="商机名称"
|
|
|
+ align="center"
|
|
|
+ prop="boName"
|
|
|
+ v-if="source == 'Task'"
|
|
|
+ />
|
|
|
<el-table-column label="商机阶段" align="center" prop="boStage">
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.mk_bo_stage" :value="scope.row.boStage"/>
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.mk_bo_stage"
|
|
|
+ :value="scope.row.boStage"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="客户名称" align="center" prop="customerName" v-if="source == 'Task'"/>
|
|
|
+ <el-table-column
|
|
|
+ label="客户名称"
|
|
|
+ align="center"
|
|
|
+ prop="customerName"
|
|
|
+ v-if="source == 'Task'"
|
|
|
+ />
|
|
|
<el-table-column label="任务编码" align="center" prop="code" />
|
|
|
<el-table-column label="任务名称" align="center" prop="name" />
|
|
|
- <el-table-column label="任务类型" align="center" prop="type" >
|
|
|
+ <el-table-column label="任务类型" align="center" prop="type">
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.mk_bo_tasktype" :value="scope.row.type"/>
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.mk_bo_tasktype"
|
|
|
+ :value="scope.row.type"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="任务状态" align="center" prop="state" >
|
|
|
+ <el-table-column label="任务状态" align="center" prop="state">
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.mk_bo_taskstate" :value="scope.row.state"/>
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.mk_bo_taskstate"
|
|
|
+ :value="scope.row.state"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="联系人" align="center" prop="linkmanName" />
|
|
|
- <el-table-column label="销售组织名称" align="center" prop="salesOrgName" />
|
|
|
+ <el-table-column
|
|
|
+ label="销售组织名称"
|
|
|
+ align="center"
|
|
|
+ prop="salesOrgName"
|
|
|
+ />
|
|
|
<el-table-column label="部门名称" align="center" prop="deptName" />
|
|
|
<el-table-column label="负责人名称" align="center" prop="staffName" />
|
|
|
- <el-table-column label="截止时间" align="center" prop="deadlineTime" width="180">
|
|
|
+ <el-table-column
|
|
|
+ label="截止时间"
|
|
|
+ align="center"
|
|
|
+ prop="deadlineTime"
|
|
|
+ width="180"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.deadlineTime, '{y}-{m}-{d}') }}</span>
|
|
|
+ <span>{{ parseTime(scope.row.deadlineTime, "{y}-{m}-{d}") }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="任务内容" align="center" prop="content" />
|
|
|
- <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" v-if="this.source == 'BoDetails' ? this.bo.winningState == 0 ? true : false : true">
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ fixed="right"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ v-if="
|
|
|
+ this.source == 'BoDetails'
|
|
|
+ ? this.bo.winningState == 0
|
|
|
+ ? true
|
|
|
+ : false
|
|
|
+ : true
|
|
|
+ "
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
- >修改</el-button>
|
|
|
+ :disabled="!boAuthority.boAuthority.taskEdit"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-view"
|
|
|
@click="handleBrowse(scope.row)"
|
|
|
- >查看</el-button>
|
|
|
+ :disabled="!boAuthority.boAuthority.taskView"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
- >删除</el-button>
|
|
|
+ :disabled="!boAuthority.boAuthority.taskDel"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
|
- v-show="total>0"
|
|
|
+ v-show="total > 0"
|
|
|
:total="total"
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
:limit.sync="queryParams.pageSize"
|
|
@@ -98,16 +165,35 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改任务对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px" :disabled="this.operatingState == 'Browse'">
|
|
|
+ <el-dialog
|
|
|
+ :title="title"
|
|
|
+ :visible.sync="open"
|
|
|
+ width="1000px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ ref="form"
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ label-width="80px"
|
|
|
+ :disabled="this.operatingState == 'Browse'"
|
|
|
+ >
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="商机名称" prop="boName">
|
|
|
- <el-input v-model="form.boName" placeholder="请输入商机名称" :disabled="this.source == 'BoDetails'"/>
|
|
|
+ <el-input
|
|
|
+ v-model="form.boName"
|
|
|
+ placeholder="请输入商机名称"
|
|
|
+ :disabled="this.source == 'BoDetails'"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="商机阶段" prop="boStage" v-if="source == 'Task'">
|
|
|
+ <el-form-item
|
|
|
+ label="商机阶段"
|
|
|
+ prop="boStage"
|
|
|
+ v-if="source == 'Task'"
|
|
|
+ >
|
|
|
<el-select v-model="form.boStage" placeholder="请输入商机阶段">
|
|
|
<el-option
|
|
|
v-for="dict in dict.type.mk_bo_stage"
|
|
@@ -120,8 +206,17 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="客户" prop="customerName">
|
|
|
- <el-input v-model="form.customerName" placeholder="请输入客户" :disabled="this.source == 'BoDetails'">
|
|
|
- <el-button slot="append" icon="el-icon-more" @click="refereCustomer" :disabled="this.source == 'BoDetails'"></el-button>
|
|
|
+ <el-input
|
|
|
+ v-model="form.customerName"
|
|
|
+ placeholder="请输入客户"
|
|
|
+ :disabled="this.source == 'BoDetails'"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ slot="append"
|
|
|
+ icon="el-icon-more"
|
|
|
+ @click="refereCustomer"
|
|
|
+ :disabled="this.source == 'BoDetails'"
|
|
|
+ ></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -130,7 +225,11 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="任务编码" prop="code">
|
|
|
- <el-input v-model="form.code" placeholder="系统自动生成编码" :disabled="true"/>
|
|
|
+ <el-input
|
|
|
+ v-model="form.code"
|
|
|
+ placeholder="系统自动生成编码"
|
|
|
+ :disabled="true"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
@@ -154,21 +253,25 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="开始时间" prop="startTime">
|
|
|
- <el-date-picker clearable
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
v-model="form.startTime"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选开始时间">
|
|
|
+ placeholder="请选开始时间"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="截止时间" prop="deadlineTime">
|
|
|
- <el-date-picker clearable
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
v-model="form.deadlineTime"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择截止时间">
|
|
|
+ placeholder="请选择截止时间"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -188,8 +291,12 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="联系人" prop="linkmanName">
|
|
|
- <el-input v-model="form.linkmanName" >
|
|
|
- <el-button slot="append" icon="el-icon-more" @click="refereContact"></el-button>
|
|
|
+ <el-input v-model="form.linkmanName">
|
|
|
+ <el-button
|
|
|
+ slot="append"
|
|
|
+ icon="el-icon-more"
|
|
|
+ @click="refereContact"
|
|
|
+ ></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -198,21 +305,35 @@
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="销售组织" prop="salesOrgName">
|
|
|
<el-input v-model="form.salesOrgName" :disabled="true">
|
|
|
- <el-button slot="append" icon="el-icon-more" @click="refereOrg" :disabled="true"></el-button>
|
|
|
+ <el-button
|
|
|
+ slot="append"
|
|
|
+ icon="el-icon-more"
|
|
|
+ @click="refereOrg"
|
|
|
+ :disabled="true"
|
|
|
+ ></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="部门" prop="deptName">
|
|
|
<el-input v-model="form.deptName" :disabled="true">
|
|
|
- <el-button slot="append" icon="el-icon-more" @click="refereDept" :disabled="true"></el-button>
|
|
|
+ <el-button
|
|
|
+ slot="append"
|
|
|
+ icon="el-icon-more"
|
|
|
+ @click="refereDept"
|
|
|
+ :disabled="true"
|
|
|
+ ></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="负责人" prop="staffName">
|
|
|
<el-input v-model="form.staffName">
|
|
|
- <el-button slot="append" icon="el-icon-more" @click="refereStaff"></el-button>
|
|
|
+ <el-button
|
|
|
+ slot="append"
|
|
|
+ icon="el-icon-more"
|
|
|
+ @click="refereStaff"
|
|
|
+ ></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -223,32 +344,54 @@
|
|
|
:rows="2"
|
|
|
placeholder="请输入任务内容"
|
|
|
autosize
|
|
|
- v-model="form.content">
|
|
|
+ v-model="form.content"
|
|
|
+ >
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <BehaviorList :key="timer" :source="'TaskList'" :bo="this.form" v-if="this.operatingState != 'Insert'"/>
|
|
|
+ <BehaviorList
|
|
|
+ :key="timer"
|
|
|
+ :source="'TaskList'"
|
|
|
+ :bo="this.form"
|
|
|
+ v-if="this.operatingState != 'Insert'"
|
|
|
+ />
|
|
|
<div class="md-auditInfo">
|
|
|
<el-divider content-position="left">其它信息</el-divider>
|
|
|
<el-form :inline="true" label-position="right" :model="form">
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="创建人">
|
|
|
- <el-input v-model="form.createBy" size="small" readonly></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="form.createByName"
|
|
|
+ size="small"
|
|
|
+ readonly
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="创建时间">
|
|
|
- <el-input v-model="form.createTime" size="small" readonly></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="form.createTime"
|
|
|
+ size="small"
|
|
|
+ readonly
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="修改人">
|
|
|
- <el-input v-model="form.updateBy" size="small" readonly></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="form.updateByName"
|
|
|
+ size="small"
|
|
|
+ readonly
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="修改时间">
|
|
|
- <el-input v-model="form.updateTime" size="small" readonly></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="form.updateTime"
|
|
|
+ size="small"
|
|
|
+ readonly
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -256,7 +399,12 @@
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm" v-if="this.operatingState != 'Browse'">确 定</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="submitForm"
|
|
|
+ v-if="this.operatingState != 'Browse'"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -274,11 +422,7 @@
|
|
|
:outerQueryParams="this.bo"
|
|
|
/>
|
|
|
<!-- 组织参照 -->
|
|
|
- <OrgRef
|
|
|
- ref="orgSelect"
|
|
|
- @doSubmit="orgSelectionsToInput"
|
|
|
- :single="true"
|
|
|
- />
|
|
|
+ <OrgRef ref="orgSelect" @doSubmit="orgSelectionsToInput" :single="true" />
|
|
|
<!-- 部门参照 -->
|
|
|
<DeptRef
|
|
|
ref="deptSelect"
|
|
@@ -295,21 +439,33 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listTask, getTask, delTask, addTask, updateTask } from "@/api/business/spd/bo/task";
|
|
|
+import {
|
|
|
+ listTask,
|
|
|
+ getTask,
|
|
|
+ delTask,
|
|
|
+ addTask,
|
|
|
+ updateTask,
|
|
|
+} from "@/api/business/spd/bo/task";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
-import CustomerRef from '@/views/business/spd/bo/refer/customer/index.vue';
|
|
|
-import ContactRef from '@/views/business/spd/bo/refer/contact/index.vue';
|
|
|
-import OrgRef from '@/views/business/spd/bo/refer/org/index.vue';
|
|
|
-import DeptRef from '@/views/business/spd/bo/refer/dept/index.vue';
|
|
|
-import StaffRef from '@/views/business/spd/bo/refer/staff/index.vue';
|
|
|
-import BehaviorList from '../behavior/behaviorList.vue'
|
|
|
-
|
|
|
+import CustomerRef from "@/views/business/spd/bo/refer/customer/index.vue";
|
|
|
+import ContactRef from "@/views/business/spd/bo/refer/contact/index.vue";
|
|
|
+import OrgRef from "@/views/business/spd/bo/refer/org/index.vue";
|
|
|
+import DeptRef from "@/views/business/spd/bo/refer/dept/index.vue";
|
|
|
+import StaffRef from "@/views/business/spd/bo/refer/staff/index.vue";
|
|
|
+import BehaviorList from "../behavior/behaviorList.vue";
|
|
|
|
|
|
export default {
|
|
|
name: "TaskList",
|
|
|
- props:["source","bo"],
|
|
|
- dicts: ['mk_bo_taskstate','mk_bo_tasktype','mk_bo_stage'],
|
|
|
- components: {CustomerRef,ContactRef,OrgRef,DeptRef,StaffRef,BehaviorList},
|
|
|
+ props: ["source", "bo", "boAuthority"],
|
|
|
+ dicts: ["mk_bo_taskstate", "mk_bo_tasktype", "mk_bo_stage"],
|
|
|
+ components: {
|
|
|
+ CustomerRef,
|
|
|
+ ContactRef,
|
|
|
+ OrgRef,
|
|
|
+ DeptRef,
|
|
|
+ StaffRef,
|
|
|
+ BehaviorList,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
@@ -361,53 +517,56 @@ export default {
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
customerName: [
|
|
|
- { required: true, message: "客户不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "客户不能为空", trigger: "blur" },
|
|
|
],
|
|
|
name: [
|
|
|
- { required: true, message: "任务名称不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "任务名称不能为空", trigger: "blur" },
|
|
|
],
|
|
|
state: [
|
|
|
- { required: true, message: "任务状态不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "任务状态不能为空", trigger: "blur" },
|
|
|
],
|
|
|
type: [
|
|
|
- { required: true, message: "任务类型不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "任务类型不能为空", trigger: "blur" },
|
|
|
],
|
|
|
linkmanName: [
|
|
|
- { required: true, message: "联系人不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "联系人不能为空", trigger: "blur" },
|
|
|
],
|
|
|
staffName: [
|
|
|
- { required: true, message: "负责人不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "负责人不能为空", trigger: "blur" },
|
|
|
],
|
|
|
startTime: [
|
|
|
- { required: true, message: "开始时间不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "开始时间不能为空", trigger: "blur" },
|
|
|
],
|
|
|
deadlineTime: [
|
|
|
- { required: true, message: "截止时间不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "截止时间不能为空", trigger: "blur" },
|
|
|
],
|
|
|
content: [
|
|
|
- { required: true, message: "任务内容不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "任务内容不能为空", trigger: "blur" },
|
|
|
],
|
|
|
},
|
|
|
//重新加载子组件参数
|
|
|
- timer: '',
|
|
|
+ timer: "",
|
|
|
//当前操作状态
|
|
|
- operatingState: '',
|
|
|
+ operatingState: "",
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- if(this.source == 'BoDetails'){
|
|
|
+ if (this.source == "BoDetails") {
|
|
|
this.queryParams.bo = this.bo.id;
|
|
|
+ let params = {"post":this.boAuthority.post};
|
|
|
+ this.queryParams.params = params;
|
|
|
}
|
|
|
- if(this.source == 'Task'){
|
|
|
+ if (this.source == "Task") {
|
|
|
this.queryParams = this.bo;
|
|
|
}
|
|
|
this.getList();
|
|
|
+ console.log('this.boAuthority',this.boAuthority);
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询任务列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listTask(this.queryParams).then(response => {
|
|
|
+ listTask(this.queryParams).then((response) => {
|
|
|
this.taskList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -447,7 +606,7 @@ export default {
|
|
|
createTime: null,
|
|
|
updateBy: null,
|
|
|
updateTime: null,
|
|
|
- delFlag: null
|
|
|
+ delFlag: null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -463,22 +622,23 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
- this.multiple = !selection.length
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.operatingState = "Insert";
|
|
|
this.reset();
|
|
|
- if(this.source == 'BoDetails'){
|
|
|
+ if (this.source == "BoDetails") {
|
|
|
this.form.bo = this.bo.id;
|
|
|
this.form.boName = this.bo.boName;
|
|
|
this.form.boStage = this.bo.boStage;
|
|
|
this.form.customer = this.bo.customer;
|
|
|
this.form.customerName = this.bo.customerName;
|
|
|
+ this.form.startTime = new Date();
|
|
|
}
|
|
|
- this.form.state = '0';
|
|
|
+ this.form.state = "0";
|
|
|
this.open = true;
|
|
|
this.title = "添加任务";
|
|
|
},
|
|
@@ -486,8 +646,8 @@ export default {
|
|
|
handleUpdate(row) {
|
|
|
this.operatingState = "Update";
|
|
|
this.reset();
|
|
|
- const id = row.id || this.ids
|
|
|
- getTask(id).then(response => {
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getTask(id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改任务";
|
|
@@ -497,8 +657,8 @@ export default {
|
|
|
/** 查看按钮操作 */
|
|
|
handleBrowse(row) {
|
|
|
this.reset();
|
|
|
- const id = row.id || this.ids
|
|
|
- getTask(id).then(response => {
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getTask(id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.operatingState = "Browse";
|
|
@@ -507,16 +667,16 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- updateTask(this.form).then(response => {
|
|
|
+ updateTask(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- addTask(this.form).then(response => {
|
|
|
+ addTask(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -528,68 +688,76 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除任务编号为"' + ids + '"的数据项?').then(function() {
|
|
|
- return delTask(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ this.$modal
|
|
|
+ .confirm('是否确认删除任务编号为"' + ids + '"的数据项?')
|
|
|
+ .then(function () {
|
|
|
+ return delTask(ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- this.download('drp-business/task/export', {
|
|
|
- ...this.queryParams
|
|
|
- }, `task_${new Date().getTime()}.xlsx`)
|
|
|
+ this.download(
|
|
|
+ "drp-business/task/export",
|
|
|
+ {
|
|
|
+ ...this.queryParams,
|
|
|
+ },
|
|
|
+ `task_${new Date().getTime()}.xlsx`
|
|
|
+ );
|
|
|
},
|
|
|
// 触发客户参照列表
|
|
|
refereCustomer() {
|
|
|
- this.$refs.customerSelect.init()
|
|
|
+ this.$refs.customerSelect.init();
|
|
|
},
|
|
|
//客户参照列表选择后
|
|
|
- customerSelectionsToInput (selections) {
|
|
|
+ customerSelectionsToInput(selections) {
|
|
|
this.form.customer = selections[0].id;
|
|
|
this.form.customerName = selections[0].name;
|
|
|
},
|
|
|
// 触发联系人参照列表
|
|
|
refereContact() {
|
|
|
- this.$refs.contactSelect.init()
|
|
|
+ this.$refs.contactSelect.init();
|
|
|
},
|
|
|
//联系人参照列表选择后
|
|
|
- contactSelectionsToInput (selections) {
|
|
|
+ contactSelectionsToInput(selections) {
|
|
|
this.form.linkman = selections[0].id;
|
|
|
this.form.linkmanName = selections[0].name;
|
|
|
},
|
|
|
// 触发组织参照列表
|
|
|
refereOrg() {
|
|
|
- this.$refs.orgSelect.init()
|
|
|
+ this.$refs.orgSelect.init();
|
|
|
},
|
|
|
//组织参照列表选择后
|
|
|
- orgSelectionsToInput (selections) {
|
|
|
+ orgSelectionsToInput(selections) {
|
|
|
this.form.salesOrg = selections[0].deptId;
|
|
|
this.form.salesOrgName = selections[0].deptName;
|
|
|
},
|
|
|
// 触发部门参照列表
|
|
|
refereDept() {
|
|
|
- this.$refs.deptSelect.init()
|
|
|
+ this.$refs.deptSelect.init();
|
|
|
},
|
|
|
//部门参照列表选择后
|
|
|
- deptSelectionsToInput (selections) {
|
|
|
+ deptSelectionsToInput(selections) {
|
|
|
this.form.dept = selections[0].deptId;
|
|
|
this.form.deptName = selections[0].deptName;
|
|
|
},
|
|
|
// 触发员工参照列表
|
|
|
refereStaff() {
|
|
|
- this.$refs.staffSelect.init()
|
|
|
+ this.$refs.staffSelect.init();
|
|
|
},
|
|
|
//员工参照列表选择后
|
|
|
- staffSelectionsToInput (selections) {
|
|
|
+ staffSelectionsToInput(selections) {
|
|
|
this.form.staff = selections[0].userId;
|
|
|
this.form.staffName = selections[0].nickName;
|
|
|
this.form.dept = selections[0].deptId;
|
|
|
this.form.deptName = selections[0].deptName;
|
|
|
this.form.salesOrg = selections[0].orgId;
|
|
|
this.form.salesOrgName = selections[0].orgName;
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|