modifyDeliveryNotice.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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="143" v-model="form1"></dil-form>
  8. </div>
  9. </div>
  10. <!-- 确定和取消 -->
  11. <div class="button_box">
  12. <el-button @click="onClickCancel">返回</el-button>
  13. <el-button type="primary" @click="onClickConfirm">确认</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/selectByNoticeId/" + this.$route.params.noticeId)
  35. .then((res) => {
  36. res.data.data.forEach((e) => {
  37. this.form1 = e;
  38. console.log(e);
  39. console.log("aaa" +this.form1);
  40. console.log(this.$route.params.pathId);
  41. });
  42. });
  43. },
  44. // 确认
  45. onClickConfirm() {
  46. let AmsshipDeliveryNotice = {
  47. noticeId: this.$route.params.noticeId,
  48. requesterGroupId:this.form1.requesterGroupId,
  49. carrierId:this.form1.carrierId,
  50. noticeCommerceMethod:this.form1.noticeCommerceMethod,
  51. noticeHandoverMethod:this.form1.noticeHandoverMethod,
  52. portId:this.form1.portId,
  53. noticePortConstructionFee:this.form1.noticePortConstructionFee,
  54. noticeDeliveryTime:sjTime(
  55. this.form1.noticeDeliveryTime
  56. ),
  57. noticePileFreeDays:this.form1.noticePileFreeDays,
  58. materialCapacityName:this.form1.materialCapacityName,
  59. noticeDistrbutionStatus:this.form1.noticeDistrbutionStatus,
  60. batchId:this.form1.batchId,
  61. purchaseContractUnitPrice:this.form1.purchaseContractUnitPrice,
  62. purchaseContractMoisture:this.form1.purchaseContractMoisture,
  63. tfeContent:this.form1.tfeContent,
  64. silicaContent:this.form1.silicaContent,
  65. aluminaContent:this.form1.aluminaContent,
  66. phosphorusContent:this.form1.phosphorusContent,
  67. manganeseContent:this.form1.manganeseContent,
  68. };
  69. // function isNumber() {
  70. // var value = AmsshipCargoTransferResult.resultTelephoneFax;
  71. // //验证是否为数字
  72. // var patrn = /^(-)?\d+(\.\d+)?$/;
  73. // if (patrn.exec(value) == null || value == "") {
  74. // return false;
  75. // } else {
  76. // return true;
  77. // }
  78. // }
  79. // var val = this.value;
  80. // if (
  81. // AmsshipCargoTransferResult.resultTelephoneFax==null||
  82. // AmsshipCargoTransferResult.resultContactPerson==null
  83. // ) this.$message.error("存在空值!");
  84. // else
  85. // if (!isNumber(val)) this.$message.error("联系电话必须是数字!");
  86. // else
  87. console.log("AmsshipDeliveryNotice",AmsshipDeliveryNotice);
  88. this.axios
  89. .post("/api/v1/tms/editDeliveryNotice" ,AmsshipDeliveryNotice
  90. )
  91. .then(() => {
  92. this.$message({
  93. type: "success",
  94. message: "修改成功!",
  95. });
  96. this.$router.go(-1);
  97. });
  98. },
  99. // 返回
  100. onClickCancel() {
  101. this.$router.go(-1);
  102. },
  103. },
  104. };
  105. </script>
  106. <style lang="scss">
  107. .shipTransport{
  108. .form{
  109. display: flex;
  110. .form_box{
  111. width: 320px;
  112. margin-left: 35%;
  113. margin-top: 30px;
  114. margin-right: 20px;
  115. .el-form{
  116. .preview-group{
  117. .el-form-item{
  118. .el-form-item__label{
  119. display: inline-block;
  120. width: 70px !important;
  121. }
  122. .el-form-item__content{
  123. .el-select{
  124. width: 250px;
  125. }
  126. .el-input{
  127. width: 250px;
  128. }
  129. }
  130. }
  131. }
  132. }
  133. }
  134. }
  135. .button_box{
  136. margin-left: 45%;
  137. }
  138. }
  139. </style>