|
@@ -1,33 +1,15 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <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
|
|
|
+ <div class="btn_grooup" v-if="bo.winningState == 0 ? true : false">
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
plain
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
- v-if="this.boAuthority.boAuthority.taskAdd"
|
|
|
- >新增</el-button
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- <right-toolbar
|
|
|
- :showSearch.sync="showSearch"
|
|
|
- @queryTable="getList"
|
|
|
- ></right-toolbar>
|
|
|
- </el-row>
|
|
|
-
|
|
|
+ v-if="boAuthority.boAuthority.taskAdd"
|
|
|
+ >新增</el-button>
|
|
|
+ </div>
|
|
|
<el-table
|
|
|
v-loading="loading"
|
|
|
:data="taskList"
|
|
@@ -80,13 +62,7 @@
|
|
|
fixed="right"
|
|
|
align="center"
|
|
|
class-name="small-padding fixed-width"
|
|
|
- v-if="
|
|
|
- this.source == 'BoDetails'
|
|
|
- ? this.bo.winningState == 0
|
|
|
- ? true
|
|
|
- : false
|
|
|
- : true
|
|
|
- "
|
|
|
+ v-if="bo.winningState == 0 ? true : false"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -142,7 +118,7 @@
|
|
|
:model="form"
|
|
|
:rules="rules"
|
|
|
label-width="80px"
|
|
|
- :disabled="this.operatingState == 'Browse'"
|
|
|
+ :disabled="operatingState == 'Browse'"
|
|
|
>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
@@ -330,10 +306,10 @@
|
|
|
|
|
|
<BehaviorList
|
|
|
:key="timer"
|
|
|
- :source="'TaskList'"
|
|
|
- :bo="this.form"
|
|
|
+ :source="'Task'"
|
|
|
+ :query="form"
|
|
|
:boAuthority="boAuthority"
|
|
|
- v-if="this.operatingState == 'Browse'"
|
|
|
+ v-if="operatingState == 'Browse'"
|
|
|
/>
|
|
|
|
|
|
<div slot="footer">
|
|
@@ -341,7 +317,7 @@
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@click="submitForm"
|
|
|
- v-if="this.operatingState != 'Browse'"
|
|
|
+ v-if="operatingState != 'Browse'"
|
|
|
:disabled="submitButtonEditStatus"
|
|
|
>确 定</el-button
|
|
|
>
|
|
@@ -366,22 +342,14 @@ import {
|
|
|
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";
|
|
|
|
|
|
export default {
|
|
|
name: "TaskList",
|
|
|
- props: ["source", "bo", "boAuthority"],
|
|
|
+ props: ["bo", "boAuthority"],
|
|
|
dicts: ["mk_bo_taskstate", "mk_bo_tasktype", "mk_bo_stage"],
|
|
|
components: {
|
|
|
- CustomerRef,
|
|
|
- ContactRef,
|
|
|
- OrgRef,
|
|
|
- DeptRef,
|
|
|
StaffRef,
|
|
|
BehaviorList,
|
|
|
},
|
|
@@ -498,16 +466,11 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- if (this.source == "BoDetails") {
|
|
|
- this.queryParams.bo = this.bo.id;
|
|
|
- let params = {"post":this.boAuthority.post};
|
|
|
- this.queryParams.params = params;
|
|
|
- }
|
|
|
- if (this.source == "Task") {
|
|
|
- this.queryParams = this.bo;
|
|
|
- }
|
|
|
+ console.log("this.bo",this.bo);
|
|
|
+ this.queryParams.bo = this.bo.id;
|
|
|
+ let params = {"post":this.boAuthority.post};
|
|
|
+ this.queryParams.params = params;
|
|
|
this.getList();
|
|
|
- console.log('this.boAuthority',this.boAuthority);
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询任务列表 */
|
|
@@ -577,14 +540,12 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.operatingState = "Insert";
|
|
|
this.reset();
|
|
|
- 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.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.open = true;
|
|
|
this.title = "添加任务";
|
|
@@ -675,3 +636,11 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.btn_grooup {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+}
|
|
|
+</style>
|