2 Комити 345bc7041c ... 3eb13be828

Аутор SHA1 Порука Датум
  wangxy 3eb13be828 Merge remote-tracking branch 'origin/2025北京诚祥App' into 2025北京诚祥App пре 1 дан
  wangxy c41f86cfde 客户页面 пре 1 дан

+ 28 - 0
api/sanfang.js

@@ -39,6 +39,34 @@ export function getMobanList(data = {}) {
 
 
 
+export function getSanfangCheck(data = {}) {
+  return request({
+    url: '/app/guanliyuan/sanfang/check',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+
+export function getSanfangAdd(data = {}) {
+  return request({
+    url: '/app/guanliyuan/sanfang/add',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+
+
+
 
 
 

+ 50 - 46
pages/admin/Hetong/addSanfangHetong.vue

@@ -17,28 +17,30 @@
 					</view>
 				</picker>
 			</view>
-			
+
 			<!-- 客户信息 -->
-			<kehuCardVue  @select-kehu="onSelectKehu"></kehuCardVue>
+			<kehuCardVue></kehuCardVue>
 			<!-- 家政人员 -->
-			<jiazhengCardVue @select-jzry="onSelectJzry"></jiazhengCardVue>
-			<!-- 合同信息 -->
-			<hetongCardVue @fuwuleixing="onSelectFuwuLeixing"></hetongCardVue>
-			<!-- 其他约定 -->
-			<qiTaYueDingVue @qita="handleUpQita"></qiTaYueDingVue>
-			<!-- 家政签名 -->
-			<qianMingVue @qianming="handleQianming"></qianMingVue>
-		</view>
-		
-		<view class="sfht-info-btn-box">
-			<button type="default" class="phone-green-btn">保存</button>
-		</view>
+			<jiazhengCardVue></jiazhengCardVue>
 
+			<template v-if="data.mobanIndex == 0">
 
-		<!-- <button @click="handleSelct('kh')">选择客户</button>
-	<button @click="handleSelct('jz')">选择家政</button> -->
+				<!-- 合同信息 -->
+				<hetongCardVue></hetongCardVue>
+				<!-- 其他约定 -->
+				<qiTaYueDingVue></qiTaYueDingVue>
+				<!-- 家政签名 -->
+				<qianMingVue></qianMingVue>
 
+			</template>
 
+			<common-dialog ref="commonDialogRef" title="提示" :showQuxiao="false" content="请完善社会信用代码与服务监督热线"
+				@confirm-btn="handleConfirm"></common-dialog>
+		</view>
+
+		<view class="sfht-info-btn-box">
+			<button type="default" class="phone-green-btn" @click="handleAdd">创建合同</button>
+		</view>
 	</view>
 </template>
 
@@ -58,6 +60,7 @@
 	import kehuCardVue from "./components/kehuCard.vue";
 	import qianMingVue from "./components/qianMing.vue";
 	import qiTaYueDingVue from "./components/qiTaYueDing.vue";
+	import commonDialog from '@/components/dialog/commonDialog.vue';
 
 	import {
 		useHetong
@@ -72,18 +75,8 @@
 	const data = reactive({
 		mobanList: [],
 		mobanIndex: null,
-		kehu: {
-			name: '',
-			idCard: '',
-			tel: '',
-			dizhi: '',
-			id: null
-		},
-		jiazheng: {
-			id: null,
-			realName: ''
-		},
 		hetong: {
+			htId: 1, // 合同模板id
 			baochou: '', // 基本月报酬
 			qita: '', // 其他服务
 			bingren: '', // 病人病情
@@ -96,7 +89,6 @@
 			fzHaizi: '', // 辅助照顾孩子人数
 			fzHzNianling: '', // 辅助照顾孩子年龄
 			huli: '', // 产妇护理
-			idcard: '', // 家政身份证号
 			jiabingEndDate: '', // 甲丙服务结束时间
 			jiabingStartDate: '', // 甲丙服务开始时间
 			jiandurexian: '', // 服务监督热线
@@ -120,12 +112,13 @@
 			xinyongdaima: '', // 统一社会信用代码
 			xiuxi: '', // 休息天数
 			khUserName: '', // 客户电话
-			shentizhuangkuang:1,// 身体状态,1 能自理 ,2半自理, 3不能自理
+			shentizhuangkuang: 1, // 身体状态,1 能自理 ,2半自理, 3不能自理
+			beizhu: '', // 备注
+			qianming: '',
 		},
-		beizhu: '', // 备注
-		qianming: '',
-		htId: '', // 三方合同ID
 	})
+	
+	const commonDialogRef = ref(null)
 
 	// 穿透式传参
 	provideHetong(data)
@@ -156,28 +149,39 @@
 		data.mobanIndex = da.detail.value
 	}
 
-	function onSelectKehu(da) {
-		data.kehu = da;
-	}
-
-	function onSelectJzry(da) {
-		data.jiazheng = da;
-	}
-
 	function handleQianming(da) {
 		data.qianming = da;
 	}
 
-	function handleUpQita(da) {
-		data.qita = da;
+	function handleAdd() {
+		const opt = Object({}, {...data.hetong},{htId:data.mobanList[data.mobanIndex].id })
+		
+		httpApi.getSanfangAdd(data.hetong).then(res => {
+			if (res.data) {
+				uni.showToast({
+					title: "创建成功",
+					success() {
+						uni.navigateBack()
+					}
+				})
+			}
+		})
 	}
-
-	function onSelectFuwuLeixing(da) {
-		data.hetong.leixing = da.value;
+	
+	function handleConfirm() {
+		uni.redirectTo({
+			url: '/pages/admin/my/jzInfo' // 跳转完善
+		})
 	}
 
 	onLoad(() => {
-		getMoban();
+		httpApi.getSanfangCheck().then(res => {
+			if (res.data) {
+				getMoban();
+			} else {
+				commonDialogRef.value.handleShow()
+			}
+		})
 	})
 </script>
 

+ 2 - 0
pages/admin/Hetong/components/bingFuWuFei.vue

@@ -30,8 +30,10 @@
 	
 	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
 		}
 	})

+ 2 - 2
pages/admin/Hetong/components/fuWuBaoChou.vue

@@ -7,11 +7,11 @@
 			</view>
 			<view class="form-label-input">
 				<view class="phone-form-label"><text class="form-label-require"></text>基本日报酬(基本月报酬÷工作天数)</view>
-				<uni-easyinput v-model="data.hetong.baochou" placeholder="天数" />
+				<uni-easyinput v-model="data.hetong.tianshu" placeholder="天数" />
 			</view>
 			<view class="form-label-input">
 				<view class="phone-form-label"><text class="form-label-require"></text>乙方每月休息(天)</view>
-				<uni-easyinput v-model="data.hetong.baochou" placeholder="请输入休息天数" />
+				<uni-easyinput v-model="data.hetong.xiuxi" placeholder="请输入休息天数" />
 			</view>
 			<view class="form-label-input">
 				<view class="phone-form-label"><text class="form-label-require"></text>加班费(日报酬x倍数)</view>

+ 14 - 14
pages/admin/Hetong/components/fuzhuXiaohai.vue

@@ -1,34 +1,34 @@
 <template>
-<view class="fwnr-item-box">
+	<view class="fwnr-item-box">
 		<view class="title-row-box">
-			<text>辅助照顾小孩:</text> 
-			 <view class="title-del-btn">
-				 <icon class="del-icon"></icon>
-			 </view>
+			<text>辅助照顾小孩:</text>
+			<view class="title-del-btn">
+				<icon class="del-icon"></icon>
+			</view>
 		</view>
 		<view class="fwnr-label-input">
-			<view class="fwnr-form-label"><text class="form-label-require"></text>照顾孩子</view>
-			<uni-easyinput v-model="data.hetong.lxName" placeholder="请输入照顾几个孩子" />
+			<view class="fwnr-form-label"><text class="form-label-require"></text>孩子人数</view>
+			<uni-easyinput v-model="data.hetong.fzHaizi" placeholder="请输入照顾几个孩子" />
 		</view>
-		<haiziNianlingVue @change="onChange"></haiziNianlingVue>
+		<haiziNianlingVue2 @change="onChange"></haiziNianlingVue2>
 	</view>
 </template>
 
 <script setup>
-	import haiziNianlingVue from './haiziNianling.vue';
-	
+	import haiziNianlingVue2 from './haiziNianling2.vue';
+
 	import {
 		useHetong
 	} from "../useHetong.js"
 	const {
 		injectHetong
 	} = useHetong();
-	
+
 	const emits = defineEmits(['change'])
-	
-	
+
+
 	const data = injectHetong()
-	
+
 	function onChange() {
 		emits('change')
 	}

+ 1 - 6
pages/admin/Hetong/components/hetongCard.vue

@@ -14,11 +14,6 @@
 			</view>
 			
 			<view class="form-label-input" v-if="data.hetong.leixing == 4">
-				<view class="phone-form-label"><text class="form-label-require"></text>服务类型</view>
-				<uni-easyinput v-model="data.hetong.lxName" placeholder="请输入其他类型" />
-			</view>
-			
-			<view class="form-label-input" v-if="data.hetong.leixing == 4">
 				<view class="phone-form-label"><text class="form-label-require"></text>其他类型</view>
 				<uni-easyinput v-model="data.hetong.lxName" placeholder="请输入其他类型" />
 			</view>
@@ -35,7 +30,7 @@
 			</view>
 			<view class="form-label-input" v-if="data.hetong.fangshi == 2">
 				<view class="phone-form-label"><text class="form-label-require"></text>服务时间</view>
-				<uni-easyinput v-model="data.hetong.lxName" placeholder="请输入非住家型服务时间" />
+				<uni-easyinput v-model="data.hetong.fsShijian" placeholder="请输入非住家型服务时间" />
 			</view>
 			<!-- 服务地址 -->
 			<view class="form-label-input">

+ 2 - 2
pages/admin/Hetong/components/jiawuItem.vue

@@ -8,11 +8,11 @@
 		</view>
 		<view class="fwnr-label-input">
 			<view class="fwnr-form-label"><text class="form-label-require"></text>住房面积</view>
-			<uni-easyinput v-model="data.hetong.lxName" placeholder="请输入住房面积" />
+			<uni-easyinput v-model="data.hetong.mianji" placeholder="请输入住房面积" />
 		</view>
 		<view class="fwnr-label-input">
 			<view class="fwnr-form-label"><text class="form-label-require">*</text>常驻人口</view>
-			<uni-easyinput v-model="data.hetong.lxName" placeholder="请输入常驻人口" />
+			<uni-easyinput v-model="data.hetong.renkou" placeholder="请输入常驻人口" />
 		</view>
 	</view>
 </template>

+ 3 - 3
pages/admin/Hetong/components/jiazhengCard.vue

@@ -4,7 +4,7 @@
 		<view class="form-label-select form-radius-box">
 			<view class="phone-form-label"><text class="form-label-require"></text>家政人员</view>
 			<view class="form-radio-select" @click="handleSelect">
-				<view v-show="!!data.jiazheng.realName">{{data.jiazheng.realName}}</view>
+				<view v-show="!!data.hetong.realName">{{data.hetong.realName}}</view>
 				<icon></icon>
 			</view>
 		</view>
@@ -36,8 +36,8 @@
 	}
 	
 	function onJzSelect(da) {
-		data.jiazheng.realName = da.realName;
-		data.jiazheng.userId = da.userId;
+		data.hetong.realName = da.realName;
+		data.hetong.userId = da.userId;
 	}
 </script>
 

+ 4 - 4
pages/admin/Hetong/components/laorenNianling.vue

@@ -34,7 +34,7 @@
 	})
 
 	watchEffect(() => {
-		const list = data.hetong.qzHzNianliang && data.hetong.qzHzNianliang.split(',').map((item,index) => ({
+		const list = data.hetong.lrnianling && data.hetong.lrnianling.split(',').map((item,index) => ({
 			age: item,
 			timer: new Date().getTime()+index
 		}));
@@ -45,7 +45,7 @@
 	})
 
 	function onChange() {
-		data.hetong.qzHzNianliang = myData.children.map(item => item.age).join(',')
+		data.hetong.lrnianling = myData.children.map(item => item.age).join(',')
 	}
 
 	function handleAdd() {
@@ -53,14 +53,14 @@
 			age: '',
 			timer: new Date().getTime()
 		});
-		data.hetong.qzHzNianliang = myData.children.map(item => item.age).join(',')
+		data.hetong.lrnianling = myData.children.map(item => item.age).join(',')
 		emits('change')
 	}
 
 	function handleDelete(timer) {
 		console.log('timer', timer)
 		myData.children = myData.children.filter(item => item.timer != timer)
-		data.hetong.qzHzNianliang = myData.children.map(item => item.age).join(',')
+		data.hetong.lrnianling = myData.children.map(item => item.age).join(',')
 		emits('change')
 	}
 </script>

+ 1 - 2
pages/admin/Hetong/components/qiTaYueDing.vue

@@ -3,7 +3,7 @@
 		<uni-collapse-item title="其他约定" :open="true">
 			<view class="form-label-input flex-start-row">
 				<view class="phone-form-label"><text class="form-label-require"></text>备注</view>
-				<textarea v-model="data.beizhu"  placeholder="请填写备注" class="form-textarea-box" @input="onInputChange"/>
+				<textarea v-model="data.hetong.beizhu"  placeholder="请填写备注" class="form-textarea-box" @input="onInputChange"/>
 			</view>
 		</uni-collapse-item>
 	</uni-collapse>
@@ -15,7 +15,6 @@
 		reactive,
 		nextTick
 	} from "vue";
-	import selectJz from "./selectJz.vue"
 	import {
 		useHetong
 	} from "../useHetong.js"

+ 21 - 20
pages/admin/Hetong/components/qianMing.vue

@@ -1,24 +1,25 @@
 <template>
-	<!-- 合同模板 -->
-	<view class="sfht-mt24">
-		<view class="form-label-select form-radius-box">
-			<view class="phone-form-label"><text class="form-label-require"></text>签名</view>
-			<view class="form-radio-select" @click="handleQianming">
-				<view v-show="!!data.qianming">已签名</view>
-				<icon></icon>
+	<view>
+		<!-- 合同模板 -->
+		<view class="sfht-mt24">
+			<view class="form-label-select form-radius-box">
+				<view class="phone-form-label"><text class="form-label-require"></text>签名</view>
+				<view class="form-radio-select" @click="handleQianming">
+					<view>{{!!data.qianming? '已签名': ''}}</view>
+					<icon></icon>
+				</view>
 			</view>
 		</view>
-	</view>
-	<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
-		<view class="ht-qm-popup">
-			<view class="icon-title-navBar-box">
-				<view @click="goback2" class="nav-bar-icon"></view>
-				<text class="nav-bar-title">签名</text>
+		<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
+			<view class="ht-qm-popup">
+				<view class="icon-title-navBar-box">
+					<view @click="goback2" class="nav-bar-icon"></view>
+					<text class="nav-bar-title">签名</text>
+				</view>
+				<writeSign @getBase64="getBase64"></writeSign>
 			</view>
-			<writeSign @getBase64="getBase64"></writeSign>
-		</view>
-	</uni-popup>
-
+		</uni-popup>
+	</view>
 </template>
 
 <script setup>
@@ -27,7 +28,6 @@
 		reactive,
 		nextTick
 	} from "vue";
-	import selectJz from "./selectJz.vue"
 	import writeSign from "@/components/writeSign/index.vue"
 	import {
 		throttleAdvanced
@@ -38,7 +38,7 @@
 	import {
 		useHetong
 	} from "../useHetong.js"
-	
+
 	const {
 		injectHetong
 	} = useHetong();
@@ -50,6 +50,7 @@
 
 	const handleQM = throttleAdvanced((img) => {
 		data.hetong.qianming = img.replace(/^data:image\/\w+;base64,/, '')
+		goback2();
 	})
 
 	function handleQianming() {
@@ -60,7 +61,7 @@
 		popupRef.value.close()
 	}
 
-	function getBase64(da) {
+	function getBase64(img) {
 		if (!img) {
 			uni.showToast({
 				title: '签名异常'

+ 23 - 2
pages/admin/Hetong/components/quanzhiXiaohai.vue

@@ -1,16 +1,37 @@
 <template>
-	<view></view>
+	<view class="fwnr-item-box">
+		<view class="title-row-box">
+			<text>全职照顾小孩:</text>
+			<view class="title-del-btn">
+				<icon class="del-icon"></icon>
+			</view>
+		</view>
+		<view class="fwnr-label-input">
+			<view class="fwnr-form-label"><text class="form-label-require"></text>孩子人数</view>
+			<uni-easyinput v-model="data.hetong.qzHaizi" placeholder="请输入照顾几个孩子" />
+		</view>
+		<haiziNianlingVue @change="onChange"></haiziNianlingVue>
+	</view>
 </template>
 
 <script setup>
+	import haiziNianlingVue from './haiziNianling.vue';
+
 	import {
 		useHetong
 	} from "../useHetong.js"
 	const {
 		injectHetong
 	} = useHetong();
-	
+
+	const emits = defineEmits(['change'])
+
+
 	const data = injectHetong()
+
+	function onChange() {
+		emits('change')
+	}
 </script>
 
 

+ 0 - 17
pages/admin/Hetong/components/yunfuHuli.vue

@@ -1,17 +0,0 @@
-<template>
-	<view></view>
-</template>
-
-<script setup>
-	import {
-		useHetong
-	} from "./useHetong.js"
-	const {
-		injectHetong
-	} = useHetong();
-	
-	const data = injectHetong()
-</script>
-
-<style>
-</style>

+ 1 - 1
pages/admin/Hetong/components/zhaoguBingren.vue

@@ -8,7 +8,7 @@
 		</view>
 		<view class="fwnr-label-input">
 			<view class="fwnr-form-label"><text class="form-label-require"></text>病人病情</view>
-			<uni-easyinput v-model="data.hetong.lxName" placeholder="请输入病人病情" />
+			<uni-easyinput v-model="data.hetong.bingren" placeholder="请输入病人病情" />
 		</view>
 	</view>
 </template>

+ 26 - 34
pages/admin/Hetong/components/zhaoguLaoren.vue

@@ -6,27 +6,17 @@
 				<icon class="del-icon"></icon>
 			</view>
 		</view>
-		<!-- <view class="fwnr-label-input">
-			<view class="fwnr-form-label"><text class="form-label-require"></text>身体情况</view>
-			
-			<radio-group @change="radioChange" class="fwnr-radio-box">
-				<label class="fwnr-radio-item" v-for="item in items" :key="item.value">
-					<radio :value="item.value" :checked="item.value === data.shentizhuangkuang" />
-					<view>{{item.text}}</view>
-				</label>
-			</radio-group>
-		</view> -->
-		
 		<view class="form-label-radio fwnr-label-radio">
 			<view class="phone-form-label"><text class="form-label-require"></text>身体情况</view>
 			<view class="form-radio-group">
-				<!-- :class="{genderActive: formData.gender==1}" -->
-				<view class="form-radio-item genderActive">能自理</view>
-				<view class="form-radio-item">半自理</view>
-				<view class="form-radio-item">不能自理</view>
+				<view v-for="item in items" :key="item.value" class="form-radio-item" @click="radioChange(item.value)"
+					:class="{genderActive:data.shentizhuangkuang==item.value }">{{item.text}}</view>
 			</view>
 		</view>
-		
+		<view class="fwnr-label-input">
+			<view class="fwnr-form-label"><text class="form-label-require"></text>老人人数</view>
+			<uni-easyinput v-model="data.hetong.laoren" placeholder="请输入照顾几位老人" />
+		</view>
 		<laorenNianling @change="onChange"></laorenNianling>
 	</view>
 </template>
@@ -36,33 +26,35 @@
 		useHetong
 	} from "../useHetong.js"
 	import laorenNianling from "./laorenNianling.vue"
-	import {ref} from "vue"
+	import {
+		ref
+	} from "vue"
 	const {
 		injectHetong
 	} = useHetong();
 
 	const data = injectHetong()
-	
+
 	const emits = defineEmits(['change'])
-	
-	const items = [
-		{
-			value: 1,
-			text: '能自理'
-		},{
-			value: 2,
-			text: '半自理'
-		},{
-			value: 3,
-			text: '不能自理'
-		},
-	]	
-	
+
+	const items = [{
+		value: 1,
+		text: '能自理'
+	}, {
+		value: 2,
+		text: '半自理'
+	}, {
+		value: 3,
+		text: '不能自理'
+	}, ]
+
 	function onChange() {
 		emits('change')
 	}
-	
-	function radioChange() {}
+
+	function radioChange(value) {
+		data.shentizhuangkuang = value;
+	}
 </script>
 
 

+ 1 - 1
pages/admin/Hetong/components/zhaoguYunfu.vue

@@ -7,7 +7,7 @@
 			 </view>
 		</view>
 		<view class="fwnr-label-input">
-			<uni-easyinput v-model="data.hetong.lxName" placeholder="请输入护理内容" />
+			<uni-easyinput v-model="data.hetong.huli" placeholder="请输入护理内容" />
 		</view>
 	</view>
 </template>