Jelajahi Sumber

工种导入

yanghe17378 11 bulan lalu
induk
melakukan
fd5a74cc47

+ 8 - 0
src/views/factoryModel/jobManagement/components/user-edit.vue

@@ -181,9 +181,17 @@
           {
             label: '元',
             value: '元'
+          },
+          {
+            label: '美元',
+            value: '美元'
           }
         ],
         timeOptions: [
+          {
+            label: '分钟',
+            value: '分钟'
+          },
           {
             label: '小时',
             value: '小时'

+ 35 - 14
src/views/factoryModel/jobManagement/index.vue

@@ -23,7 +23,6 @@
             class="ele-btn-icon"
             @click="openEdit()"
             v-if="$hasPermission('main:profession:save')"
-
           >
             新建
           </el-button>
@@ -35,26 +34,26 @@
             @click="removeBatch"
             plain
             v-if="$hasPermission('main:profession:delete')"
-
           >
             删除
           </el-button>
-          <el-button
-            size="small"
-            type="primary"
-            icon="el-icon-upload2"
-            class="ele-btn-icon"
-            plain
-          >
-            导出
-          </el-button>
+          <!--          <el-button
+                      size="small"
+                      type="primary"
+                      icon="el-icon-upload2"
+                      class="ele-btn-icon"
+                      @click="exportProfession"
+                      plain
+                    >
+                      导出
+                    </el-button>-->
           <el-button
             size="small"
             type="primary"
             icon="el-icon-download"
             class="ele-btn-icon"
             v-if="$hasPermission('main:profession:update')"
-
+            @click="importProfession"
             plain
           >
             导入
@@ -69,7 +68,6 @@
             icon="el-icon-edit"
             @click="openEdit(row)"
             v-if="$hasPermission('main:profession:update')"
-
           >
             修改
           </el-link>
@@ -87,7 +85,6 @@
             title="确定要删除当前工种吗?"
             @confirm="remove(row)"
             v-if="$hasPermission('main:profession:delete')"
-
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
@@ -108,6 +105,14 @@
       ref="userEdit"
       :typeList="typeOptions"
     />
+
+    <importDialog
+      :defModule="moduleName"
+      ref="importDialogRef"
+      :fileUrl="'/main/profession/downLoadTemplate'"
+      fileName="工种导入模板"
+      @success="reload"
+    />
   </div>
 </template>
 
@@ -121,16 +126,19 @@
   } from '@/api/factoryModel';
   import control from '@/api/technology/control';
   import dictMixins from '@/mixins/dictMixins';
+  import importDialog from '@/components/upload/import-dialogNew.vue';
 
   export default {
     name: 'technologyProduction',
     components: {
+      importDialog,
       UserSearch,
       UserEdit
     },
     mixins: [dictMixins, tabMixins],
     data() {
       return {
+        moduleName: 'mainProfession',
         levelOptions: [
           {
             label: '初级',
@@ -207,6 +215,14 @@
             align: 'center',
             minWidth: 110
           },
+          {
+            slot: 'unit',
+            prop: 'unit',
+            label: '工时费单位',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
           // {
           //   slot: 'aptitude',
           //   label: '资质',
@@ -251,6 +267,11 @@
       }
     },
     methods: {
+      importProfession() {
+        debugger;
+        this.$refs.importDialogRef.open();
+      },
+      exportJobs() {},
       /*配置工艺参数 */
       openSetting(row) {
         this.current = row;