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

Merge branch 'master' of http://git.dongkesoft.com:9001/DK-MES-3.0/mes-web

周兴 пре 3 година
родитељ
комит
8b0b729c76
1 измењених фајлова са 30 додато и 7 уклоњено
  1. 30 7
      src/view-app/app/other/clock-user/index.vue

+ 30 - 7
src/view-app/app/other/clock-user/index.vue

@@ -58,23 +58,21 @@ export default {
 
 
       rows: [
       rows: [
         {name: 'jobName', title: self.$t('appJobName')},//工种
         {name: 'jobName', title: self.$t('appJobName')},//工种
-        {name: 'jobName', title: self.$t('staffName')},//工种                                             //员工名称
+        {name: 'staffName', title: self.$t('staffName')},//工种                                             //员工名称
         {
         {
-          name: 'scrapReasonName',
+          name: 'staffCode',
           title: this.$t('staffCode'),
           title: this.$t('staffCode'),
           fieldFlag: true,
           fieldFlag: true,
-
           placeholderFlag:true,
           placeholderFlag:true,
         },                                            //替班员工
         },                                            //替班员工
 
 
       ],//每一条的内容
       ],//每一条的内容
-      wsClockItemList: [],
+      wsClockItemList: [],//打卡明细
       formData: {
       formData: {
         userId: this.$store.state.user.id,//工号id
         userId: this.$store.state.user.id,//工号id
         stationId: '',//工位id
         stationId: '',//工位id
         stationName: '',//工位名称
         stationName: '',//工位名称
         stationCode: '',//工位code
         stationCode: '',//工位code
-        wsClockItemList: [], //打卡明细
       },
       },
       showStation:false,//是否显示工位选择控件
       showStation:false,//是否显示工位选择控件
     }
     }
@@ -104,12 +102,37 @@ export default {
 
 
     // region 控件 回调
     // region 控件 回调
     /**
     /**
+     * @desc   : 根据输入的usercode 查询 userid
+     * @author : 王英杰
+     * @date   : 2023/2/10 9:16
+     */
+    queryUser(index,usercode) {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        userCode: usercode,
+      }
+      this.excute(this.$service.appCommonService, this.$service.appCommonService.selectUser, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.$nextTick(()=>{
+            if (res.data) {
+              this.wsClockItemList[index].staffName =  res.data.userName
+              this.wsClockItemList[index].staffCode =  usercode
+            } else { //没查到
+              this.wsClockItemList[index].staffName =  ""
+              this.wsClockItemList[index].staffCode =  ""
+            }
+          })
+          console.log(" this.wsClockItemList", this.wsClockItemList)
+        }
+      })
+    },
+    /**
         * @desc   : 输入框 列表键盘回车事件
         * @desc   : 输入框 列表键盘回车事件
         * @author : 王英杰
         * @author : 王英杰
         * @date   : 2023/3/20 16:37
         * @date   : 2023/3/20 16:37
         */
         */
-    changeItemBarCode(){
-
+    changeItemBarCode(e){
+      this.queryUser(e.index,e.item.staffCode) //根据输入的usercode 查询 userid
     },
     },
     /**
     /**
      * @desc   : 单选侧拉确定
      * @desc   : 单选侧拉确定