yusheng 1 rok temu
rodzic
commit
a3e66164de

+ 8 - 0
src/api/material/product.js

@@ -72,5 +72,13 @@ export async function aridRegionList (id) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+// 修改物品采购员
 
+export async function updateCheckPersonAndGroup (data) {
+  const res = await request.post(`/main/category/updateCheckPersonAndGroup`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
 

+ 20 - 1
src/views/classifyManage/treeClassify/components/list-edit.vue

@@ -72,6 +72,15 @@
             placeholder="请输入"
           />
         </el-form-item>
+        <el-form-item label="状态:" prop="isEnabled">
+          <el-switch
+                v-model="formData.isEnabled"
+                   :active-text="formData.isEnabled==1?'启用':'停用'"
+                   :active-value="1"
+                   :inactive-value="0"
+                >
+            </el-switch>
+        </el-form-item>
       </template>
 
       <!-- 子节点 -->
@@ -116,6 +125,15 @@
             placeholder="请输入"
           />
         </el-form-item>
+        <el-form-item label="状态:" prop="isEnabled">
+          <el-switch
+                v-model="formData.isEnabled"
+                   :active-text="formData.isEnabled==1?'启用':'停用'"
+                   :active-value="1"
+                   :inactive-value="0"
+                >
+            </el-switch>
+        </el-form-item>
       </template>
     </el-form>
     <template v-slot:footer>
@@ -149,7 +167,8 @@
         sortNum: '',
         remark: '',
         parentId: 0,
-        rootCategoryLevelId: null
+        rootCategoryLevelId: null,
+        isEnabled:1
       };
       return {
         visible: false,

+ 14 - 0
src/views/classifyManage/treeClassify/details.vue

@@ -89,6 +89,13 @@
                       </div>
                     </el-form-item>
                   </el-col>
+                  <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
+                    <el-form-item label="状态:">
+                      <div class="ele-text-secondary">
+                        {{ current.isEnabled===0?'停用':'启用' }}
+                      </div>
+                    </el-form-item>
+                  </el-col>
                 </el-row>
                 <el-row :gutter="15" v-else>
                   <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
@@ -126,6 +133,13 @@
                       </div>
                     </el-form-item>
                   </el-col>
+                  <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
+                    <el-form-item label="状态:">
+                      <div class="ele-text-secondary">
+                        {{ current.isEnabled===0?'停用':'启用' }}
+                      </div>
+                    </el-form-item>
+                  </el-col>
                 </el-row>
               </el-form>
             </div>

+ 14 - 1
src/views/classifyManage/treeClassify/index.vue

@@ -100,7 +100,20 @@
             align: 'center',
             slot: 'action',
             fixed: 'right'
-          }
+          },
+          {
+            prop: 'isEnabled',
+            align: 'center',
+            label: '状态',
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row.isEnabled === 0
+                ? '停用'
+                : row.isEnabled === 1
+                ? '启用'
+                : '';
+            }
+          },
         ],
         searchForm: {},
         tableData: [

+ 113 - 0
src/views/material/product/components/DialogMoveTo.vue

@@ -0,0 +1,113 @@
+<template>
+  <div class="dialog-moveto">
+    <el-dialog
+      title="设置采购员"
+      :visible.sync="dialogVisible"
+      width="30%"
+      :before-close="handleClose"
+      class="fullscreen"
+    >
+
+      <div class="form">
+        <el-form
+          label-width="120px"
+          :rules="rules"
+          :model="addForm"
+          ref="form"
+          class="ele-form-search"
+        >
+
+          <el-form-item
+          
+            label="采购组织"
+            prop="checkDepart"
+          >
+            <DeptSelect v-model="addForm.checkDepart" @input="getwhbm" />
+          </el-form-item>
+          <el-form-item label="采购员">
+            <el-select v-model="addForm.checkPerson" placeholder="请选择">
+              <el-option
+                v-for="item in personList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible=false">取 消</el-button>
+        <el-button type="primary" @click="submit" :loading="loading"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+
+  import DeptSelect from '@/components/CommomSelect/dept-select.vue';
+  import { getUserPage } from '@/api/system/organization';
+  import { updateCheckPersonAndGroup } from '@/api/material/product.js';
+  export default {
+    components: { DeptSelect },
+    data() {
+      return {
+        dialogVisible: false,
+        addForm: {},
+        loading: false,
+        rules: {
+          checkDepart: [
+            { required: true, message: '请选择采购组织', trigger: 'blur' }
+          ],
+          checkPerson: [
+            { required: true, message: '请选择采购员', trigger: 'blur' }
+          ]
+        },
+        personList: [],
+        selection:[]
+      };
+    },
+    methods: {
+      async getwhbm() {
+        if (!this.addForm.checkDepart) return;
+        this.$set(this.addForm,'checkPerson','')
+        let data = await getUserPage({
+          pageNum: 1,
+          size: 9999,
+          groupId: this.addForm.checkDepart
+        });
+        this.personList = data.list;
+      },
+      submit() {
+        this.$refs.form.validate(async (flag) => {
+          if (flag) {
+            try {
+              this.loading = true;
+              updateCheckPersonAndGroup({
+                id:this.selection.map(item=>item.id),
+                checkDepart:this.addForm.checkDepart,
+                checkPerson:this.addForm.checkPerson,
+              })
+              this.$message.success('成功!');
+              this.dialogVisible = false;
+              this.$emit('success', true);
+            } finally {
+              this.loading = false;
+            }
+          } else {
+            return false;
+          }
+        });
+      },
+
+      open(arr) {
+        this.selection=arr
+        this.addForm = {};
+        this.dialogVisible = true;
+      },
+    }
+  };
+</script>

+ 112 - 6
src/views/material/product/components/index-data.vue

@@ -67,7 +67,15 @@
           @click="uploadFile"
           >导入</el-button
         >
-
+        <el-button
+          size="small"
+          :disabled="selection.length == 0"
+          icon="el-icon-thumb"
+          class="ele-btn-icon"
+          @click="moveTo()"
+        >
+          设置采购员
+        </el-button>
         <!-- <el-button
           v-if="rootTreeId == 9"
           size="small"
@@ -232,6 +240,7 @@
     />
     <!-- 产品管理 -->
     <BomDetailsPop ref="bomDrawer"></BomDetailsPop>
+    <DialogMoveTo ref="DialogMoveToRef" @success="success"></DialogMoveTo>
   </div>
 </template>
 
@@ -251,11 +260,55 @@
   import goodsAllocation from './goodsAllocation.vue';
 
   import BomDetailsPop from '../../BOMmanage/detailsPop.vue';
+  import dictMixins from '@/mixins/dictMixins';
 
   import aridRegion from './aridRegion';
   import importDialog from '@/components/upload/import-dialog.vue';
   import { fieldModel } from '@/api/codeManagement';
+  import DialogMoveTo from './DialogMoveTo.vue';
+  const attributeList = [
+    {
+      label: '总装',
+      value: 1
+    },
+    {
+      label: '部件',
+      value: 2
+    },
+    {
+      label: '零件',
+      value: 3
+    },
+    {
+      label: '原材料',
+      value: 4
+    }
+  ];
+  const measureTypeList = [
+    {
+      label: '数量',
+      value: 1
+    },
+    {
+      label: '重量',
+      value: 2
+    },
+    {
+      label: '体积',
+      value: 3
+    },
+    {
+      label: '容积',
+      value: 4
+    },
+    {
+      label: '面积',
+      value: 5
+    }
+  ];
   export default {
+    mixins: [dictMixins],
+
     components: {
       importDialog,
       MaterialModal,
@@ -264,7 +317,8 @@
       linkMaterialDialog,
       goodsAllocation,
       aridRegion,
-      BomDetailsPop
+      BomDetailsPop,
+      DialogMoveTo
     },
     props: {
       // 物料组id
@@ -290,6 +344,12 @@
 
         // 表格列配置
         columns: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
           {
             columnKey: 'index',
             type: 'index',
@@ -376,11 +436,53 @@
             label: '包装单位',
             showOverflowTooltip: true
           },
- 
+
+          {
+            prop: 'produceType',
+            align: 'center',
+            label: '生产类型',
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row?.produceType
+                ?.map((item) => {
+                  return this.getDictValue('生产类型', item);
+                })
+                ?.toString();
+            }
+          },
+          {
+            prop: 'attributeType',
+            align: 'center',
+            label: '属性',
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return attributeList.find(
+                (item) => item.value == row.attributeType
+              )?.label;
+            }
+          },
+          {
+            prop: 'measureType',
+            align: 'center',
+            label: '计量类型',
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return measureTypeList.find((item) => item.value == row.measureType)
+                ?.label;
+            }
+          },
+          {
+            prop: 'isEnabled',
+            align: 'center',
+            label: '状态',
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row.isEnabled===0?'停用': row.isEnabled===1?'启用':''
+            }
+          }
         ],
 
         newColumns: [],
-
         // 表格选中数据
         selection: [],
         // 是否显示编辑弹窗
@@ -398,6 +500,7 @@
     },
 
     created() {
+      this.requestDict('生产类型');
       this.getFieldModel();
     },
 
@@ -415,7 +518,10 @@
 
         this.$refs.bomDrawer.open(rowData);
       },
-
+      //采购
+      moveTo() {
+        this.$refs.DialogMoveToRef.open(this.selection);
+      },
       successUpload(response) {
         this.isLoading = false;
       },
@@ -461,7 +567,7 @@
         this.$refs.table.reload({
           page: 1,
           where: where,
-          categoryLevelId:  this.currentId
+          categoryLevelId: this.currentId
         });
       },
 

+ 129 - 13
src/views/material/product/components/link-msg.vue

@@ -22,6 +22,10 @@
         <ele-pro-table :columns="equiColumn" :datasource="eqData">
         </ele-pro-table
       ></el-tab-pane>
+      <el-tab-pane label="供应商">
+        <ele-pro-table :columns="supplierColumn" :datasource="supplierData" :need-page="false">
+        </ele-pro-table
+      ></el-tab-pane>
     </el-tabs>
   </div>
 </template>
@@ -30,14 +34,16 @@
   import { getBomRoutingList } from '@/api/material/list.js';
   import { getRelatesInformationList } from '@/api/material/product.js';
   import dictMixins from '@/mixins/dictMixins';
+  import storage from '@/api/warehouseManagement/index.js';
   export default {
     mixins: [dictMixins],
     props: {
       id: [Number, String],
       categoryLevelId: [Number, String],
+      code: [Number, String],
       categoryLevelGroupId: [Number, String]
     },
-    data () {
+    data() {
       return {
         activeTab: '0',
         moduleColumn: [
@@ -157,60 +163,170 @@
             }
           }
         ],
+        supplierColumn:[
+
+          {
+            prop: 'code',
+            label: '编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'name',
+            label: '名称',
+            align: 'center',
+            slot: 'name',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'serialNo',
+            label: '代号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'phone',
+            label: '电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'addressName',
+            label: '注册地址',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120,
+            formatter: (_row, _column, cellValue) => {
+              return (
+                (_row.addressName ? _row.addressName.replaceAll(',', '') : '') +
+                 ( _row.address || '')
+              );
+            }
+          },
+          {
+            prop: 'otherAddressName',
+            label: '联系地址',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120,
+            formatter: (_row, _column, cellValue) => {
+              return (
+                (_row.otherAddressName
+                  ? _row.otherAddressName.replaceAll(',', '')
+                  : '') + (_row.otherAddress || '')
+              );
+            }
+          },
+          {
+            prop: 'linkName',
+            label: '联系人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'linkPhone',
+            label: '联系人电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return _row.status === 1 ? '启用' : '禁用';
+            }
+          },
+          {
+            prop: 'createUsername',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 160,
+            formatter: (_row, _column, cellValue) => {
+              return this.$util.toDateString(cellValue);
+            }
+          },
+        ],
         moduleData: [],
         eqData: [],
         bomData: [],
-        pathData: []
+        pathData: [],
+        supplierData:[]//供应商
       };
     },
     watch: {
       id: {
-        handler (val) {
+        handler(val) {
           if (val) {
             this.getData();
+            this.contactQueryByCategoryIdsAPI();
           }
         },
         immediate: true
       },
       categoryLevelId: {
-        handler (val) {
+        handler(val) {
           if (val) {
             this.getModuleData();
             this.getEqData();
           }
         },
         immediate: true
-      }
+      },
     },
-    created () {
+    created() {
       this.requestDict('重量单位');
     },
     methods: {
-      async getData () {
+      async getData() {
         const data = await getBomRoutingList(this.id);
 
         this.bomData = data?.bomList || [];
         this.pathData = data?.routingList || [];
       },
       // 关联设备
-      async getEqData () {
+      async getEqData() {
         const data = await getRelatesInformationList({
           mainCategoryId: this.categoryLevelId,
-          categoryLevelRootId: 4 ,//设备
-          categoryLevelGroupId:this.categoryLevelGroupId
+          categoryLevelRootId: 4, //设备
+          categoryLevelGroupId: this.categoryLevelGroupId
         });
 
         this.eqData = data;
       },
       // 关联舟皿
-      async getModuleData () {
+      async getModuleData() {
         const data = await getRelatesInformationList({
           mainCategoryId: this.categoryLevelId,
-          categoryLevelRootId: 5 ,//模具
-          categoryLevelGroupId:this.categoryLevelGroupId
+          categoryLevelRootId: 5, //模具
+          categoryLevelGroupId: this.categoryLevelGroupId
         });
 
         this.moduleData = data;
+      },
+      // 关联供应商
+      async contactQueryByCategoryIdsAPI() {
+        const data = await storage.contactQueryByCategoryIdsAPI({
+          categoryIds:[this.id]
+        });
+
+        this.supplierData = data[this.id]||[];
       }
     }
   };

+ 20 - 4
src/views/material/product/detail.vue

@@ -149,7 +149,23 @@
               </template>
             </el-form-item>
           </el-col>
-
+          <el-col :span="8">
+            <el-form-item label="状态">
+              <template>
+          
+          <el-switch
+                v-model="form.isEnabled"
+                   :active-text="form.isEnabled==1?'启用':'停用'"
+                   :active-value="1"
+                   :inactive-value="0"
+                >
+            </el-switch>
+           
+          
+              </template>
+            </el-form-item>
+          </el-col>
+       
           <el-col :span="8" v-for="(f, idx) in fileList" :key="idx">
             <el-form-item :label="f.label">
               <template>
@@ -195,7 +211,7 @@
     <RemarkInfo ref="remarkRefs" :form="remarkform" />
     <!-- 关联信息 -->
     <linkMsg ref="linkMsgRef" :id="$route.query.id" :categoryLevelId="form.categoryLevelId"
-      :categoryLevelGroupId="form.categoryLevelGroupId" />
+      :categoryLevelGroupId="form.categoryLevelGroupId" :code="form.code" />
   </div>
 </template>
 
@@ -301,7 +317,7 @@ export default {
         attributeType: '',
         weightUnit: '',
         packingUnit: '',
-
+        isEnabled:1,
         extField: {}
       },
       attributeList: [
@@ -415,7 +431,7 @@ export default {
             remarkAttach: []
           };
           this.categoryAps = {};
-          this.categoryMes = { productionDays: '20' };
+          this.categoryMes = { productionDays: '20',isCompleteSet:0,isModify:0,isRework:0,isRematerial:0,isByProduct:0,isWaste:0,isDefective:0 };
           this.categoryMold = {};
           this.categoryPallet = {};
           this.categoryQms = {};

+ 15 - 19
src/views/system/organization/components/org-user-edit.vue

@@ -134,7 +134,18 @@
             >
             </el-date-picker>
           </el-form-item>
-
+            <el-form-item label="是否启用">
+          
+          <el-switch
+                v-model="form.isEnabled"
+                   :active-text="form.isEnabled==1?'启用':'停用'"
+                   :active-value="1"
+                   :inactive-value="0"
+                >
+            </el-switch>
+           
+          
+            </el-form-item>
           <el-form-item label="审批签名:" prop="signature">
             <WithView :assetName="''" v-model="form.signature"></WithView>
           </el-form-item>
@@ -1114,7 +1125,7 @@ export default {
       contracts: [],
       deptIds: [],
       deptName: '',
-
+      isEnabled:1,
       groupId: null,
       groupName: null,
       name: '',
@@ -1150,24 +1161,9 @@ export default {
         ],
         jobNumber: [
           {
-            required: false,
+            required: true,
             trigger: 'blur',
-            validator: (_rule, value, callback) => {
-              if (!value) {
-                return callback(new Error('请输入工号'));
-              }
-              checkExistence(this.form.jobNumber)
-                .then((res) => {
-                  if (res != true && res != this.form.id) {
-                    callback(new Error('工号已经存在'));
-                  } else {
-                    callback();
-                  }
-                })
-                .catch(() => {
-                  callback();
-                });
-            }
+  
           }
         ],
         status: [{ required: true, message: '请选择员工状态', trigger: 'blur' }]

+ 305 - 287
src/views/system/organization/components/org-user-list.vue

@@ -173,303 +173,321 @@
 </template>
 
 <script>
-import OrgUserSearch from './org-user-search.vue';
-import OrgUserEdit from './org-user-edit.vue';
-import importDialog from '@/components/upload/import-dialog.vue';
-import addUsers from '@/views/system/user/components/user-edit.vue';
-import UserSearch from '@/views/system/user/components/user-search.vue';
-import {
-  getUserPage,
-  removePersonnel,
-  unbindLoginName
-} from '@/api/system/organization';
-import { pageUsers, exportUsers } from '@/api/system/user';
-export default {
-  components: {
-    importDialog,
-    OrgUserSearch,
-    OrgUserEdit,
-    addUsers,
-    UserSearch
-  },
-  props: {
-    // 机构id
-    organizationId: [Number, String],
-    // 全部机构
-    organizationList: Array,
-    institutionList: Array
-  },
-  data() {
-    return {
-      moudleName: 'mainUser',
-      showEdit1: false,
-      userShow: false,
-      userRow: null,
-      currentRow: null,
-      dialogVisible: false,
-      radio: '2',
-      // 表格列配置
-      columns: [
-        {
-          columnKey: 'index',
-          type: 'index',
-          width: 45,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          prop: 'name',
-          label: '姓名',
-          slot: 'name',
-          sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'jobNumber',
-          label: '工号',
-          sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'loginName',
-          label: '用户账号',
-          sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'sex',
-          label: '性别',
-          sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 80,
-          formatter: (_row, _column, cellValue) => {
-            return cellValue == 1 ? '男' : cellValue == 2 ? '女' : '';
-          }
-        },
-        {
-          prop: 'status',
-          label: '状态',
-          align: 'center',
-          sortable: 'custom',
-          width: 80,
-          formatter: (_row, _column, cellValue) => {
-            const dom = this.statusOptions.find((item) => {
-              return item.value == cellValue;
-            });
-            return dom ? dom.label : '';
-          }
-        },
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 110,
-          formatter: (_row, _column, cellValue) => {
-            return this.$util.toDateString(cellValue);
+  import OrgUserSearch from './org-user-search.vue';
+  import OrgUserEdit from './org-user-edit.vue';
+  import importDialog from '@/components/upload/import-dialog.vue';
+  import addUsers from '@/views/system/user/components/user-edit.vue';
+  import UserSearch from '@/views/system/user/components/user-search.vue';
+  import {
+    getUserPage,
+    removePersonnel,
+    unbindLoginName
+  } from '@/api/system/organization';
+  import { pageUsers, exportUsers } from '@/api/system/user';
+  export default {
+    components: {
+      importDialog,
+      OrgUserSearch,
+      OrgUserEdit,
+      addUsers,
+      UserSearch
+    },
+    props: {
+      // 机构id
+      organizationId: [Number, String],
+      // 全部机构
+      organizationList: Array,
+      institutionList: Array
+    },
+    data() {
+      return {
+        moudleName: 'mainUser',
+        showEdit1: false,
+        userShow: false,
+        userRow: null,
+        currentRow: null,
+        dialogVisible: false,
+        radio: '2',
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            type: 'index',
+            width: 45,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'name',
+            label: '姓名',
+            slot: 'name',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'jobNumber',
+            label: '工号',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'loginName',
+            label: '用户账号',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'sex',
+            label: '性别',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 80,
+            formatter: (_row, _column, cellValue) => {
+              return cellValue == 1 ? '男' : cellValue == 2 ? '女' : '';
+            }
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            sortable: 'custom',
+            width: 80,
+            formatter: (_row, _column, cellValue) => {
+              const dom = this.statusOptions.find((item) => {
+                return item.value == cellValue;
+              });
+              return dom ? dom.label : '';
+            }
+          },
+          {
+            prop: 'isEnabled',
+            align: 'center',
+            label: '是否启用',
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row.isEnabled === 0
+                ? '停用'
+                : row.isEnabled === 1
+                ? '启用'
+                : '';
+            }
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row, _column, cellValue) => {
+              return this.$util.toDateString(cellValue);
+            }
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 200,
+            align: 'left',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
           }
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 200,
-          align: 'left',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true
-        }
-      ],
-      // 表格列配置
-      columns1: [
-        {
-          columnKey: 'index',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left',
-          label: '序号'
-        },
-        {
-          prop: 'loginName',
-          label: '用户账号',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'jobNumber',
-          label: '工号',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'name',
-          label: '姓名',
+        ],
+        // 表格列配置
+        columns1: [
+          {
+            columnKey: 'index',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left',
+            label: '序号'
+          },
+          {
+            prop: 'loginName',
+            label: '用户账号',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'jobNumber',
+            label: '工号',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'name',
+            label: '姓名',
 
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'phone',
-          label: '手机号',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'phone',
+            label: '手机号',
 
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
 
-        {
-          columnKey: 'groupRoleList',
-          label: '角色',
-          showOverflowTooltip: true,
-          minWidth: 110,
-          formatter: (_row, _column, cellValue) => {
-            let names = [];
-            _row.groupRoleList.forEach((item) => {
-              names.push(...item.roleVOList.map((val) => val.name));
-            });
-            return names.toString();
-          }
-        },
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          // sortable: 'custom',
-          showOverflowTooltip: true,
-          minWidth: 110,
-          formatter: (_row, _column, cellValue) => {
-            return this.$util.toDateString(cellValue);
+          {
+            columnKey: 'groupRoleList',
+            label: '角色',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row, _column, cellValue) => {
+              let names = [];
+              _row.groupRoleList.forEach((item) => {
+                names.push(...item.roleVOList.map((val) => val.name));
+              });
+              return names.toString();
+            }
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            // sortable: 'custom',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row, _column, cellValue) => {
+              return this.$util.toDateString(cellValue);
+            }
           }
-        }
-      ],
-      // 当前编辑数据
-      current: null,
-      // 是否显示编辑弹窗
-      showEdit: false,
-      statusOptions: [
-        { value: 1, label: '全职' },
-        { value: 2, label: '兼职' },
-        { value: 3, label: '实习' },
-        { value: 4, label: '正式' },
-        { value: 5, label: '试用' },
-        { value: 6, label: '离职' }
-      ]
-    };
-  },
-  methods: {
-    async addUsers(row) {
-      // this.userRow = null;
-      this.currentRow = row;
-      this.dialogVisible = true;
+        ],
+        // 当前编辑数据
+        current: null,
+        // 是否显示编辑弹窗
+        showEdit: false,
+        statusOptions: [
+          { value: 1, label: '全职' },
+          { value: 2, label: '兼职' },
+          { value: 3, label: '实习' },
+          { value: 4, label: '正式' },
+          { value: 5, label: '试用' },
+          { value: 6, label: '离职' }
+        ]
+      };
     },
-    setUser() {
-      this.dialogVisible = false;
-      if (this.radio == 1) {
-        this.userShow = true;
-      } else {
+    methods: {
+      async addUsers(row) {
+        // this.userRow = null;
+        this.currentRow = row;
+        this.dialogVisible = true;
+      },
+      setUser() {
+        this.dialogVisible = false;
+        if (this.radio == 1) {
+          this.userShow = true;
+        } else {
+          this.showEdit1 = true;
+          this.$refs.userEdit.userBk(this.currentRow);
+        }
+      },
+      getUser() {
+        if (!this.userRow) {
+          this.$message.warning('请选择一条数据!');
+          return;
+        }
+        this.userShow = false;
         this.showEdit1 = true;
-        this.$refs.userEdit.userBk(this.currentRow);
-      }
-    },
-    getUser() {
-      if (!this.userRow) {
-        this.$message.warning('请选择一条数据!');
-        return;
-      }
-      this.userShow = false;
-      this.showEdit1 = true;
-      this.$refs.userEdit.getByData(this.userRow, this.currentRow);
-    },
-
-    /* 表格数据源 */
-    datasource({ page, limit, where, order }) {
-      return getUserPage({
-        ...where,
-        pageNum: page,
-        orderName:order.order||'',
-        sortBy:order.sort||'',
-        size: limit,
-        groupId: this.organizationId
-      });
-    },
-    /* 表格数据源 */
-    datasource1({ page, limit, where, order }) {
-      return pageUsers({ ...where, ...order, pageNum: page, size: limit });
-    },
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({ pageNum: 1, where: where });
-    },
-    reload1(where) {
-      this.$refs.table1.reload({ pageNum: 1, where: where });
-    },
-    exportUsers() {
-      let where = this.$refs.searchRef.geValue();
-      this.reload(where)
-       
-      exportUsers({ ...where, pageNum: 1, size: 10000, groupId: this.organizationId });
-    },
-    /* 显示编辑 */
-    openEdit(row, disabled) {
-      this.current = row;
-      this.showEdit = true;
-      this.$refs.userEditRef.setDisabled(disabled);
-    },
+        this.$refs.userEdit.getByData(this.userRow, this.currentRow);
+      },
 
-    // 解除绑定
-    toUnBind(row) {
-      const loading = this.$loading({ lock: true });
-      unbindLoginName(row.id)
-        .then((res) => {
-          loading.close();
-          this.$message.success('解绑成功');
-          this.reload();
-        })
-        .catch((e) => {
-          loading.close();
-          // this.$message.error(e.message);
-        });
-    },
-    /* 删除 */
-    remove(row) {
-      const loading = this.$loading({ lock: true });
-      removePersonnel([row.id])
-        .then((msg) => {
-          loading.close();
-          this.$message.success(msg);
-          this.reload();
-        })
-        .catch((e) => {
-          loading.close();
-          // this.$message.error(e.message);
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return getUserPage({
+          ...where,
+          pageNum: page,
+          orderName: order.order || '',
+          sortBy: order.sort || '',
+          size: limit,
+          groupId: this.organizationId
         });
-    },
-    /* 更改状态 */
-    editStatus(row) {
-      const loading = this.$loading({ lock: true });
-      updateUserStatus(row.userId, row.status)
-        .then((msg) => {
-          loading.close();
-          this.$message.success(msg);
-        })
-        .catch((e) => {
-          loading.close();
-          row.status = !row.status ? 1 : 0;
-          // this.$message.error(e.message);
+      },
+      /* 表格数据源 */
+      datasource1({ page, limit, where, order }) {
+        return pageUsers({ ...where, ...order, pageNum: page, size: limit });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ pageNum: 1, where: where });
+      },
+      reload1(where) {
+        this.$refs.table1.reload({ pageNum: 1, where: where });
+      },
+      exportUsers() {
+        let where = this.$refs.searchRef.geValue();
+        this.reload(where);
+
+        exportUsers({
+          ...where,
+          pageNum: 1,
+          size: 10000,
+          groupId: this.organizationId
         });
+      },
+      /* 显示编辑 */
+      openEdit(row, disabled) {
+        this.current = row;
+        this.showEdit = true;
+        this.$refs.userEditRef.setDisabled(disabled);
+      },
+
+      // 解除绑定
+      toUnBind(row) {
+        const loading = this.$loading({ lock: true });
+        unbindLoginName(row.id)
+          .then((res) => {
+            loading.close();
+            this.$message.success('解绑成功');
+            this.reload();
+          })
+          .catch((e) => {
+            loading.close();
+            // this.$message.error(e.message);
+          });
+      },
+      /* 删除 */
+      remove(row) {
+        const loading = this.$loading({ lock: true });
+        removePersonnel([row.id])
+          .then((msg) => {
+            loading.close();
+            this.$message.success(msg);
+            this.reload();
+          })
+          .catch((e) => {
+            loading.close();
+            // this.$message.error(e.message);
+          });
+      },
+      /* 更改状态 */
+      editStatus(row) {
+        const loading = this.$loading({ lock: true });
+        updateUserStatus(row.userId, row.status)
+          .then((msg) => {
+            loading.close();
+            this.$message.success(msg);
+          })
+          .catch((e) => {
+            loading.close();
+            row.status = !row.status ? 1 : 0;
+            // this.$message.error(e.message);
+          });
+      },
+      uploadFile() {
+        this.$refs.importDialogRef.open();
+      }
     },
-    uploadFile() {
-      this.$refs.importDialogRef.open();
-    }
-  },
-  watch: {
-    // 监听机构id变化
-    organizationId() {
-      this.reload();
+    watch: {
+      // 监听机构id变化
+      organizationId() {
+        this.reload();
+      }
     }
-  }
-};
+  };
 </script>