|
@@ -119,7 +119,7 @@
|
|
|
<el-input v-model="formData.Dept" :maxlength="100" style="width: 100%" :readonly="!showBtn"></el-input>
|
|
<el-input v-model="formData.Dept" :maxlength="100" style="width: 100%" :readonly="!showBtn"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
|
|
|
|
+ <el-col :span="12" v-if="formData.CatalogType != 7">
|
|
|
<el-form-item label="有效期至" prop="ValidityTo" >
|
|
<el-form-item label="有效期至" prop="ValidityTo" >
|
|
|
<el-date-picker style="width: 100%" v-model="formData.ValidityTo" type="date" placeholder="有效期截止时间" :readonly="!showBtn"></el-date-picker>
|
|
<el-date-picker style="width: 100%" v-model="formData.ValidityTo" type="date" placeholder="有效期截止时间" :readonly="!showBtn"></el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -196,7 +196,7 @@
|
|
|
}
|
|
}
|
|
|
var checkCommercialNo = (rule, value, callback) => {
|
|
var checkCommercialNo = (rule, value, callback) => {
|
|
|
if (value === '') {
|
|
if (value === '') {
|
|
|
- callback(new Error('请输入统一社会信用代码'))
|
|
|
|
|
|
|
+ callback()
|
|
|
} else {
|
|
} else {
|
|
|
let re4 = /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g
|
|
let re4 = /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g
|
|
|
if (!re4.test(this.formData.USCCode)) {
|
|
if (!re4.test(this.formData.USCCode)) {
|
|
@@ -273,7 +273,7 @@
|
|
|
],
|
|
],
|
|
|
RegCapital: [
|
|
RegCapital: [
|
|
|
{ required: false, validator: checkMoney, trigger: 'change' },
|
|
{ required: false, validator: checkMoney, trigger: 'change' },
|
|
|
- { type: 'number', message: '只能输入数字', trigger: 'blur' }
|
|
|
|
|
|
|
+ // { type: 'number', message: '只能输入数字', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
RecordScope: [
|
|
RecordScope: [
|
|
|
{ required: true, message: '业务范围不能为空', trigger: 'blur' }
|
|
{ required: true, message: '业务范围不能为空', trigger: 'blur' }
|
|
@@ -297,7 +297,7 @@
|
|
|
FirstAudit: '',
|
|
FirstAudit: '',
|
|
|
SecondAudit: '',
|
|
SecondAudit: '',
|
|
|
ValidityFrom: null,
|
|
ValidityFrom: null,
|
|
|
- ValidityTo: null
|
|
|
|
|
|
|
+ ValidityTo: ''
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -459,7 +459,7 @@
|
|
|
this.formData.LegalPerson = val.LegalPerson
|
|
this.formData.LegalPerson = val.LegalPerson
|
|
|
this.formData.Address = val.Address
|
|
this.formData.Address = val.Address
|
|
|
this.formData.USCCode = val.USCCode
|
|
this.formData.USCCode = val.USCCode
|
|
|
- this.formData.RegCapital = val.RegCapital
|
|
|
|
|
|
|
+ this.formData.RegCapital = val.RegCapital === '' ? 0 : val.RegCapital
|
|
|
this.formData.RecordScope = val.RecordScope
|
|
this.formData.RecordScope = val.RecordScope
|
|
|
this.formData.IDCode = val.IDCode
|
|
this.formData.IDCode = val.IDCode
|
|
|
this.formData.Business = val.Business
|
|
this.formData.Business = val.Business
|
|
@@ -467,7 +467,7 @@
|
|
|
this.formData.Dept = val.Dept
|
|
this.formData.Dept = val.Dept
|
|
|
this.formData.DutyDept = val.DutyDept
|
|
this.formData.DutyDept = val.DutyDept
|
|
|
this.formData.Status = val.Status
|
|
this.formData.Status = val.Status
|
|
|
- this.formData.ValidityTo = val.ValidityTo
|
|
|
|
|
|
|
+ this.formData.ValidityTo = val.ValidityTo === '0001-01-01T00:00:00Z' ? '' : val.ValidityTo
|
|
|
},
|
|
},
|
|
|
saveOilCataLog () {
|
|
saveOilCataLog () {
|
|
|
if (this.formData.Id > 0) {
|
|
if (this.formData.Id > 0) {
|
|
@@ -479,6 +479,11 @@
|
|
|
editEntity () {
|
|
editEntity () {
|
|
|
this.$refs['EntityForm'].validate((valid) => {
|
|
this.$refs['EntityForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+ if (this.formData.CatalogType === 7) {
|
|
|
|
|
+ let now = new Date()
|
|
|
|
|
+ let year = now.getFullYear() + 4
|
|
|
|
|
+ this.formData.ValidityTo = year + '-12-31'
|
|
|
|
|
+ }
|
|
|
api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
|
|
api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
this.$message({
|
|
this.$message({
|
|
@@ -500,6 +505,9 @@
|
|
|
addEntity () {
|
|
addEntity () {
|
|
|
this.$refs['EntityForm'].validate((valid) => {
|
|
this.$refs['EntityForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+ if (this.formData.CatalogType === 6 || this.formData.CatalogType === 7) {
|
|
|
|
|
+ this.formData.Status = '2'
|
|
|
|
|
+ }
|
|
|
api.addEntity(this.formData, this.$axios).then(res => {
|
|
api.addEntity(this.formData, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
this.$message({
|
|
this.$message({
|
|
@@ -550,12 +558,12 @@
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
jsTimeHandleForInCome (val) {
|
|
jsTimeHandleForInCome (val) {
|
|
|
- if (this.formData.CatalogType == '7') {
|
|
|
|
|
- // 收入业务无有效期,设置为当前时间的后五年
|
|
|
|
|
|
|
+ if (this.formData.CatalogType === 7) {
|
|
|
|
|
+ // 收入业务无有效期,设置为当前时间的后五年 后端存储后可不在此处理
|
|
|
let now = new Date()
|
|
let now = new Date()
|
|
|
let year = now.getFullYear() + 4
|
|
let year = now.getFullYear() + 4
|
|
|
return year + '-12-31'
|
|
return year + '-12-31'
|
|
|
- } else if (this.formData.CatalogType == '6') {
|
|
|
|
|
|
|
+ } else if (this.formData.CatalogType === 6) {
|
|
|
if (val === '') {
|
|
if (val === '') {
|
|
|
return '----'
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|