|
@@ -6,6 +6,90 @@
|
|
|
<div class="form-box" style="margin-right: 10rem">
|
|
|
<dil-form :formId="330" v-model="form1"></dil-form>
|
|
|
</div>
|
|
|
+ <!-- <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
+ multiple
|
|
|
+ :limit="1"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ :file-list="fileList"
|
|
|
+ >
|
|
|
+ <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="https://jsonplaceholder.typicode.com/posts/"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
+ multiple
|
|
|
+ :limit="1"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ :file-list="fileList"
|
|
|
+ >
|
|
|
+ <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="https://jsonplaceholder.typicode.com/posts/"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
+ multiple
|
|
|
+ :limit="1"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ :file-list="fileList"
|
|
|
+ >
|
|
|
+ <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>
|
|
|
+ <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">
|
|
|
+ <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
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </dilTable>
|
|
|
+
|
|
|
<div class="button-box">
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
<el-button type="primary" @click="makeSure">确定</el-button>
|
|
@@ -15,21 +99,37 @@
|
|
|
|
|
|
<script>
|
|
|
import PageTitle from "@/components/Page/Title";
|
|
|
-
|
|
|
export default {
|
|
|
components: { PageTitle },
|
|
|
data() {
|
|
|
return {
|
|
|
form1: {},
|
|
|
value: undefined,
|
|
|
+ drawer: false,
|
|
|
carrierType:{},
|
|
|
- carrierTransportType:{}
|
|
|
+ carrierTransportType:{},
|
|
|
+ options:{
|
|
|
+ // first请求数据的地址
|
|
|
+ requestUrl: "/api/v1/rms/getCarrierBidAreaList?apiId=406",
|
|
|
+ selectionType: "radio",
|
|
|
+ mapList:[],
|
|
|
+ registerDate:"",
|
|
|
+ mapValue:""
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- onClick(){},
|
|
|
+ onclick(){
|
|
|
+ this.options.requestUrl="/api/v1/rms/getCarrierBidAreaList?apiId=406&con=" +this.inputText;
|
|
|
+ },
|
|
|
+ currentRadioChange(selection){
|
|
|
+ this.mapList=selection,
|
|
|
+ console.log(this.mapList)
|
|
|
+ this.bidArea=this.mapList.bidArea
|
|
|
+
|
|
|
+ },
|
|
|
makeSure() {
|
|
|
- console.log(this.form1)
|
|
|
+ let reg=new RegExp(/^[0-9]*$/);
|
|
|
let RmsCarrier={
|
|
|
carrierName:this.form1.carrierName,
|
|
|
carrierTransportCertificate:this.form1.carrierTransportCertificate,
|
|
@@ -38,7 +138,7 @@ export default {
|
|
|
carrierAbbreviation:this.form1.carrierAbbreviation,
|
|
|
carrierAddress:this.form1.carrierAddress,
|
|
|
registerNo:this.form1.registerNo,
|
|
|
- carrierBidAreaId:this.form1.carrierBidAreaId,
|
|
|
+ carrierBidAreaId:this.mapList.bidAreaId,
|
|
|
carrierLegalRepresentative:this.form1.carrierLegalRepresentative,
|
|
|
registerCapital:this.form1.registerCapital,
|
|
|
businessScope:this.form1.businessScope,
|
|
@@ -46,7 +146,6 @@ export default {
|
|
|
companyStatusDesc:this.form1.companyStatusDesc,
|
|
|
companyTypeDesc:this.form1.companyTypeDesc,
|
|
|
operationPeriod:this.form1.operationPeriod,
|
|
|
- registerDate: sjTime(this.form1.registerDate),
|
|
|
registerOrganization:this.form1.registerOrganization,
|
|
|
registerAptitudes:this.form1.registerAptitudes,
|
|
|
contactsName:this.form1.contactsName,
|
|
@@ -54,57 +153,93 @@ export default {
|
|
|
carrierType:this.form1.carrierType,
|
|
|
carrierTransportType:this.form1.carrierTransportType
|
|
|
};
|
|
|
+ let registerDate={
|
|
|
+ registerDate: this.form1.registerDate,
|
|
|
+ };
|
|
|
+ let mapValue={
|
|
|
+ RmsCarrier:RmsCarrier,
|
|
|
+ registerDate:registerDate
|
|
|
+ };
|
|
|
if(
|
|
|
- RmsCarrier.carrierName ==null ||
|
|
|
- // RmsCarrier.carrierTransportCertificate ==null ||
|
|
|
- // RmsCarrier.carrierBusinessLicense ==null ||
|
|
|
- // RmsCarrier.carrierBusinessAblelicense ==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 ||
|
|
|
- RmsCarrier.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",
|
|
|
- RmsCarrier
|
|
|
- )
|
|
|
- .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();
|
|
|
- });
|
|
|
+ reg.test(RmsCarrier.carrierContactNumber)==false
|
|
|
+ )this.$message.error("输入的格式不正确");
|
|
|
+ else if(
|
|
|
+ RmsCarrier.carrierName ==null ||
|
|
|
+ // RmsCarrier.carrierTransportCertificate ==null ||
|
|
|
+ // RmsCarrier.carrierBusinessLicense ==null ||
|
|
|
+ // RmsCarrier.carrierBusinessAblelicense ==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);
|
|
|
+ },
|
|
|
},
|
|
|
- // // 取消
|
|
|
- cancel() {
|
|
|
- this.$router.go(-1);
|
|
|
- },
|
|
|
- },
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang='scss' scoped>
|
|
|
-
|
|
|
+<style lang='scss' >
|
|
|
+.button-box{
|
|
|
+ display: flex;
|
|
|
+ text-align: center;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin-top: 0.3125rem;
|
|
|
+ margin-bottom: 1.25rem;
|
|
|
+}
|
|
|
+.form-box{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ .el-form-item{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ .el-form-item__label{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .el-form-item__content{
|
|
|
+ .el-input{
|
|
|
+ .el-input__inner{
|
|
|
+ width: 250px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|