ソースを参照

项目成本明细下载+科目编号导入

yuhan 1 年間 前
コミット
bfa16db382

+ 1 - 1
src/views/module_kzks/projectCostList/modulesDetail/CollectDetailList.vue

@@ -311,7 +311,7 @@
           list: "/xmcbDetail/comContractInfoExchange/getCrmYskDetail",
           // delete: "/xmcbDetail/comContractInfoExchange/delete",
           // deleteBatch: "/xmcbDetail/comContractInfoExchange/deleteBatch",
-          exportXlsUrl: "/jeecg-boot/xmcbDetail/comContractInfoExchange/exportYskDetail",
+          exportXlsUrl: "/xmcbDetail/comContractInfoExchange/exportYskDetail",
           // importExcelUrl: "xmcbDetail/comContractInfoExchange/importExcel",
 
         },

+ 1 - 1
src/views/module_kzks/projectCostList/modulesDetail/ContractDetailList.vue

@@ -380,7 +380,7 @@
           list: "/xmcbDetail/comContractInfoExchange/getCrmHteDetail",
           // delete: "/xmcbDetail/comContractInfoExchange/delete",
           // deleteBatch: "/xmcbDetail/comContractInfoExchange/deleteBatch",
-          exportXlsUrl: "/jeecg-boot/xmcbDetail/comContractInfoExchange/exportHteDetail",
+          exportXlsUrl: "/xmcbDetail/comContractInfoExchange/exportHteDetail",
           // importExcelUrl: "xmcbDetail/comContractInfoExchange/importExcel",
 
         },

+ 1 - 1
src/views/module_kzks/projectCostList/modulesDetail/KyBgDetailList.vue

@@ -244,7 +244,7 @@
           list: "/kyBgInfo/kyBgInfo/getGSDeatilList",
           // delete: "/kyBgInfo/kyBgInfo/delete",
           // deleteBatch: "/kyBgInfo/kyBgInfo/deleteBatch",
-          exportXlsUrl: "/jeecg-boot/kyBgInfo/kyBgInfo/exportGSDetail",
+          exportXlsUrl: "/kyBgInfo/kyBgInfo/exportGSDetail",
           // importExcelUrl: "kyBgInfo/kyBgInfo/importExcel",
 
         },

+ 1 - 1
src/views/module_kzks/projectCostList/modulesDetail/MaterialDetailList.vue

@@ -148,7 +148,7 @@
           list: "/wzOutboundOrder/wzOutboundOrderH/getCLFList",
           // delete: "/wzOutboundOrder/wzOutboundOrderH/delete",
           // deleteBatch: "/wzOutboundOrder/wzOutboundOrderH/deleteBatch",
-          exportXlsUrl: "/jeecg-boot/wzOutboundOrder/wzOutboundOrderH/exportCLFDetail",
+          exportXlsUrl: "/wzOutboundOrder/wzOutboundOrderH/exportCLFDetail",
           // importExcelUrl: "wzOutboundOrder/wzOutboundOrderH/importExcel",
 
         },

+ 1 - 1
src/views/module_kzks/projectCostList/modulesDetail/MesDetailList.vue

@@ -347,7 +347,7 @@
           list: "/mesInfo/mesInfo/getZJDetailList",
           // delete: "/mesInfo/mesInfo/delete",
           // deleteBatch: "/mesInfo/mesInfo/deleteBatch",
-          exportXlsUrl: "/jeecg-boot/mesInfo/mesInfo/exportZJCBDetail",
+          exportXlsUrl: "/mesInfo/mesInfo/exportZJCBDetail",
           // importExcelUrl: "mesInfo/mesInfo/importExcel",
 
         },

+ 1 - 1
src/views/module_kzks/projectCostList/modulesDetail/ProjectChbSwfList.vue

@@ -229,7 +229,7 @@
           list: "/projectChbSwf/projectChbSwf/getSWFDetailList",
           // delete: "/projectChbSwf/projectChbSwf/delete",
           // deleteBatch: "/projectChbSwf/projectChbSwf/deleteBatch",
-          exportXlsUrl: "/jeecg-boot/projectChbSwf/projectChbSwf/exportSWFDetail",
+          exportXlsUrl: "/projectChbSwf/projectChbSwf/exportSWFDetail",
           // importExcelUrl: "projectChbSwf/projectChbSwf/importExcel",
 
         },

+ 1 - 1
src/views/module_kzks/projectCostList/modulesDetail/ProjectChbWxfList.vue

@@ -222,7 +222,7 @@
           // list: "/projectChbWxf/projectChbWxf/list",
           // delete: "/projectChbWxf/projectChbWxf/delete",
           // deleteBatch: "/projectChbWxf/projectChbWxf/deleteBatch",
-          exportXlsUrl: "/jeecg-boot/projectChbWxf/projectChbWxf/exportWXFDetail",
+          exportXlsUrl: "/projectChbWxf/projectChbWxf/exportWXFDetail",
           // importExcelUrl: "projectChbWxf/projectChbWxf/importExcel",
 
         },

+ 47 - 10
src/views/module_kzks/projectKmbh/KzksProjectKmbhList.vue

@@ -37,12 +37,14 @@
     <!-- 查询区域-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">
+    <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" :data="{'biz':'temp'}" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
-      </a-upload> -->
+      </a-upload>
+      <!-- <a-button @click="handleImport" type="primary" icon="plus">导入</a-button> -->
+      <!-- <a-button @click="handleAdd" type="primary" icon="plus">导入</a-button> -->
       <!-- 高级查询区域 -->
       <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
       <a-dropdown v-if="selectedRowKeys.length > 0">
@@ -50,8 +52,8 @@
           <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> -->
+      </a-dropdown> -->
+    </div>
 
     <!-- table区域-begin -->
     <div>
@@ -120,11 +122,12 @@
 </template>
 
 <script>
-
   import '@/assets/less/TableExpand.less'
   import { mixinDevice } from '@/utils/mixin'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import KzksProjectKmbhModal from './modules/KzksProjectKmbhModal'
+  import { httpAction } from '@/api/manage'
+  import { importJX } from '@/api/api'
 
   export default {
     name: 'KzksProjectKmbhList',
@@ -176,11 +179,17 @@
           delete: "/projectKmbh/kzksProjectKmbh/delete",
           deleteBatch: "/projectKmbh/kzksProjectKmbh/deleteBatch",
           exportXlsUrl: "/projectKmbh/kzksProjectKmbh/exportXls",
-          importExcelUrl: "projectKmbh/kzksProjectKmbh/importExcel",
+          importExcelUrl: "/projectImportList/projectImportList/add",
           
         },
         dictOptions:{},
         superFieldList:[],
+        importYsInfo: {
+          file: '',
+          fileAddress: '',
+          fileName: '',
+          fileType: 3
+        }
       }
     },
     created() {
@@ -188,10 +197,38 @@
     },
     computed: {
       importExcelUrl: function(){
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+        return `${window._CONFIG['domianURL']}/sys/common/upload`;
+        // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
       },
     },
     methods: {
+      handleImportExcel(info){
+        if(info.file.status==='done'){
+          if(info.file.response.success){
+            this.importYsInfo = {
+              fileAddress: info.file.response.message,
+              fileName: info.file.name,
+              fileType: '3'
+            }
+          }
+          httpAction(this.url.importExcelUrl, this.importYsInfo,'post').then((res)=>{
+            if(res.success){
+              this.$message.success(res.message);
+              importJX(this.importYsInfo).then((res) =>{
+                this.$emit('ok');
+                //this.$message.success(`${info.file.name} 上传成功!`);
+                this.loadData()
+              })
+            }else{
+              this.$message.warning(res.message);
+            }
+          }).finally(() => {
+            // this.confirmLoading = false;
+          })
+        }else if (info.file.status === 'error') {
+          this.$message.error(`${info.file.name} 上传失败.`);
+        }
+      },
       initDictConfig(){
       },
       getSuperFieldList(){