Преглед изворни кода

修改材料费预示、指标考核等

yuhan пре 1 година
родитељ
комит
384c3d3f0d

+ 2 - 2
src/views/module_kzks/costModelClYushi/CostModelClYushi.vue

@@ -27,7 +27,7 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <!-- <a-button type="primary" icon="download" @click="handleExportXls('成本模型')">导出</a-button> -->
+      <!-- <a-button type="primary" icon="download" @click="handleExportXls('材料预示')">导出</a-button> -->
       <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
       </a-upload> -->
@@ -403,7 +403,7 @@ import CostModelJgModal from './modulesDetail/CostModelJgModal.vue'
       },
       handleExportItem(record){
         this.queryParam.xiangmuid = record.id
-        this.handleExportXls(record.xmName+'成本模型')
+        this.handleExportXls(record.xmName+'材料费预示')
       },
       initDictConfig(){
       },

+ 1 - 1
src/views/module_kzks/costModelClYushi/modules/CostModelClYushiForm.vue

@@ -14,7 +14,7 @@
             </a-form-model-item>
           </a-col> -->
           <a-col :span="24">
-            <a-form-model-item label="材料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clf">
+            <a-form-model-item label="材料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clf">
               <!-- <a-input v-model="model.clf" placeholder="请输入材料费"  ></a-input> -->
               <!-- <j-upload v-model="model.fileCL" :returnUrl="false" :number="1" :multiple="false" text="上传"></j-upload> -->
               <j-upload v-model="model.clfurl" :returnUrl="false" :number="1" :multiple="false" text="上传"></j-upload>

+ 396 - 24
src/views/module_kzks/costModelProductPrice/CostModelProductPriceList.vue

@@ -4,6 +4,103 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="产品名称">
+              <a-input placeholder="请输入产品名称" v-model="queryParam.taskname"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="任务号">
+              <a-input placeholder="请输入任务号" v-model="queryParam.taskno"></a-input>
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="型号">
+                <a-input placeholder="请输入型号" v-model="queryParam.xhname"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="阶段">
+                <a-input placeholder="请输入阶段" v-model="queryParam.yzjdname"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="计划完成时间">
+                <j-date placeholder="请选择计划完成时间" v-model="queryParam.jhwcsj"></j-date>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="任务类型">
+                <a-input placeholder="请输入任务类型" v-model="queryParam.tasktype"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="审计审价">
+                <a-input placeholder="请输入审计审价" v-model="queryParam.auditprice"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="任务状态">
+                <a-input placeholder="请输入任务状态" v-model="queryParam.iflag"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="项目进度">
+                <a-input placeholder="请输入项目进度" v-model="queryParam.processpercent"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="成本进度">
+                <a-input placeholder="请输入成本进度" v-model="queryParam.costPercent"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="业务员">
+                <a-input placeholder="请输入业务员" v-model="queryParam.businessman"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="下达部门id">
+                <a-input placeholder="请输入下达部门id" v-model="queryParam.jycsid"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="下达部门">
+                <a-input placeholder="请输入下达部门" v-model="queryParam.jycs"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="责任部门">
+                <a-input placeholder="请输入责任部门" v-model="queryParam.zrbm"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="批产任务号">
+                <a-input placeholder="请输入批产任务号" v-model="queryParam.pccode"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="备产任务号">
+                <a-input placeholder="请输入备产任务号" v-model="queryParam.bccode"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="备料任务号">
+                <a-input placeholder="请输入备料任务号" v-model="queryParam.blcode"></a-input>
+              </a-form-item>
+            </a-col> -->
+          </template>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a> -->
+            </span>
+          </a-col>
         </a-row>
       </a-form>
     </div>
@@ -11,16 +108,16 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
       <a-button type="primary" icon="download" @click="handleExportXls('kzks_cost_model_product_price')">导出</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+      <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
+      </a-upload> -->
       <!-- 高级查询区域 -->
       <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>
         <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
       </a-dropdown>
@@ -68,10 +165,11 @@
         </template>
 
         <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
+          <a @click="handleDelete(record.id)">移除</a>
+          <!-- <a @click="handleEdit(record)">编辑</a> -->
 
-          <a-divider type="vertical" />
-          <a-dropdown>
+          <!-- <a-divider type="vertical" /> -->
+          <!-- <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
             <a-menu slot="overlay">
               <a-menu-item>
@@ -83,7 +181,7 @@
                 </a-popconfirm>
               </a-menu-item>
             </a-menu>
-          </a-dropdown>
+          </a-dropdown> -->
         </span>
 
       </a-table>
@@ -112,45 +210,319 @@
         // 表头
         columns: [
           {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
+            title:'产品名称',
             align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
+            fixed:"left",
+            width: 120,
+            dataIndex: 'taskname'
           },
           {
-            title:'产品名称',
+            title:'任务号',
+            align:"center",
+            fixed:"left",
+            width: 140,
+            dataIndex: 'taskno',
+          },
+          {
+            title:'型号',
+            align:"center",
+            dataIndex: 'xhname',
+          },
+          // {
+          //   title:'计划完成时间',
+          //   align:"center",
+          //   dataIndex: 'jhwcsj',
+          //   customRender:function (text) {
+          //     return !text?"":(text.length>10?text.substr(0,10):text)
+          //   }
+          // },
+          // {
+          //   title:'阶段',
+          //   align:"center",
+          //   dataIndex: 'yzjdname'
+          // },
+          // {
+          //   title:'项目进度',
+          //   align:"center",
+          //   dataIndex: 'processpercent',
+          //   customRender: (text, record) => {
+          //     return record.id === 'amount'?null:parseInt(text)+ '%'
+          //   },
+          // },
+          // {
+          //   title:'成本进度',
+          //   align:"center",
+          //   dataIndex: 'costPercent',
+          //   customRender: (text, record) => {
+          //     return record.id === 'amount'?null:(Number(text)).toFixed(1) + '%'
+          //   },
+          // },
+          {
+            title:'已收款',
+            align:"center",
+            dataIndex: 'taskmoney',
+            scopedSlots: {
+              customRender: 'taskmoney',
+            },
+            // customCell: this.getClickColumn,
+          },
+          {
+            title:'合同额',
             align:"center",
-            dataIndex: 'cpname'
+            dataIndex: 'contractfpe',
+            scopedSlots: {
+              customRender: 'contractfpe',
+            },
+            // customCell: this.getClickColumn,
           },
           {
-            title:'阶段',
+            title:'预估价',
             align:"center",
-            dataIndex: 'yzjdname'
+            dataIndex: 'estimationcoat',
+            customRender: (text, record) => {
+              return record.contractfpe ? '-' : Number(text).toFixed(2)
+            },
           },
           {
-            title:'合同额/来自收款合同的合同分配额 ',
+            title:'总成本',
             align:"center",
-            dataIndex: 'contractfpe'
+            dataIndex: 'zcb',
+            customRender: (text) => {
+              return (Number(text)/10000).toFixed(2)
+            },
           },
           {
-            title:'研制数量/来自科研任务',
+            title:'利润额',
+            align:"center",
+            dataIndex: 'lre',
+            customRender: (text) => {
+              return (Number(text)/10000).toFixed(2)
+            },
+          },
+          {
+            title:'利润率',
+            align:"center",
+            dataIndex: 'lrl',
+            customRender: (text) => {
+              return (Number(text) * 100).toFixed(1) + '%'
+            },
+          },
+          {
+            title:'研制数量',
             align:"center",
             dataIndex: 'yzsl'
           },
           {
-            title:'单台收入/(合同额or预估价)/研制数量',
+            title:'单台利润',
+            align:"center",
+            dataIndex: 'oneProfit',
+            customRender: (text, record) => {
+              return record.id === 'amount'?null:(Number(text)/10000).toFixed(2)
+            },
+          },
+          {
+            title:'单台收入',
+            align:"center",
+            dataIndex: 'oneIncome',
+            customRender: (text, record) => {
+              return record.id === 'amount'?null:(Number(text)/10000).toFixed(2)
+            },
+          },
+          {
+            title:'单台成本',
+            align:"center",
+            dataIndex: 'oneCost',
+            customRender: (text, record) => {
+              return record.id === 'amount'?null:(Number(text)/10000).toFixed(2)
+            },
+          },
+          {
+            title:'材料预算',
+            align:"center",
+            dataIndex: 'clys',
+            customRender: (text) => {
+              return Number(text).toFixed(2)
+            },
+          },
+          {
+            title:'材料费',
+            align:"center",
+            dataIndex: 'clf',
+            scopedSlots: {
+              customRender: 'clf',
+            },
+            // customCell: this.getClickColumn,
+          },
+          {
+            title:'专用费',
+            align:"center",
+            dataIndex: 'zyf',
+            scopedSlots: {
+              customRender: 'zyf',
+            },
+            // customCell: this.getClickColumn,
+          },
+          {
+            title:'事务费',
+            align:"center",
+            dataIndex: 'swf',
+            scopedSlots: {
+              customRender: 'swf',
+            },
+            // customCell: this.getClickColumn,
+          },
+          {
+            title:'外协预算',
+            align:"center",
+            dataIndex: 'wxys',
+            customRender: (text) => {
+              return Number(text).toFixed(2)
+            },
+          },
+          {
+            title:'外协费',
+            align:"center",
+            dataIndex: 'wxf',
+            scopedSlots: {
+              customRender: 'wxf',
+            },
+            // customCell: this.getClickColumn,
+          },
+          {
+            title:'燃动费',
+            align:"center",
+            dataIndex: 'rldlf',
+            customRender: (text) => {
+              return (Number(text)/10000).toFixed(2)
+            },
+          },
+          {
+            title:'固资费',
+            align:"center",
+            dataIndex: 'gdzczj',
+            customRender: (text) => {
+              return (Number(text)/10000).toFixed(2)
+            },
+          },
+          {
+            title:'工时费',
+            align:"center",
+            dataIndex: 'gzjlwf',
+            customRender: (text) => {
+              return (Number(text)/10000).toFixed(2)
+            },
+          },
+          {
+            title:'管理费',
+            align:"center",
+            dataIndex: 'glf',
+            customRender: (text) => {
+              return (Number(text)/10000).toFixed(2)
+            },
+          },
+          {
+            title:'装机成本',
+            align:"center",
+            dataIndex: 'zjcb',
+            scopedSlots: {
+              customRender: 'zjcb',
+            },
+            // customCell: this.getClickColumn,
+          },
+          {
+            title:'内部试验',
+            align:"center",
+            dataIndex: 'lbsy'
+          },
+          {
+            title:'工时(h)',
+            align:"center",
+            dataIndex: 'workhour',
+            scopedSlots: {
+              customRender: 'workhour',
+            },
+            // customCell: this.getClickColumn,
+          },
+          {
+            title:'设计工时',
             align:"center",
-            dataIndex: 'oneIncome'
+            dataIndex: 'sjgs'
           },
           {
+            title:'生产工时',
+            align:"center",
+            dataIndex: 'scgs'
+          },
+          {
+            title:'责任部门',
+            align:"center",
+            dataIndex: 'zrbm'
+          },
+          // {
+          //   title:'下达部门id',
+          //   align:"center",
+          //   dataIndex: 'jycsid'
+          // },
+          {
+            title:'下达部门',
+            align:"center",
+            dataIndex: 'jycs'
+          },
+          // {
+          //   title:'1:横向 2:纵向',
+          //   align:"center",
+          //   dataIndex: 'hxzxid'
+          // },
+          {
+            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: '操作',
             dataIndex: 'action',

+ 131 - 31
src/views/module_kzks/kpiImportList/KpiImportList.vue

@@ -125,6 +125,19 @@
     </div>
 
     <kpi-import-list-modal ref="modalForm" @ok="modalFormOk"></kpi-import-list-modal>
+
+    <j-modal
+      title="处理重复项"
+      :width="800"
+      :visible="visibleRepeat"
+      switchFullscreen
+      @ok="handleOk"
+      @cancel="handleCancel"
+      cancelText="关闭"
+      class="repeat-model">
+      <!-- :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" -->
+      <kpi-import-list-repeat-list ref="kpiRepeatRef" @ok="handleSure"></kpi-import-list-repeat-list>
+    </j-modal>
   </a-card>
 </template>
 
@@ -134,12 +147,15 @@
   import { mixinDevice } from '@/utils/mixin'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import KpiImportListModal from './modules/KpiImportListModal'
+  import { getAction } from '@/api/manage'
+  import KpiImportListRepeatList from "../kpiImportListRepeat/KpiImportListRepeatList.vue";
 
   export default {
     name: 'KpiImportListList',
     mixins:[JeecgListMixin, mixinDevice],
     components: {
-      KpiImportListModal
+      KpiImportListModal,
+      KpiImportListRepeatList
     },
     data () {
       return {
@@ -218,36 +234,113 @@
       },
     },
     methods: {
-      // loadData(arg) {
-      //   if(!this.url.list){
-      //     this.$message.error("请设置url.list属性!")
-      //     return
-      //   }
-      //   //加载数据 若传入参数1则加载第一页的内容
-      //   if (arg === 1) {
-      //     this.ipagination.current = 1;
-      //   }
-      //   var params = this.getQueryParams();//查询条件
-      //   this.loading = true;
-      //   getAction(this.url.list, params).then((res) => {
-      //     if (res.success) {
-      //       //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-      //       this.dataSource = res.result.content.records||res.result.content;
-      //       this.isalarm = res.result.isalarm
-      //       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
-      //   })
-      // },
+      loadData(arg) {
+        if(!this.url.list){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          if (res.success) {
+            //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+            this.dataSource = res.result.content.records||res.result.content;
+            this.isalarm = res.result.isalarm
+            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
+        })
+      },
+      handleOk () {
+        if (this.$refs.kpiRepeatRef.selectedRowKeys.length <= 0) {
+          this.$message.warning('请选择一条记录!');
+          return;
+        } else {
+          this.$refs.kpiRepeatRef.handleRepeat();
+        }
+      },
+      // 实现异步关闭页面并刷新页面,不这样写会有同步页面不刷新的问题
+      handleSure(){
+        this.loadData()
+        this.close()
+      },
+      handleCancel () {
+        this.close()
+      },
+      close () {
+        this.$emit('close');
+        this.visibleRepeat = false;
+      },
+      /* 导入 */
+      handleImportExcel(info){
+        this.loading = true;
+        if (info.file.status !== 'uploading') {
+          console.log(info.file, info.fileList);
+        }
+        if (info.file.status === 'done') {
+          this.loading = false;
+          console.log(info)
+          if (info.file.response.success) {
+            // this.$message.success(`${info.file.name} 文件上传成功`);
+            if (info.file.response.code === 201) {
+              let { message, result: { msg, fileUrl, fileName } } = info.file.response
+              let href = window._CONFIG['domianURL'] + fileUrl
+              this.$warning({
+                title: message,
+                content: (<div>
+                    <span>{msg}</span><br/>
+                    <span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
+                  </div>
+                )
+              })
+            } else {
+              this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
+            }
+            this.loadData()
+          } else if (info.file.response.code === 111){
+            // 数据有半重复的(外协项目、外协单位、计量单位相同,但价格不同时)
+            this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
+            this.loadData()
+          } else {
+            this.$message.error(`${info.file.name} ${info.file.response.message}.`);
+          }
+        } else if (info.file.status === 'error') {
+          this.loading = false;
+          if (info.file.response.status === 500) {
+            let data = info.file.response
+            const token = Vue.ls.get(ACCESS_TOKEN)
+            if (token && data.message.includes("Token失效")) {
+              this.$error({
+                title: '登录已过期',
+                content: '很抱歉,登录已过期,请重新登录',
+                okText: '重新登录',
+                mask: false,
+                onOk: () => {
+                  store.dispatch('Logout').then(() => {
+                    Vue.ls.remove(ACCESS_TOKEN)
+                    window.location.reload();
+                  })
+                }
+              })
+            }
+          } else {
+            this.$message.error(`文件上传失败: ${info.file.msg} `);
+          }
+        }
+      },
       initDictConfig(){
       },
       getSuperFieldList(){
@@ -263,4 +356,11 @@
 </script>
 <style scoped>
   @import '~@assets/less/common.less';
+</style>
+<style lang="less" scoped>
+.repeat-model{
+  /deep/ .ant-modal-body{
+    padding: 0;
+  }
+}
 </style>

+ 253 - 0
src/views/module_kzks/kpiImportListRepeat/KpiImportListRepeatList.vue

@@ -0,0 +1,253 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <!-- <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('年指标导入重复数据存储表')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <!-- 高级查询区域 -->
+      <!-- <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>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div> -->
+
+    <span style="color: #ffa11e;">※导入的文件与现有数据比对,存在指标年份、指标部门相同,但指标金额不同的项,请选择需要保留的项※</span>
+    <!-- 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"
+        :rowSelection="rowSelection"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <kpi-import-list-repeat-modal ref="modalForm" @ok="modalFormOk"></kpi-import-list-repeat-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import KpiImportListRepeatModal from './modules/KpiImportListRepeatModal'
+  import { deleteAction } from '@/api/manage'
+
+  export default {
+    name: 'KpiImportListRepeatList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      KpiImportListRepeatModal
+    },
+    data () {
+      return {
+        description: '年指标导入重复数据存储表管理页面',
+        // 表头
+        columns: [
+          {
+            title: '序号',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'指标年份',
+            align:"center",
+            dataIndex: 'year'
+          },
+          {
+            title:'指标金额',
+            align:"center",
+            dataIndex: 'kpi',
+            customRender: (text, record) => {
+              return (Number(text)/10000).toFixed(2)
+            },
+          },
+          // {
+          //   title:'平均每月',
+          //   align:"center",
+          //   dataIndex: 'kpiMonth',
+          //   customRender: (text, record) => {
+          //     return (Number(text)/10000).toFixed(2)
+          //   },
+          // },
+          {
+            title:'指标部门',
+            align:"center",
+            dataIndex: 'department'
+          },
+          // {
+          //   title:'指标年月',
+          //   align:"center",
+          //   dataIndex: 'ym'
+          // },
+          // {
+          //   title: '操作',
+          //   dataIndex: 'action',
+          //   align:"center",
+          //   fixed:"right",
+          //   width:147,
+          //   scopedSlots: { customRender: 'action' }
+          // }
+        ],
+        url: {
+          list: "/kpiImportListRepeat/kpiImportListRepeat/list",
+          handleRepeat: "/kpiImportListRepeat/kpiImportListRepeat/deleteBatch1"
+          // delete: "/kpiImportListRepeat/kpiImportListRepeat/delete",
+          // deleteBatch: "/kpiImportListRepeat/kpiImportListRepeat/deleteBatch",
+          // exportXlsUrl: "/kpiImportListRepeat/kpiImportListRepeat/exportXls",
+          // importExcelUrl: "kpiImportListRepeat/kpiImportListRepeat/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+      rowSelection: function(){
+        return {
+          selectedRowKeys: this.selectedRowKeys,
+          onSelect: this.onSelect,
+          onChange: this.onSelectChange,
+          columnTitle: ' ', // 去掉全选框
+          getCheckboxProps: (record) => ({
+            props: {
+              // 动态设置不可选
+              disabled: record.disabled
+            },
+          }),
+        }
+      }
+    },
+    methods: {
+      // 重复项表格多选确定方法
+      onSelect(record, selected, selectedRows, nativeEvent){
+        // console.log(record, selected, selectedRows, nativeEvent)
+        for (let i = 0; i < this.dataSource.length; i++) {
+          const element = this.dataSource[i];
+          var panduan = element.department === record.department && element.year === record.year && element.id !== record.id
+          if(panduan){
+            element.disabled = !element.disabled
+          }
+        }
+        // 这一步重新赋值才能实现动态改变disabled
+        this.dataSource = [...this.dataSource]
+        // console.log(this.dataSource)
+      },
+      handleRepeat() {
+        var ids = "";
+        for (var a = 0; a < this.selectedRowKeys.length; a++) {
+          ids += this.selectedRowKeys[a] + ",";
+        }
+        this.loading = true;
+        deleteAction(this.url.handleRepeat, {ids: ids}).then((res) => {
+          if (res.success) {
+            //重新计算分页问题
+            this.reCalculatePage(this.selectedRowKeys.length)
+            this.$message.success(res.message);
+            // this.loadData();
+            this.onClearSelected();
+            this.$emit('ok')
+          } else {
+            this.$message.warning(res.message);
+          }
+        }).finally(() => {
+          this.loading = false;
+        });
+      },
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'int',value:'year',text:'指标年份',dictCode:''})
+        fieldList.push({type:'BigDecimal',value:'kpi',text:'指标金额',dictCode:''})
+        fieldList.push({type:'BigDecimal',value:'kpiMonth',text:'平均每月',dictCode:''})
+        fieldList.push({type:'string',value:'department',text:'指标部门',dictCode:''})
+        fieldList.push({type:'string',value:'ym',text:'指标年月',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 124 - 0
src/views/module_kzks/kpiImportListRepeat/modules/KpiImportListRepeatForm.vue

@@ -0,0 +1,124 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="指标年份" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="year">
+              <a-input-number v-model="model.year" placeholder="请输入指标年份" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="指标金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kpi">
+              <a-input-number v-model="model.kpi" placeholder="请输入指标金额" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="平均每月" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kpiMonth">
+              <a-input-number v-model="model.kpiMonth" placeholder="请输入平均每月" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="指标部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="department">
+              <a-input v-model="model.department" placeholder="请输入指标部门"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="指标年月" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ym">
+              <a-input v-model="model.ym" placeholder="请输入指标年月"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'KpiImportListRepeatForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/kpiImportListRepeat/kpiImportListRepeat/add",
+          edit: "/kpiImportListRepeat/kpiImportListRepeat/edit",
+          queryById: "/kpiImportListRepeat/kpiImportListRepeat/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_kzks/kpiImportListRepeat/modules/KpiImportListRepeatModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <kpi-import-list-repeat-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></kpi-import-list-repeat-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import KpiImportListRepeatForm from './KpiImportListRepeatForm'
+
+  export default {
+    name: 'KpiImportListRepeatModal',
+    components: {
+      KpiImportListRepeatForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/module_kzks/kpiImportListRepeat/modules/KpiImportListRepeatModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <kpi-import-list-repeat-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></kpi-import-list-repeat-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import KpiImportListRepeatForm from './KpiImportListRepeatForm'
+  export default {
+    name: 'KpiImportListRepeatModal',
+    components: {
+      KpiImportListRepeatForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 17 - 5
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -137,6 +137,7 @@
       <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>
+        <span style="margin-left: 40px; color: #b5b5b5;">*红色表示亏损;绿色表示加入至产品价格库;灰色表示解组批后;*</span>
 
         <span style="float:right;">
           <a @click="loadData()"><a-icon type="sync" />刷新</a>
@@ -266,7 +267,7 @@
           <a @click="handleXushi(record)" v-if="record.id !== 'amount'">预算执行</a>
           <!-- <a @click="handleXushi(record)" v-if="record.id !== 'amount'" :disabled="record.ji === 1">预算执行</a> -->
           <a-divider v-if="record.id !== 'amount' && record.ji === 1" type="vertical" />
-          <a @click="handleAddProjectModel(record)" v-if="record.id !== 'amount' && record.ji === 1">加入产品</a>
+          <a @click="handleAddProjectModel(record)" v-if="record.id !== 'amount' && record.ji === 1" :disabled="record.hjstatus === '4'">加入产品</a>
 
           <!-- <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -602,7 +603,7 @@ import { number } from 'echarts';
             },
           },
           {
-            title:'工费',
+            title:'工费',
             align:"center",
             dataIndex: 'gzjlwf',
             customRender: (text) => {
@@ -871,15 +872,21 @@ import { number } from 'echarts';
         // var key = this.$route.name+":colsettings";
         // let colSettings= Vue.ls.get(key);
       },
-      // 亏损标红
+      // 行颜色设置
       setRowClassName(record, index){
         // console.log(record)
         if(record.lrl < 0){
+          // 亏损标红
           return 'table-kuisun-color'
         }
         if(record.status === '1'){
+          // 汇集计算之后的数据标浅灰
           return 'table-zupi-color'
         }
+        if(record.hjstatus === '4'){
+          // 加入产品价格库的
+          return 'table-chanpin-model-color'
+        }
       },
       //列设置更改事件
       onColSettingsChange (checkedValues) {
@@ -905,8 +912,8 @@ import { number } from 'echarts';
           return
         }
         console.log(text, record, columnValue, columnTitle)
-        // 没有值不弹窗
-        if(!text || record.children || record.id === 'amount'){
+        // 去掉没有值不弹窗判断 !text ||
+        if(record.children || record.id === 'amount'){
           return
         }
         this.$refs.proCostDetail.taskno = record.taskno
@@ -1065,6 +1072,7 @@ import { number } from 'echarts';
         arr.push(record)
         insertIntoProject(arr).then(response => {
           console.log(response)
+          this.loadData()
         })
       },
       // 对比禁选判断
@@ -1205,4 +1213,8 @@ import { number } from 'echarts';
     color: #b3b2b2 !important;
     /* user-select: 'none'; */
   }
+  .table-chanpin-model-color{
+    color: #29d59f !important;
+    /* color: #438bf7 !important; */
+  }
 </style>

+ 7 - 7
src/views/module_kzks/projectDownloadModel/ProjectDownloadModelList.vue

@@ -13,10 +13,10 @@
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
+              <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
                 {{ toggleSearchStatus ? '收起' : '展开' }}
                 <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a>
+              </a> -->
             </span>
           </a-col>
         </a-row>
@@ -25,21 +25,21 @@
     <!-- 查询区域-END -->
 
     <!-- 操作按钮区域 -->
-    <div class="table-operator">
+    <!-- <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
       <a-button type="primary" icon="download" @click="handleExportXls('模板下载')">导出</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
+      </a-upload> -->
       <!-- 高级查询区域 -->
-      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <!-- <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>
         <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
       </a-dropdown>
-    </div>
+    </div> -->
 
     <!-- table区域-begin -->
     <div>
@@ -129,7 +129,7 @@
         // 表头
         columns: [
           {
-            title: '#',
+            title: '序号',
             dataIndex: '',
             key:'rowIndex',
             width:60,