updateInstructionsCapacity.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <!-- 修改船只信息 -->
  3. <div class="shipTransport">
  4. <page-title>返回</page-title>
  5. <div class="form">
  6. <div class="form_box">
  7. <dil-form :formId="130" v-model="form1" ref="from1"></dil-form>
  8. </div>
  9. </div>
  10. <!-- 确定和取消 -->
  11. <div class="button_box">
  12. <el-button type="primary" @click="onClickConfirm">确认</el-button>
  13. <el-button @click="onClickCancel">返回</el-button>
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import PageTitle from "@/components/Page/Title";
  19. import { sjTime } from "@/utils/sharedJsFile";
  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/tms/getInstructionsCapacity/" + this.$route.params.orderId)
  35. .then((res) => {
  36. res.data.data.forEach((e) => {
  37. this.form1 = e;
  38. });
  39. });
  40. },
  41. handleCheckedCitiesChange(value) {
  42. console.log(value);
  43. },
  44. // 返回
  45. onClickCancel() {
  46. this.$router.go(-1);
  47. },
  48. currentRadioChange(row) {
  49. this.aaaa = row;
  50. },
  51. // 确认
  52. onClickConfirm() {
  53. let omsshipInstructionsCapacity = {
  54. instructionsCapacityId:this.$route.params.orderId,
  55. instructionsId: this.$route.params.instructionsId,
  56. capacityId: this.form1.capacityId,
  57. instructionPlannedLoading: this.form1.instructionPlannedLoading,
  58. instructionsShipPosition: this.form1.instructionsShipPosition,
  59. instructionContactInf: this.form1.instructionContactInf,
  60. instructionsCapacityStatus: this.form1.instructionsCapacityStatus,
  61. instructionEsarrivalTime: sjTime(
  62. this.form1.instructionEsarrivalTime
  63. ),
  64. };
  65. this.axios
  66. .post(
  67. "/api/v1/tms/updateInstructionsCapacity",
  68. omsshipInstructionsCapacity
  69. )
  70. .then((res) => {
  71. if (res.data.code == 200) {
  72. this.$message({
  73. type: "success",
  74. message: "修改成功!",
  75. });
  76. // this.$refs.table.refreshData();
  77. this.$router.go(-1);
  78. } else {
  79. this.$message.error("修改失败!");
  80. }
  81. this.$refs['table'].resetField();
  82. });
  83. },
  84. },
  85. };
  86. </script>
  87. <style lang="scss">
  88. .shipTransport{
  89. .form{
  90. display: flex;
  91. .form_box{
  92. width: 320px;
  93. margin-left: 35%;
  94. margin-top: 30px;
  95. margin-right: 20px;
  96. .el-form{
  97. .preview-group{
  98. .el-form-item{
  99. .el-form-item__label{
  100. display: inline-block;
  101. width: 70px !important;
  102. }
  103. .el-form-item__content{
  104. .el-select{
  105. width: 250px;
  106. }
  107. .el-input{
  108. width: 250px;
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }
  115. }
  116. .button_box{
  117. margin-left: 45%;
  118. }
  119. }
  120. </style>