Commit 1e0f5646 by Sxy

Merge branch 'gsb-center-manage' of gitlab.gongsibao.com:jiangyong/zhichan into gsb-center-manage

parents 90e465e1 6ceb6fec
......@@ -8,59 +8,64 @@ class CompanyCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(CompanyCtl));
}
async update(p,q,req){
let u= await super.update(p,q,req)
//缓存失效
await this.cacheManager["CompanyCache"].invalidate(p.companykey)
let company=await this.cacheManager["CompanyCache"].cache(p.companykey)
return system.getResult(company)
async update (p, q, req) {
let u = await super.update(p, q, req)
//缓存失效
await this.cacheManager["CompanyCache"].invalidate(p.companykey)
let company = await this.cacheManager["CompanyCache"].cache(p.companykey)
return system.getResult(company)
}
async getMyApps(p,q,req){
async getMyApps (p, q, req) {
let userfind = await this.cacheManager["UserCache"].cache(p.username)
let isSuper=userfind.isSuper
if(userfind.company.appids && userfind.company.appids!=""){
let appsarray=userfind.company.appids.split(",")
let appidsquery=appsarray.map(astr=>{
return astr.split("|")[0]
let isSuper = userfind.isSuper
if (userfind.company.appids && userfind.company.appids != "") {
let appsarray = userfind.company.appids.split(",")
let appidsquery = appsarray.map(astr => {
return astr.split("|")[0]
})
let apps=await this.service.getMyApps(appidsquery,isSuper)
let apps = await this.service.getMyApps(appidsquery, isSuper)
return system.getResult(apps)
}else{
} else {
return []
}
}
async bindApps(p,q,req){
let appids=p.appids
let cmpid=p.postcmpid
let appids2=appids.map(item=>{
return item.appid+"|"+item.title
})
let appidstrs=appids2.join(",")
await this.service.bindApps(appidstrs,cmpid)
async bindApps (p, q, req) {
let appids = p.appids
let cmpid = p.postcmpid
let appids2 = appids.map(item => {
return item.appid + "|" + item.title
})
let appidstrs = appids2.join(",")
await this.service.bindApps(appidstrs, cmpid)
return system.getResult(appids)
}
async setOrgs(p,q,req){
async setOrgs (p, q, req) {
//let companynew=await this.service.findById(p.company_id)
let orgs=await this.service.setOrgs(p)
let orgs = await this.service.setOrgs(p)
return system.getResult(orgs)
}
async getOrgs(p,q,req){
}
async getOrgs (p, q, req) {
//let companynew=await this.cacheManager["CompanyCache"].cache(req.xctx.fromcompanykey)
let companynew=await this.service.findById(p.company_id)
let orgjsonstr=companynew.orgJson
let rtnjson=null
if(orgjsonstr && orgjsonstr!=""){
rtnjson=JSON.parse(companynew.orgJson)
}else{
rtnjson=[]
let companynew = await this.service.findById(p.company_id)
let orgjsonstr = companynew.orgJson
let rtnjson = null
if (orgjsonstr && orgjsonstr != "") {
rtnjson = JSON.parse(companynew.orgJson)
} else {
rtnjson = []
}
return system.getResult({orgJson:rtnjson})
}
return system.getResult({ orgJson: rtnjson })
}
async getWatchOrgNodes (p, q, req) {
let wns = await this.service.getWatchOrgNodes(p.company_id)
return wns
}
async refQuery(pobj, qobj, req) {
let rtn=await this.service.refQuery(pobj);
async refQuery (pobj, qobj, req) {
let rtn = await this.service.refQuery(pobj);
return rtn
}
}
module.exports = CompanyCtl;
......@@ -269,7 +269,7 @@ class AliHandler {
obj.clerkOpcode = deliveryInfo.opath;//交付员opcode
obj.clerkId = deliveryInfo.userId;//交付员id
// obj.costPrice = deliveryInfo.cost;//成本
obj.clerkName = deliveryInfo.userName;//交付员名称
obj.clerkName = deliveryInfo.nickName;//交付员名称
// obj.clerkPhone = deliveryInfo.mobile;//交付人员电话
// obj.servicerCode = deliveryInfo.compId;
}
......@@ -408,9 +408,12 @@ class AliHandler {
obj.servicerName = data.servicer.name;
}
}
if (data.channelNeedNo) {
if (data.channelNeedNo) {//需求编号
obj.businessMode = data.channelNeedNo;
}
if (data.channelSolutionNo) {//方案编号
obj.schemeNumber = data.channelSolutionNo;
}
if (data.needsolution.solution.Area) {//服务地区编码和服务地区
obj.serviceCode = data.needsolution.solution.Area;
obj.serviceName = data.needsolution.solution.Area;
......@@ -418,6 +421,7 @@ class AliHandler {
}
if (data.needsolution.solution.CompanyName) {//公司名称
obj.baseInfo.companyName = data.needsolution.solution.CompanyName;
obj.companyName = data.needsolution.solution.CompanyName;
}
if (data.needsolution.solution.CompanyAddress) {//公司地址
obj.baseInfo.companyAddress = data.needsolution.solution.CompanyAddress;
......
......@@ -31,6 +31,32 @@ class CompanyService extends ServiceBase {
return appids
})
}
buildNoPositionNode (treejson, rtnArray) {
treejson.forEach((n) => {
if (n.children) {
this.buildNoPositionNode(n.children, rtnArray)
}
if (typeof n.isPosition == "undefined") {
rtnArray.push(n)
} else {
if (!n.isPosition) {
rtnArray.push(n)
}
}
})
}
async getWatchOrgNodes (cmid) {
let rtn = []
let companynew = await this.findById(cmid)
let orgjsonstr = companynew.orgJson
if (orgjsonstr && orgjsonstr != "") {
let treejson = JSON.parse(companynew.orgJson)
this.buildNoPositionNode(treejson, rtn)
}
return rtn
}
async setOrgs (p, cmk) {
var self = this
let curNodeData = p.curdata
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-175acaff.7a825095.css rel=prefetch><link href=/css/chunk-1b756945.9e7173ae.css rel=prefetch><link href=/css/chunk-21b5182a.6e6ae301.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-34953cb0.71e3d438.css rel=prefetch><link href=/css/chunk-480215f6.84fd9662.css rel=prefetch><link href=/css/chunk-5ccefbbb.9e7173ae.css rel=prefetch><link href=/css/chunk-61b0b1e5.9e7173ae.css rel=prefetch><link href=/css/chunk-8e32057a.e8e9a917.css rel=prefetch><link href=/css/chunk-e7e51fa0.9e7173ae.css rel=prefetch><link href=/css/chunk-ff3eaeb0.9e7173ae.css rel=prefetch><link href=/js/chunk-0109d85c.d8a39ef0.js rel=prefetch><link href=/js/chunk-037694a5.a74514c3.js rel=prefetch><link href=/js/chunk-0aa2a834.9028f9e8.js rel=prefetch><link href=/js/chunk-137dcf78.d8fcc61f.js rel=prefetch><link href=/js/chunk-14b9857b.35e42781.js rel=prefetch><link href=/js/chunk-15d6294e.2c73d8ff.js rel=prefetch><link href=/js/chunk-175acaff.ca3f7e65.js rel=prefetch><link href=/js/chunk-1792c498.4841b7fc.js rel=prefetch><link href=/js/chunk-1a0615f2.370fcaf1.js rel=prefetch><link href=/js/chunk-1b756945.d840b734.js rel=prefetch><link href=/js/chunk-21b5182a.74708748.js rel=prefetch><link href=/js/chunk-22347577.2275ebec.js rel=prefetch><link href=/js/chunk-24a41303.88feac34.js rel=prefetch><link href=/js/chunk-25d9ab36.087a7b9f.js rel=prefetch><link href=/js/chunk-2aeda6fa.2bd11851.js rel=prefetch><link href=/js/chunk-2b3066fa.372380fb.js rel=prefetch><link href=/js/chunk-2c359864.90a950b1.js rel=prefetch><link href=/js/chunk-2d0d61ef.ca1865db.js rel=prefetch><link href=/js/chunk-2d0e68e0.1a313c84.js rel=prefetch><link href=/js/chunk-2d0efc5d.662e1339.js rel=prefetch><link href=/js/chunk-2d20828f.7627562b.js rel=prefetch><link href=/js/chunk-3385141a.a6e1a986.js rel=prefetch><link href=/js/chunk-34953cb0.2fc03dd6.js rel=prefetch><link href=/js/chunk-3a0bcea0.192dd1cf.js rel=prefetch><link href=/js/chunk-477a8e91.c522ef77.js rel=prefetch><link href=/js/chunk-480215f6.5b09744b.js rel=prefetch><link href=/js/chunk-4b58f216.e79a0ff7.js rel=prefetch><link href=/js/chunk-5ccefbbb.0f021a99.js rel=prefetch><link href=/js/chunk-5e7b929d.9e85be22.js rel=prefetch><link href=/js/chunk-61b0b1e5.322b588f.js rel=prefetch><link href=/js/chunk-65e97401.3b9c7780.js rel=prefetch><link href=/js/chunk-8e32057a.5b0635fd.js rel=prefetch><link href=/js/chunk-9947983a.dea0cc2e.js rel=prefetch><link href=/js/chunk-e7e51fa0.c45982a9.js rel=prefetch><link href=/js/chunk-ff3eaeb0.d3d1af72.js rel=prefetch><link href=/css/app.4189c8e8.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.dbb5cf0d.js rel=preload as=script><link href=/js/chunk-vendors.9ae5f635.js rel=preload as=script><link href=/css/chunk-vendors.1d90d08d.css rel=stylesheet><link href=/css/app.4189c8e8.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.9ae5f635.js></script><script src=/js/app.dbb5cf0d.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-175acaff.7a825095.css rel=prefetch><link href=/css/chunk-1b756945.9e7173ae.css rel=prefetch><link href=/css/chunk-21b5182a.6e6ae301.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-34953cb0.71e3d438.css rel=prefetch><link href=/css/chunk-480215f6.84fd9662.css rel=prefetch><link href=/css/chunk-5ccefbbb.9e7173ae.css rel=prefetch><link href=/css/chunk-61b0b1e5.9e7173ae.css rel=prefetch><link href=/css/chunk-8e32057a.e8e9a917.css rel=prefetch><link href=/css/chunk-e7e51fa0.9e7173ae.css rel=prefetch><link href=/css/chunk-ff3eaeb0.9e7173ae.css rel=prefetch><link href=/js/chunk-0109d85c.d8a39ef0.js rel=prefetch><link href=/js/chunk-037694a5.a74514c3.js rel=prefetch><link href=/js/chunk-0aa2a834.9028f9e8.js rel=prefetch><link href=/js/chunk-137dcf78.d8fcc61f.js rel=prefetch><link href=/js/chunk-14b9857b.35e42781.js rel=prefetch><link href=/js/chunk-15d6294e.42eb4739.js rel=prefetch><link href=/js/chunk-175acaff.ca3f7e65.js rel=prefetch><link href=/js/chunk-1792c498.4841b7fc.js rel=prefetch><link href=/js/chunk-1a0615f2.370fcaf1.js rel=prefetch><link href=/js/chunk-1b756945.d840b734.js rel=prefetch><link href=/js/chunk-21b5182a.74708748.js rel=prefetch><link href=/js/chunk-22347577.2275ebec.js rel=prefetch><link href=/js/chunk-24a41303.88feac34.js rel=prefetch><link href=/js/chunk-25d9ab36.087a7b9f.js rel=prefetch><link href=/js/chunk-2aeda6fa.2bd11851.js rel=prefetch><link href=/js/chunk-2b3066fa.71705e35.js rel=prefetch><link href=/js/chunk-2c359864.90a950b1.js rel=prefetch><link href=/js/chunk-2d0d61ef.ca1865db.js rel=prefetch><link href=/js/chunk-2d0e68e0.1a313c84.js rel=prefetch><link href=/js/chunk-2d0efc5d.662e1339.js rel=prefetch><link href=/js/chunk-2d20828f.7627562b.js rel=prefetch><link href=/js/chunk-3385141a.a6e1a986.js rel=prefetch><link href=/js/chunk-34953cb0.2fc03dd6.js rel=prefetch><link href=/js/chunk-3a0bcea0.192dd1cf.js rel=prefetch><link href=/js/chunk-477a8e91.c522ef77.js rel=prefetch><link href=/js/chunk-480215f6.5b09744b.js rel=prefetch><link href=/js/chunk-4b58f216.e79a0ff7.js rel=prefetch><link href=/js/chunk-5ccefbbb.0f021a99.js rel=prefetch><link href=/js/chunk-5e7b929d.9e85be22.js rel=prefetch><link href=/js/chunk-61b0b1e5.322b588f.js rel=prefetch><link href=/js/chunk-65e97401.3b9c7780.js rel=prefetch><link href=/js/chunk-8e32057a.5b0635fd.js rel=prefetch><link href=/js/chunk-9947983a.dea0cc2e.js rel=prefetch><link href=/js/chunk-e7e51fa0.c45982a9.js rel=prefetch><link href=/js/chunk-ff3eaeb0.d3d1af72.js rel=prefetch><link href=/css/app.4189c8e8.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.881c15ae.js rel=preload as=script><link href=/js/chunk-vendors.9ae5f635.js rel=preload as=script><link href=/css/chunk-vendors.1d90d08d.css rel=stylesheet><link href=/css/app.4189c8e8.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.9ae5f635.js></script><script src=/js/app.881c15ae.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-15d6294e"],{"14fe":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("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var r=t.adjustHeight;return[a("BizTable",{ref:"bt",attrs:{showTotal:"",formatCol:e.formatCol,modelName:"deliverybill",metaName:"alldeliver_info",packageName:"bizchance",baseUrl:e.baseUrl,tblheight:r-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,morebefore:e.beforemore,addbefore:e.beforeadd,sumfields:e.smf,colVisable:e.colVisable},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),a("RefTable",{ref:"reftbl",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!1},on:{onrefselect:e.onrefselect}}),a("RefTable",{ref:"reftbl_salesman",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!1},on:{onrefselect:e.onrefselect}}),a("RefTable",{ref:"reftblSuper",attrs:{modelName:"company",metaName:"simple_companyinfo",packageName:"common",isMulti:!1},on:{onrefselect:e.onrefselect}})]}}])})},s=[],i=(a("cc57"),a("b449"),a("9666")),n=(a("163d"),a("6d57"),a("3c70")),o=a("06d3"),u=a("391e"),l=a("db7f"),f=a("f121"),c=a("7e1e"),d=f["a"].deliverUrl.pro,h={name:"alldeliver_page",data:function(){return{baseUrl:d,smf:[{field:"cost_price",label:"服务费合计(元)"}],deliverNumber:"",userType:""}},components:{PageSpace:u["a"],BizTable:o["a"],RefTable:n["a"]},watch:{$route:function(e){if(e.query.spname){if(e.query.bizStatus){var t="waittosettle,settling,settled";t.indexOf(e.query.bizStatus)>=0?this.$refs.bt.initWhereData={facilitator_name:e.query.spname,settle_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:e.query.spname,delivery_status:e.query.bizStatus,dateType:e.query.dateType}}else this.$refs.bt.initWhereData={facilitator_name:e.query.spname,dateType:e.query.dateType};this.$refs.bt.fetchData()}else{if(e.query.bizStatus){var a="waittosettle,settling,settled";a.indexOf(e.query.bizStatus)>=0?this.$refs.bt.initWhereData={settle_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={delivery_status:e.query.bizStatus,dateType:e.query.dateType}}this.$refs.bt.fetchData()}}},mounted:function(){if(this.$route.query.spname){if(this.$route.query.bizStatus){var e="waittosettle,settling,settled";e.indexOf(this.$route.query.bizStatus)>=0?this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,settle_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,delivery_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}}else this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,dateType:this.$route.query.dateType};this.$refs.bt.fetchData()}else{if(this.$route.query.bizStatus){var t="waittosettle,settling,settled";t.indexOf(this.$route.query.bizStatus)>=0?this.$refs.bt.initWhereData={settle_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={delivery_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}}this.$refs.bt.fetchData()}},methods:{colVisable:function(e){return"facilitator_name"!=e.key||1==this.$store.state.user.userobj.company.id},oninitbtn:function(e,t){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforemore:function(e,t){return e.settlebill_memo=e.settlebill?e.settlebill.memo:"",t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t){var a=this;if("bizdetails"===e&&alert("wait"),"settlewriteoff"===e){if(0==this.$refs.bt.currentSels.length)return void this.$Modal.error({title:"提示",content:"请选择要进行结算核销的交付单,改变页码可以增加结算核销的明细. "});var r=[],s=this.$refs.bt.currentSels[0].facilitator_name,i=this.$refs.bt.currentSels[0].facilitator_id,n=!1;if(this.$refs.bt.currentSels.forEach((function(e){"waittosettle"==e.settle_status?r.push(e.id):n=!0})),n)return void this.$Modal.error({title:"提示",content:"请选择未结算的交付进行结算核销."});Object(c["n"])("/web/bizchance/deliverybillCtl/settleApplyForTacent",{ids:r,spname:s,spid:Number(i)},d).then((function(e){var t=e.data;0==t.status?(a.$Message.success("当前选择的结算核销已经完成,请到结算管理进行查看."),a.$refs.bt.fetchData()):a.$Message.error("当前选择的结算核销失败,请联系管理员或稍后重试.")}))}"allocation"===e&&(this.deliverNumber=t.deliverNumber,this.userType="deliverman",1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):(this.$refs.reftbl.showrefwindow([]),this.$refs.reftbl.setInitWhereData({isAllocated:1,isDelivery:1}))),"allocation_salesman"===e&&(this.userType="salesman",this.deliverNumber=t.deliverNumber,1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):(this.$refs.reftbl_salesman.showrefwindow([]),this.$refs.reftbl_salesman.setInitWhereData({isAllocated:1,isSalesman:1})))},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){var r=e[t];if("businessType"===t){var s=l["a"].businessType[r];return s}if("delivery_status"===t){var i=l["a"].deliver_status[r];return i}if("sourceName"===t){var n=l["a"].source[r];return n}if("settle_status"==t){var o=l["a"].settle_status[r];return o}},onrefselect:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.deliverNumber&&t.length>0&&t[0])){e.next=22;break}if(e.prev=1,1!=this.$store.state.user.userobj.company.id){e.next=7;break}return e.next=5,Object(c["f"])({deliverNumber:this.deliverNumber,facilitatorId:t[0].id,facilitatorName:t[0].name});case 5:e.next=13;break;case 7:if("deliverman"!==this.userType){e.next=10;break}return e.next=10,Object(c["f"])({deliverNumber:this.deliverNumber,deliverymanId:t[0].id,deliverymanName:t[0].nickName,deliverymanOpcode:t[0].opath,deliverymanPhone:t[0].mobile,type:this.userType});case 10:if("salesman"!==this.userType){e.next=13;break}return e.next=13,Object(c["f"])({deliverNumber:this.deliverNumber,salesmanId:t[0].id,salesmanName:t[0].nickName,salesmanOpcode:t[0].opath,salesmanPhone:t[0].mobile,type:this.userType});case 13:this.$refs.bt.fetchData(),this.$Message.success("分配成功"),e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](1),this.$Message.error(e.t0.message);case 20:e.next=23;break;case 22:this.$Message.error("请勾人员");case 23:case"end":return e.stop()}}),e,this,[[1,17]])})));function t(t){return e.apply(this,arguments)}return t}()}},m=h,b=a("9ca4"),p=Object(b["a"])(m,r,s,!1,null,null,null);t["default"]=p.exports},"391e":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},s=[],i=a("9ee1"),n=i["a"],o=a("9ca4"),u=Object(o["a"])(n,r,s,!1,null,null,null);t["a"]=u.exports},"3c70":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[a("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},s=[],i=a("06d3"),n={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:i["a"]},mounted:function(){},methods:{setInitWhereData:function(e){this.$refs.bt2.initWhereData=e},showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t,a){},onnew:function(){},onedit:function(){},formatCol:function(e,t,a){return e[t]}}},o=n,u=a("9ca4"),l=Object(u["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},"9ee1":function(e,t,a){"use strict";(function(e){a("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var a=e("#framediv"),r=a.get()[0],s=window.innerHeight-r.offsetTop-t.advalue;t.frameHeight=s,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-15d6294e"],{"14fe":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("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var r=t.adjustHeight;return[a("BizTable",{ref:"bt",attrs:{showTotal:"",formatCol:e.formatCol,modelName:"deliverybill",metaName:"alldeliver_info",packageName:"bizchance",baseUrl:e.baseUrl,tblheight:r-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,morebefore:e.beforemore,addbefore:e.beforeadd,sumfields:e.smf,colVisable:e.colVisable},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),a("RefTable",{ref:"reftbl",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!1},on:{onrefselect:e.onrefselect}}),a("RefTable",{ref:"reftbl_salesman",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!1},on:{onrefselect:e.onrefselect}}),a("RefTable",{ref:"reftblSuper",attrs:{modelName:"company",metaName:"simple_companyinfo",packageName:"common",isMulti:!1},on:{onrefselect:e.onrefselect}})]}}])})},s=[],i=(a("cc57"),a("b449"),a("9666")),n=(a("163d"),a("6d57"),a("3c70")),o=a("06d3"),u=a("391e"),l=a("db7f"),f=a("f121"),c=a("7e1e"),d=f["a"].deliverUrl.pro,m={name:"alldeliver_page",data:function(){return{baseUrl:d,smf:[{field:"cost_price",label:"服务费合计(元)"}],deliverNumber:"",userType:""}},components:{PageSpace:u["a"],BizTable:o["a"],RefTable:n["a"]},watch:{$route:function(e){if(e.query.spname){if(e.query.bizStatus){var t="waittosettle,settling,settled";t.indexOf(e.query.bizStatus)>=0?this.$refs.bt.initWhereData={facilitator_name:e.query.spname,settle_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:e.query.spname,delivery_status:e.query.bizStatus,dateType:e.query.dateType}}else this.$refs.bt.initWhereData={facilitator_name:e.query.spname,dateType:e.query.dateType};this.$refs.bt.fetchData()}else{if(e.query.bizStatus){var a="waittosettle,settling,settled";a.indexOf(e.query.bizStatus)>=0?this.$refs.bt.initWhereData={settle_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={delivery_status:e.query.bizStatus,dateType:e.query.dateType}}this.$refs.bt.fetchData()}}},mounted:function(){if(this.$route.query.spname){if(this.$route.query.bizStatus){var e="waittosettle,settling,settled";e.indexOf(this.$route.query.bizStatus)>=0?this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,settle_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,delivery_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}}else this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,dateType:this.$route.query.dateType};this.$refs.bt.fetchData()}else{if(this.$route.query.bizStatus){var t="waittosettle,settling,settled";t.indexOf(this.$route.query.bizStatus)>=0?this.$refs.bt.initWhereData={settle_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={delivery_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}}this.$refs.bt.fetchData()}},methods:{colVisable:function(e){return"facilitator_name"!=e.key||1==this.$store.state.user.userobj.company.id},oninitbtn:function(e,t){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforemore:function(e,t){return e.settlebill_memo=e.settlebill?e.settlebill.memo:"",t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t){var a=this;if("bizdetails"===e&&alert("wait"),"settlewriteoff"===e){if(0==this.$refs.bt.currentSels.length)return void this.$Modal.error({title:"提示",content:"请选择要进行结算核销的交付单,改变页码可以增加结算核销的明细. "});var r=[],s=this.$refs.bt.currentSels[0].facilitator_name,i=this.$refs.bt.currentSels[0].facilitator_id,n=!1;if(this.$refs.bt.currentSels.forEach((function(e){"waittosettle"==e.settle_status?r.push(e.id):n=!0})),n)return void this.$Modal.error({title:"提示",content:"请选择未结算的交付进行结算核销."});Object(c["n"])("/web/bizchance/deliverybillCtl/settleApplyForTacent",{ids:r,spname:s,spid:Number(i)},d).then((function(e){var t=e.data;0==t.status?(a.$Message.success("当前选择的结算核销已经完成,请到结算管理进行查看."),a.$refs.bt.fetchData()):a.$Message.error("当前选择的结算核销失败,请联系管理员或稍后重试.")}))}"allocation"===e&&(this.deliverNumber=t.deliverNumber,this.userType="deliverman",1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):(this.$refs.reftbl.showrefwindow([]),this.$refs.reftbl.setInitWhereData({isAllocated:1,isDelivery:1}))),"allocation_salesman"===e&&(this.userType="salesman",this.deliverNumber=t.deliverNumber,1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):(this.$refs.reftbl_salesman.showrefwindow([]),this.$refs.reftbl_salesman.setInitWhereData({isAllocated:1,isSalesman:1})))},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){var r=e[t];if("companyName"==t&&e["baseInfo"]){var s=e["baseInfo"]["companyName"];return s}if("businessType"===t){var i=l["a"].businessType[r];return i}if("delivery_status"===t){var n=l["a"].deliver_status[r];return n}if("sourceName"===t){var o=l["a"].source[r];return o}if("settle_status"==t){var u=l["a"].settle_status[r];return u}},onrefselect:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.deliverNumber&&t.length>0&&t[0])){e.next=22;break}if(e.prev=1,1!=this.$store.state.user.userobj.company.id){e.next=7;break}return e.next=5,Object(c["f"])({deliverNumber:this.deliverNumber,facilitatorId:t[0].id,facilitatorName:t[0].name});case 5:e.next=13;break;case 7:if("deliverman"!==this.userType){e.next=10;break}return e.next=10,Object(c["f"])({deliverNumber:this.deliverNumber,deliverymanId:t[0].id,deliverymanName:t[0].nickName,deliverymanOpcode:t[0].opath,deliverymanPhone:t[0].mobile,type:this.userType});case 10:if("salesman"!==this.userType){e.next=13;break}return e.next=13,Object(c["f"])({deliverNumber:this.deliverNumber,salesmanId:t[0].id,salesmanName:t[0].nickName,salesmanOpcode:t[0].opath,salesmanPhone:t[0].mobile,type:this.userType});case 13:this.$refs.bt.fetchData(),this.$Message.success("分配成功"),e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](1),this.$Message.error(e.t0.message);case 20:e.next=23;break;case 22:this.$Message.error("请勾人员");case 23:case"end":return e.stop()}}),e,this,[[1,17]])})));function t(t){return e.apply(this,arguments)}return t}()}},h=m,b=a("9ca4"),p=Object(b["a"])(h,r,s,!1,null,null,null);t["default"]=p.exports},"391e":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},s=[],i=a("9ee1"),n=i["a"],o=a("9ca4"),u=Object(o["a"])(n,r,s,!1,null,null,null);t["a"]=u.exports},"3c70":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[a("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},s=[],i=a("06d3"),n={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:i["a"]},mounted:function(){},methods:{setInitWhereData:function(e){this.$refs.bt2.initWhereData=e},showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t,a){},onnew:function(){},onedit:function(){},formatCol:function(e,t,a){return e[t]}}},o=n,u=a("9ca4"),l=Object(u["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},"9ee1":function(e,t,a){"use strict";(function(e){a("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var a=e("#framediv"),r=a.get()[0],s=window.innerHeight-r.offsetTop-t.advalue;t.frameHeight=s,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b3066fa","chunk-2d0d61ef"],{"70cc":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"user_info",packageName:"auth",tblheight:e.tblheight,isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit,onexec:e.onexec,oninitbtn:e.oninitbtn}})],1)},n=[],a=(r("cc57"),r("163d"),r("06d3")),s=r("7e1e"),i={name:"userinfo_page",data:function(){return{}},components:{BizTable:a["a"]},props:{tblheight:Number,beforesave:{type:Function,default:function(){return function(e,t,r){return r(t)}}},beforedit:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}},beforeadd:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}}},methods:{onexec:function(e,t){var r=this;"enablebtn"==e&&Object(s["n"])("/web/auth/userCtl/allowOrNotToOne",{curid:t.id,isEnabled:t.isEnabled}).then((function(e){var t=e.data;0==t.status?(r.$refs.bt.fetchData(),r.$Message.success("当前操作已经成功完成.")):r.$Message.error("当前操作未完成.")}))},oninitbtn:function(e,t){"enablebtn"==e.key&&(t.isEnabled?e.title="停用":e.title="启用")},searchWhere:function(e){this.$refs.bt.initWhereData=e,this.$refs.bt.fetchData()},setHeight:function(e){this.$refs.bt.setHeight(e)},onnew:function(){this.$refs.bt.setFormCtlVisable("userName",!0)},onedit:function(){this.$refs.bt.setFormCtlVisable("userName",!1)},formatCol:function(e,t,r){if("isEnabled"==t)return e["isEnabled"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("isAllocated"==t)return e["isAllocated"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("roleName"==t){var o=e.Roles.map((function(e){return e.name})).join(",");return e.roles=e.Roles.map((function(e){return e.id})),"<span>".concat(o,"</span>")}return"isAdmin"==t||"isSuper"==t?"<span>".concat(e[t]?"是":"否","</span>"):"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},l=i,c=r("9ca4"),f=Object(c["a"])(l,o,n,!1,null,null,null);t["default"]=f.exports},d610:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var o=t.adjustHeight;return[r("SplitPanel",[r("OrgEditor",{ref:"orgtree",attrs:{slot:"left",initData:e.initData,metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode},slot:"left"}),r("UserInfo",{ref:"userinfo",attrs:{slot:"right",tblheight:o-60,beforesave:e.beforesave,beforedit:e.beforedit,beforeadd:e.beforeadd},slot:"right"})],1)]}}])})},n=[],a=r("efa5"),s=a["a"],i=r("9ca4"),l=Object(i["a"])(s,o,n,!1,null,null,null);t["default"]=l.exports},efa5:function(e,t,r){"use strict";(function(e){r("9a33"),r("60b7");var o=r("391e"),n=r("7e1e"),a=r("302e"),s=r("832e"),i=r("70cc");r("f121");t["a"]={name:"treeinfo_page",props:{},components:{OrgEditor:a["a"],SplitPanel:s["a"],UserInfo:i["default"],PageSpace:o["a"]},data:function(){return{metainfo:{name:"节点编辑",main:[{title:"授权信息",key:"baseinfo",cols:2,ctls:[{type:"switch",label:"是否岗位",prop:"isPosition",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:""},{type:"switch",label:"是否负责人",prop:"isMain",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:"",isHide:!0},{type:"input",label:"监控",prop:"orgtag",placeHolder:"输入监控的部门编码(非岗位),逗号分隔",style:"",rules:[],isHide:!0},{type:"model-select",refModel:"auth.role",isMulti:!0,label:"角色",prop:"roles",labelField:"name",valueField:"id",style:{"margin-left":"10px",width:"165px"},isHide:!0}]}],lists:null}}},mounted:function(){},methods:{onselnode:function(e,t,r){this.$refs.userinfo.searchWhere({opath:r.code})},orgsave:function(e,t,r){var o=this;Object(n["n"])("/web/common/companyCtl/setOrgs",{orgJson:e,curdata:t,olddata:r}).then((function(e){var r=e.data;if(console.log("ddddddddddddddddd",r),0==r.status){var n=r.data.orgJson;console.log("save org...............................",n),o.$refs.orgtree.treedata=n,o.$refs.orgtree.refreshTree(),o.$Message.success("当前操作成功完成"),o.$refs.userinfo.searchWhere({opath:t.code})}}))},beforeadd:function(e,t){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition?t({value:!0,message:null}):t({value:!1,message:"请选择岗位节点"})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,r){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition&&(t.opath=this.$refs.orgtree.currentData.orgpath+"/"+t.userName,t.ptags=this.$refs.orgtree.currentData.orgtag,t.roles=this.$refs.orgtree.currentData.roles?this.$refs.orgtree.currentData.roles:[]),console.log("before.save",e,t),r(t)},setHeight:function(){var t=e("#orgdiv"),r=t.get()[0],o=window.innerHeight-r.offsetTop;t.css("height",o+"px"),this.$refs.userinfo.setHeight(o-120)},drawaction:function(e,t){t.formModel.isPosition?(t.setCtlVisable("isMain",!0),t.setCtlVisable("orgtag",!0),t.setCtlVisable("roles",!0)):(t.setCtlVisable("isMain",!1),t.setCtlVisable("orgtag",!1),t.setCtlVisable("roles",!1))},controlctl:function(e,t,r){if("isMain"==t){var o=this.$refs.orgtree.currentNode,n=this.$refs.orgtree.findParentByNode(o),a=r.formModel;if(a.orgtag&&a.orgtag.indexOf(n.code)<0){var s=a.orgtag.split(",").push(n.code).join(",");a.orgtag=s}else a.orgtag=n.code}"isPosition"==t&&(e?(r.setCtlVisable("isMain",!0),r.setCtlVisable("orgtag",!0),r.setCtlVisable("roles",!0)):(r.setCtlVisable("isMain",!1),r.setCtlVisable("orgtag",!1),r.setCtlVisable("roles",!1)))},initData:function(e){Object(n["h"])().then((function(t){var r=t.data;if(0!=r.status)throw new Error("获取组织数据出错");var o=r.data.orgJson;e(o)}))}}}}).call(this,r("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b3066fa","chunk-2d0d61ef"],{"70cc":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"user_info",packageName:"auth",tblheight:e.tblheight,isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit,onexec:e.onexec,oninitbtn:e.oninitbtn}})],1)},n=[],a=(r("cc57"),r("163d"),r("06d3")),s=r("7e1e"),i={name:"userinfo_page",data:function(){return{}},components:{BizTable:a["a"]},props:{tblheight:Number,beforesave:{type:Function,default:function(){return function(e,t,r){return r(t)}}},beforedit:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}},beforeadd:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}}},methods:{onexec:function(e,t){var r=this;"enablebtn"==e&&Object(s["n"])("/web/auth/userCtl/allowOrNotToOne",{curid:t.id,isEnabled:t.isEnabled}).then((function(e){var t=e.data;0==t.status?(r.$refs.bt.fetchData(),r.$Message.success("当前操作已经成功完成.")):r.$Message.error("当前操作未完成.")}))},oninitbtn:function(e,t){"enablebtn"==e.key&&(t.isEnabled?e.title="停用":e.title="启用")},searchWhere:function(e){this.$refs.bt.initWhereData=e,this.$refs.bt.fetchData()},setHeight:function(e){this.$refs.bt.setHeight(e)},onnew:function(){this.$refs.bt.setFormCtlVisable("userName",!0)},onedit:function(){this.$refs.bt.setFormCtlVisable("userName",!1)},formatCol:function(e,t,r){if("isEnabled"==t)return e["isEnabled"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("isAllocated"==t)return e["isAllocated"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("roleName"==t){var o=e.Roles.map((function(e){return e.name})).join(",");return e.roles=e.Roles.map((function(e){return e.id})),"<span>".concat(o,"</span>")}return"isAdmin"==t||"isSuper"==t?"<span>".concat(e[t]?"是":"否","</span>"):"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},l=i,c=r("9ca4"),f=Object(c["a"])(l,o,n,!1,null,null,null);t["default"]=f.exports},d610:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var o=t.adjustHeight;return[r("SplitPanel",[r("OrgEditor",{ref:"orgtree",attrs:{slot:"left",initData:e.initData,metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode},slot:"left"}),r("UserInfo",{ref:"userinfo",attrs:{slot:"right",tblheight:o-60,beforesave:e.beforesave,beforedit:e.beforedit,beforeadd:e.beforeadd},slot:"right"})],1)]}}])})},n=[],a=r("efa5"),s=a["a"],i=r("9ca4"),l=Object(i["a"])(s,o,n,!1,null,null,null);t["default"]=l.exports},efa5:function(e,t,r){"use strict";(function(e){r("9a33"),r("60b7");var o=r("391e"),n=r("7e1e"),a=r("302e"),s=r("832e"),i=r("70cc");r("f121");t["a"]={name:"treeinfo_page",props:{},components:{OrgEditor:a["a"],SplitPanel:s["a"],UserInfo:i["default"],PageSpace:o["a"]},data:function(){return{metainfo:{name:"节点编辑",main:[{title:"授权信息",key:"baseinfo",cols:2,ctls:[{type:"switch",label:"是否岗位",prop:"isPosition",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:""},{type:"switch",label:"是否负责人",prop:"isMain",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:"",isHide:!0},{type:"dreftag",label:"监控",prop:"orgtag",refModel:"common.company",isMulti:!1,labelField:"orgpath",valueField:"orgpath",refMethod:"getWatchOrgNodes",placeHolder:"请选择监控节点",style:"",canclose:!0,rules:[]},{type:"model-select",refModel:"auth.role",isMulti:!0,label:"角色",prop:"roles",labelField:"name",valueField:"id",style:{"margin-left":"10px",width:"165px"},isHide:!0}]}],lists:null}}},mounted:function(){},methods:{onselnode:function(e,t,r){this.$refs.userinfo.searchWhere({opath:r.code})},orgsave:function(e,t,r){var o=this;Object(n["n"])("/web/common/companyCtl/setOrgs",{orgJson:e,curdata:t,olddata:r}).then((function(e){var r=e.data;if(console.log("ddddddddddddddddd",r),0==r.status){var n=r.data.orgJson;console.log("save org...............................",n),o.$refs.orgtree.treedata=n,o.$refs.orgtree.refreshTree(),o.$Message.success("当前操作成功完成"),o.$refs.userinfo.searchWhere({opath:t.code})}}))},beforeadd:function(e,t){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition?t({value:!0,message:null}):t({value:!1,message:"请选择岗位节点"})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,r){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition&&(t.opath=this.$refs.orgtree.currentData.orgpath+"/"+t.userName,t.ptags=this.$refs.orgtree.currentData.orgtag,t.roles=this.$refs.orgtree.currentData.roles?this.$refs.orgtree.currentData.roles:[]),console.log("before.save",e,t),r(t)},setHeight:function(){var t=e("#orgdiv"),r=t.get()[0],o=window.innerHeight-r.offsetTop;t.css("height",o+"px"),this.$refs.userinfo.setHeight(o-120)},drawaction:function(e,t){t.formModel.isPosition?(t.setCtlVisable("isMain",!0),t.setCtlVisable("orgtag",!0),t.setCtlVisable("roles",!0)):(t.setCtlVisable("isMain",!1),t.setCtlVisable("orgtag",!1),t.setCtlVisable("roles",!1))},controlctl:function(e,t,r){if("isMain"==t){var o=this.$refs.orgtree.currentNode,n=this.$refs.orgtree.findParentByNode(o),a=r.formModel;if(a.orgtag&&a.orgtag.indexOf(n.code)<0){var s=a.orgtag.split(",").push(n.code).join(",");a.orgtag=s}else a.orgtag=n.code}"isPosition"==t&&(e?(r.setCtlVisable("isMain",!0),r.setCtlVisable("orgtag",!0),r.setCtlVisable("roles",!0)):(r.setCtlVisable("isMain",!1),r.setCtlVisable("orgtag",!1),r.setCtlVisable("roles",!1)))},initData:function(e){Object(n["h"])().then((function(t){var r=t.data;if(0!=r.status)throw new Error("获取组织数据出错");var o=r.data.orgJson;e(o)}))}}}}).call(this,r("a336"))}}]);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment