TaskPoolChannel4.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <template>
  2. <div>
  3. <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse" :dateType="1"
  4. @exportSubmit="exportSubmit" :isExport="true"
  5. @areaSelectChange="areaSelectChange"></retrievalForm>
  6. <kt-common-table :data="pageResult" :columns="columns" element-loading-text="加载中..." v-loading="loading"
  7. :showBatchDelete="false" @findPage="findPage" button3Name="转发" button3Type="text"
  8. @handleButton3="transmit" :buttonDropdown="dropdownOption"
  9. button5Name="详情" button5Type="text" @handleButton5="detailFun" button4Name="转发记录" button4Type="text"
  10. @handleButton4="forwardingRecords" :operationWidth="300"></kt-common-table>
  11. <el-dialog title="转发" :visible.sync="dialogVisible" width="30%">
  12. 转发人:
  13. <el-select v-model="transmitValue" filterable clearable placeholder="请选择">
  14. <el-option v-for="item in options" :key="item.userId" :label="item.name" :value="item.userId"></el-option>
  15. </el-select>
  16. <span slot="footer" class="dialog-footer">
  17. <el-button size="small" @click="dialogVisible = false">取 消</el-button>
  18. <el-button type="primary" size="small" @click="transmitSumit">确 定</el-button>
  19. </span>
  20. </el-dialog>
  21. <detailsDialog ref="detailsDialog" :isTaskPool="true" :orderInfo="queryOrders" :isAuditing="isAuditing" :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
  49. :header-cell-style="{
  50. background: '#F2F7FC',
  51. fontWeight: '700',
  52. color: '#606266',
  53. }">
  54. <el-table-column property="subOrderId" align="center" label="订单号" width="200"></el-table-column>
  55. <el-table-column property="oldOperatorId" align="center" label="转发人" width="200"></el-table-column>
  56. <el-table-column property="newOperatorId" align="center" label="接收人"></el-table-column>
  57. <el-table-column property="remark" align="center" label="转发信息"></el-table-column>
  58. <el-table-column property="createTime" align="center" label="转发时间"></el-table-column>
  59. </el-table>
  60. </el-dialog>
  61. <el-dialog title="原因查看" :visible.sync="viewReasondialogVisible" width="30%" >
  62. <span>{{ viewReasonMsg }}</span>
  63. <span slot="footer" class="dialog-footer">
  64. <el-button size="small" @click="viewReasondialogVisible = false">关闭</el-button>
  65. </span>
  66. </el-dialog>
  67. </div>
  68. </template>
  69. <script>
  70. import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
  71. import Cookies from "js-cookie";
  72. import CommonUtil from "@/utils/comutil.js";
  73. import detailsDialog from "@/views/Core/components/detailsDialog.vue";
  74. import retrievalForm from "@/components/Form/retrievalForm.vue";
  75. import { mixin } from "../mixin";
  76. export default {
  77. components: {
  78. KtCommonTable,
  79. detailsDialog,
  80. retrievalForm
  81. },
  82. data() {
  83. return {
  84. pageRequest: {
  85. pageNum: 1,
  86. pageSize: 20,
  87. orderStatus: 4,
  88. userId: "",
  89. },
  90. ddgjdialogVisible:false,
  91. trajectoryTable:[],
  92. optionsStatus:[],
  93. dropdownOption:[
  94. {
  95. label:'报价轨迹',
  96. click:(row)=>this.trajectory(row)
  97. },
  98. {
  99. label:'撤单',
  100. hide:(row) => {
  101. return row.insCompany == '紫金财险' ?true:false
  102. },
  103. click:(row)=>this.cancelorder(row)
  104. },{
  105. label:'更新订单',
  106. hide:(row) => {
  107. return row.orderstatus=='4' && row.insCompany == '华泰财险' ?true:false
  108. },
  109. click:(row)=>this.updateStatusHuatai(row)
  110. },
  111. ],
  112. columns: [
  113. { prop: "subOrderId", label: "订单号", minWidth: 180 },
  114. { prop: "product", label: "投保险种", minWidth: 100 },
  115. { prop: "areaInfo", label: "归属信息", minWidth: 150 },
  116. { prop: "username", label: "业务员姓名", minWidth: 180 },
  117. { prop: "leaderName", label: "管理人", minWidth: 160, },
  118. { prop: "managementSource", label: "业务来源", minWidth: 160, formatter: this.managementSourceFormatter },
  119. { prop: "entryStatus", label: "录入来源", minWidth: 160, formatter: this.entryStatusFormatter },
  120. { prop: "insCompany", label: "保险公司", minWidth: 120 },
  121. { prop: "partnerCompaniesName", label: "合作公司", minWidth: 120 },
  122. // { prop: "agreementName", label: "协议", minWidth: 160 },
  123. { prop: "licenseno", label: "车牌号", minWidth: 160 },
  124. { prop: "insuredname", label: "投保人姓名", minWidth: 120 },
  125. { prop: "jqpremium", label: "交强险保费", minWidth: 120 },
  126. { prop: "sypremium", label: "商业险保费", minWidth: 120 },
  127. { prop: "taxamount", label: "车船税", minWidth: 120 },
  128. { prop: "jypremium", label: "驾意险保费", minWidth: 120 },
  129. { prop: "userid", label: "业务员工号", minWidth: 180 },
  130. { label: "原因", minWidth: 180, formatter: this.failureReasonFormatter },
  131. { prop: "createtime", label: "报价时间", minWidth: 160 },
  132. { prop: "payDate", label: "支付时间", minWidth: 160 },
  133. ],
  134. }
  135. },
  136. mixins: [mixin],
  137. created() {
  138. this.pageRequest.userId = Cookies.get("user");
  139. this.$api.insCompany.dicType("insOrderStatusAll").then((res) => {
  140. this.optionsStatus = res.data.ddList;
  141. });
  142. },
  143. methods: {
  144. //导出
  145. exportSubmit(data) {
  146. let obj = Object.assign(this.pageRequest, data)
  147. this.pageRequest = obj;
  148. this.exportRecords();
  149. },
  150. //导出
  151. exportRecords() {
  152. this.$api.task.exportHospitalityByChannel(this.pageRequest).then((res) => {
  153. if (res.code == '200') {
  154. let url = process.env.BASE_URL + res.data; // 3.创建一个临时的url指向blob对象
  155. let a = document.createElement("a");
  156. a.href = url;
  157. a.download = "导出文件.xlsx";
  158. a.click();
  159. window.URL.revokeObjectURL(url);
  160. } else {
  161. this.$message({
  162. type: 'error',
  163. message: res.msg,
  164. });
  165. }
  166. });
  167. },
  168. cancelorder(item) {
  169. this.$api.letter.zijincancelorder({ companyId: item.subOrderId }).then(res => {
  170. if (res.code == 200) {
  171. this.$message({
  172. message: res.msg,
  173. type: "success"
  174. });
  175. this.findPage();
  176. }
  177. else{
  178. this.$message.error(res.msg);
  179. }
  180. });
  181. },
  182. //华泰刷新核保状态
  183. updateStatusHuatai(item) {
  184. let HtApiType =
  185. item.apiType == 2
  186. ? "auditStatusQuery"
  187. : "orderStatushuatai";
  188. this.$api.letter[HtApiType]({ companyId: item.subOrderId }).then(res => {
  189. if (res.code == 200) {
  190. this.$message({
  191. message: res.msg ? res.msg : "已刷新状态",
  192. type: "success"
  193. });
  194. this.findPage();
  195. } else {
  196. this.$message({
  197. showClose: true,
  198. dangerouslyUseHTMLString: true,
  199. message: res.msg.replace(/\n/g, "<br><br>"),
  200. type: "error",
  201. duration: 7000
  202. });
  203. }
  204. });
  205. },
  206. getStatusText(code) {
  207. return this.optionsStatus.find(val=>val.dictValue==code).dictTag;;
  208. },
  209. handleFormSubmit(data) {
  210. let obj = Object.assign(this.pageRequest, data)
  211. this.pageRequest = obj;
  212. this.findPage();
  213. },
  214. toggleCollapse(data) {
  215. this.retrievalFields.map(val => {
  216. if (val.Retained != null) val.Retained = data;
  217. return val;
  218. })
  219. },
  220. queryStaffInfo() {
  221. this.findPage();
  222. },
  223. // 右侧列表的方法Start
  224. findPage(data) {
  225. if (data && data.pageRequest) {
  226. this.pageRequest.pageNum = data.pageRequest.pageNum;
  227. this.pageRequest.pageSize = data.pageRequest.pageSize;
  228. }
  229. this.loading = true;
  230. this.$api.task
  231. .queryPageHospitalityByChannel(this.pageRequest)
  232. .then(res => {
  233. if (res.code == 200) {
  234. this.loading = false;
  235. this.pageResult = res.data;
  236. } else {
  237. this.loading = false;
  238. this.$message.error(res.msg);
  239. }
  240. });
  241. },
  242. transmit(row) {
  243. this.dialogVisible = true;
  244. this.transmitValue = "";
  245. this.orderNo = row.row.orderno
  246. this.subOrderId = row.row.subOrderId
  247. this.$api.task.getCustomerUsers().then(res => {
  248. if (res.code == 200) {
  249. this.options = res.data
  250. }
  251. })
  252. },
  253. // 收回
  254. takeBack(row) {
  255. let orderNo = row.row.orderno
  256. let subOrderId = row.row.subOrderId
  257. this.$api.task.taskPoolsRecover({ orderNo, subOrderId }).then(res => {
  258. if (res.code == 200) {
  259. this.$message({
  260. message: res.msg,
  261. type: 'success'
  262. });
  263. }
  264. else {
  265. this.$message.error(res.msg);
  266. }
  267. })
  268. },
  269. transmitSumit() {
  270. if (this.transmitValue) {
  271. this.$api.task.forwardingSubOrders({ auditId: this.transmitValue, orderNo: this.orderNo, subOrderId: this.subOrderId }).then(res => {
  272. if (res.code == 200) {
  273. this.options = res.data
  274. this.dialogVisible = false;
  275. this.findPage()
  276. }
  277. else {
  278. this.$message.error(res.msg);
  279. }
  280. })
  281. }
  282. else {
  283. this.$message.error('请选择转发人!');
  284. }
  285. },
  286. //联级选择器触发事件
  287. handleChange(val) {
  288. if (val.length !== 0) {
  289. this.queryFrom.deptId = val.at(-1);
  290. } else {
  291. this.queryFrom.deptId = "";
  292. }
  293. },
  294. monthChange(e) {
  295. if (e === null) {
  296. this.queryFrom.startDate = "";
  297. this.queryFrom.endDate = "";
  298. } else {
  299. this.queryFrom.startDate = e[0];
  300. this.queryFrom.endDate = e[1];
  301. }
  302. },
  303. // detailFun(row) {
  304. // let params = {
  305. // companyId: row.row.subOrderId
  306. // };
  307. // this.$api.letter.getByCompanyId(params).then(res => {
  308. // if (res.code == "200") {
  309. // var data = res.data;
  310. // this.orderInfo = res.data;
  311. // this.cpolicy();
  312. // this.ImageList();
  313. // data.kindinfo.map((ele, index) => {
  314. // switch (ele.kindCode) {
  315. // case "A":
  316. // ele.amount = "投保";
  317. // break;
  318. // case "D4":
  319. // case "SY_FJ_YBW2":
  320. // ele.unitAmount = this.toChinesNum(ele.unitAmount);
  321. // break;
  322. // case "MJ1":
  323. // case "MJ2":
  324. // case "MJ3":
  325. // case "MJ4":
  326. // ele.deductibleRate = ele.deductibleRate + "%";
  327. // break;
  328. // default:
  329. // ele.amount = this.toChinesNum(ele.amount);
  330. // }
  331. // return ele;
  332. // });
  333. // this.queryOrders = data;
  334. // //赋值费用信息
  335. // // this.feeDetailInfo=data.orderFeeResult;
  336. // }
  337. // });
  338. // this.$refs.detailsDialog.setBackupVisible(true);
  339. // },
  340. }
  341. };
  342. </script>
  343. <style scoped lang="scss">
  344. /deep/{
  345. .el-step__description.is-finish,
  346. .el-step__head.is-finish {
  347. color: #333;
  348. border: none;
  349. }
  350. .el-step__title,.el-step__icon-inner{
  351. color:var(--themeColor)
  352. }
  353. .el-step__line-inner{
  354. height:0;
  355. display:none
  356. }
  357. .is-flex{
  358. .el-step__icon{
  359. background: var(--themeColor)
  360. }
  361. .el-step__icon-inner{
  362. color: #fff;
  363. }
  364. }
  365. .el-step__icon.is-text{
  366. border:none;
  367. box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.1);
  368. }
  369. }
  370. </style>