| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419 |
- <template>
- <div>
- <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse"
- @areaSelectChange="areaSelectChange"></retrievalForm>
- <kt-common-table :data="pageResult" :columns="columns" element-loading-text="加载中..." v-loading="loading"
- :showBatchDelete="false" @findPage="findPage" button3Name="转发" button3Type="text"
- @handleButton3="transmit" button2Name="报价轨迹" button2Type="text"
- @handleButton2="trajectory" button5Name="详情" button5Type="text" @handleButton5="detailFun"></kt-common-table>
- <el-dialog title="转发" :visible.sync="dialogVisible" width="30%">
- 转发人:
- <el-select v-model="transmitValue" placeholder="请选择">
- <el-option v-for="item in options" :key="item.userId" :label="item.name" :value="item.userId"></el-option>
- </el-select>
- <span slot="footer" class="dialog-footer">
- <el-button size="small" @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" size="small" @click="transmitSumit">确 定</el-button>
- </span>
- </el-dialog>
- <detailsDialog ref="detailsDialog" :orderInfo="queryOrders"></detailsDialog>
- <el-dialog :visible.sync="ddgjdialogVisible" width="430px">
- <div slot="title" class=" dialog-title">
- <span>订单轨迹</span>
- </div>
- <div style="height: 300px; overflow-y: auto">
- <el-steps direction="vertical" :active="trajectoryTable.length - 1" >
- <el-step v-for="item in trajectoryTable"
- :key="item.id"
- :title="getStatusText(item.orderStatus)"
- >
- <template slot="description">
- <span>保险公司:{{ item.insCompany }}</span>
- <span>提交人:{{ item.operator }}</span>
- <div>创建时间:{{ item.createTime }}</div>
- </template>
- </el-step>
- </el-steps>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
- import Cookies from "js-cookie";
- import CommonUtil from "@/utils/comutil.js";
- import detailsDialog from "@/views/Core/components/detailsDialog.vue";
- import retrievalForm from "@/components/Form/retrievalForm.vue";
- import { mixin } from "../mixin";
- export default {
- components: {
- KtCommonTable,
- detailsDialog,
- retrievalForm
- },
- data() {
- return {
- retrievalFields: [
- {
- name: 'provinceId',
- label: '省机构名称',
- type: 'select',
- options: []
- },
- {
- name: 'cityId',
- label: '市机构名称',
- type: 'select',
- options: []
- },
- {
- name: 'countyId',
- label: '区机构名称',
- type: 'select',
- options: []
- },
- {
- name: 'houseId',
- label: '门店名称',
- type: 'select',
- options: []
- },
- {
- name: 'taskNo',
- label: '任务池号',
- type: 'input',
- },
- {
- name: 'subOrderId',
- label: '订单号',
- type: 'input',
- },
- {
- name: 'companyId',
- label: '保险公司',
- type: 'select',
- options: []
- },
- {
- name: 'agreeId',
- label: '协议选择',
- type: 'select',
- options: [],
- optionsIabel: "agreementName",
- },
- {
- name: 'licenseNo',
- label: '车牌号',
- type: 'input',
- Retained: false,
- },
- {
- name: 'frameNo',
- label: '车架号',
- type: 'input',
- Retained: false,
- },
- {
- name: 'engineNo',
- label: '发动机号',
- type: 'input',
- Retained: false,
- },
- {
- name: 'riskCode',
- label: '投保险种',
- type: 'select',
- Retained: false,
- options: [],
- optionsIabel: "dictTag",
- optionsValue: "dictTag",
- },
- {
- name: 'operatorId',
- label: '代理人工号',
- type: 'input',
- Retained: false,
- },
- {
- name: 'operatorName',
- label: '代理人姓名',
- type: 'input',
- Retained: false,
- },
- {
- name: 'auditId',
- label: '受理人工号',
- type: 'input',
- Retained: false,
- },
- {
- name: 'insuredName',
- label: '被保险人',
- type: 'input',
- Retained: false,
- },
- {
- name: ["quoteStartDateStr", "quoteEndDateStr"],
- label: '报价时间',
- type: 'date',
- list: 'quoteList'
- },
- {
- name: ["attachStartDateStr", "attachEndDateStr"],
- label: '起保时间',
- type: 'date',
- list: 'attachList'
- },
- ],
- pageRequest: {
- pageNum: 1,
- pageSize: 20,
- orderStatus: 3,
- userId: "",
- },
- ddgjdialogVisible:false,
- trajectoryTable:[],
- optionsStatus:[],
- }
- },
- mixins: [mixin],
- created() {
- this.pageRequest.userId = Cookies.get("user");
- this.areaqueryList(1, 99, "provinceId");
- this.CompanyList();
- this.agrmentlist();
- this.getDicType("productsType"); //车船税类型
- this.$api.insCompany.dicType("insOrderStatus").then((res) => {
- this.optionsStatus = res.data.ddList;
- });
- },
- methods: {
- areaSelectChange(obj) {
- switch (obj.filed) {
- case 'provinceId':
- this.areaqueryList(2, obj.id, 'cityId')
- break;
- case 'cityId':
- this.areaqueryList(3, obj.id, 'countyId')
- break;
- case 'countyId':
- this.areaqueryList(4, obj.id, 'houseId')
- break;
- default:
- }
- },
- getStatusText(code) {
- return this.optionsStatus.find(val=>val.dictValue==code).dictTag;;
- },
- //获取机构数据
- areaqueryList(level, parentId, filed) {
- this.$api.task.queryListByParentId(level, parentId).then((res) => {
- this.selectDataMatching(this.retrievalFields, filed, res.data);
- });
- },
- CompanyList() {
- this.$api.letter.gainTopList().then((res) => {
- this.selectDataMatching(this.retrievalFields, 'companyId', res.data);
- })
- },
- agrmentlist() {
- this.$api.task.findPtlAgreementList().then((res) => {
- this.selectDataMatching(this.retrievalFields, 'agreeId', res.data);
- });
- },
- getDicType(type) {
- this.$api.insCompany.dicType(type).then(res => {
- if (res.code == 200) {
- this.selectDataMatching(this.retrievalFields, 'riskCode', res.data.ddList);
- }
- });
- },
- //下拉数据匹配
- selectDataMatching(files, name, data) {
- files.forEach(filed => {
- if (filed.name == name) {
- filed.options = data;
- }
- })
- },
- handleFormSubmit(data) {
- let obj = Object.assign(this.pageRequest, data)
- this.pageRequest = obj;
- this.findPage();
- },
- toggleCollapse(data) {
- this.retrievalFields.map(val => {
- if (val.Retained != null) val.Retained = data;
- return val;
- })
- },
- queryStaffInfo() {
- this.findPage();
- },
- // 右侧列表的方法Start
- findPage(data) {
- if (data && data.pageRequest) {
- this.pageRequest.pageNum = data.pageRequest.pageNum;
- this.pageRequest.pageSize = data.pageRequest.pageSize;
- }
- this.loading = true;
- this.$api.task
- .queryPageHospitalityByChannel(this.pageRequest)
- .then(res => {
- if (res.code == 200) {
- this.loading = false;
- this.pageResult = res.data;
- } else {
- this.loading = false;
- this.$message.error(res.msg);
- }
- });
- },
- trajectory(row){
- this.$api.letter.queryBySuborder(row.row.subOrderId).then((res) => {
- if (res.code == 200 && res.data.length > 0) {
- this.ddgjdialogVisible = true;
- this.trajectoryTable = res.data;
- } else {
- this.$message({
- message: res.msg || "暂无数据!",
- type: "warning",
- });
- }
- });
- },
- transmit(row) {
- this.dialogVisible = true;
- this.transmitValue = "";
- this.orderNo = row.row.orderno
- this.subOrderId = row.row.subOrderId
- this.$api.task.getCustomerUsers().then(res => {
- if (res.code == 200) {
- this.options = res.data
- }
- })
- },
- // 收回
- takeBack(row) {
- let orderNo = row.row.orderno
- let subOrderId = row.row.subOrderId
- this.$api.task.taskPoolsRecover({ orderNo, subOrderId }).then(res => {
- if (res.code == 200) {
- this.$message({
- message: res.msg,
- type: 'success'
- });
- }
- else {
- this.$message.error(res.msg);
- }
- })
- },
- transmitSumit() {
- if (this.transmitValue) {
- this.$api.task.forwardingSubOrders({ auditId: this.transmitValue, orderNo: this.orderNo, subOrderId: this.subOrderId }).then(res => {
- if (res.code == 200) {
- this.options = res.data
- this.dialogVisible = false;
- this.findPage()
- }
- else {
- this.$message.error(res.msg);
- }
- })
- }
- else {
- this.$message.error('请选择转发人!');
- }
- },
- //联级选择器触发事件
- handleChange(val) {
- if (val.length !== 0) {
- this.queryFrom.deptId = val.at(-1);
- } else {
- this.queryFrom.deptId = "";
- }
- },
- monthChange(e) {
- if (e === null) {
- this.queryFrom.startDate = "";
- this.queryFrom.endDate = "";
- } else {
- this.queryFrom.startDate = e[0];
- this.queryFrom.endDate = e[1];
- }
- },
- detailFun(row) {
- this.orderInfo=row.row;
- let params = {
- companyId: row.row.subOrderId
- };
- this.cpolicy();
- this.$api.letter.getByCompanyId(params).then(res => {
- if (res.code == "200") {
- var data = res.data;
- data.kindinfo.map((ele, index) => {
- switch (ele.kindCode) {
- case "A":
- ele.amount = "投保";
- break;
- case "D4":
- case "SY_FJ_YBW2":
- ele.unitAmount = this.toChinesNum(ele.unitAmount);
- break;
- case "MJ1":
- case "MJ2":
- case "MJ3":
- case "MJ4":
- ele.deductibleRate = ele.deductibleRate + "%";
- break;
- default:
- ele.amount = this.toChinesNum(ele.amount);
- }
- return ele;
- });
- this.queryOrders = data;
- //赋值费用信息
- // this.feeDetailInfo=data.orderFeeResult;
- }
- });
- this.$refs.detailsDialog.setBackupVisible(true);
- },
- }
- };
- </script>
- <style scoped lang="scss">
- /deep/{
- .el-step__title,.el-step__icon-inner{
- color:var(--themeColor)
- }
- .el-step__line-inner{
- height:0;
- display:none
- }
- .is-flex{
- .el-step__icon{
- background: var(--themeColor)
- }
- .el-step__icon-inner{
- color: #fff;
- }
- }
- .el-step__icon.is-text{
- border:none;
- box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.1);
- }
- }
- </style>
|