TaskPoolChannel3.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <template>
  2. <div>
  3. <retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse"
  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" button2Name="报价轨迹" button2Type="text"
  8. @handleButton2="trajectory" button5Name="详情" button5Type="text" @handleButton5="detailFun"></kt-common-table>
  9. <el-dialog title="转发" :visible.sync="dialogVisible" width="30%">
  10. 转发人:
  11. <el-select v-model="transmitValue" placeholder="请选择">
  12. <el-option v-for="item in options" :key="item.userId" :label="item.name" :value="item.userId"></el-option>
  13. </el-select>
  14. <span slot="footer" class="dialog-footer">
  15. <el-button size="small" @click="dialogVisible = false">取 消</el-button>
  16. <el-button type="primary" size="small" @click="transmitSumit">确 定</el-button>
  17. </span>
  18. </el-dialog>
  19. <detailsDialog ref="detailsDialog" :orderInfo="queryOrders"></detailsDialog>
  20. <el-dialog :visible.sync="ddgjdialogVisible" width="430px">
  21. <div slot="title" class=" dialog-title">
  22. <span>订单轨迹</span>
  23. </div>
  24. <div style="height: 300px; overflow-y: auto">
  25. <el-steps direction="vertical" :active="trajectoryTable.length - 1" >
  26. <el-step v-for="item in trajectoryTable"
  27. :key="item.id"
  28. :title="getStatusText(item.orderStatus)"
  29. >
  30. <template slot="description">
  31. <span>保险公司:{{ item.insCompany }}</span>
  32. <span>提交人:{{ item.operator }}</span>
  33. <div>创建时间:{{ item.createTime }}</div>
  34. </template>
  35. </el-step>
  36. </el-steps>
  37. </div>
  38. </el-dialog>
  39. </div>
  40. </template>
  41. <script>
  42. import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
  43. import Cookies from "js-cookie";
  44. import CommonUtil from "@/utils/comutil.js";
  45. import detailsDialog from "@/views/Core/components/detailsDialog.vue";
  46. import retrievalForm from "@/components/Form/retrievalForm.vue";
  47. import { mixin } from "../mixin";
  48. export default {
  49. components: {
  50. KtCommonTable,
  51. detailsDialog,
  52. retrievalForm
  53. },
  54. data() {
  55. return {
  56. retrievalFields: [
  57. {
  58. name: 'provinceId',
  59. label: '省机构名称',
  60. type: 'select',
  61. options: []
  62. },
  63. {
  64. name: 'cityId',
  65. label: '市机构名称',
  66. type: 'select',
  67. options: []
  68. },
  69. {
  70. name: 'countyId',
  71. label: '区机构名称',
  72. type: 'select',
  73. options: []
  74. },
  75. {
  76. name: 'houseId',
  77. label: '门店名称',
  78. type: 'select',
  79. options: []
  80. },
  81. {
  82. name: 'taskNo',
  83. label: '任务池号',
  84. type: 'input',
  85. },
  86. {
  87. name: 'subOrderId',
  88. label: '订单号',
  89. type: 'input',
  90. },
  91. {
  92. name: 'companyId',
  93. label: '保险公司',
  94. type: 'select',
  95. options: []
  96. },
  97. {
  98. name: 'agreeId',
  99. label: '协议选择',
  100. type: 'select',
  101. options: [],
  102. optionsIabel: "agreementName",
  103. },
  104. {
  105. name: 'licenseNo',
  106. label: '车牌号',
  107. type: 'input',
  108. Retained: false,
  109. },
  110. {
  111. name: 'frameNo',
  112. label: '车架号',
  113. type: 'input',
  114. Retained: false,
  115. },
  116. {
  117. name: 'engineNo',
  118. label: '发动机号',
  119. type: 'input',
  120. Retained: false,
  121. },
  122. {
  123. name: 'riskCode',
  124. label: '投保险种',
  125. type: 'select',
  126. Retained: false,
  127. options: [],
  128. optionsIabel: "dictTag",
  129. optionsValue: "dictTag",
  130. },
  131. {
  132. name: 'operatorId',
  133. label: '代理人工号',
  134. type: 'input',
  135. Retained: false,
  136. },
  137. {
  138. name: 'operatorName',
  139. label: '代理人姓名',
  140. type: 'input',
  141. Retained: false,
  142. },
  143. {
  144. name: 'auditId',
  145. label: '受理人工号',
  146. type: 'input',
  147. Retained: false,
  148. },
  149. {
  150. name: 'insuredName',
  151. label: '被保险人',
  152. type: 'input',
  153. Retained: false,
  154. },
  155. {
  156. name: ["quoteStartDateStr", "quoteEndDateStr"],
  157. label: '报价时间',
  158. type: 'date',
  159. list: 'quoteList'
  160. },
  161. {
  162. name: ["attachStartDateStr", "attachEndDateStr"],
  163. label: '起保时间',
  164. type: 'date',
  165. list: 'attachList'
  166. },
  167. ],
  168. pageRequest: {
  169. pageNum: 1,
  170. pageSize: 20,
  171. orderStatus: 3,
  172. userId: "",
  173. },
  174. ddgjdialogVisible:false,
  175. trajectoryTable:[],
  176. optionsStatus:[],
  177. }
  178. },
  179. mixins: [mixin],
  180. created() {
  181. this.pageRequest.userId = Cookies.get("user");
  182. this.areaqueryList(1, 99, "provinceId");
  183. this.CompanyList();
  184. this.agrmentlist();
  185. this.getDicType("productsType"); //车船税类型
  186. this.$api.insCompany.dicType("insOrderStatus").then((res) => {
  187. this.optionsStatus = res.data.ddList;
  188. });
  189. },
  190. methods: {
  191. areaSelectChange(obj) {
  192. switch (obj.filed) {
  193. case 'provinceId':
  194. this.areaqueryList(2, obj.id, 'cityId')
  195. break;
  196. case 'cityId':
  197. this.areaqueryList(3, obj.id, 'countyId')
  198. break;
  199. case 'countyId':
  200. this.areaqueryList(4, obj.id, 'houseId')
  201. break;
  202. default:
  203. }
  204. },
  205. getStatusText(code) {
  206. return this.optionsStatus.find(val=>val.dictValue==code).dictTag;;
  207. },
  208. //获取机构数据
  209. areaqueryList(level, parentId, filed) {
  210. this.$api.task.queryListByParentId(level, parentId).then((res) => {
  211. this.selectDataMatching(this.retrievalFields, filed, res.data);
  212. });
  213. },
  214. CompanyList() {
  215. this.$api.letter.gainTopList().then((res) => {
  216. this.selectDataMatching(this.retrievalFields, 'companyId', res.data);
  217. })
  218. },
  219. agrmentlist() {
  220. this.$api.task.findPtlAgreementList().then((res) => {
  221. this.selectDataMatching(this.retrievalFields, 'agreeId', res.data);
  222. });
  223. },
  224. getDicType(type) {
  225. this.$api.insCompany.dicType(type).then(res => {
  226. if (res.code == 200) {
  227. this.selectDataMatching(this.retrievalFields, 'riskCode', res.data.ddList);
  228. }
  229. });
  230. },
  231. //下拉数据匹配
  232. selectDataMatching(files, name, data) {
  233. files.forEach(filed => {
  234. if (filed.name == name) {
  235. filed.options = data;
  236. }
  237. })
  238. },
  239. handleFormSubmit(data) {
  240. let obj = Object.assign(this.pageRequest, data)
  241. this.pageRequest = obj;
  242. this.findPage();
  243. },
  244. toggleCollapse(data) {
  245. this.retrievalFields.map(val => {
  246. if (val.Retained != null) val.Retained = data;
  247. return val;
  248. })
  249. },
  250. queryStaffInfo() {
  251. this.findPage();
  252. },
  253. // 右侧列表的方法Start
  254. findPage(data) {
  255. if (data && data.pageRequest) {
  256. this.pageRequest.pageNum = data.pageRequest.pageNum;
  257. this.pageRequest.pageSize = data.pageRequest.pageSize;
  258. }
  259. this.loading = true;
  260. this.$api.task
  261. .queryPageHospitalityByChannel(this.pageRequest)
  262. .then(res => {
  263. if (res.code == 200) {
  264. this.loading = false;
  265. this.pageResult = res.data;
  266. } else {
  267. this.loading = false;
  268. this.$message.error(res.msg);
  269. }
  270. });
  271. },
  272. trajectory(row){
  273. this.$api.letter.queryBySuborder(row.row.subOrderId).then((res) => {
  274. if (res.code == 200 && res.data.length > 0) {
  275. this.ddgjdialogVisible = true;
  276. this.trajectoryTable = res.data;
  277. } else {
  278. this.$message({
  279. message: res.msg || "暂无数据!",
  280. type: "warning",
  281. });
  282. }
  283. });
  284. },
  285. transmit(row) {
  286. this.dialogVisible = true;
  287. this.transmitValue = "";
  288. this.orderNo = row.row.orderno
  289. this.subOrderId = row.row.subOrderId
  290. this.$api.task.getCustomerUsers().then(res => {
  291. if (res.code == 200) {
  292. this.options = res.data
  293. }
  294. })
  295. },
  296. // 收回
  297. takeBack(row) {
  298. let orderNo = row.row.orderno
  299. let subOrderId = row.row.subOrderId
  300. this.$api.task.taskPoolsRecover({ orderNo, subOrderId }).then(res => {
  301. if (res.code == 200) {
  302. this.$message({
  303. message: res.msg,
  304. type: 'success'
  305. });
  306. }
  307. else {
  308. this.$message.error(res.msg);
  309. }
  310. })
  311. },
  312. transmitSumit() {
  313. if (this.transmitValue) {
  314. this.$api.task.forwardingSubOrders({ auditId: this.transmitValue, orderNo: this.orderNo, subOrderId: this.subOrderId }).then(res => {
  315. if (res.code == 200) {
  316. this.options = res.data
  317. this.dialogVisible = false;
  318. this.findPage()
  319. }
  320. else {
  321. this.$message.error(res.msg);
  322. }
  323. })
  324. }
  325. else {
  326. this.$message.error('请选择转发人!');
  327. }
  328. },
  329. //联级选择器触发事件
  330. handleChange(val) {
  331. if (val.length !== 0) {
  332. this.queryFrom.deptId = val.at(-1);
  333. } else {
  334. this.queryFrom.deptId = "";
  335. }
  336. },
  337. monthChange(e) {
  338. if (e === null) {
  339. this.queryFrom.startDate = "";
  340. this.queryFrom.endDate = "";
  341. } else {
  342. this.queryFrom.startDate = e[0];
  343. this.queryFrom.endDate = e[1];
  344. }
  345. },
  346. detailFun(row) {
  347. this.orderInfo=row.row;
  348. let params = {
  349. companyId: row.row.subOrderId
  350. };
  351. this.cpolicy();
  352. this.$api.letter.getByCompanyId(params).then(res => {
  353. if (res.code == "200") {
  354. var data = res.data;
  355. data.kindinfo.map((ele, index) => {
  356. switch (ele.kindCode) {
  357. case "A":
  358. ele.amount = "投保";
  359. break;
  360. case "D4":
  361. case "SY_FJ_YBW2":
  362. ele.unitAmount = this.toChinesNum(ele.unitAmount);
  363. break;
  364. case "MJ1":
  365. case "MJ2":
  366. case "MJ3":
  367. case "MJ4":
  368. ele.deductibleRate = ele.deductibleRate + "%";
  369. break;
  370. default:
  371. ele.amount = this.toChinesNum(ele.amount);
  372. }
  373. return ele;
  374. });
  375. this.queryOrders = data;
  376. //赋值费用信息
  377. // this.feeDetailInfo=data.orderFeeResult;
  378. }
  379. });
  380. this.$refs.detailsDialog.setBackupVisible(true);
  381. },
  382. }
  383. };
  384. </script>
  385. <style scoped lang="scss">
  386. /deep/{
  387. .el-step__title,.el-step__icon-inner{
  388. color:var(--themeColor)
  389. }
  390. .el-step__line-inner{
  391. height:0;
  392. display:none
  393. }
  394. .is-flex{
  395. .el-step__icon{
  396. background: var(--themeColor)
  397. }
  398. .el-step__icon-inner{
  399. color: #fff;
  400. }
  401. }
  402. .el-step__icon.is-text{
  403. border:none;
  404. box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.1);
  405. }
  406. }
  407. </style>