changeRecord.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <div>
  3. <FullPage
  4. title='变更记录'
  5. :list='list'
  6. @init='init'
  7. :logList='logList'
  8. @searchData='init'
  9. @changePage='changePage'
  10. :tableColums='tableColums'
  11. :tableData='tableData'
  12. :pageIndex='pageIndex'
  13. :total='total'
  14. >
  15. <div slot='titleButton'>
  16. <Button @click="back" type='primary' ghost style="margin-right:10px;">返回</Button>
  17. </div>
  18. <template slot='set' slot-scope='{row}'>
  19. <div>
  20. <a style="margin:0 5px;" @click="goPage(row)">详情</a>
  21. </div>
  22. </template>
  23. <template slot="urlSet" slot-scope="{ index }">
  24. <div>
  25. <img
  26. @click="looks(tableData[index].img)"
  27. v-for="(el, idx) in tableData[index].img"
  28. :key="idx"
  29. :src="$store.state.ip + el"
  30. alt=""
  31. style="max-width: 40px; max-height: 40px"
  32. />
  33. </div>
  34. </template>
  35. </FullPage>
  36. </div>
  37. </template>
  38. <script>
  39. export default {
  40. data(){
  41. return {
  42. type:1,
  43. order_no:null,
  44. log_List:[],
  45. list:[
  46. {title:'区域编码',name:'Input',serverName:'area_num',placeholder:'请输入区域编码',value:'' },
  47. {title:'区域名称',name:'Input',serverName:'area_title',placeholder:'请输入区域名称',value:''},
  48. {title:'产品名称',name:'Input',serverName:'product_title',placeholder:'请输入产品名称',value:''},
  49. {title:'图号',name:'Input',serverName:'url_number',placeholder:'请输入图号',value:''}
  50. ],
  51. tableColums:[
  52. {title:'区域编码',align:'center',width:'200',key:'area_num'},
  53. {title:'区域名称',align:'center',width:'200',key:'area_title'},
  54. {title:'单位',align:'center',width:'200',key:'area_unit'},
  55. {title:'工程量',align:'center',width:'200',key:'quantity'},
  56. {title:'户型',align:'center',width:'200',key:'house_type'},
  57. {title:'区域备注',align:'center',width:'200',key:'area_remark'},
  58. {title:'产品名称',align:'center',width:'200',key:'product_title'},
  59. {title:'规格',align:'center',width:'200',key:'measure'},
  60. {title:'工艺属性',align:'center',width:'200',key:'process_property'},
  61. {title:'图纸',align:'center',width:'200',key:'img', slot: "urlSet"},
  62. {title:'左右式',align:'center',width:'200',key:'fashion'},
  63. {title:'图号',align:'center',width:'200',key:'url_number'},
  64. {title:'产品备注',align:'center',width:'200',key:'product_remark'},
  65. {title:'变更时间',align:'center',width:'200',key:'crt_time'},
  66. {title:'操作',align:'center',width:'200',key:'plan_start_time',slot:'set'}
  67. ],
  68. tableData:[],
  69. pageIndex:1,
  70. total:0,
  71. selects:[],
  72. }
  73. },
  74. computed:{
  75. logList(){
  76. return [
  77. { key: "订单号:", value: this.log_List.order_no },
  78. { key: "小区名称:", value: this.log_List.residential_name },
  79. { key: "客户姓名:", value:this.log_List.client_name },
  80. { key: "紧急程度:", value: this.log_List.warning_name },
  81. { key: "收款:", value: this.log_List.pay_state==0?'未收款':'已收款' },
  82. { key: "详细地址:", value: this.log_List.address },
  83. { key: "手机号:", value: this.log_List.mobile },
  84. { key: "开始日期:", value:this.log_List.start_time },
  85. { key: "交付日期:", value: this.log_List.end_time },
  86. { key: "业务员:", value: this.log_List.salesman_name },
  87. { key: "订单类型:", value: "工装" },
  88. { key: "备注:", value: this.log_List.remark }
  89. ]
  90. }
  91. },
  92. created(){
  93. },
  94. methods:{
  95. looks(arr) {
  96. // const array = [{ img_url: img }];
  97. const array = arr.map((v) => {
  98. return { img_url: v };
  99. });
  100. console.log("array :>> ", array);
  101. this.$previewImg({
  102. list: array,
  103. baseUrl: this.$store.state.ip,
  104. baseImgField: "img_url",
  105. baseTitleField: "",
  106. });
  107. },
  108. init(row){
  109. console.log(row)
  110. row.order_no = this.$route.query.order_no
  111. this.getData(row)
  112. },
  113. getData(row){
  114. this.axios('/api/change_area_product_list',{params:row}).then(res=>{
  115. if(res.code == 200){
  116. this.tableData = res.data.data;
  117. this.log_List = res.data.detail
  118. this.log_List.start_time = this.func.replaceDateNoHMS(this.log_List.start_time)
  119. this.log_List.end_time = this.func.replaceDateNoHMS(this.log_List.end_time)
  120. this.tableData.forEach(item=>{
  121. item.crt_time = this.func.replaceDateNoHMS(item.crt_time)
  122. })
  123. }
  124. })
  125. },
  126. back(){
  127. this.$router.go(-1)
  128. },
  129. goPage(row){
  130. this.$router.push({
  131. path:'/cms/BidSystem/DeepeningOrder/changeRecordDetail',
  132. query:{
  133. contact_order_no:row.contact_order_no,
  134. order_no:this.$route.query.order_no
  135. }
  136. })
  137. },
  138. changePage(e){},
  139. }
  140. }
  141. </script>
  142. <style lang="scss" scoped>
  143. .log-list{display: flex;flex-wrap:wrap;padding:10px 0;}
  144. </style>