whx il y a 10 mois
Parent
commit
6c039367d8

+ 1 - 1
virgo.wzfrontend/yui_wx/pages.json

@@ -143,7 +143,7 @@
 	}, {
 		"path": "pages/contract/contract",
 		"style": {
-			"navigationBarTitleText": "合同列表"
+			"navigationBarTitleText": ""
 		}
 	}],
 	"tabBar": {

+ 71 - 7
virgo.wzfrontend/yui_wx/pages/contract/contract.vue

@@ -9,10 +9,14 @@
 						<view class="space" v-for="(node,index) in item.roomMap" :key="index">{{node}}</view>
 					</view>
 					<view class="other">
-						<view class="item">
+						<view class="item" v-if="type === 1">
 							<view class="label">关联租客</view>
 							<view class="value">{{item.tenantType === 1 ? item.merchantName: item.clientName}}</view>
 						</view>
+						<view class="item" v-else>
+							<view class="label">房东信息</view>
+							<view class="value">{{item.organizationName}}</view>
+						</view>
 					</view>
 					<view class="state">
 						<view class="create">
@@ -39,6 +43,10 @@
 	import {
 		getContractListByPage
 	} from '@/request/api/contract.js'
+	import {
+		bindProjectDetail
+	} from '@/request/api/organization.js'
+
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin], // 使用mixin
@@ -46,7 +54,9 @@
 			return {
 				list: [],
 				type: '',
-				menu: {}
+				menu: {},
+				clientId: '',
+				merchantId: ''
 			}
 		},
 		onLoad(body) {
@@ -91,15 +101,69 @@
 			},
 			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 			upCallback(page) {
-				getContractListByPage({
+				let postData = {
 					currPage: page.num,
 					pageSize: 10,
-					organizationId: this.$store.getters.organization.id,
 					projectId: this.$store.getters.project.id
-				}).then(res => {
+				}
+				if (this.type === 1) {
+					postData['organizationId'] = this.$store.getters.organization.id;
+					this.getContractList(postData);
+				} else if (this.type === 2) {
+					postData['statusList'] = [1, 2, 3, 4, 5];
+					if (this.merchantId) {
+						postData['merchantId'] = this.merchantId;
+						this.getContractList(postData);
+						return;
+					}
+					bindProjectDetail({
+						bindOrganizationId: this.$store.getters.organization.id,
+						projectId: this.$store.getters.project.id,
+						identityId: 4
+					}).then(res => {
+						if (res.code === 200) {
+							if (res.data.length == 0) return this.mescroll.endBySize(0, 0);
+							this.merchantId = res.data[0].merchantId;
+							postData['merchantId'] = this.merchantId;
+							this.getContractList(postData);
+						} else {
+							this.mescroll.endErr();
+						}
+					}).catch(() => {
+						//联网失败, 结束加载
+						this.mescroll.endErr();
+					})
+				} else if (this.type === 3) {
+					postData['statusList'] = [1, 2, 3, 4, 5];
+					if (this.clientId) {
+						postData['clientId'] = this.clientId;
+						this.getContractList(postData);
+						return;
+					}
+					bindProjectDetail({
+						userId: this.$store.getters.user.userId,
+						projectId: this.$store.getters.project.id,
+						identityId: 1
+					}).then(res => {
+						if (res.code === 200) {
+							if (res.data.length == 0) return this.mescroll.endBySize(0, 0);
+							this.clientId = res.data[0].clientId;
+							postData['clientId'] = this.clientId;
+							this.getContractList(postData);
+						} else {
+							this.mescroll.endErr();
+						}
+					}).catch(() => {
+						//联网失败, 结束加载
+						this.mescroll.endErr();
+					})
+				}
+			},
+			getContractList(postData) {
+				getContractListByPage(postData).then(res => {
 					if (res.code === 200) {
 						this.mescroll.endBySize(res.data.dataList.length, res.data.totalCount);
-						if (page.num == 1) this.list = []; //如果是第一页需手动制空列表
+						if (postData.currPage == 1) this.list = []; //如果是第一页需手动制空列表
 						let data = res.data.dataList;
 						this.list = this.list.concat(data); //追加新数据
 					} else {
@@ -109,7 +173,7 @@
 					//联网失败, 结束加载
 					this.mescroll.endErr();
 				})
-			},
+			}
 		}
 	}
 </script>

+ 12 - 0
virgo.wzfrontend/yui_wx/request/api/organization.js

@@ -44,4 +44,16 @@ export function getOrganizationDetailById(id) {
 		url: `/manager/base/organization/${id}`,
 		method: 'get'
 	})
+}
+/* 
+ * 获取客户/经纪人/组织绑定信息
+ * 
+ * 
+ */
+export function bindProjectDetail(data) {
+	return request({
+		url: `/manager/bindProject/list`,
+		method: 'post',
+		data: data
+	})
 }

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
virgo.wzfrontend/yui_wx/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
virgo.wzfrontend/yui_wx/unpackage/dist/dev/.sourcemap/mp-weixin/pages/contract/contract.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 3
virgo.wzfrontend/yui_wx/unpackage/dist/dev/mp-weixin/common/vendor.js


+ 2 - 2
virgo.wzfrontend/yui_wx/unpackage/dist/dev/mp-weixin/components/common/navbar.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
virgo.wzfrontend/yui_wx/unpackage/dist/dev/mp-weixin/components/login/imageCode.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
virgo.wzfrontend/yui_wx/unpackage/dist/dev/mp-weixin/pages/contract/contract.js


+ 1 - 1
virgo.wzfrontend/yui_wx/unpackage/dist/dev/mp-weixin/pages/contract/contract.json

@@ -1,5 +1,5 @@
 {
-  "navigationBarTitleText": "合同列表",
+  "navigationBarTitleText": "",
   "usingComponents": {
     "mescroll-body": "/uni_modules/mescroll-uni/components/mescroll-body/mescroll-body",
     "uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
virgo.wzfrontend/yui_wx/unpackage/dist/dev/mp-weixin/pages/contract/contract.wxml


+ 13 - 20
virgo.wzfrontend/yui_wx/unpackage/dist/dev/mp-weixin/project.config.json

@@ -1,7 +1,8 @@
 {
   "description": "项目配置文件。",
   "packOptions": {
-    "ignore": []
+    "ignore": [],
+    "include": []
   },
   "setting": {
     "urlCheck": false,
@@ -9,28 +10,20 @@
     "postcss": true,
     "minified": true,
     "newFeature": true,
-    "bigPackageSizeSupport": true
+    "bigPackageSizeSupport": true,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    }
   },
   "compileType": "miniprogram",
-  "libVersion": "",
+  "libVersion": "3.5.3",
   "appid": "wx3c006d364161d240",
   "projectname": "yui_wx",
-  "condition": {
-    "search": {
-      "current": -1,
-      "list": []
-    },
-    "conversation": {
-      "current": -1,
-      "list": []
-    },
-    "game": {
-      "current": -1,
-      "list": []
-    },
-    "miniprogram": {
-      "current": -1,
-      "list": []
-    }
+  "condition": {},
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
   }
 }