浏览代码

1。优化

MONSTER-ygh 1 月之前
父节点
当前提交
92886357a4

+ 9 - 0
src/api/team/applicationMr.js

@@ -103,4 +103,13 @@ export const selectRegionApi = (data) => {
     method: 'post',
     data: data
   })
+}
+
+// 选择区域
+export const selectRegionNewApi = (params) => {
+  return request({
+    url: '/merchant/merchantPerformTime/getTimeGoods',
+    method: 'get',
+    params
+  })
 }

+ 8 - 8
src/views/order/orderMr/dialog/details.vue

@@ -295,18 +295,18 @@ export default {
         let list = []
         res.data.viewersList.forEach((item,index)=>{
           let list1 = item.seatIds.split(',')
-          let seatNameList = item.seatName.split(',')
-          let nameList = item.nameList.split(',')
-          let idcardList = item.idcardList.split(',')
-          let mobileList = item.mobileList.split(',')
+          let seatNameList = item.seatName?item.seatName.split(','):[]
+          let nameList = item.nameList?item.nameList.split(','):[]
+          let idcardList = item.idcardList?item.idcardList.split(','):[]
+          let mobileList = item.mobileList?item.mobileList.split(','):[]
           list1.forEach((item1,index1)=>{
             list.push({
               ...item,
-              mobile: mobileList[index1],
-              seatName: seatNameList[index1],
-              idcard: idcardList[index1],
+              mobile: mobileList[index1]||'',
+              seatName: seatNameList[index1]||'',
+              idcard: idcardList[index1]||'',
               seatIds: item1,
-              name: nameList[index1]
+              name: nameList[index1]||''
             })
           })
         })

+ 10 - 8
src/views/team/applicationMr/dialog/addAndEdit.vue

@@ -148,9 +148,9 @@
           >
             <el-option
               v-for="dict in ticketList"
-              :key="dict.id"
+              :key="dict.goodsId"
               :label="dict.goodsName"
-              :value="dict.id"
+              :value="dict.goodsId"
             />
           </el-select>
         </el-form-item>
@@ -228,7 +228,7 @@
 </template>
 
 <script>
-import { saveAndEdit, getSelectById, uploadExcel, queryPrice,downloadModel,selectRegionApi } from "@/api/team/applicationMr";
+import { saveAndEdit, getSelectById, uploadExcel, queryPrice,downloadModel,selectRegionApi,selectRegionNewApi } from "@/api/team/applicationMr";
 import { pagePerformTimeList } from '@/api/schedulingMr/schedulingMr'
 import Editor from "@/components/Editor";
 import { getToken } from "@/utils/auth";
@@ -542,9 +542,9 @@ export default {
     goodsChangeEven(id) {
       let list = []
       this.ticketList.forEach(item => {
-        if(item.id == id){ // item.goodsId == id
+        if(item.goodsId == id){ // item.goodsId == id
           this.$set(this.form, 'goodsName', item.goodsName)
-          list = item.regionList
+          list =  item.seatList//item.regionList
         }
       })
       this.$set(this.form, 'price', '');
@@ -690,17 +690,19 @@ export default {
         if(!this.form.teamId||!this.form.auditoriumId||!this.form.performId||!this.form.performTimeId){
           return
         }
-        let res = await selectRegionApi({
+        let res = await selectRegionNewApi({
           "teamId": this.form.teamId,
           "auditoriumId": this.form.auditoriumId,
           "performId": this.form.performId,
           "performTimeId": this.form.performTimeId,
+          "timeId": this.form.performTimeId,
+          "channelType": "group"
         })
         if( res.code == 200 ) {
-          this.ticketList = res.data.goodsList
+          this.ticketList = res.data.list
         }
       } catch (error) {
-        
+        console.error(error)
       }
     }
   },

+ 5 - 4
src/views/windowTicketSales/mixins/selectList.js

@@ -183,15 +183,16 @@ export default {
                     break;
                 }
 
-                if(this.stockType == 1 && row.channelType != 'window'){
+                if(row.channelType != 'window'){
                     if(row.channelType) {
                         this.$message.error(`不能选择非窗口出售的座位!!!`);
+                        flog = true
+                        break;
                     }else if(item.isUse == 2){
                         this.$message.error(`不能选择非窗口出售的座位!!!`);
+                        flog = true
+                        break;
                     }
-                    
-                    flog = true
-                    break;
                 }
             }
             if(flog){

+ 4 - 5
src/views/windowTicketSales/ticketingSales.vue

@@ -436,8 +436,7 @@ import LockSeat from './model/lockSeat.vue'
                 }
                 this.seatMapList = {}
                 this.seatList = []
-                let fun = this.stockType === 0 ? querySeatList: querySeatListNew
-                let res = await fun({
+                let res = await querySeatListNew({
                     ...this.queryParams,
                     channelType: 'window'
                 })
@@ -657,14 +656,14 @@ import LockSeat from './model/lockSeat.vue'
             if(row.isDisabled || row.status == 2){
                 return false
             }
-            if(this.stockType == 1 && row.channelType != 'window'){
+            if(row.channelType != 'window'){
                 if(row.channelType) {
                     this.$message.error(`该座位仅限${ this.setChanneltype(row.channelType) }渠道购买!!!`);
+                    return false
                 }else if(item.isUse == 2){
                     this.$message.error(`该座位仅限其他渠道购买!!!`);
+                    return false
                 }
-                
-                return false
             }
 
             if(this.seatSelectListNo.length>0 && row.occupyStatus != 0) {