|
@@ -57,6 +57,15 @@
|
|
|
v-if="(showWin && this.form.basic.winningState == 0) && this.boAuthority.boAuthority.boWin"
|
|
|
>赢单</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ plain
|
|
|
+ icon="el-icon-user"
|
|
|
+ size="small"
|
|
|
+ @click="allocation()"
|
|
|
+ v-if="this.boAuthority.post == 0"
|
|
|
+ >分配</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- 主多页签 -->
|
|
@@ -166,6 +175,7 @@
|
|
|
/>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
+
|
|
|
<!-- 赢单状态弹窗 -->
|
|
|
<el-dialog :title="winningStateTitle" :visible.sync="winningStateOpen" width="500px" append-to-body>
|
|
|
<el-form ref="wsform" :model="winningStateData" :rules="winningStateDataRules" label-width="140px">
|
|
@@ -236,14 +246,51 @@
|
|
|
<el-button @click="cancelWinningStateData">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 分配商机负责人对话框 -->
|
|
|
+ <el-dialog
|
|
|
+ title="分配商机负责人"
|
|
|
+ :visible.sync="allocationPopover"
|
|
|
+ width="500px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form ref="afform" :model="allocationForm" :rules="allocationFormRules" label-width="140px">
|
|
|
+ <el-form-item label="新负责人" prop="allocationStaff">
|
|
|
+ <dr-input-dialog
|
|
|
+ v-model="allocationForm.allocationStaffName"
|
|
|
+ title="员工"
|
|
|
+ type="CONTACTS_PARAM"
|
|
|
+ :dataMapping="{
|
|
|
+ allocationStaff: 'id',
|
|
|
+ allocationStaffName: 'name',
|
|
|
+ }"
|
|
|
+ :source.sync="allocationForm"
|
|
|
+ ></dr-input-dialog>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否将您作为参与人" prop="isParticipant">
|
|
|
+ <el-radio v-model="allocationForm.isParticipant" :label='true'
|
|
|
+ >是</el-radio
|
|
|
+ >
|
|
|
+ <el-radio v-model="allocationForm.isParticipant" :label='false'
|
|
|
+ >否</el-radio
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitAllocationForm"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="cancelAllocation">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
getBasic,
|
|
|
- delAccessory,
|
|
|
updateWinningState,
|
|
|
+ allocationParticipant,
|
|
|
} from "@/api/business/spd/bo/basic";
|
|
|
import { getBoNodeListByType } from "@/api/business/spd/bo/boNode";
|
|
|
import { getPsnPost } from "@/api/business/spd/bo/authority";
|
|
@@ -252,13 +299,14 @@ import ContactList from "../contact/contactList.vue";
|
|
|
import AccessoryList from "../basic/accessoryList.vue";
|
|
|
import FileTemplate from "../filetemplate/botabs.vue";
|
|
|
import Process from '../basic/process.vue';
|
|
|
+import DrInputDialog from "@/components/input-dialog/index.vue";
|
|
|
|
|
|
|
|
|
export default {
|
|
|
//名称
|
|
|
name: "BoDetails",
|
|
|
//注册引入的组件
|
|
|
- components: { TaskList, ContactList,AccessoryList,FileTemplate, Process},
|
|
|
+ components: { TaskList, ContactList,AccessoryList,FileTemplate, Process,DrInputDialog,},
|
|
|
//平台枚举
|
|
|
dicts: [
|
|
|
"mk_bo_type",
|
|
@@ -283,7 +331,7 @@ export default {
|
|
|
//赢单状态数据
|
|
|
winningStateData:{},
|
|
|
//赢单状态表单校验
|
|
|
- // 表单校验
|
|
|
+ // 赢单表单校验
|
|
|
winningStateDataRules: {
|
|
|
winningStateCause: [
|
|
|
{ required: true, message: "原因不能为空", trigger: "blur" }
|
|
@@ -316,6 +364,21 @@ export default {
|
|
|
timer: "",
|
|
|
//是否显示客户
|
|
|
showCustomer: false,
|
|
|
+ //分配参数
|
|
|
+ allocationForm: {
|
|
|
+ boId: null,
|
|
|
+ allocationStaff: null,
|
|
|
+ allocationStaffName: null,
|
|
|
+ isParticipant: true,
|
|
|
+ },
|
|
|
+ //分配表单校验
|
|
|
+ allocationFormRules: {
|
|
|
+ allocationStaff: [
|
|
|
+ { required: true, message: "新负责人不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ //分配弹窗
|
|
|
+ allocationPopover: false,
|
|
|
};
|
|
|
},
|
|
|
//方法
|
|
@@ -377,6 +440,31 @@ export default {
|
|
|
this.winningStateOpen = false;
|
|
|
this.resetWinningStateData();
|
|
|
},
|
|
|
+ //打开分配弹窗
|
|
|
+ allocation() {
|
|
|
+ this.allocationPopover = true;
|
|
|
+ },
|
|
|
+ //提交分配表单
|
|
|
+ submitAllocationForm() {
|
|
|
+ // this.allocationForm.boId = parseInt(this.form.basic.id);
|
|
|
+ // this.allocationForm.allocationStaff = parseInt(this.allocationForm.allocationStaff);
|
|
|
+ this.allocationForm.boId = this.form.basic.id;
|
|
|
+ console.log('this.allocationForm',this.allocationForm);
|
|
|
+ this.$refs["afform"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ allocationParticipant(this.allocationForm).then(response => {
|
|
|
+ console.log('response',response);
|
|
|
+ this.$modal.msgSuccess("分配成功");
|
|
|
+ this.allocationPopover = false;
|
|
|
+ this.reload();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //取消分配
|
|
|
+ cancelAllocation() {
|
|
|
+ this.allocationPopover = false;
|
|
|
+ },
|
|
|
//重新加载数据
|
|
|
reload(){
|
|
|
//加载基础数据
|