index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="85px">
  4. <el-form-item label="公司名" prop="companyId">
  5. <el-select filterable v-model="queryParams.companyId" placeholder="请选择公司名" @change="companyChange" clearable size="small">
  6. <el-option
  7. v-for="item in companys"
  8. :key="item.companyId"
  9. :label="item.companyName"
  10. :value="item.companyId"
  11. />
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item>
  15. <treeselect style="width: 220px" :clearable="false" v-model="queryParams.deptId" :options="deptOptions" clearable :show-count="true" placeholder="请选择归属部门" />
  16. </el-form-item>
  17. <el-form-item label="订单号" prop="orderSn">
  18. <el-input
  19. v-model="queryParams.orderSn"
  20. placeholder="请输入订单号"
  21. clearable
  22. size="small"
  23. @keyup.enter.native="handleQuery"
  24. />
  25. </el-form-item>
  26. <el-form-item label="用户电话" prop="phone">
  27. <el-input
  28. v-model="queryParams.phone"
  29. placeholder="请输入用户电话"
  30. clearable
  31. size="small"
  32. @keyup.enter.native="handleQuery"
  33. />
  34. </el-form-item>
  35. <el-form-item label="加密号码" prop="phoneMk">
  36. <el-input
  37. v-model="queryParams.phoneMk"
  38. placeholder="请输入用户电话"
  39. clearable
  40. size="small"
  41. @keyup.enter.native="handleQuery"
  42. />
  43. </el-form-item>
  44. <el-form-item label="医生名称" prop="doctorName">
  45. <el-input
  46. v-model="queryParams.doctorName"
  47. placeholder="请输入医生名称"
  48. clearable
  49. size="small"
  50. @keyup.enter.native="handleQuery"
  51. />
  52. </el-form-item>
  53. <el-form-item label="员工" prop="companyUserName">
  54. <el-input
  55. v-model="queryParams.companyUserName"
  56. placeholder="员工"
  57. clearable
  58. size="small"
  59. @keyup.enter.native="handleQuery"
  60. />
  61. </el-form-item>
  62. <el-form-item label="收货人" prop="userName">
  63. <el-input
  64. v-model="queryParams.userName"
  65. placeholder="请输入收货人"
  66. clearable
  67. size="small"
  68. @keyup.enter.native="handleQuery"
  69. />
  70. </el-form-item>
  71. <el-form-item label="收货人电话" prop="userPhone">
  72. <el-input
  73. v-model="queryParams.userPhone"
  74. placeholder="请输入收货人电话"
  75. clearable
  76. size="small"
  77. @keyup.enter.native="handleQuery"
  78. />
  79. </el-form-item>
  80. <el-form-item label="套餐名称" prop="packageName">
  81. <el-input
  82. v-model="queryParams.packageName"
  83. placeholder="请输入套餐名称"
  84. clearable
  85. size="small"
  86. @keyup.enter.native="handleQuery"
  87. />
  88. </el-form-item>
  89. <el-form-item label="是否支付" prop="isPay">
  90. <el-select v-model="queryParams.isPay" placeholder="请选择是否支付" clearable size="small">
  91. <el-option
  92. v-for="dict in isPayOptions"
  93. :key="dict.dictValue"
  94. :label="dict.dictLabel"
  95. :value="dict.dictValue"
  96. />
  97. </el-select>
  98. </el-form-item>
  99. <el-form-item label="来源" prop="source">
  100. <el-select v-model="queryParams.source" placeholder="请选择是否支付" clearable size="small">
  101. <el-option
  102. v-for="dict in sourceOptions"
  103. :key="dict.dictValue"
  104. :label="dict.dictLabel"
  105. :value="dict.dictValue"
  106. />
  107. </el-select>
  108. </el-form-item>
  109. <el-form-item label="所属小程序" prop="coursePlaySourceConfigId">
  110. <el-select v-model="queryParams.coursePlaySourceConfigId" placeholder="请选择所属小程序" clearable size="small">
  111. <el-option
  112. v-for="dict in appMallOptions"
  113. :key="dict.id"
  114. :label="dict.name + '(' + dict.appid + ')'"
  115. :value="dict.id"
  116. />
  117. </el-select>
  118. </el-form-item>
  119. <el-form-item label="开始时间" prop="startTime">
  120. <el-date-picker v-model="startTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="startChange"></el-date-picker>
  121. </el-form-item>
  122. <el-form-item>
  123. <el-form-item label="结束时间" prop="endTime">
  124. <el-date-picker v-model="endTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="endChange"></el-date-picker>
  125. </el-form-item>
  126. <el-form-item label="下单时间" prop="createTime">
  127. <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="xdChange"></el-date-picker>
  128. </el-form-item>
  129. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  130. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  131. </el-form-item>
  132. </el-form>
  133. <el-row :gutter="10" class="mb8">
  134. <el-col :span="1.5">
  135. <el-button
  136. type="warning"
  137. plain
  138. icon="el-icon-download"
  139. size="mini"
  140. :loading="exportLoading"
  141. @click="handleExport"
  142. v-hasPermi="['his:packageOrder:export']"
  143. >导出</el-button>
  144. </el-col>
  145. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  146. </el-row>
  147. <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
  148. <el-tab-pane label="全部订单" name="10"></el-tab-pane>
  149. <el-tab-pane v-for="(item,index) in statusOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
  150. </el-tabs>
  151. <el-table height="500" v-loading="loading" border :data="packageOrderList" @selection-change="handleSelectionChange">
  152. <el-table-column type="selection" width="55" align="center" />
  153. <el-table-column label="订单号" align="center" prop="orderSn" width="120px"/>
  154. <el-table-column label="所属公司" align="center" prop="companyName" />
  155. <el-table-column label="员工" align="center" prop="companyUserName" />
  156. <el-table-column label="小程序名称" align="center" prop="miniProgramName" width="120px" />
  157. <el-table-column label="套餐名称" align="center" prop="packageName" />
  158. <el-table-column label="套餐别名" align="center" prop="packageSecondName" width="100px"/>
  159. <el-table-column label="天数" align="center" prop="days" />
  160. <el-table-column label="就诊人" align="center" prop="patientName" />
  161. <el-table-column label="应收金额" align="center" prop="payPrice" />
  162. <el-table-column label="实收金额" align="center" prop="payMoney" />
  163. <el-table-column label="支付类别" align="center" prop="payType">
  164. <template slot-scope="scope">
  165. <dict-tag :options="payTypeOptions" :value="scope.row.payType"/>
  166. </template>
  167. </el-table-column>
  168. <el-table-column label="订单状态" align="center" prop="status" >
  169. <template slot-scope="scope">
  170. <dict-tag :options="statusOptions" :value="scope.row.status"/>
  171. </template>
  172. </el-table-column>
  173. <el-table-column label="套餐类型" align="center" prop="packageSubType" >
  174. <template slot-scope="scope">
  175. <dict-tag :options="packageSubTypeOptions" :value="scope.row.packageSubType"/>
  176. </template>
  177. </el-table-column>
  178. <el-table-column label="订单来源" align="center" prop="source" >
  179. <template slot-scope="scope">
  180. <dict-tag :options="sourceOptions" :value="scope.row.source"/>
  181. </template>
  182. </el-table-column>
  183. <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
  184. <el-table-column label="支付时间" align="center" prop="payTime" width="180" />
  185. <el-table-column label="开始时间" align="center" prop="startTime" width="180" />
  186. <el-table-column label="结束时间" align="center" prop="finishTime" width="180" />
  187. <el-table-column label="物流状态" align="center" prop="deliveryStatus" >
  188. <template slot-scope="scope">
  189. <dict-tag :options="deliveryStatusOptions" :value="scope.row.deliveryStatus"/>
  190. </template>
  191. </el-table-column>
  192. <el-table-column label="结算状态" align="center" prop="deliveryPayStatus" >
  193. <template slot-scope="scope">
  194. <dict-tag :options="deliveryPayStatusOptions" :value="scope.row.deliveryPayStatus"/>
  195. </template>
  196. </el-table-column>
  197. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150px">
  198. <template slot-scope="scope">
  199. <el-button
  200. size="mini"
  201. type="text"
  202. @click="handledetails(scope.row)"
  203. >详情
  204. </el-button>
  205. </template>
  206. </el-table-column>
  207. </el-table>
  208. <pagination
  209. v-show="total>0"
  210. :total="total"
  211. :page.sync="queryParams.pageNum"
  212. :limit.sync="queryParams.pageSize"
  213. @pagination="getList"
  214. />
  215. <!-- 添加或修改套餐订单对话框 -->
  216. <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
  217. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  218. <el-form-item label="订单号" prop="orderSn">
  219. <el-input v-model="form.orderSn" placeholder="请输入订单号" />
  220. </el-form-item>
  221. <el-form-item label="用户ID" prop="userId">
  222. <el-input v-model="form.userId" placeholder="请输入用户ID" />
  223. </el-form-item>
  224. <el-form-item label="医生ID" prop="doctorId">
  225. <el-input v-model="form.doctorId" placeholder="请输入医生ID" />
  226. </el-form-item>
  227. <el-form-item label="套餐ID" prop="packageId">
  228. <el-input v-model="form.packageId" placeholder="请输入套餐ID" />
  229. </el-form-item>
  230. <el-form-item label="套餐名称" prop="packageName">
  231. <el-input v-model="form.packageName" placeholder="请输入套餐名称" />
  232. </el-form-item>
  233. <el-form-item label="支付金额" prop="payMoney">
  234. <el-input v-model="form.payMoney" placeholder="请输入支付金额" />
  235. </el-form-item>
  236. <el-form-item label="是否支付" prop="isPay">
  237. <el-select v-model="form.isPay" placeholder="请选择是否支付">
  238. <el-option
  239. v-for="dict in isPayOptions"
  240. :key="dict.dictValue"
  241. :label="dict.dictLabel"
  242. :value="parseInt(dict.dictValue)"
  243. ></el-option>
  244. </el-select>
  245. </el-form-item>
  246. <el-form-item label="天数" prop="days">
  247. <el-input v-model="form.days" placeholder="请输入天数" />
  248. </el-form-item>
  249. <el-form-item label="状态">
  250. <el-radio-group v-model="form.status">
  251. <el-radio
  252. v-for="dict in statusOptions"
  253. :key="dict.dictValue"
  254. :label="parseInt(dict.dictValue)"
  255. >{{dict.dictLabel}}</el-radio>
  256. </el-radio-group>
  257. </el-form-item>
  258. <el-form-item label="开始时间" prop="startTime">
  259. <el-date-picker clearable size="small"
  260. v-model="form.startTime"
  261. type="date"
  262. value-format="yyyy-MM-dd"
  263. placeholder="选择开始时间">
  264. </el-date-picker>
  265. </el-form-item>
  266. <el-form-item label="结束时间" prop="finishTime">
  267. <el-date-picker clearable size="small"
  268. v-model="form.finishTime"
  269. type="date"
  270. value-format="yyyy-MM-dd"
  271. placeholder="选择结束时间">
  272. </el-date-picker>
  273. </el-form-item>
  274. </el-form>
  275. <div slot="footer" class="dialog-footer">
  276. <el-button type="primary" @click="submitForm">确 定</el-button>
  277. <el-button @click="cancel">取 消</el-button>
  278. </div>
  279. </el-dialog>
  280. <el-drawer
  281. :with-header="false"
  282. size="75%"
  283. :title="show.title" :visible.sync="show.open">
  284. <packageOrderDetails ref="Details" />
  285. </el-drawer>
  286. </div>
  287. </template>
  288. <script>
  289. import { listPackageOrder, getPackageOrder, delPackageOrder, addPackageOrder, updatePackageOrder, exportPackageOrder } from "@/api/his/packageOrder";
  290. import { getCompanyList } from "@/api/company/company";
  291. import packageOrderDetails from '../../components/his/packageOrderDetails.vue';
  292. import { treeselect } from "@/api/company/companyDept";
  293. import Treeselect from "@riophae/vue-treeselect";
  294. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  295. import { getTask } from "@/api/common";
  296. import {list as getAppMallOptions} from '@/api/course/coursePlaySourceConfig';
  297. export default {
  298. watch: {
  299. // 监听deptId
  300. 'deptId': 'currDeptChange'
  301. },
  302. name: "PackageOrder",
  303. components: {packageOrderDetails ,Treeselect },
  304. data() {
  305. return {
  306. companys:[],
  307. deptOptions:[],
  308. companyId:undefined,
  309. deptId:undefined,
  310. show:{
  311. open:false,
  312. },
  313. sourceOptions:[],
  314. actName:"2",
  315. // 遮罩层
  316. loading: true,
  317. startTime:null,
  318. // 导出遮罩层
  319. exportLoading: false,
  320. // 导出任务检查计数器
  321. exportCheckCount: 0,
  322. // 选中数组
  323. ids: [],
  324. createTime:null,
  325. // 非单个禁用
  326. single: true,
  327. // 非多个禁用
  328. multiple: true,
  329. // 显示搜索条件
  330. showSearch: true,
  331. endTime:null,
  332. // 总条数
  333. total: 0,
  334. // 套餐订单表格数据
  335. packageOrderList: [],
  336. // 弹出层标题
  337. title: "",
  338. // 是否显示弹出层
  339. open: false,
  340. // 是否支付字典
  341. isPayOptions: [],
  342. // 状态字典
  343. statusOptions: [],
  344. refundStatusOptions: [],
  345. packageSubTypeOptions: [],
  346. payTypeOptions:[],
  347. deliveryPayStatusOptions:[],
  348. deliveryStatusOptions:[],
  349. appMallOptions:[],
  350. // 查询参数
  351. queryParams: {
  352. pageNum: 1,
  353. pageSize: 10,
  354. orderSn: null,
  355. userId: null,
  356. doctorId: null,
  357. doctorName: null,
  358. phone: null,
  359. phoneMk: null,
  360. packageId: null,
  361. packageName: null,
  362. payMoney: null,
  363. isPay: null,
  364. days: null,
  365. status: 2,
  366. startTime: null,
  367. finishTime: null,
  368. sTime:null,
  369. eTime:null,
  370. stTime:null,
  371. endTime:null,
  372. endStartTime:null,
  373. endEndTime:null,
  374. companyUserName:null,
  375. companyName:null,
  376. deptId:null,
  377. source:null,
  378. coursePlaySourceConfigId:null,
  379. },
  380. // 表单参数
  381. form: {},
  382. // 表单校验
  383. rules: {
  384. }
  385. };
  386. },
  387. created() {
  388. getCompanyList().then(response => {
  389. this.companys = response.data;
  390. if(this.companys!=null&&this.companys.length>0){
  391. this.companyId=this.companys[0].companyId;
  392. this.getTreeselect();
  393. }
  394. this.companys.push({companyId:"-1",companyName:"无"})
  395. });
  396. this.getList();
  397. this.getDicts("sys_company_or").then(response => {
  398. this.isPayOptions = response.data;
  399. });
  400. this.getDicts("sys_package_order_status").then(response => {
  401. this.statusOptions = response.data;
  402. });
  403. this.getDicts("sys_refund_status").then(response => {
  404. this.refundStatusOptions = response.data;
  405. });
  406. this.getDicts("sys_order_source").then(response => {
  407. this.sourceOptions = response.data;
  408. });
  409. this.getDicts("sys_package_pay_type").then(response => {
  410. this.payTypeOptions = response.data;
  411. });
  412. this.getDicts("sys_store_delivery_pay_status").then(response => {
  413. this.deliveryPayStatusOptions = response.data;
  414. });
  415. this.getDicts("sys_store_order_delivery_status").then(response => {
  416. this.deliveryStatusOptions = response.data;
  417. });
  418. this.getDicts("sys_package_sub_type").then(response => {
  419. this.packageSubTypeOptions = response.data;
  420. });
  421. // 获取小程序选项列表
  422. this.getAppMallOptions();
  423. },
  424. methods: {
  425. /** 查询套餐订单列表 */
  426. getList() {
  427. this.loading = true;
  428. listPackageOrder(this.queryParams).then(response => {
  429. this.packageOrderList = response.rows;
  430. this.total = response.total;
  431. this.loading = false;
  432. });
  433. },
  434. handledetails(row){
  435. this.show.open=true;
  436. setTimeout(() => {
  437. this.$refs.Details.getDetails(row.orderId);
  438. }, 1);
  439. },
  440. startChange(){
  441. if(this.startTime!=null){
  442. this.queryParams.sTime=this.startTime[0];
  443. this.queryParams.eTime=this.startTime[1];
  444. }else{
  445. this.queryParams.sTime=null;
  446. this.queryParams.eTime=null;
  447. }
  448. },
  449. // 取消按钮
  450. cancel() {
  451. this.open = false;
  452. this.reset();
  453. },
  454. // 表单重置
  455. reset() {
  456. this.form = {
  457. orderId: null,
  458. orderSn: null,
  459. userId: null,
  460. doctorId: null,
  461. packageId: null,
  462. packageName: null,
  463. payMoney: null,
  464. isPay: null,
  465. days: null,
  466. status: 0,
  467. startTime: null,
  468. finishTime: null,
  469. createTime: null
  470. };
  471. this.resetForm("form");
  472. },
  473. /** 搜索按钮操作 */
  474. handleQuery() {
  475. this.queryParams.pageNum = 1;
  476. this.getList();
  477. },
  478. /** 重置按钮操作 */
  479. resetQuery() {
  480. this.resetForm("queryForm");
  481. this.startTime=null;
  482. this.queryParams.sTime=null;
  483. this.queryParams.eTime=null;
  484. this.createTime=null;
  485. this.queryParams.stTime=null;
  486. this.queryParams.endTime=null;
  487. this.endTime=null;
  488. this.queryParams.endStartTime=null;
  489. this.queryParams.endEndTime=null;
  490. this.handleQuery();
  491. },
  492. // 多选框选中数据
  493. handleSelectionChange(selection) {
  494. this.ids = selection.map(item => item.orderId)
  495. this.single = selection.length!==1
  496. this.multiple = !selection.length
  497. },
  498. xdChange(){
  499. if(this.createTime!=null){
  500. this.queryParams.stTime=this.createTime[0];
  501. this.queryParams.endTime=this.createTime[1];
  502. }else{
  503. this.queryParams.stTime=null;
  504. this.queryParams.endTime=null;
  505. }
  506. },
  507. endChange(){
  508. if(this.endTime!=null){
  509. this.queryParams.endStartTime=this.endTime[0];
  510. this.queryParams.endEndTime=this.endTime[1];
  511. }else{
  512. this.queryParams.endStartTime=null;
  513. this.queryParams.endEndTime=null;
  514. }
  515. },
  516. /** 新增按钮操作 */
  517. handleAdd() {
  518. this.reset();
  519. this.open = true;
  520. this.title = "添加套餐订单";
  521. },
  522. handleClickX(tab, event) {
  523. if(tab.name=="10"){
  524. this.queryParams.status=null;
  525. }else{
  526. this.queryParams.status=tab.name;
  527. }
  528. this.handleQuery();
  529. },
  530. /** 修改按钮操作 */
  531. handleUpdate(row) {
  532. this.reset();
  533. const orderId = row.orderId || this.ids
  534. getPackageOrder(orderId).then(response => {
  535. this.form = response.data;
  536. this.open = true;
  537. this.title = "修改套餐订单";
  538. });
  539. },
  540. /** 提交按钮 */
  541. submitForm() {
  542. this.$refs["form"].validate(valid => {
  543. if (valid) {
  544. if (this.form.orderId != null) {
  545. updatePackageOrder(this.form).then(response => {
  546. this.msgSuccess("修改成功");
  547. this.open = false;
  548. this.getList();
  549. });
  550. } else {
  551. addPackageOrder(this.form).then(response => {
  552. this.msgSuccess("新增成功");
  553. this.open = false;
  554. this.getList();
  555. });
  556. }
  557. }
  558. });
  559. },
  560. /** 删除按钮操作 */
  561. handleDelete(row) {
  562. const orderIds = row.orderId || this.ids;
  563. this.$confirm('是否确认删除套餐订单编号为"' + orderIds + '"的数据项?', "警告", {
  564. confirmButtonText: "确定",
  565. cancelButtonText: "取消",
  566. type: "warning"
  567. }).then(function() {
  568. return delPackageOrder(orderIds);
  569. }).then(() => {
  570. this.getList();
  571. this.msgSuccess("删除成功");
  572. }).catch(() => {});
  573. },
  574. /** 导出按钮操作 */
  575. handleExport() {
  576. var that=this;
  577. const queryParams = this.queryParams;
  578. this.$confirm('是否确认导出所有套餐订单数据项?', "警告", {
  579. confirmButtonText: "确定",
  580. cancelButtonText: "取消",
  581. type: "warning"
  582. }).then(() => {
  583. this.exportLoading = true;
  584. return exportPackageOrder(queryParams);
  585. }).then(response => {
  586. if(response.code==200){
  587. that.msgSuccess(response.msg);
  588. that.taskId=response.data;
  589. that.exportCheckCount = 0; // 添加检查计数器
  590. that.time=setInterval(function(){
  591. that.exportCheckCount++;
  592. //查任务状态
  593. getTask(that.taskId).then(res => {
  594. // 任务完成
  595. if(res.data.status==1){
  596. that.exportLoading = false;
  597. clearInterval(that.time);
  598. that.time=null;
  599. that.download(res.data.fileUrl);
  600. }
  601. // 任务失败
  602. else if(res.data.status==-1 || res.data.status==2){
  603. that.exportLoading = false;
  604. clearInterval(that.time);
  605. that.time=null;
  606. that.msgError('导出任务失败,请重试');
  607. }
  608. // 超时处理(检查超过30次,即5分钟)
  609. else if(that.exportCheckCount > 30){
  610. that.exportLoading = false;
  611. clearInterval(that.time);
  612. that.time=null;
  613. that.msgError('导出任务超时,请稍后重试');
  614. }
  615. }).catch(err => {
  616. // API调用失败
  617. that.exportCheckCount++;
  618. if(that.exportCheckCount > 30){
  619. that.exportLoading = false;
  620. clearInterval(that.time);
  621. that.time=null;
  622. that.msgError('导出任务查询失败,请重试');
  623. }
  624. });
  625. },10000); // 10秒查询一次
  626. }
  627. else{
  628. that.msgError(response.msg);
  629. that.exportLoading = false;
  630. }
  631. }).catch(() => {
  632. that.exportLoading = false;
  633. });
  634. },
  635. /** 查询部门下拉树结构 */
  636. getTreeselect() {
  637. var that=this;
  638. var param={companyId:this.companyId}
  639. treeselect(param).then((response) => {
  640. this.deptOptions = response.data;
  641. console.log(this.deptOptions)
  642. if(response.data!=null&&response.data.length>0){
  643. //this.queryParams.deptId=response.data[0].id;
  644. }
  645. });
  646. },
  647. companyChange(val){
  648. this.companyId=val;
  649. this.getTreeselect();
  650. },
  651. currDeptChange(val){
  652. this.queryParams.deptId=val;
  653. this.getList();
  654. },
  655. // 获取小程序选项列表
  656. getAppMallOptions() {
  657. getAppMallOptions({pageNum:1,pageSize:100,isMall:1}).then(response => {
  658. this.appMallOptions = response.rows;
  659. })
  660. },
  661. }
  662. };
  663. </script>