addDeliveryNotice.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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="112" v-model="form1" ref="from1" @change="onchange"></dil-form>
  8. </div>
  9. <div class="liulan">
  10. <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
  11. </div>
  12. </div>
  13. <!-- 确定和取消 -->
  14. <div class="button_box">
  15. <el-button @click="cancel">取消</el-button>
  16. <el-button type="primary" @click="makeSure">确定</el-button>
  17. </div>
  18. <!-- 模态框 -->
  19. <el-drawer
  20. :visible.sync="drawer"
  21. :direction="direction"
  22. :before-close="handleClose"
  23. size="50%"
  24. >
  25. <el-input placeholder="请输入内容" v-model="input" style="margin-top:10px;margin-left:20px;width:250px" clearable> </el-input>
  26. <el-button type="primary" class="btn" @click="onclick()" style="margin-bottom:15px">
  27. <i class="el-icon-search"></i>查询
  28. </el-button>
  29. <dilTable v-bind.sync="options" @radio-change="currentRadioChange1" ></dilTable>
  30. </el-drawer>
  31. </div>
  32. </template>
  33. <script>
  34. import PageTitle from "@/components/Page/Title";
  35. export default {
  36. components: { PageTitle },
  37. data() {
  38. return {
  39. input:'',
  40. drawer:false,
  41. direction:"rtl",
  42. form1: {},
  43. options:{
  44. requestUrl:"/api/v1/tms/getBatchListForAttorney?apiId=375",
  45. selectionType:"radio",
  46. maplist:[]
  47. },
  48. value: undefined,
  49. };
  50. },
  51. mounted() {},
  52. methods: {
  53. onDrawer(){
  54. this.drawer = true
  55. },
  56. onchange(val){
  57. },
  58. onclick(){
  59. this.options.requestUrl = "/api/v1/tms/getBatchList?apiId=375&con=" + this.input
  60. },
  61. currentRadioChange1(selection){
  62. this.maplist = selection
  63. this.form1 = {
  64. batchId:selection.shipName + selection.materialName
  65. }
  66. },
  67. handleClose(done){
  68. done();
  69. },
  70. makeSure() {
  71. let AmsshipDeliveryNotice = {
  72. // purchaseId:this.form1.purchaseId,
  73. carrierId:this.form1.carrierId,
  74. // noticeId:this.form1.noticeId,
  75. // cargoId:this.form1.cargoId,
  76. requesterGroupId:this.form1.requesterGroupId,
  77. // cargoTransferResultId:this.form1.cargoTransferResultId,
  78. noticeCommerceMethod:this.form1.noticeCommerceMethod,
  79. noticeHandoverMethod:this.form1.noticeHandoverMethod,
  80. portId:this.form1.portId,
  81. noticePortConstructionFee:this.form1.noticePortConstructionFee,
  82. noticeDeliveryTime:sjTime(
  83. this.form1.noticeDeliveryTime
  84. ),
  85. noticePileFreeDays:this.form1.noticePileFreeDays,
  86. noticeDistructionStatus:this.form1.noticeDistructionStatus,
  87. batchId:this.maplist.batchId,
  88. purchaseContractUnitPrice:this.form1.purchaseContractUnitPrice,
  89. purchaseContractMoisture:this.form1.purchaseContractMoisture,
  90. purchaseContractQualityindex:this.form1.purchaseContractQualityindex,
  91. //微元素含量
  92. tfeContent:this.form1.tfeContent,
  93. silicaContent:this.form1.silicaContent,
  94. aluminaContent:this.form1.aluminaContent,
  95. phosphorusContent:this.form1.phosphorusContent,
  96. manganeseContent:this.form1.manganeseContent,
  97. };
  98. if (
  99. // AmsshipDeliveryAttorney.attorneyId==null||
  100. // AmsshipDeliveryAttorney.downSwimPortId==null||
  101. // AmsshipDeliveryAttorney.attorenyPickupIdcard==null||
  102. // AmsshipDeliveryAttorney.attorneyContactTelephone==null||
  103. // AmsshipDeliveryAttorney.attorneyTime==null||
  104. // AmsshipDeliveryAttorney.attorneyPdffile==null
  105. AmsshipDeliveryNotice.noticeHandoverMethod==null
  106. ) this.$message.error("存在空值!");
  107. else
  108. this.axios
  109. .post(
  110. "/api/v1/tms/insertDeliveryNotice",
  111. AmsshipDeliveryNotice
  112. )
  113. .then((res) => {
  114. // console.log(res);
  115. // console.log(this.form4);
  116. this.$router.go(-1);
  117. });
  118. },
  119. // 取消
  120. cancel() {
  121. this.$router.go(-1);
  122. },
  123. },
  124. };
  125. </script>
  126. <style lang='scss'>
  127. .shipTransport{
  128. .form{
  129. display: flex;
  130. .form_box{
  131. width: 320px;
  132. margin-left: 35%;
  133. margin-top: 30px;
  134. margin-right: 20px;
  135. .el-form{
  136. .preview-group{
  137. .el-form-item{
  138. .el-form-item__label{
  139. display: inline-block;
  140. width: 70px !important;
  141. }
  142. .el-form-item__content{
  143. .el-select{
  144. width: 250px;
  145. }
  146. .el-input{
  147. width: 250px;
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. }
  155. .liulan{
  156. width: 120px;
  157. margin-top: 30px;
  158. .el-button{
  159. width: 100px !important;
  160. margin: auto;
  161. }
  162. .btn{
  163. margin-top: 0px;
  164. }
  165. .btn1{
  166. margin-top: 13px;
  167. }
  168. .btn2{
  169. margin-top: 67px;
  170. }
  171. }
  172. .button_box{
  173. margin-left: 45%;
  174. }
  175. }
  176. </style>