From 09da100729793848bc01b51f7b05ca3f1e7ec64f Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 20 六月 2024 14:05:35 +0800
Subject: [PATCH] 提交一把
---
company/src/components/business/OperaCompanyDescWindow.vue | 306 +++++++++++++++++++++++++++++++++++++-------------
1 files changed, 227 insertions(+), 79 deletions(-)
diff --git a/company/src/components/business/OperaCompanyDescWindow.vue b/company/src/components/business/OperaCompanyDescWindow.vue
index c7c3c9a..b10e676 100644
--- a/company/src/components/business/OperaCompanyDescWindow.vue
+++ b/company/src/components/business/OperaCompanyDescWindow.vue
@@ -1,7 +1,8 @@
<template>
<GlobalWindow
:title="title"
- width="80%"
+ width="100%"
+ :withFooter="false"
:visible.sync="visible"
:confirm-working="isWorking"
@confirm="confirm"
@@ -9,7 +10,10 @@
<div class="info">
<div class="info_label">
<span>浼佷笟璇︽儏</span>
- <el-button type="primary" @click="$refs.operaCompanyWindow.open('缂栬緫浼佷笟淇℃伅', row)">淇敼浼佷笟淇℃伅</el-button>
+ <div>
+ <el-button type="primary" @click="$refs.modification.open('淇敼淇濋櫓鏂规', form)">鏇存敼淇濋櫓鏂规</el-button>
+ <el-button type="primary" @click="$refs.operaCompanyWindow.open('缂栬緫浼佷笟淇℃伅', form)">淇敼浼佷笟淇℃伅</el-button>
+ </div>
</div>
<div class="info_list">
<div class="info_list_item">
@@ -24,6 +28,10 @@
<div class="info_list_item_label">鍏徃璐﹀彿锛�</div>
<div class="info_list_item_val">{{form.username || '-'}}</div>
</div>
+ <div class="info_list_item">
+ <div class="info_list_item_label">娉曚汉濮撳悕锛�</div>
+ <div class="info_list_item_val">{{form.legalName || '-'}}</div>
+ </div>
<div class="info_list_item">
<div class="info_list_item_label">缁戝畾鎵嬫満鍙凤細</div>
<div class="info_list_item_val">
@@ -56,7 +64,7 @@
<div class="info_list_item_val">{{form.invoiceEmail || '-'}}</div>
</div>
<div class="info_list_item" style="width: 100%;">
- <div class="info_list_item_label">鐢靛瓙鍙戠エ鎺ユ敹鍦板潃锛�</div>
+ <div class="info_list_item_label">绾歌川鍙戠エ鎺ユ敹鍦板潃锛�</div>
<div class="info_list_item_val">{{form.invoiceAddr || '-'}}</div>
</div>
</div>
@@ -78,6 +86,11 @@
label="淇濋櫓鏂规">
</el-table-column>
<el-table-column
+ prop="shopName"
+ align="center"
+ label="濮旀墭鍟嗘埛">
+ </el-table-column>
+ <el-table-column
align="center"
label="鍔犲噺淇濆姛鑳�">
<template slot-scope="{row}">
@@ -90,34 +103,59 @@
<div class="info_list_item">
<div class="info_list_item_label" style="width: 100px;">钀ヤ笟鎵х収锛�</div>
<div class="info_list_item_val">
- <div class="image" v-if="form.businessImg.fileurlFull">
- <img :src="form.businessImg.fileurlFull" alt="">
+ <div class="image" v-if="form.businessImg && form.businessImg.fileurlFull">
+ <el-image
+ v-if="form.businessImg!=null&&form.businessImg.fileurlFull!=null"
+ style="width: 90px; height: 90px"
+ :src="form.businessImg.fileurlFull"
+ :preview-src-list="[form.businessImg.fileurlFull]">
+ </el-image>
</div>
</div>
</div>
<div class="info_list_item">
<div class="info_list_item_label" style="width: 100px;">娉曚汉韬唤璇侊細</div>
<div class="info_list_item_val">
- <div class="image" v-if="form.idcardImgList[0].fileurlFull">
- <img :src="form.idcardImgList[0].fileurlFull" alt="">
+ <div class="image" v-if="form.idcardImgList && form.idcardImgList .length>0 && form.idcardImgList[0].fileurlFull">
+ <el-image
+ append-to-body
+ v-if="form.idcardImgList[0].fileurlFull"
+ style="width: 90px; height: 90px"
+ :src="form.idcardImgList[0].fileurlFull"
+ :preview-src-list="[form.idcardImgList[0].fileurlFull]">
+ </el-image>
</div>
- <div class="image" v-if="form.idcardImgList[1].fileurlFull">
- <img :src="form.idcardImgList[1].fileurlFull" alt="">
+ <div class="image" v-if="form.idcardImgList && form.idcardImgList .length>1 && form.idcardImgList[1].fileurlFull">
+ <el-image
+ append-to-body
+ v-if="form.idcardImgList[1].fileurlFull"
+ style="width: 90px; height: 90px"
+ :src="form.idcardImgList[1].fileurlFull"
+ :preview-src-list="[form.idcardImgList[1].fileurlFull]">
+ </el-image>
</div>
</div>
</div>
- <div class="info_list_item">
+<!-- <div class="info_list_item">
<div class="info_list_item_label" style="width: 100px;">浼佷笟绛剧珷锛�</div>
<div class="info_list_item_val">
- <div class="image" v-if="form.signImg.fileurlFull">
- <img :src="form.signImg.fileurlFull" alt="">
+ <div class="image" v-if="form.signImg && form.signImg.fileurlFull">
+ <el-image
+ v-if="form.signImg.fileurlFull!=null"
+ style="width: 90px; height: 90px"
+ :src="form.signImg.fileurlFull"
+ :preview-src-list="[form.signImg.fileurlFull]">
+ </el-image>
</div>
</div>
- </div>
+ </div>-->
</div>
</div>
<!-- 鏂板缓/淇敼 -->
<OperaCompanyWindow ref="operaCompanyWindow" @success="callback"/>
+ <!-- 淇敼淇濋櫓鏂规 -->
+ <modification ref="modification" @success="callback"/>
+ <!-- 淇敼鎵嬫満鍙� -->
<el-dialog
title="鏇存敼缁戝畾鎵嬫満鍙�"
:visible.sync="visiblePhone"
@@ -130,87 +168,197 @@
<div class="form_item">
<div class="form_item_label">缁戝畾鎵嬫満鍙凤細</div>
<div class="form_item_val">
- <input type="text" placeholder="璇疯緭鍏�" />
+ <el-input v-model="phone" placeholder="璇疯緭鍏�"></el-input>
</div>
</div>
<div class="form_item">
<div class="form_item_label">楠岃瘉鐮侊細</div>
<div class="form_item_val">
- <input type="text" placeholder="璇疯緭鍏�" />
- <el-button type="primary" style="margin-left: 20px;">鍙戦�侀獙璇佺爜</el-button>
+ <el-input v-model="code" placeholder="璇疯緭鍏�"></el-input>
+ <el-button type="primary" style="margin-left: 20px;" @click="send" v-if="num === 0">鍙戦�侀獙璇佺爜</el-button>
+ <el-button type="primary" style="flex-shrink: 0; margin-left: 15px;" v-else>{{num}}s</el-button>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
- <el-button @click="visiblePhone = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="visiblePhone = false">鎻� 浜�</el-button>
+ <el-button @click="close">鍙� 娑�</el-button>
+ <el-button type="primary" @click="updatePhoneEvent">鎻� 浜�</el-button>
</span>
</el-dialog>
</GlobalWindow>
</template>
<script>
- import BaseOpera from '@/components/base/BaseOpera'
- import GlobalWindow from '@/components/common/GlobalWindow'
- import OperaCompanyWindow from '@/components/business/OperaCompanyWindow'
- import { getById } from '@/api/business/company'
- import { listForCompany } from '@/api/business/solutions'
- export default {
- name: 'OperaCompanyDescWindow',
- extends: BaseOpera,
- components: { GlobalWindow, OperaCompanyWindow },
- data () {
- return {
- ruleForm: {
- phone: '',
- code: ''
- },
- // 琛ㄥ崟鏁版嵁
- form: {},
- visiblePhone: false,
- options: [],
- tableData: []
- }
- },
- created () {
- this.config({
- api: '/business/company',
- 'field.id': 'id'
- })
- },
- methods: {
- open (title, target) {
- const that = this;
- this.title = title
- getById(target.id)
- .then(res => {
- this.form = res
- listForCompany({ companyId: target.id })
- .then(resa => {
- that.form.solutionList = resa.map(item => {
- return {
- solutionBaseId: item.solutionBaseId,
- canAdd: item.canAdd,
- canReduce: item.canReduce
- }
- })
- that.form.solutionListName = resa.map(item => {
- return {
- solutionName: item.solutionName,
- canAdd: item.canAdd,
- canReduce: item.canReduce
- }
- })
- that.visible = true
- })
- })
- },
- callback() {
- this.$emit('success')
- this.visible = false
- }
- }
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import OperaCompanyWindow from '@/components/business/OperaCompanyWindow'
+import modification from '@/components/business/modification'
+import { getById, updatePhone } from '@/api/business/company'
+import { listForCompany } from '@/api/business/solutions'
+import { sendSms } from '@/api/business/smsEmail'
+export default {
+ name: 'OperaCompanyDescWindow',
+ extends: BaseOpera,
+ components: { GlobalWindow, OperaCompanyWindow, modification },
+ data () {
+ return {
+ ruleForm: {
+ phone: '',
+ code: ''
+ },
+ dataId: null,
+ num: 0,
+ timer: null,
+ // 琛ㄥ崟鏁版嵁
+ form: {},
+ phone: '',
+ code: '',
+ visiblePhone: false,
+ options: [],
+ tableData: []
}
+ },
+ created () {
+ this.config({
+ api: '/business/company',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+ close () {
+ this.visiblePhone = false
+ this.phone = ''
+ this.code = ''
+ clearInterval(this.timer)
+ this.num = 0
+ },
+ updatePhoneEvent () {
+ if (!this.phone) {
+ this.$message.warning('璇疯緭鍏ユ墜鏈哄彿')
+ return
+ }
+ if (!this.code) {
+ this.$message.warning('璇疯緭鍏ラ獙璇佺爜')
+ return
+ }
+ updatePhone({
+ id: this.form.id,
+ captche: this.code,
+ phone: this.phone
+ }).then(res => {
+ this.form.phone = JSON.parse(JSON.stringify(this.phone))
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.visiblePhone = false
+ this.phone = ''
+ this.code = ''
+ clearInterval(this.timer)
+ this.num = 0
+ }) .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ },
+ send () {
+ if (!this.phone) {
+ this.$message.warning('璇疯緭鍏ユ墜鏈哄彿')
+ return
+ }
+ sendSms({ phone: this.phone })
+ .then(res => {
+ this.num = 60
+ this.setTime()
+ }) .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ },
+ setTime () {
+ this.timer = setInterval(() => {
+ this.num -= 1
+ if (this.num === 0) {
+ clearInterval(this.timer)
+ this.num = 0
+ }
+ }, 1000)
+ },
+ open (title, target) {
+ const that = this
+ this.title = title
+ this.dataId = target.id
+ this.phone = ''
+ this.code = ''
+ clearInterval(this.timer)
+ this.num = 0
+ this.getDetail()
+ },
+ getDetail () {
+ var that = this
+ getById(this.dataId)
+ .then(res => {
+ this.form = res
+ this.form.type = 1
+
+ this.form.file = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ this.form.file1 = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ this.form.file2 = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ this.form.file3 = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ if(res.businessImg){
+ this.form.file.imgurl = res.businessImg.fileurl
+ this.form.file.imgurlfull = res.businessImg.fileurlFull
+ }
+ if (res.idcardImgList&& res.idcardImgList.length>0) {
+ this.form.file1.imgurl = res.idcardImgList[0].fileurl
+ this.form.file1.imgurlfull = res.idcardImgList[0].fileurlFull
+ }
+ if (res.idcardImgList && res.idcardImgList.length>1) {
+ this.form.file2.imgurl = res.idcardImgList[1].fileurl
+ this.form.file2.imgurlfull = res.idcardImgList[1].fileurlFull
+ }
+ if (res.signImg) {
+ this.form.file3.imgurl = res.signImg.fileurl
+ this.form.file3.imgurlfull = res.signImg.fileurlFull
+ }
+
+ listForCompany({ companyId: this.dataId })
+ .then(resa => {
+ that.form.solutionList = resa.map(item => {
+ return {
+ solutionBaseId: item.solutionBaseId,
+ shopId: item.shopId,
+ canAdd: item.canAdd,
+ canReduce: item.canReduce
+ }
+ })
+ that.form.solutionListName = resa.map(item => {
+ return {
+ solutionName: item.solutionName,
+ shopName: item.shopName,
+ canAdd: item.canAdd,
+ canReduce: item.canReduce
+ }
+ })
+ console.log(that.form)
+ that.visible = true
+ })
+ })
+ },
+ callback () {
+ this.getDetail()
+ this.$emit('success')
+ // this.visible = false
+ }
+ }
+}
</script>
<style lang="scss" scoped>
@@ -275,7 +423,7 @@
align-items: start;
margin-bottom: 20px;
.info_list_item_label {
- width: 150px;
+ /*width: 150px;*/
flex-shrink: 0;
}
.info_list_item_val {
--
Gitblit v1.9.3