Przeglądaj źródła

Merge branch 'dev' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-pc into dev

lihongxiao 2 lat temu
rodzic
commit
bfcc766640
27 zmienionych plików z 8313 dodań i 4601 usunięć
  1. 18 4
      src/assets/css/common.css
  2. 0 80
      src/components/Form/GenericForm.vue
  3. 149 0
      src/components/Form/retrievalForm.vue
  4. 0 1
      src/http/moudules/task.js
  5. BIN
      src/icon/Arrow.png
  6. 466 478
      src/views/Core/components/detailsDialog.vue
  7. 708 0
      src/views/Core/components/detailsDialogPro.vue
  8. 1003 190
      src/views/FinancialManagement/CarInsurance/Verifytasks/Verifyuntasks.vue
  9. 2 4
      src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementSource.vue
  10. 303 503
      src/views/Letter/Orderlist.vue
  11. 330 194
      src/views/Task/AgentPoolChannel/AgentPoolChannel.vue
  12. 330 195
      src/views/Task/AgentPoolChannel/AgentPoolChannel1.vue
  13. 329 194
      src/views/Task/AgentPoolChannel/AgentPoolChannel2.vue
  14. 329 194
      src/views/Task/AgentPoolChannel/AgentPoolChannel3.vue
  15. 328 195
      src/views/Task/AgentPoolChannel/AgentPoolChannel4.vue
  16. 325 188
      src/views/Task/CompanyPoolChannel/CompanyPoolChannel.vue
  17. 325 188
      src/views/Task/CompanyPoolChannel/CompanyPoolChannel1.vue
  18. 325 188
      src/views/Task/CompanyPoolChannel/CompanyPoolChannel2.vue
  19. 305 125
      src/views/Task/CompanyPoolChannel/CompanyPoolChannel3.vue
  20. 325 188
      src/views/Task/CompanyPoolChannel/CompanyPoolChannel4.vue
  21. 306 172
      src/views/Task/TaskPoolChannel/TaskPoolChannel.vue
  22. 305 170
      src/views/Task/TaskPoolChannel/TaskPoolChannel1.vue
  23. 305 172
      src/views/Task/TaskPoolChannel/TaskPoolChannel2.vue
  24. 305 170
      src/views/Task/TaskPoolChannel/TaskPoolChannel3.vue
  25. 305 168
      src/views/Task/TaskPoolChannel/TaskPoolChannel4.vue
  26. 149 566
      src/views/Task/daikeComponents/KtLetter.vue
  27. 738 74
      src/views/Task/mixin.js

+ 18 - 4
src/assets/css/common.css

@@ -69,6 +69,20 @@
 .mrgin-2{
   margin: 20px;
 }
+.m-top-5 {
+	margin-top: 5px;
+}
+.m-top-10 {
+	margin-top: 10px;
+}
+
+.m-btn-10 {
+	margin-bottom: 10px;
+}
+
+.m-btn-15 {
+	margin-bottom: 15px;
+}
 .el-button:hover,.el-button:focus
 {
 	color: var(--themeColor);
@@ -102,7 +116,7 @@
 }
 .el-tabs__item:hover,.el-picker-panel__icon-btn:hover,.el-date-table td.available:hover,.el-button--text,.el-pager li:hover,
 .el-dialog__headerbtn:hover .el-dialog__close,.el-button--text:hover,.el-button--text:focus{
-	color: var(--themeColorHover); 
+	color: var(--themeColorHover);
 }
 .dialog-title{
     font-weight: bold;
@@ -115,8 +129,8 @@
 }
 .el-range-editor.is-active,.el-pagination button,.el-pager li,.el-pagination__sizes .el-input .el-input__inner:hover,.el-checkbox__inner:hover
 ,.el-range-editor.is-active, .el-range-editor.is-active:hover{
-	border-color: var(--themeColorHover); 
-} 
+	border-color: var(--themeColorHover);
+}
 .el-select .el-input.is-focus .el-input__inner ,.el-input__inner:focus,.el-select .el-input__inner:focus,.el-button--primary.is-plain:focus {
 	border-color: var(--themeColor);
  }
@@ -137,4 +151,4 @@
 }
 .themeColor{
 	color: var(--themeColor) ;
-}
+}

+ 0 - 80
src/components/Form/GenericForm.vue

@@ -1,80 +0,0 @@
-<template>
-  <el-form ref="form" :model="formData" :label-width="labelWidth">
-    <el-form-item v-for="field in formFields" :key="field.name" :label="field.label">
-      <template v-if="field.type === 'input'">
-        <el-input v-model="formData[field.name]"></el-input>
-      </template>
-      <template v-else-if="field.type === 'select'">
-        <el-select v-model="formData[field.name]" placeholder="请选择">
-          <el-option v-for="(option, index) in field.options" :key="index" :label="option.label" :value="option.value"></el-option>
-        </el-select>
-      </template>
-      <template v-else-if="field.type === 'date'">
-        <el-date-picker type="date" placeholder="选择日期" v-model="formData[field.name]" style="width: 100%;"></el-date-picker>
-      </template>
-      <template v-else-if="field.type === 'time'">
-        <el-time-picker placeholder="选择时间" v-model="formData[field.name]" style="width: 100%;"></el-time-picker>
-      </template>
-      <template v-else-if="field.type === 'switch'">
-        <el-switch v-model="formData[field.name]"></el-switch>
-      </template>
-      <template v-else-if="field.type === 'checkbox'">
-        <el-checkbox-group v-model="formData[field.name]">
-          <el-checkbox v-for="(option, index) in field.options" :key="index" :label="option.label" :name="field.name"></el-checkbox>
-        </el-checkbox-group>
-      </template>
-      <template v-else-if="field.type === 'radio'">
-        <el-radio-group v-model="formData[field.name]">
-          <el-radio v-for="(option, index) in field.options" :key="index" :label="option.label"></el-radio>
-        </el-radio-group>
-      </template>
-      <template v-else-if="field.type === 'textarea'">
-        <el-input type="textarea" v-model="formData[field.name]"></el-input>
-      </template>
-    </el-form-item>
-    <el-form-item>
-      <el-button type="primary" @click="handleSubmit">提交</el-button>
-      <el-button @click="resetForm">重置</el-button>
-    </el-form-item>
-  </el-form>
-</template>
-
-<script>
-export default {
-  props: {
-    fields: {
-      type: Array,
-      required: true
-    },
-    labelWidth:{
-      type:String,
-      default:'120px'
-    }
-  },
-  data() {
-    return {
-      formFields: [], // 动态表单字段配置
-      formData: {} // 表单数据对象
-    };
-  },
-  mounted() {
-    this.formFields = this.fields;
-    this.resetForm();
-  },
-  methods: {
-    handleSubmit() {
-      this.$refs.form.validate((valid) => {
-        if (valid) {
-          this.$emit('submit', this.formData);
-        } else {
-          // 表单验证失败,做相应处理
-        }
-      });
-    },
-    resetForm() {
-      this.$refs.form.resetFields();
-      this.formData = {};
-    }
-  }
-};
-</script>

+ 149 - 0
src/components/Form/retrievalForm.vue

@@ -0,0 +1,149 @@
+<template>
+  <el-form ref="form" :model="formData" :inline="true" :label-width="labelWidth" size="small">
+    <el-row>
+      <div>
+        <el-col :span="6" v-for="field in formFields" :key="field.label">
+          <el-form-item :label="field.label" v-show="field.Retained !== false">
+            <template v-if="field.type === 'input'">
+              <el-input v-model="formData[field.name]" :placeholder="'请输入' + field.label"></el-input>
+            </template>
+            <template v-else-if="field.type === 'select'">
+              <el-select v-model="formData[field.name]" filterable clearable :placeholder="'请选择' + field.label"
+                @change="selectChange($event, field.name)">
+                <el-option v-for="(option, index) in field.options" :key="index"
+                  :label="field.optionsIabel ? option[field.optionsIabel] : option.name"
+                  :value="field.optionsValue ? option[field.optionsValue] : option.id"></el-option>
+              </el-select>
+            </template>
+            <template v-else-if="field.type === 'date'">
+              <el-date-picker type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
+                end-placeholder="结束日期" v-model="formData[field.list]" style="width: 100%;"
+                @change="dateChange($event, field.name)"></el-date-picker>
+            </template>
+            <template v-else-if="field.type === 'switch'">
+              <el-switch v-model="formData[field.name]"></el-switch>
+            </template>
+            <template v-else-if="field.type === 'checkbox'">
+              <el-checkbox-group v-model="formData[field.name]">
+                <el-checkbox v-for="(option, index) in field.options" :key="index" :label="option.label"
+                  :name="field.name"></el-checkbox>
+              </el-checkbox-group>
+            </template>
+            <template v-else-if="field.type === 'radio'">
+              <el-radio-group v-model="formData[field.name]">
+                <el-radio v-for="(option, index) in field.options" :key="index" :label="option.label"></el-radio>
+              </el-radio-group>
+            </template>
+            <template v-else-if="field.type === 'textarea'">
+              <el-input type="textarea" v-model="formData[field.name]"></el-input>
+            </template>
+          </el-form-item>
+        </el-col>
+      </div>
+      <el-col :span="2" :offset="1" style="margin-top: 10px;" class="fold">
+        <span @click="toggleCollapse">折叠筛选信息</span>
+        <img src="../../../src/icon/Arrow.png" alt
+          :style="{ weith: '10px', height: '10px', transform: `rotate(${isCollapsed ? 180 : 0}deg)` }" />
+      </el-col>
+      <el-col :span="2" style="text-align: right;">
+        <el-button size="small" type="primary" @click="handleSubmit">查询</el-button>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+export default {
+  props: {
+    fields: {
+      type: Array,
+      required: true
+    },
+    labelWidth: {
+      type: String,
+      default: '120px'
+    }
+  },
+  data() {
+    return {
+      datelist: [],//日期通用数据
+      formFields: [], // 动态表单字段配置
+      formData: {}, // 表单数据对象
+      isCollapsed: false,
+    };
+  },
+  mounted() {
+    this.formFields = this.fields;
+    this.resetForm();
+  },
+  methods: {
+    selectChange(id, filed) {
+      switch (filed) {
+        case 'provinceId':
+            console.log(this.formData)
+          break;
+        case 'cityId':
+
+          break;
+        case 'countyId':
+
+          break;
+
+        default:
+          break;
+      }
+      if (id) {
+        this.$emit('areaSelectChange', { id, filed });
+      }
+    },
+    dateChange(event, filed) {
+      if (event) {
+        this.formData[filed[0]] = event[0];
+        this.formData[filed[1]] = event[1];
+      } else {
+        this.formData[filed[0]] = "";
+        this.formData[filed[1]] = "";
+      }
+    },
+    toggleCollapse() {
+      this.isCollapsed = !this.isCollapsed; // 切换折叠状态
+      this.$emit('toggleCollapse', this.isCollapsed);
+
+    },
+    handleSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.$emit('submit', this.formData);
+        } else {
+          // 表单验证失败,做相应处理
+        }
+      });
+    },
+    resetForm() {
+      this.$refs.form.resetFields();
+      this.formData = {};
+    }
+  }
+};
+</script>
+<style scoped lang="scss">
+.el-form-item>>>.el-input {
+  width: 250px;
+}
+
+.el-form-item>>>.el-form-item__content {
+  width: 250px;
+}
+
+.fold {
+  font-size: 14px;
+  color: #D42426;
+  cursor: pointer;
+
+}
+
+>>>.el-form-item--mini.el-form-item,
+.el-form-item--small.el-form-item {
+  margin-bottom: 10px;
+}
+</style>

+ 0 - 1
src/http/moudules/task.js

@@ -1121,7 +1121,6 @@ export const totalPinAmount = (data) => {
     method: "post",
     data
   })
-}
   
 // 保险公司结算管理-车险
 export const totalBxAmount = (data) => {

BIN
src/icon/Arrow.png


Plik diff jest za duży
+ 466 - 478
src/views/Core/components/detailsDialog.vue


+ 708 - 0
src/views/Core/components/detailsDialogPro.vue

@@ -0,0 +1,708 @@
+<template>
+  <el-dialog :visible.sync="dialogVisible" width="80%" class="details_style">
+    <div slot="title" class=" dialog-title details-title">
+      <img src="../../../icon/归属信息.png" alt class="icon-img" />
+      <span>车辆报价信息详情</span>
+    </div>
+    <div class="details-body flex">
+      <div style="background-color: #fff;">
+        <ul class="tabLeft">
+          <li :class="{ 'li-selected': selectedItem === 'gsxx' }" @click="selectItem('gsxx')">归属信息</li>
+          <li :class="{ 'li-selected': selectedItem === 'clxx' }" @click="selectItem('clxx')">车辆信息</li>
+          <li :class="{ 'li-selected': selectedItem === 'czxx' }" @click="selectItem('czxx')">车主信息</li>
+          <li :class="{ 'li-selected': selectedItem === 'tbrxx' }" @click="selectItem('tbrxx')">投保人信息</li>
+          <li :class="{ 'li-selected': selectedItem === 'bbrxx' }" @click="selectItem('bbrxx')">被保人信息</li>
+          <li :class="{ 'li-selected': selectedItem === 'cjxx' }" @click="selectItem('cjxx')">投保信息</li>
+          <li v-if="orderInfo.taxArrears && orderInfo.taxArrears.length > 0"
+            :class="{ 'li-selected': selectedItem === 'qsxx' }" @click="selectItem('qsxx')">欠税信息</li>
+          <li :class="{ 'li-selected': selectedItem === 'bfys' }" @click="selectItem('bfys')">保费因素</li>
+          <li v-if="orderInfo.kindinfo && orderInfo.kindinfo.length > 0"
+            :class="{ 'li-selected': selectedItem === 'xzxx' }" @click="selectItem('xzxx')">险种信息</li>
+          <li v-if="orderInfo.accidentInfo && orderInfo.accidentInfo.length > 0"
+            :class="{ 'li-selected': selectedItem === 'jyx' }" @click="selectItem('jyx')">驾意险</li>
+          <li :class="{ 'li-selected': selectedItem === 'yxzl' }" @click="selectItem('yxzl')"
+            v-if="Object.keys(obj).length != 0">影像资料</li>
+          <li v-if="orderInfo && orderInfo.orderstatus == 3" :class="{ 'li-selected': selectedItem === 'dzbd' }"
+            @click="selectItem('dzbd')">保单信息</li>
+          <li v-if="orderInfo.orderFeeResult && orderInfo.orderFeeResult.length > 0"
+            :class="{ 'li-selected': selectedItem === 'fymx' }" @click="selectItem('fymx')">费用明细</li>
+          <li v-if="orderInfo.feeOrderNewVo && orderInfo.feeOrderNewVo.deptManagerFee.length > 0"
+            :class="{ 'li-selected': selectedItem === 'jgglf' }" @click="selectItem('jgglf')">机构管理费</li>
+          <li v-if="orderInfo.distributionLevelVoList && orderInfo.distributionLevelVoList.length > 0"
+            :class="{ 'li-selected': selectedItem === 'fxmx1' }" @click="selectItem('fxmx1')">分销明细</li>
+          <li v-if="orderInfo && orderInfo.orderstatus == 4 && orderInfo.auditopinion"
+            :class="{ 'li-selected': selectedItem === 'shyj' }" @click="selectItem('shyj')">审核意见</li>
+
+        </ul>
+      </div>
+      <div style="margin:20px;height: 60vh;overflow-y: auto;width: 100%;">
+        <OpenCloseBox id="gsxx">
+          <span slot="title">归属信息</span>
+          <div slot="boby">
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="24"><span>归属机构:</span>{{ orderInfo.deptAreaInfo }}</el-col>
+              <el-col :span="6"><span>本人工号:</span>{{ orderInfo.userid }}</el-col>
+              <el-col :span="6"><span>本人姓名:</span>{{ orderInfo.username }}</el-col>
+              <el-col :span="6"><span>联系方式:</span>{{ orderInfo.mobile }}</el-col>
+              <el-col :span="6"><span>性别:</span>{{ orderInfo.sex }}</el-col>
+            </el-row>
+            <el-row class="premium-style " :gutter="20">
+              <el-col v-if="orderInfo.referrerDeptAreaInfo" :span="24"><span>推荐人归属机构:</span>{{
+                orderInfo.referrerDeptAreaInfo }}</el-col>
+              <el-col :span="6"><span>推荐人工号:</span>{{ orderInfo.userid }}</el-col>
+              <el-col :span="6"><span>推荐人姓名:</span>{{ orderInfo.username }}</el-col>
+              <el-col :span="6"><span>联系方式:</span>{{ orderInfo.referrerMobile }}</el-col>
+              <el-col :span="6"><span>性别:</span>{{ orderInfo.referrerSex }}</el-col>
+            </el-row>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="clxx">
+          <span slot="title">车辆信息</span>
+          <div slot="boby">
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="6"><span>车牌号:</span>{{ orderInfo.carinfo.licenseNo }}</el-col>
+              <el-col :span="6"><span>车辆识别代码:</span>{{ orderInfo.carinfo.vinNo }}</el-col>
+              <el-col :span="6"><span>品牌型号:</span>{{ orderInfo.carinfo.modelcname }}</el-col>
+              <el-col :span="6"><span>发动机号:</span>{{ orderInfo.carinfo.engineNo }}</el-col>
+            </el-row>
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="6"><span>年款:</span>{{ orderInfo.carinfo.caryear }}</el-col>
+              <el-col :span="6"><span>座位数:</span>{{ orderInfo.carinfo.seatCount }}</el-col>
+              <el-col :span="6"><span>整备质量:</span>{{ orderInfo.carinfo.completeKerbMass }}</el-col>
+              <el-col :span="6"><span>核定载质量:</span>{{ orderInfo.carinfo.limitLoad }}</el-col>
+
+            </el-row>
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="6"><span>排量:</span>{{ orderInfo.carinfo.enginedesc }}</el-col>
+              <el-col :span="6"><span>功率:</span>{{ orderInfo.carinfo.powerScale }}</el-col>
+              <el-col :span="6"><span>新车购置价:</span>{{ orderInfo.carinfo.purchasePrice }}</el-col>
+              <el-col :span="6"><span>使用性质:</span>{{ orderInfo.carinfo.carnature }}</el-col>
+            </el-row>
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="6"><span>车辆用途:</span>{{ orderInfo.carinfo.vehicleUse }}</el-col>
+              <el-col :span="6"><span>车辆类型:</span>{{ orderInfo.carinfo.cartype }}</el-col>
+              <el-col :span="6"><span>车辆种类:</span>{{ orderInfo.carinfo.cimodelclass }}</el-col>
+              <el-col :span="6"><span>能源种类:</span>{{ orderInfo.carinfo.energyType }}</el-col>
+            </el-row>
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="6"><span>注册日期:</span>{{ orderInfo.carinfo.registerDate }}</el-col>
+              <el-col :span="6"><span>发证日期:</span>{{ orderInfo.carinfo.issueDate }}</el-col>
+              <el-col :span="6"><span>是否过户:</span>{{ orderInfo.carinfo.transferFlag == true ? "是" : "否" }}</el-col>
+              <el-col :span="6"><span>转移登记日期:</span>{{ orderInfo.carinfo.transferDate }}</el-col>
+            </el-row>
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="6"><span>商业险是否过户:</span>{{ orderInfo.carinfo.transferFlagBi == true ? "是" : "否" }}</el-col>
+              <el-col :span="6"><span>是否脱保:</span>{{ orderInfo.carinfo.outOfInsurance == true ? "是" : "否" }}</el-col>
+              <el-col :span="6"><span>是否二手车:</span>{{ orderInfo.carinfo.usedCar == true ? "是" : "否" }}</el-col>
+            </el-row>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="czxx">
+          <span slot="title">车主信息</span>
+          <div slot="boby">
+            <el-row class="premium-style" :gutter="20">
+              <el-col :span="6"><span>车主姓名:</span>{{ orderInfo.ownerinfo.name }}</el-col>
+              <el-col :span="6"><span>证件类型:</span>{{ orderInfo.ownerinfo.identifyType }}</el-col>
+              <el-col :span="6"><span>身份证号:</span>{{ orderInfo.ownerinfo.identifyNumber }}</el-col>
+              <el-col :span="6"><span>手机号:</span>{{ orderInfo.ownerinfo.mobile }}</el-col>
+            </el-row>
+            <el-row class="premium-style" :gutter="20">
+              <el-col :span="6"><span>电子邮箱:</span>{{ orderInfo.ownerinfo.email ? orderInfo.ownerinfo.email : '-'
+              }}</el-col>
+              <el-col :span="12"><span>地址:</span>{{ orderInfo.ownerinfo.addr }}</el-col>
+            </el-row>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="tbrxx">
+          <span slot="title">投保人信息</span>
+          <div slot="boby">
+            <el-row class="premium-style" :gutter="20">
+              <el-col :span="6"><span>投保人姓名:</span>{{ orderInfo.applyinfo.name }}</el-col>
+              <el-col :span="6"><span>证件类型:</span>{{ orderInfo.applyinfo.identifyType }}</el-col>
+              <el-col :span="6"><span>身份证号:</span>{{ orderInfo.applyinfo.identifyNumber }}</el-col>
+              <el-col :span="6"><span>手机号:</span>{{ orderInfo.applyinfo.mobile }}</el-col>
+            </el-row>
+            <el-row class="premium-style" :gutter="20">
+              <el-col :span="6"><span>电子邮箱:</span>{{ orderInfo.applyinfo.email ? orderInfo.applyinfo.email : '/'
+              }}</el-col>
+              <el-col :span="12"><span>地址:</span>{{ orderInfo.applyinfo.addr }}</el-col>
+            </el-row>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="bbrxx">
+          <span slot="title">被保人信息</span>
+          <div slot="boby">
+            <el-row class="premium-style" :gutter="20">
+              <el-col :span="6"><span>被保人姓名:</span>{{ orderInfo.insureinfo.name }}</el-col>
+              <el-col :span="6"><span>证件类型:</span>{{ orderInfo.insureinfo.identifyType }}</el-col>
+              <el-col :span="6"><span>身份证号:</span>{{ orderInfo.insureinfo.identifyNumber }}</el-col>
+              <el-col :span="6"><span>手机号:</span>{{ orderInfo.insureinfo.mobile }}</el-col>
+            </el-row>
+            <el-row class="premium-style" :gutter="20">
+              <el-col :span="6"><span>电子邮箱:</span>{{ orderInfo.insureinfo.email ? orderInfo.insureinfo.email : '/'
+              }}</el-col>
+              <el-col :span="12"><span>地址:</span>{{ orderInfo.insureinfo.addr }}</el-col>
+            </el-row>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="cjxx">
+          <span slot="title">投保信息</span>
+          <div slot="boby">
+            <div class="m-btn-10">保险公司:{{ orderInfo.inscompany }}</div>
+
+            <div class="  quotation-style">
+              <b>险种</b>
+              <b>起保日期</b>
+              <b>终保日期</b>
+              <b>保费金额</b>
+              <span>交强险</span>
+              <span>{{ orderInfo.jqstartdate ? orderInfo.jqstartdate : '-' }}</span>
+              <span>{{ orderInfo.jqenddate ? orderInfo.jqenddate : '-' }}</span>
+              <span>{{ orderInfo.jqpremium ? '¥' + orderInfo.jqpremium : '-' }}</span>
+              <span>商业险</span>
+              <span>{{ orderInfo.systartdate ? orderInfo.systartdate : '-' }}</span>
+              <span>{{ orderInfo.syenddate ? orderInfo.syenddate : '-' }}</span>
+              <span>{{ orderInfo.sypremium ? '¥' + orderInfo.sypremium : '-' }}</span>
+              <span>车船税</span>
+              <span>-</span>
+              <span>-</span>
+              <span>¥{{ orderInfo.taxamount }}</span>
+              <span>驾意险</span>
+              <span>-</span>
+              <span>-</span>
+              <span>{{ orderInfo.jypremium ? '¥' + orderInfo.jypremium : '-' }}</span>
+              <span>总计</span>
+              <span>-</span>
+              <span>-</span>
+              <span class="themeColor" style="font-weight: bold;">¥{{ orderInfo.sumpremium }}</span>
+            </div>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="qsxx" v-if="orderInfo.taxArrears && orderInfo.taxArrears.length > 0">
+          <span slot="title">欠税信息</span>
+          <div slot="boby">
+            <div class="quotation-style tax-arrears">
+              <b>当年应缴(元)</b>
+              <b>去年补缴(元)</b>
+              <b>滞纳金(元)</b>
+              <b>总计</b>
+              <div v-for="(taxArrearsitem, taxArrearsindex) in orderInfo.taxArrears" :key="taxArrearsindex">
+                <span>{{ taxArrearsitem.dayYearTax }}</span>
+                <span>{{ taxArrearsitem.taxDefault }}</span>
+                <span>{{ taxArrearsitem.lateFee }}</span>
+                <span>{{ orderInfo.taxamount }}</span>
+              </div>
+            </div>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="bfys">
+          <span slot="title">保费因素</span>
+          <div slot="boby">
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="6"><span>评分:</span>{{ orderInfo.extendInfo.score }}</el-col>
+              <el-col :span="6"><span>总赔付率:</span>{{ orderInfo.extendInfo.lossRation }}</el-col>
+              <el-col :span="6"><span>总折扣率:</span>{{ orderInfo.extendInfo.totalAdjustRate }}</el-col>
+              <el-col :span="6"><span>出险信息:</span>{{ orderInfo.extendInfo.accidentInfoStr }}</el-col>
+            </el-row>
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="6"><span>交强类型评分:</span>{{ orderInfo.extendInfo.jqScore }}</el-col>
+              <el-col :span="6"><span>交强赔付率:</span>{{ orderInfo.extendInfo.jqLossRation }}</el-col>
+              <el-col :span="6"><span>交强险折扣:</span>{{ orderInfo.extendInfo.jqAdjustRate }}</el-col>
+            </el-row>
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="6"><span>商业类型评分:</span>{{ orderInfo.extendInfo.syScore }}</el-col>
+              <el-col :span="6"><span>商业赔付率:</span>{{ orderInfo.extendInfo.syLossRation }}</el-col>
+              <el-col :span="6"><span>商业险折扣:</span>{{ orderInfo.extendInfo.syAdjustRate }}</el-col>
+            </el-row>
+            <el-row class="premium-style " :gutter="20" v-if="orderInfo.ubiPredictedInfoScore">
+              <el-col :span="6"><span>紫金能源车(鼎然-车辆风险评分):</span>{{ orderInfo.ubiPredictedInfoScore }}</el-col>
+            </el-row>
+          </div>
+        </OpenCloseBox>
+
+        <OpenCloseBox id="xzxx" v-if="orderInfo.kindinfo && orderInfo.kindinfo.length > 0">
+          <span slot="title">险种信息</span>
+          <div slot="boby">
+            <div class="quotation-style kind-arrears">
+              <b>商业险险别</b>
+              <b>保额(元)</b>
+              <b>保费(元)</b>
+              <div v-for="(kindinfoitem, kindinfoindex) in orderInfo.kindinfo" :key="kindinfoindex">
+                <span>{{ kindinfoitem.kindName }}</span>
+                <span v-if="['D4', 'SY_FJ_YBW2'].includes(kindinfoitem.kindCode)">{{ kindinfoitem.unitAmount }}</span>
+                <span v-else-if="['MJ1', 'MJ2', 'MJ3', 'MJ4'].includes(kindinfoitem.kindCode)
+                  ">
+                  {{ kindinfoitem.deductibleRate }}
+                </span>
+                <span v-else>{{ kindinfoitem.amount }}</span>
+                <span>{{ kindinfoitem.coveragePremium ? kindinfoitem.coveragePremium : '-' }}</span>
+              </div>
+            </div>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="jyx" v-if="orderInfo.accidentInfo && orderInfo.accidentInfo.length > 0">
+          <span slot="title">驾意险</span>
+          <div slot="boby">
+            <div class="quotation-style driving-style">
+              <b>产品</b>
+              <b>份数</b>
+              <b>价格</b>
+              <div v-for="(kindinfoitem, taxArrearsindex) in orderInfo.accidentInfo" :key="taxArrearsindex">
+                <span>{{ kindinfoitem.projectName }}</span>
+                <span>{{ kindinfoitem.quantity ? kindinfoitem.quantity : '1' }}</span>
+                <span>{{ kindinfoitem.actualPremium }}/份</span>
+              </div>
+            </div>
+          </div>
+        </OpenCloseBox>
+
+        <OpenCloseBox id="yxzl" v-if="Object.keys(obj).length != 0">
+          <span slot="title">影像资料</span>
+          <div slot="boby">
+            <el-row :gutter="20">
+              <el-col :span="12">
+                <h4>行驶证影像</h4>
+                <viewer :images="obj.carImageList">
+                  <img class="imageStyle" v-for="(imageItem, imageIndex) in obj.carImageList" :src="imageItem"
+                    :key="imageIndex" />
+                </viewer>
+              </el-col>
+              <el-col :span="12">
+                <div v-if="obj.ownerImageList">
+                  <h4>车主身份证影像</h4>
+                  <viewer :images="obj.ownerImageList">
+                    <img class="imageStyle" v-for="(imageItem, imageIndex) in obj.ownerImageList" :src="imageItem"
+                      :key="imageIndex" />
+                  </viewer>
+                </div>
+                <div v-else>
+                  <h4>营业执照</h4>
+                  <img class="imageStyle" style="margin-right: 0;" />
+                </div>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :span="12">
+                <div v-if="obj.policyImageList">
+                  <h4>投保人身份证影像</h4>
+                  <viewer :images="obj.policyImageList">
+                    <img class="imageStyle" v-for="(imageItem, imageIndex) in obj.policyImageList" :src="imageItem"
+                      :key="imageIndex" />
+                  </viewer>
+                </div>
+                <div v-else>
+                  <h4>营业执照</h4>
+                  <img class="imageStyle" style="margin-right: 0;" />
+                </div>
+              </el-col>
+              <el-col :span="12">
+                <div v-if="obj.insuredImageList">
+                  <h4>被保人身份证影像</h4>
+                  <viewer :images="obj.insuredImageList">
+                    <img class="imageStyle" v-for="(imageItem, imageIndex) in obj.insuredImageList" :src="imageItem"
+                      :key="imageIndex" />
+                  </viewer>
+                </div>
+                <div v-else>
+                  <h4>营业执照</h4>
+                  <img class="imageStyle" style="margin-right: 0;" />
+                </div>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20" v-if="obj.carCheckImageList && obj.carCheckImageList.length > 0">
+              <el-col :span="24">
+                <h4>验车照影像</h4>
+                <viewer :images="obj.carCheckImageList">
+                  <img class="imageStyle" v-for="(imageItem, imageIndex) in obj.carCheckImageList" :src="imageItem"
+                    :key="imageIndex" />
+                </viewer>
+              </el-col>
+            </el-row>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="dzbd" v-if="orderInfo && orderInfo.orderstatus == 3">
+          <span slot="title">保单信息</span>
+          <div slot="boby">
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="12"><span>交强险投保单号:</span>{{ orderInfo.jqapplyno }}</el-col>
+              <el-col :span="12"><span>交强险保单号:</span>{{ orderInfo.jqpolicyno }}</el-col>
+              <el-col v-if="orderInfo.syapplyno" :span="12"><span>商业险投保单号:</span>{{ orderInfo.syapplyno }}</el-col>
+              <el-col v-if="orderInfo.sypolicyno" :span="12"><span>商业险保单号:</span>{{ orderInfo.sypolicyno }}</el-col>
+              <el-col :span="12" v-for="(oldfileItem, oldfileIndex) in warrantObj.oldfileList" :key="oldfileIndex">
+                <div>
+                  <span>{{ oldfileItem.fileTitle }} :</span>{{ orderInfo.licenseno }}
+                  <el-button style="margin-left:30px" type="text" @click="viewfile(oldfileItem)">下载
+                  </el-button>
+                </div>
+              </el-col>
+              <el-col :span="12" v-for="(val, oldfileIndex) in warrantObj.businessList" :key="oldfileIndex">
+                <div>
+                  <span>{{ val.fileTitle }} :</span>{{ orderInfo.licenseno }}
+                  <el-button style="margin-left:30px" type="text" @click="viewfile(val)">下载
+                  </el-button>
+                </div>
+              </el-col>
+
+            </el-row>
+            <el-row class="premium-style " :gutter="20">
+              <el-col :span="12" v-for="(oldfileItem, oldfileIndex) in warrantObj.accidentList" :key="oldfileIndex">
+                <div>
+                  <span>{{ oldfileItem.fileTitle }} :</span>{{ orderInfo.licenseno }}
+                  <el-button style="margin-left:30px" type="text" @click="viewfile(oldfileItem)">下载
+                  </el-button>
+                </div>
+              </el-col>
+            </el-row>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="fymx" v-if="feeOrderNewVoList">
+          <span slot="title">费用明细</span>
+          <div slot="boby" style="font-size:12px;width: 100%" class="FeeEnclosure">
+            <el-table :data="feeOrderNewVoList.list" :span-method="feeOrderNewVomergeRows" :border="true" width="100%"
+              :stripe="true" size="mini" :header-cell-style="{
+                background: '#F7F7F9',
+                fontWeight: '700',
+                color: '#606266',
+              }">
+              <el-table-column prop="type" label="">
+              </el-table-column>
+              <el-table-column prop="insuranceType" label="险种">
+              </el-table-column>
+              <el-table-column prop="otherCostsProportion" label="跟单比例">
+                <template slot-scope="scope" >
+                  <span v-if="!isAuditing || scope.row.type !== '入口费用'">{{ scope.row.otherCostsProportion }} </span>
+                  <el-input v-else v-model="scope.row.otherCostsProportion" size="mini"></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="superviseCosts" label="手续费比例">
+                <template slot-scope="scope">
+                  <span v-if="!isAuditing || scope.row.type !== '入口费用'">{{ scope.row.superviseCosts }} </span>
+                  <el-input v-else v-model="scope.row.superviseCosts" size="mini"></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="totalProportion" label="总比例">
+                <template slot-scope="scope">
+                  <span v-if="!isAuditing || scope.row.type !== '入口费用'">{{ scope.row.totalProportion }} </span>
+                  <el-input v-else v-model="scope.row.totalProportion" size="mini"></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="premium" label="保费"></el-table-column>
+              <el-table-column prop="otherCostsPremiums" label="跟单费"></el-table-column>
+              <el-table-column prop="superviseCostsPremiums" label="手续费"></el-table-column>
+              <el-table-column prop="totalAmount" label="总费用"></el-table-column>
+            </el-table>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="jgglf" v-if="feeOrderNewVoList.deptManagerFee">
+          <span slot="title">机构管理费</span>
+          <div slot="boby" style="font-size:12px;width: 100%" class="FeeEnclosure">
+            <el-table :data="feeOrderNewVoList.deptManagerFee" :border="true" width="100%" :stripe="true"
+              size="mini" :header-cell-style="{
+                background: '#F7F7F9',
+                fontWeight: '700',
+                color: '#606266',
+              }">
+              <el-table-column prop="insuranceType" label="险种"></el-table-column>
+              <el-table-column prop="deptProportionLevelOne" label="一级管理费比例">
+                <template slot-scope="scope">
+                  <span v-if="!isAuditing">{{ scope.row.deptProportionLevelOne }} </span>
+                  <el-input v-else v-model="scope.row.deptProportionLevelOne" size="mini"></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="deptProportionLevelTwo" label="二级管理费比例 ">
+                <template slot-scope="scope">
+                  <span v-if="!isAuditing">{{ scope.row.deptProportionLevelTwo }} </span>
+                  <el-input v-else v-model="scope.row.deptProportionLevelTwo" size="mini"></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="deptProportionLevelThree" label="三级管理费比例">
+                <template slot-scope="scope">
+                  <span v-if="!isAuditing">{{ scope.row.deptProportionLevelThree }} </span>
+                  <el-input v-else v-model="scope.row.deptProportionLevelThree" size="mini"></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="deptProportionLevelFoure" label="四级管理费比例">
+                <template slot-scope="scope">
+                  <span v-if="!isAuditing">{{ scope.row.deptProportionLevelFoure }} </span>
+                  <el-input v-else v-model="scope.row.deptProportionLevelFoure" size="mini"></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="deptProportionLevelFive" label="五级管理费比例">
+                <template slot-scope="scope">
+                  <span v-if="!isAuditing">{{ scope.row.deptProportionLevelFive }} </span>
+                  <el-input v-else v-model="scope.row.deptProportionLevelFive" size="mini"></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="deptPremiumsLevelOne" label="一级管理费">
+              </el-table-column>
+              <el-table-column prop="deptPremiumsLevelTwo" label="二级管理费">
+              </el-table-column>
+              <el-table-column prop="deptPremiumsLevelThree" label="三级管理费">
+              </el-table-column>
+              <el-table-column prop="deptPremiumsLevelFoure" label="四级管理费">
+              </el-table-column>
+              <el-table-column prop="deptPremiumsLevelFive" label="五级管理费">
+              </el-table-column>
+            </el-table>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="fxmx1" v-if="orderInfo.distributionLevelVoList">
+          <span slot="title">分销明细</span>
+          <div slot="boby" style="font-size:12px;width: 100%" class="FeeEnclosure">
+            <el-table :data="orderInfo.distributionLevelVoList" :border="true" width="100%" :stripe="true" size="mini"
+              :header-cell-style="{
+                background: '#F7F7F9',
+                fontWeight: '700',
+                color: '#606266',
+              }">
+              <el-table-column prop="distributionLevel" label="等级"></el-table-column>
+              <el-table-column prop="userName" label="接收人"></el-table-column>
+              <el-table-column prop="distributionRatio" label="比例"></el-table-column>
+              <el-table-column prop="amount" label="金额"></el-table-column>
+            </el-table>
+          </div>
+        </OpenCloseBox>
+        <OpenCloseBox id="shyj" v-if="orderInfo && orderInfo.orderstatus == 4 && orderInfo.auditopinion">
+          <span slot="title">审核意见</span>
+          <div slot="boby">
+            <p style=" padding: 10px 50px">
+              {{ orderInfo.auditopinion }}
+            </p>
+          </div>
+        </OpenCloseBox>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" type="warning" @click="updatedCost" v-if="isAuditing">更改费用</el-button>
+      <el-button size="small" type="primary" style="background-color: #0EC216; border: 1px solid #0EC216"
+        @click="adjustFee"><span v-if="isAuditing">取消调整</span><span v-if="!isAuditing">调整费用</span></el-button>
+      <el-button size="small" type="primary"
+        style="background-color: #0EC216;border: 1px solid #0EC216;margin-right: 30px;"
+        @click="adusitFUn">审核通过</el-button>
+      <el-button size="small" type="primary" plain @click="dialogVisible = false">关闭</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+import OpenCloseBox from './openclose.vue'
+
+export default {
+  name: "detailsDialog",
+  data() {
+    return {
+      dialogVisible: false,
+      obj: {},
+      warrantObj: {},
+      selectedItem: null,
+      isAuditing: false,
+    };
+  },
+  props: {
+    orderInfo: {
+      type: Object,
+      default: {}
+    },
+    feeOrderNewVoList: Object,
+  },
+  components: { OpenCloseBox },
+  methods: {
+    adjustFee() {
+      this.isAuditing = !this.isAuditing;
+    },
+    adusitFUn() {
+      this.$emit('adusitFUn')
+    },
+    updatedCost() {
+      let newCost = {
+        deptManagerFee : this.feeOrderNewVoList.deptManagerFee,
+        feeOrder : this.feeOrderNewVoList.list,
+      }
+      this.$emit('updatedCost',newCost)
+      this.isAuditing=false;
+    },
+    feeOrderNewVomergeRows({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+        if (rowIndex === 0 || this.feeOrderNewVoList.list[rowIndex].type !== this.feeOrderNewVoList.list[rowIndex - 1].type) {
+          let rowSpan = 1;
+          for (let i = rowIndex + 1; i < this.feeOrderNewVoList.list.length; i++) {
+            if (this.feeOrderNewVoList.list[i].type === row.type) {
+              rowSpan++;
+            } else {
+              break;
+            }
+          }
+          return [rowSpan, 1];
+        } else {
+          return [0, 0];
+        }
+      }
+      return [1, 1];
+    },
+    selectItem(item) {
+      this.selectedItem = item;
+      document.getElementById(item).scrollIntoView({ behavior: "smooth" });
+    },
+    setBackupVisible: function (backupVisible) {
+      this.selectedItem = 'gsxx'
+      this.dialogVisible = backupVisible
+    },
+    imageFun(param) {
+      this.obj = param
+    },
+    warrantyFun(param) {
+      this.warrantObj = param
+
+    },
+    saveAs(blob, filename) {
+      var link = document.createElement("a");
+      link.href = window.URL.createObjectURL(blob);
+      link.target = "_ blank";
+      link.download = filename;
+      link.click();
+    },
+    //预览文件
+    viewfile(index) {
+      let name = index.fileurl.lastIndexOf("/");
+      fetch(index.fileurl)
+        .then((response) => response.blob())
+        .then((blob) => {
+          this.saveAs(
+            blob,
+            index.fileurl.substring(name + 1, index.fileurl.length)
+          );
+        })
+        .catch((error) => { });
+    },
+  }
+};
+</script>
+<style lang="scss" scoped>
+.details-body {
+  .tabLeft {
+    list-style: none;
+    padding-left: 0;
+    width: 100px;
+
+    li {
+      height: 40px;
+      line-height: 40px;
+      font-size: 14px;
+      font-weight: 500;
+      padding-left: 20px;
+      cursor: pointer;
+    }
+
+    li:hover {
+      color: var(--themeColor);
+    }
+  }
+
+  .li-selected {
+    color: var(--themeColor);
+    background-color: rgba(212, 36, 38, 0.06);
+  }
+}
+
+.icon-img {
+  width: 30px;
+  height: 30px;
+  vertical-align: bottom
+}
+
+.details-title {
+  font-weight: bold;
+  font-size: 16px;
+}
+
+.quotation-style {
+  font-size: 0;
+
+  b {
+    background: #F7F7F9;
+    font-size: 14px;
+  }
+
+  b,
+  span {
+    display: inline-block;
+    box-sizing: border-box;
+    width: 25%;
+    text-align: center;
+    line-height: 40px;
+    border: 1px solid #EEF1F6;
+    font-size: 14px;
+  }
+}
+
+.premium-style {
+  div {
+    padding: 5px 0;
+  }
+
+  span {
+    color: #868B98;
+  }
+}
+
+.driving-style {
+  span:first-child {
+    width: 70%;
+  }
+
+  b:first-child {
+    width: 70%;
+  }
+
+  b,
+  span {
+    width: 15%;
+  }
+}
+
+.tax-arrears {
+
+  b,
+  span {
+    width: 25%;
+  }
+}
+
+.kind-arrears {
+
+  b,
+  span {
+    width: 33.33%;
+  }
+}
+
+.imageStyle {
+  display: inline-block;
+  width: 120px;
+  height: 120px;
+  // box-shadow: #ddd 0px 0px 5px;
+  margin-right: 86px;
+  border: 1px dashed #CED4DA;
+  background: #F7F7F9;
+}
+
+.FeeEnclosure {
+  /deep/ table {
+    width: 100% !important;
+  }
+
+  /deep/ .cell {
+    text-align: center;
+  }
+
+  /deep/ .el-table__empty-block {
+    width: 100% !important;
+  }
+}
+
+/deep/ .el-dialog__body {
+  padding-top: 0;
+  border-bottom: 1px solid #EEF1F6;
+  background-color: rgb(242, 242, 242);
+  padding: 0;
+}
+</style>

+ 1003 - 190
src/views/FinancialManagement/CarInsurance/Verifytasks/Verifyuntasks.vue

@@ -1,70 +1,7 @@
 <template>
   <div class="page">
-    <el-form :inline="true" :model="pageRequest" class="demo-form-inline" size="small" label-width="130px"
-      style="text-align:center;">
-      <el-row>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-          <el-form-item label="订单号">
-            <el-input v-model="pageRequest.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-          <el-form-item label="车牌号">
-            <el-input v-model="pageRequest.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-          <el-form-item label="车架号">
-            <el-input v-model="pageRequest.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-          <el-form-item label="投保人姓名">
-            <el-input v-model="pageRequest.insuredName" placeholder="请输入投保人姓名" class="widths" clearable></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-          <el-form-item label="机构名称">
-            <el-cascader class="widths" :options="institutionOptions" v-model="pageRequest.deptId" :props="{
-              checkStrictly: true, value: 'id',
-              label: 'name',
-            }" @change="handleChange" clearable></el-cascader>
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-          <el-form-item label="订单状态">
-            <el-select v-model="pageRequest.auditStatus"  class="widths" clearable>
-              <!-- <el-option v-for="val in optionsStatus" :key='val.dictValue' :label="val.dictTag"
-                v-model="val.dictValue"></el-option> -->
-              <el-option label="未审核" value="0"></el-option>
-              <el-option label="审核通过" value="1"></el-option>
-              <el-option label="审核驳回" value="2"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-          <el-form-item label="录单日期">
-            <el-date-picker v-model="value2" type="daterange" @change="monthChange" start-placeholder="开始日期"
-              end-placeholder="结束日期" class="widths" value-format="yyyy-MM-dd" style="width: 220px;" clearable>
-            </el-date-picker>
-
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-          <el-form-item label="保险公司">
-            <el-select v-model="pageRequest.companyId" filterable class="widths" clearable>
-              <el-option v-for="val in companyList" :key='val.id' :label="val.name" v-model="val.id"></el-option>
-            </el-select>
-
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="3">
-
-          <kt-button label="查询" type="primary" perms="carInsurance:expenseVerification:pendingReview:query"
-            @click="onSubmit" />
-        </el-col>
-      </el-row>
-    </el-form>
+    <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse"
+      @areaSelectChange="areaSelectChange"></retrievalForm>
     <el-table size="small" :data="pageResult" height="590" border v-loading="loading" highlight-current-row stripe
       @expand-change="handleRowChange" ref="expandTable"
       :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }">
@@ -74,7 +11,7 @@
           <span>{{ scope.row.username }}({{ scope.row.userid }})</span>
         </template>
       </el-table-column>
-      <el-table-column prop="managementSource" label="机构来源" align="center" ></el-table-column>
+      <el-table-column prop="managementSource" label="机构来源" align="center"></el-table-column>
       <el-table-column prop="insCompany" label="承保公司" width="180" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.insCompany ? scope.row.insCompany : '--' }}</span>
@@ -106,39 +43,28 @@
         layout="total, sizes, prev, pager, next, jumper" :total="totalSize"></el-pagination>
     </div>
     <!-- 车辆报价新页面 -->
-    <detailsDialog ref="detailsDialog" :orderInfo="orderInfo" :isAuditing="isAuditing">
-        <span slot="footer1">
-           <el-button size="small" type="warning" v-if="adjustFeeFlag" @click="updatedCost">更改费用</el-button>
-          <el-button size="small" type="primary" style="background-color: #0EC216; border: 1px solid #0EC216;"
-          @click="adjustFee"><span v-if="adjustFeeFlag">取消调整</span><span v-if="!adjustFeeFlag">调整费用</span></el-button>
-        <el-button size="small" type="primary"
-          style="background-color: #0EC216; border: 1px solid #0EC216;margin-right: 30px;"
-          @click="adusitFUn">审核通过</el-button>
-        </span>
+    <detailsDialog ref="detailsDialog" :orderInfo="orderInfo" :feeOrderNewVoList="feeOrderNewVoList"
+      @updatedCost="updatedCost">
     </detailsDialog>
   </div>
 </template>
 <script>
-import {
-  pathToBase64,
-  base64ToPath
-} from '@/common/image-tools-base64.js';
-import html2Canvas from 'html2canvas'
-import CommonUtil from "@/utils/comutil.js";
+
+import retrievalForm from "@/components/Form/retrievalForm.vue";
 import Cookies from "js-cookie";
 import KtButton from "@/views/Core/KtButton";//按钮权限组件
-import QRCode from "qrcodejs2";
-import detailsDialog from "@/views/Core/components/detailsDialog.vue";
+import detailsDialog from "@/views/Core/components/detailsDialogPro.vue";
 
 export default {
   components: {
     KtButton,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
   data() {
     return {
-      isAuditing:{},
-      feeOrderNewVo: [], //费用明细
+      feeOrderNewVoList: {},
+      isAuditing: {},
       oldFeeInfo: [],//原始跟单费用比例
       adjustFeeDescInfo: {},//调整费用时使用对象
       adjustFeeFlag: false,
@@ -152,19 +78,129 @@ export default {
       totalSize: null,//总数
       peopleid: "",//工号
       pageResult: [],//列表
-      pageRequest: {  //查询的默认条件
-        auditStatus: "0",
-        orderNo: "",
-        frameNo: "",
-        insuredName: "",
-        licenseNo: "",
-        userId: "",
-        endDate: "",
-        startDate: "",
+      pageRequest: {
         pageNum: 1,
         pageSize: 20,
-        deptId: "",
+        orderStatus: 0,
+        userId: "",
       },
+      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'
+        },
+      ],
       orderInfo: {
         //选中的订单
         ownerinfo: {},
@@ -194,32 +230,37 @@ export default {
       insAreaCompanyList: [],//子订单list
       companyList: [], //保险公司
       oldVersionHistory: [],
+      natureOfVehicleUseoptions: [],
+      businessVehicleUseoptions: [],
+      outOfBusinessVehicleUseoptions: [],
+      vehicleTypeoptions: [],
+      trafficManagementVehicleTypeoptions: [],
+      energyTypeoptions: [],
+
+      carImageList: [], //车辆影像
+      ownerImageList: [], //车主影像
+      policyImageList: [], //投保人影像
+      insuredImageList: [], //被保人影像
+      carCheckImageList: [], //验车照影像
+      oldfileList: [], //电子保单数据
     }
   },
   created() {
-    this.$api.letter.gainTopList().then(res => {
-      this.companyList = res.data
-    })
-    // this.$api.insCompany.dicType('insOrderStatus').then(res => {
-    //   this.optionsStatus = res.data.ddList
-    //   let filterArr = res.data.ddList.filter(item => {
-    //     return item.dictTag == '已承保'
-    //   })
-    //   if (filterArr.length) {
-    //     this.pageRequest.orderStatus = filterArr[0].dictValue
-    //   }
-    // })
-    this.peopleid = Cookies.get('user');
-    this.pageRequest.deptId = JSON.parse(localStorage.getItem('user_data')).deptId;
-    this.$api.dept.findDeptTree().then((res) => {
-      this.institutionOptions = res.data;
+    this.pageRequest.userId = Cookies.get("user");
+    this.areaqueryList(1, 99, "provinceId");
+    this.CompanyList();
+    this.agrmentlist();
+    this.$api.insCompany.dicType('productsType').then(res => {
+      if (res.code == 200) {
+        this.selectDataMatching(this.retrievalFields, 'riskCode', res.data.ddList);
+      }
     });
-    if (this.peopleid != 'admin') {
-      this.pageRequest.userId = this.peopleid;
-      this.findPage();
-    } else {
-      this.pageRequest.userId = 'admin';
-    }
+    this.getDicType("natureOfVehicleUse");//车辆使用性质
+    this.getDicType("businessVehicleUse"); //(车辆用途)营业
+    this.getDicType("outOfBusinessVehicleUse"); //(车辆用途)非营业
+    this.getDicType("vehicleType"); //车辆种类
+    this.getDicType("trafficManagementVehicleType"); //车辆类型
+    this.getDicType("energyType"); //能源种类
   },
   mounted() {
     window.addEventListener('resize', this.getDimensions);
@@ -228,62 +269,99 @@ export default {
     window.removeEventListener('resize', this.getDimensions);
   },
   methods: {
-    updatedCost() {
+    //获取机构数据
+    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[type + 'options'] = res.data.ddList;
+        }
+      })
+    },
+    //下拉数据匹配
+    selectDataMatching(files, name, data) {
+      files.forEach(filed => {
+        if (filed.name == name) {
+          filed.options = data;
+        }
+      })
+    },
+    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:
+      }
+    },
+    handleFormSubmit(data) {
+      this.pageRequest.pageNum = 1;
+      this.pageRequest.pageSize = 20;
+      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;
+      })
+    },
+    updatedCost(data) {
+      let list = JSON.parse(JSON.stringify(data));
+      console.log(list)
       const exportFee = [];
       const entranceFee = [];
-      this.feeOrderNewVo.forEach(item => {
-        const entranceItem = {
-          exportSuperviseCosts: item.exportSuperviseCosts,
-          insuranceType: item.insuranceType,
-          otherCostsPremiums: item.otherCostsPremiums,
-          otherCostsProportion: item.otherCostsProportion,
-          premium: item.premium,
-          superviseCosts: item.superviseCosts,
-          sySuperviseCostsPremiums: item.sySuperviseCostsPremiums,
-          totalAmount: item.totalAmount,
-          totalProportion: item.totalProportion,
-        };
-        const exportItem = {
-          insuranceType: item.exportInsuranceType,
-          otherCostsPremiums: item.exportOtherCostsPremiums,
-          otherCostsProportion: item.exportOtherCostsProportion,
-          superviseCosts: item.exportSuperviseCosts,
-          superviseCostsPremiums: item.exportSuperviseCostsPremiums,
-          totalAmount: item.exportTotalAmount,
-          totalProportion: item.exportTotalProportion
-        };
-        entranceFee.push(entranceItem);
-        exportFee.push(exportItem);
+      list.feeOrder.forEach((item, index) => {
+        if (index < 3) entranceFee.push(item);
+        else exportFee.push(item);
       });
       let params = {
         feeId: this.oldVersionHistory.feeId,
         feeOrderNewVoOld: this.oldVersionHistory,
         feeOrderNewVoNew: {
-          deptManagerFee: this.orderInfo.feeOrderNewVo.deptManagerFee,
+          deptManagerFee: list.deptManagerFee,
           entranceFee: entranceFee,
           exportFee: exportFee,
         }
       }
       this.$api.task.costsadjust(params).then((res) => {
         if (res.code == '200') {
-          let data=res.data;
-          let list=[];
-          this.orderInfo.feeOrderNewVo.deptManagerFee =data.deptManagerFee;
-          data.exportFee.forEach((val, index) => {
-            list.push({
-              exportInsuranceType: val.insuranceType,
-              exportOtherCostsPremiums: val.otherCostsPremiums,
-              exportOtherCostsProportion: val.otherCostsProportion,
-              exportSuperviseCosts: val.superviseCosts,
-              exportSuperviseCostsPremiums: val.superviseCostsPremiums,
-              exportTotalAmount: val.totalAmount,
-              exportTotalProportion: val.totalProportion,
-              ...data.entranceFee[index]
-            })
+          let data = res.data;
+          let list = [];
+          data.exportFee.map((val, index) => {
+            val.type = "出口费用"
+            return val;
+          })
+          data.entranceFee.map((val, index) => {
+            val.type = "入口费用"
+            return val;
           })
-          this.feeOrderNewVo=list;
-          this.isAuditing.adjustFeeFlag=false
-          this.adjustFeeFlag=false;
+          console.log(data)
+          this.feeOrderNewVoList = {
+              deptManagerFee: data.deptManagerFee,
+              list: [...data.entranceFee,...data.exportFee],
+            }
           this.$message({
             type: 'success',
             message: res.msg,
@@ -299,17 +377,6 @@ export default {
     closeDialog() {
       this.adjustFeeFlag = false;
     },
-    //调整费用
-    adjustFee() {
-      // this.$refs.detailsDialog.setBackupVisible(false);
-
-      this.isAuditing.adjustFeeFlag=!this.adjustFeeFlag
-      this.adjustFeeFlag = !this.adjustFeeFlag;
-      if (!this.adjustFeeFlag) {
-        //取消调整时,值置为原始比例
-        this.adjustFeeDescInfo = { ...this.oldFeeInfo }
-      }
-    },
     //审核通过
     adusitFUn() {
       let subParam = {
@@ -385,12 +452,85 @@ export default {
     getDimensions() {
       this.width = document.documentElement.clientWidth - 350 + 'px';
     },
+    //使用性质
+    natureOfVehicleUseCap(ele) {
+      if (this.natureOfVehicleUseoptions.find(item => item.dictValue == ele)) {
+        return this.natureOfVehicleUseoptions.find((item) => {
+          return item.dictValue === ele;
+        }).dictTag;
+      }
+      else {
+        return ''
+      }
+    },
+    //车辆类型
+    trafficManagementVehicleTypeCap(ele) {
+      if (this.trafficManagementVehicleTypeoptions.find(item => item.dictValue == ele)) {
+        return this.trafficManagementVehicleTypeoptions.find((item) => {
+          return item.dictValue === ele;
+        }).dictTag;
+      }
+      else {
+        return ''
+      }
+    },
+    //车辆种类
+    vehicleTypeCap(ele) {
+      if (this.vehicleTypeoptions.find(item => item.dictValue == ele)) {
+        return this.vehicleTypeoptions.find((item) => {
+          return item.dictValue === ele;
+        }).dictTag;
+      }
+      else {
+        return ''
+      }
+    },
+    //能源种类
+    energyTypeCap(ele) {
+      if (this.energyTypeoptions.find(item => item.dictValue == ele)) {
+        return this.energyTypeoptions.find((item) => {
+          return item.dictValue === ele;
+        }).dictTag;
+      }
+      else {
+        return ''
+      }
+    },
+    //车辆用途
+    outOfBusinessVehicleUseCap(type, ele) {
+      switch (type) {
+        case '非营业':
+          if (this.outOfBusinessVehicleUseoptions.find(item => item.dictValue == ele)) {
+            return this.outOfBusinessVehicleUseoptions.find((item) => {
+              return item.dictValue === ele;
+            }).dictTag;
+          }
+          else {
+            return ''
+          }
+        case '营业':
+          if (this.businessVehicleUseoptions.find(item => item.dictValue == ele)) {
+            return this.businessVehicleUseoptions.find((item) => {
+              return item.dictValue === ele;
+            }).dictTag;
+          }
+          else {
+            return ''
+          }
+        default:
+      }
+
+    },
     //应用详情
     OrderDetails(dy) {
+      this.carImageList = [];
+      this.ownerImageList = []; //车主影像
+      this.policyImageList = []; //投保人影像
+      this.insuredImageList = []; //被保人影像
+      this.carCheckImageList = []; //验车照影像
       let params = {
         orderNo: dy.orderno,
       }
-      this.feeOrderNewVo = []
       this.$api.task.feeDetail(params).then((res) => {
         if (res.code == 200) {
           res.data.kindinfo.map((ele, index) => {
@@ -413,31 +553,704 @@ export default {
             }
             return ele;
           });
+          // 获取影像
+          this.$api.letter.findByQuoteNo(dy.quoteno).then((resImage) => {
+            Object.keys(resImage.data).forEach((keys) => {
+              if (resImage.data[keys]) {
+                resImage.data[keys].url = resImage.data[keys].url
+                  ? process.env.BASE_URL + resImage.data[keys].url
+                  : null;
+                switch (keys) {
+                  case "C01":
+                  case "D01":
+                    resImage.data[keys].url
+                      ? this.carImageList.push(resImage.data[keys].url)
+                      : "";
+                    break;
+                  case "C02":
+                  case "D02":
+                    resImage.data[keys].url
+                      ? this.ownerImageList.push(resImage.data[keys].url)
+                      : "";
+                    break;
+                  case "C03":
+                  case "D03":
+                    resImage.data[keys].url
+                      ? this.policyImageList.push(resImage.data[keys].url)
+                      : "";
+                    break;
+                  case "C04":
+                  case "D04":
+                    resImage.data[keys].url
+                      ? this.insuredImageList.push(resImage.data[keys].url)
+                      : "";
+                    break;
+                  case "XC00":
+                  case "GC00":
+                  case "GX00":
+                    resImage.data[keys].url
+                      ? this.carCheckImageList.push(resImage.data[keys].url)
+                      : "";
+                    break;
+                  default:
+                    break;
+                }
+              }
+            });
+            let obj = {
+              carImageList: this.carImageList,
+              ownerImageList: this.ownerImageList,
+              policyImageList: this.policyImageList,
+              insuredImageList: this.insuredImageList,
+              carCheckImageList: this.carCheckImageList
+            }
+            this.$refs.detailsDialog.imageFun(obj);
+          });
           if (res.data.feeOrderNewVo && res.data.feeOrderNewVo.exportFee && res.data.feeOrderNewVo.entranceFee) {
-            res.data.feeOrderNewVo.exportFee.forEach((val, index) => {
-              this.feeOrderNewVo.push({
-                exportInsuranceType: val.insuranceType,
-                exportOtherCostsPremiums: val.otherCostsPremiums,
-                exportOtherCostsProportion: val.otherCostsProportion,
-                exportSuperviseCosts: val.superviseCosts,
-                exportSuperviseCostsPremiums: val.superviseCostsPremiums,
-                exportTotalAmount: val.totalAmount,
-                exportTotalProportion: val.totalProportion,
-                ...res.data.feeOrderNewVo.entranceFee[index]
-              })
+            let data = JSON.parse(JSON.stringify(res.data.feeOrderNewVo))
+            this.oldVersionHistory = data;
+            data.exportFee.map((val, index) => {
+              val.type = "出口费用"
+              return val;
+            })
+            data.entranceFee.map((val, index) => {
+              val.type = "入口费用"
+              return val;
             })
-            this.oldVersionHistory = res.data.feeOrderNewVo;
+            this.feeOrderNewVoList = {
+              deptManagerFee: data.deptManagerFee,
+              list: [...data.entranceFee,...data.exportFee],
+            }
+          }
+          res.data.carinfo.carnature = this.natureOfVehicleUseCap(res.data.carinfo.carnature)
+          res.data.carinfo.cartype = this.trafficManagementVehicleTypeCap(res.data.carinfo.cartype)
+          res.data.carinfo.cimodelclass = this.vehicleTypeCap(res.data.carinfo.cimodelclass)
+          res.data.carinfo.energyType = this.energyTypeCap(res.data.carinfo.energyType)
+          res.data.carinfo.vehicleUse = this.outOfBusinessVehicleUseCap(res.data.carinfo.carnature, res.data.carinfo.vehicleUse)
+          this.orderInfo = res.data;
+          this.oldfileList = [];
+          let businessList = []
+          let accidentList = []
+          if (res.data.orderstatus == "3") {
+            switch (res.data.inscompany) {
+              case "永安财险":
+                if (this.orderInfo.jqpolicyno) {
+                  this.$api.letter
+                    .getPolicyPrint({
+                      companyId: res.data.id,
+                      policytype: "jq",
+                    })
+                    .then((res) => {
+                      //交强保单
+                      if (res.data) {
+                        let result = res.data.replace(/[\r\n]/g, "");
+                        let pdfBase64 = `data:application/pdf;base64,${result}`;
+                        base64ToPath(pdfBase64).then((path) => {
+                          if (path) {
+                            this.oldfileList.push({
+                              fileTitle: "交强电子保单",
+                              filename: this.orderInfo.jqpolicyno,
+                              fileurl: path,
+                            });
+                          }
+                        });
+                      }
+                    });
+                  this.$api.letter
+                    .getPolicyPrint2({
+                      companyId: res.data.id,
+                      policytype: "jq",
+                    })
+                    .then((res) => {
+                      //交强保单
+                      if (res.data) {
+                        let result = res.data.replace(/[\r\n]/g, "");
+                        let pdfBase64 = `data:application/pdf;base64,${result}`;
+                        base64ToPath(pdfBase64).then((path) => {
+                          if (path) {
+                            this.oldfileList.push({
+                              fileTitle: "交强电子标志",
+                              filename: this.orderInfo.jqpolicyno,
+                              fileurl: path,
+                            });
+                          }
+                        });
+                      }
+                    });
+                }
+                if (this.orderInfo.sypolicyno) {
+                  this.$api.letter
+                    .getPolicyPrint({
+                      companyId: res.data.id,
+                      policytype: "sy",
+                    })
+                    .then((res) => {
+                      //商业保单
+                      if (res.data) {
+                        let result = res.data.replace(/[\r\n]/g, "");
+                        let pdfBase64 = `data:application/pdf;base64,${result}`;
+                        base64ToPath(pdfBase64).then((path) => {
+                          if (path) {
+                            businessList.push({
+                              fileTitle: "商业电子保单",
+                              filename: this.orderInfo.sypolicyno,
+                              fileurl: path,
+                            });
+                          }
+                        });
+                      }
+                    });
+                }
+                break;
+              case "华泰财险":
+                if (this.orderInfo.jqpolicyno) {
+                  this.$api.letter
+                    .HuataigetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        if (res.data.jqxPolicyUrl) {
+                          this.oldfileList.push({
+                            fileTitle: "交强电子保单",
+                            filename: this.orderInfo.jqpolicyno,
+                            fileurl: res.data.jqxPolicyUrl,
+                          });
+                        }
+                        if (res.data.jqxFlagUrl) {
+                          this.oldfileList.push({
+                            fileTitle: "交强电子标志",
+                            filename: this.orderInfo.jqpolicyno,
+                            fileurl: res.data.jqxFlagUrl,
+                          });
+                        }
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.sypolicyno) {
+                  this.$api.letter
+                    .HuataigetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0510",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data && res.data.syxPolicyUrl) {
+                        businessList.push({
+                          fileTitle: "商业电子保单",
+                          filename: this.orderInfo.sypolicyno,
+                          fileurl: res.data.syxPolicyUrl,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                break;
+              case "中煤财险":
+                if (this.orderInfo.jqpolicyno) {
+                  this.$api.letter
+                    .ZhongmeigetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data && res.data[0]) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子保单",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data[0],
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                  this.$api.letter
+                    .ZhongmeigetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "1", // 1:标志
+                    })
+                    .then((res) => {
+                      if (res.data && res.data[0]) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子标志",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data[0],
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.sypolicyno) {
+                  this.$api.letter
+                    .ZhongmeigetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0510",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data && res.data[0]) {
+                        businessList.push({
+                          fileTitle: "商业电子保单",
+                          filename: this.orderInfo.sypolicyno,
+                          fileurl: res.data[0],
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.crossInsurance.length > 0) {
+                  this.orderInfo.crossInsurance.map((ele) => {
+                    this.$api.letter
+                      .ZhongmeigetPolicyPrint({
+                        ridePolicyNo: ele.ridePolicyNo,
+                        companyId: res.data.id,
+                        riskCode: "0513",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.code == 200 && res.data) {
+                          accidentList.push({
+                            fileTitle: "驾意险保单",
+                            filename: this.orderInfo.sypolicyno,
+                            fileurl: res.data[0],
+                          });
+                        } else {
+                          this.$message.error(res.msg);
+                        }
+                      });
+                  });
+                }
+                break;
+              case "永诚财险":
+                if (this.orderInfo.jqpolicyno) {
+                  this.$api.letter
+                    .yongchenggetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.code == 200 && res.data) {
+                        if (res.data.jqUrl) {
+                          this.oldfileList.push({
+                            fileTitle: "交强电子保单",
+                            filename: this.orderInfo.jqpolicyno,
+                            fileurl: res.data.jqUrl,
+                          });
+                        }
+                        if (res.data.jqFlagUrl) {
+                          this.oldfileList.push({
+                            fileTitle: "交强电子标志",
+                            filename: this.orderInfo.jqpolicyno,
+                            fileurl: res.data.jqFlagUrl,
+                          });
+                        }
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.sypolicyno) {
+                  this.$api.letter
+                    .yongchenggetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0510",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data && res.data.syUrl) {
+                        businessList.push({
+                          fileTitle: "商业电子保单",
+                          filename: this.orderInfo.sypolicyno,
+                          fileurl: res.data.syUrl,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.crossInsurance.length > 0) {
+                  this.orderInfo.crossInsurance.map((ele) => {
+                    this.$api.letter
+                      .yongchenggetPolicyPrint({
+                        companyId: res.data.id,
+                        policyNumber: ele.policyNumber,
+                        riskCode: "0513",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.code == 200 && res.data) {
+                          accidentList.push({
+                            fileTitle: "驾意险保单",
+                            filename: ele.policyNumber,
+                            fileurl: res.data.jyUrl,
+                          });
+                        } else {
+                          this.$message.error(res.msg);
+                        }
+                      });
+                  });
+                }
+                break;
+              case "国任财险":
+                if (this.orderInfo.jqpolicyno) {
+                  this.$api.letter
+                    .guoRengetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子保单",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                  this.$api.letter
+                    .guoRengetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "1", //1:标志
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子标志",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.sypolicyno) {
+                  this.$api.letter
+                    .guoRengetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0510",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        businessList.push({
+                          fileTitle: "商业电子保单",
+                          filename: this.orderInfo.sypolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.crossInsurance.length > 0) {
+                  this.orderInfo.crossInsurance.map((ele) => {
+                    this.$api.letter
+                      .guoRengetPolicyPrint({
+                        companyId: res.data.id,
+                        policyNumber: ele.policyNumber,
+
+                        riskCode: "0513",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data) {
+                          accidentList.push({
+                            fileTitle: "驾意险保单",
+                            filename: ele.policyNumber,
+                            fileurl: res.data,
+                          });
+                        } else {
+                          this.$message.error(res.msg);
+                        }
+                      });
+                  });
+                }
+                break;
+
+              case "紫金财险":
+                if (this.orderInfo.jqpolicyno) {
+                  this.$api.letter
+                    .zijingetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子保单",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                  this.$api.letter
+                    .zijingetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "1", //1:标志
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子标志",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.sypolicyno) {
+                  this.$api.letter
+                    .zijingetPolicyPrint({
+                      companyId: res.data.id,
+                      riskCode: "0510",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        businessList.push({
+                          fileTitle: "商业电子保单",
+                          filename: this.orderInfo.sypolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.crossInsurance.length > 0) {
+                  this.orderInfo.crossInsurance.map((ele) => {
+                    this.$api.letter
+                      .zijingetPolicyPrint({
+                        companyId: res.data.id,
+                        policyNumber: ele.policyNumber,
+                        riskCode: "0513",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data) {
+                          accidentList.push({
+                            fileTitle: "驾意险保单",
+                            filename: ele.policyNumber,
+                            fileurl: res.data,
+                          });
+                        } else {
+                          this.$message.error(res.msg);
+                        }
+                      });
+                  });
+                }
+                break;
+              case "渤海财险":
+                if (this.orderInfo.jqpolicyno) {
+                  this.$api.letter
+                    .getPolicyPrintboHai({
+                      companyId: res.data.id,
+                    })
+                    .then((res) => {
+                      if (res.code == 200 && res.data) {
+                        if (res.data.jqxPolicyUrl) {
+                          this.oldfileList.push({
+                            fileTitle: "交强电子保单",
+                            filename: this.orderInfo.jqpolicyno,
+                            fileurl: res.data.jqxPolicyUrl,
+                          });
+                        }
+                        if (res.data.jqxFlagUrl) {
+                          this.oldfileList.push({
+                            fileTitle: "交强电子标志",
+                            filename: this.orderInfo.jqpolicyno,
+                            fileurl: res.data.jqxFlagUrl,
+                          });
+                        }
+                        if (res.data.syxPolicyUrl) {
+                          businessList.push({
+                            fileTitle: "商业电子保单",
+                            filename: this.orderInfo.sypolicyno,
+                            fileurl: res.data.syxPolicyUrl,
+                          });
+                        }
+                        if (
+                          res.data.jyxInfoList &&
+                          res.data.jyxInfoList.length > 0
+                        ) {
+                          res.data.jyxInfoList.forEach((val) => {
+                            accidentList.push({
+                              fileTitle: "驾意险保单",
+                              filename: "驾意险保单",
+                              fileurl: val.jyx_policy_url,
+                            });
+                          });
+                        }
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                break;
+              case "恒邦财险":
+              case "安盛天平":
+              case "中国人寿":
+              case "太平财险":
+              case "华农财险":
+              case "众安财险":
+                if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
+                  this.$api.letter
+                    .pythongetPolicyPrint({
+                      subOrderNo: res.data.id,
+                    })
+                    .then((res) => {
+                      if (res.code == 200 && res.data) {
+                        if (res.data.jqxPolicyUrl) {
+                          this.oldfileList.push({
+                            fileTitle: "交强电子保单",
+                            filename: this.orderInfo.jqpolicyno,
+                            fileurl: res.data.jqxPolicyUrl,
+                          });
+                        }
+                        if (res.data.jqxFlagUrl) {
+                          this.oldfileList.push({
+                            fileTitle: "交强电子标志",
+                            filename: this.orderInfo.jqpolicyno,
+                            fileurl: res.data.jqxFlagUrl,
+                          });
+                        }
+                        if (res.data.syxPolicyUrl) {
+                          businessList.push({
+                            fileTitle: "商业电子保单",
+                            filename: this.orderInfo.sypolicyno,
+                            fileurl: res.data.syxPolicyUrl,
+                          });
+                        }
+                        if (
+                          res.data.jyxInfoList &&
+                          res.data.jyxInfoList.length > 0
+                        ) {
+                          res.data.jyxInfoList.forEach((val) => {
+                            accidentList.push({
+                              fileTitle: "驾意险保单",
+                              filename: "驾意险保单",
+                              fileurl: val.jyx_policy_url,
+                            });
+                          });
+                        }
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                break;
+              case "大家财险":
+                if (this.orderInfo.jqpolicyno) {
+                  this.$api.letter
+                    .obtainWarranty({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子保单",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                  this.$api.letter
+                    .obtainWarranty({
+                      companyId: res.data.id,
+                      riskCode: "0507",
+                      type: "1", //1:标志
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子标志",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.sypolicyno) {
+                  this.$api.letter
+                    .obtainWarranty({
+                      companyId: res.data.id,
+                      riskCode: "0510",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        businessList.push({
+                          fileTitle: "商业电子保单",
+                          filename: this.orderInfo.sypolicyno,
+                          fileurl: res.data,
+                        });
+                      }
+                    });
+                }
+                if (this.orderInfo.crossInsurance.length > 0) {
+                  this.orderInfo.crossInsurance.map((ele) => {
+                    this.$api.letter
+                      .zijingetPolicyPrint({
+                        companyId: res.data.id,
+                        policyNumber: ele.policyNumber,
+                        riskCode: "0513",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data) {
+                          accidentList.push({
+                            fileTitle: "驾意险保单",
+                            filename: ele.policyNumber,
+                            fileurl: res.data,
+                          });
+                        } else {
+                          this.$message.error(res.msg);
+                        }
+                      });
+                  });
+                }
+                break;
+              default:
+            }
+            let obj = {
+              oldfileList: this.oldfileList,
+              businessList,
+              accidentList
+            }
+            this.$refs.detailsDialog.warrantyFun(obj);
           }
-          res.data.carinfo.carnature=res.data.carinfo.carnature=='02'?"非营业":"营业";
-          this.orderInfo = res.data
           this.feeDetailInfo = res.data.orderFeeResult;
           this.oldFeeInfo = res.data.adjustFeeDescVo;
           this.adjustFeeDescInfo = { ...this.oldFeeInfo }
           // this.quotedetailsdialogVisible = true;
-          this.isAuditing={
-            feeOrderNewVo:this.feeOrderNewVo,
-            adjustFeeFlag:this.adjustFeeFlag
-          }
+
           this.$refs.detailsDialog.setBackupVisible(true);
 
         } else {

+ 2 - 4
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementSource.vue

@@ -128,7 +128,7 @@
             <el-option v-for="val in companyList" :key="val.id" :label="val.name" :value="val.id"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="险种:" prop="insuranceType"> 
+        <el-form-item label="险种:" prop="insuranceType">
           <el-input v-model="addform.insuranceType" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="业务归属:" prop="businessOwner">
@@ -260,14 +260,12 @@
 </template>
 <script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
-import GenericForm from '@/components/Form/GenericForm.vue';//表单组件
 import KtButton from "@/views/Core/KtButton";
 import CommonUtil from "@/utils/comutil.js";
 export default {
   components: {
     KtCommonTable,
     KtButton,
-    GenericForm
   },
   data() {
     return {
@@ -568,7 +566,7 @@ export default {
     addSubmit(formName){
       this.$refs[formName].validate((valid) => {
           if (valid) {
-         
+
       this.$api.task.SettlementAdd(this.addform).then((res) => {
         if (res.code == "200") {
           if(res.data){

Plik diff jest za duży
+ 303 - 503
src/views/Letter/Orderlist.vue


+ 330 - 194
src/views/Task/AgentPoolChannel/AgentPoolChannel.vue

@@ -1,124 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      v-loading="loading"
-      element-loading-text="加载中..."
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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="请选择" filterable  clearable>
-        <el-option
-          v-for="item in options"
-          :key="item.userId"
-          :label="item.name"
-          :value="item.userId"
-        ></el-option>
+      转发人:
+      <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>
@@ -126,22 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
-  mixins: [mixin], 
+  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: 0,
+        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();
     },
@@ -151,55 +264,101 @@ export default {
         this.pageRequest.pageNum = data.pageRequest.pageNum;
         this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
-      this.loading=true
+      this.loading = true;
       this.$api.task
-        .queryPageHospitalityLinkagent({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:0,
-          userId: Cookies.get("user")
-        })
+        .queryPageHospitalityLinkagent(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
-            this.loading=false
+            this.loading = false;
             this.pageResult = res.data;
           } else {
-            this.loading=false
+            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
+      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'  
-            });
+      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);
+        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.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -230,54 +389,31 @@ export default {
       });
       this.$refs.detailsDialog.setBackupVisible(true);
     },
-    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()
-                    this.$message({
-                      message: res.msg,
-                      type: 'success'  
-                   });
-                }
-                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];
-      }
-    }
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 330 - 195
src/views/Task/AgentPoolChannel/AgentPoolChannel1.vue

@@ -1,124 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      v-loading="loading"
-      element-loading-text="加载中..."
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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="请选择" filterable  clearable>
-        <el-option
-          v-for="item in options"
-          :key="item.userId"
-          :label="item.name"
-          :value="item.userId"
-        ></el-option>
+      转发人:
+      <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>
@@ -126,23 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
-  mixins: [mixin], 
- 
+  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: 1,
+        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();
     },
@@ -152,55 +264,101 @@ export default {
         this.pageRequest.pageNum = data.pageRequest.pageNum;
         this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
-      this.loading=true
+      this.loading = true;
       this.$api.task
-        .queryPageHospitalityLinkagent({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:1,
-          userId: Cookies.get("user")
-        })
+        .queryPageHospitalityLinkagent(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
-            this.loading=false
+            this.loading = false;
             this.pageResult = res.data;
           } else {
-            this.loading=false
+            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
+      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'  
-            });
+      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);
+        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.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -231,54 +389,31 @@ export default {
       });
       this.$refs.detailsDialog.setBackupVisible(true);
     },
-    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()
-                    this.$message({
-                      message: res.msg,
-                      type: 'success'  
-                   });
-                }
-                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];
-      }
-    }
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 329 - 194
src/views/Task/AgentPoolChannel/AgentPoolChannel2.vue

@@ -1,124 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      v-loading="loading"
-      element-loading-text="加载中..."
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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="请选择" filterable  clearable>
-        <el-option
-          v-for="item in options"
-          :key="item.userId"
-          :label="item.name"
-          :value="item.userId"
-        ></el-option>
+      转发人:
+      <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>
@@ -126,23 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
-  mixins: [mixin], 
+  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: 2,
+        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();
     },
@@ -152,55 +264,101 @@ export default {
         this.pageRequest.pageNum = data.pageRequest.pageNum;
         this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
-      this.loading=true
+      this.loading = true;
       this.$api.task
-        .queryPageHospitalityLinkagent({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:2,
-          userId: Cookies.get("user")
-        })
+        .queryPageHospitalityLinkagent(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
-            this.loading=false
+            this.loading = false;
             this.pageResult = res.data;
           } else {
-            this.loading=false
+            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
+      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'  
-            });
+      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);
+        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.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -231,54 +389,31 @@ export default {
       });
       this.$refs.detailsDialog.setBackupVisible(true);
     },
-    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()
-                    this.$message({
-                      message: res.msg,
-                      type: 'success'  
-                   });
-                }
-                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];
-      }
-    }
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 329 - 194
src/views/Task/AgentPoolChannel/AgentPoolChannel3.vue

@@ -1,124 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      v-loading="loading"
-      element-loading-text="加载中..."
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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="请选择" filterable  clearable>
-        <el-option
-          v-for="item in options"
-          :key="item.userId"
-          :label="item.name"
-          :value="item.userId"
-        ></el-option>
+      转发人:
+      <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>
@@ -126,23 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
-  mixins: [mixin], 
+  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();
     },
@@ -152,55 +264,101 @@ export default {
         this.pageRequest.pageNum = data.pageRequest.pageNum;
         this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
-      this.loading=true
+      this.loading = true;
       this.$api.task
-        .queryPageHospitalityLinkagent({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:3,
-          userId: Cookies.get("user")
-        })
+        .queryPageHospitalityLinkagent(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
-            this.loading=false
+            this.loading = false;
             this.pageResult = res.data;
           } else {
-            this.loading=false
+            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
+      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'  
-            });
+      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);
+        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.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -231,54 +389,31 @@ export default {
       });
       this.$refs.detailsDialog.setBackupVisible(true);
     },
-    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()
-                    this.$message({
-                      message: res.msg,
-                      type: 'success'  
-                   });
-                }
-                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];
-      }
-    }
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 328 - 195
src/views/Task/AgentPoolChannel/AgentPoolChannel4.vue

@@ -1,124 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      v-loading="loading"
-      element-loading-text="加载中..."
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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="请选择" filterable  clearable>
-        <el-option
-          v-for="item in options"
-          :key="item.userId"
-          :label="item.name"
-          :value="item.userId"
-        ></el-option>
+      转发人:
+      <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>
@@ -126,82 +17,347 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    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: 4,
+        userId: "",
+      },
+      ddgjdialogVisible:false,
+      trajectoryTable:[],
+      optionsStatus:[],
+    }
   },
-  mixins: [mixin], 
+  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.loading = true;
       this.$api.task
-        .queryPageHospitalityLinkagent({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:4,
-          userId: Cookies.get("user")
-        })
+        .queryPageHospitalityLinkagent(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
-            this.loading=false
+            this.loading = false;
             this.pageResult = res.data;
           } else {
-            this.loading=false
+            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
+      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'  
-            });
+      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);
+        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.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -232,54 +388,31 @@ export default {
       });
       this.$refs.detailsDialog.setBackupVisible(true);
     },
-    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()
-                    this.$message({
-                      message: res.msg,
-                      type: 'success'  
-                   });
-                }
-                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];
-      }
-    }
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 325 - 188
src/views/Task/CompanyPoolChannel/CompanyPoolChannel.vue

@@ -1,124 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      element-loading-text="加载中..."
-      v-loading="loading"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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-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>
@@ -126,24 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
-  mixins: [mixin], 
+  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: 0,
+        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();
     },
@@ -155,13 +266,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByInsuranceCompany({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:0,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByInsuranceCompany(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -172,37 +277,88 @@ export default {
           }
         });
     },
+    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
+      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'  
-            });
+      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);
+        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.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -233,50 +389,31 @@ export default {
       });
       this.$refs.detailsDialog.setBackupVisible(true);
     },
-    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];
-      }
-    }
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 325 - 188
src/views/Task/CompanyPoolChannel/CompanyPoolChannel1.vue

@@ -1,124 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      element-loading-text="加载中..."
-      v-loading="loading"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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-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>
@@ -126,24 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
-  mixins: [mixin], 
+  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: 1,
+        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();
     },
@@ -155,13 +266,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByInsuranceCompany({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:1,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByInsuranceCompany(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -172,37 +277,88 @@ export default {
           }
         });
     },
+    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
+      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'  
-            });
+      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);
+        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.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -233,50 +389,31 @@ export default {
       });
       this.$refs.detailsDialog.setBackupVisible(true);
     },
-    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];
-      }
-    }
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 325 - 188
src/views/Task/CompanyPoolChannel/CompanyPoolChannel2.vue

@@ -1,124 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      element-loading-text="加载中..."
-      v-loading="loading"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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-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>
@@ -126,24 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
-  mixins: [mixin], 
+  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: 2,
+        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();
     },
@@ -155,13 +266,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByInsuranceCompany({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:2,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByInsuranceCompany(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -172,37 +277,88 @@ export default {
           }
         });
     },
+    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
+      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'  
-            });
+      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);
+        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.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -233,50 +389,31 @@ export default {
       });
       this.$refs.detailsDialog.setBackupVisible(true);
     },
-    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];
-      }
-    }
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 305 - 125
src/views/Task/CompanyPoolChannel/CompanyPoolChannel3.vue

@@ -1,78 +1,11 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px" size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input v-model="queryFrom.insuredName" placeholder="请输入投保人姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader class="widths" :options="institutionOptions" v-model="queryFrom.deptId" :props="{
-                checkStrictly: true,
-                value: 'id',
-                label: 'name',
-              }" @change="handleChange" clearable></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker v-model="queryFrom.data" type="daterange" @change="monthChange" start-placeholder="开始日期"
-                end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable style="width: 200px;"></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option v-for="val in companyList" :key="val.id" :label="val.name" :value="val.id"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回" button2Type="text" @handleButton2="takeBack" -->
-    <kt-common-table :data="pageResult" :columns="columns" :showBatchDelete="false" element-loading-text="加载中..."
-      v-loading="loading" @findPage="findPage" button3Name="转发" button3Type="text" @handleButton3="transmit"
-      button5Name="详情" button5Type="text"
-      @handleButton5="detailFun"></kt-common-table>
+    <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="请选择">
@@ -84,24 +17,244 @@
       </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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
-  mixins: [mixin], 
+  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();
     },
@@ -113,13 +266,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByInsuranceCompany({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus: 3,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByInsuranceCompany(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -130,6 +277,19 @@ export default {
           }
         });
     },
+    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 = "";
@@ -157,40 +317,6 @@ export default {
         }
       })
     },
-    detailFun(row) {
-      let params = {
-        companyId: row.row.companyId
-      };
-      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);
-    },
     transmitSumit() {
       if (this.transmitValue) {
         this.$api.task.forwardingSubOrders({ auditId: this.transmitValue, orderNo: this.orderNo, subOrderId: this.subOrderId }).then(res => {
@@ -226,14 +352,68 @@ export default {
         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>
-.widths {
-  width: 200px;
+
+<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>
-  

+ 325 - 188
src/views/Task/CompanyPoolChannel/CompanyPoolChannel4.vue

@@ -1,124 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      element-loading-text="加载中..."
-      v-loading="loading"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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-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>
@@ -126,24 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    detailsDialog,
+    retrievalForm
   },
-  mixins: [mixin], 
+  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: 4,
+        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();
     },
@@ -155,13 +266,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByInsuranceCompany({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:4,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByInsuranceCompany(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -172,37 +277,88 @@ export default {
           }
         });
     },
+    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
+      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'  
-            });
+      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);
+        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.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -233,50 +389,31 @@ export default {
       });
       this.$refs.detailsDialog.setBackupVisible(true);
     },
-    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];
-      }
-    }
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 306 - 172
src/views/Task/TaskPoolChannel/TaskPoolChannel.vue

@@ -1,129 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      :data="pageResult"
-      :columns="columns"
-      element-loading-text="加载中..."
-      v-loading="loading"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-     
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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-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>
@@ -131,23 +17,245 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    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: 0,
+        userId: "",
+      },
+
+      ddgjdialogVisible:false,
+      trajectoryTable:[],
+      optionsStatus:[],
+    }
   },
-  mixins: [mixin], 
+  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:
+      }
+    },
+    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;
+      })
+    },
+    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;
+        }
+      })
+    },
+
     queryStaffInfo() {
       this.findPage();
     },
@@ -159,13 +267,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByChannel({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:0,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByChannel(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -176,51 +278,64 @@ export default {
           }
         });
     },
+    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
+      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'  
-            });
+      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);
+        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('请选择转发人!');
+      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) {
@@ -240,9 +355,11 @@ export default {
       }
     },
     detailFun(row) {
+      this.orderInfo=row.row;
       let params = {
-        companyId: row.row.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -276,11 +393,28 @@ export default {
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 305 - 170
src/views/Task/TaskPoolChannel/TaskPoolChannel1.vue

@@ -1,127 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      :data="pageResult"
-      :columns="columns"
-      element-loading-text="加载中..."
-      v-loading="loading"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-     
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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-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>
@@ -129,23 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    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: 1,
+        userId: "",
+      },
+
+      ddgjdialogVisible:false,
+      trajectoryTable:[],
+      optionsStatus:[],
+    }
   },
-  mixins: [mixin], 
+  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();
     },
@@ -157,13 +266,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByChannel({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:1,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByChannel(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -174,51 +277,64 @@ export default {
           }
         });
     },
+    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
+      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'  
-            });
+      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);
+        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('请选择转发人!');
+      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) {
@@ -238,9 +354,11 @@ export default {
       }
     },
     detailFun(row) {
+      this.orderInfo=row.row;
       let params = {
-        companyId: row.row.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -274,11 +392,28 @@ export default {
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 305 - 172
src/views/Task/TaskPoolChannel/TaskPoolChannel2.vue

@@ -1,129 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      :data="pageResult"
-      :columns="columns"
-      element-loading-text="加载中..."
-      v-loading="loading"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-     
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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-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>
@@ -131,23 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    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: 2,
+        userId: "",
+      },
+
+      ddgjdialogVisible:false,
+      trajectoryTable:[],
+      optionsStatus:[],
+    }
   },
-  mixins: [mixin], 
+  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();
     },
@@ -159,13 +266,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByChannel({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:2,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByChannel(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -176,51 +277,64 @@ export default {
           }
         });
     },
+    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
+      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'  
-            });
+      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);
+        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('请选择转发人!');
+      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) {
@@ -240,9 +354,11 @@ export default {
       }
     },
     detailFun(row) {
+      this.orderInfo=row.row;
       let params = {
-        companyId: row.row.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -276,11 +392,28 @@ export default {
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 305 - 170
src/views/Task/TaskPoolChannel/TaskPoolChannel3.vue

@@ -1,127 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      :data="pageResult"
-      :columns="columns"
-      element-loading-text="加载中..."
-      v-loading="loading"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-     
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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-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>
@@ -129,23 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    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], 
+  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();
     },
@@ -157,13 +266,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByChannel({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:3,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByChannel(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -174,51 +277,64 @@ export default {
           }
         });
     },
+    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
+      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'  
-            });
+      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);
+        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('请选择转发人!');
+      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) {
@@ -238,9 +354,11 @@ export default {
       }
     },
     detailFun(row) {
+      this.orderInfo=row.row;
       let params = {
-        companyId: row.row.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -274,11 +392,28 @@ export default {
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

+ 305 - 168
src/views/Task/TaskPoolChannel/TaskPoolChannel4.vue

@@ -1,125 +1,15 @@
 <template>
   <div>
-    <el-row class="queryFrom">
-      <el-form ref="queryFormRef" :inline="true" :model="queryFrom" label-width="130px"   size="small">
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="业务员工号">
-              <el-input v-model="queryFrom.operatorId" placeholder="请输入业务员工号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="业务员姓名">
-              <el-input v-model="queryFrom.operatorName" placeholder="请输入业务员姓名" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="订单号">
-              <el-input v-model="queryFrom.orderNo" placeholder="请输入订单号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="车牌号">
-              <el-input v-model="queryFrom.licenseNo" placeholder="请输入车牌号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="车架号">
-              <el-input v-model="queryFrom.frameNo" placeholder="请输入车架号" class="widths" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="投保人姓名">
-              <el-input
-                v-model="queryFrom.insuredName"
-                placeholder="请输入投保人姓名"
-                class="widths"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="机构名称">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
-                v-model="queryFrom.deptId"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="录单日期">
-              <el-date-picker
-                v-model="queryFrom.data"
-                type="daterange"
-                @change="monthChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 200px;"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-          <el-row>
-          <el-col :span="6">
-            <el-form-item label="保险公司">
-              <el-select v-model="queryFrom.companyId" filterable class="widths" clearable>
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-form-item label>
-              <el-button size="small" type="primary" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-    <!-- button2Name="收回"
-      button2Type="text"
-      @handleButton2="takeBack" -->
-    <kt-common-table
-      :data="pageResult"
-      :columns="columns"
-      element-loading-text="加载中..."
-      v-loading="loading"
-      :showBatchDelete="false"
-      @findPage="findPage"
-      button3Name="转发"
-      button3Type="text"
-      @handleButton3="transmit"
-     
-      button5Name="详情"
-      button5Type="text"
-      @handleButton5="detailFun"
-    ></kt-common-table>
+    <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-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>
@@ -127,23 +17,244 @@
       </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>
+<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 {mixin} from "../mixin";
+import retrievalForm from "@/components/Form/retrievalForm.vue";
+import { mixin } from "../mixin";
 
 export default {
   components: {
     KtCommonTable,
-    detailsDialog
+    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: 4,
+        userId: "",
+      },
+
+      ddgjdialogVisible:false,
+      trajectoryTable:[],
+      optionsStatus:[],
+    }
   },
-  mixins: [mixin], 
+  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();
     },
@@ -155,13 +266,7 @@ export default {
       }
       this.loading = true;
       this.$api.task
-        .queryPageHospitalityByChannel({
-          ...this.pageRequest,
-          ...this.queryFrom,
-          orderStatus:4,
-          userId: Cookies.get("user")
-          // userId: '99140105M01D01001'
-        })
+        .queryPageHospitalityByChannel(this.pageRequest)
         .then(res => {
           if (res.code == 200) {
             this.loading = false;
@@ -172,51 +277,64 @@ export default {
           }
         });
     },
+    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
+      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'  
-            });
+      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);
+        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('请选择转发人!');
+      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) {
@@ -236,9 +354,11 @@ export default {
       }
     },
     detailFun(row) {
+      this.orderInfo=row.row;
       let params = {
-        companyId: row.row.companyId
+        companyId: row.row.subOrderId
       };
+      this.cpolicy();
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
@@ -272,11 +392,28 @@ export default {
   }
 };
 </script>
-  
-  <style scoped>
-  .widths {
-  width: 200px;
-}
 
+<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>
-  

Plik diff jest za duży
+ 149 - 566
src/views/Task/daikeComponents/KtLetter.vue


+ 738 - 74
src/views/Task/mixin.js

@@ -1,78 +1,742 @@
 import CommonUtil from "@/utils/comutil.js";
-export const mixin= { // 导出混入对象
-      data() {
-        return {
-          pageRequest: {
-            pageNum: 1,
-            pageSize: 20
-          },
-          loading:false,
-          queryFrom: {},
-          pageResult: {},
-          columns: [
-            // 数据列
-            { prop: "orderno", label: "订单号", sortable: false },
-            { prop: "userid", label: "业务员工号", sortable: false },
-            {
-              prop: "username",
-              label: "业务员",
-              sortable: false
-            },
-            { prop: "deptid", label: "部门编号", sortable: false },
-    
-            { prop: "deptname", label: "部门名称", sortable: false },
-    
-            { prop: "insCompany", label: "承保公司", sortable: false },
-            {
-              prop: "licenseno",
-              label: "车牌号",
-              sortable: false
-            },
-            { prop: "product", label: "投保险种", sortable: false },
-            {
-              prop: "insuredname",
-              label: "投保人姓名",
-              sortable: false
-            },
-            {
-              prop: "orderstatus",
-              label: "状态",
-              sortable: false,
-              formatter: this.statusFormatter
-            }
-          ],
-          statusoptions: [],
-          dialogVisible: false,
-          companyList: [], //保险公司
-          institutionOptions: [], //机构名称列表
-          options: [],//转发人列表
-          transmitValue: "", //选中的转发人
-          orderNo:'', //主订单号
-          subOrderId:'', //子订单号
-          queryOrders:{}
-        }
+export const mixin = { // 导出混入对象
+  data() {
+    return {
+      pageRequest: {
+        pageNum: 1,
+        pageSize: 20
       },
-      created() {
-        this.$api.insCompany.dicType("insOrderStatus").then(res => {
-          this.statusoptions = res.data.ddList;
-        });
-        this.$api.letter.gainTopList().then(res => {
-          this.companyList = res.data;
-        });
-        this.$api.dept.findAllTree().then(res => {
-          this.institutionOptions = res.data;
+      loading: false,
+      queryFrom: {},
+      pageResult: {},
+      columns: [
+        { prop: "subOrderId", label: "订单号", minWidth: 180 },
+        { prop: "userid", label: "业务员", minWidth: 160, formatter: this.useridFormatter },
+        { prop: "insCompany", label: "保险公司", minWidth: 120 },
+        { prop: "agreementName", label: "协议", minWidth: 160 },
+        { prop: "licenseno", label: "车牌号", minWidth: 160 },
+        { prop: "insuredname", label: "投保人姓名", minWidth: 120 },
+        { prop: "product", label: "投保险种", minWidth: 100 },
+        { prop: "createtime", label: "录单日期", minWidth: 160, },
+      ],
+      statusoptions:"",
+      dialogVisible: false,
+      companyList: [], //保险公司
+      institutionOptions: [], //机构名称列表
+      options: [],//转发人列表
+      transmitValue: "", //选中的转发人
+      orderNo: '', //主订单号
+      subOrderId: '', //子订单号
+      queryOrders: {},
+      carImageList: [], //车辆影像
+      ownerImageList: [], //车主影像
+      policyImageList: [], //投保人影像
+      insuredImageList: [], //被保人影像
+      carCheckImageList: [], //验车照影像
+      quoteno:"",
+      oldfileList:[],
+      orderInfo:{},
+    }
+  },
+  created() {
+    this.$api.letter.gainTopList().then(res => {
+      this.companyList = res.data;
+    });
+    this.$api.dept.findAllTree().then(res => {
+      this.institutionOptions = res.data;
+    });
+    this.ImageList();
+  },
+  methods: {
+    cpolicy(){
+      this.oldfileList = [];
+      let businessList = []
+      let accidentList = []
+      if (this.orderInfo.orderstatus == "3") {
+        switch (this.orderInfo.inscompany) {
+          case "永安财险":
+            if (this.orderInfo.jqpolicyno) {
+              this.$api.letter
+                .getPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  policytype: "jq",
+                })
+                .then((res) => {
+                  //交强保单
+                  if (res.data) {
+                    let result = res.data.replace(/[\r\n]/g, "");
+                    let pdfBase64 = `data:application/pdf;base64,${result}`;
+                    base64ToPath(pdfBase64).then((path) => {
+                      if (path) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子保单",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: path,
+                        });
+                      }
+                    });
+                  }
+                });
+              this.$api.letter
+                .getPolicyPrint2({
+                  companyId: this.orderInfo.subOrderId,
+                  policytype: "jq",
+                })
+                .then((res) => {
+                  //交强保单
+                  if (res.data) {
+                    let result = res.data.replace(/[\r\n]/g, "");
+                    let pdfBase64 = `data:application/pdf;base64,${result}`;
+                    base64ToPath(pdfBase64).then((path) => {
+                      if (path) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子标志",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: path,
+                        });
+                      }
+                    });
+                  }
+                });
+            }
+            if (this.orderInfo.sypolicyno) {
+              this.$api.letter
+                .getPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  policytype: "sy",
+                })
+                .then((res) => {
+                  //商业保单
+                  if (res.data) {
+                    let result = res.data.replace(/[\r\n]/g, "");
+                    let pdfBase64 = `data:application/pdf;base64,${result}`;
+                    base64ToPath(pdfBase64).then((path) => {
+                      if (path) {
+                        businessList.push({
+                          fileTitle: "商业电子保单",
+                          filename: this.orderInfo.sypolicyno,
+                          fileurl: path,
+                        });
+                      }
+                    });
+                  }
+                });
+            }
+            break;
+          case "华泰财险":
+            if (this.orderInfo.jqpolicyno) {
+              this.$api.letter
+                .HuataigetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data) {
+                    if (res.data.jqxPolicyUrl) {
+                      this.oldfileList.push({
+                        fileTitle: "交强电子保单",
+                        filename: this.orderInfo.jqpolicyno,
+                        fileurl: res.data.jqxPolicyUrl,
+                      });
+                    }
+                    if (res.data.jqxFlagUrl) {
+                      this.oldfileList.push({
+                        fileTitle: "交强电子标志",
+                        filename: this.orderInfo.jqpolicyno,
+                        fileurl: res.data.jqxFlagUrl,
+                      });
+                    }
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.sypolicyno) {
+              this.$api.letter
+                .HuataigetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0510",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data && res.data.syxPolicyUrl) {
+                    businessList.push({
+                      fileTitle: "商业电子保单",
+                      filename: this.orderInfo.sypolicyno,
+                      fileurl: res.data.syxPolicyUrl,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            break;
+          case "中煤财险":
+            if (this.orderInfo.jqpolicyno) {
+              this.$api.letter
+                .ZhongmeigetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data && res.data[0]) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子保单",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data[0],
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+              this.$api.letter
+                .ZhongmeigetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "1", // 1:标志
+                })
+                .then((res) => {
+                  if (res.data && res.data[0]) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子标志",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data[0],
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.sypolicyno) {
+              this.$api.letter
+                .ZhongmeigetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0510",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data && res.data[0]) {
+                    businessList.push({
+                      fileTitle: "商业电子保单",
+                      filename: this.orderInfo.sypolicyno,
+                      fileurl: res.data[0],
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.crossInsurance.length > 0) {
+              this.orderInfo.crossInsurance.map((ele) => {
+                this.$api.letter
+                  .ZhongmeigetPolicyPrint({
+                    ridePolicyNo: ele.ridePolicyNo,
+                    companyId: this.orderInfo.subOrderId,
+                    riskCode: "0513",
+                    type: "2", //2:保单
+                  })
+                  .then((res) => {
+                    if (res.code == 200 && res.data) {
+                      accidentList.push({
+                        fileTitle: "驾意险保单",
+                        filename: this.orderInfo.sypolicyno,
+                        fileurl: res.data[0],
+                      });
+                    } else {
+                      this.$message.error(res.msg);
+                    }
+                  });
+              });
+            }
+            break;
+          case "永诚财险":
+            if (this.orderInfo.jqpolicyno) {
+              this.$api.letter
+                .yongchenggetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.code == 200 && res.data) {
+                    if (res.data.jqUrl) {
+                      this.oldfileList.push({
+                        fileTitle: "交强电子保单",
+                        filename: this.orderInfo.jqpolicyno,
+                        fileurl: res.data.jqUrl,
+                      });
+                    }
+                    if (res.data.jqFlagUrl) {
+                      this.oldfileList.push({
+                        fileTitle: "交强电子标志",
+                        filename: this.orderInfo.jqpolicyno,
+                        fileurl: res.data.jqFlagUrl,
+                      });
+                    }
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.sypolicyno) {
+              this.$api.letter
+                .yongchenggetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0510",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data && res.data.syUrl) {
+                    businessList.push({
+                      fileTitle: "商业电子保单",
+                      filename: this.orderInfo.sypolicyno,
+                      fileurl: res.data.syUrl,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.crossInsurance.length > 0) {
+              this.orderInfo.crossInsurance.map((ele) => {
+                this.$api.letter
+                  .yongchenggetPolicyPrint({
+                    companyId: this.orderInfo.subOrderId,
+                    policyNumber: ele.policyNumber,
+                    riskCode: "0513",
+                    type: "2", //2:保单
+                  })
+                  .then((res) => {
+                    if (res.code == 200 && res.data) {
+                      accidentList.push({
+                        fileTitle: "驾意险保单",
+                        filename: ele.policyNumber,
+                        fileurl: res.data.jyUrl,
+                      });
+                    } else {
+                      this.$message.error(res.msg);
+                    }
+                  });
+              });
+            }
+            break;
+          case "国任财险":
+            if (this.orderInfo.jqpolicyno) {
+              this.$api.letter
+                .guoRengetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子保单",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+              this.$api.letter
+                .guoRengetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "1", //1:标志
+                })
+                .then((res) => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子标志",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.sypolicyno) {
+              this.$api.letter
+                .guoRengetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0510",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data) {
+                    businessList.push({
+                      fileTitle: "商业电子保单",
+                      filename: this.orderInfo.sypolicyno,
+                      fileurl: res.data,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.crossInsurance.length > 0) {
+              this.orderInfo.crossInsurance.map((ele) => {
+                this.$api.letter
+                  .guoRengetPolicyPrint({
+                    companyId: this.orderInfo.subOrderId,
+                    policyNumber: ele.policyNumber,
+
+                    riskCode: "0513",
+                    type: "2", //2:保单
+                  })
+                  .then((res) => {
+                    if (res.data) {
+                      accidentList.push({
+                        fileTitle: "驾意险保单",
+                        filename: ele.policyNumber,
+                        fileurl: res.data,
+                      });
+                    } else {
+                      this.$message.error(res.msg);
+                    }
+                  });
+              });
+            }
+            break;
+
+          case "紫金财险":
+            if (this.orderInfo.jqpolicyno) {
+              this.$api.letter
+                .zijingetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子保单",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+              this.$api.letter
+                .zijingetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "1", //1:标志
+                })
+                .then((res) => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子标志",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.sypolicyno) {
+              this.$api.letter
+                .zijingetPolicyPrint({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0510",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data) {
+                    businessList.push({
+                      fileTitle: "商业电子保单",
+                      filename: this.orderInfo.sypolicyno,
+                      fileurl: res.data,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.crossInsurance.length > 0) {
+              this.orderInfo.crossInsurance.map((ele) => {
+                this.$api.letter
+                  .zijingetPolicyPrint({
+                    companyId: this.orderInfo.subOrderId,
+                    policyNumber: ele.policyNumber,
+                    riskCode: "0513",
+                    type: "2", //2:保单
+                  })
+                  .then((res) => {
+                    if (res.data) {
+                      accidentList.push({
+                        fileTitle: "驾意险保单",
+                        filename: ele.policyNumber,
+                        fileurl: res.data,
+                      });
+                    } else {
+                      this.$message.error(res.msg);
+                    }
+                  });
+              });
+            }
+            break;
+          case "渤海财险":
+            if (this.orderInfo.jqpolicyno) {
+              this.$api.letter
+                .getPolicyPrintboHai({
+                  companyId: this.orderInfo.subOrderId,
+                })
+                .then((res) => {
+                  if (res.code == 200 && res.data) {
+                    if (res.data.jqxPolicyUrl) {
+                      this.oldfileList.push({
+                        fileTitle: "交强电子保单",
+                        filename: this.orderInfo.jqpolicyno,
+                        fileurl: res.data.jqxPolicyUrl,
+                      });
+                    }
+                    if (res.data.jqxFlagUrl) {
+                      this.oldfileList.push({
+                        fileTitle: "交强电子标志",
+                        filename: this.orderInfo.jqpolicyno,
+                        fileurl: res.data.jqxFlagUrl,
+                      });
+                    }
+                    if (res.data.syxPolicyUrl) {
+                      businessList.push({
+                        fileTitle: "商业电子保单",
+                        filename: this.orderInfo.sypolicyno,
+                        fileurl: res.data.syxPolicyUrl,
+                      });
+                    }
+                    if (
+                      res.data.jyxInfoList &&
+                      res.data.jyxInfoList.length > 0
+                    ) {
+                      res.data.jyxInfoList.forEach((val) => {
+                        accidentList.push({
+                          fileTitle: "驾意险保单",
+                          filename: "驾意险保单",
+                          fileurl: val.jyx_policy_url,
+                        });
+                      });
+                    }
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            break;
+          case "恒邦财险":
+          case "安盛天平":
+          case "中国人寿":
+          case "太平财险":
+          case "华农财险":
+          case "众安财险":
+            if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
+              this.$api.letter
+                .pythongetPolicyPrint({
+                  subOrderNo: this.orderInfo.subOrderId,
+                })
+                .then((res) => {
+                  if (res.code == 200 && res.data) {
+                    if (res.data.jqxPolicyUrl) {
+                      this.oldfileList.push({
+                        fileTitle: "交强电子保单",
+                        filename: this.orderInfo.jqpolicyno,
+                        fileurl: res.data.jqxPolicyUrl,
+                      });
+                    }
+                    if (res.data.jqxFlagUrl) {
+                      this.oldfileList.push({
+                        fileTitle: "交强电子标志",
+                        filename: this.orderInfo.jqpolicyno,
+                        fileurl: res.data.jqxFlagUrl,
+                      });
+                    }
+                    if (res.data.syxPolicyUrl) {
+                      businessList.push({
+                        fileTitle: "商业电子保单",
+                        filename: this.orderInfo.sypolicyno,
+                        fileurl: res.data.syxPolicyUrl,
+                      });
+                    }
+                    if (
+                      res.data.jyxInfoList &&
+                      res.data.jyxInfoList.length > 0
+                    ) {
+                      res.data.jyxInfoList.forEach((val) => {
+                        accidentList.push({
+                          fileTitle: "驾意险保单",
+                          filename: "驾意险保单",
+                          fileurl: val.jyx_policy_url,
+                        });
+                      });
+                    }
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            break;
+          case "大家财险":
+            if (this.orderInfo.jqpolicyno) {
+              this.$api.letter
+                .obtainWarranty({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子保单",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+              this.$api.letter
+                .obtainWarranty({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0507",
+                  type: "1", //1:标志
+                })
+                .then((res) => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子标志",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
+                  } else {
+                    this.$message.error(res.msg);
+                  }
+                });
+            }
+            if (this.orderInfo.sypolicyno) {
+              this.$api.letter
+                .obtainWarranty({
+                  companyId: this.orderInfo.subOrderId,
+                  riskCode: "0510",
+                  type: "2", //2:保单
+                })
+                .then((res) => {
+                  if (res.data) {
+                    businessList.push({
+                      fileTitle: "商业电子保单",
+                      filename: this.orderInfo.sypolicyno,
+                      fileurl: res.data,
+                    });
+                  }
+                });
+            }
+            if (this.orderInfo.crossInsurance.length > 0) {
+              this.orderInfo.crossInsurance.map((ele) => {
+                this.$api.letter
+                  .zijingetPolicyPrint({
+                    companyId: this.orderInfo.subOrderId,
+                    policyNumber: ele.policyNumber,
+                    riskCode: "0513",
+                    type: "2", //2:保单
+                  })
+                  .then((res) => {
+                    if (res.data) {
+                      accidentList.push({
+                        fileTitle: "驾意险保单",
+                        filename: ele.policyNumber,
+                        fileurl: res.data,
+                      });
+                    } else {
+                      this.$message.error(res.msg);
+                    }
+                  });
+              });
+            }
+            break;
+          default:
+        }
+        let obj = {
+          oldfileList: this.oldfileList,
+          businessList,
+          accidentList
+        }
+        this.$refs.detailsDialog.warrantyFun(obj);
+      }
+    },
+    ImageList(){
+       // 获取影像
+       this.$api.letter.findByQuoteNo(this.orderInfo.quoteno).then((resImage) => {
+        Object.keys(resImage.data).forEach((keys) => {
+          if (resImage.data[keys]) {
+            resImage.data[keys].url = resImage.data[keys].url
+              ? process.env.BASE_URL + resImage.data[keys].url
+              : null;
+            switch (keys) {
+              case "C01":
+              case "D01":
+                resImage.data[keys].url
+                  ? this.carImageList.push(resImage.data[keys].url)
+                  : "";
+                break;
+              case "C02":
+              case "D02":
+                resImage.data[keys].url
+                  ? this.ownerImageList.push(resImage.data[keys].url)
+                  : "";
+                break;
+              case "C03":
+              case "D03":
+                resImage.data[keys].url
+                  ? this.policyImageList.push(resImage.data[keys].url)
+                  : "";
+                break;
+              case "C04":
+              case "D04":
+                resImage.data[keys].url
+                  ? this.insuredImageList.push(resImage.data[keys].url)
+                  : "";
+                break;
+              case "XC00":
+              case "GC00":
+              case "GX00":
+                resImage.data[keys].url
+                  ? this.carCheckImageList.push(resImage.data[keys].url)
+                  : "";
+                break;
+              default:
+                break;
+            }
+          }
         });
-      },
-      methods:  {
-        statusFormatter(row, column) {
-          //协议类型
-          let status = row.orderstatus;
-          return CommonUtil.getDataName({
-            dataList: this.statusoptions,
-            value: "dictValue",
-            label: "dictTag",
-            data: status
-          });
-        },
+        let obj = {
+          carImageList: this.carImageList,
+          ownerImageList: this.ownerImageList,
+          policyImageList: this.policyImageList,
+          insuredImageList: this.insuredImageList,
+          carCheckImageList: this.carCheckImageList
+        }
+        this.$refs.detailsDialog.imageFun(obj);
+      });
+    },
+    toChinesNum(num) {
+      if (num.toString().length == 4) {
+        let overQian = Math.floor(num / 1000);
+        let result = overQian + "千";
+        return result;
+      } else {
+        let overWan = Math.floor(num / 10000);
+        let result = overWan + "万";
+        return result;
       }
-    }
+    },
+    useridFormatter(row, column) {
+      let data = row.username + `(${row.userid})`
+      return data;
+    },
+  }
+}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików