From 4cca308699dc565aaf164b9bbf3d3e535fef5bf4 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期四, 28 三月 2024 15:57:36 +0800
Subject: [PATCH] 提交一把
---
company/src/views/business/company.vue | 160 ++++++++++++++++++++++++++--------------------------
1 files changed, 80 insertions(+), 80 deletions(-)
diff --git a/company/src/views/business/company.vue b/company/src/views/business/company.vue
index 9e85ac0..79e42f3 100644
--- a/company/src/views/business/company.vue
+++ b/company/src/views/business/company.vue
@@ -77,85 +77,85 @@
</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: '',
- 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 => {
- 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 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: '',
+ 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