MONSTER-ygh 1 week ago
parent
commit
a8dc92de4e

+ 20 - 1
src/api/order/groupBuyingMr.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { param } from 'jquery'
 
 // 分页查询
 export const pageList = (query) => {
@@ -37,7 +38,7 @@ export function downOrderListXls(params) {
   });
 }
 
-// 对公支付
+// 团购订单修改
 export const teamOrderReSubmitApi = (data) => {
   return request({
     url: '/member/marketTeamApply/teamOrderReSubmit',
@@ -81,3 +82,21 @@ export const creditPay = (data) => {
     data: data
   })
 }
+
+// 获取剧目演出厅某日期场次列表
+export const getDateTimeAllApi = (data) => {
+  return request({
+    url: '/merchant/merchantPerformTime/getDateTimeAll',
+    method: 'get',
+    params: data,
+  })
+}
+
+// 查询团队剧目演出厅座位类型票务信息
+export const listGoodsByTeamIdApi = (data) => {
+  return request({
+    url: '/goods/goods/listGoodsByTeamId',
+    method: 'get',
+    params: data,
+  })
+}

+ 74 - 0
src/api/otaMr/maoyan.js

@@ -0,0 +1,74 @@
+import request from '@/utils/request'
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/thirdapi/maoyan/product/list',
+    method: 'post',
+    data: query
+  })
+}
+
+/** 系统-美团-ota-(商品推送)  */
+export const pushById = (data) => {
+    return request({
+        url: '/thirdapi/maoyan/product/push',
+        method: 'post',
+        data: data
+    })
+}
+
+/** 系统-美团(商品上下架)  */
+export const updateById = (data) => {
+  return request({
+      url: '/thirdapi/maoyan/product/update',
+      method: 'post',
+      data: data
+  })
+}
+
+/** 系统-美团(商品批量更新库存)  */
+export const stockUpdateById = (data) => {
+  return request({
+      url: '/thirdapi/maoyan/product/update',
+      method: 'post',
+      data: data
+  })
+}
+
+
+/** 系统-携程-ota(已推送商品sku查看)  */
+export const getPushListApi = (params) => {
+  return request({
+      url: '/thirdapi/maoyan/product/list/push',
+      method: 'get',
+      params: params
+  })
+}
+
+
+/** 系统-携程-ota(日历价格-获取)  */
+export const getCalendarPriceApi = (data) => {
+  return request({
+      url: '/thirdapi/maoyan/product/calendar/get',
+      method: 'post',
+      data: data
+  })
+}
+
+/** 系统-携程-ota(日历价格-更新)  */
+export const setCalendarPriceApi = (data) => {
+  return request({
+      url: '/thirdapi/maoyan/product/calendar',
+      method: 'post',
+      data: data
+  })
+}
+
+/** 系统-携程-ota(日历价格-删除)  */
+export const deleteCalendarPriceApi = (data) => {
+  return request({
+      url: '/thirdapi/maoyan/product/calendar/delete',
+      method: 'delete',
+      data
+  })
+}

+ 9 - 0
src/api/ticketMr/schedulingConfiguration.js

@@ -130,4 +130,13 @@ export const insertOrUpdateNewApi = (data) => {
     method: 'post',
     data: data
   })
+}
+
+/**  日期内的场次启、禁用  */
+export function updateStatusByDateApi(data) {
+  return request({
+    url: '/merchant/merchantPerformTime/updateStatusByDate',
+    method: 'post',
+    data
+  })
 }

File diff suppressed because it is too large
+ 1186 - 0
src/views/officesale/ticketingSales copy 3.vue


+ 676 - 0
src/views/order/groupBuyingMr/dialog/editBox.vue

@@ -0,0 +1,676 @@
+<!--
+ * @Description: 详情弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: gcz
+ * @LastEditTime: 2025-03-20 15:30:52
+ * @FilePath: \great_webui\src\views\order\orderMr\dialog\details.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog :title="title" :visible.sync="open" width="96%" append-to-body :close-on-click-modal="false"
+    @close="cancel">
+    <div v-loading="loading" class="dialog dialog-bbb" v-if="form">
+      <div v-loading="loading_form" element-loading-text="加载详情中...">
+        <!--   基础信息   -->
+        <div class="title-class" style="margin-top: 0">基础信息</div>
+        <el-row v-for="(item, index) in formList" :key="index">
+          <el-col :span="12" v-for="(item1, index1) in item" :key="index1">
+            <div class="grid-content bg-purple item-class">
+              <span>{{ item1.lable }}</span>
+              <span>{{ form[item1.key] }}</span>
+            </div>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-form :model="form" ref="form" size="mini" :rules="rules" label-width="100px">
+            <div style="display: flex;">
+              <el-form-item label="场次日期:" prop="performDate">
+                <el-date-picker v-model="form.performDate" type="date" @change="performDateEven"
+                  value-format="yyyy-MM-dd" placeholder="选择日期">
+                </el-date-picker>
+              </el-form-item>
+
+              <el-form-item label="场次:" prop="performTimeId">
+                <el-select v-model="form.performTimeId" laceholder="选择场次" clearable style="width: 100%;"
+                  @change="performTimeIdEven">
+                  <el-option v-for="dict in performTimeList" :key="dict.performTimeId" :label="dict.performInterval"
+                    :value="dict.performTimeId" />
+                </el-select>
+              </el-form-item>
+            </div>
+            <div style="display: flex;">
+              <el-form-item label="票务名称:" prop="goodsId">
+                <el-select v-model="form.goodsId" placeholder="票务名称" clearable @change="goodsChangeEven"
+                  style="width: 100%;">
+                  <el-option v-for="dict in ticketList" :key="dict.id" :label="dict.goodsName" :value="dict.id" />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="票档:" prop="seatTypeId">
+                <el-select v-model="form.seatTypeId" placeholder="票档" clearable @change="seatChangeEven"
+                  style="width: 100%;">
+                  <el-option v-for="dict in seatList" :key="dict.seatTypeId" :label="dict.seatTypeName"
+                    :value="dict.seatTypeId" />
+                </el-select>
+              </el-form-item>
+            </div>
+          </el-form>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <div class="grid-content bg-purple item-class">销售价: <span>{{ form.price || '' }}/人</span></div>
+          </el-col>
+          <el-col :span="12">
+            <div class="grid-content bg-purple item-class">应收金额: <span>{{ this.form.viewerList && (form.price || form.price === 0 )  ? form.price * this.form.viewerList.length : '' }}</span></div>
+          </el-col>
+        </el-row>
+        <!--   观影人员信息   -->
+        <div class="title-class" style="display: flex;">
+          观影人员信息:
+          <el-upload class="upload-demo" :action="uploadObj.url" :headers="uploadObj.headers" :auto-upload="false"
+            :disabled="uploadLoading" :show-file-list="false" :on-change="beforeAvatarUpload">
+            <el-button size="small" type="primary" :loading="uploadLoading">{{ form.viewerList &&
+              form.viewerList.length == 0 ? '导入excel' : '重新导入excel' }}</el-button>
+            <div slot="tip" class="el-upload__tip">
+              上传excel文件,导入模板表头序号、姓名、身份证号码
+              <i @click="handleExport" style="color: #1890ff;cursor: pointer;">下载模板</i>
+            </div>
+          </el-upload>
+        </div>
+        <el-row>
+          <el-col :span="24">
+            <el-table ref="tables" :data="form.viewerList" border size="mini">
+              <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+              <el-table-column label="姓名" align="center" prop="name" />
+              <el-table-column label="身份证号码" align="center" prop="cardId" />
+            </el-table>
+          </el-col>
+        </el-row>
+      </div>
+      <div class="dialog-bbb_2" v-loading="loading_seta" element-loading-text="加载座位图中...">
+        <seatBox ref="seatBox" :seatTypeLimit="configStockNumObj" @selectSeat="selectSeat" height="100%"
+          channelType="group" />
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="cancel()" :loading="loading">取消</el-button>
+      <el-button type="primary" @click="handleResetOpen()" :loading="loading">
+        <span v-if="loading">提交中...</span>
+        <span v-else>确认修改</span>
+      </el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  getSelectById,
+  getDateTimeAllApi,
+  listGoodsByTeamIdApi,
+  teamOrderReSubmitApi
+} from '@/api/order/groupBuyingMr'
+import { downloadModel, uploadExcel } from "@/api/team/applicationMr";
+import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
+import seatBox from '@/components/seatBox/index.vue';
+import { countBySeatTyp } from '@/api/ticketMr/InventoryTemplate'
+import {
+  querySeatListNew
+} from '@/api/windowTicketSales/ticketingSales'
+import { getToken } from "@/utils/auth";
+export default {
+  name: "detailsDia",
+  dicts: ['order_form_type', 'order_status_type', 'pay_way_type', 'personnel_type'],
+  components: {
+    seatBox
+  },
+  data() {
+    return {
+      title: "订单详情",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      formList: [
+        [
+          { lable: '团队名称:', key: 'teamName' },
+          { lable: '团队类型:', key: 'teamType' },
+        ],
+        [
+          { lable: '预约场馆:', key: 'theatreName' },
+          { lable: '预约演出厅:', key: 'auditoriumName' },
+        ],
+        [
+          { lable: '预约剧目:', key: 'performName' },
+          { lable: '报名时间:', key: 'applyTime' },
+        ],
+        [
+          { lable: '客户负责人:', key: 'teamContact' },
+          { lable: '销售员:', key: 'salerPerson' },
+        ],
+        [
+          { lable: '联系电话:', key: 'teamMobile' },
+          { lable: '带队负责人姓名:', key: 'linkName' },
+        ],
+        [
+          { lable: '带队负责人联系电话:', key: 'linkPhone' },
+        ],
+      ],
+      form: {
+        id: undefined,
+      },
+      performerList: [],
+      refund: false,
+      dataList: [],
+
+
+      merchantTheatreAuditoriumListS: [], // 演出厅
+      merchantPerformTimeListS: [], // 场次
+      querySeatListS: [], // 座位
+      goodsPageListS: [], // 票务
+      goodsPageListSAll: [], // 票务全部
+
+
+
+      lockOrUnLockLoading: false,
+
+      performId: '',// 剧目ID
+      scaleNum: 30,
+
+      justifyContent: false,
+
+      loading_form: false,//  加载表单
+      loading_seta: false, //  加载座位
+      orderType: 'normal', // 订单类型 normal:没有新订单和原订单,new:有新订单,old:有原订单
+
+      setList: [],
+      seatTypeList: [],
+      seatSelectList: [],
+      configStockNumObj: {},
+      countBySeatTypList: [],
+      seatTypeListAll: [],
+      seatLoading: false,
+      seatLoadText: '获取座位中...',
+
+      goodsList: [],
+      ticketList: [],
+      seatList: [],
+      merchantList: [],
+      theatreList: [],
+      teamList: [],
+      sessionList: [],
+      performTimeList: [],
+      teamIdLoading: false,
+      rules: {
+        performDate: [{ required: true, message: "请选择日期", trigger: ["change", "blur"] }],
+        goodsId: [{ required: true, message: "请选择票务", trigger: ["change", "blur"] }],
+        seatTypeId: [{ required: true, message: "请选择座位类型", trigger: ["change", "blur"] }],
+        performTimeId: [{ required: true, message: "请选择预约场次", trigger: ["change", "blur"] }],
+      },
+
+      uploadLoading: false,
+      uploadObj: {
+        url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
+        Headers: { Authorization: "Bearer " + getToken() },
+      },
+    };
+  },
+  created() {
+    this.getSeatTypeList()
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    async openDialog(title, obj, type) {
+      try {
+        this.orderType = type;
+        this.open = true;
+        this.form = {}
+        this.querySeatListS = [];
+        this.setList = [];
+        this.seatSelectList = [];
+        if (this.orderType == 'old') {
+          this.title = "订单详情(已改签)"
+        } else if (this.orderType == 'new') {
+          id = row.newOrderId
+          this.title = "改签订单详情"
+        } else {
+          this.title = "订单详情"
+        }
+        await this.getSelectByIdApi(obj);
+        await this.countBySeatTypFun(this.form.auditoriumId)
+        await this.getDateTimeAllFun()
+        await this.getPerformTimeList()
+        this.goodsChangeEven(this.form.goodsId, 'dfsd')
+        await this.querySeatListFun()
+      } catch (error) {
+        console.error(error)
+        this.open = false;
+      }
+
+    },
+    /** 获取详情 */
+    async getSelectByIdApi(row) {
+      let id = row.id;
+      if (this.orderType == 'old') {
+        id = row.orgOrderId
+      } else if (this.orderType == 'new') {
+        id = row.newOrderId
+      }
+      try {
+        this.loading_form = true//  加载表单
+        let res = await getSelectById(id)
+        this.seatSelectList = []//res.data.viewerList
+        this.$set(this, "form", {
+          ...res.data,
+          "viewerList": res.data.viewersOrderList.map((item) => {
+            return {
+              name: item.name,
+              cardId: item.idCard
+            }
+          }),
+        })
+        this.loading_form = false//  加载表单
+      } catch (error) {
+        console.error(error)
+        this.loading_form = false//  加载表单
+      }
+
+    },
+    async querySeatListFun() {
+      try {
+        this.loading_seta = true //  加载座位
+        let res = await querySeatListNew({
+          auditoriumId: this.form.auditoriumId,
+          timeId: this.form.performTimeId,
+          goodsId: this.form.goodsId,
+          channelType: 'group'
+        })
+        let list1 = []
+        res.data.forEach((item, index) => {
+          list1.push({
+            ...item,
+            isSame: item.seatTypeId != this.form.seatTypeId
+          })
+        })
+        this.setList = list1;
+        let list = this.seatSelectList
+        let list3 = []
+        this.countBySeatTypList.forEach((item, index) => {
+          list3.push(item.seatTypeId)
+        })
+        let list4 = []
+        this.seatTypeList.forEach((item, index) => {
+          if (list3.includes(item.id)) {
+            list4.push({ ...item })
+          }
+        })
+        this.$nextTick(() => {
+          this.$refs.seatBox.querySeatListFun(true, this.setList, list, list4)
+        })
+        this.loading_seta = false//  加载表单
+      } catch (error) {
+        console.error(error)
+        this.loading_seta = false//  加载表单
+      }
+    },
+    /** 获取座位类型全部 说明 */
+    getSeatTypeList() {
+      getSeatType({
+        pageNum: 1,
+        pageSize: 999,
+      })
+        .then(response => {
+          this.seatTypeList = response.data.rows;
+        });
+    },
+    /** 获取剧目的座位类型  */
+    async countBySeatTypFun(value) {
+      try {
+        if (!value) return
+        let res = await countBySeatTyp({ auditoriumId: value })
+        this.countBySeatTypList = res.data ? res.data : []
+        let obj = {}
+        this.countBySeatTypList.forEach((item, index) => {
+          obj['seatNum_' + item.seatTypeId] = {
+            stockTotal: item.stock,
+            stockSelect: item.stock,
+            stockYes: item.stock,
+            stockNo: 0,
+            isNoSelect: true,
+          }
+          if (item.seatTypeId == this.form.seatTypeId) {
+            obj['seatNum_' + item.seatTypeId].stockYes = item.stock - this.form.viewerList.length
+            obj['seatNum_' + item.seatTypeId].isNoSelect = false
+          }
+        })
+        this.configStockNumObj = obj
+      } catch (error) {
+        console.error("error1====", error)
+      }
+    },
+    /** 选择座位  */
+    selectSeat(list) {
+      let list1 = []
+      list.forEach((item) => {
+        list1.push({
+          seatId: item.id,
+          seatName: item.name
+        })
+      })
+      this.seatSelectList = list1
+      console.log("已选择的====", list)
+    },
+    // 选择场次时间
+    performDateEven() {
+      this.$set(this.form, 'performTimeId', '')
+      this.$set(this.form, 'goodsId', '');
+      this.$set(this.form, 'seatTypeId', '');
+      this.$set(this.form, 'price', '')
+      this.performTimeList = [] // 场次
+      this.ticketList = [] // 票务
+      this.seatList = [] // 座位类型
+      this.getDateTimeAllFun(); // 获取场次
+    },
+
+    /** 
+     *  获取剧目演出厅某日期场次列表
+     * 
+    */
+    async getDateTimeAllFun() {
+      try {
+        if (!this.form.performDate) {
+          this.$message.error("请选择日期!");
+          return false
+        }
+        let res = await getDateTimeAllApi({
+          performDate: this.form.performDate,
+          performId: this.form.performId,
+          auditoriumId: this.form.auditoriumId,
+        })
+        this.performTimeList = res.data.list;
+      } catch (error) {
+        console.error(error)
+      }
+    },
+    /** 
+     *  查询团队剧目演出厅座位类型票务信息
+     * 
+    */
+    async getPerformTimeList() {
+      try {
+        if (!this.form.performTimeId) {
+          this.$message.error("请选择场次!");
+          return false
+        }
+        let res = await listGoodsByTeamIdApi({
+          performTimeId: this.form.performTimeId,
+          performId: this.form.performId,
+          auditoriumId: this.form.auditoriumId,
+          teamId: this.form.teamId
+        })
+        this.ticketList = res.data;
+      } catch (error) {
+
+      }
+    },
+    /** 选择场次 */
+    performTimeIdEven(val) {
+      this.$set(this.form, 'goodsId', '');
+      this.$set(this.form, 'goodsName', '')
+      this.$set(this.form, 'seatTypeId', '');
+      this.$set(this.form, 'price', '')
+
+      this.ticketList = [] // 票务
+      this.seatList = [] // 座位类型
+
+      this.getPerformTimeList() // 获取票务管理
+    },
+    // 票务改变事件
+    goodsChangeEven(id, type) {
+      console.log("sdfsdf", id, type)
+      let list = []
+      this.ticketList.forEach(item => {
+        if (item.id == id) {
+          this.$set(this.form, 'goodsName', item.goodsName)
+          list = item.seatTypePriceList
+        }
+      })
+      if (!type) {
+        this.$set(this.form, 'price', '');
+        this.$set(this.form, 'seatTypeId', '');
+      }
+      this.seatList = [];
+      console.log("ffffffffff=====", list)
+      //let selectMap = {goodsId: this.form.goodsId, performId: this.form.performId}
+      //this.getSeatTypeList(selectMap); 获取走位
+      this.seatList = [].concat(list)
+    },
+    // 座位类型改变事件
+    seatChangeEven(val) {
+      this.seatList.forEach(item => {
+        if (item.seatTypeId == val) {
+          this.$set(this.form, 'seatTypeName', item.seatTypeName);
+          this.$set(this.form, 'price', item.saleAmount);
+        }
+      })
+      let obj = {}
+      this.countBySeatTypList.forEach((item, index) => {
+        obj['seatNum_' + item.seatTypeId] = {
+          stockTotal: item.stock,
+          stockSelect: item.stock,
+          stockYes: item.stock,
+          stockNo: 0,
+          isNoSelect: true,
+        }
+        if (item.seatTypeId == this.form.seatTypeId) {
+          obj['seatNum_' + item.seatTypeId].stockYes = item.stock - this.form.viewerList.length
+          obj['seatNum_' + item.seatTypeId].isNoSelect = false
+        }
+      })
+      this.configStockNumObj = obj
+      this.seatSelectList = []
+      let list = JSON.parse(JSON.stringify(this.setList))
+      let list1 = []
+      list.forEach((item, index) => {
+        list1.push({
+          ...item,
+          isSame: item.seatTypeId != this.form.seatTypeId
+        })
+      })
+      this.setList = list1;
+      let list3 = []
+      this.countBySeatTypList.forEach((item, index) => {
+        list3.push(item.seatTypeId)
+      })
+      let list4 = []
+      this.seatTypeList.forEach((item, index) => {
+        if (list3.includes(item.id)) {
+          list4.push({ ...item })
+        }
+      })
+      this.$refs.seatBox.querySeatListFun(true, this.setList, this.seatSelectList, list4)
+    },
+
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.open = false;
+    },
+    /** 导出按钮操作 */
+    async handleExport() {
+      //this.downloadGet('member/marketTeamApply/downTeamApplyTemplate', {}, `观影人员上传模板_${new Date().getTime()}.xlsx`)
+      try {
+        let res = await downloadModel()
+        let fileName = `观影人员上传模板_${new Date().getTime()}.xlsx`
+        let blob = new Blob([res])
+        let href = window.URL.createObjectURL(blob)
+        // 创建下载按钮a标签进行自动点击下载,下载完后移除按钮a标签
+        let downloadDom = document.createElement('a')
+        downloadDom.href = href
+        downloadDom.download = fileName //--不是必须 若需要【前端重命名文件夹】的话这句代码就需要
+        document.body.appendChild(downloadDom)
+        downloadDom.click()
+        document.body.removeChild(downloadDom)
+        window.URL.revokeObjectURL(href)
+
+      } catch (error) {
+
+      }
+    },
+    /**
+     * 上传文件之前之前
+     * @date 2023-11-22
+     * @param {any} file
+     * @returns {any}
+     */
+    beforeAvatarUpload(file) {
+      this.uploadExcelApi(file.raw);
+    },
+    // 上传
+    uploadExcelApi(file) {
+      try {
+        let formData = new FormData();
+        formData.append("file", file);
+        this.uploadLoading = true;
+        uploadExcel(formData).then(response => {
+          this.$message.success("上传成功!");
+          this.$set(this.form, 'viewerList', response.data)
+          this.seatChangeEven(this.form.seatTypeId)
+        });
+      } catch (e) {
+      } finally {
+        this.uploadLoading = false;
+      }
+    },
+    /** 修改订单按钮操作 */
+    handleResetOpen() {
+      if (this.form.viewerList.length == 0) {
+        this.$message.error("请上传观影人员!");
+        return
+      }
+      if (this.form.viewerList.length != this.seatSelectList.length) {
+        this.$message.error("请选择座位!");
+        return
+      }
+      /** 关闭订单 */
+      this.$confirm("修改成功后,原订单将会被取消,确认要修改吗?", '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.submitForm()
+      }).catch(() => { });
+    },
+    /**
+    * 驳回提交
+    * @date 2023-11-22
+    * @returns {any}
+    */
+    submitForm() {
+      this.$refs["form"].validate(async (valid) => {
+        if (valid) {
+          try {
+            if (this.form.viewerList.length == 0) {
+              this.$message.error("请上传观影人员!");
+              return
+            }
+            if (this.form.viewerList.length != this.seatSelectList.length) {
+              this.$message.error("请选择座位!");
+              return
+            }
+            this.loading = true;
+            let postForm = {
+              "orderId": this.form.id,
+              "goodsId": this.form.goodsId,
+              "goodsName": this.form.goodsName,
+              "seatTypeId": this.form.seatTypeId,
+              "seatTypeName": this.form.seatTypeName,
+              "performDate": this.form.performDate,
+              "performTimeId": this.form.performTimeId,
+              "viewerList": this.form.viewerList,
+              "seatList": this.seatSelectList
+            }
+            const { code } = await teamOrderReSubmitApi({ ...postForm });
+            if (code === 200) {
+              this.loading = false;
+              this.$message.success("操作成功!");
+              this.$emit("getList");
+              this.cancel();
+            }
+          } catch (error) {
+            this.loading = false;
+          } finally {
+          }
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  width: 100%;
+  height: 70vh;
+}
+
+.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;
+  }
+
+  .title-class {
+    font-size: 16px;
+    font-weight: bold;
+    color: black;
+    margin-bottom: 20px;
+    margin-top: 20px;
+  }
+
+  .item-class {
+    margin-bottom: 20px;
+  }
+}
+
+.dialog-bbb {
+  width: 100%;
+  display: flex;
+  --widdd: 700px;
+
+  >div:first-child {
+    width: var(--widdd);
+    flex-shrink: 0;
+    overflow-y: auto;
+    padding: 0 0 10px 0;
+    margin-right: 10px;
+  }
+
+  .dialog-bbb_2 {
+    width: calc(100% - var(--widdd));
+    height: 100%;
+  }
+}
+</style>

+ 11 - 3
src/views/order/groupBuyingMr/index.vue

@@ -339,9 +339,10 @@
                   <el-dropdown-item 
                   command="3" 
                   v-if="hasPermi('groupBuyingMr:groupBuyingMr:print') && (scope.row.status == 3 || scope.row.status == 7)">打印小票</el-dropdown-item>
+                  <!--  scope.row.status == 0  -->
                   <el-dropdown-item 
                   command="4" 
-                  v-if="hasPermi('groupBuyingMr:groupBuyingMr:reset') && scope.row.status == 0">修改订单</el-dropdown-item>
+                  v-if="hasPermi('groupBuyingMr:groupBuyingMr:reset') && scope.row.status == 3">修改订单</el-dropdown-item>
                   <!-- <el-dropdown-item 
                   command="5" 
                   v-if="hasPermi('groupBuyingMr:groupBuyingMr:place')"
@@ -371,6 +372,8 @@
     <details-dia ref="detailsDia" :dict="dict" @getList="getList"></details-dia>
     <!-- 重新生成订单  -->
     <resetOrder ref="resetOrder" :dict="dict" @getList="getList" />
+    <!-- 编辑  -->
+    <editBox ref="editBox" @getList="getList" />
 
     <el-dialog
         title="选择小票机"
@@ -515,13 +518,14 @@ import { getSelectById } from '@/api/order/groupBuyingMr'
 import { pageList as getPrintListApi } from "@/api/device/pda";
 import { pagePerformTimeList } from "@/api/schedulingMr/schedulingMr"
 import { exportExcel } from '@/utils/exportexcel'
+import editBox from './dialog/editBox.vue';
 import moment from "moment"
 const https = require('https');
 const axios = require('axios');
 export default {
   name: "GroupBuyingMr",
   dicts: ['agreement_type', 'team_type','order_status_type','pay_way_type'],
-  components: { detailsDia, resetOrder },
+  components: { detailsDia, resetOrder, editBox },
   data() {
     return {
       qHeight: '0px',
@@ -1184,7 +1188,7 @@ export default {
           this.handleOpen(row);
           break;
         case "4":
-          this.handleResetOpen(row);
+          this.handleEditOpen(row);
           break;
         case "5":
           this.handPlaceAnOrder(row);
@@ -1196,6 +1200,10 @@ export default {
           break;
       }
     },
+    /**  打开修改订单   */
+    handleEditOpen(row) {
+      this.$refs["editBox"].openDialog("详情", row, 'normal');
+    },
     handGoRebook(row) {
       this.$router.push({path:'/windowTicketSales/rebook',query: { id: row.id }})
     },

+ 696 - 0
src/views/otaMr/maoyan/dialog/dataEdit.vue

@@ -0,0 +1,696 @@
+<!--
+ * @Description: 新增/编辑弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 2023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\otaMr\dialog\dataEdit.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="70vw"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog">
+      <div>
+        <el-form :model="form" ref="form" size="small" :rules="rules" :inline="true" label-width="100px">
+          <!-- <el-form-item label="门店POIID" prop="poiId">
+            <el-input
+              v-model="form.poiId"
+              placeholder="请输入门店POIID"
+              clearable
+              style="width: 240px"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="商品类目ID" prop="categoryId">
+            <el-select
+              v-model="form.categoryId"
+              placeholder="商品类目ID"
+              clearable
+              style="width: 240px"
+            >
+              <el-option
+                v-for="dict in dict.type.tiktok_category"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item> -->
+        </el-form>
+      </div>
+      <el-table 
+      row-key="tableId"
+      ref="tables" 
+      v-loading="loading" 
+      :data="goodsList" 
+      border 
+      @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+        <el-table-column label="座位类型" align="center" prop="priceName" />
+        <el-table-column label="开始时间" align="center" prop="timeStart" />
+        <el-table-column label="结束时间" align="center" prop="timeEnd" />
+        <el-table-column label="猫眼排期状态" align="center" prop="status">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.tiktok_scheduling_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            v-if="scope.row.status"
+            @click="openCalendarFun(scope.row)"
+          >日历价格配置</el-button>
+          <!-- <el-button
+            size="mini"
+            type="text"
+            @click="submitForm1(scope.row)"
+          >{{ scope.row.status == 1  ? '下架':'上架' }}</el-button> -->
+        </template>
+      </el-table-column>
+      </el-table>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button  @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        :disabled="!multipleSelection || multipleSelection.length == 0"
+        :loading="loading"
+      >
+        <span v-if="loading">提交中...</span>
+        <span v-else>推送已选</span>
+      </el-button>
+    </span>
+    <!--  选择日期 价格  -->
+    <el-dialog
+      :visible.sync="openCalendar"
+      width="70%"
+      class="text-dia-log-class"
+      append-to-body
+      :close-on-click-modal="false"
+      @close="openPrice = false"
+    >
+      <div class="dialog calendar-dialog" v-loading="calendarLoading">
+        <div>
+          <el-button type="primary" @click="openCalendarPrice()">价格设置</el-button>
+          <el-button type="primary" @click="checkIsClear()">一键清空</el-button>
+        </div>
+        <el-calendar v-model="timeValue">
+          <template
+            slot="dateCell"
+            slot-scope="{date, data}">
+            <div :class="['calendar_box', selectTime(data)]" @mouseover="mouseoverFun(data)" @click.stop="clickTimeFun(data)">
+              <span>{{ data.day.split('-').slice(1).join('-') }}</span>
+              <div style="width: 100%; display: flex;flex-wrap: wrap;" >
+                <div 
+                :key="index"
+                v-for="(item,index) in getPerFormList(data)"
+                >
+                {{ item.title }}:{{ item.money }}
+                </div>
+              </div>
+              
+            </div>
+            
+          </template>
+        </el-calendar>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="openCalendar = false">返回</el-button>
+      </span>
+    </el-dialog>
+
+    <!-- 设置价格  -->
+    <el-dialog
+      title="价格设置"
+      :visible.sync="openPrice"
+      width="400px"
+      class="text-dia-log-class"
+      append-to-body
+      :close-on-click-modal="false"
+      @close="openPrice = false"
+    >
+      <div v-loading="priceLoading">
+        <el-form :model="formPrice" ref="formPrice" size="small" :rules="rulesPrice" label-width="100px">
+          <el-form-item label="日期区间">
+            {{ showDate() }}
+          </el-form-item>
+          <el-form-item label="票面价" prop="originalAmount">
+            <el-input-number v-model="formPrice.originalAmount" controls-position="right" :min="0"></el-input-number>
+            元
+          </el-form-item>
+          <el-form-item label="售卖价格" prop="saleAmount">
+            <el-input-number v-model="formPrice.saleAmount" controls-position="right" :min="0"></el-input-number>
+            元
+          </el-form-item>
+          <el-form-item label="结算价" prop="costAmount">
+            <el-input-number v-model="formPrice.costAmount" controls-position="right" :min="0"></el-input-number>
+            元
+          </el-form-item>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="openPrice = false">返回</el-button>
+        <el-button @click="submitFormPrice('formPrice','calendarPrice')">提交</el-button>
+      </span>
+    </el-dialog>
+  </el-dialog>
+</template>
+
+<script>
+import { 
+  pushById,
+  getCalendarPriceApi,
+  setCalendarPriceApi,
+  getPushListApi,
+  deleteCalendarPriceApi
+ } from "@/api/otaMr/maoyan";
+import moment from "moment"
+export default {
+  name: "dataEdit",
+  dicts: ['tiktok_category','tiktok_scheduling_status'],
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      goodsList: [],
+      form: {},
+      rules: {
+        poiId: [{ required: true, message: "请输入门店POIID", trigger: ["change","blur"] }],
+        categoryId: [{ required: true, message: "请选择商品类目ID", trigger: ["change","blur"] }],
+      },
+      multipleSelection: [],
+
+      openCalendar: false,
+      timeValue: new Date(),
+      timeValueObj: {
+        prev: null,
+        next: null,
+        hover: null
+      },
+      calendarLoading: false,
+      perFormList: [],
+
+      openPrice: false,
+      priceLoading: false,
+      formPrice: {},
+      rulesPrice: {
+        originalAmount: [{ required: true, message: "请输入票面价", trigger: ["change","blur"] }],
+        saleAmount: [{ required: true, message: "请输入售卖价格", trigger: ["change","blur"] }],
+        costAmount: [{ required: true, message: "请输入结算价", trigger: ["change","blur"] }],
+      },
+      seatTypeId: null,
+      calendarId: null,
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    async openDialog(title, obj, type) {
+      this.open = true;
+      this.goodsList = []
+      this.multipleSelection = []
+      this.timeValueObj = {}
+      this.form = JSON.parse(JSON.stringify(obj))
+      
+      await this.getPushListFun(obj,type)
+
+      this.$nextTick(()=>{
+        this.goodsList.forEach((item)=>{
+          if(item.checkFlag == 1) {
+            this.$refs.tables.toggleRowSelection(item,true)
+          }
+        })
+        this.$refs["form"].clearValidate()
+      })
+    },
+     /**  获取设置的日历价格  */
+     async getPushListFun(obj,type) {
+      try {
+        let res = await getPushListApi({
+          id: obj.id
+        })
+        if(res.code == 200) {
+          let list = []
+          if(type == 'yesPush') {
+            list = res.data
+          }else {
+            if( res.data && res.data.length > 0){
+              obj.sku.forEach((item,index)=>{
+                let obj1 = JSON.parse(JSON.stringify(item))
+                res.data.forEach((item1,index1)=>{
+                  if(item1.id == obj1.id){
+                    obj1 =  JSON.parse(JSON.stringify(item1))
+                  }
+                  
+                })
+                list.push({
+                  ...obj1,
+                  tableId: "id_" + index
+                })
+              })
+              
+              this.goodsList = res.data
+            }else {
+              obj.sku.forEach((item,index)=>{
+                list.push({
+                  ...item,
+                  tableId: "id_" + index
+                })
+              })
+            }
+          }
+          
+          this.goodsList = JSON.parse(JSON.stringify(list))
+        }
+      } catch (error) {
+        this.loading = false
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(async (valid) => {
+        if (valid) {
+          try {
+            if(!this.multipleSelection && this.multipleSelection.length <= 0) {
+              this.$message.error("请选择上推送的数据!!!");
+              return
+            } 
+            let flog = false
+            let list = []
+            this.multipleSelection.forEach((item)=>{
+              list.push({
+                ...item,
+                checkFlag: 1
+              })
+              // if((!item.actualAmount && item.actualAmount !=0) || (!item.originAmount && item.originAmount !=0)) {
+              //   flog = true
+              // } 
+            })
+            // if(flog) {
+            //   this.$message.error("请输入售卖价格和结算价!!!");
+            //   return
+            // }
+            this.loading = true;
+            const { code } = await pushById({ 
+              ...this.form,
+              sku: list
+            });
+            if (code === 200) {
+              this.$message.success("操作成功!");
+              this.$emit("getList");
+              this.cancel();
+            }
+          } catch (error) {
+            console.error("error====",error)
+          } finally {
+            this.loading = false;
+          }
+        }else {
+
+        }
+      })
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      this.$refs["form"].clearValidate()
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+    isCheck(row){
+      let flog = false
+      this.multipleSelection.forEach((item,index)=>{
+        if(item.tableId == row.tableId) {
+          flog = true
+        }
+      })
+      return flog
+    },
+    handleSelectionChange(val) {
+      console.log("选中了====", val)
+      this.multipleSelection = val;
+    },
+
+    getPerFormList(data) {
+      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 + '元' },
+            { title: '结算价', money: item.costAmount + '元' },
+          ]
+        }
+      })
+      return list
+    },
+    /**  打开价格设置   */
+    openCalendarPrice(){
+      if( this.timeValueObj.prev && this.timeValueObj.next ) {
+        this.openPrice = true
+        this.formPrice = {}
+        this.$nextTick(()=>{
+          this.$refs.formPrice.clearValidate()
+        })
+      }else {
+        this.$message.error("请选择时间区间!!!");
+      }
+      
+    }, 
+    checkIsClear(){
+      if (this.timeValueObj.prev && this.timeValueObj.next) {
+        let minTime = moment(this.timeValueObj.prev).valueOf()
+        let maxTime = moment(this.timeValueObj.next).valueOf()
+        let startDate = null
+        let endDate = null
+        if (minTime > maxTime) {
+          startDate = this.timeValueObj.next
+          endDate = this.timeValueObj.prev
+        } else {
+          startDate = this.timeValueObj.prev
+          endDate = this.timeValueObj.next
+        }
+        this.$modal.confirm('确定要清空勾选"' + startDate + '——' + endDate + '"的日期范围内的数据吗?').then(()=> {
+          this.clearCalendarPrice()
+        }).catch(() => {});
+      } else {
+        this.$message.error("请选择时间区间!!!");
+      }
+      
+    }, 
+    /** 一键清除  */
+    async clearCalendarPrice() {
+      try {
+        if( this.timeValueObj.prev && this.timeValueObj.next ) {
+          let minTime = moment(this.timeValueObj.prev).valueOf()
+          let maxTime = moment(this.timeValueObj.next).valueOf()
+          let startDate = null
+          let endDate = null
+          if(minTime > maxTime){
+            startDate = this.timeValueObj.next
+            endDate = this.timeValueObj.prev
+          }else {
+            startDate = this.timeValueObj.prev
+            endDate = this.timeValueObj.next
+          }
+          let daysList = [];
+          let SDate = moment(startDate);
+          let EDate = moment(endDate);
+          daysList.push({
+            "priceDate":  SDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
+          });
+          while (SDate.add(1, "days").isBefore(EDate)) { // 注意这里add方法处理后SDate对象已经改变。      
+            daysList.push({
+              "priceDate":  SDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
+            });
+          }
+          if(this.timeValueObj.next != this.timeValueObj.prev){
+            daysList.push({
+              "priceDate": EDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
+            });
+          }
+          let res = await deleteCalendarPriceApi({
+            "id": this.form.id,
+            "goodsId": this.form.goodsId,
+            "seatTypeId": this.seatTypeId,
+            "data": daysList
+          })
+          if(res.code == 200) {
+            this.openPrice = false
+            this.$modal.msgSuccess(res.msg);
+            this.getCalendarPrice()
+          }
+        }else {
+          this.$message.error("请选择时间区间!!!");
+        }
+      } catch (error) {
+        
+      }
+    },
+    submitFormPrice(formName,funName) {
+        this.$refs[formName].validate((valid) => {
+          if (valid) {
+            this[funName]()
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+    },
+    openCalendarFun(row){
+      this.seatTypeId = row.seatTypeId
+      this.calendarId = row.id
+      this.$set(this,'timeValue',new Date())
+      this.getCalendarPrice()
+      
+    },
+    /**  获取设置的日历价格  */
+    async getCalendarPrice() {
+      try {
+        this.timeValueObj = {}
+        let res = await getCalendarPriceApi({
+          "goodsId": this.form.goodsId,
+          "seatTypeId": this.seatTypeId
+        })
+        if(res.code == 200) {
+          this.openCalendar = true
+          this.perFormList = res.data
+        }
+      } catch (error) {
+        
+      }
+    },
+    /**  设置价格  */
+    async calendarPrice(type){
+      try {
+        if( this.timeValueObj.prev && this.timeValueObj.next ) {
+          let minTime = moment(this.timeValueObj.prev).valueOf()
+          let maxTime = moment(this.timeValueObj.next).valueOf()
+          let startDate = null
+          let endDate = null
+          if(minTime > maxTime){
+            startDate = this.timeValueObj.next
+            endDate = this.timeValueObj.prev
+          }else {
+            startDate = this.timeValueObj.prev
+            endDate = this.timeValueObj.next
+          }
+          let daysList = [];
+          let SDate = moment(startDate);
+          let EDate = moment(endDate);
+          daysList.push({
+              "id": null,
+              "priceDate":  SDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
+              "originalAmount": this.formPrice.originalAmount,
+              "saleAmount": this.formPrice.saleAmount,
+              "costAmount": this.formPrice.costAmount
+            });
+          while (SDate.add(1, "days").isBefore(EDate)) { // 注意这里add方法处理后SDate对象已经改变。      
+            daysList.push({
+              "id": null,
+              "priceDate":  SDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
+              "originalAmount": this.formPrice.originalAmount,
+              "saleAmount": this.formPrice.saleAmount,
+              "costAmount": this.formPrice.costAmount
+            });
+          }
+          if(this.timeValueObj.next != this.timeValueObj.prev){
+            daysList.push({
+             "id": null,
+              "priceDate": EDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
+              "originalAmount": this.formPrice.originalAmount,
+              "saleAmount": this.formPrice.saleAmount,
+              "costAmount": this.formPrice.costAmount
+            });
+          }
+          console.log("daysList===",daysList)
+          daysList.forEach((item,index)=>{
+            this.perFormList.forEach((item1,index1)=>{
+              if(moment(item.priceDate).format("YYYY-MM-DD") == moment(item1.priceDate).format("YYYY-MM-DD") ) {
+                daysList[index].id = item1.id
+              }
+            })
+          })
+          let res = await setCalendarPriceApi({
+            "id": this.calendarId,
+            "goodsId": this.form.goodsId,
+            "seatTypeId": this.seatTypeId,
+            "data": daysList
+          })
+          if(res.code == 200) {
+            this.openPrice = false
+            this.getCalendarPrice()
+          }
+        }else {
+          this.$message.error("请选择时间区间!!!");
+        }
+      } catch (error) {
+        
+      }
+      
+    },
+
+    /** 选中得时间  */
+    selectTime(data) {
+      let srt = ''
+      let newTime = moment(data.day).startOf('day').valueOf()
+      let newTime1 = moment().startOf('day').valueOf()
+      if(newTime < newTime1 ) {
+        return "disable_time"
+      }
+      if( this.timeValueObj ) {
+        if( this.timeValueObj.prev && this.timeValueObj.next ) {
+          let minTime = moment(this.timeValueObj.prev).valueOf()
+          let maxTime = moment(this.timeValueObj.next).valueOf()
+          if(minTime > maxTime){
+            if(minTime >= newTime && maxTime <= newTime){
+              srt = 'is-select_time'
+            }
+          }else {
+            if(minTime <= newTime && maxTime >= newTime){
+              srt = 'is-select_time'
+            }
+          }
+        }else if( this.timeValueObj.prev && !this.timeValueObj.next && this.timeValueObj.hover ){
+          let minTime = moment(this.timeValueObj.prev).valueOf()
+          let maxTime = moment(this.timeValueObj.hover).valueOf()
+          if(minTime > maxTime){
+            if(minTime >= newTime && maxTime <= newTime){
+              srt = 'is-select_time_hover'
+            }
+          }else {
+            if(minTime <= newTime && maxTime >= newTime){
+              srt = 'is-select_time_hover'
+            }
+          }
+        }
+      }
+      return srt
+    },
+    clickTimeFun(data) {
+      let newTime1 = moment(data.day).startOf('day').valueOf()
+      let newTime = moment().startOf('day').valueOf()
+      if(newTime1 < newTime ) {
+        return 
+      }
+      if(moment(data.day).format("YYYY-MM") != moment(this.timeValue).format("YYYY-MM") ) {
+        return
+      }
+      if( !this.timeValueObj || !this.timeValueObj.prev ) {
+        this.timeValueObj.prev = moment(data.day).format("YYYY-MM-DD")
+      }else if( this.timeValueObj.prev && !this.timeValueObj.next ){
+        this.timeValueObj.next = moment(data.day).format("YYYY-MM-DD")
+      }else if( this.timeValueObj.prev && this.timeValueObj.next ) {
+        this.timeValueObj.prev = moment(data.day).format("YYYY-MM-DD")
+        this.timeValueObj.next = null
+      }
+    },
+    mouseoverFun(data) {
+      if(moment(data.day).format("YYYY-MM") != moment(this.timeValue).format("YYYY-MM") ) {
+        return
+      }
+      if( this.timeValueObj.prev && !this.timeValueObj.next ){
+        this.timeValueObj.hover = moment(data.day).format("YYYY-MM-DD")
+        this.timeValue = new Date(this.timeValueObj.hover)
+      }
+    },
+    showDate(){
+      let srt = ''
+      let minTime = moment(this.timeValueObj.prev).valueOf()
+      let maxTime = moment(this.timeValueObj.next).valueOf()
+      let startDate = null
+      let endDate = null
+      if (minTime > maxTime) {
+        startDate = this.timeValueObj.next
+        endDate = this.timeValueObj.prev
+      } else {
+        startDate = this.timeValueObj.prev
+        endDate = this.timeValueObj.next
+      }
+      return startDate + "至" + endDate
+    }
+  },
+};
+</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;
+  }
+}
+
+.calendar-dialog ::v-deep .el-calendar-table .el-calendar-day {
+  padding: none !important;
+  height: auto;
+}
+
+.calendar_box {
+  width: 100%;
+  min-height: 86px;
+}
+
+.disable_time {
+  user-select: none;
+  cursor: not-allowed;
+}
+
+.is-select_time {
+  background-color: rgba(30,144,255,0.8);
+}
+
+.is-select_time_hover {
+  background-color: rgba(30,144,255,0.4);
+}
+</style>

+ 199 - 0
src/views/otaMr/maoyan/index.vue

@@ -0,0 +1,199 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="10" class="mb8">
+      <right-toolbar :showSearch.sync="showSearch" :search="false" @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="50"></el-table-column>
+      <el-table-column label="美团ID" align="center" prop="id" />
+      <el-table-column label="演出厅" align="center" prop="performHallName" />
+      <el-table-column label="剧目名称" align="center" prop="performName" />
+      <el-table-column label="商品名称" align="center" prop="goodsName" />
+      <el-table-column label="时刻信息" align="center" prop="goodsName1">
+        <template slot-scope="scope">
+          <span>{{ scope.row.times }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <span v-hasPermi="['otaMr:maoyan:push']" style="display: inline-block;">
+            <el-button
+              size="mini"
+              type="text"
+              style="margin-right: 10px;"
+              @click="handlePush(scope.row,scope.index)"
+            >{{ (scope.row.status == -1 || !scope.row.status) ? '上线' : '下线' }}</el-button>
+          </span>
+          <!-- <span v-hasPermi="['otaMr:maoyan:tuisong']" style="display: inline-block;">
+            <el-button
+              size="mini"
+              type="text"
+              style="margin-left: 10px;"
+              @click="handleInventory(scope.row,scope.index)"
+              v-if="scope.row.status == 1"
+            >日历库存推送</el-button>
+          </span> -->
+          <span v-hasPermi="['otaMr:maoyan:time']" style="display: inline-block;margin-right: 10px;">
+            <el-button
+              size="mini"
+              type="text"
+              style="margin-left: 10px;"
+              @click="handleUpdate(scope.row,'yesPush')"
+            >价格日历</el-button>
+          </span>
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleUpdate(scope.row,scope.index,'noPush')"
+            v-hasPermi="['otaMr:maoyan:scheduling']"
+          >排期推送</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"
+    />
+    <!-- 编辑商品弹框 -->
+    <data-edit
+      ref="dataEdit"
+      @getList="getList"
+      :dict="dict"></data-edit>
+
+  </div>
+</template>
+
+<script>
+
+import { pageList, updateById,stockUpdateById } from '@/api/otaMr/maoyan'
+import dataEdit from "./dialog/dataEdit.vue";
+
+export default {
+  name: "Meituan",
+  dicts: ['tiktok_process','tiktok_online','tiktok_category'],
+  components: { dataEdit },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      otaLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      dataList: null,
+      // 弹出层标题
+      title: "",
+
+      otaType: '1',
+
+      // 是否显示弹出层
+      open: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      visibleStatus: false,
+      newObj: {},
+      visibleType: '',
+      otaForm: {},
+      otaRules: {
+        name: [{ required: true, message: "请输入供应商id", trigger: ["change","blur"] }],
+        otaKey: [{ required: true, message: "请输入client id", trigger: ["change","blur"] }],
+        otaValue: [{ required: true, message: "请输入client secret", trigger: ["change","blur"] }]
+      },
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询列表 */
+    getList() {
+      this.loading = true;
+      pageList(this.addDateRange(this.queryParams, this.dateRange))
+      .then(response => {
+          this.dataList = response.data.rows;
+          this.total = response.data.total?Number(response.data.total):0;
+          this.loading = false;
+        }
+      ).catch(()=>{
+        this.dataList = []
+        this.total = 0;
+        this.loading = false;
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.dataList = [];
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row,type) {
+      this.$refs["dataEdit"].openDialog("修改数据", row,type);
+    },
+
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      this.$modal.confirm('是否确认删除商品名称为"' + row.goodsName + '"的数据项?').then(function() {
+        return deleteById(row.id);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 推送 */
+    handlePush(row) {
+      this.$modal.confirm(`是否确认${ row.status == -1 ? '上线': row.status == 1 ?'下线':''}此商品吗?`).then(function() {
+        return updateById({
+          id: row.id,
+          status: row.status == -1 ? 1 : -1
+        });
+      }).then(() => {
+        this.$modal.msgSuccess(`${ row.status == -1 ? '上线': row.status == 1 ?'下线':''}成功`);
+        this.getList();
+      }).catch(() => {
+
+      });
+    },
+    handleInventory(row) {
+      this.$modal.confirm(`是否确认推送此商品的日历库存?`).then(function() {
+        return stockUpdateById({
+          id: row.id,
+        });
+      }).then(() => {
+        this.$modal.msgSuccess(`推送成功`);
+        this.getList();
+      }).catch(() => {
+
+      });
+    },
+  }
+};
+</script>

+ 2 - 2
src/views/priceConfigurationUilt/dialog/addAndEdit.vue

@@ -393,7 +393,7 @@ export default {
     },
      /**  */
      setSaleAmounttile1(){
-      let str = ''
+      let str = '划线价:'
       if(this.channelType == "applet") {
         str = "划线价:"
       }
@@ -410,7 +410,7 @@ export default {
     },
     /**  */
     setSaleAmounttile(){
-      let str = ''
+      let str = '销售价:'
       if(this.channelType == "applet") {
         str = "销售价:"
       }

+ 1 - 1
src/views/priceConfigurationUilt/dialog/bindTeamBox.vue

@@ -209,7 +209,7 @@ export default {
     },
     /**  */
     setSaleAmounttile(){
-      let str = ''
+      let str = '销售价:'
       if(this.channelType == "applet") {
         str = "销售价:"
       }

+ 7 - 1
src/views/priceConfigurationUilt/dialog/calendarBox.vue

@@ -115,9 +115,15 @@ export default {
       }
     },
     getPerFormList(data) {
-      let list = []
+      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 + '元'  },

+ 2 - 2
src/views/priceConfigurationUilt/index.vue

@@ -283,7 +283,7 @@ export default {
     },
     /**  */
     setSaleAmounttile1(){
-      let str = ''
+      let str = '划线价(元)'
       if(this.channelType == "applet") {
         str = "划线价(元)"
       }
@@ -300,7 +300,7 @@ export default {
     },
     /**  */
     setSaleAmounttile(){
-      let str = ''
+      let str = '销售价(元)'
       if(this.channelType == "applet") {
         str = "销售价(元)"
       }

+ 59 - 5
src/views/ticket/schedulingConfiguration/index.vue

@@ -1,9 +1,15 @@
 <template>
   <div class="app-container app-calendar-container">
-    <div>
-      <el-button type="primary" v-hasPermi="['ticketMr:schedulingConfiguration:add']" @click="handleAdd('ADD')">配置排期</el-button>
-      <el-button type="primary" v-hasPermi="['ticketMr:schedulingConfiguration:delect']" @click="checkIsClear()">批量清空</el-button>
-      <el-button type="primary" @click="quickQueryFun()">快速查询</el-button>
+    <div style="display: flex;justify-content: space-between;">
+      <div>
+        <el-button type="primary" v-hasPermi="['ticketMr:schedulingConfiguration:add']" @click="handleAdd('ADD')">配置排期</el-button>
+        <el-button type="primary" v-hasPermi="['ticketMr:schedulingConfiguration:delect']" @click="checkIsClear()">批量清空</el-button>
+        <el-button type="primary" @click="quickQueryFun()">快速查询</el-button>
+      </div>
+      <div>
+        <el-button type="primary" v-hasPermi="['ticketMr:schedulingConfiguration:release']" @click="clearCalendarPrice(1)">批量启用</el-button>
+        <el-button type="primary" v-hasPermi="['ticketMr:schedulingConfiguration:release']" @click="clearCalendarPrice(2)">批量禁用</el-button>
+      </div>
     </div>
     <div v-loading="loading" class="calendar-dialog">
       <el-calendar v-model="timeValue">
@@ -55,6 +61,7 @@
 import { 
   calendarList,
   deleteByDateApi,
+  updateStatusByDateApi
  } from '@/api/ticketMr/schedulingConfiguration'
 
 import moment from "moment"
@@ -295,6 +302,29 @@ export default {
       }
       this.getList();
     },
+    /**  时间调整顺序  */
+    setTimeValueObj(){
+      if (this.timeValueObj.prev && this.timeValueObj.next) {
+        let minTime = moment(this.timeValueObj.prev).valueOf()
+        let maxTime = moment(this.timeValueObj.next).valueOf()
+        let startDate = null
+        let endDate = null
+        if (minTime > maxTime) {
+          startDate = this.timeValueObj.next
+          endDate = this.timeValueObj.prev
+        } else {
+          startDate = this.timeValueObj.prev
+          endDate = this.timeValueObj.next
+        }
+        return {
+          startDate,
+          endDate
+        }
+      } else {
+        this.$message.error("请选择时间区间!!!");
+        return false
+      }
+    },
     checkIsClear(){
       if (this.timeValueObj.prev && this.timeValueObj.next) {
         let minTime = moment(this.timeValueObj.prev).valueOf()
@@ -314,7 +344,6 @@ export default {
       } else {
         this.$message.error("请选择时间区间!!!");
       }
-      
     },
     /** 一键清除  */
     async clearCalendarPrice() {
@@ -345,6 +374,31 @@ export default {
         }
       } catch (error) {
         
+      }
+    },
+    /** 批量禁用/启用  */
+    async clearCalendarPrice(type) {
+      try {
+        let timeS = this.setTimeValueObj()
+        if(!timeS) return
+        this.$modal.confirm(`确定要批量禁${ type == 1 ? '启用' : '禁用' }" ${timeS.startDate} —— ${timeS.endDate} "的日期范围内的场次吗?`).then(async ()=> {
+          let res = await updateStatusByDateApi({
+            startDate: timeS.startDate,
+            endDate: timeS.endDate,
+            status: type
+          })
+          if (res.code == 200) {
+            this.$modal.msgSuccess(res.msg);
+            this.timeValueObj = {
+              prev: null,
+              next: null,
+              hover: null
+            }
+            this.getList()
+          }
+        }).catch(() => {});
+      } catch (error) {
+        
       }
     },
   },

+ 37 - 2
src/views/windowTicketSales/mixins/pay.js

@@ -11,6 +11,9 @@ import {
     factorAuth,
     selectMarketTeamBySourceApi,
    } from '@/api/windowTicketSales/ticketingSales'
+   import { 
+    teamPayOrderUrlApi,
+   } from '@/api/order/groupBuyingMr';
    import { pageList as getPrintListApi } from "@/api/device/pda";
    import { printApi } from '@/api/windowTicketSales/ticketingCollection'
    import { rebookApi } from '@/api/windowTicketSales/rebook'
@@ -69,13 +72,16 @@ export default {
                     this.orderId = res.data.orderId
                     if(this.rebookForm.paymentType == 2) { // 现金支付
                         this.gotoCashPayFun(this.orderId)
-                    }else if(this.rebookForm.paymentType == 3) { // 对公支付
+                    }else if(this.rebookForm.paymentType == 3 || this.rebookForm.paymentType == 6) { // 对公支付
                         this.gotoCorporatePayFun(this.orderId)
                     }else if(this.rebookForm.paymentType == 4){ // 账户余额
                         this.gotoBalancePayFun(this.orderId)
                     }else if(this.rebookForm.paymentType == 5){ // 授信余额
                         this.gotoQuotaPayFun(this.orderId)
-                    }else {
+                    }else if(this.rebookForm.paymentType == 7) {
+                        this.handPlaceAnOrder()
+                    }
+                    else {
                         // 扫码支付
                         this.loading = false
                         this.payStatus = 2
@@ -233,6 +239,35 @@ export default {
                 this.payStatus = 3
             }
         },
+        /**  链接支付  */
+        handPlaceAnOrder() {
+            this.$confirm("确认要生成该订单的支付链接吗?温馨提示:请勿随意将链接发送给陌生人", '提示', {
+            confirmButtonText: '生成并复制链接',
+            cancelButtonText: '取消',
+            type: 'warning'
+            }).then(() => {
+            teamPayOrderUrlApi({ orderId: this.orderId }).then((res) => {
+                if (res.code == 200) {
+                this.$message({
+                    type: 'success',
+                    message: res.msg
+                });
+                this.copyToClipboard(res.data.url)
+                }
+            });
+            }).catch(() => { }).finally(() => {
+            });
+        },
+        /**  复制内容  */
+        copyToClipboard(text) {
+            // 创建一个临时的textarea元素
+            const tempInput = document.createElement('textarea');
+            tempInput.value = text;
+            document.body.appendChild(tempInput);
+            tempInput.select();
+            document.execCommand('copy');
+            document.body.removeChild(tempInput);
+        },
         // 跳转取票界面
         goTicketingCollections(){
             this.$router.push({

+ 17 - 10
src/views/windowTicketSales/model/rebookBox.vue

@@ -16,16 +16,16 @@
             <div class="rebook1_from-box">
                 <div class="rebook1_from">
                     <el-form :model="rebookForm" ref="rebookForm" label-width="100px" :rules="rules">
-                        <el-form-item label="剧目名称:">
+                        <el-form-item label="剧目名称:" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.performName }}</span>
                         </el-form-item>    
-                        <el-form-item label="票务名称:">
+                        <el-form-item label="票务名称:" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.goodsName }}</span>
                         </el-form-item>
-                        <el-form-item label="座位类型:">
+                        <el-form-item label="座位类型:" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.seatTypeName }}</span>
                         </el-form-item>
-                        <el-form-item label="订单座位数:">
+                        <el-form-item label="订单座位数:" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.touristNum }}个</span>
                         </el-form-item>
 
@@ -61,13 +61,19 @@
                         <el-form-item v-if="rebookForm.diffPrice > 0" label="改签费用:">
                             <span>补差价{{ Math.abs(rebookForm.diffPrice) }}元</span>
                         </el-form-item>
-                        <el-form-item v-if="rebookForm.diffPrice > 0" label="支付方式 :" prop="paymentType">
+                        <el-form-item v-if="rebookForm.diffPrice > 0 && !rebookForm.timeId" label="支付方式 :" prop="paymentType">
                             <el-radio-group v-model="rebookForm.paymentType">
-                            <el-radio label="1">扫码支付</el-radio>
-                            <el-radio label="2">现金支付</el-radio>
-                            <el-radio label="3">对公支付</el-radio>
-                            <el-radio label="4">账户余额</el-radio>
-                            <el-radio label="5">授信余额</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="rebookForm.diffPrice > 0 && rebookForm.timeId" label="支付方式 :" prop="paymentType">
+                            <el-radio-group v-model="rebookForm.paymentType">
+                                <el-radio label="3">对公支付</el-radio>
+                                <el-radio label="6">挂账</el-radio>
+                                <el-radio label="7">链接支付</el-radio>
+                                <el-radio label="4">账户余额</el-radio>
+                                <el-radio label="5">授信余额</el-radio>
                             </el-radio-group>
                         </el-form-item>
                         <el-form-item label="备注:">
@@ -349,6 +355,7 @@ export default {
                     auditoriumId: this.rebookForm.auditoriumId,
                     timeId: this.rebookForm.performTimeId,
                     goodsId: this.rebookForm.goodsId,
+                    channelType: this.rebookForm.timeId ? 'group' : 'window'
                 })
                 if(res.code == 200){
                     let list1 = []

+ 24 - 15
src/views/windowTicketSales/model/upgradeBox.vue

@@ -16,23 +16,22 @@
             <div class="rebook1_from-box">
                 <div class="rebook1_from">
                     <el-form :model="rebookForm" ref="rebookForm" label-width="100px" :rules="rules">
-                        <el-form-item label="剧目名称:">
+                        <el-form-item label="剧目名称:" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.performName }}</span>
                         </el-form-item>    
-                        <el-form-item label="票务名称:">
+                        <el-form-item label="票务名称:" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.goodsName }}</span>
                         </el-form-item>
-                        <el-form-item label="座位类型:">
+                        <el-form-item label="座位类型:" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.seatTypeName }}</span>
                         </el-form-item>
-                        <el-form-item label="订单座位数:">
+                        <el-form-item label="订单座位数:" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.touristNum }}个</span>
                         </el-form-item>
-
-                        <el-form-item label="选择日期:" prop="performDate">
+                        <el-form-item label="选择日期:" prop="performDate" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.performDate }}</span>
                         </el-form-item>
-                        <el-form-item label="选择场次:" prop="performTimeId">
+                        <el-form-item label="选择场次:" prop="performTimeId" style="margin-bottom: 0px;">
                             <span>{{ rebookForm.performTimeStart }} — {{ rebookForm.performTimeEnd }} </span>
                         </el-form-item>
                         <el-form-item label="票档:" prop="seatTypeId">
@@ -51,7 +50,7 @@
                             </el-select>
                         </el-form-item>
                         <el-form-item label="订单总额:">
-                            <span>{{ rebookForm.realPrice }}元</span>
+                            <span>{{ rebookForm.realPrice || 0 }}元</span>
                         </el-form-item>
                         <el-form-item v-if="rebookForm.diffPrice < 0" label="升舱费用:">
                             <span>退费{{ Math.abs(rebookForm.diffPrice) }}元</span>
@@ -62,13 +61,19 @@
                             controls-position="right"
                             :min="0"></el-input-number>
                         </el-form-item>
-                        <el-form-item v-if="rebookForm.diffPrice > 0" label="支付方式 :" prop="paymentType">
+                        <el-form-item v-if="rebookForm.diffPrice > 0 && !rebookForm.timeId" label="支付方式 :" prop="paymentType">
+                            <el-radio-group v-model="rebookForm.paymentType">
+                                <el-radio label="1">扫码支付</el-radio>
+                                <el-radio label="2">现金支付</el-radio>
+                            </el-radio-group>
+                        </el-form-item>
+                        <el-form-item v-if="rebookForm.diffPrice > 0 && rebookForm.timeId" label="支付方式 :" prop="paymentType">
                             <el-radio-group v-model="rebookForm.paymentType">
-                            <el-radio label="1">扫码支付</el-radio>
-                            <el-radio label="2">现金支付</el-radio>
-                            <!-- <el-radio v-if="['10','11','13','14','18','19'].includes(ruleForm.source)" label="3">对公支付</el-radio> -->
-                            <!-- <el-radio v-if="['10','11','13','14','18','19'].includes(ruleForm.source)" label="4">账户余额({{ balance }})</el-radio>
-                            <el-radio v-if="['10','11','13','14','18','19'].includes(ruleForm.source)" label="5">授信余额({{ grantQuota }})</el-radio> -->
+                                <el-radio label="3">对公支付</el-radio>
+                                <el-radio label="6">挂账</el-radio>
+                                <el-radio label="7">链接支付</el-radio>
+                                <el-radio label="4">账户余额</el-radio>
+                                <el-radio label="5">授信余额</el-radio>
                             </el-radio-group>
                         </el-form-item>
                         <el-form-item label="备注:">
@@ -81,7 +86,7 @@
                         </el-form-item>
                     </el-form>
                     <div class="tip-box">
-                        <p>温馨提示:仅限升舱一次,且升舱后禁止退款,确认要继续升舱吗。</p>
+                        <p style="font-size: 12px;">温馨提示:仅限升舱一次,且升舱后禁止退款,确认要继续升舱吗。</p>
                     </div>
                 </div>
                 <div class="rebook1_seat" v-loading="seatLoading" :element-loading-text="seatLoadText">
@@ -351,6 +356,7 @@ export default {
                     auditoriumId: this.rebookForm.auditoriumId,
                     timeId: this.rebookForm.performTimeId,
                     goodsId: this.rebookForm.goodsId,
+                    channelType: this.rebookForm.timeId ? 'group' : 'window'
                 })
                 if(res.code == 200){
                     let list1 = []
@@ -433,6 +439,7 @@ export default {
             this.rebookForm.seatList = list1
             console.log("已选择的====",list)
         },
+        
     }
 }
 </script>
@@ -454,6 +461,8 @@ export default {
     .rebook1_from {
         width: 100%;
         height: 100%;
+        overflow: hidden;
+        overflow-y: auto;
         padding: 0 20px 0 0;
         width: 400px;
         box-sizing: border-box;

+ 3 - 3
src/views/windowTicketSales/rebook.vue

@@ -75,7 +75,7 @@
             </el-table-column>
             <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
               <template slot-scope="scope">
-                <!-- <el-button 
+                <el-button 
                 type="primary" 
                 size="small"
                 @click="handleUpgrade(scope.row)"
@@ -86,7 +86,7 @@
                 size="small"
                 @click="handleRebook(scope.row)"
                 v-if="hasPermi('windowTicketSales:rebook:rebook') && scope.row.allowReSubmit == 1 && scope.row.status == 3"
-                >改签</el-button> -->
+                >改签</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -135,7 +135,7 @@ export default {
     }
   },
   created() {
-    this.queryParams.orderId = this.$route.query.id ? this.$route.query.id : ''
+    this.$set(this.queryParams,'orderId',this.$route.query.id ? this.$route.query.id : '')
     this.getList()
   },
   methods: {

+ 4 - 0
vue.config.js

@@ -23,6 +23,10 @@ module.exports = {
   publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
   // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
   outputDir: 'dist',
+  // output: {
+  //   filename: '[name].[contenthash].js',
+  //   chunkFilename: '[name].[contenthash].js'
+  // },
   // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
   assetsDir: 'static',
   // 是否开启eslint保存检测,有效值:ture | false | 'error'