|
|
@@ -2,10 +2,10 @@
|
|
|
<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="model.subjectType==6? 12: 24">
|
|
|
+ <a-row style="display:flex;justify-content:center;">
|
|
|
+ <a-col :span="12">
|
|
|
<a-form-model-item label="消费项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="subjectType">
|
|
|
- <a-select v-model="model.subjectType" style="width: 100%" placeholder="消费项目" :allowClear="true">
|
|
|
+ <a-select v-model="model.subjectType" style="50%" placeholder="消费项目" :allowClear="true">
|
|
|
<a-select-option :value="1">押金</a-select-option>
|
|
|
<a-select-option :value="2">预收房费</a-select-option>
|
|
|
<a-select-option :value="3">每日房费</a-select-option>
|
|
|
@@ -16,7 +16,7 @@
|
|
|
<a-row>
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money">
|
|
|
- <a-input-number v-model="model.money" placeholder="请输入金额" :min="0"></a-input-number>
|
|
|
+ <a-input-number :disabled="model.subjectType==6" v-model="model.money" placeholder="请输入金额" :min="0"></a-input-number>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
@@ -25,18 +25,18 @@
|
|
|
<a-row>
|
|
|
<a-col :span="24">
|
|
|
<a-space>
|
|
|
- <a-input v-model="queryParams.goodsName" placeholder="名称" />
|
|
|
- <a-button type="primary">搜索</a-button>
|
|
|
+ <a-input v-model="queryParams.name" placeholder="名称" />
|
|
|
+ <a-button @click="searchQuery" type="primary">搜索</a-button>
|
|
|
</a-space>
|
|
|
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- <a-table :columns="columns" :dataSource="dataSource" style="margin-top:10px;">
|
|
|
- <template slot="price">
|
|
|
- <a-input-number :min="0"></a-input-number>
|
|
|
+ <a-table :columns="columns" :loading="loading" :dataSource="dataSource" style="margin-top:10px;">
|
|
|
+ <template slot="sellingPrice" slot-scope="text, record">
|
|
|
+ <a-input-number v-model="record.sellingPrice" :min="0"></a-input-number>
|
|
|
</template>
|
|
|
- <template slot="num">
|
|
|
- <a-input-number :min="0"></a-input-number>
|
|
|
+ <template slot="number" slot-scope="text, record">
|
|
|
+ <a-input-number v-model="record.number" :min="0"></a-input-number>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
</a-col>
|
|
|
@@ -62,9 +62,11 @@ import {
|
|
|
validateDuplicateValue
|
|
|
} from "@/utils/util";
|
|
|
|
|
|
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
export default {
|
|
|
name: "BusMemberCardForm",
|
|
|
components: {},
|
|
|
+ mixins:[JeecgListMixin],
|
|
|
props: {
|
|
|
//表单禁用
|
|
|
disabled: {
|
|
|
@@ -82,24 +84,24 @@ export default {
|
|
|
columns: [{
|
|
|
title: "名称",
|
|
|
align: "center",
|
|
|
- dataIndex: "waiter_name",
|
|
|
+ dataIndex: "name",
|
|
|
},
|
|
|
{
|
|
|
title: "售价",
|
|
|
align: "center",
|
|
|
- dataIndex: "price",
|
|
|
- scopedSlots: { customRender: 'price' },
|
|
|
+ dataIndex: "sellingPrice",
|
|
|
+ scopedSlots: { customRender: 'sellingPrice' },
|
|
|
},
|
|
|
{
|
|
|
title: "数量",
|
|
|
align: "center",
|
|
|
- dataIndex: "num",
|
|
|
- scopedSlots: { customRender: 'num' },
|
|
|
+ dataIndex: "number",
|
|
|
+ scopedSlots: { customRender: 'number' },
|
|
|
},
|
|
|
{
|
|
|
title: "剩余库存",
|
|
|
align: "center",
|
|
|
- dataIndex: "stock",
|
|
|
+ dataIndex: "inventory",
|
|
|
},
|
|
|
],
|
|
|
model: {
|
|
|
@@ -137,7 +139,7 @@ export default {
|
|
|
}],
|
|
|
},
|
|
|
url: {
|
|
|
- add: "/business/busRoomBookingOrders/booking-to-live",
|
|
|
+ list: "/rooms/cesGoods/queryList",
|
|
|
edit: "/business/busMemberCard/edit",
|
|
|
queryById: "/business/busMemberCard/queryById",
|
|
|
},
|
|
|
@@ -161,6 +163,17 @@ export default {
|
|
|
//备份model原始值
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
|
|
this.getbusCustomer();
|
|
|
+ // getAction('/kc/kcGoods/list').then(res=>{
|
|
|
+ // if (res.success) {
|
|
|
+ // this.dataSource = res.result.records;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // getAction('/rooms/cesGoods/queryList').then(res=>{
|
|
|
+ // if (res.success) {
|
|
|
+ // this.dataSource = res.result.records;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
handleSearch(value) {
|