| | |
| | | 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"> |
| | |
| | | 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, |
| | |
| | | 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) { |