updateOtherPrice.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <!-- 修改其他价格信息 -->
  3. <div id="contractDetails">
  4. <page-title>编辑</page-title>
  5. <div class="contractTitle">
  6. <div class="form-box">
  7. <div class="form-one">
  8. <dil-form :formId="221" v-model="form1"></dil-form>
  9. </div>
  10. </div>
  11. </div>
  12. <div class="button-box">
  13. <el-button type="primary" @click="onClickConfirm">确认</el-button>
  14. <el-button @click="onClickCancel">返回</el-button>
  15. </div>
  16. </div>
  17. </template>
  18. <script>
  19. import PageTitle from "@/components/Page/Title";
  20. export default {
  21. components: { PageTitle },
  22. data(){
  23. return {
  24. form1: {},
  25. }
  26. },
  27. mounted() {
  28. this.information();
  29. },
  30. methods: {
  31. information() {
  32. //编辑驳船作业
  33. this.axios
  34. .post("/api/v1/ams/selectLoadUnloadPriceToUpdate/" + this.$route.params.priceId)
  35. .then((res) => {
  36. res.data.data.forEach((e) => {
  37. this.form1 = e;
  38. // console.log(e);
  39. // console.log(this.form1);
  40. // console.log(this.$route.params.loadingId);
  41. });
  42. });
  43. },
  44. handleCheckedCitiesChange(value) {
  45. console.log(value);
  46. },
  47. // 返回
  48. onClickCancel() {
  49. this.$router.go(-1);
  50. },
  51. currentRadioChange(row) {
  52. this.aaaa = row;
  53. },
  54. // 确认
  55. onClickConfirm() {
  56. let amsContractOtherPrice = {
  57. priceId: this.$route.params.priceId,
  58. priceType: this.form1.priceType,
  59. priceValue: this.form1.priceValue
  60. };
  61. console.log(amsContractOtherPrice);
  62. this.axios
  63. .post(
  64. "/api/v1/ams/updateLoadUnloadPrice",
  65. amsContractOtherPrice
  66. )
  67. .then((res) => {
  68. console.log(res);
  69. console.log(this.form1);
  70. this.$router.go(-1);
  71. });
  72. },
  73. },
  74. };
  75. </script>
  76. <style lang="scss" scoped>
  77. .form-box {
  78. display: flex;
  79. justify-content: center;
  80. align-items: center;
  81. .el-form-item {
  82. display: flex;
  83. .el-form-item__label {
  84. width: 170px !important;
  85. }
  86. .el-input {
  87. width: 210px !important;
  88. }
  89. }
  90. }
  91. .button-box {
  92. display: flex;
  93. align-items: center;
  94. justify-content: center;
  95. }
  96. </style>