|
@@ -1,126 +1,142 @@
|
|
|
<template>
|
|
<template>
|
|
|
-<a-spin :spinning="confirmLoading">
|
|
|
|
|
|
|
+ <a-spin :spinning="confirmLoading">
|
|
|
<j-form-container :disabled="formDisabled">
|
|
<j-form-container :disabled="formDisabled">
|
|
|
- <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
|
|
|
|
- <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" placeholder="消费项目" :allowClear="true">
|
|
|
|
|
- <a-select-option :value="6">商品</a-select-option>
|
|
|
|
|
- <a-select-option :value="10">手工房费</a-select-option>
|
|
|
|
|
- <a-select-option :value="11">水电煤抄表</a-select-option>
|
|
|
|
|
- <a-select-option :value="12">赔偿费</a-select-option>
|
|
|
|
|
- </a-select>
|
|
|
|
|
- </a-form-model-item>
|
|
|
|
|
- <a-col :span="24">
|
|
|
|
|
-<!-- <a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" v-if="model.subjectType==6">-->
|
|
|
|
|
-<!-- <a-input-number :disabled="model.subjectType==6" v-model="goodsPrice" placeholder="请输入金额" :min="0"></a-input-number>-->
|
|
|
|
|
-<!-- </a-form-model-item>-->
|
|
|
|
|
- <a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money" v-if="model.subjectType !== 6">
|
|
|
|
|
- <a-input-number v-model="model.money" placeholder="请输入金额" :min="0"></a-input-number>
|
|
|
|
|
- </a-form-model-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col v-if="model.subjectType==6" :span="12">
|
|
|
|
|
- <a-space>
|
|
|
|
|
- <a-input v-model="queryParams.name" placeholder="名称" />
|
|
|
|
|
- <a-button @click="searchQuery" type="primary">搜索</a-button>
|
|
|
|
|
- </a-space>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-row>
|
|
|
|
|
- <!-- <a-row>
|
|
|
|
|
|
|
+ <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
|
|
|
|
+ <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" placeholder="消费项目" :allowClear="true">
|
|
|
|
|
+ <a-select-option :value="6">商品</a-select-option>
|
|
|
|
|
+ <a-select-option :value="10">手工房费</a-select-option>
|
|
|
|
|
+ <a-select-option :value="11">水电煤抄表</a-select-option>
|
|
|
|
|
+ <a-select-option :value="12">赔偿费</a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ <a-col :span="24">
|
|
|
|
|
+ <!-- <a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" v-if="model.subjectType==6">-->
|
|
|
|
|
+ <!-- <a-input-number :disabled="model.subjectType==6" v-model="goodsPrice" placeholder="请输入金额" :min="0"></a-input-number>-->
|
|
|
|
|
+ <!-- </a-form-model-item>-->
|
|
|
|
|
+ <a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money" v-if="model.subjectType !== 6">
|
|
|
|
|
+ <a-input-number v-model="model.money" placeholder="请输入金额" :min="0"></a-input-number>
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col v-if="model.subjectType==6" :span="12">
|
|
|
|
|
+ <a-space>
|
|
|
|
|
+ <a-input v-model="queryParams.name" placeholder="名称" />
|
|
|
|
|
+ <a-button @click="loadData" type="primary">搜索</a-button>
|
|
|
|
|
+ </a-space>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <!-- <a-row>
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money">
|
|
<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 v-model="model.money" placeholder="请输入金额" :min="0"></a-input-number>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row> -->
|
|
</a-row> -->
|
|
|
- <a-row >
|
|
|
|
|
- <a-table v-if="model.subjectType==6" :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="number" slot-scope="text, record">
|
|
|
|
|
- <a-input-number :max="record.inventory" v-model="record.number" @change="changeNumber" :min="0"></a-input-number>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template slot="inventorySlot" slot-scope="text,record">
|
|
|
|
|
- {{record.inventory - record.number}}
|
|
|
|
|
- </template>
|
|
|
|
|
- </a-table>
|
|
|
|
|
- </a-row>
|
|
|
|
|
- </a-form-model>
|
|
|
|
|
|
|
+ <a-row >
|
|
|
|
|
+ <a-table v-if="model.subjectType==6" :columns="columns" @change="pageChange" :dataSource="dataSource" :pagination="ipagination" :scroll="{ y: 500 }" 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="number" slot-scope="text, record">
|
|
|
|
|
+ <a-input-number :max="record.inventory" v-model="record.number" @change="changeNumber" :min="0"></a-input-number>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template slot="inventorySlot" slot-scope="text,record">
|
|
|
|
|
+ {{ record.inventory - record.number }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </a-form-model>
|
|
|
|
|
|
|
|
</j-form-container>
|
|
</j-form-container>
|
|
|
-</a-spin>
|
|
|
|
|
|
|
+ </a-spin>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import {
|
|
import {
|
|
|
httpAction,
|
|
httpAction,
|
|
|
getAction
|
|
getAction
|
|
|
-} from "@/api/manage";
|
|
|
|
|
|
|
+} from '@/api/manage'
|
|
|
import {
|
|
import {
|
|
|
validateDuplicateValue
|
|
validateDuplicateValue
|
|
|
-} from "@/utils/util";
|
|
|
|
|
|
|
+} from '@/utils/util'
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
JeecgListMixin
|
|
JeecgListMixin
|
|
|
} from '@/mixins/JeecgListMixin'
|
|
} from '@/mixins/JeecgListMixin'
|
|
|
export default {
|
|
export default {
|
|
|
- name: "BusMemberCardForm",
|
|
|
|
|
|
|
+ name: 'BusMemberCardForm',
|
|
|
components: {},
|
|
components: {},
|
|
|
- mixins: [JeecgListMixin],
|
|
|
|
|
props: {
|
|
props: {
|
|
|
- //表单禁用
|
|
|
|
|
|
|
+ // 表单禁用
|
|
|
disabled: {
|
|
disabled: {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false,
|
|
default: false,
|
|
|
- required: false,
|
|
|
|
|
|
|
+ required: false
|
|
|
},
|
|
},
|
|
|
livingOrderId: {
|
|
livingOrderId: {
|
|
|
- type: String,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ type: String
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- dataSource: [],
|
|
|
|
|
- columns: [{
|
|
|
|
|
- title: "名称",
|
|
|
|
|
- align: "center",
|
|
|
|
|
- dataIndex: "name",
|
|
|
|
|
|
|
+ dataSource: [],
|
|
|
|
|
+ columns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '名称',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ dataIndex: 'name'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: "售价",
|
|
|
|
|
- align: "center",
|
|
|
|
|
- dataIndex: "sellingPrice",
|
|
|
|
|
|
|
+ title: '售价',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ dataIndex: 'sellingPrice',
|
|
|
scopedSlots: {
|
|
scopedSlots: {
|
|
|
customRender: 'sellingPrice'
|
|
customRender: 'sellingPrice'
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: "数量",
|
|
|
|
|
- align: "center",
|
|
|
|
|
- dataIndex: "number",
|
|
|
|
|
|
|
+ title: '数量',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ dataIndex: 'number',
|
|
|
|
|
+ width: '80',
|
|
|
scopedSlots: {
|
|
scopedSlots: {
|
|
|
customRender: 'number'
|
|
customRender: 'number'
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: "剩余库存",
|
|
|
|
|
- align: "center",
|
|
|
|
|
- dataIndex: "inventory",
|
|
|
|
|
|
|
+ title: '剩余库存',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ dataIndex: 'inventory',
|
|
|
|
|
+ width: '80',
|
|
|
scopedSlots: {
|
|
scopedSlots: {
|
|
|
customRender: 'inventorySlot'
|
|
customRender: 'inventorySlot'
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
],
|
|
],
|
|
|
- model: {
|
|
|
|
|
|
|
+ ipagination: {
|
|
|
|
|
+ current: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ pageSizeOptions: ['10', '20', '30'],
|
|
|
|
|
+ showTotal: (total, range) => {
|
|
|
|
|
+ return range[0] + "-" + range[1] + " 共" + total + "条"
|
|
|
|
|
+ },
|
|
|
|
|
+ showQuickJumper: true,
|
|
|
|
|
+ showSizeChanger: true,
|
|
|
|
|
+ total: 0
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ model: {
|
|
|
payType: 1,
|
|
payType: 1,
|
|
|
- livingOrderId: "",
|
|
|
|
|
|
|
+ livingOrderId: '',
|
|
|
certType: 1,
|
|
certType: 1,
|
|
|
gender: 1,
|
|
gender: 1,
|
|
|
subjectType: 6,
|
|
subjectType: 6,
|
|
|
|
|
+ vipCustomerId: null
|
|
|
},
|
|
},
|
|
|
|
|
+ markerMemberCard: {},
|
|
|
queryParams: {},
|
|
queryParams: {},
|
|
|
labelCol: {
|
|
labelCol: {
|
|
|
xs: {
|
|
xs: {
|
|
@@ -128,7 +144,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
sm: {
|
|
sm: {
|
|
|
span: 5
|
|
span: 5
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
wrapperCol: {
|
|
wrapperCol: {
|
|
|
xs: {
|
|
xs: {
|
|
@@ -136,34 +152,34 @@ export default {
|
|
|
},
|
|
},
|
|
|
sm: {
|
|
sm: {
|
|
|
span: 16
|
|
span: 16
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
confirmLoading: false,
|
|
confirmLoading: false,
|
|
|
validatorRules: {
|
|
validatorRules: {
|
|
|
subjectType: [{
|
|
subjectType: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: "请输入消费项目!"
|
|
|
|
|
|
|
+ message: '请输入消费项目!'
|
|
|
}],
|
|
}],
|
|
|
money: [{
|
|
money: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: "请输入金额!"
|
|
|
|
|
- }],
|
|
|
|
|
|
|
+ message: '请输入金额!'
|
|
|
|
|
+ }]
|
|
|
},
|
|
},
|
|
|
url: {
|
|
url: {
|
|
|
- list: "/rooms/cesGoods/kf-goods-list",
|
|
|
|
|
- edit: "/business/busMemberCard/edit",
|
|
|
|
|
- queryById: "/business/busMemberCard/queryById",
|
|
|
|
|
|
|
+ list: '/rooms/cesGoods/kf-goods-list',
|
|
|
|
|
+ edit: '/business/busMemberCard/edit',
|
|
|
|
|
+ queryById: '/business/busMemberCard/queryById'
|
|
|
},
|
|
},
|
|
|
gradeList: [],
|
|
gradeList: [],
|
|
|
paymentMethodList: [],
|
|
paymentMethodList: [],
|
|
|
staffList: [],
|
|
staffList: [],
|
|
|
customerList: [],
|
|
customerList: [],
|
|
|
- oldcustomerList: [],
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ oldcustomerList: []
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
formDisabled() {
|
|
formDisabled() {
|
|
|
- return this.disabled;
|
|
|
|
|
|
|
+ return this.disabled
|
|
|
},
|
|
},
|
|
|
goodsPrice() {
|
|
goodsPrice() {
|
|
|
let money = this.dataSource.reduce((pre, cur) => pre + cur.sellingPrice * (cur.number || 0), 0)
|
|
let money = this.dataSource.reduce((pre, cur) => pre + cur.sellingPrice * (cur.number || 0), 0)
|
|
@@ -171,71 +187,86 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- var _info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
|
|
|
|
|
+ var _info = JSON.parse(localStorage.getItem('storeInfo'))
|
|
|
if (_info) {
|
|
if (_info) {
|
|
|
- this.model.hotelId = _info.id;
|
|
|
|
|
|
|
+ this.model.hotelId = _info.id
|
|
|
}
|
|
}
|
|
|
- //备份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;
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
|
|
+ // 备份model原始值
|
|
|
|
|
+ this.modelDefault = JSON.parse(JSON.stringify(this.model))
|
|
|
|
|
+ this.getbusCustomer()
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
changeNumber() {
|
|
changeNumber() {
|
|
|
- console.log(this.dataSource);
|
|
|
|
|
|
|
+ console.log(this.dataSource)
|
|
|
},
|
|
},
|
|
|
handleSearch(value) {
|
|
handleSearch(value) {
|
|
|
- let result;
|
|
|
|
|
|
|
+ let result
|
|
|
if (!value) {
|
|
if (!value) {
|
|
|
- result = this.oldcustomerList;
|
|
|
|
|
|
|
+ result = this.oldcustomerList
|
|
|
} else {
|
|
} else {
|
|
|
- result = this.oldcustomerList.filter((t) => t.name.includes(value));
|
|
|
|
|
|
|
+ result = this.oldcustomerList.filter((t) => t.name.includes(value))
|
|
|
}
|
|
}
|
|
|
- this.customerList = result;
|
|
|
|
|
|
|
+ this.customerList = result
|
|
|
},
|
|
},
|
|
|
handleSelectMember(e) {
|
|
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;
|
|
|
|
|
|
|
+ var find = this.customerList.find((t) => t.id === e)
|
|
|
|
|
+ this.model.phone = find.phone
|
|
|
|
|
+ this.model.customerName = find.name
|
|
|
|
|
+ this.model.customerId = find.id
|
|
|
},
|
|
},
|
|
|
getbusCustomer() {
|
|
getbusCustomer() {
|
|
|
- getAction("/bus/busCustomer/list", {}).then((res) => {
|
|
|
|
|
|
|
+ getAction('/bus/busCustomer/list', {}).then((res) => {
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
- this.customerList = res.result.records;
|
|
|
|
|
- this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
|
|
|
|
|
|
|
+ this.customerList = res.result.records
|
|
|
|
|
+ this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList))
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- add(livingOrderId, roomId) {
|
|
|
|
|
- this.modelDefault.livingOrderId = livingOrderId;
|
|
|
|
|
- this.modelDefault.roomId = roomId;
|
|
|
|
|
- this.edit(this.modelDefault);
|
|
|
|
|
|
|
+ getMarkerMemberByCarId() {
|
|
|
|
|
+ console.log(this.model)
|
|
|
|
|
+ if (this.model.vipCustomerId == null || this.model.vipCustomerId === '') {
|
|
|
|
|
+ this.markerMemberCard = null;
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.markerMemberCard != null && this.markerMemberCard.goodsDiscount != null) {
|
|
|
|
|
+ this.dataSource.forEach(e => {
|
|
|
|
|
+ e.sellingPrice = e.sellingPrice * this.markerMemberCard.goodsDiscount / 100
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.model.vipCustomerId)
|
|
|
|
|
+ getAction('/business/busMemberCard/getMarkerMemberByCarId', { id: this.model.vipCustomerId }).then((res) => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.markerMemberCard = res.result
|
|
|
|
|
+ this.dataSource.forEach(e => {
|
|
|
|
|
+ e.sellingPrice = e.sellingPrice * this.markerMemberCard.goodsDiscount / 100
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ add(obj) {
|
|
|
|
|
+ this.modelDefault.livingOrderId = obj.livingOrderId
|
|
|
|
|
+ this.modelDefault.roomId = obj.roomId
|
|
|
|
|
+ this.modelDefault.vipCustomerId = obj.vipCustomerId
|
|
|
|
|
+ this.edit(this.modelDefault)
|
|
|
},
|
|
},
|
|
|
edit(record) {
|
|
edit(record) {
|
|
|
- this.model = Object.assign({}, record);
|
|
|
|
|
- this.visible = true;
|
|
|
|
|
|
|
+ this.model = Object.assign({}, record)
|
|
|
|
|
+ this.visible = true
|
|
|
|
|
+ this.loadData()
|
|
|
},
|
|
},
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
- const that = this;
|
|
|
|
|
|
|
+ const that = this
|
|
|
// 触发表单验证
|
|
// 触发表单验证
|
|
|
this.$refs.form.validate((valid) => {
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- if (this.dataSource.every(ele=>ele.number==0) && this.model.subjectType == 6) {
|
|
|
|
|
- this.$message.warning("请至少选择一件商品")
|
|
|
|
|
|
|
+ if (this.dataSource.every(ele => ele.number == 0) && this.model.subjectType == 6) {
|
|
|
|
|
+ this.$message.warning('请至少选择一件商品')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- that.confirmLoading = true;
|
|
|
|
|
- var orders = [];
|
|
|
|
|
|
|
+ that.confirmLoading = true
|
|
|
|
|
+ var orders = []
|
|
|
let feeGood = {}
|
|
let feeGood = {}
|
|
|
|
|
|
|
|
if (this.model.subjectType === 6) {
|
|
if (this.model.subjectType === 6) {
|
|
@@ -250,7 +281,7 @@ export default {
|
|
|
money: ele.sellingPrice * (ele.number || 0),
|
|
money: ele.sellingPrice * (ele.number || 0),
|
|
|
subjectType: this.model.subjectType,
|
|
subjectType: this.model.subjectType,
|
|
|
feeGoodVo: feeGood
|
|
feeGoodVo: feeGood
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
that.model.money = that.goodsPrice
|
|
that.model.money = that.goodsPrice
|
|
@@ -262,55 +293,61 @@ export default {
|
|
|
}
|
|
}
|
|
|
orders.push({
|
|
orders.push({
|
|
|
money: this.model.money,
|
|
money: this.model.money,
|
|
|
- subjectType: this.model.subjectType,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ subjectType: this.model.subjectType
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- this.model.orders = orders;
|
|
|
|
|
- this.model.livingOrderId = this.livingOrderId;
|
|
|
|
|
- httpAction("/business/busRoomBookingOrders/set-living-order-fee?livingOrderId=" + this.livingOrderId, orders, "post")
|
|
|
|
|
|
|
+ this.model.orders = orders
|
|
|
|
|
+ this.model.livingOrderId = this.livingOrderId
|
|
|
|
|
+ httpAction('/business/busRoomBookingOrders/set-living-order-fee?livingOrderId=' + this.livingOrderId, orders, 'post')
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
- that.$message.success(res.message);
|
|
|
|
|
- that.$emit("ok");
|
|
|
|
|
|
|
+ that.$message.success(res.message)
|
|
|
|
|
+ that.$emit('ok')
|
|
|
} else {
|
|
} else {
|
|
|
- that.$message.warning(res.message);
|
|
|
|
|
|
|
+ that.$message.warning(res.message)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.finally(() => {
|
|
.finally(() => {
|
|
|
- that.confirmLoading = false;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ that.confirmLoading = false
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
loadData(arg) {
|
|
loadData(arg) {
|
|
|
if (this.url.list == 2) {
|
|
if (this.url.list == 2) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if (!this.url.list) {
|
|
if (!this.url.list) {
|
|
|
- this.$message.error("请设置url.list属性!")
|
|
|
|
|
|
|
+ this.$message.error('请设置url.list属性!')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- //加载数据 若传入参数1则加载第一页的内容
|
|
|
|
|
|
|
+ // 加载数据 若传入参数1则加载第一页的内容
|
|
|
if (arg === 1) {
|
|
if (arg === 1) {
|
|
|
- this.ipagination.current = 1;
|
|
|
|
|
|
|
+ this.ipagination.current = 1
|
|
|
}
|
|
}
|
|
|
- var params = this.getQueryParams(); //查询条件
|
|
|
|
|
- this.loading = true;
|
|
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ pageSize: this.ipagination.pageSize,
|
|
|
|
|
+ pageNo: this.ipagination.current,
|
|
|
|
|
+ name: this.queryParams.name
|
|
|
|
|
+ }
|
|
|
|
|
+ this.loading = true
|
|
|
getAction(this.url.list, params).then((res) => {
|
|
getAction(this.url.list, params).then((res) => {
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
- //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
|
|
|
|
+ // update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
let arr = []
|
|
let arr = []
|
|
|
- arr = res.result.records || res.result;
|
|
|
|
|
- arr.forEach(ele=>{
|
|
|
|
|
|
|
+ arr = res.result.records || res.result
|
|
|
|
|
+ arr.forEach(ele => {
|
|
|
ele.number = 0
|
|
ele.number = 0
|
|
|
})
|
|
})
|
|
|
- this.dataSource = JSON.parse(JSON.stringify(arr));
|
|
|
|
|
|
|
+ this.dataSource = JSON.parse(JSON.stringify(arr))
|
|
|
if (res.result.total) {
|
|
if (res.result.total) {
|
|
|
- this.ipagination.total = res.result.total;
|
|
|
|
|
|
|
+ this.ipagination.total = res.result.total
|
|
|
} else {
|
|
} else {
|
|
|
- this.ipagination.total = 0;
|
|
|
|
|
|
|
+ this.ipagination.total = 0
|
|
|
}
|
|
}
|
|
|
- //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
|
|
|
|
+ this.getMarkerMemberByCarId()
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ // update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.warning(res.message)
|
|
this.$message.warning(res.message)
|
|
|
}
|
|
}
|
|
@@ -318,6 +355,11 @@ export default {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- },
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ pageChange(page) {
|
|
|
|
|
+ console.log(page)
|
|
|
|
|
+ this.ipagination = page
|
|
|
|
|
+ this.loadData()
|
|
|
|
|
+ },
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|