| | |
| | | width="60%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | @confirm="confirmShop" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules" style="width: 50%;"> |
| | | <el-form-item label="商户名称" prop="name"> |
| | |
| | | <el-form-item label="认证邮箱" prop="email" > |
| | | <el-input v-model="form.email" placeholder="请输入" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="纳税人识别号" prop="taxCode"> |
| | | <!-- <el-form-item label="纳税人识别号" prop="taxCode"> |
| | | <el-input v-model="form.taxCode" placeholder="请输入" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="银行账号" prop="taxAccount"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="纸质发票接收地址" prop="invoiceAddr"> |
| | | <el-input v-model="form.invoiceAddr" placeholder="请输入" v-trim/> |
| | | </el-form-item> |
| | | </el-form-item>--> |
| | | <el-form-item label="营业执照" prop="businessImg"> |
| | | <div style="width: 100%; height: 100px; display: flex; align-items: center;"> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file" @uploadSuccess="result" /> |
| | |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { all } from '@/api/business/solutions' |
| | | import { sendSms } from '@/api/business/smsEmail' |
| | | import {updateById} from "@/api/business/company"; |
| | | export default { |
| | | name: 'OperaCompanyWindow', |
| | | extends: BaseOpera, |
| | |
| | | data () { |
| | | return { |
| | | // 表单数据 |
| | | initParam:{ |
| | | initParam: { |
| | | id: null, |
| | | name: '', |
| | | code: '', |
| | |
| | | fileurl: '', |
| | | name: '' |
| | | }, |
| | | idcardImgList: [], |
| | | idcardImgList: [{},{}], |
| | | signImg: { |
| | | fileurl: '', |
| | | name: '' |
| | |
| | | file3: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | } |
| | | }, |
| | | form: {}, |
| | | timer: null, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | changeSolution(row,index){ |
| | | this.form.solutionList[index].solution=row |
| | | // console.log(this.form.solutionList) |
| | | confirmShop () { |
| | | this.$refs.form.validate((valid) => { |
| | | // debugger |
| | | if (!valid) { |
| | | return |
| | | } |
| | | // 调用新建接口 |
| | | this.isWorking = true |
| | | if (this.form.id == null || this.form.id === '') { |
| | | this.api.createShop(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('新建成功') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } else { |
| | | this.api.updateById(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('新建成功') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | send () { |
| | | if (!this.form.phone) { |
| | |
| | | } |
| | | }, 1000) |
| | | }, |
| | | open (title, target,type) { |
| | | open (title, target, type) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.form = this.initParam |
| | | this.clearFrom() |
| | | console.log(this.form) |
| | | |
| | | this.getAll() |
| | | // 新建 |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | // this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | return |
| | |
| | | this.form[key] = target[key] |
| | | } |
| | | }) |
| | | }, |
| | | clearFrom(){ |
| | | this.form ={ |
| | | id: null, |
| | | name: '', |
| | | code: '', |
| | | legalName: '', |
| | | taxCode: '', |
| | | taxAccount: '', |
| | | username: '', |
| | | taxBank: '', |
| | | taxAddr: '', |
| | | invoiceEmail: '', |
| | | invoiceAddr: '', |
| | | phone: '', |
| | | email: '', |
| | | type: 1, |
| | | actionType: 0, |
| | | captche: '', |
| | | businessImg: { |
| | | fileurl: '', |
| | | name: '' |
| | | }, |
| | | idcardImgList: [{},{}], |
| | | signImg: { |
| | | fileurl: '', |
| | | name: '' |
| | | }, |
| | | solutionList: [ |
| | | { |
| | | solution: null, |
| | | canAdd: 0, |
| | | canReduce: 0 |
| | | } |
| | | ], |
| | | file: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | file1: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | file2: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | file3: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | } |
| | | }, |
| | | // 获取全部方案 |
| | | getAll () { |
| | |
| | | }, |
| | | add () { |
| | | this.form.solutionList.push({ |
| | | solutionId:null, |
| | | solutionId: null, |
| | | solution: {}, |
| | | canAdd: '', |
| | | canReduce: '' |