musicGroup.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. <template>
  2. <div>
  3. <!-- <h2>
  4. <div class="squrt"></div>
  5. 费用审核列表
  6. </h2> -->
  7. <div>
  8. <!-- 搜索标题 -->
  9. <save-form
  10. :inline="true"
  11. class="searchForm"
  12. ref="searchForm"
  13. :model.sync="searchForm"
  14. >
  15. <el-form-item>
  16. <el-input
  17. v-model.trim="searchForm.search"
  18. clearable
  19. @keyup.enter.native="
  20. e => {
  21. e.target.blur();
  22. $refs.searchForm.save();
  23. search();
  24. }
  25. "
  26. placeholder="乐团名称/编号"
  27. ></el-input>
  28. </el-form-item>
  29. <el-form-item>
  30. <el-select
  31. class="multiple"
  32. v-model.trim="searchForm.organId"
  33. filterable
  34. clearable
  35. placeholder="请选择分部"
  36. >
  37. <el-option
  38. v-for="(item, index) in selects.branchs"
  39. :key="index"
  40. :label="item.name"
  41. :value="item.id"
  42. ></el-option>
  43. </el-select>
  44. </el-form-item>
  45. <el-form-item>
  46. <el-select
  47. class="multiple"
  48. v-model.trim="searchForm.audit"
  49. filterable
  50. clearable
  51. placeholder="请选择审核人"
  52. >
  53. <el-option
  54. v-for="(item, index) in userList"
  55. :key="index"
  56. :label="item.auditName"
  57. :value="item.audit"
  58. ></el-option>
  59. </el-select>
  60. </el-form-item>
  61. <el-form-item>
  62. <el-select
  63. class="multiple"
  64. v-model.trim="searchForm.paymentType"
  65. filterable
  66. clearable
  67. placeholder="申请类型"
  68. >
  69. <el-option
  70. v-for="(item, index) in paymentTypeList"
  71. :key="index"
  72. :label="item.label"
  73. :value="item.value"
  74. ></el-option>
  75. </el-select>
  76. </el-form-item>
  77. <el-form-item>
  78. <el-select
  79. class="multiple"
  80. v-model.trim="searchForm.status"
  81. filterable
  82. clearable
  83. placeholder="审核状态"
  84. >
  85. <el-option
  86. v-for="(item, index) in statusList"
  87. :key="index"
  88. :label="item.label"
  89. :value="item.value"
  90. ></el-option>
  91. </el-select>
  92. </el-form-item>
  93. <el-form-item>
  94. <el-button @click="search" type="primary">搜索</el-button>
  95. <el-button @click="reset" type="danger">重置</el-button>
  96. <auth
  97. auths="musicGroupPaymentCalender/batchAuditing"
  98. style="margin-left: 10px"
  99. >
  100. <el-button
  101. @click="typesStatus = true"
  102. :disabled="!selList.length > 0"
  103. type="primary"
  104. >批量审核</el-button
  105. >
  106. </auth>
  107. </el-form-item>
  108. </save-form>
  109. <div class="tableWrap">
  110. <el-table
  111. :data="tableList"
  112. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  113. @selection-change="handleSelectionChange"
  114. >
  115. <el-table-column
  116. fixed="left"
  117. type="selection"
  118. width="55"
  119. :selectable="selectable"
  120. ></el-table-column>
  121. <el-table-column align="left" prop="organName" label="分部名称">
  122. <template slot-scope="scope">
  123. <copy-text>{{ scope.row.organName }}</copy-text>
  124. </template>
  125. </el-table-column>
  126. <el-table-column
  127. align="left"
  128. width="200px"
  129. prop="musicGroupName"
  130. label="乐团"
  131. >
  132. <template slot-scope="scope">
  133. <div>
  134. <Tooltip :content="scope.row.musicGroupName" />
  135. (<copy-text>{{ scope.row.musicGroupId }}</copy-text
  136. >)
  137. </div>
  138. </template>
  139. </el-table-column>
  140. <!-- <el-table-column
  141. align="left"
  142. width="100px"
  143. prop="musicGroupId"
  144. label="乐团编号"
  145. >
  146. <template slot-scope="scope">
  147. </template>
  148. </el-table-column> -->
  149. <el-table-column align="left" prop="paymentType" label="收费模式">
  150. <template slot-scope="scope">
  151. <div>
  152. {{ scope.row.paymentType | auditPaymentType }}
  153. </div>
  154. </template>
  155. </el-table-column>
  156. <el-table-column
  157. align="left"
  158. prop="paymentType"
  159. label="类型"
  160. width="150px"
  161. >
  162. <template slot-scope="scope">
  163. <div>
  164. <p>申请类型: {{ scope.row.paymentType | auditPaymentType }}</p>
  165. <p>订单类型: {{ scope.row.payUserType | payOrderType }}</p>
  166. </div>
  167. </template>
  168. </el-table-column>
  169. <!-- <el-table-column align="left" prop="payUserType" label="订单类型">
  170. <template slot-scope="scope">
  171. <div>
  172. {{ scope.row.payUserType | payOrderType }}
  173. </div>
  174. </template>
  175. </el-table-column> -->
  176. <!-- <el-table-column
  177. align="left"
  178. prop="addCourseTotalTime"
  179. label="加课总时长(分钟)"
  180. ></el-table-column> -->
  181. <el-table-column
  182. align="left"
  183. prop="originalTotalAmount"
  184. label="价格(元)"
  185. >
  186. <template slot-scope="scope">
  187. <div>
  188. <p>总原价:{{ scope.row.originalTotalAmount }}</p>
  189. <p>申请价:{{ scope.row.currentTotalAmount }}</p>
  190. </div>
  191. </template>
  192. </el-table-column>
  193. <!-- <el-table-column align="left" prop="currentTotalAmount" label="申请价格(元)">
  194. </el-table-column> -->
  195. <el-table-column align="left" prop="memo" width="100px" label="备注">
  196. <template slot-scope="scope">
  197. <overflow-text width="80px" :text="scope.row.memo" />
  198. </template>
  199. </el-table-column>
  200. <el-table-column
  201. align="left"
  202. prop="auditMemo"
  203. width="100px"
  204. label="审核意见"
  205. >
  206. <template slot-scope="scope">
  207. <overflow-text width="80px" :text="scope.row.auditMemo" />
  208. </template>
  209. </el-table-column>
  210. <el-table-column
  211. align="left"
  212. prop="operatorName"
  213. label="申请人"
  214. width="150px"
  215. >
  216. <template slot-scope="scope">
  217. <div>
  218. <p>
  219. {{ scope.row.operatorName ? scope.row.operatorName : "--" }}
  220. </p>
  221. <p>{{ scope.row.createTime | dateForMinFormat }}</p>
  222. </div>
  223. </template>
  224. </el-table-column>
  225. <el-table-column
  226. align="left"
  227. prop="operatorName"
  228. label="审核人"
  229. width="150px"
  230. >
  231. <template slot-scope="scope">
  232. <div>
  233. <p>{{ scope.row.auditName ? scope.row.auditName : "--" }}</p>
  234. <p>
  235. {{
  236. scope.row.auditTime
  237. ? scope.row.auditTime
  238. : "--" | dateForMinFormat
  239. }}
  240. </p>
  241. </div>
  242. </template>
  243. </el-table-column>
  244. <el-table-column
  245. align="left"
  246. prop="status"
  247. label="状态"
  248. width="100px"
  249. >
  250. <template slot-scope="scope">
  251. <div>
  252. {{ scope.row.status | auditType }}
  253. </div>
  254. </template>
  255. </el-table-column>
  256. <!-- <el-table-column align="left" prop="createTime" label="申请时间" width="140px">
  257. <template slot-scope="scope">
  258. <div>
  259. {{ scope.row.createTime | dateForMinFormat }}
  260. </div>
  261. </template>
  262. </el-table-column> -->
  263. <!-- -->
  264. <el-table-column align="left" label="操作" fixed="right">
  265. <template slot-scope="scope">
  266. <!-- 'musicGroupPaymentCalender/auditListDetail/update'
  267. 'musicGroupPaymentCalender/auditListDetail/look' -->
  268. <el-button
  269. @click="lookDetail(scope.row)"
  270. type="text"
  271. v-if="
  272. scope.row.status == 'AUDITING' &&
  273. $helpers.permission(
  274. 'musicGroupPaymentCalender/auditListDetail/update'
  275. )
  276. "
  277. >
  278. 审核
  279. </el-button>
  280. <el-button
  281. @click="lookDetail(scope.row)"
  282. type="text"
  283. v-if="
  284. scope.row.status != 'AUDITING' &&
  285. $helpers.permission(
  286. 'musicGroupPaymentCalender/getDetail/look'
  287. )
  288. "
  289. >
  290. 查看
  291. </el-button>
  292. </template>
  293. </el-table-column>
  294. </el-table>
  295. <pagination
  296. :total.sync="pageInfo.total"
  297. sync
  298. :page.sync="pageInfo.page"
  299. :limit.sync="pageInfo.limit"
  300. :page-sizes="pageInfo.page_size"
  301. @pagination="getList"
  302. />
  303. </div>
  304. </div>
  305. <el-dialog
  306. title="审核详情"
  307. width="900px"
  308. :visible.sync="typeStatus"
  309. v-if="typeStatus"
  310. >
  311. <review :detail="detail" @close="close" />
  312. </el-dialog>
  313. <el-dialog
  314. title="批量审核"
  315. width="700px"
  316. :visible.sync="typesStatus"
  317. v-if="typesStatus"
  318. >
  319. <audit
  320. :selList="selList"
  321. @close="typesStatus = false"
  322. @submited="submited"
  323. />
  324. </el-dialog>
  325. </div>
  326. </template>
  327. <script>
  328. import pagination from "@/components/Pagination/index";
  329. import review from "@/views/resetTeaming/modals/review.vue";
  330. import audit from "./audit.vue";
  331. // import store from '@/store'
  332. import { getAuditList, getAuditListDetail } from "@/api/auditManager";
  333. import { getEmployeeOrgan } from "@/api/buildTeam";
  334. import Tooltip from "@/components/Tooltip/index";
  335. import { auditTypeList, auditPaymentTypeList } from "@/utils/searchArray";
  336. import { getCalenderUser } from "./api";
  337. const initSearch = {
  338. search: null,
  339. paymentType: null,
  340. status: "AUDITING",
  341. organId: null,
  342. audit: null
  343. };
  344. export default {
  345. components: { pagination, Tooltip, review, audit },
  346. name: "helpCategory",
  347. data() {
  348. return {
  349. typesStatus: false,
  350. selList: [],
  351. paymentTypeList: auditPaymentTypeList,
  352. organList: [],
  353. statusList: auditTypeList,
  354. searchForm: { ...initSearch },
  355. tableList: [],
  356. userList: [],
  357. pageInfo: {
  358. // 分页规则
  359. limit: 10, // 限制显示条数
  360. page: 1, // 当前页
  361. total: 0, // 总条数
  362. page_size: [10, 20, 40, 50] // 选择限制显示条数
  363. },
  364. detail: null,
  365. typeStatus: false
  366. };
  367. },
  368. mounted() {
  369. this.$store.dispatch("setBranchs");
  370. this.getList();
  371. this.getCalenderList();
  372. },
  373. methods: {
  374. selectable(row, index) {
  375. return row.status == "AUDITING";
  376. },
  377. search() {
  378. this.pageInfo.page = 1;
  379. this.$refs.searchForm.save(this.searchForm);
  380. this.$refs.searchForm.save(this.pageInfo, "page");
  381. this.getList();
  382. },
  383. reset() {
  384. this.searchForm = { ...initSearch };
  385. this.search();
  386. },
  387. handleSelectionChange(arr) {
  388. this.selList = arr;
  389. },
  390. getList() {
  391. let params = {
  392. page: this.pageInfo.page,
  393. rows: this.pageInfo.limit,
  394. ...this.searchForm
  395. };
  396. getAuditList(params).then(res => {
  397. let result = res.data;
  398. if (res.code == 200) {
  399. this.tableList = result.rows;
  400. this.pageInfo.total = result.total;
  401. }
  402. });
  403. },
  404. async getCalenderList() {
  405. try {
  406. const res = await getCalenderUser({ type: "MUSIC" });
  407. this.userList = res.data;
  408. } catch (e) {
  409. console.log(e);
  410. }
  411. },
  412. lookDetail(row) {
  413. // this.detail = res.data
  414. this.detail = {
  415. id: row.id,
  416. musicGroupId: row.musicGroupId,
  417. status: row.status,
  418. batchNo: row.batchNo
  419. };
  420. this.typeStatus = true;
  421. },
  422. submited() {
  423. this.pageInfo.page = 1;
  424. this.getList();
  425. },
  426. close() {
  427. this.typeStatus = false;
  428. this.getList();
  429. }
  430. },
  431. watch: {
  432. typeStatus(val) {
  433. if (!val) {
  434. this.detail = null;
  435. }
  436. }
  437. }
  438. };
  439. </script>
  440. <style lang="scss" scoped>
  441. ::v-deep .el-date-editor.el-input {
  442. width: 100% !important;
  443. }
  444. ::v-deep .el-select {
  445. width: 100% !important;
  446. }
  447. ::v-deep .el-table .cell {
  448. display: -webkit-box;
  449. overflow: hidden;
  450. text-overflow: ellipsis;
  451. -webkit-line-clamp: 3;
  452. -webkit-box-orient: vertical;
  453. }
  454. ::v-deep .el-dialog__body {
  455. padding: 10px 20px;
  456. }
  457. .newBand {
  458. display: inline-block;
  459. }
  460. </style>