showCarrier.vue 6.2 KB

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