<template>
	<uni-collapse class="fwnr-collapse-box"  @change="handleChange">
		<uni-collapse-item title="丙方服务费" :open="true">
			<view class="form-label-input">
				<view class="fwnr-form-label"><text class="form-label-require"></text>服务费=乙方基本月报酬x倍数</view>
				<uni-easyinput v-model="data.hetong.fuwufeiRate" placeholder="请输入倍数" />
			</view>
			<view class="form-label-input form-label-disabled">
				<view class="fwnr-form-label"><text class="form-label-require"></text>即人民币(元)</view>
				<view>{{money}}</view>
			</view>
		</uni-collapse-item>
	</uni-collapse>
</template>

<script setup>
	import {
		useHetong
	} from "../useHetong.js"
	import {computed} from "vue";
	const {
		injectHetong
	} = useHetong();
	
	const data = injectHetong();
	
	
	
	const emits = defineEmits(['change'])
	
	const money = computed(() => {
		if (data.hetong.baochou && data.hetong.fuwufeiRate) {
			data.hetong.fuwufei = data.hetong.baochou * data.hetong.fuwufeiRate;
			return data.hetong.baochou * data.hetong.fuwufeiRate
		} else {
			data.hetong.fuwufei = 0;
			return 0
		}
	})
	
	
	function handleChange() {
		emits('change')
	}
</script>

<style>
</style>