showCarrier.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <template>
  2. <!-- 修改承运商信息 -->
  3. <div id="contractDetails">
  4. <page-title>查看详情</page-title>
  5. <div class="main">
  6. </div>
  7. <div class="contractimage">
  8. <el-image
  9. style=" height:150px;text-align:center"
  10. :src="src"
  11. :preview-src-list="srcList">
  12. </el-image>
  13. <el-image
  14. style=" height:150px;text-align:center"
  15. :src="src1"
  16. :preview-src-list="srcList1">
  17. </el-image>
  18. <el-image
  19. style=" height:150px;text-align:center"
  20. :src="src2"
  21. :preview-src-list="srcList2">
  22. </el-image>
  23. </div>
  24. <div class="contractTitle">
  25. <div class="form_box">
  26. <dil-form :disabled=true :formId="330" v-model="form1">
  27. </dil-form>
  28. </div>
  29. </div>
  30. </div>
  31. </template>
  32. <script>
  33. import PageTitle from "@/components/Page/Title";
  34. export default {
  35. components: { PageTitle },
  36. data() {
  37. return {
  38. direction2:"",
  39. formInline:{},
  40. isShow:false,
  41. src:"",
  42. srcList:[],
  43. src1:"",
  44. srcList1:[],
  45. src2:"",
  46. srcList2:[],
  47. inputText:"",
  48. form1: {},
  49. registerDate:"",
  50. mapValue:"",
  51. drawer: false,
  52. options:{
  53. // first请求数据的地址
  54. requestUrl: "/api/v1/rms/getCarrierBidAreaList?apiId=406",
  55. selectionType: "radio",
  56. mapList:[],
  57. registerDate:"",
  58. mapValue:""
  59. },
  60. };
  61. },
  62. mounted() {
  63. console.log(this.$route)
  64. this.information();
  65. },
  66. methods: {
  67. handleClose(){
  68. },
  69. onclick(){
  70. this.options.requestUrl="/api/v1/rms/getCarrierBidAreaList?apiId=406&con=" +this.inputText;
  71. },
  72. currentRadioChange(selection){
  73. this.mapList=selection,
  74. console.log(this.mapList)
  75. this.bidArea=this.mapList.bidArea
  76. },
  77. information() {
  78. //编辑
  79. this.axios
  80. .post(
  81. "/api/v1/rms/getCarrierById/" +
  82. this.$route.params.carrierId
  83. )
  84. .then((res) => {
  85. res.data.data.forEach((e) => {
  86. this.form1 = e;
  87. this.srcList=[];
  88. this.srcList1=[];
  89. this.srcList2=[];
  90. this.isShow=true;
  91. this.src=e.carrierBusinessAblelicense;
  92. this.srcList.push(e.carrierBusinessAblelicense);
  93. this.src1=e.carrierBusinessLicense;
  94. this.srcList1.push(e.carrierBusinessLicense);
  95. this.src2=e.carrierTransportCertificate;
  96. this.srcList2.push(e.carrierTransportCertificate);
  97. });
  98. });
  99. },
  100. // 返回
  101. onClickCancel() {
  102. this.$router.go(-1);
  103. },
  104. // 确认
  105. onClickConfirm() {
  106. let RmsCarrier={
  107. carrierId:this.$route.params.carrierId,
  108. carrierName:this.form1.carrierName,
  109. carrierTransportCertificate:this.form1.carrierTransportCertificate,
  110. carrierBusinessLicense:this.form1.carrierBusinessLicense,
  111. carrierBusinessAblelicense:this.form1.carrierBusinessAblelicense,
  112. carrierAbbreviation:this.form1.carrierAbbreviation,
  113. carrierAddress:this.form1.carrierAddress,
  114. registerNo:this.form1.registerNo,
  115. carrierBidAreaId:this.mapList.bidAreaId,
  116. carrierLegalRepresentative:this.form1.carrierLegalRepresentative,
  117. registerCapital:this.form1.registerCapital,
  118. businessScope:this.form1.businessScope,
  119. annualDate:this.form1.annualDate,
  120. companyStatusDesc:this.form1.companyStatusDesc,
  121. companyTypeDesc:this.form1.companyTypeDesc,
  122. operationPeriod:this.form1.operationPeriod,
  123. registerOrganization:this.form1.registerOrganization,
  124. registerAptitudes:this.form1.registerAptitudes,
  125. contactsName:this.form1.contactsName,
  126. carrierContactNumber:this.form1.carrierContactNumber,
  127. carrierType:this.form1.carrierType,
  128. carrierTransportType:this.form1.carrierTransportType
  129. };
  130. let registerDate={
  131. registerDate: this.form1.registerDate,
  132. };
  133. let mapValue={
  134. RmsCarrier:RmsCarrier,
  135. registerDate:registerDate
  136. };
  137. if(
  138. RmsCarrier.carrierName ==null ||
  139. // RmsCarrier.carrierTransportCertificate ==null ||
  140. // RmsCarrier.carrierBusinessLicense ==null ||
  141. // RmsCarrier.carrierBusinessAblelicense ==null ||
  142. RmsCarrier.carrierAbbreviation ==null ||
  143. RmsCarrier.carrierAddress ==null ||
  144. RmsCarrier.registerNo ==null ||
  145. RmsCarrier.carrierBidAreaId ==null ||
  146. RmsCarrier.carrierLegalRepresentative ==null ||
  147. RmsCarrier.registerCapital ==null ||
  148. RmsCarrier.businessScope ==null ||
  149. RmsCarrier.annualDate ==null ||
  150. RmsCarrier.companyStatusDesc ==null ||
  151. RmsCarrier.companyTypeDesc ==null ||
  152. RmsCarrier.operationPeriod ==null ||
  153. registerDate.registerDate ==null ||
  154. RmsCarrier.registerOrganization ==null ||
  155. RmsCarrier.registerAptitudes ==null ||
  156. RmsCarrier.contactsName ==null ||
  157. RmsCarrier.carrierContactNumber ==null ||
  158. RmsCarrier.carrierType ==null ||
  159. RmsCarrier.carrierTransportType ==null
  160. )this.$message.error("存在空值!");
  161. this.axios
  162. .post(
  163. "/api/v1/rms/updateCarrier",
  164. mapValue
  165. )
  166. .then((res) => {
  167. if (res.data.code == "200") {
  168. this.$router.go(-1);
  169. }
  170. });
  171. },
  172. },
  173. };
  174. </script>
  175. <style lang='scss'>
  176. .contractimage{
  177. text-align: center;
  178. position: relative;
  179. left: 85px;
  180. }
  181. .form_box {
  182. display: flex;
  183. justify-content: center;
  184. margin-left: 170px;
  185. margin-top: 15px;
  186. .el-form-item {
  187. display: flex;
  188. justify-content: center;
  189. .el-form-item__label {
  190. display: flex;
  191. align-items: center;
  192. }
  193. .el-form-item__content {
  194. width: 250px;
  195. .el-radio-group {
  196. width: 500px;
  197. }
  198. .el-date-editor {
  199. width: 250px;
  200. }
  201. .el-input__inner {
  202. width: 250px;
  203. }
  204. }
  205. }
  206. }
  207. .center{
  208. display: flex;
  209. justify-content: center;
  210. }
  211. .button-box{
  212. display: flex;
  213. justify-content: center;
  214. .el-button{
  215. width: 80px;
  216. margin-right: 10px;
  217. }
  218. }
  219. </style>