detailsPageEdit.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <template>
  2. <div v-loading.fullscreen.lock="fullscreenLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button
  6. type="danger"
  7. style="border: none;background: none;color: red"
  8. icon="el-icon-arrow-left"
  9. @click="backToList"
  10. >返回列表
  11. </el-button>
  12. </div>
  13. <div>
  14. <div class="el-button&#45;&#45;small-yh add-customer-btn">
  15. <el-button type="primary" size="small" @click="storage()">保存</el-button>
  16. </div>
  17. </div>
  18. </div>
  19. <trade-card title="基础资料" style="margin-top: 50px">
  20. <avue-form :option="optionForm" v-model="form"></avue-form>
  21. </trade-card>
  22. <trade-card title="箱信息">
  23. <avue-crud ref="crudBox" :option="optionBox" :data="dataListBox"></avue-crud>
  24. </trade-card>
  25. <trade-card title="代理信息">
  26. <avue-crud ref="crudAgent" :option="optionAgent" :data="dataListAgent"></avue-crud>
  27. </trade-card>
  28. <trade-card title="投标对比">
  29. <avue-crud ref="crudAgent" :option="optionBid" :data="dataListBid"></avue-crud>
  30. </trade-card>
  31. </div>
  32. </template>
  33. <script>
  34. import {detailDelegationList, saveSaveList} from "@/api/bidingDocument/issueTender";
  35. export default {
  36. name: "detailsPageEdit",
  37. data(){
  38. return {
  39. fullscreenLoading:false,
  40. optionForm:{
  41. submitBtn:false,
  42. emptyBtn:false,
  43. span:6,
  44. column:[{
  45. label:'发布日期',
  46. prop:'releaseTime',
  47. type: "datetime",
  48. format:'yyyy-MM-dd HH:mm:ss',
  49. valueFormat:'yyyy-MM-dd HH:mm:ss'
  50. },{
  51. label:'截止日期',
  52. prop:'deadlineTime',
  53. type: "datetime",
  54. format:'yyyy-MM-dd HH:mm:ss',
  55. valueFormat:'yyyy-MM-dd HH:mm:ss'
  56. },{
  57. label:'合同号',
  58. prop:'contractNo',
  59. },{
  60. label:'状态',
  61. prop:'status',
  62. dataType: "string",
  63. type: 'select',
  64. dicUrl: "/api/blade-system/dict-biz/dictionary?code=bid_status",
  65. props: {
  66. label: "dictValue",
  67. value: "dictKey"
  68. }
  69. },{
  70. label:'起运港',
  71. prop:'departureHarbor',
  72. filterable: true,
  73. type: "select",
  74. dicUrl:"/api/blade-client/port/allList",
  75. props: {
  76. label: "name",
  77. value: "name"
  78. }
  79. },{
  80. label:'目的港',
  81. prop:'objectiveHarbor',
  82. filterable: true,
  83. type: "select",
  84. dicUrl:"/api/blade-client/port/allList",
  85. props: {
  86. label: "name",
  87. value: "name"
  88. }
  89. },{
  90. label:'起运地',
  91. prop:'departureLand',
  92. filterable: true,
  93. type: "select",
  94. dicUrl:"/api/blade-client/port/allList",
  95. props: {
  96. label: "name",
  97. value: "name"
  98. }
  99. },{
  100. label:'目的地',
  101. prop:'objectiveLand',
  102. filterable: true,
  103. type: "select",
  104. dicUrl:"/api/blade-client/port/allList",
  105. props: {
  106. label: "name",
  107. value: "name"
  108. }
  109. },{
  110. label:'装柜日期',
  111. prop:'loadingTime',
  112. type: "datetime",
  113. format:'yyyy-MM-dd HH:mm:ss',
  114. valueFormat:'yyyy-MM-dd HH:mm:ss'
  115. },{
  116. label:'是否直航',
  117. prop:'directFlight',
  118. type: 'select',
  119. dicData:[{
  120. label:'是',
  121. value:1
  122. },{
  123. label:'否',
  124. value:0
  125. }]
  126. },{
  127. label:'转港',
  128. prop:'transshipment',
  129. filterable: true,
  130. type: "select",
  131. dicUrl:"/api/blade-client/port/allList",
  132. props: {
  133. label: "name",
  134. value: "name"
  135. }
  136. },{
  137. label:'运输方式',
  138. prop:'transportType',
  139. type: 'select',
  140. dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
  141. props: {
  142. label: "dictValue",
  143. value: "dictValue"
  144. }
  145. },{
  146. label:'运输条款',
  147. prop:'transportClause',
  148. },{
  149. label:'件数',
  150. prop:'number',
  151. },{
  152. label:'包装',
  153. prop:'packing',
  154. type: 'select',
  155. dicUrl: "/api/blade-system/dict-biz/dictionary?code=packaging",
  156. props: {
  157. label: "dictValue",
  158. value: "dictValue"
  159. }
  160. },{
  161. label:'重量(kgs)',
  162. prop:'weight',
  163. },{
  164. label:'尺码(cmb)',
  165. prop:'size',
  166. },{
  167. label:'货物信息',
  168. prop:'cargoInformation',
  169. span:18,
  170. },{
  171. label:'备注',
  172. prop:'remark',
  173. type:'textarea',
  174. span:24,
  175. }]
  176. },
  177. optionBox:{
  178. align:'center',
  179. refreshBtn:false,
  180. addBtn:false,
  181. addRowBtn:true,
  182. cellBtn:true,
  183. column:[{
  184. label:'箱型',
  185. prop: 'boxType',
  186. cell: true,
  187. },{
  188. label:'箱量',
  189. prop: 'boxAmount',
  190. cell: true,
  191. },{
  192. label:'海运费',
  193. prop: 'seaFreight',
  194. cell: true,
  195. },{
  196. label:'起运港箱使费',
  197. prop: 'departureHarborFee',
  198. cell: true,
  199. },{
  200. label:'目的港箱使费',
  201. prop: 'objectiveHarborFee',
  202. cell: true,
  203. },{
  204. label:'状态',
  205. prop: 'status',
  206. type: 'select',
  207. dataType: "string",
  208. dicUrl: "/api/blade-system/dict-biz/dictionary?code=bid_status",
  209. props: {
  210. label: "dictValue",
  211. value: "dictKey"
  212. },
  213. cell: true,
  214. },{
  215. label:'备注',
  216. prop: 'remark',
  217. cell: true,
  218. }]
  219. },
  220. optionAgent:{
  221. align:'center',
  222. refreshBtn:false,
  223. addBtn:false,
  224. addRowBtn:true,
  225. cellBtn:true,
  226. column:[{
  227. label:'名称',
  228. prop: 'agentName',
  229. cell: true,
  230. },{
  231. label:'联系人',
  232. prop: 'contacts',
  233. cell: true,
  234. },{
  235. label:'邮箱',
  236. prop: 'mailbox',
  237. cell: true,
  238. },{
  239. label:'电话',
  240. prop: 'phone',
  241. cell: true,
  242. },{
  243. label:'状态',
  244. prop: 'status',
  245. type: 'select',
  246. dataType: "string",
  247. dicUrl: "/api/blade-system/dict-biz/dictionary?code=bid_status",
  248. props: {
  249. label: "dictValue",
  250. value: "dictKey"
  251. },
  252. cell: true,
  253. },{
  254. label:'备注',
  255. prop: 'remark',
  256. cell: true,
  257. }]
  258. },
  259. optionBid:{
  260. align:'center',
  261. refreshBtn:false,
  262. addBtn:false,
  263. addRowBtn:true,
  264. cellBtn:true,
  265. column:[{
  266. label:'名称',
  267. prop: 'contrastName',
  268. cell: true,
  269. },{
  270. label:'船公司',
  271. prop: 'shippingCompany',
  272. cell: true,
  273. },{
  274. label:'船名',
  275. prop: 'shipName',
  276. cell: true,
  277. },{
  278. label:'箱型',
  279. prop: 'boxType',
  280. cell: true,
  281. },{
  282. label:'运费',
  283. prop: 'seaFreight',
  284. cell: true,
  285. },{
  286. label:'起运港箱使费',
  287. prop: 'departureHarborFee',
  288. cell: true,
  289. },{
  290. label:'目的港箱使费',
  291. prop: 'objectiveHarborFee',
  292. cell: true,
  293. },{
  294. label:'状态',
  295. prop: 'status',
  296. type: 'select',
  297. dataType: "string",
  298. dicUrl: "/api/blade-system/dict-biz/dictionary?code=bid_status",
  299. props: {
  300. label: "dictValue",
  301. value: "dictKey"
  302. },
  303. cell: true,
  304. },{
  305. label:'备注',
  306. prop: 'remark',
  307. cell: true,
  308. }]
  309. },
  310. form:{},
  311. dataListBox:[],
  312. dataListAgent:[],
  313. dataListBid:[],
  314. }
  315. },
  316. props: {
  317. id: {
  318. type: String
  319. }
  320. },
  321. created() {
  322. if (this.id){
  323. this.refreshData(this.id)
  324. }
  325. },
  326. methods:{
  327. backToList(){
  328. this.$emit('backToList', false)
  329. },
  330. storage(){
  331. let form = {
  332. ...this.form,
  333. itemsList:this.dataListBox,
  334. agentList:this.dataListAgent,
  335. contrastList:this.dataListBid
  336. }
  337. // this.loading = true;
  338. saveSaveList(form).then(res=>{
  339. console.log(res)
  340. this.refreshData(res.data.data.id)
  341. })
  342. },
  343. refreshData(id){
  344. let ids = ''
  345. if (id) {
  346. ids = id
  347. } else {
  348. ids = this.form.id
  349. }
  350. this.fullscreenLoading = true
  351. detailDelegationList({id: ids}).then(res=>{
  352. this.form = res.data.data
  353. this.dataListBox = this.form.itemsList
  354. this.dataListAgent = this.form.agentList
  355. this.dataListBid = this.form.contrastList
  356. delete this.form.itemsList
  357. delete this.form.agentList
  358. delete this.form.contrastList
  359. this.fullscreenLoading = false
  360. })
  361. },
  362. }
  363. }
  364. </script>
  365. <style scoped lang="scss">
  366. ::v-deep .el-form-item {
  367. margin-bottom: 8px;
  368. }
  369. </style>