CompanyPoolChannel.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <template>
  2. <div>
  3. <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse" :dateType="1"
  4. @areaSelectChange="areaSelectChange"></retrievalForm>
  5. <kt-common-table :data="pageResult" :columns="columns" element-loading-text="加载中..." v-loading="loading"
  6. :showBatchDelete="false" @findPage="findPage" button3Name="转发" button3Type="text" @handleButton3="transmit"
  7. button2Name="报价轨迹" button2Type="text" @handleButton2="trajectory" button5Name="详情" button5Type="text"
  8. @handleButton5="detailFun" button4Name="转发记录" button4Type="text" @handleButton4="forwardingRecords"
  9. :operationWidth="300"></kt-common-table>
  10. <el-dialog title="转发" :visible.sync="dialogVisible" width="30%">
  11. 转发人:
  12. <el-select v-model="transmitValue" filterable clearable placeholder="请选择">
  13. <el-option v-for="item in options" :key="item.userId" :label="item.name" :value="item.userId"></el-option>
  14. </el-select>
  15. <span slot="footer" class="dialog-footer">
  16. <el-button size="small" @click="dialogVisible = false">取 消</el-button>
  17. <el-button type="primary" size="small" @click="transmitSumit">确 定</el-button>
  18. </span>
  19. </el-dialog>
  20. <detailsDialog ref="detailsDialog" :isTaskPool="true" :orderInfo="queryOrders" :isAuditing="isAuditing"
  21. :feeOrderNewVoList="feeOrderNewVoList"></detailsDialog>
  22. <el-dialog :visible.sync="ddgjdialogVisible" width="500px">
  23. <div slot="title" class=" dialog-title">
  24. <span>订单轨迹</span>
  25. </div>
  26. <div style="height: 300px; overflow-y: auto">
  27. <el-steps direction="vertical" :active="trajectoryTable.length - 1">
  28. <el-step :title="item.desc" :key="item.id" v-for="item in trajectoryTable">
  29. <template slot="description">
  30. <template style="margin-top:10px;margin-bottom:10px ;">
  31. <div>保险公司:{{ item.insCompany }}</div>
  32. <div>车牌号:{{ item.licenseNo }}</div>
  33. <div>被保人:{{ item.insuredname }}</div>
  34. <div>
  35. <span >操作人:{{ item.operator }}</span>
  36. <span style="margin-left: 10px">操作人工号:{{ item.audituser }}</span>
  37. </div>
  38. <span v-if="item.operatorTime">
  39. 操作时间:{{ item.operatorTime }}
  40. </span>
  41. </template>
  42. </template>
  43. </el-step>
  44. </el-steps>
  45. </div>
  46. </el-dialog>
  47. <el-dialog :visible.sync="forwardingRecordsdialogVisible" title="转发记录" width="70%">
  48. <el-table :data="gridData" height="400" border v-loading="loading" highlight-current-row stripe :header-cell-style="{
  49. background: '#F2F7FC',
  50. fontWeight: '700',
  51. color: '#606266',
  52. }">
  53. <el-table-column property="subOrderId" align="center" label="订单号" width="200"></el-table-column>
  54. <el-table-column property="oldOperatorId" align="center" label="转发人" width="200"></el-table-column>
  55. <el-table-column property="newOperatorId" align="center" label="接收人"></el-table-column>
  56. <el-table-column property="remark" align="center" label="转发信息"></el-table-column>
  57. <el-table-column property="createTime" align="center" label="转发时间"></el-table-column>
  58. </el-table>
  59. </el-dialog>
  60. </div>
  61. </template>
  62. <script>
  63. import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
  64. import Cookies from "js-cookie";
  65. import CommonUtil from "@/utils/comutil.js";
  66. import detailsDialog from "@/views/Core/components/detailsDialog.vue";
  67. import retrievalForm from "@/components/Form/retrievalForm.vue";
  68. import { mixin } from "../mixin";
  69. export default {
  70. components: {
  71. KtCommonTable,
  72. detailsDialog,
  73. retrievalForm
  74. },
  75. data() {
  76. return {
  77. pageRequest: {
  78. pageNum: 1,
  79. pageSize: 20,
  80. orderStatus: 0,
  81. userId: "",
  82. },
  83. ddgjdialogVisible: false,
  84. trajectoryTable: [],
  85. optionsStatus: [],
  86. columns: [
  87. { prop: "subOrderId", label: "订单号", minWidth: 180 },
  88. { prop: "product", label: "投保险种", minWidth: 100 },
  89. { prop: "areaInfo", label: "归属信息", minWidth: 150 },
  90. { prop: "username", label: "业务员姓名", minWidth: 180 },
  91. { prop: "leaderName", label: "管理人", minWidth: 160, },
  92. { prop: "managementSource", label: "业务来源", minWidth: 160, formatter: this.managementSourceFormatter },
  93. { prop: "entryStatus", label: "录入来源", minWidth: 160, formatter: this.entryStatusFormatter },
  94. // { prop: "insCompany", label: "保险公司", minWidth: 120 },
  95. { prop: "partnerCompaniesName", label: "合作公司", minWidth: 120 },
  96. // { prop: "agreementName", label: "协议", minWidth: 160 },
  97. { prop: "licenseno", label: "车牌号", minWidth: 160 },
  98. { prop: "insuredname", label: "投保人姓名", minWidth: 120 },
  99. { prop: "jqpremium", label: "交强险保费", minWidth: 120 },
  100. { prop: "sypremium", label: "商业险保费", minWidth: 120 },
  101. { prop: "taxamount", label: "车船税", minWidth: 120 },
  102. { prop: "jypremium", label: "驾意险保费", minWidth: 120 },
  103. { prop: "userid", label: "业务员工号", minWidth: 180 },
  104. { prop: "createtime", label: "报价时间", minWidth: 160 },
  105. { prop: "underwritingTime", label: "核保时间", minWidth: 160 },
  106. { prop: "payDate", label: "缴费时间", minWidth: 160 },
  107. { prop: "updateStatusTime", label: "更新时间", minWidth: 160 },
  108. { prop: "updateStatus", label: "更新状态", minWidth: 160, formatter: this.updateStatusFormatter },
  109. { prop: "signingTime", label: "签单时间", minWidth: 160 },
  110. ],
  111. }
  112. },
  113. mixins: [mixin],
  114. created() {
  115. this.pageRequest.userId = Cookies.get("user");
  116. this.$api.insCompany.dicType("insOrderStatusAll").then((res) => {
  117. this.optionsStatus = res.data.ddList;
  118. });
  119. this.retrievalFields.push(
  120. {
  121. name: 'managementSource',
  122. label: '业务来源',
  123. type: 'select',
  124. Retained: true,
  125. options: [],
  126. optionsIabel: "dictTag",
  127. optionsValue: "dictValue",
  128. },
  129. {
  130. name: ["auditStartDateStr", "auditEndDateStr"],
  131. label: '核保时间',
  132. type: 'date',
  133. list: 'auditTimeList'
  134. },
  135. {
  136. name: ["payStartDateStr", "payEndDateStr"],
  137. label: '缴费时间',
  138. type: 'date',
  139. list: 'payDateList'
  140. },
  141. {
  142. name: ["updateStartDateStr", "updateEndDateStr"],
  143. label: '更新时间',
  144. type: 'date',
  145. list: 'updateDateList'
  146. },
  147. {
  148. name: 'updateStatus',
  149. label: '更新状态',
  150. type: 'select',
  151. Retained: true,
  152. optionsIabel: "label",
  153. optionsValue: "value",
  154. options: [
  155. {
  156. label: "手动更新",
  157. value: "1",
  158. },
  159. {
  160. label: "自动更新",
  161. value: "2",
  162. },
  163. ],
  164. },
  165. )
  166. },
  167. methods: {
  168. getStatusText(code) {
  169. return this.optionsStatus.find(val => val.dictValue == code).dictTag;;
  170. },
  171. handleFormSubmit(data) {
  172. let obj = Object.assign(this.pageRequest, data)
  173. this.pageRequest = obj;
  174. this.findPage();
  175. },
  176. toggleCollapse(data) {
  177. this.retrievalFields.map(val => {
  178. if (val.Retained != null) val.Retained = data;
  179. return val;
  180. })
  181. },
  182. queryStaffInfo() {
  183. this.findPage();
  184. },
  185. // 右侧列表的方法Start
  186. findPage(data) {
  187. if (data && data.pageRequest) {
  188. this.pageRequest.pageNum = data.pageRequest.pageNum;
  189. this.pageRequest.pageSize = data.pageRequest.pageSize;
  190. }
  191. this.loading = true;
  192. this.$api.task
  193. .queryPageHospitalityByInsuranceCompany(this.pageRequest)
  194. .then(res => {
  195. if (res.code == 200) {
  196. this.loading = false;
  197. this.pageResult = res.data;
  198. } else {
  199. this.loading = false;
  200. this.$message.error(res.msg);
  201. }
  202. });
  203. },
  204. trajectory(row) {
  205. this.$api.letter.queryBySuborderDetails(row.row.subOrderId).then((res) => {
  206. if (res.code == 200 && res.data.length > 0) {
  207. this.ddgjdialogVisible = true;
  208. this.trajectoryTable = res.data;
  209. } else {
  210. this.$message({
  211. message: res.msg || "暂无数据!",
  212. type: "warning",
  213. });
  214. }
  215. });
  216. },
  217. transmit(row) {
  218. this.dialogVisible = true;
  219. this.transmitValue = "";
  220. this.orderNo = row.row.orderno
  221. this.subOrderId = row.row.subOrderId
  222. this.$api.task.getCustomerUsers().then(res => {
  223. if (res.code == 200) {
  224. this.options = res.data
  225. }
  226. })
  227. },
  228. // 收回
  229. takeBack(row) {
  230. let orderNo = row.row.orderno
  231. let subOrderId = row.row.subOrderId
  232. this.$api.task.taskPoolsRecover({ orderNo, subOrderId }).then(res => {
  233. if (res.code == 200) {
  234. this.$message({
  235. message: res.msg,
  236. type: 'success'
  237. });
  238. }
  239. else {
  240. this.$message.error(res.msg);
  241. }
  242. })
  243. },
  244. transmitSumit() {
  245. if (this.transmitValue) {
  246. this.$api.task.forwardingSubOrders({ auditId: this.transmitValue, orderNo: this.orderNo, subOrderId: this.subOrderId }).then(res => {
  247. if (res.code == 200) {
  248. this.options = res.data
  249. this.dialogVisible = false;
  250. this.findPage()
  251. }
  252. else {
  253. this.$message.error(res.msg);
  254. }
  255. })
  256. }
  257. else {
  258. this.$message.error('请选择转发人!');
  259. }
  260. },
  261. //联级选择器触发事件
  262. handleChange(val) {
  263. if (val.length !== 0) {
  264. this.queryFrom.deptId = val.at(-1);
  265. } else {
  266. this.queryFrom.deptId = "";
  267. }
  268. },
  269. monthChange(e) {
  270. if (e === null) {
  271. this.queryFrom.startDate = "";
  272. this.queryFrom.endDate = "";
  273. } else {
  274. this.queryFrom.startDate = e[0];
  275. this.queryFrom.endDate = e[1];
  276. }
  277. },
  278. // detailFun(row) {
  279. // let params = {
  280. // companyId: row.row.subOrderId
  281. // };
  282. // this.$api.letter.getByCompanyId(params).then(res => {
  283. // if (res.code == "200") {
  284. // var data = res.data;
  285. // this.orderInfo = res.data;
  286. // this.cpolicy();
  287. // this.ImageList();
  288. // data.kindinfo.map((ele, index) => {
  289. // switch (ele.kindCode) {
  290. // case "A":
  291. // ele.amount = "投保";
  292. // break;
  293. // case "D4":
  294. // case "SY_FJ_YBW2":
  295. // ele.unitAmount = this.toChinesNum(ele.unitAmount);
  296. // break;
  297. // case "MJ1":
  298. // case "MJ2":
  299. // case "MJ3":
  300. // case "MJ4":
  301. // ele.deductibleRate = ele.deductibleRate + "%";
  302. // break;
  303. // default:
  304. // ele.amount = this.toChinesNum(ele.amount);
  305. // }
  306. // return ele;
  307. // });
  308. // this.queryOrders = data;
  309. // //赋值费用信息
  310. // // this.feeDetailInfo=data.orderFeeResult;
  311. // }
  312. // });
  313. // this.$refs.detailsDialog.setBackupVisible(true);
  314. // },
  315. }
  316. };
  317. </script>
  318. <style scoped lang="scss">
  319. /deep/ {
  320. .el-step__description.is-finish,
  321. .el-step__head.is-finish {
  322. color: #333;
  323. border: none;
  324. }
  325. .el-step__title,
  326. .el-step__icon-inner {
  327. color: var(--themeColor)
  328. }
  329. .el-step__line-inner {
  330. height: 0;
  331. display: none
  332. }
  333. .is-flex {
  334. .el-step__icon {
  335. background: var(--themeColor)
  336. }
  337. .el-step__icon-inner {
  338. color: #fff;
  339. }
  340. }
  341. .el-step__icon.is-text {
  342. border: none;
  343. box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.1);
  344. }
  345. }
  346. </style>