editWagonLoad.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <!-- 修改车皮装车实绩 -->
  3. <div id="contractDetails">
  4. <page-title>编辑</page-title>
  5. <div class="main">
  6. <span class="text">车皮装车实绩</span>
  7. <span class="a"></span>
  8. </div>
  9. <div class="contractTitle">
  10. <div class="form-box">
  11. <div class="form-one">
  12. <dil-form :formId="254" v-model="form1"></dil-form>
  13. </div>
  14. </div>
  15. </div>
  16. <div class="button-box">
  17. <el-button type="primary" @click="onClickConfirm">确认</el-button>
  18. <el-button @click="onClickCancel">返回</el-button>
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. import PageTitle from "@/components/Page/Title";
  24. // import { sjTime } from "@/utils/sharedJsFile";
  25. export default {
  26. components: { PageTitle },
  27. data(){
  28. return {
  29. form1: {},
  30. }
  31. },
  32. mounted() {
  33. this.information();
  34. },
  35. methods: {
  36. information() {
  37. //编辑车皮装车作业
  38. this.axios
  39. .post("/api/v1/tms/getTmstrainLoadingResultByResultId/" + this.$route.params.resultId)
  40. .then((res) => {
  41. res.data.data.forEach((e) => {
  42. this.form1 = e;
  43. console.log(e);
  44. console.log(this.form1);
  45. console.log(this.$route.params.resultId);
  46. });
  47. });
  48. },
  49. handleCheckedCitiesChange(value) {
  50. console.log(value);
  51. },
  52. // 返回
  53. onClickCancel() {
  54. this.$router.go(-1);
  55. },
  56. currentRadioChange(row) {
  57. this.aaaa = row;
  58. },
  59. // 确认
  60. onClickConfirm() {
  61. let tmstrainLoadingResult = {
  62. resultId: this.$route.params.resultId,
  63. resultWagonNo: this.form1.resultWagonNo,
  64. resultBillableTonnage: this.form1.resultBillableTonnage,
  65. resultClass: this.form1.resultClass,
  66. sendStationId: this.form1.sendStationId,
  67. arrivalStationId: this.form1.arrivalStationId,
  68. resultLoadingDate: sjTime(this.form1.resultLoadingDate),
  69. batchId: this.form1.batchId,
  70. capacityId: this.form1.capacityId,
  71. resultMaterialNumber: this.form1.resultMaterialNumber,
  72. resultMaterialTheoryweight: this.form1.resultMaterialTheoryweight,
  73. resultRemarks: this.form1.resultRemarks
  74. };
  75. if (
  76. tmstrainLoadingResult.resultWagonNo==null||
  77. tmstrainLoadingResult.resultBillableTonnage==null||
  78. tmstrainLoadingResult.resultClass==null||
  79. tmstrainLoadingResult.sendStationId==null||
  80. tmstrainLoadingResult.arrivalStationId==null||
  81. tmstrainLoadingResult.resultLoadingDate==null||
  82. tmstrainLoadingResult.batchId==null
  83. ) this.$message.error("必填项存在空值!");
  84. else
  85. this.axios
  86. .post("/api/v1/tms/upadteTmstrainLoadingResultByResultId",tmstrainLoadingResult)
  87. .then(() => {
  88. this.$message({
  89. type: "success",
  90. message: "修改成功!",
  91. });
  92. this.$router.go(-1);
  93. });
  94. },
  95. },
  96. };
  97. </script>
  98. <style lang="scss" scoped>
  99. // @import "@/styles/TMS/addwagonload.scss";
  100. </style>