2 lines
8.4 KiB
JavaScript
2 lines
8.4 KiB
JavaScript
import{B as le,C as ne,M as se,N as re,w as pe,D as ce,I as ie,O as de,P as _e,L as me,Q as fe}from"./element-plus.9c2fdfa8.js";import{_ as ye}from"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import{u as Ee}from"./vue-router.e2f4a118.js";import{u as Ce}from"./usePaging.c22e2b6f.js";import{u as ve}from"./useDictOptions.aa9aa458.js";import{d as Be,e as Fe}from"./contract.707fdd59.js";import{l as be,u as ke,g as he,s as ge}from"./company.0e78bc1e.js";import{d as G,s as De,r as d,$ as M,a4 as we,af as Ve,o as l,c as m,U as t,L as a,M as w,u as o,K as _,k as R,T as V,a7 as z,R as p,a as E,S as A,Q as Ae,bf as xe,be as Pe}from"./@vue.53f8d7c3.js";import"./lodash.47b8af7d.js";import{d as Se}from"./index.5be037e5.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.96be3cef.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.efc99072.js";import"./color.e83714e9.js";import"./clone.fb54e01d.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.b4b577c6.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 Ie=F=>(xe("data-v-4304562e"),F=F(),Pe(),F),Ue={class:"mt-4"},Le={key:0,style:{color:"#67c23a"}},qe={key:1,style:{color:"#fe0000"}},Ne={class:"flex justify-end mt-4"},Te=Ie(()=>E("h1",null,"\u91CD\u8981\u63D0\u9192",-1)),$e={key:0,class:"content"},Me={key:1,class:"content"},Re={class:"btn_menu"},ze=G({name:"contractLists"}),Ge=G({...ze,setup(F){var I;const x=Ee();De(),d(!1);const P=d([]);let D=!1;const f=d(!1),b=d(!1),C=d(""),k=d(""),S=d(""),O=n=>{f.value=!0,b.value=!0,C.value=n.id,k.value=n.party_b,S.value=n.type,console.log(n),n.contract_type==22&&(D=!0)},h=()=>{f.value=!1,b.value=!1},Q=async()=>{D?await ke({part_b:k.value,contract_id:C.value}):await he({part_b:k.value,type:S.value,id:C.value}),D=!1,g(),h()},j=async()=>{await ge({id:C.value}),g(),h()},s=M({company_name:"",contract_type:"",contract_no:"",contract_status:"",area_manager:""}),K=M([{id:"1",name:"\u5DF2\u7B7E\u7EA6"},{id:"0",name:"\u672A\u7B7E\u7EA6"}]);x.query.type&&(s.type=(I=x.query.type)==null?void 0:I.toString());const Z=d([]),H=n=>{Z.value=n.map(({id:u})=>u)};ve(""),be().then(n=>{P.value=n});const{pager:v,getLists:g,resetParams:J,resetPage:W}=Ce({fetchFun:Be,params:s});d();const X=n=>{Fe({id:n.id}).then(u=>{Y(u.url,"")})},Y=(n,u)=>{let c=document.createElement("a");c.href=n,c.download=u,document.body.appendChild(c),c.click(),document.body.removeChild(c)};return g(),(n,u)=>{const c=le,y=ne,U=se,L=re,r=pe,ee=ce,q=ie,i=de,N=we("router-link"),te=_e,ae=ye,oe=me,T=Ve("perms"),ue=fe;return l(),m("div",null,[t(q,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(ee,{class:"mb-[-16px]",model:o(s),inline:""},{default:a(()=>[t(y,{label:"\u516C\u53F8\u540D\u79F0",prop:"company_name"},{default:a(()=>[t(c,{class:"w-[280px]",modelValue:o(s).company_name,"onUpdate:modelValue":u[0]||(u[0]=e=>o(s).company_name=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u516C\u53F8"},null,8,["modelValue"])]),_:1}),t(y,{label:"\u5408\u540C\u7C7B\u578B",prop:"contract_type"},{default:a(()=>[t(L,{modelValue:o(s).contract_type,"onUpdate:modelValue":u[1]||(u[1]=e=>o(s).contract_type=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u7C7B\u578B"},{default:a(()=>[(l(!0),m(V,null,z(o(P),e=>(l(),_(U,{key:e.label,value:e.id,label:e.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(y,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_no"},{default:a(()=>[t(c,{class:"w-[280px]",modelValue:o(s).contract_no,"onUpdate:modelValue":u[2]||(u[2]=e=>o(s).contract_no=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),t(y,{label:"\u72B6\u6001",prop:"contract_status"},{default:a(()=>[t(L,{modelValue:o(s).contract_status,"onUpdate:modelValue":u[3]||(u[3]=e=>o(s).contract_status=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"},{default:a(()=>[(l(!0),m(V,null,z(o(K),e=>(l(),_(U,{key:e.label,value:e.id,label:e.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(y,{label:"\u7532\u65B9\u7247\u533A\u7ECF\u7406",prop:"area_manager"},{default:a(()=>[t(c,{class:"w-[280px]",modelValue:o(s).area_manager,"onUpdate:modelValue":u[4]||(u[4]=e=>o(s).area_manager=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7532\u65B9\u7247\u533A\u7ECF\u7406"},null,8,["modelValue"])]),_:1}),t(y,null,{default:a(()=>[t(r,{type:"primary",onClick:o(W)},{default:a(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),t(r,{onClick:o(J)},{default:a(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),w((l(),_(q,{class:"!border-none",shadow:"never"},{default:a(()=>[E("div",Ue,[t(te,{data:o(v).lists,onSelectionChange:H},{default:a(()=>[t(i,{label:"id",prop:"id","show-overflow-tooltip":""}),t(i,{label:"\u5408\u540C\u7C7B\u578B",prop:"contract_type_name","show-overflow-tooltip":""}),t(i,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_no","show-overflow-tooltip":""}),t(i,{label:"\u7532\u65B9",prop:"party_a_name","show-overflow-tooltip":""},{default:a(e=>{var B,$;return[E("span",null,A(($=(B=e.row)==null?void 0:B.party_a_info)==null?void 0:$.company_name),1)]}),_:1}),t(i,{label:"\u4E59\u65B9",prop:"party_b_name","show-overflow-tooltip":""}),t(i,{label:"\u7532\u65B9\u7247\u533A\u7ECF\u7406",prop:"area_manager_name","show-overflow-tooltip":""}),t(i,{label:"\u7C7B\u578B",prop:"type","show-overflow-tooltip":""},{default:a(e=>[E("span",null,A(e.row.type==1?"\u516C\u53F8":e.row.type==0?"":"\u4E2A\u4EBA"),1)]),_:1}),t(i,{label:"\u72B6\u6001",prop:"status_name","show-overflow-tooltip":""},{default:a(e=>[e.row.status_name=="\u5DF2\u7B7E\u7EA6"?(l(),m("span",Le,"\u5DF2\u7B7E\u7EA6")):(l(),m("span",qe,"\u672A\u7B7E\u7EA6"))]),_:1}),t(i,{label:"\u64CD\u4F5C",width:"180",fixed:"right",align:"center"},{default:a(({row:e})=>[t(r,{type:"primary",link:""},{default:a(()=>[t(N,{to:{path:"/contract/detail",query:{id:e.id}}},{default:a(()=>[p(A(e.status?"\u8BE6\u60C5":"\u5BA1\u6838"),1)]),_:2},1032,["to"])]),_:2},1024),e.status==0?(l(),m(V,{key:0},[e.check_status==1?(l(),_(r,{key:0,type:"warning",link:""},{default:a(()=>[t(N,{to:{path:"/contract/detail",query:{id:e.id}}},{default:a(()=>[p("\u5F85\u5BA1\u6838")]),_:2},1032,["to"])]),_:2},1024)):e.check_status==2?w((l(),_(r,{key:1,type:"primary",link:"",onClick:B=>O(e)},{default:a(()=>[p("\u53D1\u9001\u5408\u540C")]),_:2},1032,["onClick"])),[[T,["contract.contract/contract_send"]]]):e.check_status==3?w((l(),_(r,{key:2,type:"primary",link:"",onClick:B=>(f.value=!0,k.value=e.party_b,C.value=e.id)},{default:a(()=>[p("\u53D1\u9001\u77ED\u4FE1")]),_:2},1032,["onClick"])),[[T,["contract.contract/contract_send_again"]]]):Ae("",!0)],64)):(l(),_(r,{key:1,type:"primary",link:"",onClick:B=>X(e)},{default:a(()=>[p(" \u4E0B\u8F7D\u8BC1\u636E\u5305 ")]),_:2},1032,["onClick"]))]),_:1})]),_:1},8,["data"])]),E("div",Ne,[t(ae,{modelValue:o(v),"onUpdate:modelValue":u[5]||(u[5]=e=>R(v)?v.value=e:null),onChange:o(g)},null,8,["modelValue","onChange"])])]),_:1})),[[ue,o(v).loading]]),t(oe,{modelValue:o(f),"onUpdate:modelValue":u[6]||(u[6]=e=>R(f)?f.value=e:null),onClose:h},{default:a(()=>[Te,o(b)?(l(),m("div",$e," \u8BF7\u786E\u8BA4\u4FE1\u606F\u662F\u5426\u6709\u8BEF,\u53D1\u9001\u5408\u540C,\u8BF7\u786E\u8BA4\u4FE1\u606F\u662F\u5426\u6709\u8BEF,\u53D1\u9001\u7535\u5B50\u5408\u540C\u540E\u77ED\u65F6\u95F4\u5185\u5C06\u4E0D\u53EF\u518D\u6B21\u53D1\u9001. ")):(l(),m("div",Me," \u786E\u8BA4\u7B7E\u7EA6\u77ED\u4FE1\u5C06\u572860\u79D2\u540E\u53D1\u9001,\u8BF7\u6CE8\u610F\u67E5\u6536,\u5E76\u70B9\u51FB\u77ED\u4FE1\u94FE\u63A5\u8FDB\u884C\u7EBF\u4E0A\u5408\u540C\u7B7E\u7EA6 ")),E("p",Re,[o(b)?(l(),_(r,{key:0,type:"primary",size:"large",onClick:Q},{default:a(()=>[p("\u786E\u8BA4")]),_:1})):(l(),_(r,{key:1,type:"primary",size:"large",onClick:j},{default:a(()=>[p("\u786E\u8BA4")]),_:1})),t(r,{type:"info",size:"large",onClick:h},{default:a(()=>[p("\u8FD4\u56DE")]),_:1})])]),_:1},8,["modelValue"])])}}});const xt=Se(Ge,[["__scopeId","data-v-4304562e"]]);export{xt as default};
|