chenrui 3 ماه پیش
والد
کامیت
7e60841d29

+ 185 - 0
src/views/dealerManagement/dealerAccount/chooseDepartUserModal.vue

@@ -0,0 +1,185 @@
+<template>
+  <a-modal
+    centered
+    class="departUser-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="选择审批人员"
+    v-model="isShow"
+    @cancel="cancel"
+    :width="700">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div>
+        <div class="departUser-con">
+          <a-form-model
+            id="departUser-form"
+            ref="ruleForm"
+            :model="form"
+            :rules="rules"
+            :label-col="formItemLayout.labelCol"
+            :wrapper-col="formItemLayout.wrapperCol">
+            <a-form-model-item label="申请人员" prop="applyPersonSn">
+              <employee style="width: 100%;" @change="employeeChange" id="departUser-Employee" v-model="form.applyPersonSn"></employee>
+            </a-form-model-item>
+            <a-form-model-item label="审批人员" prop="approvers">
+              <dingDepartUser
+                ref="departUserApp"
+                @loaded="uploading=false"
+                id="departUser-approvers"
+                :disabled="uploading"
+                v-model="form.approvers"
+                @change="changeApprovers"
+                allowClear
+                placeholder="请选择审批人员"
+              ></dingDepartUser>
+            </a-form-model-item>
+            <a-form-model-item label="抄送人" prop="ccList">
+              <dingDepartUser
+                ref="departUserCc"
+                @loaded="uploading=false"
+                :disabled="uploading"
+                id="departUser-ccList"
+                v-model="form.ccList"
+                allowClear
+                placeholder="请选择抄送人"
+              ></dingDepartUser>
+            </a-form-model-item>
+          </a-form-model>
+        </div>
+        <div class="btn-cont">
+          <a-button type="primary" id="departUser-save" @click="handleSave">确定</a-button>
+          <a-button :loading="uploading" style="margin-left: 15px;" @click="updateUser">刷新人员</a-button>
+          <a-button id="departUser-back" @click="cancel" style="margin-left: 15px;">取消</a-button>
+        </div>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { VSelect, Upload } from '@/components'
+import dingDepartUser from '@/views/common/dingDepartUser.js'
+import employee from '@/views/expenseManagement/expenseReimbursement/employee.js'
+import { sign } from 'core-js/fn/number'
+export default {
+  name: 'ChooseDepartUserModal',
+  components: { dingDepartUser, employee, VSelect, Upload },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      uploading: false,
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        applyPersonSn: undefined,
+        approvers: [], // 审批人
+        ccList: [] // 抄送人
+      },
+      rules: {
+        applyPersonSn: [
+          { required: true, message: '请选择申请人员', trigger: 'change' }
+        ],
+        approvers: [
+          { required: true, type: 'array', message: '请选择审批人员', trigger: 'change' }
+        ]
+      }
+    }
+  },
+  methods: {
+    // 申请人员
+    employeeChange (v, r) {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.validateField(['applyPersonSn'])
+      })
+    },
+    updateUser () {
+      this.uploading = true
+      this.$refs.departUserApp.updateDeptUser()
+      this.$refs.departUserCc.updateDeptUser()
+    },
+    changeApprovers (value) {
+      this.form.approvers = value
+      this.$refs.ruleForm.clearValidate()
+    },
+    getTreeVal (data) {
+      const ret = []
+      data.map(item => {
+        ret.push(item.value)
+      })
+      return ret.join(',')
+    },
+    // 确定
+    handleSave (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = JSON.parse(JSON.stringify(_this.form))
+          if (form.approvers) {
+            form.approvers = this.getTreeVal(form.approvers)
+          }
+          if (form.ccList) {
+            form.ccList = this.getTreeVal(form.ccList)
+          }
+          this.$emit('submit', form)
+          this.$emit('close')
+        } else {
+          return false
+        }
+      })
+    },
+    getDetail (data) {
+      this.form = Object.assign(this.form, {
+        applyPersonSn: data.applyPersonSn
+      })
+    },
+    resetForm () {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.resetFields()
+      })
+      this.form = {
+        applyPersonSn: undefined,
+        ccList: undefined,
+        approvers: undefined
+      }
+    },
+    cancel () {
+      this.isShow = false
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .departUser-modal{
+    .ant-modal-body {
+      padding: 30px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 102 - 0
src/views/dealerManagement/dealerAccount/verifyModal.vue

@@ -0,0 +1,102 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    title="费用报销单审核进度"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="50%">
+    <p>说明:以下信息来自钉钉</p>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: 500 }"
+        :showPagination="false"
+        :defaultLoadData="false"
+        bordered>
+      </s-table>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+import { getProcessInstance } from '@/api/expenseManagement'
+export default {
+  name: 'VerifyModal',
+  components: { STable },
+  props: {
+    openModal: {
+      type: Boolean,
+      default: false
+    },
+    itemSn: { // 费用单sn
+      type: [Number, String],
+      default: ''
+    },
+    itemId: {// 费用单id
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal,
+      columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
+        { title: '人员姓名', width: '12%', dataIndex: 'approvalName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        delete parameter.tableId
+        delete parameter.index
+        return getProcessInstance({ businessType: 'EXPENSES', businessSn: this.itemSn }).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  watch: {
+    openModal (nVal, oVal) {
+      this.isShow = nVal
+    },
+    isShow (nVal, oVal) {
+      if (!nVal) {
+        this.$emit('close')
+        this.$refs.table.clearTable()
+      } else {
+        this.$nextTick(() => {
+          this.$refs.table.refresh()
+        })
+      }
+    },
+    itemSn (nVal, oVal) {
+
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 1 - 1
src/views/setting/tireSubsidySetting/addSubsidyList.vue

@@ -66,7 +66,7 @@
           :style="{ height: tableHeight+70+'px' }"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y: tableHeight-120}"
+          :scroll="{ y: tableHeight}"
           :defaultLoadData="false"
           bordered>
           <!-- 客户名称 -->

+ 11 - 11
src/views/setting/tireSubsidySetting/costCollectionList.vue

@@ -66,7 +66,7 @@
           :style="{ height: tableHeight+70+'px' }"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y: tableHeight-120}"
+          :scroll="{ y: tableHeight}"
           :defaultLoadData="false"
           bordered>
           <!-- 客户名称 -->
@@ -170,8 +170,8 @@ export default {
         provinceSn: undefined, // 省
         citySn: undefined, // 市
         districtSn: undefined, // 区
-        ruleType: undefined,//页面类型
-        subsidyQueryStatus: 'NOT_FINISH'//状态默认值
+        ruleType: undefined, // 页面类型
+        subsidyQueryStatus: 'NOT_FINISH'// 状态默认值
       },
       totalData: null, // 合计
       rules: {
@@ -212,18 +212,18 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '14%', align: 'center', scopedSlots: { customRender: 'customName' }, ellipsis: true },
-        { title: '开始时间', dataIndex: 'ruleStartDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '结束时间', dataIndex: 'ruleEndDate', width: '14%', align: 'center', scopedSlots: { customRender: 'endDate' } },
-        { title: '状态', dataIndex: 'statusDictValue', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '20%', align: 'left', scopedSlots: { customRender: 'customName' }, ellipsis: true },
+        { title: '开始时间', dataIndex: 'ruleStartDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '结束时间', dataIndex: 'ruleEndDate', width: '12%', align: 'center', scopedSlots: { customRender: 'endDate' } },
+        { title: '状态', dataIndex: 'statusDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       if (this.pageType === 'SERVICE_FEE') {
-        arr.splice(7, 0, { title: '服务费比例(%)', dataIndex: 'ruleValue1', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(7, 0, { title: '服务费比例(%)', dataIndex: 'ruleValue1', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       } else {
-        arr.splice(7, 0, { title: '运费补贴(元)', dataIndex: 'ruleValue1', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(7, 0, { title: '运费补贴(元)', dataIndex: 'ruleValue1', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }