Browse Source

首页当月成本额明细

yuhan 11 months ago
parent
commit
e624f5bac5

+ 364 - 0
src/views/module_kzks/dashboard/chengbeneDetali/clfDetail.vue

@@ -0,0 +1,364 @@
+<template>
+  <a-table
+    ref="table"
+    size="middle"
+    :scroll="{x:true}"
+    bordered
+    rowKey="id"
+    :columns="columns"
+    :dataSource="dataSource"
+    :pagination="ipagination"
+    :loading="loading"
+    class="j-table-force-nowrap">
+  </a-table>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: 'clfDetail',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+    },
+    data () {
+      return {
+        // 表头
+        columns: [
+          {
+            title: '序号',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+                return parseInt(index)+1;
+            }
+          },
+          {
+            title:'库存组织',
+            align:"center",
+            dataIndex: 'kczz'
+          },
+          {
+            title:'仓库',
+            align:"center",
+            dataIndex: 'ck'
+          },
+          {
+            title:'制单人',
+            align:"center",
+            dataIndex: 'zdr'
+          },
+          {
+            title:'制单日期',
+            align:"center",
+            dataIndex: 'zdrq'
+          },
+          {
+            title:'出库单号',
+            align:"center",
+            dataIndex: 'ckdh'
+          },
+          {
+            title:'行号',
+            align:"center",
+            dataIndex: 'hh'
+          },
+          {
+            title:'出库类型',
+            align:"center",
+            dataIndex: 'cklx'
+          },
+          {
+            title:'原图纸编码',
+            align:"center",
+            dataIndex: 'ytzbm'
+          },
+          {
+            title:'原图纸规格',
+            align:"center",
+            dataIndex: 'ytzgg'
+          },
+          {
+            title:'物料分类',
+            align:"center",
+            dataIndex: 'wlfl'
+          },
+          {
+            title:'物料编码',
+            align:"center",
+            dataIndex: 'wlbm'
+          },
+          {
+            title:'是否积压物资',
+            align:"center",
+            dataIndex: 'sfjywz'
+          },
+          {
+            title:'	国产/进口',
+            align:"center",
+            dataIndex: 'gcjk'
+          },
+          {
+            title:'物资名称',
+            align:"center",
+            dataIndex: 'wzmc'
+          },
+          {
+            title:'型号规格',
+            align:"center",
+            dataIndex: 'ggxh'
+          },
+          {
+            title:'外观标识',
+            align:"center",
+            dataIndex: 'wgbs'
+          },
+          {
+            title:'供应商批次号',
+            align:"center",
+            dataIndex: 'gyspch'
+          },
+          {
+            title:'质量等级',
+            align:"center",
+            dataIndex: 'zldj'
+          },
+          {
+            title:'封装形式',
+            align:"center",
+            dataIndex: 'fzxs'
+          },
+          {
+            title:'生产厂商',
+            align:"center",
+            dataIndex: 'sccs'
+          },
+          {
+            title:'应发数量',
+            align:"center",
+            dataIndex: 'yfsl'
+          },
+          {
+            title:'实发数量',
+            align:"center",
+            dataIndex: 'sfsl'
+          },
+          {
+            title:'质保有效期',
+            align:"center",
+            dataIndex: 'zbyxq'
+          },
+          {
+            title:'质保单位',
+            align:"center",
+            dataIndex: 'zbdw'
+          },
+          {
+            title:'质保依据',
+            align:"center",
+            dataIndex: 'zbyj'
+          },
+          {
+            title:'配套指令号',
+            align:"center",
+            dataIndex: 'ptzlh'
+          },
+          {
+            title:'投产任务号',
+            align:"center",
+            dataIndex: 'tcrwh'
+          },
+          {
+            title:'研制阶段',
+            align:"center",
+            dataIndex: 'yzjd'
+          },
+          {
+            title:'设备名称',
+            align:"center",
+            dataIndex: 'sbmc'
+          },
+          {
+            title:'单板号',
+            align:"center",
+            dataIndex: 'dbh'
+          },
+          {
+            title:'合格证号',
+            align:"center",
+            dataIndex: 'hgzh'
+          },
+          {
+            title:'合格证是否已上传',
+            align:"center",
+            dataIndex: 'hgzysc'
+          },
+          {
+            title:'DPA号',
+            align:"center",
+            dataIndex: 'dpah'
+          },
+          {
+            title:'领用单位',
+            align:"center",
+            dataIndex: 'lydw'
+          },
+          {
+            title:'领用人',
+            align:"center",
+            dataIndex: 'lyr'
+          },
+          {
+            title:'仓库名称',
+            align:"center",
+            dataIndex: 'ckmc'
+          },
+          {
+            title:'单据状态',
+            align:"center",
+            dataIndex: 'djztone'
+          },
+          {
+            title:'单位',
+            align:"center",
+            dataIndex: 'dw'
+          },
+          {
+            title:'内转移价',
+            align:"center",
+            dataIndex: 'nzyj'
+          },
+          {
+            title:'单价',
+            align:"center",
+            dataIndex: 'nbdj'
+          },
+          {
+            title:'采购单价',
+            align:"center",
+            dataIndex: 'cgdj'
+          },
+          {
+            title:'金额',
+            align:"center",
+            dataIndex: 'je'
+          },
+          {
+            title:'储位号',
+            align:"center",
+            dataIndex: 'cwh'
+          },
+          {
+            title:'当前保管员',
+            align:"center",
+            dataIndex: 'dqbgy'
+          },
+          {
+            title:'出库状态',
+            align:"center",
+            dataIndex: 'ckzt'
+          },
+          {
+            title:'单据状态',
+            align:"center",
+            dataIndex: 'djzttwo'
+          },
+          {
+            title:'配套单号',
+            align:"center",
+            dataIndex: 'ptdh'
+          },
+          {
+            title:'备料计划单号',
+            align:"center",
+            dataIndex: 'bljhdh'
+          },
+          {
+            title:'批次号',
+            align:"center",
+            dataIndex: 'pch'
+          },
+          {
+            title:'首次入库时间',
+            align:"center",
+            dataIndex: 'scrksj'
+          },
+          {
+            title:'任务号',
+            align:"center",
+            dataIndex: 'rwh'
+          },
+          {
+            title:'型号分类',
+            align:"center",
+            dataIndex: 'xhfl'
+          },
+          {
+            title:'军品管理员',
+            align:"center",
+            dataIndex: 'jpgly'
+          },
+          {
+            title:'民品管理员',
+            align:"center",
+            dataIndex: 'mpgly'
+          },
+          {
+            title:'箱号',
+            align:"center",
+            dataIndex: 'xh'
+          },
+          {
+            title:'智能仓储标识',
+            align:"center",
+            dataIndex: 'znccbs'
+          },
+          {
+            title:'打印次数',
+            align:"center",
+            dataIndex: 'dycs'
+          },
+          {
+            title:'A',
+            align:"center",
+            dataIndex: 'a'
+          },
+          {
+            title:'优先级',
+            align:"center",
+            dataIndex: 'yxj'
+          },
+        ],
+        url: {
+          // list: "/index/getZhiChuDetail",
+          list: "/index/getClfDetailNew",
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    },
+    computed: {
+    },
+    methods: {
+      initDictConfig(){
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>
+<style lang="less" scoped>
+  .u-dialog-card{
+    /deep/.ant-card-body{
+      padding: 0 !important;
+    }
+  }
+</style>

+ 195 - 0
src/views/module_kzks/dashboard/chengbeneDetali/otherDetail.vue

@@ -0,0 +1,195 @@
+<template>
+  <a-table
+    ref="table"
+    size="middle"
+    :scroll="{x:true}"
+    bordered
+    rowKey="id"
+    :columns="columns"
+    :dataSource="dataSource"
+    :pagination="ipagination"
+    :loading="loading"
+    class="j-table-force-nowrap">
+  </a-table>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import { getAction } from '@/api/manage'
+
+  export default {
+    name: 'OtherDetail',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+    },
+    props: ['listUrl'],
+    data () {
+      return {
+        // 表头
+        columns: [
+          {
+            title: '序号',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+                return parseInt(index)+1;
+            }
+          },
+          {
+            title:'年度',
+            align:"center",
+            dataIndex: 'nd'
+          },
+          {
+            title:'凭证日期',
+            align:"center",
+            dataIndex: 'pzrq'
+          },
+          {
+            title:'凭证号',
+            align:"center",
+            dataIndex: 'pzh'
+          },
+          {
+            title:'摘要',
+            align:"center",
+            dataIndex: 'zy'
+          },
+          {
+            title:'科目编号',
+            align:"center",
+            dataIndex: 'kmbh'
+          },
+          {
+            title:'科目名称',
+            align:"center",
+            dataIndex: 'km'
+          },
+          {
+            title:'方向',
+            align:"center",
+            dataIndex: 'fx'
+          },
+          {
+            title:'金额',
+            align:"center",
+            dataIndex: 'je'
+          },
+          {
+            title:'部门',
+            align:"center",
+            dataIndex: 'zrbm'
+          },
+          {
+            title:'往来单位',
+            align:"center",
+            dataIndex: 'wldw'
+          },
+          {
+            title:'辅助金额',
+            align:"center",
+            dataIndex: 'fzje'
+          },
+          {
+            title:'制单人',
+            align:"center",
+            dataIndex: 'zdr'
+          },
+          {
+            title:'会计期间',
+            align:"center",
+            dataIndex: 'kjqj'
+          },
+          {
+            title:'凭证内码',
+            align:"center",
+            dataIndex: 'pznm'
+          },
+          {
+            title:'项目编号',
+            align:"center",
+            dataIndex: 'xmbh'
+          },
+          {
+            title:'项目名称',
+            align:"center",
+            dataIndex: 'xmmc'
+          },
+          {
+            title:'项目类别',
+            align:"center",
+            dataIndex: 'xmlb'
+          },
+          {
+            title:'任务号',
+            align:"center",
+            dataIndex: 'taskno'
+          },
+        ],
+        // url: {
+        //   list: "/index/getZhiChuDetail",
+        // },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    },
+    computed: {
+    },
+    watch: {
+      listUrl(oldValue, newValue){
+        console.log(oldValue, newValue)
+        this.loadData()
+      }
+    },
+    methods: {
+      loadData(arg) {
+        if(!this.listUrl){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        this.loading = true;
+        getAction(this.listUrl, params).then((res) => {
+          if (res.success) {
+            //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+            this.dataSource = res.result.records||res.result;
+            if(res.result.total)
+            {
+              this.ipagination.total = res.result.total;
+            }else{
+              this.ipagination.total = 0;
+            }
+            //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+          }else{
+            this.$message.warning(res.message)
+          }
+        }).finally(() => {
+          this.loading = false
+        })
+      },
+      initDictConfig(){
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>
+<style lang="less" scoped>
+  .u-dialog-card{
+    /deep/.ant-card-body{
+      padding: 0 !important;
+    }
+  }
+</style>

+ 75 - 111
src/views/module_kzks/dashboard/modulesDetail/ChengbenDetailList.vue

@@ -1,131 +1,50 @@
 <template>
-  <a-card :bordered="false">
+  <a-card :bordered="false" class="u-dialog-card">
 
-    <!-- table区域-begin -->
-    <div>
-      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div> -->
-
-      <a-table
-        ref="table"
-        size="middle"
-        :scroll="{x:true}"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        class="j-table-force-nowrap"
-        @change="handleTableChange">
-      </a-table>
+    <div class="table-operator">
+      <a-button type="primary" icon="download" @click="handleExportXls('当月成本额明细')">导出</a-button>
     </div>
+    <a-tabs :default-active-key="0" @change="changeTab">
+      <a-tab-pane :key="index" :tab="item.title" v-for="(item, index) in chengbenTabs">
+        <clf-detail v-if="chooseTabIndex === 0"></clf-detail>
+        <other-detail v-if="chooseTabIndex !== 0 && chooseTab === item.value" :listUrl="listUrl"></other-detail>
+      </a-tab-pane>
+    </a-tabs>
   </a-card>
 </template>
 
 <script>
 
   import '@/assets/less/TableExpand.less'
-  import { mixinDevice } from '@/utils/mixin'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import { downFile } from '@/api/manage'
+  import ClfDetail from '../chengbeneDetali/clfDetail.vue'
+  import OtherDetail from '../chengbeneDetali/otherDetail.vue'
 
   export default {
-    name: 'ListModalList',
-    mixins:[JeecgListMixin, mixinDevice],
+    name: 'ChengbenDetailList',
     components: {
+      ClfDetail,
+      OtherDetail
     },
     data () {
       return {
-        // 表头
-        columns: [
-          {
-            title: '序号',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-                return parseInt(index)+1;
-            }
-          },
-          // {
-          //   title:'任务号',
-          //   align:"center",
-          //   dataIndex: 'taskno'
-          // },
-          // {
-          //   title:'下达部门',
-          //   align:"center",
-          //   dataIndex: 'xdbm'
-          // },
-          {
-            title:'责任部门',
-            align:"center",
-            dataIndex: 'zrbm'
-          },
-          {
-            title:'材料费(元)',
-            align:"center",
-            dataIndex: 'clf'
-          },
-          {
-            title:'专用费(元)',
-            align:"center",
-            dataIndex: 'zyf'
-          },
-          {
-            title:'事务费(元)',
-            align:"center",
-            dataIndex: 'swf'
-          },
-          {
-            title:'外协费(元)',
-            align:"center",
-            dataIndex: 'wxf'
-          },
-          {
-            title:'燃动费(元)',
-            align:"center",
-            dataIndex: 'rldlf'
-          },
-          {
-            title:'固资费(元)',
-            align:"center",
-            dataIndex: 'gdzczj'
-          },
-          {
-            title:'人工费(元)',
-            align:"center",
-            dataIndex: 'gzjlwf'
-          },
-          {
-            title:'管理费(元)',
-            align:"center",
-            dataIndex: 'glf'
-          },
-          {
-            title:'筛选费(元)',
-            align:"center",
-            dataIndex: 'sxf'
-          },
-          {
-            title:'总成本(元)',
-            align:"center",
-            dataIndex: 'zcb'
-          },
-          {
-            title:'年月',
-            align:"center",
-            dataIndex: 'yearmonth'
-          },
+        chengbenTabs: [
+          { title: '材料费', value: 'clf', url: '/index/getClfDetailNew'},
+          { title: '专用费', value: 'zyf', url: '/index/getZyfDetailNew'},
+          { title: '事务费', value: 'swf', url: '/index/getSwfDetailNew'},
+          { title: '外协费', value: 'wxf', url: '/index/getWxfDetailNew'},
+          { title: '燃动费', value: 'rdf', url: '/index/getRdfDetailNew'},
+          { title: '固资费', value: 'gzf', url: '/index/getZjfDetailNew'},
+          { title: '人工费', value: 'rgf', url: '/index/getRgfDetailNew'},
+          { title: '管理费', value: 'glf', url: '/index/getGlfDetailNew'},
+          { title: '筛选费', value: 'sxf', url: '/index/getSxfDetailNew'},
         ],
+        chooseTabIndex: 0,
+        chooseTab: '', // 为了解决用v-else会出现多个请求的问题
+        listUrl: '',
         url: {
-          list: "/index/getZhiChuDetail",
+          exportXlsUrl: "/index/exportCneXls",
         },
-        dictOptions:{},
-        superFieldList:[],
       }
     },
     created() {
@@ -133,11 +52,56 @@
     computed: {
     },
     methods: {
-      initDictConfig(){
+      // 使用jeecgListMinxin中方法,但不需要loadData
+      // loadData(){},
+      changeTab(e){
+        console.log(e)
+        this.chooseTabIndex = e
+        this.chooseTab = this.chengbenTabs[e].value
+        if(e !== 0){
+          this.listUrl = this.chengbenTabs[e].url
+        }
+      },
+      handleExportXls(fileName){
+        if(!fileName || typeof fileName != "string"){
+          fileName = "导出文件"
+        }
+        // let param = this.getQueryParams();
+        let param = {};
+        if(this.selectedRowKeys && this.selectedRowKeys.length>0){
+          param['selections'] = this.selectedRowKeys.join(",")
+        }
+        console.log("导出参数",param)
+        downFile(this.url.exportXlsUrl,param).then((data)=>{
+          if (!data) {
+            this.$message.warning("文件下载失败")
+            return
+          }
+          if (typeof window.navigator.msSaveBlob !== 'undefined') {
+            window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
+          }else{
+            let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
+            let link = document.createElement('a')
+            link.style.display = 'none'
+            link.href = url
+            link.setAttribute('download', fileName+'.xls')
+            document.body.appendChild(link)
+            link.click()
+            document.body.removeChild(link); //下载完成移除元素
+            window.URL.revokeObjectURL(url); //释放掉blob对象
+          }
+        })
       },
     }
   }
 </script>
 <style scoped>
   @import '~@assets/less/common.less';
+</style>
+<style lang="less" scoped>
+  .u-dialog-card{
+    /deep/.ant-card-body{
+      padding: 0 !important;
+    }
+  }
 </style>