Browse Source

no message

linwenxin 3 tháng trước cách đây
mục cha
commit
bae31098f2

+ 25 - 0
src/api/masterEPaymentSigning.js

@@ -0,0 +1,25 @@
+import request, { postBlob } from '@/utils/request'
+
+export function workerElecConfirmList(data) {
+  return request({
+    url: `/worker/elec/confirm/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function workerElecConfirmListExport(data, name) {
+  return postBlob({
+    url: '/worker/elec/confirm/list/export',
+    data,
+    name
+  })
+}
+
+export function workerElecConfirmDetail(params) {
+  return request({
+    url: '/worker/elec/confirm/detail',
+    method: 'post',
+    params
+  })
+}

+ 180 - 0
src/views/userManagement/masterEPaymentSigning/index.vue

@@ -0,0 +1,180 @@
+<template>
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :exportList="exportList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :operation="operation()"
+  >
+    <div class="cartographer_big">
+      <el-dialog
+        title="师傅签署信息"
+        width="100%"
+        :modal="false"
+        :visible.sync="formDialog"
+        :before-close="handleClose"
+      >
+        <zj-page-container>
+          <zj-page-fill>
+            <div style="box-sizing: border-box; padding: 20px 20px 0 20px">
+              <zj-form-container ref="formRef" :form-data="formData" :form-attributes="{ size: 'mini' }">
+                <zj-form-module title="详细信息" label-width="100px" :form-data="formData" :form-items="formItems">
+                </zj-form-module>
+              </zj-form-container>
+            </div>
+          </zj-page-fill>
+          <div style="text-align: right; box-sizing: border-box; padding: 16px 20px">
+            <el-button size="mini" @click="handleClose">取消</el-button>
+          </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 {
+  workerElecConfirmList,
+  workerElecConfirmListExport,
+  workerElecConfirmDetail
+} from '@/api/masterEPaymentSigning.js'
+import ImageUpload from '@/components/file-upload'
+export default {
+  components: { TemplatePage, ImageUpload },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialog: false,
+      formData: {}
+    }
+  },
+  computed: {
+    // 事件组合
+    optionsEvensGroup() {
+      return []
+    },
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {
+      return [
+        {
+          md: 6,
+          name: 'el-radio',
+          options: [
+            { label: '已签', value: 'YES' },
+            { label: '未签', value: 'NO' }
+          ],
+          attributes: { disabled: true },
+          formItemAttributes: {
+            label: '状态',
+            prop: 'status',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: true, placeholder: '' },
+          formItemAttributes: { label: '所属公司', prop: 'belongCompany' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: true, placeholder: '' },
+          formItemAttributes: { label: '所属公司编号', prop: 'belongCompanyCode' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: true, placeholder: '' },
+          formItemAttributes: { label: '师傅名称', prop: 'nickName' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: true, placeholder: '' },
+          formItemAttributes: { label: '师傅电话', prop: 'mobile' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: true, placeholder: '' },
+          formItemAttributes: { label: '身份证', prop: 'idCard' }
+        },
+        {
+          md: 24,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '确认书',
+            prop: 'url',
+            rules: []
+          },
+          render: (h, { props, onInput }) => {
+            return <ImageUpload fileList={[this.formData.url]} isEdit={false} limit={1} />
+          }
+        }
+      ]
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList: workerElecConfirmList,
+    // 列表导出函数
+    exportList: workerElecConfirmListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    handleClose() {
+      this.$refs?.formRef?.resetFields()
+      this.$data.formData = this.$options.data().formData
+      this.formDialog = false
+    },
+    // 操作按钮
+    operation() {
+      return this.operationBtn({
+        details: {
+          click: ({ row, index, column }) => {
+            workerElecConfirmDetail({
+              belongCompanyCode: row.belongCompanyCode,
+              workerNumber: row.workerNumber
+            }).then(res => {
+              this.formData = res.data
+              this.$nextTick(() => {
+                this.formDialog = true
+              })
+            })
+          }
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>