| 
					
				 | 
			
			
				@@ -15,127 +15,144 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     append-to-body 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     :close-on-click-modal="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @close="cancel" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <div class="dialog"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      <el-form :model="form" ref="form" size="mini" :rules="rules" label-width="120px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-form-item label="模板名称:" prop="name"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            v-model="form.name" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            placeholder="模板名称" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <div style="display: flex;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="演出厅:" prop="auditoriumId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-select v-model="form.auditoriumId" @change="countBySeatTypFun" placeholder="请选择演出厅"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                v-for="item in performList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                :key="item.id" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                :label="item.name" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                :value="item.id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              </el-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="可配置数量:" prop="seatNum"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            {{ form.seatNum }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-form-item label="库存模式:" prop="chennelList"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <div class="inventory_box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <div class="inventory_channel" style="width: 200px;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <div class="inventory_channel_header"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <span>序号</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <span>渠道名称</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <span>数量</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <div  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              :class="['inventory_channel_item',index == chennelAtion ?'inventory_channel_item-action':'']" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              v-for="(item,index) in form.chennelListForm" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              :key="index" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              @click="setDictLabel(item,index)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <span>{{ index+1 }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <span>{{ item.channelName }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <span>{{ item.stockNum }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <div class="inventory_seat" v-if="chennelAtion !== null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <el-form-item label="选择模式:" label-width="75px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <el-radio-group v-model="form.chennelListForm[chennelAtion].stockType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <el-radio :label="0">根据数量</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <el-radio :label="1">根据座位</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </el-radio-group> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <div v-if="!form.chennelListForm[chennelAtion].stockType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <el-table ref="tables" v-loading="loading" :data="form.chennelListForm[chennelAtion].seatTypeList" border> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <el-table-column label="序号" align="center" type="index" width="60"></el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <el-table-column label="座位类型" align="center" prop="seatTypeName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <el-table-column label="可配置数量" align="center" prop="stock"></el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <el-table-column label="配置数量" align="center"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      <el-input v-model="form.chennelListForm[chennelAtion].seatTypeList[scope.$index].stockNum" type="number" clearable placeholder="请输入数量"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </el-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  >  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <div class="dialog-box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div class="dialog"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-form :model="form" ref="form" size="mini" :rules="rules" label-width="120px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <div style="display: flex;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="模板名称:" prop="name"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                style="width: 350px;" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                v-model="form.name" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                placeholder="模板名称" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="演出厅:" prop="auditoriumId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-select v-model="form.auditoriumId" @change="countBySeatTypFun" placeholder="请选择演出厅"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-for="item in performList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  :key="item.id" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  :label="item.name" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  :value="item.id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </el-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="可配置数量:"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              {{ seatNum }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-form-item label="库存模式:" class="is-required"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <div class="inventory_box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <div class="inventory_channel" style="width: 200px;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div class="inventory_channel_header"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span>序号</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span>渠道名称</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span>数量</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :class="['inventory_channel_item',index == chennelAtion ?'inventory_channel_item-action':'']" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                v-for="(item,index) in form.chennelListForm" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :key="index" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @click="setDictLabel(item,index)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span>{{ index+1 }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span>{{ item.channelName }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span>{{ item.stockNum }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <div v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <div class="inventory_seat" v-if="chennelAtion !== null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-form-item label="选择模式:" label-width="85px" class="is-required"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-radio-group  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="form.chennelListForm[chennelAtion].stockType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  @change="setStockType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-radio :label="0">根据数量</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-radio :label="1">根据座位</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </el-radio-group> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div v-if="!form.chennelListForm[chennelAtion].stockType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-table ref="tables" v-loading="loading" :data="form.chennelListForm[chennelAtion].seatTypeList" border> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-table-column label="序号" align="center" type="index" width="60"></el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-table-column label="座位类型" align="center" prop="seatTypeName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-table-column label="可配置数量" align="center" prop="stock"></el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-table-column label="配置数量" align="center"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        <el-input v-model="form.chennelListForm[chennelAtion].seatTypeList[scope.$index].stockNum" type="number" clearable placeholder="请输入数量"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </el-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <seatBox  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  ref="seatBox"  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  :isOccupyStatus="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  @selectSeat="selectSeat" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-form-item label="备注:" prop="remark"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            v-model="form.remark" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            type="textarea" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            placeholder="请输入备注" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-form-item label="备注:" prop="remark"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-model="form.remark" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              type="textarea" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              placeholder="请输入备注" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      v-if="loading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      class="dialog-loading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      v-loading="loading"  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :element-loading-text="loadingText" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      element-loading-spinner="el-icon-loading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      element-loading-background="rgba(0, 0, 0, 0.8)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ></div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <span slot="footer" class="dialog-footer"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      <el-button @click="cancel">取消</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <el-button @click="cancel">关闭</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        v-if="model !== 'DETAILS'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         type="primary" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         @click="submitForm" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        v-loading.fullscreen.lock="loading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        element-loading-text="提交中..." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        element-loading-spinner="el-icon-loading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        element-loading-background="rgba(0, 0, 0, 0.8)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        :loading="loading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <span v-if="loading">提交中...</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <span v-else>保存</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 添加或修改对话框 End --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!-- --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </el-dialog> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { saveAndEdit, getSelectById,countBySeatTyp,channelType } from '@/api/ticketMr/InventoryTemplate' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { getSelectById as getSeatSelectByIdApi } from "@/api/performanceHallMr/performanceHallMr"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { merchantPageList } from '@/api/performanceHallMr/performanceHallMr' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import seatBox from '@/components/seatBox/index.vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: "addAndEdit", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   dicts: ['system_taxrate'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  components: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    seatBox 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    let validateNumber = (rule, value, callback) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      let regNumber=/^(([1-9]\d*)|([0][.]{1}[0-9]{0,2}[0-9]+)|([1-9]\d*[.]{1}[0-9]+))$/g; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (value === '') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        callback(new Error('请输入大于等于0的数值!!!')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } else if(value==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        callback(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      else if (!regNumber.test(value)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        callback(new Error('只能大于等于0的数值!!!')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        callback(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      open: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       title: "编辑", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       model: "EDIT", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      loading: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      loadingText: '获取数据中...', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       activeName: '01', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 演员信息弹窗 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       performerVisible: false, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -143,8 +160,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       performerList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 演员上传图片索引 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       performerIndex: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      open: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      loading: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       form: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         id: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         chennelListForm: [] 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -157,7 +174,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         name: [{ required: true, message: "请输入模板名称", trigger: ["change","blur"] }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         auditoriumId: [{ required: true, message: "请选择演出厅", trigger: ["change","blur"] }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         chennelList: [{ required: true, message: "请输入库存模式", trigger: ["change","blur"] }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        remark: [{ required: true, message: "请输入备注", trigger: ["change","blur"] }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        remark: [{ required: false, message: "请输入备注", trigger: ["change","blur"] }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       statusList: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         {id: 1, name: '是', value: 1}, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -169,7 +186,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       chennelAtion: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       countBySeatTypList: [], //  座位类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      stockFormList: []// 库存 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      stockFormList: [],// 库存 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      dataList: [], // 座位 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      seatNum: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   created() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -177,7 +198,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.channelTypeFun() // 渠道 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    /** 查询主办方列表 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 演出厅列表 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       merchantPageList({pageNum: 1, pageSize: 100}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         .then(response => { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -191,28 +212,36 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param {any} obj 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @returns {any} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    async openDialog(title, obj) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.chennelAtion = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.open = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.activeName = '01'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if(this.channelTypeList.length<0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        await this.channelTypeFun() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (obj){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.title = "编辑库存模板"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        await this.getSelectByIdApi(obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.title = "添加库存模板"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.form = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          chennelListForm: this.setDataTree({}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    async openDialog(title, obj, mode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.model = mode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.loading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.loadingText = '获取数据中...' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.chennelAtion = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.open = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.activeName = '01'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(this.channelTypeList.length<0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          await this.channelTypeFun() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log("list====",this.form) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.setDictLabel(this.form.chennelListForm[0],0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (obj){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.title = "编辑库存模板"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          await this.getSelectByIdApi(obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.title = "添加库存模板"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.form = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            chennelListForm: this.setDataTree({}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log("list1====",this.form) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.setDictLabel(this.form.chennelListForm[0],0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$refs["form"].clearValidate(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.error("dfsdfdsf",error) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$refs["form"].clearValidate(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.loading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 获取详情 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     async getSelectByIdApi(row) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -225,8 +254,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           obj.chennelListForm = this.setDataTree(obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.form = obj 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.setDictLabel(obj.chennelListForm[0],0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log("list2====",this.form) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log("error====",error) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         console.error("error====",error) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -247,6 +278,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /**  获取模式  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getStockType(obj,data){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let stockType = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if(data.chennelList && data.chennelList.length>0) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -259,6 +291,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return stockType 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /**  获取总数  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getStockAllNum(obj,data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let num = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let flog = false 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -276,6 +309,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /**  获取座位类型对应的数量  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getSeatTypeList(obj,data){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let list1 = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.countBySeatTypList.forEach((item1,index1)=>{ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -295,17 +329,25 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return list1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /**  获取座位 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getChennelSeatList(obj,data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let list = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let seat = {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if(data.chennelList && data.chennelList.length>0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(let i = 0;i<data.chennelList.length;i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if(obj.channelType == data.chennelList[i].channelType) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            list = data.chennelList[i].chennelSeatList ? JSON.parse(JSON.stringify(data.chennelList[i].chennelSeatList)):[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(data.chennelList[i].chennelSeatList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              let srt = 'seat_'+ data.chennelList[i].seatTypeId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              seat[srt] ? seat[srt].push(...data.chennelList[i].chennelSeatList): seat[srt] = [...data.chennelList[i].chennelSeatList] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              console.log("seat_",seat,data.chennelList[i].chennelSeatList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //list = data.chennelList[i].chennelSeatList ? JSON.parse(JSON.stringify(data.chennelList[i].chennelSeatList)):[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      return list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return JSON.stringify(seat) == '{}' ? null : seat 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // setChennelList() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -328,6 +370,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs["form"].validate(async (valid,object) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.loading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.loadingText = '提交中...' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             console.log("this.form=====",this.form) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             let postMap = JSON.parse(JSON.stringify(this.form)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             postMap.chennelList = [] 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -338,7 +382,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 "channelName": this.form.chennelListForm[i].channelName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 "stockType": this.form.chennelListForm[i].stockType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              if(this.form.chennelListForm[i].stockType == 0 && this.form.chennelListForm[i].stockNum) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if(this.form.chennelListForm[i].stockType == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(this.form.chennelListForm[i].seatTypeList && this.form.chennelListForm[i].seatTypeList.length>0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   for(let j = 0;j< this.form.chennelListForm[i].seatTypeList.length;j++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if(this.form.chennelListForm[i].seatTypeList[j].stockNum) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -351,21 +395,39 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              }else if(this.form.chennelListForm[i].stockType == 1 && this.form.chennelListForm[i].stockNum){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                postMap.chennelList.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "id": null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "channelType": this.form.chennelListForm[i].channelType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "channelName": this.form.chennelListForm[i].channelName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "stockType": this.form.chennelListForm[i].stockType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "seatTypeId": null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "stockNum": this.form.chennelListForm[i].stockNum, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "chennelSeatList": this.form.chennelListForm[i].chennelSeatList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }else if(this.form.chennelListForm[i].stockType == 1 ){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(this.form.chennelListForm[i].chennelSeatList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  Object.keys(this.form.chennelListForm[i].chennelSeatList).forEach((item)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    postMap.chennelList.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      "id": null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      "channelType": this.form.chennelListForm[i].channelType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      "channelName": this.form.chennelListForm[i].channelName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      "stockType": this.form.chennelListForm[i].stockType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      "seatTypeId": item.replace("seat_", ""), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      "stockNum": this.form.chennelListForm[i].chennelSeatList[item].length, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      "chennelSeatList": this.form.chennelListForm[i].chennelSeatList[item] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             delete postMap.chennelListForm 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             console.log("postMap=====",postMap) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let res = await saveAndEdit(postMap) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.loading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(res.code) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.$message.success(res.msg || res.message|| "操作成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.$emit('getList') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.cancel() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.$message.error(error.msg || error.message|| "操作失败!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.loading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$message.error(error.msg || error.message|| "操作失败!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } finally { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.loading = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -404,7 +466,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     async countBySeatTypFun(value,type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.log("vlaue===",value) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$set(this.form,'seatNum','') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.seatNum = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.chennelAtion = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(!value) return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let res = await countBySeatTyp({auditoriumId: value}) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -412,7 +474,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         res.data.forEach((item,index)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           num = num + item.stock 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$set(this.form,'seatNum',num) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.seatNum = num 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.countBySeatTypList = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(!type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.form.chennelListForm = this.setDataTree({}) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -428,24 +490,77 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let res = await channelType({pageNum: 1, pageSize: 100}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.channelTypeList = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.error("dfsdfdsfsd====",error) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     setDictLabel(obj,index){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.chennelAtion = index 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(obj.stockType == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log('fsdfsdfsdfsdfsdfsdfsdfsfdsf') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.getSeatSelectById() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    setStockType(value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log('fsdfsdfsdfsdfsdfsdfsdfsfdsf======',value) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(value == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.getSeatSelectById() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /**  获取座位  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    async getSeatSelectById() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(!this.form.auditoriumId){  return } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(!this.dataList || this.dataList.length == 0 || this.dataList[0].auditoriumId !== this.form.auditoriumId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let res = await getSeatSelectByIdApi(this.form.auditoriumId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.dataList = res.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let list = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let list1 = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(this.form.chennelListForm[this.chennelAtion].chennelSeatList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Object.keys(this.form.chennelListForm[this.chennelAtion].chennelSeatList).forEach((item)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          list1.push(...this.form.chennelListForm[this.chennelAtion].chennelSeatList[item]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        list = this.dataList.filter((item,index)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(list1.includes(item.id)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return item 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log("dfsdfdsfdsf====",list,this.form.chennelListForm[this.chennelAtion].chennelSeatList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$nextTick(() =>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$refs.seatBox.querySeatListFun(true,this.dataList,list) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 选择座位  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    selectSeat(list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let obj = {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      list.forEach((item)=>{  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let srt = 'seat_'+ item.seatTypeId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         Array.isArray(obj[srt]) ? obj[srt].push(item.id): obj[srt] = [item.id] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.form.chennelListForm[this.chennelAtion].chennelSeatList = JSON.stringify(obj) == '{}'?null:obj 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log("已选择的====",list,this.form.chennelListForm[this.chennelAtion].chennelSeatList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <style lang="scss" scoped> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-.dialog { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  padding: 0 30px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  max-height: 65vh; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  overflow-y: auto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+.dialog-box { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  width: 100%; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  position: relative; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .dialog-loading { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    width: 100%; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    height: 100%; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    position: absolute; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    top: 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    left: 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 .dialog { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  padding: 0 30px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  max-height: 70vh; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  overflow-y: auto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   .upload-btn { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     width: 100px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     height: 100px; 
			 |