Prechádzať zdrojové kódy

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-tenant-frontend

gqx 2 rokov pred
rodič
commit
c5b7b2da95

+ 77 - 0
src/views/markets/agreementunit.vue

@@ -4,6 +4,45 @@
         <div class="table-page-search-wrapper">
             <a-form layout="inline" @keyup.enter.native="searchQuery">
                 <a-row :gutter="24">
+                    <a-col :span="4">
+                        <a-form-item>
+                            <a-input placeholder="关键字" v-model="queryParam.keyWord" allowClear></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="4">
+                        <a-form-item>
+                            <a-select
+                                    v-model="queryParam.customerType"
+                                    placeholder="请选择客户类型"
+                                    :allowClear="true"
+                            >
+                                <a-select-option :value="item.id" v-for="(item,index) in customerTypeList" :key="index">{{ item.itemText }}</a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="4">
+                        <a-form-item>
+                            <a-select
+                                    v-model="queryParam.status"
+                                    placeholder="请选择客户状态"
+                                    :allowClear="true"
+                            >
+                                <a-select-option :value="item.id" v-for="(item,index) in customerStatusList" :key="index">{{ item.itemText }}</a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="4">
+                        <a-form-item>
+                            <j-dict-select-tag allowClear="true" v-model="queryParam.accountStatus" placeholder="请选择账号状态" dictCode="agreement_status"/>
+                        </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>
@@ -102,6 +141,7 @@
     import { JeecgListMixin } from '@/mixins/JeecgListMixin'
     import agreementUnitModal from './modules/agreementUnit/agreementUnitModal'
     import AgreementUnitDetailModal from './modules/agreementUnit/agreementUnitDetailModal'
+    import { httpAction, getAction } from '@/api/manage'
 
     export default {
         name: 'agreementunit',
@@ -197,10 +237,13 @@
                 },
                 dictOptions:{},
                 superFieldList:[],
+                customerTypeList:[],
+                customerStatusList:[],
             }
         },
         created() {
             this.getSuperFieldList();
+            this.initDictConfig();
         },
         computed: {
             importExcelUrl: function(){
@@ -209,6 +252,40 @@
         },
         methods: {
             initDictConfig(){
+                var that = this;
+                //客户类型
+                var param = {
+                    dictName:'协议客户类型设置'
+                }
+                // var values = JSON.parse(JSON.stringify(param))
+                that.confirmLoading = true;
+                getAction('/business/busDictItem/queryList',param).then((res)=>{
+                    console.log(res)
+                    if(res.success){
+                        if (res.code == 200 && res.result) {
+                            this.customerTypeList = res.result;
+                        }
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false;
+                })
+
+                //客户状态
+                var param = {
+                    dictName:'协议客户状态设置'
+                }
+                // var values = JSON.parse(JSON.stringify(param))
+                that.confirmLoading = true;
+                getAction('/business/busDictItem/queryList',param).then((res)=>{
+                    console.log(res)
+                    if(res.success){
+                        if (res.code == 200 && res.result) {
+                            this.customerStatusList = res.result;
+                        }
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false;
+                })
             },
             getSuperFieldList(){
                 let fieldList=[];

+ 6 - 185
src/views/markets/modules/agreementUnit/agreementUnitDetailForm.vue

@@ -266,99 +266,10 @@
                     </a-spin>
                 </div>
                 <div v-if="activeMneu == 2">
-                    <a-card :bordered="false">
-                        <!-- 查询区域 -->
-                        <div class="table-page-search-wrapper">
-                            <a-form layout="inline" @keyup.enter.native="searchQuery">
-                                <a-row :gutter="24">
-                                </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="handleExportXls('协议单位-客户协议')">导出</a-button>-->
-<!--                            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
-<!--                                <a-button type="primary" icon="import">导入</a-button>-->
-<!--                            </a-upload>-->
-<!--                            &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
-<!--                            <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-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
-                            </a-dropdown>
-                        </div>
-
-                        <!-- table区域-begin -->
-                        <div>
-                            <a-table
-                                    ref="table"
-                                    size="middle"
-                                    :scroll="{x:true}"
-                                    bordered
-                                    rowKey="id"
-                                    :columns="columnsCustomer"
-                                    :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="priceSlot" slot-scope="text, record">
-                                    <a-button type="primary">
-                                        查看
-                                    </a-button>
-                                </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-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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                                                  <a>删除</a>
-                                              </a-popconfirm>
-                                          </a-menu-item>
-                                        </a-menu>
-                                      </a-dropdown>
-                                </span>
-                            </a-table>
-                        </div>
-
-<!--                        <bus-market-agreement-customer-modal ref="modalForm" @ok="modalFormOk"></bus-market-agreement-customer-modal>-->
-                    </a-card>
+                    <customer-list :agreementModel="model"></customer-list>
                 </div>
                 <div v-if="activeMneu == 3">
-                    联系人
+                    <contacts-list :agreementModel="model"></contacts-list>
                 </div>
                 <div v-if="activeMneu == 4">
                     佣金
@@ -375,12 +286,12 @@
 <script>
     import { httpAction, getAction } from '@/api/manage'
     import '@/assets/less/TableExpand.less'
-    import { mixinDevice } from '@/utils/mixin'
-    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import CustomerList from './details/customerList'
+    import ContactsList from './details/contactsList'
 
     export default {
         name: 'agreementUnitDetailForm',
-        mixins:[JeecgListMixin, mixinDevice],
+        components: { ContactsList, CustomerList },
         computed: {
             formDisabled(){
                 return this.disabled
@@ -456,87 +367,17 @@
                     editOther: "/business/busMarketAgreementUnit/editOther",
                     queryById: "/business/busMarketAgreementUnit/queryById",
                     query_saleList: "/business/busSalesPerson/queryList",
-                    list: "/business/busMarketAgreementCustomer/list",
-                    delete: "/business/busMarketAgreementCustomer/delete",
-                    deleteBatch: "/business/busMarketAgreementCustomer/deleteBatch",
                 },
-                columnsCustomer: [
-                    {
-                        title:'协议类型',
-                        align:"center",
-                        dataIndex: 'type'
-                    },
-                    {
-                        title:'协议主题',
-                        align:"center",
-                        dataIndex: 'name'
-                    },
-                    {
-                        title:'客户签约人',
-                        align:"center",
-                        dataIndex: 'customerSignatory'
-                    },
-                    {
-                        title:'本司签约人',
-                        align:"center",
-                        dataIndex: 'companySignatory'
-                    },
-                    {
-                        title:'协议单号',
-                        align:"center",
-                        dataIndex: 'number'
-                    },
-                    {
-                        title:'签约时间',
-                        align:"center",
-                        dataIndex: 'signTime',
-                        customRender:function (text) {
-                            return !text?"":(text.length>10?text.substr(0,10):text)
-                        }
-                    },
-                    {
-                        title:'折扣值',
-                        align:"center",
-                        dataIndex: 'discount'
-                    },
-                    {
-                        title:'更新时间',
-                        align:"center",
-                        dataIndex: 'updateTime',
-                        customRender:function (text) {
-                            return !text?"":(text.length>10?text.substr(0,10):text)
-                        }
-                    },
-                    {
-                        title:'协议房价',
-                        align:"center",
-                        dataIndex: 'id',
-                        scopedSlots: { customRender: "priceSlot" },
-                    },
-                    {
-                        title: '操作',
-                        dataIndex: 'action',
-                        align:"center",
-                        fixed:"right",
-                        width:147,
-                        scopedSlots: { customRender: 'action' }
-                    }
-                ],
             };
         },
         created() {
-            // this.getSuperFieldList();
-        },
-        computed: {
-            importExcelUrl: function(){
-                // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-            },
         },
         methods: {
             add() {
                 this.edit(this.modelDefault);
             },
             edit(record) {
+                console.log(record)
                 this.model = Object.assign({}, record);
                 this.visible = true;
 
@@ -609,26 +450,6 @@
                     that.confirmLoading = false;
                 })
             },
-            initDictConfig(){
-            },
-            getSuperFieldList(){
-                let fieldList=[];
-                fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
-                fieldList.push({type:'string',value:'agreementId',text:'关联协议'})
-                fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
-                fieldList.push({type:'string',value:'name',text:'协议主题'})
-                fieldList.push({type:'string',value:'type',text:'协议类型'})
-                fieldList.push({type:'string',value:'number',text:'协议单号'})
-                fieldList.push({type:'date',value:'signTime',text:'签约时间'})
-                fieldList.push({type:'date',value:'effective',text:'有效期'})
-                fieldList.push({type:'int',value:'secrecy',text:'佣金信息保密'})
-                fieldList.push({type:'string',value:'customerSignatory',text:'客户签约人'})
-                fieldList.push({type:'string',value:'companySignatory',text:'本司签约人'})
-                fieldList.push({type:'string',value:'content',text:'内容'})
-                fieldList.push({type:'string',value:'remarks',text:'备注'})
-                fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
-                this.superFieldList = fieldList
-            }
         },
     }
 </script>

+ 279 - 0
src/views/markets/modules/agreementUnit/details/contactsList.vue

@@ -0,0 +1,279 @@
+<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="6">
+                        <a-form-item>
+                            <j-input placeholder="客户名称" v-model="queryParam.name" allowClear></j-input>
+                        </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 -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+<!--            <a-button type="primary" icon="download" @click="handleExportXls('协议单位-联系人')">导出</a-button>-->
+<!--            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--                <a-button type="primary" icon="import">导入</a-button>-->
+<!--            </a-upload>-->
+<!--            &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
+<!--            <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-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
+            </a-dropdown>
+        </div>
+
+        <!-- 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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                        <a>删除</a>
+                    </a-popconfirm>
+<!--          <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-menu-item>-->
+<!--            </a-menu>-->
+<!--          </a-dropdown>-->
+                </span>
+            </a-table>
+        </div>
+        <market-agreement-contacts-modal ref="modalContactsForm" @ok="modalFormOk" :agreementModel="agreementModel"></market-agreement-contacts-modal>
+    </a-card>
+</template>
+
+<script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import marketAgreementContactsModal from './modules/marketAgreementContactsModal'
+
+    export default {
+        name: 'contactsList',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            marketAgreementContactsModal
+        },
+        props: {
+            agreementModel:{
+                type: Object,
+                required: false,
+                default: () => {
+                }
+            }
+        },
+        data () {
+            return {
+                description: '协议单位-联系人管理页面',
+                // 表头
+                queryParam: {},
+                columns: [
+                    {
+                        title:'名称',
+                        align:"center",
+                        dataIndex: 'name'
+                    },
+                    {
+                        title:'性别',
+                        align:"center",
+                        dataIndex: 'sex_dictText'
+                    },
+                    {
+                        title:'出生日期',
+                        align:"center",
+                        dataIndex: 'birthday',
+                        customRender:function (text) {
+                            return !text?"":(text.length>10?text.substr(0,10):text)
+                        }
+                    },
+                    {
+                        title:'称呼',
+                        align:"center",
+                        dataIndex: 'calls_dictText'
+                    },
+                    {
+                        title:'部门',
+                        align:"center",
+                        dataIndex: 'department'
+                    },
+                    {
+                        title:'公司电话',
+                        align:"center",
+                        dataIndex: 'companyPhone'
+                    },
+                    {
+                        title:'手机号',
+                        align:"center",
+                        dataIndex: 'phone'
+                    },
+                    {
+                        title:'家庭电话',
+                        align:"center",
+                        dataIndex: 'homePhone'
+                    },
+                    {
+                        title:'职务',
+                        align:"center",
+                        dataIndex: 'post'
+                    },
+                    {
+                        title:'邮编',
+                        align:"center",
+                        dataIndex: 'postalCode'
+                    },
+                    {
+                        title:'Email',
+                        align:"center",
+                        dataIndex: 'email'
+                    },
+                    {
+                        title:'地址',
+                        align:"center",
+                        dataIndex: 'address'
+                    },
+                    {
+                        title:'爱好',
+                        align:"center",
+                        dataIndex: 'hobby'
+                    },
+                    {
+                        title:'备注',
+                        align:"center",
+                        dataIndex: 'remarks'
+                    },
+                    {
+                        title: '更新时间',
+                        align: "center",
+                        dataIndex: 'updateTime',
+                        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: "/business/busMarketAgreementContacts/list?agreementId="+this.agreementModel.id,
+                    delete: "/business/busMarketAgreementContacts/delete",
+                    deleteBatch: "/business/busMarketAgreementContacts/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementContacts/exportXls",
+                    importExcelUrl: "business/busMarketAgreementContacts/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:'hotelId',text:'关联酒店'})
+                fieldList.push({type:'string',value:'agreementId',text:'关联协议'})
+                fieldList.push({type:'string',value:'name',text:'姓名'})
+                fieldList.push({type:'int',value:'sex',text:'性别(0-默认未知,1-男,2-女)'})
+                fieldList.push({type:'date',value:'birthday',text:'生日'})
+                fieldList.push({type:'int',value:'calls',text:'称呼'})
+                fieldList.push({type:'string',value:'department',text:'部门'})
+                fieldList.push({type:'string',value:'companyPhone',text:'公司电话'})
+                fieldList.push({type:'string',value:'phone',text:'手机号'})
+                fieldList.push({type:'string',value:'homePhone',text:'家庭电话'})
+                fieldList.push({type:'string',value:'post',text:'职务'})
+                fieldList.push({type:'string',value:'postalCode',text:'邮编'})
+                fieldList.push({type:'string',value:'email',text:'电子邮件'})
+                fieldList.push({type:'string',value:'address',text:'地址'})
+                fieldList.push({type:'string',value:'hobby',text:'爱好'})
+                fieldList.push({type:'string',value:'remarks',text:'备注'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
+                this.superFieldList = fieldList
+            },
+            handleEdit: function (record) {
+                this.$refs.modalContactsForm.edit(record);
+                this.$refs.modalContactsForm.title = "编辑";
+                this.$refs.modalContactsForm.disableSubmit = false;
+            },
+            handleAdd: function () {
+                this.$refs.modalContactsForm.add();
+                this.$refs.modalContactsForm.title = "新增";
+                this.$refs.modalContactsForm.disableSubmit = false;
+            },
+        }
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less';
+</style>

+ 265 - 0
src/views/markets/modules/agreementUnit/details/customerList.vue

@@ -0,0 +1,265 @@
+<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="6">
+                        <a-form-item>
+                            <j-input placeholder="协议主题" v-model="queryParam.name" allowClear></j-input>
+                        </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 -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+<!--            <a-button type="primary" icon="download" @click="handleExportXls('bus_market_agreement_customer_info')">导出</a-button>-->
+<!--            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--                <a-button type="primary" icon="import">导入</a-button>-->
+<!--            </a-upload>-->
+<!--            &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
+<!--            <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-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
+            </a-dropdown>
+        </div>
+
+        <!-- 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="priceSlot" slot-scope="text,record">
+                    <a-button type="primary" @click="e=>handleHousePrice(e,record)">
+                        查看
+                    </a-button>
+                </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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                        <a>删除</a>
+                    </a-popconfirm>
+<!--                    <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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
+<!--                              <a>删除</a>-->
+<!--                            </a-popconfirm>-->
+<!--                          </a-menu-item>-->
+<!--                        </a-menu>-->
+<!--                      </a-dropdown>-->
+                </span>
+            </a-table>
+        </div>
+
+        <market-agreement-customer-info-modal ref="modalCustomerForm" @ok="modalFormOk" :agreementModel="agreementModel"></market-agreement-customer-info-modal>
+    </a-card>
+</template>
+
+<script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import marketAgreementCustomerInfoModal from './modules/marketAgreementCustomerInfoModal'
+
+    export default {
+        name: 'customerList',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            marketAgreementCustomerInfoModal
+        },
+        props: {
+            agreementModel:{
+                type: Object,
+                required: false,
+                default: () => {
+                }
+            }
+        },
+        data () {
+            return {
+                description: 'bus_market_agreement_customer_info管理页面',
+                // 表头
+                queryParam: {},
+                columns: [
+                    {
+                        title: '协议类型',
+                        align: "center",
+                        dataIndex: 'type_dictText'
+                    },
+                    {
+                        title: '协议主题',
+                        align: "center",
+                        dataIndex: 'name'
+                    },
+                    {
+                        title: '客户签约人',
+                        align: "center",
+                        dataIndex: 'customerSignatory'
+                    },
+                    {
+                        title: '本司签约人',
+                        align: "center",
+                        dataIndex: 'companySignatory'
+                    },
+                    {
+                        title: '协议单号',
+                        align: "center",
+                        dataIndex: 'number'
+                    },
+                    {
+                        title: '签约时间',
+                        align: "center",
+                        dataIndex: 'signTime',
+                        customRender: function (text) {
+                            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
+                        }
+                    },
+                    {
+                        title: '折扣值',
+                        align: "center",
+                        dataIndex: 'discount'
+                    },
+                    {
+                        title: '更新时间',
+                        align: "center",
+                        dataIndex: 'updateTime',
+                        customRender: function (text) {
+                            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
+                        }
+                    },
+                    {
+                        title: '协议房价',
+                        align: "center",
+                        dataIndex: 'id',
+                        scopedSlots: { customRender: "priceSlot" },
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align: "center",
+                        fixed: "right",
+                        width: 147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: "/business/busMarketAgreementCustomer/list?agreementId="+this.agreementModel.id,
+                    delete: "/business/busMarketAgreementCustomer/delete",
+                    deleteBatch: "/business/busMarketAgreementCustomer/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementCustomer/exportXls",
+                    importExcelUrl: "business/busMarketAgreementCustomer/importExcel",
+
+                },
+                dictOptions: {},
+                superFieldList: [],
+            }
+        },
+        created() {
+            this.getSuperFieldList();
+            console.log(this.agreementModel)
+        },
+        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:'agreementId',text:'关联协议'})
+                fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
+                fieldList.push({type:'string',value:'name',text:'协议主题'})
+                fieldList.push({type:'string',value:'type',text:'协议类型'})
+                fieldList.push({type:'string',value:'number',text:'协议单号'})
+                fieldList.push({type:'date',value:'signTime',text:'签约时间'})
+                fieldList.push({type:'date',value:'effective',text:'有效期'})
+                fieldList.push({type:'int',value:'secrecy',text:'佣金信息保密'})
+                fieldList.push({type:'string',value:'customerSignatory',text:'客户签约人'})
+                fieldList.push({type:'string',value:'companySignatory',text:'本司签约人'})
+                fieldList.push({type:'string',value:'content',text:'内容'})
+                fieldList.push({type:'string',value:'remarks',text:'备注'})
+                fieldList.push({type:'int',value:'roomType',text:'计佣类型(0-固定计佣;1-房类计佣)'})
+                fieldList.push({type:'int',value:'commissionUnit',text:'佣金单位(0-元;1-%)'})
+                fieldList.push({type:'number',value:'dailyCommission',text:'每日佣金'})
+                fieldList.push({type:'int',value:'commission',text:'每日计佣(0-否;1-是)'})
+                fieldList.push({type:'int',value:'fixedDiscount',text:'使用固定房价折扣(0-否;1-是)'})
+                fieldList.push({type:'number',value:'discount',text:'房价固定折扣'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
+                this.superFieldList = fieldList
+            },
+            handleEdit: function (record) {
+                this.$refs.modalCustomerForm.edit(record);
+                this.$refs.modalCustomerForm.title = "编辑";
+                this.$refs.modalCustomerForm.disableSubmit = false;
+            },
+            handleAdd: function () {
+                this.$refs.modalCustomerForm.add();
+                this.$refs.modalCustomerForm.title = "新增";
+                this.$refs.modalCustomerForm.disableSubmit = false;
+            },
+            handleHousePrice(e,record){
+                console.log(e,record)
+            }
+        }
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less';
+</style>

+ 190 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementContactsForm.vue

@@ -0,0 +1,190 @@
+<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="name">
+              <a-input v-model="model.name" placeholder="请输入姓名"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sex">
+<!--              <a-input-number v-model="model.sex" placeholder="请输入性别(0-默认未知,1-男,2-女)" style="width: 100%" />-->
+              <j-dict-select-tag v-model="model.sex" placeholder="请选择性别" dictCode="sex"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="出生日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="birthday">
+              <j-date placeholder="请选择出生日期" v-model="model.birthday"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="称呼" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="calls">
+<!--              <a-input-number v-model="model.calls" placeholder="请输入称呼" style="width: 100%" />-->
+              <j-dict-select-tag v-model="model.calls" placeholder="请选择称呼" dictCode="calls"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="department">
+              <a-input v-model="model.department" placeholder="请输入部门"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="公司电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyPhone">
+              <a-input v-model="model.companyPhone" placeholder="请输入公司电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
+              <a-input v-model="model.phone" placeholder="请输入手机号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="家庭电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="homePhone">
+              <a-input v-model="model.homePhone" placeholder="请输入家庭电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="post">
+              <a-input v-model="model.post" placeholder="请输入职务"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="postalCode">
+              <a-input v-model="model.postalCode" placeholder="请输入邮编"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="Email" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
+              <a-input v-model="model.email" placeholder="请输入Email"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="爱好" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hobby">
+              <a-input v-model="model.hobby" placeholder="请输入爱好"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remarks">
+              <a-input v-model="model.remarks" placeholder="请输入备注"  ></a-input>
+            </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'
+  const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+
+  export default {
+    name: 'marketAgreementContactsForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+      agreementModel:{
+        type: Object,
+        required: false,
+        default: () => {
+        }
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           name: [
+              { required: true, message: '请输入姓名!'},
+           ],
+          phone: [
+            { required: true, message: '请输入手机号!'},
+          ],
+          email: [
+            { required: true, message: '请输入Email!'},
+          ],
+        },
+        url: {
+          add: "/business/busMarketAgreementContacts/add",
+          edit: "/business/busMarketAgreementContacts/edit",
+          queryById: "/business/busMarketAgreementContacts/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      console.log(this.agreementModel)
+    },
+    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';
+              this.model.hotelId = hotelInfo.id;
+              this.model.agreementId = this.agreementModel.id;
+            }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/markets/modules/agreementUnit/details/modules/marketAgreementContactsModal.Style#Drawer.vue

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

+ 68 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementContactsModal.vue

@@ -0,0 +1,68 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <market-agreement-contacts-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :agreementModel="agreementModel"></market-agreement-contacts-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import marketAgreementContactsForm from './marketAgreementContactsForm'
+  export default {
+    name: 'marketAgreementContactsModal',
+    components: {
+      marketAgreementContactsForm
+    },
+    props: {
+      agreementModel:{
+        type: Object,
+        required: false,
+        default: () => {
+        }
+      }
+    },
+    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>

+ 225 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementCustomerInfoForm.vue

@@ -0,0 +1,225 @@
+<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="accountNo">
+              <a-input disabled="disabled" v-model="agreementModel.accountNo" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户简称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerShortName">
+              <a-input disabled="disabled" v-model="agreementModel.customerShortName" ></a-input>
+            </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="请输入协议主题"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="协议类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
+<!--              <a-input v-model="model.type" placeholder="请输入协议类型"  ></a-input>-->
+              <a-select
+                      v-model="model.type"
+                      placeholder="请选择协议类型"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in typeList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="协议单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
+              <a-input v-model="model.number" placeholder="请输入协议单号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="签约时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="signTime">
+              <j-date placeholder="请选择签约时间" v-model="model.signTime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="有效期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="effective">
+              <j-date placeholder="请选择有效期" v-model="model.effective"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="佣金信息保密" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="secrecy">
+<!--              <a-input-number v-model="model.secrecy" placeholder="请输入佣金信息保密" style="width: 100%" />-->
+              <a-radio-group name="radioGroup" v-model="model.secrecy">
+                <a-radio :value="1">
+                  是
+                </a-radio>
+                <a-radio :value="0">
+                  否
+                </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="customerSignatory">
+              <a-input v-model="model.customerSignatory" placeholder="请输入客户签约人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="本司签约人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companySignatory">
+              <a-input v-model="model.companySignatory" placeholder="请输入本司签约人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remarks">
+              <a-input v-model="model.remarks" placeholder="请输入备注"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="content">
+              <a-textarea v-model="model.content" 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'
+  const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+
+  export default {
+    name: 'marketAgreementCustomerInfoForm',
+    components: {},
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+      agreementModel:{
+        type: Object,
+        required: false,
+        default: () => {
+        }
+      }
+    },
+    data() {
+      return {
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+          name: [
+            { required: true, message: '请输入协议主题!' },
+          ],
+          type: [
+            { required: true, message: '请选择协议类型!' },
+          ],
+          number: [
+            { required: true, message: '请输入协议单号!' },
+          ],
+          signTime: [
+            { required: true, message: '请选择签约时间!' },
+          ],
+          effective: [
+            { required: true, message: '请选择有效期!' },
+          ],
+          secrecy: [
+            { required: true, message: '请选择佣金信息是否保密!' },
+          ],
+          customerSignatory: [
+            { required: true, message: '请输入客户签约人!' },
+          ],
+          companySignatory: [
+            { required: true, message: '请输入本司签约人!' },
+          ],
+        },
+        url: {
+          add: "/business/busMarketAgreementCustomer/add",
+          edit: "/business/busMarketAgreementCustomer/edit",
+          queryById: "/business/busMarketAgreementCustomer/queryById"
+        },
+        typeList:[]
+      }
+    },
+    computed: {
+      formDisabled() {
+        return this.disabled
+      },
+    },
+    created() {
+      //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      console.log(this.agreementModel)
+      this.getDictConfig();
+    },
+    methods: {
+      getDictConfig(){
+        var that = this;
+        var param = {
+          dictName:'协议类型设置'
+        }
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.typeList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+      },
+      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';
+              this.model.hotelId = hotelInfo.id;
+              this.model.agreementId = this.agreementModel.id;
+            } 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/markets/modules/agreementUnit/details/modules/marketAgreementCustomerInfoModal.Style#Drawer.vue

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

+ 68 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementCustomerInfoModal.vue

@@ -0,0 +1,68 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <market-agreement-customer-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :agreementModel="agreementModel"></market-agreement-customer-info-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import marketAgreementCustomerInfoForm from './marketAgreementCustomerInfoForm'
+  export default {
+    name: 'marketAgreementCustomerInfoModal',
+    components: {
+      marketAgreementCustomerInfoForm
+    },
+    props: {
+      agreementModel:{
+        type: Object,
+        required: false,
+        default: () => {
+        }
+      }
+    },
+    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>