You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
4.1 KiB
2 lines
4.1 KiB
var R=Object.defineProperty,I=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var h=(o,t,e)=>t in o?R(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,w=(o,t)=>{for(var e in t||(t={}))H.call(t,e)&&h(o,e,t[e]);if(C)for(var e of C(t))P.call(t,e)&&h(o,e,t[e]);return o},B=(o,t)=>I(o,j(t));var _=(o,t,e)=>new Promise((u,r)=>{var m=l=>{try{c(e.next(l))}catch(d){r(d)}},v=l=>{try{c(e.throw(l))}catch(d){r(d)}},c=l=>l.done?u(l.value):Promise.resolve(l.value).then(m,v);c((e=e.apply(o,t)).next())});import{d as G,q as x,r as y,o as i,a as S,w as f,g,t as A,b as F,u as p,B as O,h as b,F as J,j as T,bu as K,bB as V,bo as $,Y as k,$ as z}from"./index-f4658ae7.js";import{T as L}from"./index-10ceae64.js";import"./index-3590612f.js";import"./index-297faa0c.js";import"./index-cd1f9903.js";import{G as U}from"./GenerWorkFlowExt-8e9d388f.js";import q from"./BSEntity-840a884b.js";const Y={key:0,class:"ant-tag-red"},Q={key:1,class:"content"},X={key:0},Z={key:1},ee=["innerHTML"],te={style:{display:"flex","justify-content":"flex-end","margin-right":"100px"}},re={name:"Rollback"},ae=G(B(w({},re),{props:{params:{type:Object,default:()=>{}}},emits:["handleCancel"],setup(o,{emit:t}){const e=o,u=x({hasError:!1,tips:""}),r=x({visible:!1,title:"\u56DE\u6EDA\u539F\u56E0",width:800,record:{},reason:""}),m=y(!1),v=y([]),c=y([]),l=y(!1),d=y("");(()=>_(this,null,function*(){try{m.value=!0;const n=new U(e.params.WorkID);if(yield n.RetrieveFromDBSources(),n.WFState!=3){k.error("\u8BE5\u6D41\u7A0B\u5C1A\u672A\u5B8C\u6210\uFF0C\u60A8\u4E0D\u80FD\u6267\u884C\u56DE\u6EDA\u64CD\u4F5C\u3002");return}const a=new z("BP.WF.HttpHandler.WF_WorkOpt");a.AddJson(e.params);const s=yield a.DoMethodReturnString("Rollback_Init");if(typeof s=="string"&&s.includes("err@")){k.error(s.replace("err@",""));return}v.value=[{title:"\u65E5\u671F",key:"RDT",align:"center"},{title:"\u8282\u70B9ID",key:"NDFrom",align:"center"},{title:"\u8282\u70B9\u540D\u79F0",key:"NDFromT",align:"center"},{title:"\u64CD\u4F5C\u4EBA",key:"EmpFrom",align:"center"},{title:"\u64CD\u4F5C\u4EBA\u540D\u79F0",key:"EmpFromT",align:"center"},{title:"\u6267\u884C",key:"Oper",align:"center"}],c.value=JSON.parse(JSON.stringify(s))}catch(n){u.hasError=!0,u.tips=n}finally{m.value=!1}}))();const M=n=>{r.visible=!0,r.reason="",r.record=n},W=()=>_(this,null,function*(){if(!r.reason){k.warn("\u8BF7\u8F93\u5165\u56DE\u6EDA\u539F\u56E0");return}const n=new q("BP.WF.GenerWorkFlow",e.params.WorkID);yield n.Init(),yield n.RetrieveFromDBSources();const a=yield n.DoMethodReturnString("DoRollback",r.record.NDFrom,r.reason,r.record.EmpFrom);if(typeof a=="string"&&a.includes("err@")){k.error(a.replace("err@",""));return}r.visible=!1,d.value=a,l.value=!0}),E=t,N=n=>{n==0?E("handleCancel",!0):E("handleCancel",!1)};return(n,a)=>(i(),S(p($),{spinning:m.value,style:{"background-color":"white"}},{default:f(()=>[u.hasError?(i(),g("div",Y,A(u.tips),1)):(i(),g("div",Q,[l.value==!1?(i(),g("div",X,[F(p(L),{columns:v.value,"data-source":c.value,bordered:"",size:"small",rowKey:(s,D)=>D,pagination:!1},{bodyCell:f(({column:s,record:D})=>[s.key==="Oper"?(i(),S(p(O),{key:0,type:"link",onClick:ne=>M(D),style:{padding:"0px"}},{default:f(()=>[b("\u6267\u884C")]),_:2},1032,["onClick"])):(i(),g(J,{key:1},[b(A(D[s.key]),1)],64))]),_:1},8,["columns","data-source","rowKey"])])):(i(),g("div",Z,[T("div",{innerHTML:d.value,style:{padding:"10px 20px"}},null,8,ee),T("div",te,[F(p(O),{type:"primary",onClick:a[0]||(a[0]=s=>N(1))},{default:f(()=>[b("\u5173\u95ED")]),_:1})])]))])),F(p(K),{visible:r.visible,"onUpdate:visible":a[2]||(a[2]=s=>r.visible=s),title:r.title,onOk:W},{default:f(()=>[F(p(V),{value:r.reason,"onUpdate:value":a[1]||(a[1]=s=>r.reason=s),placeholder:"\u8BF7\u8F93\u5165\u56DE\u6EDA\u539F\u56E0",style:{margin:"10px",width:"90%",height:"100px"},"allow-clear":!0,class:"frmStyleType"},null,8,["value"])]),_:1},8,["visible","title"])]),_:1},8,["spinning"]))}})),ye=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"}));export{ye as _};
|