Browse Source

提交代码

WIN-B904R0U0NNS\Administrator 2 years ago
parent
commit
4e8e6b3173

+ 4 - 0
.gitignore

@@ -0,0 +1,4 @@
+yarn.lock
+.idea/.gitignore
+.idea/
+node_modules/

+ 6 - 1
src/mixins/JeecgListMixin.js

@@ -262,6 +262,11 @@ export const JeecgListMixin = {
       this.$refs.modalForm.title="详情";
       this.$refs.modalForm.disableSubmit = true;
     },
+    // handleCheck:function(record){
+    //   this.$refs.modalForm.check(record);
+    //   this.$refs.modalForm.title="审核";
+    //   this.$refs.modalForm.disableSubmit = false;
+    // },
     /* 导出 */
     handleExportXls2(){
       let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()));
@@ -371,4 +376,4 @@ export const JeecgListMixin = {
     },
   }
 
-}
+}

+ 2 - 2
src/utils/request.js

@@ -108,7 +108,7 @@ service.interceptors.request.use(config => {
   if (token) {
     config.headers[ 'X-Access-Token' ] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
   }
-
+  config.headers[ 'Auth' ] = "XPLSOspYuisBnjKcYQZmGpq====="
   // update-begin--author:sunjianlei---date:20200723---for 如果当前在low-app环境,并且携带了appId,就向Header里传递appId
   const $route = router.currentRoute
   if ($route && $route.name && $route.name.startsWith('low-app') && $route.params.appId) {
@@ -191,4 +191,4 @@ function blobToJson(data) {
 export {
   installer as VueAxios,
   service as axios
-}
+}

+ 609 - 0
src/views/business/BusHotelList.vue

@@ -0,0 +1,609 @@
+<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 :md="6" :sm="12">
+            <a-form-item label="名称">
+              <j-input placeholder="输入名称模糊查询" v-model="queryParam.name"></j-input>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="联系人">
+              <j-input placeholder="请输入联系人模糊查询" v-model="queryParam.linkName"></j-input>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="联系电话">
+              <j-input placeholder="请输入联系电话模糊查询" v-model="queryParam.linkTel"></j-input>
+            </a-form-item>
+          </a-col>
+
+          <template v-if="toggleSearchStatus">
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="酒店电话">
+                <j-input placeholder="请输入酒店电话模糊查询" v-model="queryParam.tel"></j-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="酒店地址">
+                <j-input placeholder="请输入酒店地址模糊查询" v-model="queryParam.address"></j-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="审核状态">
+                <a-select v-model="queryParam.checkStatus" placeholder="请选择">
+                  <a-select-option value="">请选择</a-select-option>
+                  <a-select-option value="0">待审核</a-select-option>
+                  <a-select-option value="1">审核通过</a-select-option>
+                  <a-select-option value="2">审核未通过</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+          </template>
+
+          <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>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class='table-operator'>
+      <a-button @click='handleAdd' type='primary' icon='plus'>新增</a-button>
+      <a-button type='primary' icon='download' @click="handleHotelExportXls('酒店信息')">导出</a-button><!-- handleExportXls-->
+      <a-upload
+        name='file'
+        :showUploadList='false'
+        :multiple='false'
+        :headers='tokenHeader'
+        :action='importExcelUrl'
+        @change='handleHotelImportExcel'>
+        <a-button type='primary' icon='import'>导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList='superFieldList' ref='superQueryModal' @handleSuperQuery='handleSuperQuery'></j-super-query>
+      <a-dropdown v-if='selectedRowKeys.length > 0'>
+        <a-menu slot='overlay'>
+          <a-menu-item key='1' @click='batchDel'><a-icon type='delete'/>删除</a-menu-item>
+        </a-menu>
+        <a-button style='margin-left: 8px'> 批量操作 <a-icon type='down' /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- 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 v-if="record.checkStatus == 0" type='vertical' />
+          <a v-if="record.checkStatus == 0" class="padding_left_8" @click='handleCheck(record)'>审核</a>
+
+          <a-divider type='vertical' />
+          <a-dropdown>
+            <a class='ant-dropdown-link'>更多 <a-icon type='down' /></a>
+            <a-menu slot='overlay'>
+              <a-menu-item>
+                <a @click='handleDetail(record)'>详情</a>
+              </a-menu-item>
+<!--              <a-menu-item>-->
+<!--                <a v-if="record.checkStatus == 0" @click='handleCheck(record)'>审核</a>-->
+<!--              </a-menu-item>-->
+              <a-menu-item>
+                <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <bus-hotel-modal ref='modalForm' @ok='modalFormOk'></bus-hotel-modal>
+  </a-card>
+</template>
+
+<script>
+  import { deleteAction, getAction, downFile, getFileAccessHttpUrl } from '@/api/manage'
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import BusHotelModal from './modules/BusHotelModal'
+
+  export default {
+    name: 'BusHotelList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      BusHotelModal
+    },
+    data () {
+      return {
+        description: 'bus_hotel管理页面',
+        // 表头
+        columns: [
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key: 'rowIndex',
+          //   width: 60,
+          //   align: 'center',
+          //   customRender: function (t, r, index) {
+          //     return parseInt(index) + 1
+          //   }
+          // },
+          {
+            title: '关联租户',
+            align: 'center',
+            fixed: 'left',
+            width: 120,
+            ellipsis: true,
+            dataIndex: 'tenantName'
+          },
+          {
+            title: '酒店名称',
+            align: 'center',
+            fixed: 'left',
+            width: 120,
+            ellipsis: true,
+            dataIndex: 'name'
+          },
+          {
+            title: '联系人',
+            align: 'center',
+            width: 80,
+            dataIndex: 'linkName'
+          },
+          {
+            title: '联系电话',
+            align: 'center',
+            width: 80,
+            dataIndex: 'linkTel'
+          },
+          {
+            title: '酒店电话',
+            align: 'center',
+            width: 80,
+            dataIndex: 'tel'
+          },
+          {
+            title: '酒店地址',
+            align: 'center',
+            dataIndex: 'address'
+          },
+          {
+            title: '备注',
+            align: 'center',
+            dataIndex: 'remarks'
+          },
+          {
+            title: '状态',
+            align: "center",
+            dataIndex: 'checkStatus_dictText'
+          },
+          {
+            title: '审核信息',
+            align: 'center',
+            dataIndex: 'checkRemarks'
+          },
+          // {
+          //   title: '星级',
+          //   align: 'center',
+          //   dataIndex: 'star'
+          // },
+          // {
+          //   title: '经度',
+          //   align: 'center',
+          //   dataIndex: 'lng'
+          // },
+          // {
+          //   title: '纬度',
+          //   align: 'center',
+          //   dataIndex: 'lat'
+          // },
+          // {
+          //   title: '客房总数',
+          //   align: 'center',
+          //   dataIndex: 'roomCount'
+          // },
+          // {
+          //   title: '开业时间',
+          //   align: 'center',
+          //   dataIndex: 'openTime',
+          //   customRender: function (text) {
+          //     return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
+          //   }
+          // },
+          // {
+          //   title: '装修时间',
+          //   align: 'center',
+          //   dataIndex: 'renovationTime',
+          //   customRender: function (text) {
+          //     return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
+          //   }
+          // },
+          // {
+          //   title: '酒店主题',
+          //   align: 'center',
+          //   dataIndex: 'topic'
+          // },
+          // {
+          //   title: '酒店政策',
+          //   align: 'center',
+          //   dataIndex: 'policy'
+          // },
+          // {
+          //   title: '酒店介绍',
+          //   align: 'center',
+          //   dataIndex: 'introduction'
+          // },
+          // {
+          //   title: '预订提醒',
+          //   align: 'center',
+          //   dataIndex: 'reserveRemind'
+          // },
+          // {
+          //   title: '交通和周边',
+          //   align: 'center',
+          //   dataIndex: 'traffic'
+          // },
+          // {
+          //   title: '门头照',
+          //   align: 'center',
+          //   dataIndex: 'ewmLogo'
+          // },
+          // {
+          //   title: '酒店图片',
+          //   align: 'center',
+          //   dataIndex: 'imgs'
+          // },
+          // {
+          //   title: '营业执照',
+          //   align: 'center',
+          //   dataIndex: 'yyImg'
+          // },
+          // {
+          //   title: '特种行业许可证',
+          //   align: 'center',
+          //   dataIndex: 'tzhyImg'
+          // },
+          // {
+          //   title: '企业法人',
+          //   align: 'center',
+          //   dataIndex: 'legalPerson'
+          // },
+          // {
+          //   title: '经营场所',
+          //   align: 'center',
+          //   dataIndex: 'registeredAddress'
+          // },
+          // {
+          //   title: '注册号',
+          //   align: 'center',
+          //   dataIndex: 'unifiedCode'
+          // },
+          // {
+          //   title: '有效期',
+          //   align: 'center',
+          //   dataIndex: 'businessTerm',
+          //   customRender: function (text) {
+          //     return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
+          //   }
+          // },
+          // {
+          //   title: '身份证正面照',
+          //   align: 'center',
+          //   dataIndex: 'sfzImg1'
+          // },
+          // {
+          //   title: '身份证反面照',
+          //   align: 'center',
+          //   dataIndex: 'sfzImg2'
+          // },
+          // {
+          //   title: '身份证手持照',
+          //   align: 'center',
+          //   dataIndex: 'sfzImg3'
+          // },
+          // {
+          //   title: '身份证姓名',
+          //   align: 'center',
+          //   dataIndex: 'sfzName'
+          // },
+          // {
+          //   title: '身份证号',
+          //   align: 'center',
+          //   dataIndex: 'idCard'
+          // },
+          // {
+          //   title: '服务商',
+          //   align: 'center',
+          //   dataIndex: 'sellerName'
+          // },
+          // {
+          //   title: '邀请码',
+          //   align: 'center',
+          //   dataIndex: 'invitationCode'
+          // },
+          // {
+          //   title: '总店',
+          //   align: 'center',
+          //   dataIndex: 'superiorSellerId'
+          // },
+          // {
+          //   title: '银联支付',
+          //   align: 'center',
+          //   dataIndex: 'unionpay'
+          // },
+          // {
+          //   title: '到店支付',
+          //   align: 'center',
+          //   dataIndex: 'ddOpen'
+          // },
+          // {
+          //   title: '微信支付',
+          //   align: 'center',
+          //   dataIndex: 'wxOpen'
+          // },
+          // {
+          //   title: '余额支付',
+          //   align: 'center',
+          //   dataIndex: 'yeOpen'
+          // },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: 'center',
+            fixed: 'right',
+            width: 147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: '/business/busHotel/list',
+          delete: '/business/busHotel/delete',
+          deleteBatch: '/business/busHotel/deleteBatch',
+          exportXlsUrl: '/business/busHotel/exportXls',
+          importExcelUrl: '/business/busHotel/importExcel'
+        },
+        dictOptions: {},
+        superFieldList: []
+      }
+    },
+    created() {
+    this.getSuperFieldList()
+    },
+    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: 'name', text: '酒店名称'
+        })
+        fieldList.push({
+          type: 'string', value: 'linkName', text: '联系人'
+        })
+        fieldList.push({
+          type: 'string', value: 'linkTel', text: '联系电话'
+        })
+        fieldList.push({
+          type: 'string', value: 'tel', text: '酒店电话'
+        })
+        fieldList.push({
+          type: 'string', value: 'address', text: '酒店地址'
+        })
+        fieldList.push({
+          type: 'string', value: 'star', text: '星级'
+        })
+        fieldList.push({
+          type: 'number', value: 'lng', text: '经度'
+        })
+        fieldList.push({
+          type: 'number', value: 'lat', text: '纬度'
+        })
+        fieldList.push({
+          type: 'int', value: 'roomCount', text: '客房总数'
+        })
+        fieldList.push({
+          type: 'date', value: 'openTime', text: '开业时间'
+        })
+        fieldList.push({
+          type: 'date', value: 'renovationTime', text: '装修时间'
+        })
+        fieldList.push({
+          type: 'string', value: 'topic', text: '酒店主题'
+        })
+        fieldList.push({
+          type: 'string', value: 'policy', text: '酒店政策'
+        })
+        fieldList.push({
+          type: 'string', value: 'introduction', text: '酒店介绍'
+        })
+        fieldList.push({
+          type: 'string', value: 'reserveRemind', text: '预订提醒'
+        })
+        fieldList.push({
+          type: 'string', value: 'traffic', text: '交通和周边'
+        })
+        fieldList.push({
+          type: 'string', value: 'ewmLogo', text: '门头照'
+        })
+        fieldList.push({
+          type: 'string', value: 'imgs', text: '酒店图片'
+        })
+        fieldList.push({
+          type: 'string', value: 'yyImg', text: '营业执照'
+        })
+        fieldList.push({
+          type: 'string', value: 'tzhyImg', text: '特种行业许可证'
+        })
+        fieldList.push({
+          type: 'string', value: 'legalPerson', text: '企业法人'
+        })
+        fieldList.push({
+          type: 'string', value: 'registeredAddress', text: '经营场所'
+        })
+        fieldList.push({
+          type: 'string', value: 'unifiedCode', text: '注册号'
+        })
+        fieldList.push({
+          type: 'date', value: 'businessTerm', text: '有效期'
+        })
+        fieldList.push({
+          type: 'string', value: 'sfzImg1', text: '身份证正面照'
+        })
+        fieldList.push({
+          type: 'string', value: 'sfzImg2', text: '身份证反面照'
+        })
+        fieldList.push({
+          type: 'string', value: 'sfzImg3', text: '身份证手持照'
+        })
+        fieldList.push({
+          type: 'string', value: 'sfzName', text: '身份证姓名'
+        })
+        fieldList.push({
+          type: 'string', value: 'idCard', text: '身份证号'
+        })
+        fieldList.push({
+          type: 'string', value: 'sellerName', text: '服务商'
+        })
+        fieldList.push({
+          type: 'string', value: 'invitationCode', text: '邀请码'
+        })
+        fieldList.push({
+          type: 'string', value: 'superiorSellerId', text: '总店'
+        })
+        fieldList.push({
+          type: 'string', value: 'unionpay', text: '银联支付'
+        })
+        fieldList.push({
+          type: 'string', value: 'ddOpen', text: '到店支付'
+        })
+        fieldList.push({
+          type: 'string', value: 'wxOpen', text: '微信支付'
+        })
+        fieldList.push({
+          type: 'string', value: 'yeOpen', text: '余额支付'
+        })
+        this.superFieldList = fieldList
+      },
+      handleHotelExportXls(fileName) {
+        if (!fileName || typeof fileName !== 'string') {
+          fileName = '导出文件'
+        }
+        let param = this.getQueryParams()
+        if(this.selectedRowKeys && this.selectedRowKeys.length > 0 ) {
+          param['selections'] = this.selectedRowKeys.join(',')
+        }
+        console.log('导出参数', param)
+        downFile(this.url.exportXlsUrl, param).then((data) => {
+          if (!data) {
+            this.$message.warning('文件下载失败')
+            return
+          }
+          if (typeof window.navigator.msSaveBlob !== 'undefined') {
+            window.navigator.msSaveBlob(new Blob([data], {
+              type: 'application/vnd.ms-excel'
+        }), fileName + '.xls')
+          } else {
+            let url = window.URL.createObjectURL(new Blob([data], {
+              type: 'application/vnd.ms-excel'
+        }))
+            let link = document.createElement('a')
+            link.style.display = 'none'
+            link.href = url
+            link.setAttribute('download', fileName + '.xls')
+            document.body.appendChild(link)
+            link.click()
+            document.body.removeChild(link) // 下载完成移除元素
+            window.URL.revokeObjectURL(url) // 释放掉blob对象
+          }
+        })
+      },
+      handleHotelImportExcel() {
+        console.log(444)
+      },
+      handleCheck: function(record) {
+        console.log(this.$refs)
+        this.$refs.modalForm.check(record)
+        this.$refs.modalForm.title = '审核'
+        this.$refs.modalForm.disableSubmit = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+  .padding_left_8{
+    padding-left: 8px;
+  }
+</style>

+ 737 - 0
src/views/business/modules/BusHotelForm.vue

@@ -0,0 +1,737 @@
+<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="请输入关联租户" :disabled="checkFlag"></a-input>-->
+<!--            </a-form-model-item>-->
+            <a-form-model-item label="关联租户" :labelCol="labelCol" :wrapperCol="wrapperCol" >
+<!--              <j-dict-select-tag-->
+<!--                      v-model="model.tenantId"-->
+<!--                      :options="tenantsOptions"-->
+<!--                      placeholder="请选择关联租户">-->
+<!--              </j-dict-select-tag>-->
+              <j-dict-select-tag v-model="model.tenantId" placeholder="请选择关联租户" dictCode="sys_tenant,name,id"  :disabled="checkFlag"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="酒店名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+              <a-input v-model="model.name" placeholder="请输入酒店名称" :disabled="checkFlag"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="linkName">
+              <a-input v-model="model.linkName" placeholder="请输入联系人" :disabled="checkFlag"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="linkTel">
+              <a-input v-model="model.linkTel" placeholder="请输入联系电话" :disabled="checkFlag"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="酒店电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tel">
+              <a-input v-model="model.tel" placeholder="请输入酒店电话" :disabled="checkFlag"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+              <a-row>
+                <a-form-model-item label="酒店地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+                <a-col :span="19">
+                  <a-input v-model="model.address" placeholder="请输入酒店地址" :disabled="checkFlag">
+                  </a-input>
+                </a-col>
+                <a-col :span="4">
+                  <a-button @click="getLonAndLat()" :disabled="checkFlag">获取经纬度</a-button>
+                </a-col>
+                </a-form-model-item>
+              </a-row>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="星级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="star">
+              <a-input-number v-model="model.star" placeholder="请输入星级" style="width: 100%" :disabled="checkFlag"></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="经度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lng">
+              <a-input-number v-model="model.lng" placeholder="请输入经度" style="width: 100%" :disabled="checkFlag" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="纬度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lat">
+              <a-input-number v-model="model.lat" placeholder="请输入纬度" style="width: 100%" :disabled="checkFlag" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客房总数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="roomCount">
+              <a-input-number v-model="model.roomCount" placeholder="请输入客房总数" style="width: 100%" :disabled="checkFlag" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="开业时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="openTime">
+              <j-date placeholder="请选择开业时间" v-model="model.openTime"  style="width: 100%" :disabled="checkFlag" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="装修时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="renovationTime">
+              <j-date placeholder="请选择装修时间" v-model="model.renovationTime"  style="width: 100%" :disabled="checkFlag" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <template v-if="showMore">
+          <a-row>
+            <a-col :span="24">
+              <a-form-model-item label="酒店主题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="topic">
+                <a-input v-model="model.topic" placeholder="请输入酒店主题" :disabled="checkFlag"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+<!--              <a-form-model-item label="酒店政策" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="policy">-->
+<!--                <a-input v-model="model.policy" placeholder="请输入酒店政策" :disabled="checkFlag"></a-input>-->
+<!--                <a-textarea :rows="5" v-model="model.policy" placeholder="请输入酒店政策" :disabled="checkFlag"/>-->
+<!--              </a-form-model-item>-->
+              <a-form-model-item label="酒店政策" style="min-height: 300px" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="policy">
+                  <j-editor v-model="model.policy" :disabled="checkFlag"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+<!--              <a-form-model-item label="酒店介绍" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="introduction">-->
+<!--&lt;!&ndash;                <a-input v-model="model.introduction" placeholder="请输入酒店介绍" :disabled="checkFlag"></a-input>&ndash;&gt;-->
+<!--                <a-textarea :rows="5" v-model="model.introduction" placeholder="请输入酒店介绍" :disabled="checkFlag"/>-->
+<!--              </a-form-model-item>-->
+              <a-form-model-item label="酒店介绍" style="min-height: 300px" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="introduction">
+                <j-editor v-model="model.introduction" :disabled="checkFlag"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+<!--              <a-form-model-item label="预订提醒" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reserveRemind">-->
+<!--&lt;!&ndash;                <a-input v-model="model.reserveRemind" placeholder="请输入预订提醒" :disabled="checkFlag"></a-input>&ndash;&gt;-->
+<!--                <a-textarea :rows="5" v-model="model.reserveRemind" placeholder="请输入预订提醒" :disabled="checkFlag"/>-->
+<!--              </a-form-model-item>-->
+              <a-form-model-item label="预订提醒" style="min-height: 300px" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reserveRemind">
+                <j-editor v-model="model.reserveRemind" :disabled="checkFlag"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+<!--              <a-form-model-item label="交通和周边" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="traffic">-->
+<!--&lt;!&ndash;                <a-input v-model="model.traffic" placeholder="请输入交通和周边" :disabled="checkFlag"></a-input>&ndash;&gt;-->
+<!--                <a-textarea :rows="5" v-model="model.traffic" placeholder="请输入交通和周边" :disabled="checkFlag"/>-->
+<!--              </a-form-model-item>-->
+              <a-form-model-item label="交通和周边" style="min-height: 300px" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="traffic">
+                <j-editor v-model="model.traffic" :disabled="checkFlag"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="门头照" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ewmLogo">
+<!--                <a-input v-model="model.ewmLogo" placeholder="请输入门头照" :disabled="checkFlag"></a-input>-->
+                <j-image-upload class="avatar-uploader" placeholder="请上传门头照" text="上传" v-model="model.ewmLogo" :disabled="checkFlag"></j-image-upload>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+<!--              <a-form-model-item label="酒店图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imgs">-->
+<!--&lt;!&ndash;                <a-input v-model="model.imgs" placeholder="请输入酒店图片" :disabled="checkFlag"></a-input>&ndash;&gt;-->
+<!--                <j-image-upload :file-list="fileList" :multiple="true" :number="5" class="avatar-uploader" placeholder="请上传酒店图片" text="上传" v-model="model.imgs" :disabled="checkFlag" >-->
+<!--                    <div v-if="fileList.length < 8">-->
+<!--                        <a-icon type="plus" />-->
+<!--                        <div class="ant-upload-text">-->
+<!--                            Upload-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                </j-image-upload>-->
+<!--              </a-form-model-item>-->
+                <a-form-model-item label="酒店图片" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback prop="imgs">
+                    <div class="clearfix">
+                        <a-upload
+                                :action="uploadAction"
+                                :headers="headers"
+                                list-type="picture-card"
+                                :file-list="fileList"
+                                @preview="handlePreview"
+                                @change="handleChange"
+                                :remove="handleDelete"
+                        >
+                            <div v-if="fileList.length < 8" >
+                                <a-icon type="plus" style="font-size: 18px;color: #5f5b5b;" />
+                                <div class="ant-upload-text">
+                                    上传
+                                </div>
+                            </div>
+                        </a-upload>
+                        <a-modal :width="800" :visible="previewVisible" :footer="null" @cancel="handleFileCancel">
+                            <div style="padding-top: 20px;">
+                                <div v-if="previewImagePdf === 1" style="height: 700px; ">
+                                    <iframe ref="pdf" :src="previewImage" width="100%" height="100%"></iframe>
+                                </div>
+                                <div v-else>
+                                    <img alt="example" style="width: 100%" :src="previewImage" />
+                                </div>
+                            </div>
+                        </a-modal>
+                    </div>
+                </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="营业执照" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="yyImg">
+<!--                <a-input v-model="model.yyImg" placeholder="请输入营业执照" :disabled="checkFlag"></a-input>-->
+                <j-image-upload class="avatar-uploader" placeholder="请上传营业执照" text="上传" v-model="model.yyImg" :disabled="checkFlag" ></j-image-upload>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="特种行业许可证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tzhyImg">
+<!--                <a-input v-model="model.tzhyImg" placeholder="请输入特种行业许可证" :disabled="checkFlag"></a-input>-->
+                <j-image-upload class="avatar-uploader" placeholder="请上传特种行业许可证" text="上传" v-model="model.tzhyImg" :disabled="checkFlag" ></j-image-upload>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="企业法人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="legalPerson">
+                <a-input v-model="model.legalPerson" placeholder="请输入企业法人" :disabled="checkFlag"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="经营场所" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="registeredAddress">
+                <a-input v-model="model.registeredAddress" placeholder="请输入经营场所" :disabled="checkFlag"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="注册号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unifiedCode">
+                <a-input v-model="model.unifiedCode" placeholder="请输入注册号" :disabled="checkFlag"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="有效期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="businessTerm">
+                <j-date placeholder="请选择有效期" v-model="model.businessTerm" style="width: 100%" :disabled="checkFlag" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="身份证正面照" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sfzImg1">
+<!--                <a-input v-model="model.sfzImg1" placeholder="请输入身份证正面照" :disabled="checkFlag"></a-input>-->
+                <j-image-upload class="avatar-uploader" placeholder="请上传身份证正面照" text="上传" v-model="model.sfzImg1" :disabled="checkFlag" ></j-image-upload>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="身份证反面照" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sfzImg2">
+<!--                <a-input v-model="model.sfzImg2" placeholder="请输入身份证反面照" :disabled="checkFlag"></a-input>-->
+                <j-image-upload class="avatar-uploader" placeholder="请上传身份证反面照" text="上传" v-model="model.sfzImg2" :disabled="checkFlag" ></j-image-upload>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="身份证手持照" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sfzImg3">
+<!--                <a-input v-model="model.sfzImg3" placeholder="请输入身份证手持照" :disabled="checkFlag"></a-input>-->
+                <j-image-upload class="avatar-uploader" placeholder="请上传身份证手持照" text="上传" v-model="model.sfzImg3" :disabled="checkFlag" ></j-image-upload>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="身份证姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sfzName">
+                <a-input v-model="model.sfzName" placeholder="请输入身份证姓名" :disabled="checkFlag"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="idCard">
+                <a-input v-model="model.idCard" placeholder="请输入身份证号" :disabled="checkFlag"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="服务商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sellerName">
+                <a-input v-model="model.sellerName" placeholder="请输入服务商" :disabled="checkFlag"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="邀请码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invitationCode">
+                <a-input v-model="model.invitationCode" placeholder="请输入邀请码" :disabled="checkFlag"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item label="总店" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="superiorSellerId">
+                <a-input v-model="model.superiorSellerId" placeholder="请输入总店" :disabled="checkFlag"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24"  :offset="5">
+              <a-row :gutter="[16,16]">
+                <a-col :span="4" >
+                  <a-form-model-item :colon="false" :labelCol="labelCol_1" :wrapperCol="wrapperCol_1" label="银联支付">
+                    <a-switch checkedChildren="是" unCheckedChildren="否" v-model="model.unionpay" :disabled="checkFlag"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :span="4">
+                  <a-form-model-item :colon="false" :labelCol="labelCol_1" :wrapperCol="wrapperCol_1" label="到店支付">
+                    <a-switch checkedChildren="是" unCheckedChildren="否" v-model="model.ddOpen" :disabled="checkFlag"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :span="4">
+                  <a-form-model-item :colon="false" :labelCol="labelCol_1" :wrapperCol="wrapperCol_1" label="微信支付">
+                    <a-switch checkedChildren="是" unCheckedChildren="否" v-model="model.wxOpen" :disabled="checkFlag"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :span="4">
+                  <a-form-model-item :colon="false" :labelCol="labelCol_1" :wrapperCol="wrapperCol_1" label="余额支付">
+                    <a-switch checkedChildren="是" unCheckedChildren="否" v-model="model.yeOpen" :disabled="checkFlag"/>
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-col>
+          </a-row>
+        </template>
+        <a-row v-if="checkFlag">
+          <a-col>
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="审核状态" prop="checkStatus">
+              <a-radio-group v-model="model.checkStatus">
+                <a-radio value="1">
+                  通过
+                </a-radio>
+                <a-radio value="2">
+                  拒绝
+                </a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="审核备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="checkRemarks">
+              <a-textarea :rows="5" v-model="model.checkRemarks" placeholder="请输入审核备注"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+    <a-row>
+      <a-col :span="4" :offset="20">
+        <a @click="handleToggleMore()" style="margin-left: 8px">
+          {{ showMore ? '收起' : '更多' }}
+          <a-icon :type="showMore ? 'up' : 'down'"/>
+        </a>
+      </a-col>
+    </a-row>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+  import Vue from "vue";
+  function getBase64(file) {
+      return new Promise((resolve, reject) => {
+          const reader = new FileReader();
+          reader.readAsDataURL(file);
+          reader.onload = () => resolve(reader.result);
+          reader.onerror = error => reject(error);
+      });
+  }
+  import { ACCESS_TOKEN } from "@/store/mutation-types"
+  import { getFileAccessHttpUrl } from '@/api/manage'
+
+  const uidGenerator=()=>{
+      return '-'+parseInt(Math.random()*10000+1,10);
+  }
+  const getFileName=(path)=>{
+      if(path.lastIndexOf("\\")>=0){
+          let reg=new RegExp("\\\\","g");
+          path = path.replace(reg,"/");
+      }
+      return path.substring(path.lastIndexOf("/")+1);
+  }
+  export default {
+      name: 'BusHotelForm',
+      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}
+              },
+              labelCol_1: {
+                  xs: {span: 6},
+                  sm: {span: 16}
+              },
+              wrapperCol_1: {
+                  xs: {span: 3},
+                  sm: {span: 8}
+              },
+              confirmLoading: false,
+              validatorRules: {
+                  name: [{
+                      required: true, message: '请输入酒店名称!'
+                  }],
+                  linkName: [{
+                      required: true, message: '请输入联系人!'
+                  }],
+                  linkTel: [{
+                      required: true, message: '请输入联系电话!'
+                  }],
+                  tel: [{
+                      required: true, message: '请输入酒店电话!'
+                  }],
+                  address: [{
+                      required: true, message: '请输入酒店地址!'
+                  }],
+                  star: [{
+                      required: true, message: '请输入星级!'
+                  }],
+                  lng: [{
+                      required: true, message: '请输入经度!'
+                  }],
+                  lat: [{
+                      required: true, message: '请输入纬度!'
+                  }],
+                  roomCount: [{
+                      required: true, message: '请输入客房总数!'
+                  }],
+                  openTime: [{
+                      required: true, message: '请输入开业时间!'
+                  }],
+                  renovationTime: [{
+                      required: true, message: '请输入装修时间!'
+                  }],
+                  checkStatus: [{
+                      required: true, message: '请选择审核状态', trigger: 'change'
+                  }]
+              },
+              url: {
+                  add: '/business/busHotel/add',
+                  edit: '/business/busHotel/edit',
+                  queryById: '/business/busHotel/queryById',
+                  hotelCheck: '/business/busHotel/hotelCheck',
+                  getLonAndLat: '/business/busHotel/getLonAndLat',
+                  queryTenantList: '/sys/tenant/queryList'
+              },
+              uploadAction: window._CONFIG['domianURL'] + "/sys/common/upload",
+              checkFlag: false,
+              detailFlag: false,
+              tenantsOptions: [],
+              showMore: false,
+              previews: {},
+              previewVisible: false,
+              previewImage: '',
+              previewImagePdf: 0,
+              fileList: [],
+              headers:{},
+          }
+      },
+      computed: {
+          formDisabled() {
+              return this.disabled
+          },
+          uploadAction: function () {
+              return this.url.fileUpload;
+          }
+      },
+      watch:{
+          value: {
+              handler(val,oldValue) {
+                  if (val instanceof Array) {
+                      this.initFileList(val.join(','))
+                  } else {
+                      this.initFileList(val)
+                  }
+                  if(!val || val.length==0){
+                      this.picUrl = false;
+                  }
+              },
+              //立刻执行handler
+              immediate: true
+          }
+      },
+      created() {
+          // 备份model原始值
+          this.modelDefault = JSON.parse(JSON.stringify(this.model))
+          this.initTenantList()
+          const token = Vue.ls.get(ACCESS_TOKEN);
+          this.headers = {"X-Access-Token": token}
+      },
+      methods: {
+          add() {
+              this.edit(this.modelDefault)
+          },
+          edit(record, type) {
+              this.model = Object.assign({}, record)
+              this.visible = true
+              if (type === 1) {
+                  this.detailFlag = true;
+              }
+
+
+              let fileList = [];
+              let arr = this.model.imgs.split(",")
+              for(var a=0;a<arr.length;a++){
+                  let url = getFileAccessHttpUrl(arr[a]);
+                  fileList.push({
+                      uid: uidGenerator(),
+                      name: getFileName(arr[a]),
+                      status: 'done',
+                      url: url,
+                      response:{
+                          status:"history",
+                          message:arr[a]
+                      }
+                  })
+              }
+              this.fileList = fileList
+          },
+          check(record) {
+              this.model = Object.assign({}, record)
+              this.visible = true
+              this.checkFlag = true
+              let fileList = [];
+              let arr = this.model.imgs.split(",")
+              for(var a=0;a<arr.length;a++){
+                  let url = getFileAccessHttpUrl(arr[a]);
+                  fileList.push({
+                      uid: uidGenerator(),
+                      name: getFileName(arr[a]),
+                      status: 'done',
+                      url: url,
+                      response:{
+                          status:"history",
+                          message:arr[a]
+                      }
+                  })
+              }
+              this.fileList = fileList
+          },
+          //初始化租户字典
+          initTenantList() {
+              getAction(this.url.queryTenantList).then(res => {
+                  if (res.success) {
+                      this.tenantsOptions = res.result.map((item, index, arr) => {
+                          let c = {label: item.name, value: item.id + ""}
+                          return c;
+                      })
+                      console.log('this.tenantsOptions: ', this.tenantsOptions)
+                  }
+              })
+          },
+          handleToggleMore() {
+              this.showMore = !this.showMore;
+          },
+          getLonAndLat() {
+              const that = this
+              let params = {address: this.model.address}
+              getAction(this.url.getLonAndLat, params).then((res) => {
+                  if (res.success) {
+                      if (res.code === 200) {
+                          console.log(res.result)
+                          that.model.lat = res.result.lat
+                          that.model.lng = res.result.lng
+                          that.model = Object.assign({}, that.model)
+                      } else {
+                          that.$message.warning(res.message)
+                      }
+                  }
+              })
+          },
+          beforeUpload: function(file){
+              var fileType = file.type;
+              if(fileType.indexOf('image')<0){
+                  this.$message.warning('请上传图片');
+                  return false;
+              }
+          },
+          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 {
+                          if (that.checkFlag) {
+                              // 审核
+                              httpurl += this.url.hotelCheck
+                              method = 'put'
+                          } else {
+                              httpurl += this.url.edit
+                              method = 'put'
+                          }
+                      }
+                      let path = ''
+                      let arr = [];
+                      if (that.fileList.length > 0) {
+                          that.fileList.forEach((item, index) => {
+                              arr.push(item.response.message)
+                          })
+                      }
+                      if (arr.length > 0) {
+                          path = arr.join(",")
+                      }
+                      that.model.imgs = path;
+                      console.log(that.model)
+                      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
+                      })
+                  }
+              })
+          },
+          handleFileCancel() {
+              this.previewVisible = false;
+          },
+          async handlePreview(file) {
+              if (!file.url && !file.preview) {
+                  file.preview = await getBase64(file.originFileObj);
+              }
+              this.previewImage = file.url || file.preview;
+              if (this.previewImage.substring(this.previewImage.lastIndexOf('.') + 1) === 'pdf') {
+                  this.previewImagePdf = 1
+              } else {
+                  this.previewImagePdf = 0
+              }
+              this.previewVisible = true;
+          },
+          /**
+           * 上传文件
+           */
+          customRequest(data) {
+              const formData = new FormData()
+              formData.append('file', data.file)
+              AttachmentInfoUploadContract(formData).then((res) => {
+                  if (res.success) {
+                      this.$message.success('上传成功')
+                      var path = process.env.VUE_APP_API_BASE_URL + '/' + res.data.path;
+                      this.uploadIds.push(res.data.id)
+                      this.fileList.forEach(t => {
+                          if (t.uid === data.file.uid) {
+                              t.url = path
+                              t.thumbUrl = path
+                              t.status = 'done'
+                              t.id = res.data.id
+                          }
+                      })
+                  } else {
+                      this.$message.error('上传失败:' + res.message)
+                  }
+              })
+          },
+          handleDelete(file){
+              //如有需要新增 删除逻辑
+              console.log(file)
+          },
+          handleChange(info) {
+              this.picUrl = false;
+              let fileList = info.fileList
+              //update-begin-author:wangshuai date:20201022 for:LOWCOD-969 判断number是否大于0和是否多选,返回选定的元素。
+              if (this.number > 0 && this.isMultiple) {
+                  fileList = fileList.slice(-this.number);
+              }
+              //update-end-author:wangshuai date:20201022 for:LOWCOD-969 判断number是否大于0和是否多选,返回选定的元素。
+              if (info.file.status === 'done') {
+                  if (info.file.response.success) {
+                      this.picUrl = true;
+                      fileList = fileList.map((file) => {
+                          if (file.response) {
+                              file.url = file.response.message;
+                          }
+                          return file;
+                      });
+                  }
+                  //this.$message.success(`${info.file.name} 上传成功!`);
+              } else if (info.file.status === 'error') {
+                  this.$message.error(`${info.file.name} 上传失败.`);
+              } else if (info.file.status === 'removed') {
+                  this.handleDelete(info.file)
+              }
+              this.fileList = fileList
+              if (info.file.status === 'done' || info.file.status === 'removed') {
+                  this.handlePathChange()
+              }
+              console.log("改变")
+              console.log(this.fileList)
+          },
+          handlePathChange() {
+              let uploadFiles = this.fileList
+              let path = ''
+              if (!uploadFiles || uploadFiles.length == 0) {
+                  path = ''
+              }
+              let arr = [];
+              if (!this.isMultiple && uploadFiles.length > 0) {
+                  arr.push(uploadFiles[uploadFiles.length - 1].response.message)
+              } else {
+                  for (let a = 0; a < uploadFiles.length; a++) {
+                      // update-begin-author:taoyan date:20200819 for:【开源问题z】上传图片组件 LOWCOD-783
+                      if (uploadFiles[a].status === 'done') {
+                          arr.push(uploadFiles[a].response.message)
+                      } else {
+                          return;
+                      }
+                      // update-end-author:taoyan date:20200819 for:【开源问题z】上传图片组件 LOWCOD-783
+                  }
+              }
+              if (arr.length > 0) {
+                  path = arr.join(",")
+              }
+              this.$emit('change', path);
+          },
+          initFileList(paths){
+              if(!paths || paths.length==0){
+                  this.fileList = [];
+                  return;
+              }
+              this.picUrl = true;
+              let fileList = [];
+              let arr = paths.split(",")
+              for(var a=0;a<arr.length;a++){
+                  let url = getFileAccessHttpUrl(arr[a]);
+                  fileList.push({
+                      uid: uidGenerator(),
+                      name: getFileName(arr[a]),
+                      status: 'done',
+                      url: url,
+                      response:{
+                          status:"history",
+                          message:arr[a]
+                      }
+                  })
+              }
+              this.fileList = fileList
+          },
+      }
+  }
+</script>
+<style scoped>
+  .avatar-uploader > .ant-upload {
+    width:104px;
+    height:104px;
+  }
+  .ant-upload-select-picture-card i {
+    font-size: 49px;
+    color: #999;
+  }
+
+  .ant-upload-select-picture-card .ant-upload-text {
+    margin-top: 8px;
+    color: #666;
+  }
+
+  .ant-table-tbody .ant-table-row td{
+    padding-top:10px;
+    padding-bottom:10px;
+  }
+  /deep/ .imgupload .iconp{padding:20px;}
+  /* update--end--autor:lvdandan-----date:20201016------for:j-image-upload图片组件单张图片详情回显空白*/
+
+  /deep/ .image-upload-single-over .ant-upload-select{display: none}
+</style>

+ 84 - 0
src/views/business/modules/BusHotelModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-hotel-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-hotel-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 BusHotelForm from './BusHotelForm'
+
+  export default {
+    name: 'BusHotelModal',
+    components: {
+      BusHotelForm
+    },
+    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>

+ 71 - 0
src/views/business/modules/BusHotelModal.vue

@@ -0,0 +1,71 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-hotel-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-hotel-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusHotelForm from './BusHotelForm'
+  export default {
+    name: 'BusHotelModal',
+    components: {
+      BusHotelForm
+    },
+    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(()=>{
+          if (this.title === '详情') {
+            this.$refs.realForm.edit(record,1);
+          } else {
+            this.$refs.realForm.edit(record,0);
+          }
+        })
+      },
+      check (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.check(record);
+          // this.$refs.realForm.disabled = true
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 3 - 3
src/views/user/LoginAccount.vue

@@ -43,8 +43,8 @@
         currdatetime: '',
         loginType: 0,
         model:{
-          username: 'admin',
-          password: '123456',
+          username: 'SuperAdmin',//admin
+          password: 'Aa@@1144271187',//123456
           inputCode: ''
         },
         validatorRules:{
@@ -157,4 +157,4 @@
 
 <style scoped>
 
-</style>
+</style>