Decorationlist.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <div>
  3. <FullPage
  4. title='工装订单列表(测量订单)'
  5. :list='list'
  6. @init='init'
  7. :logList='logList'
  8. @searchData='init'
  9. @changePage='changePage'
  10. @selectTable='selectTable'
  11. :tableColums='tableColums'
  12. :tableData='tableData'
  13. :pageIndex='pageIndex'
  14. :total='total'
  15. >
  16. <div slot='titleButton'>
  17. <Button @click="back" type='primary' ghost style="margin-right:10px;">返回</Button>
  18. <Button @click="openModal(selects)" type="primary" style="margin-right:10px;" ghost>批量下生产</Button>
  19. <Button type="primary" ghost>批量导出</Button>
  20. </div>
  21. <template slot='set' slot-scope='{row}'>
  22. <div>
  23. <a style="margin:0 5px;" @click="goPage(row)">编辑</a>
  24. <a style="margin:0 5px;" @click="goPage(row)">详情</a>
  25. <a style="margin:0 5px;" @click="openModal(row)">下生产</a>
  26. </div>
  27. </template>
  28. <Modal class-name="vertical-center-modal" title='下生产' v-model="showPlan" @on-ok="sendPlanInfo">
  29. <Form>
  30. <FormItem label="选择时间">
  31. <div style="display:flex;">
  32. <DatePicker v-model="planInfo.start_time" type="date" placeholder="开始时间"></DatePicker>
  33. -
  34. <DatePicker v-model="planInfo.end_time" type="date" placeholder="结束时间"></DatePicker>
  35. </div>
  36. </FormItem>
  37. </Form>
  38. </Modal>
  39. </FullPage>
  40. </div>
  41. </template>
  42. <script>
  43. export default {
  44. data(){
  45. return {
  46. type:1,
  47. order_no:null,
  48. logList:[],
  49. list:[
  50. {title:'按房号',name:'Select',serverName:'number',placeholder:'请选择',value:'',
  51. option:[
  52. {label:'紧急',value:1}
  53. ]
  54. },
  55. {title:'订单状态',name:'Select',serverName:'type',placeholder:'请选择',value:'',
  56. option:[
  57. {label:'紧急',value:1}
  58. ]
  59. },
  60. ],
  61. tableColums:[
  62. {type:'selection',fixed:'left',width:90,align:'center'},
  63. {title:'楼幢',align:'center',width:'200',key:'house'},
  64. {title:'单元',align:'center',width:'200',key:'unit'},
  65. {title:'楼层',align:'center',width:'200',key:'layer'},
  66. {title:'房间号',align:'center',width:'200',key:'number'},
  67. {title:'实际完成时间',align:'center',width:'200',key:'plan_start_time'},
  68. {title:'操作',align:'center',slot:'set',fixed:'right',width:'200'},
  69. ],
  70. tableData:[],
  71. pageIndex:1,
  72. total:0,
  73. showPlan:false,
  74. planInfo:{
  75. house_id:null,
  76. start_time:'',
  77. end_time:''
  78. },
  79. selects:[],
  80. }
  81. },
  82. created(){
  83. },
  84. methods:{
  85. init(row){
  86. row.oa_order_no = this.$route.query.oa_order_no
  87. row.type = 'oa'
  88. this.getData(row)
  89. },
  90. getData(row){
  91. this.axios('/api/orders_house_list',{params:row}).then(res=>{
  92. if(res.code == 200){
  93. this.tableData = res.data.list;
  94. this.logList = res.data.detail
  95. }
  96. })
  97. },
  98. back(){
  99. this.$router.go(-1)
  100. },
  101. postData(){
  102. },
  103. goPage(row){
  104. this.$router.push({
  105. path:'/cms/measurementordermannage/edit',
  106. query:{
  107. house_id:row.house_id,
  108. oa_order_no:row.oa_order_no
  109. }
  110. })
  111. },
  112. changePage(e){},
  113. sendPlanInfo(){
  114. try{
  115. this.planInfo.start_time = new Date(this.planInfo.start_time).toLocaleDateString().replace(/\//g,"-")
  116. this.planInfo.end_time = new Date(this.planInfo.end_time).toLocaleDateString().replace(/\//g,"-")
  117. }catch(e){
  118. }
  119. this.axios.post('/api/order_oa_people',this.planInfo).then(res=>{
  120. if(res.code == 200){
  121. this.$Message.success(res.msg)
  122. }
  123. })
  124. },
  125. openModal(row){
  126. if(Array.isArray(row)){
  127. if(row.length<1){return this.$Message.error('请至少选择一项')}
  128. let result = [];
  129. row.map(v=>result.push(v))
  130. this.planInfo.house_id = result.join(',')
  131. }
  132. this.planInfo.house_id = row.house_id;
  133. this.showPlan = true;
  134. },
  135. selectTable(e){
  136. this.selects = e;
  137. }
  138. }
  139. }
  140. </script>
  141. <style lang="scss" scoped>
  142. .log-list{display: flex;flex-wrap:wrap;padding:10px 0;}
  143. </style>