Pārlūkot izejas kodu

Merge branch 'linwenxin_dev' into pengyouhao_dev

pengyh 1 gadu atpakaļ
vecāks
revīzija
18cd0e93ef

+ 118 - 0
src/api/costPerDimension.js

@@ -0,0 +1,118 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function settleExpenseGatherList(data) {
+  return request({
+    url: `/settle/expense/gather/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function settleExpenseGatherListExport(data, name) {
+  return postBlob({
+    url: '/settle/expense/gather/list/export',
+    data,
+    name
+  })
+}
+
+export function settleExpenseImport(data) {
+  return handleImport('/settle/expense/import', data.formdata, data.id || '')
+}
+
+export function settleExpenseBatchDel(data) {
+  return request({
+    url: '/settle/expense/batch/del',
+    method: 'post',
+    data
+  })
+}
+
+export function settleExpenseGatherBatchDel(data) {
+  return request({
+    url: '/settle/expense/gather/batch/del',
+    method: 'post',
+    data
+  })
+}
+
+export function settleExpenseMonthGather(data) {
+  return request({
+    url: '/settle/expense/month/gather',
+    method: 'post',
+    data
+  })
+}
+
+export function settleExpenseList(data) {
+  return request({
+    url: `/settle/expense/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function settleExpenseListExport(data, name) {
+  return postBlob({
+    url: '/settle/expense/list/export',
+    data,
+    name
+  })
+}
+
+export function settleExpenseSave(data) {
+  return request({
+    url: `/settle/expense/save`,
+    method: 'post',
+    data
+  })
+}
+
+export function settleMonthWagesGatherList(data) {
+  return request({
+    url: `/settle/month/wages/gather/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function settleMonthWagesList(data) {
+  return request({
+    url: `/settle/month/wages/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function settleMonthWagesListExport(data, name) {
+  return postBlob({
+    url: '/settle/month/wages/list/export',
+    data,
+    name
+  })
+}
+
+export function settleMonthWagesBatchReject(data) {
+  return request({
+    url: '/settle/month/wages/batch/reject',
+    method: 'post',
+    data
+  })
+}
+
+export function settleMonthWagesBatchSend(data) {
+  return request({
+    url: '/settle/month/wages/batch/send',
+    method: 'post',
+    data
+  })
+}
+
+export function settleMonthWagesWorkerBatchSend(data) {
+  return request({
+    url: '/settle/month/wages/worker/batch/send',
+    method: 'post',
+    data
+  })
+}
+

+ 19 - 0
src/components/template/template-page-1.vue

@@ -677,4 +677,23 @@ export default {
 ::v-deep .teshudeshangchuananniu {
   color: #fff !important;
 }
+
+::v-deep .el-table__row {
+  .is-right {
+    .text-view {
+      text-align: right !important;
+      display: flex;
+      justify-content: flex-end !important;
+      flex-wrap: wrap;
+    }
+  }
+
+  .is-left {
+    .text-view {
+      text-align: left !important;
+      justify-content: flex-start !important;
+      flex-wrap: wrap;
+    }
+  }
+}
 </style>

+ 797 - 0
src/views/engineerFeeSettlement/costPerDimension/index.vue

@@ -0,0 +1,797 @@
+<template>
+  <template-page v-if="showTable" ref="pageRef" :get-list="[getList1, getList2][pageLevel]"
+    :exportList="[exportList1, exportList2][pageLevel]"
+    :options-evens-group="[optionsEvensGroup1, optionsEvensGroup2][pageLevel]"
+    :operation="([operation1, operation2][pageLevel])()" :expCode="['exp', 'detailExp'][pageLevel]"
+    :table-attributes="tableAttributes" :table-events="tableEvents" :moreParameters="moreParameters"
+    :column-parsing="columnParsing">
+    <div slot="moreSearch" v-if="pageLevel==0">
+			<el-radio-group v-model="tagStatus" size="mini" @change="changeType">
+				<el-radio-button label="">全部</el-radio-button>
+				<el-radio-button label="NO">未汇总</el-radio-button>
+				<el-radio-button label="YES">已汇总</el-radio-button>
+			</el-radio-group>
+			<br><br>
+		</div>
+    <div class="cartographer_big">
+      <el-dialog title="费用明细" width="100%" :modal="false" :visible.sync="formBool" :before-close="handleClose">
+        <zj-page-container v-if="formBool">
+          <zj-page-fill class="neibuview">
+            <zj-form-container ref="formRef" :form-data="formData" :form-attributes="{ size: 'mini' }">
+              <zj-form-module title="基本信息" label-width="130px" :form-data="formData" :form-items="formItems" />
+            </zj-form-container>
+          </zj-page-fill>
+          <div>
+            <div style="box-sizing: border-box; padding: 10px;text-align: right;">
+              <el-button size="mini" @click="handleClose">取 消</el-button>
+              <el-button v-if="!formEdit" size="mini" @click="formConfirm" type="primary">确 定</el-button>
+            </div>
+          </div>
+        </zj-page-container>
+      </el-dialog>
+    </div>
+  </template-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 { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import { settleExpenseGatherList, settleExpenseGatherListExport, settleExpenseImport, settleExpenseMonthGather, settleExpenseList, settleExpenseListExport, settleExpenseGatherBatchDel, settleExpenseBatchDel, settleExpenseSave } from "@/api/costPerDimension";
+import { commonTemplateDownload } from '@/api/common.js'
+import { memberListPageV2 } from "@/api/masterManagement";
+export default {
+  components: { TemplatePage, ImageUpload },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true,
+        selectable: this.selectable
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      pageLevel: 0,
+      showTable: true,
+      collectItem: {},
+      formData: {
+        companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+      },
+      formBool: false,
+      formEdit: false,
+      workerList: [],
+      tagStatus: this?.pageCode || ""
+    }
+  },
+  computed: {
+    optionsEvensGroup1() {
+      return [
+        [
+          [
+            this.optionsEvensAuth("batchSummary", {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选工单')
+                  return
+                }
+                this.$prompt('汇总名称', '汇总', {
+                  confirmButtonText: '确定',
+                  cancelButtonText: '取消',
+                  inputPattern: /\S/,
+                  inputErrorMessage: '名称不能为空'
+                }).then(({ value }) => {
+                  settleExpenseMonthGather({
+                    ids: this.recordSelected.map(item => item.id),
+                    name: value
+                  }).then(res => {
+                    this.$message({
+                      type: 'success',
+                      message: '操作成功!'
+                    })
+                    this.$refs?.pageRef?.refreshList()
+                  })
+                }).catch(() => {
+
+                });
+              }
+            })
+          ],
+          [
+            this.optionsEvensAuth(["import", "download1", "download2", "download3", "download4"], {
+              name: '导入费用',
+              click: () => { }
+            }),
+            this.optionsEvensAuth("import", ({ moduleName }) => {
+              return {
+                name: moduleName,
+                render: () => {
+                  return this.importButton(settleExpenseImport, moduleName)
+                }
+              }
+            }),
+            this.optionsEvensAuth("download1", {
+              click: () => {
+                commonTemplateDownload({ name: '师傅费用结算导入模板(其它).xlsx' }, `师傅费用结算导入模板(其它)`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(err => {
+                    this.$message.error('下载失败')
+                  })
+              }
+            }),
+            this.optionsEvensAuth("download2", {
+              click: () => {
+                commonTemplateDownload({ name: '师傅费用结算导入模板(安装其它).xlsx' }, `师傅费用结算导入模板(安装其它)`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(err => {
+                    this.$message.error('下载失败')
+                  })
+              }
+            }),
+            this.optionsEvensAuth("download3", {
+              click: () => {
+                commonTemplateDownload({ name: '师傅费用结算导入模板(安装家用空调).xlsx' }, `师傅费用结算导入模板(安装家用空调)`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(err => {
+                    this.$message.error('下载失败')
+                  })
+              }
+            }),
+            this.optionsEvensAuth("download4", {
+              click: () => {
+                commonTemplateDownload({ name: '师傅费用结算导入模板(维修).xlsx' }, `师傅费用结算导入模板(维修)`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(err => {
+                    this.$message.error('下载失败')
+                  })
+              }
+            }),
+          ],
+        ]
+      ]
+    },
+    optionsEvensGroup2() {
+      return [
+        [
+          [
+            {
+              name: "返回汇总页面",
+              click: () => {
+                this.pageLevel = 0
+              }
+            }
+          ],
+        ],
+        ...(() => {
+          if (this.collectItem.status != "YES") {
+            return [
+              [
+                [
+                  this.optionsEvensAuth("detailAdd", {
+                    click: () => {
+                      this.formBool = true
+                      this.getWorkers()
+                    }
+                  })
+                ],
+                [
+                  this.optionsEvensAuth("detailBatchDel", {
+                    click: () => {
+                      if (this.recordSelected.length === 0) {
+                        this.$message.warning('请勾选工单')
+                        return
+                      }
+                      this.$confirm('此操作将永久删除数据, 是否继续?', '提示', {
+                        confirmButtonText: '确定',
+                        cancelButtonText: '取消',
+                        type: 'warning'
+                      }).then(() => {
+                        settleExpenseBatchDel(this.recordSelected.map(item => item.id)).then(res => {
+                          this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                          })
+                          this.$refs?.pageRef?.refreshList()
+                        })
+                      }).catch(() => {
+
+                      });
+                    }
+                  })
+                ],
+              ]
+            ]
+          }
+          return []
+        })()
+      ]
+    },
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {
+      return [
+        {
+          name: 'el-input',
+          md: 12,
+          attributes: {
+            disabled: true,
+          },
+          formItemAttributes: {
+            label: '所属商户',
+            prop: 'companyWechatName',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 12,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '网点名称',
+            prop: 'importWebsitName',
+            rules: []
+          }
+        }, {
+          name: 'el-date-picker',
+          md: 6,
+          attributes: {
+            type: "month",
+            disabled: this.formEdit,
+            'value-format': 'yyyy-MM',
+          },
+          formItemAttributes: {
+            label: '发放月份',
+            prop: 'sendMonth',
+            rules: [...required]
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '费用类型',
+            prop: 'typeName',
+            rules: [...required]
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '安装/维修品类',
+            prop: 'category',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '维修自编号',
+            prop: 'repairCustomCode',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '内机条码',
+            prop: 'insideCode',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '内机名称',
+            prop: 'insideName',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '基础安装/维修费用',
+            prop: 'baseAmount',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '辅材达标',
+            prop: 'materialAmount',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '评价数据达标',
+            prop: 'appraiseAmount',
+            rules: []
+          }
+        },
+        {
+          md: 6,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '合计金额',
+            prop: 'totalAmount',
+            rules: []
+          },
+          attributes: {},
+          render: (h, { props, onInput }) => {
+            return (
+              <el-input
+                value={Number(this.formData.baseAmount) + Number(this.formData.materialAmount) + Number(this.formData.appraiseAmount)}
+                disabled={true}
+                size="mini"
+                placeholder="请输入"
+              ></el-input>
+            )
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '工单编号',
+            prop: 'orderNo',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '销售单号',
+            prop: 'salesOrderNo',
+            rules: []
+          }
+        }, {
+          name: 'el-date-picker',
+          md: 6,
+          attributes: {
+            type: "date",
+            disabled: this.formEdit,
+            'value-format': 'yyyy-MM-dd HH:mm:ss',
+          },
+          formItemAttributes: {
+            label: '安装/维修日期',
+            prop: 'workDate',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '销售类型',
+            prop: 'salesType',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 12,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '维修内容',
+            prop: 'repairContent',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '客户名称',
+            prop: 'userName',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '客户电话',
+            prop: 'userMobile',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 24,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '客户地址',
+            prop: 'userAddress',
+            rules: []
+          }
+        }, {
+          name: 'el-select',
+          options: this.workerList,
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true
+          },
+          formItemAttributes: {
+            label: '工程师1名称',
+            prop: 'workerId1',
+            rules: [...required]
+          },
+          events: {
+            change: (val) => {
+              var data = this.workerList.find(item => item.value == val).data
+              this.formData.workerName1 = data?.workerName || ""
+              this.formData.workerMobile1 = data?.workerMobile || ""
+            }
+          },
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+          },
+          formItemAttributes: {
+            label: '工程师1电话',
+            prop: 'workerMobile1',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '工程师1结算比例',
+            prop: 'workerSettleRate1',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '工程师1结算金额',
+            prop: 'workerSettleAmount1',
+            rules: []
+          }
+        }, {
+          name: 'el-select',
+          options: this.workerList,
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true
+          },
+          formItemAttributes: {
+            label: '工程师2名称',
+            prop: 'workerId2',
+            rules: []
+          },
+          events: {
+            change: (val) => {
+              var data = this.workerList.find(item => item.value == val).data
+              this.formData.workerName2 = data?.workerName || ""
+              this.formData.workerMobile2 = data?.workerMobile || ""
+            }
+          },
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+          },
+          formItemAttributes: {
+            label: '工程师2电话',
+            prop: 'workerMobile2',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '工程师2结算比例',
+            prop: 'workerSettleRate2',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '工程师2结算金额',
+            prop: 'workerSettleAmount2',
+            rules: []
+          }
+        }, {
+          name: 'el-input',
+          md: 24,
+          attributes: {
+            disabled: this.formEdit,
+          },
+          formItemAttributes: {
+            label: '备注',
+            prop: 'remark',
+            rules: []
+          }
+        },
+      ]
+    }
+  },
+  watch: {
+    pageLevel() {
+      this.showTable = false
+      this.$nextTick(() => {
+        this.showTable = true
+      })
+    }
+  },
+  created(){
+    if(this.pageCode){
+      this.tagStatus = this?.pageCode
+    }
+  },
+  methods: {
+    changeType(val) {
+			this.$refs.pageRef.refreshList()
+		},
+    getList1(p, cb) {
+      var pam = JSON.parse(JSON.stringify(p))
+      try {
+        if(this.tagStatus){
+          pam.params.push({"param":"a.status","compare":"=","value": this.tagStatus})
+        }
+        cb && cb(pam)
+        return settleExpenseGatherList(pam)
+      } catch (err) {
+      }
+    },
+    exportList1: settleExpenseGatherListExport,
+    getList2(p, cb) {
+      var pam = JSON.parse(JSON.stringify(p))
+      try {
+        pam.params.push({ "param": "a.settle_expense_id", "compare": "=", "value": this.collectItem.id })
+        cb && cb(pam)
+        return settleExpenseList(pam)
+      } catch (err) {
+      }
+    },
+    exportList2: settleExpenseListExport,
+    selectable(row, index) {
+      if (this.pageLevel) {
+        return this?.collectItem?.status != "YES"
+      }
+      return !["YES"].includes(Object.entries(row.selectMapData.status).find(([key, val]) => val == row.status)?.[0])
+    },
+    operation1() {
+      return this.operationBtn({
+        detail: {
+          click: ({ row, index, column }) => {
+            this.collectItem = { ...row }
+            this.pageLevel = 1
+          }
+        },
+        summary: {
+          conditions: ({ row, index, column }) => {
+            return row.status != "YES"
+          },
+          click: ({ row, index, column }) => {
+            this.$prompt('汇总名称', '汇总', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              inputPattern: /\S/,
+              inputErrorMessage: '名称不能为空'
+            }).then(({ value }) => {
+              settleExpenseMonthGather({
+                ids: [row.id],
+                name: value
+              }).then(res => {
+                this.$message({
+                  type: 'success',
+                  message: '操作成功!'
+                })
+                this.$refs?.pageRef?.refreshList()
+              })
+            }).catch(() => {
+
+            });
+          }
+        },
+        del: {
+          prompt: "此操作将永久删除数据, 是否继续?",
+          conditions: ({ row, index, column }) => {
+            return row.status != "YES"
+          },
+          click: ({ row, index, column }) => {
+            settleExpenseGatherBatchDel([row.id]).then(res => {
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              })
+              this.$refs?.pageRef?.refreshList()
+            })
+          }
+        }
+      })
+    },
+    operation2() {
+      return this.operationBtn({
+        detailEdit: {
+          conditions: ({ row, index, column }) => {
+            return row.status != "YES"
+          },
+          click: ({ row, index, column }) => {
+            this.formData = { ...row }
+            this.formEdit = false
+            this.formBool = true
+            this.getWorkers()
+          }
+        },
+        detailDel: {
+          prompt: "此操作将永久删除数据, 是否继续?",
+          conditions: ({ row, index, column }) => {
+            return row.status != "YES"
+          },
+          click: ({ row, index, column }) => {
+            settleExpenseBatchDel([row.id]).then(res => {
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              })
+              this.$refs?.pageRef?.refreshList()
+            })
+          }
+        },
+        details_mx: {
+          click: ({ row, index, column }) => {
+            this.formData = { ...row }
+            this.formEdit = true
+            this.formBool = true
+            this.getWorkers()
+          }
+        }
+      })
+    },
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    handleClose() {
+      this.$data.formData = this.$options.data().formData
+      this.formBool = false
+    },
+    formConfirm() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          settleExpenseSave({ ...this.formData, settleExpenseId: this.collectItem.id }).then(res => {
+            this.$message({
+              type: 'success',
+              message: '保存成功!'
+            })
+            this.$refs.pageRef.refreshList()
+            this.handleClose()
+          })
+        }
+      })
+    },
+    getWorkers() {
+      memberListPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "b.examine_status", "compare": "=", "value": "OK" }] }).then(res => {
+        this.workerList = res.data.records.map(item => {
+          var { id, userId, ...data } = item
+          return {
+            value: userId,
+            label: data.nickName,
+            data: {
+              workerId: userId,
+              workerName: data.nickName,
+              workerIdcard: data.idCard,
+              workerMobile: data.mobile,
+              ...data
+            }
+          }
+        })
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.neibuview {
+  box-sizing: border-box;
+  padding-left: 16px;
+
+  ::v-deep &>.zj-page-fill-scroll {
+    box-sizing: border-box;
+    padding-right: 16px;
+
+    &>div:nth-child(1) {
+      margin-top: 20px;
+    }
+  }
+}
+</style>

+ 444 - 0
src/views/engineerFeeSettlement/monthlyPayrollSummary/index.vue

@@ -0,0 +1,444 @@
+<template>
+  <template-page v-if="showTable" ref="pageRef" :get-list="[getList, getList1, getList2][pageLevel]"
+    :exportList="[undefined, exportList1, exportList2][pageLevel]"
+    :options-evens-group="[optionsEvensGroup0, optionsEvensGroup1, optionsEvensGroup2][pageLevel]"
+    :operation="([operation0, operation1, operation2][pageLevel])()"
+    :expCode="['', 'workerExp', 'detailExp'][pageLevel]" :table-attributes="tableAttributes" :table-events="tableEvents"
+    :moreParameters="moreParameters" :column-parsing="columnParsing">
+    <div slot="moreSearch" v-if="pageLevel == 0">
+      <el-radio-group v-model="tagStatus" size="mini" @change="changeType">
+        <el-radio-button label="">全部</el-radio-button>
+        <el-radio-button label="NOT">未发放</el-radio-button>
+        <el-radio-button label="PART">部分发放</el-radio-button>
+        <el-radio-button label="END">已发放</el-radio-button>
+      </el-radio-group>
+      <br><br>
+    </div>
+    <div class="cartographer_big">
+      <el-dialog title="发放" width="100%" :modal="false" :visible.sync="formBool" :before-close="handleClose">
+        <zj-page-container v-if="formBool">
+          <zj-page-fill class="neibuview">
+            <zj-form-container ref="formRef" :form-data="formData" :form-attributes="{ size: 'mini' }">
+              <zj-form-module title="发放信息" label-width="130px" :form-data="formData" :form-items="formItems" />
+            </zj-form-container>
+          </zj-page-fill>
+          <div>
+            <div style="box-sizing: border-box; padding: 10px">
+              <el-button size="mini" @click="handleClose">取 消</el-button>
+              <el-button size="mini" @click="formConfirm" type="primary">确 定</el-button>
+            </div>
+          </div>
+        </zj-page-container>
+      </el-dialog>
+    </div>
+  </template-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 { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import {
+  settleExpenseList,
+  settleExpenseListExport,
+  settleMonthWagesGatherList,
+  settleMonthWagesList,
+  settleMonthWagesListExport,
+  settleMonthWagesBatchReject,
+  settleMonthWagesBatchSend,
+  settleMonthWagesWorkerBatchSend
+} from "@/api/costPerDimension";
+import { tableDataParsing } from "@/utils/common.js"
+export default {
+  components: { TemplatePage, ImageUpload },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true,
+        selectable: this.selectable
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      pageLevel: 0,
+      showTable: true,
+      monthItem: {},
+      workerItem: {},
+      formData: {
+        sendDate: "",
+        fileUrl: [],
+        remark: ""
+      },
+      formBool: false,
+      evaluationColumns: [],
+      evaluationData: [],
+      tagStatus: this?.pageCode || ""
+    }
+  },
+  computed: {
+    optionsEvensGroup0() {
+      return [
+        [
+          [
+            this.optionsEvensAuth("monthBatchRelease", {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选工单')
+                  return
+                }
+                this.getTableJieGou()
+                this.formBool = true
+              }
+            })
+          ],
+          [
+            this.optionsEvensAuth("monthBatchRejection", {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选工单')
+                  return
+                }
+                this.$confirm('是否确定驳回', '提示', {
+                  confirmButtonText: '确定',
+                  cancelButtonText: '取消',
+                  type: 'warning'
+                }).then(() => {
+                  settleMonthWagesBatchReject(this.recordSelected.map(item => item.id)).then(res => {
+                    this.$message({
+                      type: 'success',
+                      message: '操作成功!'
+                    })
+                    this.$refs?.pageRef?.refreshList()
+                  })
+                }).catch(() => {
+
+                });
+              }
+            })
+          ],
+        ]
+      ]
+    },
+    optionsEvensGroup1() {
+      return [
+        [
+          [
+            {
+              name: "返回月度汇总页面",
+              click: () => {
+                this.pageLevel = 0
+              }
+            }
+          ],
+        ],
+        [
+          [
+            this.optionsEvensAuth("workerBatchRelease", {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选工单')
+                  return
+                }
+                this.getTableJieGou()
+                this.formBool = true
+              }
+            })
+          ],
+        ]
+      ]
+    },
+    optionsEvensGroup2() {
+      return [
+        [
+          [
+            {
+              name: "返回师傅汇总页面",
+              click: () => {
+                this.pageLevel = 1
+              }
+            }
+          ],
+        ],
+      ]
+    },
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {
+      return [{
+        name: 'el-date-picker',
+        md: 6,
+        attributes: {
+          type: "date",
+          'value-format': 'yyyy-MM-dd HH:mm:ss',
+        },
+        formItemAttributes: {
+          label: '发放日期',
+          prop: 'sendDate',
+          rules: [...required]
+        }
+      }, {
+        md: 24,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '发放凭证',
+          prop: 'fileUrl',
+          rules: []
+        },
+        attributes: {},
+        render: (h, { props, onInput }) => {
+          return (
+            <ImageUpload fileList={this.formData.fileUrl} limit={1} fileType={["image"]} />
+          )
+        }
+      }, {
+        name: 'el-input',
+        md: 24,
+        attributes: {},
+        formItemAttributes: {
+          label: '备注',
+          prop: 'remark',
+          rules: []
+        }
+      }, {
+        md: 24,
+        name: 'slot-component',
+        attributes: {},
+        formItemAttributes: {
+          label: '',
+          'label-width': '0px',
+          prop: '',
+        },
+        render: (h, { props, onInput }) => {
+          return <hr />
+        }
+      }, {
+        md: 6,
+        name: 'slot-component',
+        attributes: {},
+        formItemAttributes: {
+          label: '结算金额合计',
+          prop: '',
+        },
+        render: (h, { props, onInput }) => {
+          return <div>{this.evaluationData.map(item => Number(item.settleAmount)).reduce((accumulator, currentValue) => accumulator + currentValue, 0)}</div>
+        }
+      }, {
+        md: 6,
+        name: 'slot-component',
+        attributes: {},
+        formItemAttributes: {
+          label: '发放人数',
+          prop: '',
+        },
+        render: (h, { props, onInput }) => {
+          return <div>{this.pageLevel ? this.evaluationData.length : this.evaluationData.map(item => Number(item.settleByCount)).reduce((accumulator, currentValue) => accumulator + currentValue, 0)}</div>
+        }
+      }, {
+        md: 24,
+        name: 'slot-component',
+        attributes: {},
+        formItemAttributes: {
+          label: '',
+          'label-width': '0px',
+          prop: '',
+        },
+        render: (h, { props, onInput }) => {
+          return <zj-table
+            columns={this.evaluationColumns}
+            table-data={this.evaluationData}
+          />
+        }
+      }]
+    }
+  },
+  watch: {
+    pageLevel() {
+      this.showTable = false
+      this.$nextTick(() => {
+        this.showTable = true
+      })
+    }
+  },
+  created(){
+    if(this.pageCode){
+      this.tagStatus = this?.pageCode
+    }
+  },
+  methods: {
+    changeType(val) {
+      this.$refs.pageRef.refreshList()
+    },
+    getList(p, cb) {
+      var pam = JSON.parse(JSON.stringify(p))
+      try {
+        if (this.tagStatus) {
+          pam.params.push({ "param": "a.status", "compare": "=", "value": this.tagStatus })
+        }
+        cb && cb(pam)
+        return settleMonthWagesGatherList(pam)
+      } catch (err) {
+      }
+    },
+    getList1(p, cb) {
+      var pam = JSON.parse(JSON.stringify(p))
+      try {
+        pam.params.push({ "param": "a.settle_month_wages_id", "compare": "=", "value": this.monthItem.id })
+        cb && cb(pam)
+        return settleMonthWagesList(pam)
+      } catch (err) {
+      }
+    },
+    exportList1: settleMonthWagesListExport,
+    getList2(p, cb) {
+      var pam = JSON.parse(JSON.stringify(p))
+      try {
+        pam.params.push(
+          { "param": "a.settle_month_wages_id", "compare": "=", "value": this.monthItem.id },
+          { "param": "month_settle_worker_id", "compare": "=", "value": this.workerItem.workerId }
+        )
+        cb && cb(pam)
+        return settleExpenseList(pam)
+      } catch (err) {
+      }
+    },
+    exportList2: settleExpenseListExport,
+    selectable(row, index) {
+      return !["END"].includes(Object.entries(row.selectMapData.status).find(([key, val]) => val == row.status)?.[0])
+    },
+    operation0() {
+      return this.operationBtn({
+        monthRelease: {
+          conditions: ({ row, index, column }) => {
+            return row.status != "END"
+          },
+          click: ({ row, index, column }) => {
+            this.recordSelected = [{ ...row }]
+            this.getTableJieGou()
+            this.formBool = true
+          }
+        },
+        monthRejection: {
+          prompt: "是否确定驳回?",
+          conditions: ({ row, index, column }) => {
+            return row.status == "NOT"
+          },
+          click: ({ row, index, column }) => {
+            settleMonthWagesBatchReject([row.id]).then(res => {
+              this.$message({
+                type: 'success',
+                message: '操作成功!'
+              })
+              this.$refs?.pageRef?.refreshList()
+            })
+          }
+        },
+        monthDetails: {
+          click: ({ row, index, column }) => {
+            this.monthItem = row
+            this.pageLevel = 1
+          }
+        }
+      })
+    },
+    operation1() {
+      return this.operationBtn({
+        workerRelease: {
+          conditions: ({ row, index, column }) => {
+            return row.status != "END"
+          },
+          click: ({ row, index, column }) => {
+            this.recordSelected = [{ ...row }]
+            this.getTableJieGou()
+            this.formBool = true
+          }
+        },
+        workerDetails: {
+          click: ({ row, index, column }) => {
+            this.workerItem = row
+            this.pageLevel = 2
+          }
+        },
+      })
+    },
+    operation2() {
+      return undefined
+    },
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    handleClose() {
+      this.recordSelected = []
+      this.evaluationColumns = []
+      this.evaluationColumns = []
+      this.$refs?.pageRef?.refreshList()
+      this.$data.formData = this.$options.data().formData
+      this.formBool = false
+    },
+    formConfirm() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          ; ([settleMonthWagesBatchSend, settleMonthWagesWorkerBatchSend][this.pageLevel])({
+            ...this.formData,
+            fileUrl: this.formData.fileUrl.length ? this.formData.fileUrl[0]?.url : "",
+            ids: this.recordSelected.map(item => item.id),
+            settleMonthWagesId: this.monthItem.id || undefined
+          }).then(res => {
+            this.$message({
+              type: 'success',
+              message: '发放成功!'
+            })
+            this.handleClose()
+          })
+        }
+      })
+    },
+    getTableJieGou() {
+      ; (([settleMonthWagesGatherList, settleMonthWagesList])[this.pageLevel])({ "pageNum": 1, "pageSize": 1, "params": [] }).then(res => {
+        this.evaluationColumns = tableDataParsing(res.fieldBeans.filter(item => !~(([["aaa"], ["id", "settleMonthWagesId", "settleMonthWagesDetailId", "workerId"]])[this.pageLevel]).indexOf(item.jname))).map(item => {
+          return item
+        })
+        this.$nextTick(() => {
+          this.evaluationData = this.recordSelected.map(item => {
+            Object.keys(item).map(key => {
+              var val = JSON.parse(res?.fieldBeans?.find(val => val.jname == key)?.enumMap || "{}")[item[key]];
+              if (val) item[key] = val;
+            })
+            return item
+          })
+        })
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.neibuview {
+  box-sizing: border-box;
+  padding-left: 16px;
+
+  ::v-deep &>.zj-page-fill-scroll {
+    box-sizing: border-box;
+    padding-right: 16px;
+
+    &>div:nth-child(1) {
+      margin-top: 20px;
+    }
+  }
+}
+</style>

+ 58 - 0
src/views/engineerFeeSettlement/securityFeeSettlement/index.vue

@@ -0,0 +1,58 @@
+<template>
+  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
+    :exportList="exportList">
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import { settleExpenseList, settleExpenseListExport } from "@/api/costPerDimension";
+export default {
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {
+      return []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList: settleExpenseList,
+    // 列表导出函数
+    exportList: settleExpenseListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 5 - 0
src/views/setting/organizationManagement/settledManagement/index.vue

@@ -302,6 +302,9 @@
           <el-form-item label="维保费用申请" prop="pubTemplateId5">
             <el-input v-model="step3Form.pubTemplateId5" autocomplete="off" placeholder="请输入维保的费用申请"></el-input>
           </el-form-item>
+          <el-form-item label="安维费用发放通知" prop="pubTemplateId6">
+            <el-input v-model="step3Form.pubTemplateId6" autocomplete="off" placeholder="请输入安维费用发放通知"></el-input>
+          </el-form-item>
 
 
 
@@ -450,6 +453,7 @@ export default {
         pubTemplateId3:'',
         pubTemplateId4:'',
         pubTemplateId5:'',
+        pubTemplateId6:'',
       },
       step3FormRules: {
         enterpriseId: [
@@ -632,6 +636,7 @@ export default {
             pubTemplateId3: this.step3Form.pubTemplateId3,
             pubTemplateId4: this.step3Form.pubTemplateId4,
             pubTemplateId5: this.step3Form.pubTemplateId5,
+            pubTemplateId6: this.step3Form.pubTemplateId6,
           }
           addAccount(params).then(res => {
             this.$successMsg('开通成功');

+ 6 - 0
src/views/setting/organizationManagement/tenantDetails/index.vue

@@ -239,6 +239,9 @@
           <el-form-item label="维保费用申请" prop="pubTemplateId5">
             <el-input v-model="step3Form.pubTemplateId5" autocomplete="off" placeholder="请输入维保的费用申请"></el-input>
           </el-form-item>
+          <el-form-item label="安维费用发放通知" prop="pubTemplateId6">
+            <el-input v-model="step3Form.pubTemplateId6" autocomplete="off" placeholder="请输入安维费用发放通知"></el-input>
+          </el-form-item>
 
 
         </el-card>
@@ -481,6 +484,7 @@ export default {
         pubTemplateId3:'',
         pubTemplateId4:'',
         pubTemplateId5:'',
+        pubTemplateId6:'',
       },
       step3FormRules: {
         enterpriseId: [
@@ -589,6 +593,7 @@ export default {
         this.step3Form.pubTemplateId3 = res.data.pubTemplateId3;
         this.step3Form.pubTemplateId4 = res.data.pubTemplateId4;
         this.step3Form.pubTemplateId5 = res.data.pubTemplateId5;
+        this.step3Form.pubTemplateId6 = res.data.pubTemplateId6;
 
         this.companyWechatId = res.data.companyWechatId;
 
@@ -768,6 +773,7 @@ export default {
             pubTemplateId3: this.step3Form.pubTemplateId3,
             pubTemplateId4: this.step3Form.pubTemplateId4,
             pubTemplateId5: this.step3Form.pubTemplateId5,
+            pubTemplateId6: this.step3Form.pubTemplateId6,
             
             companyWechatId: this.companyWechatId
           }