2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
import{B as Be,C as be,M as he,N as ke,w as we,D as ge,I as Ve,O as De,P as Ae,_ as xe,$ as Le,L as Ue,Q as Pe,k as Te}from"./element-plus.9c2fdfa8.js";import{_ as Ie}from"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import{d as ee,r as m,$ as X,a4 as $e,af as Se,o as l,c as E,U as e,L as t,M as _,u,K as y,k as P,V as N,T as R,a7 as Y,R as p,a as C,Q as O}from"./@vue.53f8d7c3.js";import{u as qe}from"./vue-router.e2f4a118.js";import{u as ze}from"./usePaging.c22e2b6f.js";import{u as Me}from"./useDictOptions.773276bb.js";import{a as Ne,k as Q,f as Re}from"./index.b57b84f0.js";import{i as Oe,g as Qe,s as je,h as Ge,k as Ke,b as He,a as Je}from"./company.da0ac536.js";import"./lodash.5512e984.js";import{d as Z}from"./dict.3d59f58c.js";import{d as We}from"./dict.070e6995.js";import{_ as Xe}from"./dialog_index.vue_vue_type_script_setup_true_name_companyLists_lang.847877f5.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.92474d72.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.ee641d3d.js";import"./color.cbc2f3a9.js";import"./clone.7fddbad2.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.a7d78d4d.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";const Ye={class:"mt-4"},Ze={key:0,style:{color:"#67c23a"}},ea={key:1,style:{color:"#fe0000"}},aa={style:{display:"flex"}},ta={class:"flex mt-4 justify-end"},ua=C("h1",null,"\u91CD\u8981\u63D0\u9192",-1),oa=C("div",{class:"content"},"\u8BF7\u786E\u8BA4\u4FE1\u606F\u662F\u5426\u6709\u8BEF",-1),la={class:"btn_menu"},na=C("h1",null,"\u91CD\u8981\u63D0\u9192",-1),sa={key:0,class:"content"},ra={key:1,class:"content"},ia={class:"btn_menu"},pa=ee({name:"companyLists"}),at=ee({...pa,setup(ca){var H;const w=m(!1),ae=s=>{n.value.party_a=s.id,n.value.party_a_name=s.company_name,w.value=!1},D=Ne();console.log(D.userInfo.company_id);const j=qe(),A=m(!0),v=m(!1),x=m(!1),L=()=>{v.value=!1,x.value=!1},G=m(!1),g=m(!1),T=()=>{g.value=!1,G.value=!1},B=m(""),n=m({party_a:"",party_a_name:"",party_b:"",party_b_name:"",contract_type:"",contract_no:""}),te=m([]),K=m([]),ue=async s=>{const o=await He({id:s});Je().then(d=>{te.value=d}),Z({type_id:7}).then(d=>{K.value=d.lists.filter(c=>We.find(h=>h==c.id))}),n.value.party_b=o.id,n.value.party_b_name=o.company_name,D.userInfo.company.id?(n.value.party_a=D.userInfo.company.id,n.value.party_a_name=D.userInfo.company.company_name):(n.value.party_a="",n.value.party_a_name="")},oe=s=>{B.value=s.id,ue(s.id),le()},le=()=>{G.value=!0,g.value=!0},ne=s=>{v.value=!0,x.value=!0,B.value=s.id},se=async()=>{await Oe({id:B.value,...n.value}),b(),T()},re=async()=>{await Qe({id:B.value}),b(),L()},ie=async()=>{await je({id:B.value}),b(),L()},r=X({company_name:"",area:"",street:"",company_type:"",area_manager:"",is_contract:""});j.query.company_type&&(A.value=!1,r.company_type=((H=j.query.company_type)==null?void 0:H.toString())||"");const I=X({dictTypeLists:[]});(async()=>{const s=await Z({type_id:6});I.dictTypeLists=s.lists})();const pe=m([]),ce=s=>{pe.value=s.map(({id:o})=>o)};Me("");const{pager:V,getLists:b,resetParams:de,resetPage:me}=ze({fetchFun:Ge,params:r}),_e=async s=>{await Re.confirm("\u786E\u5B9A\u8981\u8BA4\u8BC1\uFF1F"),await Ke({id:s}),b()},ye=()=>{Te.warning("\u8BF7\u7B49\u5F85\u5408\u540C\u5BA1\u6838\u5B8C\u6210!")};return b(),(s,o)=>{const d=Be,c=be,h=he,$=ke,i=we,fe=ge,S=Ve,q=$e("router-link"),f=De,Ce=Ae,Ee=Ie,U=xe,Fe=Le,z=Ue,F=Se("perms"),ve=Pe;return l(),E("div",null,[e(S,{cl
|