|
@@ -735,10 +735,10 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
const validateLicense = (rule, value, callback) => {
|
|
|
- if (value === '') {
|
|
|
- callback(new Error('请上传附件'));
|
|
|
- }
|
|
|
- };
|
|
|
+ if (value === '') {
|
|
|
+ callback(new Error('请上传附件'));
|
|
|
+ }
|
|
|
+ };
|
|
|
return {
|
|
|
date: "",
|
|
|
action: process.env.VUE_APP_BASE_API + "/common/attach/upload", // 上传的图片服务器地址
|
|
@@ -952,7 +952,6 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
this.form.id = this.$route.params.id || undefined;
|
|
|
this.type = this.$route.query.type || undefined
|
|
|
if(this.form.id) {
|
|
@@ -1006,10 +1005,10 @@ export default {
|
|
|
getEntInfoByIdApi(this.form.id).then(res => {
|
|
|
this.loading = false
|
|
|
this.form = res.data || {}
|
|
|
- this.form.serviceDate = []
|
|
|
- if(this.form.startDate) {
|
|
|
- this.form.serviceDate[0] = this.form.startDate + ' '
|
|
|
- this.form.serviceDate[1] = ' ' + this.form.endDate
|
|
|
+ if(this.form.startDate && this.form.endDate) {
|
|
|
+ this.form.serviceDate = this.form.startDate + ' 至 ' + this.form.endDate
|
|
|
+ }else {
|
|
|
+ this.form.serviceDate = ""
|
|
|
}
|
|
|
getProvinceDataApi().then(res => {
|
|
|
if(res.code == 200) {
|
|
@@ -1206,7 +1205,6 @@ export default {
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
handleRegister() {
|
|
|
- // this.form.mainProducts = this.form.mainProductArray.join(',')
|
|
|
if(this.type == 'update') {
|
|
|
this.$refs.form.validate((valid, obj) => {
|
|
|
if (valid) {
|
|
@@ -1243,6 +1241,13 @@ export default {
|
|
|
this.$refs.form.validate((valid, obj) => {
|
|
|
if (valid) {
|
|
|
this.loading = true;
|
|
|
+ if(this.form.serviceDate) {
|
|
|
+ this.form.startDate = this.form.serviceDate.split('至')[0].trim()
|
|
|
+ this.form.endDate = this.form.serviceDate.split('至')[1].trim()
|
|
|
+ }else {
|
|
|
+ this.form.startDate = ''
|
|
|
+ this.form.endDate = ''
|
|
|
+ }
|
|
|
if(this.form.license) {
|
|
|
validLicenseApi(this.form.license).then(res => {
|
|
|
// true存在
|
|
@@ -1314,18 +1319,8 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- },
|
|
|
- watch: {
|
|
|
- 'form.serviceDate'(val) {
|
|
|
- if(val) {
|
|
|
- let arr = val.split('至')
|
|
|
- this.form.startDate = arr[0].trim()
|
|
|
- this.form.endDate = arr[1].trim()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|