Przeglądaj źródła

实现前后端订单评价和留言功能

gqx 2 lat temu
rodzic
commit
01cfcec6a2

+ 244 - 0
src/views/orders/appraiseinfo.vue

@@ -0,0 +1,244 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                mode="multiple"
+                style="width: 180px"
+                placeholder="商家名称"
+                :maxTagCount="1"
+                :maxTagTextLength="50"
+                v-model="queryParam.hotelIds"
+              >
+                <a-select-option
+                  v-for="(item, index) in hotelList"
+                  :key="index"
+                  :value="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select v-model="queryParam.commentType" style="width: 100%" placeholder="类型">
+                <a-select-option value="1">酒店</a-select-option>
+                <a-select-option value="2">商品</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <!-- <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+
+
+    <!-- table区域-begin -->
+    <div>
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">回复</a>
+          <a-divider type="vertical" />
+          <a @click="handleDelete(record.id)">删除</a>
+        </span>
+
+      </a-table>
+    </div>
+
+    <ces-order-comment-modal ref="modalForm" @ok="modalFormOk"></ces-order-comment-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import CesOrderCommentModal from "./modules/CesOrderCommentModal";
+import { httpAction, postAction,getAction } from "@/api/manage";
+export default {
+  name: "CesOrderCommentList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    CesOrderCommentModal,
+  },
+  data() {
+    return {
+      description: "ces_order_comment管理页面",
+      // 表头
+      columns: [
+        {
+          title: "商家",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "评分",
+          align: "center",
+          dataIndex: "score",
+        },
+        {
+          title: "评价类型",
+          align: "center",
+          dataIndex: "commentType",
+          customRender: function (text) {
+            return text == 1 ? "酒店" : "商品";
+          },
+        },
+        {
+          title: "评价内容",
+          align: "center",
+          dataIndex: "contentBody",
+        },
+        {
+          title: "商家回复",
+          align: "center",
+          dataIndex: "sellerContent",
+        },
+        {
+          title: "创建时间",
+          align: "center",
+          dataIndex: "createDate",
+          // customRender: function (text) {
+          //   return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          // },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/order/cesOrderComment/list",
+        delete: "/order/cesOrderComment/delete",
+        deleteBatch: "/order/cesOrderComment/deleteBatch",
+        exportXlsUrl: "/order/cesOrderComment/exportXls",
+        importExcelUrl: "order/cesOrderComment/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+    };
+  },
+  created() {
+    getAction(
+      "/business/busHotel/list",
+      { pageNo: 1, pageSize: 100 }
+    ).then((res) => {
+      if (res.success) {
+        this.hotelList = res.result.records;
+      }
+    });
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "int", value: "commentId", text: "父级评价ID" });
+      fieldList.push({ type: "int", value: "score", text: "评价1-5星" });
+      fieldList.push({ type: "int", value: "userId", text: "评价用户ID" });
+      fieldList.push({
+        type: "int",
+        value: "commentType",
+        text: "评价类型 1 酒店 2商品",
+      });
+      fieldList.push({
+        type: "string",
+        value: "orderId",
+        text: "评价商品/订单ID",
+      });
+      fieldList.push({
+        type: "string",
+        value: "images",
+        text: "评价图片逗号分隔",
+      });
+      fieldList.push({
+        type: "string",
+        value: "contentBody",
+        text: "评价内容",
+      });
+      fieldList.push({
+        type: "string",
+        value: "sellerContent",
+        text: "商家回复",
+      });
+      fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 260 - 0
src/views/orders/messageinfo.vue

@@ -0,0 +1,260 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                mode="multiple"
+                style="width: 180px"
+                placeholder="商家名称"
+                :maxTagCount="1"
+                :maxTagTextLength="50"
+                v-model="queryParam.hotelIds"
+              >
+                <a-select-option
+                  v-for="(item, index) in hotelList"
+                  :key="index"
+                  :value="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="房号" v-model="queryParam.roomNo"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="姓名" v-model="queryParam.userName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="手机号" v-model="queryParam.userMobile"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                v-model="queryParam.commentType"
+                style="width: 100%"
+                placeholder="类型"
+              >
+                <a-select-option value="1">投诉</a-select-option>
+                <a-select-option value="2">建议</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <!-- <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <!-- <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" /> -->
+          <a @click="handleDelete(record.id)">删除</a>
+        </span>
+      </a-table>
+    </div>
+
+    <ces-order-message-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></ces-order-message-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import CesOrderMessageModal from "./modules/CesOrderMessageModal";
+import { httpAction, postAction, getAction } from "@/api/manage";
+export default {
+  name: "CesOrderMessageList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    CesOrderMessageModal,
+  },
+  data() {
+    return {
+      description: "ces_order_message管理页面",
+      // 表头
+      columns: [
+        {
+          title: "商家",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "留言类型",
+          align: "center",
+          dataIndex: "messageType",
+          customRender: function (text) {
+            return text == 1 ? "投诉" : "建议";
+          },
+        },
+        {
+          title: "内容",
+          align: "center",
+          dataIndex: "contentBody",
+        },
+        {
+          title: "姓名",
+          align: "center",
+          dataIndex: "userName",
+        },
+        {
+          title: "手机号",
+          align: "center",
+          dataIndex: "userMobile",
+        },
+        {
+          title: "房号",
+          align: "center",
+          dataIndex: "roomNo",
+        },
+        {
+          title: "创建时间",
+          align: "center",
+          dataIndex: "createDate",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/order/cesOrderMessage/list",
+        delete: "/order/cesOrderMessage/delete",
+        deleteBatch: "/order/cesOrderMessage/deleteBatch",
+        exportXlsUrl: "/order/cesOrderMessage/exportXls",
+        importExcelUrl: "order/cesOrderMessage/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+    };
+  },
+  created() {
+    getAction("/business/busHotel/list", { pageNo: 1, pageSize: 100 }).then(
+      (res) => {
+        if (res.success) {
+          this.hotelList = res.result.records;
+        }
+      }
+    );
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "int", value: "userId", text: "用户ID" });
+      fieldList.push({
+        type: "int",
+        value: "messageType",
+        text: "留言类型 1 投诉 2建议",
+      });
+      fieldList.push({ type: "string", value: "images", text: "图片逗号分隔" });
+      fieldList.push({ type: "string", value: "contentBody", text: "内容" });
+      fieldList.push({ type: "string", value: "userName", text: "姓名" });
+      fieldList.push({ type: "string", value: "userMobile", text: "手机号" });
+      fieldList.push({ type: "string", value: "roomNo", text: "房号" });
+      fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 167 - 0
src/views/orders/modules/CesOrderCommentForm.vue

@@ -0,0 +1,167 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="评分"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="score"
+            >
+              <a-input-number
+                v-model="model.score"
+                placeholder="请输入评价1-5星"
+                style="width: 100%"
+                disabled
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="评价图片"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="images"
+            >
+              <img
+                width="100"
+                style="padding:5px;"
+                :src="image"
+                v-for="(image, index) in images"
+                :key="index"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="评价内容"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="contentBody"
+            >
+              <a-textarea
+                v-model="model.contentBody"
+                rows="4"
+                placeholder="请输入评价内容"
+                disabled
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="商家回复"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="sellerContent"
+            >
+              <a-textarea
+                v-model="model.sellerContent"
+                rows="4"
+                placeholder="请输入商家回复"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "CesOrderCommentForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        sellerContent: [{ required: true, message: "请输入商家回复!" }],
+      },
+      url: {
+        add: "/order/cesOrderComment/add",
+        edit: "/order/cesOrderComment/edit",
+        queryById: "/order/cesOrderComment/queryById",
+      },
+      images: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+      if (this.model.images) {
+        this.images = this.model.images.split(",");
+      }
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 84 - 0
src/views/orders/modules/CesOrderCommentModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <ces-order-comment-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></ces-order-comment-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import CesOrderCommentForm from './CesOrderCommentForm'
+
+  export default {
+    name: 'CesOrderCommentModal',
+    components: {
+      CesOrderCommentForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/orders/modules/CesOrderCommentModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <ces-order-comment-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></ces-order-comment-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import CesOrderCommentForm from './CesOrderCommentForm'
+  export default {
+    name: 'CesOrderCommentModal',
+    components: {
+      CesOrderCommentForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 161 - 0
src/views/orders/modules/CesOrderMessageForm.vue

@@ -0,0 +1,161 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="关联租户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenantId">
+              <a-input v-model="model.tenantId" placeholder="请输入关联租户"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="关联酒店" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hotelId">
+              <a-input v-model="model.hotelId" placeholder="请输入关联酒店"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="用户ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
+              <a-input-number v-model="model.userId" placeholder="请输入用户ID" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="留言类型 1 投诉 2建议" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="messageType">
+              <a-input-number v-model="model.messageType" placeholder="请输入留言类型 1 投诉 2建议" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="图片逗号分隔" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="images">
+              <a-textarea v-model="model.images" rows="4" placeholder="请输入图片逗号分隔" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contentBody">
+              <a-textarea v-model="model.contentBody" rows="4" placeholder="请输入内容" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName">
+              <a-input v-model="model.userName" placeholder="请输入姓名"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userMobile">
+              <a-input v-model="model.userMobile" placeholder="请输入手机号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="房号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="roomNo">
+              <a-input v-model="model.roomNo" placeholder="请输入房号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createDate">
+              <j-date placeholder="请选择创建时间" v-model="model.createDate"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'CesOrderMessageForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           tenantId: [
+              { required: true, message: '请输入关联租户!'},
+           ],
+           hotelId: [
+              { required: true, message: '请输入关联酒店!'},
+           ],
+           messageType: [
+              { required: true, message: '请输入留言类型 1 投诉 2建议!'},
+           ],
+           createDate: [
+              { required: true, message: '请输入创建时间!'},
+           ],
+        },
+        url: {
+          add: "/order/cesOrderMessage/add",
+          edit: "/order/cesOrderMessage/edit",
+          queryById: "/order/cesOrderMessage/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/orders/modules/CesOrderMessageModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <ces-order-message-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></ces-order-message-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import CesOrderMessageForm from './CesOrderMessageForm'
+
+  export default {
+    name: 'CesOrderMessageModal',
+    components: {
+      CesOrderMessageForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/orders/modules/CesOrderMessageModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <ces-order-message-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></ces-order-message-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import CesOrderMessageForm from './CesOrderMessageForm'
+  export default {
+    name: 'CesOrderMessageModal',
+    components: {
+      CesOrderMessageForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 2 - 2
src/views/orders/orderInfo.vue

@@ -17,14 +17,14 @@
         />
         <p>放量管理</p>
       </div>
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/orderinfo/appraiseinfo')">
         <img
           src="http://oss.qlan99.com/20200529/0a3e72c04b224ca19f74419090db0472.png"
           width="50"
         />
         <p>评价管理</p>
       </div>
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/orderinfo/messageinfo')">
         <img
           src="http://oss.qlan99.com/20200529/0a3e72c04b224ca19f74419090db0472.png"
           width="50"

+ 3 - 4
src/views/orders/roompriceinfo.vue

@@ -164,7 +164,7 @@ import { mixinDevice } from "@/utils/mixin";
 import { JeecgListMixin } from "@/mixins/JeecgListMixin2";
 import { formatDate } from "@/utils/util";
 import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
-import { httpAction, postAction } from "@/api/manage";
+import { httpAction, postAction,getAction } from "@/api/manage";
 const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
 import moment from "moment";
 const date = new Date();
@@ -221,10 +221,9 @@ export default {
   },
   created() {
     // this.getSuperFieldList();
-    httpAction(
+    getAction(
       "/business/busHotel/list",
-      { pageNo: 1, pageSize: 100 },
-      "get"
+      { pageNo: 1, pageSize: 100 }
     ).then((res) => {
       if (res.success) {
         this.hotelList = res.result.records;