whx vor 5 Monaten
Ursprung
Commit
e42760a6f9

+ 194 - 194
virgo.wzfrontend/console/src/components/common/listFilter.vue

@@ -1,195 +1,195 @@
-<template>
-	<div class="hui-content-filter">
-		<div class="filter-box" v-if="type === 'customer'">
-			<div class="filter-item">
-				<el-input prefix-icon="el-icon-search" v-model="customer.name" placeholder="请输入客户名称"></el-input>
-			</div>
-			<div class="filter-item">
-				<el-select v-model="customer.type" placeholder="请选择客户类型">
-					<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.customerType"
-						:key="item.id">
-					</el-option>
-				</el-select>
-			</div>
-			<div class="filter-item">
-				<el-select v-model="customer.followUpState" placeholder="请选择跟进状态">
-					<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.followUpState"
-						:key="item.id">
-					</el-option>
-				</el-select>
-			</div>
-		</div>
-		<div class="filter-box" v-if="type === 'highseas'">
-			<div class="filter-item">
-				<el-input prefix-icon="el-icon-search" v-model="highseas.name" placeholder="请输入客户名称"></el-input>
-			</div>
-			<div class="filter-item">
-				<el-select v-model="highseas.type" placeholder="请选择客户类型">
-					<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.customerType"
-						:key="item.id">
-					</el-option>
-				</el-select>
-			</div>
-		</div>
-		<div class="filter-box" v-if="type === 'agent'">
-			<div class="filter-item">
-				<el-input prefix-icon="el-icon-search" v-model="agent.name" placeholder="请输入经纪人名称"></el-input>
-			</div>
-		</div>
-		<div class="filter-box" v-if="type === 'organization'">
-			<div class="filter-item">
-				<el-input prefix-icon="el-icon-search" v-model="organization.name" placeholder="请输入公司名称"></el-input>
-			</div>
-		</div>
-		<div class="filter-box" v-if="type === 'contract'">
-			<div class="filter-item">
-				<el-select v-model="contract.type" placeholder="请选择合同类型">
-					<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.contractType"
-						:key="item.id">
-					</el-option>
-				</el-select>
-			</div>
-			<div class="filter-item">
-				<el-input prefix-icon="el-icon-search" v-model="contract.code" placeholder="请输入合同编号"></el-input>
-			</div>
-			<div class="filter-item">
-				<el-date-picker v-model="contract.startDate" value-format="yyyy-MM-dd" type="date" placeholder="请选择开始日">
-				</el-date-picker>
-			</div>
-			<div class="filter-item">
-				<el-date-picker v-model="contract.endDate" value-format="yyyy-MM-dd" type="date" placeholder="请选择结束日">
-				</el-date-picker>
-			</div>
-		</div>
-		<div class="filter-box" v-if="type === 'order'">
-			<div class="filter-item">
-				<el-input prefix-icon="el-icon-search" v-model="order.name" placeholder="请输入工单名称"></el-input>
-			</div>
-			<div class="filter-item">
-				<el-select v-model="order.status" placeholder="请选择工单状态">
-					<el-option label="待提交" :value="null"></el-option>
-					<el-option label="待处理" :value="1"></el-option>
-					<el-option label="处理中" :value="2"></el-option>
-					<el-option label="已处理" :value="3"></el-option>
-				</el-select>
-			</div>
-		</div>
-		<div class="filter-box" v-if="type === 'billContract'">
-			<div class="filter-item">
-				<el-input prefix-icon="el-icon-search" v-model="billContract.contractCode" placeholder="请输入合同编号">
-				</el-input>
-			</div>
-		</div>
-		<div class="filter-box" v-if="type === 'billRoutine'">
-			<div class="filter-item">
-				<el-input prefix-icon="el-icon-search" v-model="billRoutine.name" placeholder="请输入账单名称">
-				</el-input>
-			</div>
-		</div>
-		<div class="filter-box" v-if="type === 'invoice'">
-			<div class="filter-item">
-				<el-input prefix-icon="el-icon-search" v-model="invoice.name" placeholder="请输入发票名称">
-				</el-input>
-			</div>
-		</div>
-		<div class="filter-btn">
-			<el-button type="primary" size="medium" @click="submit">查询</el-button>
-			<el-button size="medium" @click="resetForm">重置</el-button>
-		</div>
-	</div>
-</template>
-
-<script>
-	export default {
-		props: ['type'],
-		data() {
-			return {
-				customer: {
-					name: '',
-					type: '',
-					followUpState: ''
-				},
-				customerData: {},
-				highseas: {
-					name: '',
-					type: ''
-				},
-				highseasData: {},
-				agent: {
-					name: ''
-				},
-				agentData: {},
-				organization: {
-					name: ''
-				},
-				organizationData: {},
-				contract: {
-					code: '',
-					startDate: '',
-					endDate: '',
-					type: ''
-				},
-				contractData: {},
-				order: {
-					name: '',
-					status: ''
-				},
-				orderData: {},
-				billContract: {
-					contractCode: ''
-				},
-				billContractData: {},
-				billRoutine: {
-					name: ''
-				},
-				billRoutineData: {},
-				invoice: {
-					name: ''
-				},
-				invoiceData: {}
-			}
-		},
-		created() {
-			this[this.type + 'Data'] = JSON.parse(JSON.stringify(this[this.type]));
-		},
-		methods: {
-			resetForm() {
-				this[this.type] = JSON.parse(JSON.stringify(this[this.type + 'Data']));
-				this.$emit('filter', {});
-			},
-			resetField() {
-				this[this.type] = JSON.parse(JSON.stringify(this[this.type + 'Data']));
-			},
-			submit() {
-				let data = this.filterOption(this[this.type]);
-				this.$emit('filter', data);
-			},
-			filterOption(data) {
-				let obj = {};
-				for (let key in data) {
-					if (data[key]) obj[key] = data[key]
-				}
-				return obj;
-			}
-		},
-	}
-</script>
-
-<style lang="scss">
-	.hui-content-filter {
-		display: flex;
-		margin-bottom: 15px;
-
-		.filter-box {
-			flex: 1;
-			width: 0;
-			display: flex;
-			flex-wrap: wrap;
-		}
-
-		.filter-item {
-			width: 240px;
-			margin-right: 12px;
-		}
-	}
+<template>
+	<div class="hui-content-filter">
+		<div class="filter-box" v-if="type === 'customer'">
+			<div class="filter-item">
+				<el-input prefix-icon="el-icon-search" v-model="customer.name" placeholder="请输入客户名称"></el-input>
+			</div>
+			<div class="filter-item">
+				<el-select v-model="customer.type" placeholder="请选择客户类型">
+					<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.customerType"
+						:key="item.id">
+					</el-option>
+				</el-select>
+			</div>
+			<div class="filter-item">
+				<el-select v-model="customer.followUpState" placeholder="请选择跟进状态">
+					<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.followUpState"
+						:key="item.id">
+					</el-option>
+				</el-select>
+			</div>
+		</div>
+		<div class="filter-box" v-if="type === 'highseas'">
+			<div class="filter-item">
+				<el-input prefix-icon="el-icon-search" v-model="highseas.name" placeholder="请输入客户名称"></el-input>
+			</div>
+			<div class="filter-item">
+				<el-select v-model="highseas.type" placeholder="请选择客户类型">
+					<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.customerType"
+						:key="item.id">
+					</el-option>
+				</el-select>
+			</div>
+		</div>
+		<div class="filter-box" v-if="type === 'agent'">
+			<div class="filter-item">
+				<el-input prefix-icon="el-icon-search" v-model="agent.name" placeholder="请输入经纪人名称"></el-input>
+			</div>
+		</div>
+		<div class="filter-box" v-if="type === 'organization'">
+			<div class="filter-item">
+				<el-input prefix-icon="el-icon-search" v-model="organization.name" placeholder="请输入公司名称"></el-input>
+			</div>
+		</div>
+		<div class="filter-box" v-if="type === 'contract'">
+			<div class="filter-item">
+				<el-select v-model="contract.type" placeholder="请选择合同类型">
+					<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.contractType"
+						:key="item.id">
+					</el-option>
+				</el-select>
+			</div>
+			<div class="filter-item">
+				<el-input prefix-icon="el-icon-search" v-model="contract.code" placeholder="请输入合同编码"></el-input>
+			</div>
+			<div class="filter-item">
+				<el-date-picker v-model="contract.startDate" value-format="yyyy-MM-dd" type="date" placeholder="请选择开始日">
+				</el-date-picker>
+			</div>
+			<div class="filter-item">
+				<el-date-picker v-model="contract.endDate" value-format="yyyy-MM-dd" type="date" placeholder="请选择结束日">
+				</el-date-picker>
+			</div>
+		</div>
+		<div class="filter-box" v-if="type === 'order'">
+			<div class="filter-item">
+				<el-input prefix-icon="el-icon-search" v-model="order.name" placeholder="请输入工单名称"></el-input>
+			</div>
+			<div class="filter-item">
+				<el-select v-model="order.status" placeholder="请选择工单状态">
+					<el-option label="待提交" :value="null"></el-option>
+					<el-option label="待处理" :value="1"></el-option>
+					<el-option label="处理中" :value="2"></el-option>
+					<el-option label="已处理" :value="3"></el-option>
+				</el-select>
+			</div>
+		</div>
+		<div class="filter-box" v-if="type === 'billContract'">
+			<div class="filter-item">
+				<el-input prefix-icon="el-icon-search" v-model="billContract.contractCode" placeholder="请输入合同编码">
+				</el-input>
+			</div>
+		</div>
+		<div class="filter-box" v-if="type === 'billRoutine'">
+			<div class="filter-item">
+				<el-input prefix-icon="el-icon-search" v-model="billRoutine.name" placeholder="请输入账单名称">
+				</el-input>
+			</div>
+		</div>
+		<div class="filter-box" v-if="type === 'invoice'">
+			<div class="filter-item">
+				<el-input prefix-icon="el-icon-search" v-model="invoice.name" placeholder="请输入发票名称">
+				</el-input>
+			</div>
+		</div>
+		<div class="filter-btn">
+			<el-button type="primary" size="medium" @click="submit">查询</el-button>
+			<el-button size="medium" @click="resetForm">重置</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	export default {
+		props: ['type'],
+		data() {
+			return {
+				customer: {
+					name: '',
+					type: '',
+					followUpState: ''
+				},
+				customerData: {},
+				highseas: {
+					name: '',
+					type: ''
+				},
+				highseasData: {},
+				agent: {
+					name: ''
+				},
+				agentData: {},
+				organization: {
+					name: ''
+				},
+				organizationData: {},
+				contract: {
+					code: '',
+					startDate: '',
+					endDate: '',
+					type: ''
+				},
+				contractData: {},
+				order: {
+					name: '',
+					status: ''
+				},
+				orderData: {},
+				billContract: {
+					contractCode: ''
+				},
+				billContractData: {},
+				billRoutine: {
+					name: ''
+				},
+				billRoutineData: {},
+				invoice: {
+					name: ''
+				},
+				invoiceData: {}
+			}
+		},
+		created() {
+			this[this.type + 'Data'] = JSON.parse(JSON.stringify(this[this.type]));
+		},
+		methods: {
+			resetForm() {
+				this[this.type] = JSON.parse(JSON.stringify(this[this.type + 'Data']));
+				this.$emit('filter', {});
+			},
+			resetField() {
+				this[this.type] = JSON.parse(JSON.stringify(this[this.type + 'Data']));
+			},
+			submit() {
+				let data = this.filterOption(this[this.type]);
+				this.$emit('filter', data);
+			},
+			filterOption(data) {
+				let obj = {};
+				for (let key in data) {
+					if (data[key]) obj[key] = data[key]
+				}
+				return obj;
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.hui-content-filter {
+		display: flex;
+		margin-bottom: 15px;
+
+		.filter-box {
+			flex: 1;
+			width: 0;
+			display: flex;
+			flex-wrap: wrap;
+		}
+
+		.filter-item {
+			width: 240px;
+			margin-right: 12px;
+		}
+	}
 </style>

+ 47 - 8
virgo.wzfrontend/console/src/components/work/bill/routine/edit.vue

@@ -5,6 +5,13 @@
 				<el-form-item label="账单名称" prop="name" :rules="[{required: true, message: '请输入账单名称'}]">
 					<el-input type="text" v-model="form.name" placeholder="请输入账单名称"></el-input>
 				</el-form-item>
+				<el-form-item label="账单类型" prop="type" :rules="[{required: true, message: '请选择账单类型'}]">
+					<el-select v-model="form.type" placeholder="请选择账单类型">
+						<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.billType"
+							:key="item.id">
+						</el-option>
+					</el-select>
+				</el-form-item>
 				<el-form-item label="账单金额(元)" prop="amount" :rules="[{required: true, message: '请输入账单金额'}]">
 					<el-input type="number" v-model="form.amount" placeholder="请输入账单金额"></el-input>
 				</el-form-item>
@@ -13,7 +20,7 @@
 						placeholder="请选择提醒日期">
 					</el-date-picker>
 				</el-form-item>
-				<el-form-item label="租客类型">
+				<el-form-item label="租客类型" required>
 					<el-select v-model="form.tenantType" placeholder="请选择租客类型" @change="changeTenantType">
 						<el-option label="企业" :value="1"></el-option>
 						<el-option label="客户" :value="2"></el-option>
@@ -21,7 +28,7 @@
 				</el-form-item>
 				<el-form-item label="企业" v-if="form.tenantType === 1" prop="payMerchantId"
 					:rules="[{required: true, message: '请选择企业'}]">
-					<el-select v-model="form.payMerchantId" placeholder="请选择企业">
+					<el-select v-model="form.payMerchantId" placeholder="请选择企业" @change="getContractList">
 						<el-option :label="item.name" :value="item.id" v-for="(item,index) in merchantList"
 							:key="index">
 						</el-option>
@@ -29,11 +36,18 @@
 				</el-form-item>
 				<el-form-item label="客户" v-else-if="form.tenantType === 2" prop="payClientId"
 					:rules="[{required: true, message: '请选择客户'}]">
-					<el-select v-model="form.payClientId" placeholder="请选择客户">
+					<el-select v-model="form.payClientId" placeholder="请选择客户" @change="getContractList">
 						<el-option :label="item.name" :value="item.id" v-for="(item,index) in clientList" :key="index">
 						</el-option>
 					</el-select>
 				</el-form-item>
+				<el-form-item label="关联合同">
+					<el-select v-model="form.contractId" placeholder="请选择关联合同" @change="changeContract">
+						<el-option :label="item.code" :value="item.id" v-for="(item,index) in contractList"
+							:key="index">
+						</el-option>
+					</el-select>
+				</el-form-item>
 				<el-form-item label="账单描述" class="hui-textarea">
 					<el-input type="textarea" v-model="form.data" placeholder="请输入账单描述" resize="none">
 					</el-input>
@@ -59,6 +73,9 @@
 		updatePayment,
 		getPaymentDetailById
 	} from '@/httpApi/bill'
+	import {
+		getContractListByPage
+	} from '@/httpApi/contract'
 	export default {
 		props: ['isUpdate', 'detailId'],
 		data() {
@@ -71,11 +88,13 @@
 					tenantType: 1,
 					payMerchantId: '',
 					payClientId: '',
-					data: ''
+					data: '',
+					billType: ''
 				},
 				merchantList: [],
 				clientList: [],
-				loading: false
+				loading: false,
+				contractList: []
 			}
 		},
 		created() {
@@ -86,6 +105,7 @@
 				getPaymentDetailById(this.detailId).then(res => {
 					if (res.state) {
 						this.form = res.data;
+						this.getContractList();
 					}
 				})
 			}
@@ -93,6 +113,25 @@
 			this.client();
 		},
 		methods: {
+			getContractList() {
+				let option = {
+					currPage: 1,
+					pageSize: 100,
+					organizationId: this.$store.getters.organization.id,
+					projectId: this.$store.getters.project.id,
+					status: 2
+				}
+				if (this.form.tenantType === 1) {
+					option['merchantId'] = this.form.payMerchantId;
+				} else {
+					option['clientId'] = this.form.payClientId;
+				}
+				getContractListByPage(option).then(res => {
+					if (res.state) {
+						this.contractList = res.data.dataList;
+					}
+				})
+			},
 			merchant() {
 				getOrganizationList({
 					organizationId: this.$store.getters.organization.id,
@@ -119,7 +158,7 @@
 				this.form.payMerchantId = '';
 				this.form.payClientId = '';
 			},
-			submit() {
+			submit() {
 				this.loading = true;
 				this.$refs.form.validate((valid) => {
 					if (valid) {
@@ -129,13 +168,13 @@
 						} else {
 							insertPayment(this.form).then(this.successFunc);
 						}
-					} else {
+					} else {
 						this.loading = false;
 						return false;
 					}
 				});
 			},
-			successFunc(res) {
+			successFunc(res) {
 				this.loading = false;
 				if (res.state) {
 					this.$message.success('操作成功');

+ 116 - 0
virgo.wzfrontend/console/src/components/work/invoice/edit.vue

@@ -0,0 +1,116 @@
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-form ref="form" label-position="top" :model="form">
+				<el-form-item label="发票名称" prop="name" :rules="[{required: true, message: '请输入发票名称'}]">
+					<el-input type="text" v-model="form.name" placeholder="请输入发票名称"></el-input>
+				</el-form-item>
+				<el-form-item label="发票类型" prop="invoiceType" :rules="[{required: true, message: '请选择发票类型'}]">
+					<el-select v-model="form.invoiceType" placeholder="请选择发票类型">
+						<el-option :label="item.name" :value="item.id" v-for="(item,index) in $field.field.invoiceType"
+							:key="item.id">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="发票代码" prop="code" :rules="[{required: true, message: '请输入发票代码'}]">
+					<el-input type="text" v-model="form.code" placeholder="请输入发票代码"></el-input>
+				</el-form-item>
+				<el-form-item label="发票号码" prop="number" :rules="[{required: true, message: '请输入发票号码'}]">
+					<el-input type="text" v-model="form.number" placeholder="请输入发票号码"></el-input>
+				</el-form-item>
+				<el-form-item label="货物名称" prop="cargoName" :rules="[{required: true, message: '请输入货物名称'}]">
+					<el-input type="text" v-model="form.cargoName" placeholder="请输入货物名称"></el-input>
+				</el-form-item>
+				<el-form-item label="开票日期" prop="date" :rules="[{required: true, message: '请输入开票日期'}]">
+					<el-date-picker v-model="form.date" value-format="yyyy-MM-dd" type="date" placeholder="请选择开票日期">
+					</el-date-picker>
+				</el-form-item>
+				<el-form-item label="发票附件" class="hui-textarea">
+					<upload ref="upload" :list="responsibility" type="insert" accept=".png, .jpg, .jpeg, .pdf"
+						text="上传发票">
+					</upload>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit" :loading="loading">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import upload from '@/components/common/upload'
+	import {
+		insertPaymentInvoice,
+		putPaymentStatus
+	} from '@/httpApi/contract'
+	import {
+		updatePayment
+	} from '@/httpApi/bill'
+	export default {
+		props: ['itemId', 'type'],
+		data() {
+			return {
+				form: {
+					name: '',
+					invoiceType: 1,
+					code: '',
+					number: '',
+					date: '',
+					cargoName: '',
+					data: '{}'
+				},
+				responsibility: [],
+				loading: false
+			}
+		},
+		created() {
+			this.form['organizationId'] = this.$store.getters.organization.id;
+			this.form['projectId'] = this.$store.getters.project.id;
+			if (this.type) this.form[this.type + 'Id'] = this.itemId;
+			if (this.type === 'payment') {
+				this.form['cargoName'] = '房租';
+				this.form['type'] = 1;
+			} else {
+				this.form['type'] = 2;
+			}
+		},
+		methods: {
+			submit() {
+				this.loading = true;
+				this.$refs.form.validate((valid) => {
+					if (valid) {
+						if (this.$refs.upload.fileList.length === 0) return this.$message.warning('请上传发票');
+						let postData = JSON.parse(JSON.stringify(this.form));
+						postData['attachment'] = JSON.stringify(this.$refs.upload.fileList);
+						insertPaymentInvoice(postData).then(res => {
+							this.loading = false;
+							if (res.state) {
+								if (this.type === 'payment') {
+									putPaymentStatus(this.itemId, 2);
+								} else {
+									updatePayment({
+										id: this.itemId,
+										status: 2
+									})
+								}
+								this.$message.success('操作成功');
+								this.$emit('callback', 'init');
+							}
+						})
+					} else {
+						this.loading = false;
+						return false;
+					}
+				});
+			}
+		},
+		components: {
+			upload
+		},
+	}
+</script>
+
+<style>
+</style>

+ 353 - 353
virgo.wzfrontend/console/src/components/work/staging/client.vue

@@ -1,159 +1,159 @@
-<template>
-	<div class="client-detail-box">
-		<div class="left">
-			<div class="client-avatr bg-box">
-				<div class="logo bg-item">
-					<img src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/2f7b4bfaf9e64817bc2cb46f3a632b01"
-						alt="" />
-				</div>
-				<div class="content">
-					<div class="name bg-item">温州有极数据科技有限公司</div>
-					<div class="sub-name bg-item">徐先生-18616333631</div>
-				</div>
-			</div>
-			<div class="client-space bg-box">
-				<div class="space-item">
-					<div class="space-key bg-item">房间编号</div>
-					<div class="space-value bg-item">102</div>
-				</div>
-				<div class="space-item">
-					<div class="space-key bg-item">房间位置</div>
-					<div class="space-value bg-item">一号楼-1F</div>
-				</div>
-				<div class="space-item">
-					<div class="space-key bg-item">房间面积</div>
-					<div class="space-value bg-item">120平方米</div>
-				</div>
-			</div>
-			<div class="client-bill bg-box">
-				<div class="title">
-					<span class="label">账单发票</span>
-					<div class="title-option">
-						<div v-for="(item,index) in billList"
-							:class="nowBillId === item.id ?'option-item active':'option-item'"
-							@click="nowBillId = item.id">
-							{{item.name}}
-						</div>
-					</div>
-				</div>
-				<div class="client-list">
-					<div class="alarm-table-box hui-flex">
-						<div class="alarm-title">
-							<div class="alarm-tr">
-								<span class="tr-50">序号</span>
-								<span class="tr-flex">账单期数</span>
-								<span class="tr-flex">账单金额</span>
-								<span class="tr-flex">账单状态</span>
-								<span class="tr-flex">发票状态</span>
-							</div>
-						</div>
-						<div class="alarm-table hui-flex-box">
-							<div class="alarm-tr">
-								<span class="tr-50">01</span>
-								<span class="tr-flex">第1期</span>
-								<span class="tr-flex">1.2万</span>
-								<span class="tr-flex color-green">已付款</span>
-								<span class="tr-flex color-green">已开发票</span>
-							</div>
-							<div class="alarm-tr">
-								<span class="tr-50">02</span>
-								<span class="tr-flex">第2期</span>
-								<span class="tr-flex">1.2万</span>
-								<span class="tr-flex color-green">已付款</span>
-								<span class="tr-flex color-green">已开发票</span>
-							</div>
-							<div class="alarm-tr">
-								<span class="tr-50">03</span>
-								<span class="tr-flex">第3期</span>
-								<span class="tr-flex">1.2万</span>
-								<span class="tr-flex color-green">已付款</span>
-								<span class="tr-flex color-green">已开发票</span>
-							</div>
-							<div class="alarm-tr">
-								<span class="tr-50">04</span>
-								<span class="tr-flex">第4期</span>
-								<span class="tr-flex">1.2万</span>
-								<span class="tr-flex color-green">已付款</span>
-								<span class="tr-flex color-green">已开发票</span>
-							</div>
-							<div class="alarm-tr">
-								<span class="tr-50">05</span>
-								<span class="tr-flex">第5期</span>
-								<span class="tr-flex">1.2万</span>
-								<span class="tr-flex color-green">已付款</span>
-								<span class="tr-flex color-green">已开发票</span>
-							</div>
-							<div class="alarm-tr">
-								<span class="tr-50">06</span>
-								<span class="tr-flex">第6期</span>
-								<span class="tr-flex">1.2万</span>
-								<span class="tr-flex color-green">已付款</span>
-								<span class="tr-flex color-green">已开发票</span>
-							</div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-		<div class="right bg-box">
-			<div class="hui-flex">
-				<div class="title">
-					<div class="label">基础信息</div>
-				</div>
-				<div class="hui-flex-box">
-					<div class="information-box">
-						<div class="information-item">
-							<div class="information-key">客户类型</div>
-							<div class="information-value">潜在客户</div>
-						</div>
-						<div class="information-item">
-							<div class="information-key">行业</div>
-							<div class="information-value">金融业</div>
-						</div>
-						<div class="information-item">
-							<div class="information-key">需求区间</div>
-							<div class="information-value">2000-3000</div>
-						</div>
-						<div class="information-item">
-							<div class="information-key">装修要求</div>
-							<div class="information-value">精装</div>
-						</div>
-					</div>
-					<div class="information-box">
-						<div class="information-item">
-							<div class="information-key">房租合同</div>
-							<div class="information-value">房租合同.docx</div>
-						</div>
-						<div class="information-item">
-							<div class="information-key">合同编号</div>
-							<div class="information-value">HT11223344</div>
-						</div>
-						<div class="information-item" style="width: 50%;">
-							<div class="information-key">合同时间</div>
-							<div class="information-value">2023-12-15至2024-12-14</div>
-						</div>
-					</div>
-					<div class="information-box">
-						<div class="information-item">
-							<div class="information-key">合同编号</div>
-							<div class="information-value">物业合同.docx</div>
-						</div>
-						<div class="information-item">
-							<div class="information-key">行业</div>
-							<div class="information-value">HT11223344</div>
-						</div>
-						<div class="information-item" style="width: 50%;">
-							<div class="information-key">合同时间</div>
-							<div class="information-value">2023-12-15至2024-12-14</div>
-						</div>
-					</div>
-					<div class="information-box">
-						<div class="information-item" style="width: 100%;">
-							<div class="information-key">企业简介</div>
-							<div class="information-value">
-								企业简介温州有极数据科技有限公司,成立于2023年,是温州市鹿城区创新大赛获奖落地项目,公司主要致力于数字城市、智慧建筑、智慧工厂的管理系统的研发和推广。
-							</div>
-						</div>
+<template>
+	<div class="client-detail-box">
+		<div class="left">
+			<div class="client-avatr bg-box">
+				<div class="logo bg-item">
+					<img src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/2f7b4bfaf9e64817bc2cb46f3a632b01"
+						alt="" />
+				</div>
+				<div class="content">
+					<div class="name bg-item">温州有极数据科技有限公司</div>
+					<div class="sub-name bg-item">徐先生-18616333631</div>
+				</div>
+			</div>
+			<div class="client-space bg-box">
+				<div class="space-item">
+					<div class="space-key bg-item">房间编号</div>
+					<div class="space-value bg-item">102</div>
+				</div>
+				<div class="space-item">
+					<div class="space-key bg-item">房间位置</div>
+					<div class="space-value bg-item">一号楼-1F</div>
+				</div>
+				<div class="space-item">
+					<div class="space-key bg-item">房间面积</div>
+					<div class="space-value bg-item">120平方米</div>
+				</div>
+			</div>
+			<div class="client-bill bg-box">
+				<div class="title">
+					<span class="label">账单发票</span>
+					<div class="title-option">
+						<div v-for="(item,index) in billList"
+							:class="nowBillId === item.id ?'option-item active':'option-item'"
+							@click="nowBillId = item.id">
+							{{item.name}}
+						</div>
+					</div>
+				</div>
+				<div class="client-list">
+					<div class="alarm-table-box hui-flex">
+						<div class="alarm-title">
+							<div class="alarm-tr">
+								<span class="tr-50">序号</span>
+								<span class="tr-flex">账单期数</span>
+								<span class="tr-flex">账单金额</span>
+								<span class="tr-flex">账单状态</span>
+								<span class="tr-flex">发票状态</span>
+							</div>
+						</div>
+						<div class="alarm-table hui-flex-box">
+							<div class="alarm-tr">
+								<span class="tr-50">01</span>
+								<span class="tr-flex">第1期</span>
+								<span class="tr-flex">1.2万</span>
+								<span class="tr-flex color-green">已付款</span>
+								<span class="tr-flex color-green">已开发票</span>
+							</div>
+							<div class="alarm-tr">
+								<span class="tr-50">02</span>
+								<span class="tr-flex">第2期</span>
+								<span class="tr-flex">1.2万</span>
+								<span class="tr-flex color-green">已付款</span>
+								<span class="tr-flex color-green">已开发票</span>
+							</div>
+							<div class="alarm-tr">
+								<span class="tr-50">03</span>
+								<span class="tr-flex">第3期</span>
+								<span class="tr-flex">1.2万</span>
+								<span class="tr-flex color-green">已付款</span>
+								<span class="tr-flex color-green">已开发票</span>
+							</div>
+							<div class="alarm-tr">
+								<span class="tr-50">04</span>
+								<span class="tr-flex">第4期</span>
+								<span class="tr-flex">1.2万</span>
+								<span class="tr-flex color-green">已付款</span>
+								<span class="tr-flex color-green">已开发票</span>
+							</div>
+							<div class="alarm-tr">
+								<span class="tr-50">05</span>
+								<span class="tr-flex">第5期</span>
+								<span class="tr-flex">1.2万</span>
+								<span class="tr-flex color-green">已付款</span>
+								<span class="tr-flex color-green">已开发票</span>
+							</div>
+							<div class="alarm-tr">
+								<span class="tr-50">06</span>
+								<span class="tr-flex">第6期</span>
+								<span class="tr-flex">1.2万</span>
+								<span class="tr-flex color-green">已付款</span>
+								<span class="tr-flex color-green">已开发票</span>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="right bg-box">
+			<div class="hui-flex">
+				<div class="title">
+					<div class="label">基础信息</div>
+				</div>
+				<div class="hui-flex-box">
+					<div class="information-box">
+						<div class="information-item">
+							<div class="information-key">客户类型</div>
+							<div class="information-value">潜在客户</div>
+						</div>
+						<div class="information-item">
+							<div class="information-key">行业</div>
+							<div class="information-value">金融业</div>
+						</div>
+						<div class="information-item">
+							<div class="information-key">需求区间</div>
+							<div class="information-value">2000-3000</div>
+						</div>
+						<div class="information-item">
+							<div class="information-key">装修要求</div>
+							<div class="information-value">精装</div>
+						</div>
+					</div>
+					<div class="information-box">
+						<div class="information-item">
+							<div class="information-key">房租合同</div>
+							<div class="information-value">房租合同.docx</div>
+						</div>
+						<div class="information-item">
+							<div class="information-key">合同编码</div>
+							<div class="information-value">HT11223344</div>
+						</div>
+						<div class="information-item" style="width: 50%;">
+							<div class="information-key">合同时间</div>
+							<div class="information-value">2023-12-15至2024-12-14</div>
+						</div>
+					</div>
+					<div class="information-box">
+						<div class="information-item">
+							<div class="information-key">合同编码</div>
+							<div class="information-value">物业合同.docx</div>
+						</div>
+						<div class="information-item">
+							<div class="information-key">行业</div>
+							<div class="information-value">HT11223344</div>
+						</div>
+						<div class="information-item" style="width: 50%;">
+							<div class="information-key">合同时间</div>
+							<div class="information-value">2023-12-15至2024-12-14</div>
+						</div>
+					</div>
+					<div class="information-box">
+						<div class="information-item" style="width: 100%;">
+							<div class="information-key">企业简介</div>
+							<div class="information-value">
+								企业简介温州有极数据科技有限公司,成立于2023年,是温州市鹿城区创新大赛获奖落地项目,公司主要致力于数字城市、智慧建筑、智慧工厂的管理系统的研发和推广。
+							</div>
+						</div>
 					</div>
 					<div class="information-box">
 						<div class="information-item" style="width: 100%;">
@@ -186,201 +186,201 @@
 								温州有极数据科技有限公司项目荣誉
 							</div>
 						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				billList: [{
-					id: 1,
-					name: '房租'
-				}, {
-					id: 2,
-					name: '物业'
-				}, {
-					id: 3,
-					name: '水电'
-				}],
-				nowBillId: 1,
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.client-detail-box {
-		width: 100%;
-		height: 100%;
-		display: flex;
-		padding: 15px;
-
-		.title {
-			padding: 10px;
-			display: flex;
-			border-bottom: 1px solid #232A37;
-
-			.label {
-				flex: 1;
-				width: 0;
-				overflow: hidden;
-				font-weight: 500;
-			}
-
-			.title-option {
-				display: flex;
-				align-items: center;
-				background: rgba(26, 38, 60, 0.8);
-				height: 20px;
-				border-radius: 2px;
-			}
-
-			.option-item {
-				width: 60px;
-				height: 20px;
-				color: #818CA2;
-				font-size: 12px;
-				text-align: center;
-				line-height: 20px;
-				border-radius: 2px;
-				cursor: pointer;
-			}
-
-			.option-item.active,
-			.option-item:hover {
-				background: #6c7589;
-				color: #D2E4FF;
-			}
-		}
-
-		.bg-box {
-			background: #2f3746;
-		}
-
-		.bg-item {
-			background: #232A37;
-		}
-
-		img {
-			width: 100%;
-			height: 100%;
-		}
-
-		.left {
-			width: 400px;
-			display: flex;
-			flex-direction: column;
-		}
-
-		.right {
-			margin-left: 10px;
-			flex: 1;
-			width: 0;
-		}
-
-		.information-box {
-			display: flex;
-			padding: 0 10px;
-			margin-top: 15px;
-
-			.information-item {
-				width: 25%;
-			}
-
-			.information-key {
-				color: #7c899f;
-				font-size: 13px;
-				margin-bottom: 4px;
-			}
-		}
-
-		.client-list {
-			flex: 1;
-			height: 0;
-
-			.alarm-title {
-				padding: 0 10px;
-			}
-
-			.alarm-table {
-				padding: 0 10px;
-				margin-bottom: 0;
-
-				.alarm-tr {
-					background: #232A37;
-				}
-			}
-		}
-
-		.client-avatr {
-			width: 100%;
-
-			display: flex;
-			padding: 10px;
-
-			.logo {
-				width: 76px;
-				height: 76px;
-			}
-
-			.content {
-				flex: 1;
-				width: 0;
-				margin-left: 4px;
-			}
-
-			.name {
-				line-height: 36px;
-				margin-bottom: 4px;
-				padding: 0 5px;
-			}
-
-			.sub-name {
-				line-height: 36px;
-				padding: 0 5px;
-			}
-		}
-
-		.client-space {
-			margin-top: 10px;
-			padding: 10px;
-
-			.space-item {
-				display: flex;
-				margin-bottom: 4px;
-
-				&:last-child {
-					margin-bottom: 0;
-				}
-
-				.space-key {
-					width: 80px;
-					margin-right: 4px;
-					line-height: 36px;
-					padding: 0 5px;
-					text-align: center;
-				}
-
-				.space-value {
-					flex: 1;
-					width: 0;
-					line-height: 36px;
-					padding: 0 5px;
-				}
-			}
-		}
-
-		.client-bill {
-			flex: 1;
-			height: 0;
-			margin-top: 10px;
-			display: flex;
-			flex-direction: column;
-		}
-	}
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				billList: [{
+					id: 1,
+					name: '房租'
+				}, {
+					id: 2,
+					name: '物业'
+				}, {
+					id: 3,
+					name: '水电'
+				}],
+				nowBillId: 1,
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.client-detail-box {
+		width: 100%;
+		height: 100%;
+		display: flex;
+		padding: 15px;
+
+		.title {
+			padding: 10px;
+			display: flex;
+			border-bottom: 1px solid #232A37;
+
+			.label {
+				flex: 1;
+				width: 0;
+				overflow: hidden;
+				font-weight: 500;
+			}
+
+			.title-option {
+				display: flex;
+				align-items: center;
+				background: rgba(26, 38, 60, 0.8);
+				height: 20px;
+				border-radius: 2px;
+			}
+
+			.option-item {
+				width: 60px;
+				height: 20px;
+				color: #818CA2;
+				font-size: 12px;
+				text-align: center;
+				line-height: 20px;
+				border-radius: 2px;
+				cursor: pointer;
+			}
+
+			.option-item.active,
+			.option-item:hover {
+				background: #6c7589;
+				color: #D2E4FF;
+			}
+		}
+
+		.bg-box {
+			background: #2f3746;
+		}
+
+		.bg-item {
+			background: #232A37;
+		}
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+
+		.left {
+			width: 400px;
+			display: flex;
+			flex-direction: column;
+		}
+
+		.right {
+			margin-left: 10px;
+			flex: 1;
+			width: 0;
+		}
+
+		.information-box {
+			display: flex;
+			padding: 0 10px;
+			margin-top: 15px;
+
+			.information-item {
+				width: 25%;
+			}
+
+			.information-key {
+				color: #7c899f;
+				font-size: 13px;
+				margin-bottom: 4px;
+			}
+		}
+
+		.client-list {
+			flex: 1;
+			height: 0;
+
+			.alarm-title {
+				padding: 0 10px;
+			}
+
+			.alarm-table {
+				padding: 0 10px;
+				margin-bottom: 0;
+
+				.alarm-tr {
+					background: #232A37;
+				}
+			}
+		}
+
+		.client-avatr {
+			width: 100%;
+
+			display: flex;
+			padding: 10px;
+
+			.logo {
+				width: 76px;
+				height: 76px;
+			}
+
+			.content {
+				flex: 1;
+				width: 0;
+				margin-left: 4px;
+			}
+
+			.name {
+				line-height: 36px;
+				margin-bottom: 4px;
+				padding: 0 5px;
+			}
+
+			.sub-name {
+				line-height: 36px;
+				padding: 0 5px;
+			}
+		}
+
+		.client-space {
+			margin-top: 10px;
+			padding: 10px;
+
+			.space-item {
+				display: flex;
+				margin-bottom: 4px;
+
+				&:last-child {
+					margin-bottom: 0;
+				}
+
+				.space-key {
+					width: 80px;
+					margin-right: 4px;
+					line-height: 36px;
+					padding: 0 5px;
+					text-align: center;
+				}
+
+				.space-value {
+					flex: 1;
+					width: 0;
+					line-height: 36px;
+					padding: 0 5px;
+				}
+			}
+		}
+
+		.client-bill {
+			flex: 1;
+			height: 0;
+			margin-top: 10px;
+			display: flex;
+			flex-direction: column;
+		}
+	}
 </style>

+ 15 - 0
virgo.wzfrontend/console/src/config/field.js

@@ -196,6 +196,20 @@ const preferentialRentFreeWay = [{
 	name: '免租期划入租期'
 }];
 
+const billType = [{
+	id: 1,
+	name: '物业费'
+}, {
+	id: 2,
+	name: '水电费'
+}, {
+	id: 3,
+	name: '车位费'
+}, {
+	id: 4,
+	name: '其他费用'
+}];
+
 const invoiceType = [{
 	id: 1,
 	name: '增值税普通发票'
@@ -327,6 +341,7 @@ export default {
 		currencyType,
 		preferentialType,
 		preferentialRentFreeWay,
+		billType,
 		invoiceType,
 		serviceWorkWay,
 		clearWorkWay,

+ 158 - 150
virgo.wzfrontend/console/src/views/work/bill/contract/client.vue

@@ -1,151 +1,159 @@
-<template>
-	<div class="hui-flex hui-content">
-		<div class="hui-flex">
-			<div class="hui-content-title">
-				<div class="hui-title-item active">个人付款账单</div>
-			</div>
-			<div class="hui-flex-box hui-flex hui-table">
-				<list-filter ref="billContract" type="billContract" @filter="filterInit"></list-filter>
-				<div class="hui-flex-box">
-					<el-table :data="tableData" row-key="id" border height="100%">
-						<el-table-column label="序号" width="50">
-							<template slot-scope="scope">
-								<div style="text-align: center;">{{scope.$index + 1}}</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="合同编码" prop="contractCode"></el-table-column>
-						<el-table-column label="账单期数" prop="code" width="100">
-							<template slot-scope="scope">
-								<span>{{'第' + scope.row.phase + '期'}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="账单日期" prop="code" width="200">
-							<template slot-scope="scope">
-								<span>{{scope.row.startDate}}至{{scope.row.endDate}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="金额">
-							<template slot-scope="scope">
-								<span>{{scope.row.amount + '元'}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="收款方" prop="organizationName"></el-table-column>
-						<el-table-column label="付款方">
-							<template slot-scope="scope">
-								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="状态" width="80">
-							<template slot-scope="scope">
-								<div class="hui-table-tag">
-									<div class="hui-tag hui-tag-info" v-if="!scope.row.status">待付款</div>
-									<div class="hui-tag hui-tag-warning" v-else-if="scope.row.status === 1">付款中</div>
-									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已付款</div>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="操作" width="80">
-							<template slot-scope="scope">
-								<div class="hui-table-operation">
-									<span class="table-operation" @click="detailItem(scope.row)">
-										详情
-									</span>
-								</div>
-							</template>
-						</el-table-column>
-						<template slot="empty">
-							<empty description="暂无数据"></empty>
-						</template>
-					</el-table>
-				</div>
-				<div class="hui-content-pagination">
-					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
-						@current-change="currentChange">
-					</el-pagination>
-				</div>
-			</div>
-		</div>
-		<el-drawer title="账单详情" :visible.sync="drawer" :size="400" :append-to-body="true">
-			<detail v-if="drawer" :detailId="detailId" @reload="init" :showType="2"></detail>
-		</el-drawer>
-	</div>
-</template>
-
-<script>
-	import detail from '@/components/work/bill/contract/detail'
-	import listFilter from '@/components/common/listFilter'
-	import {
-		bindProjectDetail
-	} from '@/httpApi/organization'
-	import {
-		getPaymentListByPage
-	} from '@/httpApi/contract'
-	export default {
-		data() {
-			return {
-				tableData: [],
-				currPage: 1,
-				pageSize: 10,
-				totalCount: 0,
-				detailId: '',
-				filterOption: {},
-				drawer: false,
-				clientId: ''
-			}
-		},
-		created() {
-			bindProjectDetail({
-				userId: this.$store.getters.user.userId,
-				projectId: this.$store.getters.project.id,
-				identityId: 1
-			}).then(res => {
-				if (res.state) {
-					if (res.data.length == 0) return;
-					this.clientId = res.data[0].clientId;
-					this.init();
-				}
-			})
-		},
-		methods: {
-			init() {
-				let postData = {
-					currPage: this.currPage,
-					pageSize: this.pageSize,
-					projectId: this.$store.getters.project.id,
-					payClientId: this.clientId
-				}
-				postData = Object.assign(postData, this.filterOption);
-				getPaymentListByPage(postData).then(res => {
-					if (res.state) {
-						this.tableData = res.data.dataList;
-						this.totalCount = res.data.totalCount;
-					}
-				})
-			},
-			filterInit(option) {
-				this.filterOption = option;
-				this.currPage = 1;
-				this.init();
-			},
-			currentChange(currPage) {
-				this.currPage = currPage;
-				this.init();
-			},
-			detailItem(item) {
-				this.detailId = item.id;
-				this.drawer = true;
-			},
-			callback(type) {
-				if (type === 'init') this.init();
-				this.type = 'list';
-			}
-		},
-		components: {
-			detail,
-			listFilter
-		},
-	}
-</script>
-
-<style>
+<template>
+	<div class="hui-flex hui-content">
+		<div class="hui-flex">
+			<div class="hui-content-title">
+				<div class="hui-title-item active">个人付款账单</div>
+			</div>
+			<div class="hui-flex-box hui-flex hui-table">
+				<list-filter ref="billContract" type="billContract" @filter="filterInit"></list-filter>
+				<div class="hui-flex-box">
+					<el-table :data="tableData" row-key="id" border height="100%">
+						<el-table-column label="序号" width="50">
+							<template slot-scope="scope">
+								<div style="text-align: center;">{{scope.$index + 1}}</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="付款方">
+							<template slot-scope="scope">
+								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="合同编码" prop="contractCode"></el-table-column>
+						<el-table-column label="账单期数" prop="code" width="100">
+							<template slot-scope="scope">
+								<span>{{'第' + scope.row.phase + '期'}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="账单日期" prop="code" width="200">
+							<template slot-scope="scope">
+								<span>{{scope.row.startDate}}至{{scope.row.endDate}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="金额">
+							<template slot-scope="scope">
+								<span>{{scope.row.amount + '元'}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="付款时间">
+							<template slot-scope="scope">
+								<span v-if="scope.row.paymentRecordList">
+									{{scope.row.paymentRecordList[0].date}}
+								</span>
+								<span v-else>暂未付款</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="收款方" prop="organizationName"></el-table-column>
+						<el-table-column label="状态" width="80">
+							<template slot-scope="scope">
+								<div class="hui-table-tag">
+									<div class="hui-tag hui-tag-info" v-if="!scope.row.status">待付款</div>
+									<div class="hui-tag hui-tag-warning" v-else-if="scope.row.status === 1">付款中</div>
+									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已付款</div>
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="操作" width="80">
+							<template slot-scope="scope">
+								<div class="hui-table-operation">
+									<span class="table-operation" @click="detailItem(scope.row)">
+										详情
+									</span>
+								</div>
+							</template>
+						</el-table-column>
+						<template slot="empty">
+							<empty description="暂无数据"></empty>
+						</template>
+					</el-table>
+				</div>
+				<div class="hui-content-pagination">
+					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
+						@current-change="currentChange">
+					</el-pagination>
+				</div>
+			</div>
+		</div>
+		<el-drawer title="账单详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<detail v-if="drawer" :detailId="detailId" @reload="init" :showType="2"></detail>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import detail from '@/components/work/bill/contract/detail'
+	import listFilter from '@/components/common/listFilter'
+	import {
+		bindProjectDetail
+	} from '@/httpApi/organization'
+	import {
+		getPaymentListByPage
+	} from '@/httpApi/contract'
+	export default {
+		data() {
+			return {
+				tableData: [],
+				currPage: 1,
+				pageSize: 10,
+				totalCount: 0,
+				detailId: '',
+				filterOption: {},
+				drawer: false,
+				clientId: ''
+			}
+		},
+		created() {
+			bindProjectDetail({
+				userId: this.$store.getters.user.userId,
+				projectId: this.$store.getters.project.id,
+				identityId: 1
+			}).then(res => {
+				if (res.state) {
+					if (res.data.length == 0) return;
+					this.clientId = res.data[0].clientId;
+					this.init();
+				}
+			})
+		},
+		methods: {
+			init() {
+				let postData = {
+					currPage: this.currPage,
+					pageSize: this.pageSize,
+					projectId: this.$store.getters.project.id,
+					payClientId: this.clientId
+				}
+				postData = Object.assign(postData, this.filterOption);
+				getPaymentListByPage(postData).then(res => {
+					if (res.state) {
+						this.tableData = res.data.dataList;
+						this.totalCount = res.data.totalCount;
+					}
+				})
+			},
+			filterInit(option) {
+				this.filterOption = option;
+				this.currPage = 1;
+				this.init();
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			detailItem(item) {
+				this.detailId = item.id;
+				this.drawer = true;
+			},
+			callback(type) {
+				if (type === 'init') this.init();
+				this.type = 'list';
+			}
+		},
+		components: {
+			detail,
+			listFilter
+		},
+	}
+</script>
+
+<style>
 </style>

+ 158 - 150
virgo.wzfrontend/console/src/views/work/bill/contract/organization.vue

@@ -1,151 +1,159 @@
-<template>
-	<div class="hui-flex hui-content">
-		<div class="hui-flex">
-			<div class="hui-content-title">
-				<div class="hui-title-item active">公司付款账单</div>
-			</div>
-			<div class="hui-flex-box hui-flex hui-table">
-				<list-filter ref="billContract" type="billContract" @filter="filterInit"></list-filter>
-				<div class="hui-flex-box">
-					<el-table :data="tableData" row-key="id" border height="100%">
-						<el-table-column label="序号" width="50">
-							<template slot-scope="scope">
-								<div style="text-align: center;">{{scope.$index + 1}}</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="合同编码" prop="contractCode"></el-table-column>
-						<el-table-column label="账单期数" prop="code" width="100">
-							<template slot-scope="scope">
-								<span>{{'第' + scope.row.phase + '期'}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="账单日期" prop="code" width="200">
-							<template slot-scope="scope">
-								<span>{{scope.row.startDate}}至{{scope.row.endDate}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="金额">
-							<template slot-scope="scope">
-								<span>{{scope.row.amount + '元'}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="收款方" prop="organizationName"></el-table-column>
-						<el-table-column label="付款方">
-							<template slot-scope="scope">
-								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="状态" width="80">
-							<template slot-scope="scope">
-								<div class="hui-table-tag">
-									<div class="hui-tag hui-tag-info" v-if="!scope.row.status">待付款</div>
-									<div class="hui-tag hui-tag-warning" v-else-if="scope.row.status === 1">付款中</div>
-									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已付款</div>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="操作" width="80">
-							<template slot-scope="scope">
-								<div class="hui-table-operation">
-									<span class="table-operation" @click="detailItem(scope.row)">
-										详情
-									</span>
-								</div>
-							</template>
-						</el-table-column>
-						<template slot="empty">
-							<empty description="暂无数据"></empty>
-						</template>
-					</el-table>
-				</div>
-				<div class="hui-content-pagination">
-					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
-						@current-change="currentChange">
-					</el-pagination>
-				</div>
-			</div>
-		</div>
-		<el-drawer title="账单详情" :visible.sync="drawer" :size="400" :append-to-body="true">
-			<detail v-if="drawer" :detailId="detailId" @reload="init" :showType="2"></detail>
-		</el-drawer>
-	</div>
-</template>
-
-<script>
-	import detail from '@/components/work/bill/contract/detail'
-	import listFilter from '@/components/common/listFilter'
-	import {
-		bindProjectDetail
-	} from '@/httpApi/organization'
-	import {
-		getPaymentListByPage
-	} from '@/httpApi/contract'
-	export default {
-		data() {
-			return {
-				tableData: [],
-				currPage: 1,
-				pageSize: 10,
-				totalCount: 0,
-				detailId: '',
-				filterOption: {},
-				drawer: false,
-				merchantId: ''
-			}
-		},
-		created() {
-			bindProjectDetail({
-				bindOrganizationId: this.$store.getters.organization.id,
-				projectId: this.$store.getters.project.id,
-				identityId: 4
-			}).then(res => {
-				if (res.state) {
-					if (res.data.length == 0) return;
-					this.merchantId = res.data[0].merchantId;
-					this.init();
-				}
-			})
-		},
-		methods: {
-			init() {
-				let postData = {
-					currPage: this.currPage,
-					pageSize: this.pageSize,
-					projectId: this.$store.getters.project.id,
-					payMerchantId: this.merchantId
-				}
-				postData = Object.assign(postData, this.filterOption);
-				getPaymentListByPage(postData).then(res => {
-					if (res.state) {
-						this.tableData = res.data.dataList;
-						this.totalCount = res.data.totalCount;
-					}
-				})
-			},
-			filterInit(option) {
-				this.filterOption = option;
-				this.currPage = 1;
-				this.init();
-			},
-			currentChange(currPage) {
-				this.currPage = currPage;
-				this.init();
-			},
-			detailItem(item) {
-				this.detailId = item.id;
-				this.drawer = true;
-			},
-			callback(type) {
-				if (type === 'init') this.init();
-				this.type = 'list';
-			}
-		},
-		components: {
-			detail,
-			listFilter
-		},
-	}
-</script>
-
-<style>
+<template>
+	<div class="hui-flex hui-content">
+		<div class="hui-flex">
+			<div class="hui-content-title">
+				<div class="hui-title-item active">公司付款账单</div>
+			</div>
+			<div class="hui-flex-box hui-flex hui-table">
+				<list-filter ref="billContract" type="billContract" @filter="filterInit"></list-filter>
+				<div class="hui-flex-box">
+					<el-table :data="tableData" row-key="id" border height="100%">
+						<el-table-column label="序号" width="50">
+							<template slot-scope="scope">
+								<div style="text-align: center;">{{scope.$index + 1}}</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="付款方">
+							<template slot-scope="scope">
+								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="合同编码" prop="contractCode"></el-table-column>
+						<el-table-column label="账单期数" prop="code" width="100">
+							<template slot-scope="scope">
+								<span>{{'第' + scope.row.phase + '期'}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="账单日期" prop="code" width="200">
+							<template slot-scope="scope">
+								<span>{{scope.row.startDate}}至{{scope.row.endDate}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="金额">
+							<template slot-scope="scope">
+								<span>{{scope.row.amount + '元'}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="付款时间">
+							<template slot-scope="scope">
+								<span v-if="scope.row.paymentRecordList">
+									{{scope.row.paymentRecordList[0].date}}
+								</span>
+								<span v-else>暂未付款</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="收款方" prop="organizationName"></el-table-column>
+						<el-table-column label="状态" width="80">
+							<template slot-scope="scope">
+								<div class="hui-table-tag">
+									<div class="hui-tag hui-tag-info" v-if="!scope.row.status">待付款</div>
+									<div class="hui-tag hui-tag-warning" v-else-if="scope.row.status === 1">付款中</div>
+									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已付款</div>
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="操作" width="80">
+							<template slot-scope="scope">
+								<div class="hui-table-operation">
+									<span class="table-operation" @click="detailItem(scope.row)">
+										详情
+									</span>
+								</div>
+							</template>
+						</el-table-column>
+						<template slot="empty">
+							<empty description="暂无数据"></empty>
+						</template>
+					</el-table>
+				</div>
+				<div class="hui-content-pagination">
+					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
+						@current-change="currentChange">
+					</el-pagination>
+				</div>
+			</div>
+		</div>
+		<el-drawer title="账单详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<detail v-if="drawer" :detailId="detailId" @reload="init" :showType="2"></detail>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import detail from '@/components/work/bill/contract/detail'
+	import listFilter from '@/components/common/listFilter'
+	import {
+		bindProjectDetail
+	} from '@/httpApi/organization'
+	import {
+		getPaymentListByPage
+	} from '@/httpApi/contract'
+	export default {
+		data() {
+			return {
+				tableData: [],
+				currPage: 1,
+				pageSize: 10,
+				totalCount: 0,
+				detailId: '',
+				filterOption: {},
+				drawer: false,
+				merchantId: ''
+			}
+		},
+		created() {
+			bindProjectDetail({
+				bindOrganizationId: this.$store.getters.organization.id,
+				projectId: this.$store.getters.project.id,
+				identityId: 4
+			}).then(res => {
+				if (res.state) {
+					if (res.data.length == 0) return;
+					this.merchantId = res.data[0].merchantId;
+					this.init();
+				}
+			})
+		},
+		methods: {
+			init() {
+				let postData = {
+					currPage: this.currPage,
+					pageSize: this.pageSize,
+					projectId: this.$store.getters.project.id,
+					payMerchantId: this.merchantId
+				}
+				postData = Object.assign(postData, this.filterOption);
+				getPaymentListByPage(postData).then(res => {
+					if (res.state) {
+						this.tableData = res.data.dataList;
+						this.totalCount = res.data.totalCount;
+					}
+				})
+			},
+			filterInit(option) {
+				this.filterOption = option;
+				this.currPage = 1;
+				this.init();
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			detailItem(item) {
+				this.detailId = item.id;
+				this.drawer = true;
+			},
+			callback(type) {
+				if (type === 'init') this.init();
+				this.type = 'list';
+			}
+		},
+		components: {
+			detail,
+			listFilter
+		},
+	}
+</script>
+
+<style>
 </style>

+ 14 - 11
virgo.wzfrontend/console/src/views/work/bill/contract/payment.vue

@@ -2,7 +2,7 @@
 	<div class="hui-flex hui-content">
 		<div class="hui-flex">
 			<div class="hui-content-title">
-				<div class="hui-title-item active">收款账单列表</div>
+				<div class="hui-title-item active">收款账单</div>
 			</div>
 			<div class="hui-flex-box hui-flex hui-table">
 				<list-filter ref="billContract" type="billContract" @filter="filterInit"></list-filter>
@@ -12,11 +12,11 @@
 							<template slot-scope="scope">
 								<div style="text-align: center;">{{scope.$index + 1}}</div>
 							</template>
-						</el-table-column>
-						<el-table-column label="付款方">
-							<template slot-scope="scope">
-								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
-							</template>
+						</el-table-column>
+						<el-table-column label="付款方">
+							<template slot-scope="scope">
+								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
+							</template>
 						</el-table-column>
 						<el-table-column label="合同编码" prop="contractCode"></el-table-column>
 						<el-table-column label="账单期数" prop="code" width="100">
@@ -33,11 +33,14 @@
 							<template slot-scope="scope">
 								<span>{{scope.row.amount + '元'}}</span>
 							</template>
-						</el-table-column>
-						<el-table-column label="付款时间">
-							<template slot-scope="scope">
-								<span></span>
-							</template>
+						</el-table-column>
+						<el-table-column label="付款时间">
+							<template slot-scope="scope">
+								<span v-if="scope.row.paymentRecordList">
+									{{scope.row.paymentRecordList[0].date}}
+								</span>
+								<span v-else>暂未付款</span>
+							</template>
 						</el-table-column>
 						<el-table-column label="收款方" prop="organizationName"></el-table-column>
 						<el-table-column label="状态" width="80">

+ 6 - 4
virgo.wzfrontend/console/src/views/work/bill/routine/client.vue

@@ -13,8 +13,8 @@
 								<div style="text-align: center;">{{scope.$index + 1}}</div>
 							</template>
 						</el-table-column>
-						<el-table-column label="账单名称" prop="name"></el-table-column>
-						<el-table-column label="金额">
+						<el-table-column label="账单名称" prop="name" width="160"></el-table-column>
+						<el-table-column label="金额" width="160">
 							<template slot-scope="scope">
 								<span>{{scope.row.amount + '元'}}</span>
 							</template>
@@ -25,6 +25,7 @@
 								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
 							</template>
 						</el-table-column>
+						<el-table-column label="关联合同" prop="contractCode"></el-table-column>
 						<el-table-column label="提醒日期" prop="code" width="200">
 							<template slot-scope="scope">
 								<span>{{scope.row.reminderDate}}</span>
@@ -33,9 +34,10 @@
 						<el-table-column label="状态" width="80">
 							<template slot-scope="scope">
 								<div class="hui-table-tag">
-									<div class="hui-tag hui-tag-warning" v-if="scope.row.status === 1">付款中</div>
-									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已付款</div>
+									<div class="hui-tag hui-tag-warning" v-if="scope.row.status === 1">付款中</div>
+									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已付款</div>
 									<div class="hui-tag hui-tag-info" v-else-if="scope.row.status === 3">待付款</div>
+									<div class="hui-tag hui-tag-info" v-else>待发送</div>
 								</div>
 							</template>
 						</el-table-column>

+ 4 - 2
virgo.wzfrontend/console/src/views/work/bill/routine/organization.vue

@@ -13,8 +13,8 @@
 								<div style="text-align: center;">{{scope.$index + 1}}</div>
 							</template>
 						</el-table-column>
-						<el-table-column label="账单名称" prop="name"></el-table-column>
-						<el-table-column label="金额">
+						<el-table-column label="账单名称" prop="name" width="160"></el-table-column>
+						<el-table-column label="金额" width="160">
 							<template slot-scope="scope">
 								<span>{{scope.row.amount + '元'}}</span>
 							</template>
@@ -25,6 +25,7 @@
 								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
 							</template>
 						</el-table-column>
+						<el-table-column label="关联合同" prop="contractCode"></el-table-column>
 						<el-table-column label="提醒日期" prop="code" width="200">
 							<template slot-scope="scope">
 								<span>{{scope.row.reminderDate}}</span>
@@ -36,6 +37,7 @@
 									<div class="hui-tag hui-tag-warning" v-if="scope.row.status === 1">付款中</div>
 									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已付款</div>
 									<div class="hui-tag hui-tag-info" v-else-if="scope.row.status === 3">待付款</div>
+									<div class="hui-tag hui-tag-info" v-else>待发送</div>
 								</div>
 							</template>
 						</el-table-column>

+ 199 - 186
virgo.wzfrontend/console/src/views/work/bill/routine/payment.vue

@@ -1,188 +1,201 @@
-<template>
-	<div class="hui-flex hui-content">
-		<div class="hui-flex">
-			<div class="hui-content-title">
-				<div class="hui-title-item active">收款账单列表</div>
-			</div>
-			<div class="hui-flex-box hui-flex hui-table">
-				<list-filter ref="billContract" type="billRoutine" @filter="filterInit"></list-filter>
-				<div class="hui-content-insert">
-					<el-button type="primary" size="medium" @click="insertItem">新增账单</el-button>
-				</div>
-				<div class="hui-flex-box">
-					<el-table :data="tableData" row-key="id" border height="100%">
-						<el-table-column label="序号" width="50">
-							<template slot-scope="scope">
-								<div style="text-align: center;">{{scope.$index + 1}}</div>
-							</template>
+<template>
+	<div class="hui-flex hui-content">
+		<div class="hui-flex">
+			<div class="hui-content-title">
+				<div :class="'hui-title-item'+(nowTitle.id == item.id ?' active' : '')"
+					v-for="(item,index) in $field.field.billType" :key="index" @click="clickTitle(item)">
+					{{item.name}}
+				</div>
+			</div>
+			<div class="hui-flex-box hui-flex hui-table">
+				<list-filter ref="billContract" type="billRoutine" @filter="filterInit"></list-filter>
+				<div class="hui-content-insert">
+					<el-button type="primary" size="medium" @click="insertItem">新增账单</el-button>
+				</div>
+				<div class="hui-flex-box">
+					<el-table :data="tableData" row-key="id" border height="100%">
+						<el-table-column label="序号" width="50">
+							<template slot-scope="scope">
+								<div style="text-align: center;">{{scope.$index + 1}}</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="账单名称" prop="name"width="160"></el-table-column>
+						<el-table-column label="金额" width="160">
+							<template slot-scope="scope">
+								<span>{{scope.row.amount + '元'}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="收款方" prop="organizationName"></el-table-column>
+						<el-table-column label="付款方">
+							<template slot-scope="scope">
+								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
+							</template>
 						</el-table-column>
-						<el-table-column label="账单名称" prop="name"></el-table-column>
-						<el-table-column label="金额">
-							<template slot-scope="scope">
-								<span>{{scope.row.amount + '元'}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="收款方" prop="organizationName"></el-table-column>
-						<el-table-column label="付款方">
-							<template slot-scope="scope">
-								<span> {{scope.row.payMerchantName || scope.row.payClientName}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="提醒日期" prop="code" width="200">
-							<template slot-scope="scope">
-								<span>{{scope.row.reminderDate}}</span>
-							</template>
-						</el-table-column>
-						<el-table-column label="状态" width="80">
-							<template slot-scope="scope">
-								<div class="hui-table-tag">
-									<div class="hui-tag hui-tag-warning" v-if="scope.row.status === 1">付款中</div>
-									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已付款</div>
-									<div class="hui-tag hui-tag-info" v-else-if="scope.row.status === 3">待付款</div>
-									<div class="hui-tag hui-tag-info" v-else>待发送</div>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="操作" width="220">
-							<template slot-scope="scope">
-								<div class="hui-table-operation">
-									<span class="table-operation" @click="sendItem(scope.row)" v-if="!scope.row.status">
-										发送客户
-									</span>
-									<span class="table-operation" @click="detailItem(scope.row)">
-										详情
-									</span>
-									<span class="table-operation" @click="updateItem(scope.row)"
-										v-if="!scope.row.status">
-										编辑
-									</span>
-									<span class="table-operation" @click="deleteItem(scope.row)"
-										v-if="!scope.row.status">
-										删除
-									</span>
-								</div>
-							</template>
-						</el-table-column>
-						<template slot="empty">
-							<empty description="暂无数据"></empty>
-						</template>
-					</el-table>
-				</div>
-				<div class="hui-content-pagination">
-					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
-						@current-change="currentChange">
-					</el-pagination>
-				</div>
-			</div>
-		</div>
-		<el-dialog :close-on-click-modal="false" :title="isUpdate?'编辑':'新增'" :visible.sync="visible" width="900px" :append-to-body="true">
-			<edit v-if="visible" @callback="callback" :isUpdate="isUpdate" :detailId="detailId"></edit>
-		</el-dialog>
-		<el-drawer title="账单详情" :visible.sync="drawer" :size="400" :append-to-body="true">
-			<detail v-if="drawer" :detailId="detailId" @reload="init" :showType="1"></detail>
-		</el-drawer>
-	</div>
-</template>
-
-<script>
-	import detail from '@/components/work/bill/routine/detail'
-	import edit from '@/components/work/bill/routine/edit'
-	import listFilter from '@/components/common/listFilter'
-	import {
-		getPaymentListByPage,
-		deletePaymentById,
-		updatePayment
-	} from '@/httpApi/bill'
-	export default {
-		data() {
-			return {
-				tableData: [],
-				currPage: 1,
-				pageSize: 10,
-				totalCount: 0,
-				detailId: '',
-				isUpdate: false,
-				filterOption: {},
-				drawer: false,
-				visible: false
-			}
-		},
-		created() {
-			this.init();
-		},
-		methods: {
-			init() {
-				let postData = {
-					currPage: this.currPage,
-					pageSize: this.pageSize,
-					projectId: this.$store.getters.project.id,
-					organizationId: this.$store.getters.organization.id
-				}
-				postData = Object.assign(postData, this.filterOption);
-				getPaymentListByPage(postData).then(res => {
-					if (res.state) {
-						this.tableData = res.data.dataList;
-						this.totalCount = res.data.totalCount;
-					}
-				})
-			},
-			filterInit(option) {
-				this.filterOption = option;
-				this.currPage = 1;
-				this.init();
-			},
-			currentChange(currPage) {
-				this.currPage = currPage;
-				this.init();
-			},
-			insertItem() {
-				this.isUpdate = false;
-				this.visible = true;
-			},
-			updateItem(item) {
-				this.detailId = item.id;
-				this.isUpdate = true;
-				this.visible = true;
-			},
-			sendItem(item) {
-				this.$confirm('确定要删除发送该账单给客户?', () => {
-					updatePayment({
-						id: item.id,
-						status: 3
-					}).then(res => {
-						if (res.state) {
-							this.init();
-							this.$message.success('操作成功');
-						}
-					})
-				});
-			},
-			detailItem(item) {
-				this.detailId = item.id;
-				this.drawer = true;
-			},
-			deleteItem(item) {
-				this.$confirm('确定要删除该账单?', () => {
-					deletePaymentById(item.id).then(res => {
-						if (res.state) {
-							this.init();
-							this.$message.success('操作成功');
-						}
-					})
-				});
-			},
-			callback(type) {
-				if (type === 'init') this.init();
-				this.visible = false;
-			}
-		},
-		components: {
-			detail,
-			listFilter,
-			edit
-		},
-	}
-</script>
-
-<style>
+						<el-table-column label="关联合同" prop="contractCode"></el-table-column>
+						<el-table-column label="提醒日期" prop="code" width="200">
+							<template slot-scope="scope">
+								<span>{{scope.row.reminderDate}}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="状态" width="80">
+							<template slot-scope="scope">
+								<div class="hui-table-tag">
+									<div class="hui-tag hui-tag-warning" v-if="scope.row.status === 1">付款中</div>
+									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已付款</div>
+									<div class="hui-tag hui-tag-info" v-else-if="scope.row.status === 3">待付款</div>
+									<div class="hui-tag hui-tag-info" v-else>待发送</div>
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="操作" width="220">
+							<template slot-scope="scope">
+								<div class="hui-table-operation">
+									<span class="table-operation" @click="sendItem(scope.row)" v-if="!scope.row.status">
+										发送客户
+									</span>
+									<span class="table-operation" @click="detailItem(scope.row)">
+										详情
+									</span>
+									<span class="table-operation" @click="updateItem(scope.row)"
+										v-if="!scope.row.status">
+										编辑
+									</span>
+									<span class="table-operation" @click="deleteItem(scope.row)"
+										v-if="!scope.row.status">
+										删除
+									</span>
+								</div>
+							</template>
+						</el-table-column>
+						<template slot="empty">
+							<empty description="暂无数据"></empty>
+						</template>
+					</el-table>
+				</div>
+				<div class="hui-content-pagination">
+					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
+						@current-change="currentChange">
+					</el-pagination>
+				</div>
+			</div>
+		</div>
+		<el-dialog :close-on-click-modal="false" :title="isUpdate?'编辑':'新增'" :visible.sync="visible" width="900px"
+			:append-to-body="true">
+			<edit v-if="visible" @callback="callback" :isUpdate="isUpdate" :detailId="detailId"></edit>
+		</el-dialog>
+		<el-drawer title="账单详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<detail v-if="drawer" :detailId="detailId" @reload="init" :showType="1"></detail>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import detail from '@/components/work/bill/routine/detail'
+	import edit from '@/components/work/bill/routine/edit'
+	import listFilter from '@/components/common/listFilter'
+	import {
+		getPaymentListByPage,
+		deletePaymentById,
+		updatePayment
+	} from '@/httpApi/bill'
+	export default {
+		data() {
+			return {
+				tableData: [],
+				currPage: 1,
+				pageSize: 10,
+				totalCount: 0,
+				detailId: '',
+				isUpdate: false,
+				filterOption: {},
+				drawer: false,
+				visible: false,
+				nowTitle: {}
+			}
+		},
+		created() {
+			this.nowTitle = this.$field.field.billType[0];
+			this.init();
+		},
+		methods: {
+			clickTitle(item) {
+				this.nowTitle = item;
+				this.currPage = 1;
+				this.init();
+			},
+			init() {
+				let postData = {
+					currPage: this.currPage,
+					pageSize: this.pageSize,
+					projectId: this.$store.getters.project.id,
+					organizationId: this.$store.getters.organization.id,
+					type: this.nowTitle.id
+				}
+				postData = Object.assign(postData, this.filterOption);
+				getPaymentListByPage(postData).then(res => {
+					if (res.state) {
+						this.tableData = res.data.dataList;
+						this.totalCount = res.data.totalCount;
+					}
+				})
+			},
+			filterInit(option) {
+				this.filterOption = option;
+				this.currPage = 1;
+				this.init();
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			insertItem() {
+				this.isUpdate = false;
+				this.visible = true;
+			},
+			updateItem(item) {
+				this.detailId = item.id;
+				this.isUpdate = true;
+				this.visible = true;
+			},
+			sendItem(item) {
+				this.$confirm('确定要删除发送该账单给客户?', () => {
+					updatePayment({
+						id: item.id,
+						status: 3
+					}).then(res => {
+						if (res.state) {
+							this.init();
+							this.$message.success('操作成功');
+						}
+					})
+				});
+			},
+			detailItem(item) {
+				this.detailId = item.id;
+				this.drawer = true;
+			},
+			deleteItem(item) {
+				this.$confirm('确定要删除该账单?', () => {
+					deletePaymentById(item.id).then(res => {
+						if (res.state) {
+							this.init();
+							this.$message.success('操作成功');
+						}
+					})
+				});
+			},
+			callback(type) {
+				if (type === 'init') this.init();
+				this.visible = false;
+			}
+		},
+		components: {
+			detail,
+			listFilter,
+			edit
+		},
+	}
+</script>
+
+<style>
 </style>

+ 210 - 210
virgo.wzfrontend/console/src/views/work/contract/client.vue

@@ -1,211 +1,211 @@
-<template>
-	<div class="hui-flex hui-content">
-		<div class="hui-flex" v-if="type === 'list'">
-			<div class="hui-content-title">
-				<div class="hui-title-item active">合同列表</div>
-			</div>
-			<div class="hui-flex-box hui-flex hui-table">
-				<list-filter type="contract" @filter="filterInit"></list-filter>
-				<div class="hui-flex-box">
-					<el-table :data="tableData" row-key="id" border height="100%">
-						<el-table-column label="序号" width="50">
-							<template slot-scope="scope">
-								<div style="text-align: center;">{{scope.$index + 1}}</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="合同编号" prop="code"></el-table-column>
-						<el-table-column label="租客" prop="name">
-							<template slot-scope="scope">
-								{{scope.row.tenantType === 1 ? scope.row.merchantName: scope.row.clientName}}
-							</template>
-						</el-table-column>
-						<el-table-column label="房号" prop="projectItemTargetRoomIds">
-							<template slot-scope="scope">
-								<div class="hui-ellipsis">
-									<span v-for="(item,index) in scope.row.roomMap">
-										{{item}}、
-									</span>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="开始日" prop="startDate"></el-table-column>
-						<el-table-column label="结束日" prop="endDate"></el-table-column>
-						<el-table-column label="运营跟进人" prop="operatorName"></el-table-column>
-						<el-table-column label="状态" width="100">
-							<template slot-scope="scope">
-								<div class="hui-table-tag">
-									<div class="hui-tag hui-tag-info" v-if="scope.row.status === 1">待确认</div>
-									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已生效</div>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="操作" width="150">
-							<template slot-scope="scope">
-								<div class="hui-table-operation">
-									<span class="table-operation" @click="detailItem(scope.row)">
-										详情
-									</span>
-								</div>
-							</template>
-						</el-table-column>
-						<template slot="empty">
-							<empty description="暂无数据"></empty>
-						</template>
-					</el-table>
-				</div>
-				<div class="hui-content-pagination">
-					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
-						@current-change="currentChange">
-					</el-pagination>
-				</div>
-			</div>
-		</div>
-		<div class="hui-flex" v-else>
-			<div class="hui-nav">
-				<el-page-header @back="type = 'list'" :content="type === 'edit'?'新建合同':'合同详情'"></el-page-header>
-				<div class="nav-button">
-					<el-button type="primary" size="medium" @click="sureConcart"
-						v-if="type == 'detail' && detail.status === 1">
-						确认合同
-					</el-button>
-				</div>
-			</div>
-			<edit v-if="type === 'edit'" class="hui-flex-box" @callback="callback" :detailId="detail.id"></edit>
-			<detail ref="detail" v-else class="hui-flex-box" @callback="callback" :detailId="detail.id"></detail>
-		</div>
-	</div>
-</template>
-
-<script>
-	import edit from '@/components/work/contract/list/edit'
-	import detail from '@/components/work/contract/list/detail'
-	import listFilter from '@/components/common/listFilter'
-	import {
-		getContractListByPage,
-		deleteContractById,
-		updateContract,
-		archivedDocument,
-		paymentGenerate
-	} from '@/httpApi/contract'
-	import {
-		bindProjectDetail
-	} from '@/httpApi/organization'
-
-	export default {
-		data() {
-			return {
-				type: 'list',
-				tableData: [],
-				currPage: 1,
-				pageSize: 10,
-				totalCount: 0,
-				filterOption: {},
-				merchantId: '',
-				detail: {}
-			}
-		},
-		created() {
-			bindProjectDetail({
-				userId: this.$store.getters.user.userId,
-				projectId: this.$store.getters.project.id,
-				identityId: 1
-			}).then(res => {
-				if (res.state) {
-					if (res.data.length == 0) return;
-					this.clientId = res.data[0].clientId;
-					this.init();
-				}
-			})
-		},
-		methods: {
-			init() {
-				let postData = {
-					currPage: this.currPage,
-					pageSize: this.pageSize,
-					clientId: this.clientId,
-					projectId: this.$store.getters.project.id,
-					statusList: [1, 2, 3, 4, 5]
-				}
-				postData = Object.assign(postData, this.filterOption);
-				getContractListByPage(postData).then(res => {
-					if (res.state) {
-						this.tableData = res.data.dataList;
-						this.totalCount = res.data.totalCount;
-					}
-				})
-			},
-			filterInit(option) {
-				this.filterOption = option;
-				this.currPage = 1;
-				this.init();
-			},
-			insert() {
-				this.detail = {};
-				this.type = 'edit';
-			},
-			currentChange(currPage) {
-				this.currPage = currPage;
-				this.init();
-			},
-			detailItem(item) {
-				this.detail = item;
-				this.type = 'detail';
-			},
-			sureConcart() {
-				this.$confirm('是否确定合同无误,确定后账单将自动生成?', () => {
-					this.$loading.open();
-					let documentList = this.detail.document ? JSON.parse(this.detail.document) : [];
-					let promise = [];
-					for (let i = 0; i < documentList.length; i++) {
-						promise.push(new Promise((resolve, reject) => {
-							archivedDocument(documentList[i].id, this.$store.getters
-								.project.name).then(res => {
-								if (res.state) {
-									resolve(true)
-								} else {
-									reject(false)
-								}
-							})
-						}))
-					}
-					promise.push(new Promise((resolve, reject) => {
-						paymentGenerate(this.detail.id).then(res => {
-							if (res.state) {
-								resolve(true)
-							} else {
-								reject(false)
-							}
-						})
-					}))
-					Promise.all(promise).then(res => {
-						this.$loading.close();
-						updateContract({
-							id: this.detail.id,
-							status: 2
-						})
-						this.$message({
-							type: 'success',
-							message: '操作成功'
-						})
-						this.$refs.detail.init();
-						this.detail['status'] = 2;
-					}).catch(error => {
-						this.$loading.close();
-					})
-				});
-			},
-			callback(type) {
-				if (type === 'init') this.init();
-				this.type = 'list';
-			}
-		},
-		components: {
-			edit,
-			detail,
-			listFilter
-		},
-	}
-</script>
-
-<style>
+<template>
+	<div class="hui-flex hui-content">
+		<div class="hui-flex" v-if="type === 'list'">
+			<div class="hui-content-title">
+				<div class="hui-title-item active">合同列表</div>
+			</div>
+			<div class="hui-flex-box hui-flex hui-table">
+				<list-filter type="contract" @filter="filterInit"></list-filter>
+				<div class="hui-flex-box">
+					<el-table :data="tableData" row-key="id" border height="100%">
+						<el-table-column label="序号" width="50">
+							<template slot-scope="scope">
+								<div style="text-align: center;">{{scope.$index + 1}}</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="合同编码" prop="code"></el-table-column>
+						<el-table-column label="租客" prop="name">
+							<template slot-scope="scope">
+								{{scope.row.tenantType === 1 ? scope.row.merchantName: scope.row.clientName}}
+							</template>
+						</el-table-column>
+						<el-table-column label="房号" prop="projectItemTargetRoomIds">
+							<template slot-scope="scope">
+								<div class="hui-ellipsis">
+									<span v-for="(item,index) in scope.row.roomMap">
+										{{item}}、
+									</span>
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="开始日" prop="startDate"></el-table-column>
+						<el-table-column label="结束日" prop="endDate"></el-table-column>
+						<el-table-column label="运营跟进人" prop="operatorName"></el-table-column>
+						<el-table-column label="状态" width="100">
+							<template slot-scope="scope">
+								<div class="hui-table-tag">
+									<div class="hui-tag hui-tag-info" v-if="scope.row.status === 1">待确认</div>
+									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已生效</div>
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="操作" width="150">
+							<template slot-scope="scope">
+								<div class="hui-table-operation">
+									<span class="table-operation" @click="detailItem(scope.row)">
+										详情
+									</span>
+								</div>
+							</template>
+						</el-table-column>
+						<template slot="empty">
+							<empty description="暂无数据"></empty>
+						</template>
+					</el-table>
+				</div>
+				<div class="hui-content-pagination">
+					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
+						@current-change="currentChange">
+					</el-pagination>
+				</div>
+			</div>
+		</div>
+		<div class="hui-flex" v-else>
+			<div class="hui-nav">
+				<el-page-header @back="type = 'list'" :content="type === 'edit'?'新建合同':'合同详情'"></el-page-header>
+				<div class="nav-button">
+					<el-button type="primary" size="medium" @click="sureConcart"
+						v-if="type == 'detail' && detail.status === 1">
+						确认合同
+					</el-button>
+				</div>
+			</div>
+			<edit v-if="type === 'edit'" class="hui-flex-box" @callback="callback" :detailId="detail.id"></edit>
+			<detail ref="detail" v-else class="hui-flex-box" @callback="callback" :detailId="detail.id"></detail>
+		</div>
+	</div>
+</template>
+
+<script>
+	import edit from '@/components/work/contract/list/edit'
+	import detail from '@/components/work/contract/list/detail'
+	import listFilter from '@/components/common/listFilter'
+	import {
+		getContractListByPage,
+		deleteContractById,
+		updateContract,
+		archivedDocument,
+		paymentGenerate
+	} from '@/httpApi/contract'
+	import {
+		bindProjectDetail
+	} from '@/httpApi/organization'
+
+	export default {
+		data() {
+			return {
+				type: 'list',
+				tableData: [],
+				currPage: 1,
+				pageSize: 10,
+				totalCount: 0,
+				filterOption: {},
+				merchantId: '',
+				detail: {}
+			}
+		},
+		created() {
+			bindProjectDetail({
+				userId: this.$store.getters.user.userId,
+				projectId: this.$store.getters.project.id,
+				identityId: 1
+			}).then(res => {
+				if (res.state) {
+					if (res.data.length == 0) return;
+					this.clientId = res.data[0].clientId;
+					this.init();
+				}
+			})
+		},
+		methods: {
+			init() {
+				let postData = {
+					currPage: this.currPage,
+					pageSize: this.pageSize,
+					clientId: this.clientId,
+					projectId: this.$store.getters.project.id,
+					statusList: [1, 2, 3, 4, 5]
+				}
+				postData = Object.assign(postData, this.filterOption);
+				getContractListByPage(postData).then(res => {
+					if (res.state) {
+						this.tableData = res.data.dataList;
+						this.totalCount = res.data.totalCount;
+					}
+				})
+			},
+			filterInit(option) {
+				this.filterOption = option;
+				this.currPage = 1;
+				this.init();
+			},
+			insert() {
+				this.detail = {};
+				this.type = 'edit';
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			detailItem(item) {
+				this.detail = item;
+				this.type = 'detail';
+			},
+			sureConcart() {
+				this.$confirm('是否确定合同无误,确定后账单将自动生成?', () => {
+					this.$loading.open();
+					let documentList = this.detail.document ? JSON.parse(this.detail.document) : [];
+					let promise = [];
+					for (let i = 0; i < documentList.length; i++) {
+						promise.push(new Promise((resolve, reject) => {
+							archivedDocument(documentList[i].id, this.$store.getters
+								.project.name).then(res => {
+								if (res.state) {
+									resolve(true)
+								} else {
+									reject(false)
+								}
+							})
+						}))
+					}
+					promise.push(new Promise((resolve, reject) => {
+						paymentGenerate(this.detail.id).then(res => {
+							if (res.state) {
+								resolve(true)
+							} else {
+								reject(false)
+							}
+						})
+					}))
+					Promise.all(promise).then(res => {
+						this.$loading.close();
+						updateContract({
+							id: this.detail.id,
+							status: 2
+						})
+						this.$message({
+							type: 'success',
+							message: '操作成功'
+						})
+						this.$refs.detail.init();
+						this.detail['status'] = 2;
+					}).catch(error => {
+						this.$loading.close();
+					})
+				});
+			},
+			callback(type) {
+				if (type === 'init') this.init();
+				this.type = 'list';
+			}
+		},
+		components: {
+			edit,
+			detail,
+			listFilter
+		},
+	}
+</script>
+
+<style>
 </style>

+ 199 - 199
virgo.wzfrontend/console/src/views/work/contract/list.vue

@@ -1,25 +1,25 @@
-<template>
-	<div class="hui-flex hui-content">
-		<div class="hui-flex" v-if="type === 'list'">
-			<div class="hui-content-title">
-				<div class="hui-title-item active">合同列表</div>
-			</div>
-			<div class="hui-flex-box hui-flex hui-table">
-				<list-filter type="contract" @filter="filterInit"></list-filter>
-				<div class="hui-content-insert">
-					<el-button type="primary" size="medium" @click="insert">新增合同</el-button>
-				</div>
-				<div class="hui-flex-box">
-					<el-table :data="tableData" row-key="id" border height="100%">
-						<el-table-column label="序号" width="50">
-							<template slot-scope="scope">
-								<div style="text-align: center;">{{scope.$index + 1}}</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="合同类型" prop="type"  width="110">
-							<template slot-scope="scope">
-								<span>{{$field.findTypeName('contractType',scope.row.type)}}</span>
-							</template>
+<template>
+	<div class="hui-flex hui-content">
+		<div class="hui-flex" v-if="type === 'list'">
+			<div class="hui-content-title">
+				<div class="hui-title-item active">合同列表</div>
+			</div>
+			<div class="hui-flex-box hui-flex hui-table">
+				<list-filter type="contract" @filter="filterInit"></list-filter>
+				<div class="hui-content-insert">
+					<el-button type="primary" size="medium" @click="insert">新增合同</el-button>
+				</div>
+				<div class="hui-flex-box">
+					<el-table :data="tableData" row-key="id" border height="100%">
+						<el-table-column label="序号" width="50">
+							<template slot-scope="scope">
+								<div style="text-align: center;">{{scope.$index + 1}}</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="合同类型" prop="type"  width="110">
+							<template slot-scope="scope">
+								<span>{{$field.findTypeName('contractType',scope.row.type)}}</span>
+							</template>
 						</el-table-column>
 						<el-table-column label="位置" prop="projectItemTargetRoomIds">
 							<template slot-scope="scope">
@@ -29,182 +29,182 @@
 									</span>
 								</div>
 							</template>
-						</el-table-column>
-						<el-table-column label="客商" prop="name">
-							<template slot-scope="scope">
-								{{scope.row.tenantType === 1 ? scope.row.merchantName: scope.row.clientName}}
-							</template>
-						</el-table-column>
-						<el-table-column label="合同编号" prop="code"></el-table-column>
-						<el-table-column label="开始日" prop="startDate" width="110"></el-table-column>
+						</el-table-column>
+						<el-table-column label="客商" prop="name">
+							<template slot-scope="scope">
+								{{scope.row.tenantType === 1 ? scope.row.merchantName: scope.row.clientName}}
+							</template>
+						</el-table-column>
+						<el-table-column label="合同编码" prop="code"></el-table-column>
+						<el-table-column label="开始日" prop="startDate" width="110"></el-table-column>
 						<el-table-column label="结束日" prop="endDate" width="110"></el-table-column>
-						<el-table-column label="联系人" prop="tenantContactPerson" width="100"></el-table-column>
-						<el-table-column label="跟进人" prop="operatorName" width="100"></el-table-column>
-						<el-table-column label="状态" width="100">
-							<template slot-scope="scope">
-								<div class="hui-table-operation" v-if="!scope.row.status">
-									<span class="table-operation" @click="sendItem(scope.row)">
-										发送租客
-									</span>
-								</div>
-								<div class="hui-table-tag" v-else>
-									<div class="hui-tag hui-tag-info" v-if="scope.row.status === 1">待客户确认</div>
-									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已生效</div>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="操作" width="150">
-							<template slot-scope="scope">
-								<div class="hui-table-operation">
-									<span class="table-operation" @click="detailItem(scope.row)">
-										详情
-									</span>
-									<span class="table-operation" v-if="scope.row.status != 2"
-										@click="updateItem(scope.row)">
-										编辑
-									</span>
-									<span class="table-operation" v-if="scope.row.status != 2"
-										@click="deleteItem(scope.row)">
-										删除
-									</span>
-								</div>
-							</template>
-						</el-table-column>
-						<template slot="empty">
-							<empty description="暂无数据"></empty>
-						</template>
-					</el-table>
-				</div>
-				<div class="hui-content-pagination">
-					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
-						@current-change="currentChange">
-					</el-pagination>
-				</div>
-			</div>
-		</div>
-		<div class="hui-flex" v-else>
-			<div class="hui-nav">
-				<el-page-header @back="type = 'list'" :content="type === 'edit'?'新建合同':'合同详情'"></el-page-header>
-			</div>
-			<edit v-if="type === 'edit'" class="hui-flex-box" @callback="callback" :detailId="detail.id"></edit>
-			<detail v-else class="hui-flex-box" @callback="callback" :detailId="detail.id"></detail>
-		</div>
-	</div>
-</template>
-
-<script>
-	import edit from '@/components/work/contract/list/edit'
-	import detail from '@/components/work/contract/list/detail'
-	import listFilter from '@/components/common/listFilter'
-	import {
-		getContractListByPage,
-		deleteContractById,
-		updateContract
-	} from '@/httpApi/contract'
-	import {
-		isPassRequestUseSeal
-	} from '@/httpApi/organization'
-	export default {
-		data() {
-			return {
-				type: 'list',
-				tableData: [],
-				currPage: 1,
-				pageSize: 10,
-				totalCount: 0,
-				detail: {},
-				filterOption: {}
-			}
-		},
-		created() {
-			this.init();
-		},
-		methods: {
-			init() {
-				//合同状态,0-初始状态、1.已发送租客、2.已确认生成合同、3.已续费、4.即将过期、5.已过期、6.已退租。
-				let postData = {
-					currPage: this.currPage,
-					pageSize: this.pageSize,
-					organizationId: this.$store.getters.organization.id,
-					projectId: this.$store.getters.project.id
-				}
-				postData = Object.assign(postData, this.filterOption);
-				getContractListByPage(postData).then(res => {
-					if (res.state) {
-						this.tableData = res.data.dataList;
-						this.totalCount = res.data.totalCount;
-					}
-				})
-			},
-			filterInit(option) {
-				this.filterOption = option;
-				this.currPage = 1;
-				this.init();
-			},
-			insert() {
-				this.detail = {};
-				this.type = 'edit';
-			},
-			currentChange(currPage) {
-				this.currPage = currPage;
-				this.init();
-			},
-			detailItem(item) {
-				this.detail = item;
-				this.type = 'detail';
-			},
-			updateItem(item) {
-				this.detail = item;
-				this.type = 'edit';
-			},
-			sendItem(item) {
-				let document = JSON.parse(item.document);
-				isPassRequestUseSeal(document.map(node => node.id).join(',')).then(res => {
-					if (res.state) {
-						if (!res.data.hasSeal) return this.$message.warning('您暂未添加公章,请设置后发送给租客');
-						if (!res.data.passSeal) return this.$message.warning('您申请的公章暂未审核通过,请审核通过后发送给租客');
-						this.$confirm('确定要发送合同给租客?', () => {
-							updateContract({
-								id: item.id,
-								status: 1
-							}).then(res => {
-								if (res.state) {
-									this.$message({
-										type: 'success',
-										message: '操作成功'
-									})
-									this.init();
-								}
-							})
-						});
-					}
-				})
-			},
-			deleteItem(item) {
-				this.$confirm('确定要删除该合同?', () => {
-					deleteContractById(item.id).then(res => {
-						if (res.state) {
-							this.$message({
-								type: 'success',
-								message: '操作成功'
-							})
-							this.init();
-						}
-					})
-				});
-			},
-			callback(type) {
-				if (type === 'init') this.init();
-				this.type = 'list';
-			}
-		},
-		components: {
-			edit,
-			detail,
-			listFilter
-		},
-	}
-</script>
-
-<style>
+						<el-table-column label="联系人" prop="tenantContactPerson" width="100"></el-table-column>
+						<el-table-column label="跟进人" prop="operatorName" width="100"></el-table-column>
+						<el-table-column label="状态" width="100">
+							<template slot-scope="scope">
+								<div class="hui-table-operation" v-if="!scope.row.status">
+									<span class="table-operation" @click="sendItem(scope.row)">
+										发送租客
+									</span>
+								</div>
+								<div class="hui-table-tag" v-else>
+									<div class="hui-tag hui-tag-info" v-if="scope.row.status === 1">待客户确认</div>
+									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已生效</div>
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="操作" width="150">
+							<template slot-scope="scope">
+								<div class="hui-table-operation">
+									<span class="table-operation" @click="detailItem(scope.row)">
+										详情
+									</span>
+									<span class="table-operation" v-if="scope.row.status != 2"
+										@click="updateItem(scope.row)">
+										编辑
+									</span>
+									<span class="table-operation" v-if="scope.row.status != 2"
+										@click="deleteItem(scope.row)">
+										删除
+									</span>
+								</div>
+							</template>
+						</el-table-column>
+						<template slot="empty">
+							<empty description="暂无数据"></empty>
+						</template>
+					</el-table>
+				</div>
+				<div class="hui-content-pagination">
+					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
+						@current-change="currentChange">
+					</el-pagination>
+				</div>
+			</div>
+		</div>
+		<div class="hui-flex" v-else>
+			<div class="hui-nav">
+				<el-page-header @back="type = 'list'" :content="type === 'edit'?'新建合同':'合同详情'"></el-page-header>
+			</div>
+			<edit v-if="type === 'edit'" class="hui-flex-box" @callback="callback" :detailId="detail.id"></edit>
+			<detail v-else class="hui-flex-box" @callback="callback" :detailId="detail.id"></detail>
+		</div>
+	</div>
+</template>
+
+<script>
+	import edit from '@/components/work/contract/list/edit'
+	import detail from '@/components/work/contract/list/detail'
+	import listFilter from '@/components/common/listFilter'
+	import {
+		getContractListByPage,
+		deleteContractById,
+		updateContract
+	} from '@/httpApi/contract'
+	import {
+		isPassRequestUseSeal
+	} from '@/httpApi/organization'
+	export default {
+		data() {
+			return {
+				type: 'list',
+				tableData: [],
+				currPage: 1,
+				pageSize: 10,
+				totalCount: 0,
+				detail: {},
+				filterOption: {}
+			}
+		},
+		created() {
+			this.init();
+		},
+		methods: {
+			init() {
+				//合同状态,0-初始状态、1.已发送租客、2.已确认生成合同、3.已续费、4.即将过期、5.已过期、6.已退租。
+				let postData = {
+					currPage: this.currPage,
+					pageSize: this.pageSize,
+					organizationId: this.$store.getters.organization.id,
+					projectId: this.$store.getters.project.id
+				}
+				postData = Object.assign(postData, this.filterOption);
+				getContractListByPage(postData).then(res => {
+					if (res.state) {
+						this.tableData = res.data.dataList;
+						this.totalCount = res.data.totalCount;
+					}
+				})
+			},
+			filterInit(option) {
+				this.filterOption = option;
+				this.currPage = 1;
+				this.init();
+			},
+			insert() {
+				this.detail = {};
+				this.type = 'edit';
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			detailItem(item) {
+				this.detail = item;
+				this.type = 'detail';
+			},
+			updateItem(item) {
+				this.detail = item;
+				this.type = 'edit';
+			},
+			sendItem(item) {
+				let document = JSON.parse(item.document);
+				isPassRequestUseSeal(document.map(node => node.id).join(',')).then(res => {
+					if (res.state) {
+						if (!res.data.hasSeal) return this.$message.warning('您暂未添加公章,请设置后发送给租客');
+						if (!res.data.passSeal) return this.$message.warning('您申请的公章暂未审核通过,请审核通过后发送给租客');
+						this.$confirm('确定要发送合同给租客?', () => {
+							updateContract({
+								id: item.id,
+								status: 1
+							}).then(res => {
+								if (res.state) {
+									this.$message({
+										type: 'success',
+										message: '操作成功'
+									})
+									this.init();
+								}
+							})
+						});
+					}
+				})
+			},
+			deleteItem(item) {
+				this.$confirm('确定要删除该合同?', () => {
+					deleteContractById(item.id).then(res => {
+						if (res.state) {
+							this.$message({
+								type: 'success',
+								message: '操作成功'
+							})
+							this.init();
+						}
+					})
+				});
+			},
+			callback(type) {
+				if (type === 'init') this.init();
+				this.type = 'list';
+			}
+		},
+		components: {
+			edit,
+			detail,
+			listFilter
+		},
+	}
+</script>
+
+<style>
 </style>

+ 208 - 208
virgo.wzfrontend/console/src/views/work/contract/organization.vue

@@ -1,209 +1,209 @@
-<template>
-	<div class="hui-flex hui-content">
-		<div class="hui-flex" v-if="type === 'list'">
-			<div class="hui-content-title">
-				<div class="hui-title-item active">合同列表</div>
-			</div>
-			<div class="hui-flex-box hui-flex hui-table">
-				<list-filter type="contract" @filter="filterInit"></list-filter>
-				<div class="hui-flex-box">
-					<el-table :data="tableData" row-key="id" border height="100%">
-						<el-table-column label="序号" width="50">
-							<template slot-scope="scope">
-								<div style="text-align: center;">{{scope.$index + 1}}</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="合同编号" prop="code"></el-table-column>
-						<el-table-column label="租客" prop="name">
-							<template slot-scope="scope">
-								{{scope.row.tenantType === 1 ? scope.row.merchantName: scope.row.clientName}}
-							</template>
-						</el-table-column>
-						<el-table-column label="房号" prop="projectItemTargetRoomIds">
-							<template slot-scope="scope">
-								<div class="hui-ellipsis">
-									<span v-for="(item,index) in scope.row.roomMap">
-										{{item}}、
-									</span>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="开始日" prop="startDate"></el-table-column>
-						<el-table-column label="结束日" prop="endDate"></el-table-column>
-						<el-table-column label="运营跟进人" prop="operatorName"></el-table-column>
-						<el-table-column label="状态" width="100">
-							<template slot-scope="scope">
-								<div class="hui-table-tag">
-									<div class="hui-tag hui-tag-info" v-if="scope.row.status === 1">待确认</div>
-									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已生效</div>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="操作" width="150">
-							<template slot-scope="scope">
-								<div class="hui-table-operation">
-									<span class="table-operation" @click="detailItem(scope.row)">
-										详情
-									</span>
-								</div>
-							</template>
-						</el-table-column>
-						<template slot="empty">
-							<empty description="暂无数据"></empty>
-						</template>
-					</el-table>
-				</div>
-				<div class="hui-content-pagination">
-					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
-						@current-change="currentChange">
-					</el-pagination>
-				</div>
-			</div>
-		</div>
-		<div class="hui-flex" v-else>
-			<div class="hui-nav">
-				<el-page-header @back="type = 'list'" :content="type === 'edit'?'新建合同':'合同详情'"></el-page-header>
-				<div class="nav-button">
-					<el-button type="primary" size="medium" @click="sureConcart"
-						v-if="type == 'detail' && detail.status === 1">
-						确认合同
-					</el-button>
-				</div>
-			</div>
-			<edit v-if="type === 'edit'" class="hui-flex-box" @callback="callback" :detailId="detail.id"></edit>
-			<detail v-else class="hui-flex-box" @callback="callback" :detailId="detail.id"></detail>
-		</div>
-	</div>
-</template>
-
-<script>
-	import edit from '@/components/work/contract/list/edit'
-	import detail from '@/components/work/contract/list/detail'
-	import listFilter from '@/components/common/listFilter'
-	import {
-		getContractListByPage,
-		deleteContractById,
-		updateContract,
-		archivedDocument,
-		paymentGenerate
-	} from '@/httpApi/contract'
-	import {
-		bindProjectDetail
-	} from '@/httpApi/organization'
-
-	export default {
-		data() {
-			return {
-				type: 'list',
-				tableData: [],
-				currPage: 1,
-				pageSize: 10,
-				totalCount: 0,
-				filterOption: {},
-				merchantId: '',
-				detail: {}
-			}
-		},
-		created() {
-			bindProjectDetail({
-				bindOrganizationId: this.$store.getters.organization.id,
-				projectId: this.$store.getters.project.id
-			}).then(res => {
-				if (res.state) {
-					if (res.data.length == 0) return;
-					this.merchantId = res.data[0].merchantId;
-					this.init();
-				}
-			})
-		},
-		methods: {
-			init() {
-				let postData = {
-					currPage: this.currPage,
-					pageSize: this.pageSize,
-					merchantId: this.merchantId,
-					projectId: this.$store.getters.project.id,
-					statusList: [1, 2, 3, 4, 5]
-				}
-				postData = Object.assign(postData, this.filterOption);
-				getContractListByPage(postData).then(res => {
-					if (res.state) {
-						this.tableData = res.data.dataList;
-						this.totalCount = res.data.totalCount;
-					}
-				})
-			},
-			filterInit(option) {
-				this.filterOption = option;
-				this.currPage = 1;
-				this.init();
-			},
-			insert() {
-				this.detail = {};
-				this.type = 'edit';
-			},
-			currentChange(currPage) {
-				this.currPage = currPage;
-				this.init();
-			},
-			detailItem(item) {
-				this.detail = item;
-				this.type = 'detail';
-			},
-			sureConcart() {
-				this.$confirm('是否确定合同无误,确定后账单将自动生成?', () => {
-					this.$loading.open();
-					let documentList = this.detail.document ? JSON.parse(this.detail.document) : [];
-					let promise = [];
-					for (let i = 0; i < documentList.length; i++) {
-						promise.push(new Promise((resolve, reject) => {
-							archivedDocument(documentList[i].id, this.$store.getters
-								.project.name).then(res => {
-								if (res.state) {
-									resolve(true)
-								} else {
-									reject(false)
-								}
-							})
-						}))
-					}
-					promise.push(new Promise((resolve, reject) => {
-						paymentGenerate(this.detail.id).then(res => {
-							if (res.state) {
-								resolve(true)
-							} else {
-								reject(false)
-							}
-						})
-					}))
-					Promise.all(promise).then(res => {
-						this.$loading.close();
-						updateContract({
-							id: this.detail.id,
-							status: 2
-						})
-						this.$message({
-							type: 'success',
-							message: '操作成功'
-						})
-						this.detail['status'] = 2;
-					}).catch(error => {
-						this.$loading.close();
-					})
-				});
-			},
-			callback(type) {
-				if (type === 'init') this.init();
-				this.type = 'list';
-			}
-		},
-		components: {
-			edit,
-			detail,
-			listFilter
-		},
-	}
-</script>
-
-<style>
+<template>
+	<div class="hui-flex hui-content">
+		<div class="hui-flex" v-if="type === 'list'">
+			<div class="hui-content-title">
+				<div class="hui-title-item active">合同列表</div>
+			</div>
+			<div class="hui-flex-box hui-flex hui-table">
+				<list-filter type="contract" @filter="filterInit"></list-filter>
+				<div class="hui-flex-box">
+					<el-table :data="tableData" row-key="id" border height="100%">
+						<el-table-column label="序号" width="50">
+							<template slot-scope="scope">
+								<div style="text-align: center;">{{scope.$index + 1}}</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="合同编码" prop="code"></el-table-column>
+						<el-table-column label="租客" prop="name">
+							<template slot-scope="scope">
+								{{scope.row.tenantType === 1 ? scope.row.merchantName: scope.row.clientName}}
+							</template>
+						</el-table-column>
+						<el-table-column label="房号" prop="projectItemTargetRoomIds">
+							<template slot-scope="scope">
+								<div class="hui-ellipsis">
+									<span v-for="(item,index) in scope.row.roomMap">
+										{{item}}、
+									</span>
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="开始日" prop="startDate"></el-table-column>
+						<el-table-column label="结束日" prop="endDate"></el-table-column>
+						<el-table-column label="运营跟进人" prop="operatorName"></el-table-column>
+						<el-table-column label="状态" width="100">
+							<template slot-scope="scope">
+								<div class="hui-table-tag">
+									<div class="hui-tag hui-tag-info" v-if="scope.row.status === 1">待确认</div>
+									<div class="hui-tag hui-tag-success" v-else-if="scope.row.status === 2">已生效</div>
+								</div>
+							</template>
+						</el-table-column>
+						<el-table-column label="操作" width="150">
+							<template slot-scope="scope">
+								<div class="hui-table-operation">
+									<span class="table-operation" @click="detailItem(scope.row)">
+										详情
+									</span>
+								</div>
+							</template>
+						</el-table-column>
+						<template slot="empty">
+							<empty description="暂无数据"></empty>
+						</template>
+					</el-table>
+				</div>
+				<div class="hui-content-pagination">
+					<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
+						@current-change="currentChange">
+					</el-pagination>
+				</div>
+			</div>
+		</div>
+		<div class="hui-flex" v-else>
+			<div class="hui-nav">
+				<el-page-header @back="type = 'list'" :content="type === 'edit'?'新建合同':'合同详情'"></el-page-header>
+				<div class="nav-button">
+					<el-button type="primary" size="medium" @click="sureConcart"
+						v-if="type == 'detail' && detail.status === 1">
+						确认合同
+					</el-button>
+				</div>
+			</div>
+			<edit v-if="type === 'edit'" class="hui-flex-box" @callback="callback" :detailId="detail.id"></edit>
+			<detail v-else class="hui-flex-box" @callback="callback" :detailId="detail.id"></detail>
+		</div>
+	</div>
+</template>
+
+<script>
+	import edit from '@/components/work/contract/list/edit'
+	import detail from '@/components/work/contract/list/detail'
+	import listFilter from '@/components/common/listFilter'
+	import {
+		getContractListByPage,
+		deleteContractById,
+		updateContract,
+		archivedDocument,
+		paymentGenerate
+	} from '@/httpApi/contract'
+	import {
+		bindProjectDetail
+	} from '@/httpApi/organization'
+
+	export default {
+		data() {
+			return {
+				type: 'list',
+				tableData: [],
+				currPage: 1,
+				pageSize: 10,
+				totalCount: 0,
+				filterOption: {},
+				merchantId: '',
+				detail: {}
+			}
+		},
+		created() {
+			bindProjectDetail({
+				bindOrganizationId: this.$store.getters.organization.id,
+				projectId: this.$store.getters.project.id
+			}).then(res => {
+				if (res.state) {
+					if (res.data.length == 0) return;
+					this.merchantId = res.data[0].merchantId;
+					this.init();
+				}
+			})
+		},
+		methods: {
+			init() {
+				let postData = {
+					currPage: this.currPage,
+					pageSize: this.pageSize,
+					merchantId: this.merchantId,
+					projectId: this.$store.getters.project.id,
+					statusList: [1, 2, 3, 4, 5]
+				}
+				postData = Object.assign(postData, this.filterOption);
+				getContractListByPage(postData).then(res => {
+					if (res.state) {
+						this.tableData = res.data.dataList;
+						this.totalCount = res.data.totalCount;
+					}
+				})
+			},
+			filterInit(option) {
+				this.filterOption = option;
+				this.currPage = 1;
+				this.init();
+			},
+			insert() {
+				this.detail = {};
+				this.type = 'edit';
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			detailItem(item) {
+				this.detail = item;
+				this.type = 'detail';
+			},
+			sureConcart() {
+				this.$confirm('是否确定合同无误,确定后账单将自动生成?', () => {
+					this.$loading.open();
+					let documentList = this.detail.document ? JSON.parse(this.detail.document) : [];
+					let promise = [];
+					for (let i = 0; i < documentList.length; i++) {
+						promise.push(new Promise((resolve, reject) => {
+							archivedDocument(documentList[i].id, this.$store.getters
+								.project.name).then(res => {
+								if (res.state) {
+									resolve(true)
+								} else {
+									reject(false)
+								}
+							})
+						}))
+					}
+					promise.push(new Promise((resolve, reject) => {
+						paymentGenerate(this.detail.id).then(res => {
+							if (res.state) {
+								resolve(true)
+							} else {
+								reject(false)
+							}
+						})
+					}))
+					Promise.all(promise).then(res => {
+						this.$loading.close();
+						updateContract({
+							id: this.detail.id,
+							status: 2
+						})
+						this.$message({
+							type: 'success',
+							message: '操作成功'
+						})
+						this.detail['status'] = 2;
+					}).catch(error => {
+						this.$loading.close();
+					})
+				});
+			},
+			callback(type) {
+				if (type === 'init') this.init();
+				this.type = 'list';
+			}
+		},
+		components: {
+			edit,
+			detail,
+			listFilter
+		},
+	}
+</script>
+
+<style>
 </style>

+ 30 - 10
virgo.wzfrontend/console/src/views/work/invoice/routine/payment.vue

@@ -6,6 +6,9 @@
 			</div>
 			<div class="hui-flex-box hui-flex hui-table">
 				<list-filter ref="invoice" type="invoice" @filter="filterInit"></list-filter>
+				<div class="hui-content-insert">
+					<el-button type="primary" size="medium" @click="insertItem">开具发票</el-button>
+				</div>
 				<div class="hui-flex-box">
 					<el-table :data="tableData" row-key="id" border height="100%">
 						<el-table-column label="序号" width="50">
@@ -21,14 +24,14 @@
 						</el-table-column>
 						<el-table-column label="发票代码" prop="code"></el-table-column>
 						<el-table-column label="发票号码" prop="number"></el-table-column>
-						<el-table-column label="货物名称" prop="cargoName"></el-table-column>
-						<el-table-column label="状态" width="80">
-							<template slot-scope="scope">
-								<div class="hui-table-tag">
-									<div class="hui-tag hui-tag-success" v-if="!scope.row.status">正常</div>
-									<div class="hui-tag hui-tag-warning" v-else-if="scope.row.status === 1">作废</div>
-								</div>
-							</template>
+						<el-table-column label="货物名称" prop="cargoName"></el-table-column>
+						<el-table-column label="状态" width="80">
+							<template slot-scope="scope">
+								<div class="hui-table-tag">
+									<div class="hui-tag hui-tag-success" v-if="!scope.row.status">正常</div>
+									<div class="hui-tag hui-tag-warning" v-else-if="scope.row.status === 1">作废</div>
+								</div>
+							</template>
 						</el-table-column>
 						<el-table-column label="操作" width="80">
 							<template slot-scope="scope">
@@ -51,6 +54,10 @@
 				</div>
 			</div>
 		</div>
+		<el-dialog :close-on-click-modal="false" :title="isUpdate?'编辑':'新增'" :visible.sync="visible" width="900px"
+			:append-to-body="true">
+			<edit v-if="visible" @callback="callback" :isUpdate="isUpdate" :detailId="detailId"></edit>
+		</el-dialog>
 		<el-drawer title="发票详情" :visible.sync="drawer" :size="400" :append-to-body="true">
 			<detail v-if="drawer" :detailId="detailId" @reload="init"></detail>
 		</el-drawer>
@@ -59,6 +66,7 @@
 
 <script>
 	import detail from '@/components/work/invoice/detail'
+	import edit from '@/components/work/invoice/edit'
 	import listFilter from '@/components/common/listFilter'
 	import {
 		getInvoiceListByPage
@@ -71,8 +79,10 @@
 				pageSize: 10,
 				totalCount: 0,
 				detailId: '',
+				isUpdate: false,
 				filterOption: {},
 				drawer: false,
+				visible: false
 			}
 		},
 		created() {
@@ -104,18 +114,28 @@
 				this.currPage = currPage;
 				this.init();
 			},
+			insertItem() {
+				this.isUpdate = false;
+				this.visible = true;
+			},
+			updateItem(item) {
+				this.detailId = item.id;
+				this.isUpdate = true;
+				this.visible = true;
+			},
 			detailItem(item) {
 				this.detailId = item.id;
 				this.drawer = true;
 			},
 			callback(type) {
 				if (type === 'init') this.init();
-				this.type = 'list';
+				this.visible = false;
 			}
 		},
 		components: {
 			detail,
-			listFilter
+			listFilter,
+			edit
 		},
 	}
 </script>

+ 1 - 1
virgo.wzfrontend/console/src/views/work/order/operation.vue

@@ -27,7 +27,7 @@
 							</template>
 						</el-table-column>
 						<el-table-column label="跟进人" prop="followUpPersonName"></el-table-column>
-						<el-table-column label="合同码" prop="contractCode"></el-table-column>
+						<el-table-column label="合同码" prop="contractCode"></el-table-column>
 						<el-table-column label="状态">
 							<template slot-scope="scope">
 								<div class="hui-table-tag">