editWagonLoad.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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="103" 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. export default {
  25. components: { PageTitle },
  26. data(){
  27. return {
  28. form1: {},
  29. }
  30. },
  31. mounted() {
  32. this.information();
  33. },
  34. methods: {
  35. information() {
  36. //编辑车皮装车作业
  37. this.axios
  38. .post("/api/v1/tms/getTmstrainLoadingResultByResultId/" + this.$route.params.resultId)
  39. .then((res) => {
  40. res.data.data.forEach((e) => {
  41. this.form1 = e;
  42. console.log(e);
  43. console.log(this.form1);
  44. console.log(this.$route.params.resultId);
  45. });
  46. });
  47. },
  48. handleCheckedCitiesChange(value) {
  49. console.log(value);
  50. },
  51. // 返回
  52. onClickCancel() {
  53. this.$router.go(-1);
  54. },
  55. currentRadioChange(row) {
  56. this.aaaa = row;
  57. },
  58. // 确认
  59. onClickConfirm() {
  60. let tmstrainLoadingResult = {
  61. resultId: this.$route.params.resultId,
  62. resultWagonNo: this.form1.resultWagonNo,
  63. resultBillableTonnage: this.form1.resultBillableTonnage,
  64. resultIsclear: this.form1.resultIsclear,
  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.resultIsclear==null||
  79. tmstrainLoadingResult.resultClass==null||
  80. tmstrainLoadingResult.sendStationId==null||
  81. tmstrainLoadingResult.arrivalStationId==null||
  82. tmstrainLoadingResult.resultLoadingDate==null||
  83. tmstrainLoadingResult.batchId==null||
  84. tmstrainLoadingResult.resultRemarks==null
  85. ) this.$message.error("必填项存在空值!");
  86. else
  87. this.axios
  88. .post("/api/v1/tms/upadteTmstrainLoadingResultByResultId",tmstrainLoadingResult)
  89. .then(() => {
  90. this.$message({
  91. type: "success",
  92. message: "修改成功!",
  93. });
  94. this.$router.go(-1);
  95. });
  96. },
  97. },
  98. };
  99. </script>
  100. <style lang="scss" scoped>
  101. //@import "@/styles/TMS/addwagonload.scss";
  102. </style>