Browse Source

Merge branch 'master' of https://gogs.dev.dazesoft.cn/great_transition/great_webui

gcz 2 months ago
parent
commit
8f4bd98503

+ 2 - 2
src/api/team/teamMr.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 分页查询
 export const pageList = (query) => {
   return request({
-    url: '/member/marketTeam/pageList',
+    url: '/merchant/stockTmp/pageList',
     method: 'get',
     params: query
   })
@@ -12,7 +12,7 @@ export const pageList = (query) => {
 // 分页查询
 export const teamPageList = (query) => {
   return request({
-    url: '/member/marketTeam/pageList',
+    url: '/merchant/stockTmp/pageList',
     method: 'get',
     params: query
   })

+ 66 - 0
src/api/ticketMr/InventoryTemplate.js

@@ -0,0 +1,66 @@
+import request from '@/utils/request'
+
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/merchant/stockTmp/pageList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 新增/修改
+export const saveAndEdit = (data) => {
+  return request({
+    url: '/merchant/stockTmp/insertOrUpdate',
+    method: 'post',
+    data: data
+  })
+}
+
+// 详情
+export const getSelectById = (params) => {
+  return request({
+    url: '/merchant/stockTmp/selectById',
+    method: 'get',
+    params
+  })
+}
+// 删除模板
+export const deleteById = (params) => {
+  return request({
+    url: '/merchant/stockTmp/deleteById',
+    method: 'delete',
+    params
+  })
+}
+
+
+/**  发布  */
+export function releaseById(params) {
+  return request({
+    url: '/merchant/stockTmp/updateStatus',
+    method: 'get',
+    params
+  })
+}
+
+
+/**  获取座位可用数量  */
+export function countBySeatTyp(params) {
+  return request({
+    url: '/merchant/merchantAuditoriumSeat/countBySeatType',
+    method: 'get',
+    params
+  })
+}
+
+/**  获取渠道数据  */
+export function channelType(params) {
+  return request({
+    url: '/system/dict/data/type/channel_type',
+    method: 'get',
+    params
+  })
+}

+ 1 - 1
src/views/finance/Statements/StatementsIndexNew.vue

@@ -114,7 +114,7 @@
               <el-table-column label="交易总额(元)" align="center" width="200" prop="orderPrice" />
               <el-table-column label="核销金额(元)" align="center" width="200" prop="usePriceTotal" />
               <el-table-column label="应到账金额(元)" align="center" width="200" prop="realPrice" />
-              <el-table-column label="分销金额(元)" align="center" width="200" prop="retailPriceTotal" />
+              <el-table-column label="佣金(元)" align="center" width="200" prop="retailPriceTotal" />
               <el-table-column label="费率(%)" align="center" width="200" prop="withdrawRate" />
               <el-table-column label="手续费(元)" align="center" width="200" prop="proceMoney" />
               <el-table-column label="退款金额(元)" align="center" width="200" prop="refundPriceTotal" />

+ 2 - 2
src/views/finance/Statements/quickReconciliation.vue

@@ -50,8 +50,8 @@
             <el-table-column label="核销金额(元)" align="center" prop="usePriceTotal" width="200" />
             <el-table-column label="应到账金额(元)" align="center" prop="realPrice" width="200" />
             <el-table-column label="分销金额(元)" align="center" prop="retailPriceTotal" width="200" />
-            <el-table-column label="费率(%)" align="center" prop="withdrawRate" width="200" />
-            <el-table-column label="手续费(元)" align="center" prop="proceMoney" width="200" />
+            <!-- <el-table-column label="费率(%)" align="center" prop="withdrawRate" width="200" />
+            <el-table-column label="手续费(元)" align="center" prop="proceMoney" width="200" /> -->
             <el-table-column label="退款人数(个)" align="center" prop="refundViewerTotal" width="200" />
             <el-table-column label="退款金额(元)" align="center" prop="refundPriceTotal" width="200" />
             <el-table-column label="提现金额(元)" align="center" prop="withdrawPriceTotal" width="200" />

+ 267 - 0
src/views/ticket/InventoryTemplate/dialog/FreightMgrIndexMi.js

@@ -0,0 +1,267 @@
+import { basePositionApi } from '@/api/ticketMr/ticketMr'
+export default {
+    data() {
+        return {
+            selectDeliveryAreaDialogList:[], // 全部数据
+            selectDeliveryAreaDialogOpen: false, // 是否显示弹窗
+            selectDeliveryAreaDialogTitle: '可售区域',
+
+            selectCityListLoading: false,
+
+            provinceIndex: -1,
+            initSelectData: {} // 回显载体
+        }
+    },
+    created() {
+        
+    },
+    methods: {
+        handleChangeProvince(){
+            
+        },
+        /**
+         * 打开 可售区域配置
+         */
+        deliverableAreaDialogCancel(data) {
+            let obj = {}
+            
+            this.selectCityListLoading = false
+
+            this.provinceIndex = -1
+            this.initSelectData = {}
+
+            if(data && data.length>0) {
+                data.forEach((item,index)=>{
+                    let list = item.split('-')
+                    if(obj[list[0]] && list[1]){
+                        obj[list[0]].push([list[1]])
+                    }else {
+                        obj[list[0]] = []
+                        if(list[1]){
+                            obj[list[0]].push([list[1]])
+                        }
+                    }
+                })
+            }
+            console.log('obj====',data,obj)
+            this.initSelectData = obj
+            this.selectDeliveryAreaDialogOpen = true;
+            this.basePositionFun("#")
+        },
+        /** 关闭弹窗  */
+        selectDeliveryAreaDialogCancel(){
+            this.selectDeliveryAreaDialogOpen = false;
+        },
+        /**  确认弹窗  */
+        selectDeliveryAreaDialogSubmitForm(){
+            let list = []
+            this.selectDeliveryAreaDialogList.forEach((item)=>{
+                if(item.selected){
+                    list.push(item.name)
+                }else if(item.selectCityList && item.selectCityList.length>0) {
+                    item.selectCityList.forEach((item1,index1)=>{
+                        console.log("item1===",item1)
+                        list.push(item.name+'-'+item1.join('-'))
+                    })
+                    
+                }
+            })
+            this.form.saleArea = list
+            this.selectDeliveryAreaDialogOpen = false
+            console.log("list====",list)
+        },
+        /**  初次获取行政区划  */
+        async basePositionFun(upCode) {
+            try {
+                this.selectCityListLoading = true
+                let res = await basePositionApi({
+                    upCode,
+                })
+                if(res.code == 200) {
+                    let list = []
+                    let listApi = []
+                    res.data.forEach((item,index) => {
+                        if(item.code!='#') {
+                            list.push({
+                                ...item,
+                                countyList: [],
+                                selected: this.initChekeSelectAll(item),
+                                selectCityList: this.initSelectData[item.name] ?this.initSelectData[item.name] : [] ,
+                                cityList: []
+                            })
+                            listApi.push(basePositionApi({
+                                upCode: item.code?item.code : '#',
+                            }))
+                        }
+                        
+                    });
+                    let res1 = await Promise.all(listApi)
+                    if(res1) {
+                        res1.forEach((item,index)=>{
+                            let list1 = []
+                            item.data.forEach((item1,index1)=>{
+                                list1.push({
+                                    ...item1,
+                                    //countyList: [],
+                                    //leaf: true,
+                                })
+                            })
+                            list[index].cityList = [].concat(list1)
+                        })
+                    }
+                    
+                    this.selectDeliveryAreaDialogList = [].concat(list)
+                    console.log("res1=====",res1,this.selectDeliveryAreaDialogList)
+                }
+                this.selectCityListLoading = false
+            } catch (error) {
+                console.error("error====",error)
+                this.selectCityListLoading = false
+            }
+        },
+         /**  懒加载 配置   */
+        areaCascaderProps(areaItem, areaIndex) {
+            return {
+              lazy: false,
+              lazyLoad: (node, resolve) => this.areaLazyLoad(node, resolve, areaItem, areaIndex),
+              multiple: true,
+              children: 'countyList',
+              label: 'name',
+              value: 'name',
+              expandTrigger: 'hover',
+              // emitPath: false,
+            };
+        },
+        /**  懒加载 函数   */
+        areaLazyLoad(node, resolve, areaItem, provinceIndex) {
+            const { level } = node;
+            // console.log(node, resolve, areaItem, provinceIndex)
+            if (level === 0) {
+              resolve([])
+            } else if(level == 1 ) {
+                console.log(node, resolve, areaItem, provinceIndex)
+                if(node.data && node.data.code){
+                    if(node.data.countyList) {
+                        let list = []
+                        node.data.countyList.forEach((item,index)=>{
+                            list.push({
+                                ...item,
+                                leaf: true,
+                            })
+                        })
+                        resolve(list)
+                    }
+                    // basePositionApi({
+                    //     upCode: node.data.code,
+                    // }).then((res)=>{
+                    //     let list = []
+                    //     res.data.forEach((item,index)=>{
+                    //         list.push({
+                    //             ...item,
+                    //             leaf: true,
+                    //         })
+                    //     })
+                    //     resolve(list)
+                    // })
+                }else {
+                    resolve([])
+                }   
+            }else {
+                resolve([])
+            }
+        },
+        // 当选中节点变化时触发
+        changeCascader(data){
+            console.log("data===",data)
+           // console.log('selectDeliveryAreaDialogList====',this.selectDeliveryAreaDialogList)
+            this.chekeSelectAll(this.provinceIndex)
+        },
+        // 下拉框出现/隐藏时触发
+        async handleCascaderVisibleChangeCity(isVisible, areaItem, provinceIndex){
+            this.provinceIndex = provinceIndex
+            if (isVisible) {
+                const loading = this.$loading({
+                    lock: true,
+                    text: 'Loading',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(0, 0, 0, 0.7)',
+                    customClass: 'custom-class-box'
+                });
+                try {
+                    console.log('this.selectDeliveryAreaDialogList1111====',this.selectDeliveryAreaDialogList)
+                    if(false && isVisible && this.selectDeliveryAreaDialogList[provinceIndex].cityList[0].countyList.length==0){
+                        
+                        console.log(isVisible, areaItem, provinceIndex)
+    
+                        let listApi = []
+                        areaItem.cityList.forEach((item,index)=>{
+                            listApi.push(basePositionApi({
+                                upCode: item.code?item.code : '#',
+                            }))
+                        })
+                        let res1 = await Promise.all(listApi)
+                        console.log("res1====",res1)
+                        if(res1) {
+                            res1.forEach((item,index)=>{
+                                this.$set(this.selectDeliveryAreaDialogList[provinceIndex].cityList[index],'countyList',item.data)
+                            })
+                        }
+                    }
+                    loading.close();
+                    if(isVisible && areaItem.selected){
+                        this.$nextTick(()=>{
+                            // let list = [['市辖区']]
+                            // this.$set(this.selectDeliveryAreaDialogList[provinceIndex],'selectCityList',list)
+                            // console.log('this.selectDeliveryAreaDialogList1111====',this.selectDeliveryAreaDialogList)
+                            this.setSelectAll(isVisible, areaItem, provinceIndex)
+                        })
+                        
+                    }
+                } catch (error) {
+                    loading.close();
+                    console.error("error=====",error)
+                }
+            }
+           
+            
+        },
+        /**  全选状态  */
+        setSelectAll(isVisible, areaItem, provinceIndex){
+            this.$nextTick(()=>{
+                let list = []
+                this.selectDeliveryAreaDialogList[provinceIndex].cityList.forEach((item,index)=>{
+                    if(item.countyList && item.countyList.length > 0) {
+                        item.countyList.forEach((item1,index1)=>{
+                            list.push([item.name,item1.name])
+                        })
+                    }else {
+                        list.push([item.name])
+                    }
+                })
+                this.$set(this.selectDeliveryAreaDialogList[provinceIndex],'selectCityList',list)
+                //console.log('this.selectDeliveryAreaDialogList1111====',this.selectDeliveryAreaDialogList)
+            })
+        },
+        /** 点击选中时 判断是否全选  */
+        chekeSelectAll(provinceIndex){
+            let flog = true
+            this.selectDeliveryAreaDialogList[provinceIndex].cityList.forEach((item,index)=>{
+                if(this.selectDeliveryAreaDialogList[provinceIndex].selectCityList.every((currentValue)=> !currentValue.includes(item.name)) ) {
+                    flog = false
+                }
+            })
+            this.selectDeliveryAreaDialogList[provinceIndex].selected = flog
+            console.log("provinceIndex====",provinceIndex)
+            console.log("flog====",flog)
+            console.log('this.selectDeliveryAreaDialogList1111====',this.selectDeliveryAreaDialogList)
+        },
+        /** 点击选中时 判断是否全选  */
+        initChekeSelectAll(item){
+            if(this.initSelectData[item.name] && this.initSelectData[item.name].length == 0) {
+                return true
+            }else {
+                return false
+            }
+        },
+    }
+}

+ 600 - 0
src/views/ticket/InventoryTemplate/dialog/addAndEdit.vue

@@ -0,0 +1,600 @@
+<!--
+ * @Description: 新增/编辑弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: gcz
+ * @LastEditTime: 2024-04-22 16:20:30
+ * @FilePath: \great_webui\src\views\ticket\ticketMr\dialog\addAndEdit.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="95%"
+    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>
+              <div v-else>
+
+              </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>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        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)"
+      >
+        <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 { merchantPageList } from '@/api/performanceHallMr/performanceHallMr'
+export default {
+  name: "addAndEdit",
+  dicts: ['system_taxrate'],
+  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 {
+      title: "编辑",
+      model: "EDIT",
+      activeName: '01',
+      // 演员信息弹窗
+      performerVisible: false,
+      // 演员信息
+      performerList: [],
+      // 演员上传图片索引
+      performerIndex: 0,
+      open: false,
+      loading: false,
+      form: {
+        id: undefined,
+        chennelListForm: []
+      },
+      formStock: {
+        stockType: null,
+        chennelList: [],
+      },
+      rules: {
+        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"] }],
+      },
+      statusList: [
+        {id: 1, name: '是', value: 1},
+        {id: 2, name: '否', value: 2},
+      ],
+      performList: [], // 演出厅
+      channelTypeList: [], // 渠道
+      dictValue: '', 
+      chennelAtion: null,
+      countBySeatTypList: [], //  座位类型
+
+      stockFormList: []// 库存
+    };
+  },
+  created() {
+    this.getList()// 演出厅
+    this.channelTypeFun() // 渠道
+  },
+  methods: {
+    /** 查询主办方列表 */
+    getList() {
+      merchantPageList({pageNum: 1, pageSize: 100})
+        .then(response => {
+            this.performList = response.data.rows;
+          }
+        );
+    },
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @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({})
+        }
+        console.log("list====",this.form)
+        this.setDictLabel(this.form.chennelListForm[0],0)
+      }
+      this.$nextTick(() => {
+        this.$refs["form"].clearValidate();
+      });
+    },
+    /** 获取详情 */
+    async getSelectByIdApi(row) {
+      try {
+        const id = row.id
+        let res = await getSelectById({id})
+        if(res.code == 200) {
+          let obj = res.data;
+          await this.countBySeatTypFun(obj.auditoriumId,true)
+          obj.chennelListForm = this.setDataTree(obj)
+          this.form = obj
+          this.setDictLabel(obj.chennelListForm[0],0)
+        }
+      } catch (error) {
+        console.error("error====",error)
+      }
+      
+    },
+    setDataTree(obj){
+      let list = []
+      this.channelTypeList.forEach((item,index)=>{
+        list.push({
+          "channelType":item.dictValue,
+          "channelName":item.dictLabel,
+          "stockType": this.getStockType(item,obj),
+          "stockNum": this.getStockAllNum(item,obj),
+          "seatTypeList": [],
+          "chennelSeatList": []
+        })
+        list[index].seatTypeList = this.getSeatTypeList(list[index],obj)
+        list[index].chennelSeatList = this.getChennelSeatList(list[index],obj)
+      })
+      return list
+    },
+    getStockType(obj,data){
+      let stockType = 0
+      if(data.chennelList && data.chennelList.length>0) {
+        for(let i = 0;i < data.chennelList.length;i++) {
+          if(obj.dictValue == data.chennelList[i].channelType) {
+            stockType = data.chennelList[i].stockType
+            break;
+          }
+        }
+      }
+      return stockType
+    },
+    getStockAllNum(obj,data) {
+      let num = 0
+      let flog = false
+      if(data.chennelList && data.chennelList.length>0) {
+        data.chennelList.forEach((item,index)=>{
+          if(obj.dictValue == item.channelType) {
+            flog = true
+            num = num + item.stockNum
+          }
+        })
+      }
+      if(flog) {
+        return num
+      }else {
+        return ''
+      }
+    },
+    getSeatTypeList(obj,data){
+      let list1 = []
+      this.countBySeatTypList.forEach((item1,index1)=>{
+        list1.push({
+          "seatTypeId": item1.seatTypeId,
+          "seatTypeName": item1.seatTypeName,
+          "stockNum": '',
+          "stock": item1.stock,
+        })
+        if(obj.stockType == 0 && data.chennelList && data.chennelList.length>0) {
+          data.chennelList.forEach((item2,index2)=>{
+            if(item1.seatTypeId == item2.seatTypeId && obj.stockType == item2.stockType && obj.channelType == item2.channelType ) {
+              list1[index1].stockNum = item2.stockNum
+            }
+          })
+        }
+      })
+      return list1
+    },
+    getChennelSeatList(obj,data) {
+      let list = []
+      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)):[]
+            break;
+          }
+        }
+      }
+      return list
+    },
+    
+    // setChennelList() {
+
+    // },
+    /** 价格输入事件 */
+    changePriceAmount(key) {
+      if(this.form[key] * 1 < 0){
+        this.$message.error("输入需大于或等于0!");
+        this.$set(this.form, key, '');
+        return false
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(async (valid,object) => {
+        if (valid) {
+          try {
+            console.log("this.form=====",this.form)
+            let postMap = JSON.parse(JSON.stringify(this.form))
+            postMap.chennelList = []
+            for(let i = 0; i< this.form.chennelListForm.length ;i++) {
+              let obj = {
+                "id": null,
+                "channelType": this.form.chennelListForm[i].channelType,
+                "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].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) {
+                      postMap.chennelList.push({
+                        ...obj,
+                        "seatTypeId": this.form.chennelListForm[i].seatTypeList[j].seatTypeId,
+                        "stockNum": this.form.chennelListForm[i].seatTypeList[j].stockNum,
+                        "chennelSeatList":null
+                      })
+                    }
+                  }
+                }
+              }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
+                  })
+              }
+            }
+            delete postMap.chennelListForm
+            console.log("postMap=====",postMap)
+          } catch (error) {
+          } finally {
+            this.loading = false;
+          }
+        }else{
+          // console.log('error submit!!',valid,object);
+          if(object&&JSON.stringify(object) != '{}'){
+            let str = ''
+            for(let key in object){
+              if(object.hasOwnProperty(key)){
+                str = str + `[${object[key][0].message}]}]`
+              }
+            }
+            this.$message.error(str);
+          }
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+     
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.open = false;
+      this.chennelAtion = null
+    },
+    /** 获取座位可用数量  */
+    async countBySeatTypFun(value,type) {
+      console.log("vlaue===",value)
+      try {
+        this.$set(this.form,'seatNum','')
+        this.chennelAtion = null
+        if(!value) return
+        let res = await countBySeatTyp({auditoriumId: value})
+        let num = 0
+        res.data.forEach((item,index)=>{
+          num = num + item.stock
+        })
+        this.$set(this.form,'seatNum',num)
+        this.countBySeatTypList = res.data
+        if(!type) {
+          this.form.chennelListForm = this.setDataTree({})
+          this.setDictLabel(this.form.chennelListForm[0],0)
+        }
+      } catch (error) {
+        console.error("error1====",error)
+      }
+    },
+    /** 获取渠道数据  */
+    async channelTypeFun() {
+      try {
+        let res = await channelType({pageNum: 1, pageSize: 100})
+        this.channelTypeList = res.data
+      } catch (error) {
+        
+      }
+    },
+    setDictLabel(obj,index){
+      this.chennelAtion = index
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 30px;
+  max-height: 65vh;
+  overflow-y: auto;
+}
+.dialog {
+  padding: 0 30px;
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+.el-table{
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+.inventory_box{
+  width: 100%;
+  border: 1px solid #ccc;
+  min-height: 400px;
+  padding: 10px;
+  box-sizing: border-box;
+  display: flex;
+  flex-shrink: 0;
+  .inventory_channel {
+    width: 200px;
+    >div {
+      width: 100%;
+      box-sizing: border-box;
+      >span {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border-right: 1px solid #333;
+      }
+      >span:nth-child(1) {
+        width: 40px;
+      }
+      >span:nth-child(2) {
+        flex: auto;
+      }
+      >span:nth-child(3) {
+        width: 50px;
+      }
+
+    }
+    .inventory_channel_header {
+      width: 100%;
+      height: 40px;
+      display: flex;
+      background-color: #ccc;
+      border-bottom: 1px solid #333;
+      border-top: 1px solid #333;
+      border-left: 1px solid #333;
+      
+    }
+
+    .inventory_channel_item {
+      width: 100%;
+      display: flex;
+      height: 40px;
+      cursor: pointer;
+      border-bottom: 1px solid #333;
+      border-left: 1px solid #333;
+    }
+    .inventory_channel_item:hover {
+      background-color: rgba(135, 206, 235,0.6);
+    }
+    .inventory_channel_item-action {
+      background-color: rgba(135, 206, 235,0.6);
+    }
+  }
+
+  .inventory_seat {
+    flex: auto;
+    padding-left: 20px;
+    box-sizing: border-box;
+  }
+}
+
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 223 - 0
src/views/ticket/InventoryTemplate/dialog/details.vue

@@ -0,0 +1,223 @@
+<!--
+ * @Description: 详情弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 2023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\ticket\ticketMr\dialog\details.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    title="票务详情"
+    :visible.sync="open"
+    width="700px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog" v-if="form">
+      <!--   基础信息   -->
+      <div class="title-class" style="margin-top: 0">基础信息</div>
+      <el-row>
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">票务名称: <span>{{ form.goodsName }}</span></div>
+        </el-col>
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">散客是否实名: <span>{{ form.goodsPerform && (form.goodsPerform.ifRealUser==1?'是':form.goodsPerform.ifRealUser==0?'否':'-') }}</span></div>
+        </el-col>
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">团购是否实名: <span>{{ form.goodsPerform && (form.goodsPerform.ifRealTeam==1?'是':form.goodsPerform.ifRealTeam==0?'否':'-') }}</span></div>
+        </el-col>
+        <!-- <el-col :span="12" v-if="form.goodsPerform && (form.goodsPerform.ifRealTeam == 1 || form.goodsPerform.ifRealUser == 1)">
+          <div class="grid-content bg-purple item-class">实名要求: <span>{{ form.goodsPerform && (form.goodsPerform.oneMany==1?'一证一人':form.goodsPerform.oneMany==2?'一证多人':'-') }}</span></div>
+        </el-col>
+        <el-col :span="12" v-if="form.goodsPerform && (form.goodsPerform.ifRealTeam == 1 || form.goodsPerform.ifRealUser == 1)">
+          <div class="grid-content bg-purple item-class">包含人数(人): <span>{{ form.goodsPerform && form.goodsPerform.personnelNum }}</span></div>
+        </el-col> -->
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">证件要求: <span>{{ form.goodsPerform && (form.goodsPerform.oneMany==1?'一证一人':form.goodsPerform.oneMany==2?'一证多人':'-') }}</span></div>
+        </el-col>
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">包含人数(人): <span>{{ form.goodsPerform && form.goodsPerform.personnelNum }}</span></div>
+        </el-col>
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">停止售卖时间: <span>开演前{{ form.goodsPerform && form.goodsPerform.stopSaleTime }}分钟内</span></div>
+        </el-col>
+        <el-col :span="12" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">票务说明: <span>{{ form.goodsPerform.detail || '' }}</span></div>
+        </el-col>
+      </el-row>
+
+      <!--   演出信息   -->
+      <div class="title-class">销售信息</div>
+      <el-row>
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">销售价: <span>{{ form.salePrice + '元' || '' }}</span></div>
+        </el-col>
+        <!-- <el-col :span="24">
+          <div class="grid-content bg-purple item-class">销售有效期: <span>{{ 
+            form.goodsPerform && form.goodsPerform.saleBeginTime && form.goodsPerform.saleEndTime ? 
+            form.goodsPerform.saleBeginTime +'--'+ form.goodsPerform.saleEndTime :
+            '-'
+          }}</span></div>
+        </el-col> -->
+        <el-col :span="12" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">
+            是否限购:
+            <span>{{ form.goodsPerform.buyAstrict == -1 ? '不限制' : '限售数量' }}</span>
+            <span v-if="form.goodsPerform.buyAstrict > -1">每个账号在每个场次限购{{ form.goodsPerform.buyAstrict }}</span>
+          </div>
+        </el-col>
+        <el-col :span="24" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">售票渠道: <span>{{ 
+          (form.goodsPerform.channelWx == 0 ? '小程序,' : '')
+           + ' ' + 
+           (form.goodsPerform.channelWindow == 0 ? '窗口,' : '')
+           + ' ' + 
+           (form.goodsPerform.channelAutoSale == 0 ? '自助售/取票机,' : '')
+           + ' ' + 
+           (form.goodsPerform.channelPersonSale == 0 ? '小程序-分销' : '')
+           }}</span></div>
+        </el-col>
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">税率: <span>{{ form.taxRate }}</span></div>
+        </el-col>
+        <el-col :span="24" v-if="form.goodsPerform">
+          <div style="width: 100%;height: 100px;overflow: hidden;overflow-y: auto;background-color: rgba(204, 204, 204,0.3);padding: 5px;box-sizing: border-box;border-radius: 10px;">
+            <div style="padding: 0 10px;" class="grid-content bg-purple item-class">可售渠道: </div>
+            <div v-if="form.saleArea">
+              <el-tag :key="index" style="margin-left: 5px;margin-bottom: 5px;" v-for="(item,index) in form.saleArea" >{{ item }}</el-tag>
+            </div>  
+          </div>
+        </el-col>
+      </el-row>
+
+      <!--   观影须知   -->
+      <div class="title-class">退票信息</div>
+      <el-row>
+        <el-col :span="24" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">
+            是否支持退票:
+            <span>{{ form.goodsPerform.backStatus == 1 ? '不可退' : '可退' }}</span>
+            <span v-if="form.goodsPerform.backStatus == 0">(按购买日期结算, 提前{{ form.performRefundRule.days }}天{{ form.performRefundRule.hour }}时可退)</span>
+          </div>
+        </el-col>
+      </el-row>
+
+      <!--   核销信息   -->
+      <div class="title-class">核销信息</div>
+      <el-row>
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">核销时间: <span>开演前{{ form.goodsPerform && form.goodsPerform.beforeTime }}分钟内</span></div>
+        </el-col>
+        <el-col :span="12" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">核销播报次数: <span>{{ form.goodsPerform.verificationSpeaker + '次' || '' }}</span></div>
+        </el-col>
+        <el-col :span="12" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">核销凭证: 
+            <el-tag v-if="form.goodsPerform.verificationQrcode == 0">电子核销码</el-tag>
+            <el-tag style="margin-left: 10px;" v-if="form.goodsPerform.verificationIdcard == 0">身份证</el-tag>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+
+
+    <span slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="cancel">确定</el-button>
+    </span>
+
+  </el-dialog>
+</template>
+
+<script>
+import { getSelectById } from "@/api/ticketMr/ticketMr";
+import Editor from "@/components/Editor";
+export default {
+  name: "detailsDia",
+  components: {
+    Editor,
+  },
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      form: {
+        id: undefined,
+      },
+      performerVisible: false,
+      performerList: []
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj) {
+      this.open = true;
+      if (obj){
+        this.getSelectByIdApi(obj)
+      }
+    },
+    /** 获取详情 */
+    getSelectByIdApi(row) {
+      const id = row.id
+      getSelectById(id).then(response => {
+        this.form = response.data;
+      });
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.open = false;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 30px;
+  max-height: 65vh;
+  overflow-y: auto;
+}
+.dialog {
+  padding: 0 30px;
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+  .title-class{
+    font-size: 16px;
+    font-weight: bold;
+    color: black;
+    margin-bottom: 20px;
+    margin-top: 20px;
+  }
+  .item-class{
+    margin-bottom: 20px;
+  }
+}
+</style>

+ 244 - 0
src/views/ticket/InventoryTemplate/index.vue

@@ -0,0 +1,244 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="模板名称">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入模板名称"
+          clearable
+          style="width: 240px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="创建人">
+        <el-input
+          v-model="queryParams.createBy"
+          placeholder="请输入创建人"
+          clearable
+          style="width: 240px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="最后修改人" label-width="100px">
+        <el-input
+          v-model="queryParams.updateBy"
+          placeholder="请输入最后修改人"
+          clearable
+          style="width: 240px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd"
+              v-hasPermi="['ticketMr:InventoryTemplate:add']"
+            >新增</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table ref="tables" v-loading="loading" :data="dataList" border>
+      <el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
+      <el-table-column label="模板名称" align="center" prop="name" />
+      <el-table-column label="创建人" align="center" prop="createBy"></el-table-column>
+      <el-table-column label="创建时间" align="center" prop="createTime"></el-table-column>
+      <el-table-column label="最后修改人" align="center" prop="updateBy"></el-table-column>
+      <el-table-column label="最后修改时间" align="center" prop="updateTime"></el-table-column>
+      <el-table-column label="备注" align="center" prop="remark"></el-table-column>
+      <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="openDetails(scope.row)"
+            v-if="checkPermi(['ticketMr:InventoryTemplate:details'])"
+          >详情</el-button>
+          <el-button
+              size="mini"
+              type="text"
+              style="margin-left: 10px;"
+              @click="handleRelease(scope.row)"
+              v-if="checkPermi(['ticketMr:InventoryTemplate:release'])"
+            >{{ scope.row.status == 1 ? '取消发布' : '发布' }}</el-button>
+          <el-button
+              size="mini"
+              type="text"
+              style="margin-left: 10px;"
+              @click="handleUpdate(scope.row)"
+              v-if="checkPermi(['ticketMr:InventoryTemplate:edit'])"
+            >修改</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              style="margin-left: 10px;"
+              v-if="checkPermi(['ticketMr:InventoryTemplate:delete'])"
+              @click="handleDelete(scope.row,scope.index)"
+            >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 新增/编辑弹框 -->
+    <add-and-edit
+      ref="addAndEdit"
+      @getList="getList"
+    />
+
+    <!-- 详情 -->
+    <details-dia ref="detailsDia"></details-dia>
+
+  </div>
+</template>
+
+<script>
+
+import { pageList, deleteById, releaseById } from '@/api/ticketMr/InventoryTemplate'
+import addAndEdit from "./dialog/addAndEdit";
+import detailsDia from "./dialog/details.vue";
+import { checkPermi } from "@/utils/permission"
+export default {
+  name: "agreement",
+  dicts: ['agreement_type'],
+  components: { addAndEdit, detailsDia },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      dataList: null,
+      // 弹出层标题
+      title: "",
+
+      // 是否显示弹出层
+      open: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        type: undefined,
+        goodsType: 2,
+        classifyId: 1
+      },
+      statusList: [
+        {id: 1, name: '未发布', value: 0},
+        {id: 2, name: '发布', value: 1},
+        {id: 3, name: '下架', value: 2},
+      ],
+      visibleStatus: false,
+      newObj: {},
+      visibleType: ''
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    checkPermi,
+    /** 查询列表 */
+    getList() {
+      this.loading = true;
+      pageList(this.addDateRange(this.queryParams, this.dateRange))
+      .then(response => {
+          this.dataList = response.data.rows;
+          this.dataList.forEach(item =>{
+            item.switchValue = item.status;
+          })
+          this.total = response.data.total;
+          this.loading = false;
+        }
+      );
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.$set(this.queryParams, 'goodsName', '');
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.$refs["addAndEdit"].openDialog("新增数据", null);
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.$refs["addAndEdit"].openDialog("修改数据", row);
+    },
+    /** 详情按钮操作 */
+    openDetails(row) {
+      this.$refs["detailsDia"].openDialog("详情", row);
+    },
+
+    // 修改是否启用
+    changeStatus(row) {
+      console.log(row)
+    },
+    // 发布
+    handleRelease(row) {
+      this.$modal.confirm(`是否确认${row.status == 1 ? '取消发布' : '发布'}"${row.name} "?`).then(function() {
+        return releaseById({
+          id:row.id,
+          status: row.status == 1 ? 0 : 1
+        });
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("发布成功");
+      }).catch(() => {});
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      this.$modal.confirm('是否确认删除"' + row.goodsName + '"?').then(function() {
+        return deleteById({id:row.id});
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 查看按钮操作 */
+    seeCenter(obj, type) {
+      this.visibleStatus = true
+      this.visibleType = type;
+      this.newObj = obj;
+    }
+  }
+};
+</script>

+ 1 - 1
src/views/windowTicketSales/model/increaseViewersNew.vue

@@ -410,7 +410,7 @@ import {
                         name: '', // 姓名
                         mobile: '', // 电话
                         idcard: '', // 身份证
-                        identity: '', // 观影人身份
+                        identity: 0, // 观影人身份
                         remark: '', // 备注信息
                         salePrice: this.oneMany == 2 || (this.oneMany == 1 && this.personnelNum != 0)  ? index == 0 ? perform.money  : 0 : perform.money, // 原价
                         realPrice: this.oneMany == 2 || (this.oneMany == 1 && this.personnelNum != 0)  ? index == 0 ? perform.money  : 0 : perform.money, // 实收金额