|
@@ -1,155 +1,244 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div>
|
|
|
|
|
- <div class="flex f-c back">
|
|
|
|
|
- <el-form class="demo-ruleForm" :model="salespersonForm" label-width="100px" size="small"
|
|
|
|
|
- style="margin-top: 15px">
|
|
|
|
|
- <el-row type="flex" justify="space-between">
|
|
|
|
|
- <el-col :span="5">
|
|
|
|
|
- <el-form-item label="工号">
|
|
|
|
|
- <el-input placeholder="请输入工号" v-model="salespersonForm.userId" maxlength="17" type="text"
|
|
|
|
|
- show-word-limit>
|
|
|
|
|
- <el-button slot="append" type="primary" icon="el-icon-search" @click="toChooseName()"
|
|
|
|
|
- style="color: #fff;background-color:#D42426;border-color:#D42426;"></el-button>
|
|
|
|
|
- </el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="5">
|
|
|
|
|
- <el-form-item label="业务员" prop="name">
|
|
|
|
|
- <el-input placeholder="请输入业务员" v-model="salespersonForm.name" type="text" show-word-limit>
|
|
|
|
|
- <el-button slot="append" type="primary" icon="el-icon-search" @click="toChooseName()"
|
|
|
|
|
- style="color: #fff;background-color:#D42426;border-color:#D42426;"></el-button>
|
|
|
|
|
- </el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="flex f-c back">
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ class="demo-ruleForm"
|
|
|
|
|
+ :model="salespersonForm"
|
|
|
|
|
+ label-width="100px"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ style="margin-top: 15px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-row type="flex" justify="space-between">
|
|
|
|
|
+ <el-col :span="5">
|
|
|
|
|
+ <el-form-item label="工号">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入工号"
|
|
|
|
|
+ v-model="operationForm.userId"
|
|
|
|
|
+ maxlength="17"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ show-word-limit
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ slot="append"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="el-icon-search"
|
|
|
|
|
+ @click="toChooseName('un')"
|
|
|
|
|
+ style="
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background-color: #d42426;
|
|
|
|
|
+ border-color: #d42426;
|
|
|
|
|
+ "
|
|
|
|
|
+ ></el-button>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="5">
|
|
|
|
|
+ <el-form-item label="业务员" prop="name">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入业务员"
|
|
|
|
|
+ v-model="operationForm.name"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ show-word-limit
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ slot="append"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="el-icon-search"
|
|
|
|
|
+ @click="toChooseName('un')"
|
|
|
|
|
+ style="
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background-color: #d42426;
|
|
|
|
|
+ border-color: #d42426;
|
|
|
|
|
+ "
|
|
|
|
|
+ ></el-button>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
|
|
|
- <el-col :span="5">
|
|
|
|
|
- <el-form-item label="工号类型">
|
|
|
|
|
- <el-select v-model="salespersonForm.noType" disabled>
|
|
|
|
|
- <el-option label="业务员" value="A"></el-option>
|
|
|
|
|
- <el-option label="代理人" value="B"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="5">
|
|
|
|
|
- <el-form-item label="归属">
|
|
|
|
|
- <el-input v-model="salespersonForm.deptName" disabled></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="quotation-content">
|
|
|
|
|
- <Ktletter ref="Ktletter" isLetter="3"></Ktletter>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-dialog title="业务员信息" :visible.sync="dialogVisible">
|
|
|
|
|
- <el-form :inline="true" class="demo-form-inline" size="small" label-width="80px" :model="salespersonForm">
|
|
|
|
|
- <el-row :gutter="20">
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="工号">
|
|
|
|
|
- <el-input v-model="salespersonForm.userId" placeholder="工号" clearable></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="业务员">
|
|
|
|
|
- <el-input v-model="salespersonForm.name" placeholder="业务员" clearable></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="手机号">
|
|
|
|
|
- <el-input v-model="salespersonForm.mobile" placeholder="手机号" clearable></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="9">
|
|
|
|
|
- <el-form-item label="身份证号">
|
|
|
|
|
- <el-input v-model="salespersonForm.identity" placeholder="身份证号" clearable></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="2">
|
|
|
|
|
- <el-form-item>
|
|
|
|
|
- <el-button type="primary" size="small" @click="toChooseName()">查询</el-button>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <el-table size="small" :data="salespersonData" height="690" border style="width: 100%"
|
|
|
|
|
- :header-cell-style="{ background: '#F7F7F9 ', fontWeight: '700', color: '#333333' }" highlight-current-row
|
|
|
|
|
- @row-dblclick="reslistCurrentChange">
|
|
|
|
|
- <el-table-column prop="userId" label="工号" align="center"></el-table-column>
|
|
|
|
|
- <el-table-column prop="name" label=" 业务员名称" align="center"></el-table-column>
|
|
|
|
|
- <el-table-column prop="mobile" label="手机号" align="center"></el-table-column>
|
|
|
|
|
- <el-table-column prop="identity" label="身份证号" align="center"></el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ <el-col :span="5">
|
|
|
|
|
+ <el-form-item label="工号类型">
|
|
|
|
|
+ <el-select v-model="operationForm.noType" disabled>
|
|
|
|
|
+ <el-option label="业务员" value="A"></el-option>
|
|
|
|
|
+ <el-option label="代理人" value="B"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="5">
|
|
|
|
|
+ <el-form-item label="归属">
|
|
|
|
|
+ <el-input v-model="operationForm.deptName" disabled></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-form>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="quotation-content">
|
|
|
|
|
+ <Ktletter ref="Ktletter" isLetter="3"></Ktletter>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-dialog title="业务员信息" :visible.sync="dialogVisible">
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ :inline="true"
|
|
|
|
|
+ class="demo-form-inline"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ label-width="80px"
|
|
|
|
|
+ :model="salespersonForm"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="工号">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="salespersonForm.userId"
|
|
|
|
|
+ placeholder="工号"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="业务员">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="salespersonForm.name"
|
|
|
|
|
+ placeholder="业务员"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="手机号">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="salespersonForm.mobile"
|
|
|
|
|
+ placeholder="手机号"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="9">
|
|
|
|
|
+ <el-form-item label="身份证号">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="salespersonForm.identity"
|
|
|
|
|
+ placeholder="身份证号"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="2">
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button type="primary" size="small" @click="toChooseName('in')"
|
|
|
|
|
+ >查询</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :data="salespersonData"
|
|
|
|
|
+ height="690"
|
|
|
|
|
+ border
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ :header-cell-style="{
|
|
|
|
|
+ background: '#F7F7F9 ',
|
|
|
|
|
+ fontWeight: '700',
|
|
|
|
|
+ color: '#333333',
|
|
|
|
|
+ }"
|
|
|
|
|
+ highlight-current-row
|
|
|
|
|
+ @row-dblclick="reslistCurrentChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="userId"
|
|
|
|
|
+ label="工号"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ ></el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="name"
|
|
|
|
|
+ label=" 业务员名称"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ ></el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="mobile"
|
|
|
|
|
+ label="手机号"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ ></el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="identity"
|
|
|
|
|
+ label="身份证号"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ ></el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import Ktletter from "../daikeComponents/KtLetter.vue";
|
|
import Ktletter from "../daikeComponents/KtLetter.vue";
|
|
|
export default {
|
|
export default {
|
|
|
- name: 'letter',
|
|
|
|
|
- components: { Ktletter },
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- dialogVisible: false,
|
|
|
|
|
- salespersonData: [],
|
|
|
|
|
- salespersonForm: {},
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- created(){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ name: "letter",
|
|
|
|
|
+ components: { Ktletter },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ dialogVisible: false,
|
|
|
|
|
+ salespersonData: [],
|
|
|
|
|
+ salespersonForm: {},
|
|
|
|
|
+ operationForm: {},
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
- mounted(){
|
|
|
|
|
- if(this.$route.query.data){
|
|
|
|
|
- this.salespersonForm={
|
|
|
|
|
- userId:this.$route.query.data.userid ,
|
|
|
|
|
- name:this.$route.query.data.username,
|
|
|
|
|
- deptName:this.$route.query.data.deptname
|
|
|
|
|
- }
|
|
|
|
|
- this.$refs.Ktletter.policyNumberForm=this.$route.query.data
|
|
|
|
|
- this.$refs.Ktletter.obtainProtocol(this.$route.query.data)
|
|
|
|
|
- }
|
|
|
|
|
- else{
|
|
|
|
|
- this.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: '请先输入业务员,再进行操作!!!',
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration:10000
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ created() {},
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ if (this.$route.query.data) {
|
|
|
|
|
+ this.salespersonForm = {
|
|
|
|
|
+ userId: this.$route.query.data.userid,
|
|
|
|
|
+ name: this.$route.query.data.username,
|
|
|
|
|
+ deptName: this.$route.query.data.deptname,
|
|
|
|
|
+ };
|
|
|
|
|
+ this.operationForm = {
|
|
|
|
|
+ userId: this.$route.query.data.userid,
|
|
|
|
|
+ name: this.$route.query.data.username,
|
|
|
|
|
+ deptName: this.$route.query.data.deptname,
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$refs.Ktletter.policyNumberForm = this.$route.query.data;
|
|
|
|
|
+ this.$refs.Ktletter.obtainProtocol(this.$route.query.data);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: "请先输入业务员,再进行操作!!!",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ duration: 10000,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ //业务列表双击选中事件
|
|
|
|
|
+ reslistCurrentChange(row, column, event) {
|
|
|
|
|
+ // this.salespersonForm = row; //名称
|
|
|
|
|
+ this.operationForm = row;
|
|
|
|
|
+ this.$refs.Ktletter.add();
|
|
|
|
|
+ this.$refs.Ktletter.userId = row.userId;
|
|
|
|
|
+ this.$refs.Ktletter.obtainProtocol();
|
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ toChooseName(type) {
|
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
|
+ lock: true,
|
|
|
|
|
+ text: "Loading",
|
|
|
|
|
+ spinner: "el-icon-loading",
|
|
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
+ });
|
|
|
|
|
+ // if()
|
|
|
|
|
+ const object =
|
|
|
|
|
+ type == "un" ? { ...this.operationForm } : { ...this.salespersonForm };
|
|
|
|
|
+ this.$api.task.getAllUsersByHospitality({ ...object }).then((res) => {
|
|
|
|
|
+ if (res.code == "200") {
|
|
|
|
|
+ this.salespersonData = res.data;
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ this.dialogVisible = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
}
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
- methods: {
|
|
|
|
|
- //业务列表双击选中事件
|
|
|
|
|
- reslistCurrentChange(row, column, event) {
|
|
|
|
|
- this.salespersonForm = row; //名称
|
|
|
|
|
- this.$refs.Ktletter.add()
|
|
|
|
|
- this.$refs.Ktletter.userId = row.userId
|
|
|
|
|
- this.$refs.Ktletter.obtainProtocol()
|
|
|
|
|
- this.dialogVisible = false;
|
|
|
|
|
- },
|
|
|
|
|
- toChooseName() {
|
|
|
|
|
- const loading = this.$loading({
|
|
|
|
|
- lock: true,
|
|
|
|
|
- text: "Loading",
|
|
|
|
|
- spinner: "el-icon-loading",
|
|
|
|
|
- background: "rgba(0, 0, 0, 0.7)"
|
|
|
|
|
- });
|
|
|
|
|
- this.$api.task.getAllUsersByHospitality({ ... this.salespersonForm }).then(res => {
|
|
|
|
|
- if (res.code == "200") {
|
|
|
|
|
- this.salespersonData = res.data;
|
|
|
|
|
- loading.close();
|
|
|
|
|
- this.dialogVisible = true;
|
|
|
|
|
- } else {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- this.$message.error(res.msg);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
|
|
-.quotation-content{
|
|
|
|
|
|
|
+.quotation-content {
|
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
|
height: 80vh;
|
|
height: 80vh;
|
|
|
}
|
|
}
|