AgentPoolChannel4.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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"
  7. @handleButton3="transmit" :buttonDropdown="dropdownOption"
  8. button5Name="详情" button5Type="text" @handleButton5="detailFun" button4Name="转发记录" button4Type="text"
  9. @handleButton4="forwardingRecords" :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" :feeOrderNewVoList="feeOrderNewVoList"></detailsDialog>
  21. <el-dialog :visible.sync="ddgjdialogVisible" width="430px">
  22. <div slot="title" class=" dialog-title">
  23. <span>订单轨迹</span>
  24. </div>
  25. <div style="height: 300px; overflow-y: auto">
  26. <el-steps direction="vertical" :active="trajectoryTable.length - 1" >
  27. <el-step v-for="item in trajectoryTable"
  28. :key="item.id"
  29. :title="getStatusText(item.orderStatus)"
  30. >
  31. <template slot="description">
  32. <span>保险公司:{{ item.insCompany }}</span>
  33. <span>提交人:{{ item.operator }}</span>
  34. <div>创建时间:{{ item.createTime }}</div>
  35. </template>
  36. </el-step>
  37. </el-steps>
  38. </div>
  39. </el-dialog>
  40. <el-dialog :visible.sync="forwardingRecordsdialogVisible" title="转发记录" width="70%">
  41. <el-table :data="gridData" height="400" border v-loading="loading" highlight-current-row stripe
  42. :header-cell-style="{
  43. background: '#F2F7FC',
  44. fontWeight: '700',
  45. color: '#606266',
  46. }">
  47. <el-table-column property="subOrderId" align="center" label="订单号" width="200"></el-table-column>
  48. <el-table-column property="oldOperatorId" align="center" label="转发人" width="200"></el-table-column>
  49. <el-table-column property="newOperatorId" align="center" label="接收人"></el-table-column>
  50. <el-table-column property="remark" align="center" label="转发信息"></el-table-column>
  51. <el-table-column property="createTime" align="center" label="转发时间"></el-table-column>
  52. </el-table>
  53. </el-dialog>
  54. <el-dialog title="原因查看" :visible.sync="viewReasondialogVisible" width="30%" >
  55. <span>{{ viewReasonMsg }}</span>
  56. <span slot="footer" class="dialog-footer">
  57. <el-button size="small" @click="viewReasondialogVisible = false">关闭</el-button>
  58. </span>
  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: 4,
  81. userId: "",
  82. },
  83. ddgjdialogVisible:false,
  84. trajectoryTable:[],
  85. optionsStatus:[],
  86. dropdownOption:[
  87. {
  88. label:'报价轨迹',
  89. click:(row)=>this.trajectory(row)
  90. },
  91. {
  92. label:'撤单',
  93. hide:(row) => {
  94. return row.insCompany == '紫金财险' ?true:false
  95. },
  96. click:(row)=>this.cancelorder(row)
  97. },{
  98. label:'更新订单',
  99. hide:(row) => {
  100. return row.orderstatus=='4' && row.insCompany == '华泰财险' ?true:false
  101. },
  102. click:(row)=>this.updateStatusHuatai(row)
  103. },
  104. ],
  105. columns: [
  106. { prop: "subOrderId", label: "订单号", minWidth: 180 },
  107. { prop: "product", label: "投保险种", minWidth: 100 },
  108. { prop: "areaInfo", label: "归属信息", minWidth: 150 },
  109. { prop: "username", label: "业务员姓名", minWidth: 180 },
  110. // { prop: "userid", label: "业务员", minWidth: 160, formatter: this.useridFormatter },
  111. { prop: "managementSource", label: "业务来源", minWidth: 160, formatter: this.managementSourceFormatter },
  112. { prop: "entryStatus", label: "录入来源", minWidth: 160, formatter: this.entryStatusFormatter },
  113. // { prop: "insCompany", label: "保险公司", minWidth: 120 },
  114. { prop: "partnerCompaniesName", label: "合作公司", minWidth: 120 },
  115. // { prop: "agreementName", label: "协议", minWidth: 160 },
  116. { prop: "licenseno", label: "车牌号", minWidth: 160 },
  117. { prop: "insuredname", label: "投保人姓名", minWidth: 120 },
  118. { prop: "jqpremium", label: "交强险保费", minWidth: 120 },
  119. { prop: "sypremium", label: "商业险保费", minWidth: 120 },
  120. { prop: "taxamount", label: "车船税", minWidth: 120 },
  121. { prop: "jypremium", label: "驾意险保费", minWidth: 120 },
  122. { prop: "userid", label: "业务员工号", minWidth: 180 },
  123. { label: "原因", minWidth: 180, formatter: this.failureReasonFormatter },
  124. { prop: "createtime", label: "报价时间", minWidth: 160 },
  125. ],
  126. }
  127. },
  128. mixins: [mixin],
  129. created() {
  130. this.pageRequest.userId = Cookies.get("user");
  131. this.$api.insCompany.dicType("insOrderStatus").then((res) => {
  132. this.optionsStatus = res.data.ddList;
  133. });
  134. },
  135. methods: {
  136. cancelorder(item) {
  137. this.$api.letter.zijincancelorder({ companyId: item.subOrderId }).then(res => {
  138. if (res.code == 200) {
  139. this.$message({
  140. message: res.msg,
  141. type: "success"
  142. });
  143. this.findPage();
  144. }
  145. else{
  146. this.$message.error(res.msg);
  147. }
  148. });
  149. },
  150. //华泰刷新核保状态
  151. updateStatusHuatai(item) {
  152. let HtApiType =
  153. item.apiType == 2
  154. ? "auditStatusQuery"
  155. : "orderStatushuatai";
  156. this.$api.letter[HtApiType]({ companyId: item.subOrderId }).then(res => {
  157. if (res.code == 200) {
  158. this.$message({
  159. message: res.msg ? res.msg : "已刷新状态",
  160. type: "success"
  161. });
  162. this.findPage();
  163. } else {
  164. this.$message({
  165. showClose: true,
  166. dangerouslyUseHTMLString: true,
  167. message: res.msg.replace(/\n/g, "<br><br>"),
  168. type: "error",
  169. duration: 7000
  170. });
  171. }
  172. });
  173. },
  174. getStatusText(code) {
  175. return this.optionsStatus.find(val=>val.dictValue==code).dictTag;;
  176. },
  177. handleFormSubmit(data) {
  178. let obj = Object.assign(this.pageRequest, data)
  179. this.pageRequest = obj;
  180. this.findPage();
  181. },
  182. toggleCollapse(data) {
  183. this.retrievalFields.map(val => {
  184. if (val.Retained != null) val.Retained = data;
  185. return val;
  186. })
  187. },
  188. queryStaffInfo() {
  189. this.findPage();
  190. },
  191. // 右侧列表的方法Start
  192. findPage(data) {
  193. if (data && data.pageRequest) {
  194. this.pageRequest.pageNum = data.pageRequest.pageNum;
  195. this.pageRequest.pageSize = data.pageRequest.pageSize;
  196. }
  197. this.loading = true;
  198. this.$api.task
  199. .queryPageTelemarketingLinkAgent(this.pageRequest)
  200. .then(res => {
  201. if (res.code == 200) {
  202. this.loading = false;
  203. this.pageResult = res.data;
  204. } else {
  205. this.loading = false;
  206. this.$message.error(res.msg);
  207. }
  208. });
  209. },
  210. transmit(row) {
  211. this.dialogVisible = true;
  212. this.transmitValue = "";
  213. this.orderNo = row.row.orderno
  214. this.subOrderId = row.row.subOrderId
  215. this.$api.task.getCustomerUsers().then(res => {
  216. if (res.code == 200) {
  217. this.options = res.data
  218. }
  219. })
  220. },
  221. // 收回
  222. takeBack(row) {
  223. let orderNo = row.row.orderno
  224. let subOrderId = row.row.subOrderId
  225. this.$api.task.taskPoolsRecover({ orderNo, subOrderId }).then(res => {
  226. if (res.code == 200) {
  227. this.$message({
  228. message: res.msg,
  229. type: 'success'
  230. });
  231. }
  232. else {
  233. this.$message.error(res.msg);
  234. }
  235. })
  236. },
  237. transmitSumit() {
  238. if (this.transmitValue) {
  239. this.$api.task.forwardingSubOrders({ auditId: this.transmitValue, orderNo: this.orderNo, subOrderId: this.subOrderId }).then(res => {
  240. if (res.code == 200) {
  241. this.options = res.data
  242. this.dialogVisible = false;
  243. this.findPage()
  244. }
  245. else {
  246. this.$message.error(res.msg);
  247. }
  248. })
  249. }
  250. else {
  251. this.$message.error('请选择转发人!');
  252. }
  253. },
  254. //联级选择器触发事件
  255. handleChange(val) {
  256. if (val.length !== 0) {
  257. this.queryFrom.deptId = val.at(-1);
  258. } else {
  259. this.queryFrom.deptId = "";
  260. }
  261. },
  262. monthChange(e) {
  263. if (e === null) {
  264. this.queryFrom.startDate = "";
  265. this.queryFrom.endDate = "";
  266. } else {
  267. this.queryFrom.startDate = e[0];
  268. this.queryFrom.endDate = e[1];
  269. }
  270. },
  271. // detailFun(row) {
  272. // let params = {
  273. // companyId: row.row.subOrderId
  274. // };
  275. // this.$api.letter.getByCompanyId(params).then(res => {
  276. // if (res.code == "200") {
  277. // var data = res.data;
  278. // this.orderInfo = res.data;
  279. // this.cpolicy();
  280. // this.ImageList();
  281. // data.kindinfo.map((ele, index) => {
  282. // switch (ele.kindCode) {
  283. // case "A":
  284. // ele.amount = "投保";
  285. // break;
  286. // case "D4":
  287. // case "SY_FJ_YBW2":
  288. // ele.unitAmount = this.toChinesNum(ele.unitAmount);
  289. // break;
  290. // case "MJ1":
  291. // case "MJ2":
  292. // case "MJ3":
  293. // case "MJ4":
  294. // ele.deductibleRate = ele.deductibleRate + "%";
  295. // break;
  296. // default:
  297. // ele.amount = this.toChinesNum(ele.amount);
  298. // }
  299. // return ele;
  300. // });
  301. // this.queryOrders = data;
  302. // //赋值费用信息
  303. // // this.feeDetailInfo=data.orderFeeResult;
  304. // }
  305. // });
  306. // this.$refs.detailsDialog.setBackupVisible(true);
  307. // },
  308. }
  309. };
  310. </script>
  311. <style scoped lang="scss">
  312. /deep/{
  313. .el-step__description.is-finish,
  314. .el-step__head.is-finish {
  315. color: #333;
  316. border: none;
  317. }
  318. .el-step__title,.el-step__icon-inner{
  319. color:var(--themeColor)
  320. }
  321. .el-step__line-inner{
  322. height:0;
  323. display:none
  324. }
  325. .is-flex{
  326. .el-step__icon{
  327. background: var(--themeColor)
  328. }
  329. .el-step__icon-inner{
  330. color: #fff;
  331. }
  332. }
  333. .el-step__icon.is-text{
  334. border:none;
  335. box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.1);
  336. }
  337. }
  338. </style>