wyh 1 anno fa
parent
commit
3f0eb9aacc

+ 4 - 0
src/api/kzksApi.js

@@ -17,6 +17,9 @@ const proCostContractdetail = (params)=>getAction("/xmcbDetail/comContractInfoEx
 // 项目成本成本详情-已收款
 const proCostYSKdetail = (params)=>getAction("/xmcbDetail/comContractInfoExchange/getCrmYskDetail", params);
 
+// 项目成本对比————总体对比
+const getDbList = (params)=>getAction("/projectCost/projectCost/compareList", params);
+
 
 export {
   columnsSelect,
@@ -24,6 +27,7 @@ export {
   // projectCostHuiji,
   proCostContractdetail,
   proCostYSKdetail,
+  getDbList,
 }
 
 

+ 254 - 0
src/views/module_kzks/projectContrastList/allList.vue

@@ -0,0 +1,254 @@
+<template>
+  <a-table :columns="columns" :data-source="data" bordered :scroll="{ x: 4750 }" :pagination="ipagination">
+  </a-table>
+</template>
+<script>
+const columns = [
+          {
+            title:'任务号',
+            fixed:"left",
+            dataIndex: 'taskno',
+          },
+          {
+            title:'任务名称',
+            align:"center",
+            fixed:"left",
+            dataIndex: 'taskname'
+          },
+          {
+            title:'型号',
+            align:"center",
+            dataIndex: 'xhname'
+          },
+          {
+            title:'计划完成时间',
+            align:"center",
+            dataIndex: 'jhwcsj',
+          },
+          {
+            title:'阶段',
+            align:"center",
+            dataIndex: 'yzjdname'
+          },
+          {
+            title:'项目进度',
+            align:"center",
+            dataIndex: 'processpercent'
+          },
+          {
+            title:'成本进度',
+            align:"center",
+            dataIndex: 'costPercent'
+          },
+          {
+            title:'研制数量',
+            align:"center",
+            dataIndex: 'yzsl'
+          },
+          {
+            title:'单台收入',
+            align:"center",
+            dataIndex: 'oneIncome'
+          },
+          {
+            title:'单台成本',
+            align:"center",
+            dataIndex: 'oneCost'
+          },
+          {
+            title:'单台利润',
+            align:"center",
+            dataIndex: 'oneProfit'
+          },
+          {
+            title:'利润额',
+            align:"center",
+            dataIndex: 'lre'
+          },
+          {
+            title:'利润率',
+            align:"center",
+            dataIndex: 'lrl'
+          },
+          {
+            title:'预估价',
+            align:"center",
+            dataIndex: 'estimationcoat'
+          },
+          {
+            title:'合同额',
+            align:"center",
+            dataIndex: 'contractfpe',
+          },
+          {
+            title:'已收款',
+            align:"center",
+            dataIndex: 'taskmoney',
+          },
+          {
+            title:'总成本',
+            align:"center",
+            dataIndex: 'zcb'
+          },
+          {
+            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: 'zjcb',
+          },
+          {
+            title:'内部试验',
+            align:"center",
+            dataIndex: 'lbsy'
+          },
+          {
+            title:'工时(h)',
+            align:"center",
+            dataIndex: 'workhour'
+          },
+          {
+            title:'责任部门',
+            align:"center",
+            dataIndex: 'zrbm'
+          },
+          {
+            title:'下达部门',
+            align:"center",
+            dataIndex: 'jycs'
+          },
+          {
+            title:'横向纵向',
+            align:"center",
+            dataIndex: 'hxzxname'
+          },
+          {
+            title:'任务类型',
+            align:"center",
+            dataIndex: 'tasktype'
+          },
+          {
+            title:'审计审价',
+            align:"center",
+            dataIndex: 'auditprice'
+          },
+          {
+            title:'任务状态',
+            align:"center",
+            dataIndex: 'iflag'
+          },
+          {
+            title:'提出单位简称',
+            align:"center",
+            dataIndex: 'brief'
+          },
+          {
+            title:'父级任务',
+            align:"center",
+            dataIndex: 'reftaskno'
+          },
+          {
+            title:'批产任务号',
+            align:"center",
+            dataIndex: 'pccode'
+          },
+          {
+            title:'备产任务号',
+            align:"center",
+            dataIndex: 'bccode'
+          },
+          {
+            title:'备料任务号',
+            align:"center",
+            dataIndex: 'blcode'
+          },
+          {
+            title:'业务员',
+            align:"center",
+            dataIndex: 'businessman'
+          },
+          {
+            title:'设计工时',
+            align:"center",
+            dataIndex: 'sjgs'
+          },
+          {
+            title:'生产工时',
+            align:"center",
+            dataIndex: 'scgs'
+          },
+        ];
+
+const data = [];
+
+export default {
+    props: {
+      // 对比表格数据
+      duibiList: {
+        type: Array,
+        default: ()=>{},
+        required: false
+      }
+    },
+    data() {
+        return {
+        data,
+        columns,
+        /* 分页参数 */
+        ipagination:{
+            current: 1,
+            pageSize: 10,
+            pageSizeOptions: ['10', '20', '30'],
+            showTotal: (total, range) => {
+            return range[0] + "-" + range[1] + " 共" + total + "条"
+            },
+            showQuickJumper: true,
+            showSizeChanger: true,
+            total: 0
+        },
+        };
+    },
+    created(){
+        console.log(this.duibiList)
+        this.data = this.duibiList
+    }
+};
+</script>

+ 117 - 0
src/views/module_kzks/projectContrastList/wuliaoList.vue

@@ -0,0 +1,117 @@
+<template>
+  <a-table :columns="columns" :data-source="data" bordered :pagination="ipagination">
+  </a-table>
+</template>
+<script>
+const columns = [
+  {
+    title: '任务号',
+    align:"center",
+    dataIndex: 'name',
+    key: 'name',
+    customRender:function (t,r,index) {
+        return {children: t,attrs: {rowSpan:r.rowSpan}};
+    },
+  },
+  {
+    title: '物资编码',
+    align:"center",
+    dataIndex: 'age',
+    key: 'age',
+  },
+  {
+    title: '总数量',
+    align:"center",
+    dataIndex: 'address',
+    key: 'address',
+  },
+  {
+    title: '总金额',
+    align:"center",
+    key: 'tags',
+    dataIndex: 'tags',
+    // scopedSlots: { customRender: 'tags' },
+  },
+];
+
+const data = [
+  {
+    key: '1',
+    name: 'John Brown',
+    age: 32,
+    address: 'New York No. 1 Lake Park',
+    tags: ['nice', 'developer'],
+  },
+  {
+    key: '2',
+    name: 'Jim Green',
+    age: 42,
+    address: 'London No. 1 Lake Park',
+    tags: ['loser'],
+  },
+  {
+    key: '3',
+    name: 'Joe Black',
+    age: 32,
+    address: 'Sidney No. 1 Lake Park',
+    tags: ['cool', 'teacher'],
+  },
+  {
+    key: '4',
+    name: 'Joe Black',
+    age: 32,
+    address: 'Sidney No. 1 Lake Park',
+    tags: ['cool', 'teacher'],
+  },
+];
+
+export default {
+  data() {
+    return {
+      data,
+      columns,
+      /* 分页参数 */
+      ipagination:{
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['10', '20', '30'],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条"
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },
+    };
+  },
+  created(){
+    this.getHebing()
+  },
+  methods: {
+    getHebing(){
+        let that = this
+        let rowSpan = 0
+        let name = ''
+        for (let i = that.data.length-1; i >= 0; i--) {
+            // 任务号合并
+            if (name == '') {
+                that.data[i].rowSpan = 0
+                name = that.data[i].name
+                rowSpan++
+                } else {
+                if(name == that.data[i].name){
+                    that.data[i].rowSpan = 0
+                    rowSpan++
+                }else{
+                    that.data[i+1].rowSpan = rowSpan
+                    that.data[i].rowSpan = 0
+                    rowSpan = 1
+                    name = that.data[i].name
+                }
+            }
+        }
+        that.data[0].rowSpan = rowSpan
+    }
+  }
+};
+</script>

+ 48 - 3
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -112,7 +112,8 @@
       <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>对比</a-menu-item>
+          <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>对比</a-menu-item> -->
+          <a-menu-item key="1" @click="batchDuiBi"><a-icon type="shrink" />对比</a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
       </a-dropdown>
@@ -221,27 +222,55 @@
     </div>
     
     <project-detail-modal ref="proCostDetail"></project-detail-modal>
+
+    <j-modal
+      :width="1200"
+      :visible="duiBi"
+      switchFullscreen
+      @cancel="handleGb">
+      
+      <a-tabs default-active-key="1">
+        <a-tab-pane key="1" tab="总体对比">
+          <all-list :duibiList="duibiList"></all-list>
+        </a-tab-pane>
+        <a-tab-pane key="2" tab="材料费对比" force-render>
+          <wuliao-list></wuliao-list>
+        </a-tab-pane>
+      </a-tabs>
+
+      <template slot="footer">
+        <a-button @click="handleGb">关闭</a-button>
+      </template>
+    </j-modal>
   </a-card>
 </template>
 
 <script>
   import Vue from 'vue'
-  import { columnsSelect, columnsEdit, proCostYSKdetail, proCostContractdetail } from '@/api/kzksApi.js'
+  import { columnsSelect, columnsEdit, proCostYSKdetail, proCostContractdetail, getDbList } from '@/api/kzksApi.js'
 
   import '@/assets/less/TableExpand.less'
   import { mixinDevice } from '@/utils/mixin'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import ProjectDetailModal from './modulesDetail/ProjectDetailModal'
+import AllList from '../projectContrastList/allList.vue'
+import WuliaoList from '../projectContrastList/wuliaoList.vue'
 
   export default {
     name: 'ProjectCostList',
     mixins:[JeecgListMixin, mixinDevice],
     components: {
-      ProjectDetailModal
+        AllList,
+        WuliaoList,
+        ProjectDetailModal,
     },
     data () {
       return {
         description: '项目成本管理页面',
+        // 获取到的对比数据
+        duibiList: [],
+        // 对比弹框是否显示
+        duiBi: false,
         // 表头:当前显示的列,初始为全部
         columns: [],
         //列设置:多选弹窗显示的
@@ -646,6 +675,22 @@
           }
         }
       },
+      // 对比
+      batchDuiBi(){
+        console.log(this.selectedRowKeys)
+        // console.log(JSON.stringify(this.selectedRowKeys))
+        var a = this.selectedRowKeys
+        var ids = a.toString()
+        getDbList({ids: ids}).then((res) => {
+          console.log(res)
+          this.duibiList = res
+          this.duiBi = true
+        })
+      },
+      // 关闭对比弹框
+      handleGb(){
+        this.duiBi = false
+      }
     }
   }
 </script>