USER-20230908AJ\Administrator 3 hafta önce
ebeveyn
işleme
89d9e8808a
2 değiştirilmiş dosya ile 181 ekleme ve 81 silme
  1. 117 67
      pages/index/module/popup-module.vue
  2. 64 14
      pages/task/task.vue

+ 117 - 67
pages/index/module/popup-module.vue

@@ -1,84 +1,134 @@
 <template>
 	<uni-popup background-color="#fff" ref="popup" type="bottom" borderRadius="10px 10px 10px 10px">
 		<view class="p-24 box-border-box pop-box r-20">
-			<view class="r-40 p-20 box-border-box flex-stretch mb-48 box-shadow"
-				:class="colorType === 1?'bgc-F92A3B-E70073':colorType === 2?'bgc-AB46FF-8125FE':colorType === 3?'bgc-00B6DC-0F62FA':'bgc-00C651-009B65'">
-				<view class="mr-20 q-box fc-fff size-48"
-					:class="colorType === 1?'bgc-F8516C':colorType === 2?'bgc-B768FF':colorType === 3?'bgc-33B2EB':'bgc-34CC79'">
-					{{colorType === 1?'$':colorType === 2?'🏚':colorType === 3?'🛡':'🎁'}}
-				</view>
-				<view class="flex-direction flex-start">
-					<view class="size-24 fc-fff sys-weight-600 mb-10 zw-box"
-						:class="colorType === 1?'bgc-F8516C':colorType === 2?'bgc-B365FF':colorType === 3?'bgc-34B4EB':'bgc-34CA79'">
-						债务
-					</view>
-					<view class="fc-fff size-32 text-overflow-ellipsis-one mb-10">
-						优先担保贷款#2024-001
-					</view>
-					<view class="fc-fff hy-box size-24">
-						活跃的
-					</view>
-				</view>
-			</view>
-			<view class="p-tb30 bt-EDEEF0">
-				<view class="p-30 box-border-box bgc-EEFAFF r-40 mb-48 box-shadow b-DBEAFE flex-stretch">
-					<view class="ok-box r-circle bgc-DBEAFE box-border-box mr-20 center justify-center">
-						<view class="checkmarkempty-box r-circle center justify-center">
-							<uni-icons type="checkmarkempty" size="12" color="#155DFB"></uni-icons>
-						</view>
-					</view>
-					<view class="flex-direction flex-start">
-						<view class="center mb-10">
-							<view class="size-28 mr-18 fc-1B388E">
-								尽职调查状态
-							</view>
-							<view class="size-24 yz-box fc-008235 sys-weight-600">
-								已验证
-							</view>
-						</view>
-						<view class="size-24 fc-1547E6">
-							所有要求的文件均已验证并为最新文件
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="max-h">
-				<view class="size-32 mb-20">
-					实体详情
-				</view>
-				<view class="b-F3F4F6-1 box-shadow sys-radius-20">
-					<view class="p-30 box-border-box b-b-F3F4F6 center row-justify-sb" v-for="(item) in 14">
-						<view class="size-28">
-							实体类型
-						</view>
-						<view class="size-28">
-							公司
-						</view>
-					</view>
-				</view>
-			</view>
+      <view v-if="colorType<=4">
+        <view  class="r-40 p-20 box-border-box flex-stretch mb-48 box-shadow"
+               :class="colorType === 1?'bgc-F92A3B-E70073':colorType === 2?'bgc-AB46FF-8125FE':colorType === 3?'bgc-00B6DC-0F62FA':'bgc-00C651-009B65'">
+          <view class="mr-20 q-box fc-fff size-48"
+                :class="colorType === 1?'bgc-F8516C':colorType === 2?'bgc-B768FF':colorType === 3?'bgc-33B2EB':'bgc-34CC79'">
+            {{colorType === 1?'$':colorType === 2?'🏚':colorType === 3?'🛡':'🎁'}}
+          </view>
+          <view class="flex-direction flex-start">
+            <view class="size-24 fc-fff sys-weight-600 mb-10 zw-box"
+                  :class="colorType === 1?'bgc-F8516C':colorType === 2?'bgc-B365FF':colorType === 3?'bgc-34B4EB':'bgc-34CA79'">
+              债务
+            </view>
+            <view class="fc-fff size-32 text-overflow-ellipsis-one mb-10">
+              优先担保贷款#2024-001
+            </view>
+            <view class="fc-fff hy-box size-24">
+              活跃的
+            </view>
+          </view>
+        </view>
+        <view class="p-tb30 bt-EDEEF0">
+          <view class="p-30 box-border-box bgc-EEFAFF r-40 mb-48 box-shadow b-DBEAFE flex-stretch">
+            <view class="ok-box r-circle bgc-DBEAFE box-border-box mr-20 center justify-center">
+              <view class="checkmarkempty-box r-circle center justify-center">
+                <uni-icons type="checkmarkempty" size="12" color="#155DFB"></uni-icons>
+              </view>
+            </view>
+            <view class="flex-direction flex-start">
+              <view class="center mb-10">
+                <view class="size-28 mr-18 fc-1B388E">
+                  尽职调查状态
+                </view>
+                <view class="size-24 yz-box fc-008235 sys-weight-600">
+                  已验证
+                </view>
+              </view>
+              <view class="size-24 fc-1547E6">
+                所有要求的文件均已验证并为最新文件
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="max-h">
+          <view class="size-32 mb-20">
+            实体详情
+          </view>
+          <view class="b-F3F4F6-1 box-shadow sys-radius-20">
+            <view class="p-30 box-border-box b-b-F3F4F6 center row-justify-sb" v-for="(item) in 14">
+              <view class="size-28">
+                实体类型
+              </view>
+              <view class="size-28">
+                公司
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view v-else>
+        <view class="max-h">
+          <view class="size-32 mb-20">
+            评估结果
+          </view>
+          <view class="b-F3F4F6-1 box-shadow sys-radius-20">
+            <view class="p-30 box-border-box b-b-F3F4F6 center row-justify-sb" >
+              <view class="size-28">
+                评估单价
+              </view>
+              <view class="size-28">
+                ¥{{(propertyRes.unit_price*1).toFixed(2)}}
+              </view>
+            </view>
+
+            <view class="p-30 box-border-box b-b-F3F4F6 center row-justify-sb" >
+              <view class="size-28">
+                评估总价
+              </view>
+              <view class="size-28">
+                ¥{{propertyRes.total_price}}
+              </view>
+            </view>
+            <view class="p-30 box-border-box b-b-F3F4F6 center row-justify-sb" >
+              <view class="size-28">
+                评估维度
+              </view>
+              <view class="size-28">
+                {{propertyRes.predict_msg}}
+              </view>
+            </view>
+
+          </view>
+        </view>
+      </view>
+
 		</view>
 	</uni-popup>
 </template>
 
 <script>
-	export default {
+	import {predictProperty} from "@/api/valuation";
+
+  export default {
 		components: {},
-		props: {
-			colorType: {
-				// 颜色状态 1红 2紫 3蓝 4绿
-				default: 3
-			}
-		},
 		data() {
-			return {}
+			return {
+        colorType:3,
+        propertyRes: {
+          unit_price: '',
+          total_price: '',
+          predict_msg: '',
+        },
+      }
 		},
 		onLoad(data) {},
 		mounted() {},
 		methods: {
-			openPop() {
+			openPop(colorType,data) {
+        if (colorType !==undefined){
+          this.colorType=colorType
+        }
+        if(colorType===5){
+          this.propertyRes=data
+        }
 				this.$refs.popup.open()
-			}
+			},
+      setProperty(data) {
+
+      }
 		}
 	}
 </script>
@@ -145,4 +195,4 @@
 		height: 32rpx;
 		border: 1rpx solid #155DFB;
 	}
-</style>
+</style>

+ 64 - 14
pages/task/task.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="total-page page-box task-bg">
-		<Nav title="法案查询" :genre="1" :toBack="true" is_fixed></Nav>
-		<view class="page-env-160">
+		<Nav title="资产评估" :genre="1" :toBack="true" is_fixed></Nav>
+		<view class="p-b40">
 			<!-- 身份认证start -->
 			<view class="m-t20 m-lr30 text-color-12">
 				<view class="sys-background-fff r-20 p-lr30 p-t30">
@@ -53,11 +53,9 @@
 			</view>
 			</view>
 		</view>
-		<EnButton :text="'评估'" @onSubmit="onSubmit"></EnButton>
-		<uni-popup ref="consentObj">
-			<view class="iPhone-padding agreement-data sys-background-fff">
-			</view>
-		</uni-popup>
+		<EnButton class="m-b50" :is_fixed="false" :text="'评估'" @onSubmit="onSubmit"></EnButton>
+    <popupModuleVue ref="popupModuleRef"></popupModuleVue>
+    <Tab class="tabs_height" :tab-index="2"></Tab>
 	</view>
 </template>
 
@@ -70,8 +68,11 @@
     getValuationOption,
     predictProperty
   } from "@/api/valuation.js"
+  import tools from "@/service/tools";
+  import popupModuleVue from "@/pages/index/module/popup-module.vue";
 	export default {
 		components: {
+      popupModuleVue,
 			EnInput,
 			EnSelect,
 			EnRadio,
@@ -162,6 +163,7 @@
 				},
 				propertyRes: {
 					unit_price: '',
+          total_price: '',
 					predict_msg: '',
 				},
 				location: {
@@ -189,6 +191,8 @@
 				try {
 					// 选择位置
 					uni.chooseLocation({
+            latitude:38.913943,
+            longitude:121.614794,
 						success: function(res) {
               console.log(res)
 							// 更新数据
@@ -326,23 +330,69 @@
           }).then(res => {
             if (res.code === 0) {
               if (this.propertyData.modelType*1 === 1) {
-                this.houseTypeOption = res.data.houseTypeOption
+                // res.data.houseTypeOption.
+                this.houseTypeOption = res.data.houseTypeOption.map(({ id,name }) => ({
+                  value: id,
+                  text: name
+                }));
+                console.log(this.houseTypeOption)
               } else if (this.propertyData.modelType*1 === 3) {
-                this.levelOption = res.data.levelOption
-                this.transferMethodOption = res.data.transferMethodOption
-                this.landUseOption = res.data.landUseOption
-                this.landSourceOption = res.data.landSourceOption
-                this.propertyData.land_source = this.landSourceOption[0].id
+                this.levelOption =  res.data.levelOption.map(({ id,name }) => ({
+                  value: id,
+                  text: name
+                }));
+                this.transferMethodOption =  res.data.transferMethodOption.map(({ id,name }) => ({
+                  value: id,
+                  text: name
+                }));
+                this.landUseOption =  res.data.landUseOption.map(({ id,name }) => ({
+                  value: id,
+                  text: name
+                }));
+                this.landSourceOption =  res.data.landSourceOption.map(({ id,name }) => ({
+                  value: id,
+                  text: name
+                }));
+                this.propertyData.land_source = this.landSourceOption[0].value
               }
             }
           })
 			},
 			onSubmit() {
 				console.log('提交评估数据', this.propertyData)
-				predictProperty(this.propertyData).then(res => {
+				predictProperty({
+          level_id: this.propertyData.level_id*1,
+          transfer_method: this.propertyData.transfer_method*1,
+          land_use: this.propertyData.land_use*1,
+          land_source: this.propertyData.land_source*1,
+          investment: this.propertyData.investment*1,
+          plot_mix: this.propertyData.plot_mix*1,
+          plot_max: this.propertyData.plot_max*1,
+          height_mix: this.propertyData.height_mix*1,
+          height_max: this.propertyData.height_max*1,
+          greening_mix: this.propertyData.greening_mix*1,
+          greening_max: this.propertyData.greening_max*1,
+          age_limit: this.propertyData.age_limit*1,
+          floor_area: this.propertyData.floor_area*1,
+          lat: this.propertyData.lat*1,
+          lng: this.propertyData.lng*1,
+          is_sold: this.propertyData.is_sold*1,
+          is_rent: this.propertyData.is_rent*1,
+          is_morgaged: this.propertyData.is_morgaged*1,
+          is_occupied: this.propertyData.is_occupied*1,
+          is_seizured: this.propertyData.is_seizured*1,
+          address:  this.propertyData.address,
+          modelType: this.propertyData.modelType*1,
+          area: this.propertyData.area*1,
+          district: this.propertyData.district*1,
+          houseType: this.propertyData.houseType*1,
+          complexName:this.propertyData.complexName,
+        }).then(res => {
 					if (res.code === 0) {
 						console.log(res, 'res');
 						this.propertyRes = res.data
+						this.propertyRes.total_price = (res.data.unit_price*this.propertyData.area).toFixed(2)
+            this.$refs.popupModuleRef.openPop(5,this.propertyRes)
 					} else {
 						tools.error(res.msg)
 					}