policy_list.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896
  1. <template>
  2. <div class="app-container">
  3. <div
  4. v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn"
  5. >
  6. <!-- 筛选条件 -->
  7. <div class="screen-container">
  8. <el-form
  9. ref="screenForm"
  10. :model="screenForm"
  11. label-width="100px"
  12. size="mini"
  13. label-position="left"
  14. >
  15. <el-row :gutter="20">
  16. <el-col :xs="24" :sm="24" :lg="24">
  17. <el-form-item prop="status" label-width="0">
  18. <el-radio-group
  19. v-model="screenForm.status"
  20. size="mini"
  21. @change="getList()"
  22. >
  23. <el-radio-button label="">全部</el-radio-button>
  24. <el-radio-button
  25. v-for="(item, index) in statusList"
  26. :key="index"
  27. :label="item.value"
  28. >{{ item.label }}</el-radio-button>
  29. </el-radio-group>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :xs="24" :sm="12" :lg="6">
  33. <el-form-item label="订单号" prop="orderNum">
  34. <el-input
  35. v-model="screenForm.orderNum"
  36. placeholder="请输入订单号"
  37. />
  38. </el-form-item>
  39. </el-col>
  40. <el-col :xs="24" :sm="12" :lg="6">
  41. <el-form-item label="销售政策编号" prop="policyCode">
  42. <el-input
  43. v-model="screenForm.policyCode"
  44. placeholder="请输入销售政策编号"
  45. />
  46. </el-form-item>
  47. </el-col>
  48. <el-col :xs="24" :sm="12" :lg="6">
  49. <el-form-item label="销售政策说明" prop="policyRemark">
  50. <el-input
  51. v-model="screenForm.policyRemark"
  52. placeholder="请输入销售政策说明"
  53. />
  54. </el-form-item>
  55. </el-col>
  56. <el-col :xs="24" :sm="12" :lg="6">
  57. <el-form-item label="经销商" prop="jxsName">
  58. <el-input
  59. v-model="screenForm.jxsName"
  60. placeholder="请输入经销商"
  61. />
  62. </el-form-item>
  63. </el-col>
  64. <el-col :xs="24" :sm="12" :lg="6">
  65. <el-form-item label="订单日期" prop="date">
  66. <!-- <el-date-picker
  67. v-model="screenForm.date"
  68. class="dateStyle"
  69. type="datetime"
  70. value-format="yyyy-MM-dd HH:mm:ss"
  71. placeholder="选择订单日期"
  72. >
  73. </el-date-picker> -->
  74. <el-date-picker
  75. v-model="screenForm.date"
  76. type="datetimerange"
  77. range-separator="至"
  78. style="width: 100%"
  79. value-format="yyyy-MM-dd HH:mm:ss"
  80. start-placeholder="开始日期"
  81. end-placeholder="结束日期"
  82. />
  83. </el-form-item>
  84. </el-col>
  85. <el-col :xs="24" :sm="12" :lg="6">
  86. <el-form-item label="制表人" prop="zbMan">
  87. <el-input
  88. v-model="screenForm.zbMan"
  89. placeholder="请输入制表人"
  90. />
  91. </el-form-item>
  92. </el-col>
  93. <el-col :xs="24" :sm="12" :lg="6">
  94. <el-form-item label="审核人" prop="shMan">
  95. <el-input
  96. v-model="screenForm.shMan"
  97. placeholder="请输入审核人"
  98. />
  99. </el-form-item>
  100. </el-col>
  101. <el-col :xs="24" :sm="12" :lg="6">
  102. <el-form-item label="表头业务员" prop="k3ServiceId">
  103. <el-select v-model="screenForm.k3ServiceId" placeholder="选择表头业务员" size="small" clearable filterable style="width: 100%">
  104. <el-option
  105. v-for="item in salesmanList"
  106. :key="item.adminUserId"
  107. :label="item.nickName"
  108. :value="item.adminUserId">
  109. </el-option>
  110. </el-select>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :xs="24" :sm="12" :lg="6">
  114. <el-form-item label="表体业务员" prop="serviceId">
  115. <el-select v-model="screenForm.serviceId" placeholder="选择表体业务员" size="small" clearable filterable style="width: 100%">
  116. <el-option
  117. v-for="item in salesmanList"
  118. :key="item.adminUserId"
  119. :label="item.nickName"
  120. :value="item.adminUserId">
  121. </el-option>
  122. </el-select>
  123. </el-form-item>
  124. </el-col>
  125. <el-col :xs="24" :sm="12" :lg="6">
  126. <el-form-item label="是否直调" prop="isDirectTransfer">
  127. <el-select v-model="screenForm.isDirectTransfer" placeholder="选择是否直" size="small" style="width: 100%">
  128. <el-option :value="null" label="默认"></el-option>
  129. <el-option
  130. v-for="item in transfer"
  131. :key="item.value"
  132. :label="item.label"
  133. :value="item.value">
  134. </el-option>
  135. </el-select>
  136. </el-form-item>
  137. </el-col>
  138. <el-col :xs="24" :sm="12" :lg="6">
  139. <el-form-item label="规格型号
  140. " prop="specification">
  141. <el-input
  142. v-model="screenForm.specification"
  143. placeholder="请输入规格型号
  144. "
  145. />
  146. </el-form-item>
  147. </el-col>
  148. <el-col :xs="24" :sm="12" :lg="12" class="tr">
  149. <el-form-item label="">
  150. <el-button
  151. size="mini"
  152. @click="resetScreenForm"
  153. >清空</el-button>
  154. <el-button
  155. size="mini"
  156. type="primary"
  157. @click="submitScreenForm"
  158. >搜索</el-button>
  159. </el-form-item>
  160. </el-col>
  161. </el-row>
  162. </el-form>
  163. </div>
  164. <div class="mymain-container">
  165. <div class="btn-group clearfix">
  166. <div class="fl">
  167. <el-button
  168. v-if="$checkBtnRole('add', $route.meta.roles)"
  169. size="mini"
  170. type="primary"
  171. icon="el-icon-plus"
  172. @click="toForm()"
  173. >新增</el-button>
  174. <el-button size="mini" type="warning" icon="el-icon-finished" @click="batchExamine" v-if="$checkBtnRole('examine', $route.meta.roles)">批量审批</el-button>
  175. </div>
  176. <div class="fr">
  177. <ExportButton :ex-url="'retail/export'" :ex-params="exParams" />
  178. </div>
  179. </div>
  180. <div class="table">
  181. <el-table
  182. v-loading="listLoading"
  183. :data="dataList"
  184. element-loading-text="Loading"
  185. border
  186. fit
  187. highlight-current-row
  188. stripe
  189. show-summary
  190. :summary-method="$getSummaries"
  191. @select-all="handleSelectionAllChange"
  192. @selection-change="handleSelectionAllChange"
  193. >
  194. <!-- <el-table-column
  195. align="center"
  196. label="提货进度"
  197. prop="thjd"
  198. min-width="180"
  199. show-overflow-tooltip
  200. >
  201. <template slot-scope="scope">
  202. <el-progress :percentage="scope.row.thjd || 0"></el-progress>
  203. </template>
  204. </el-table-column> -->
  205. <el-table-column align="left" type="selection" width="55" />
  206. <el-table-column
  207. align="left"
  208. label="订单号"
  209. prop="id"
  210. min-width="180"
  211. show-overflow-tooltip
  212. />
  213. <el-table-column
  214. align="left"
  215. label="订单日期"
  216. prop="theTime"
  217. min-width="150"
  218. show-overflow-tooltip
  219. >
  220. <template slot-scope="scope">
  221. <div>
  222. <span>{{ scope.row.theTime | dateToDayFilter }}</span>
  223. <el-button
  224. v-if="$checkBtnRole('date', $route.meta.roles)"
  225. type="text"
  226. icon="el-icon-edit"
  227. style="padding: 0; margin-left: 6px"
  228. @click="editDate(scope.row)"
  229. />
  230. </div>
  231. </template>
  232. </el-table-column>
  233. <el-table-column
  234. align="left"
  235. label="销售类型"
  236. prop="saleTypeName"
  237. min-width="200"
  238. show-overflow-tooltip
  239. />
  240. <el-table-column
  241. align="left"
  242. label="销售政策编号"
  243. prop="policyCode"
  244. min-width="200"
  245. show-overflow-tooltip
  246. />
  247. <el-table-column
  248. align="left"
  249. label="销售政策说明"
  250. prop="policyTitle"
  251. min-width="160"
  252. show-overflow-tooltip
  253. />
  254. <el-table-column
  255. align="left"
  256. label="经销商"
  257. prop="customerName"
  258. min-width="200"
  259. show-overflow-tooltip
  260. >
  261. <template slot-scope="scope">
  262. <CopyButton :copyText="scope.row.customerName" />
  263. <span>{{scope.row.customerName}}</span>
  264. </template>
  265. </el-table-column>
  266. <el-table-column
  267. align="left"
  268. label="物料编码"
  269. prop="materialCode"
  270. min-width="160"
  271. show-overflow-tooltip
  272. >
  273. <template slot-scope="scope">
  274. <CopyButton :copyText="scope.row.materialCode" />
  275. <span>{{scope.row.materialCode}}</span>
  276. </template>
  277. </el-table-column>
  278. <el-table-column
  279. align="left"
  280. label="产品名称"
  281. prop="materialName"
  282. min-width="160"
  283. show-overflow-tooltip
  284. >
  285. <template slot-scope="scope">
  286. <CopyButton :copyText="scope.row.materialName" />
  287. <span>{{scope.row.materialName}}</span>
  288. </template>
  289. </el-table-column>
  290. <el-table-column
  291. align="left"
  292. label="规格型号"
  293. prop="specification"
  294. min-width="300"
  295. show-overflow-tooltip
  296. >
  297. <template slot-scope="scope">
  298. <CopyButton :copyText="scope.row.specification" />
  299. <span>{{scope.row.specification}}</span>
  300. </template>
  301. </el-table-column>
  302. <el-table-column
  303. align="left"
  304. label="计量单位"
  305. prop="unit"
  306. min-width="100"
  307. show-overflow-tooltip
  308. />
  309. <el-table-column
  310. align="left"
  311. label="是否直调"
  312. prop="isDirectTransfer"
  313. min-width="100"
  314. show-overflow-tooltip
  315. >
  316. <template slot-scope="scope">
  317. {{ scope.row.isDirectTransfer ? "是" : "否" }}
  318. </template>
  319. </el-table-column>
  320. <el-table-column
  321. align="right"
  322. label="总数量"
  323. prop="qty"
  324. min-width="100"
  325. show-overflow-tooltip
  326. />
  327. <el-table-column
  328. align="right"
  329. label="单价"
  330. prop="price"
  331. min-width="100"
  332. show-overflow-tooltip
  333. >
  334. <template slot-scope="scope">
  335. {{ scope.row.price | numToFixed }}
  336. </template>
  337. </el-table-column>
  338. <el-table-column
  339. align="right"
  340. label="实付金额"
  341. sortable
  342. prop="payAmount"
  343. min-width="100"
  344. show-overflow-tooltip
  345. >
  346. <template slot-scope="scope">
  347. {{ scope.row.payAmount | numToFixed }}
  348. </template>
  349. </el-table-column>
  350. <el-table-column
  351. align="left"
  352. label="返利类型"
  353. prop="customerWalletName2"
  354. min-width="100"
  355. show-overflow-tooltip
  356. >
  357. <template slot-scope="scope">
  358. <el-tag
  359. v-if="scope.row.customerWalletName2"
  360. type="success"
  361. size="small"
  362. >
  363. {{ scope.row.customerWalletName2 }}
  364. </el-tag>
  365. </template>
  366. </el-table-column>
  367. <el-table-column
  368. align="right"
  369. label="返利金额"
  370. sortable
  371. prop="payRebateAmount"
  372. min-width="100"
  373. show-overflow-tooltip
  374. >
  375. <template slot-scope="scope">
  376. <div>{{ scope.row.payRebateAmount | numToFixed }}</div>
  377. </template>
  378. </el-table-column>
  379. <el-table-column
  380. align="right"
  381. label="格力折扣"
  382. sortable
  383. prop="totalDiscAmount"
  384. min-width="100"
  385. show-overflow-tooltip
  386. >
  387. <template slot-scope="scope">
  388. {{ scope.row.totalDiscAmount | numToFixed }}
  389. </template></el-table-column>
  390. <el-table-column
  391. align="right"
  392. label="直调数量"
  393. prop="directTransferQty"
  394. min-width="100"
  395. show-overflow-tooltip
  396. />
  397. <el-table-column
  398. align="right"
  399. label="出库数量"
  400. prop="hasSendQty"
  401. min-width="100"
  402. show-overflow-tooltip
  403. />
  404. <el-table-column align="left" label="备注" prop="itemRemark" min-width="160" show-overflow-tooltip></el-table-column>
  405. <el-table-column align="left" label="表头备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  406. <el-table-column
  407. align="left"
  408. label="业务员"
  409. prop="k3ServiceName"
  410. min-width="100"
  411. show-overflow-tooltip
  412. />
  413. <el-table-column
  414. align="left"
  415. label="表体业务员"
  416. prop="serviceName"
  417. min-width="100"
  418. show-overflow-tooltip
  419. />
  420. <el-table-column
  421. align="left"
  422. label="制表人"
  423. prop="createName"
  424. min-width="100"
  425. show-overflow-tooltip
  426. />
  427. <el-table-column
  428. align="left"
  429. label="制表日期"
  430. prop="createTime"
  431. min-width="200"
  432. show-overflow-tooltip
  433. />
  434. <el-table-column
  435. align="left"
  436. label="审核人"
  437. prop="examineName"
  438. min-width="200"
  439. show-overflow-tooltip
  440. />
  441. <el-table-column
  442. align="left"
  443. label="审核日期"
  444. prop="examineTime"
  445. min-width="160"
  446. show-overflow-tooltip
  447. />
  448. <el-table-column
  449. align="left"
  450. label="审核状态"
  451. prop="examineStatus"
  452. min-width="100"
  453. show-overflow-tooltip
  454. >
  455. <template slot-scope="scope">
  456. {{ scope.row.examineStatus | statusFilter }}
  457. </template>
  458. </el-table-column>
  459. <el-table-column
  460. align="center"
  461. label="操作"
  462. width="220"
  463. fixed="right"
  464. >
  465. <template slot-scope="scope">
  466. <el-popconfirm
  467. v-if="scope.row.examineStatus === 'SAVE'"
  468. style="margin-right: 10px"
  469. title="确定提审?"
  470. @onConfirm="handleSubmit(scope.row.id)"
  471. >
  472. <el-button slot="reference" type="text">提审</el-button>
  473. </el-popconfirm>
  474. <el-button
  475. v-if="
  476. scope.row.examineStatus == 'WAIT' &&
  477. $checkBtnRole('examine', $route.meta.roles)
  478. "
  479. type="text"
  480. @click="toExamine(scope.row)"
  481. >审核</el-button>
  482. <el-popconfirm v-if="$checkBtnRole('delete', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.id)">
  483. <el-button slot="reference" type="text">删除</el-button>
  484. </el-popconfirm>
  485. <el-button
  486. v-if="
  487. scope.row.examineStatus === 'SAVE' &&
  488. $checkBtnRole('edit', $route.meta.roles)
  489. "
  490. type="text"
  491. @click="toForm(scope.row)"
  492. >编辑</el-button>
  493. <el-popconfirm v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" style="margin-left: 10px;" title="确定弃审吗?" @onConfirm="handleAbandon(scope.row.id)">
  494. <el-button slot="reference" type="text">弃审</el-button>
  495. </el-popconfirm>
  496. <el-popconfirm
  497. v-if="
  498. scope.row.examineStatus == 'WAIT' &&
  499. $checkBtnRole('apply', $route.meta.roles)
  500. "
  501. style="margin-left: 10px"
  502. title="确定撤回?"
  503. @onConfirm="handleCancel(scope.row.id)"
  504. >
  505. <el-button slot="reference" type="text">撤回</el-button>
  506. </el-popconfirm>
  507. <el-button
  508. style="margin-left: 10px"
  509. type="text"
  510. @click="toDetail(scope.row)"
  511. >详情</el-button>
  512. <el-button
  513. v-if="
  514. scope.row.examineStatus === 'OK' &&
  515. $checkBtnRole('examine', $route.meta.roles)
  516. "
  517. type="text"
  518. @click="toReturn(scope.row)"
  519. >退订</el-button>
  520. <el-popconfirm
  521. v-if="
  522. scope.row.examineStatus === 'SAVE' &&
  523. $checkBtnRole('examine', $route.meta.roles)
  524. "
  525. style="margin-left: 10px"
  526. title="确定关闭吗?"
  527. @onConfirm="handleClose(scope.row.id)"
  528. >
  529. <el-button slot="reference" type="text">关闭</el-button>
  530. </el-popconfirm>
  531. </template>
  532. </el-table-column>
  533. </el-table>
  534. </div>
  535. </div>
  536. <div class="pagination clearfix">
  537. <div class="fr">
  538. <el-pagination
  539. :current-page="currentPage"
  540. :page-sizes="[10, 20, 30, 50,500]"
  541. :page-size="10"
  542. layout="total, sizes, prev, pager, next, jumper"
  543. :total="listTotal"
  544. @size-change="handleSizeChange"
  545. @current-change="handleCurrentChange"
  546. />
  547. </div>
  548. </div>
  549. </div>
  550. <RetailDetail
  551. v-if="isShowDetail"
  552. :list-item="queryItem"
  553. @backListFormDetail="backList"
  554. />
  555. <RetailForm
  556. v-if="isShowForm"
  557. :list-item="queryItem"
  558. @backListFormDetail="backList"
  559. />
  560. <RetailExamine
  561. v-if="isShowExamine"
  562. :list-item="queryItem"
  563. @backListFormDetail="backList"
  564. />
  565. <RetailReturn
  566. v-if="isShowReturn"
  567. :list-item="queryItem"
  568. @backListFormDetail="backList"
  569. />
  570. <EditDateDialog
  571. :is-show.sync="isShowEditDateDialog"
  572. :date-form.sync="dateForm"
  573. />
  574. <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
  575. </div>
  576. </template>
  577. <script>
  578. import {
  579. abandonData,
  580. closeData,
  581. deleteList,
  582. editData,
  583. examineData,
  584. getList,
  585. submitCancel,
  586. submitData
  587. } from '@/api/supply/policy'
  588. import RetailDetail from './components/retail_detail'
  589. import RetailForm from './components/retail_form'
  590. import RetailExamine from './components/retail_examine'
  591. import RetailReturn from './components/retail_return'
  592. import EditDateDialog from '@/components/Common/edit-date-dialog'
  593. import ExamineDialog from '@/components/Common/examine-dialog'
  594. import { getSalesmanList } from '@/api/common'
  595. let that
  596. export default {
  597. components: {
  598. RetailDetail,
  599. RetailForm,
  600. RetailExamine,
  601. RetailReturn,
  602. EditDateDialog,
  603. ExamineDialog
  604. },
  605. filters: {
  606. statusFilter(val) {
  607. const obj = that.statusList.find((o) => o.value == val)
  608. return obj ? obj.label : ''
  609. }
  610. },
  611. data() {
  612. return {
  613. currentPage: 1, // 当前页码
  614. pageSize: 10, // 每页数量
  615. listTotal: 0, // 列表总数
  616. dataList: null, // 列表数据
  617. listLoading: false, // 列表加载loading
  618. screenForm: {
  619. // 筛选表单数据
  620. orderNum: '',
  621. policyCode: '',
  622. policyRemark: '',
  623. jxsName: '',
  624. date: '',
  625. zbMan: '',
  626. shMan: '',
  627. status: '',
  628. salesMan:'',
  629. isDirectTransfer:null,
  630. specification:'',
  631. k3ServiceId:'',
  632. serviceId:''
  633. },
  634. transfer:[
  635. {label:'是',value:true},
  636. {label:'否',value:false}
  637. ],
  638. statusList: [
  639. { label: '已保存', value: 'SAVE' },
  640. { label: '待审核', value: 'WAIT' },
  641. { label: '审核通过', value: 'OK' },
  642. // { label: '审核驳回', value: 'FAIL' },
  643. ],
  644. queryItem: {},
  645. isShowDetail: false,
  646. isShowForm: false,
  647. isShowExamine: false,
  648. isShowReturn: false,
  649. isShowEditDateDialog: false,
  650. dateForm: {
  651. date: ''
  652. },
  653. salesmanList:[],
  654. selectData:[],
  655. isShowExamineDialog: false,
  656. examineForm: {
  657. status: 'OK',
  658. remark: '',
  659. },
  660. }
  661. },
  662. computed: {
  663. exParams() {
  664. return {
  665. examineStatus: this.screenForm.status,
  666. id: this.screenForm.orderNum,
  667. policyCode: this.screenForm.policyCode,
  668. policyRemark: this.screenForm.policyRemark,
  669. customer: this.screenForm.jxsName,
  670. startTime: this.screenForm.date ? this.screenForm.date[0] : '',
  671. endTime: this.screenForm.date ? this.screenForm.date[1] : '',
  672. createBy: this.screenForm.zbMan,
  673. examineBy: this.screenForm.shMan,
  674. type: 2 // 1:普通零售单,2:政策零售单
  675. }
  676. }
  677. },
  678. beforeCreate() {
  679. that = this
  680. },
  681. created() {
  682. this.getList()
  683. this.getSalesmanList();
  684. },
  685. methods: {
  686. // 获取业务员列表
  687. getSalesmanList() {
  688. getSalesmanList({
  689. pageNum: 1,
  690. pageSize: -1,
  691. isCustomer: 0,
  692. status: true,
  693. }).then(res => {
  694. this.salesmanList = res.data.records;
  695. })
  696. },
  697. handleSelectionAllChange(e) {
  698. this.selectData = e
  699. },
  700. // 打开 批量审批
  701. batchExamine() {
  702. if (this.selectData.length) {
  703. this.isShowExamineDialog = true;
  704. return
  705. }
  706. this.$errorMsg('请选择审核项')
  707. },
  708. // 提交 批量审批
  709. submitExamineForm() {
  710. let ids = this.selectData.map(item => {
  711. return item.id;
  712. });
  713. ids = [...new Set(ids)]
  714. examineData({
  715. id: ids.join(','),
  716. examineStatus: this.examineForm.status,
  717. examineRemark: this.examineForm.remark,
  718. serviceId:''
  719. })
  720. .then((res) => {
  721. this.isShowExamineDialog = false;
  722. this.$successMsg("修改成功");
  723. this.getList();
  724. })
  725. },
  726. // 查询按钮权限
  727. checkBtnRole(value) {
  728. // let btnRole = this.$route.meta.roles;
  729. // if(!btnRole) {return true}
  730. // let index = btnRole.indexOf(value);
  731. // return index >= 0;
  732. return true
  733. },
  734. handleDelete(id) {
  735. deleteList({ id }).then(res => {
  736. this.$successMsg('删除成功')
  737. })
  738. },
  739. // 查询列表
  740. getList() {
  741. this.listLoading = true
  742. const params = {
  743. pageNum: this.currentPage,
  744. pageSize: this.pageSize,
  745. examineStatus: this.screenForm.status,
  746. id: this.screenForm.orderNum,
  747. policyCode: this.screenForm.policyCode,
  748. policyRemark: this.screenForm.policyRemark,
  749. customer: this.screenForm.jxsName,
  750. startTime: this.screenForm.date ? this.screenForm.date[0] : '',
  751. endTime: this.screenForm.date ? this.screenForm.date[1] : '',
  752. createBy: this.screenForm.zbMan,
  753. status: true,
  754. examineBy: this.screenForm.shMan,
  755. k3ServiceId:this.screenForm.k3ServiceId,
  756. serviceId:this.screenForm.serviceId,
  757. isDirectTransfer: this.screenForm.isDirectTransfer,
  758. specification:this.screenForm.specification,
  759. type: 2 // 1:普通零售单,2:政策零售单
  760. }
  761. getList(params).then((res) => {
  762. res.data.records.forEach(item => {
  763. item.sums1 = ['qty', 'directTransferQty', 'hasSendQty', 'refundableQty','payRebateAmount'];
  764. item.sums2 = ['price', 'payAmount', 'rebateAmount', 'payRebateAmount', 'totalDiscAmount'];
  765. })
  766. this.dataList = res.data.records
  767. this.listTotal = res.data.total
  768. this.listLoading = false
  769. })
  770. },
  771. // 提交筛选表单
  772. submitScreenForm() {
  773. this.currentPage = 1
  774. this.getList()
  775. },
  776. // 重置筛选表单
  777. resetScreenForm() {
  778. this.$refs.screenForm.resetFields()
  779. this.currentPage = 1
  780. this.getList()
  781. },
  782. // 更改每页数量
  783. handleSizeChange(val) {
  784. this.pageSize = val
  785. this.currentPage = 1
  786. this.getList()
  787. },
  788. // 更改当前页
  789. handleCurrentChange(val) {
  790. this.currentPage = val
  791. this.getList()
  792. },
  793. // 进入表单
  794. toForm(item) {
  795. this.queryItem = item
  796. this.isShowForm = true
  797. },
  798. // 进入详情
  799. toDetail(item) {
  800. this.queryItem = item
  801. this.isShowDetail = true
  802. },
  803. // 进入审批
  804. toExamine(item) {
  805. this.queryItem = item
  806. this.isShowExamine = true
  807. },
  808. // 进入退订
  809. toReturn(item) {
  810. this.queryItem = item
  811. this.isShowReturn = true
  812. },
  813. // 弃审
  814. handleAbandon(id) {
  815. abandonData({ id }).then(res => {
  816. this.$successMsg()
  817. this.getList()
  818. })
  819. },
  820. backList() {
  821. this.queryItem = {}
  822. this.isShowDetail = false
  823. this.isShowForm = false
  824. this.isShowExamine = false
  825. this.isShowReturn = false
  826. },
  827. // 关闭
  828. handleClose(id) {
  829. closeData({ id }).then((res) => {
  830. this.$successMsg()
  831. this.getList()
  832. })
  833. },
  834. // 提审
  835. handleSubmit(id) {
  836. submitData({ id }).then((res) => {
  837. this.$successMsg()
  838. this.getList()
  839. })
  840. },
  841. // 撤回
  842. handleCancel(id) {
  843. submitCancel({ id }).then((res) => {
  844. this.$successMsg()
  845. this.getList()
  846. })
  847. },
  848. // 打开 修改订单日期
  849. editDate(item) {
  850. this.editId = item.id
  851. this.dateForm.date = item.theTime.slice(0, 10)
  852. this.isShowEditDateDialog = true
  853. },
  854. // 提交 修改订单日期
  855. submitDateForm() {
  856. editData({
  857. id: this.editId,
  858. theTime: this.dateForm.date + ' 00:00:00'
  859. }).then((res) => {
  860. this.isShowEditDateDialog = false
  861. this.getList()
  862. this.$successMsg('修改成功')
  863. })
  864. }
  865. }
  866. }
  867. </script>
  868. <style lang="scss" scoped></style>