849cb7a7b59ec3b562b1.js 17 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[33],{435:function(e,t,r){var content=r(504);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(4).default)("0f0efba9",content,!0,{sourceMap:!1})},503:function(e,t,r){"use strict";var n=r(435);r.n(n).a},504:function(e,t,r){(e.exports=r(3)(!1)).push([e.i,"#wage-settlement[data-v-c60cfd80]{display:-webkit-box;display:-ms-flexbox;display:flex;padding:20px}.left[data-v-c60cfd80],.right[data-v-c60cfd80]{-webkit-box-flex:1;-ms-flex:1;flex:1}.left[data-v-c60cfd80]{border-right:1px solid #ccc;padding-right:20px}.right[data-v-c60cfd80]{padding:20px}.container[data-v-c60cfd80]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:44px}.salary-container[data-v-c60cfd80]{height:80px;background:#f0f0f0}.salary-result[data-v-c60cfd80]{font-size:28px;font-weight:800}.salary-calc[data-v-c60cfd80]{color:#666;margin-left:40px}.title[data-v-c60cfd80]{width:120px}.el-input[data-v-c60cfd80]{width:180px}textarea[data-v-c60cfd80]{resize:none;width:100%;height:120px;padding:12px}.reminds[data-v-c60cfd80]{margin-top:40px;height:600px;overflow-y:scroll}.remind[data-v-c60cfd80]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:40px}.remind-head[data-v-c60cfd80]{--width:40px;width:var(--width);height:var(--width);border-radius:50%;margin-right:10px}.remind-right[data-v-c60cfd80]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.remind-nickname[data-v-c60cfd80]{font-weight:800}.remind-date[data-v-c60cfd80]{color:#999}.remind-content[data-v-c60cfd80]{border-left:4px solid #d8d8d8;padding-left:10px;margin-top:10px}",""])},538:function(e,t,r){"use strict";r.r(t);r(39);var n=r(6),o="",c=1,l={data:function(){return{total:0,reminds:[],remind:"",job_id:"",period_id:"",is_invoice:!1,dev_is_invoice:!1,is_use_deposit:!1,detail:null,clientChangeDialog:!1,clients:[],clientSelected:""}},computed:{orderHref:function(){var e=this.detail,t="/rooter/cloudjobitem/".concat(e.job_id);return t="test"===o?"https://dev.test.proginn.com".concat(t):"https://www.proginn.com".concat(t)},devServiceRate:function(){var e=this.rate,t=+e.origin_person_service_fee_rate-+e.person_service_fee_rate_reduce;return t<0?0:t},devRate:function(){var e=this.rate;return+e.person_tax_rate+ +e.person_tax_service_fee_rate},salary:function(){return this.detail.salary},vipMinus:function(){var e=this.salary,t=this.rate;return this.keepDecimal(((1*e.normal_salary+1*e.probation_salary)*(this.detail.work_hour.work_rate/100)-1*e.deduction_fee)*((t.origin_person_service_fee_rate-t.person_service_fee_rate_reduce)/100))},rate:function(){return this.detail.rate},shouldRate:function(){var e=this.rate;return this.keepDecimal(+this.baseSalary*(1-+e.origin_person_service_fee_rate/100+ +e.person_service_fee_rate_reduce/100)*this.devRate/100)},baseSalary:function(){var e=this.salary;return this.keepDecimal((+e.normal_salary+ +e.probation_salary)*+this.detail.work_hour.work_rate/100-+e.deduction_fee)},returnMoney:function(){if(this.is_use_deposit)return 0;var e=this.salary,t=+this.detail.company.company_pay>0?1:0,r="1"==this.detail.is_invoice?+this.detail.rate.company_tax_rate/100+1:1;return this.keepDecimal((+e.normal_salary+ +e.probation_salary-+this.baseSalary)*(+this.detail.rate.company_service_fee_rate/100+1)*r)*t},personPrice:function(){var e=this.salary,t=this.detail.rate,r=this.detail.work_hour,n=this.dev_is_invoice?1-t.person_tax_rate/100-t.person_tax_service_fee_rate/100:1,o=((e.normal_salary-0+(e.probation_salary-0))*r.work_rate/100-+e.deduction_fee)*(1-t.person_service_fee_rate/100)*n;return this.keepDecimal(o)},companyPrice:function(){var e=this.salary,t=this.detail.rate,r=this.detail.work_hour,n=this.is_invoice?1+t.company_tax_rate/100:1,o=((e.normal_salary-0+(e.probation_salary-0))*r.work_rate/100-+e.deduction_fee)*(1+t.company_service_fee_rate/100)*n;return this.keepDecimal(o)},isInvoice:function(){return this.detail[this.isDev?"dev_is_invoice":"is_invoice"]}},filters:{dateFormat:function(e){return new Date(1e3*+e).toLocaleDateString()}},mounted:function(){this.job_id=this.$route.query.job_id,this.period_id=this.$route.query.period_id,this.getClients(),this.getData(),this.getReminds()},methods:{changePagination:function(e){this.getReminds(e)},getReminds:function(){var e=Object(n.a)(regeneratorRuntime.mark(function e(){var t,r,n,data,o=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:c,this.reminds=[],e.next=4,this.$post("/api/admin/job/getPeriodNote",{period_id:this.period_id,page:t});case 4:r=e.sent,n=r.status,data=r.data,c=t,console.log(data),n&&(this.total=data.total,this.reminds=data.list);case 10:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),clickRemindSave:function(){var e=Object(n.a)(regeneratorRuntime.mark(function e(){var content,t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(this.remind),this.remind.length){e.next=4;break}return this.$message({message:"请输入备注",type:"warning"}),e.abrupt("return");case 4:return content="".concat(this.remind," -账单ID").concat(this.period_id),e.next=7,this.$post("/api/admin/job/note",{id:this.job_id,period_id:this.period_id,content:content});case 7:t=e.sent,console.log(t),t.status?(this.$message({message:"保存成功",type:"success"}),setTimeout(function(){location.reload()},1500)):this.$message({message:"保存失败",type:"error"});case 10:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),keepDecimal:function(e){return e.toFixed(2)},jobPeriodSettle:function(){var e=Object(n.a)(regeneratorRuntime.mark(function e(t){var body,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.returnMoney<0||this.detail.work_hour.work_rate>100)){e.next=3;break}return this.$message({message:"退还金额不能小于0 且 结算比例不能大于100",type:"error"}),e.abrupt("return");case 3:return(body={period_id:this.period_id,job_id:this.job_id,action:t,work_rate:this.detail.work_hour.work_rate,deduction_fee:this.salary.deduction_fee,return_money:this.returnMoney,remark:this.detail.remark,is_use_deposit:this.is_use_deposit?1:0,person_service_fee_rate:this.detail.rate.origin_person_service_fee_rate}).dev_is_invoice=this.dev_is_invoice?1:0,e.next=7,this.$post("/api/admin/job/job_period_settle",body);case 7:if(r=e.sent){e.next=10;break}return e.abrupt("return");case 10:r.status>0?(this.$message({message:r.info,type:"success"}),setTimeout(function(){location.reload()},1e3)):(r.info||console.log(r),this.$message({message:r.info?r.info:"接口返回数据异常",type:"error"}));case 11:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),getData:function(){var e=Object(n.a)(regeneratorRuntime.mark(function e(i){var t,data;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.$post("/api/admin/job/get_job_period_detail",{job_id:this.job_id,period_id:this.period_id,is_cal_workrate:1});case 2:if((t=e.sent).data){e.next=5;break}return e.abrupt("return");case 5:data=t.data,o=data.current_env,this.detail=data,this.isDev=data.is_dev,this.is_invoice="1"===this.detail.is_invoice,this.dev_is_invoice="1"==this.detail.dev_is_invoice,this.is_use_deposit="1"===data.can_use_deposit,this.clientSelected=this.detail.user_manager?this.detail.user_manager.uid:"";case 13:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),getClients:function(){var e=Object(n.a)(regeneratorRuntime.mark(function e(){var t,data;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.$post("/api/admin/user_manager/get_manager",{});case 2:if((t=e.sent).data){e.next=5;break}return e.abrupt("return");case 5:data=t.data,console.log(data),this.clients=data.managers;case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),handleClientChange:function(){var e=Object(n.a)(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.clientSelected||this.$message.error("请选择客户经理"),e.next=3,this.$post("/api/admin/user_manager/change_manager_record",{manager_id:this.clientSelected,period_id:this.period_id});case 3:1===(t=e.sent).status?(this.$message({message:"修改成功",type:"success"}),this.getData(),this.clientSelected="",this.clientChangeDialog=!1):this.$message.error("修改失败!"+t.info);case 5:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}},_=(r(503),r(2)),component=Object(_.a)(l,function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.detail?r("section",{attrs:{id:"wage-settlement"}},[r("section",{staticClass:"left"},[r("h3",[e._v("工资结算")]),e._v(" "),r("h4",[e._v("\n 【\n "),r("a",{attrs:{href:e.orderHref}},[e._v(e._s(e.detail.job.title_count))]),e._v("\n 】"+e._s(e.detail.time.month)+"工资账单\n "),r("el-tag",{attrs:{size:"small"}},[e._v(e._s(e.detail.statusName))]),e._v(" "),r("el-tag",{attrs:{size:"small"}},[e._v(e._s(e.detail.invoiceName))]),e._v(" "),"1"==e.detail.is_use_deposit?r("el-tag",{attrs:{size:"small"}},[e._v("使用押金结算")]):e._e()],1),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("每月薪资:")]),e._v("\n ¥"+e._s(e.salary.job_salary)+"/月\n ")]),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("工作周期:")]),e._v("\n "+e._s(e._f("dateFormat")(e.detail.time.start_time))+" 至 "+e._s(e._f("dateFormat")(e.detail.time.end_time))+" ("+e._s(e.detail.days)+"天)\n ")]),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("托管金额:")]),e._v("\n ¥"+e._s(e.detail.company.company_pay)+"\n ")]),e._v(" "),e.detail.normal_days>0?r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("正式工资:")]),e._v("\n ¥"+e._s(e.salary.normal_salary)+"("+e._s(e.detail.normal_days)+"天)\n ")]):e._e(),e._v(" "),e.detail.probation_days>0?r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("试用工资:")]),e._v("\n ¥"+e._s(e.salary.probation_salary)+"("+e._s(e.detail.probation_days)+"天,按月工资"+e._s(e.rate.probation_rate)+"%结算)\n ")]):e._e(),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("结算比例:")]),e._v(" "),r("el-input",{attrs:{type:"number"},model:{value:e.detail.work_hour.work_rate,callback:function(t){e.$set(e.detail.work_hour,"work_rate",t)},expression:"detail.work_hour.work_rate"}}),e._v("\n % (工作工时:"+e._s(e.detail.work_hour.worked_hours)+"/"+e._s(e.detail.work_hour.should_work_hours)+")\n ")],1),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("扣减工资:")]),e._v(" "),r("el-input",{attrs:{type:"number"},model:{value:e.salary.deduction_fee,callback:function(t){e.$set(e.salary,"deduction_fee",t)},expression:"salary.deduction_fee"}}),e._v("元\n ")],1),e._v(" "),r("section",{staticClass:"container salary-container"},[r("span",{staticClass:"title"},[e._v("本月工资:")]),e._v(" "),r("section",[r("div",{staticClass:"salary-result"},[e._v("¥"+e._s(e.baseSalary))]),e._v(" "),r("div",{staticClass:"salary-calc"},[e._v("=("+e._s(e.salary.normal_salary)+"+"+e._s(e.salary.probation_salary)+")*"+e._s(e.detail.work_hour.work_rate)+"%-"+e._s(e.salary.deduction_fee))])])]),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("平台服务费:")]),e._v(" "),r("el-input",{attrs:{type:"number"},model:{value:e.rate.origin_person_service_fee_rate,callback:function(t){e.$set(e.rate,"origin_person_service_fee_rate",t)},expression:"rate.origin_person_service_fee_rate"}}),e._v("\n VIP会员减免"+e._s(e.rate.person_service_fee_rate_reduce)+"% ¥"+e._s(e.vipMinus)+" (开发者服务费率"+e._s(e.devServiceRate)+"%)\n ")],1),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("应缴税费:")]),e._v(" "),r("el-checkbox",{attrs:{type:"checkbox"},model:{value:e.dev_is_invoice,callback:function(t){e.dev_is_invoice=t},expression:"dev_is_invoice"}}),e._v("\n ¥"+e._s(e.shouldRate)+" (开发者税率"+e._s(e.devRate)+"%)\n ")],1),e._v(" "),r("section",{staticClass:"container salary-container"},[r("span",{staticClass:"title"},[e._v("实际工资:")]),e._v(" "),r("section",[r("div",{staticClass:"salary-result"},[e._v("¥"+e._s(e.personPrice))]),e._v(" "),r("div",{staticClass:"salary-calc"},[r("span",[e._v("=(("+e._s(e.salary.normal_salary)+"+"+e._s(e.salary.probation_salary)+")*"+e._s(e.detail.work_hour.work_rate)+"%-"+e._s(1*e.salary.deduction_fee)+")*(1-"+e._s(e.rate.person_service_fee_rate)+"%)")]),e._v(" "),e.dev_is_invoice?r("span",[e._v("*(1-"+e._s(e.rate.person_tax_rate)+"%-"+e._s(e.rate.person_tax_service_fee_rate)+"%)")]):e._e()])])]),e._v(" "),e.detail.can_use_deposit?r("section",{staticClass:"container"},[r("el-checkbox",{staticStyle:{margin:"0 4px 0 0"},attrs:{disabled:"",checked:""},model:{value:e.is_use_deposit,callback:function(t){e.is_use_deposit=t},expression:"is_use_deposit"}}),e._v("\n 使用押金结算(¥"+e._s(e.detail.company.company_left_deposit)+")(企业方费用:¥"+e._s(e.companyPrice)+")\n ")],1):e._e(),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("退还金额:")]),e._v(" "),r("el-input",{attrs:{type:"text",value:e.returnMoney,disabled:""}}),e._v("\n =(("+e._s(e.salary.normal_salary)+"+"+e._s(e.salary.probation_salary)+")-"+e._s(e.baseSalary)+")*(1+"+e._s(e.rate.company_service_fee_rate)+"%)\n "),e.is_invoice?r("span",[e._v("*(1+"+e._s(this.is_invoice?e.rate.company_tax_rate:0)+"%)")]):e._e(),e._v("元\n ")],1),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("备注说明:")]),e._v(" "),r("el-input",{model:{value:e.detail.remark,callback:function(t){e.$set(e.detail,"remark",t)},expression:"detail.remark"}})],1),e._v(" "),r("section",{staticClass:"container"},[r("span",{staticClass:"title"},[e._v("提成客户经理")]),e._v("\n "+e._s(e.detail.user_manager?e.detail.user_manager.nickname+"("+e.detail.user_manager.uid+")":"")+"\n "),r("el-button",{attrs:{type:"text"},on:{click:function(t){e.clientChangeDialog=!0}}},[e._v("更换")]),e._v(" "),r("el-dialog",{attrs:{title:"更换提成客户经理",visible:e.clientChangeDialog,width:"30%"},on:{"update:visible":function(t){e.clientChangeDialog=t}}},[r("div",[e._v("客户昵称:"+e._s(e.detail.company_info?e.detail.company_info.nickname+"("+e.detail.company_info.uid+")":""))]),e._v(" "),r("div",[e._v("\n 客户经理:\n "),r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.clientSelected,callback:function(t){e.clientSelected=t},expression:"clientSelected"}},e._l(e.clients,function(e){return r("el-option",{key:e.uid,attrs:{label:e.nickname+"("+e.uid+")",value:e.uid}})}),1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.clientChangeDialog=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.handleClientChange}},[e._v("确 定")])],1)])],1),e._v(" "),r("el-button",{directives:[{name:"show",rawName:"v-show",value:2==e.detail.status||3==e.detail.status,expression:"detail.status == 2 || detail.status == 3"}],on:{click:function(t){return e.jobPeriodSettle("save")}}},[e._v("保存")]),e._v(" "),e.detail.can_send_salary?r("section",{staticClass:"container",staticStyle:{"margin-top":"20px"}},[r("el-button",{directives:[{name:"show",rawName:"v-show",value:3==e.detail.status,expression:"detail.status == 3"}],attrs:{type:"primary"},on:{click:function(t){return e.jobPeriodSettle("confirm")}}},[e._v("确定支付工资")])],1):e._e()],1),e._v(" "),r("section",{staticClass:"right"},[r("textarea",{directives:[{name:"model",rawName:"v-model",value:e.remind,expression:"remind"}],attrs:{placeholder:"请输入备注",maxlength:"200"},domProps:{value:e.remind},on:{input:function(t){t.target.composing||(e.remind=t.target.value)}}}),e._v(" "),r("el-button",{staticStyle:{width:"100px"},attrs:{type:"primary"},on:{click:e.clickRemindSave}},[e._v("保存")]),e._v(" "),r("section",{staticClass:"reminds"},e._l(e.reminds,function(t){return r("section",{key:t.id,staticClass:"remind"},[r("img",{staticClass:"remind-head",attrs:{src:t.icon_url,alt:"icon"}}),e._v(" "),r("section",{staticClass:"remind-right"},[r("section",{staticClass:"remind-top"},[r("span",{staticClass:"remind-nickname"},[e._v(e._s(t.nickname))]),e._v(" "),r("span",{staticClass:"remind-date"},[e._v(e._s(t.create_date))])]),e._v(" "),r("p",{staticClass:"remind-content"},[e._v(e._s(t.content))])])])}),0),e._v(" "),r("el-pagination",{attrs:{layout:"prev, pager, next",total:e.total,"page-size":20},on:{"current-change":e.changePagination}})],1)]):e._e()},[],!1,null,"c60cfd80",null);t.default=component.exports}}]);