updateBreach.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <!-- 修改油价信息 -->
  3. <div id="contractDetails">
  4. <page-title>编辑</page-title>
  5. <div class="main">
  6. <span class="text">油价信息</span>
  7. </div>
  8. <div class="contractTitle">
  9. <div class="form-box">
  10. <div class="form-one">
  11. <dil-form :formId="356" v-model="form1"></dil-form>
  12. </div>
  13. </div>
  14. </div>
  15. <div class="button-box">
  16. <el-button type="primary" @click="onClickConfirm">确认</el-button>
  17. <el-button @click="onClickCancel">返回</el-button>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import PageTitle from "@/components/Page/Title";
  23. //import { sjTime } from "@/utils/sharedJsFile";
  24. export default {
  25. components: { PageTitle },
  26. data() {
  27. return {
  28. form1: {},
  29. };
  30. },
  31. mounted() {
  32. console.log(this.$route)
  33. this.information();
  34. },
  35. methods: {
  36. information() {
  37. //编辑驳船作业
  38. this.axios
  39. .post("/api/v1/ams/selectBreachToUpdate/" + this.$route.params.breachId)
  40. .then((res) => {
  41. console.log(res)
  42. res.data.data.forEach((e) => {
  43. this.form1 = e;
  44. console.log(e);
  45. console.log(this.form1);
  46. console.log(this.$route.params.priceId);
  47. });
  48. });
  49. },
  50. // 返回
  51. onClickCancel() {
  52. this.$router.go(-1);
  53. },
  54. // 确认
  55. onClickConfirm() {
  56. console.log(this.form1)
  57. let RmsOilPrice = {
  58. priceId:this.form1.priceId,
  59. priceDate:this.form1.priceDate,
  60. priceValue:this.form1.priceValue,
  61. priceOilName:this.form1.priceOilName,
  62. };
  63. this.axios
  64. .post(
  65. "/api/v1/rms/updateOilPrice",
  66. RmsOilPrice
  67. )
  68. .then((res) => {
  69. if (res.data.code == "200") {
  70. this.$router.go(-1);
  71. }
  72. });
  73. },
  74. },
  75. };
  76. </script>
  77. <style lang="scss" scoped>
  78. </style>