|
@@ -2,83 +2,93 @@
|
|
|
<!-- 添加承运商信息 -->
|
|
|
<div class="addWagonLoad">
|
|
|
<PageTitle @click="onClick">返回</PageTitle>
|
|
|
- <el-divider content-position="left">承运商信息</el-divider>
|
|
|
- <div class="form-box" style="margin-right: 10rem">
|
|
|
- <dil-form :formId="330" v-model="form1"></dil-form>
|
|
|
- </div>
|
|
|
+ <div class="user_code">
|
|
|
+ <span class="text">账号:</span>
|
|
|
+ <el-input class="input" placeholder="请输入内容" v-model="input" clearable> </el-input>
|
|
|
+ </div>
|
|
|
+ <div class="form-box" style="margin-right: 10rem">
|
|
|
+ <dil-form :formId="330" v-model="form1"></dil-form>
|
|
|
+ </div>
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
|
+ ref="upload"
|
|
|
action="http://localhost:8070/api/v1/rms/rmscarrier/uploadCarrier1"
|
|
|
:on-preview="handlePreview"
|
|
|
:on-remove="handleRemove"
|
|
|
- :on-success="handleAvatarSuccess1"
|
|
|
:file-list="fileList"
|
|
|
:before-upload="beforeUpload2"
|
|
|
- list-type="picture">
|
|
|
+ list-type="picture"
|
|
|
+ >
|
|
|
<el-button size="small" type="primary">点击上传运输证</el-button>
|
|
|
- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
+ <div slot="tip" class="el-upload__tip">
|
|
|
+ 只能上传jpg/png文件,且不超过500kb
|
|
|
+ </div>
|
|
|
</el-upload>
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
|
+ ref="upload"
|
|
|
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">
|
|
|
+ list-type="picture"
|
|
|
+ >
|
|
|
<el-button size="small" type="primary">点击上传经营许可证</el-button>
|
|
|
- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
+ <div slot="tip" class="el-upload__tip">
|
|
|
+ 只能上传jpg/png文件,且不超过500kb
|
|
|
+ </div>
|
|
|
</el-upload>
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
|
+ ref="upload"
|
|
|
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">
|
|
|
+ list-type="picture"
|
|
|
+ >
|
|
|
<el-button size="small" type="primary">点击上传营业执照</el-button>
|
|
|
- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
+ <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>
|
|
|
- <el-button type="primary" @click="drawer = true">添加中标区域信息</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="drawer = true"
|
|
|
+ >添加中标区域信息</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
<el-drawer
|
|
|
:visible.sync="drawer"
|
|
|
:direction="direction"
|
|
|
- :before-close="handleClose">
|
|
|
- <el-input
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="inputText"
|
|
|
- clearable>
|
|
|
- </el-input>
|
|
|
- <el-button type="primary" class="btn" @click="onclick">
|
|
|
- <i class="el-icon-search"></i>查询
|
|
|
- </el-button>
|
|
|
- <div><dilTable v-bind.sync="options" @radio-change="currentRadioChange" ></dilTable></div>
|
|
|
-
|
|
|
-</el-drawer>
|
|
|
- <dilTable v-bind.sync="option1">
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <el-input placeholder="请输入内容" v-model="inputText" clearable>
|
|
|
+ </el-input>
|
|
|
+ <el-button type="primary" class="btn" @click="onclick">
|
|
|
+ <i class="el-icon-search"></i>查询
|
|
|
+ </el-button>
|
|
|
+ <div>
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="options"
|
|
|
+ @radio-change="currentRadioChange"
|
|
|
+ ></dilTable>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
+ <dilTable v-bind.sync="option1">
|
|
|
<el-table-column fixed="right" label="操作" align="center" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="mini"
|
|
|
- @click="deleteclick(scope)"
|
|
|
+ <el-button type="text" size="mini" @click="deleteclick(scope)"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</dilTable>
|
|
|
-
|
|
|
<div class="button-box">
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
<el-button type="primary" @click="makeSure">确定</el-button>
|
|
@@ -95,44 +105,44 @@ export default {
|
|
|
form1: {},
|
|
|
value: undefined,
|
|
|
drawer: false,
|
|
|
- carrierType:{},
|
|
|
- carrierTransportType:{},
|
|
|
- options:{
|
|
|
+ carrierType: {},
|
|
|
+ carrierTransportType: {},
|
|
|
+ options: {
|
|
|
// first请求数据的地址
|
|
|
requestUrl: "/api/v1/rms/getCarrierBidAreaList?apiId=406",
|
|
|
selectionType: "radio",
|
|
|
- mapList:[],
|
|
|
- registerDate:"",
|
|
|
- mapValue:""
|
|
|
+ mapList: [],
|
|
|
+ registerDate: "",
|
|
|
+ mapValue: "",
|
|
|
},
|
|
|
- imageUrl1:"",
|
|
|
- imageUrl2:"",
|
|
|
- imageUrl3:"",
|
|
|
- imageUrls:[],
|
|
|
+ imageUrl1: "",
|
|
|
+ imageUrl2: "",
|
|
|
+ imageUrl3: "",
|
|
|
+ imageUrls: [],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- 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
|
|
|
+ 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);
|
|
|
+ handleAvatarSuccess1(res, file) {
|
|
|
+ this.imageUrl1 = URL.createObjectURL(file.raw);
|
|
|
// this.axios
|
|
|
// .then((res) => {
|
|
|
// if (res.data.code == 200) {
|
|
@@ -140,130 +150,134 @@ export default {
|
|
|
// type: "success",
|
|
|
// message: "新增成功!",
|
|
|
// });
|
|
|
- // }
|
|
|
+ // }
|
|
|
// else {
|
|
|
// this.$message.error("图片上传失败,图片格式不得超过500kb且只能是jpg/png文件!");
|
|
|
// }
|
|
|
// });
|
|
|
},
|
|
|
- handleAvatarSuccess2(res,file){
|
|
|
- this.imageUrl2=URL.createObjectURL(file.raw);
|
|
|
+ handleAvatarSuccess2(res, file) {
|
|
|
+ this.imageUrl2 = URL.createObjectURL(file.raw);
|
|
|
},
|
|
|
- handleAvatarSuccess3(res,file){
|
|
|
- this.imageUrl3=URL.createObjectURL(file.raw);
|
|
|
+ handleAvatarSuccess3(res, file) {
|
|
|
+ this.imageUrl3 = URL.createObjectURL(file.raw);
|
|
|
},
|
|
|
- handleRemove(file,fileList){
|
|
|
- console.log(file,fileList)
|
|
|
+ handleRemove(file, fileList) {
|
|
|
+ console.log(file, fileList);
|
|
|
},
|
|
|
handlePreview(file) {
|
|
|
- console.log("*********"+file);
|
|
|
+ console.log("*********" + file);
|
|
|
},
|
|
|
-
|
|
|
- onclick(){
|
|
|
- this.options.requestUrl="/api/v1/rms/getCarrierBidAreaList?apiId=406&con=" +this.inputText;
|
|
|
+
|
|
|
+ onclick() {
|
|
|
+ this.options.requestUrl =
|
|
|
+ "/api/v1/rms/getCarrierBidAreaList?apiId=406&con=" + this.inputText;
|
|
|
},
|
|
|
- currentRadioChange(selection){
|
|
|
- this.mapList=selection,
|
|
|
- this.bidArea=this.mapList.bidArea
|
|
|
-
|
|
|
+ currentRadioChange(selection) {
|
|
|
+ (this.mapList = selection), (this.bidArea = this.mapList.bidArea);
|
|
|
},
|
|
|
- makeSure() {
|
|
|
- let reg=new RegExp(/^[0-9]*$/);
|
|
|
- let RmsCarrier={
|
|
|
- carrierName:this.form1.carrierName,
|
|
|
- carrierTransportCertificate:this.form1.carrierTransportCertificate,
|
|
|
- carrierBusinessLicense:this.form1.carrierBusinessLicense,
|
|
|
- carrierBusinessAblelicense:this.form1.carrierBusinessAblelicense,
|
|
|
- carrierAbbreviation:this.form1.carrierAbbreviation,
|
|
|
- carrierAddress:this.form1.carrierAddress,
|
|
|
- registerNo:this.form1.registerNo,
|
|
|
- carrierBidAreaId:this.mapList.bidAreaId,
|
|
|
- carrierLegalRepresentative:this.form1.carrierLegalRepresentative,
|
|
|
- registerCapital:this.form1.registerCapital,
|
|
|
- businessScope:this.form1.businessScope,
|
|
|
- annualDate:this.form1.annualDate,
|
|
|
- companyStatusDesc:this.form1.companyStatusDesc,
|
|
|
- companyTypeDesc:this.form1.companyTypeDesc,
|
|
|
- operationPeriod:this.form1.operationPeriod,
|
|
|
- registerOrganization:this.form1.registerOrganization,
|
|
|
- registerAptitudes:this.form1.registerAptitudes,
|
|
|
- contactsName:this.form1.contactsName,
|
|
|
- carrierContactNumber:this.form1.carrierContactNumber,
|
|
|
- carrierType:this.form1.carrierType,
|
|
|
- carrierTransportType:this.form1.carrierTransportType
|
|
|
+ makeSure() {
|
|
|
+ let reg = new RegExp(/^[0-9]*$/);
|
|
|
+ let RmsCarrier = {
|
|
|
+ carrierName: this.form1.carrierName,
|
|
|
+ carrierTransportCertificate: this.form1.carrierTransportCertificate,
|
|
|
+ carrierBusinessLicense: this.form1.carrierBusinessLicense,
|
|
|
+ carrierBusinessAblelicense: this.form1.carrierBusinessAblelicense,
|
|
|
+ carrierAbbreviation: this.form1.carrierAbbreviation,
|
|
|
+ carrierAddress: this.form1.carrierAddress,
|
|
|
+ registerNo: this.form1.registerNo,
|
|
|
+ carrierBidAreaId: this.mapList.bidAreaId,
|
|
|
+ carrierLegalRepresentative: this.form1.carrierLegalRepresentative,
|
|
|
+ registerCapital: this.form1.registerCapital,
|
|
|
+ businessScope: this.form1.businessScope,
|
|
|
+ annualDate: this.form1.annualDate,
|
|
|
+ companyStatusDesc: this.form1.companyStatusDesc,
|
|
|
+ companyTypeDesc: this.form1.companyTypeDesc,
|
|
|
+ operationPeriod: this.form1.operationPeriod,
|
|
|
+ registerOrganization: this.form1.registerOrganization,
|
|
|
+ registerAptitudes: this.form1.registerAptitudes,
|
|
|
+ contactsName: this.form1.contactsName,
|
|
|
+ carrierContactNumber: this.form1.carrierContactNumber,
|
|
|
+ carrierType: this.form1.carrierType,
|
|
|
+ carrierTransportType: this.form1.carrierTransportType,
|
|
|
};
|
|
|
- let registerDate={
|
|
|
+ let registerDate = {
|
|
|
registerDate: this.form1.registerDate,
|
|
|
};
|
|
|
- let imageUrls={
|
|
|
- imageUrl1:this.imageUrl1,
|
|
|
- imageUrl1:this.imageUrl2,
|
|
|
- imageUrl1:this.imageUrl3
|
|
|
+ let imageUrls = {
|
|
|
+ imageUrl1: this.imageUrl1,
|
|
|
+ imageUrl1: this.imageUrl2,
|
|
|
+ imageUrl1: this.imageUrl3,
|
|
|
};
|
|
|
- console.log(imageUrls)
|
|
|
- let mapValue={
|
|
|
- RmsCarrier:RmsCarrier,
|
|
|
- registerDate:registerDate,
|
|
|
- imageUrls:imageUrls
|
|
|
+ console.log(imageUrls);
|
|
|
+ let mapValue = {
|
|
|
+ RmsCarrier: RmsCarrier,
|
|
|
+ registerDate: registerDate,
|
|
|
+ imageUrls: imageUrls,
|
|
|
};
|
|
|
- if(
|
|
|
- reg.test(RmsCarrier.carrierContactNumber)==false
|
|
|
- )this.$message.error("输入的格式不正确");
|
|
|
- else if(
|
|
|
- RmsCarrier.carrierName ==null ||
|
|
|
+ if (reg.test(RmsCarrier.carrierContactNumber) == false)
|
|
|
+ this.$message.error("输入的格式不正确");
|
|
|
+ else if (
|
|
|
+ RmsCarrier.carrierName == null ||
|
|
|
+ // imageUrls.imageUrl1 ==null ||
|
|
|
+ // imageUrls.imageUrl2 ==null ||
|
|
|
+ // imageUrls.imageUrl3 ==null ||
|
|
|
|
|
|
- // imageUrls.imageUrl1 ==null ||
|
|
|
- // imageUrls.imageUrl2 ==null ||
|
|
|
- // imageUrls.imageUrl3 ==null ||
|
|
|
-
|
|
|
- RmsCarrier.carrierAbbreviation ==null ||
|
|
|
- RmsCarrier.carrierAddress ==null ||
|
|
|
- RmsCarrier.registerNo ==null ||
|
|
|
- RmsCarrier.carrierBidAreaId ==null ||
|
|
|
- RmsCarrier.carrierLegalRepresentative ==null ||
|
|
|
- RmsCarrier.registerCapital ==null ||
|
|
|
- RmsCarrier.businessScope ==null ||
|
|
|
- RmsCarrier.annualDate ==null ||
|
|
|
- RmsCarrier.companyStatusDesc ==null ||
|
|
|
- RmsCarrier.companyTypeDesc ==null ||
|
|
|
- RmsCarrier.operationPeriod ==null ||
|
|
|
- registerDate.registerDate ==null ||
|
|
|
- RmsCarrier.registerOrganization ==null ||
|
|
|
- RmsCarrier.registerAptitudes ==null ||
|
|
|
- RmsCarrier.contactsName ==null ||
|
|
|
- RmsCarrier.carrierContactNumber ==null ||
|
|
|
- RmsCarrier.carrierType ==null ||
|
|
|
- RmsCarrier.carrierTransportType ==null
|
|
|
- )this.$message.error("存在空值!");
|
|
|
- else
|
|
|
- this.axios
|
|
|
- .post(
|
|
|
- "/api/v1/rms/insertCarrier",
|
|
|
- mapValue
|
|
|
- )
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "新增成功!",
|
|
|
- });
|
|
|
- // this.$refs.table.refreshData();
|
|
|
- this.$router.go(-1);
|
|
|
- } else {
|
|
|
- this.$message.error("新增失败,可能存在重复!");
|
|
|
- }
|
|
|
- this.$refs['table'].resetField();
|
|
|
- });
|
|
|
- },
|
|
|
- // // 取消
|
|
|
- cancel() {
|
|
|
- this.$router.go(-1);
|
|
|
- },
|
|
|
+ RmsCarrier.carrierAbbreviation == null ||
|
|
|
+ RmsCarrier.carrierAddress == null ||
|
|
|
+ RmsCarrier.registerNo == null ||
|
|
|
+ RmsCarrier.carrierBidAreaId == null ||
|
|
|
+ RmsCarrier.carrierLegalRepresentative == null ||
|
|
|
+ RmsCarrier.registerCapital == null ||
|
|
|
+ RmsCarrier.businessScope == null ||
|
|
|
+ RmsCarrier.annualDate == null ||
|
|
|
+ RmsCarrier.companyStatusDesc == null ||
|
|
|
+ RmsCarrier.companyTypeDesc == null ||
|
|
|
+ RmsCarrier.operationPeriod == null ||
|
|
|
+ registerDate.registerDate == null ||
|
|
|
+ RmsCarrier.registerOrganization == null ||
|
|
|
+ RmsCarrier.registerAptitudes == null ||
|
|
|
+ RmsCarrier.contactsName == null ||
|
|
|
+ RmsCarrier.carrierContactNumber == null ||
|
|
|
+ RmsCarrier.carrierType == null ||
|
|
|
+ RmsCarrier.carrierTransportType == null
|
|
|
+ )
|
|
|
+ this.$message.error("存在空值!");
|
|
|
+ else
|
|
|
+ this.axios.post("/api/v1/rms/insertCarrier", mapValue).then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "新增成功!",
|
|
|
+ });
|
|
|
+ // this.$refs.table.refreshData();
|
|
|
+ this.$router.go(-1);
|
|
|
+ } else {
|
|
|
+ this.$message.error("新增失败,可能存在重复!");
|
|
|
+ }
|
|
|
+ this.$refs["table"].resetField();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // // 取消
|
|
|
+ cancel() {
|
|
|
+ this.$router.go(-1);
|
|
|
},
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang='scss' >
|
|
|
-.button-box{
|
|
|
+.user_code {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ .text{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .input{
|
|
|
+ width: 250px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.button-box {
|
|
|
display: flex;
|
|
|
text-align: center;
|
|
|
align-items: center;
|
|
@@ -271,40 +285,38 @@ export default {
|
|
|
margin-top: 0.3125rem;
|
|
|
margin-bottom: 1.25rem;
|
|
|
}
|
|
|
-.form-box{
|
|
|
+.form-box {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
- .el-form-item{
|
|
|
+ .el-form-item {
|
|
|
display: flex;
|
|
|
- width: 350px;
|
|
|
justify-content: center;
|
|
|
-
|
|
|
- .el-form-item__label{
|
|
|
+
|
|
|
+ .el-form-item__label {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
- .el-form-item__content{
|
|
|
- .el-input{
|
|
|
- .el-input__inner{
|
|
|
+ .el-form-item__content {
|
|
|
+ .el-input {
|
|
|
+ .el-input__inner {
|
|
|
width: 250px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-.upload-demo{
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- padding-bottom: 1.0rem;
|
|
|
- .el-upload__tip{
|
|
|
+.upload-demo {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
+ padding-bottom: 1rem;
|
|
|
+ .el-upload__tip {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
- .el-button el-button--primary el-button--small{
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- word-wrap:break-word;
|
|
|
+ .el-button el-button--primary el-button--small {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ word-wrap: break-word;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</style>
|