|
@@ -651,17 +651,24 @@ export default {
|
|
|
//默认时间/默认当前账号
|
|
|
defualtData(item){
|
|
|
if(item[1].label =='today'){
|
|
|
- if(item[2].label){
|
|
|
- item[0].value =moment(new Date().toLocaleDateString()).format('YYYY-MM-DD')
|
|
|
- }else{
|
|
|
- item[0].value =moment(new Date().toLocaleDateString()).format('YYYY-MM-DD HH:mm')
|
|
|
- }
|
|
|
+ if(item[2].label){
|
|
|
+ item[0].value =moment(new Date().toLocaleDateString()).format('YYYY-MM-DD')
|
|
|
+ }else{
|
|
|
+ item[0].value =moment(new Date().toLocaleDateString()).format('YYYY-MM-DD HH:mm')
|
|
|
+ }
|
|
|
var that = this
|
|
|
setTimeout(function(){
|
|
|
- that.$refs.KFB.setData({[item[0].label]:item[0].value})
|
|
|
- },0)
|
|
|
+ that.$refs.KFB.setData({[item[0].label]:item[0].value})
|
|
|
+ },0)
|
|
|
+
|
|
|
+ }else if(item[1].label =='deptName'){
|
|
|
+ var that = this
|
|
|
+ setTimeout(function(){
|
|
|
+ that.$refs.KFB.setData({[item[0].label]:that.$store.getters.userInfo.deptName})
|
|
|
+ },200)
|
|
|
+
|
|
|
}else if(item[1].label =='user'){
|
|
|
- this.$store.getters.userInfo
|
|
|
+ // this.$store.getters.userInfo
|
|
|
var that = this
|
|
|
setTimeout(function(){
|
|
|
that.$refs.KFB.setData({[item[0].label]:that.$store.getters.userInfo.realname})
|
|
@@ -737,17 +744,23 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}else if(item[1].label =='automatic'){
|
|
|
- var that = this
|
|
|
+ var that = this
|
|
|
setTimeout(function(){
|
|
|
- if(that.processData.businessTable == 'incident_ticket'){ // 森语-质量事故单-自动生成事故单号
|
|
|
- if( that.processData.tableId==''|| !that.processData.tableId){
|
|
|
- that.getAction('/sys/user/getNextNo',{name:'accidentCode'}).then(res => {
|
|
|
- that.$refs.KFB.setData({accident_number:res})
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- },200)
|
|
|
+ if(that.processData.businessTable == 'incident_ticket'){ // 森语-质量事故单-自动生成事故单号
|
|
|
+ if( that.processData.tableId==''|| !that.processData.tableId){
|
|
|
+ that.getAction('/sys/user/getNextNo',{name:'accidentCode'}).then(res => {
|
|
|
+ that.$refs.KFB.setData({accident_number:res})
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }else if(that.processData.businessTable == 'expense_account'){//报销单-自动生成单号
|
|
|
+ if( that.processData.tableId==''|| !that.processData.tableId){
|
|
|
+ that.getAction('/sys/user/getNextNo',{name:'BXDCode'}).then(res => {
|
|
|
+ that.$refs.KFB.setData({reimbursement_no:res})
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },200)
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
// 获取申请人信息
|