AgentPoolChannel1.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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" :refreshStatus="true" refreshStatusName="批量更新状态" @refreshStatusBatch="refreshStatusBatch" @findPage="findPage" button3Name="转发" button3Type="text"
  8. @handleButton3="transmit" :buttonDropdown="dropdownOption" 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="500px">
  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 :title="item.desc" :key="item.id" v-for="item in trajectoryTable">
  28. <template slot="description">
  29. <template style="margin-top:10px;margin-bottom:10px ;">
  30. <div>保险公司:{{ item.insCompany }}</div>
  31. <div>车牌号:{{ item.licenseNo }}</div>
  32. <div>被保人:{{ item.insuredname }}</div>
  33. <div>
  34. <span >操作人:{{ item.operator }}</span>
  35. <span style="margin-left: 10px">操作人工号:{{ item.audituser }}</span>
  36. </div>
  37. <span v-if="item.operatorTime">
  38. 操作时间:{{ item.operatorTime }}
  39. </span>
  40. </template>
  41. </template>
  42. </el-step>
  43. </el-steps>
  44. </div>
  45. </el-dialog>
  46. <el-dialog :visible.sync="forwardingRecordsdialogVisible" title="转发记录" width="70%">
  47. <el-table :data="gridData" height="400" border v-loading="loading" highlight-current-row stripe
  48. :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. <el-dialog title="原因查看" :visible.sync="viewReasondialogVisible" width="30%" >
  61. <span>{{ viewReasonMsg }}</span>
  62. <span slot="footer" class="dialog-footer">
  63. <el-button size="small" @click="viewReasondialogVisible = false">关闭</el-button>
  64. </span>
  65. </el-dialog>
  66. </div>
  67. </template>
  68. <script>
  69. import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
  70. import Cookies from "js-cookie";
  71. import CommonUtil from "@/utils/comutil.js";
  72. import detailsDialog from "@/views/Core/components/detailsDialog.vue";
  73. import retrievalForm from "@/components/Form/retrievalForm.vue";
  74. import { mixin } from "../mixin";
  75. export default {
  76. components: {
  77. KtCommonTable,
  78. detailsDialog,
  79. retrievalForm
  80. },
  81. data() {
  82. return {
  83. pageRequest: {
  84. pageNum: 1,
  85. pageSize: 20,
  86. orderStatus: 1,
  87. userId: "",
  88. },
  89. ddgjdialogVisible:false,
  90. trajectoryTable:[],
  91. optionsStatus:[],
  92. dropdownOption:[
  93. {
  94. label:'报价轨迹',
  95. click:(row)=>this.trajectory(row)
  96. },
  97. {
  98. label:'撤单',
  99. hide:(row) => {
  100. return row.insCompany == '紫金财险' ?true:false
  101. },
  102. click:(row)=>this.cancelorder(row)
  103. },{
  104. label:'更新订单',
  105. click:(row)=>this.refreshStatus(row)
  106. },
  107. ],
  108. columns: [
  109. { prop: "subOrderId", label: "订单号", minWidth: 180 },
  110. { prop: "product", label: "投保险种", minWidth: 100 },
  111. { prop: "areaInfo", label: "归属信息", minWidth: 150 },
  112. { prop: "username", label: "业务员姓名", minWidth: 180 },
  113. { prop: "leaderName", label: "管理人", minWidth: 160, },
  114. { prop: "managementSource", label: "业务来源", minWidth: 160, formatter: this.managementSourceFormatter },
  115. { prop: "entryStatus", label: "录入来源", minWidth: 160, formatter: this.entryStatusFormatter },
  116. { prop: "insCompany", label: "保险公司", minWidth: 120 },
  117. { prop: "partnerCompaniesName", label: "合作公司", minWidth: 120 },
  118. // { prop: "agreementName", label: "协议", minWidth: 160 },
  119. { prop: "licenseno", label: "车牌号", minWidth: 160 },
  120. { prop: "insuredname", label: "投保人姓名", minWidth: 120 },
  121. { prop: "jqpremium", label: "交强险保费", minWidth: 120 },
  122. { prop: "sypremium", label: "商业险保费", minWidth: 120 },
  123. { prop: "taxamount", label: "车船税", minWidth: 120 },
  124. { prop: "jypremium", label: "驾意险保费", minWidth: 120 },
  125. { prop: "userid", label: "业务员工号", minWidth: 180 },
  126. { label: "原因", minWidth: 180, formatter: this.failureReasonFormatter },
  127. { prop: "createtime", label: "报价时间", minWidth: 160 },
  128. { prop: "payDate", label: "支付时间", minWidth: 160 },
  129. ],
  130. }
  131. },
  132. mixins: [mixin],
  133. created() {
  134. this.pageRequest.userId = Cookies.get("user");
  135. this.$api.insCompany.dicType("insOrderStatusAll").then((res) => {
  136. this.optionsStatus = res.data.ddList;
  137. });
  138. },
  139. methods: {
  140. //批量更新订单状态
  141. refreshStatusBatch(list) {
  142. this.$api.letter.batchOrderStatus({ orderNos: list }).then((res) => {
  143. if (res.code == '200') {
  144. this.$message({
  145. type: 'success',
  146. message: res.msg,
  147. });
  148. this.findPage();
  149. } else {
  150. this.$message({
  151. type: 'error',
  152. message: res.msg,
  153. });
  154. }
  155. });
  156. },
  157. //导出
  158. exportSubmit(data) {
  159. let obj = Object.assign(this.pageRequest, data)
  160. this.pageRequest = obj;
  161. this.exportRecords();
  162. },
  163. //导出
  164. exportRecords() {
  165. this.$api.task.exportHospitalityByAgent(this.pageRequest).then((res) => {
  166. if (res.code == '200') {
  167. let url = process.env.BASE_URL + res.data; // 3.创建一个临时的url指向blob对象
  168. let a = document.createElement("a");
  169. a.href = url;
  170. a.download = "导出文件.xlsx";
  171. a.click();
  172. window.URL.revokeObjectURL(url);
  173. } else {
  174. this.$message({
  175. type: 'error',
  176. message: res.msg,
  177. });
  178. }
  179. });
  180. },
  181. getStatusText(code) {
  182. return this.optionsStatus.find(val=>val.dictValue==code).dictTag;
  183. },
  184. handleFormSubmit(data) {
  185. let obj = Object.assign(this.pageRequest, data)
  186. this.pageRequest = obj;
  187. this.findPage();
  188. },
  189. toggleCollapse(data) {
  190. this.retrievalFields.map(val => {
  191. if (val.Retained != null) val.Retained = data;
  192. return val;
  193. })
  194. },
  195. queryStaffInfo() {
  196. this.findPage();
  197. },
  198. // 右侧列表的方法Start
  199. findPage(data) {
  200. if (data && data.pageRequest) {
  201. this.pageRequest.pageNum = data.pageRequest.pageNum;
  202. this.pageRequest.pageSize = data.pageRequest.pageSize;
  203. }
  204. this.loading = true;
  205. this.$api.task
  206. .queryPageHospitalityLinkagent(this.pageRequest)
  207. .then(res => {
  208. if (res.code == 200) {
  209. this.loading = false;
  210. this.pageResult = res.data;
  211. } else {
  212. this.loading = false;
  213. this.$message.error(res.msg);
  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,.el-step__icon-inner{
  326. color:var(--themeColor)
  327. }
  328. .el-step__line-inner{
  329. height:0;
  330. display:none
  331. }
  332. .is-flex{
  333. .el-step__icon{
  334. background: var(--themeColor)
  335. }
  336. .el-step__icon-inner{
  337. color: #fff;
  338. }
  339. }
  340. .el-step__icon.is-text{
  341. border:none;
  342. box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.1);
  343. }
  344. }
  345. </style>