Browse Source

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

DESKTOP-B78GIPM\admin 2 years ago
parent
commit
c9be9ef737

+ 3 - 2
src/views/markets/modules/agreementUnit/agreementUnitDetailForm.vue

@@ -272,7 +272,7 @@
                     <contacts-list :agreementModel="model"></contacts-list>
                 </div>
                 <div v-if="activeMneu == 4">
-                    佣金
+                    <commission :agreementModel="model"></commission>
                 </div>
                 <div v-if="activeMneu == 5">
                     <check-in-list :agreementModel="model"></check-in-list>
@@ -289,10 +289,11 @@
     import CustomerList from './details/customerList'
     import ContactsList from './details/contactsList'
     import CheckInList from './details/checkInList'
+    import Commission from './details/commission'
 
     export default {
         name: 'agreementUnitDetailForm',
-        components: { CheckInList, ContactsList, CustomerList },
+        components: { Commission, CheckInList, ContactsList, CustomerList },
         computed: {
             formDisabled(){
                 return this.disabled

+ 63 - 0
src/views/markets/modules/agreementUnit/details/commission.vue

@@ -0,0 +1,63 @@
+<template>
+    <a-card :bordered="false">
+        <a-tabs v-model="activeKey" type="card" @change="tabsClick">
+            <a-tab-pane key="1" tab="未返"> </a-tab-pane>
+            <a-tab-pane key="2" tab="已返"> </a-tab-pane>
+        </a-tabs>
+
+        <div v-if="activeKey === '1'">
+            <unrefunded-commission-list  :agreementModel="agreementModel"></unrefunded-commission-list>
+        </div>
+        <div v-if="activeKey === '2'">
+            <refunded-commission-list  :agreementModel="agreementModel"></refunded-commission-list>
+        </div>
+    </a-card>
+</template>
+
+<script>
+    import UnrefundedCommissionList from './unRefundedCommissionList'
+    import RefundedCommissionList from './refundedCommissionList'
+    export default {
+        name: 'commission',
+        components: { RefundedCommissionList, UnrefundedCommissionList },
+        props: {
+            agreementModel:{
+                type: Object,
+                required: false,
+                default: () => {
+                }
+            }
+        },
+        data(){
+            return {
+                activeKey: "1",
+                refundedList: [],//已返佣金记录
+                unRefundedList: [],//未返佣金记录
+            }
+        },
+        methods:{
+            tabsClick(e) {
+                if (e == "1") {
+                    this.loadData();
+                }
+            },
+            loadData() {
+                this.checkInBtnDis = false;
+                this.scheduleBtnDis = false;
+                getAction("/rooms/cesRooms/realtime-rooms", {}).then((res) => {
+                    if (res.success) {
+                        res.result.forEach((row) => {
+                            this.$set(row, "collapse", 1);
+                        });
+                        this.roomList = res.result;
+                        this.oldRoomList = JSON.parse(JSON.stringify(res.result));
+                    }
+                });
+            },
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 60 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementRebateModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <market-agreement-rebate-modal-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></market-agreement-rebate-modal-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import marketAgreementRebateModalForm from './marketAgreementRebateModalForm'
+  export default {
+    name: 'marketAgreementRebateModal',
+    components: {
+      marketAgreementRebateModalForm
+    },
+    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>

+ 193 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementRebateModalForm.vue

@@ -0,0 +1,193 @@
+<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" placeholder=""  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerName">
+              <a-input disabled="disabled" v-model="agreementModel.customerName" placeholder=""  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="应收金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shouldMoney">
+              <a-input disabled="disabled" v-model="model.shouldMoney"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="实收金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="realMoney">
+              <a-input disabled="disabled" v-model="model.realMoney"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item :wrapperCol="wrapperCol1" prop="livingOrderNo">
+              <div id="payTypeContainer">
+                <div v-for="(item, index) in payTypes" :key="index">
+                  <div>
+                    <a-select v-model="payTypes[index].payType" placeholder="收款方式" >
+                      <a-select-option
+                              :value="item.id"
+                              v-for="item in payTypeList"
+                              :key="item.id"
+                      >
+                        {{ item.name }}
+                      </a-select-option>
+                    </a-select>
+                  </div>
+                  <div>
+                    <a-input v-model="payTypes[index].payMoney" placeholder="¥ 0.00" ></a-input>
+                    <a-button type="link" @click="addPayType" v-if="index == 0">
+                      添加收款
+                    </a-button>
+                    <a-button type="link" @click="e=>deletePayType(e,index)" v-else>
+                      删除
+                    </a-button>
+                  </div>
+                </div>
+              </div>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'BusMarketAgreementUnreturnedCommissionForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+          shouldMoney:0,
+          realMoney:0,
+         },
+        agreementModel:{},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        wrapperCol1:{
+          xs: { span: 24 },
+          sm: { span: 16, offset: 5 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           tenantId: [
+              { required: true, message: '请输入关联租户!'},
+           ],
+           hotelId: [
+              { required: true, message: '请输入关联酒店!'},
+           ],
+           agreementId: [
+              { required: true, message: '请输入关联协议!'},
+           ],
+           customerId: [
+              { required: true, message: '请输入关联客户协议!'},
+           ],
+        },
+        url: {
+          add: "/business/busMarketAgreementUnreturnedCommission/add",
+          edit: "/business/busMarketAgreementUnreturnedCommission/edit",
+          queryById: "/business/busMarketAgreementUnreturnedCommission/queryById",
+          query_payType: "/business/busRoomPayType/queryList",
+        },
+        payTypeList: [],
+        payTypes: [],
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.agreementModel));
+      getAction(this.url.query_payType,{}).then((res)=>{
+        if(res.success){
+          this.payTypeList = res.result
+        }else{
+
+        }
+      })
+      this.payTypes.push({
+        payType:'',
+        payMoney:''
+      })
+      console.log(this.payTypes)
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        console.log(record)
+        this.agreementModel = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+
+        })
+      },
+      addPayType(){
+        //添加收款
+        this.payTypes.push({
+          payType:'',
+          payMoney:''
+        })
+      },
+      deletePayType(e,index){
+        console.log(e,index)
+        this.payTypes.splice(index, 1)
+      }
+    }
+  }
+</script>

+ 168 - 0
src/views/markets/modules/agreementUnit/details/refundedCommissionList.vue

@@ -0,0 +1,168 @@
+<template>
+    <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>
+        </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,record">
+                    <div v-html="text"></div>
+                </template>
+                <template slot="paySlot" slot-scope="text,record">
+                    <a-button type="primary" @click="e=>handlePayDetail(e,record)">
+                        支付详情
+                    </a-button>
+                </template>
+                <template slot="commissionSlot" slot-scope="text,record">
+                    <a-button type="primary" @click="e=>handleCommissionDetail(e,record)">
+                        返佣详情
+                    </a-button>
+                </template>
+            </a-table>
+        </div>
+    </a-card>
+</template>
+
+<script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+    export default {
+        name: 'refundedCommissionList',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+        },
+        props: {
+            agreementModel:{
+                type: Object,
+                required: false,
+                default: () => {
+                }
+            }
+        },
+        data () {
+            return {
+                description: '已返佣记录管理页面',
+                // 表头
+                columns: [
+                    {
+                        title: "返佣时间",
+                        align: "center",
+                        dataIndex: "createTime",
+                        customRender: function (text) {
+                            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+                        },
+                    },
+                    {
+                        title:'总金额',
+                        align:"center",
+                        dataIndex: 'sumMoney'
+                    },
+                    {
+                        title:'已返佣金',
+                        align:"center",
+                        dataIndex: 'returnedCommission'
+                    },
+                    {
+                        title:'支付详情',
+                        align:"center",
+                        dataIndex: 'id',
+                        scopedSlots: { customRender: "priceSlot" },
+                    },
+                    {
+                        title:'返佣详情',
+                        align:"center",
+                        dataIndex: 'agreementUnreturnedId',
+                        scopedSlots: { customRender: "priceSlot" },
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align:"center",
+                        fixed:"right",
+                        width:147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: "/business/busMarketAgreementReturnedCommission/list",
+                    delete: "/business/busMarketAgreementReturnedCommission/delete",
+                    deleteBatch: "/business/busMarketAgreementReturnedCommission/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementReturnedCommission/exportXls",
+                    importExcelUrl: "business/busMarketAgreementReturnedCommission/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:'agreementUnreturnedId',text:'关联返佣记录'})
+                fieldList.push({type:'number',value:'sumMoney',text:'总金额'})
+                fieldList.push({type:'number',value:'returnedCommission',text:'已返佣金'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
+                this.superFieldList = fieldList
+            },
+            handlePayDetail(e,record){
+                console.log(e,record)
+
+                // this.$refs.modalHousePriceForm.edit(record);
+                // this.$refs.modalHousePriceForm.title = "协议房价列表";
+                // this.$refs.modalHousePriceForm.disableSubmit = false;
+            },
+            handleCommissionDetail(e,record){
+                console.log(e,record)
+
+                // this.$refs.modalHousePriceForm.edit(record);
+                // this.$refs.modalHousePriceForm.title = "协议房价列表";
+                // this.$refs.modalHousePriceForm.disableSubmit = false;
+            }
+        }
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less';
+</style>

+ 162 - 0
src/views/markets/modules/agreementUnit/details/unRefundedCommissionList.vue

@@ -0,0 +1,162 @@
+<template>
+    <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="handleRebate" type="primary" icon="plus">返佣</a-button>
+            <a-button type="primary" icon="download" @click="handleExportXls('未返佣记录')">导出</a-button>
+        </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="commissionSlot" slot-scope="text,record">
+                    <a-tag v-if="text == 1" color="green">是</a-tag>
+                    <a-tag v-else color="red">否</a-tag>
+                </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>
+            </a-table>
+        </div>
+
+        <market-agreement-rebate-modal ref="modalForm" @ok="modalFormOk"></market-agreement-rebate-modal>
+    </a-card>
+</template>
+
+<script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import MarketAgreementRebateModal from './modules/marketAgreementRebateModal'
+
+    export default {
+        name: 'unrefundedCommissionList',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            MarketAgreementRebateModal
+        },
+        props: {
+            agreementModel:{
+                type: Object,
+                required: false,
+                default: () => {
+                }
+            }
+        },
+        data () {
+            return {
+                description: '未返佣记录管理页面',
+                // 表头
+                columns: [
+                    {
+                        title:'房间号',
+                        align:"center",
+                        dataIndex: 'roomNumber'
+                    },
+                    {
+                        title:'记佣时间',
+                        align:"center",
+                        dataIndex: 'commissionDate',
+                        // customRender:function (text) {
+                        //     return !text?"":(text.length>10?text.substr(0,10):text)
+                        // }
+                    },
+                    {
+                        title:'需返佣金',
+                        align:"center",
+                        dataIndex: 'refundedCommission'
+                    },
+                    {
+                        title:'单据号',
+                        align:"center",
+                        dataIndex: 'livingOrderNo'
+                    },
+                    {
+                        title:'是否每日记佣金',
+                        align:"center",
+                        dataIndex: 'commission',
+                        scopedSlots: { customRender: "commissionSlot" },
+                    },
+                    {
+                        title: "创建时间",
+                        align: "center",
+                        dataIndex: "createTime",
+                        // customRender: function (text) {
+                        //     return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+                        // },
+                    }
+                ],
+                url: {
+                    list: "/business/busMarketAgreementUnreturnedCommission/list?agreementId="+this.agreementModel.id,
+                    delete: "/business/busMarketAgreementUnreturnedCommission/delete",
+                    deleteBatch: "/business/busMarketAgreementUnreturnedCommission/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementUnreturnedCommission/exportXls",
+                    importExcelUrl: "business/busMarketAgreementUnreturnedCommission/importExcel",
+
+                },
+                dictOptions:{},
+                superFieldList:[],
+            }
+        },
+        created() {
+            this.getSuperFieldList();
+        },
+        computed: {
+            importExcelUrl: function(){
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            },
+        },
+        methods: {
+            initDictConfig(){
+            },
+            handleRebate: function () {
+                this.$refs.modalForm.edit(this.agreementModel);
+                this.$refs.modalForm.title = "返佣";
+                this.$refs.modalForm.disableSubmit = false;
+            },
+            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:'customerId',text:'关联客户协议'})
+                fieldList.push({type:'string',value:'livingOrderNo',text:'单据号'})
+                fieldList.push({type:'string',value:'roomId',text:'房间号'})
+                fieldList.push({type:'date',value:'businessDay',text:'入住时间'})
+                fieldList.push({type:'number',value:'refundedCommission',text:'需返佣金'})
+                fieldList.push({type:'int',value:'commission',text:'每日记佣(0-否;1-是)'})
+                fieldList.push({type:'date',value:'commissionDate',text:'记佣时间'})
+                fieldList.push({type:'int',value:'rebate',text:'是否已返佣(0-否;1-是)'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
+                this.superFieldList = fieldList
+            }
+        }
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less';
+</style>

+ 3 - 3
src/views/stock/index.vue

@@ -11,7 +11,7 @@
       </a-tab-pane>
       <a-tab-pane key="3">
         <span slot="tab"> 供应商管理 </span>
-        <goods-order v-if="activeKey == '3'"></goods-order>
+        <supplier v-if="activeKey == '3'"></supplier>
       </a-tab-pane>
       <a-tab-pane key="4">
         <span slot="tab"> 出入库管理 </span>
@@ -31,14 +31,14 @@
 <script>
 import depository from "./depository.vue";
 import goods from "./goods.vue";
-// import goodsOrder from "./goodsOrder.vue";
+import supplier from "./supplier.vue";
 // import tablediandangallery from "./tablediandangallery.vue";
 
 export default {
   components: {
     depository,
     goods,
-    // goodsOrder,
+    supplier,
     // tablediandangallery,
   },
   data() {

+ 197 - 0
src/views/stock/modules/SelectGoods.vue

@@ -0,0 +1,197 @@
+<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 label="">
+              <a-input
+                placeholder="商品名称"
+                v-model="queryParam.goodsName"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <span>
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+      >
+        <template slot="avatar" slot-scope="text">
+          <a-avatar v-if="text" :src="text" />
+          <a-avatar v-else icon="user" />
+        </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="handleSelect(record)">选择</a>
+        </span>
+      </a-table>
+    </div>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction } from "@/api/manage";
+import { getAction } from "../../../api/manage";
+export default {
+  name: "BusMemberCardList",
+  mixins: [JeecgListMixin, mixinDevice],
+  props: {
+    supplierId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+    return {
+      datetime: [],
+      hotelId: "",
+      num: 1,
+      description: "PickingGoodsOrder",
+      // 表头
+      columns: [
+        {
+          title: "商品名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "商品类别",
+          align: "center",
+          dataIndex: "goodTypeName",
+        },
+        {
+          title: "商品规格",
+          align: "center",
+          dataIndex: "spec",
+        },
+      ],
+      url: {
+        list: "/kc/kcSupplierInGoods/goodsList?supplierId=" + this.supplierId,
+        delete: "/kc/kcSupplierInGoods/delete",
+        deleteBatch: "/kc/kcSupplierInGoods/deleteBatch",
+        exportXlsUrl: "/kc/kcSupplierInGoods/exportXls",
+        importExcelUrl: "/kc/kcSupplierInGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      orderGoodsDetailList: [],
+      selectOrderInfo: {},
+    };
+  },
+  created() {},
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    handleSelect(row) {
+      this.$emit("ok", row);
+    },
+    submitForm() {
+      const that = this;
+      if (this.selectedRowKeys.length === 0) {
+        this.$message.warning("请先选择商品");
+        return;
+      }
+      that.confirmLoading = true;
+      let httpurl = "/kc/kcSupplierInGoods/add";
+      let method = "post";
+      var model = {
+        supplierId: this.supplierId,
+        goodsIds: this.selectedRowKeys,
+      };
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      if (_info) {
+        model.hotelId = _info.id;
+      }
+      httpAction(httpurl, 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>
+<style scoped>
+@import "~@assets/less/common.less";
+/deep/ .ant-input-search-button {
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled]:hover {
+  opacity: 0.7;
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled] {
+  opacity: 0.7;
+  color: #ffffff;
+}
+</style>

+ 66 - 0
src/views/stock/modules/SelectGoodsModal.vue

@@ -0,0 +1,66 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <picking-goods-order
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :supplierId="supplierId"
+    ></picking-goods-order>
+  </j-modal>
+</template>
+
+<script>
+import PickingGoodsOrder from "./SelectGoods";
+export default {
+  name: "SelectGoodsModal",
+  components: {
+    PickingGoodsOrder,
+  },
+  data() {
+    return {
+      title: "",
+      width: 800,
+      visible: false,
+      disableSubmit: false,
+      supplierId: "",
+    };
+  },
+  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(e) {
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 203 - 0
src/views/stock/modules/SupplierForm.vue

@@ -0,0 +1,203 @@
+<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="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="contactName"
+            >
+              <a-input v-model="model.contactName" placeholder="请输入姓名"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="手机号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="mobile"
+            >
+              <a-input v-model="model.mobile" placeholder="请输入手机号"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="开户名称"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="accountName"
+            >
+              <a-input v-model="model.accountName" placeholder="请输入开户名称"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="开户银行"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="accountBank"
+            >
+              <a-input v-model="model.accountBank" placeholder="请输入开户银行"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="银行账号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="bankCardNo"
+            >
+              <a-input v-model="model.bankCardNo" placeholder="请输入银行账号"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="发票抬头"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="InvoiceTitle"
+            >
+              <a-input v-model="model.invoiceTitle" placeholder="请输入发票抬头"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="状态"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="state"
+            >
+              <a-radio-group v-model="model.state">
+                <a-radio :value="1"> 启用 </a-radio>
+                <a-radio :value="0"> 停用 </a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "PosTypeForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { state: 1, online: 0 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        name: [{ required: true, message: "请输入名称!" }],
+        state: [{ required: true, message: "请输入状态!" }],
+        contactName: [{ required: true, message: "请输入姓名!" }],
+        mobile: [{ required: true, message: "请输入手机号!" }],
+      },
+      url: {
+        add: "/kc/kcSupplier/add",
+        edit: "/kc/kcSupplier/edit",
+        queryById: "/kc/kcSupplier/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 209 - 0
src/views/stock/modules/SupplierInGoods.vue

@@ -0,0 +1,209 @@
+<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 label="">
+              <a-input
+                placeholder="商品名称"
+                v-model="queryParam.goodsName"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <span>
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+            </span>
+          </a-col>
+          <a-col :span="3">
+            <a-button @click="handleAdd" type="danger" style="margin-left: 8px"
+              >新增</a-button
+            ></a-col
+          >
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="avatar" slot-scope="text">
+          <a-avatar v-if="text" :src="text" />
+          <a-avatar v-else icon="user" />
+        </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>
+
+        <template slot="price" slot-scope="text, record, index">
+          <div>
+            <a-input-number
+              v-model="record.price"
+              :min="0"
+              @change="priceChange($event, record)"
+            />
+          </div>
+        </template>
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleDelete(record.id)">删除</a>
+        </span>
+      </a-table>
+    </div>
+    <select-goods-modal ref="modalForm" @ok="modalFormOk"></select-goods-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction } from "@/api/manage";
+import SelectGoodsModal from "./SelectGoodsModal";
+export default {
+  name: "BusMemberCardList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    SelectGoodsModal,
+  },
+  props: {
+    supplierId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+    return {
+      datetime: [],
+      hotelId: "",
+      num: 1,
+      description: "PickingGoodsOrder",
+      // 表头
+      columns: [
+        {
+          title: "商品名称",
+          align: "center",
+          dataIndex: "goodsName",
+        },
+        {
+          title: "商品类别",
+          align: "center",
+          dataIndex: "goodsTypeName",
+        },
+        {
+          title: "供应价",
+          align: "center",
+          dataIndex: "price",
+          scopedSlots: { customRender: "price" },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/kc/kcSupplierInGoods/list?supplierId=" + this.supplierId,
+        delete: "/kc/kcSupplierInGoods/delete",
+        deleteBatch: "/kc/kcSupplierInGoods/deleteBatch",
+        exportXlsUrl: "/kc/kcSupplierInGoods/exportXls",
+        importExcelUrl: "/kc/kcSupplierInGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      orderGoodsDetailList: [],
+      selectOrderInfo: {},
+    };
+  },
+  created() {},
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    priceChange(e, record) {
+      let httpurl = "/kc/kcSupplierInGoods/edit";
+      let method = "put";
+      httpAction(httpurl, record, method)
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+    },
+    handleAdd() {
+      this.$refs.modalForm.add();
+      this.$refs.modalForm.title = "选择供货商品";
+      this.$refs.modalForm.disableSubmit = false;
+      this.$refs.modalForm.supplierId = this.supplierId;
+    },
+    handleSelect(row) {
+      this.$emit("ok", row);
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+/deep/ .ant-input-search-button {
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled]:hover {
+  opacity: 0.7;
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled] {
+  opacity: 0.7;
+  color: #ffffff;
+}
+</style>

+ 66 - 0
src/views/stock/modules/SupplierInGoodsModal.vue

@@ -0,0 +1,66 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <picking-goods-order
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :supplierId="supplierId"
+    ></picking-goods-order>
+  </j-modal>
+</template>
+
+<script>
+import PickingGoodsOrder from "./SupplierInGoods";
+export default {
+  name: "PickingGoodsOrderModal",
+  components: {
+    PickingGoodsOrder,
+  },
+  data() {
+    return {
+      title: "",
+      width: 800,
+      visible: false,
+      disableSubmit: false,
+      supplierId: "",
+    };
+  },
+  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(e) {
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/stock/modules/SupplierModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <pos-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-type-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosTypeForm from './SupplierForm'
+  export default {
+    name: 'PosTypeModal',
+    components: {
+      PosTypeForm
+    },
+    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>

+ 305 - 0
src/views/stock/supplier.vue

@@ -0,0 +1,305 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input placeholder="名称" v-model="queryParam.name"></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>
+    </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="payFlagslot" slot-scope="text, record, index">
+          {{ record.payFlag == 1 ? "是" : "否" }}
+        </template>
+        <template slot="iconslot" slot-scope="text, record, index">
+          <a-icon :type="record.icon" theme="filled" />
+        </template>
+        <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="handleGoods(record)">供货商品</a>
+
+          <a-divider type="vertical" />
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <supplier-modal ref="modalForm" @ok="modalFormOk"></supplier-modal>
+
+    <supplier-in-goods-modal
+      ref="modalSelectGoodsForm"
+      @ok="modalFormOk"
+    ></supplier-in-goods-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+import SupplierModal from "./modules/SupplierModal.vue";
+import SupplierInGoodsModal from "./modules/SupplierInGoodsModal.vue";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    SupplierModal,
+    SupplierInGoodsModal,
+  },
+  data() {
+    return {
+      queryParam: {},
+      // 分页参数
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ["10", "20", "30"],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条";
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      // 表头
+      columns: [
+        {
+          title: "供应商名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "地址",
+          align: "center",
+          dataIndex: "address",
+        },
+        {
+          title: "联系人",
+          align: "center",
+          dataIndex: "contactName",
+        },
+        {
+          title: "手机号",
+          align: "center",
+          dataIndex: "mobile",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "state",
+          customRender(text) {
+            return text === 1 ? "启用" : "停用";
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/kc/kcSupplier/list",
+        delete: "/kc/kcSupplier/delete",
+        deleteBatch: "/kc/kcSupplier/deleteBatch",
+        exportXlsUrl: "/kc/kcSupplier/exportXls",
+        importExcelUrl: "pos/kcSupplier/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+    };
+  },
+  created() {
+    // this.loadData()
+  },
+  methods: {
+    handleGoods(row) {
+      this.$refs.modalSelectGoodsForm.add();
+      this.$refs.modalSelectGoodsForm.title = "供货商品";
+      this.$refs.modalSelectGoodsForm.disableSubmit = false;
+      this.$refs.modalSelectGoodsForm.supplierId = row.id;
+    },
+    getAvatarView: function (avatar) {
+      return getFileAccessHttpUrl(avatar);
+    },
+
+    batchFrozen: function (status) {
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning("请选择一条记录!");
+        return false;
+      } else {
+        let ids = "";
+        let that = this;
+        let isAdmin = false;
+        that.selectionRows.forEach(function (row) {
+          if (row.username == "admin") {
+            isAdmin = true;
+          }
+        });
+        if (isAdmin) {
+          that.$message.warning("管理员账号不允许此操作,请重新选择!");
+          return;
+        }
+        that.selectedRowKeys.forEach(function (val) {
+          ids += val + ",";
+        });
+        that.$confirm({
+          title: "确认操作",
+          content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
+          onOk: function () {
+            frozenBatch({ ids: ids, status: status }).then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.loadData();
+                that.onClearSelected();
+              } else {
+                that.$message.warning(res.message);
+              }
+            });
+          },
+        });
+      }
+    },
+    handleMenuClick(e) {
+      if (e.key == 1) {
+        this.batchDel();
+      } else if (e.key == 2) {
+        this.batchFrozen(2);
+      } else if (e.key == 3) {
+        this.batchFrozen(1);
+      }
+    },
+    handleFrozen: function (id, status, username) {
+      let that = this;
+      //TODO 后台校验管理员角色
+      if ("admin" == username) {
+        that.$message.warning("管理员账号不允许此操作!");
+        return;
+      }
+      frozenBatch({ ids: id, status: status }).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message);
+          that.loadData();
+        } else {
+          that.$message.warning(res.message);
+        }
+      });
+    },
+    handleChangePassword(username) {
+      this.$refs.passwordmodal.show(username);
+    },
+    passwordModalOk() {
+      //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
+    },
+    onSyncFinally({ isToLocal }) {
+      // 同步到本地时刷新下数据
+      if (isToLocal) {
+        this.loadData();
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>