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