updateHandlingFee.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <!-- 修改港口装卸费 -->
  3. <div id="contractDetails">
  4. <page-title>编辑</page-title>
  5. <div class="contractTitle">
  6. <div class="form-box">
  7. <dil-form :formId="223" v-model="form1"></dil-form>
  8. </div>
  9. </div>
  10. <div class="button-box">
  11. <el-button type="primary" @click="onClickConfirm">确认</el-button>
  12. <el-button @click="onClickCancel">返回</el-button>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. import PageTitle from "@/components/Page/Title";
  18. export default {
  19. components: { PageTitle },
  20. data(){
  21. return {
  22. form1: {},
  23. }
  24. },
  25. mounted() {
  26. this.information();
  27. },
  28. methods: {
  29. information() {
  30. //编辑位置作业
  31. this.axios
  32. .post("/api/v1/bms/getFeeToUpdate/" + this.$route.params.feeId)
  33. .then((res) => {
  34. res.data.data.forEach((e) => {
  35. this.form1 = e;
  36. // console.log(e);
  37. // console.log(this.form1);
  38. // console.log(this.$route.params.loadingId);
  39. });
  40. });
  41. },
  42. handleCheckedCitiesChange(value) {
  43. console.log(value);
  44. },
  45. // 返回
  46. onClickCancel() {
  47. this.$router.go(-1);
  48. },
  49. currentRadioChange(row) {
  50. this.aaaa = row;
  51. },
  52. // 确认
  53. onClickConfirm() {
  54. let mapVal = {
  55. feeId: this.$route.params.feeId,
  56. materialId: this.form1.materialId,
  57. feeForeignShipName: this.form1.feeForeignShipName,
  58. feeMaterialTonnage: this.form1.feeMaterialTonnage,
  59. priceId: this.form1.priceId,
  60. feeValue: this.form1.feeValue,
  61. };
  62. console.log(mapVal);
  63. this.axios
  64. .post(
  65. "/api/v1/bms/updatePortHandlingFee",
  66. mapVal
  67. )
  68. .then((res) => {
  69. if (res.data.code == 200) {
  70. this.$message({
  71. type: "success",
  72. message: "修改成功!",
  73. });
  74. // this.$refs.table.refreshData();
  75. this.$router.go(-1);
  76. } else {
  77. this.$message.error("修改失败!");
  78. }
  79. this.$refs['table'].resetField();
  80. });
  81. },
  82. },
  83. };
  84. </script>
  85. <style lang="scss" scoped>
  86. .form-box {
  87. display: flex;
  88. justify-content: center;
  89. align-items: center;
  90. .el-form-item {
  91. display: flex;
  92. .el-form-item__label {
  93. width: 170px !important;
  94. }
  95. .el-input {
  96. width: 210px !important;
  97. }
  98. }
  99. }
  100. </style>