소스 검색

no message

linwenxin 1 년 전
부모
커밋
4a1f1dfb0e

+ 25 - 0
src/api/applicationWithoutFee.js

@@ -0,0 +1,25 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function enginMaterialList(data) {
+  return request({
+    url: `/engin/material/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function enginMaterialListExport(data, name) {
+  return postBlob({
+    url: '/engin/material/list/export',
+    data,
+    name
+  })
+}
+
+export function enginMaterialDetail(params) {
+  return request({
+    url: `/engin/material/detail`,
+    method: 'post',
+    params
+  })
+}

+ 111 - 0
src/views/engineeringMaintenance/allInclusiveExpense/index.vue

@@ -0,0 +1,111 @@
+<template>
+  <template-page ref="pageRef" :getList="getList" :operation="operation()" :exportList="exportList"
+    :columnParsing="columnParsing" :tableAttributes="tableAttributes" :tableEvents="tableEvents">
+    <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" v-if="formBool">
+            <zj-form-container v-if="formBool" :formAttributes="{ 'label-position': 'top' }">
+              <zj-form-module v-if="formBool" title="" :form-data="formData" :form-items="formItems">
+              </zj-form-module>
+            </zj-form-container>
+          </zj-page-fill>
+        </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 { enginMaterialList, enginMaterialListExport, enginMaterialDetail } from "@/api/applicationWithoutFee.js"
+import feel from "../mixins/feel.js"
+export default {
+  components: {
+    TemplatePage,
+  },
+  mixins: [import_mixin, operation_mixin, feel],
+  data() {
+    return {
+      formBool: false,
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false,
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      formData: {}
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(p, cb) {
+      try {
+        var pam = JSON.parse(JSON.stringify(p))
+        pam.params.push({ "param": "is_all_fee", "compare": "=", "value": "YES" })
+        cb && cb(pam)
+        return enginMaterialList(pam)
+      } catch (err) {
+        console.log(err)
+      }
+    },
+
+    // 列表导出函数
+    exportList: enginMaterialListExport,
+
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+
+    operation() {
+      return this.operationBtn({
+        detail: {
+          click: ({ row, index, column }) => {
+            console.log(row)
+            enginMaterialDetail({
+              id: row.orderId
+            }).then(res => {
+              this.formData = res.data
+              this.$nextTick(() => {
+                this.formBool = true
+              })
+            })
+          }
+        }
+      })
+    },
+
+    handleClose() {
+      this.formBool = false
+    },
+
+  }
+}
+</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>

+ 135 - 0
src/views/engineeringMaintenance/applicationWithoutFee/index.vue

@@ -0,0 +1,135 @@
+<template>
+  <template-page ref="pageRef" :getList="getList" :operation="operation()" :exportList="exportList"
+    :columnParsing="columnParsing" :tableAttributes="tableAttributes" :tableEvents="tableEvents"
+    :moreParameters="moreParameters">
+    <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" v-if="formBool">
+            <zj-form-container v-if="formBool" :formAttributes="{ 'label-position': 'top' }">
+              <zj-form-module v-if="formBool" title="" :form-data="formData" :form-items="formItems">
+              </zj-form-module>
+            </zj-form-container>
+          </zj-page-fill>
+        </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 { enginMaterialList, enginMaterialListExport, enginMaterialDetail } from "@/api/applicationWithoutFee.js"
+import feel from "../mixins/feel.js"
+export default {
+  components: {
+    TemplatePage,
+  },
+  mixins: [import_mixin, operation_mixin, feel],
+  data() {
+    return {
+      formBool: false,
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false,
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      formData: {}
+    }
+  },
+  computed: {
+    moreParameters() {
+      return [
+        {
+          name: '状态',
+          key: 'examineStatus',
+          value: '',
+          conditions: [
+            { label: "全部", value: "" },
+            { label: "待审核", value: "WAIT" },
+            { label: "审核通过", value: "OK" },
+            { label: "驳回", value: "FAIL" },
+            { label: "取消", value: "NO" },
+            { label: "已支付", value: "PAID" },
+            { label: "未支付", value: "NO_PAID" },
+          ]
+        }
+      ]
+    },
+  },
+  methods: {
+    // 列表请求函数
+    getList(p, cb) {
+      try {
+        var pam = JSON.parse(JSON.stringify(p))
+        pam.params.push({ "param": "is_all_fee", "compare": "=", "value": "NO" })
+        if (pam.examineStatus) {
+          pam.params.push({ "param": "examine_status", "compare": "=", "value": pam.examineStatus })
+        }
+        cb && cb(pam)
+        return enginMaterialList(pam)
+      } catch (err) {
+        console.log(err)
+      }
+    },
+
+    // 列表导出函数
+    exportList: enginMaterialListExport,
+
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+
+    operation() {
+      return this.operationBtn({
+        detail: {
+          click: ({ row, index, column }) => {
+            console.log(row)
+            enginMaterialDetail({
+              id: row.orderId
+            }).then(res => {
+              this.formData = res.data
+              this.$nextTick(() => {
+                this.formBool = true
+              })
+            })
+          }
+        }
+      })
+    },
+
+    handleClose() {
+      this.formBool = false
+    },
+
+  }
+}
+</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>

+ 104 - 0
src/views/engineeringMaintenance/feeSettlementIncluded/index.vue

@@ -0,0 +1,104 @@
+<template>
+  <template-page ref="pageRef" :getList="getList" :operation="operation()" :exportList="exportList"
+    :columnParsing="columnParsing" :tableAttributes="tableAttributes" :tableEvents="tableEvents"
+    :moreParameters="moreParameters">
+    <div class="cartographer_big">
+      <el-dialog title="创建工单" width="100%" :modal="false" :visible.sync="createFormBool" :before-close="handleClose">
+      </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 { enginMaterialList, enginMaterialListExport } from "@/api/applicationWithoutFee.js"
+export default {
+  components: {
+    TemplatePage,
+  },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 创建表单
+      createFormBool: false,
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false,
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+    }
+  },
+  computed: {
+    moreParameters() {
+      return [
+        {
+          name: '状态',
+          key: 'examineStatus',
+          value: '',
+          conditions: [
+            { label: "全部", value: "" },
+            { label: "待审核", value: "WAIT" },
+            { label: "审核通过", value: "OK" },
+            { label: "驳回", value: "FAIL" },
+            { label: "取消", value: "NO" },
+            { label: "已支付", value: "PAID" },
+            { label: "未支付", value: "NO_PAID" },
+          ]
+        }
+      ]
+    },
+  },
+  methods: {
+    // 列表请求函数
+    getList(p, cb) {
+      try {
+        var pam = JSON.parse(JSON.stringify(p))
+        pam.params.push({ "param": "is_all_fee", "compare": "=", "value": "NO" })
+        if (pam.examineStatus) {
+          pam.params.push({ "param": "examine_status", "compare": "=", "value": pam.examineStatus })
+        }
+        cb && cb(pam)
+        return enginMaterialList(pam)
+      } catch (err) {
+        console.log(err)
+      }
+    },
+
+    // 列表导出函数
+    exportList: enginMaterialListExport,
+
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+
+    operation() {
+      return this.operationBtn({
+        edit: {
+          click: ({ row, index, column }) => {
+
+          }
+        }
+      })
+    },
+
+    handleClose() {
+      this.createFormBool = false
+    },
+
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 217 - 0
src/views/engineeringMaintenance/mixins/feel.js

@@ -0,0 +1,217 @@
+
+export default {
+  computed: {
+    formItems() {
+      return [{
+        md: 24,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '基本信息',
+        },
+        render: (h, { props, onInput }) => {
+          var { formData } = props
+          return (
+            <el-descriptions border title="" column={2} colon={false} labelStyle={{ width: '13%' }} contentStyle={{ width: '37%' }}>
+              <el-descriptions-item label="所属商户">
+                {formData.companyWechatName}
+              </el-descriptions-item>
+              <el-descriptions-item label="申请单号">
+                {formData.orderId}
+              </el-descriptions-item>
+              <el-descriptions-item label="项目名称">
+                {formData.rpProjectRepairName}
+              </el-descriptions-item>
+              <el-descriptions-item label="工单单号">
+                {formData.workerOrderId}
+              </el-descriptions-item>
+              <el-descriptions-item label="负责人">
+                {formData.userName}
+              </el-descriptions-item>
+              <el-descriptions-item label="联系电话">
+                {formData.userMobile}
+              </el-descriptions-item>
+              <el-descriptions-item label="项目地址">
+                {formData.pgOrderBase.address}
+              </el-descriptions-item>
+              <el-descriptions-item label="创单人">
+                {formData.pgOrderBase.createName}
+              </el-descriptions-item>
+              <el-descriptions-item label="创单人电话">
+                {formData.pgOrderBase.createMobile}
+              </el-descriptions-item>
+              <el-descriptions-item label="创单时间">
+                {formData.pgOrderBase.createTime}
+              </el-descriptions-item>
+              <el-descriptions-item label="工单类型">
+                {formData.orderSmallTypeText}
+              </el-descriptions-item>
+              <el-descriptions-item label="网点名称">
+                {formData.websitName}
+              </el-descriptions-item>
+              <el-descriptions-item label="申请人">
+                {formData.workerName}
+              </el-descriptions-item>
+              <el-descriptions-item label="联系电话">
+                {formData.workerMobile}
+              </el-descriptions-item>
+              <el-descriptions-item label="申请时间">
+                {formData.createTime}
+              </el-descriptions-item>
+              <el-descriptions-item label="包含全部费用">
+                {({ YES: "是", NO: "否" })[formData.isAllFee]}
+              </el-descriptions-item>
+            </el-descriptions>
+          )
+        }
+      }, {
+        md: 24,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '费用明细',
+        },
+        render: (h, { props, onInput }) => {
+          var { formData } = props
+          return (
+            <zj-table
+              columns={[{
+                columnAttributes: {
+                  label: '费用名称',
+                  prop: 'goodsName',
+                }
+              }, {
+                columnAttributes: {
+                  label: '费用类型',
+                  prop: 'chargeType',
+                },
+                render: (h, { row, column, index }) => {
+                  return (
+                    <div style="padding-left:10px">
+                      {({ ACC: "配件物料", SERV: "服务" })[row.chargeType]}
+                    </div>
+                  )
+                }
+              }, {
+                columnAttributes: {
+                  label: '单价',
+                  prop: 'goodsAmount',
+                }
+              }, {
+                columnAttributes: {
+                  label: '数量',
+                  prop: 'num',
+                }
+              }, {
+                columnAttributes: {
+                  label: '费用金额',
+                  prop: 'totalAmount',
+                }
+              },
+              ]}
+              table-data={formData.rpMaterialOrderItems}
+            />
+          )
+        }
+      },
+      {
+        md: 8,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '配件费用合计',
+        },
+        render: (h, { props, onInput }) => {
+          var { formData } = props
+          return <span>{[0, 0, 0, ...formData.rpMaterialOrderItems.filter(item => item.chargeType == "ACC").map(item => item.totalAmount)].reduce(function (prev, curr, idx, arr) {
+            return prev + curr;
+          }).toFixed(2)}</span>
+        }
+      },
+      {
+        md: 8,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '服务费用合计',
+        },
+        render: (h, { props, onInput }) => {
+          var { formData } = props
+          return <span>{[0, 0, 0, ...formData.rpMaterialOrderItems.filter(item => item.chargeType == "SERV").map(item => item.totalAmount)].reduce(function (prev, curr, idx, arr) {
+            return prev + curr;
+          }).toFixed(2)}</span>
+        }
+      },
+      {
+        md: 8,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '总金额',
+        },
+        render: (h, { props, onInput }) => {
+          var { formData } = props
+          return <span>{[0, 0, 0, ...formData.rpMaterialOrderItems.map(item => item.totalAmount)].reduce(function (prev, curr, idx, arr) {
+            return prev + curr;
+          }).toFixed(2)}</span>
+        }
+      },
+      {
+        name: 'el-input',
+        md: 24,
+        attributes: { disabled: true, type: "textarea", placeholder: '' },
+        formItemAttributes: { label: '申请备注', prop: 'remark' },
+      }, {
+        md: 24,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '交易记录',
+        },
+        render: (h, { props, onInput }) => {
+          var { formData } = props
+          return (
+            <zj-table
+              columns={[{
+                columnAttributes: {
+                  label: 'id',
+                  prop: 'orderId',
+                }
+              }, {
+                columnAttributes: {
+                  label: '交易类型',
+                  prop: 'goodsType',
+                },
+                render: (h, { row }) => {
+                  return <div>
+                    {({ M: "辅材", P: "配件" })[row.goodsType]}
+                  </div>
+                }
+              }, {
+                columnAttributes: {
+                  label: '交易金额',
+                  prop: 'totalAmount',
+                }
+              }, {
+                columnAttributes: {
+                  label: '交易状态',
+                  prop: 'payStatus',
+                },
+                render: (h, { row }) => {
+                  return <div>
+                    {({ CANCEL: "取消", WAIT: "待支付", PAID: "已支付" })[row.payStatus]}
+                  </div>
+                }
+              }, {
+                columnAttributes: {
+                  label: '交易时间',
+                  prop: 'payTime',
+                }
+              }, {
+                columnAttributes: {
+                  label: '创建时间',
+                  prop: 'createTime',
+                }
+              }]}
+              table-data={[formData]}
+            />
+          )
+        }
+      }]
+    }
+  }
+}