Files
zyt/server/public/admin/assets/setting-CamFJpvJ.js
T
Your NameandClaude Opus 5 18a0989c00 业务订单已发货后不能再修改服用天数
- 已发货判定:履约状态已发货/已签收/已完成,或已填快递单号,或药房回传已发货(洛阳 SHIPPED/COMPLETED、甘草 20/30)
- 已发货后「修改服用参数」与订单编辑中的主方/辅方开立天数、订单服用天数不可修改(服务端拦截);次数、袋数仍可改;
  订单未单独设置天数时以处方开立天数为准,不会误判为修改
- 订单详情返回 days_locked,详情抽屉、订单列表(含 H5)编辑时禁用天数输入并提示
- 重新构建管理后台

Co-Authored-By: Claude Opus 5 <[EMAIL]>
2026-11-30 14:04:17 +08:00

2 lines
7.2 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.
import{o as L,a0 as A,at as H,q as u,r as m,v as s,D as t,be as J,bc as X,s as i,a3 as G,O as Q,F as B,bp as Y,w as Z,u as V,aw as $,L as p,T as ee,K as oe,d6 as se,P as ae,bg as te,bb as re,a2 as ne,M as w,aD as D,n as q,E as v}from"./.pnpm-DnXobOVo.js";import{_ as le}from"./index-Dr3u_474.js";import{_ as de}from"./picker-B1DqZVNl.js";import{u as ie,a as ce,f as c,c9 as ue,b as _e,ca as me,_ as pe}from"./index-BOegMRMJ.js";import{a as we}from"./wecomOauthPostMessage-C_e6VGrO.js";import"./index-Cg9HXmao.js";import"./index-D9HnJtm-.js";import"./index.vue_vue_type_script_setup_true_lang-GSVwwezT.js";import"./index-CbIb2cb3.js";import"./index-C-XJAvIx.js";import"./file-D8ZkMlAM.js";import"./index.vue_vue_type_script_setup_true_lang-Bxg_mWlx.js";import"./usePaging-DdtNlhkl.js";const fe={class:"user-setting"},ge={class:"w-80"},be={class:"w-80"},ke={class:"flex items-center gap-3"},ve={class:"w-80"},ye={class:"w-80"},he={class:"w-80"},xe={class:"bind-qrcode-wrap"},Ve={key:0,class:"text-center py-8"},Ue={key:1,id:"bind_wxwork_qrcode",class:"bind-qrcode"},Ee=L({name:"userSetting"}),Ie=L({...Ee,setup(Ce){const U=w(),f=ie(),o=D({avatar:"",account:"",name:"",work_wechat_userid:"",password_old:"",password:"",password_confirm:""}),M=D({avatar:[{required:!0,message:"头像不能为空",trigger:["change"]}],name:[{required:!0,message:"请输入名称",trigger:["blur"]}]}),g="like_admin_wx_bind_oauth",E=w(!1),y=w({corp_id:"",agent_id:""}),b=w(!1),k=w(!1);let l=null;const S=async()=>{const a=f.userInfo;for(const e in o)a[e]!==void 0&&(o[e]=a[e])},W=async()=>{if(o.password_old||o.password||o.password_confirm){if(!o.password_old)return c.msgError("请输入当前密码");if(!o.password)return c.msgError("请输入新的密码");if(!o.password_confirm)return c.msgError("请输入确定密码");if(o.password_confirm!=o.password)return c.msgError("两次输入的密码不一样")}if(o.password_old&&o.password&&o.password_confirm){if(o.password_old.length<6||o.password_old.length>32)return c.msgError("密码长度在6到32之间");if(o.password.length<6||o.password.length>32)return c.msgError("密码长度在6到32之间");if(o.password_confirm.length<6||o.password_confirm.length>32)return c.msgError("密码长度在6到32之间")}const{work_wechat_userid:a,...e}=o;await me(e),f.getUserInfo()},N=async()=>{var a;await((a=U.value)==null?void 0:a.validate()),W()},R=()=>window.location.origin+window.location.pathname+"?bind_wxwork=1",T=async()=>{b.value=!0,k.value=!0,window.WwLogin||await new Promise((e,_)=>{const r=document.createElement("script");r.src="https://wwcdn.weixin.qq.com/node/wework/wwopen/js/wwLogin-1.2.7.js",r.onload=()=>e(),r.onerror=()=>_(new Error("加载企业微信JS失败")),document.head.appendChild(r)}),await q(),k.value=!1,await q(),l==null||l(),l=we({pathIncludes:"user/setting",lockKey:g,wxBindState:"bind_wxwork",onCode:e=>I(e)});const a=encodeURIComponent(R());new window.WwLogin({id:"bind_wxwork_qrcode",appid:y.value.corp_id,agentid:y.value.agent_id,redirect_uri:a,lang:"zh",state:"bind_wxwork",href:"",self_redirect:!1})},z=()=>{k.value=!1,l==null||l(),l=null},F=async()=>{await c.confirm("确定要解绑企业微信吗?解绑后将无法使用企业微信扫码登录。");try{await ue(),o.work_wechat_userid="",v.success("解绑成功"),f.getUserInfo()}catch(a){v.error((a==null?void 0:a.msg)||"解绑失败")}},I=async a=>{try{const e=await _e({code:a});o.work_wechat_userid=(e==null?void 0:e.work_wechat_userid)||"",b.value=!1,v.success("企业微信绑定成功"),f.getUserInfo()}catch(e){v.error((e==null?void 0:e.msg)||(e==null?void 0:e.message)||"绑定失败")}finally{const e=window.location.pathname;window.history.replaceState({},"",e)}};return A(async()=>{try{const d=await ce();d!=null&&d.enabled&&(E.value=!0,y.value={corp_id:d.corp_id,agent_id:d.agent_id})}catch{}const a=new URLSearchParams(window.location.search),e=a.get("code"),_=a.get("state"),r=a.get("bind_wxwork");if(e&&(_==="bind_wxwork"||r==="1")){if(sessionStorage.getItem(g)===e)return;sessionStorage.setItem(g,e),I(e).finally(()=>{sessionStorage.removeItem(g)})}}),S(),H(()=>{l==null||l(),l=null}),(a,e)=>{const _=de,r=X,d=G,h=Z,C=Y,x=oe,O=J,P=te,K=le,j=ne;return u(),m("div",fe,[s(P,{class:"!border-none",shadow:"never"},{default:t(()=>[s(O,{ref_key:"formRef",ref:U,class:"ls-form",model:o,rules:M,"label-width":"100px"},{default:t(()=>[s(r,{label:"头像:",prop:"avatar"},{default:t(()=>[s(_,{modelValue:o.avatar,"onUpdate:modelValue":e[0]||(e[0]=n=>o.avatar=n),limit:1},null,8,["modelValue"])]),_:1}),s(r,{label:"账号:",prop:"account"},{default:t(()=>[i("div",ge,[s(d,{modelValue:o.account,"onUpdate:modelValue":e[1]||(e[1]=n=>o.account=n),disabled:""},null,8,["modelValue"])])]),_:1}),s(r,{label:"名称:",prop:"name"},{default:t(()=>[i("div",be,[s(d,{modelValue:o.name,"onUpdate:modelValue":e[2]||(e[2]=n=>o.name=n),placeholder:"请输入名称"},null,8,["modelValue"])])]),_:1}),E.value?(u(),Q(r,{key:0,label:"企业微信:"},{default:t(()=>[i("div",ke,[o.work_wechat_userid?(u(),m(B,{key:0},[s(C,{type:"success",size:"large"},{default:t(()=>[s(h,{class:"mr-1"},{default:t(()=>[s(V($))]),_:1}),p(" 已绑定("+ee(o.work_wechat_userid)+") ",1)]),_:1}),s(x,{type:"danger",link:"",onClick:F},{default:t(()=>[...e[7]||(e[7]=[p("解绑",-1)])]),_:1})],64)):(u(),m(B,{key:1},[s(C,{type:"info",size:"large"},{default:t(()=>[...e[8]||(e[8]=[p("未绑定",-1)])]),_:1}),s(x,{type:"primary",onClick:T},{default:t(()=>[s(h,{class:"mr-1"},{default:t(()=>[s(V(se))]),_:1}),e[9]||(e[9]=p(" 扫码绑定 ",-1))]),_:1})],64))])]),_:1})):ae("",!0),s(r,{label:"当前密码:",prop:"password_old"},{default:t(()=>[i("div",ve,[s(d,{modelValue:o.password_old,"onUpdate:modelValue":e[3]||(e[3]=n=>o.password_old=n),modelModifiers:{trim:!0},placeholder:"修改密码时必填, 不修改密码时留空",type:"password","show-password":""},null,8,["modelValue"])])]),_:1}),s(r,{label:"新的密码:",prop:"password"},{default:t(()=>[i("div",ye,[s(d,{modelValue:o.password,"onUpdate:modelValue":e[4]||(e[4]=n=>o.password=n),modelModifiers:{trim:!0},placeholder:"修改密码时必填, 不修改密码时留空",type:"password","show-password":""},null,8,["modelValue"])])]),_:1}),s(r,{label:"确定密码:",prop:"password_confirm"},{default:t(()=>[i("div",he,[s(d,{modelValue:o.password_confirm,"onUpdate:modelValue":e[5]||(e[5]=n=>o.password_confirm=n),modelModifiers:{trim:!0},placeholder:"修改密码时必填, 不修改密码时留空",type:"password","show-password":""},null,8,["modelValue"])])]),_:1})]),_:1},8,["model","rules"])]),_:1}),s(K,null,{default:t(()=>[s(x,{type:"primary",onClick:N},{default:t(()=>[...e[10]||(e[10]=[p("保存",-1)])]),_:1})]),_:1}),s(j,{modelValue:b.value,"onUpdate:modelValue":e[6]||(e[6]=n=>b.value=n),title:"扫码绑定企业微信",width:"440px","close-on-click-modal":!1,onClose:z},{default:t(()=>[i("div",xe,[k.value?(u(),m("div",Ve,[s(h,{class:"is-loading",size:36,color:"var(--el-color-primary)"},{default:t(()=>[s(V(re))]),_:1}),e[11]||(e[11]=i("div",{class:"mt-3 text-gray-400"},"加载企业微信扫码...",-1))])):(u(),m("div",Ue))]),e[12]||(e[12]=i("div",{class:"text-center text-sm text-gray-400 mt-2 mb-2"}," 请使用企业微信扫描二维码完成绑定 ",-1))]),_:1},8,["modelValue"])])}}}),Pe=pe(Ie,[["__scopeId","data-v-00d65b91"]]);export{Pe as default};