|
@@ -19,66 +19,81 @@
|
|
|
v-model="model.cusName"
|
|
v-model="model.cusName"
|
|
|
placeholder="联系人"
|
|
placeholder="联系人"
|
|
|
@search="handleSearch"
|
|
@search="handleSearch"
|
|
|
- @select="(e) => handleSelectMember(e)" style="width: 70%;"
|
|
|
|
|
|
|
+ @select="(e) => handleSelectMember(e)"
|
|
|
|
|
+ style="width: 70%;"
|
|
|
>
|
|
>
|
|
|
<template slot="dataSource">
|
|
<template slot="dataSource">
|
|
|
- <a-select-option v-for="item in customerList" :key="item.id"
|
|
|
|
|
- >{{ item.name }}-{{ item.phone }}</a-select-option
|
|
|
|
|
|
|
+ <a-select-option
|
|
|
|
|
+ v-for="item in customerList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ >{{ item.name }}-{{ item.phone }}</a-select-option
|
|
|
>
|
|
>
|
|
|
</template>
|
|
</template>
|
|
|
</a-auto-complete>
|
|
</a-auto-complete>
|
|
|
- <a-button @click="readCardNo" style="margin-left: 10px"
|
|
|
|
|
- >读取身份证</a-button
|
|
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ @click="readCardNo"
|
|
|
|
|
+ style="margin-left: 10px"
|
|
|
|
|
+ >读取身份证</a-button
|
|
|
>
|
|
>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="8">
|
|
|
|
|
|
|
+ <a-col :span="18" style="display: flex">
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
- label="性别"
|
|
|
|
|
|
|
+ label="性别"
|
|
|
:labelCol="{
|
|
:labelCol="{
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 4 },
|
|
|
|
|
- }"
|
|
|
|
|
|
|
+ xs: { span: 24 },
|
|
|
|
|
+ sm: { span: 13 },
|
|
|
|
|
+ }"
|
|
|
:wrapperCol="{
|
|
:wrapperCol="{
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 16 },
|
|
|
|
|
- }"
|
|
|
|
|
|
|
+ xs: { span: 24 },
|
|
|
|
|
+ sm: { span: 11 },
|
|
|
|
|
+ }"
|
|
|
prop="gender"
|
|
prop="gender"
|
|
|
|
|
+ style="flex: 1"
|
|
|
>
|
|
>
|
|
|
<a-radio-group v-model="model.gender">
|
|
<a-radio-group v-model="model.gender">
|
|
|
<a-radio :value="1">男</a-radio>
|
|
<a-radio :value="1">男</a-radio>
|
|
|
<a-radio :value="2">女</a-radio>
|
|
<a-radio :value="2">女</a-radio>
|
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="8">
|
|
|
|
|
- <a-form-model-item
|
|
|
|
|
- label="年龄"
|
|
|
|
|
- :labelCol="{
|
|
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 6 },
|
|
|
|
|
- }"
|
|
|
|
|
- :wrapperCol="{
|
|
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 10 },
|
|
|
|
|
- }">
|
|
|
|
|
- <a-input></a-input>
|
|
|
|
|
- </a-form-model-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="8">
|
|
|
|
|
|
|
+
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
- label="名族:"
|
|
|
|
|
- :labelCol="{
|
|
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 6 },
|
|
|
|
|
- }"
|
|
|
|
|
- :wrapperCol="{
|
|
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 10 },
|
|
|
|
|
- }">
|
|
|
|
|
- <a-input></a-input>
|
|
|
|
|
|
|
+ label="民族"
|
|
|
|
|
+ :labelCol="{
|
|
|
|
|
+ xs: { span: 24 },
|
|
|
|
|
+ sm: { span: 3 },
|
|
|
|
|
+ }"
|
|
|
|
|
+ :wrapperCol="{
|
|
|
|
|
+ xs: { span: 24 },
|
|
|
|
|
+ sm: { span: 10 },
|
|
|
|
|
+ }"
|
|
|
|
|
+ prop="nation"
|
|
|
|
|
+ style="flex: 1"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-model="model.nation"
|
|
|
|
|
+
|
|
|
|
|
+ :filterOption="filterOption">
|
|
|
|
|
+ <a-select-option v-for="item in nationArr" :value="item">{{ item }}</a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
|
|
+ <!-- <a-col :span="8">-->
|
|
|
|
|
+ <!-- <a-form-model-item-->
|
|
|
|
|
+ <!-- label="年龄"-->
|
|
|
|
|
+ <!-- :labelCol="labelCol"-->
|
|
|
|
|
+ <!-- :wrapperCol="wrapperCol">-->
|
|
|
|
|
+ <!-- <a-input></a-input>-->
|
|
|
|
|
+ <!-- </a-form-model-item>-->
|
|
|
|
|
+ <!-- </a-col>-->
|
|
|
|
|
+ <!-- <a-col :span="8">-->
|
|
|
|
|
+ <!-- <a-form-model-item-->
|
|
|
|
|
+ <!-- label="名族:"-->
|
|
|
|
|
+ <!-- :labelCol="labelCol"-->
|
|
|
|
|
+ <!-- :wrapperCol="wrapperCol">-->
|
|
|
|
|
+ <!-- <a-input></a-input>-->
|
|
|
|
|
+ <!-- </a-form-model-item>-->
|
|
|
|
|
+ <!-- </a-col>-->
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
label="手机号"
|
|
label="手机号"
|
|
@@ -92,37 +107,37 @@
|
|
|
></a-input>
|
|
></a-input>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="12">
|
|
|
|
|
|
|
+ <a-col :span="24" style="display: flex">
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
- label="证件类型:"
|
|
|
|
|
- :labelCol="{
|
|
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 4 },
|
|
|
|
|
- }"
|
|
|
|
|
- :wrapperCol="{
|
|
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 10 },
|
|
|
|
|
- }"
|
|
|
|
|
- prop="certType"
|
|
|
|
|
- style="margin: 0px"
|
|
|
|
|
|
|
+ label="证件类型:"
|
|
|
|
|
+ :labelCol="{
|
|
|
|
|
+ xs: { span: 24 },
|
|
|
|
|
+ sm: { span: 15 },
|
|
|
|
|
+ }"
|
|
|
|
|
+ :wrapperCol="{
|
|
|
|
|
+ xs: { span: 24 },
|
|
|
|
|
+ sm: { span: 9 },
|
|
|
|
|
+ }"
|
|
|
|
|
+ prop="certType"
|
|
|
|
|
+ style="margin: 0px; flex:1"
|
|
|
>
|
|
>
|
|
|
- <a-select>
|
|
|
|
|
- <a-select-option value="0">身份证</a-select-option>
|
|
|
|
|
|
|
+ <a-select v-model="model.certType">
|
|
|
|
|
+ <a-select-option :value="1">身份证</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
|
|
+
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
label="证件号"
|
|
label="证件号"
|
|
|
:labelCol="{
|
|
:labelCol="{
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 4 },
|
|
|
|
|
- }"
|
|
|
|
|
|
|
+ xs: { span: 24 },
|
|
|
|
|
+ sm: { span: 5 },
|
|
|
|
|
+ }"
|
|
|
:wrapperCol="{
|
|
:wrapperCol="{
|
|
|
- xs: { span: 24 },
|
|
|
|
|
- sm: { span: 10 },
|
|
|
|
|
- }"
|
|
|
|
|
|
|
+ xs: { span: 24 },
|
|
|
|
|
+ sm: { span: 14 },
|
|
|
|
|
+ }"
|
|
|
prop="certNo"
|
|
prop="certNo"
|
|
|
|
|
+ style="flex: 2"
|
|
|
>
|
|
>
|
|
|
<a-input
|
|
<a-input
|
|
|
v-model="model.certNo"
|
|
v-model="model.certNo"
|
|
@@ -130,6 +145,18 @@
|
|
|
></a-input>
|
|
></a-input>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
|
|
+ <a-col :span="24">
|
|
|
|
|
+ <a-form-model-item
|
|
|
|
|
+ label="地址"
|
|
|
|
|
+ :labelCol="labelCol"
|
|
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
|
|
+ prop="address">
|
|
|
|
|
+ <a-input
|
|
|
|
|
+ v-model="model.address"
|
|
|
|
|
+ placeholder="地址">
|
|
|
|
|
+ </a-input>
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ </a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
</a-form-model>
|
|
</a-form-model>
|
|
|
</j-form-container>
|
|
</j-form-container>
|
|
@@ -137,30 +164,38 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { httpAction, getAction } from "@/api/manage";
|
|
|
|
|
-import { validateDuplicateValue } from "@/utils/util";
|
|
|
|
|
|
|
+import { httpAction, getAction } from '@/api/manage'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- name: "BusMemberCardForm",
|
|
|
|
|
|
|
+ name: 'BusMemberCardForm',
|
|
|
components: {},
|
|
components: {},
|
|
|
props: {
|
|
props: {
|
|
|
- //表单禁用
|
|
|
|
|
|
|
+ // 表单禁用
|
|
|
disabled: {
|
|
disabled: {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false,
|
|
default: false,
|
|
|
- required: false,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ required: false
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- model: { payType: 1, livingOrderId: "", certType: 1, gender: 1 },
|
|
|
|
|
|
|
+ model: {
|
|
|
|
|
+ orderId: '',
|
|
|
|
|
+ cusName: '',
|
|
|
|
|
+ cusPhone: '',
|
|
|
|
|
+ certType: 1,
|
|
|
|
|
+ certNo: '',
|
|
|
|
|
+ address: '',
|
|
|
|
|
+ cusId: 0,
|
|
|
|
|
+ gender: 1,
|
|
|
|
|
+ nation: '' },
|
|
|
labelCol: {
|
|
labelCol: {
|
|
|
xs: { span: 24 },
|
|
xs: { span: 24 },
|
|
|
- sm: { span: 2 },
|
|
|
|
|
|
|
+ sm: { span: 5 }
|
|
|
},
|
|
},
|
|
|
wrapperCol: {
|
|
wrapperCol: {
|
|
|
xs: { span: 24 },
|
|
xs: { span: 24 },
|
|
|
- sm: { span: 16 },
|
|
|
|
|
|
|
+ sm: { span: 16 }
|
|
|
},
|
|
},
|
|
|
confirmLoading: false,
|
|
confirmLoading: false,
|
|
|
validatorRules: {
|
|
validatorRules: {
|
|
@@ -168,86 +203,94 @@ export default {
|
|
|
{
|
|
{
|
|
|
required: true,
|
|
required: true,
|
|
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
|
|
- message: "请输入手机号!",
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ message: '请输入手机号!'
|
|
|
|
|
+ }
|
|
|
],
|
|
],
|
|
|
- cardNo: [{ required: true, message: "请输入会员卡号!" }],
|
|
|
|
|
- gradeId: [{ required: true, message: "请输入等级类型!" }],
|
|
|
|
|
- payType: [{ required: true, message: "请输入付款类型!" }],
|
|
|
|
|
- paymentMethod: [{ required: true, message: "请输入付款方式!" }],
|
|
|
|
|
- cusName: [{ required: true, message: "请输入会员姓名!" }],
|
|
|
|
|
- sex: [{ required: true, message: "请输入性别!" }],
|
|
|
|
|
- certificateType: [{ required: true, message: "请输入证件类型!" }],
|
|
|
|
|
- validity: [{ required: true, message: "请输入有效期!" }],
|
|
|
|
|
|
|
+ cardNo: [{ required: true, message: '请输入会员卡号!' }],
|
|
|
|
|
+ gradeId: [{ required: true, message: '请输入等级类型!' }],
|
|
|
|
|
+ payType: [{ required: true, message: '请输入付款类型!' }],
|
|
|
|
|
+ paymentMethod: [{ required: true, message: '请输入付款方式!' }],
|
|
|
|
|
+ cusName: [{ required: true, message: '请输入会员姓名!' }],
|
|
|
|
|
+ sex: [{ required: true, message: '请输入性别!' }],
|
|
|
|
|
+ certificateType: [{ required: true, message: '请输入证件类型!' }],
|
|
|
|
|
+ validity: [{ required: true, message: '请输入有效期!' }]
|
|
|
},
|
|
},
|
|
|
url: {
|
|
url: {
|
|
|
- add: "/business/busRoomBookingOrders/booking-to-live",
|
|
|
|
|
- edit: "/business/busMemberCard/edit",
|
|
|
|
|
- queryById: "/business/busMemberCard/queryById",
|
|
|
|
|
|
|
+ add: '/business/busRoomBookingOrders/booking-to-live',
|
|
|
|
|
+ edit: '/business/busMemberCard/edit',
|
|
|
|
|
+ queryById: '/business/busMemberCard/queryById'
|
|
|
},
|
|
},
|
|
|
gradeList: [],
|
|
gradeList: [],
|
|
|
paymentMethodList: [],
|
|
paymentMethodList: [],
|
|
|
staffList: [],
|
|
staffList: [],
|
|
|
customerList: [],
|
|
customerList: [],
|
|
|
oldcustomerList: [],
|
|
oldcustomerList: [],
|
|
|
- };
|
|
|
|
|
|
|
+ nationArr: ['汉族', '壮族', '满族', '回族', '苗族', '维吾尔族', '土家族', '彝族', '蒙古族', '藏族', '布依族', '侗族', '瑶族',
|
|
|
|
|
+ '朝鲜族', '白族', '哈尼族', '哈萨克族', '黎族', '傣族', '畲族', '傈僳族', '仡佬族', '东乡族', '高山族', '拉祜族', '水族',
|
|
|
|
|
+ '佤族', '纳西族', '羌族', '土族', '仫佬族', '锡伯族', '柯尔克孜族', '达斡尔族', '景颇族', '毛南族', '撒拉族',
|
|
|
|
|
+ '布朗族', '塔吉克族', '阿昌族', '普米族', '鄂温克族', '怒族', '京族', '基诺族', '德昂族', '保安族', '俄罗斯族',
|
|
|
|
|
+ '裕固族', '乌孜别克族', '门巴族', '鄂伦春族', '独龙族', '塔塔尔族', '赫哲族', '珞巴族']
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
formDisabled() {
|
|
formDisabled() {
|
|
|
- return this.disabled;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ return this.disabled
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
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();
|
|
|
|
|
|
|
+ // 备份model原始值
|
|
|
|
|
+ this.modelDefault = JSON.parse(JSON.stringify(this.model))
|
|
|
|
|
+ this.getbusCustomer()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
readCardNo() {
|
|
readCardNo() {
|
|
|
- this.$message.error("接口程序未打开,请打开接口程序");
|
|
|
|
|
|
|
+ this.$message.error('接口程序未打开,请打开接口程序')
|
|
|
},
|
|
},
|
|
|
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.cusPhone = find.phone;
|
|
|
|
|
- this.model.cusName = find.name;
|
|
|
|
|
- this.model.cusId = find.id;
|
|
|
|
|
|
|
+ var find = this.customerList.find((t) => t.id === e)
|
|
|
|
|
+ this.model.cusPhone = find.phone
|
|
|
|
|
+ this.model.cusName = find.name
|
|
|
|
|
+ this.model.cusId = 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))
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ filterOption(input, nationArr) {
|
|
|
|
|
+ return nationArr.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
},
|
|
},
|
|
|
add(livingOrderId, roomId) {
|
|
add(livingOrderId, roomId) {
|
|
|
- this.modelDefault.livingOrderId = livingOrderId;
|
|
|
|
|
- this.modelDefault.roomId = roomId;
|
|
|
|
|
- this.edit(this.modelDefault);
|
|
|
|
|
|
|
+ this.modelDefault.livingOrderId = livingOrderId
|
|
|
|
|
+ this.modelDefault.roomId = roomId
|
|
|
|
|
+ this.edit(this.modelDefault)
|
|
|
},
|
|
},
|
|
|
edit(record) {
|
|
edit(record) {
|
|
|
- this.model = Object.assign({}, record);
|
|
|
|
|
- this.visible = true;
|
|
|
|
|
|
|
+ this.model = Object.assign({}, record)
|
|
|
|
|
+ this.visible = true
|
|
|
},
|
|
},
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
- const that = this;
|
|
|
|
|
|
|
+ const that = this
|
|
|
// 触发表单验证
|
|
// 触发表单验证
|
|
|
this.$refs.form.validate((valid) => {
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- that.confirmLoading = true;
|
|
|
|
|
|
|
+ that.confirmLoading = true
|
|
|
// var customers = [];
|
|
// var customers = [];
|
|
|
// customers.push({
|
|
// customers.push({
|
|
|
// certNo: this.model.certNo,
|
|
// certNo: this.model.certNo,
|
|
@@ -259,24 +302,24 @@ export default {
|
|
|
// roomId: this.model.roomId,
|
|
// roomId: this.model.roomId,
|
|
|
// });
|
|
// });
|
|
|
httpAction(
|
|
httpAction(
|
|
|
- "/business/busRoomBookingOrders/update-orders?type=2",
|
|
|
|
|
|
|
+ '/business/busRoomBookingOrders/update-orders?type=2',
|
|
|
this.model,
|
|
this.model,
|
|
|
- "post"
|
|
|
|
|
|
|
+ 'post'
|
|
|
)
|
|
)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
- that.$message.success("修改成功");
|
|
|
|
|
- that.$emit("ok");
|
|
|
|
|
|
|
+ that.$message.success('修改成功')
|
|
|
|
|
+ that.$emit('ok')
|
|
|
} else {
|
|
} else {
|
|
|
- that.$message.warning(res.message);
|
|
|
|
|
|
|
+ that.$message.warning(res.message)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.finally(() => {
|
|
.finally(() => {
|
|
|
- that.confirmLoading = false;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ that.confirmLoading = false
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|