chunk-3b73a80c.700f18d9.js 13 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b73a80c"],{"0f63":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"flow-form"},[a("div",{staticClass:"com-title"},[a("h1",[t._v("补卡申请")]),a("span",{staticClass:"number"},[t._v("单据号:"+t._s(t.dataForm.billNo))])]),a("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"110px",disabled:t.setting.readonly}},[a("el-row",[t.judgeShow("flowTitle")?a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"流程标题",prop:"flowTitle"}},[a("el-input",{attrs:{placeholder:"流程标题",disabled:t.judgeWrite("flowTitle")},model:{value:t.dataForm.flowTitle,callback:function(e){t.$set(t.dataForm,"flowTitle",e)},expression:"dataForm.flowTitle"}})],1)],1):t._e(),t.judgeShow("flowUrgent")?a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"紧急程度",prop:"flowUrgent"}},[a("el-select",{attrs:{placeholder:"选择紧急程度",disabled:t.judgeWrite("flowUrgent")},model:{value:t.dataForm.flowUrgent,callback:function(e){t.$set(t.dataForm,"flowUrgent",e)},expression:"dataForm.flowUrgent"}},t._l(t.flowUrgentOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1):t._e(),t.judgeShow("applyUser")?a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"申请人员",prop:"applyUser"}},[a("el-input",{attrs:{readonly:"",disabled:t.judgeWrite("applyUser")},model:{value:t.dataForm.applyUser,callback:function(e){t.$set(t.dataForm,"applyUser",e)},expression:"dataForm.applyUser"}})],1)],1):t._e(),t.judgeShow("applyDate")?a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"申请日期",prop:"applyDate"}},[a("el-date-picker",{attrs:{type:"date","value-format":"timestamp",format:"yyyy-MM-dd",editable:!1,readonly:"",disabled:t.judgeWrite("applyDate")},model:{value:t.dataForm.applyDate,callback:function(e){t.$set(t.dataForm,"applyDate",e)},expression:"dataForm.applyDate"}})],1)],1):t._e(),t.judgeShow("applyDept")?a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"申请部门",prop:"applyDept"}},[a("el-input",{attrs:{readonly:"",disabled:t.judgeWrite("applyDept")},model:{value:t.dataForm.applyDept,callback:function(e){t.$set(t.dataForm,"applyDept",e)},expression:"dataForm.applyDept"}})],1)],1):t._e(),t.judgeShow("applyPost")?a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"申请职位",prop:"applyPost"}},[a("el-input",{attrs:{readonly:"",disabled:t.judgeWrite("applyPost")},model:{value:t.dataForm.applyPost,callback:function(e){t.$set(t.dataForm,"applyPost",e)},expression:"dataForm.applyPost"}})],1)],1):t._e(),t.judgeShow("punchTargetsJson")?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"补卡日期"}},[a("span",{staticClass:"el-text-muted"},[t._v("近 3 个自然日(不含当日)未打满卡的日期;勾选需补的上班/下班卡(可同时选)。审批通过后按考勤组标准时间写入。")]),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.candidateLoading,expression:"candidateLoading"}],staticStyle:{width:"100%","margin-top":"8px"},attrs:{data:t.punchRows,border:"",size:"small"}},[a("el-table-column",{attrs:{prop:"date",label:"日期",width:"120"}}),a("el-table-column",{attrs:{prop:"statusText",label:"当前状态","min-width":"100"}}),a("el-table-column",{attrs:{label:"补上班卡",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-checkbox",{attrs:{disabled:t.setting.readonly||!e.row.missingPunchIn},model:{value:e.row._in,callback:function(a){t.$set(e.row,"_in",a)},expression:"scope.row._in"}})]}}],null,!1,2168507058)}),a("el-table-column",{attrs:{label:"补下班卡",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-checkbox",{attrs:{disabled:t.setting.readonly||!e.row.missingPunchOut},model:{value:e.row._out,callback:function(a){t.$set(e.row,"_out",a)},expression:"scope.row._out"}})]}}],null,!1,1346818386)})],1)],1)],1):t._e(),t.judgeShow("applyReason")?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"补卡原因",prop:"applyReason"}},[a("el-input",{attrs:{type:"textarea",rows:3,placeholder:"请说明补卡原因",disabled:t.judgeWrite("applyReason")},model:{value:t.dataForm.applyReason,callback:function(e){t.$set(t.dataForm,"applyReason",e)},expression:"dataForm.applyReason"}})],1)],1):t._e(),t.judgeShow("fileJson")?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"相关附件",prop:"fileJson"}},[a("NCC-UploadFz",{attrs:{type:"workFlow",disabled:t.judgeWrite("fileJson")},model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}})],1)],1):t._e()],1)],1)],1)},o=[],r=(a("55dd"),a("5df3"),a("4f7f"),a("7514"),a("ac6a"),a("7f7f"),a("a99b")),i=a("826a"),s=a("8da0"),l={name:"AttendancePunchApplyForm",mixins:[r["default"]],data:function(){return{billEnCode:"WF_AttendancePunchApplyNo",formApiKey:"attendancePunchApply",candidateLoading:!1,punchRows:[],dataForm:{id:"",flowId:"",billNo:"",flowTitle:"",flowUrgent:1,applyUser:"",applyDate:"",applyDept:"",applyPost:"",punchTargetsJson:"[]",applyReason:"",fileJson:"",description:""},dataRule:{flowTitle:[{required:!0,message:"流程标题不能为空",trigger:"blur"}],flowUrgent:[{required:!0,message:"紧急程度不能为空",trigger:"change"}],applyReason:[{required:!0,message:"补卡原因不能为空",trigger:"blur"}]}}},methods:{syncPunchJson:function(){var t=(this.punchRows||[]).filter((function(t){return t._in||t._out})).map((function(t){return{date:t.date,punchIn:!!t._in,punchOut:!!t._out}}));this.dataForm.punchTargetsJson=JSON.stringify(t)},selfInit:function(){this.dataForm.applyDate=(new Date).getTime(),this.dataForm.flowTitle=this.userInfo.userName+"的补卡申请",this.dataForm.applyUser=this.userInfo.userName+"/"+this.userInfo.userAccount,this.dataForm.applyDept=this.userInfo.organizeName,this.userInfo.positionIds&&this.userInfo.positionIds.length&&(this.dataForm.applyPost=this.userInfo.positionIds.map((function(t){return t.name})).join(",")),this.loadPunchCandidates("[]")},loadPunchCandidates:function(t){var e=this;this.candidateLoading=!0;var a=void 0!==t?t:this.dataForm.punchTargetsJson||"[]",n=[];try{n=JSON.parse(a||"[]")||[]}catch(r){n=[]}var o=!(!this.setting||!this.setting.readonly);return Object(s["g"])({}).then((function(t){var a=t.data||[];e.punchRows=a.map((function(t){return{date:t.date,statusText:t.statusText,missingPunchIn:t.missingPunchIn,missingPunchOut:t.missingPunchOut,_in:!1,_out:!1}})),n.length&&n.forEach((function(t){if(t&&t.date){var a=e.punchRows.find((function(e){return e.date===t.date}));a&&(o?(a._in=!!t.punchIn,a._out=!!t.punchOut):(a._in=!!t.punchIn&&a.missingPunchIn,a._out=!!t.punchOut&&a.missingPunchOut))}}));var r=new Set(e.punchRows.map((function(t){return t.date})));n.forEach((function(t){t&&t.date&&!r.has(t.date)&&(t.punchIn||t.punchOut)&&(r.add(t.date),e.punchRows.push({date:t.date,statusText:"申请已选日期",missingPunchIn:!!t.punchIn,missingPunchOut:!!t.punchOut,_in:!!t.punchIn,_out:!!t.punchOut}))})),e.punchRows.sort((function(t,e){return String(e.date).localeCompare(String(t.date))})),e.syncPunchJson()})).finally((function(){e.candidateLoading=!1}))},selfGetInfo:function(){var t=this;Object(i["e"])(this.formApiKey,this.setting.id).then((function(e){t.dataForm=e.data,e.data.fileJson&&(t.fileList=JSON.parse(e.data.fileJson));var a=t.dataForm.punchTargetsJson;t.loadPunchCandidates(a).then((function(){t.$emit("setPageLoad")}))}))},exist:function(){this.syncPunchJson();var t=(this.punchRows||[]).some((function(t){return t._in||t._out}));return!!t||(this.$message.warning("请至少勾选一天的上班卡或下班卡"),!1)},selfSubmit:function(){var t=this;if(this.syncPunchJson(),this.dataForm.status="submit"===this.eventType?0:1,"save"===this.eventType)return this.selfHandleRequest();this.$confirm("确定提交补卡申请?审批通过后将按考勤组标准时间自动写入打卡。","提示",{type:"warning"}).then((function(){t.selfHandleRequest()})).catch((function(){}))},selfHandleRequest:function(){var t=this;this.syncPunchJson(),this.dataForm.id||delete this.dataForm.id,"save"===this.eventType&&this.$emit("setLoad",!0);var e=this.dataForm.id?i["g"]:i["a"];e(this.formApiKey,this.dataForm).then((function(e){t.$message({message:e.msg,type:"success",duration:1500,onClose:function(){"save"===t.eventType&&t.$emit("setLoad",!1),t.$emit("close",!0)}})})).catch((function(){"save"===t.eventType&&t.$emit("setLoad",!1)}))}}},u=l,d=(a("6ca7"),a("2877")),c=Object(d["a"])(u,n,o,!1,null,"6b05e3a1",null);e["default"]=c.exports},"6ca7":function(t,e,a){"use strict";a("b18f")},"826a":function(t,e,a){"use strict";a.d(e,"e",(function(){return o})),a.d(e,"a",(function(){return r})),a.d(e,"g",(function(){return i})),a.d(e,"c",(function(){return s})),a.d(e,"b",(function(){return l})),a.d(e,"d",(function(){return u})),a.d(e,"f",(function(){return d}));a("a481");var n=a("b775");function o(t,e){return t=t.replace(t[0],t[0].toUpperCase()),Object(n["a"])({url:"/api/workflow/Form/".concat(t,"/").concat(e),method:"get"})}function r(t,e){return t=t.replace(t[0],t[0].toUpperCase()),Object(n["a"])({url:"/api/workflow/Form/".concat(t),method:"post",data:e})}function i(t,e){return t=t.replace(t[0],t[0].toUpperCase()),Object(n["a"])({url:"/api/workflow/Form/".concat(t,"/").concat(e.id),method:"put",data:e})}function s(t){return Object(n["a"])({url:"/api/workflow/Engine/FlowTask/".concat(t),method:"get"})}function l(t,e){return Object(n["a"])({url:"/api/workflow/Engine/FlowTask",method:"post",data:e})}function u(t,e){return Object(n["a"])({url:"/api/workflow/Engine/FlowTask/".concat(e.id),method:"put",data:e})}function d(){return Object(n["a"])({url:"/api/workflow/Form/LeaveApply/QuotaSummary",method:"get"})}},"8da0":function(t,e,a){"use strict";a.d(e,"d",(function(){return o})),a.d(e,"c",(function(){return r})),a.d(e,"e",(function(){return i})),a.d(e,"h",(function(){return s})),a.d(e,"a",(function(){return l})),a.d(e,"b",(function(){return u})),a.d(e,"f",(function(){return d})),a.d(e,"g",(function(){return c}));var n=a("b775");function o(t){return Object(n["a"])({url:"/api/Extend/LqAttendanceRecord/MonthReport",method:"get",data:t})}function r(t){return Object(n["a"])({url:"/api/Extend/LqAttendanceRecord/MonthReportExport",method:"get",data:t,responseType:"blob"})}function i(t){return Object(n["a"])({url:"/api/Extend/LqAttendanceRecord/Detail",method:"get",data:t})}function s(t){return Object(n["a"])({url:"/api/Extend/LqAttendanceRecord/Supplement",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/api/Extend/LqAttendanceRecord/CancelLeave",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/api/Extend/LqAttendanceRecord/CancelWorkflowSupplement",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/api/Extend/LqAttendanceRecord/LeaveCancelCandidates",method:"get",data:t||{}})}function c(t){return Object(n["a"])({url:"/api/Extend/LqAttendanceRecord/PunchApplyCandidates",method:"get",data:t||{}})}},a99b:function(t,e,a){"use strict";a.r(e);var n=a("db72"),o=a("2f62"),r=a("826a"),i=a("eff6");e["default"]={computed:Object(n["a"])({},Object(o["b"])(["userInfo"])),data:function(){return{flowUrgentOptions:[{value:1,label:"普通"},{value:2,label:"重要"},{value:3,label:"紧急"}],fileList:[],setting:{},eventType:"",loading:!1}},methods:{init:function(t){var e=this;this.dataForm.id=t.id||"",this.setting=t,this.$nextTick((function(){if(e.$refs["dataForm"].resetFields(),e.beforeInit&&e.beforeInit(),t.id){if(e.selfGetInfo&&"function"===typeof e.selfGetInfo)return e.selfGetInfo();Object(r["e"])(e.setting.enCode,t.id).then((function(t){e.dataForm=t.data,t.data.fileJson&&(e.fileList=JSON.parse(t.data.fileJson)),e.$emit("setPageLoad")}))}else{if(e.dataForm.flowId=t.flowId,e.selfInit&&e.selfInit(t),!e.billEnCode)return e.$emit("setPageLoad");Object(i["a"])(e.billEnCode).then((function(a){"crmOrder"===t.enCode?e.dataForm.orderCode=a.data:e.dataForm.billNo=a.data,e.$emit("setPageLoad")}))}}))},getPaymentMethodOptions:function(){var t=this;this.$store.dispatch("base/getDictionaryData",{sort:"WFSettlementMethod"}).then((function(e){t.paymentMethodOptions=e}))},dataFormSubmit:function(t){var e=this;this.eventType=t,this.$refs["dataForm"].validate((function(a){if(a){if(e.exist&&!e.exist())return;if("fileJson"in e.dataForm&&(e.dataForm.fileJson=JSON.stringify(e.fileList)),("save"===t||"submit"===t)&&e.selfSubmit&&"function"===typeof e.selfSubmit)return void e.selfSubmit(e.dataForm);e.$emit("eventReciver",e.dataForm,t)}}))},judgeShow:function(t){if(4==this.setting.opType)return!0;if(!this.setting.formOperates||!this.setting.formOperates.length)return!0;var e=this.setting.formOperates.filter((function(e){return e.id===t}))||[];if(!e.length)return!0;var a=e[0];return a.read},judgeWrite:function(t){if(this.setting.readonly)return!0;if(!this.setting.formOperates||!this.setting.formOperates.length)return!1;var e=this.setting.formOperates.filter((function(e){return e.id===t}))||[];if(!e.length)return!0;var a=e[0];return!a.write}}}},b18f:function(t,e,a){}}]);