|
@@ -8,122 +8,154 @@
|
|
|
slot="detail"
|
|
slot="detail"
|
|
|
>
|
|
>
|
|
|
<a-row>
|
|
<a-row>
|
|
|
- <a-col :span="24">
|
|
|
|
|
- <a-form-model-item
|
|
|
|
|
- label="收款金额"
|
|
|
|
|
- :labelCol="labelCol"
|
|
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
|
|
- >
|
|
|
|
|
- {{ model.collection.toFixed(2) }}元
|
|
|
|
|
- </a-form-model-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="24">
|
|
|
|
|
- <a-form-model-item
|
|
|
|
|
- label="消费金额"
|
|
|
|
|
- :labelCol="labelCol"
|
|
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
|
|
- >
|
|
|
|
|
- {{ model.consumption.toFixed(2) }}元
|
|
|
|
|
- <a-switch v-model="model.coupon" />优惠
|
|
|
|
|
- </a-form-model-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
|
|
+ <!-- <a-col :span="12">
|
|
|
|
|
|
|
|
- <template v-if="model.coupon">
|
|
|
|
|
- <a-col :span="24">
|
|
|
|
|
- <a-form-model-item
|
|
|
|
|
- label="优惠方式"
|
|
|
|
|
|
|
+ </a-col> -->
|
|
|
|
|
+ <div class="crad_style">
|
|
|
|
|
+ <a-col :span="8" class="refund_style" v-show="showYinshou">
|
|
|
|
|
+ <!-- <a-form-model-item
|
|
|
|
|
+ :label=""结账应" + (model.money < 0 ? "退" : "收")"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
: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>
|
|
|
|
|
|
|
+ prop="money"
|
|
|
|
|
+ > -->
|
|
|
|
|
+ <span>{{ "应" + (model.money < 0 ? "退" : "收") }}: {{ Math.abs(model.money.toFixed(2)) }}元</span>
|
|
|
|
|
+ <!-- </a-form-model-item> -->
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="24" v-if="model.preferentialType == 2">
|
|
|
|
|
|
|
+ <a-col :span="16">
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
- label="优惠金额"
|
|
|
|
|
|
|
+ label="收款金额"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="couponFirstAmount"
|
|
|
|
|
>
|
|
>
|
|
|
- <a-input-number
|
|
|
|
|
- style="width: 100px"
|
|
|
|
|
- :min="0"
|
|
|
|
|
- v-model="model.couponFirstAmount"
|
|
|
|
|
- placeholder="请输入优惠金额"
|
|
|
|
|
- ></a-input-number
|
|
|
|
|
- >元
|
|
|
|
|
|
|
+
|
|
|
|
|
+ {{ model.collection.toFixed(2) }}元
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="24">
|
|
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
- label="惠后金额"
|
|
|
|
|
|
|
+ label="消费金额"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
>
|
|
>
|
|
|
- {{ couponAmount.toFixed(2) }}元
|
|
|
|
|
|
|
+ {{ model.consumption.toFixed(2) }}元
|
|
|
|
|
+ <a-switch v-model="model.coupon" />优惠
|
|
|
|
|
+ <a-radio-group v-if='model.coupon' 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-form-model-item>
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="24">
|
|
|
|
|
|
|
+ <!-- <a-col :span="24" v-if="model.preferentialType == 2"> -->
|
|
|
|
|
+ <div 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>
|
|
|
|
|
+ </div>
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
- label="优惠券"
|
|
|
|
|
|
|
+ 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-form-model-item
|
|
|
|
|
+ label="惠后金额"
|
|
|
|
|
+ :labelCol="labelCol"
|
|
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ couponAmount.toFixed(2) }}元
|
|
|
|
|
+ </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">
|
|
|
|
|
+
|
|
|
|
|
+ <a-col :span="24">
|
|
|
|
|
+
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-col> -->
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- <a-form-model-item
|
|
|
|
|
+ :label=""实" + (this.isRefund ? "退" : "收") + "金额""
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
: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" />使用优惠券
|
|
|
|
|
|
|
+ {{ realityAmount.toFixed(2) }}元
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- </template>
|
|
|
|
|
|
|
+ <a-col :span="24">
|
|
|
|
|
+
|
|
|
|
|
+ </a-col> -->
|
|
|
|
|
|
|
|
- <a-col :span="24" v-show="showYinshou">
|
|
|
|
|
- <a-form-model-item
|
|
|
|
|
- :label=""结账应" + (model.money < 0 ? "退" : "收")"
|
|
|
|
|
- :labelCol="labelCol"
|
|
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
|
|
- prop="money"
|
|
|
|
|
- >
|
|
|
|
|
- {{ Math.abs(model.money.toFixed(2)) }}元
|
|
|
|
|
- </a-form-model-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="24">
|
|
|
|
|
- <a-form-model-item
|
|
|
|
|
- :label=""实" + (this.isRefund ? "退" : "收") + "金额""
|
|
|
|
|
- :labelCol="labelCol"
|
|
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
|
|
- >
|
|
|
|
|
- {{ realityAmount.toFixed(2) }}元
|
|
|
|
|
- </a-form-model-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="24">
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <!-- <a-col :span="24">-->
|
|
|
|
|
+
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="presentation_style" v-if="model.money > 0">应收金额=消费合计/惠后金额-已收合计</div>
|
|
|
|
|
+ <a-col :span="14" class="receipt_style" v-if="model.money > 0">
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
:label="(this.isRefund ? "退" : "收") + "款金额""
|
|
:label="(this.isRefund ? "退" : "收") + "款金额""
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
@@ -196,7 +228,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="24">
|
|
|
|
|
|
|
+ <a-col :span="14" class="settle_style" v-if="model.money > 0">
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
:label=""实" + (this.isRefund ? "退" : "收") + "合计""
|
|
:label=""实" + (this.isRefund ? "退" : "收") + "合计""
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
@@ -205,6 +237,28 @@
|
|
|
{{ Math.abs(sumAmount.toFixed(2)) }}元
|
|
{{ Math.abs(sumAmount.toFixed(2)) }}元
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
|
|
+ <div class="presentation_style_two" v-if="model.money < 0">退款:</div>
|
|
|
|
|
+ <a-col :span="24">
|
|
|
|
|
+ <a-table :columns="columns" :data-source="feeList" bordered>
|
|
|
|
|
+ <template slot="payType" slot-scope="text, record, index">
|
|
|
|
|
+ {{ getPayTypeText(text) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template slot="subjectType" slot-scope="text, record, index">
|
|
|
|
|
+ {{ getSubjectTypeText(text,record) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template slot="roomId" slot-scope="text, record, index">
|
|
|
|
|
+ {{ getRoomName(text) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template slot="refundType" slot-scope="text, record, index">
|
|
|
|
|
+ <a-select style="width: 100px" v-model="record.refundType">
|
|
|
|
|
+ <a-select-option v-for="(item, key) in payTypeList" :key="key" :value="item.id" :disabled="item.disable">{{ item.name }}</a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template slot="prerefund" slot-scope="text, record, index">
|
|
|
|
|
+ <a-input-number :max="record.money - record.returnMoney" v-model="record.prerefund"></a-input-number>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ </a-col>
|
|
|
<a-col :span="24" style="text-align: end">
|
|
<a-col :span="24" style="text-align: end">
|
|
|
<a-checkbox default-checked>打印结账单</a-checkbox>
|
|
<a-checkbox default-checked>打印结账单</a-checkbox>
|
|
|
<a-checkbox default-checked>打印发票二维码</a-checkbox>
|
|
<a-checkbox default-checked>打印发票二维码</a-checkbox>
|
|
@@ -216,7 +270,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { httpAction, getAction } from '@/api/manage'
|
|
|
|
|
|
|
+import { httpAction, getAction,postAction } from '@/api/manage'
|
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
|
import moment from 'moment/moment'
|
|
import moment from 'moment/moment'
|
|
|
|
|
|
|
@@ -238,6 +292,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ feeList: [],
|
|
|
isRefund: false,
|
|
isRefund: false,
|
|
|
model: {
|
|
model: {
|
|
|
coupon: false,
|
|
coupon: false,
|
|
@@ -293,6 +348,97 @@ export default {
|
|
|
memeberCouponList: [],
|
|
memeberCouponList: [],
|
|
|
agreementUnitData: {},
|
|
agreementUnitData: {},
|
|
|
copyRealityAmount: '', // 原本值
|
|
copyRealityAmount: '', // 原本值
|
|
|
|
|
+ allFeeMoney: 0,
|
|
|
|
|
+ allReturnFee: 0,
|
|
|
|
|
+ columns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '收款时间',
|
|
|
|
|
+ dataIndex: 'createTime',
|
|
|
|
|
+ width: '25%',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '收款金额(元)',
|
|
|
|
|
+ dataIndex: 'id',
|
|
|
|
|
+ width: '15%',
|
|
|
|
|
+ customRender: function (text, record) {
|
|
|
|
|
+ return record.money
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '退款方式',
|
|
|
|
|
+ dataIndex: 'payType',
|
|
|
|
|
+ width: '40%',
|
|
|
|
|
+ scopedSlots: { customRender: 'refundType' }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '退款金额(元)',
|
|
|
|
|
+ dataIndex: 'prerefund',
|
|
|
|
|
+ scopedSlots: { customRender: 'prerefund' }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '已退金额(元)',
|
|
|
|
|
+ dataIndex: 'returnMoney',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+// [
|
|
|
|
|
+// {
|
|
|
|
|
+// title: '房间号',
|
|
|
|
|
+// dataIndex: 'roomName',
|
|
|
|
|
+// width: 80,
|
|
|
|
|
+// align: 'center',
|
|
|
|
|
+// // scopedSlots: { customRender: 'roomId' }
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// title: '支付类型',
|
|
|
|
|
+// dataIndex: 'payType',
|
|
|
|
|
+// align: 'center',
|
|
|
|
|
+// width: 80,
|
|
|
|
|
+// scopedSlots: { customRender: 'payType' }
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// title: '费项',
|
|
|
|
|
+// dataIndex: 'subjectType',
|
|
|
|
|
+// align: 'center',
|
|
|
|
|
+// width: 100,
|
|
|
|
|
+// scopedSlots: { customRender: 'subjectType' }
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// title: '入账日期',
|
|
|
|
|
+// dataIndex: 'dayTime',
|
|
|
|
|
+// align: 'center',
|
|
|
|
|
+// width: 110,
|
|
|
|
|
+// customRender: function (text, record) {
|
|
|
|
|
+// return record.createTime.substring(0, 10)
|
|
|
|
|
+// }
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// title: '支付金额',
|
|
|
|
|
+// dataIndex: 'id',
|
|
|
|
|
+// align: 'center',
|
|
|
|
|
+// width: 90,
|
|
|
|
|
+// customRender: function (text, record) {
|
|
|
|
|
+// return record.money
|
|
|
|
|
+// }
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// title: '退款方式',
|
|
|
|
|
+// // dataIndex: 'id',
|
|
|
|
|
+// align: 'center',
|
|
|
|
|
+// width: 130,
|
|
|
|
|
+// scopedSlots: { customRender: 'refundType' }
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// title: '本次退款',
|
|
|
|
|
+// dataIndex: 'prerefund',
|
|
|
|
|
+// align: 'center',
|
|
|
|
|
+// scopedSlots: { customRender: 'prerefund' }
|
|
|
|
|
+// },
|
|
|
|
|
+// {
|
|
|
|
|
+// title: '已退款',
|
|
|
|
|
+// align: 'center',
|
|
|
|
|
+// dataIndex: 'returnMoney',
|
|
|
|
|
+// }
|
|
|
|
|
+// ]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -319,7 +465,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
sum = this.model.consumption
|
|
sum = this.model.consumption
|
|
|
- debugger
|
|
|
|
|
}
|
|
}
|
|
|
return sum
|
|
return sum
|
|
|
},
|
|
},
|
|
@@ -353,6 +498,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
// 备份model原始值
|
|
// 备份model原始值
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model))
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model))
|
|
|
|
|
+ // this.refundRequest()
|
|
|
// getAction("/business/busRoomPayType/list", {
|
|
// getAction("/business/busRoomPayType/list", {
|
|
|
// pageSize: 99999,
|
|
// pageSize: 99999,
|
|
|
// pageNo: 1,
|
|
// pageNo: 1,
|
|
@@ -467,7 +613,9 @@ export default {
|
|
|
this.edit(this.modelDefault)
|
|
this.edit(this.modelDefault)
|
|
|
},
|
|
},
|
|
|
edit(record) {
|
|
edit(record) {
|
|
|
|
|
+ // console.log(record);
|
|
|
this.model = Object.assign({}, record)
|
|
this.model = Object.assign({}, record)
|
|
|
|
|
+ // console.log(this.model);
|
|
|
this.isRefund = this.model.isRefund
|
|
this.isRefund = this.model.isRefund
|
|
|
// if (record.preferentialMoney !== 0 && record.preferentialMoney !== null) {
|
|
// if (record.preferentialMoney !== 0 && record.preferentialMoney !== null) {
|
|
|
// console.log(record.preferentialMoney)
|
|
// console.log(record.preferentialMoney)
|
|
@@ -477,6 +625,7 @@ export default {
|
|
|
// this.model.couponFirstAmount = record.preferentialMoney
|
|
// this.model.couponFirstAmount = record.preferentialMoney
|
|
|
// }
|
|
// }
|
|
|
this.getbusRoomPayType()
|
|
this.getbusRoomPayType()
|
|
|
|
|
+ this.refundRequest()
|
|
|
if (this.model.vipCustomerId) {
|
|
if (this.model.vipCustomerId) {
|
|
|
this.getMemeberCouponList()
|
|
this.getMemeberCouponList()
|
|
|
}
|
|
}
|
|
@@ -614,7 +763,106 @@ export default {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ // 退款列表请求数据
|
|
|
|
|
+ refundRequest() {
|
|
|
|
|
+ let returnFeeList = []
|
|
|
|
|
+ // let feeList = []
|
|
|
|
|
+ console.log(this.model);
|
|
|
|
|
+ let livingOrderIds = this.model.livingOrderId
|
|
|
|
|
+ console.log(livingOrderIds);
|
|
|
|
|
+ if (this.model.money < 0) {
|
|
|
|
|
+ postAction('/business/busOrderFee/refundList', livingOrderIds
|
|
|
|
|
+ // pageNo: 1,
|
|
|
|
|
+ // pageSize: 99,
|
|
|
|
|
+ // conditions: 900,
|
|
|
|
|
+ // mobile: this.model.vipCustomerId
|
|
|
|
|
+ ).then((res) => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.feeList = res.result
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ let templist = this.feeList
|
|
|
|
|
+ templist.forEach(e => {
|
|
|
|
|
+ if (e.returnItem == true) {
|
|
|
|
|
+ e.money = -e.money;
|
|
|
|
|
+ returnFeeList.push(e)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ console.log(templist);
|
|
|
|
|
+ console.log(returnFeeList);
|
|
|
|
|
+
|
|
|
|
|
+ templist.forEach(e => {
|
|
|
|
|
+ let returnMoney = returnFeeList.filter(ele => e.id === ele.returnFeeId).reduce((accumulator, ele) => accumulator + ele.money, 0)
|
|
|
|
|
+ e.returnMoney = returnMoney;
|
|
|
|
|
+ })
|
|
|
|
|
+ templist.forEach(cust => [
|
|
|
|
|
+ // let tempfeelist = returnFeeList.filter(curr => {curr.returnFeeId == cust.id})
|
|
|
|
|
+ // let tempfeelist = returnFeeList.filter(function(item, index, array) {
|
|
|
|
|
+ // return curr.returnFeeId == cust.id
|
|
|
|
|
+ // })
|
|
|
|
|
+ // console.log(tempfeelist);
|
|
|
|
|
+ returnFeeList.forEach(curr => {
|
|
|
|
|
+ if (cust.returnFeeId == curr.returnFeeId) {
|
|
|
|
|
+ let tempindex = templist.findIndex(temp => temp == cust)
|
|
|
|
|
+ templist.splice(tempindex,1)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ ])
|
|
|
|
|
+
|
|
|
|
|
+ console.log(returnFeeList);
|
|
|
|
|
+ // templist.forEach(e => {
|
|
|
|
|
+ // if (e.returnItem == true) {
|
|
|
|
|
+ // e.money = -e.money;
|
|
|
|
|
+ // returnFeeList.push(e)
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // // 如果是收款
|
|
|
|
|
+ // // e.returnMoney = 0
|
|
|
|
|
+ // // e.prerefund = 0
|
|
|
|
|
+ // // var room = this.model.filter(room => room.roomId === e.roomId)
|
|
|
|
|
+ // // e.roomName = room[0].roomName
|
|
|
|
|
+ // // this.$set(e, 'refundType', e.payType)
|
|
|
|
|
+ // // let payTypeList = JSON.parse(JSON.stringify(this.payTypeList));
|
|
|
|
|
+ // // console.log(room[0].livingOrder.vipCustomerId)
|
|
|
|
|
+ // // console.log(room[0].livingOrder.contractTeamId)
|
|
|
|
|
+ // // console.log(vipIndex)
|
|
|
|
|
+ // // console.log(danweiIndex)
|
|
|
|
|
+ // // this.$set(payTypeList[vipIndex], 'disable', room[0].livingOrder.vipCustomerId == null || room[0].livingOrder.vipCustomerId === '')
|
|
|
|
|
+ // // this.$set(payTypeList[danweiIndex], 'disable', room[0].livingOrder.contractTeamId == null)
|
|
|
|
|
+ // // this.$set(e, 'payTypeList', payTypeList)
|
|
|
|
|
+ // // feeList.push(e)
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.feeList = feeList
|
|
|
|
|
+ // this.allFeeMoney = 0
|
|
|
|
|
+ // this.allReturnFee = 0
|
|
|
|
|
+ // this.feeList.forEach(e => {
|
|
|
|
|
+ // // 当前收款对象下所有的退款记录
|
|
|
|
|
+ // let returnMoney = returnFeeList.filter(ele => e.id === ele.returnFeeId).reduce((accumulator, ele) => accumulator + ele.money, 0)
|
|
|
|
|
+ // e.returnMoney = returnMoney;
|
|
|
|
|
+ // this.allFeeMoney += e.money;
|
|
|
|
|
+ // this.allReturnFee += returnMoney;
|
|
|
|
|
+ // // console.log(returnMoney);
|
|
|
|
|
+ // })
|
|
|
|
|
+ // console.log(this.feeList);
|
|
|
|
|
+ // console.log(this.templist);
|
|
|
|
|
+ // this.feeList.forEach(index => {
|
|
|
|
|
+ // templist.forEach(item => {
|
|
|
|
|
+ // if (index.id == item.returnFeeId) {
|
|
|
|
|
+ // let tempindex = this.feeList.findIndex(item)
|
|
|
|
|
+ // this.feeList.slice(tempindex,1)
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // })
|
|
|
|
|
+
|
|
|
|
|
+ // this.feeList.forEach(item => {
|
|
|
|
|
+
|
|
|
|
|
+ // })
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -635,4 +883,47 @@ export default {
|
|
|
cursor: not-allowed;
|
|
cursor: not-allowed;
|
|
|
opacity: 0.5;
|
|
opacity: 0.5;
|
|
|
}
|
|
}
|
|
|
|
|
+.refund_style {
|
|
|
|
|
+ font-size: 32px;
|
|
|
|
|
+ color: red;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ padding-top: 7%;
|
|
|
|
|
+ /* margin: 0 auto; */
|
|
|
|
|
+ /* display: inline-block; */
|
|
|
|
|
+ /* margin-top: 60px; */
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+.crad_style {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ background-color: #fcfcfc;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ border-radius: 5%;
|
|
|
|
|
+}
|
|
|
|
|
+.ant-col-16 {
|
|
|
|
|
+ border-left: 2px solid #fc9424;
|
|
|
|
|
+}
|
|
|
|
|
+.ant-form-item {
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+}
|
|
|
|
|
+.presentation_style {
|
|
|
|
|
+ /* font-size: ; */
|
|
|
|
|
+ color: #fc9424;
|
|
|
|
|
+ padding-left: 25px;
|
|
|
|
|
+ padding-bottom: 5px;
|
|
|
|
|
+ border-bottom: 1px solid #fc9424;
|
|
|
|
|
+ padding-top: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+.presentation_style_two {
|
|
|
|
|
+ /* padding-left: 25px; */
|
|
|
|
|
+ /* padding-bottom: 5px; */
|
|
|
|
|
+ border-top: 1px solid #fc9424;
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+ padding: 20px 0px 5px 25px;
|
|
|
|
|
+}
|
|
|
|
|
+.receipt_style {
|
|
|
|
|
+ margin-top: 30px;
|
|
|
|
|
+}
|
|
|
|
|
+.settle_style {
|
|
|
|
|
+ color: red !important;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|