|
@@ -16,14 +16,25 @@
|
|
|
:close-on-click-modal="false"
|
|
|
@close="cancel"
|
|
|
>
|
|
|
- <div class="dialog">
|
|
|
+ <div
|
|
|
+ class="dialog"
|
|
|
+ v-loading="loading1"
|
|
|
+ element-loading-text="拼命加载中..."
|
|
|
+ element-loading-spinner="el-icon-loading"
|
|
|
+ element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
+ >
|
|
|
<el-form :model="form" ref="form" size="mini" :rules="rules" label-width="120px">
|
|
|
<el-form-item label="选择团队:" prop="teamId">
|
|
|
<el-select
|
|
|
v-model="form.teamId"
|
|
|
- placeholder="选择团队"
|
|
|
+ placeholder="请输入关键词搜索再选择"
|
|
|
clearable
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ reserve-keyword
|
|
|
+ :remote-method="teamPageListApi"
|
|
|
@change="teamChange"
|
|
|
+ :loading="teamIdLoading"
|
|
|
style="width: 100%;"
|
|
|
>
|
|
|
<el-option
|
|
@@ -186,8 +197,8 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
@click="submitForm"
|
|
|
- v-loading.fullscreen.lock="loading"
|
|
|
- element-loading-text="提交中..."
|
|
|
+ v-loading="loading"
|
|
|
+ element-loading-text="拼命加载中..."
|
|
|
element-loading-spinner="el-icon-loading"
|
|
|
element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
>
|
|
@@ -226,6 +237,7 @@ export default {
|
|
|
activeName: '01',
|
|
|
open: false,
|
|
|
loading: false,
|
|
|
+ loading1: false,
|
|
|
uploadLoading: false,
|
|
|
form: {
|
|
|
id: undefined,
|
|
@@ -254,7 +266,8 @@ export default {
|
|
|
theatreList: [],
|
|
|
teamList: [],
|
|
|
sessionList: [],
|
|
|
- performTimeList: []
|
|
|
+ performTimeList: [],
|
|
|
+ teamIdLoading: false,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -281,30 +294,41 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
/** 获取详情 */
|
|
|
- getSelectByIdApi(row) {
|
|
|
- const id = row.id
|
|
|
- getSelectById(id).then(response => {
|
|
|
- const obj = response.data;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$set(this.form, 'id', obj.id);
|
|
|
- this.$set(this.form, 'goodsId', obj.goodsId);
|
|
|
- this.$set(this.form, 'seatTypeId', obj.seatTypeId);
|
|
|
- this.$set(this.form, 'performId', obj.performId);
|
|
|
- this.$set(this.form, 'originalSalePrice', obj.originalSalePrice);
|
|
|
- this.$set(this.form, 'salePrice', obj.salePrice);
|
|
|
- this.$set(this.form, 'brokeragePrice', obj.brokeragePrice);
|
|
|
-
|
|
|
- this.ticketListApi();
|
|
|
- this.getSeatTypeList({goodsId: this.form.goodsId, performId: this.form.performId});
|
|
|
- });
|
|
|
- });
|
|
|
+ async getSelectByIdApi(row) {
|
|
|
+ try {
|
|
|
+ const id = row.id
|
|
|
+ this.loading1 = true
|
|
|
+ let response = await getSelectById(id)
|
|
|
+ let obj = response.data;
|
|
|
+ this.$set(this,'form',{
|
|
|
+ ...obj,
|
|
|
+ viewerList: obj.viewersList,
|
|
|
+ applyId: obj.id?obj.id:null
|
|
|
+ })
|
|
|
+ //this.ticketListApi();
|
|
|
+ //this.getSeatTypeList({goodsId: this.form.goodsId, performId: this.form.performId});
|
|
|
+ await this.merchantPageList(this.form.theatreId) // 获取演出厅
|
|
|
+ await this.selectRegionFun() // 获取票务管理
|
|
|
+ await this.getPerformTimeList() // 预约场次列表
|
|
|
+ this.setGoodsChangeEven(this.form.goodsId) // 座位类型
|
|
|
+ this.loading1 = false
|
|
|
+ } catch (error) {
|
|
|
+ console.error("error====",error)
|
|
|
+ this.loading1 = false
|
|
|
+ this.open = false
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
/** 团队列表查询 */
|
|
|
- teamPageListApi() {
|
|
|
- teamPageList(this.addDateRange({pageNum: 1, pageSize: 100}))
|
|
|
+ teamPageListApi(key) {
|
|
|
+ this.teamIdLoading = true
|
|
|
+ teamPageList(this.addDateRange({pageNum: 1, pageSize: 900,name:key}))
|
|
|
.then(response => {
|
|
|
this.teamList = response.data.rows;
|
|
|
- });
|
|
|
+ this.teamIdLoading = false
|
|
|
+ }).catch(()=>{
|
|
|
+ this.teamIdLoading = true
|
|
|
+ })
|
|
|
},
|
|
|
/** 场馆列表查询 */
|
|
|
getList(name) {
|
|
@@ -488,10 +512,10 @@ export default {
|
|
|
this.ticketList = [] // 票务
|
|
|
this.seatList = [] // 座位类型
|
|
|
|
|
|
- this.selectRegionFun()
|
|
|
+ this.selectRegionFun() // 获取票务管理
|
|
|
},
|
|
|
- // 票务改变事件
|
|
|
- goodsChangeEven(id) {
|
|
|
+ // 票务改变事件
|
|
|
+ goodsChangeEven(id) {
|
|
|
let list = []
|
|
|
this.ticketList.forEach(item => {
|
|
|
if(item.id == id){ // item.goodsId == id
|
|
@@ -517,6 +541,17 @@ export default {
|
|
|
})
|
|
|
//this.queryPriceApi();
|
|
|
},
|
|
|
+ setGoodsChangeEven(id) {
|
|
|
+ let list = []
|
|
|
+ this.ticketList.forEach(item => {
|
|
|
+ if(item.id == id){
|
|
|
+ list = item.regionList
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.seatList = [];
|
|
|
+ this.seatList = [].concat(list)
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* 保存
|
|
|
* @date 2023-11-22
|
|
@@ -527,7 +562,9 @@ export default {
|
|
|
if (valid) {
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
- const { code } = await saveAndEdit({ ...this.form });
|
|
|
+ let params = JSON.parse(JSON.stringify(this.form))
|
|
|
+ delete params.viewersList
|
|
|
+ const { code } = await saveAndEdit({ ...params });
|
|
|
if (code === 200) {
|
|
|
this.$message.success("操作成功!");
|
|
|
this.$emit("getList");
|
|
@@ -621,6 +658,7 @@ export default {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
+ // 获取票务管理
|
|
|
async selectRegionFun(){
|
|
|
try {
|
|
|
if(!this.form.teamId||!this.form.auditoriumId||!this.form.performId||!this.form.performTimeId){
|