|
@@ -0,0 +1,227 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <a-spin :spinning="confirmLoading">
|
|
|
|
|
+ <j-form-container :disabled="formDisabled">
|
|
|
|
|
+ <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
|
|
|
|
+ <a-row type="flex">
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-model-item label="订单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ <!-- <a-input v-model="model.tenantId" placeholder="请输入关联租户" ></a-input> -->
|
|
|
|
|
+ {{model.code}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+
|
|
|
|
|
+ <a-form-model-item label="区域" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ <!-- <a-textarea v-model="model.images" rows="4" placeholder="请输入图片逗号分隔" /> -->
|
|
|
|
|
+ {{model.regionName}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+
|
|
|
|
|
+ <a-form-model-item label="支付方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ <!-- <a-input v-model="model.hotelId" placeholder="请输入关联酒店" ></a-input> -->
|
|
|
|
|
+ {{model.paymentMethod==1? "会员卡" : model.paymentMethod==2? '积分' : '微信'}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+
|
|
|
|
|
+ <a-form-model-item label="下单时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ <!-- <a-input-number v-model="model.userId" placeholder="请输入用户ID" style="width: 100%" /> -->
|
|
|
|
|
+ {{model.createTime}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+
|
|
|
|
|
+ <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ <!-- <a-textarea v-model="model.contentBody" rows="4" placeholder="请输入内容" /> -->
|
|
|
|
|
+ {{model.statusName}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+
|
|
|
|
|
+ <a-form-model-item label="付款状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ <!-- <a-input v-model="model.userName" placeholder="请输入姓名" ></a-input> -->
|
|
|
|
|
+ {{model.payStatus==1? '已付款': '未付款'}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+
|
|
|
|
|
+ <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ <!-- <a-input v-model="model.roomNo" placeholder="请输入房号" ></a-input> -->
|
|
|
|
|
+ {{model.remarks}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <!-- <a-col :span="12">
|
|
|
|
|
+ <a-card title="订单信息" :bordered="false" style="width: 100%">
|
|
|
|
|
+ <a-form-model-item label="订房状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ {{roomStatusFilter(model.status)}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ <a-form-model-item label="付款金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ {{model.money}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ {{model.remark}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ <a-form-model-item label="积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ {{'0'}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ <a-form-model-item label="会员折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ {{model.memberZk}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ <a-form-model-item label="优惠券" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ {{model.couponMoney}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ <a-form-model-item label="免房券" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" style="margin-bottom:0px;">
|
|
|
|
|
+ {{'--'}}
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ </a-card>
|
|
|
|
|
+ </a-col> -->
|
|
|
|
|
+ <a-col :span="24">
|
|
|
|
|
+ <h3>详情</h3>
|
|
|
|
|
+ <a-table :columns="columns" :dataSource="model.detailList || []">
|
|
|
|
|
+ <template slot="goodsName" slot-scope="text, record">
|
|
|
|
|
+ {{text.goodsInfo.name}}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ </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: 'CesOrderMessageForm',
|
|
|
|
|
+ components: {
|
|
|
|
|
+ },
|
|
|
|
|
+ props: {
|
|
|
|
|
+ //表单禁用
|
|
|
|
|
+ disabled: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false,
|
|
|
|
|
+ required: false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ data () {
|
|
|
|
|
+ return {
|
|
|
|
|
+ model:{
|
|
|
|
|
+ },
|
|
|
|
|
+ columns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "名称",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ dataIndex: "",
|
|
|
|
|
+ scopedSlots: { customRender: "goodsName" }
|
|
|
|
|
+ },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // title: "订单号",
|
|
|
|
|
+ // align: "center",
|
|
|
|
|
+ // dataIndex: "orderCode",
|
|
|
|
|
+ // },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "价格",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ dataIndex: "money",
|
|
|
|
|
+ // customRender: function (text) {
|
|
|
|
|
+ // return Number(text.money) + Number(text.memberZk) + Number(text.couponMoney)
|
|
|
|
|
+ // }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "数量",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ dataIndex: "num",
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ 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: '请输入关联酒店!'},
|
|
|
|
|
+ ],
|
|
|
|
|
+ messageType: [
|
|
|
|
|
+ { required: true, message: '请输入留言类型 1 投诉 2建议!'},
|
|
|
|
|
+ ],
|
|
|
|
|
+ createDate: [
|
|
|
|
|
+ { required: true, message: '请输入创建时间!'},
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ url: {
|
|
|
|
|
+ add: "/order/cesOrderMessage/add",
|
|
|
|
|
+ edit: "/order/cesOrderMessage/edit",
|
|
|
|
|
+ queryById: "/order/cesOrderMessage/queryById"
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ formDisabled(){
|
|
|
|
|
+ return this.disabled
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ created () {
|
|
|
|
|
+ //备份model原始值
|
|
|
|
|
+ this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ add () {
|
|
|
|
|
+ this.edit(this.modelDefault);
|
|
|
|
|
+ },
|
|
|
|
|
+ edit (record) {
|
|
|
|
|
+ console.log(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;
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ roomStatusFilter(status){
|
|
|
|
|
+ switch (status) {
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ return '未付款';
|
|
|
|
|
+ case 2:
|
|
|
|
|
+ return '已付款';
|
|
|
|
|
+ case 3:
|
|
|
|
|
+ return '已取消';
|
|
|
|
|
+ case 4:
|
|
|
|
|
+ return '已完成';
|
|
|
|
|
+ case 5:
|
|
|
|
|
+ return '待入住';
|
|
|
|
|
+ case 6:
|
|
|
|
|
+ return '已入住';
|
|
|
|
|
+ case 7:
|
|
|
|
|
+ return '退款中';
|
|
|
|
|
+ default: '--'
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</script>
|