IncompleteStatisticsDetail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <template>
  2. <div>
  3. <Toptitle title="详情">
  4. <slot name="titleButton">
  5. <Button
  6. type='primary'
  7. ghost
  8. style="margin-right:10px;">栏目设置</Button>
  9. <Button type="primary"
  10. style="margin-right:10px;"
  11. ghost>导出</Button>
  12. <Button type="primary"
  13. style="margin-right:10px;"
  14. @click="back"
  15. ghost>返回</Button>
  16. </slot>
  17. </Toptitle>
  18. <div style="height:80%;overflow:auto">
  19. <Form style="display:flex;margin:10px 0;flex-wrap:wrap" :label-width='90'>
  20. <FormItem label='项目编码:' style="width:250px"><span>{{searchData.order_no}}</span></FormItem>
  21. <FormItem label='项目名称:' style="width:250px"><span>{{searchData.project_name}}</span></FormItem>
  22. <FormItem label='图号:' style="width:250px"> <Tooltip :content="searchData.url_number" placement="bottom" transfer max-width='400'>
  23. <span>{{searchData.url_number.toString().length>=16?searchData.url_number.toString().slice(0,16)+"...":searchData.url_number}}</span>
  24. </Tooltip></FormItem>
  25. <FormItem label='未完工平方:' style="width:250px"><span>{{searchData.area}}</span></FormItem>
  26. <FormItem label='查询日期:' style="width:250px">
  27. <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.search_date"></DatePicker>
  28. </FormItem>
  29. <FormItem label='工序名称:' style="width:250px">
  30. <Select v-model="searchData.process_id" filterable clearable multiple>
  31. <Option v-for="item in process_list" :key="item.id" :label="item.title" :value='item.id'/>
  32. </Select>
  33. </FormItem>
  34. <FormItem label='班组名称:' style="width:250px">
  35. <Select v-model='searchData.employee_id' filterable clearable multiple>
  36. <Option v-for="item in band_list" :key="item.id" :label="item.nickname" :value='item.id'/>
  37. </Select>
  38. </FormItem>
  39. <FormItem label='图号:' style="width:250px">
  40. <Select v-model="searchData.product_id" filterable clearable multiple>
  41. <Option v-for="item in url_number_list" :key="item.product_id" :value="item.product_id" :label="item.url_number"/>
  42. </Select>
  43. </FormItem>
  44. <FormItem label='楼幢:' style="width:250px">
  45. <Select v-model="searchData.house" filterable clearable multiple>
  46. <Option v-for="(item,index) in house_list" :key="index" :value="item" :label="item"/>
  47. </Select>
  48. </FormItem>
  49. <FormItem label='单元:' style="width:250px">
  50. <Select v-model="searchData.unit" filterable clearable multiple>
  51. <Option v-for="(item,index) in unit_list" :key="index" :value="item" :label="item"/>
  52. </Select>
  53. </FormItem>
  54. <FormItem label='楼层:' style="width:250px">
  55. <Select v-model="searchData.layer" filterable clearable multiple>
  56. <Option v-for="(item,index) in layer_list" :key="index" :value="item" :label="item"/>
  57. </Select>
  58. </FormItem>
  59. <FormItem label='房号:' style="width:250px">
  60. <Select v-model="searchData.house_number" filterable clearable multiple>
  61. <Option v-for="(item,index) in house_number_list" :key="index" :value="item" :label='item'/>
  62. </Select>
  63. </FormItem>
  64. <FormItem label='产品:' style="width:250px">
  65. <Select v-model="searchData.product_id" filterable clearable multiple>
  66. <Option v-for="item in url_number_list" :key="item.product_id" :value="item.product_id" :label="item.title"/>
  67. </Select>
  68. </FormItem>
  69. <FormItem label='组合名称:' style="width:250px">
  70. <Select v-model="searchData.compose_name" filterable clearable multiple>
  71. <Option v-for="(item,index) in compose_list" :key="index" :value="item.title" :label="item.title"/>
  72. </Select>
  73. </FormItem>
  74. <FormItem label='部件:' style="width:250px">
  75. <Select v-model="searchData.part_id" filterable clearable multiple>
  76. <Option v-for="item in part_list" :key="item.id" :value="item.id" :label="item.title"/>
  77. </Select>
  78. </FormItem>
  79. <FormItem label='派工日期:' style="width:400px">
  80. <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.push_start_time"></DatePicker>
  81. ~
  82. <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData.push_end_time"></DatePicker>
  83. </FormItem>
  84. <FormItem label='完工日期:' style="width:400px">
  85. <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData. complete_start_time"></DatePicker>
  86. ~
  87. <DatePicker type="date" placeholder="年/月/日" style="width: 130px" size='small' v-model="searchData. complete_end_time"></DatePicker>
  88. </FormItem>
  89. <FormItem>
  90. <Button type="primary" size='small' @click="init">搜索</Button>
  91. </FormItem>
  92. </Form>
  93. <Table
  94. :data='tableData'
  95. :columns='tableColumns'
  96. border>
  97. <template slot="over_date" slot-scope="{row}">
  98. <span :style="Number(row.over_date)>=0?{}:{'color':'red'}">{{row.over_date}}</span>
  99. </template>
  100. </Table>
  101. </div>
  102. <div style="text-align:center;margin-top:20px">
  103. <Page :page-size-opts="[10, 20, 30, 40,100]"
  104. @on-page-size-change='changeSize'
  105. @on-change='changePage'
  106. :current='pageIndex'
  107. show-total
  108. :total="total"
  109. show-sizer
  110. :page-size='pageSize' />
  111. </div>
  112. </div>
  113. </template>
  114. <script>
  115. export default {
  116. name:'CompletionStatisticsDetail',
  117. data(){
  118. return{
  119. house_number_list:[],
  120. unit_list:[],
  121. part_list:[],
  122. compose_list:[],
  123. house_list:[],
  124. url_number_list:[],
  125. pageSize:10,
  126. pageIndex:1,
  127. total:0,
  128. searchData:{
  129. search_date:new Date(),//查询时间
  130. process_id:[],//工序id
  131. employee_id:[],//班组id
  132. house:[],//楼栋
  133. unit:[],//单元
  134. layer:[],//楼层
  135. house_number:[],//房号
  136. product_id:[],//产品id
  137. compose_name:[],//组合id
  138. part_id:[],//部件id
  139. push_start_time:'',//派工日期(起)
  140. push_end_time:'',//(末)
  141. complete_start_time:'',//完工日期(起)
  142. complete_end_time:''//(末)
  143. },
  144. tableData:[],
  145. tableColumns:[
  146. {title:'逾期天数',align:'center',minWidth:120,key:'over_date',slot:'over_date'},
  147. {title:'工序',align:'center',minWidth:120,key:'produce'},
  148. {title:'班组',align:'center',minWidth:120,key:'employee'},
  149. {title:'楼栋',align:'center',minWidth:120,key:'house'},
  150. {title:'单元',align:'center',minWidth:120,key:'unit'},
  151. {title:'楼层',align:'center',minWidth:120,key:'layer'},
  152. {title:'房号',align:'center',minWidth:120,key:'house_number'},
  153. {title:'图号',align:'center',minWidth:120,key:'url_number'},
  154. {title:'产品名称',align:'center',minWidth:120,key:'product_title'},
  155. {title:'组合名称',align:'center',minWidth:120,key:'compose_name'},
  156. {title:'未完工平方',align:'center',minWidth:120,key:'ext_1'},
  157. {title:'派工日期',align:'center',minWidth:120,key:'push_time'},
  158. {title:'预计完工日期',align:'center',minWidth:120,key:'plan_complete_time'},
  159. ],
  160. process_list:[],
  161. band_list:[],
  162. layer_list:[],
  163. }
  164. },
  165. created(){
  166. this.searchData = {...this.searchData,...this.$route.query};
  167. // //工序列表
  168. // this.axios.post('/api/ext_produce_list').then(res=>{this.process_list = res.data});
  169. // //班组列表
  170. // this.axios("/api/employee_list").then((res) => (this.band_list = res.data));
  171. },
  172. mounted(){
  173. this.getData();
  174. },
  175. methods:{
  176. init(){
  177. let data = [];
  178. data = JSON.parse(JSON.stringify(this.searchData));
  179. data.push_start_time=data.push_start_time?Date.parse(data.push_start_time).toString().slice(0,10):'';
  180. data.push_end_time=data.push_end_time?Date.parse(data.push_end_time).toString().slice(0,10):'';
  181. data.complete_start_time=data.complete_start_time?Date.parse(data.complete_start_time).toString().slice(0,10):'';
  182. data.complete_end_time=data.complete_end_time?Date.parse(data.complete_end_time).toString().slice(0,10):'';
  183. data.search_date=Date.parse(data.search_date).toString().slice(0,10);
  184. this.getData(data)
  185. },
  186. goPageDetail(row){
  187. this.$router.push({path:'/cms/BidSystem/CompletionStatisticsConfig',query:{...row,...this.$route.query}})
  188. },
  189. back(){
  190. this.$router.go(-1)
  191. },
  192. changeSize(e){
  193. this.pageSize = e;
  194. this.getData();
  195. },
  196. changePage(e){
  197. this.pageIndex = e;
  198. this.getData();
  199. },
  200. getData(row){
  201. this.axios.post('/api/finance_un_complete_total_detail',{
  202. page_size:this.pageSize,
  203. page_index:this.pageIndex,
  204. produce_id:this.$route.query.produce_id,
  205. employee_id:this.$route.query.employee_id,
  206. start_time:this.$route.query.start_time,
  207. end_time:this.$route.query.end_time,
  208. order_no:this.$route.query.order_no,
  209. ...row
  210. }).then(res=>{
  211. this.tableData = res.data.data;
  212. this.total =res.data.total;
  213. this.url_number_list = res.data.product_list;
  214. this.house_list = res.data.house_list;
  215. let layer = [];
  216. res.data.house_list.forEach(v=>{
  217. if(layer.indexOf(v.layer)<0){
  218. layer.push(v.layer);
  219. }
  220. })
  221. this.layer_list = layer;
  222. let house = [];
  223. res.data.house_list.forEach(v=>{
  224. if(house.indexOf(v.house)<0){
  225. house.push(v.house);
  226. }
  227. })
  228. this.house_list = house;
  229. let unit = [];
  230. res.data.house_list.forEach(v=>{
  231. if(unit.indexOf(v.unit)<0){
  232. unit.push(v.unit);
  233. }
  234. })
  235. this.unit_list = unit;
  236. let house_number = [];
  237. res.data.house_list.forEach(v=>{
  238. if(house_number.indexOf(v.number)<0){
  239. house_number.push(v.number);
  240. }
  241. })
  242. this.house_number_list = house_number;
  243. this.compose_list = [];
  244. res.data.compose_list.forEach(element => {
  245. let obj ={};
  246. obj.title = element;
  247. this.compose_list.push(obj);
  248. });
  249. this.part_list = res.data.part_list;
  250. this.process_list = res.data.produce_list;
  251. this.band_list = res.data.employee_list;
  252. })
  253. }
  254. }
  255. }
  256. </script>
  257. <style lang="scss" scoped>
  258. </style>