Răsfoiți Sursa

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom into dev

wsx 9 luni în urmă
părinte
comite
faa89e2853

+ 22 - 3
src/BIZComponents/processSubmitDialog/processSubmitDialog.vue

@@ -96,7 +96,13 @@
           min-width="140px"
         >
           <template v-slot="scope">
-            <div v-if="scope.row.type !== 60 && scope.row.options.length > 0">
+            <div
+              v-if="
+                scope.row.type !== 60 &&
+                scope.row.type !== 70 &&
+                scope.row.options.length > 0
+              "
+            >
               <el-tag
                 size="medium"
                 :key="option"
@@ -106,7 +112,10 @@
               </el-tag>
             </div>
 
-            <el-tag size="medium" v-if="scope.row.type === 60">
+            <el-tag
+              size="medium"
+              v-if="scope.row.type === 60 || scope.row.type === 70"
+            >
               {{ getAssignRuleOptionName(scope.row) }}
             </el-tag>
           </template>
@@ -191,7 +200,7 @@
   import dictMixins from '@/mixins/dictMixins';
   import { getByCode } from '@/api/system/dictionary-data';
   import { getProduceTreeByCode } from '@/api/saleManage/quotation';
-
+  import { topLevel1, topLevel2 } from '@/enum/dict';
   export default {
     name: 'processSubmitDialog',
     mixins: [dictMixins],
@@ -357,6 +366,7 @@
         });
       },
       getAssignRuleOptionName(row, option) {
+        console.log(row, option);
         if (row.type == 10) {
           for (const roleOption of this.roleOptions) {
             if (roleOption.id === option) {
@@ -392,6 +402,15 @@
           );
         } else if (row.type === 60) {
           return row.variableName;
+        } else if (row.type === 70) {
+          let data = JSON.parse(row.variableName);
+          if (data.direction == 1) {
+            return topLevel2.find((item) => item.value == data.topLevel)
+              ?.label;
+          } else {
+            return topLevel1.find((item) => item.value == data.topLevel)
+              ?.label;
+          }
         }
         return '未知(' + option + ')';
       },

+ 3 - 3
src/api/system/file/index.js

@@ -103,16 +103,16 @@ export async function importBatch(data,api,onUploadProgressCb) {
 /**
  * 下载模板
  */
-export async function downLoadTemplate() {
+export async function downLoadTemplate(url,name) {
   const res = await request.post(
-    '/main/user/downLoadTemplate',
+    url,
     {},
     {
       responseType: 'blob',
     }
   );
   console.log(res.data, '***********');
-  download(res.data, '员工档案导入模板.xlsx');
+  download(res.data, name);
 
 }
 /**

+ 12 - 3
src/components/upload/import-dialog.vue

@@ -49,7 +49,7 @@
 </template>
 
 <script>
-  import { importBatch } from '@/api/system/file/index.js';
+  import { importBatch,downLoadTemplate } from '@/api/system/file/index.js';
   import { download1 } from '@/utils/file';
   import { number } from 'echarts';
 
@@ -59,7 +59,11 @@
       defModule: '',
       fileUrl: '',
       fileName: '',
-      apiUrl: ''
+      apiUrl: '',
+      isWeb: {
+        type: Boolean,
+        default: true
+      } 
     },
     //注册组件
     data() {
@@ -137,7 +141,12 @@
       },
       //下载模板
       downLoadTemplate() {
-        download1(window.location.origin + this.fileUrl, this.fileName);
+        if(this.isWeb){
+          download1(window.location.origin + this.fileUrl, this.fileName);
+        }else{
+          downLoadTemplate(this.fileUrl,this.fileName);
+        }
+
       }
     }
   };

+ 77 - 0
src/enum/dict.js

@@ -453,3 +453,80 @@ export const holderTypeOptions = [
     value: '6'
   }
 ];
+
+export const topLevel1 = [
+  {
+    label: '直接部门负责人',
+    value: '1'
+  },
+  {
+    label: '上二级部门负责人',
+    value: '2'
+  },
+  {
+    label: '上三级部门负责人',
+    value: '3'
+  },
+  {
+    label: '上四级部门负责人',
+    value: '4'
+  },
+  {
+    label: '上五级部门负责人',
+    value: '5'
+  },
+  {
+    label: '上六级部门负责人',
+    value: '6'
+  },
+  {
+    label: '上七级部门负责人',
+    value: '7'
+  },
+  {
+    label: '上八级部门负责人',
+    value: '8'
+  },
+  {
+    label: '上九级部门负责人',
+    value: '9'
+  }
+];
+export const topLevel2 = [
+  {
+    label: '最高级部门负责人',
+    value: '99'
+  },
+  {
+    label: '第二层部门负责人',
+    value: '2'
+  },
+  {
+    label: '第三层部门负责人',
+    value: '3'
+  },
+  {
+    label: '第四层部门负责人',
+    value: '4'
+  },
+  {
+    label: '第五层部门负责人',
+    value: '5'
+  },
+  {
+    label: '第六层部门负责人',
+    value: '6'
+  },
+  {
+    label: '第七层部门负责人',
+    value: '7'
+  },
+  {
+    label: '第八层部门负责人',
+    value: '8'
+  },
+  {
+    label: '第九层部门负责人',
+    value: '9'
+  }
+];

+ 25 - 14
src/views/purchasingManage/purchaseOrder/index.vue

@@ -142,7 +142,8 @@
                   @click="handleCommand('outsourceSend', row)"
                   v-if="
                     ['3', '4', '5', '6'].includes(row.sourceType) &&
-                    [2].includes(row.orderStatus)&&row.progress<200
+                    [2].includes(row.orderStatus) &&
+                    row.progress < 200
                   "
                 >
                   创建委外发货单
@@ -154,7 +155,8 @@
                   @click="handleCommand('invoice', row)"
                   v-if="
                     !['3', '4', '5', '6'].includes(row.sourceType) &&
-                    [2].includes(row.orderStatus)&&row.progress<200
+                    [2].includes(row.orderStatus) &&
+                    row.progress < 200
                   "
                 >
                   创建收货单
@@ -212,7 +214,7 @@
     <purchasingDetail ref="purchasingDetailRef"></purchasingDetail>
     <purchasePlanDetail ref="purchasePlanDetailRef"></purchasePlanDetail>
     <inquiryDetail ref="inquiryDetailRef"></inquiryDetail>
-    
+
     <addOutSourceSend
       ref="addOrEditDialogRef"
       :add-or-edit-dialog-flag.sync="addOrEditDialogFlag"
@@ -241,7 +243,8 @@
     <importDialog
       ref="importDialogRef"
       @success="reload"
-      :fileUrl="'/eos/importTemplate/采购订单导入模板.xlsx'"
+      :fileUrl="'/eom/purchaseorder/importTemplate'"
+      :isWeb="false"
       fileName="采购订单导入模板"
       apiUrl="/eom/purchaseorder/importFile"
     />
@@ -268,20 +271,17 @@
   import outSourceSend from './outSourceSend/index';
   import {
     getTableList,
-    deleteInformation,
+    deleteInformation
   } from '@/api/purchasingManage/purchaseOrder';
   import dictMixins from '@/mixins/dictMixins';
-  import {
-    purchaseOrderProgressStatusEnum,
-    reviewStatus,
-  } from '@/enum/dict';
+  import { purchaseOrderProgressStatusEnum, reviewStatus } from '@/enum/dict';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
   import importDialog from '@/components/upload/import-dialog.vue';
   import exportButton from '@/components/upload/exportButton.vue';
   import { parameterGetByCode } from '@/api/main/index.js';
   import exceptionList from '@/views/saleManage/saleOrder/exceptionManagement/exceptionList/index.vue';
-  
+
   export default {
     mixins: [dictMixins, tabMixins],
     components: {
@@ -302,7 +302,10 @@
       addInvoiceManage,
       importDialog,
       invoiceConfirm,
-      exceptionList,purchasingDetail,purchasePlanDetail,inquiryDetail
+      exceptionList,
+      purchasingDetail,
+      purchasePlanDetail,
+      inquiryDetail
     },
     data() {
       return {
@@ -371,7 +374,7 @@
             },
             minWidth: 120
           },
-          
+
           {
             prop: 'relationType',
             label: '来源单据类型',
@@ -379,8 +382,16 @@
             showOverflowTooltip: true,
             minWidth: 150,
             formatter: (_row, _column, cellValue) => {
-              return _row.relationType==1?'采购需求单':_row.relationType==2?'采购计划单':_row.relationType==3?'采购核价单':_row.relationType==4?'采购合同':""
-            },
+              return _row.relationType == 1
+                ? '采购需求单'
+                : _row.relationType == 2
+                ? '采购计划单'
+                : _row.relationType == 3
+                ? '采购核价单'
+                : _row.relationType == 4
+                ? '采购合同'
+                : '';
+            }
           },
           {
             prop: 'relationName',

+ 2 - 1
src/views/saleManage/saleOrder/index.vue

@@ -287,7 +287,8 @@
     <importDialog
       ref="importDialogRef"
       @success="reload"
-      :fileUrl="'/eos/importTemplate/销售订单导入模板.xlsx'"
+      :fileUrl="'/eom/saleorder/importTemplate'"
+      :isWeb="false"
       fileName="销售订单导入模板"
       apiUrl="/eom/saleorder/importFile"
     />