truckLoadResultEdit.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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="172" v-model="form1"></dil-form>
  13. </div>
  14. </div>
  15. </div>
  16. <div class="button-box">
  17. <el-button @click="onClickCancel">返回</el-button>
  18. <el-button type="primary" @click="onClickConfirm">确认</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. // 表单
  29. form1: {},
  30. // 表格
  31. table1: {},
  32. contractId: "",
  33. };
  34. },
  35. mounted() {
  36. this.information();
  37. },
  38. methods: {
  39. information() {
  40. //编辑运输计划
  41. this.axios
  42. .post("/api/v1/tms/getLoadResultById/" + this.$route.params.resultId)
  43. .then((res) => {
  44. res.data.data.forEach((e) => {
  45. this.form1 = e;
  46. });
  47. });
  48. },
  49. handleCheckedCitiesChange(value) {
  50. console.log(value);
  51. },
  52. // 返回
  53. onClickCancel() {
  54. this.$router.go(-1);
  55. },
  56. // 确认
  57. onClickConfirm() {
  58. let LR = {
  59. resultId: this.$route.params.resultId,
  60. resultLoadStartTime: sjTime(this.form1.resultLoadStartTime),
  61. insertUpdateRemark: this.form1.insertUpdateRemark,
  62. resultIsclear: this.form1.resultIsclear
  63. };
  64. var val = this.value;
  65. if (
  66. LR.resultIsclear==null||
  67. LR.resultLoadStartTime==null||
  68. LR.insertUpdateRemark==null
  69. ) this.$message.error("存在空值!");
  70. else
  71. this.axios
  72. .post("/api/v1/tms/updateLoadResult", LR)
  73. .then(() => {
  74. this.$message({
  75. type: "success",
  76. message: "修改成功!",
  77. });
  78. this.$router.push("/truckLoadResult");
  79. });
  80. },
  81. },
  82. };
  83. </script>
  84. <style lang="scss" scoped>
  85. //@import "@/styles/appoint/contract/ContractInsert.scss";
  86. </style>