addDeliveryAttorney.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <!-- 添加提货委托 -->
  3. <div class="addWagonLoad">
  4. <PageTitle>返回</PageTitle>
  5. <el-divider content-position="left">提货委托</el-divider>
  6. <div class="form-box" style="margin-right: 10rem">
  7. <el-form
  8. ><dil-form :formId="113" v-model="form1" ref="from1"></dil-form
  9. ></el-form>
  10. <div class="buttonins">
  11. <el-button type="primary" @click="onDrawer">浏览</el-button>
  12. </div>
  13. </div>
  14. <div class="button-box">
  15. <el-button @click="cancel">取消</el-button>
  16. <el-button type="primary" @click="makeSure">确定</el-button>
  17. </div>
  18. <el-drawer
  19. :visible.sync="drawer"
  20. :direction="direction"
  21. :before-close="handleClose"
  22. size="30%"
  23. >
  24. <el-input
  25. placeholder="请输入内容"
  26. v-model="input"
  27. style="margin-top: 10px; margin-left: 20px"
  28. clearable
  29. >
  30. </el-input>
  31. <el-button
  32. type="primary"
  33. class="btn"
  34. @click="onclick()"
  35. style="margin-bottom: 15px"
  36. >
  37. <i class="el-icon-search"></i>查询
  38. </el-button>
  39. <dilTable
  40. v-bind.sync="options"
  41. @radio-change="currentRadioChange1"
  42. ></dilTable>
  43. </el-drawer>
  44. </div>
  45. </template>
  46. <script>
  47. import PageTitle from "@/components/Page/Title";
  48. export default {
  49. components: { PageTitle },
  50. data() {
  51. return {
  52. input: "",
  53. drawer: false,
  54. direction: "rtl",
  55. options: {
  56. requestUrl: "/api/v1/tms/getBatchListForAttorney?apiId=375",
  57. selectionType: "radio",
  58. maplist: [],
  59. },
  60. form1: {},
  61. value: undefined,
  62. };
  63. },
  64. mounted() {},
  65. methods: {
  66. onDrawer() {
  67. this.drawer = true;
  68. },
  69. onclick() {
  70. this.options.requestUrl =
  71. "/api/v1/tms/getBatchListForAttorney?apiId=375&con=" + this.input;
  72. },
  73. handleClose(done) {
  74. done();
  75. },
  76. currentRadioChange1(selection) {
  77. this.maplist = selection;
  78. this.form1 = {
  79. batchId: selection.shipName + selection.materialName,
  80. };
  81. },
  82. // 确定
  83. makeSure() {
  84. let AmsshipDeliveryAttorney = {
  85. downSwimPortId: this.form1.downSwimPortId,
  86. attorenyPickupIdcard: this.form1.attorenyPickupIdcard,
  87. attorneyContactTelephone: this.form1.attorneyContactTelephone,
  88. batchId: this.maplist.batchId,
  89. attorneyTime: sjTime(this.form1.attorneyTime),
  90. attorneyPdffile: this.form1.attorneyPdffile,
  91. noticeId: this.form1.noticeId,
  92. portId: this.form1.portId,
  93. attorneyPickupContactPerson: this.form1.attorneyPickupContactPerson,
  94. resultMemo: this.form1.resultMemo,
  95. };
  96. if (
  97. // AmsshipDeliveryAttorney.attorneyId==null||
  98. // AmsshipDeliveryAttorney.downSwimPortId==null||
  99. // AmsshipDeliveryAttorney.attorenyPickupIdcard==null||
  100. AmsshipDeliveryAttorney.attorneyContactTelephone == null
  101. // AmsshipDeliveryAttorney.attorneyTime==null||
  102. // AmsshipDeliveryAttorney.attorneyPdffile==null
  103. )
  104. this.$message.error("存在空值!");
  105. else
  106. this.axios
  107. .post(
  108. "/api/v1/tms/insertshipDeliveryAttorney",
  109. AmsshipDeliveryAttorney
  110. )
  111. .then((res) => {
  112. // console.log(res);
  113. // console.log(this.form4);
  114. this.$router.go(-1);
  115. });
  116. },
  117. // 取消
  118. cancel() {
  119. this.$router.go(-1);
  120. },
  121. },
  122. };
  123. </script>
  124. <style lang='scss' scoped>
  125. .buttonins {
  126. height: auto;
  127. }
  128. </style>