CompanyPoolChannel1.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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. pageRequest: {
  57. pageNum: 1,
  58. pageSize: 20,
  59. orderStatus: 1,
  60. userId: "",
  61. },
  62. ddgjdialogVisible:false,
  63. trajectoryTable:[],
  64. optionsStatus:[],
  65. }
  66. },
  67. mixins: [mixin],
  68. created() {
  69. this.pageRequest.userId = Cookies.get("user");
  70. this.areaqueryList(1, 99, "provinceId");
  71. this.CompanyList();
  72. this.agrmentlist();
  73. this.getDicType("productsType"); //车船税类型
  74. this.$api.insCompany.dicType("insOrderStatus").then((res) => {
  75. this.optionsStatus = res.data.ddList;
  76. });
  77. },
  78. methods: {
  79. getStatusText(code) {
  80. return this.optionsStatus.find(val=>val.dictValue==code).dictTag;;
  81. },
  82. handleFormSubmit(data) {
  83. let obj = Object.assign(this.pageRequest, data)
  84. this.pageRequest = obj;
  85. this.findPage();
  86. },
  87. toggleCollapse(data) {
  88. this.retrievalFields.map(val => {
  89. if (val.Retained != null) val.Retained = data;
  90. return val;
  91. })
  92. },
  93. queryStaffInfo() {
  94. this.findPage();
  95. },
  96. // 右侧列表的方法Start
  97. findPage(data) {
  98. if (data && data.pageRequest) {
  99. this.pageRequest.pageNum = data.pageRequest.pageNum;
  100. this.pageRequest.pageSize = data.pageRequest.pageSize;
  101. }
  102. this.loading = true;
  103. this.$api.task
  104. .queryPageHospitalityByInsuranceCompany(this.pageRequest)
  105. .then(res => {
  106. if (res.code == 200) {
  107. this.loading = false;
  108. this.pageResult = res.data;
  109. } else {
  110. this.loading = false;
  111. this.$message.error(res.msg);
  112. }
  113. });
  114. },
  115. trajectory(row){
  116. this.$api.letter.queryBySuborder(row.row.subOrderId).then((res) => {
  117. if (res.code == 200 && res.data.length > 0) {
  118. this.ddgjdialogVisible = true;
  119. this.trajectoryTable = res.data;
  120. } else {
  121. this.$message({
  122. message: res.msg || "暂无数据!",
  123. type: "warning",
  124. });
  125. }
  126. });
  127. },
  128. transmit(row) {
  129. this.dialogVisible = true;
  130. this.transmitValue = "";
  131. this.orderNo = row.row.orderno
  132. this.subOrderId = row.row.subOrderId
  133. this.$api.task.getCustomerUsers().then(res => {
  134. if (res.code == 200) {
  135. this.options = res.data
  136. }
  137. })
  138. },
  139. // 收回
  140. takeBack(row) {
  141. let orderNo = row.row.orderno
  142. let subOrderId = row.row.subOrderId
  143. this.$api.task.taskPoolsRecover({ orderNo, subOrderId }).then(res => {
  144. if (res.code == 200) {
  145. this.$message({
  146. message: res.msg,
  147. type: 'success'
  148. });
  149. }
  150. else {
  151. this.$message.error(res.msg);
  152. }
  153. })
  154. },
  155. transmitSumit() {
  156. if (this.transmitValue) {
  157. this.$api.task.forwardingSubOrders({ auditId: this.transmitValue, orderNo: this.orderNo, subOrderId: this.subOrderId }).then(res => {
  158. if (res.code == 200) {
  159. this.options = res.data
  160. this.dialogVisible = false;
  161. this.findPage()
  162. }
  163. else {
  164. this.$message.error(res.msg);
  165. }
  166. })
  167. }
  168. else {
  169. this.$message.error('请选择转发人!');
  170. }
  171. },
  172. //联级选择器触发事件
  173. handleChange(val) {
  174. if (val.length !== 0) {
  175. this.queryFrom.deptId = val.at(-1);
  176. } else {
  177. this.queryFrom.deptId = "";
  178. }
  179. },
  180. monthChange(e) {
  181. if (e === null) {
  182. this.queryFrom.startDate = "";
  183. this.queryFrom.endDate = "";
  184. } else {
  185. this.queryFrom.startDate = e[0];
  186. this.queryFrom.endDate = e[1];
  187. }
  188. },
  189. // detailFun(row) {
  190. // let params = {
  191. // companyId: row.row.subOrderId
  192. // };
  193. // this.$api.letter.getByCompanyId(params).then(res => {
  194. // if (res.code == "200") {
  195. // var data = res.data;
  196. // this.orderInfo = res.data;
  197. // this.cpolicy();
  198. // this.ImageList();
  199. // data.kindinfo.map((ele, index) => {
  200. // switch (ele.kindCode) {
  201. // case "A":
  202. // ele.amount = "投保";
  203. // break;
  204. // case "D4":
  205. // case "SY_FJ_YBW2":
  206. // ele.unitAmount = this.toChinesNum(ele.unitAmount);
  207. // break;
  208. // case "MJ1":
  209. // case "MJ2":
  210. // case "MJ3":
  211. // case "MJ4":
  212. // ele.deductibleRate = ele.deductibleRate + "%";
  213. // break;
  214. // default:
  215. // ele.amount = this.toChinesNum(ele.amount);
  216. // }
  217. // return ele;
  218. // });
  219. // this.queryOrders = data;
  220. // //赋值费用信息
  221. // // this.feeDetailInfo=data.orderFeeResult;
  222. // }
  223. // });
  224. // this.$refs.detailsDialog.setBackupVisible(true);
  225. // },
  226. }
  227. };
  228. </script>
  229. <style scoped lang="scss">
  230. /deep/{
  231. .el-step__title,.el-step__icon-inner{
  232. color:var(--themeColor)
  233. }
  234. .el-step__line-inner{
  235. height:0;
  236. display:none
  237. }
  238. .is-flex{
  239. .el-step__icon{
  240. background: var(--themeColor)
  241. }
  242. .el-step__icon-inner{
  243. color: #fff;
  244. }
  245. }
  246. .el-step__icon.is-text{
  247. border:none;
  248. box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.1);
  249. }
  250. }
  251. </style>