MONSTER-ygh 2 miesięcy temu
rodzic
commit
cc44c5aaa7

+ 9 - 0
src/api/priceConfiguration/index.js

@@ -53,4 +53,13 @@ export const updateById = (data) => {
     method: 'put',
     data
   })
+}
+
+// 绑定团队
+export const bindTeamApi = (data) => {
+  return request({
+    url: '/merchant/priceInfo/bindTeam',
+    method: 'post',
+    data
+  })
 }

+ 102 - 33
src/views/wxapp/priceConfiguration/dialog/addAndEdit.vue

@@ -18,13 +18,14 @@
     @close="cancel"
   >
     <div class="dialog">
-      <el-form :model="form" ref="form" :rules="rules" label-width="120px">
+      <el-form :model="form" ref="form" :rules="rules" label-width="140px">
         <el-form-item label="票务名称:" prop="goodsId">
           <el-select
             v-model="form.goodsId"
             placeholder="票务名称"
             clearable
             style="width: 350px"
+            @change="selectGoodsId"
           >
             <el-option
               v-for="dict in goodsPageListS"
@@ -45,14 +46,14 @@
           >
             <el-option
               v-for="dict in seatTypeListS"
-              :key="dict.id"
-              :value="dict.id"
-              :label="dict.name"
+              :key="dict.seatTypeId"
+              :value="dict.seatTypeId"
+              :label="dict.seatTypeName"
             >
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="日期范围:"  prop="performDate">
+        <el-form-item label="日期范围:" v-if="!['group'].includes(channelType)" prop="performDate">
           <el-date-picker
             v-model="form.performDate"
             type="daterange"
@@ -62,7 +63,7 @@
             end-placeholder="结束日期">
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="星期:" prop="weekType">
+        <el-form-item label="星期:" v-if="!['group'].includes(channelType)" prop="weekType">
           <div>
             <el-button 
             @click="selectWeekType()"
@@ -75,11 +76,36 @@
           </div>
           <div style="font-size: 12px;">指定在选定区间内的周几价格进行调整,列如区间选择2018-01-01至2018-01-20,星期选择星期一,则这个区间内的星期一价格都进行调整</div>
         </el-form-item>
-        <el-form-item label="划线价:" prop="originalAmount">
-          <el-input v-model="form.originalAmount"  style="width: 350px"></el-input>
+        <div v-if="['group'].includes(channelType)">
+          <el-form-item label="成团要求:" prop="touristLimit">
+            <el-radio-group v-model="form.touristLimit" @input="selectTouristLimit">
+              <el-radio :label="0">不限</el-radio>
+              <el-radio :label="1">限制最低人数</el-radio>
+              <el-radio :label="2">限制人数范围</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item v-if="form.touristLimit == 1 || form.touristLimit == 2" label="游客限制最小值:" prop="touristMin">
+            <el-input-number v-model="form.touristMin" :step="1" :precision="0" style="width: 350px"></el-input-number>
+            人
+          </el-form-item>
+          <el-form-item v-if="form.touristLimit == 2" label="游客限制最大值:" prop="touristMax">
+            <el-input-number v-model="form.touristMax" :step="1" :precision="0" style="width: 350px"></el-input-number>
+            人
+          </el-form-item>
+        </div>
+        
+
+        <el-form-item v-if="!['window','group'].includes(channelType)" label="划线价:" prop="originalAmount">
+          <el-input-number v-model="form.originalAmount" :step="1" :precision="0" style="width: 350px"></el-input-number>
+          元
+        </el-form-item>
+        <el-form-item :label="setSaleAmounttile()" prop="saleAmount">
+          <el-input-number v-model="form.saleAmount" :step="1" :precision="0" style="width: 350px"></el-input-number>
+          {{ !['group'].includes(channelType) ? '元':'元/人' }}
         </el-form-item>
-        <el-form-item label="销售价:" prop="saleAmount">
-          <el-input v-model="form.saleAmount"  style="width: 350px"></el-input>
+        <el-form-item v-if="channelType == 'retail'" label="佣金:" prop="retailAmount">
+          <el-input-number v-model="form.retailAmount" :step="1" :precision="0" style="width: 350px"></el-input-number>
+          元
         </el-form-item>
         <el-form-item label="备注:" prop="remark">
           <el-input v-model="form.remark" type="textarea" maxlength="50" show-word-limit></el-input>
@@ -106,10 +132,14 @@
 <script>
 import { saveAndEdit } from "@/api/priceConfiguration/index";
 import { pageList as goodsPageListApi } from '@/api/ticketMr/ticketMr'
-import { pageList as seatTypeListApi } from '@/api/seatTypeMr/seatTypeMr'
 import moment from "moment"
 export default {
   name: "addAndEdit",
+  props: {
+    channelType: {
+      type: [String]
+    }
+  },
   data() {
     return {
       title: "编辑",
@@ -128,8 +158,13 @@ export default {
         weekType: [{ required: true, message: "请选择星期", trigger: ["change","blur"] }],
         seatTypeId: [{ required: true, message: "请选择票档名称", trigger: ["change","blur"] }],
         originalAmount: [{ required: true, message: "请输入划线价", trigger: ["change","blur"] }],
-        saleAmount: [{ required: true, message: "请输入销售价", trigger: ["change","blur"] }],
+        saleAmount: [{ required: true, message: "请输入价格", trigger: ["change","blur"] }],
+        retailAmount: [{ required: true, message: "请输入佣金", trigger: ["change","blur"] }],
         remark: [{ required: false, message: "请输入备注", trigger: ["change","blur"] }],
+      
+        touristLimit: [{ required: true, message: "请选择成团要求", trigger: ["change","blur"] }],
+        touristMin: [{ required: true, message: "请输入游客限制最小值", trigger: ["change","blur"] }],
+        touristMax: [{ required: true, message: "请输入游客限制最大值", trigger: ["change","blur"] }],
       },
       editType: false,
 
@@ -149,7 +184,6 @@ export default {
   },
   created() {
     this.goodsPageListFun()
-    this.seatTypeListFun()
   },
   methods: {
     /**
@@ -163,9 +197,7 @@ export default {
       this.editType = false;
       if (obj){
         this.title = "编辑价格配置";
-        if(obj.performId) {
-          await this.goodsPageListFun(obj.performId);
-        }
+        this.selectGoodsId(obj.goodsId)
         this.form = {
           ...obj,
           performDate: [obj.dateStart,obj.dateEnd],
@@ -174,12 +206,19 @@ export default {
           planSessionList: obj.planSessionList ? obj.planSessionList:[],
           id: null
         }
+        
       }else{
         this.title = "新增价格配置";
-        this.form = {
+        if(this.channelType == 'group') {
+          this.form = {
+            touristLimit: 0,
+          };
+        }else {
+          this.form = {
             weekName: [],
-            weekType: 0
-        };
+            weekType: 0,
+          };
+        }
       }
       this.$nextTick(() => {
         this.$refs["form"].clearValidate();
@@ -198,7 +237,7 @@ export default {
           pageSize: 999,
           goodsType: 2,
           classifyId: 1,
-          channelType: "applet",
+          channelType: this.channelType,
         })
         if(res.code == 200){
           this.goodsPageListS = res.data.rows || []
@@ -206,17 +245,14 @@ export default {
       } catch (error) {      
       }
     },
-    async seatTypeListFun() {
-      try {
-        let res = await seatTypeListApi({
-          pageNum: 1,
-          pageSize: 999,
-        })
-        if(res.code == 200){
-          this.seatTypeListS = res.data.rows || []
+    /**  选择票务  */
+    selectGoodsId(value){
+      this.$set(this.form,'seatTypeId','')
+      this.goodsPageListS.forEach((item,index)=>{
+        if(item.id == value) {
+          this.seatTypeListS = item.seatTypeList
         }
-      } catch (error) {      
-      }
+      })
     },
     /**
      * 保存
@@ -228,9 +264,21 @@ export default {
         if (valid) {
           try {
             let postEdit = JSON.parse(JSON.stringify(this.form))
-            postEdit['startDate'] = moment(postEdit.performDate[0]).format('YYYY-MM-DD')
-            postEdit['endDate'] = moment(postEdit.performDate[1]).format('YYYY-MM-DD')
-            postEdit.weekName = postEdit.weekName.join(','),
+            if(postEdit.performDate){
+              postEdit['startDate'] = moment(postEdit.performDate[0]).format('YYYY-MM-DD')
+              postEdit['endDate'] = moment(postEdit.performDate[1]).format('YYYY-MM-DD')
+            }
+            if(postEdit.weekName) {
+              postEdit.weekName = postEdit.weekName.join(',')
+            }
+            if(this.channelType == 'group') {
+              if(!postEdit.touristLimit) {
+                postEdit.touristMin = ''
+                postEdit.touristMax = ''
+              }else if(postEdit.touristLimit == 1) {
+                postEdit.touristMax = ''
+              }
+            }
             delete postEdit.performDate
             this.loading = true;
             const { code } = await saveAndEdit({ ...postEdit });
@@ -287,6 +335,27 @@ export default {
       if(!this.form.weekType) {
         this.form.weekName = []
       }
+    },
+    /**  */
+    setSaleAmounttile(){
+      let str = ''
+      if(this.channelType == "applet") {
+        str = "销售价:"
+      }
+      if(this.channelType == "retail") {
+        str = "分销价:"
+      }
+      if(this.channelType == "window") {
+        str = "销售价:"
+      }
+      if(this.channelType == "group") {
+        str = "销售价:"
+      }
+      return str
+    },
+    selectTouristLimit() {
+      this.$set(this.form,'touristMin',undefined)
+      this.$set(this.form,'touristMax',undefined)
     }
   },
 };

+ 236 - 0
src/views/priceConfigurationUilt/dialog/bindTeamBox.vue

@@ -0,0 +1,236 @@
+<!--
+ * @Description: 新增/编辑弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 2023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\venue\schedulingMr\dialog\AddOrEditDialog.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="600px"
+    class="text-dia-log-class"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog">
+      <el-form :model="form" ref="form" :rules="rules" label-width="140px">
+        <el-form-item label="团队名称:" prop="teamIdList">
+          <el-select
+            v-model="form.teamIdList"
+            placeholder="团队名称"
+            clearable
+            multiple
+          >
+            <el-option
+              v-for="dict in goodsPageListS"
+              :key="dict.id"
+              :value="dict.id"
+              :label="dict.name"
+            >
+            </el-option>
+          </el-select>
+        </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>
+  </el-dialog>
+</template>
+
+<script>
+import { bindTeamApi} from "@/api/priceConfiguration/index";
+import { pageList as goodsPageListApi } from '@/api/team/teamMr'
+export default {
+  name: "addAndEdit",
+  props: {
+    channelType: {
+      type: [String]
+    }
+  },
+  data() {
+    return {
+      title: "绑定团队",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      tableType: false,
+      form: {
+        id: undefined,
+        teamIdList: []
+      },
+      rules: {
+        teamIdList: [{ required: true, message: "请选择团队", trigger: ["change","blur"] }],
+      },
+      editType: false,
+
+      goodsPageListS: [], // 团队
+    };
+  },
+  created() {
+    this.goodsPageListFun()
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    async openDialog(title, obj, type) {
+      this.open = true;
+      this.editType = false;
+      this.form = {
+        id: obj.id,
+        teamIdList: []
+      }
+      this.$nextTick(() => {
+        this.$refs["form"].clearValidate();
+      });
+    },
+    /**  票务信息  */
+    async goodsPageListFun(){
+      try {
+        let res = await goodsPageListApi({
+          pageNum: 1,
+          pageSize: 999,
+        })
+        if(res.code == 200){
+          this.goodsPageListS = res.data.rows || []
+        }
+      } catch (error) {      
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(async (valid) => {
+        if (valid) {
+          try {
+            this.loading = true
+            let postEdit = JSON.parse(JSON.stringify(this.form))
+            const { code } = await bindTeamApi({ ...postEdit });
+            this.loading = false
+            if (code === 200) {
+              this.$message.success("操作成功!");
+              this.$emit("getList");
+              this.cancel();
+            }
+          } catch (error) {
+            console.error("error====",error)
+          } finally {
+            this.loading = false;
+          }
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+    selectWeekDay(item){
+      let index = -1
+      this.form.weekName.forEach((item1,index1)=>{
+        if(item.key == item1) {
+          index = index1
+        }
+      })
+      if(index != -1) {
+        this.form.weekName.splice(index,1)
+      }else {
+        this.form.weekName.push(item.key)
+      }
+      if(this.form.weekName.length>0) {
+        this.form.weekType = 1
+      }else {
+        this.form.weekType = 0
+      }
+    },
+    selectWeekType() {
+      this.form.weekType = this.form.weekType == 1 ? 0 : 1
+      if(!this.form.weekType) {
+        this.form.weekName = []
+      }
+    },
+    /**  */
+    setSaleAmounttile(){
+      let str = ''
+      if(this.channelType == "applet") {
+        str = "销售价:"
+      }
+      if(this.channelType == "retail") {
+        str = "分销价:"
+      }
+      if(this.channelType == "window") {
+        str = "销售价:"
+      }
+      if(this.channelType == "group") {
+        str = "销售价:"
+      }
+      return str
+    },
+    selectTouristLimit() {
+      this.$set(this.form,'touristMin',undefined)
+      this.$set(this.form,'touristMax',undefined)
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  height: 200px;
+  overflow-y: auto;
+}
+.dialog {
+  .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;
+  }
+}
+</style>

+ 34 - 10
src/views/wxapp/priceConfiguration/dialog/calendarBox.vue

@@ -16,7 +16,7 @@
     :close-on-click-modal="false"
     @close="cancel"
   >
-    <div class="dialog" v-loading="loading">
+    <div class="dialog calendar-dialog" v-loading="loading">
       <el-calendar v-model="timeValue">
         <template
           slot="dateCell"
@@ -47,6 +47,11 @@
 import { getSelectById,getCalendarList } from "@/api/priceConfiguration/index";
 export default {
   name: "addAndEdit",
+  props: {
+    channelType: {
+      type: [String]
+    }
+  },
   data() {
     return {
       title: "编辑",
@@ -89,14 +94,16 @@ export default {
     /** 查询详情 */
     async getSelectByIdFun(params) {
       try {
+        this.perFormList = []
         this.loading = true;
         let res = await getCalendarList(params)
         if(res.code == 200) {
           this.loading = false;
           if(res.rows && res.rows.length>0){
+            this.perFormList = res.rows || []
             let date = new Date(res.rows[0].priceDate)
-            //this.timeValue = date
-            this.getRange(date)
+            this.timeValue = date
+            //this.getRange(date)
           }
         }
         this.loading = false;
@@ -109,10 +116,23 @@ export default {
       let list = []
       this.perFormList.forEach((item,index)=>{
         if(item.priceDate && item.priceDate.indexOf(data.day) != -1) {
-          list = [
-            { title: '划线价', money: item.originalAmount + '元'  },
-            { title: '销售价', money: item.saleAmount + '元' },
-          ]
+          if(this.channelType == "retail") {
+            list = [
+              { title: '划线价', money: item.originalAmount + '元'  },
+              { title: '分销价', money: item.saleAmount + '元' },
+              { title: '佣金', money: item.retailAmount + '元' },
+            ]
+          }else if(this.channelType == "applet"){
+            list = [
+              { title: '划线价', money: item.originalAmount + '元'  },
+              { title: '销售价', money: item.saleAmount + '元' },
+            ]
+          }else if(this.channelType == "window"){
+            list = [
+              { title: '销售价', money: item.saleAmount + '元' },
+            ]
+          }
+          
         }
       })
       return list
@@ -184,9 +204,9 @@ export default {
   },
   watch:{
     timeValue(newValue,oldValue){
-      if (newValue.getFullYear() !== oldValue.getFullYear() || newValue.getMonth() !== oldValue.getMonth()) {
-        this.getRange(newValue)
-      }
+      // if (newValue.getFullYear() !== oldValue.getFullYear() || newValue.getMonth() !== oldValue.getMonth()) {
+      //   this.getRange(newValue)
+      // }
     }
   }
 };
@@ -216,4 +236,8 @@ export default {
     cursor: pointer;
   }
 }
+.calendar-dialog ::v-deep .el-calendar-table .el-calendar-day {
+    height: auto;
+    min-height: 86px;
+}
 </style>

+ 104 - 33
src/views/wxapp/priceConfiguration/index.vue

@@ -19,6 +19,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="团队名称" v-if="['group'].includes(channelType)">
+        <el-input
+          v-model="queryParams.teamName"
+          placeholder="请输入团队名称"
+          clearable
+          style="width: 200px;"
+          @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>
@@ -33,8 +42,8 @@
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd"
-              v-hasPermi="['wxapp:priceConfiguration:add']"
-            >新增</el-button>
+              v-hasPermi="configPermi.add"
+            >价格设置</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -43,8 +52,21 @@
       <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
       <el-table-column label="票务名称" align="center" prop="goodsName" />
       <el-table-column label="票档名称" align="center" prop="seatTypeName" />
-      <el-table-column label="划线价" align="center" prop="originalAmount" />
-      <el-table-column label="销售价" align="center" prop="saleAmount" />
+      <el-table-column width="220" v-if="['group'].includes(channelType)" label="成团要求" align="center" prop="originalAmount11">
+        <template slot-scope="scope">
+          <div>
+            <div 
+            v-for="(item,index) in setTourist(scope.row)" 
+            :key="index"
+            >
+              {{ item.label }}{{ item.info }}
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column v-if="!['window','group'].includes(channelType)" label="划线价(元)" align="center" prop="originalAmount" />
+      <el-table-column :label="setSaleAmounttile()" align="center" prop="saleAmount" />
+
       <el-table-column label="创建人" align="center" prop="createBy" />
       <el-table-column label="最后修改时间" align="center" prop="updateTime" />
       <el-table-column label="备注" align="center" prop="remark" />
@@ -55,22 +77,30 @@
         </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <span v-hasPermi="['wxapp:priceConfiguration:deatils']" style="display: inline-block;">
+          <span v-hasPermi="configPermi.deatils" style="display: inline-block;">
             <el-button
               size="mini"
               type="text"
               style="margin-left: 10px;"
-              v-if="scope.row.onlineStatus != '1'"
               @click="handleUpdate(scope.row)"
             >价格日历</el-button>
           </span>
+
+          <span v-hasPermi="configPermi.tuandui" style="display: inline-block;">
+            <el-button
+              v-if="['group'].includes(channelType)"
+              size="mini"
+              type="text"
+              style="margin-left: 10px;"
+              @click="bindTeamFun(scope.row)"
+            >绑定团队</el-button>
+          </span>
           
-          <span v-hasPermi="['wxapp:priceConfiguration:del']" style="display: inline-block;">
+          <span v-hasPermi="configPermi.del" style="display: inline-block;">
             <el-button
               size="mini"
               type="text"
               style="margin-left: 10px;"
-              v-if="scope.row.onlineStatus != '1'"
               @click="handleDelete(scope.row,scope.index)"
             >删除</el-button>
           </span>
@@ -89,12 +119,15 @@
     <!-- 新增/编辑弹框 -->
     <add-and-edit
       ref="addAndEdit"
-      :dict="dict"
       @getList="getList"
+      :channelType="channelType"
     />
 
     <!--  日历价格  -->
-    <calendarBox ref="calendarBox" />
+    <calendarBox ref="calendarBox" :channelType="channelType" />
+
+    <!--  绑定团队 -->
+    <bindTeamBox ref="bindTeamBox" />
   </div>
 </template>
 
@@ -104,14 +137,20 @@ import { pageList, deleteById, updateById } from '@/api/priceConfiguration/index
 import addAndEdit from "./dialog/addAndEdit.vue";
 import calendarBox from './dialog/calendarBox.vue';
 import switchBoxVue from '@/components/switchBox.vue';
+import bindTeamBox from './dialog/bindTeamBox.vue';
 export default {
   name: "agreement",
-  dicts: ['agreement_type'],
-  components: { addAndEdit,calendarBox,switchBoxVue },
+  components: { addAndEdit,calendarBox,switchBoxVue,bindTeamBox },
   data() {
     return {
       // 遮罩层
       loading: true,
+      configPermi: {
+        add: [],
+        del: [],
+        deatils: [],
+        tuandui: []
+      },
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -123,37 +162,37 @@ export default {
       // 总条数
       total: 0,
       // 用户表格数据
-      dataList: null,
+      dataList: [],
       // 弹出层标题
       title: "",
-
-      // 是否显示弹出层
-      open: false,
-      // 日期范围
-      dateRange: [],
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         type: undefined
       },
-      statusList: [
-        {id: 1, name: '未上线', value: 0},
-        {id: 2, name: '己上线', value: 1}
-      ],
-      visibleStatus: false,
-      newObj: {},
-      visibleType: ''
+      /** 
+       * 查询的时候 channelType渠道类型: 来自字典channel_type. applet小程序  retail分销 window窗口  group团购
+       * 
+       */
+      channelType: ''
     };
   },
   created() {
+    this.channelType = this.$route.query.channelTyp
+    this.configPermi = {
+        add: [`${this.channelType}:priceConfigurationUitl:add`],
+        del: [`${this.channelType}:priceConfigurationUitl:deatils`],
+        deatils: [`${this.channelType}:priceConfigurationUitl:deatils`],
+        tuandui: [`${this.channelType}:priceConfigurationUitl:tuandui`],
+    }
     this.getList();
   },
   methods: {
     /** 查询列表 */
     getList() {
       this.loading = true;
-      pageList(this.addDateRange(this.queryParams, this.dateRange))
+      pageList(this.addDateRange({ ...this.queryParams,channelType: this.channelType }))
       .then(response => {
           this.dataList = response.rows;
           this.total = response.total;
@@ -188,7 +227,12 @@ export default {
       this.$refs["calendarBox"].openDialog("修改数据", row);
     },
 
-    /** 发布或者取消发布按钮操作 */
+    /**  绑定团队 */
+    bindTeamFun(row) {
+      this.$refs["bindTeamBox"].openDialog("绑定团队", row);
+    },
+
+    /** 警用和启用 */
     ionlineApi(row) {
       this.$confirm("您确认要将该票的价格信息进行" + (row.priceStatus == 1 ? '禁用吗?' : '启用吗?'), '提示', {
         confirmButtonText: '确定',
@@ -216,12 +260,39 @@ export default {
         this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
-    /** 查看按钮操作 */
-    seeCenter(obj, type) {
-      this.visibleStatus = true
-      this.visibleType = type;
-      this.newObj = obj;
+    /**  */
+    setSaleAmounttile(){
+      let str = ''
+      if(this.channelType == "applet") {
+        str = "销售价(元)"
+      }
+      if(this.channelType == "retail") {
+        str = "分销价(元)"
+      }
+      if(this.channelType == "window") {
+        str = "销售价(元)"
+      }
+      if(this.channelType == "group") {
+        str = "销售价(元)"
+      }
+      return str
+    },
+    setTourist(row) {
+      let list = [
+        { label: '价格类型:',info: ["一人一价",'一口价'][row.priceType] },
+        { label: '游客限制类型:',info: ["不限制",'限制最低人数','限制人数范围'][row.touristLimit] },
+      ]
+      if(row.touristLimit == 1) {
+        list.push({
+          label: '游客限制最小值:',info: row.touristMin + "人"
+        })
+      }else if(row.touristLimit == 2){
+        list.push({
+          label: '游客限制:',info: row.touristMin + "人" + "-" +row.touristMax + "人"
+        })
+      }
+      return list
     }
-  }
+  },
 };
 </script>

+ 2 - 2
src/views/ticket/schedulingConfiguration/dialog/addAndEdit.vue

@@ -364,8 +364,8 @@ export default {
         if (valid) {
           try {
             let postEdit = JSON.parse(JSON.stringify(this.form))
-            postEdit['dateStart'] = moment(postEdit.performDate[0]).format('YYYY-MM-DD hh:mm:ss')
-            postEdit['dateEnd'] = moment(postEdit.performDate[1]).format('YYYY-MM-DD hh:mm:ss')
+            postEdit['dateStart'] = moment(postEdit.performDate[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')
+            postEdit['dateEnd'] = moment(postEdit.performDate[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
             postEdit.goodsIds = postEdit.goodsIds.join(',')
             postEdit.weekDay = postEdit.weekDay.join(','),
             delete postEdit.performDate

+ 8 - 8
src/views/ticket/schedulingConfiguration/dialog/perFormDeatils.vue

@@ -58,42 +58,42 @@
                     <el-table-column label="票档名称" align="center" prop="seatTypeName" />
                     <el-table-column label="小程序已售(个)" align="center" prop="microAppTotal">
                         <template slot-scope="scope">
-                            <span>{{ scope.row.microAppTotal }} / {{ scope.row.total }}</span>
+                            <span>{{ scope.row.microAppTotal }} / {{ scope.row.microAppStockNum }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="团购已售(个)" align="center" prop="groupBuyTotal">
                         <template slot-scope="scope">
-                            <span>{{ scope.row.groupBuyTotal }} / {{ scope.row.total }}</span>
+                            <span>{{ scope.row.groupBuyTotal }} / {{ scope.row.groupBuyStockNum }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="窗口已售(个)" align="center" prop="winTotal">
                         <template slot-scope="scope">
-                            <span>{{ scope.row.winTotal }} / {{ scope.row.total }}</span>
+                            <span>{{ scope.row.winTotal }} / {{ scope.row.winStockNum }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="美团已售(个)" align="center" prop="meituanTotal">
                         <template slot-scope="scope">
-                            <span>{{ scope.row.meituanTotal }} / {{ scope.row.total }}</span>
+                            <span>{{ scope.row.meituanTotal }} / {{ scope.row.meituanStockNum }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="携程已售(个)" align="center" prop="xiechenTotal">
                         <template slot-scope="scope">
-                            <span>{{ scope.row.xiechenTotal }} / {{ scope.row.total }}</span>
+                            <span>{{ scope.row.xiechenTotal }} / {{ scope.row.xiechenStockNum }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="猫眼已售(个)" align="center" prop="maoyanTotal">
                         <template slot-scope="scope">
-                            <span>{{ scope.row.maoyanTotal }} / {{ scope.row.total }}</span>
+                            <span>{{ scope.row.maoyanTotal }} / {{ scope.row.maoyanStockNum }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="抖音已售(个)" align="center" prop="duoyinTotal">
                         <template slot-scope="scope">
-                            <span>{{ scope.row.duoyinTotal }} / {{ scope.row.total }}</span>
+                            <span>{{ scope.row.duoyinTotal }} / {{ scope.row.duoyinStockNum }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="其他已售(个)" align="center" prop="otherTotal">
                         <template slot-scope="scope">
-                            <span>{{ scope.row.otherTotal }} / {{ scope.row.total }}</span>
+                            <span>{{ scope.row.otherTotal }} / {{ scope.row.otherStockNum }}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="合计已售(个)" align="center" prop="saleTotal">

+ 4 - 2
src/views/ticket/schedulingConfiguration/dialog/perFormListBox.vue

@@ -2,7 +2,7 @@
     <el-dialog :title="title" :visible.sync="open" width="90%" class="text-dia-log-class" append-to-body center
         :close-on-click-modal="false" @close="cancel">
         <div class="dialog">
-            <div>
+            <div style="padding-bottom: 10px;">
                 <el-button type="primary" v-hasPermi="['ticketMr:schedulingConfiguration:add']" @click="handleAdd('ADD')">新增</el-button>
             </div>
             <el-table ref="tables" v-loading="loading" :data="timeList" border>
@@ -10,7 +10,7 @@
                 <el-table-column label="编号ID" align="center" prop="planNo" />
                 <el-table-column label="日期范围" align="center" prop="dateStart">
                     <template slot-scope="scope">
-                        {{ scope.row.dateStart }} - {{ scope.row.dateEnd }}
+                        {{ moment(scope.row.dateStart).format('YYYY年MM月DD日') }} - {{ moment(scope.row.dateEnd).format('YYYY年MM月DD日') }}
                     </template>
                 </el-table-column>
                 <el-table-column label="星期" align="center" prop="weekDay">
@@ -73,6 +73,7 @@
 <script>
 import { deleteById,pageList, getPerformTimeById } from "@/api/ticketMr/schedulingConfiguration";
 import addAndEdit from "./addAndEdit";
+import moment from "moment"
 export default {
     name: "PerFormListBox",
     components: { addAndEdit },
@@ -99,6 +100,7 @@ export default {
         };
     },
     methods: {
+        moment,
         /**
          * 打开弹框
          * @date 2023-11-22