From 78a173f85f8a4666d83cf8d900f04dd9f8e3e127 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 17 六月 2025 08:53:12 +0800
Subject: [PATCH] 提交一把订单
---
company/src/views/business/company.vue | 225 +++++++++++++++++++++++++++++---------------------------
1 files changed, 117 insertions(+), 108 deletions(-)
diff --git a/company/src/views/business/company.vue b/company/src/views/business/company.vue
index 8b37f4d..ea58a9e 100644
--- a/company/src/views/business/company.vue
+++ b/company/src/views/business/company.vue
@@ -5,9 +5,6 @@
<el-form-item label="浼佷笟鍚嶇О" prop="name">
<el-input v-model="searchForm.name" placeholder="璇疯緭鍏ヤ紒涓氬悕绉�" @keypress.enter.native="search"></el-input>
</el-form-item>
- <el-form-item label="鎵�灞炲晢鎴�" prop="name">
- <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ユ墍灞炲晢鎴�" @keypress.enter.native="search"></el-input>
- </el-form-item>
<el-form-item label="鎵�灞炵悊璧斿憳" prop="username">
<el-input v-model="searchForm.username" placeholder="璇疯緭鍏ユ墍灞炵悊璧斿憳" @keypress.enter.native="search"></el-input>
</el-form-item>
@@ -26,40 +23,47 @@
:data="tableData.list"
stripe
>
- <el-table-column prop="name" label="浼佷笟鍚嶇О" min-width="100px"></el-table-column>
- <el-table-column prop="code" label="缁熶竴淇$敤浠g爜" min-width="100px"></el-table-column>
- <el-table-column prop="createDate" label="娣诲姞鏃堕棿" min-width="100px"></el-table-column>
- <el-table-column prop="phone" label="缁戝畾鎵嬫満鍙�" min-width="100px"></el-table-column>
- <el-table-column label="鍚敤鐘舵��" min-width="100px">
- <template slot-scope="{row}">
- <el-switch
- @change="changeStatus($event, row)"
- v-model="row.status"
- active-color="#13ce66"
- inactive-color="#ff4949"
- :active-value="0"
- :inactive-value="1">
- </el-switch>
- </template>
- </el-table-column>
- <el-table-column label="鐢靛瓙绛捐璇佺姸鎬�" min-width="100px">
- <template slot-scope="{row}">
- <span v-if="row.signStatus === 0">寰呰璇�</span>
- <span v-if="row.signStatus === 1">璁よ瘉涓�</span>
- <span v-if="row.signStatus === 2">璁よ瘉澶辫触</span>
- <span v-if="row.signStatus === 3">璁よ瘉閫氳繃</span>
- </template>
- </el-table-column>
- <el-table-column
+ <el-table-column prop="username" label="鐧诲綍璐﹀彿" min-width="150px" fixed align="center"></el-table-column>
+ <el-table-column prop="name" label="浼佷笟鍚嶇О" min-width="150px" fixed align="center"></el-table-column>
+ <el-table-column prop="code" label="缁熶竴淇$敤浠g爜" min-width="150px" fixed align="center"></el-table-column>
+ <el-table-column prop="phone" label="缁戝畾鎵嬫満鍙�" min-width="100px" fixed align="center"></el-table-column>
+ <el-table-column label="鍚敤鐘舵��" min-width="60px">
+ <template slot-scope="{row}">
+ <el-switch
+ @change="changeStatus($event, row)"
+ v-model="row.status"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ :active-value="0"
+ :inactive-value="1">
+ </el-switch>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐢靛瓙绛剧姸鎬�" min-width="80px"
+ align="center">
+ <template slot-scope="{row}">
+ <span v-if="row.signStatus === 0">寰呰璇�</span>
+ <span v-if="row.signStatus === 1">璁よ瘉涓�</span>
+ <span v-if="row.signStatus === 2">璁よ瘉澶辫触</span>
+ <span v-if="row.signStatus === 3">璁よ瘉閫氳繃</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="createDate" label="娣诲姞鏃堕棿" min-width="120px" align="center"></el-table-column>
+ <el-table-column
v-if="containPermissions(['business:company:update', 'business:company:delete'])"
label="鎿嶄綔"
min-width="120"
+ align="center"
fixed="right"
>
<template slot-scope="{row}">
<el-button type="text" @click="$refs.OperaCompanyDescWindow.open('浼佷笟璇︽儏', row)" v-permissions="['business:company:update']">鏌ョ湅璇︽儏</el-button>
<el-button type="text" @click="edit(row)" v-permissions="['business:company:update']">淇敼</el-button>
- <el-button type="text" @click="$refs.operaCompanyWindow.open('缂栬緫浼佷笟淇℃伅琛�', row)" v-permissions="['business:company:update']">鐢靛瓙绛捐璇�</el-button>
+ <!-- <el-button type="text" @click="$refs.OperaCompanyRoleWindow.open('浼佷笟瑙掕壊绠$悊-'+row.name, row)" v-permissions="['business:company:update']">瑙掕壊绠$悊</el-button>
+ <el-button type="text" @click="$refs.OperaCompanyUserWindow.open('浼佷笟璐﹀彿绠$悊-'+row.name, row)" v-permissions="['business:company:update']">璐﹀彿绠$悊</el-button>
+
+ <el-button type="text" @click="$refs.operaCompanyWindow.open('缂栬緫浼佷笟淇℃伅琛�', row)" v-permissions="['business:company:update']">鐢靛瓙绛捐璇�</el-button>
+ -->
</template>
</el-table-column>
</el-table>
@@ -74,88 +78,93 @@
<OperaCompanyWindow ref="operaCompanyWindow" @success="handlePageChange" />
<!-- 璇︽儏 -->
<OperaCompanyDescWindow ref="OperaCompanyDescWindow" @success="handlePageChange" />
+ <OperaCompanyUserWindow ref="OperaCompanyUserWindow" />
+ <OperaCompanyRoleWindow ref="OperaCompanyRoleWindow" />
</TableLayout>
</template>
<script>
- import BaseTable from '@/components/base/BaseTable'
- import TableLayout from '@/layouts/TableLayout'
- import Pagination from '@/components/common/Pagination'
- import OperaCompanyWindow from '@/components/business/OperaCompanyWindow'
- import OperaCompanyDescWindow from '@/components/business/OperaCompanyDescWindow'
- import { updateStatus, getById } from '@/api/business/company'
- export default {
- name: 'Company',
- extends: BaseTable,
- components: { TableLayout, Pagination, OperaCompanyWindow, OperaCompanyDescWindow },
- data () {
- return {
- // 鎼滅储
- searchForm: {
- name: '',
- username: ''
- }
- }
- },
- created () {
- this.config({
- module: '浼佷笟淇℃伅琛�',
- api: '/business/company',
- 'field.id': 'id',
- 'field.main': 'id'
- })
- this.search()
- },
- methods: {
- edit(row) {
- getById(row.id)
- .then(res => {
- let form = res;
- form.type = 1
- form.file = {
- imgurl: '',
- imgurlfull: ''
- }
- form.file1 = {
- imgurl: '',
- imgurlfull: ''
- }
- form.file2 = {
- imgurl: '',
- imgurlfull: ''
- }
- form.file3 = {
- imgurl: '',
- imgurlfull: ''
- }
- form.file.imgurl = res.businessImg.fileurl
- form.file.imgurlfull = res.businessImg.fileurlFull
- if( res.idcardImgList ==null){
- res.idcardImgList = new Array();
- }
- if( res.idcardImgList && res.idcardImgList.length>0){
- form.file1.imgurl = res.idcardImgList[0].fileurl
- form.file1.imgurlfull = res.idcardImgList[0].fileurlFull
- }
- if( res.idcardImgList && res.idcardImgList.length>1){
- form.file2.imgurl = res.idcardImgList[1].fileurl
- form.file2.imgurlfull = res.idcardImgList[1].fileurlFull
- }
- form.file3.imgurl = res.signImg.fileurl
- form.file3.imgurlfull = res.signImg.fileurlFull
- this.$refs.operaCompanyWindow.open('缂栬緫浼佷笟', form)
- })
- },
- // 淇敼鐘舵��
- changeStatus(status, row) {
- updateStatus({ id: row.id, status })
- .then(res => {
- this.search()
- })
- .catch(err => {
- row.status = row.status === 0 ? 1 : 0
- })
- }
- }
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaCompanyWindow from '@/components/business/OperaCompanyWindow'
+import OperaCompanyRoleWindow from '@/components/business/OperaCompanyRoleWindow'
+import OperaCompanyUserWindow from '@/components/business/OperaCompanyUserWindow'
+import OperaCompanyDescWindow from '@/components/business/OperaCompanyDescWindow'
+import { updateStatus, getById } from '@/api/business/company'
+export default {
+ name: 'Company',
+ extends: BaseTable,
+ components: { TableLayout, Pagination, OperaCompanyWindow,OperaCompanyRoleWindow, OperaCompanyUserWindow,OperaCompanyDescWindow },
+ data () {
+ return {
+ // 鎼滅储
+ searchForm: {
+ name: '',
+ username: '',
+ type: 0
+ }
}
+ },
+ created () {
+ this.config({
+ module: '浼佷笟淇℃伅琛�',
+ api: '/business/company',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ this.search()
+ },
+ methods: {
+ edit (row) {
+ getById(row.id)
+ .then(res => {
+ const form = res
+ form.type = 1
+ form.file = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ form.file1 = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ form.file2 = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ form.file3 = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ form.file.imgurl = res.businessImg ? res.businessImg.fileurl : null
+ form.file.imgurlfull = res.businessImg ? res.businessImg.fileurlFull : null
+ if (res.idcardImgList == null) {
+ res.idcardImgList = new Array()
+ }
+ if (res.idcardImgList && res.idcardImgList.length > 0) {
+ form.file1.imgurl = res.idcardImgList[0].fileurl
+ form.file1.imgurlfull = res.idcardImgList[0].fileurlFull
+ }
+ if (res.idcardImgList && res.idcardImgList.length > 1) {
+ form.file2.imgurl = res.idcardImgList[1].fileurl
+ form.file2.imgurlfull = res.idcardImgList[1].fileurlFull
+ }
+ form.file3.imgurl = res.signImg ? res.signImg.fileurl : null
+ form.file3.imgurlfull = res.signImg ? res.signImg.fileurlFull : null
+ this.$refs.operaCompanyWindow.open('缂栬緫浼佷笟', form)
+ })
+ },
+ // 淇敼鐘舵��
+ changeStatus (status, row) {
+ updateStatus({ id: row.id, status })
+ .then(res => {
+ this.search()
+ })
+ .catch(err => {
+ row.status = row.status === 0 ? 1 : 0
+ })
+ }
+ }
+}
</script>
--
Gitblit v1.9.3