Преглед изворни кода

Merge branch 'dev1.0' of http://192.168.0.200:3000/suf/factoring-trade-c-front-end into chang

changjiaming пре 6 месеци
родитељ
комит
b996b2a2fb

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "axios": "0.18.1",
     "core-js": "^3.33.2",
     "docx-preview": "^0.3.0",
-    "element-ui": "2.13.2",
+    "element-ui": "2.15.14",
     "exceljs": "^4.4.0",
     "handsontable": "^14.1.0",
     "jquery": "^3.7.1",

+ 8 - 0
src/api/myAccount/myAccount.js

@@ -35,3 +35,11 @@ export function resetPassword(data) {
     data
   })
 }
+
+// 修改用户名称
+export function editUserName(data) {
+  return request({
+    url: `/user/username/${data.username}`,
+    method: 'put'
+  })
+}

+ 1 - 1
src/components/Dialog/index.vue

@@ -1,11 +1,11 @@
 <template>
   <el-dialog
+    v-if="show"
     :title="oTitle"
     :width="calcWidth"
     :top="top"
     :close-on-click-modal="false"
     :visible.sync="show"
-    v-if="show"
     class="dialog"
     :modal="modal"
     :append-to-body="append"

+ 2 - 0
src/icons/index.js

@@ -4,8 +4,10 @@ import SvgIcon from '@/components/SvgIcon'// svg component
 // register globally
 Vue.component('svg-icon', SvgIcon)
 const myBusiness = require.context('./svg/myBusiness', false, /\.svg$/)
+const mySettlement = require.context('./svg/mySettlement', false, /\.svg$/)
 const req = require.context('./svg', false, /\.svg$/)
 
 const requireAll = requireContext => requireContext.keys().map(requireContext)
 requireAll(req)
 requireAll(myBusiness)
+requireAll(mySettlement)

Разлика између датотеке није приказан због своје велике величине
+ 3 - 0
src/icons/svg/mySettlement/divideAccountsManage.svg


Разлика између датотеке није приказан због своје велике величине
+ 3 - 0
src/icons/svg/mySettlement/invoicesManagement.svg


+ 1 - 1
src/styles/search.scss

@@ -5,7 +5,7 @@
     display: flex;
     justify-content: right;
     flex-wrap: wrap;
-    div {
+    & > div {
       margin-left: 10px;
       margin-bottom: 10px;
       .el-select, .el-input {

+ 44 - 12
src/views/myAccount/components/HeadSculpture.vue

@@ -11,17 +11,28 @@
           </div>
         </div>
         <div class="right">
-          <div class="right" style="font-size:2rem;">{{ deatailsInfo.loginName }}</div>
+          <div class="right" style="font-size:2rem;">
+            {{ deatailsInfo.loginName }} <i class="el-icon-edit edit-login-name" @click="handleEditName" />
+          </div>
           <div class="right">手机号:{{ deatailsInfo.mobile }}</div>
           <div class="right">注册时间:{{ deatailsInfo.gmtCreate.split(' ')[0] }}</div>
         </div>
       </el-col>
     </el-row>
+    <cy-dialog ref="editDialog" title="编辑用户名">
+      <div style="margin-bottom: 10px;">用户名:</div>
+      <el-input v-model="editedUserName" placeholeder="请输入用户名称" />
+      <div class="submit-btn" style="margin: 20px 0;">
+        <el-button style="width: 150px;" @click="() => { $refs.editDialog.show = false }">取消</el-button>
+        <el-button type="primary" style="width: 150px;" @click="handleCertain">确定</el-button>
+      </div>
+    </cy-dialog>
   </div>
 </template>
 
 <script>
-// import { getInfo } from '@/api/user'
+import { editUserName } from '@/api/myAccount/myAccount'
+
 export default {
   props: {
     deatilsInfo: {
@@ -38,7 +49,8 @@ export default {
         mobile: '',
         id: '',
         registerDate: ''
-      }
+      },
+      editedUserName: '' // 编辑后的用户名称
     }
   },
   watch: {
@@ -51,17 +63,33 @@ export default {
       immediate: true,
       deep: true
     }
-  }
+  },
   // created() {
   //   this.getInfo()
   // },
-  // methods: {
-  //   getInfo() {
-  //     getInfo().then(response => {
-  //       this.deatailsInfo = response.data
-  //     })
-  //   }
-  // }
+  methods: {
+    // 编辑用户名
+    handleEditName() {
+      this.$refs.editDialog.show = true
+    },
+    // 用户名称弹窗确认点击
+    handleCertain() {
+      if (!this.editedUserName) {
+        this.$message.warning('请输入编辑后的用户名称')
+        return
+      }
+      const reg = /^(?:[\u4E00-\u9FA5]|[a-zA-Z0-9]){1,20}$/
+      if (!reg.test(this.editedUserName)) {
+        this.$message.warning('请输入符合格式的用户名称:包含数字字母汉字,最多20位')
+        return
+      }
+      editUserName({ username: this.editedUserName }).then(() => {
+        this.$message.success('用户名称修改成功')
+        this.$refs.editDialog.show = false
+        this.$router.go(0)
+      })
+    }
+  }
 }
 </script>
 
@@ -70,6 +98,10 @@ export default {
   margin: 30px 0px 30px 20px;
 }
 .right {
-  margin-bottom: 10px
+  margin-bottom: 10px;
+  .edit-login-name {
+    cursor: pointer;
+    transform: scale(.8);
+  }
 }
 </style>

+ 1 - 1
src/views/myBusiness/businessMain.vue

@@ -75,7 +75,7 @@
         />
       </cy-collapse>
     </div>
-
+    <el-empty v-if="!companyList.length" description="暂无数据" />
   </div>
 </template>
 

+ 4 - 2
src/views/myFinancing/see.vue

@@ -4,8 +4,8 @@
       <cy-steps :steps-data="stepList" />
     </div>
     <div v-loading="loading" class="tempalte-content">
-      <el-collapse v-if="stepList.length" v-model="activeNames">
-        <el-collapse-item v-for="(item, index) in stepList" :key="index" :name="index">
+      <el-collapse v-if="stepList.length" v-model="activeNames" @change="handleChange">
+        <el-collapse-item v-for="(item, index) in stepList" :id="index" :key="index" :name="index">
           <template slot="title">
             <cy-view-bar
               :view-bar-data="{ ...item.businessProcessingLogVo, formBusinessName: item.formBusinessName, index: index + 1 }"
@@ -25,11 +25,13 @@
 
 <script>
 import { getHistoricalProcess } from '@/api/common.js'
+import collapseSeeMix from '@/mixins/collapseSeeMix'
 export default {
   components: {
     ApplyFinancing: () => import('./applyFinancing/index.vue'),
     ContractSign: () => import('./contractSign.vue')
   },
+  mixins: [collapseSeeMix],
   data() {
     return {
       stepList: [],

+ 179 - 0
src/views/mySettlement/divideAccountsManage/index.vue

@@ -0,0 +1,179 @@
+<template>
+  <div class="divide-accounts-manage">
+    <div class="search">
+      <div class="left" />
+      <div class="right">
+        <div>
+          <el-input v-model="search.businessNo" style="width: 250px" placeholder="请输入业务编号" clearable />
+        </div>
+        <div>
+          <el-select v-model="search.status" placeholder="请选择状态" clearable>
+            <el-option
+              v-for="item in constant.InvoiceStatus"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </div>
+        <div>
+          <el-input v-model="search.fastSearch" style="width: 300px" placeholder="请输入项目名称/主企业名称/核心企业名称" clearable />
+        </div>
+        <div class="leftBtn">
+          <el-button type="primary" @click="fetchData('search')">查询</el-button>
+        </div>
+      </div>
+    </div>
+    <cy-comm-table
+      ref="commTable"
+      v-loading="loading"
+      style="margin-top: 10px;"
+      :columns="columns"
+      :data="tableData"
+      :count="total"
+    />
+  </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import { getInvoicesManagementList } from '@/api/mySettlement/invoicesManagement'
+import { formatMoney } from '@/utils/index'
+export default {
+  name: 'DivideAccountsManage',
+  data() {
+    return {
+      loading: false,
+      tableData: [],
+      search: {
+        businessNo: '',
+        status: '',
+        fastSearch: ''
+      },
+      total: 0,
+      columns: [
+        {
+          label: '序号',
+          index: true
+        },
+        {
+          label: '分账单号',
+          prop: 'businessNumber',
+          showTooltip: true
+        },
+        {
+          label: '核心企业名称',
+          showTooltip: true,
+          prop: 'businessName'
+        },
+        {
+          label: '入账金额(元)',
+          prop: 'openAmount',
+          showTooltip: true,
+          render: (h, row) => {
+            return <div>{ formatMoney(row.openAmount) }</div>
+          }
+        },
+        {
+          label: '项目名称',
+          prop: 'taskName'
+        },
+        {
+          label: '保理合同编号',
+          prop: 'taskName'
+        },
+        {
+          label: '支用批次',
+          prop: 'taskName'
+        },
+        {
+          label: '状态',
+          prop: 'status.name',
+          showTooltip: true
+        },
+        {
+          label: '操作',
+          show: true,
+          render: (h, row) => {
+            const btnList = [
+              {
+                msg: '查看',
+                icon: 'iconfont icon-orange icon-a-Group957',
+                power: 'projectNumber:delete',
+                category: 'see'
+              }
+            ]
+            const options = btnList.map(item => {
+              return (
+                this.tablePower({ item, row }) &&
+                <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
+                  <span class='table-icon-box'>
+                    <i class={item.icon} onClick={() => { this.handlerOperate(item.category, row) }}></i>
+                  </span>
+                </el-tooltip>
+              )
+            })
+            return <div>{ options }</div>
+          },
+          width: 80
+        }
+      ]
+    }
+  },
+  computed: {
+    ...mapGetters(['constant']),
+    tablePower() {
+      return ({ item, row }) => {
+        const { rowPower } = item
+        if (rowPower) {
+          if (rowPower.includes(row.taskName)) {
+            return true
+          }
+        } else {
+          return true
+        }
+      }
+    }
+  },
+  mounted() {
+    // this.fetchData()
+  },
+  created() {
+    this.$store.dispatch('getConstant', ['InvoiceStatus'])
+  },
+  methods: {
+    fetchData(type) {
+      this.loading = true
+      const params = {
+        ...this.search,
+        page: this.page,
+        rows: this.size
+      }
+      getInvoicesManagementList(params).then(({ data }) => {
+        this.tableData = data.rows
+        this.total = data.records
+        this.loading = false
+      })
+    },
+    handlerOperate(type, row) {
+      this.$router.push({
+        name: 'MySettlementInvoicesManagementApplyInvoicing',
+        params: { id: 'children' },
+        query: {
+          module: '发票管理',
+          id: row.id,
+          taskId: row.taskId,
+          type,
+          status: row.status.code
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.divide-accounts-manage {
+
+}
+</style>

+ 32 - 39
src/views/mySettlement/invoicesManagement/index.vue

@@ -1,46 +1,39 @@
 <template>
   <div class="invoices-management">
-    <template>
-      <div class="tempalte-content">
-        <div class="search">
-          <div class="left" />
-          <div class="right">
-            <template>
-              <div>
-                <el-input v-model="search.businessNo" style="width: 250px" placeholder="请输入业务编号" clearable />
-              </div>
-              <div>
-                <el-select v-model="search.status" placeholder="请选择状态" clearable>
-                  <el-option
-                    v-for="item in constant.InvoiceStatus"
-                    :key="item.code"
-                    :label="item.name"
-                    :value="item.code"
-                  />
-                </el-select>
-              </div>
-              <div>
-                <el-input v-model="search.fastSearch" style="width: 300px" placeholder="请输入项目名称/主企业名称/核心企业名称" clearable />
-              </div>
-              <div class="leftBtn">
-                <el-button type="primary" @click="fetchData('search')">查询</el-button>
-              </div>
-              <div>
-                <el-button type="primary" icon="el-icon-plus" @click="modifyClick('create')">申请开票</el-button>
-              </div>
-            </template>
-          </div>
+    <div class="search">
+      <div class="left" />
+      <div class="right">
+        <div>
+          <el-input v-model="search.businessNo" style="width: 250px" placeholder="请输入业务编号" clearable />
+        </div>
+        <div>
+          <el-select v-model="search.status" placeholder="请选择状态" clearable>
+            <el-option
+              v-for="item in constant.InvoiceStatus"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </div>
+        <div>
+          <el-input v-model="search.fastSearch" style="width: 300px" placeholder="请输入项目名称/主企业名称/核心企业名称" clearable />
+        </div>
+        <div class="leftBtn">
+          <el-button type="primary" @click="fetchData('search')">查询</el-button>
+          <el-button type="primary" icon="el-icon-plus" @click="modifyClick('create')">申请开票</el-button>
         </div>
-        <cy-comm-table
-          ref="commTable"
-          v-loading="loading"
-          :columns="columns"
-          :table-options="tableOptions"
-          :data="tableData"
-          :count="total"
-        />
       </div>
-    </template>
+    </div>
+    <cy-comm-table
+      ref="commTable"
+      v-loading="loading"
+      style="margin-top: 10px;"
+      :columns="columns"
+      :table-options="tableOptions"
+      :data="tableData"
+      :count="total"
+    />
   </div>
 </template>
 

+ 0 - 13
src/views/mySettlement/invoicesManagement/indexTable.js

@@ -4,19 +4,6 @@ export default {
     return {
       total: 0,
       loading: false,
-      // tableData: [
-      //   { userName: '1111', statusName: '模板审核' },
-      //   { userName: '1111', statusName: '保证方式确认' },
-      //   { userName: '1111', statusName: '保证金收款确认' },
-      //   { userName: '1111', statusName: '中标确认' },
-      //   { userName: '1111', statusName: '保证金退款确认' },
-      //   { userName: '1111', statusName: '发起招标' }
-      // ],
-      tableOptions: {
-        sortTable: true,
-        maxHeight: 'calc(100vh - 260px)',
-        height: 'calc(100vh - 260px)'
-      },
       columns: [
         {
           label: '序号',

+ 55 - 15
src/views/mySettlement/tradeMain.vue

@@ -9,22 +9,24 @@
           <div style="display: flex; justify-content: center;">
             <div
               class="operation"
+              :class="{ 'is-action': type === 'InvoicesManagement' }"
               @click="handlerOptions('InvoicesManagement')"
             >
-              <div class="icon-a-Group965 iconfont icon-orange" />
+              <div class="icon-box">
+                <svg-icon icon-class="invoicesManagement" style="font-size: 38px;" />
+              </div>
               <div>发票管理</div>
             </div>
-            <!-- <div>
-              <svg-button icon="bAdd" @click="handlerOptions('InvoicesManagement')" />
-              <div>发票管理</div>
-            </div> -->
-            <!-- <div
+            <div
               class="operation"
-              @click="handlerOptions('SalesContractManagement')"
+              :class="{ 'is-action': type === 'divideAccountsManage' }"
+              @click="handlerOptions('divideAccountsManage')"
             >
-              <div class="icon-a-Group963 iconfont" />
+              <div class="icon-box">
+                <svg-icon icon-class="divideAccountsManage" />
+              </div>
               <div>分账管理</div>
-            </div> -->
+            </div>
           </div>
         </div>
       </div>
@@ -32,6 +34,7 @@
 
     <transition name="fade-transform" mode="out-in">
       <invoices-management v-if="type == 'InvoicesManagement'" />
+      <divide-accounts-manage v-if="type == 'divideAccountsManage'" />
     </transition>
 
   </div>
@@ -40,9 +43,8 @@
 <script>
 export default {
   components: {
-    InvoicesManagement: () => import('./invoicesManagement/index.vue')
-    // BiddingList: () => import('./biddingManagement/index'),
-    // SalesContractManagementList: () => import('./salesContractManagement/index')
+    InvoicesManagement: () => import('./invoicesManagement/index.vue'),
+    DivideAccountsManage: () => import('./divideAccountsManage')
   },
   data() {
     return {
@@ -77,19 +79,57 @@ export default {
   }
   .operation-box {
     width: 100%;
-    padding: 20px;
     background: #F5F6F6;
     margin-top: 20px;
     .operation-title {
       align-items: flex-end;
       margin-bottom: 10px;
       .operation {
-        margin-right: 3rem;
+        width: calc(25% - 40px);
+        text-align: center;
+        padding: 20px;
         cursor: pointer;
+        // &:hover {
+        //   background: #FE7D0B;
+        //   color: #fff;
+        //   .iconfont {
+        //     color: #fff
+        //   }
+        // }
+        &.is-action {
+          background: #FE7D0B;
+          color: #fff;
+          .iconfont {
+            color: #fff
+
+          }
+          .icon-box {
+            background: rgba(255, 255, 255, 0.2) !important;
+            .svg-icon {
+              color: #fff
+            }
+           }
+
+        }
         .iconfont {
           font-size: 40px;
           margin-bottom: 15px;
-          margin-left: 20px
+        }
+        .icon-box {
+          width: 50px;
+          height: 50px;
+          margin: 0 auto;
+          background: #f6dcc5;
+          border-radius: 10px;
+          position: relative;
+          margin-bottom: 10px;
+          color: #fe973c;
+          .svg-icon {
+            font-size: 50px;
+            position: absolute;
+            top: -8px;
+            right: -5px;
+          }
         }
       }
     }

+ 1 - 1
src/views/myTrade/acceptanceManagement/index.vue

@@ -168,7 +168,7 @@ export default {
       if (type === 'preview') {
         previewFinishedFiles(row.id).then((res) => {
           res.data.map(item => {
-            exportUrl(item.path)
+            window.open(`#/perview?fileId=${item.id}&name=${item.originalName}&absolutePath=${item.absolutePath}`)
           })
         })
       }

+ 4 - 4
yarn.lock

@@ -4578,10 +4578,10 @@ electron-to-chromium@^1.4.648:
   resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.650.tgz#b38ef9de16991b9f7b924246770576ab91ab3d64"
   integrity sha512-sYSQhJCJa4aGA1wYol5cMQgekDBlbVfTRavlGZVr3WZpDdOPcp6a6xUnFfrt8TqZhsBYYbDxJZCjGfHuGupCRQ==
 
-element-ui@2.13.2:
-  version "2.13.2"
-  resolved "https://registry.npmmirror.com/element-ui/-/element-ui-2.13.2.tgz#582bf47aaaaaafe23ea1958fae217a687ad06447"
-  integrity sha512-r761DRPssMPKDiJZWFlG+4e4vr0cRG/atKr3Eqr8Xi0tQMNbtmYU1QXvFnKiFPFFGkgJ6zS6ASkG+sellcoHlQ==
+element-ui@2.15.14:
+  version "2.15.14"
+  resolved "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.14.tgz#3c34df79467636592812d720d2e6784e7a6ec2ea"
+  integrity sha512-2v9fHL0ZGINotOlRIAJD5YuVB8V7WKxrE9Qy7dXhRipa035+kF7WuU/z+tEmLVPBcJ0zt8mOu1DKpWcVzBK8IA==
   dependencies:
     async-validator "~1.8.1"
     babel-helper-vue-jsx-merge-props "^2.0.0"