Prechádzať zdrojové kódy

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

DESKTOP-B78GIPM\admin 2 rokov pred
rodič
commit
2473650f21

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

@@ -105,6 +105,7 @@
         </div>
 
         <market-agreement-customer-info-modal ref="modalCustomerForm" @ok="modalFormOk" :agreementModel="agreementModel"></market-agreement-customer-info-modal>
+        <market-agreement-house-price-modal ref="modalHousePriceForm" @ok="modalFormOk" :agreementModel="agreementModel"></market-agreement-house-price-modal>
     </a-card>
 </template>
 
@@ -114,11 +115,13 @@
     import { mixinDevice } from '@/utils/mixin'
     import { JeecgListMixin } from '@/mixins/JeecgListMixin'
     import marketAgreementCustomerInfoModal from './modules/marketAgreementCustomerInfoModal'
+    import MarketAgreementHousePriceModal from './modules/marketAgreementHousePriceModal'
 
     export default {
         name: 'customerList',
         mixins:[JeecgListMixin, mixinDevice],
         components: {
+            MarketAgreementHousePriceModal,
             marketAgreementCustomerInfoModal
         },
         props: {
@@ -256,6 +259,10 @@
             },
             handleHousePrice(e,record){
                 console.log(e,record)
+
+                this.$refs.modalHousePriceForm.edit(record);
+                this.$refs.modalHousePriceForm.title = "协议房价列表";
+                this.$refs.modalHousePriceForm.disableSubmit = false;
             }
         }
     }

+ 544 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementHousePriceForm.vue

@@ -0,0 +1,544 @@
+<template>
+    <div>
+        <div>
+            <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="roomType">
+                                    <j-dict-select-tag type="radio" v-model="model.roomType" placeholder="请选择记佣类型" dictCode="commission_type"
+                                    @change="e=>typeChange(e)" />
+                                </a-form-model-item>
+                            </a-col>
+                            <a-col :span="24" v-if="model.roomType==0">
+                                <a-form-model-item label="佣金单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="commissionUnit">
+<!--                                    <j-dict-select-tag v-model="model.commissionUnit" placeholder="请选择佣金单位" dictCode="commission_unit" style="width: 50%" />-->
+                                    <a-select v-model="model.commissionUnit.toString()" style="width: 100%">
+                                        <a-select-option v-for="(item,index) in commissionUnitList" style="width: 100%"
+                                                         :key="index" :value="item.value">{{ item.text || item.label }}</a-select-option>
+                                    </a-select>
+                                </a-form-model-item>
+                            </a-col>
+                            <a-col :span="24" v-if="model.roomType==0">
+                                <a-form-model-item label="每日佣金" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dailyCommission">
+                                    <a-input-number v-model="model.dailyCommission" placeholder="请输入每日佣金" style="width: 50%" />
+                                </a-form-model-item>
+                            </a-col>
+                            <a-col :span="24">
+                                <a-form-model-item label="每日记佣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="commission">
+                                    <j-dict-select-tag type="radio" v-model="model.commission" placeholder="请选择每日计佣" dictCode="agreement_common"/>
+                                </a-form-model-item>
+                            </a-col>
+                            <a-col :span="24">
+                                <a-form-model-item label="使用固定房价折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fixedDiscount">
+                                    <j-dict-select-tag type="radio" v-model="model.fixedDiscount" placeholder="请选择每日计佣" dictCode="agreement_common"
+                                                       @change="e=>fixedChange(e)" />
+                                </a-form-model-item>
+                            </a-col>
+                            <a-col :span="24" v-if="model.fixedDiscount==1">
+                                <a-form-model-item label="房价固定折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="discount">
+                                    <a-input-number v-model="model.discount" placeholder="请输入房价固定折扣" style="width: 50%"
+                                                    @blur="e=>fixedDiscountChange(e)"/><span> %</span>
+                                </a-form-model-item>
+                            </a-col>
+                        </a-row>
+                    </a-form-model>
+                </j-form-container>
+            </a-spin>
+        </div>
+        <div>
+            <a-card :bordered="false">
+                <!-- 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="htmlSlot" slot-scope="text">
+                            <div v-html="text"></div>
+                        </template>
+
+                        <template slot="agreementPriceSlot" slot-scope="text,record,index">
+                            <a-input-number :disabled="model.fixedDiscount==1" v-model="record.agreementPrice" placeholder="协议房价" style="width: 100%"
+                                            @blur="e=>agreementPriceChange(e, record, index)" />
+                        </template>
+                        <template slot="discountSlot" slot-scope="text,record, index">
+                            <a-input-group compact>
+                                <a-input-number v-model="record.discount" placeholder="房价折扣"
+                                                @blur="e=>discountChange(e, record, index)"
+                                                style="width: 75%" :min="0" :step="1" :precision="2"/>
+                                <a-input disabled value="%" style="width: 25%;padding: 0 2px"/>
+                            </a-input-group>
+                        </template>
+                        <template slot="monthPriceSlot" slot-scope="text,record">
+                            <a-input-number v-model="record.monthPrice" placeholder="月长包房价" style="width: 100%" />
+                        </template>
+                        <template slot="breakfastNumberSlot" slot-scope="text,record">
+                            <a-input-number v-model="record.breakfastNumber" placeholder="早餐份数" style="width: 100%" />
+                        </template>
+                        <template slot="unitSlot" slot-scope="text,record">
+<!--                            <j-dict-select-tag v-model="record.commissionUnit" dictCode="commission_unit" />-->
+                            <a-select v-model="record.commissionUnit.toString()" style="width: 100%">
+                                <a-select-option v-for="(item,index) in commissionUnitList" style="width: 100%"
+                                                 :key="index" :value="item.value">{{ item.text || item.label }}</a-select-option>
+                            </a-select>
+                        </template>
+                        <template slot="dailyCommissionSlot" slot-scope="text,record">
+                            <a-input-number v-model="record.dailyCommission" placeholder="日佣金" style="width: 100%" />
+                        </template>
+                    </a-table>
+                </div>
+            </a-card>
+        </div>
+    </div>
+</template>
+
+<script>
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import { httpAction, getAction } from '@/api/manage'
+    import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
+
+    export default {
+        name: 'marketAgreementHousePriceForm',
+        components: {},
+        mixins: [JeecgListMixin, mixinDevice],
+        props: {
+            //表单禁用
+            disabled: {
+                type: Boolean,
+                default: false,
+                required: false
+            }
+        },
+        data() {
+            return {
+                model: {},
+                labelCol: {
+                    xs: { span: 24 },
+                    sm: { span: 5 },
+                },
+                wrapperCol: {
+                    xs: { span: 24 },
+                    sm: { span: 16 },
+                },
+                confirmLoading: false,
+                validatorRules: {
+                    roomType: [
+                        { required: true, message: '请选择记佣类型!' },
+                    ],
+                    commissionUnit: [
+                        { required: true, message: '请选择佣金单位!' },
+                    ],
+                    dailyCommission: [
+                        { required: true, message: '请输入每日佣金!' },
+                    ],
+                    commission: [
+                        { required: true, message: '请选择是否每日记佣!' },
+                    ],
+                    fixedDiscount: [
+                        { required: true, message: '请选择是否使用固定房价折扣!' },
+                    ],
+                    discount: [
+                        { required: true, message: '请输入房价固定折扣!' },
+                    ],
+                },
+                url: {
+                    add: "/business/busMarketAgreementCustomer/add",
+                    editHousePrice: "/business/busMarketAgreementCustomer/editHousePrice",
+                    queryById: "/business/busMarketAgreementCustomer/queryById",
+                    list: "/business/busMarketAgreementCustomerHousePrice/list",
+                    delete: "/business/busMarketAgreementCustomerHousePrice/delete",
+                    deleteBatch: "/business/busMarketAgreementCustomerHousePrice/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementCustomerHousePrice/exportXls",
+                    importExcelUrl: "business/busMarketAgreementCustomerHousePrice/importExcel",
+                },
+                description: '客户协议-房价管理管理页面',
+                // 表头
+                columns: [],
+                dictOptions: {},
+                superFieldList: [],
+                commissionUnitList: []
+            }
+        },
+        computed: {
+            formDisabled() {
+                return this.disabled
+            },
+        },
+        created() {
+            //备份model原始值
+            this.modelDefault = JSON.parse(JSON.stringify(this.model));
+            this.getDictConfig();
+        },
+        methods: {
+            getDictConfig() {
+                //优先从缓存中读取字典配置
+                if (getDictItemsFromCache('commission_unit')) {
+                    this.commissionUnitList = getDictItemsFromCache('commission_unit');
+                    return
+                }
+                //根据字典Code, 初始化字典数组
+                ajaxGetDictItems('commission_unit', null).then((res) => {
+                    if (res.success) {
+                        this.commissionUnitList = res.result
+                    }
+                })
+            },
+            add() {
+                this.edit(this.modelDefault);
+            },
+            edit(record) {
+                console.log(record)
+                this.model = Object.assign({}, record);
+                this.changeColumns(this.model.roomType, this.model.fixedDiscount)
+                this.visible = true;
+            },
+            submitForm() {
+                const that = this;
+                console.log(this.dataSource)
+                // 触发表单验证
+                this.$refs.form.validate(valid => {
+                    if (valid) {
+                        that.confirmLoading = true;
+                        let httpurl = this.url.editHousePrice;
+                        let method = 'put';
+                        var dataSource = this.dataSource;
+                        var list = [];
+                        if (dataSource != null && dataSource.length > 0) {
+                            for (let i = 0; i < dataSource.length; i++) {
+                                //协议选择固定记佣,则所有房型的佣金单位和日佣金取协议设置数据
+                                var commissionUnit = dataSource[i].commissionUnit
+                                var dailyCommission = dataSource[i].dailyCommission
+                                if (this.model.roomType == 0){//固定记佣
+                                    commissionUnit = this.model.commissionUnit
+                                    dailyCommission = this.model.dailyCommission
+                                }
+                                var discount = dataSource[i].discount
+                                var agreementPrice = dataSource[i].agreementPrice
+                                if (this.model.fixedDiscount == 1){//使用固定房价折扣
+                                    discount = this.model.discount
+                                    agreementPrice =  parseFloat(dataSource[i].layoutPrice*(this.model.discount/100)).toFixed(2);
+                                }
+                                var item = {
+                                    id: dataSource[i].id,
+                                    agreementPrice: agreementPrice,
+                                    discount: discount,
+                                    monthPrice: dataSource[i].monthPrice,
+                                    breakfastNumber: dataSource[i].breakfastNumber,
+                                    commissionUnit: commissionUnit,
+                                    dailyCommission: dailyCommission
+                                }
+                                list.push(item)
+                            }
+                        }
+                        // var list = [
+                        //     {
+                        //         id:1,
+                        //         agreementPrice:99,
+                        //         discount:10,
+                        //         monthPrice:500,
+                        //         breakfastNumber:2,
+                        //         commissionUnit:1,
+                        //         dailyCommission:2
+                        //     },{
+                        //         id:2,
+                        //         agreementPrice:55,
+                        //         discount:10,
+                        //         monthPrice:500,
+                        //         breakfastNumber:3,
+                        //         commissionUnit:0,
+                        //         dailyCommission:3
+                        //     }
+                        // ];
+                        var param = {
+                            agreementCustomer: {
+                                id: this.model.id,
+                                roomType: this.model.roomType,
+                                commissionUnit: this.model.commissionUnit,
+                                dailyCommission: this.model.dailyCommission,
+                                commission: this.model.commission,
+                                fixedDiscount: this.model.fixedDiscount,
+                                discount: this.model.discount,
+                            },
+                            customerHousePriceList: list
+
+                        }
+                        console.log(param)
+                        httpAction(httpurl, param, method).then((res) => {
+                            if (res.success) {
+                                that.$message.success(res.message);
+                                that.$emit('ok');
+                            } else {
+                                // that.$message.warning(res.message);
+                            }
+                        }).finally(() => {
+                            that.confirmLoading = false;
+                        })
+                    }
+
+                })
+            },
+            agreementPriceChange(e, record, index) {
+                //协议房价更改,根据额定和更改后的房价计算房价折扣
+                var discount =
+                    parseFloat(
+                        ((record.agreementPrice / parseFloat(record.layoutPrice)) * 100).toFixed(2)
+                    );
+                record.discount = discount
+            },
+            discountChange(e, record, index) {
+                var agreementPrice =
+                    parseFloat(
+                        (parseFloat(record.layoutPrice) * (record.discount / 100)).toFixed(2)
+                    );
+                record.agreementPrice = agreementPrice
+            },
+            changeColumns(type, fixed) {
+                var columns = [];
+                //房类
+                if (type == 1) {
+                    //固定房价折扣
+                    if (fixed == 1) {
+                        columns = [
+                            {
+                                title: '房间类型',
+                                align: "center",
+                                dataIndex: 'layoutName',
+                                width: 1
+                            },
+                            {
+                                title: '额定房价',
+                                align: "center",
+                                dataIndex: 'layoutPrice',
+                                width: 1
+                            },
+                            {
+                                title: '协议房价',
+                                align: "center",
+                                dataIndex: 'agreementPrice',
+                                scopedSlots: { customRender: "agreementPriceSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '月长包房价',
+                                align: "center",
+                                dataIndex: 'monthPrice',
+                                scopedSlots: { customRender: "monthPriceSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '早餐份数',
+                                align: "center",
+                                dataIndex: 'breakfastNumber',
+                                scopedSlots: { customRender: "breakfastNumberSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '佣金单位',
+                                align: "center",
+                                dataIndex: 'commissionUnit',
+                                scopedSlots: { customRender: "unitSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '日佣金',
+                                align: "center",
+                                dataIndex: 'dailyCommission',
+                                scopedSlots: { customRender: "dailyCommissionSlot" },
+                                width: 1
+                            }
+                        ]
+                    } else {
+                        columns = [
+                            {
+                                title: '房间类型',
+                                align: "center",
+                                dataIndex: 'layoutName',
+                                width: 1
+                            },
+                            {
+                                title: '额定房价',
+                                align: "center",
+                                dataIndex: 'layoutPrice',
+                                width: 1
+                            },
+                            {
+                                title: '协议房价',
+                                align: "center",
+                                dataIndex: 'agreementPrice',
+                                scopedSlots: { customRender: "agreementPriceSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '房价折扣',
+                                align: "center",
+                                dataIndex: 'discount',
+                                scopedSlots: { customRender: "discountSlot" },
+                                width: 2
+                            },
+                            {
+                                title: '月长包房价',
+                                align: "center",
+                                dataIndex: 'monthPrice',
+                                scopedSlots: { customRender: "monthPriceSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '早餐份数',
+                                align: "center",
+                                dataIndex: 'breakfastNumber',
+                                scopedSlots: { customRender: "breakfastNumberSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '佣金单位',
+                                align: "center",
+                                dataIndex: 'commissionUnit',
+                                scopedSlots: { customRender: "unitSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '日佣金',
+                                align: "center",
+                                dataIndex: 'dailyCommission',
+                                scopedSlots: { customRender: "dailyCommissionSlot" },
+                                width: 1
+                            }
+                        ]
+                    }
+                } else {
+                    //固定房价折扣
+                    if (fixed == 1) {
+                        columns = [
+                            {
+                                title: '房间类型',
+                                align: "center",
+                                dataIndex: 'layoutName',
+                                width: 1
+                            },
+                            {
+                                title: '额定房价',
+                                align: "center",
+                                dataIndex: 'layoutPrice',
+                                width: 1
+                            },
+                            {
+                                title: '协议房价',
+                                align: "center",
+                                dataIndex: 'agreementPrice',
+                                scopedSlots: { customRender: "agreementPriceSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '月长包房价',
+                                align: "center",
+                                dataIndex: 'monthPrice',
+                                scopedSlots: { customRender: "monthPriceSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '早餐份数',
+                                align: "center",
+                                dataIndex: 'breakfastNumber',
+                                scopedSlots: { customRender: "breakfastNumberSlot" },
+                                width: 1
+                            }
+                        ]
+                    } else {
+                        columns = [
+                            {
+                                title: '房间类型',
+                                align: "center",
+                                dataIndex: 'layoutName',
+                                width: 1
+                            },
+                            {
+                                title: '额定房价',
+                                align: "center",
+                                dataIndex: 'layoutPrice',
+                                width: 1
+                            },
+                            {
+                                title: '协议房价',
+                                align: "center",
+                                dataIndex: 'agreementPrice',
+                                scopedSlots: { customRender: "agreementPriceSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '房价折扣',
+                                align: "center",
+                                dataIndex: 'discount',
+                                scopedSlots: { customRender: "discountSlot" },
+                                width: 2
+                            },
+                            {
+                                title: '月长包房价',
+                                align: "center",
+                                dataIndex: 'monthPrice',
+                                scopedSlots: { customRender: "monthPriceSlot" },
+                                width: 1
+                            },
+                            {
+                                title: '早餐份数',
+                                align: "center",
+                                dataIndex: 'breakfastNumber',
+                                scopedSlots: { customRender: "breakfastNumberSlot" },
+                                width: 1
+                            }
+                        ]
+                    }
+                }
+                this.columns = columns;
+            },
+            typeChange(e) {
+                console.log(e)
+                this.changeColumns(this.model.roomType, this.model.fixedDiscount)
+            },
+            fixedChange(e) {
+                this.changeColumns(this.model.roomType, this.model.fixedDiscount)
+                if (this.model.fixedDiscount == 0){
+                    var dataSource = this.dataSource;
+                    if (dataSource != null && dataSource.length > 0) {
+                        for (let i = 0; i < dataSource.length; i++) {
+                            if (!dataSource[i].agreementPrice){
+                                dataSource[i].agreementPrice = 0;
+                                dataSource[i].discount = 0
+                            }
+                        }
+                        this.dataSource= dataSource
+                    }
+                }
+            },
+            fixedDiscountChange(e){
+                var dataSource = this.dataSource;
+                if (dataSource != null && dataSource.length > 0) {
+                    for (let i = 0; i < dataSource.length; i++) {
+                        var price = 0
+                        if (this.model.fixedDiscount == 1) {
+                            price = parseFloat(dataSource[i].layoutPrice*(this.model.discount/100)).toFixed(2);
+                        }
+                        console.log(price)
+                        dataSource[i].agreementPrice = price
+                    }
+                    this.dataSource= dataSource
+                }
+            }
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 68 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementHousePriceModal.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-house-price-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :agreementModel="agreementModel"></market-agreement-house-price-form>
+    </j-modal>
+</template>
+
+<script>
+
+    import MarketAgreementHousePriceForm from './marketAgreementHousePriceForm'
+    export default {
+        name: 'marketAgreementHousePriceModal',
+        components: {
+            MarketAgreementHousePriceForm,
+        },
+        props: {
+            agreementModel:{
+                type: Object,
+                required: false,
+                default: () => {
+                }
+            }
+        },
+        data () {
+            return {
+                title:'',
+                width:1000,
+                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>

+ 460 - 0
src/views/pos/diandan.vue

@@ -0,0 +1,460 @@
+<template>
+  <a-card :bordered="false" class="card-pd">
+    <a-tabs v-model="tabPosTypeId" @change="tabPosTypeChange">
+      <a-tab-pane
+        :key="item.id"
+        :tab="item.name"
+        v-for="item in posTypeList"
+      ></a-tab-pane>
+    </a-tabs>
+    <div style="display: flex; height: calc(100vh - 350px)">
+      <a-card style="width: 25%">
+        <p v-if="selectRoomOrder && selectRoomOrder.id">
+          房间:{{ selectRoomOrder.tableNo }},姓名:{{ selectRoomOrder.id }}
+        </p>
+        <a-table
+          bordered
+          :columns="columns"
+          :data-source="selectGoodsList"
+          :pagination="false"
+          rowKey="id"
+          :scroll="{ y: 560 }"
+        >
+          <template slot="num" slot-scope="text, record, index">
+            <div>
+              <a-input-number
+                v-model="record.num"
+                :max="record.inventory"
+                @change="(event) => numChange(event, index)"
+              />
+            </div>
+          </template>
+          <template slot="required" slot-scope="text, record, index">
+            <div>
+              <a-switch v-model="record.required" />
+            </div>
+          </template>
+
+          <span slot="action" slot-scope="text, record, index">
+            <a @click="handleDelete(index)">删除</a>
+          </span>
+        </a-table>
+        <p>数量:{{ sum }}</p>
+        <div style="display: flex; gap: 5px; flex-flow: wrap">
+          <a-button @click="handleClear" :disabled="btnDisabled">清空</a-button>
+          <!-- <a-button @click="handleAdd" :disabled="btnDisabled">备注</a-button> -->
+          <!-- <a-button :disabled="btnDisabled">退货</a-button> -->
+          <a-button v-if="!btnDisabled" @click="handleAdd">挂单</a-button>
+          <a-button v-else @click="handlePickingGoodsOrder">取单</a-button>
+          <a-button
+            v-if="selectRoomOrder && selectRoomOrder.id && !btnDisabled"
+            @click="handleToRoomFeePayment"
+            >确定挂房帐</a-button
+          >
+          <a-button v-else @click="handleSelectCheckInRoomOrder"
+            >挂房帐</a-button
+          >
+          <a-button :disabled="btnDisabled" type="danger" @click="handlePayment"
+            >结账¥{{ amount.toFixed(2) }}</a-button
+          >
+        </div>
+      </a-card>
+      <a-card style="width: 75%">
+        <a-tabs v-model="tabgoodsTypeId" @change="tabGoodsTypeChange">
+          <a-tab-pane key="1" tab="全部"></a-tab-pane>
+          <a-tab-pane
+            :key="item.id"
+            :tab="item.name"
+            v-for="item in goodsTypeList"
+          ></a-tab-pane>
+        </a-tabs>
+        <a-row :gutter="[5, 5]">
+          <a-col
+            v-for="item in dataSource"
+            :key="item.id"
+            :span="3"
+            @click.stop="itemClick(item)"
+          >
+            <div class="room-item check">
+              <div class="select-cell"></div>
+              <template v-if="item.id != '0'">
+                <div>{{ item.name }}</div>
+                <div style="margin-top: 10px; color: red">
+                  ¥{{ item.sellingPrice.toFixed(2) }}
+                </div>
+                <div style="margin-top: 10px">库{{ item.inventory }}</div>
+                <div
+                  v-if="item.isSellClear"
+                  style="display: flex; justify-content: right"
+                >
+                  <a-tag color="#f50"> 沽清 </a-tag>
+                </div></template
+              >
+              <template v-else>
+                <div style="font-weight: 800; text-align: center">+临时菜</div>
+              </template>
+            </div>
+          </a-col>
+        </a-row>
+      </a-card>
+    </div>
+    <payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
+    <goods-modal ref="modalGoodsForm" @ok="modalFormOk2"></goods-modal>
+    <picking-goods-order-modal
+      ref="modalPickingGoodsOrderForm"
+      @ok="modalPickingGoodsOrderFormOk"
+    ></picking-goods-order-modal>
+    <select-check-in-room-order-modal
+      ref="modalSelectCheckInRoomOrderModal"
+      @ok="modalSelectCheckInRoomOrderFormOk"
+    ></select-check-in-room-order-modal>
+  </a-card>
+</template>
+  
+  <script>
+// import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+// import PosRegionModal from "./modules/PosRegionModal";
+import { filterObj } from "@/utils/util";
+import { getAction, postAction, deleteAction } from "@/api/manage";
+import PaymentModal from "./modules/PaymentModal.vue";
+import goodsModal from "./modules/goodStock/goodsModal.vue";
+import PickingGoodsOrderModal from "./modules/PickingGoodsOrderModal.vue";
+import SelectCheckInRoomOrderModal from "./modules/SelectCheckInRoomOrderModal.vue";
+import { computed } from "vue";
+import { tree } from "@/api/good";
+const columns = [
+  {
+    title: "商品名称",
+    dataIndex: "name",
+  },
+  {
+    title: "数量",
+    dataIndex: "num",
+    scopedSlots: { customRender: "num" },
+  },
+  {
+    title: "售价",
+    dataIndex: "sellingPrice",
+  },
+];
+export default {
+  name: "memberList",
+  components: {
+    PaymentModal,
+    goodsModal,
+    PickingGoodsOrderModal,
+    SelectCheckInRoomOrderModal,
+  },
+  data() {
+    return {
+      columns,
+      sellClear: 0,
+      queryParam: {},
+      // 分页参数
+      ipagination: {
+        current: 1,
+        pageSize: 99999,
+        pageSizeOptions: ["10", "20", "30"],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条";
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      url: {
+        list: "/pos/posSellClearGoods/list",
+        delete: "/pos/posSellClearGoods/delete",
+        deleteBatch: "/pos/posSellClearGoods/deleteBatch",
+        exportXlsUrl: "/pos/posSellClearGoods/exportXls",
+        importExcelUrl: "pos/posSellClearGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+      treeData: [],
+      selectGoods: {},
+      posTypeList: [],
+      tabPosTypeId: "",
+      selectGoodsList: [],
+      goodsTypeList: [],
+      tabgoodsTypeId: "1",
+      dataSource: [],
+      oldSelectGoodsList: [],
+      selectOrderInfo: {},
+      selectRoomOrder: {},
+    };
+  },
+  provide() {
+    return {
+      treeData: computed(() => this.treeData),
+    };
+  },
+  computed: {
+    sum() {
+      return this.selectGoodsList.reduce(function (total, item) {
+        return total + item.num;
+      }, 0);
+    },
+    amount() {
+      return this.selectGoodsList.reduce(function (total, item) {
+        return total + item.sellingPrice * item.num;
+      }, 0);
+    },
+    btnDisabled() {
+      var res = this.selectGoodsList && this.selectGoodsList.length > 0;
+      return !res;
+    },
+  },
+  created() {
+    this.dataSource = [{ id: "0" }];
+    getAction("/pos/posType/list", { pageNo: 1, pageSize: 99 }).then((res) => {
+      if (res.success) {
+        this.posTypeList = res.result.records;
+        if (this.posTypeList && this.posTypeList.length > 0) {
+          this.tabPosTypeId = this.posTypeList[0].id;
+          this.loadGoodsType();
+        }
+      }
+    });
+    this.loadTree();
+  },
+  methods: {
+    loadTree() {
+      var that = this;
+      tree().then((res) => {
+        if (res.success) {
+          this.treeData = res.result;
+        }
+      });
+    },
+    modalFormOk() {},
+    modalFormOk2(e) {
+      console.log(e);
+      var good = JSON.parse(JSON.stringify(e));
+      this.$set(good, "num", 1);
+      this.selectGoodsList.push(good);
+    },
+    modalSelectCheckInRoomOrderFormOk(e) {
+      console.log(e);
+      this.selectRoomOrder = e;
+    },
+    modalPickingGoodsOrderFormOk(e) {
+      console.log(e);
+      if (e && e.orderDetailList && e.orderDetailList.length > 0) {
+        this.selectOrderInfo = e.orderInfo;
+        e.orderDetailList.forEach((t) => {
+          t.sellingPrice = t.payMoney;
+          t.name = t.goodsName;
+          t.id = t.goodsId;
+        });
+        this.selectGoodsList = e.orderDetailList;
+      }
+    },
+    numChange(e, index) {
+      console.log(e);
+      if (e <= 0) {
+        this.selectGoodsList.splice(index, 1);
+      }
+    },
+    handleClear() {
+      this.selectGoodsList = [];
+      // this.selectOrderInfo = {};
+    },
+    tabPosTypeChange(e) {
+      this.loadGoodsType();
+    },
+    tabGoodsTypeChange(e) {
+      this.loadGoods();
+    },
+    loadGoodsType() {
+      getAction("/rooms/cesStockType/getTopTypesByPosType", {
+        posType: this.tabPosTypeId,
+      }).then((res2) => {
+        if (res2.success) {
+          this.goodsTypeList = res2.result;
+          if (this.goodsTypeList && this.goodsTypeList.length > 0) {
+            this.loadGoods();
+          }
+        }
+      });
+    },
+    loadGoods() {
+      var ids = [];
+      if (this.tabgoodsTypeId === "1") {
+        this.goodsTypeList.forEach((t) => {
+          ids.push(t.id);
+        });
+      } else {
+        ids.push(this.tabgoodsTypeId);
+      }
+      this.dataSource = [{ id: "0" }];
+      getAction("/pos/posSellClearGoods/list", {
+        pageNo: 1,
+        pageSize: 99999,
+        goodTypes: ids,
+      }).then((res) => {
+        if (res.success) {
+          this.dataSource = [...this.dataSource, ...res.result.records];
+        }
+      });
+    },
+    handleDelete() {
+      deleteAction("/pos/posSellClearGoods/delete", {
+        goodsId: this.selectGoods.id,
+      })
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+            this.sellClear = 0;
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    handleSelectCheckInRoomOrder() {
+      this.$refs.modalSelectCheckInRoomOrderModal.add();
+      this.$refs.modalSelectCheckInRoomOrderModal.title = "选择转帐人";
+      this.$refs.modalSelectCheckInRoomOrderModal.disableSubmit = false;
+    },
+    handlePickingGoodsOrder() {
+      this.$refs.modalPickingGoodsOrderForm.add();
+      this.$refs.modalPickingGoodsOrderForm.title = "取单";
+      this.$refs.modalPickingGoodsOrderForm.disableSubmit = false;
+    },
+    handleAddTempGoods() {
+      this.$refs.modalGoodsForm.add();
+      this.$refs.modalGoodsForm.title = "新增菜品";
+      this.$refs.modalGoodsForm.disableSubmit = false;
+    },
+    handleToRoomFeePayment() {
+      this.handleAdd();
+    },
+    handlePayment() {
+      this.handleAdd((e) => {
+        var amount = this.oldSelectGoodsList.reduce(function (total, item) {
+          return total + item.sellingPrice * item.num;
+        }, 0);
+        this.$refs.modalPaymentForm.edit({
+          billAmount: amount,
+          deposit: 0,
+          roomFee: amount,
+          subjectType: 5,
+          feeType: 2,
+          preferentialType: 1,
+          couponFirstAmount: 0,
+          discount: 9,
+          orderCode: e,
+        });
+        this.$refs.modalPaymentForm.title = "POS结账";
+        this.$refs.modalPaymentForm.disableSubmit = false;
+      });
+    },
+    handleAdd(callback) {
+      if (!this.selectGoodsList || this.selectGoodsList.length <= 0) {
+        this.$message.warning("请先选择商品");
+        return;
+      }
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      var model = { goodsId: this.selectGoods.id };
+      if (_info) {
+        model.hotelId = _info.id;
+      }
+      model.id = this.selectOrderInfo.id;
+      model.toRoomFeeOrderId = this.selectRoomOrder.id;
+      model.posType = this.tabPosTypeId;
+      var posOrderGoodsDetailList = [];
+      this.selectGoodsList.forEach((t) => {
+        posOrderGoodsDetailList.push({
+          goodsId: t.id,
+          num: t.num,
+          money: t.sellingPrice,
+        });
+      });
+      model.posOrderGoodsDetailList = posOrderGoodsDetailList;
+      postAction("/pos/posOrderGoods/add", model)
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.oldSelectGoodsList = JSON.parse(
+              JSON.stringify(this.selectGoodsList)
+            );
+            this.selectGoodsList = [];
+            this.selectOrderInfo = {};
+            this.selectRoomOrder = {};
+            this.loadGoods();
+            if (callback) {
+              callback(res.result.code);
+            }
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    itemClick(row) {
+      console.log(row);
+      if (row.id == "0") {
+        this.handleAddTempGoods();
+        return;
+      }
+      if (row.isSellClear) {
+        this.$message.warning("选择的商品已沽清");
+        return;
+      }
+      var good = JSON.parse(JSON.stringify(row));
+      this.$set(good, "num", 1);
+      var find = this.selectGoodsList.find((t) => t.id === row.id);
+      if (find) {
+        if (find.inventory > find.num) {
+          find.num++;
+        }
+      } else {
+        this.selectGoodsList.push(good);
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+.room-item {
+  height: 110px;
+  /* line-height: 200px; */
+  font-size: 13px;
+  padding: 0px 5px;
+  border-radius: 5px;
+  cursor: pointer;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+.check {
+  border: #000 solid 3px;
+}
+.ant-table-wrapper {
+  height: calc(100vh - 500px);
+}
+/deep/ .card-pd .ant-card-body {
+  padding: 0 !important;
+}
+.select-cell {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+  z-index: 10;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+</style>

+ 522 - 0
src/views/pos/goodsOrder.vue

@@ -0,0 +1,522 @@
+<template>
+  <a-card :bordered="false">
+    <a-tabs v-model="tabPosTypeId" @change="tabPosTypeChange">
+      <a-tab-pane
+        :key="item.id"
+        :tab="item.name"
+        v-for="item in posTypeList"
+      ></a-tab-pane>
+    </a-tabs>
+    <div style="display: flex; min-height: 500px">
+      <a-card style="width: 50%">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="searchQuery">
+            <a-row :gutter="24">
+              <a-col :span="8">
+                <a-form-item label="">
+                  <j-input
+                    placeholder="取餐号"
+                    v-model="queryParam.tableNo"
+                  ></j-input>
+                </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                <a-form-item label="">
+                  <a-range-picker
+                    format="YYYY-MM-DD"
+                    :placeholder="['开始日期', '结束日期']"
+                    @change="onChange"
+                    v-model="datetime"
+                  />
+                </a-form-item>
+              </a-col>
+              <a-col :span="4">
+                <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"
+            :customRow="rowClick"
+            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>
+
+            <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>
+      </a-card>
+      <a-card style="width: 50%">
+        <p>订单详情</p>
+        <a-table
+          ref="table"
+          size="middle"
+          :scroll="{ y: 300 }"
+          bordered
+          rowKey="id"
+          :columns="columns2"
+          :dataSource="orderGoodsDetailList"
+          :loading="loading"
+        >
+          <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="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>
+        <a-row :gutter="[16, 16]" v-if="selectOrderInfo && selectOrderInfo.id">
+          <a-col :span="8">
+            <div>桌台/取餐号:{{ selectOrderInfo.tableNo }}</div>
+          </a-col>
+          <a-col :span="8">
+            <div>数量合计:{{ sum }}</div>
+          </a-col>
+          <a-col :span="8">
+            <div>消费金额:{{ selectOrderInfo.consumeMoney.toFixed(2) }}</div>
+          </a-col>
+          <a-col :span="8">
+            <div>优惠金额:{{ selectOrderInfo.couponMoney.toFixed(2) }}</div>
+          </a-col>
+          <a-col :span="8">
+            <div>结账优惠:{{ selectOrderInfo.couponMoney.toFixed(2) }}</div>
+          </a-col>
+          <a-col :span="8">
+            <div>
+              订单状态:{{ selectOrderInfo.stats === 0 ? "未结账" : "已结账" }}
+            </div>
+          </a-col>
+          <a-col :span="8">
+            <div>应收金额:{{ selectOrderInfo.money.toFixed(2) }}</div>
+          </a-col>
+          <a-col :span="8">
+            <div>支付信息:{{ selectOrderInfo.payInfo }}</div>
+          </a-col>
+          <a-col :span="8">
+            <div>下单时间:{{ selectOrderInfo.createTime }}</div>
+          </a-col>
+          <a-col :span="8">
+            <div>结账时间:{{ selectOrderInfo.settleTime }}</div>
+          </a-col>
+        </a-row>
+        <div>
+          <template v-if="selectOrderInfo && selectOrderInfo.status === 0">
+            <a-button type="danger" @click="handleDelete">删除</a-button>
+            <a-button
+              type="danger"
+              @click="handlePayment"
+              style="margin-left: 15px"
+              >结账</a-button
+            ></template
+          >
+          <template v-if="selectOrderInfo && selectOrderInfo.status === 1">
+            <a-button type="danger" @click="handleCancelSettle"
+              >撤销</a-button
+            ></template
+          >
+        </div>
+      </a-card>
+    </div>
+    <payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction, getAction, deleteAction } from "@/api/manage";
+import PaymentModal from "./modules/PaymentModal.vue";
+export default {
+  name: "BusMemberCardList",
+  mixins: [JeecgListMixin, mixinDevice],
+  props: {
+    couponsId: {
+      type: String,
+      default: "",
+    },
+    couponsType: {
+      type: Number,
+      default: 1,
+    },
+  },
+  components: { PaymentModal },
+  data() {
+    const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+    return {
+      datetime: [],
+      hotelId: "",
+      num: 1,
+      description: "PickingGoodsOrder",
+      // 表头
+      columns: [
+        {
+          title: "单据号",
+          align: "center",
+          dataIndex: "code",
+        },
+        {
+          title: "pos类型",
+          align: "center",
+          dataIndex: "posTypeName",
+        },
+        {
+          title: "桌号/取餐号",
+          align: "center",
+          dataIndex: "tableNo",
+        },
+        {
+          title: "金额",
+          align: "center",
+          dataIndex: "consumeMoney",
+        },
+        {
+          title: "结账状态",
+          align: "center",
+          dataIndex: "status",
+          customRender(text) {
+            return text == 0 ? "未结账" : "已结账";
+          },
+        },
+      ],
+      columns2: [
+        {
+          title: "商品名称",
+          align: "center",
+          dataIndex: "goodsName",
+        },
+        {
+          title: "数量",
+          align: "center",
+          dataIndex: "num",
+        },
+        {
+          title: "原价",
+          align: "center",
+          dataIndex: "money",
+          customRender(text, record) {
+            return text.toFixed(2);
+          },
+        },
+        {
+          title: "优惠价",
+          align: "center",
+          dataIndex: "couponMoney",
+          customRender(text, record) {
+            return text.toFixed(2);
+          },
+        },
+        {
+          title: "优惠金额",
+          align: "center",
+          dataIndex: "id",
+          customRender(text, record) {
+            return record.money - record.couponMoney;
+          },
+        },
+        {
+          title: "小计",
+          align: "center",
+          dataIndex: "payMoney",
+          customRender(text, record) {
+            return (text * record.num).toFixed(2);
+          },
+        },
+      ],
+      url: {
+        list: "/pos/posOrderGoods/list",
+        delete: "/business/busMemberCard/delete",
+        deleteBatch: "/business/busMemberCard/deleteBatch",
+        exportXlsUrl: "/business/busMemberCard/exportXls",
+        importExcelUrl: "business/busMemberCard/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      orderGoodsDetailList: [],
+      selectOrderInfo: {},
+      posTypeList: [],
+      tabPosTypeId: "",
+    };
+  },
+  created() {
+    getAction("/pos/posType/list", { pageNo: 1, pageSize: 99 }).then((res) => {
+      if (res.success) {
+        this.posTypeList = res.result.records;
+        if (this.posTypeList && this.posTypeList.length > 0) {
+          this.tabPosTypeId = this.posTypeList[0].id;
+        }
+      }
+    });
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+    sum() {
+      return this.orderGoodsDetailList.reduce(function (total, item) {
+        return total + item.num;
+      }, 0);
+    },
+  },
+  methods: {
+    modalFormOk() {
+      this.selectOrderInfo = {};
+      this.orderGoodsDetailList = [];
+      this.loadData();
+    },
+    handleDelete() {
+      var that = this;
+      deleteAction(
+        "/pos/posOrderGoods/deleteOrder?code=" + this.selectOrderInfo.code
+      ).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message);
+          that.modalFormOk();
+        } else {
+          that.$message.warning(res.message);
+        }
+      });
+    },
+    handleCancelSettle() {
+      var that = this;
+      httpAction(
+        "/pos/posOrderGoods/cancelSettle?code=" + this.selectOrderInfo.code,
+        {},
+        "post"
+      ).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message);
+          that.modalFormOk();
+        } else {
+          that.$message.warning(res.message);
+        }
+      });
+    },
+    handlePayment() {
+      var amount = this.orderGoodsDetailList.reduce(function (total, item) {
+        return total + item.payMoney * item.num;
+      }, 0);
+      this.$refs.modalPaymentForm.edit({
+        billAmount: amount,
+        deposit: 0,
+        roomFee: amount,
+        subjectType: 5,
+        feeType: 2,
+        preferentialType: 1,
+        couponFirstAmount: 0,
+        discount: 9,
+        orderCode: this.selectOrderInfo.code,
+      });
+      this.$refs.modalPaymentForm.title = "POS结账";
+      this.$refs.modalPaymentForm.disableSubmit = false;
+    },
+    tabPosTypeChange(e) {
+      this.queryParam.posType = e;
+      this.loadData(1);
+    },
+    submitForm() {
+      if (this.orderGoodsDetailList.length <= 0) {
+        this.$message.warning("请先选择订单");
+        return;
+      }
+      this.$emit("ok", {
+        orderInfo: this.selectOrderInfo,
+        orderDetailList: this.orderGoodsDetailList,
+      });
+    },
+    rowClick(row) {
+      return {
+        on: {
+          click: (e) => {
+            console.log(row);
+            this.selectOrderInfo = row;
+            getAction("/pos/posOrderGoodsDetail/list", {
+              pageNo: 1,
+              pageSize: 99,
+              orderId: row.code,
+            }).then((res) => {
+              if (res.success) {
+                this.orderGoodsDetailList = res.result.records;
+              }
+            });
+          },
+        },
+      };
+    },
+    onChange(e, dateString) {
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    handleAdd() {
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning("请选择一条记录!");
+        return;
+      }
+      if (this.num <= 0) {
+        this.$message.warning("发放数量不能小于0!");
+        return;
+      }
+      var that = this;
+      that.confirmLoading = true;
+      var url = "/business/busMarketCouponsUsed/gainCouponsUsedToMember";
+      if (this.couponsType === 2) {
+        url = "/business/busMarketCouponsCashUsed/gainCouponsCashUsedToMember";
+      }
+      httpAction(
+        url,
+        {
+          couponsId: this.couponsId,
+          num: this.num,
+          memberIds: this.selectedRowKeys,
+        },
+        "post"
+      )
+        .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>

+ 452 - 0
src/views/pos/modules/Payment.vue

@@ -0,0 +1,452 @@
+<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="billAmount"
+            >
+              {{ model.billAmount.toFixed(2) }}元
+              <a-switch v-model="model.coupon" />优惠
+            </a-form-model-item>
+          </a-col>
+          <template v-if="model.coupon">
+            <a-col :span="24">
+              <a-form-model-item
+                label="优惠方式"
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="refund"
+              >
+                <a-radio-group v-model="model.preferentialType">
+                  <a-radio :value="1"> 抹零 </a-radio>
+                  <a-radio :value="2"> 减现 </a-radio>
+                  <a-radio :value="3"> 打折 </a-radio>
+                </a-radio-group>
+                <template v-if="model.preferentialType === 3"
+                  >打<a-input-number
+                    style="width: 50px"
+                    v-model="model.discount"
+                    :min="1"
+                    :max="9"
+                  ></a-input-number
+                  >折
+                </template>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24" v-if="model.preferentialType == 2">
+              <a-form-model-item
+                label="优惠金额"
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="couponFirstAmount"
+              >
+                <a-input-number
+                  style="width: 100px"
+                  :min="0"
+                  v-model="model.couponFirstAmount"
+                  placeholder="请输入优惠金额"
+                ></a-input-number
+                >元
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item
+                label="惠后金额"
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+              >
+                {{ couponAmount.toFixed(2) }}元
+              </a-form-model-item>
+            </a-col>
+            <!-- <a-col :span="24">
+              <a-form-model-item
+                label="优惠券"
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="refund"
+              >
+                <a-select
+                  v-if="model.couponCard"
+                  v-model="model.couponId"
+                  style="width: 200px"
+                  placeholder="优惠券"
+                  :allowClear="true"
+                >
+                  <a-select-option
+                    :value="couponItem.id"
+                    v-for="couponItem in memeberCouponList"
+                    :key="couponItem.id"
+                    >{{ couponItem.couponsName }}</a-select-option
+                  >
+                </a-select>
+                <a-switch v-model="model.couponCard" />使用优惠券
+              </a-form-model-item>
+            </a-col> -->
+          </template>
+          <a-col :span="24">
+            <a-form-model-item
+              label="实收金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              {{ realityAmount.toFixed(2) }}元
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="收款金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <div v-for="(item, index) in payList" :key="index">
+                <a-row type="flex" :key="index">
+                  <a-col :span="6">
+                    <a-input-number
+                      style="width: 100px"
+                      v-model="item.money"
+                      :min="0"
+                    ></a-input-number>
+                  </a-col>
+                  <a-col :span="6">
+                    <a-select
+                      v-model="item.payType"
+                      placeholder="收款方式"
+                      @change="(event) => onChange(event, item)"
+                    >
+                      <a-select-option
+                        :value="item2.id"
+                        v-for="item2 in payTypeList"
+                        :key="item2.id"
+                      >
+                        {{ item2.name }}
+                      </a-select-option>
+                    </a-select></a-col
+                  >
+                  <a-col :span="6">
+                    <a-icon
+                      v-if="index == payList.length - 1"
+                      type="plus-circle"
+                      class="dynamic-delete-button"
+                      @click="puls()" />
+                    <a-icon
+                      v-if="payList.length > 1"
+                      type="minus-circle"
+                      style="color: #f56c6c"
+                      class="dynamic-delete-button"
+                      @click="() => remove(index)"
+                  /></a-col>
+                </a-row>
+
+                <a-row type="flex" v-if="item.isVipMemmber">
+                  <a-col :span="12"> 姓名:{{ memberCard.name }} </a-col>
+                  <a-col :span="12"> 卡号:{{ memberCard.cardNo }} </a-col>
+                  <a-col :span="12">
+                    会员级别: {{ memberCard.gradeName }}</a-col
+                  >
+                  <a-col :span="12"> 余额:{{ memberCard.balance }} </a-col>
+                  <a-col :span="12"> 积分:{{ memberCard.integral }} </a-col>
+                  <!-- <a-col :span="12"> 本次扣后剩余: </a-col>
+                <a-col :span="12"> 本次新增积分: </a-col> -->
+                </a-row>
+              </div>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="实收合计"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              {{ sumAmount.toFixed(2) }}元
+            </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: "Payment",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {
+        coupon: false,
+        discount: 1,
+        couponCard: false,
+        couponType: 1,
+        couponFirstAmount: 0,
+        billAmount: 0,
+        selectedFeeIds: [],
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        mobile: [
+          {
+            required: true,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "请输入手机号!",
+          },
+        ],
+        cardNo: [{ required: true, message: "请输入会员卡号!" }],
+        gradeId: [{ required: true, message: "请输入等级类型!" }],
+        payType: [{ required: true, message: "请输入付款类型!" }],
+        paymentMethod: [{ required: true, message: "请输入付款方式!" }],
+        customerName: [{ required: true, message: "请输入会员姓名!" }],
+        sex: [{ required: true, message: "请输入性别!" }],
+        certificateType: [{ required: true, message: "请输入证件类型!" }],
+        validity: [{ required: true, message: "请输入有效期!" }],
+      },
+      url: {
+        add: "/business/busRoomBookingOrders/booking-to-live",
+        edit: "/business/busMemberCard/edit",
+        queryById: "/business/busMemberCard/queryById",
+      },
+      gradeList: [],
+      paymentMethodList: [],
+      staffList: [],
+      customerList: [],
+      oldcustomerList: [],
+      payTypeList: [],
+      memberCard: {},
+      isVipMemmber: false,
+      payList: [],
+      memeberCouponList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+    sumAmount() {
+      var sum = this.payList.reduce(function (total, item) {
+        return total + item.money;
+      }, 0);
+      return sum;
+    },
+    couponAmount() {
+      var sum = 0;
+      if (this.model.coupon) {
+        if (this.model.preferentialType == 1) {
+          sum = Math.floor(this.model.billAmount);
+        } else if (this.model.preferentialType == 2) {
+          sum = this.model.billAmount - (this.model.couponFirstAmount || 0);
+        } else if (this.model.preferentialType == 3) {
+          sum = parseFloat(
+            ((this.model.billAmount * this.model.discount) / 10).toFixed(2)
+          );
+        }
+      } else {
+        sum = this.model.billAmount;
+      }
+      return sum;
+    },
+    realityAmount() {
+      if (this.model.couponCard) {
+        var find = this.memeberCouponList.find(
+          (t) => t.id == this.model.couponId
+        );
+        if (find) {
+          return this.couponAmount - find.cost;
+        }
+      }
+      return this.couponAmount;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/business/busRoomPayType/list", {
+      pageSize: 99999,
+      pageNo: 1,
+    }).then((res) => {
+      if (res.success) {
+        this.payTypeList = res.result.records;
+      }
+    });
+    getAction("/business/busMemberCard/list", {
+      id: "11111111",
+    }).then((res) => {
+      if (res.success) {
+        if (res.result.records && res.result.records.length > 0) {
+          this.memberCard = res.result.records[0];
+        }
+      }
+    });
+  },
+  methods: {
+    getbusRoomPayType() {
+      getAction("/business/busRoomPayType/list", {
+        pageSize: 99999,
+        pageNo: 1,
+      }).then((res) => {
+        if (res.success) {
+          this.payTypeList = res.result.records;
+          if (this.payTypeList && this.payTypeList.length > 0) {
+            this.$set(this.model, "payType", this.payTypeList[0].id);
+
+            this.payList = [
+              {
+                money: this.realityAmount,
+                payType: this.payTypeList[0].id,
+                isVipMemmber: false,
+              },
+            ];
+          }
+        }
+      });
+    },
+    puls() {
+      this.payList.push({
+        money: 0,
+        payType: this.payTypeList[0].id,
+        isVipMemmber: false,
+      });
+    },
+    remove(index) {
+      this.payList.splice(index, 1);
+    },
+    onChange(e, value) {
+      console.log("value", value);
+      console.log("e", e);
+      var find = this.payTypeList.find((t) => t.id == value.payType);
+      value.isVipMemmber = find && find.name == "会员卡";
+    },
+    handleSearch(value) {
+      let result;
+      if (!value) {
+        result = this.oldcustomerList;
+      } else {
+        result = this.oldcustomerList.filter((t) => t.name.includes(value));
+      }
+      this.customerList = result;
+    },
+    handleSelectMember(e) {
+      var find = this.customerList.find((t) => t.id === e);
+      this.model.phone = find.phone;
+      this.model.customerName = find.name;
+      this.model.customerId = find.id;
+    },
+    getMemeberCouponList() {
+      getAction("/business/busMarketCouponsCashUsed/memeberCouponList", {
+        pageNo: 1,
+        pageSize: 99,
+        conditions: 900,
+        mobile: this.model.vipCustomerId,
+      }).then((res) => {
+        if (res.success) {
+          this.memeberCouponList = res.result.records;
+        }
+      });
+    },
+    add(livingOrderId, roomId) {
+      this.modelDefault.livingOrderId = livingOrderId;
+      this.modelDefault.roomId = roomId;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.getbusRoomPayType();
+      if (this.model.vipCustomerId) {
+        this.getMemeberCouponList();
+      }
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          console.log("this.realityAmount ", this.realityAmount);
+          console.log("this.sumAmount ", this.sumAmount);
+          if (this.realityAmount != this.sumAmount) {
+            that.$message.warning("实收金额和实收合计必须相等");
+            return;
+          }
+          var obj = {
+            couponPrice: this.couponAmount.toFixed(2),
+            orderCode: this.model.orderCode,
+            paymentList: [],
+          };
+          var fees = [];
+          this.payList.forEach((item) => {
+            fees.push({
+              payMoney: item.money.toFixed(2),
+              paymentMethod: item.payType,
+              orderId: this.model.orderCode,
+            });
+          });
+          obj.paymentList = fees;
+          that.confirmLoading = true;
+          var url = "/pos/posOrderGoodsPayment/add";
+          httpAction(url, obj, "post")
+            .then((res) => {
+              if (res.success) {
+                that.$message.success("结账成功");
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+.dynamic-delete-button {
+  cursor: pointer;
+  position: relative;
+  /* top: 4px; */
+  margin-left: 5px;
+  font-size: 18px;
+  color: #1890ff;
+  transition: all 0.3s;
+}
+.dynamic-delete-button:hover {
+  color: #777;
+}
+.dynamic-delete-button[disabled] {
+  cursor: not-allowed;
+  opacity: 0.5;
+}
+</style>

+ 60 - 0
src/views/pos/modules/PaymentModal.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="关闭">
+    <payment ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></payment>
+  </j-modal>
+</template>
+
+<script>
+
+  import payment from './Payment'
+  export default {
+    name: 'PaymentModal',
+    components: {
+      payment
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(record);
+        })
+      },
+      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>

+ 388 - 0
src/views/pos/modules/PickingGoodsOrder.vue

@@ -0,0 +1,388 @@
+<template>
+  <a-card :bordered="false">
+    <div style="display: flex; min-height: 500px">
+      <a-card style="width: 50%">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="searchQuery">
+            <a-row :gutter="24">
+              <a-col :span="8">
+                <a-form-item label="">
+                  <j-input
+                    placeholder="取餐号"
+                    v-model="queryParam.tableNo"
+                  ></j-input>
+                </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                <a-form-item label="">
+                  <a-range-picker
+                    format="YYYY-MM-DD"
+                    :placeholder="['开始日期', '结束日期']"
+                    @change="onChange"
+                    v-model="datetime"
+                  />
+                </a-form-item>
+              </a-col>
+              <a-col :span="4">
+                <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"
+            :customRow="rowClick"
+            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>
+
+            <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>
+      </a-card>
+      <a-card style="width: 50%">
+        <p>订单详情</p>
+        <a-table
+          ref="table"
+          size="middle"
+          :scroll="{ x: true }"
+          bordered
+          rowKey="id"
+          :columns="columns2"
+          :dataSource="orderGoodsDetailList"
+          :loading="loading"
+          class="j-table-force-nowrap"
+        >
+          <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="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>
+      </a-card>
+    </div>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction,getAction } from "@/api/manage";
+export default {
+  name: "BusMemberCardList",
+  mixins: [JeecgListMixin, mixinDevice],
+  props: {
+    couponsId: {
+      type: String,
+      default: "",
+    },
+    couponsType: {
+      type: Number,
+      default: 1,
+    },
+  },
+  data() {
+    const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+    return {
+      datetime: [],
+      hotelId: "",
+      num: 1,
+      description: "PickingGoodsOrder",
+      // 表头
+      columns: [
+        {
+          title: "单据号",
+          align: "center",
+          dataIndex: "code",
+        },
+        {
+          title: "取餐号",
+          align: "center",
+          dataIndex: "tableNo",
+        },
+        {
+          title: "消费金额",
+          align: "center",
+          dataIndex: "consumeMoney",
+        },
+        {
+          title: "优惠金额",
+          align: "center",
+          dataIndex: "couponMoney",
+        },
+        {
+          title: "实付金额",
+          align: "center",
+          dataIndex: "payMoney",
+        },
+      ],
+      columns2: [
+        {
+          title: "商品名称",
+          align: "center",
+          dataIndex: "goodsName",
+        },
+        {
+          title: "数量",
+          align: "center",
+          dataIndex: "num",
+        },
+        {
+          title: "原价",
+          align: "center",
+          dataIndex: "money",
+          customRender(text, record) {
+            return text.toFixed(2);
+          },
+        },
+        {
+          title: "优惠价",
+          align: "center",
+          dataIndex: "couponMoney",
+          customRender(text, record) {
+            return text.toFixed(2);
+          },
+        },
+        {
+          title: "优惠金额",
+          align: "center",
+          dataIndex: "id",
+          customRender(text, record) {
+            return record.money - record.couponMoney;
+          },
+        },
+        {
+          title: "小计",
+          align: "center",
+          dataIndex: "payMoney",
+          customRender(text, record) {
+            return (text * record.num).toFixed(2);
+          },
+        },
+      ],
+      url: {
+        list: "/pos/posOrderGoods/list?status=0",
+        delete: "/business/busMemberCard/delete",
+        deleteBatch: "/business/busMemberCard/deleteBatch",
+        exportXlsUrl: "/business/busMemberCard/exportXls",
+        importExcelUrl: "business/busMemberCard/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      orderGoodsDetailList: [],
+      selectOrderInfo: {},
+    };
+  },
+  created() {},
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    submitForm() {
+      if (this.orderGoodsDetailList.length <= 0) {
+        this.$message.warning("请先选择订单");
+        return;
+      }
+      this.$emit("ok", {
+        orderInfo: this.selectOrderInfo,
+        orderDetailList: this.orderGoodsDetailList,
+      });
+    },
+    rowClick(row) {
+      return {
+        on: {
+          click: (e) => {
+            this.selectOrderInfo = row;
+            getAction("/pos/posOrderGoodsDetail/list", {
+              pageNo: 1,
+              pageSize: 99,
+              orderId: row.code,
+            }).then((res) => {
+              if (res.success) {
+                this.orderGoodsDetailList = res.result.records;
+              }
+            });
+          },
+        },
+      };
+    },
+    onChange(e, dateString) {
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    handleAdd() {
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning("请选择一条记录!");
+        return;
+      }
+      if (this.num <= 0) {
+        this.$message.warning("发放数量不能小于0!");
+        return;
+      }
+      var that = this;
+      that.confirmLoading = true;
+      var url = "/business/busMarketCouponsUsed/gainCouponsUsedToMember";
+      if (this.couponsType === 2) {
+        url = "/business/busMarketCouponsCashUsed/gainCouponsCashUsedToMember";
+      }
+      httpAction(
+        url,
+        {
+          couponsId: this.couponsId,
+          num: this.num,
+          memberIds: this.selectedRowKeys,
+        },
+        "post"
+      )
+        .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>

+ 60 - 0
src/views/pos/modules/PickingGoodsOrderModal.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="关闭">
+    <picking-goods-order ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></picking-goods-order>
+  </j-modal>
+</template>
+
+<script>
+
+  import PickingGoodsOrder from './PickingGoodsOrder'
+  export default {
+    name: 'PickingGoodsOrderModal',
+    components: {
+      PickingGoodsOrder
+    },
+    data () {
+      return {
+        title:'',
+        width:1200,
+        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(e){
+        this.$emit('ok',e);
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 147 - 0
src/views/pos/modules/PosTypeForm.vue

@@ -0,0 +1,147 @@
+<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="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-col :span="24">
+            <a-form-model-item
+              label="线上预定"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="online"
+            >
+              <a-radio-group v-model="model.online">
+                <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: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        name: [{ required: true, message: "请输入名称!" }],
+        state: [{ required: true, message: "请输入状态!" }],
+        online: [{ required: true, message: "请输入线上预定!" }],
+      },
+      url: {
+        add: "/pos/posType/add",
+        edit: "/pos/posType/edit",
+        queryById: "/pos/posType/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>

+ 60 - 0
src/views/pos/modules/PosTypeModal.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 './PosTypeForm'
+  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>

+ 202 - 0
src/views/pos/modules/SelectCheckInRoomOrder.vue

@@ -0,0 +1,202 @@
+<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.tableNo"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="房间号"
+                v-model="queryParam.tableNo"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="姓名"
+                v-model="queryParam.tableNo"
+              ></j-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"
+      >
+        <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: {
+    couponsId: {
+      type: String,
+      default: "",
+    },
+    couponsType: {
+      type: Number,
+      default: 1,
+    },
+  },
+  data() {
+    const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+    return {
+      datetime: [],
+      hotelId: "",
+      num: 1,
+      description: "PickingGoodsOrder",
+      // 表头
+      columns: [
+        {
+          title: "房间",
+          align: "center",
+          dataIndex: "tableNo",
+        },
+        {
+          title: "名字",
+          align: "center",
+          dataIndex: "id",
+        },
+        {
+          title: "单号",
+          align: "center",
+          dataIndex: "code",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "couponMoney",
+        },
+        {
+          title: "金额",
+          align: "center",
+          dataIndex: "payMoney",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/pos/posOrderGoods/list?status=0",
+        delete: "/business/busMemberCard/delete",
+        deleteBatch: "/business/busMemberCard/deleteBatch",
+        exportXlsUrl: "/business/busMemberCard/exportXls",
+        importExcelUrl: "business/busMemberCard/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      orderGoodsDetailList: [],
+      selectOrderInfo: {},
+    };
+  },
+  created() {},
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    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>

+ 60 - 0
src/views/pos/modules/SelectCheckInRoomOrderModal.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="关闭">
+    <picking-goods-order ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></picking-goods-order>
+  </j-modal>
+</template>
+
+<script>
+
+  import PickingGoodsOrder from './SelectCheckInRoomOrder'
+  export default {
+    name: 'PickingGoodsOrderModal',
+    components: {
+      PickingGoodsOrder
+    },
+    data () {
+      return {
+        title:'',
+        width:1200,
+        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(e){
+        this.$emit('ok',e);
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 114 - 0
src/views/pos/modules/UserNum.vue

@@ -0,0 +1,114 @@
+<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="userNum"
+            >
+              <a-input-number
+                v-model="model.userNum"
+                :min="1"
+                :max="10000"
+              ></a-input-number>
+            </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: {
+        userNum: [{ required: true, message: "请输入就餐人数!" }],
+      },
+      url: {
+        add: "/pos/posTable/add",
+        edit: "/pos/posTable/addOrder",
+        queryById: "/pos/posTable/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 = this.url.edit;
+          let 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>

+ 60 - 0
src/views/pos/modules/UserNumModal.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 './UserNum'
+  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>

+ 312 - 0
src/views/pos/modules/goodStock/goodsForm.vue

@@ -0,0 +1,312 @@
+<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="12" type="flex" justify="start">
+            <a-form-model-item
+              label="分类"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="goodType"
+            >
+              <a-cascader
+                :defaultValue="arr"
+                :options="treeData ? treeData : []"
+                :field-names="{
+                  label: 'name',
+                  value: 'id',
+                  children: 'children',
+                }"
+                placeholder="请选择"
+                @change="onChange"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="12" type="flex" justify="start">
+            <a-form-model-item
+              style="width: 100%"
+              label="单位"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="goodUnit"
+            >
+              <a-select
+                v-model="model.goodUnit"
+                placeholder="请选择商品单位"
+                @change="handleChange"
+              >
+                <a-select-option
+                  v-for="item in unitData"
+                  :unitName="item.name"
+                  :key="item.id"
+                  :value="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item
+              label="名称"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="name"
+            >
+              <a-input v-model="model.name" placeholder="请填写名称" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item
+              label="售价"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="sellingPrice"
+            >
+              <a-input-number v-model="model.sellingPrice" :min="0" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { getRoomPlans, getSelectList } from "@/api/api";
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+import { getUnit } from "@/api/good";
+
+export default {
+  name: "BusMarketMemberForm",
+  inject: ["treeData"],
+  props: {
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      unitData: [],
+      options: [
+        {
+          label: "张三",
+          value: "1",
+        },
+      ],
+      model: {
+        id: "",
+        hotelId: 0,
+        goodType: "",
+        goodUnit: undefined,
+        barCode: "",
+        bid: null,
+        name: "",
+        sellingPrice: 0,
+        purchases: null,
+        salesVolume: null,
+        inventory: null,
+        appState: null,
+      },
+      labelCol: {
+        xs: {
+          span: 24,
+        },
+        sm: {
+          span: 5,
+        },
+      },
+      wrapperCol: {
+        xs: {
+          span: 24,
+        },
+        sm: {
+          span: 16,
+        },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        goodType: [
+          {
+            required: true,
+            message: "请选择分类!",
+          },
+        ],
+        goodUnit: [
+          {
+            required: true,
+            message: "请选择单位!",
+          },
+        ],
+        name: [
+          {
+            required: true,
+            message: "请输入名称!",
+          },
+        ],
+        sellingPrice: [
+          {
+            required: true,
+            message: "请输入价格!",
+          },
+        ],
+      },
+      url: {
+        // add: "/rooms/cesRoomLayout/save",
+        add: "/rooms/cesGoods/addTemp",
+        // edit: "/rooms/cesRoomLayout/modify",
+        edit: "/rooms/cesGoods/modify",
+        delete: "/rooms/cesGoods/delete",
+        // queryById: "/rooms/cesRoomLayout/queryById",
+      },
+      iconChooseVisible: false,
+      roomPlans: [],
+      members: [],
+      arr: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+      this.initData();
+      this.getData();
+    }
+    console.log(111111111111, this.treeData);
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    onChange(e) {
+      console.log(e);
+      this.model.goodType = e[e.length - 1];
+      console.log(this.model.goodType);
+    },
+    handleChange(e, options) {
+      console.log(e);
+      this.model.goodUnit = e;
+    },
+    initData() {
+      getRoomPlans(this.model.hotelId, null).then((res) => {
+        if (res.success) {
+          this.roomPlans = res.result;
+        }
+      });
+    },
+    selectIcons() {
+      this.iconChooseVisible = true;
+    },
+    handleIconCancel() {
+      this.iconChooseVisible = false;
+    },
+    handleIconChoose(value) {
+      console.log(value);
+      this.model.icon = value;
+      this.iconChooseVisible = false;
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    //筛选分类数组
+    filterType(array, id) {
+      let arr = [];
+      array.forEach((item, index) => {
+        if (item.id == id) {
+          this.arr[0] = item.parentId;
+          this.arr[1] = item.id;
+          return;
+        } else if (Array.isArray(item.children) && item.children) {
+          this.filterType(item.children, id);
+        }
+      });
+    },
+    edit(record) {
+      console.log(22222222, record);
+      // this.model = Object.assign({}, record);
+      this.model = JSON.parse(JSON.stringify(record));
+
+      console.log(this.filterType(this.treeData, record.goodType));
+      console.log(this.arr);
+      this.visible = true;
+      getSelectList({
+        id: this.model.id,
+      }).then((res) => {
+        if (res.success) {
+          this.members = res.result;
+        }
+      });
+    },
+    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";
+          }
+          if (this.model.payFlag == 0) {
+            this.model.payAmount = 0;
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                // that.$message.success(res.message);
+                that.$emit("ok", res.result);
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+    getData() {
+      getUnit({ pageNo: 1, pageSize: 1000 }).then((res) => {
+        console.log(res);
+        if (res.code && res.code == 200) {
+          this.unitData = res.result.records;
+        }
+      });
+    },
+    switchState(e) {
+      console.log("这是滑动按钮触发", e);
+      this.model.appState = e;
+    },
+  },
+};
+</script>
+
+<style scoped>
+.avatar-uploader > .ant-upload {
+  width: 104px;
+  height: 104px;
+}
+</style>

+ 65 - 0
src/views/pos/modules/goodStock/goodsModal.vue

@@ -0,0 +1,65 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <bus-market-member-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+    ></bus-market-member-form>
+  </j-modal>
+</template>
+
+<script>
+import BusMarketMemberForm from "./goodsForm.vue";
+export default {
+  name: "BusMarketMemberModal",
+  components: {
+    BusMarketMemberForm,
+  },
+  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(e) {
+      console.log("e", e);
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 54 - 0
src/views/pos/posInfo.vue

@@ -0,0 +1,54 @@
+<template>
+  <a-card style="width: 100%; height: 100%">
+    <a-tabs v-model="activeKey">
+      <a-tab-pane key="1">
+        <span slot="tab"> 点单 </span>
+        <diandan></diandan>
+      </a-tab-pane>
+      <a-tab-pane key="2">
+        <span slot="tab"> 桌台点单 </span>
+        <tablediandangallery v-if="activeKey == '2'"></tablediandangallery>
+      </a-tab-pane>
+      <a-tab-pane key="3">
+        <span slot="tab"> 订单列表 </span>
+        <goods-order v-if="activeKey == '3'"></goods-order>
+      </a-tab-pane>
+      <a-tab-pane key="4">
+        <span slot="tab"> pos类型管理 </span>
+        <pos-type></pos-type>
+      </a-tab-pane>
+      <a-tab-pane key="5">
+        <span slot="tab"> 扫码点餐管理 </span>
+        <pos-thali></pos-thali>
+      </a-tab-pane>
+      <a-tab-pane key="6">
+        <span slot="tab"> 预定 </span>
+      </a-tab-pane>
+    </a-tabs>
+  </a-card>
+</template>
+
+<script>
+import diandan from "./diandan.vue";
+import posType from "./posType.vue";
+import goodsOrder from "./goodsOrder.vue";
+import tablediandangallery from "./tablediandangallery.vue";
+
+export default {
+  components: {
+    diandan,
+    posType,
+    goodsOrder,
+    tablediandangallery,
+  },
+  data() {
+    return { activeKey: "1" };
+  },
+};
+</script>
+
+<style scoped>
+.main {
+  height: 70% !important;
+}
+</style>

+ 299 - 0
src/views/pos/posType.vue

@@ -0,0 +1,299 @@
+<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="pos名称"
+                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="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <pos-type-modal ref="modalForm" @ok="modalFormOk"></pos-type-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import PosTypeModal from "./modules/PosTypeModal";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    PosTypeModal,
+  },
+  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: "state",
+          customRender(text) {
+            return text === 1 ? "启用" : "停用";
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/pos/posType/list",
+        delete: "/pos/posType/delete",
+        deleteBatch: "/pos/posType/deleteBatch",
+        exportXlsUrl: "/pos/posType/exportXls",
+        importExcelUrl: "pos/posType/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+    };
+  },
+  created() {
+    // this.loadData()
+  },
+  methods: {
+    // searchQuery() {
+    //   this.loadData(1);
+    // },
+    // loadData(arg) {
+    //   //加载数据 若传入参数1则加载第一页的内容
+    //   if (arg === 1) {
+    //     this.ipagination.current = 1;
+    //   }
+    //   var params = this.getQueryParams(); //查询条件
+    //   getAction(this.url.list, params).then((res) => {
+    //     if (res.success) {
+    //       this.dataSource1 = res.result.records;
+    //       this.ipagination.total = res.result.total;
+    //     }
+    //   });
+    // },
+    // getQueryParams() {
+    //   var param = Object.assign({}, this.queryParam, this.isorter);
+    //   param.pageNo = this.ipagination.current;
+    //   param.pageSize = this.ipagination.pageSize;
+    //   return filterObj(param);
+    // },
+    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>

+ 517 - 0
src/views/pos/tablediandan.vue

@@ -0,0 +1,517 @@
+<template>
+  <a-card :bordered="false" class="card-pd" v-if="isShow">
+    <div style="display: flex; height: calc(100vh - 350px)">
+      <a-card style="width: 25%">
+        <a-row :gutter="[16, 16]">
+          <a-col :span="6">
+            <div>台号:{{ tableOrderInfo.name }}</div>
+          </a-col>
+          <a-col :span="6">
+            <div>人数:{{ tableOrderInfo.userNum }}</div>
+          </a-col>
+          <a-col :span="12">
+            <div>开台时间:{{ tableOrderInfo.orderTime }}</div>
+          </a-col>
+        </a-row>
+        <p v-if="selectRoomOrder && selectRoomOrder.id">
+          房间:{{ selectRoomOrder.tableNo }},姓名:{{ selectRoomOrder.id }}
+        </p>
+        <a-table
+          bordered
+          :columns="columns"
+          :data-source="selectGoodsList"
+          :pagination="false"
+          rowKey="id"
+          :scroll="{ y: 560 }"
+        >
+          <template slot="num" slot-scope="text, record, index">
+            <div>
+              <a-input-number
+                v-model="record.num"
+                :max="record.inventory"
+                @change="(event) => numChange(event, index)"
+              />
+            </div>
+          </template>
+          <template slot="required" slot-scope="text, record, index">
+            <div>
+              <a-switch v-model="record.required" />
+            </div>
+          </template>
+
+          <span slot="action" slot-scope="text, record, index">
+            <a @click="handleDelete(index)">删除</a>
+          </span>
+        </a-table>
+        <p>数量:{{ sum }}</p>
+        <div style="display: flex; gap: 5px; flex-flow: wrap">
+          <a-button @click="handleClear" v-if="selectGoodsList.length == 0"
+            >清台</a-button
+          >
+
+          <a-button @click="handleClear" :disabled="btnDisabled">清空</a-button>
+
+          <!-- <a-button @click="handleAdd" :disabled="btnDisabled">备注</a-button> -->
+          <!-- <a-button :disabled="btnDisabled">退货</a-button> -->
+          <!-- <a-button v-if="!btnDisabled" @click="handleAdd">挂单</a-button> -->
+          <!-- <a-button v-else @click="handlePickingGoodsOrder">取单</a-button> -->
+          <a-button
+            v-if="selectGoodsList.length > 0"
+            type="danger"
+            @click="handleAdd"
+            >下单</a-button
+          >
+          <a-button
+            v-if="selectRoomOrder && selectRoomOrder.id && !btnDisabled"
+            @click="handleToRoomFeePayment"
+            >确定挂房帐</a-button
+          >
+          <a-button v-else @click="handleSelectCheckInRoomOrder"
+            >挂房帐</a-button
+          >
+          <a-button :disabled="btnDisabled" type="danger" @click="handlePayment"
+            >结账¥{{ amount.toFixed(2) }}</a-button
+          >
+        </div>
+      </a-card>
+      <a-card style="width: 75%">
+        <a-tabs v-model="tabgoodsTypeId" @change="tabGoodsTypeChange">
+          <a-tab-pane key="1" tab="全部"></a-tab-pane>
+          <a-tab-pane
+            :key="item.id"
+            :tab="item.name"
+            v-for="item in goodsTypeList"
+          ></a-tab-pane>
+        </a-tabs>
+        <a-row :gutter="[5, 5]">
+          <a-col
+            v-for="item in dataSource"
+            :key="item.id"
+            :span="3"
+            @click.stop="itemClick(item)"
+          >
+            <div class="room-item check">
+              <div class="select-cell"></div>
+              <template v-if="item.id != '0'">
+                <div>{{ item.name }}</div>
+                <div style="margin-top: 10px; color: red">
+                  ¥{{ item.sellingPrice.toFixed(2) }}
+                </div>
+                <div style="margin-top: 10px">库{{ item.inventory }}</div>
+                <div
+                  v-if="item.isSellClear"
+                  style="display: flex; justify-content: right"
+                >
+                  <a-tag color="#f50"> 沽清 </a-tag>
+                </div></template
+              >
+              <template v-else>
+                <div style="font-weight: 800; text-align: center">+临时菜</div>
+              </template>
+            </div>
+          </a-col>
+        </a-row>
+      </a-card>
+    </div>
+    <payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
+    <goods-modal ref="modalGoodsForm" @ok="modalFormOk2"></goods-modal>
+    <picking-goods-order-modal
+      ref="modalPickingGoodsOrderForm"
+      @ok="modalPickingGoodsOrderFormOk"
+    ></picking-goods-order-modal>
+    <select-check-in-room-order-modal
+      ref="modalSelectCheckInRoomOrderModal"
+      @ok="modalSelectCheckInRoomOrderFormOk"
+    ></select-check-in-room-order-modal>
+  </a-card>
+</template>
+  
+  <script>
+// import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+// import PosRegionModal from "./modules/PosRegionModal";
+import { filterObj } from "@/utils/util";
+import { getAction, postAction, deleteAction } from "@/api/manage";
+import PaymentModal from "./modules/PaymentModal.vue";
+import goodsModal from "./modules/goodStock/goodsModal.vue";
+import PickingGoodsOrderModal from "./modules/PickingGoodsOrderModal.vue";
+import SelectCheckInRoomOrderModal from "./modules/SelectCheckInRoomOrderModal.vue";
+import { computed } from "vue";
+import { tree } from "@/api/good";
+const columns = [
+  {
+    title: "商品名称",
+    dataIndex: "name",
+  },
+  {
+    title: "数量",
+    dataIndex: "num",
+    scopedSlots: { customRender: "num" },
+  },
+  {
+    title: "售价",
+    dataIndex: "sellingPrice",
+  },
+];
+export default {
+  name: "memberList",
+  components: {
+    PaymentModal,
+    goodsModal,
+    PickingGoodsOrderModal,
+    SelectCheckInRoomOrderModal,
+  },
+  data() {
+    return {
+      columns,
+      sellClear: 0,
+      queryParam: {},
+      // 分页参数
+      ipagination: {
+        current: 1,
+        pageSize: 99999,
+        pageSizeOptions: ["10", "20", "30"],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条";
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      url: {
+        list: "/pos/posSellClearGoods/list",
+        delete: "/pos/posSellClearGoods/delete",
+        deleteBatch: "/pos/posSellClearGoods/deleteBatch",
+        exportXlsUrl: "/pos/posSellClearGoods/exportXls",
+        importExcelUrl: "pos/posSellClearGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+      treeData: [],
+      selectGoods: {},
+      posTypeList: [],
+      tabPosTypeId: "",
+      selectGoodsList: [],
+      goodsTypeList: [],
+      tabgoodsTypeId: "1",
+      dataSource: [],
+      oldSelectGoodsList: [],
+      selectOrderInfo: {},
+      selectRoomOrder: {},
+      tableOrderInfo: {},
+      isShow: true,
+    };
+  },
+  provide() {
+    return {
+      treeData: computed(() => this.treeData),
+    };
+  },
+  computed: {
+    sum() {
+      return this.selectGoodsList.reduce(function (total, item) {
+        return total + item.num;
+      }, 0);
+    },
+    amount() {
+      return this.selectGoodsList.reduce(function (total, item) {
+        return total + item.sellingPrice * item.num;
+      }, 0);
+    },
+    btnDisabled() {
+      var res = this.selectGoodsList && this.selectGoodsList.length > 0;
+      return !res;
+    },
+  },
+  created() {},
+  activated() {
+    //重新进入界面可能参数id不一样,需要重新加载数据,使用钩子方式
+    this.tableId = this.$route.params.tableId;
+    this.isShow = true;
+    this.dataSource = [{ id: "0" }];
+    this.selectGoodsList = [];
+    this.oldSelectGoodsList = [];
+    this.getSelectGoodsList();
+    this.loadTree();
+    this.loadGoodsType();
+  },
+  // deactivated() {
+  //   this.isShow = false;
+  // },
+  methods: {
+    getSelectGoodsList() {
+      getAction("/pos/posTable/queryById", { id: this.tableId }).then((res) => {
+        if (res.success) {
+          this.tableOrderInfo = res.result;
+          if (
+            this.tableOrderInfo.state == 2 ||
+            this.tableOrderInfo.state == 3
+          ) {
+            this.selectOrderInfo = this.tableOrderInfo.posOrderGoods;
+            getAction("/pos/posOrderGoodsDetail/list", {
+              pageNo: 1,
+              pageSize: 99,
+              orderId: this.tableOrderInfo.posOrderGoods.code,
+            }).then((res2) => {
+              if (res2.success) {
+                res2.result.records.forEach((t) => {
+                  t.sellingPrice = t.payMoney;
+                  t.name = t.goodsName;
+                  t.id = t.goodsId;
+                });
+                this.selectGoodsList = res2.result.records;
+              }
+            });
+          }
+        }
+      });
+    },
+    loadTree() {
+      var that = this;
+      tree().then((res) => {
+        if (res.success) {
+          this.treeData = res.result;
+        }
+      });
+    },
+    modalFormOk() {
+      this.$router.go(-1);
+    },
+    modalFormOk2(e) {
+      console.log(e);
+      var good = JSON.parse(JSON.stringify(e));
+      this.$set(good, "num", 1);
+      this.selectGoodsList.push(good);
+    },
+    modalSelectCheckInRoomOrderFormOk(e) {
+      console.log(e);
+      this.selectRoomOrder = e;
+    },
+    modalPickingGoodsOrderFormOk(e) {
+      console.log(e);
+      if (e && e.orderDetailList && e.orderDetailList.length > 0) {
+        this.selectOrderInfo = e.orderInfo;
+        e.orderDetailList.forEach((t) => {
+          t.sellingPrice = t.payMoney;
+          t.name = t.goodsName;
+          t.id = t.goodsId;
+        });
+        this.selectGoodsList = e.orderDetailList;
+      }
+    },
+    numChange(e, index) {
+      console.log(e);
+      if (e <= 0) {
+        this.selectGoodsList.splice(index, 1);
+      }
+    },
+    handleClear() {
+      this.selectGoodsList = [];
+      // this.selectOrderInfo = {};
+    },
+    tabPosTypeChange(e) {
+      this.loadGoodsType();
+    },
+    tabGoodsTypeChange(e) {
+      this.loadGoods();
+    },
+    loadGoodsType() {
+      getAction("/rooms/cesStockType/getTopTypesByPosType", {
+        posType: this.tabPosTypeId,
+      }).then((res2) => {
+        if (res2.success) {
+          this.goodsTypeList = res2.result;
+          if (this.goodsTypeList && this.goodsTypeList.length > 0) {
+            this.loadGoods();
+          }
+        }
+      });
+    },
+    loadGoods() {
+      var ids = [];
+      if (this.tabgoodsTypeId === "1") {
+        this.goodsTypeList.forEach((t) => {
+          ids.push(t.id);
+        });
+      } else {
+        ids.push(this.tabgoodsTypeId);
+      }
+      this.dataSource = [{ id: "0" }];
+      getAction("/pos/posSellClearGoods/list", {
+        pageNo: 1,
+        pageSize: 99999,
+        goodTypes: ids,
+      }).then((res) => {
+        if (res.success) {
+          this.dataSource = [...this.dataSource, ...res.result.records];
+        }
+      });
+    },
+    handleDelete() {
+      deleteAction("/pos/posSellClearGoods/delete", {
+        goodsId: this.selectGoods.id,
+      })
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+            this.sellClear = 0;
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    handleSelectCheckInRoomOrder() {
+      this.$refs.modalSelectCheckInRoomOrderModal.add();
+      this.$refs.modalSelectCheckInRoomOrderModal.title = "选择转帐人";
+      this.$refs.modalSelectCheckInRoomOrderModal.disableSubmit = false;
+    },
+    handlePickingGoodsOrder() {
+      this.$refs.modalPickingGoodsOrderForm.add();
+      this.$refs.modalPickingGoodsOrderForm.title = "取单";
+      this.$refs.modalPickingGoodsOrderForm.disableSubmit = false;
+    },
+    handleAddTempGoods() {
+      this.$refs.modalGoodsForm.add();
+      this.$refs.modalGoodsForm.title = "新增菜品";
+      this.$refs.modalGoodsForm.disableSubmit = false;
+    },
+    handleToRoomFeePayment() {
+      this.handleAdd();
+    },
+    handlePayment() {
+      this.handleAdd((e) => {
+        var amount = this.oldSelectGoodsList.reduce(function (total, item) {
+          return total + item.sellingPrice * item.num;
+        }, 0);
+        this.$refs.modalPaymentForm.edit({
+          billAmount: amount,
+          deposit: 0,
+          roomFee: amount,
+          subjectType: 5,
+          feeType: 2,
+          preferentialType: 1,
+          couponFirstAmount: 0,
+          discount: 9,
+          orderCode: e,
+        });
+        this.$refs.modalPaymentForm.title = "POS结账";
+        this.$refs.modalPaymentForm.disableSubmit = false;
+      });
+    },
+    handleAdd(callback) {
+      if (!this.selectGoodsList || this.selectGoodsList.length <= 0) {
+        this.$message.warning("请先选择商品");
+        return;
+      }
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      var model = { goodsId: this.selectGoods.id };
+      if (_info) {
+        model.hotelId = _info.id;
+      }
+      model.id = this.selectOrderInfo.id;
+      model.toRoomFeeOrderId = this.selectRoomOrder.id;
+      model.posType = this.tableOrderInfo.posTypeId;
+      model.posTableId = this.tableOrderInfo.id;
+      model.tableNo = this.tableOrderInfo.name;
+      var posOrderGoodsDetailList = [];
+      this.selectGoodsList.forEach((t) => {
+        posOrderGoodsDetailList.push({
+          goodsId: t.id,
+          num: t.num,
+          money: t.sellingPrice,
+        });
+      });
+      model.posOrderGoodsDetailList = posOrderGoodsDetailList;
+      postAction("/pos/posOrderGoods/add", model)
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.oldSelectGoodsList = JSON.parse(
+              JSON.stringify(this.selectGoodsList)
+            );
+            // this.selectGoodsList = [];
+            // this.selectOrderInfo = {};
+            // this.selectRoomOrder = {};
+            this.tableId = res.result.posTableId;
+            this.getSelectGoodsList();
+            this.loadGoods();
+            if (callback) {
+              callback(res.result.code);
+            }
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    itemClick(row) {
+      console.log(row);
+      if (row.id == "0") {
+        this.handleAddTempGoods();
+        return;
+      }
+      if (row.isSellClear) {
+        this.$message.warning("选择的商品已沽清");
+        return;
+      }
+      var good = JSON.parse(JSON.stringify(row));
+      this.$set(good, "num", 1);
+      var find = this.selectGoodsList.find((t) => t.id === row.id);
+      console.log("find", find);
+      if (find) {
+        var m = this.dataSource.find((t) => t.id === row.id);
+        if (!find.inventory) {
+          find.inventory = m.inventory;
+        }
+        if (find.inventory > find.num) {
+          find.num++;
+        }
+      } else {
+        this.selectGoodsList.push(good);
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+.room-item {
+  height: 110px;
+  /* line-height: 200px; */
+  font-size: 13px;
+  padding: 0px 5px;
+  border-radius: 5px;
+  cursor: pointer;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+.check {
+  border: #000 solid 3px;
+}
+.ant-table-wrapper {
+  height: calc(100vh - 500px);
+}
+/deep/ .card-pd .ant-card-body {
+  padding: 0 !important;
+}
+.select-cell {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+  z-index: 10;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+</style>

+ 602 - 0
src/views/pos/tablediandangallery.vue

@@ -0,0 +1,602 @@
+<template>
+  <a-card :bordered="false" class="card-pd">
+    <a-tabs v-model="tabPosTypeId" @change="tabPosTypeChange">
+      <a-tab-pane
+        :key="item.id"
+        :tab="item.name"
+        v-for="item in posTypeList"
+      ></a-tab-pane>
+    </a-tabs>
+
+    <a-tabs v-model="tabPosRegionId" @change="tabRegionChange">
+      <a-tab-pane key="1" tab="全部"></a-tab-pane>
+      <a-tab-pane
+        :key="item.id"
+        :tab="item.name"
+        v-for="item in regionList"
+      ></a-tab-pane>
+    </a-tabs>
+    <div class="w-choose-status">
+      <div
+        :class="sta.check ? 'status-check' : ''"
+        v-for="(sta, index) in statusColorList"
+        :key="index"
+        @click="statusClick(index)"
+      >
+        <span
+          v-if="sta.status != -100"
+          class="square"
+          :style="{ background: sta.color }"
+        ></span>
+        <span class="title">{{ sta.title }}</span>
+      </div>
+    </div>
+    <a-row :gutter="[5, 5]">
+      <a-col
+        v-for="item in dataSource"
+        :key="item.id"
+        :span="2"
+        @click.stop="itemClick(item)"
+      >
+        <div
+          class="room-item check"
+          :style="{
+            background: getStatusColor(item.state),
+            color: item.state == 0 ? '#000' : '#fff',
+          }"
+        >
+          <div class="select-cell"></div>
+          <template v-if="item.state === 1">
+            <div>{{ item.name }}</div>
+            <div style="margin-top: 10px">待下单</div>
+            <div
+              style="
+                margin-top: 10px;
+                display: flex;
+                justify-content: space-between;
+              "
+            >
+              <div>
+                <a-icon type="user" />{{ item.userNum }}/{{ item.num }}人
+              </div>
+              <div>
+                <a-icon type="clock-circle" />{{ hours(item.orderTime) }}
+              </div>
+            </div></template
+          >
+          <template v-else-if="item.state === 2 || item.state === 4">
+            <div>{{ item.name }}</div>
+            <div style="margin-top: 10px">
+              ¥{{ item.posOrderGoods ? item.posOrderGoods.money : 0 }}
+            </div>
+            <div
+              style="
+                margin-top: 10px;
+                display: flex;
+                justify-content: space-between;
+              "
+            >
+              <div>
+                <a-icon type="user" />{{ item.userNum }}/{{ item.num }}人
+              </div>
+              <div>
+                <a-icon type="clock-circle" />{{ hours(item.orderTime) }}
+              </div>
+            </div></template
+          >
+          <template v-else>
+            <div>{{ item.name }}</div>
+            <div style="margin-top: 10px"></div>
+            <div style="margin-top: 10px">
+              <a-icon type="user" />{{ item.num }}人
+            </div></template
+          >
+        </div>
+      </a-col>
+    </a-row>
+    <payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
+    <goods-modal ref="modalGoodsForm" @ok="modalFormOk2"></goods-modal>
+    <picking-goods-order-modal
+      ref="modalPickingGoodsOrderForm"
+      @ok="modalPickingGoodsOrderFormOk"
+    ></picking-goods-order-modal>
+    <select-check-in-room-order-modal
+      ref="modalSelectCheckInRoomOrderModal"
+      @ok="modalSelectCheckInRoomOrderFormOk"
+    ></select-check-in-room-order-modal>
+    <user-num-modal
+      ref="modalUserNmumForm"
+      @ok="modalUserNmumFormOk"
+    ></user-num-modal>
+  </a-card>
+</template>
+  
+  <script>
+// import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+// import PosRegionModal from "./modules/PosRegionModal";
+import { filterObj } from "@/utils/util";
+import { getAction, postAction, deleteAction } from "@/api/manage";
+import PaymentModal from "./modules/PaymentModal.vue";
+import goodsModal from "./modules/goodStock/goodsModal.vue";
+import PickingGoodsOrderModal from "./modules/PickingGoodsOrderModal.vue";
+import SelectCheckInRoomOrderModal from "./modules/SelectCheckInRoomOrderModal.vue";
+import UserNumModal from "./modules/UserNumModal.vue";
+import { computed } from "vue";
+import { tree } from "@/api/good";
+const columns = [
+  {
+    title: "商品名称",
+    dataIndex: "name",
+  },
+  {
+    title: "数量",
+    dataIndex: "num",
+    scopedSlots: { customRender: "num" },
+  },
+  {
+    title: "售价",
+    dataIndex: "sellingPrice",
+  },
+];
+export default {
+  name: "memberList",
+  components: {
+    PaymentModal,
+    goodsModal,
+    PickingGoodsOrderModal,
+    SelectCheckInRoomOrderModal,
+    UserNumModal,
+  },
+  data() {
+    return {
+      columns,
+      sellClear: 0,
+      queryParam: {},
+      // 分页参数
+      ipagination: {
+        current: 1,
+        pageSize: 99999,
+        pageSizeOptions: ["10", "20", "30"],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条";
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      url: {
+        list: "/pos/posSellClearGoods/list",
+        delete: "/pos/posSellClearGoods/delete",
+        deleteBatch: "/pos/posSellClearGoods/deleteBatch",
+        exportXlsUrl: "/pos/posSellClearGoods/exportXls",
+        importExcelUrl: "pos/posSellClearGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+      treeData: [],
+      selectGoods: {},
+      posTypeList: [],
+      tabPosTypeId: "",
+      selectGoodsList: [],
+      regionList: [],
+      tabPosRegionId: "1",
+      dataSource: [],
+      oldSelectGoodsList: [],
+      selectOrderInfo: {},
+      selectRoomOrder: {},
+      statusColorList: [
+        {
+          title: "全部",
+          color: "#fff",
+          check: true,
+          status: -100,
+        },
+        {
+          title: "空桌",
+          color: "#fff",
+          check: false,
+          status: 0,
+        },
+        {
+          title: "待下单",
+          color: "#00a0e9",
+          check: false,
+          status: 1,
+        },
+        {
+          title: "待结账",
+          color: "rgba(10, 122, 114, 1)",
+          check: false,
+          status: 2,
+        },
+        {
+          title: "已预结",
+          color: "rgba(172, 51, 193, 1)",
+          check: false,
+          status: 3,
+        },
+        {
+          title: "待清台",
+          color: "rgba(128, 128, 128, 1)",
+          check: false,
+          status: 4,
+        },
+      ],
+      state: undefined,
+      selectTable: {},
+    };
+  },
+  provide() {
+    return {
+      treeData: computed(() => this.treeData),
+    };
+  },
+  computed: {
+    sum() {
+      return this.selectGoodsList.reduce(function (total, item) {
+        return total + item.num;
+      }, 0);
+    },
+    amount() {
+      return this.selectGoodsList.reduce(function (total, item) {
+        return total + item.sellingPrice * item.num;
+      }, 0);
+    },
+    btnDisabled() {
+      var res = this.selectGoodsList && this.selectGoodsList.length > 0;
+      return !res;
+    },
+  },
+  created() {
+    console.log("created");
+    this.dataSource = [{ id: "0" }];
+    getAction("/pos/posType/list", { pageNo: 1, pageSize: 99 }).then((res) => {
+      if (res.success) {
+        this.posTypeList = res.result.records;
+        if (this.posTypeList && this.posTypeList.length > 0) {
+          this.tabPosTypeId = this.posTypeList[0].id;
+          this.loadRegion();
+        }
+      }
+    });
+  },
+  activated() {
+    console.log("activated");
+    this.dataSource = [{ id: "0" }];
+    getAction("/pos/posType/list", { pageNo: 1, pageSize: 99 }).then((res) => {
+      if (res.success) {
+        this.posTypeList = res.result.records;
+        if (this.posTypeList && this.posTypeList.length > 0) {
+          this.tabPosTypeId = this.posTypeList[0].id;
+          this.loadRegion();
+        }
+      }
+    });
+  },
+  methods: {
+    hours(start) {
+      var beginDate = new Date(start);
+      var endDate = new Date();
+      let hours = parseInt((endDate - beginDate) / (1000 * 60 * 60));
+      let leave1 =
+        (endDate.getTime() - beginDate.getTime()) % (24 * 3600 * 1000);
+      let leave2 = leave1 % (3600 * 1000);
+      let minutes = Math.floor(leave2 / (60 * 1000));
+      // return minutes == 0 ? hours : hours + 1;
+      return hours.toString().padStart(2, "0") + ":" + minutes.toString().padStart(2, "0");
+    },
+    getStatusColor(status) {
+      var find = this.statusColorList.find((t) => t.status == status);
+      return find ? find.color : "#fff";
+    },
+    loadTree() {
+      var that = this;
+      tree().then((res) => {
+        if (res.success) {
+          this.treeData = res.result;
+        }
+      });
+    },
+    modalFormOk() {},
+    modalFormOk2(e) {
+      console.log(e);
+      var good = JSON.parse(JSON.stringify(e));
+      this.$set(good, "num", 1);
+      this.selectGoodsList.push(good);
+    },
+    modalSelectCheckInRoomOrderFormOk(e) {
+      console.log(e);
+      this.selectRoomOrder = e;
+    },
+    modalPickingGoodsOrderFormOk(e) {
+      console.log(e);
+      if (e && e.orderDetailList && e.orderDetailList.length > 0) {
+        this.selectOrderInfo = e.orderInfo;
+        e.orderDetailList.forEach((t) => {
+          t.sellingPrice = t.payMoney;
+          t.name = t.goodsName;
+          t.id = t.goodsId;
+        });
+        this.selectGoodsList = e.orderDetailList;
+      }
+    },
+    numChange(e, index) {
+      console.log(e);
+      if (e <= 0) {
+        this.selectGoodsList.splice(index, 1);
+      }
+    },
+    handleClear() {
+      this.selectGoodsList = [];
+      // this.selectOrderInfo = {};
+    },
+    tabPosTypeChange(e) {
+      this.loadRegion();
+    },
+    tabRegionChange(e) {
+      this.loadTables();
+    },
+    statusClick(index) {
+      this.statusColorList.forEach((t) => {
+        if (t.check) {
+          t.check = false;
+        }
+      });
+      this.statusColorList[index].check = true;
+      if (index === 0) {
+        this.state = undefined;
+      } else {
+        this.state = this.statusColorList[index].status;
+      }
+      this.loadTables();
+    },
+    loadRegion() {
+      getAction("/pos/posRegion/list", {
+        posTypeId: this.tabPosTypeId,
+      }).then((res) => {
+        if (res.success) {
+          this.regionList = res.result.records;
+        }
+      });
+      this.loadTables();
+    },
+    loadTables() {
+      var obj = {
+        pageNo: 1,
+        pageSize: 99999,
+        posTypeId: this.tabPosTypeId,
+        state: this.state,
+      };
+      if (this.tabPosRegionId != "1") {
+        obj.posRegionId = this.tabPosRegionId;
+      }
+      getAction("/pos/posTable/tableList", obj).then((res) => {
+        if (res.success) {
+          this.dataSource = res.result.records;
+        }
+      });
+    },
+    handleDelete() {
+      deleteAction("/pos/posSellClearGoods/delete", {
+        goodsId: this.selectGoods.id,
+      })
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+            this.sellClear = 0;
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    handleSelectCheckInRoomOrder() {
+      this.$refs.modalSelectCheckInRoomOrderModal.add();
+      this.$refs.modalSelectCheckInRoomOrderModal.title = "选择转帐人";
+      this.$refs.modalSelectCheckInRoomOrderModal.disableSubmit = false;
+    },
+    handlePickingGoodsOrder() {
+      this.$refs.modalPickingGoodsOrderForm.add();
+      this.$refs.modalPickingGoodsOrderForm.title = "取单";
+      this.$refs.modalPickingGoodsOrderForm.disableSubmit = false;
+    },
+    handleAddTempGoods() {
+      this.$refs.modalGoodsForm.add();
+      this.$refs.modalGoodsForm.title = "新增菜品";
+      this.$refs.modalGoodsForm.disableSubmit = false;
+    },
+    handleToRoomFeePayment() {
+      this.handleAdd();
+    },
+    handlePayment() {
+      this.handleAdd((e) => {
+        var amount = this.oldSelectGoodsList.reduce(function (total, item) {
+          return total + item.sellingPrice * item.num;
+        }, 0);
+        this.$refs.modalPaymentForm.edit({
+          billAmount: amount,
+          deposit: 0,
+          roomFee: amount,
+          subjectType: 5,
+          feeType: 2,
+          preferentialType: 1,
+          couponFirstAmount: 0,
+          discount: 9,
+          orderCode: e,
+        });
+        this.$refs.modalPaymentForm.title = "POS结账";
+        this.$refs.modalPaymentForm.disableSubmit = false;
+      });
+    },
+    handleAdd(callback) {
+      if (!this.selectGoodsList || this.selectGoodsList.length <= 0) {
+        this.$message.warning("请先选择商品");
+        return;
+      }
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      var model = { goodsId: this.selectGoods.id };
+      if (_info) {
+        model.hotelId = _info.id;
+      }
+      model.id = this.selectOrderInfo.id;
+      model.toRoomFeeOrderId = this.selectRoomOrder.id;
+      model.posType = this.tabPosTypeId;
+      var posOrderGoodsDetailList = [];
+      this.selectGoodsList.forEach((t) => {
+        posOrderGoodsDetailList.push({
+          goodsId: t.id,
+          num: t.num,
+          money: t.sellingPrice,
+        });
+      });
+      model.posOrderGoodsDetailList = posOrderGoodsDetailList;
+      postAction("/pos/posOrderGoods/add", model)
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.oldSelectGoodsList = JSON.parse(
+              JSON.stringify(this.selectGoodsList)
+            );
+            this.selectGoodsList = [];
+            this.selectOrderInfo = {};
+            this.selectRoomOrder = {};
+            this.loadGoods();
+            if (callback) {
+              callback(res.result.code);
+            }
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    modalUserNmumFormOk() {
+      this.loadTables();
+      this.$router.push({
+        name: "pos-tablediandan",
+        params: { tableId: this.selectTable.id },
+      });
+    },
+    itemClick(row) {
+      var that = this;
+      console.log(row);
+      this.selectTable = row;
+      if (row.state === 0) {
+        this.$refs.modalUserNmumForm.edit({ id: row.id, userNum: 1 });
+        this.$refs.modalUserNmumForm.title = "就餐人数";
+        this.$refs.modalUserNmumForm.disableSubmit = false;
+      } else if (row.state === 4) {
+        this.$confirm({
+          content: "确定是否要清除房台?",
+          onOk: function () {
+            var model = JSON.parse(JSON.stringify(row));
+            model.state = 0;
+            model.userNum = 0;
+            model.orderTime = null;
+            postAction("/pos/posTable/edit", model).then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.loadTables();
+              } else {
+                that.$message.warning(res.message);
+              }
+            });
+          },
+        });
+      } else {
+        this.$router.push({
+          name: "pos-tablediandan",
+          params: { tableId: row.id },
+        });
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+.room-item {
+  height: 110px;
+  /* line-height: 200px; */
+  font-size: 13px;
+  padding: 0px 5px;
+  border-radius: 5px;
+  cursor: pointer;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+.check {
+  border: #000 solid 1px;
+}
+.ant-table-wrapper {
+  height: calc(100vh - 500px);
+}
+/deep/ .card-pd .ant-card-body {
+  padding: 0 !important;
+}
+.select-cell {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+  z-index: 10;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+.w-choose-status {
+  display: flex;
+  /* justify-content: flex-end; */
+  /* width: 200px; */
+  margin-bottom: 20px;
+}
+
+.w-choose-status > div {
+  /* width: 100%; */
+  /* flex: 1; */
+  display: flex;
+  padding: 0 2%;
+  white-space: nowrap;
+  line-height: 20px;
+  box-sizing: border-box;
+  cursor: pointer;
+  align-items: center;
+}
+
+.w-choose-status > div .square {
+  display: flex;
+  width: 16px;
+  height: 16px;
+  border-radius: 4px;
+  box-sizing: border-box;
+  border: #000 solid 1px;
+}
+
+.w-choose-status > div .title {
+  display: flex;
+  align-items: center;
+  line-height: 16px;
+  padding-left: 4px;
+  font-size: 14px;
+  box-sizing: border-box;
+}
+.status-check {
+  border: #000 solid 1px;
+  padding: 8px;
+  /* width: 80px; */
+  height: 29px;
+  justify-content: center;
+  background-color: #ccc;
+  border-radius: 4px;
+}
+</style>

+ 0 - 1
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -427,7 +427,6 @@ import CustomerModal from "./CustomerModal.vue";
 import RefundModal from "./RefundModal.vue";
 import PaymentModal from "./PaymentModal.vue";
 import { match } from "assert";
-import { postAction } from "../../../../api/manage";
 const columns = [
   // {
   //     title: "",

+ 1 - 1
src/views/settings/components/paramSettings.vue

@@ -493,7 +493,7 @@
 <!--                                        <a-select-option value="4">总房间数-维修房数-自用房数</a-select-option>-->
 
                                         <a-select-option v-for="(item,index) in cardinalList" style="width: 100%"
-                                                         :key="index" :value="item.value">{{ item.text || item.label }}</a-select-option>-->
+                                                         :key="index" :value="item.value">{{ item.text || item.label }}</a-select-option>
                                     </a-select>
 <!--                                    <j-dict-select-tag v-model="computeFormulaModel.cardinal" placeholder="请选择" dictCode="rental_rate_base"-->
 <!--                                                       @change="onComputeFormulaChange()"/>-->