浏览代码

Merge branch 'pengyouhao_dev'

pengyh 1 年之前
父节点
当前提交
357b64d904

+ 3 - 3
package-lock.json

@@ -4716,9 +4716,9 @@
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
     },
     "@zjlib/element-plugins": {
-      "version": "2.13.18",
-      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.18.tgz",
-      "integrity": "sha512-P9gMVRm/wlzlR+uAJvARH8jkf7wOCk9XWx6NcN5mZqM04li079GNpaHp9Qb0s9f9j0G4fMCBVuZGtm2BBpEo3A==",
+      "version": "2.13.20",
+      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.20.tgz",
+      "integrity": "sha512-qHa59hdy7sIvmv3oMl7J0tzQPOR6B3e1HNZWHdo2alcyVqwnoT9xawYqabNhQJwH+Hfy22slJmjM00hlqIMQtw==",
       "requires": {
         "@turf/turf": "^6.5.0",
         "@vuemap/vue-amap": "^0.1.12",

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "@turf/turf": "^6.5.0",
     "@vue-office/excel": "^1.3.0",
     "@vue/composition-api": "^1.7.1",
-    "@zjlib/element-plugins": "^2.13.18",
+    "@zjlib/element-plugins": "^2.13.20",
     "@zjlib/element-ui2": "^1.0.3",
     "axios": "0.18.1",
     "chatgpt": "^4.1.2",

+ 56 - 0
src/api/auxiliaryFittings/auxiliaryHandworkFee.js

@@ -0,0 +1,56 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取汇总列表
+export function listPageV1(data) {
+  return request({
+    url: `/manual/order/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+// 获取明细列表
+export function listPageV2(data) {
+  return request({
+    url: `/manual/order/listSettlement?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+
+//导出
+export function pageExport2(data, name) {
+  return postBlob({
+    url: '/manual/order/listSettlement/export',
+    data,
+    name
+  })
+}
+
+//导出
+export function pageExport1(data, name) {
+  return postBlob({
+    url: '/manual/order/list/export',
+    data,
+    name
+  })
+}
+
+// 详情
+export function getDetail(params) {
+  return request({
+    url: `/manual/order/detail`,
+    method: 'post',
+    params
+  })
+}
+
+// 结算
+export function settleAccounts(params) {
+  return request({
+    url: `/manual/order/settlement`,
+    method: 'post',
+    params
+  })
+}

+ 17 - 0
src/api/engineerFeeSettlementHome.js

@@ -0,0 +1,17 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function getData(params) {
+  return request({
+    url: '/settle/expense/data/board',
+    method: 'post',
+    params
+  })
+}
+
+export function getMonthData(params) {
+  return request({
+    url: '/settle/expense/month/send/data',
+    method: 'post',
+    params
+  })
+}

二进制
src/assets/home/icon_13.png


二进制
src/assets/home/icon_14.png


+ 11 - 0
src/views/auxiliaryFittings/auxiliaryDataManagement/auxiliaryChargeManagement/index.vue

@@ -69,6 +69,7 @@ export default {
 			"specification": "",
 			"status": "ON",
 			"unit": "",
+			manualAmount: 0
 		},
 		partsUnitList: [],
 		materialCategoryTree: [],
@@ -392,6 +393,16 @@ export default {
           }
         }
       }, {
+        md: 6,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入', type: 'number' },
+        formItemAttributes: {
+          label: '师傅手工费用',
+          prop: 'manualAmount',
+          rules: [...required]
+        }
+      }, {
         md: 24,
         isShow: true,
         name: 'el-input',

+ 1 - 1
src/views/auxiliaryFittings/salesManagement/components/attachmentNewReturnDetail.vue

@@ -480,7 +480,7 @@
 					],
 					workerMobile: [
 						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
-						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
+						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
 				},
 				isShowNo: false,

+ 1 - 1
src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue

@@ -554,7 +554,7 @@
 					],
 					workerMobile: [
 						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
-						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
+						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
 				},
 				isShowNo: false,

+ 1 - 1
src/views/auxiliaryFittings/salesManagement/components/attachmentSalesOrderDetail.vue

@@ -446,7 +446,7 @@
 					workerMobile: [
 						{ required: true, message: '请输入联系电话', trigger: 'blur' },
 						{ required: true, message: '请输入联系电话', trigger: 'change' },
-						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
+						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
 					workerName: [
 						{ required: true, message: '请输入客户姓名', trigger: 'blur' }

+ 1 - 1
src/views/auxiliaryFittings/salesManagement/components/auxiliaryAdjustPriceOrderDetail.vue

@@ -246,7 +246,7 @@ export default {
         ],
         phone: [
           { required: true, message: '请输入师傅联系电话', trigger: 'blur' },
-          { pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
+          { pattern: /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
         ]
       }
     }

+ 1 - 1
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue

@@ -472,7 +472,7 @@
 					workerMobile: [
 						{ required: true, message: `请输入联系电话`, trigger: 'blur' },
 						{ required: true, message: `请输入联系电话`, trigger: 'change' },
-						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
+						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
 					workerName: [
 						{ required: true, message: '请输入客户姓名', trigger: 'blur' }

+ 1 - 1
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesReturnOrderDetail.vue

@@ -509,7 +509,7 @@
 					],
 					workerMobile: [
 						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
-						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
+						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
 				},
 				isShowNo: false,

+ 381 - 0
src/views/auxiliaryFittings/settleAccountManagement/auxiliaryHandworkFee/index.vue

@@ -0,0 +1,381 @@
+<template>
+	<zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title+'-列表', essential: true }]">
+		<template slot-scope="{activeKey, data}">
+			<template-page ref="pageRef" v-if="tabIndexShow && activeKey == 'list'" :get-list="getList" :table-attributes="tableAttributes"
+				:table-events="tableEvents" :operationColumnWidth="120" :options-evens-group="optionsEvensGroup"
+				:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()"
+				:exportList="tabIndex == 1 ? exportList1 : exportList2">
+			  <div slot="moreSearch" style="margin-bottom: 10px;">
+			  	<el-radio-group v-model="tabIndex" size="mini" @change="changeType">
+			  		<el-radio-button label="1">汇总</el-radio-button>
+			  		<el-radio-button label="2">明细</el-radio-button>
+			  	</el-radio-group>
+			  </div>
+			  <div slot="moreSearch" v-if="tabIndex == 2">
+			  	<el-radio-group v-model="status" size="mini" @change="changeType">
+			  		<el-radio-button label="">全部</el-radio-button>
+			  		<el-radio-button label="WAIT">待结算</el-radio-button>
+			  		<el-radio-button label="OVER">已完成</el-radio-button>
+			  	</el-radio-group>
+			  	<br><br>
+			  </div>
+			</template-page>
+			<div v-if="~['detail'].indexOf(activeKey)">
+				<el-card class="box-card">
+					<div slot="header" class="clearfix">
+						<span>基础信息</span>
+					</div>
+					<table border="1" style="border-color: #fff;" width="100%" align="center" cellspacing="0" cellpadding="10">
+						<tr>
+							<td class="bold" align="center">所属商户</td>
+							<td>{{ formData.companyWechatName }}</td>
+							<td class="bold" align="center">网点名称</td>
+							<td>{{ formData.websitName }}</td>
+						</tr>
+						<tr>
+							<td class="bold" align="center">工单号</td>
+							<td>{{ formData.orderId }}</td>
+							<td class="bold" align="center">工单品牌</td>
+							<td>{{ formData.brand }}</td>
+						</tr>
+						<tr>
+							<td class="bold" align="center">客户姓名</td>
+							<td>{{ formData.userName }}</td>
+							<td class="bold" align="center">客户电话</td>
+							<td>{{ formData.userMobile }}</td>
+						</tr>
+						<tr>
+							<td class="bold" align="center">师傅姓名</td>
+							<td>{{ formData.workerName }}</td>
+							<td class="bold" align="center">师傅身份证号</td>
+							<td>{{ formData.identity }}</td>
+						</tr>
+						<tr>
+							<td class="bold" align="center">师傅联系电话</td>
+							<td>{{ formData.workerMobile }}</td>
+							<td class="bold" align="center">订单金额</td>
+							<td>{{ formData.totalAmount }}</td>
+						</tr>
+						<tr>
+							<td class="bold" align="center">库存类型</td>
+							<td>{{ formData.settlementType == 'OWN' ? '自有库存' : formData.settlementType == 'OUT' ? '外购库存' : '' }}</td>
+							<td class="bold" align="center">创建人</td>
+							<td>{{ formData.createBy }}</td>
+						</tr>
+						<tr>
+							<td class="bold" align="center">创建时间</td>
+							<td>{{ formData.createTime }}</td>
+							<td class="bold" align="center">支付状态</td>
+							<td>{{ formData.payStatus == 'CANCEL' ? '取消' : formData.payStatus == 'PAID' ? '已支付' : formData.payStatus ==
+								'WAIT' ? '待支付' : '' }}</td>
+						</tr>
+						<tr>
+							<td class="bold" align="center">结算人员</td>
+							<td>{{ formData.updateBy }}</td>
+							<td class="bold" align="center">操作时间</td>
+							<td>{{ formData.updateTime }}</td>
+						</tr>
+					</table>
+				</el-card>
+				<el-card class="box-card">
+					<div slot="header" class="clearfix">
+						<span>订单信息</span>
+					</div>
+					<table border="1" style="border-color: #fff;" width="100%" align="center" cellspacing="0" cellpadding="10">
+						<thead>
+							<tr>
+								<th class="bold" align="center">名称</th>
+								<th class="bold" align="center">收费类型</th>
+								<th class="bold" align="center">工单类型</th>
+								<th class="bold" align="center">数量</th>
+								<th class="bold" align="center">收费标准</th>
+								<th class="bold" align="center">订单金额</th>
+								<th class="bold" align="center">库存类型</th>
+								<th class="bold" align="center">师傅手工费用</th>
+							</tr>
+						</thead>
+						<tbody>
+							<tr v-for="(item, index) in formData.settlementOrderManualItems" :key="index">
+								<td align="center">{{ item.goodsName }}</td>
+								<td align="center">{{ item.chargeType == 'ACC' ? '配件物料': item.chargeType == 'SERV' ? '服务收费':'辅材物料' }}</td>
+								<td align="center">{{ formData.saleType | saleTypeFilter }}</td>
+								<td align="center">{{ item.num }}</td>
+								<td align="center">{{ item.goodsAmount }}</td>
+								<td align="center">{{ item.totalAmount }}</td>
+								<td align="center">{{ item.settlementType == 'OWN' ? '自有' : item.settlementType == 'OUT' ? '外购' : '' }}</td>
+								<td align="center">{{ item.manualAmount }}</td>
+							</tr>
+							<!-- <tr>
+								<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
+							</tr> -->
+							<tr>
+								<td align="center">总计</td>
+								<td></td>
+								<td></td>
+								<td></td>
+								<td></td>
+								<td align="center">{{ totalAmount }}</td>
+								<td></td>
+								<td align="center">{{ manualAmount }}</td>
+							</tr>
+						</tbody>
+					</table>
+				</el-card>
+				<div slot="footer" class="dialog-footer">
+					<el-button size="mini" @click="formDialog = false; formData = {};data.removeTab()">取 消</el-button>
+					<el-button size="mini" v-if="formData.status == 'WAIT'" type="primary"
+						@click="settleAccounts(formData.settlementOrderId,data.removeTab,2)">确认结算
+					</el-button>
+				</div>
+			</div>
+		</template>
+	</zj-tab-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
+import ImageUpload from '@/components/file-upload'
+import { downloadFiles } from '@/utils/util'
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import { listPageV1, listPageV2, pageExport1, pageExport2, getDetail, settleAccounts } from "@/api/auxiliaryFittings/auxiliaryHandworkFee";
+export default {
+	components: { TemplatePage, ImageUpload },
+	mixins: [import_mixin, operation_mixin],
+	filters: {
+		saleTypeFilter(val) {
+			const MAP = {
+				1: '零售',
+				2: '工程',
+				3: '延保',
+				4: '工程维保',
+			}
+			return MAP[val];
+		}
+	},
+	data() {
+		return {
+			// 表格属性
+			tableAttributes: {
+				// 启用勾选列
+				selectColumn: true,
+				selectable: this.selectable
+			},
+			// 表格事件
+			tableEvents: {
+				'selection-change': this.selectionChange
+			},
+			// 勾选选中行
+			recordSelected: [],
+			formDialogType: 0,
+			formDialogTitles: ["新增", "编辑", "详情"],
+			formDialog: false,
+			formData: {},
+			status: '',
+			totalAmount: 0,
+			manualAmount: 0,
+			websitAmount: 0,
+			commissionAmount: 0,
+			tabIndex: 1,
+			workerId: '',
+			websitId: '',
+			tabIndexShow: true,
+			formType: 'add',
+			formVisible: false,
+		}
+	},
+	watch: {
+		tabIndex() {
+			this.tabIndexShow = false
+			this.$nextTick(() => {
+				if(this.tabIndex == 1){
+					this.status = ''
+					this.workerId = ''
+					this.websitId = ''
+				}
+				this.tabIndexShow = true
+			})
+		}
+	},
+	computed: {
+		// 事件组合
+		optionsEvensGroup() {
+			return [
+				[
+					[
+						this.optionsEvensAuth("bulkSettlement", {
+							isRole: this.tabIndex == 2,
+							click: () => {
+								this.batchSettleAccounts()
+							}
+						})
+					],
+				]
+			]
+		},
+		// 更多参数
+		moreParameters() {
+			return []
+		}
+	},
+	methods: {
+		// 切换状态
+		changeType(val) {
+			this.workerId = ''
+			this.websitId = ''
+			this.$refs.pageRef.refreshList()
+		},
+		// 列表请求函数
+		getList(p) {
+			try {
+				var pam = JSON.parse(JSON.stringify(p))
+				if (this.status && this.tabIndex == 2) {
+					pam.params.push({ "param": "a.status", "compare": "=", "value": this.status })
+				}
+				if (this.workerId) {
+					pam.params.push({ "param": "a.websit_id", "compare": "=", "value": this.websitId }, { "param": "a.worker_id", "compare": "=", "value": this.workerId })
+				}
+				return this.tabIndex == 1 ? listPageV1(pam) : listPageV2(pam)
+			} catch (error) {
+				console.log(error)
+			}
+		},
+		// 列表导出函数
+		exportList1: pageExport1,
+		exportList2: pageExport2,
+		// 表格列解析渲染数据更改
+		columnParsing(item, defaultData) {
+			return defaultData
+		},
+		selectable(row, index) {
+			if(this.tabIndex==2){
+				console.log(row,row.selectMapData)
+				return ["WAIT"].includes(Object.entries(row.selectMapData.status).find(([key, val]) => val == row.status)?.[0])
+			}
+		},
+		// 监听勾选变化
+		selectionChange(data) {
+			this.recordSelected = data
+		},
+		openForm(type, id) {
+			this.$refs.tabPage.addTab({
+				// 对应显示的模块
+				activeKey: type,
+				// 唯一标识
+				key: type,
+				// 页签名称
+				label: ({ detail: "详情" })[type],
+				// 打开时事件
+				triggerEvent: () => {
+					this.formCancel()
+					this.$nextTick(()=>{
+						this.formType = type
+						this.formVisible = true
+						if (type == 'detail') {
+							this.formDialogType = 1
+							this.totalAmount = 0
+							this.manualAmount = 0
+							getDetail({ id  }).then(res => {
+								Object.assign(this.formData, res.data)
+								res.data.settlementOrderManualItems.forEach(item => {
+									this.totalAmount += (item.totalAmount * 100 + this.totalAmount * 100) / 100
+									this.manualAmount = (item.manualAmount * 100 + this.manualAmount * 100) / 100
+								})
+							})
+						}
+					})
+				},
+				// 关闭时事件
+				closeEvent: () => {
+				
+				}
+			})
+		},
+		formCancel() {
+			this.formVisible = false
+			this.$refs?.formRef?.resetFields()
+			this.$data.formData = this.$options.data().formData
+		},
+		// 表格操作列
+		operation() {
+			return this.operationBtn({
+				detail: {
+					btnType: 'text',
+					name: ({ row, index, column }) => {
+						return this.tabIndex == 1 ? '查看明细' : '详情'
+					},
+					click: ({ row, index, column }) => {
+						if (this.tabIndex == 1) {
+							this.workerId = row.workerId
+							this.websitId = row.websitId
+							this.tabIndex = 2
+							this.$refs.pageRef.refreshList()
+						} else {
+							this.openForm('detail',row.settlementOrderId)
+						}
+					}
+				},
+				settle: {
+					btnType: 'text',
+					conditions: ({ row, index, column }) => {
+						if(this.tabIndex == 1){
+							return row.workerAmount != row.okAmount
+						}else{
+							return row.status == 'WAIT'
+						}
+					},
+					click: ({ row, index, column }) => {
+						if (this.tabIndex == 1) {
+							this.status = 'WAIT'
+							this.workerId = row.workerId
+							this.websitId = row.websitId
+							this.tabIndex = 2
+							this.$refs.pageRef.refreshList()
+						} else {
+							this.settleAccounts(row.settlementOrderId)
+						}
+					}
+				},
+			})
+		},
+		batchSettleAccounts() {
+			if (this.recordSelected.length == 0) {
+				return this.$message.warning('请至少勾选一条数据!');
+			}
+			this.settleAccounts(this.recordSelected.map(item => { return item.settlementOrderId }).join(','))
+		},
+		settleAccounts(id,cancel,type) {
+			this.$confirm(`请确认是否提交结算, 是否继续?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				settleAccounts({
+					id
+				}).then(res => {
+					if (res.code == 200) {
+						this.$message({ type: 'success', message: `结算成功!` })
+						if(type== 2){cancel('list')}
+						this.$refs.pageRef.refreshList()
+						this.formDialog = false
+					} else {
+						this.$message.error(res.msg);
+					}
+				})
+			});
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.tab {
+	padding: 20px 20px 0 20px;
+}
+
+.bold {
+	width: 160px;
+	font-weight: bold;
+	background-color: #f0f0f0;
+}</style>

+ 480 - 0
src/views/engineerFeeSettlement/home/index.vue

@@ -0,0 +1,480 @@
+<template>
+	<div class="dashboard_container">
+		<!-- <div class="refresh" @click="refreshData">
+			<span style="color: #1d82ff;">刷新数据</span>
+			<i class="el-icon-refresh-left" style="color: #1d82ff;"></i>
+		</div> -->
+		<div class="flex">
+			<div class="mode" @click="openOrder('costPerDimension','NO','未汇总')">
+				<div class="title">待汇总</div>
+				<div class="flex head">
+					<div class="tab">
+						<el-image class="img" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="title">待汇总数量</div>
+							<div class="num">{{collectData.waitGatherCount}}</div>
+						</div>
+					</div>
+					<div class="tab">
+						<el-image class="img" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="title">待汇总金额</div>
+							<div class="num">{{collectData.waitGatherAmount}}</div>
+						</div>
+					</div>
+				</div>
+				<div class="flex head">
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitGatherInstallHomeCount}}</div>
+							<div class="title">安装费用-家用空调</div>
+						</div>
+					</div>
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitGatherInstallHomeAmount}}</div>
+							<div class="title">安装费用-家用空调</div>
+						</div>
+					</div>
+				</div>
+				<div class="flex head">
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitGatherInstallCount}}</div>
+							<div class="title">安装费用-非空调</div>
+						</div>
+					</div>
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitGatherInstallAmount}}</div>
+							<div class="title">安装费用-非空调</div>
+						</div>
+					</div>
+				</div>
+				<div class="flex head">
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitGatherRepairCount}}</div>
+							<div class="title">维修费用</div>
+						</div>
+					</div>
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitGatherRepairAmount}}</div>
+							<div class="title">维修费用</div>
+						</div>
+					</div>
+				</div>
+				<div class="flex head" style="border-bottom: none;">
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitGatherOtherCount}}</div>
+							<div class="title">其它费用</div>
+						</div>
+					</div>
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitGatherOtherAmount}}</div>
+							<div class="title">其它费用</div>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div class="mode" @click="openOrder('monthlyPayrollSummary','NOT','未发放')">
+				<div class="title">待发放</div>
+				<div class="flex head">
+					<div class="tab">
+						<el-image class="img" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="title">待发放人数</div>
+							<div class="num">{{collectData.waitSendByCount}}</div>
+						</div>
+					</div>
+					<div class="tab">
+						<el-image class="img" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="title">待发放金额</div>
+							<div class="num">{{collectData.waitSendAmount}}</div>
+						</div>
+					</div>
+				</div>
+				<div class="flex head">
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitSendByInstallHomeCount}}</div>
+							<div class="title">安装费用-家用空调</div>
+						</div>
+					</div>
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitSendInstallHomeAmount}}</div>
+							<div class="title">安装费用-家用空调</div>
+						</div>
+					</div>
+				</div>
+				<div class="flex head">
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitSendByInstallCount}}</div>
+							<div class="title">安装费用-非空调</div>
+						</div>
+					</div>
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitSendInstallAmount}}</div>
+							<div class="title">安装费用-非空调</div>
+						</div>
+					</div>
+				</div>
+				<div class="flex head">
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitSendByRepairCount}}</div>
+							<div class="title">维修费用</div>
+						</div>
+					</div>
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitSendRepairAmount}}</div>
+							<div class="title">维修费用</div>
+						</div>
+					</div>
+				</div>
+				<div class="flex head" style="border-bottom: none;">
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_13.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitSendByOtherCount}}</div>
+							<div class="title">其它费用</div>
+						</div>
+					</div>
+					<div class="tab child">
+						<el-image class="img opacity" :src="require('@/assets/home/icon_14.png')" fit="fit"></el-image>
+						<div class="text">
+							<div class="num">{{collectData.waitSendOtherAmount}}</div>
+							<div class="title">其它费用</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="container_bottom">
+			<div class="chart">
+				<div class="flex_asb">
+					<div class="title">已发放的人数和金额</div>
+					<el-date-picker v-model="date" @change="selectDate" value-format="yyyy-MM" type="monthrange"
+						range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份">
+					</el-date-picker>
+					</el-form-item>
+				</div>
+				<div ref="chart" style="width: 100%;height: 330px;"></div>
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		getMonthData,
+		getData
+	} from "@/api/engineerFeeSettlementHome";
+	export default {
+		data() {
+			return{
+				collectData: {},
+				date: [],
+				dataList: [],
+				series1: [],
+				series2: []
+			}
+		},
+		computed: {
+			getMonth() {
+				return function(start, end) {
+					let result = '';
+					const starts = start.split('-');
+					let staYear = parseInt(starts[0]);
+					const staMon = parseInt(starts[1]);
+					const ends = end.split('-');
+					const endYear = parseInt(ends[0]);
+					const endMon = parseInt(ends[1]);
+					const yf = (endYear - staYear) * 12 + (endMon - staMon);
+					let mon = staMon;
+					for (var i = staMon; i <= (staMon + yf); i++) {
+						if (mon <= 12) {
+							if (mon < 10) {
+								result += staYear + '-0' + mon + ',';
+							} else {
+								result += staYear + '-' + mon + ',';
+							}
+						} else {
+							staYear++;
+							mon = 1;
+							result += staYear + '-01,';
+						}
+						mon++;
+					}
+					result = result.split(',').filter(v => v !== '');
+					return result;
+				}
+			},
+			getMonth12() {
+				return function() {
+					let currentMonth = new Date().getMonth() + 1; // 获取当前月份(0-11)
+					let currentYear = new Date().getFullYear(); // 获取当前年份
+					let last12Months = [];
+
+					for (let i = 0; i < 12; i++) {
+						let month = currentMonth - i; // 从当前月份向前计数
+						let year = currentYear; // 初始化年份为当前年份
+
+						// 处理月份溢出(小于0的情况)
+						if (month <= 0) {
+							month += 12; // 月份减去12
+							year--; // 年份减1
+						}
+
+						// 将月份和年份组合成格式化的字符串
+						last12Months.unshift(`${year}-${month.toString().padStart(2, '0')}`);
+					}
+					return [last12Months[0], last12Months.pop()];
+				}
+			}
+		},
+		created() {
+			this.date = this.getMonth12()
+			this.getData()
+			this.getMonthData()
+		},
+		mounted() {
+			// this.drawChat1()
+		},
+		methods: {
+			refreshData() {
+				this.$echarts.init(this.$refs.chart).dispose()
+				this.getMonthData()
+				this.getData()
+			},
+			selectDate(e) {
+				this.getMonthData()
+			},
+			openOrder(name,pageCode,pageName) {
+				this.$router.push({
+					name,
+					params: {
+						pageName,
+						pageType: 'tagStatus',
+						pageCode,
+					},
+				})
+			},
+			getData() {
+				getData().then(res => {
+					this.collectData = res.data
+				})
+			},
+			getMonthData() {
+				getMonthData({
+					startMonth: this.date.length > 0 ? this.date[0] : '',
+					endMonth: this.date.length > 0 ? this.date[1] : ''
+				}).then(res => {
+					let data = this.getMonth(this.date[0],this.date[1])
+					let series1 = []
+					let series2 = []
+					data.forEach(item=>{
+						if(res.data.dataList.length > 0){
+							res.data.dataList.forEach(it=>{
+								if(item == it.yearMonth){
+									series1.push(it.endSendByCount)
+									series2.push(it.endSendAmount)
+								}else{
+									series1.push(0)
+									series2.push(0)
+								}
+							})
+						}else{
+							series1.push(0)
+							series2.push(0)
+						}
+					})
+					this.drawChat(series1,series2)
+				})
+			},
+			drawChat(series1,series2) {
+				console.log(series1,series2)
+				let chart = this.$echarts.init(this.$refs.chart)
+				let option = {
+					tooltip: {
+						trigger: 'axis'
+					},
+					legend: {
+						data: ['已发放人数','已发放金额']
+					},
+					xAxis: {
+						type: 'category',
+						boundaryGap: false,
+						data: this.getMonth(this.date[0],this.date[1])
+					},
+					yAxis: [{
+							min: 0,
+							max: (value) => { // 百位起最大值向上取整
+								return Math.ceil(value.max / 100) * 100;
+							},
+							name: '左边',
+							type: 'value',
+						},
+						{
+							min: 0,
+							max: (value) => { // 百位起最大值向上取整
+								return Math.ceil(value.max / 100) * 100;
+							},
+							name: '右边',
+							type: 'value',
+						}
+					],
+					series: [
+						{
+							name: '已发放人数',
+							data: series1,
+							type: 'line',
+							smooth: true,
+							yAxisIndex: 0
+						},
+						{
+							name: '已发放金额',
+							data: series2,
+							type: 'line',
+							smooth: true,
+							yAxisIndex: 1
+						}
+					]
+				};
+				chart.setOption(option)
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.dashboard_container {
+		background: #f5f5f5;
+		padding: 20px;
+		min-height: calc(100vh - 86px);
+		box-sizing: border-box;
+
+		.refresh {
+			text-align: right;
+			margin-bottom: 10px;
+
+			span {
+				cursor: pointer;
+			}
+
+			i {
+				font-weight: bold;
+				margin-left: 4px;
+				cursor: pointer;
+			}
+		}
+
+		.flex {
+			display: flex;
+		}
+
+		.flex_asb {
+			display: flex;
+			justify-content: space-between;
+		}
+
+		.mode {
+			flex: 1;
+			padding: 10px;
+			margin-right: 10px;
+			background-color: #ffffff;
+			border-radius: 10px;
+
+			.title {
+				font-weight: bold;
+			}
+
+			.head {
+				border-bottom: 1px solid #dddddd;
+				padding: 12px 0;
+			}
+
+			.opacity {
+				opacity: 0;
+			}
+
+			.tab {
+				display: flex;
+				align-items: center;
+				flex: 1;
+				cursor: pointer;
+
+				.text {
+					margin-left: 30px;
+
+					.title {
+						color: #999999;
+						font-size: 14px;
+						margin-bottom: 8px;
+					}
+
+					.num {
+						font-size: 26px;
+						font-weight: bold;
+					}
+				}
+
+				.img {
+					width: 46px;
+					height: 46px;
+					margin-left: 20px;
+				}
+			}
+
+			.child {
+				border-right: 1px solid #dddddd;
+
+				.text {
+					.title {
+						margin-top: 8px;
+						margin-bottom: 0;
+					}
+				}
+			}
+
+			.child:last-child {
+				border-right: none;
+			}
+		}
+
+		.mode:last-child {
+			margin-right: 0;
+		}
+
+		.container_bottom {
+			width: 100%;
+			height: 350px;
+			padding: 10px;
+			background-color: #ffffff;
+			margin-top: 10px;
+			border-radius: 10px;
+		}
+	}
+</style>

+ 1 - 1
src/views/engineeringMaintenance/basicData/detail.vue

@@ -607,7 +607,7 @@
 					mobile: [
 						{ required: true, message: `请输入联系电话`, trigger: 'blur' },
 						{ required: true, message: `请输入联系电话`, trigger: 'change' },
-						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
+						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
 					dateList: [
 						{ required: true, message: '请选择维保时间', trigger: 'change' }