MONSTER-ygh hace 9 meses
padre
commit
da58fdbd84

+ 10 - 0
src/views/tourism/financialManagement/cateringRefundManagement.vue

@@ -46,6 +46,16 @@
                 />
                 </el-select>
             </el-form-item>
+            <el-form-item label="订单来源" prop="source">
+                  <el-select v-model="queryParams.source" clearable placeholder="请选择订单来源">
+                      <el-option
+                          v-for="dict in dict.type.tourism_ticketOrders_source"
+                          :key="dict.value"
+                          :label="dict.label"
+                          :value="dict.value">
+                      </el-option>
+                    </el-select>
+                </el-form-item>
             <el-form-item label="退款申请时间">
               <el-date-picker
                 v-model="queryParams.time"

+ 10 - 0
src/views/tourism/financialManagement/hotelsRefundManagement.vue

@@ -46,6 +46,16 @@
                 />
                 </el-select>
             </el-form-item>
+            <el-form-item label="订单来源" prop="source">
+                  <el-select v-model="queryParams.source" clearable placeholder="请选择订单来源">
+                      <el-option
+                          v-for="dict in dict.type.tourism_ticketOrders_source"
+                          :key="dict.value"
+                          :label="dict.label"
+                          :value="dict.value">
+                      </el-option>
+                    </el-select>
+                </el-form-item>
             <el-form-item label="退款申请时间">
               <el-date-picker
                 v-model="queryParams.time"

+ 20 - 18
src/views/tourism/orderManagement/cateringOrders/cateringOrders.vue

@@ -72,7 +72,7 @@
                   </el-date-picker>
                 </el-form-item> -->
                 <el-form-item label="订单来源" prop="source">
-                  <el-select v-model="queryParams.source" clearable placeholder="请选择支付状态">
+                  <el-select v-model="queryParams.source" clearable placeholder="请选择订单来源">
                       <el-option
                           v-for="dict in dict.type.tourism_ticketOrders_source"
                           :key="dict.value"
@@ -152,22 +152,24 @@
                   @click="handleDetails(scope.row)"
                   v-hasPermi="configPermi.details"
                 >详情</el-button>
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-position"
-                  @click="repastOrderAcceptFun(scope.row,12)"
-                  v-if="scope.row.orderStatus == 3"
-                  v-hasPermi="configPermi.repastOrderAccept"
-                >接单</el-button>
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-position"
-                  @click="repastOrderAcceptFun(scope.row,13)"
-                  v-hasPermi="configPermi.repastOrderAccept"
-                  v-if="scope.row.orderStatus == 3"
-                >拒单</el-button>
+                <span v-hasPermi="configPermi.repastOrderAccept" style="margin-left: 10px;display: inline-block;">
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-position"
+                    @click="repastOrderAcceptFun(scope.row,12)"
+                    v-if="scope.row.orderStatus == 3"
+                  >接单</el-button>
+                </span>
+                <span v-hasPermi="configPermi.repastOrderAccept" style="margin-left: 10px;display: inline-block;">
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-position"
+                    @click="repastOrderAcceptFun(scope.row,13)"
+                    v-if="scope.row.orderStatus == 3"
+                  >拒单</el-button>
+                </span>
               </template>
             </el-table-column>
           </el-table>
@@ -328,7 +330,7 @@
       /**  发货   */
       repastOrderAcceptFun(row,type) {
         if(this.$refs.repastOrderAccept) {
-          this.$refs.repastOrderAccept.initData(`${ type == 11 ? '接单' : '拒单' }操作`, "EDIT",{
+          this.$refs.repastOrderAccept.initData(`${ type == 12 ? '接单' : '拒单' }操作`, "EDIT",{
             ...row,
             repastOrderAcceptType: type
           })

+ 3 - 3
src/views/tourism/orderManagement/cateringOrders/formBox/repastOrderAccept.vue

@@ -20,7 +20,7 @@
         >
         <el-form :model="form" ref="form" :rules="rules" label-width="130px">
           <el-form-item 
-          :label="`${form.status == 11 ? '接单' : '拒单'}回复:`" 
+          :label="`${form.status == 12 ? '接单' : '拒单'}回复:`" 
           prop="remark">
             <el-input 
             style="width: 350px;"
@@ -45,7 +45,7 @@
         element-loading-spinner="el-icon-loading"
         element-loading-background="rgba(0, 0, 0, 0.8)"
       > 
-        {{ loading ? '提交中...' : '保存' }}
+        {{ loading ? '提交中...' : '确认' }}
       </el-button>
     </span>
     <!-- 添加或修改对话框 End -->
@@ -100,7 +100,7 @@ export default {
         })
         this.formStatus = 1
       }else if(model=='EDIT') { // 新增
-        if(row.repastOrderAcceptType == 11) {
+        if(row.repastOrderAcceptType == 12) {
           this.rules.remark[0].required = false
         }else {
           this.rules.remark[0].required = true

+ 3 - 3
src/views/tourism/orderManagement/hotelsOrders/formBox/repastOrderAccept.vue

@@ -20,7 +20,7 @@
         >
         <el-form :model="form" ref="form" :rules="rules" label-width="130px">
           <el-form-item 
-          :label="`${form.status == 11 ? '接单' : '拒单'}回复:`" 
+          :label="`${form.status == 12 ? '接单' : '拒单'}回复:`" 
           prop="remark">
             <el-input 
             style="width: 350px;"
@@ -45,7 +45,7 @@
         element-loading-spinner="el-icon-loading"
         element-loading-background="rgba(0, 0, 0, 0.8)"
       > 
-        {{ loading ? '提交中...' : '保存' }}
+        {{ loading ? '提交中...' : '确认' }}
       </el-button>
     </span>
     <!-- 添加或修改对话框 End -->
@@ -100,7 +100,7 @@ export default {
         })
         this.formStatus = 1
       }else if(model=='EDIT') { // 新增
-        if(row.repastOrderAcceptType == 11) {
+        if(row.repastOrderAcceptType == 12) {
           this.rules.remark[0].required = false
         }else {
           this.rules.remark[0].required = true

+ 8 - 8
src/views/tourism/orderManagement/hotelsOrders/hotelsOrders.vue

@@ -90,7 +90,7 @@
                   </el-date-picker>
                 </el-form-item> -->
                 <el-form-item label="订单来源" prop="source">
-                  <el-select v-model="queryParams.source" clearable placeholder="请选择支付状态">
+                  <el-select v-model="queryParams.source" clearable placeholder="请选择订单来源">
                       <el-option
                           v-for="dict in dict.type.tourism_ticketOrders_source"
                           :key="dict.value"
@@ -132,9 +132,9 @@
           <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
             <el-table-column type="index" label="序号" align="center"  />
             <el-table-column label="订单编号" align="center" key="id" prop="id" v-if="columns[0].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="酒店名称" align="center" key="merchantName" prop="merchantName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="房型名称" align="center" key="merchantName" prop="merchantName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="预定房间数(间)" align="center" key="merchantName" prop="merchantName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="酒店名称" align="center" key="shopName" prop="shopName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="房型名称" align="center" key="goodsName" prop="goodsName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="预定房间数(间)" align="center" key="quantity" prop="quantity" v-if="columns[3].visible" :show-overflow-tooltip="true" />
             <el-table-column label="实付金额(元)" align="center" key="realPrice" prop="realPrice" v-if="columns[4].visible" :show-overflow-tooltip="true" />
             <el-table-column label="支付状态" align="center" key="payStatus" prop="payStatus" v-if="columns[5].visible" :show-overflow-tooltip="true">
               <template slot-scope="scope">
@@ -146,8 +146,8 @@
                 <dict-tag :options="dict.type.tourism_ticketOrders_payWay" :value="scope.row.payWay"/>
               </template>
             </el-table-column>
-            <el-table-column label="联系人" align="center" key="memberMobile" prop="memberMobile" v-if="columns[7].visible"></el-table-column>
-            <el-table-column label="联系电话" align="center" key="memberMobile" prop="memberMobile" v-if="columns[8].visible"></el-table-column>
+            <el-table-column label="联系人" align="center" key="contactName" prop="contactName" v-if="columns[7].visible"></el-table-column>
+            <el-table-column label="联系电话" align="center" key="contactMobile" prop="contactMobile" v-if="columns[8].visible"></el-table-column>
             <el-table-column label="下单时间" align="center" key="createTime" prop="createTime" v-if="columns[9].visible"></el-table-column>
             <el-table-column label="订单来源" align="center" key="source" prop="source" v-if="columns[10].visible">
               <template slot-scope="scope">
@@ -233,7 +233,7 @@
           repastOrderAccept: ['orderManagement:hotelsOrders:repastOrderAccept'],
         },
         configUrl: {
-          list: '/order/orderInfo/repastOrderList', // 列表地址
+          list: '/order/orderInfo/hotelOrderList', // 列表地址
           delect: '', // 删除地址
           upload: '',// 导入地址
           download:'', // 下载模板地址
@@ -353,7 +353,7 @@
       /**  发货   */
       repastOrderAcceptFun(row,type) {
         if(this.$refs.repastOrderAccept) {
-          this.$refs.repastOrderAccept.initData(`${ type == 11 ? '接单' : '拒单' }操作`, "EDIT",{
+          this.$refs.repastOrderAccept.initData(`${ type == 12 ? '接单' : '拒单' }操作`, "EDIT",{
             ...row,
             repastOrderAcceptType: type
           })

+ 1 - 0
src/views/tourism/productManagement/cateringManagement.vue

@@ -5,6 +5,7 @@
         <el-col :span="24" :xs="24">
             <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
                 <el-form-item label="门店名称" prop="name">
+                  <el-input v-model="queryParams.name" placeholder="请输入门店名称" />
                 </el-form-item>
                 <el-form-item label="营业状态" prop="status">
                   <el-select v-model="queryParams.status" clearable placeholder="请选择状态">

+ 273 - 0
src/views/tourism/productManagement/formBox/hotelsManagementDataTabel.vue

@@ -0,0 +1,273 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="90%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="form-dialog-box">
+      <el-calendar>
+      <!-- 这里使用的是 2.5 slot 语法,对于新项目请使用 2.6 slot 语法-->
+      <template
+        slot="dateCell"
+        slot-scope="{date, data}">
+        <p :class="data.isSelected ? 'is-selected' : ''">
+          {{ data.day.split('-').slice(1).join('-') }} {{ data.isSelected ? '✔️' : ''}}
+        </p>
+      </template>
+    </el-calendar>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  listTableApi,
+  delTableParamsApi
+} from "@/api/CURD"
+import addAndEdit1 from "./commodityClassForm.vue"
+
+export default {
+  name: "CateringManagementClassTabel",
+  dicts: [],
+  components: { addAndEdit1 },
+  data() {
+    return {
+      title: "分类管理",// 通用标题
+      activeName: 'first',
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      tableId: null,
+      configPermi: {},
+      configUrl: {
+        list: '/goods/goodsClassify/treeList', // 列表地址
+      },
+        tabelId: null,
+        tabelName: null,
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 用户表格数据
+        tableList: [],
+        // 查询参数
+        queryParams: {
+        },
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.actionUrlLoading = false
+      this.model = model
+      this.formStatus = 1
+      this.loading = false
+      this.tabelId = row.id
+      this.tabelName = row.name
+      this.getList();
+    },
+    /** 查询用户列表 */
+    getList() {
+        this.loading = true;
+        let params = JSON.parse(JSON.stringify(this.queryParams))
+        params['id'] = this.tabelId
+        listTableApi(
+          this.configUrl.list,
+          this.addDateRange(
+            params,
+            this.dateRange)).then(response => {
+              let list = response.data
+              this.tableList = list;
+              this.loading = false;
+          }
+        ).catch (error=>{
+          console.error('获取列表失败!!!!',error)
+          this.tableList = [];
+          this.total = 0;
+          this.loading = false
+        })
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.dateRange = [];
+        this.queryParams = {
+          pageNum: 1,
+          pageSize: 10,
+        }
+        this.handleQuery();
+      },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.open = false;
+    },
+  },
+  watch: {
+
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 50vh;
+  max-height: 65vh;
+  overflow-y: auto;
+  >div {
+    width: 100%;
+    min-height: 50vh;
+  }
+  .form-title {
+    padding: 0 0 10px 0;
+    span {
+      display: flex;
+      color: rgba(65,80,88,1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+    
+  }
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+.el-table{
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 863 - 0
src/views/tourism/productManagement/formBox/hotelsManagementForm copy.vue

@@ -0,0 +1,863 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="90%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="form-dialog-box"
+    v-loading="loading"
+    :element-loading-text="loadingText"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0)">
+      <div
+        v-loading="loading"
+        :element-loading-text="''"
+        element-loading-spinner="''"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+        <el-form :model="form" ref="form" :rules="rules" label-width="150px">
+          <div class="form-title"><span>基本信息</span></div>
+          <el-form-item label="房型名称:" prop="name">
+            <el-input style="width: 350px;" v-model="form.name" placeholder="请输入房型名称" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="房型照片:" prop="shopLogo">
+            <div
+            style="width: 120px;"
+            v-loading="actionUrlLoading"
+            element-loading-text="上传中..."
+            element-loading-spinner="el-icon-loading"
+            element-loading-background="rgba(0, 0, 0, 0.8)"
+            >
+              <el-upload
+                class="avatar-uploader"
+                :action="actionUrl"
+                :data="{
+                  bucket: 'tourism'
+                }"
+                :show-file-list="false"
+                accept=".jpg, .png, jpeg"
+                :on-success="handleAvatarSuccess"
+                :on-progress="handleAvatarProgress"
+                :before-upload="beforeAvatarUpload"
+                :disabled="actionUrlLoading"
+                :on-error="handleAvatarError"
+                >
+                <img v-if="form.shopLogo" style="width: 100px;height: 100px;" :src="form.shopLogo" class="avatar">
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              </el-upload>
+            </div>
+            <span>建议上传图片尺寸40px X 40px,支持jpg/png/gif,支持5MB大小以内的图片上传</span>
+          </el-form-item>
+          <el-form-item label="房型数量:" prop="name">
+            <el-input-number style="width: 350px;" v-model="form.name" placeholder="请输入房型数量" />
+          </el-form-item>
+          <div style="display: flex;">
+            <el-form-item label="房型价格:" prop="name">
+              <el-input-number style="width: 350px;" v-model="form.name" placeholder="请输入房型价格" />
+            </el-form-item>
+            <el-form-item label="划线价格:" prop="name">
+              <el-input-number style="width: 350px;" v-model="form.name" placeholder="请输入划线价格" />
+            </el-form-item>
+          </div>
+          <el-form-item label="销售日期:" prop="name">
+            <el-date-picker
+              v-model="form.name"
+              format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期">
+            </el-date-picker>
+          </el-form-item>
+          <div class="form-title"><span>房型信息</span></div>
+          <el-form-item label="床型:" prop="name">
+            <el-input style="width: 350px;" v-model="form.name" placeholder="请输入床型" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="面积:" prop="name">
+            <el-input-number style="width: 350px;" v-model="form.name" placeholder="请输入面积" />
+            <span>㎡</span>
+          </el-form-item>
+          <el-form-item label="可住人数:" prop="name">
+            <el-input-number style="width: 350px;" v-model="form.name" placeholder="请输入可住人数" />
+            <span>人</span>
+          </el-form-item>
+          <el-form-item label="网络:" prop="name">
+            <el-input style="width: 350px;" v-model="form.name" placeholder="请输入网络" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="窗户:" prop="name">
+            <el-input style="width: 350px;" v-model="form.name" placeholder="请输窗户" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="有无早餐:" prop="name">
+            <el-input style="width: 350px;" v-model="form.name" placeholder="请输有无早餐" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="其他信息:" prop="name">
+            <el-input style="width: 350px;" type="textarea" v-model="form.name" placeholder="请输其他信息" maxlength="200" show-word-limit />
+          </el-form-item>
+          <div class="form-title"><span>订购规则</span></div>
+          <el-form-item label="支持设置限制账号单笔订单的最大预购数量:" prop="name" label-width="300px">
+            <el-input-number style="width: 350px;" v-model="form.name" placeholder="请输入面积" />
+            <span>间</span>
+          </el-form-item>
+          <div style="display: flex;">
+            <el-form-item label="当日最早入住时间:" prop="name" label-width="300px">
+              <el-time-picker v-model="form.time" value-format="HH:mm" format="HH:mm" splaceholder="请选择当日最早入住时间" ></el-time-picker>
+            </el-form-item>
+            <el-form-item label="次日最晚离店时间:" prop="name" label-width="300px">
+              <el-time-picker v-model="form.time" value-format="HH:mm" format="HH:mm" splaceholder="请选择次日最晚离店时间" ></el-time-picker>
+            </el-form-item>
+          </div>
+          <el-form-item label="类型:" prop="shopModel">
+            <el-select v-model="form.shopModel" clearable placeholder="请选择类型">
+              <el-option
+                v-for="item in [
+                  { value: 1, label: '酒店' },
+                  { value: 2, label: '民宿' }
+                ]"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label="酒店门头照:" prop="shopHeadImg">
+            <div
+            style="width: 120px;"
+            v-loading="actionUrlLoading_1"
+            element-loading-text="上传中..."
+            element-loading-spinner="el-icon-loading"
+            element-loading-background="rgba(0, 0, 0, 0.8)"
+            >
+              <el-upload
+                class="avatar-uploader"
+                :action="actionUrl"
+                :data="{
+                  bucket: 'tourism'
+                }"
+                :show-file-list="false"
+                accept=".jpg, .png, jpeg"
+                :on-success="handleAvatarSuccess_1"
+                :on-progress="handleAvatarProgress_1"
+                :before-upload="beforeAvatarUpload_1"
+                :disabled="actionUrlLoading_1"
+                :on-error="handleAvatarError_1"
+                >
+                <img v-if="form.shopHeadImg" style="width: 100px;height: 100px;" :src="form.shopHeadImg" class="avatar">
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              </el-upload>
+            </div>
+            <span>建议上传图片尺寸40px X 40px,支持jpg/png/gif,支持5MB大小以内的图片上传</span>
+          </el-form-item>
+          <el-form-item label="门店宣传" prop="shopAdvImgs">
+            <div style="display: flex;">
+              <div 
+              v-for="(item,index) in form.shopAdvImgs" 
+              :key="index"
+              style="width: 100px; height: 100px;position: relative;border: 1px solid #999;border-radius: 5px;margin-right: 20px;">
+                <el-image 
+                  style="width: 100%; height: 100%"
+                  :src="item" 
+                  :preview-src-list="form.shopAdvImgs">
+                </el-image>
+                <span @click="handleRemoveMore(index)" style="position: absolute;top: -15px;right: -15px;color: red;font-size: 24px;z-index: 999;cursor: pointer;">
+                  <i class="el-icon-error"></i>
+                </span>
+              </div>
+              <div 
+              style="width: 100px; height: 100px;" 
+              v-if="!form.shopAdvImgs||form.shopAdvImgs.length<6"
+              v-loading="actionUrlMoreLoading"
+              element-loading-text="上传中..."
+              element-loading-spinner="el-icon-loading"
+              element-loading-background="rgba(0, 0, 0, 0.8)"
+              >
+                <el-upload
+                  class="avatar-uploader"
+                  :action="actionUrl"
+                  :data="{
+                    bucket: 'tourism'
+                  }"
+                  :show-file-list="false"
+                  :before-upload="beforeAvatarUploadMore"
+                  :on-success="handleAvatarSuccessMore"
+                  :on-progress="handleAvatarProgressMore"
+                  :disabled="actionUrlMoreLoading"
+                  :on-error="handleAvatarErrorMore"
+                  >
+                  <i class="el-icon-plus avatar-uploader-icon"></i>
+                </el-upload>
+              </div>
+              
+            </div>
+            <span>建议上传图片尺寸140px X 90px,支持jpg、png、gif,支持5MB大小以内的图片上传</span>
+          </el-form-item>
+          <el-form-item label="营业时间:" prop="openTimeStart">
+            <div style="display: flex;">
+              <el-form-item label-width="0" label="">
+                <el-input style="width: 150px;" v-model="form.openTimeStart" placeholder="请输入开始时间" />
+              </el-form-item>
+              <span>--</span>
+              <el-form-item label-width="0" label="" prop="openTimeEnd">
+                <el-input style="width: 150px;" v-model="form.openTimeEnd" placeholder="请输入结束时间" />
+              </el-form-item>
+            </div>
+          </el-form-item>
+          <el-form-item label-width="80px" label="酒店介绍">
+            <editor ref="editor" v-model="form.shopDetail" :fileSize="20" :min-height="200" />
+          </el-form-item>
+          <div style="display: flex;width: 100%;padding: 10px 0;">
+            <div style="width: 50%;flex-shrink: 0;">
+              <el-form-item label="酒店标签:" prop="shopLabel">
+                <div>
+                  <div>
+                    <el-input style="width: 150px;" v-model="shopLabel" placeholder="请输入门店标签" maxlength="6" show-word-limit />
+                    <el-button
+                      type="primary"
+                      v-if="form.shopLabel.length<5"
+                      @click="addshopLabel"
+                      style="margin-left: 10px;"
+                    > 
+                      添加标签
+                    </el-button>
+                    <el-button
+                      type="danger"
+                      @click="clearAllshopLabel"
+                      style="margin-left: 10px;"
+                      size="mini"
+                    > 
+                      全部清除
+                    </el-button>
+                    <span style="font-size: 12px;color: #ccc;margin-left: 15px;">(最多可添加5个标签)</span>
+                  </div>
+                  <div>
+                    <el-tag
+                      v-for="(tag,index) in form.shopLabel"
+                      :key="index"
+                      @close="clearshopLabel(tag,index)"
+                      style="margin-right: 5px;"
+                      closable>
+                      {{tag}}
+                    </el-tag>
+                  </div>
+                </div>
+                
+              </el-form-item>
+              <el-form-item label="酒店地址" prop="address">
+                <el-input
+                  v-model="form.address"
+                  placeholder="请输入酒店地址"
+                  clearable
+                  style="width: 300px"
+                />
+              </el-form-item>
+              <el-form-item label="经度" prop="longitude">
+                    <el-input
+                    v-model="form.longitude"
+                    placeholder="请输入经度"
+                    clearable
+                    style="width: 300px"
+                    readonly
+                    />
+              </el-form-item>
+              <el-form-item label="纬度" prop="latitude">
+                    
+                    <el-input
+                    v-model="form.latitude"
+                    placeholder="请输入纬度"
+                    clearable
+                    style="width: 300px"
+                    readonly
+                    />
+              </el-form-item>
+              <el-form-item label="酒店电话:" style="margin-top: 20px;" prop="contactsMobile">
+                <el-input style="width: 350px;" v-model="form.contactsMobile" placeholder="请输入酒店电话" />
+              </el-form-item>
+            </div>
+            <div style="width: 50%;flex-shrink: 0;">
+              <div style="width: 100%;height: 350px;">
+                <qqMapBox ref="qqMapBox" @setDot="setDot" />
+              </div>
+            </div>
+          </div>
+          <div class="form-title"><span>规则设置</span></div>
+          <el-form-item label="自动审核退款:" :prop="'cancelOrderFlag'">
+                <div style="display: flex;align-items: center;">
+                  <el-radio-group v-model="form.cancelOrderFlag" @input="radioInputs">
+                    <div style="display: flex;align-items: center;">
+                      <el-radio label="-1">关闭</el-radio>
+                      <el-radio style="display: flex;align-items: center;" label="-3">
+                        <el-form-item label="" label-width="0" :prop="'cancelOrderTime'">
+                          <span>自游客取消订单</span>
+                          <el-input-number 
+                            :disabled="form.cancelOrderFlag!=-3"
+                            v-model="form.cancelOrderTime" 
+                            placeholder="请输入分钟"
+                            controls-position="right">
+                          </el-input-number>
+                          <span>分钟内,管理员未对订单进行审核操作,系统自动通过审核退款</span>
+                        </el-form-item>
+                      </el-radio>
+                    </div>
+                  </el-radio-group>
+                </div>
+          </el-form-item>
+          <el-form-item label="自动接单:" :prop="'acceptOrderFlag'">
+                <div style="display: flex;align-items: center;">
+                  <el-radio-group v-model="form.acceptOrderFlag" @input="radioInputs1">
+                    <div style="display: flex;align-items: center;">
+                      <el-radio label="-1">关闭</el-radio>
+                      <el-radio style="display: flex;align-items: center;" label="-3">
+                        <el-form-item label="" label-width="0" :prop="'acceptOrderTime'">
+                          <span>下单后</span>
+                          <el-input-number 
+                            :disabled="form.acceptOrderFlag!=-3"
+                            v-model="form.acceptOrderTime" 
+                            placeholder="请输入分钟"
+                            controls-position="right">
+                          </el-input-number>
+                          <span>分钟内,管理员未对订单进行审核操作,系统自动接单</span>
+                        </el-form-item>
+                      </el-radio>
+                    </div>
+                  </el-radio-group>
+                </div>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="formStatus==1">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        :loading="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      > 
+        {{ loading ? '提交中...' : '保存' }}
+      </el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+import { 
+  getTableDeatilsByIdApi,
+  updateTableApi,
+  addTableApi
+ } from '@/api/CURD'
+import Editor from "@/components/Editor";
+import qqMapBox from '@/myComponents/qqMap.vue'
+export default {
+  name: "hotelsManagementForm",
+  dicts: ['tourism_online_status','tourism_online_type'],
+  components: {Editor,qqMapBox},
+  data() {
+    return {
+      title: "",
+      activeName: 'first',
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '/merchant/merchantShop/insertOrUpdate', // 新增地址
+        details: '/merchant/merchantShop/selectById', // 详情地址
+        edit: '/merchant/merchantShop/insertOrUpdate', // 编辑地址
+      },
+      form: {
+        id: undefined,
+        shopAdvImgs: [],
+        shopLabel: [],
+        cancelOrderFlag: '-1'
+      },
+      rules: {
+        name: [{ required: true, message: "请输入酒店名称", trigger: ["change","blur"] }],
+        affiliationArea: [{ required: true, message: "请输入归属景区", trigger: ["change","blur"] }],
+        shopModel: [{ required: true, message: "请选择类型", trigger: ["change","blur"] }],
+        shopLogo: [{ required: true, message: "请上传酒店Logo", trigger: ["change","blur"] }],
+        shopHeadImg: [{ required: true, message: "请上传酒店门头照", trigger: ["change","blur"] }],
+        shopAdvImgs: [{ required: true, message: "请上传酒店宣传", trigger: ["change","blur"] }],
+        shopDetail: [{ required: true, message: "请输须知说明", trigger: ["change","blur"] }],
+        openTimeStart: [{ required: true, message: "请输入开始时间", trigger: ["change","blur"] }],
+        openTimeEnd: [{ required: true, message: "请输入结束时间", trigger: ["change","blur"] }],
+        address: [{ required: true, message: "请输入酒店地址", trigger: ["change","blur"] }],
+        longitude: [{ required: true, message: "请输入经度", trigger: ["change","blur"] }],
+        latitude: [{ required: true, message: "请输入纬度", trigger: ["change","blur"] }],
+        contactsMobile: [{ required: true, message: "请输入酒店电话", trigger: ["change","blur"] }],
+
+        cancelOrderFlag: [{ required: true, message: "请选择是否自动审核退款", trigger: ["change","blur"] }],
+        cancelOrderTime: [{ required: false, message: "请输入分钟", trigger: ["change","blur"] }],
+        
+        acceptOrderFlag: [{ required: true, message: "请选择是否自动接单", trigger: ["change","blur"] }],
+        acceptOrderTime: [{ required: false, message: "请输入分钟", trigger: ["change","blur"] }],
+      },
+      scenicAreaProducts: [],// 景点产品关联
+
+      //  上传文件
+      actionUrl: process.env.VUE_APP_BASE_API + process.env.VUE_APP_UPLOAD_IMAGE,
+      actionUrlLoading: false,
+      actionUrlLoading_1: false,
+      actionUrlMoreLoading: false,
+      shopLabel: '',
+      activeName: 'first'
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.actionUrlLoading = false
+      this.model = model
+      this.formStatus = 0
+      this.activeName = 'first'
+      if(model=='ADD') { // 新增
+        this.$set(this,'form',{
+          row,
+          shopAdvImgs: [],
+          shopLabel: [],
+          cancelOrderFlag: '-1',
+          acceptOrderFlag: '-1'
+        })
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          ...row
+        }
+        this.$set(this,'form',obj)
+        this.formStatus = 1
+      }else if(model=='EDITInit') { // 新增
+        await this.getTableDeatilsFun(row)
+      }
+      this.loading = false
+      this.$nextTick(()=>{
+        if(this.$refs["form"]) {
+          this.$refs["form"].clearValidate();
+          this.radioInputs(this.form.cancelOrderFlag)
+          this.radioInputs1(this.form.acceptOrderFlag)
+        }
+      })
+    },
+    /** 获取详情 */
+    async getTableDeatilsFun(row) {
+      const id = row.id
+      this.loading = true
+      try {
+        let res = await getTableDeatilsByIdApi(this.configUrl.details,{id})
+        if(res.code == 200) {
+          let obj = {
+            ...res.data,
+            shopAdvImgs: res.data.shopAdvImgs ? res.data.shopAdvImgs.split(',') : [],
+            shopLabel: res.data.shopLabel ? res.data.shopLabel.split(',') : []
+          }
+          if(obj.cancelOrderFlag == 0) {
+            obj.cancelOrderFlag = '-1'
+            obj['cancelOrderTime'] = undefined
+          }else if(obj.cancelOrderFlag == 1){
+            obj.cancelOrderFlag = '-3'
+          }
+          if(obj.acceptOrderFlag == 0) {
+            obj.acceptOrderFlag = '-1'
+            obj['acceptOrderTime'] = undefined
+          }else if(obj.acceptOrderFlag == 1){
+            obj.acceptOrderFlag = '-3'
+          }
+          this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
+          this.formStatus = 1
+          this.$nextTick(()=>{
+            if(this.form.longitude&&this.form.latitude){
+              this.$refs.qqMapBox.setMakerLayer({
+                height: 0,
+                lat: this.form.latitude,
+                lng: this.form.longitude,
+              },true)
+            }
+            
+          })
+        }else {
+          this.$message.error('获取详情失败!!!');
+          this.formStatus = 2
+          this.loading = false
+          this.open = false;
+        }
+        this.loading = false
+      } catch (error) {
+        console.error('获取详情失败!!!!',error)
+        this.formStatus = 2
+        this.loading = false
+        this.open = false;
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          let params = JSON.parse(JSON.stringify(this.form))
+          if(params.cancelOrderFlag == -1){
+            params['cancelOrderFlag'] = 0
+            params['cancelOrderTime'] = null
+          }else if(params.cancelOrderFlag == -3) {
+            params['cancelOrderFlag'] = 1
+          }
+          if(params.acceptOrderFlag == -1){
+            params['acceptOrderFlag'] = 0
+            params['acceptOrderTime'] = null
+          }else if(params.acceptOrderFlag == -3) {
+            params['acceptOrderFlag'] = 1
+          }
+          params.shopLabel = params.shopLabel.join(',')
+          params.shopAdvImgs = params.shopAdvImgs.join(',')
+          if (this.model != 'ADD') {
+            addTableApi(
+              this.configUrl.edit,{
+                ...params,
+                shopType: 5,
+              }).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("修改失败!!!");
+              this.loading = false
+            })
+          } else {
+            addTableApi(this.configUrl.edit,{
+                ...params,
+                shopType: 5,
+              }).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("新增失败!!!");
+              this.loading = false
+            })
+          }
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+
+    /**  上传图片 单张  */
+    handleAvatarSuccess(res, file) {
+      console.log("res, file",res, file)
+      this.actionUrlLoading = false
+      if(res.code != 200) {
+        this.$set(this.form,'shopLogo',null) 
+      }else {
+        this.$set(this.form,'shopLogo',res.data.url) 
+      }
+      
+    },
+    beforeAvatarUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 <= 5;
+      let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
+      let typeList = ['png','jepg','jpg','gif']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片图片大小不能超过 5MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarProgress(){
+      this.actionUrlLoading = true
+    },
+    handleAvatarError() {
+      this.actionUrlLoading = false
+    },
+    /**  上传图片 单张  */
+    handleAvatarSuccess_1(res, file) {
+      console.log("res, file",res, file)
+      this.actionUrlLoading_1 = false
+      if(res.code != 200) {
+        this.$set(this.form,'shopHeadImg',null) 
+      }else {
+        this.$set(this.form,'shopHeadImg',res.data.url) 
+      }
+      
+    },
+    beforeAvatarUpload_1(file) {
+      const isLt2M = file.size / 1024 / 1024 <= 5;
+      let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
+      let typeList = ['png','jepg','jpg','gif']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片图片大小不能超过 5MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarProgress_1(){
+      this.actionUrlLoading_1 = true
+    },
+    handleAvatarError_1() {
+      this.actionUrlLoading_1 = false
+    },
+    /**  上传图片 多张  */
+    beforeAvatarUploadMore(file) {
+      const isLt2M = file.size / 1024 / 1024 <= 5;
+      let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
+      let typeList = ['png','jepg','jpg','gif']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片图片大小不能超过 5MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarSuccessMore(response, file, fileList) {
+      console.log("res, file===",response, file, fileList)
+      this.actionUrlMoreLoading = false
+      if(response.code == 200) {
+        this.form.shopAdvImgs.push(response.data.url)
+      }
+      // if(res.code != 200) {
+      //   this.$set(this.form,'photos',null) 
+      // }else {
+      //   this.$set(this.form,'photos',res.data.url) 
+      // }
+      
+    },
+    handleRemoveMore(index) {
+      this.form.shopAdvImgs.splice(index,1)
+    },
+    handleAvatarProgressMore(){
+      this.actionUrlMoreLoading = true
+    },
+    handleAvatarErrorMore() {
+      this.actionUrlMoreLoading = false
+    },
+
+    /**  标签 */
+    clearAllshopLabel() {
+      this.form.shopLabel = []
+    },
+    clearshopLabel(tag,index) {
+      this.form.shopLabel.splice(index,1)
+    },
+    addshopLabel() {
+      if(this.shopLabel) {
+        this.form.shopLabel.push(this.shopLabel)
+        this.shopLabel = ''
+      }else {
+        this.$message.error('请填写内容!!!');
+      }
+    },
+
+    /**  */
+    radioInputs(value) {
+      if( value == -1 ){
+        this.rules.cancelOrderTime[0].required = false
+        this.$refs.form.clearValidate('cancelOrderTime');
+      }else if( value == -3 ) {
+        this.rules.cancelOrderTime[0].required = true
+      }
+    },
+    /**  */
+    radioInputs1(value) {
+      if( value == -1 ){
+        this.rules.acceptOrderTime[0].required = false
+        this.$refs.form.clearValidate('acceptOrderTime');
+      }else if( value == -3 ) {
+        this.rules.acceptOrderTime[0].required = true
+      }
+    },
+    setDot(params){
+      this.$set(this.form,'longitude',params.lng)
+      this.$set(this.form,'latitude',params.lat)
+    }
+  },
+  watch: {
+    'form.shopDetail'() {
+      if(this.form.shopDetail == '<p><br></p>') {
+        this.form.shopDetail = null
+      }
+      if(this.$refs["form"]) {
+        this.$refs["form"].validateField('shopDetail');
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 50vh;
+  max-height: 65vh;
+  overflow-y: auto;
+  >div {
+    width: 100%;
+    min-height: 50vh;
+  }
+  .form-title {
+    padding: 0 0 10px 0;
+    span {
+      display: flex;
+      color: rgba(65,80,88,1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+    
+  }
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+.el-table{
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 8 - 2
src/views/tourism/productManagement/formBox/hotelsManagementForm.vue

@@ -28,7 +28,7 @@
               <el-option
                 v-for="item in [
                   { value: 1, label: '酒店' },
-                  { value: 2, label: '宿' }
+                  { value: 2, label: '宿' }
                 ]"
                 :key="item.value"
                 :label="item.label"
@@ -36,6 +36,11 @@
               </el-option>
             </el-select>
           </el-form-item>
+          <el-form-item label="酒店评分:" prop="score">
+            <div style="display: flex;align-items: center;height: 36px;">
+              <el-rate v-model="form.score"></el-rate>
+            </div>
+          </el-form-item>
           <!-- <el-form-item label="归属景区:" prop="affiliationArea">
             <el-rate v-model="form.rate"></el-rate>
           </el-form-item> -->
@@ -324,6 +329,7 @@ export default {
       },
       rules: {
         name: [{ required: true, message: "请输入酒店名称", trigger: ["change","blur"] }],
+        score: [{ required: true, message: "请选择酒店评分", trigger: ["change","blur"] }],
         affiliationArea: [{ required: true, message: "请输入归属景区", trigger: ["change","blur"] }],
         shopModel: [{ required: true, message: "请选择类型", trigger: ["change","blur"] }],
         shopLogo: [{ required: true, message: "请上传酒店Logo", trigger: ["change","blur"] }],
@@ -411,7 +417,7 @@ export default {
             obj.acceptOrderFlag = '-1'
             obj['acceptOrderTime'] = undefined
           }else if(obj.acceptOrderFlag == 1){
-            obj.cancelOrderFlag = '-3'
+            obj.acceptOrderFlag = '-3'
           }
           this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
           this.formStatus = 1

+ 178 - 157
src/views/tourism/productManagement/formBox/houseTypeListForm.vue

@@ -18,12 +18,12 @@
         element-loading-spinner="''"
         element-loading-background="rgba(0, 0, 0, 0.8)"
         >
-        <el-form :model="form" ref="form" :rules="rules" label-width="130px">
+        <el-form :model="form" ref="form" :rules="rules" label-width="150px">
           <div class="form-title"><span>基本信息</span></div>
-          <el-form-item label="菜品名称:" prop="goodsName">
-            <el-input style="width: 350px;" v-model="form.goodsName" placeholder="请输入菜品名称" maxlength="10" show-word-limit />
+          <el-form-item label="房型名称:" prop="name">
+            <el-input style="width: 350px;" v-model="form.name" placeholder="请输入房型名称" maxlength="50" show-word-limit />
           </el-form-item>
-          <el-form-item label="菜品图片" prop="goodsImage">
+          <el-form-item label="房型图片" prop="goodsImage">
             <div style="display: flex;">
               <div 
               v-for="(item,index) in form.goodsImage" 
@@ -66,57 +66,110 @@
             </div>
             <span>建议上传图片尺寸200px X 144px,支持jpg、png,支持5MB大小以内的图片上传</span>
           </el-form-item>
-          <el-form-item label="分类类型:" prop="classifyId">
-            <div style="width: 350px;">
-              <treeselect
-                v-model="form.classifyId"
-                :options="listTreeCopy"
-                :show-count="true"
-                placeholder="请选择分类类型"
-              />
-            </div>
-          </el-form-item>
           <div>
-            <div>
-              <el-form-item label="是否多规格:" prop="specFlag">
-                <el-radio-group v-model="form.specFlag" placeholder="请选择是否多规格">
-                  <el-radio :label="1">单规格</el-radio>
-                  <el-radio :label="2">多规格</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </div>
-            <div v-if="form.specFlag == 1">
-              <el-form-item label="规格:" prop="specName">
-                <el-input style="width: 250px;" v-model="form.specName" placeholder="请输入规格" />
-              </el-form-item>
-              <el-form-item label="菜品价格(元):" prop="salePrice">
-                <el-input-number 
-                  v-model="form.salePrice" 
-                  placeholder="请输入菜品价格"
-                  controls-position="right">
-                </el-input-number>
+            <el-form-item label="房型数量:" prop="roomNum">
+              <el-input-number style="width: 350px;" controls-position="right" v-model="form.roomNum" placeholder="请输入房型数量" />
+            </el-form-item>
+            <el-form-item label="床位数(张):" prop="bedNum">
+              <el-input-number style="width: 350px;" controls-position="right" v-model="form.bedNum" placeholder="请输入床位数" />
+            </el-form-item>
+          </div>
+          
+          <div style="display: flex;">
+            <el-form-item label="房型价格(元):" prop="salePrice">
+              <el-input-number style="width: 350px;" controls-position="right" v-model="form.salePrice" placeholder="请输入房型价格" />
+            </el-form-item>
+            <el-form-item label="划线价格(元):" prop="originalPrice">
+              <el-input-number style="width: 350px;" controls-position="right" v-model="form.originalPrice" placeholder="请输入划线价格" />
+            </el-form-item>
+          </div>
+          <el-form-item label="销售日期:" prop="saleDate">
+            <el-date-picker
+              v-model="form.saleDate"
+              format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              type="daterange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期">
+            </el-date-picker>
+            <span>游客可查看和预定销售日期范围内的房型,支持设置最长时间为一年</span>
+          </el-form-item>
+          <div class="form-title"><span>房型信息</span></div>
+          <el-form-item label="床型:" prop="bedProfile">
+            <el-input style="width: 350px;" v-model="form.bedProfile" placeholder="请输入床型" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="面积:" prop="squareProfile">
+            <el-input-number style="width: 350px;" controls-position="right" v-model="form.squareProfile" placeholder="请输入面积" />
+            <span>㎡</span>
+          </el-form-item>
+          <el-form-item label="可住人数(人):" prop="personNum">
+            <el-input-number style="width: 350px;" controls-position="right" v-model="form.personNum" placeholder="请输入可住人数" />
+            <span>人</span>
+          </el-form-item>
+          <el-form-item label="网络:" prop="networkProfile">
+            <el-input style="width: 350px;" v-model="form.networkProfile" placeholder="请输入网络" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="窗户:" prop="windowsProfile">
+            <el-input style="width: 350px;" v-model="form.windowsProfile" placeholder="请输窗户" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="有无早餐:" prop="dinnerProfile">
+            <el-input style="width: 350px;" v-model="form.dinnerProfile" placeholder="请输有无早餐" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="其他信息:" prop="otherProfile">
+            <el-input style="width: 350px;" type="textarea" v-model="form.otherProfile" placeholder="请输其他信息" maxlength="200" show-word-limit />
+          </el-form-item>
+          <div class="form-title"><span>订购规则</span></div>
+          <el-form-item label="单笔订单的最大预购数量:" prop="buyMax" label-width="320px">
+            <el-input-number style="width: 350px;" controls-position="right" v-model="form.buyMax" placeholder="请输入数量" />
+            <span>间</span>
+          </el-form-item>
+          <div style="display: flex;">
+            <el-form-item label="当日最早入住时间:" prop="inRoom" label-width="320px">
+              <el-time-picker v-model="form.inRoom" value-format="HH:mm" format="HH:mm" placeholder="请选择当日最早入住时间" ></el-time-picker>
+            </el-form-item>
+            <el-form-item label="次日最晚离店时间:" prop="outRoom" label-width="320px">
+              <el-time-picker v-model="form.outRoom" value-format="HH:mm" format="HH:mm" placeholder="请选择次日最晚离店时间" ></el-time-picker>
+            </el-form-item>
+          </div>
+          <div class="form-title"><span>退票规则</span></div>
+          <el-form-item label="是否支持取消订单:" prop="refundFlag">
+            <el-radio-group v-model="form.refundFlag" placeholder="请选择是否支持取消订单">
+              <el-radio :label="0">允许</el-radio>
+              <el-radio :label="1">不允许</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <div v-if="form.refundFlag == 0">
+            <div >
+              <el-form-item label="" prop="latestInRoom">
+                <span>入住日</span>
+                <el-time-picker v-model="form.latestInRoom" value-format="HH:mm" format="HH:mm" placeholder="请选择次日最晚离店时间" ></el-time-picker>
+                <span>后或已入住,不可取消</span>
               </el-form-item>
             </div>
-            <div v-if="form.specFlag == 2">
-              <el-form-item label=" " prop="goodsSkuList">
+            <div>
+              <el-form-item label=" " prop="refundRuleList">
                 <el-button style="margin-bottom: 10px;" type="primary" @click="addGoodsSkuList" size="small">新增</el-button>
                   <el-table
-                  :data="form.goodsSkuList"
+                  :data="form.refundRuleList"
                   border
                   style="width: 100%">
                     <el-table-column
                       fixed
-                      prop="skuName"
-                      label="规格名称">
+                      prop="hour"
+                      label="可退订时间">
                       <template slot-scope="scope">
-                        <el-input v-model="scope.row.skuName" placeholder="请输入内容"></el-input>
+                        <span>入住日</span>
+                        <el-time-picker v-model="scope.row.hour" value-format="HH:mm" format="HH:mm" placeholder="请选择时间" ></el-time-picker>
+                        <span>前</span>
                       </template>
                     </el-table-column>
                     <el-table-column
-                      prop="price"
-                      label="菜品价格">
+                      prop="serviceChargeRatio"
+                      label="扣除手续费(百分比)">
                       <template slot-scope="scope">
-                        <el-input-number v-model="scope.row.price" controls-position="right"></el-input-number>
+                        <el-input-number v-model="scope.row.serviceChargeRatio" placeholder="请输入扣除手续费" controls-position="right"></el-input-number>
+                        <span>%</span>
                       </template>
                     </el-table-column>
                     <el-table-column
@@ -130,52 +183,19 @@
               </el-form-item>
             </div>
           </div>
-          <el-form-item label="库存数量:" prop="quantity">
-            <el-input-number 
-              v-model="form.quantity" 
-              placeholder="请输入库存数量"
-              :step="1"
-              controls-position="right">
-            </el-input-number>
-          </el-form-item>
-          <div style="display: flex;">
-            <el-form-item label="菜品标签:" prop="labelName">
-              <div>
-                <div>
-                  <el-input style="width: 250px;" v-model="labelName" placeholder="请输入菜品标签" maxlength="6" show-word-limit />
-                  <el-button
-                    type="primary"
-                    v-if="form.labelName.length<5"
-                    @click="addLabelName"
-                    style="margin-left: 10px;"
-                  > 
-                    添加标签
-                  </el-button>
-                  <el-button
-                    type="danger"
-                    @click="clearAllLabelName"
-                    style="margin-left: 10px;"
-                  > 
-                    全部清除
-                  </el-button>
-                  <span style="font-size: 12px;color: #ccc;margin-left: 15px;">(最多可添加5个标签)</span>
-                </div>
-                <div>
-                  <el-tag
-                    v-for="(tag,index) in form.labelName"
-                    :key="index"
-                    @close="clearLabelName(tag,index)"
-                    style="margin-right: 5px;"
-                    closable>
-                    {{tag}}
-                  </el-tag>
-                </div>
-              </div>
-            </el-form-item>
-          </div>
-          <el-form-item label-width="80px" label="菜品详情">
-            <editor ref="editor" v-model="form.goodsSnapshot" :fileSize="20" :min-height="200" />
-          </el-form-item>
+          <el-tabs v-model="activeName">
+            <el-tab-pane label="预定须知" name="first">
+              <el-form-item label-width="0px" label="" prop="reservationNotice">
+                <editor ref="editor" v-model="form.reservationNotice" :fileSize="20" :min-height="200" />
+              </el-form-item>
+            </el-tab-pane>
+            <el-tab-pane label="退款说明" name="second">
+              <el-form-item label-width="0px" label="" prop="refundNotice">
+                <editor ref="editor" v-model="form.refundNotice" :fileSize="20" :min-height="200" />
+              </el-form-item>
+            </el-tab-pane>
+          </el-tabs>
+          
         </el-form>
       </div>
     </div>
@@ -206,7 +226,7 @@ import Editor from "@/components/Editor";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 export default {
-  name: "houseTypeListForm",
+  name: "addAndEdit4",
   dicts: ['tourism_online_status','tourism_online_type'],
   components: {Editor,Treeselect},
   props: ['listTreeCopy'],
@@ -220,43 +240,52 @@ export default {
       loadingText: "拼命加载数据中...",
       formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
       configUrl: {
-        add: '/merchant/merchantPerformAuditorium/saveMerchantGoods', // 新增地址
-        details: '/merchant/merchantPerformAuditorium/merchantGoodsDetail', // 详情地址
-        edit: '/merchant/merchantPerformAuditorium/saveMerchantGoods', // 编辑地址
+        add: '/goods/goodsHotel/insertOrUpdate', // 新增地址
+        details: '/goods/goodsHotel/queryById', // 详情地址
+        edit: '/goods/goodsHotel/insertOrUpdate', // 编辑地址
       },
       form: {
         id: undefined,
         goodsImage: [],
-        labelName: [],
-        goodsSkuList: []
+        refundFlag: 0,
+        refundRuleList: [],
       },
       rules: {
-        goodsName: [{ required: true, message: "请输入菜品名称", trigger: ["change","blur"] }],
-        classifyId: [{ required: true, message: "请选择分类类型", trigger: ["change","blur"] }],
-        salePrice: [{ required: true, message: "请输入菜品价格", trigger: ["change","blur"] }],
-        specName: [{ required: true, message: "请输入规格", trigger: ["change","blur"] }],
-        unitName: [{ required: true, message: "请输入单位", trigger: ["change","blur"] }],
-        labelName: [{ required: false, message: "请输入菜品标签", trigger: ["change","blur"] }],
-        status: [{ required: true, message: "请选择菜品上架", trigger: ["change","blur"] }],
-        goodsSnapshot: [{ required: true, message: "请上传菜品图片", trigger: ["change","blur"] }],
-        goodsImage: [{ required: true, message: "请输入菜品介绍", trigger: ["change","blur"] }],
-        quantity: [{ required: true, message: "请输入库存数量", trigger: ["change","blur"] }],
-
 
-        daySaleRadio: [{ required: true, message: "请选择菜品限购", trigger: ["change","blur"] }],
-        daySale: [{ required: false, message: "请输入每日限售数量", trigger: ["change","blur"] }],
-        buyAstrict: [{ required: false, message: "请输入下单限购数量", trigger: ["change","blur"] }],
+        name: [{ required: true, message: "请输入房型名称", trigger: ["change","blur"] }],
+        goodsImage: [{ required: true, message: "请输入房型图片", trigger: ["change","blur"] }],
+        roomNum: [{ required: true, message: "请输入房型数量", trigger: ["change","blur"] }],
+        bedNum: [{ required: true, message: "请输入床位数", trigger: ["change","blur"] }],
+        salePrice: [{ required: true, message: "请输入房型价格", trigger: ["change","blur"] }],
+        originalPrice: [{ required: true, message: "请输入划线价格", trigger: ["change","blur"] }],
+        saleDate: [{ required: true, message: "请选择销售日期", trigger: ["change","blur"] }],
         
-        specFlag: [{ required: true, message: "请选择是否多规格", trigger: ["change","blur"] }],
-        backStatus: [{ required: true, message: "请选择允许退款", trigger: ["change","blur"] }],
-        goodsSkuList: [{ required: true, message: "请输入规格", trigger: ["change","blur"] }],
+        bedProfile: [{ required: true, message: "请输入床型", trigger: ["change","blur"] }],
+        squareProfile: [{ required: true, message: "请输入面积", trigger: ["change","blur"] }],
+        personNum: [{ required: true, message: "请输入可住人数", trigger: ["change","blur"] }],
+        networkProfile: [{ required: true, message: "请输入网络", trigger: ["change","blur"] }],
+        windowsProfile: [{ required: true, message: "请输入窗户", trigger: ["change","blur"] }],
+        dinnerProfile: [{ required: true, message: "请输入有无早餐", trigger: ["change","blur"] }],
+        otherProfile: [{ required: true, message: "请输入其他信息", trigger: ["change","blur"] }],
+       
+        buyMax: [{ required: true, message: "请输入数量", trigger: ["change","blur"] }],
+        inRoom: [{ required: true, message: "请选择时间", trigger: ["change","blur"] }],
+        outRoom: [{ required: true, message: "请选择时间", trigger: ["change","blur"] }],
+
+        refundFlag: [{ required: true, message: "请选择是否支持取消订单", trigger: ["change","blur"] }],
+        latestInRoom: [{ required: true, message: "请选择时间", trigger: ["change","blur"] }],
+        refundRuleList: [{ required: true, message: "请输入退票规则", trigger: ["change","blur"] }],
+        reservationNotice: [{ required: true, message: "请输入预定须知", trigger: ["change","blur"] }],
+        refundNotice: [{ required: true, message: "请输入退款说明", trigger: ["change","blur"] }],
+       
       },
       scenicAreaProducts: [],// 景点产品关联
 
       //  上传文件
       actionUrl: process.env.VUE_APP_BASE_API + process.env.VUE_APP_UPLOAD_IMAGE,
       actionUrlLoading: false,
-      labelName: ''
+      labelName: '',
+      activeName: 'first'
     };
   },
   methods: {
@@ -268,24 +297,21 @@ export default {
       this.actionUrlLoading = false
       this.model = model
       this.formStatus = 0
+      this.activeName = 'first'
       this.labelName = ''
       if(model=='ADD') { // 新增
         this.$set(this,'form',{
           ...row,
           goodsImage: [],
-          daySaleRadio: '-1',
-          backStatus: 0,
-          status: 1,
-          labelName: [],
-          goodsSkuList: [],
+          refundFlag: 0,
+          refundRuleList: [],
         })
         this.formStatus = 1
       }else if(model=='EDIT') { // 新增
         let obj = {
           goodsImage: [],
-          status: 1,
-          labelName: [],
-          goodsSkuList: [],
+          refundFlag: 0,
+          refundRuleList: [],
           ...row,
         }
         this.$set(this,'form',obj)
@@ -306,30 +332,21 @@ export default {
       const id = row.id
       this.loading = true
       try {
-        let res = await getTableDeatilsByIdApi(this.configUrl.details,{goodsId: row.goodsId})
+        let res = await getTableDeatilsByIdApi(this.configUrl.details,{id: row.id})
         if(res.code == 200) {
           let obj = {
             ...res.data,
-            labelName: res.data.labelName ? res.data.labelName.split(',') : [],
-            goodsSkuList: res.data.goodsSkuList ? res.data.goodsSkuList : [],
+            refundRuleList: res.data.refundRuleList ? res.data.refundRuleList : [],
           }
           if(obj.goodsImage) {
             obj.goodsImage = obj.goodsImage.split(',')
           }else {
             obj.goodsImage = []
           }
-          if(obj.daySale<=0 && obj.buyAstrict<=0) {
-            obj.daySaleRadio = '-1'
-            obj.daySale = undefined
-            obj.buyAstrict = undefined
-          }else if(obj.daySale > 0){
-            obj.daySaleRadio = '-3'
-            obj.daySale = obj.daySale
-            obj.buyAstrict = undefined
-          }else if(obj.buyAstrict > 0) {
-            obj.daySaleRadio = '-2'
-            obj.daySale = undefined
-            obj.buyAstrict = obj.buyAstrict
+          if(obj.saleStartDate && obj.saleEndDate) {
+            obj.saleDate = [obj.saleStartDate , obj.saleEndDate]
+          }else {
+            obj.saleDate = []
           }
 
           this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
@@ -357,37 +374,33 @@ export default {
       this.$refs["form"].validate(valid => {
         if (valid) {
           let flog = false
-          this.form.goodsSkuList.forEach((item,index)=>{
-            if(!item.skuName || (!item.price && item.price !=0)) {
+          this.form.refundRuleList.forEach((item,index)=>{
+            if(!item.hour || (!item.serviceChargeRatio && item.serviceChargeRatio !=0)) {
               flog = true
             }
           })
           if(flog) {
-            this.$message.error("请输入规格名称或菜品价格!!!");
+            this.$message.error("请输入退票规则!!!");
             return
           }
           this.loadingText = "提交数据中..."
           this.loading = true
           let params = JSON.parse(JSON.stringify(this.form))
-          if(params.daySaleRadio == -1){
-            params['daySale'] = -1
-            params['buyAstrict'] = -1
-          }else if(params.daySaleRadio == -3) {
-            params['daySale'] =  params.daySale
-            params['buyAstrict'] = -1
-          }else if(params.daySaleRadio == -2) {
-            params['daySale'] =  -1
-            params['buyAstrict'] = params.buyAstrict
+          if(params.saleDate && params.saleDate.length>1) {
+            params.saleStartDate = params.saleDate[0]
+            params.saleEndDate = params.saleDate[1]
+          }else {
+            params.saleStartDate = null
+            params.saleEndDate = null
           }
-          params.labelName = params.labelName.join(',')
           params.goodsImage = params.goodsImage.join(',')
-          params.classifyName = this.valueChange(this.listTreeCopy,this.form.classifyId)
-          delete params.daySaleRadio
+
+          delete params.saleDate 
           if (this.model != 'ADD') {
             addTableApi(
               this.configUrl.edit,{
                 ...params,
-                goodsType: 4,
+                goodsType: 5,
               }).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.loading = false
@@ -400,7 +413,7 @@ export default {
           } else {
             addTableApi(this.configUrl.edit,{
               ...params,
-              goodsType: 4,
+              goodsType: 5,
               }).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.loading = false
@@ -514,23 +527,31 @@ export default {
     },
     /**  新增规格  */
     addGoodsSkuList() {
-      this.form.goodsSkuList.push({
+      this.form.refundRuleList.push({
         skuName: undefined,
         price: undefined
       })
     },
     /**  删除规格  */
     clearGoodsSkuList(row,index) {
-      this.form.goodsSkuList.splice(index,1)
+      this.form.refundRuleList.splice(index,1)
     }
   },
   watch: {
-    'form.goodsSnapshot'() {
-      if(this.form.goodsSnapshot == '<p><br></p>') {
-        this.form.goodsSnapshot = null
+    'form.reservationNotice'() {
+      if(this.form.reservationNotice == '<p><br></p>') {
+        this.form.reservationNotice = null
+      }
+      if(this.$refs["form"]) {
+        this.$refs["form"].validateField('reservationNotice');
+      }
+    },
+    'form.refundNotice'() {
+      if(this.form.refundNotice == '<p><br></p>') {
+        this.form.refundNotice = null
       }
       if(this.$refs["form"]) {
-        this.$refs["form"].validateField('goodsSnapshot');
+        this.$refs["form"].validateField('refundNotice');
       }
     }
   }

+ 21 - 7
src/views/tourism/productManagement/hotelsManagement.vue

@@ -4,7 +4,21 @@
         <!--用户数据-->
         <el-col :span="24" :xs="24">
             <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-                <el-form-item label="门店名称" prop="name">
+                <el-form-item label="酒店/民宿名称" prop="name" label-width="100px">
+                  <el-input v-model="queryParams.name" placeholder="请输入酒店/民宿名称" />
+                </el-form-item>
+                <el-form-item label="酒店类型" prop="shopModel">
+                  <el-select v-model="queryParams.shopModel" clearable placeholder="请选择酒店类型">
+                    <el-option
+                    v-for="item in [
+                      { value: 1, label: '酒店' },
+                      { value: 2, label: '民宿' }
+                    ]"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                    </el-option>
+                  </el-select>
                 </el-form-item>
                 <el-form-item label="营业状态" prop="status">
                   <el-select v-model="queryParams.status" clearable placeholder="请选择状态">
@@ -34,26 +48,26 @@
                 size="mini"
                 @click="handleAdd"
                 v-hasPermi="configPermi.add"
-              >添加店</el-button>
+              >添加店</el-button>
             </el-col>
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
           </el-row>
 
           <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
             <el-table-column type="index" label="序号" align="center"  />
-            <el-table-column label="酒店图片" align="center" key="shopLogo" prop="shopLogo" v-if="columns[0].visible" :show-overflow-tooltip="true">
+            <el-table-column label="酒店门头照" align="center" key="shopHeadImg" prop="shopHeadImg" v-if="columns[0].visible" :show-overflow-tooltip="true">
                 <template slot-scope="scope">
                     <el-image
                     style="width: 60px; height: 40px"
-                    :src="scope.row.shopLogo"
-                    :preview-src-list="[scope.row.shopLogo]"
+                    :src="scope.row.shopHeadImg"
+                    :preview-src-list="[scope.row.shopHeadImg]"
                     fit="fill"></el-image>
                 </template>
             </el-table-column>
             <el-table-column label="酒店名称" align="center" key="name" prop="name" v-if="columns[1].visible" :show-overflow-tooltip="true" />
             <el-table-column label="类型" align="center" key="shopModel" prop="shopModel" v-if="columns[2].visible" :show-overflow-tooltip="true">
               <template slot-scope="scope">
-                    <span>{{ scope.row.shopModel == 1 ? '酒店' :  scope.row.shopModel == 2 ? '宿': '--' }}</span>
+                    <span>{{ scope.row.shopModel == 1 ? '酒店' :  scope.row.shopModel == 2 ? '宿': '--' }}</span>
                 </template>
             </el-table-column>
             <el-table-column label="营业状态" align="center" key="status" prop="status" v-if="columns[3].visible" :show-overflow-tooltip="true">
@@ -174,7 +188,7 @@
         dateRange: [],
         // 控制列表是否显示
         columns: [
-          { key: 0, label: `酒店图片`, visible: true },
+          { key: 0, label: `酒店门头照`, visible: true },
           { key: 2, label: `酒店名称`, visible: true },
           { key: 3.5, label: `类型`, visible: true },
           { key: 3, label: `营业状态`, visible: true },

+ 11 - 15
src/views/tourism/productManagement/tabelBox/cateringManagementCategoryTabel.vue

@@ -53,7 +53,7 @@
                   size="mini"
                   @click="handleAdd"
                   v-hasPermi="configPermi.add"
-                >添加品</el-button>
+                >添加品</el-button>
               </el-col>
               <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
             </el-row>
@@ -72,8 +72,8 @@
               <el-table-column label="菜品名称" align="center" key="goodsName" prop="goodsName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
               <el-table-column label="分类类型" align="center" key="classifyName" prop="classifyName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
               <el-table-column label="价格(元)" align="center" key="salePrice" prop="salePrice" v-if="columns[3].visible" :show-overflow-tooltip="true" />
-              <el-table-column label="库存" align="center" key="quantity" prop="quantity" v-if="columns[5].visible" :show-overflow-tooltip="true" />
-              <el-table-column label="上架/下架" align="center" key="status" v-if="columns[9].visible">
+              <el-table-column label="库存" align="center" key="quantity" prop="quantity" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+              <el-table-column label="上架/下架" align="center" key="status" v-if="columns[5].visible">
                 <template slot-scope="scope">
                   <switchBox 
                   :defaultChecked="true" 
@@ -85,7 +85,7 @@
                   />
                 </template>
               </el-table-column>
-              <el-table-column label="创建时间" align="center" key="createTime" prop="createTime" v-if="columns[10].visible" :show-overflow-tooltip="true" />
+              <el-table-column label="创建时间" align="center" key="createTime" prop="createTime" v-if="columns[6].visible" :show-overflow-tooltip="true" />
               <el-table-column
                 label="操作"
                 align="center"
@@ -210,17 +210,13 @@ export default {
         dateRange: [],
         // 控制列表是否显示
         columns: [
-          { key: 0, label: `商品图片`, visible: true },
-          { key: 2, label: `商品名称`, visible: true },
-          { key: 3, label: `分类`, visible: true },
-          { key: 4, label: `销售价格`, visible: true },
-          { key: 5, label: `规格`, visible: true },
-          { key: 6, label: `库存`, visible: true },
-          { key: 7, label: `总销量`, visible: true },
-          { key: 8, label: `单位`, visible: true },
-          { key: 9, label: `限购`, visible: true },
-          { key: 10, label: `上架/下架`, visible: true },
-          { key: 11, label: `创建时间`, visible: true },
+          { key: 0, label: `菜品图片`, visible: true },
+          { key: 2, label: `菜品名称`, visible: true },
+          { key: 3, label: `分类类型`, visible: true },
+          { key: 4, label: `价格(元)`, visible: true },
+          { key: 5, label: `库存`, visible: true },
+          { key: 6, label: `上架/下架`, visible: true },
+          { key: 7, label: `创建时间`, visible: true },
         ],
         listTreeCopy: [],
         shopList: [],

+ 3 - 0
src/views/tourism/productManagement/tabelBox/cateringManagementClassTabel.vue

@@ -84,6 +84,9 @@
       </el-row>
       <!--  新增或修改  -->
       <addAndEdit1 ref="addAndEdit1"  @refresh="getList" />
+
+      <!--  新增或修改 基本信息  -->
+      <categoryList ref="categoryList" @refresh="getList" />
     </div>
     </div>
     <!-- 添加或修改对话框 End -->

+ 48 - 96
src/views/tourism/productManagement/tabelBox/hotelsManagementCategoryTabel.vue

@@ -13,25 +13,15 @@
           <!--用户数据-->
           <el-col :span="24" :xs="24">
               <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
-                  <el-form-item label="菜品名称:" prop="goodsName">
+                  <el-form-item label="房型名称:" prop="goodsName">
                       <el-input
                           v-model="queryParams.goodsName"
-                          placeholder="请输入菜品名称"
+                          placeholder="请输入房型名称"
                           clearable
                           style="width: 240px"
                           @keyup.enter.native="handleQuery"
                       />
                   </el-form-item>
-                  <el-form-item label="分类类型:" prop="classifyId">
-                    <div style="width: 200px;">
-                      <treeselect
-                        v-model="queryParams.classifyId"
-                        :options="listTreeCopy"
-                        :show-count="true"
-                        placeholder="请选择分类类型"
-                      />
-                    </div>
-                  </el-form-item>
                   <el-form-item label="上架状态:" prop="status">
                     <el-select v-model="queryParams.status" clearable placeholder="请选择上架状态">
                       <el-option :key="1" label="下架" :value="1"></el-option>
@@ -53,27 +43,19 @@
                   size="mini"
                   @click="handleAdd"
                   v-hasPermi="configPermi.add"
-                >添加商品</el-button>
+                >添加房型</el-button>
               </el-col>
               <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
             </el-row>
 
             <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
               <el-table-column type="index" label="序号" align="center"  />
-              <el-table-column label="菜品图片" align="center" key="goodsImage" prop="goodsImage" v-if="columns[0].visible" :show-overflow-tooltip="true">
-                  <template slot-scope="scope">
-                      <el-image
-                      style="width: 60px; height: 40px"
-                      :src="scope.row.goodsImage"
-                      :preview-src-list="[scope.row.goodsImage]"
-                      fit="fill"></el-image>
-                  </template>
-              </el-table-column>
-              <el-table-column label="菜品名称" align="center" key="goodsName" prop="goodsName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-              <el-table-column label="分类类型" align="center" key="classifyName" prop="classifyName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
-              <el-table-column label="价格(元)" align="center" key="salePrice" prop="salePrice" v-if="columns[3].visible" :show-overflow-tooltip="true" />
-              <el-table-column label="库存" align="center" key="quantity" prop="quantity" v-if="columns[5].visible" :show-overflow-tooltip="true" />
-              <el-table-column label="上架/下架" align="center" key="status" v-if="columns[9].visible">
+              <el-table-column label="房型名称" align="center" key="goodsName" prop="goodsName" v-if="columns[0].visible" :show-overflow-tooltip="true" />
+              <el-table-column label="所属酒店" align="center" key="shopName" prop="shopName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+              <el-table-column label="可住人数(个)" align="center" key="personNum" prop="personNum" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+              <el-table-column label="床位数(张)" align="center" key="bedNum" prop="bedNum" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+              <el-table-column label="房间数(间)" align="center" key="roomNum" prop="roomNum" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+              <el-table-column label="上架/下架" align="center" key="status" v-if="columns[5].visible">
                 <template slot-scope="scope">
                   <switchBox 
                   :defaultChecked="true" 
@@ -85,21 +67,13 @@
                   />
                 </template>
               </el-table-column>
-              <el-table-column label="创建时间" align="center" key="createTime" prop="createTime" v-if="columns[10].visible" :show-overflow-tooltip="true" />
               <el-table-column
                 label="操作"
                 align="center"
                 class-name="small-padding fixed-width"
-                width="180px"
+                width="200px"
               >
                 <template slot-scope="scope" >
-                  <el-button
-                    size="mini"
-                    type="text"
-                    icon="el-icon-edit"
-                    @click="handleDetails(scope.row)"
-                    v-hasPermi="configPermi.details"
-                  >详情</el-button>
                   <el-button
                     size="mini"
                     type="text"
@@ -107,6 +81,13 @@
                     @click="handleUpdate(scope.row)"
                     v-hasPermi="configPermi.edit"
                   >修改</el-button>
+                  <!-- <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-edit"
+                    @click="handleDateList(scope.row)"
+                    v-hasPermi="configPermi.dateList"
+                  >日历价格表</el-button> -->
                   <el-button
                     size="mini"
                     type="text"
@@ -135,6 +116,8 @@
     <addAndEditBox ref="addAndEditBox" :listTreeCopy="listTreeCopy" @refresh="getList" />
     <!--  详情   -->
     <detailsBox ref="detailsBox" @refresh="getList"></detailsBox>
+    <!--  日期价格 -->
+    <dateList ref="dateList" />
   </el-dialog>
 </template>
 
@@ -145,18 +128,19 @@ import {
   publicByPutApi as releaseApi,
   addTableApi
 } from "@/api/CURD";
-import addAndEditBox from "../formBox/commodityListForm.vue"
+import addAndEditBox from "../formBox/houseTypeListForm.vue"
 import detailsBox from "../detailsBox/commodityListDetails.vue"
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-
+import dateList from "../formBox/hotelsManagementDataTabel.vue"
 export default {
   name: "CateringManagementCategoryTabel",
   dicts: [],
   components: {
     addAndEditBox,
     Treeselect,
-    detailsBox
+    detailsBox,
+    dateList
   },
   data() {
     return {
@@ -168,21 +152,22 @@ export default {
       loadingText: "拼命加载数据中...",
       formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
       configPermi: {
-          add: ['cateringManagement:cateringManagementCategoryTabel:add'], // 新增权限
-          details: ['cateringManagement:cateringManagementCategoryTabel:details'], // 详情权限
-          delect: ['cateringManagement:cateringManagementCategoryTabel:delect'], // 删除权限
-          edit: ['cateringManagement:cateringManagementCategoryTabel:edit'], // 编辑基本信息权限
+          add: ['hotelsManagement:hotelsManagementCategoryTabel:add'], // 新增权限
+          details: ['hotelsManagement:hotelsManagementCategoryTabel:details'], // 详情权限
+          delect: ['hotelsManagement:hotelsManagementCategoryTabel:delect'], // 删除权限
+          edit: ['hotelsManagement:hotelsManagementCategoryTabel:edit'], // 编辑基本信息权限
+          dateList: ['hotelsManagement:hotelsManagementCategoryTabel:dateList'], // 编辑基本信息权限
           upload: [''],// 导入权限
           export: [''],// 导出权限
           release: ['']
         },
         configUrl: {
-          list: '/merchant/merchantPerformAuditorium/shopGoodsList', // 列表地址
-          delect: '/merchant/merchantPerformAuditorium/deleteMerchantGoods', // 删除地址
+          list: '/goods/goodsHotel/pageList', // 列表地址
+          delect: '/goods/goodsHotel/deleteById', // 删除地址
           upload: '',// 导入地址
           download:'', // 下载模板地址
           export: '',// 导出地址
-          updateStatusById: '/merchant/merchantPerformAuditorium/updateStatus',
+          updateStatusById: '/goods/goodsHotel/updateStatus',
           classifyList: '/goods/goodsClassify/treeList', // 商品分类
           shopList: '/merchant/merchantShop/pageList', // 店铺
         },
@@ -210,17 +195,12 @@ export default {
         dateRange: [],
         // 控制列表是否显示
         columns: [
-          { key: 0, label: `商品图片`, visible: true },
-          { key: 2, label: `商品名称`, visible: true },
-          { key: 3, label: `分类`, visible: true },
-          { key: 4, label: `销售价格`, visible: true },
-          { key: 5, label: `规格`, visible: true },
-          { key: 6, label: `库存`, visible: true },
-          { key: 7, label: `总销量`, visible: true },
-          { key: 8, label: `单位`, visible: true },
-          { key: 9, label: `限购`, visible: true },
-          { key: 10, label: `上架/下架`, visible: true },
-          { key: 11, label: `创建时间`, visible: true },
+          { key: 0, label: `房型名称`, visible: true },
+          { key: 2, label: `所属酒店`, visible: true },
+          { key: 3, label: `可住人数(个)`, visible: true },
+          { key: 4, label: `床位数(张)`, visible: true },
+          { key: 5, label: `房间数(间)`, visible: true },
+          { key: 6, label: `上架/下架`, visible: true },
         ],
         listTreeCopy: [],
         shopList: [],
@@ -241,15 +221,13 @@ export default {
       this.tabelId = row.id
       this.tabelName = row.name
       this.getList();
-      this.remoteClassifyId()
-      this.remoteShop('')
     },
     /** 查询用户列表 */
     getList() {
         this.loading = true;
         let params = JSON.parse(JSON.stringify(this.queryParams))
         params['shopId'] = this.tabelId
-        params['goodsType'] = 4
+        params['goodsType'] = 5
         listTableApi(
           this.configUrl.list,
           this.addDateRange(
@@ -289,7 +267,7 @@ export default {
       /** 新增按钮操作 */
       handleAdd() {
         if(this.$refs.addAndEditBox) {
-          this.$refs.addAndEditBox.initData(this.title + '-添加菜品', "ADD",{
+          this.$refs.addAndEditBox.initData(this.title + '-添加房型', "ADD",{
             shopId: this.tabelId,
             shopName: this.tabelName
           })
@@ -299,20 +277,25 @@ export default {
       handleUpdate(row) {
         if(this.$refs.addAndEditBox) {
           console.log("dsfsdfdsfsdfsfdsdfsdf",this.$refs.addAndEditBox)
-          this.$refs.addAndEditBox.initData(this.title + '-修改菜品', "EDITInit",{...row})
+          this.$refs.addAndEditBox.initData(this.title + '-修改房型', "EDITInit",{...row})
+        }
+      },
+      handleDateList(row) {
+        if(this.$refs.dateList) {
+          this.$refs.dateList.initData(this.title + '-房型价格', "EDITInit",{...row})
         }
       },
       handleDetails(row){
         if(this.$refs.detailsBox) {
-          this.$refs.detailsBox.initData(this.title + '-菜品详情',"DEATILSInit", {...row})
+          this.$refs.detailsBox.initData(this.title + '-房型详情',"DEATILSInit", {...row})
         }
       },
       /** 删除按钮操作 */
       handleDelete(row) {
-        const goodsId = row.goodsId || this.ids;
+        const ids = row.id || this.ids;
         this.$modal.confirm('是否确认删除数据项?').then( () => {
           return delTableParamsApi(this.configUrl.delect,{
-            goodsId: goodsId
+            id: ids
           });
         }).then(() => {
           this.getList();
@@ -359,37 +342,6 @@ export default {
           console.error("失败====",e)
         });
       },
-      /**  远程搜索商品分类  */
-      remoteClassifyId() {
-        listTableApi(this.configUrl.classifyList,{
-          shopId: this.tabelId
-        }).then(response => {
-              let list = response.data
-              this.listTreeCopy = list
-          }
-        ).catch (error=>{
-          console.error('获取列表失败!!!!',error)
-          this.listTreeCopy = [];
-        })
-      },
-      /**   远程归属店铺   */
-      remoteShop(value) {
-        try {
-          if(this.shopListTime) {
-            clearTimeout(this.shopListTime)
-          }
-          this.shopListLoading = true
-          this.shopListTime = setTimeout(async ()=>{
-            let res = await listTableApi(this.configUrl.shopList,{name: value})
-           this.shopList = res.data.rows
-           this.shopListLoading = false
-          },1000)
-        } catch (error) {
-          this.shopListLoading = false
-        }
-        
-      },
-
     /**
      * 关闭弹框
      * @date 2023-11-22