reimbursementAdd.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  1. <style scoped>
  2. ::v-deep .ant-steps-dot .ant-steps-item-content {
  3. width: auto;
  4. }
  5. ::v-deep .ant-steps-dot .ant-steps-item-active .ant-steps-item-icon > .ant-steps-icon .ant-steps-icon-dot {
  6. background: rgb(11, 190, 135);
  7. width: 15px;
  8. height: 15px;
  9. /* margin-top: 5px; */
  10. margin-left: 2px;
  11. }
  12. ::v-deep .endStatus .ant-steps-item-icon > .ant-steps-icon .ant-steps-icon-dot {
  13. background: #1890ff !important;
  14. width: 15px;
  15. height: 15px;
  16. /* margin-top: 5px; */
  17. /* margin-left: 2px; */
  18. }
  19. ::v-deep .ant-steps-dot .ant-steps-item-icon {
  20. width: 15px;
  21. height: 15px;
  22. margin-top: 5px;
  23. margin-left: -4px;
  24. }
  25. ::v-deep .ant-form-item {
  26. width: 100%;
  27. }
  28. ::v-deep .look-show .ant-form-item-label {
  29. font-size: 20px;
  30. }
  31. ::v-deep .look-show .ant-form-item-control-wrapper {
  32. font-size: 16px;
  33. }
  34. </style>
  35. <template>
  36. <div class="reimbursement">
  37. <div class="chartBox">
  38. <a-row :gutter="20">
  39. <a-col :sm="24" style="margin-bottom: 20px; z-index: 10">
  40. <a-card
  41. class="search-box step-jump"
  42. title="个人信息"
  43. v-if="!!$route.query.type && ($route.query.type == 'add' || $route.query.type == 'edit')"
  44. >
  45. <a-form
  46. ref="formRef"
  47. name="advanced_search"
  48. class="ant-advanced-search-form"
  49. :form="form"
  50. layout="inline"
  51. :label-col="labelCol"
  52. :wrapper-col="wrapperCol"
  53. >
  54. <a-row :gutter="24">
  55. <a-col :span="6">
  56. <a-form-item label="申请人">
  57. {{ userInfo().realname }}
  58. </a-form-item>
  59. </a-col>
  60. <a-col :span="6">
  61. <a-form-item label="申请日期">
  62. <a-month-picker
  63. v-decorator="[
  64. 'statDate',
  65. {
  66. rules: [{ required: true, message: '请选择申请日期' }],
  67. initialValue: moment().format('YYYY-MM'),
  68. },
  69. ]"
  70. format="YYYY-MM"
  71. />
  72. </a-form-item>
  73. </a-col>
  74. <a-col :span="6">
  75. <a-form-item label="部门">
  76. <j-tree-select
  77. v-decorator="[
  78. 'departId',
  79. {
  80. rules: [{ required: true, message: '请选择部门' }],
  81. },
  82. ]"
  83. placeholder="请选择部门"
  84. dict="sys_depart,depart_name,id"
  85. pidField="parent_id"
  86. style="width: 200px"
  87. >
  88. </j-tree-select>
  89. </a-form-item>
  90. </a-col>
  91. </a-row>
  92. <a-row :gutter="24">
  93. <a-col :span="6">
  94. <a-form-item label="公司主体">
  95. <a-select
  96. v-decorator="[
  97. 'companyId',
  98. {
  99. rules: [{ required: true, message: '请选择公司' }],
  100. },
  101. ]"
  102. style="width: 200px"
  103. :filterOption="filterOption"
  104. showSearch
  105. allowClear
  106. labelInValue
  107. >
  108. <a-select-option
  109. v-for="(item, index) in dataDimensionList"
  110. :key="index + 1"
  111. :value="item.companyId"
  112. >
  113. {{ item.companyName }}
  114. </a-select-option>
  115. </a-select>
  116. </a-form-item>
  117. </a-col>
  118. <a-col :span="6">
  119. <a-form-item label="媒体">
  120. <a-select
  121. v-decorator="[
  122. 'media',
  123. {
  124. rules: [{ required: true, message: '请选择媒体' }],
  125. },
  126. ]"
  127. style="width: 200px"
  128. :filterOption="filterOption"
  129. showSearch
  130. allowClear
  131. placeholder="请选择媒体"
  132. >
  133. <a-select-option value="快手"> 快手 </a-select-option>
  134. <a-select-option value="聚星"> 聚星 </a-select-option>
  135. <a-select-option value="磁力金牛"> 磁力金牛 </a-select-option>
  136. <a-select-option value="头条"> 头条 </a-select-option>
  137. <a-select-option value="头条千川"> 头条千川 </a-select-option>
  138. </a-select>
  139. </a-form-item>
  140. </a-col>
  141. <a-col :span="6" v-if="expenseList.length > 0">
  142. <a-form-item v-bind="tailFormItemLayout">
  143. <a-button type="primary" @click="handleSubmit">提交</a-button>
  144. </a-form-item>
  145. </a-col>
  146. </a-row>
  147. </a-form>
  148. </a-card>
  149. <a-card class="search-box step-jump look-show" title="个人信息" v-else>
  150. <a-form layout="inline" :label-col="labelCol" :wrapper-col="wrapperCol">
  151. <a-row :gutter="24" v-if="lookData">
  152. <a-col :span="9">
  153. <a-form-item label="公司主体"> {{ lookData.companyName }}</a-form-item>
  154. </a-col>
  155. <a-col :span="9">
  156. <a-form-item label="媒体"> {{ lookData.media }}</a-form-item>
  157. </a-col>
  158. <a-col :span="9">
  159. <a-form-item label="申请时间"> {{ lookData.statDate }}</a-form-item>
  160. </a-col>
  161. <a-col :span="9">
  162. <a-form-item label="部门"> {{ lookData.departName }}</a-form-item>
  163. </a-col>
  164. <a-col :span="9">
  165. <a-form-item label="申请人"> {{ lookData.userName }}</a-form-item>
  166. </a-col>
  167. </a-row>
  168. </a-form>
  169. </a-card>
  170. </a-col>
  171. <a-col :sm="24" style="margin-bottom: 20px">
  172. <a-card class="search-box step-jump" title="费用信息">
  173. <a-button type="primary" @click="policyOperationStatus = true" style="margin-bottom: 15px"
  174. >新增费用信息</a-button
  175. >
  176. <div v-if="lookData" style="display: flex">
  177. <h2 style="margin-right: 50px">报销金额:{{ lookData.amount }}</h2>
  178. <h2>发票总数: {{ lookData.invoices }}</h2>
  179. </div>
  180. <a-table
  181. :columns="expenseColumns"
  182. :data-source="expenseList"
  183. bordered
  184. tableLayout="auto"
  185. :pagination="false"
  186. :loading="expenseLoading"
  187. style="word-break: break-all"
  188. >
  189. <span slot="project" slot-scope="text, record">
  190. {{ projectName(text) }}
  191. </span>
  192. <span slot="fileUrls" slot-scope="text, record">
  193. <div v-if="!!text">
  194. <a @click="showFileOk(record)">查看</a>
  195. </div>
  196. <div v-else>-</div>
  197. </span>
  198. <span slot="auditDescription" slot-scope="text, record">
  199. <div v-if="!!text">
  200. <a @click="reasonReject(record)">查看</a>
  201. <!-- <div v-html="refuseReasonImage" style="width: 100%"></div> -->
  202. </div>
  203. <div v-else>-</div>
  204. </span>
  205. <div slot="action" slot-scope="text, record">
  206. <span v-if="!$route.query.person || $route.query.person == 1">
  207. <a
  208. @click="editProject(record)"
  209. :disabled="
  210. !!$route.query.type &&
  211. ($route.query.type == 'look' || $route.query.type == 'add')
  212. "
  213. >编辑</a
  214. >
  215. <a-divider type="vertical" />
  216. <a-popconfirm title="确定删除吗?" @confirm="() => deleteProject(record)">
  217. <a
  218. :disabled="
  219. !!$route.query.type &&
  220. ($route.query.type == 'look' || $route.query.type == 'add')
  221. "
  222. >删除</a
  223. >
  224. </a-popconfirm>
  225. </span>
  226. <span v-else>
  227. <a
  228. @click="editStatusOpen(record)"
  229. :disabled="
  230. !!$route.query.person &&
  231. ($route.query.person == '1' || $route.query.person == '3')
  232. "
  233. >驳回</a
  234. >
  235. </span>
  236. </div>
  237. </a-table>
  238. </a-card>
  239. </a-col>
  240. </a-row>
  241. <div
  242. style="width: 100%; display: flex; justify-content: flex-end"
  243. v-if="!!$route.query.person && $route.query.person != '1'"
  244. >
  245. <a-button type="primary" @click="bfOk" :disabled="!disabledJudge||$route.query.person == '3'">部分通过</a-button>
  246. <a-button type="primary" @click="refuse" style="margin: 0 15px" :disabled="$route.query.person == '3'">审核拒绝</a-button>
  247. <a-button type="primary" @click="allOk" :disabled="disabledJudge||$route.query.person == '3'">审核通过</a-button>
  248. </div>
  249. </div>
  250. <a-modal v-if="showFile" title="查看附件" :visible="showFile" :footer="null" @cancel="showFile = false">
  251. <div v-if="fileList">
  252. <img :src="item" v-for="(item, index) in JSON.parse(fileList)" alt="" style="width: 150px" />
  253. </div>
  254. </a-modal>
  255. <a-modal
  256. v-if="reasonRejectVisible"
  257. title="驳回原因"
  258. :visible="reasonRejectVisible"
  259. :footer="null"
  260. @cancel="reasonRejectVisible = false"
  261. >
  262. <div v-if="reasonRejectData">
  263. <div v-html="reasonRejectData" style="width: 100%"></div>
  264. </div>
  265. </a-modal>
  266. <!-- 新增、编辑政策 -->
  267. <a-modal
  268. v-if="policyOperationStatus"
  269. dialog-class="policy-operation-class"
  270. :title="addType === 'add' ? '新增费用' : '编辑费用'"
  271. :visible="policyOperationStatus"
  272. :confirmLoading="confirmLoading"
  273. @ok="handlePolicyOperationSure"
  274. @cancel="handlePolicyOperationCancel"
  275. >
  276. <div>
  277. <a-form-model
  278. class="policy-operation-form"
  279. ref="policyOperationForm"
  280. :model="policyOperationForm"
  281. :rules="policyOperationRules"
  282. :label-col="labelCol"
  283. :wrapper-col="wrapperCol"
  284. >
  285. <a-row class="policy-operation-form-left">
  286. <a-form-model-item label="报销项目" prop="project">
  287. <a-select v-model="policyOperationForm.project" placeholder="请选择报销项目" allow-clear>
  288. <a-select-option
  289. :value="item.dcode"
  290. v-for="(item, index) in projectList"
  291. :key="index"
  292. >{{ item.dname }}</a-select-option
  293. >
  294. </a-select>
  295. </a-form-model-item>
  296. <a-form-model-item
  297. label="费用"
  298. prop="amount"
  299. :rules="{
  300. required: true,
  301. message: '请输入报销费用',
  302. trigger: 'blur',
  303. }"
  304. >
  305. <a-input-number v-model="policyOperationForm.amount" :step="0.01" :precision="2" />
  306. </a-form-model-item>
  307. <a-form-model-item
  308. label="费用产生日期"
  309. prop="statDate"
  310. :rules="{
  311. required: true,
  312. message: '费用产生日期必填',
  313. trigger: 'change',
  314. }"
  315. >
  316. <a-month-picker v-model="policyOperationForm.statDate" format="YYYY-MM" />
  317. </a-form-model-item>
  318. <a-form-model-item label="附件">
  319. <uploadFile
  320. :value.sync="policyOperationForm.fileUrls"
  321. :multiple="true"
  322. @overUpload="overUpload"
  323. :fileCount="10"
  324. uploadType="image"
  325. />
  326. </a-form-model-item>
  327. </a-row>
  328. <a-row class="policy-operation-form-right">
  329. <a-form-model-item
  330. label="报销类别"
  331. prop="type"
  332. :rules="{
  333. required: true,
  334. message: '报销类别必选',
  335. trigger: 'change',
  336. }"
  337. >
  338. <a-select v-model="policyOperationForm.type" placeholder="请选择报销类别" allow-clear>
  339. <a-select-option value="报销">报销</a-select-option>
  340. </a-select>
  341. </a-form-model-item>
  342. <a-form-model-item
  343. label="发票张数"
  344. prop="invoices"
  345. :rules="{
  346. required: true,
  347. message: '发票张数必填',
  348. trigger: 'blur',
  349. }"
  350. >
  351. <a-input-number v-model="policyOperationForm.invoices" :step="1" :precision="0" />
  352. </a-form-model-item>
  353. <a-form-model-item label="备注" prop="remarks">
  354. <a-input v-model="policyOperationForm.remarks" placeholder="请输入备注" allow-clear />
  355. </a-form-model-item>
  356. </a-row>
  357. </a-form-model>
  358. </div>
  359. </a-modal>
  360. <!-- 驳回原因 -->
  361. <a-modal
  362. v-if="rejectVisible"
  363. title="驳回原因"
  364. :visible="rejectVisible"
  365. @cancel="rejectVisible = false"
  366. @ok="auditDescriptionOk"
  367. >
  368. <j-code-editor language="javascript" v-model="auditDescription" style="min-height: 100px" />
  369. </a-modal>
  370. </div>
  371. </template>
  372. <script>
  373. import moment from 'moment'
  374. import { getAction, postAction, downFile } from '@/api/manage'
  375. import { mapGetters } from 'vuex'
  376. import { urlAcount } from './policy-management-server.js'
  377. import pick from 'lodash.pick'
  378. import JTreeSelect from '@/components/jeecg/JTreeSelect'
  379. import uploadFile from '@/components/uploadFile.vue'
  380. import { defineComponent, ref } from 'vue'
  381. import JCodeEditor from '@/components/jeecg/JEditor'
  382. export default {
  383. name: 'policy-management-reimbursement-add',
  384. data() {
  385. return {
  386. form: this.$form.createForm(this),
  387. showFile: false,
  388. fileList: null,
  389. labelCol: {
  390. span: 8,
  391. },
  392. wrapperCol: {
  393. span: 16,
  394. },
  395. tailFormItemLayout: {
  396. wrapperCol: {
  397. sm: {
  398. span: 24,
  399. offset: 8,
  400. },
  401. },
  402. },
  403. dataDimensionList: [],
  404. expenseColumns: [
  405. {
  406. title: '报销项目',
  407. align: 'center',
  408. dataIndex: 'project',
  409. scopedSlots: { customRender: 'project' },
  410. },
  411. {
  412. title: '报销类别',
  413. align: 'center',
  414. dataIndex: 'type',
  415. },
  416. {
  417. title: '费用金额',
  418. align: 'center',
  419. dataIndex: 'amount',
  420. scopedSlots: { customRender: 'amount' },
  421. },
  422. {
  423. title: '产生日期',
  424. align: 'center',
  425. dataIndex: 'statDate',
  426. scopedSlots: { customRender: 'statDate' },
  427. },
  428. {
  429. title: '发票张数',
  430. align: 'center',
  431. dataIndex: 'invoices',
  432. scopedSlots: { customRender: 'invoices' },
  433. },
  434. {
  435. title: '备注',
  436. align: 'center',
  437. ellipsis: true,
  438. dataIndex: 'remarks',
  439. scopedSlots: { customRender: 'remarks' },
  440. width: 120,
  441. },
  442. {
  443. title: '附件',
  444. align: 'center',
  445. dataIndex: 'fileUrls',
  446. scopedSlots: { customRender: 'fileUrls' },
  447. },
  448. {
  449. title: '驳回原因',
  450. align: 'center',
  451. dataIndex: 'auditDescription',
  452. scopedSlots: { customRender: 'auditDescription' },
  453. },
  454. {
  455. title: '操作',
  456. align: 'center',
  457. dataIndex: 'action',
  458. scopedSlots: { customRender: 'action' },
  459. },
  460. ],
  461. expenseList: [],
  462. expenseLoading: false,
  463. addType: 'add',
  464. projectList: [],
  465. policyOperationStatus: false,
  466. confirmLoading: false,
  467. policyOperationRules: {
  468. project: [{ required: true, message: '请选择报销项目', trigger: 'change' }],
  469. },
  470. policyOperationForm: {},
  471. expenseIds: [],
  472. lookData: null,
  473. rejectVisible: false,
  474. auditDescription: null,
  475. rejectId: null,
  476. reasonRejectVisible: false,
  477. reasonRejectData: null,
  478. }
  479. },
  480. components: {
  481. JTreeSelect,
  482. uploadFile,
  483. JCodeEditor,
  484. },
  485. created() {
  486. this.getCompanyList()
  487. this.getProjectList()
  488. let editRecordId = this.$route.query.id
  489. let editRecordType = this.$route.query.type
  490. if (editRecordId) {
  491. this.getDetail(editRecordId)
  492. } else {
  493. }
  494. },
  495. computed: {
  496. disabledJudge() {
  497. var index = this.expenseList.findIndex((item) => {
  498. return item.status == '0'
  499. })
  500. return index > -1 ? true : false
  501. },
  502. },
  503. mounted() {},
  504. methods: {
  505. ...mapGetters(['userInfo']),
  506. moment,
  507. getDetail(id) {
  508. this.getAction('/reimburse/apply/queryById', { id: id }).then((res) => {
  509. if (res.success) {
  510. this.expenseIds = JSON.parse(res.result.ids)
  511. if (this.$route.query.type == 'look') {
  512. this.lookData = res.result
  513. } else {
  514. var data = res.result
  515. data.statDate = moment(data.statDate)
  516. data.companyId = { key: data.companyId, label: data.companyName }
  517. this.form.setFieldsValue(pick(res.result, 'departId', 'media', 'statDate', 'companyId'))
  518. }
  519. this.getExpenseList(this.expenseIds)
  520. }
  521. })
  522. },
  523. showFileOk(item) {
  524. this.showFile = true
  525. this.fileList = item.fileUrls
  526. },
  527. reasonReject(item) {
  528. this.reasonRejectVisible = true
  529. this.reasonRejectData = item.auditDescription
  530. },
  531. projectName(theme) {
  532. if (this.projectList.length > 0) {
  533. var data = this.projectList.find((item) => {
  534. return item.dcode == theme
  535. })
  536. return data.dname
  537. }
  538. },
  539. filterOption(input, option) {
  540. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  541. },
  542. disabledDate(current) {
  543. return current > moment().subtract(1, 'day')
  544. },
  545. getFormData(form, className) {
  546. return this[form].getFieldValue(className)
  547. },
  548. //获取公司列表
  549. getCompanyList() {
  550. return new Promise((resolve, reject) => {
  551. this.getAction('/reimburse/apply/getCompanyList').then(
  552. (res) => {
  553. if (res.success) {
  554. this.dataDimensionList = res.result
  555. resolve(res.result)
  556. } else {
  557. reject(res.message)
  558. }
  559. }
  560. )
  561. })
  562. },
  563. //获取报销项目
  564. getProjectList() {
  565. return new Promise((resolve, reject) => {
  566. this.getAction('/reimburse/dict/list').then((res) => {
  567. if (res.success) {
  568. this.projectList = res.result
  569. resolve(res.result)
  570. } else {
  571. reject(res.message)
  572. }
  573. })
  574. })
  575. },
  576. //获取费用信息
  577. getExpenseList(ids) {
  578. return new Promise((resolve, reject) => {
  579. this.expenseLoading = true
  580. this.postDataAction('/reimburse/project/queryByIds', ids).then((res) => {
  581. if (res.success) {
  582. this.expenseLoading = false
  583. this.expenseList = res.result
  584. resolve(res.result)
  585. } else {
  586. this.expenseLoading = false
  587. reject(res.message)
  588. }
  589. })
  590. })
  591. },
  592. overUpload(urlAll) {
  593. console.log(urlAll)
  594. },
  595. editProject(item) {
  596. this.getAction('/reimburse/project/queryById', { id: item.id }).then((res) => {
  597. if (res.success) {
  598. this.addType = 'edit'
  599. this.policyOperationStatus = true
  600. var data = res.result
  601. this.policyOperationForm = {
  602. amount: +data.amount,
  603. fileUrls: JSON.parse(data.fileUrls),
  604. id: data.id,
  605. invoices: data.invoices,
  606. project: data.project,
  607. remarks: data.remarks,
  608. statDate: moment(data.statDate),
  609. type: data.type,
  610. }
  611. } else {
  612. this.$message.error(res.message)
  613. }
  614. })
  615. },
  616. deleteProject(item) {
  617. this.getAction('/reimburse/project/delete', { id: item.id }).then((res) => {
  618. if (res.success) {
  619. let index = this.expenseIds.indexOf(item.id)
  620. this.expenseIds.splice(index, 1)
  621. this.getExpenseList(this.expenseIds)
  622. } else {
  623. this.$message.error(res.message)
  624. }
  625. })
  626. },
  627. // 新增费用确定按钮
  628. handlePolicyOperationSure() {
  629. console.log(this.policyOperationForm)
  630. var paramsData = { ...this.policyOperationForm }
  631. paramsData.statDate = moment(paramsData.statDate).format('YYYY-MM')
  632. paramsData.fileUrls = JSON.stringify(paramsData.fileUrls)
  633. this.$refs.policyOperationForm.validate((valid) => {
  634. if (valid) {
  635. this.confirmLoading = true
  636. if (this.addType === 'add') {
  637. this.handleAddSureBtn(paramsData, '/reimburse/project/add')
  638. } else {
  639. this.handleAddSureBtn(paramsData, '/reimburse/project/edit')
  640. }
  641. } else {
  642. return false
  643. }
  644. })
  645. },
  646. handleAddSureBtn(data, url) {
  647. postAction(url, data)
  648. .then((result) => {
  649. if (result.code === 200) {
  650. this.$message.success(result.message)
  651. this.handlePolicyOperationCancel()
  652. this.expenseIds.push(result.result)
  653. this.getExpenseList(this.expenseIds)
  654. } else {
  655. this.$message.error(result.message)
  656. }
  657. })
  658. .catch((error) => {
  659. console.log(error, 'eeee')
  660. })
  661. .finally(() => {
  662. this.confirmLoading = false
  663. })
  664. },
  665. // 新增费用取消按钮
  666. handlePolicyOperationCancel() {
  667. this.policyOperationForm = {}
  668. this.policyOperationStatus = false
  669. },
  670. handleSubmit() {
  671. this.form.validateFields((err, values) => {
  672. if (!err) {
  673. console.log(values)
  674. let params = {}
  675. params.userId = this.userInfo().id
  676. params.departId = values.departId
  677. params.media = values.media
  678. params.statDate = moment(values.statDate).format('YYYY-MM')
  679. params.companyId = values.companyId.key
  680. params.companyName = values.companyId.label.replace(/[\r\n]/g, '').trim()
  681. params.ids = JSON.stringify(this.expenseIds)
  682. if (this.$route.query.type == 'edit') {
  683. params.loginId = this.userInfo().id
  684. params.id = this.$route.query.id
  685. this.postDataAction('/reimburse/apply/edit', params).then((res) => {
  686. if (res.success) {
  687. }
  688. })
  689. } else {
  690. this.postDataAction('/reimburse/apply/add', params).then((res) => {
  691. if (res.success) {
  692. }
  693. })
  694. }
  695. }
  696. })
  697. },
  698. editStatusOpen(item) {
  699. this.rejectVisible = true
  700. this.rejectId = item.id
  701. },
  702. auditDescriptionOk() {
  703. if (!!this.auditDescription) {
  704. var params = {}
  705. params.id = this.rejectId
  706. params.auditDescription = this.auditDescription
  707. params.status = 0
  708. this.postDataAction('/reimburse/project/edit', params).then((res) => {
  709. if (res.success) {
  710. this.getExpenseList(this.expenseIds)
  711. } else {
  712. this.$message.error(res.message)
  713. }
  714. })
  715. } else {
  716. this.$message.error('请填写驳回理由')
  717. }
  718. },
  719. refuse() {
  720. var params ={}
  721. params.loginId = this.userInfo().id
  722. params.userId = this.lookData.userId
  723. params.id = this.$route.query.id
  724. params.status = 3
  725. this.postDataAction('/reimburse/apply/edit', params).then((res) => {
  726. if (res.success) {
  727. this.$message.error(res.message)
  728. } else {
  729. this.$message.error(res.message)
  730. }
  731. })
  732. },
  733. bfOk() {
  734. var params ={}
  735. params.loginId = this.userInfo().id
  736. params.userId = this.lookData.userId
  737. params.id = this.$route.query.id
  738. params.status = 5
  739. this.postDataAction('/reimburse/apply/edit', params).then((res) => {
  740. if (res.success) {
  741. this.$message.error(res.message)
  742. } else {
  743. this.$message.error(res.message)
  744. }
  745. })
  746. },
  747. allOk() {
  748. var params ={}
  749. params.loginId = this.userInfo().id
  750. params.userId = this.lookData.userId
  751. params.id = this.$route.query.id
  752. params.status = 2
  753. this.postDataAction('/reimburse/apply/edit', params).then((res) => {
  754. if (res.success) {
  755. this.$message.error(res.message)
  756. } else {
  757. this.$message.error(res.message)
  758. }
  759. })
  760. },
  761. },
  762. }
  763. </script>
  764. <style lang="less" scoped>
  765. @import 'policy-management';
  766. </style>