|
@@ -2,32 +2,37 @@
|
|
<!-- 添加汽车衡信息 -->
|
|
<!-- 添加汽车衡信息 -->
|
|
<div class="addWagonLoad">
|
|
<div class="addWagonLoad">
|
|
<PageTitle>返回</PageTitle>
|
|
<PageTitle>返回</PageTitle>
|
|
- <div class="form-box" style="margin-right: 10rem">
|
|
|
|
- <dil-form :formId="317" v-model="form1" ref="from1">
|
|
|
|
- </dil-form>
|
|
|
|
|
|
+ <div class="form-box" style="margin-right: 10rem">
|
|
|
|
+ <dil-form :formId="317" v-model="form1" ref="from1"> </dil-form>
|
|
</div>
|
|
</div>
|
|
- <div class="form-box f1">
|
|
|
|
- <el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
|
- </el-form>
|
|
|
|
- </div>
|
|
|
|
- <div class="inputBox">
|
|
|
|
- <el-input :inline="true"
|
|
|
|
|
|
+ <div class="form-box f1">
|
|
|
|
+ <el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="inputBox">
|
|
|
|
+ <el-input
|
|
|
|
+ :inline="true"
|
|
placeholder="请输入内容"
|
|
placeholder="请输入内容"
|
|
v-model="inputText"
|
|
v-model="inputText"
|
|
- clearable>
|
|
|
|
- </el-input>
|
|
|
|
- <el-button type="primary" class="btn" @click="onclick" :inline="true">
|
|
|
|
|
|
+ clearable
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ <el-button type="primary" class="btn" @click="onclick" :inline="true">
|
|
<i class="el-icon-search"></i>物资列表查询
|
|
<i class="el-icon-search"></i>物资列表查询
|
|
- </el-button>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div> <dilTable v-bind.sync="options" @selection-change="selectionChange"></dilTable></div>
|
|
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div>
|
|
|
|
+ <dilTable
|
|
|
|
+ v-bind.sync="options"
|
|
|
|
+ @selection-change="selectionChange"
|
|
|
|
+ ></dilTable>
|
|
|
|
+ </div>
|
|
|
|
|
|
<div class="button-box">
|
|
<div class="button-box">
|
|
<el-button @click="cancel">取消</el-button>
|
|
<el-button @click="cancel">取消</el-button>
|
|
<el-button type="primary" @click="makeSure">确定</el-button>
|
|
<el-button type="primary" @click="makeSure">确定</el-button>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -38,59 +43,52 @@ export default {
|
|
components: { PageTitle },
|
|
components: { PageTitle },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- materialName:"",
|
|
|
|
|
|
+ materialName: "",
|
|
form1: {},
|
|
form1: {},
|
|
- checkList:[],
|
|
|
|
- inputText:"",
|
|
|
|
- options:{
|
|
|
|
|
|
+ checkList: [],
|
|
|
|
+ inputText: "",
|
|
|
|
+ options: {
|
|
// first请求数据的地址
|
|
// first请求数据的地址
|
|
requestUrl: "/api/v1/rms/getMaterialList?apiId=351",
|
|
requestUrl: "/api/v1/rms/getMaterialList?apiId=351",
|
|
selectionType: "select",
|
|
selectionType: "select",
|
|
- mapList:[]
|
|
|
|
-
|
|
|
|
|
|
+ mapList: [],
|
|
},
|
|
},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {},
|
|
mounted() {},
|
|
methods: {
|
|
methods: {
|
|
- selectionChange(selection){
|
|
|
|
- this.mapList=selection,
|
|
|
|
- console.log(this.mapList)
|
|
|
|
- this.materialName=this.mapList.materialName
|
|
|
|
-
|
|
|
|
|
|
+ selectionChange(selection) {
|
|
|
|
+ (this.mapList = selection), console.log(this.mapList);
|
|
|
|
+ this.materialName = this.mapList.materialName;
|
|
},
|
|
},
|
|
- onclick(){
|
|
|
|
- this.options.requestUrl="/api/v1/rms/getMaterialList?apiId=351&con=" +this.inputText;
|
|
|
|
|
|
+ onclick() {
|
|
|
|
+ this.options.requestUrl =
|
|
|
|
+ "/api/v1/rms/getMaterialList?apiId=351&con=" + this.inputText;
|
|
},
|
|
},
|
|
-
|
|
|
|
- makeSure() {
|
|
|
|
-
|
|
|
|
- console.log(this.form1)
|
|
|
|
-
|
|
|
|
- let rmsTruckCalculate={
|
|
|
|
- truckCalculateNumber:this.form1.truckCalculateNumber,
|
|
|
|
- truckCalculateId:this.form1.truckCalculateId,
|
|
|
|
- truckCalculateLongitude:this.form1.truckCalculateLongitude,
|
|
|
|
- truckCalculateLatitude:this.form1.truckCalculateLatitude,
|
|
|
|
- calculateType:this.form1.calculateType,
|
|
|
|
- };
|
|
|
|
- let map = {
|
|
|
|
- mapList:this.mapList,
|
|
|
|
- rmsTruckCalculate:rmsTruckCalculate
|
|
|
|
|
|
+
|
|
|
|
+ makeSure() {
|
|
|
|
+ console.log(this.form1);
|
|
|
|
+
|
|
|
|
+ let rmsTruckCalculate = {
|
|
|
|
+ truckCalculateNumber: this.form1.truckCalculateNumber,
|
|
|
|
+ truckCalculateId: this.form1.truckCalculateId,
|
|
|
|
+ truckCalculateLongitude: this.form1.truckCalculateLongitude,
|
|
|
|
+ truckCalculateLatitude: this.form1.truckCalculateLatitude,
|
|
|
|
+ calculateType: this.form1.calculateType,
|
|
};
|
|
};
|
|
- if(
|
|
|
|
|
|
+ let map = {
|
|
|
|
+ mapList: this.mapList,
|
|
|
|
+ rmsTruckCalculate: rmsTruckCalculate,
|
|
|
|
+ };
|
|
|
|
+ if (
|
|
rmsTruckCalculate.truckCalculateNumber == null ||
|
|
rmsTruckCalculate.truckCalculateNumber == null ||
|
|
rmsTruckCalculate.truckCalculateLongitude == null ||
|
|
rmsTruckCalculate.truckCalculateLongitude == null ||
|
|
rmsTruckCalculate.truckCalculateLatitude == null ||
|
|
rmsTruckCalculate.truckCalculateLatitude == null ||
|
|
- rmsTruckCalculate.calculateType ==null
|
|
|
|
- )this.$message.error("存在空值!");
|
|
|
|
-
|
|
|
|
- else
|
|
|
|
- this.axios
|
|
|
|
- .post(
|
|
|
|
- "/api/v1/rms/insertTruckCalculate",map
|
|
|
|
- )
|
|
|
|
- .then((res) => {
|
|
|
|
|
|
+ rmsTruckCalculate.calculateType == null
|
|
|
|
+ )
|
|
|
|
+ this.$message.error("存在空值!");
|
|
|
|
+ else
|
|
|
|
+ this.axios.post("/api/v1/rms/insertTruckCalculate", map).then((res) => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.$message({
|
|
this.$message({
|
|
type: "success",
|
|
type: "success",
|
|
@@ -101,37 +99,36 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$message.error("新增失败,可能存在重复!");
|
|
this.$message.error("新增失败,可能存在重复!");
|
|
}
|
|
}
|
|
- this.$refs['table'].resetField();
|
|
|
|
|
|
+ this.$refs["table"].resetField();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
// 取消
|
|
// 取消
|
|
cancel() {
|
|
cancel() {
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
},
|
|
},
|
|
-
|
|
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang='scss' >
|
|
<style lang='scss' >
|
|
- .button-box{
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: center;
|
|
|
|
- .el-button{
|
|
|
|
- width: 80px;
|
|
|
|
- margin-right: 10px;
|
|
|
|
- }
|
|
|
|
|
|
+.button-box {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ .el-button {
|
|
|
|
+ width: 80px;
|
|
|
|
+ margin-right: 10px;
|
|
}
|
|
}
|
|
-.inputBox{
|
|
|
|
|
|
+}
|
|
|
|
+.inputBox {
|
|
display: flex;
|
|
display: flex;
|
|
text-align: center;
|
|
text-align: center;
|
|
align-items: center;
|
|
align-items: center;
|
|
- margin-top: 2rem;
|
|
|
|
- width: 800px;
|
|
|
|
- .el-input__inner{
|
|
|
|
|
|
+ margin-top: 2rem;
|
|
|
|
+ width: 800px;
|
|
|
|
+ .el-input__inner {
|
|
display: flex;
|
|
display: flex;
|
|
- text-align: center;
|
|
|
|
- align-items: center;
|
|
|
|
|
|
+ text-align: center;
|
|
|
|
+ align-items: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.btn-left {
|
|
.btn-left {
|
|
@@ -140,28 +137,28 @@ export default {
|
|
.input {
|
|
.input {
|
|
margin-left: 90px;
|
|
margin-left: 90px;
|
|
}
|
|
}
|
|
-.label{
|
|
|
|
|
|
+.label {
|
|
margin-left: 445px;
|
|
margin-left: 445px;
|
|
margin-bottom: -30px;
|
|
margin-bottom: -30px;
|
|
font: bold;
|
|
font: bold;
|
|
font-size: 1rem;
|
|
font-size: 1rem;
|
|
padding-left: -30px;
|
|
padding-left: -30px;
|
|
- font-family:Arial, Helvetica, sans-serif;
|
|
|
|
- margin-bottom:20px;
|
|
|
|
-}
|
|
|
|
-.label2{
|
|
|
|
|
|
+ font-family: Arial, Helvetica, sans-serif;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+}
|
|
|
|
+.label2 {
|
|
margin-left: 425px;
|
|
margin-left: 425px;
|
|
margin-bottom: -30px;
|
|
margin-bottom: -30px;
|
|
font: bold;
|
|
font: bold;
|
|
font-size: 1rem;
|
|
font-size: 1rem;
|
|
- font-family:Arial, Helvetica, sans-serif
|
|
|
|
|
|
+ font-family: Arial, Helvetica, sans-serif;
|
|
}
|
|
}
|
|
-.label1{
|
|
|
|
|
|
+.label1 {
|
|
margin-left: 345px;
|
|
margin-left: 345px;
|
|
margin-bottom: -30px;
|
|
margin-bottom: -30px;
|
|
font: bold;
|
|
font: bold;
|
|
}
|
|
}
|
|
-.common{
|
|
|
|
|
|
+.common {
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
@@ -169,35 +166,35 @@ export default {
|
|
cursor: default;
|
|
cursor: default;
|
|
color: #2c3e50;
|
|
color: #2c3e50;
|
|
}
|
|
}
|
|
-.f1{
|
|
|
|
|
|
+.f1 {
|
|
margin-top: -2.5rem;
|
|
margin-top: -2.5rem;
|
|
margin-left: 25rem;
|
|
margin-left: 25rem;
|
|
}
|
|
}
|
|
-.f11{
|
|
|
|
|
|
+.f11 {
|
|
margin-top: -3rem;
|
|
margin-top: -3rem;
|
|
// margin-left: 29rem;
|
|
// margin-left: 29rem;
|
|
}
|
|
}
|
|
-.f2{
|
|
|
|
|
|
+.f2 {
|
|
margin-top: -2.5rem;
|
|
margin-top: -2.5rem;
|
|
margin-left: 20.7rem;
|
|
margin-left: 20.7rem;
|
|
}
|
|
}
|
|
-.f3{
|
|
|
|
|
|
+.f3 {
|
|
margin-top: -2.5rem;
|
|
margin-top: -2.5rem;
|
|
margin-left: 25rem;
|
|
margin-left: 25rem;
|
|
}
|
|
}
|
|
-.form-box{
|
|
|
|
|
|
+.form-box {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
- .el-form-item{
|
|
|
|
|
|
+ .el-form-item {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
- .el-form-item__label{
|
|
|
|
|
|
+ .el-form-item__label {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
- .el-form-item__content{
|
|
|
|
- .el-input{
|
|
|
|
- .el-input__inner{
|
|
|
|
|
|
+ .el-form-item__content {
|
|
|
|
+ .el-input {
|
|
|
|
+ .el-input__inner {
|
|
width: 250px;
|
|
width: 250px;
|
|
}
|
|
}
|
|
}
|
|
}
|