|
@@ -8,16 +8,42 @@
|
|
|
</div>
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
|
- action="http://localhost:8060/api/v1/rms/rmscarrier/uploadCarrier"
|
|
|
+ action="http://localhost:8070/api/v1/rms/rmscarrier/uploadCarrier1"
|
|
|
:on-preview="handlePreview"
|
|
|
:on-remove="handleRemove"
|
|
|
- :on-success="handleAvatarSuccess"
|
|
|
+ :on-success="handleAvatarSuccess1"
|
|
|
:file-list="fileList"
|
|
|
+ :before-upload="beforeUpload2"
|
|
|
list-type="picture">
|
|
|
- <el-button size="small" type="primary">点击上传照片</el-button>
|
|
|
+ <el-button size="small" type="primary">点击上传运输证</el-button>
|
|
|
+ <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
+ </el-upload>
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ action="http://localhost:8070/api/v1/rms/rmscarrier/uploadCarrier2"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :on-success="handleAvatarSuccess2"
|
|
|
+ :file-list="fileList"
|
|
|
+ :before-upload="beforeUpload2"
|
|
|
+ list-type="picture">
|
|
|
+ <el-button size="small" type="primary">点击上传经营许可证</el-button>
|
|
|
+ <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
+ </el-upload>
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ action="http://localhost:8070/api/v1/rms/rmscarrier/uploadCarrier3"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :on-success="handleAvatarSuccess3"
|
|
|
+ :file-list="fileList"
|
|
|
+ :before-upload="beforeUpload2"
|
|
|
+ list-type="picture">
|
|
|
+ <el-button size="small" type="primary">点击上传营业执照</el-button>
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
</el-upload>
|
|
|
|
|
|
+
|
|
|
<div class="form-box f1">
|
|
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
<el-form-item>
|
|
@@ -79,12 +105,52 @@ export default {
|
|
|
registerDate:"",
|
|
|
mapValue:""
|
|
|
},
|
|
|
- imageUrl:""
|
|
|
+ imageUrl1:"",
|
|
|
+ imageUrl2:"",
|
|
|
+ imageUrl3:"",
|
|
|
+ imageUrls:[],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- handleAvatarSuccess(res,file){
|
|
|
- this.imageUrl=URL.createObjectURL(file.raw);
|
|
|
+ beforeUpload2 (file) {
|
|
|
+ const isLt2M = file.size < 1024 * 1024 * 0.5
|
|
|
+ console.log('大小' + isLt2M)
|
|
|
+ if (!isLt2M) {
|
|
|
+ this.$message.error('上传文件大小不能超过500kb!')
|
|
|
+ }
|
|
|
+ let size = file.size / 1024
|
|
|
+ console.log('大小' + size)
|
|
|
+ let _URL = window.URL || window.webkitURL
|
|
|
+ let img = new Image()
|
|
|
+ img.onload = function () {
|
|
|
+ let width = img.width
|
|
|
+ let height = img.height
|
|
|
+ console.log('width--->' + width)
|
|
|
+ console.log('height--->' + height)
|
|
|
+ }
|
|
|
+ img.src = _URL.createObjectURL(file)
|
|
|
+ return isLt2M
|
|
|
+ },
|
|
|
+ handleAvatarSuccess1(res,file){
|
|
|
+ this.imageUrl1=URL.createObjectURL(file.raw);
|
|
|
+ // this.axios
|
|
|
+ // .then((res) => {
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // this.$message({
|
|
|
+ // type: "success",
|
|
|
+ // message: "新增成功!",
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // else {
|
|
|
+ // this.$message.error("图片上传失败,图片格式不得超过500kb且只能是jpg/png文件!");
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ handleAvatarSuccess2(res,file){
|
|
|
+ this.imageUrl2=URL.createObjectURL(file.raw);
|
|
|
+ },
|
|
|
+ handleAvatarSuccess3(res,file){
|
|
|
+ this.imageUrl3=URL.createObjectURL(file.raw);
|
|
|
},
|
|
|
handleRemove(file,fileList){
|
|
|
console.log(file,fileList)
|
|
@@ -98,7 +164,6 @@ export default {
|
|
|
},
|
|
|
currentRadioChange(selection){
|
|
|
this.mapList=selection,
|
|
|
- console.log(this.mapList)
|
|
|
this.bidArea=this.mapList.bidArea
|
|
|
|
|
|
},
|
|
@@ -130,18 +195,27 @@ export default {
|
|
|
let registerDate={
|
|
|
registerDate: this.form1.registerDate,
|
|
|
};
|
|
|
+ let imageUrls={
|
|
|
+ imageUrl1:this.imageUrl1,
|
|
|
+ imageUrl1:this.imageUrl2,
|
|
|
+ imageUrl1:this.imageUrl3
|
|
|
+ };
|
|
|
+ console.log(imageUrls)
|
|
|
let mapValue={
|
|
|
RmsCarrier:RmsCarrier,
|
|
|
- registerDate:registerDate
|
|
|
+ registerDate:registerDate,
|
|
|
+ imageUrls:imageUrls
|
|
|
};
|
|
|
if(
|
|
|
reg.test(RmsCarrier.carrierContactNumber)==false
|
|
|
)this.$message.error("输入的格式不正确");
|
|
|
else if(
|
|
|
RmsCarrier.carrierName ==null ||
|
|
|
- // RmsCarrier.carrierTransportCertificate ==null ||
|
|
|
- // RmsCarrier.carrierBusinessLicense ==null ||
|
|
|
- // RmsCarrier.carrierBusinessAblelicense ==null ||
|
|
|
+
|
|
|
+ // imageUrls.imageUrl1 ==null ||
|
|
|
+ // imageUrls.imageUrl2 ==null ||
|
|
|
+ // imageUrls.imageUrl3 ==null ||
|
|
|
+
|
|
|
RmsCarrier.carrierAbbreviation ==null ||
|
|
|
RmsCarrier.carrierAddress ==null ||
|
|
|
RmsCarrier.registerNo ==null ||
|