index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
  4. <el-form-item label="团队名称" label-width="70px">
  5. <el-input
  6. v-model="queryParams.goodsName"
  7. placeholder="请输入团队名称"
  8. clearable
  9. style="width: 240px;"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item label="票务名称:" prop="goodsId">
  14. <el-select
  15. v-model="queryParams.goodsId"
  16. placeholder="票务名称"
  17. clearable
  18. style="width: 100%;"
  19. >
  20. <el-option
  21. v-for="dict in ticketList"
  22. :key="dict.id"
  23. :label="dict.goodsName"
  24. :value="dict.id"
  25. />
  26. </el-select>
  27. </el-form-item>
  28. <el-form-item label="审核状态">
  29. <el-select
  30. v-model="queryParams.status"
  31. placeholder="审核状态"
  32. clearable
  33. style="width: 100%"
  34. >
  35. <el-option
  36. v-for="dict in statusList"
  37. :key="dict.value"
  38. :label="dict.name"
  39. :value="dict.value"
  40. />
  41. </el-select>
  42. </el-form-item>
  43. <el-form-item>
  44. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  45. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  46. </el-form-item>
  47. </el-form>
  48. <el-row :gutter="10" class="mb8">
  49. <el-col :span="1.5">
  50. <el-button
  51. type="primary"
  52. plain
  53. icon="el-icon-plus"
  54. size="mini"
  55. @click="handleAdd"
  56. v-hasPermi="['teamTicketMr:teamTicketMr:add']"
  57. >新增报名</el-button>
  58. </el-col>
  59. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  60. </el-row>
  61. <el-table ref="tables" v-loading="loading" :data="dataList" border>
  62. <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
  63. <el-table-column label="团队名称" align="center" prop="teamName" />
  64. <el-table-column label="预约场馆" align="center" prop="theatreName" />
  65. <el-table-column label="预约演出厅" align="center" prop="auditoriumName" />
  66. <el-table-column label="预约剧目" align="center" prop="performName" />
  67. <el-table-column label="票务名称" align="center" prop="goodsName" />
  68. <el-table-column label="座位类型" align="center" prop="seatTypeName" />
  69. <el-table-column label="团购单价" align="center" prop="price">
  70. <template slot-scope="scope">
  71. <span v-if="scope.row.originalSalePrice">¥{{ scope.row.price }}</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="预约时间" align="center" prop="performTimeStart" width="160">
  75. <template slot-scope="scope">
  76. <span>{{ parseTime(scope.row.performTimeStart) }}</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="观影人数" align="center" prop="viewerNum" />
  80. <el-table-column label="合计" align="center" prop="priceTotal" />
  81. <el-table-column label="报名时间" align="center" prop="createTime" width="160">
  82. <template slot-scope="scope">
  83. <span>{{ parseTime(scope.row.createTime) }}</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="审核状态" align="center">
  87. <template slot-scope="scope">
  88. <el-tag type="info" v-if="scope.row.status == 0">待审核</el-tag>
  89. <el-tag type="success" v-if="scope.row.status == 1">审核成功</el-tag>
  90. <el-tag type="danger" v-if="scope.row.status == 2">审核失败</el-tag>
  91. </template>
  92. </el-table-column>
  93. <el-table-column label="审核时间" align="center" prop="createTime" width="160">
  94. <template slot-scope="scope">
  95. <span>{{ parseTime(scope.row.createTime) }}</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column label="审核人" align="center" prop="teamPersonNum" />
  99. <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
  100. <template slot-scope="scope">
  101. <!-- <el-button-->
  102. <!-- size="mini"-->
  103. <!-- type="text"-->
  104. <!-- @click="handleUpdate(scope.row)"-->
  105. <!-- v-hasPermi="['teamTicketMr:teamTicketMr:edit']"-->
  106. <!-- >修改</el-button>-->
  107. <el-button
  108. size="mini"
  109. type="text"
  110. v-if="scope.row.status == 0"
  111. @click="handleDetails(scope.row, 'examine')"
  112. v-hasPermi="['teamTicketMr:teamTicketMr:edit']"
  113. >审核</el-button>
  114. <el-button
  115. size="mini"
  116. type="text"
  117. @click="handleDetails(scope.row)"
  118. v-hasPermi="['teamTicketMr:teamTicketMr:edit']"
  119. >详情</el-button>
  120. <el-button
  121. size="mini"
  122. type="text"
  123. v-if="scope.row.status == 1"
  124. @click="handleOrderDetails(scope.row)"
  125. v-hasPermi="['teamTicketMr:teamTicketMr:edit']"
  126. >查看订单</el-button>
  127. </template>
  128. </el-table-column>
  129. </el-table>
  130. <pagination
  131. v-show="total>0"
  132. :total="total"
  133. :page.sync="queryParams.pageNum"
  134. :limit.sync="queryParams.pageSize"
  135. @pagination="getList"
  136. />
  137. <!-- 新增/编辑弹框 -->
  138. <add-and-edit
  139. ref="addAndEdit"
  140. :dict="dict"
  141. @getList="getList"
  142. />
  143. <!-- 详情弹框 -->
  144. <app-details
  145. ref="appDetails"></app-details>
  146. <!-- 团购订单详情弹框 -->
  147. <order-details
  148. ref="orderDetails"></order-details>
  149. <el-dialog
  150. title="查看"
  151. :visible.sync="visibleStatus"
  152. width="600px"
  153. :destroy-on-close="true"
  154. :close-on-click-modal="false"
  155. >
  156. <div v-if="visibleType == 'img'">
  157. <el-image
  158. style="width: 400px; height: 100%"
  159. :src="newObj.mainImg"
  160. fit="cover"
  161. />
  162. </div>
  163. <div v-if="visibleType == 'html'">
  164. <div v-html="newObj.centent"></div>
  165. </div>
  166. <div slot="footer" class="dialog-footer">
  167. <el-button type="primary" @click="visibleStatus = false">确 定</el-button>
  168. </div>
  169. </el-dialog>
  170. </div>
  171. </template>
  172. <script>
  173. import { pageList, deleteById, updateStatus } from '@/api/team/applicationMr'
  174. import addAndEdit from "./dialog/addAndEdit.vue";
  175. import details from "./dialog/details.vue";
  176. import orderDetails from "./dialog/orderDetails.vue";
  177. import { ticketPageList } from '@/api/ticketMr/ticketMr'
  178. import DetailsDia from '@/views/perform/programmeMr/dialog/details.vue'
  179. import AppDetails from '@/views/team/applicationMr/dialog/details.vue'
  180. export default {
  181. name: "agreement",
  182. dicts: ['distribution_type'],
  183. components: { AppDetails, DetailsDia, addAndEdit, details, orderDetails },
  184. data() {
  185. return {
  186. // 遮罩层
  187. loading: true,
  188. // 选中数组
  189. ids: [],
  190. // 非单个禁用
  191. single: true,
  192. // 非多个禁用
  193. multiple: true,
  194. // 显示搜索条件
  195. showSearch: true,
  196. // 总条数
  197. total: 0,
  198. // 用户表格数据
  199. dataList: null,
  200. // 弹出层标题
  201. title: "",
  202. // 是否显示弹出层
  203. open: false,
  204. // 日期范围
  205. dateRange: [],
  206. // 查询参数
  207. queryParams: {
  208. pageNum: 1,
  209. pageSize: 10,
  210. type: undefined
  211. },
  212. statusList: [
  213. {id: 1, name: '待审核', value: 0},
  214. {id: 2, name: '已通过', value: 1},
  215. {id: 3, name: '已驳回', value: 2},
  216. ],
  217. visibleStatus: false,
  218. newObj: {},
  219. visibleType: '',
  220. setStatus: false,
  221. setForm: {},
  222. setRules: [],
  223. setLoading: false,
  224. ticketList: []
  225. };
  226. },
  227. created() {
  228. this.getList();
  229. this.ticketListApi();
  230. },
  231. methods: {
  232. /** 查询列表 */
  233. getList() {
  234. this.loading = true;
  235. pageList(this.queryParams)
  236. .then(response => {
  237. this.dataList = response.data.rows;
  238. this.dataList.forEach(item =>{
  239. item.switchValue = item.status;
  240. })
  241. this.total = response.data.total;
  242. this.loading = false;
  243. }
  244. );
  245. },
  246. /** 票务列表查询 */
  247. ticketListApi() {
  248. ticketPageList(this.addDateRange({pageNum: 1, pageSize: 100, goodsType: 2, classifyId: 1, status: 0}))
  249. .then(response => {
  250. this.ticketList = response.data.rows;
  251. });
  252. },
  253. // 取消按钮
  254. cancel() {
  255. this.open = false;
  256. },
  257. /** 搜索按钮操作 */
  258. handleQuery() {
  259. this.queryParams.pageNum = 1;
  260. this.getList();
  261. },
  262. /** 重置按钮操作 */
  263. resetQuery() {
  264. this.dateRange = [];
  265. this.$set(this.queryParams, 'goodsName', '');
  266. this.queryParams.pageNum = 1;
  267. this.handleQuery();
  268. },
  269. /** 价格输入事件 */
  270. changePriceAmount(key) {
  271. if(this.setForm[key] * 1 < 0){
  272. this.$message.error("输入需大于或等于0!");
  273. this.$set(this.setForm, key, '');
  274. return false
  275. }
  276. },
  277. /** 新增按钮操作 */
  278. handleAdd() {
  279. this.$refs["addAndEdit"].openDialog("新增数据", null);
  280. },
  281. /** 详情审核按钮操作 */
  282. handleDetails(row, type) {
  283. this.$refs["appDetails"].openDialog("查看详情", row, type);
  284. },
  285. /** 详情按钮操作 */
  286. handleOrderDetails(row) {
  287. this.$refs["orderDetails"].openDialog("查看详情", row);
  288. },
  289. /** 团队绑定按钮操作 */
  290. handleTeam(row) {
  291. this.$refs["dumplingEdit"].openDialog("团队绑定", row);
  292. },
  293. /** 禁用或者启用发布按钮操作 */
  294. ionlineApi(row) {
  295. this.$confirm("是否对剧目名称为" + row.performName + "的数据进行" + (row.status == 1 ? '下架?' : '上架?'), '提示', {
  296. confirmButtonText: '确定',
  297. cancelButtonText: '取消',
  298. type: 'warning'
  299. }).then(() => {
  300. updateStatus({ id: row.id, status: row.status == 1 ? 0 : 1 }).then((res) => {
  301. if (res.code == 200) {
  302. this.$message({
  303. type: 'success',
  304. message: '操作成功!'
  305. });
  306. this.getList();
  307. }
  308. });
  309. }).catch(() => {});
  310. },
  311. /** 删除按钮操作 */
  312. handleDelete(row) {
  313. this.$modal.confirm('是否确认删除数据剧目名称为"' + row.performName + '"的数据项?').then(function() {
  314. return deleteById(row.id);
  315. }).then(() => {
  316. this.getList();
  317. this.$modal.msgSuccess("删除成功");
  318. }).catch(() => {});
  319. },
  320. /** 查看按钮操作 */
  321. seeCenter(obj, type) {
  322. this.visibleStatus = true
  323. this.visibleType = type;
  324. this.newObj = obj;
  325. }
  326. }
  327. };
  328. </script>