|
|
@@ -58,23 +58,21 @@ export default {
|
|
|
|
|
|
rows: [
|
|
|
{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'),
|
|
|
fieldFlag: true,
|
|
|
-
|
|
|
placeholderFlag:true,
|
|
|
}, //替班员工
|
|
|
|
|
|
],//每一条的内容
|
|
|
- wsClockItemList: [],
|
|
|
+ wsClockItemList: [],//打卡明细
|
|
|
formData: {
|
|
|
userId: this.$store.state.user.id,//工号id
|
|
|
stationId: '',//工位id
|
|
|
stationName: '',//工位名称
|
|
|
stationCode: '',//工位code
|
|
|
- wsClockItemList: [], //打卡明细
|
|
|
},
|
|
|
showStation:false,//是否显示工位选择控件
|
|
|
}
|
|
|
@@ -104,12 +102,37 @@ export default {
|
|
|
|
|
|
// 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 : 输入框 列表键盘回车事件
|
|
|
* @author : 王英杰
|
|
|
* @date : 2023/3/20 16:37
|
|
|
*/
|
|
|
- changeItemBarCode(){
|
|
|
-
|
|
|
+ changeItemBarCode(e){
|
|
|
+ this.queryUser(e.index,e.item.staffCode) //根据输入的usercode 查询 userid
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 单选侧拉确定
|