|
@@ -24,10 +24,10 @@
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="开票金额合计" prop="allMoney">
|
|
|
- <el-input v-model="ruleForm.allMoney" placeholder="请输入开票金额合计"></el-input>
|
|
|
+ <el-input type="number" v-model="ruleForm.allMoney" placeholder="请输入开票金额合计"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="该笔订单开票金额" prop="money">
|
|
|
- <el-input v-model="ruleForm.money" placeholder="请输入该笔订单开票金额"></el-input>
|
|
|
+ <el-input type="number" v-model="ruleForm.money" placeholder="请输入该笔订单开票金额"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="开票主体" prop="signing_subject">
|
|
|
<el-select v-model="ruleForm.signing_subject" placeholder="请选择开票主体">
|
|
@@ -40,11 +40,9 @@
|
|
|
<el-radio v-for="item in typelist" :key="item.value" :label="item.value">{{ item.text }}</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="发票内容" prop="content">
|
|
|
- <el-select v-model="ruleForm.content" placeholder="请选择发票内容">
|
|
|
- <el-option label="技术服务费" value="1"></el-option>
|
|
|
- <el-option label="会员费" value="2"></el-option>
|
|
|
- <el-option label="招投标数据服务" value="3"></el-option>
|
|
|
+ <el-form-item label="发票内容" prop="invoice_content">
|
|
|
+ <el-select v-model="ruleForm.invoice_content" placeholder="请选择发票内容">
|
|
|
+ <el-option v-for="item in contentList" :key="item.value" :value="item.value">{{ item.label }}</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="发票抬头" prop="invoiceHeader">
|
|
@@ -70,8 +68,8 @@
|
|
|
@blur="entOnChange('blur')"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="单位税号" prop="dutyparagraph">
|
|
|
- <el-input v-model="ruleForm.dutyparagraph" placeholder="请输入纳税人识别号"></el-input>
|
|
|
+ <el-form-item label="单位税号" prop="taxpayer_identnum">
|
|
|
+ <el-input v-model="ruleForm.taxpayer_identnum" placeholder="请输入纳税人识别号"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="单位地址" prop="unitAddress">
|
|
|
<el-input v-model="ruleForm.unitAddress" placeholder="请输入单位地址"></el-input>
|
|
@@ -107,7 +105,6 @@
|
|
|
v-model="ruleForm.desc"
|
|
|
type="textarea"
|
|
|
placeholder="此部分内容会展示在发票“备注”上,请按照贵司财务要求进行填写"
|
|
|
- @focus="infoCheckMap.desc = ''"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -129,11 +126,72 @@
|
|
|
<script>
|
|
|
import bUpload from '@/components/uploadFile.vue'
|
|
|
import { replaceKeyword } from '../hooks/utils'
|
|
|
+import { mapState } from 'vuex'
|
|
|
import { ajaxGetCompanyAssociation, ajaxUploadInvoice } from '@/api/modules/'
|
|
|
export default {
|
|
|
name: "uploadInvoiceContent",
|
|
|
components: { bUpload },
|
|
|
data() {
|
|
|
+ var validatePhone = (rule, value, callback) => {
|
|
|
+ if (value === '') {
|
|
|
+ callback(new Error('请输入联系电话'));
|
|
|
+ } else {
|
|
|
+ const test = /^(1[3-9|])\d{9}$|^0\d{2,3}-?\d{7,8}(-\d{1,4})?$|^400[016-9]\d{6}$|^400-[016-9]\d{2}-\d{4}$/.test(value)
|
|
|
+ if (!test) {
|
|
|
+ callback(new Error('请输入正确的联系电话'));
|
|
|
+ }
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ var validateEmail = (rule, value, callback) => {
|
|
|
+ if (value === '') {
|
|
|
+ callback(new Error('请输入电子邮箱'));
|
|
|
+ } else {
|
|
|
+ const test = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test(value)
|
|
|
+ if (!test) {
|
|
|
+ callback(new Error('请输入正确的电子邮箱'));
|
|
|
+ }
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var validateDutyparagraph = (rule, value, callback) => {
|
|
|
+ if (value === '') {
|
|
|
+ callback(new Error('纳税人识别号为必填项'));
|
|
|
+ } else {
|
|
|
+ const test = /^[0-9A-Za-z]{15,18}$/.test(value)
|
|
|
+ if (!test) {
|
|
|
+ callback(new Error('请输入正确的纳税人识别号'));
|
|
|
+ }
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var validateCompany = (rule, value, callback) => {
|
|
|
+ if (value === '') {
|
|
|
+ callback(new Error('请输入公司名称'));
|
|
|
+ } else {
|
|
|
+ const test = /^[\u4e00-\u9fa5]{2,50}$/.test(value)
|
|
|
+ if (!test) {
|
|
|
+ callback(new Error('请输入正确格式的公司名称'));
|
|
|
+ if(value.length < 2) {
|
|
|
+ callback(new Error('公司名称至少输入2个字'));
|
|
|
+ } else if(value.length > 50) {
|
|
|
+ callback(new Error('公司名称最多输入50个字'));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var validateInvoiceNumber = (rule, value, callback) => {
|
|
|
+ if (!value) {
|
|
|
+ callback(new Error('请输入发票号码'));
|
|
|
+ } else {
|
|
|
+ // const test = /^[0-9]{1,20}$/.test(value)
|
|
|
+ // if (!test) {
|
|
|
+ // callback(new Error('请输入正确格式的发票号码'));
|
|
|
+ // }
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
typelist: [
|
|
|
{ text: '电子普通发票', value: '1' },
|
|
@@ -145,6 +203,11 @@ export default {
|
|
|
{ text: '个人', value: '1' },
|
|
|
{ text: '单位', value: '2' }
|
|
|
],
|
|
|
+ contentList: [
|
|
|
+ { label: '技术服务费', value: 1 },
|
|
|
+ { label: '会员费', value: 2 },
|
|
|
+ { label: '招投标数据服务', value: 3 }
|
|
|
+ ],
|
|
|
searchList: [],
|
|
|
isAssociateShow: false,
|
|
|
showDesc: false,
|
|
@@ -160,7 +223,7 @@ export default {
|
|
|
invoice_content: '',
|
|
|
invoiceHeader: '2',
|
|
|
company: '',
|
|
|
- dutyparagraph: '',
|
|
|
+ taxpayer_identnum: '',
|
|
|
unitAddress: '',
|
|
|
tel: '',
|
|
|
bank: '',
|
|
@@ -169,38 +232,13 @@ export default {
|
|
|
phone: '',
|
|
|
email: '',
|
|
|
},
|
|
|
- showModule: {
|
|
|
- company: false,
|
|
|
- dutyparagraph: false,
|
|
|
- bankCode: false,
|
|
|
- bank: false,
|
|
|
- tel: false,
|
|
|
- unitAddress: false,
|
|
|
- desc: false,
|
|
|
- name: false,
|
|
|
- phone: true,
|
|
|
- deliveryAddress: false,
|
|
|
- email: false
|
|
|
- },
|
|
|
- infoCheckMap: {
|
|
|
- company: '',
|
|
|
- dutyparagraph: '',
|
|
|
- unitAddress: '',
|
|
|
- phone: '',
|
|
|
- bank: '',
|
|
|
- bankCode: '',
|
|
|
- desc: '',
|
|
|
- tel: '',
|
|
|
- email: '',
|
|
|
- deliveryAddress: '',
|
|
|
- name: ''
|
|
|
- },
|
|
|
rules: {
|
|
|
addressUrl: [
|
|
|
{ required: true, message: '请上传发票', trigger: 'blur' },
|
|
|
],
|
|
|
invoice_number: [
|
|
|
- { required: true, message: '请输入发票号码', trigger: 'blur' }
|
|
|
+ { required: true, message: '请输入发票号码', trigger: 'blur' },
|
|
|
+ { validator: validateInvoiceNumber, trigger: 'blur' }
|
|
|
],
|
|
|
billing_time: [
|
|
|
{ type: 'date', required: true, message: '请选择开票时间', trigger: 'change' }
|
|
@@ -224,33 +262,99 @@ export default {
|
|
|
{ required: true, message: '请选择发票抬头', trigger: 'change' }
|
|
|
],
|
|
|
company: [
|
|
|
- { required: true, message: '请输入公司名称', trigger: 'blur' }
|
|
|
+ { required: true, message: '请输入公司名称', trigger: 'blur' },
|
|
|
+ { validator: validateCompany, trigger: 'blur' }
|
|
|
],
|
|
|
- dutyparagraph: [
|
|
|
- { required: true, message: '纳税人识别号为必填项', trigger: 'blur' }
|
|
|
+ taxpayer_identnum: [
|
|
|
+ { required: true, message: '纳税人识别号为必填项', trigger: 'blur' },
|
|
|
+ { validator: validateDutyparagraph, trigger: 'blur' }
|
|
|
],
|
|
|
phone: [
|
|
|
- { required: true, message: '请输入联系电话', trigger: 'blur' }
|
|
|
+ { required: true, message: '请输入联系电话', trigger: 'blur' },
|
|
|
+ { validator: validatePhone, trigger: 'blur' }
|
|
|
],
|
|
|
email: [
|
|
|
- { required: true, message: '请输入电子邮箱', trigger: 'blur' }
|
|
|
+ { required: true, message: '请输入电子邮箱', trigger: 'blur' },
|
|
|
+ { validator: validateEmail, trigger: 'blur' }
|
|
|
]
|
|
|
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ invoiceInfo: {
|
|
|
+ handler(val) {
|
|
|
+ // 判断val是否是空对象
|
|
|
+ if (Object.keys(val).length) {
|
|
|
+ this.setShowInfo(val)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {
|
|
|
+ ...mapState({
|
|
|
+ invoiceInfo: state => state.order.invoiceInfo,
|
|
|
+ }),
|
|
|
showCompnayModule() {
|
|
|
return this.ruleForm.invoiceHeader === '2'
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ console.log(this.invoiceInfo, 'invoiceInfo')
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ // 回显数据
|
|
|
+ setShowInfo(val) {
|
|
|
+ console.log(val, 'val')
|
|
|
+ const {
|
|
|
+ address_url,
|
|
|
+ billing_time,
|
|
|
+ invoice_number,
|
|
|
+ invoice_money,
|
|
|
+ invoice_order_money,
|
|
|
+ invoicing_entity,
|
|
|
+ company_name,
|
|
|
+ taxpayer_identnum, // 纳税人识别号
|
|
|
+ company_address, // 单位地址
|
|
|
+ company_phone, // 联系电话
|
|
|
+ bank_name, // 开户银行
|
|
|
+ bank_account, // 银行账号
|
|
|
+ remark, // 备注
|
|
|
+ phone,
|
|
|
+ mail,
|
|
|
+ } = val
|
|
|
+ const invoice_variety = this.typelist.find(item => item.text === val.invoice_variety)
|
|
|
+ const invoice_content = this.contentList.find(item => '信息技术服务-' + item.label === val.invoice_content)
|
|
|
+ const invoice_type = this.invoiceHeaderList.find(item => item.text === val.invoice_type)
|
|
|
+ console.log(invoice_content, 'invoice_content')
|
|
|
+ this.ruleForm = {
|
|
|
+ addressUrl: address_url,
|
|
|
+ billing_time: billing_time ? new Date(billing_time *1000) : '',
|
|
|
+ invoice_number: invoice_number,
|
|
|
+ allMoney: invoice_money,
|
|
|
+ money: invoice_order_money,
|
|
|
+ signing_subject: invoicing_entity,
|
|
|
+ invoice_variety: invoice_variety?.value || '1',
|
|
|
+ invoice_content: invoice_content.label || '技术服务费',
|
|
|
+ invoiceHeader: invoice_type.value || '1',
|
|
|
+ company: company_name,
|
|
|
+ taxpayer_identnum,
|
|
|
+ unitAddress: company_address,
|
|
|
+ tel: company_phone,
|
|
|
+ bank: bank_name,
|
|
|
+ bankCode: bank_account,
|
|
|
+ desc: remark,
|
|
|
+ phone: phone,
|
|
|
+ email: mail
|
|
|
+ }
|
|
|
+ },
|
|
|
invoiceFile(val) {
|
|
|
this.ruleForm.addressUrl = val
|
|
|
},
|
|
|
entOnChange(type) {
|
|
|
if (type === 'blur') {
|
|
|
- this.getCheckMap('company')
|
|
|
setTimeout(() => {
|
|
|
this.isAssociateShow = false
|
|
|
this.searchList = []
|
|
@@ -301,32 +405,12 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- checkDutyparagraph() {
|
|
|
- if (
|
|
|
- this.ruleForm.dutyparagraph.trim().length === 18 ||
|
|
|
- this.ruleForm.dutyparagraph.trim().length === 15 ||
|
|
|
- this.ruleForm.dutyparagraph.trim().length === 20
|
|
|
- ) {
|
|
|
- return true
|
|
|
- }
|
|
|
- return false
|
|
|
- },
|
|
|
selectEnt(item) {
|
|
|
console.log('item', item)
|
|
|
this.ruleForm.company = item.name ? item.name : ''
|
|
|
- this.ruleForm.dutyparagraph = item.taxCode ? item.taxCode : ''
|
|
|
+ this.ruleForm.taxpayer_identnum = item.taxCode ? item.taxCode : ''
|
|
|
this.isAssociateShow = false
|
|
|
this.searchList = []
|
|
|
- if (this.checkVerify('company')) {
|
|
|
- this.infoCheckMap.company = ''
|
|
|
- } else {
|
|
|
- this.getCheckMap('company')
|
|
|
- }
|
|
|
- if (this.checkVerify('dutyparagraph')) {
|
|
|
- this.infoCheckMap.dutyparagraph = ''
|
|
|
- } else {
|
|
|
- this.getCheckMap('dutyparagraph')
|
|
|
- }
|
|
|
},
|
|
|
submitForm(formName) {
|
|
|
|
|
@@ -341,13 +425,18 @@ export default {
|
|
|
},
|
|
|
async setUploadAjax() {
|
|
|
const { id } = this.$route.params;
|
|
|
- console.log('id', id)
|
|
|
+ const { invoiceId } = this.invoiceInfo;
|
|
|
const { fileUrl, invoice_number, billing_time, allMoney, money, signing_subject, invoice_variety, invoice_content, invoiceHeader, desc, phone, email} = this.ruleForm;
|
|
|
const paramsEnt = {
|
|
|
...this.ruleForm,
|
|
|
- addressUrl: this.ruleForm.fileUrl,
|
|
|
+ id: invoiceId || '',
|
|
|
+ orderCode: id,
|
|
|
+ addressUrl: fileUrl,
|
|
|
+ allMoney: Number(allMoney),
|
|
|
+ money: Number(money),
|
|
|
}
|
|
|
const paramsPerson = {
|
|
|
+ id: invoiceId || '',
|
|
|
orderCode: id,
|
|
|
addressUrl: fileUrl,
|
|
|
invoice_number,
|
|
@@ -363,265 +452,26 @@ export default {
|
|
|
email
|
|
|
}
|
|
|
const params = invoiceHeader === '1' ? paramsPerson : paramsEnt;
|
|
|
- const { error_code: code, data } = await ajaxUploadInvoice(params);
|
|
|
+ const { error_code: code, error_msg: msg, data } = await ajaxUploadInvoice(params);
|
|
|
console.log('code', code, data)
|
|
|
if(code === 0) {
|
|
|
+ const message = invoiceId ? '编辑成功' : '上传成功'
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
- message: '上传成功'
|
|
|
+ message
|
|
|
+ })
|
|
|
+ this.$emit('refresh', '发票信息')
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: msg
|
|
|
})
|
|
|
}
|
|
|
+ this.$emit('update', false)
|
|
|
},
|
|
|
resetForm(formName) {
|
|
|
this.$refs[formName].resetFields();
|
|
|
- },
|
|
|
- getCheckMap(type) {
|
|
|
- switch (type) {
|
|
|
- case 'name': {
|
|
|
- this.infoCheckMap.name =
|
|
|
- this.ruleForm.name === '' ? '收件人为必填项' : ''
|
|
|
- if (this.infoCheckMap.name === '' && !this.checkName) {
|
|
|
- this.infoCheckMap.name = '请输入正确格式的收件人'
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case 'tel': {
|
|
|
- if (this.requireds.tel) {
|
|
|
- this.infoCheckMap.tel =
|
|
|
- this.ruleForm.tel === '' ? '电话号码为必填项' : ''
|
|
|
- }
|
|
|
- if (
|
|
|
- this.ruleForm.tel &&
|
|
|
- this.infoCheckMap.tel === '' &&
|
|
|
- !this.checkPhone(this.ruleForm.tel)
|
|
|
- ) {
|
|
|
- this.infoCheckMap.tel = '电话号码格式不正确'
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case 'phone': {
|
|
|
- this.infoCheckMap.phone =
|
|
|
- this.ruleForm.phone === '' ? '联系电话为必填项' : ''
|
|
|
- if (
|
|
|
- this.infoCheckMap.phone === '' &&
|
|
|
- !this.checkPhone(this.ruleForm.phone)
|
|
|
- ) {
|
|
|
- this.infoCheckMap.phone = '联系电话格式不正确'
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case 'email': {
|
|
|
- this.infoCheckMap.email =
|
|
|
- this.ruleForm.email === '' ? '邮箱为必填项' : ''
|
|
|
- if (this.infoCheckMap.email === '' && !this.checkEmail) {
|
|
|
- this.infoCheckMap.email = '请输入正确格式的邮箱'
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case 'company': {
|
|
|
- this.infoCheckMap.company =
|
|
|
- this.ruleForm.company === '' ? '公司名称为必填项' : ''
|
|
|
- if (this.infoCheckMap.company === '' && !this.checkEntName) {
|
|
|
- this.infoCheckMap.company = '请输入正确格式的公司名称'
|
|
|
- if (this.ruleForm.company.length < 2) {
|
|
|
- this.infoCheckMap.company = '公司名称至少输入2个字'
|
|
|
- }
|
|
|
- if (this.ruleForm.company.length > 50) {
|
|
|
- this.infoCheckMap.company = '公司名称最多输入50个字'
|
|
|
- }
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case 'dutyparagraph': {
|
|
|
- this.infoCheckMap.dutyparagraph =
|
|
|
- this.ruleForm.dutyparagraph === '' ? '纳税人识别号为必填项' : ''
|
|
|
- if (
|
|
|
- this.infoCheckMap.dutyparagraph === '' &&
|
|
|
- !this.checkDutyparagraph
|
|
|
- ) {
|
|
|
- this.infoCheckMap.dutyparagraph = '请输入正确格式的纳税人识别号'
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case 'bankCode': {
|
|
|
- if (this.requireds.bankCode) {
|
|
|
- this.infoCheckMap.bankCode =
|
|
|
- this.ruleForm.bankCode === '' ? '银行账号为必填项' : ''
|
|
|
- }
|
|
|
- if (this.ruleForm.bankCode && !this.checkBankcode) {
|
|
|
- this.infoCheckMap.bankCode = '请输入正确格式的银行账号'
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case 'bank': {
|
|
|
- if (this.requireds.bank) {
|
|
|
- this.infoCheckMap.bank =
|
|
|
- this.ruleForm.bank === '' ? '开户银行为必填项' : ''
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case 'unitAddress': {
|
|
|
- if (this.requireds.unitAddress) {
|
|
|
- this.infoCheckMap.unitAddress =
|
|
|
- this.ruleForm.unitAddress === '' ? '单位地址为必填项' : ''
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case 'deliveryAddress': {
|
|
|
- if (this.requireds.deliveryAddress) {
|
|
|
- this.infoCheckMap.deliveryAddress =
|
|
|
- this.ruleForm.deliveryAddress === '' ? '收件地址为必填项' : ''
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- checkPhone(val) {
|
|
|
- // 手机号:13/14/15/16/17/18/19开头 + 9位数字(共11位)
|
|
|
- // 固定电话:区号(3-4位) + - + 号码(7-8位) + 可选分机号(1-4位)
|
|
|
- // 400电话(共10位):400开头 + 7位数字 或 400-xxx-xxxx 格式
|
|
|
- return /^(1[3-9|])\d{9}$|^0\d{2,3}-?\d{7,8}(-\d{1,4})?$|^400[016-9]\d{6}$|^400-[016-9]\d{2}-\d{4}$/.test(
|
|
|
- val
|
|
|
- )
|
|
|
- },
|
|
|
- checkVerify(type) {
|
|
|
- switch (type) {
|
|
|
- case 'name': {
|
|
|
- if (
|
|
|
- (this.ruleForm.name === '' || !this.checkName) &&
|
|
|
- this.showModule.name
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- case 'tel': {
|
|
|
- if (this.showModule.tel) {
|
|
|
- if (
|
|
|
- !this.requireds.tel &&
|
|
|
- !this.checkPhone(this.ruleForm.tel) &&
|
|
|
- this.ruleForm.tel
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else if (
|
|
|
- (this.ruleForm.tel === '' || !this.checkPhone(this.ruleForm.tel)) &&
|
|
|
- this.requireds.tel
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- case 'phone': {
|
|
|
- if (
|
|
|
- this.ruleForm.phone === '' ||
|
|
|
- (!this.checkPhone(this.ruleForm.phone) && this.showModule.phone)
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- case 'email': {
|
|
|
- if (
|
|
|
- (this.ruleForm.email === '' || !this.checkEmail) &&
|
|
|
- this.showModule.email
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- case 'company': {
|
|
|
- if (
|
|
|
- this.ruleForm.company === '' &&
|
|
|
- !this.checkEntName &&
|
|
|
- this.showModule.company
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else if (
|
|
|
- this.ruleForm.company.length < 2 &&
|
|
|
- this.showModule.company
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else if (
|
|
|
- this.ruleForm.company.length > 50 &&
|
|
|
- this.showModule.company
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- case 'dutyparagraph': {
|
|
|
- if (
|
|
|
- (this.ruleForm.dutyparagraph === '' || !this.checkDutyparagraph) &&
|
|
|
- this.showModule.dutyparagraph
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- case 'bankCode': {
|
|
|
- if (this.showModule.bankCode) {
|
|
|
- if (
|
|
|
- !this.requireds.bankCode &&
|
|
|
- !this.checkBankcode &&
|
|
|
- this.ruleForm.bankCode
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else if (
|
|
|
- (this.ruleForm.bankCode === '' || !this.checkBankcode) &&
|
|
|
- this.requireds.bankCode
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- case 'bank': {
|
|
|
- if (
|
|
|
- this.requireds.bank &&
|
|
|
- this.ruleForm.bank === '' &&
|
|
|
- this.showModule.bank
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- case 'unitAddress': {
|
|
|
- if (
|
|
|
- this.requireds.unitAddress &&
|
|
|
- this.ruleForm.unitAddress === '' &&
|
|
|
- this.showModule.unitAddress
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- case 'deliveryAddress': {
|
|
|
- if (
|
|
|
- this.requireds.deliveryAddress &&
|
|
|
- this.ruleForm.deliveryAddress === '' &&
|
|
|
- this.showModule.deliveryAddress
|
|
|
- ) {
|
|
|
- return false
|
|
|
- } else {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -667,6 +517,7 @@ export default {
|
|
|
}
|
|
|
::v-deep {
|
|
|
.ivu-input-default {
|
|
|
+ padding: 4px 15px;
|
|
|
height: 40px;
|
|
|
line-height: 40px;
|
|
|
}
|