|
@@ -1,20 +1,15 @@
|
|
|
<template>
|
|
|
<!-- 修改车皮装车实绩 -->
|
|
|
- <div id="contractDetails">
|
|
|
+ <div class="addWagonLoad">
|
|
|
<page-title>编辑</page-title>
|
|
|
- <div class="main">
|
|
|
- <span class="text">车皮装车实绩</span>
|
|
|
- <span class="a"></span>
|
|
|
- </div>
|
|
|
- <div class="contractTitle">
|
|
|
- <div class="form-box">
|
|
|
- <div class="form-one">
|
|
|
- <dil-form :formId="254" v-model="form1"></dil-form>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <div class="form">
|
|
|
+ <div class="form_box">
|
|
|
+ <dil-form :formId="254" v-model="form1"></dil-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="button-box">
|
|
|
+ <div class="button_box">
|
|
|
<el-button type="primary" @click="onClickConfirm">确认</el-button>
|
|
|
<el-button @click="onClickCancel">返回</el-button>
|
|
|
</div>
|
|
@@ -23,28 +18,37 @@
|
|
|
|
|
|
<script>
|
|
|
import PageTitle from "@/components/Page/Title";
|
|
|
-
|
|
|
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
|
|
|
export default {
|
|
|
components: { PageTitle },
|
|
|
- data(){
|
|
|
- return {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
form1: {},
|
|
|
- }
|
|
|
- },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.form1 = {
|
|
|
+ arrivalStationId: 1,
|
|
|
+ };
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.information();
|
|
|
},
|
|
|
methods: {
|
|
|
information() {
|
|
|
+ console.log("add", this.$route.params);
|
|
|
//编辑车皮装车作业
|
|
|
this.axios
|
|
|
- .post("/api/v1/tms/getTmstrainLoadingResultByResultId/" + this.$route.params.resultId)
|
|
|
+ .post(
|
|
|
+ "/api/v1/tms/getTmstrainLoadingResultByResultId/" +
|
|
|
+ this.$route.params.unloadingId
|
|
|
+ )
|
|
|
.then((res) => {
|
|
|
res.data.data.forEach((e) => {
|
|
|
this.form1 = e;
|
|
|
- console.log(e);
|
|
|
- console.log(this.form1);
|
|
|
- console.log(this.$route.params.resultId);
|
|
|
+ // console.log(e);
|
|
|
+ // console.log(this.form1);
|
|
|
+ // console.log(this.$route.params.resultId);
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -61,7 +65,7 @@ export default {
|
|
|
// 确认
|
|
|
onClickConfirm() {
|
|
|
let tmstrainLoadingResult = {
|
|
|
- resultId: this.$route.params.resultId,
|
|
|
+ resultId: this.$route.params.unloadingId,
|
|
|
resultWagonNo: this.form1.resultWagonNo,
|
|
|
resultBillableTonnage: this.form1.resultBillableTonnage,
|
|
|
resultClass: this.form1.resultClass,
|
|
@@ -72,31 +76,77 @@ export default {
|
|
|
capacityId: this.form1.capacityId,
|
|
|
resultMaterialNumber: this.form1.resultMaterialNumber,
|
|
|
resultMaterialTheoryweight: this.form1.resultMaterialTheoryweight,
|
|
|
- resultRemarks: this.form1.resultRemarks
|
|
|
+ resultRemarks: this.form1.resultRemarks,
|
|
|
};
|
|
|
if (
|
|
|
- tmstrainLoadingResult.resultWagonNo==null||
|
|
|
- tmstrainLoadingResult.resultBillableTonnage==null||
|
|
|
- tmstrainLoadingResult.resultClass==null||
|
|
|
- tmstrainLoadingResult.sendStationId==null||
|
|
|
- tmstrainLoadingResult.arrivalStationId==null||
|
|
|
- tmstrainLoadingResult.resultLoadingDate==null||
|
|
|
- tmstrainLoadingResult.batchId==null
|
|
|
- ) this.$message.error("必填项存在空值!");
|
|
|
+ tmstrainLoadingResult.resultWagonNo == null ||
|
|
|
+ tmstrainLoadingResult.resultBillableTonnage == null ||
|
|
|
+ tmstrainLoadingResult.resultClass == null ||
|
|
|
+ tmstrainLoadingResult.sendStationId == null ||
|
|
|
+ tmstrainLoadingResult.arrivalStationId == null ||
|
|
|
+ tmstrainLoadingResult.resultLoadingDate == null ||
|
|
|
+ tmstrainLoadingResult.batchId == null
|
|
|
+ )
|
|
|
+ this.$message.error("必填项存在空值!");
|
|
|
else
|
|
|
- this.axios
|
|
|
- .post("/api/v1/tms/upadteTmstrainLoadingResultByResultId",tmstrainLoadingResult)
|
|
|
- .then(() => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "修改成功!",
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ "/api/v1/tms/upadteTmstrainLoadingResultByResultId",
|
|
|
+ tmstrainLoadingResult
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "修改成功!",
|
|
|
+ });
|
|
|
+ this.$router.go(-1);
|
|
|
});
|
|
|
- this.$router.go(-1);
|
|
|
- });
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-// @import "@/styles/TMS/addwagonload.scss";
|
|
|
+.addWagonLoad {
|
|
|
+ color: #606266;
|
|
|
+ font-size: 0.675rem;
|
|
|
+ font-weight: 500;
|
|
|
+ .form {
|
|
|
+ display: flex;
|
|
|
+ .form_box {
|
|
|
+ width: 340px;
|
|
|
+ margin-left: 37%;
|
|
|
+ margin-right: 20px;
|
|
|
+ .el-form {
|
|
|
+ .preview-group {
|
|
|
+ .el-form-item {
|
|
|
+ .el-form-item__label {
|
|
|
+ display: inline-block;
|
|
|
+ width: 70px !important;
|
|
|
+ }
|
|
|
+ .el-form-item__content {
|
|
|
+ .el-select {
|
|
|
+ width: 250px;
|
|
|
+ }
|
|
|
+ .el-input {
|
|
|
+ width: 250px;
|
|
|
+ }
|
|
|
+ .el-textarea {
|
|
|
+ .el-textarea__inner {
|
|
|
+ width: 220px;
|
|
|
+ margin-top: 0.03rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .button_box {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ padding-top: 30px;
|
|
|
+ margin-left: 3.5%;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|