<template>
	<!-- 报价/客户支付模态框 -->
	<view class="cu-modal" :class="show?'show':''">
		<view class="cu-dialog">
			<view class="cu-bar bg-white justify-end solid-bottom">
				<view class="content">报价/客户支付</view>
				<view class="action" data-modal="showNewServPriceModal" @click="hideModal">
					<text class="cuIcon-close text-red"></text>
				</view>
			</view>
			<view class="padding padding-lr-xl bg-white text-left">
				<view>上门后新增的报价</view>
				<view class="flex justify-start margin-top-sm align-center">
					<text>报价总额：</text>
					<input class="radius-input" v-model="newPrice"></input>
					<text>元</text>
				</view>
				<view class="margin-top text-sm text-red">
					<view>注：无新增支付则无需填写</view>
					<view>预先报价待再次上门的需填写/如维修类</view>
				</view>
			</view>
			<view class="cu-bar bg-white solid-top">
				<view class="action margin-0 flex-sub text-black" data-modal="showNewServPriceModal"
					@click="newServPrice">确定报价</view>
				<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showNewServPriceModal"
					@click="letCustomerPay">请客户支付</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		nama: 'new-serv-price',
		props: {
			show: {
				type: Boolean,
				default: false
			},
			data: {
				type: Object,
				default: {}
			}
		},
		data() {
			return {
				newPrice: ''
			}
		},
		methods: {
			hideModal(e) {
				uni.$emit(this.$globalFun.HIDE_MODAL, e);
			},
			newServPrice(e) {
				uni.$emit(this.$globalFun.NEW_SERV_PRICE, e)
			},
			letCustomerPay(e) {
				uni.$emit(this.$globalFun.LET_CUSTOMER_PAY, e)
			}
		}
	}
</script>

<style>
</style>
