gz-att-web/gz-att/static/js/chunk-1e63e44c.c5d94c8d.js

1 line
15 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1e63e44c"],{"96a2":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[a("el-form-item",{attrs:{label:"申请时间",prop:"leaveDate"}},[a("el-date-picker",{staticStyle:{width:"95%"},attrs:{clearable:!1,type:"date","value-format":"yyyy-MM-dd",placeholder:"选择申请时间"},model:{value:e.queryParams.leaveDate,callback:function(t){e.$set(e.queryParams,"leaveDate",t)},expression:"queryParams.leaveDate"}})],1),a("el-form-item",{attrs:{label:"审批状态",prop:"examineStatus"}},[a("el-select",{staticStyle:{width:"95%"},attrs:{placeholder:"审批状态"},model:{value:e.queryParams.examineStatus,callback:function(t){e.$set(e.queryParams,"examineStatus",t)},expression:"queryParams.examineStatus"}},e._l(e.dict.type.apply_status,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["flow:holiday:add"],expression:"['flow:holiday:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),a("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.tableList},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",align:"center",width:"80",type:"index"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s((e.queryParams.pageNum-1)*e.queryParams.pageSize+t.$index+1))])]}}])}),a("el-table-column",{attrs:{label:"姓名",align:"center",prop:"userName",width:"100"}}),a("el-table-column",{attrs:{label:"所属部门",align:"center",prop:"orgName","show-overflow-tooltip":!0,width:"240"}}),a("el-table-column",{attrs:{label:"申请时间",align:"center",prop:"createTime","show-overflow-tooltip":!0,width:"180"}}),a("el-table-column",{attrs:{label:"轮休开始时间",align:"center",prop:"leaveStartDate","show-overflow-tooltip":!0,width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.leaveStartDate)+" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.leaveStartInterval,expression:"scope.row.leaveStartInterval=='1'"}]},[e._v("上午")]),a("span",{directives:[{name:"show",rawName:"v-show",value:"2"==t.row.leaveStartInterval,expression:"scope.row.leaveStartInterval=='2'"}]},[e._v("下午")])])]}}])}),a("el-table-column",{attrs:{label:"轮休结束时间",align:"center",prop:"leaveEndDate","show-overflow-tooltip":!0,width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.leaveEndDate)+" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"1"==t.row.leaveEndInterval,expression:"scope.row.leaveEndInterval=='1'"}]},[e._v("上午")]),a("span",{directives:[{name:"show",rawName:"v-show",value:"2"==t.row.leaveEndInterval,expression:"scope.row.leaveEndInterval=='2'"}]},[e._v("下午")])])]}}])}),a("el-table-column",{attrs:{label:"轮休时长(天)",align:"center",prop:"leaveDuration","show-overflow-tooltip":!0,width:"180"}}),a("el-table-column",{attrs:{label:"审批状态",align:"center",prop:"examineStatus","show-overflow-tooltip":!0,width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("dict-tag",{attrs:{options:e.dict.type.apply_status,value:t.row.examineStatus}})]}}])}),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[3==t.row.examineStatus?a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["flow:holiday:edit"],expression:"['flow:holiday:edit']"}],attrs:{size:"mini",type:"primary"},on:{click:function(a){return e.handleUpdate(t.row)}}},[e._v("编辑")]):e._e(),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["flow:holiday:query"],expression:"['flow:holiday:query']"}],attrs:{size:"mini"},on:{click:function(a){return e.handleView(t.row)}}},[e._v("详情")]),0==t.row.examineStatus?a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["flow:holiday:edit"],expression:"['flow:holiday:edit']"}],attrs:{size:"mini",type:"primary"},on:{click:function(a){return e.handleBack(t.row)}}},[e._v("撤回")]):e._e(),2==t.row.examineStatus||3==t.row.examineStatus?a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["flow:holiday:remove"],expression:"['flow:holiday:remove']"}],attrs:{size:"mini",type:"danger"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")]):e._e()]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),a("el-dialog",{attrs:{title:e.title,visible:e.open,width:"900px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"130px"}},[a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"申请人员:",prop:"userName"}},[a("el-input",{attrs:{readonly:!0},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"所属部门:",prop:"orgId"}},[a("el-select",{attrs:{disabled:e.isView},on:{change:e.changDept},model:{value:e.form.orgId,callback:function(t){e.$set(e.form,"orgId",t)},expression:"form.orgId"}},e._l(e.orgList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"轮休开始时间:",prop:"leaveStartDate"}},[a("el-date-picker",{staticStyle:{width:"70%"},attrs:{clearable:!1,readonly:e.isView,type:"date","value-format":"yyyy-MM-dd",placeholder:"轮休开始时间",pickerOptions:e.startPickerOptions},on:{change:e.handleDateChange},model:{value:e.form.leaveStartDate,callback:function(t){e.$set(e.form,"leaveStartDate",t)},expression:"form.leaveStartDate"}}),a("el-select",{staticStyle:{width:"25%","margin-left":"10px"},attrs:{disabled:e.isView},on:{change:e.handleDateChange},model:{value:e.form.leaveStartInterval,callback:function(t){e.$set(e.form,"leaveStartInterval",t)},expression:"form.leaveStartInterval"}},e._l(e.timeStatusList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"轮休结束时间:",prop:"leaveEndDate"}},[a("el-date-picker",{staticStyle:{width:"70%"},attrs:{clearable:!1,readonly:e.isView,type:"date","value-format":"yyyy-MM-dd",placeholder:"轮休结束时间",pickerOptions:e.endPickerOptions},on:{change:e.handleDateChange},model:{value:e.form.leaveEndDate,callback:function(t){e.$set(e.form,"leaveEndDate",t)},expression:"form.leaveEndDate"}}),a("el-select",{staticStyle:{width:"25%","margin-left":"10px"},attrs:{disabled:e.isView},on:{change:e.handleDateChange},model:{value:e.form.leaveEndInterval,callback:function(t){e.$set(e.form,"leaveEndInterval",t)},expression:"form.leaveEndInterval"}},e._l(e.timeStatusList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"轮休时长(天)",prop:"leaveDuration"}},[a("el-input",{attrs:{disabled:""},model:{value:e.form.leaveDuration,callback:function(t){e.$set(e.form,"leaveDuration",t)},expression:"form.leaveDuration"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"轮休事由:",prop:"leaveReason"}},[a("el-input",{attrs:{type:"textarea",maxlength:"100",readonly:e.isView},model:{value:e.form.leaveReason,callback:function(t){e.$set(e.form,"leaveReason",t)},expression:"form.leaveReason"}})],1)],1)],1),e.form.examineOpinion?a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"审批意见:",prop:"examineOpinion"}},[a("el-input",{attrs:{type:"textarea",maxlength:"100",readonly:e.isView},model:{value:e.form.examineOpinion,callback:function(t){e.$set(e.form,"examineOpinion",t)},expression:"form.examineOpinion"}})],1)],1)],1):e._e()],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e.isView?e._e():a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},n=[],l=(a("d81d"),a("b0c0"),a("d3b7"),a("159b"),a("fd01")),o=a("ca17"),i=a.n(o),s=(a("542c"),{name:"rules",dicts:["apply_status"],components:{Treeselect:i.a},data:function(){var e=this;return{userInfo:this.$store.state.user,orgList:this.$store.state.user.orgList,loading:!1,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,tableList:[],title:"",open:!1,isEdit:!1,isView:!1,timeStatusList:[{id:"1",name:"上午"},{id:"2",name:"下午"}],dateRange:[],queryParams:{pageNum:1,pageSize:10,leaveType:"轮休",leaveDate:void 0,examineStatus:void 0},personOptions:[],typeList:[{value:"1",label:"固定班制"},{value:"2",label:"自由工时"}],attDayList:[{id:0,label:"周一"},{id:1,label:"周二"},{id:2,label:"周三"},{id:3,label:"周四"},{id:4,label:"周五"},{id:5,label:"周六"},{id:6,label:"周日"}],form:{},rules:{orgId:[{required:!0,message:"所属部门不能为空",trigger:"blur"}],leaveStartDate:[{required:!0,message:"轮休开始时间不能为空",trigger:"blur"}],leaveEndDate:[{required:!0,message:"轮休结束时间不能为空",trigger:"blur"}],leaveDuration:[{required:!0,message:"轮休时长不能为空",trigger:"blur"}],leaveReason:[{required:!0,message:"轮休事由不能为空",trigger:"blur"}]},startPickerOptions:{disabledDate:function(t){if(e.form.leaveEndDate)return t.getTime()>new Date(e.form.leaveEndDate).getTime()}},endPickerOptions:{disabledDate:function(t){if(e.form.leaveStartDate)return t.getTime()<new Date(e.form.leaveStartDate).getTime()-864e5}}}},created:function(){this.getList()},methods:{handleDateChange:function(){if(this.form.leaveStartDate&&this.form.leaveEndDate){var e=this.daysBetween(this.form.leaveStartDate,this.form.leaveEndDate);console.log(e),1==this.form.leaveStartInterval&&1==this.form.leaveEndInterval?this.form.leaveDuration=e+.5:1==this.form.leaveStartInterval&&2==this.form.leaveEndInterval?this.form.leaveDuration=e+1:2==this.form.leaveStartInterval&&2==this.form.leaveEndInterval?this.form.leaveDuration=e+.5:2==this.form.leaveStartInterval&&1==this.form.leaveEndInterval&&(this.form.leaveDuration=e)}},daysBetween:function(e,t){var a=864e5,r=new Date(e).getTime(),n=new Date(t).getTime(),l=Math.abs(r-n);return l/a},getList:function(){var e=this;this.loading=!0,Object(l["g"])(this.queryParams).then((function(t){e.tableList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={userId:this.userInfo.id,userName:this.userInfo.name,orgId:void 0,leaveStartDate:void 0,leaveStartInterval:"1",leaveEndDate:void 0,leaveEndInterval:"1",leaveDuration:.5,leaveType:"轮休",examineStatus:"0",leaveReason:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.dateRange=[],this.resetForm("queryForm"),this.handleQuery()},handleAdd:function(){console.log(this.userInfo),console.log(this.orgList),this.reset(),this.open=!0,this.title="新增"},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.Id})),this.single=1!=e.length,this.multiple=!e.length},handleUpdate:function(e){var t=this;this.reset();var a=e.id;Object(l["f"])(a).then((function(e){t.form=e.data,console.log(t.form),t.open=!0,t.isView=!1,t.title="编辑"}))},handleView:function(e){var t=this;this.reset();var a=e.id;Object(l["f"])(a).then((function(e){t.form=e.data,console.log(t.form),t.open=!0,t.isView=!0,t.title="查看"}))},changDept:function(e){var t=this;console.log(e),this.orgList.forEach((function(a){a.id==e&&(t.form.orgName=a.name)}))},submitForm:function(){var e=this;console.log(this.form),this.$refs["form"].validate((function(t){t&&(console.log(e.form),void 0!=e.form.id?(e.form.examineStatus=0,Object(l["h"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()}))):Object(l["a"])(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleBack:function(e){this.$modal.confirm("是否确认撤回该申请?").then((function(){var t=this,a={id:e.id,examineStatus:"3"};Object(l["b"])(a).then((function(e){t.getList(),t.$modal.msgSuccess("撤回成功")}))}))},handleDelete:function(e){var t=this,a=e.id;this.$modal.confirm('是否确认删除编号为"'+a+'"的数据项?').then((function(){return Object(l["d"])(a)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){var e=this;this.queryParams.exportType="查询",Object(l["e"])(this.queryParams).then((function(t){e.downloadFile({fileName:"轮休_".concat((new Date).getTime(),".xlsx"),fileData:t,fileType:"application/vnd.ms-excel;charset=utf-8"})}))}}}),u=s,c=a("2877"),d=Object(c["a"])(u,r,n,!1,null,null,null);t["default"]=d.exports},fd01:function(e,t,a){"use strict";a.d(t,"g",(function(){return n})),a.d(t,"c",(function(){return l})),a.d(t,"f",(function(){return o})),a.d(t,"a",(function(){return i})),a.d(t,"h",(function(){return s})),a.d(t,"b",(function(){return u})),a.d(t,"d",(function(){return c})),a.d(t,"e",(function(){return d}));var r=a("b775");function n(e){return Object(r["a"])({url:"/system/holiday/list",method:"get",params:e})}function l(e){return Object(r["a"])({url:"/system/holiday/checkList",method:"get",params:e})}function o(e){return Object(r["a"])({url:"/system/holiday/"+e,method:"get"})}function i(e){return Object(r["a"])({url:"/system/holiday",method:"post",data:e})}function s(e){return Object(r["a"])({url:"/system/holiday",method:"put",data:e})}function u(e){return Object(r["a"])({url:"/system/holiday/changeStatus",method:"put",data:e})}function c(e){return Object(r["a"])({url:"/system/holiday/"+e,method:"delete"})}function d(e){return Object(r["a"])({url:"/system/export/exportHoliday",method:"get",responseType:"blob",params:e})}}}]);