2 lines
8.4 KiB
JavaScript
2 lines
8.4 KiB
JavaScript
import{B as ne,C as se,M as re,N as ie,w as pe,D as ce,I as de,O as _e,P as me,L as fe,Q as Ee}from"./element-plus.10e48c93.js";import{_ as ye}from"./index.vue_vue_type_script_setup_true_lang.579ca8f7.js";import{u as Ce}from"./usePaging.60d02673.js";import{u as Be}from"./useDictOptions.cfa45100.js";import{e as ve,f as he,g as Fe,h as be,i as ke}from"./shop_contract.d59fdc5e.js";import{d as N,$ as A,s as R,r as v,a4 as De,af as ge,o as l,c as _,U as t,L as o,u as a,T as U,a7 as we,K as r,R as i,M as m,a as g,S as Ve,Q as $,k as L,bf as Ae,be as xe}from"./@vue.51d7f2d8.js";import"./lodash.08438971.js";import{d as Se}from"./index.5b774352.js";import{_ as Pe}from"./edit.vue_vue_type_script_setup_true_name_shopContractEdit_lang.ba77cff9.js";import{P as Ie}from"./index.1f170085.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.105476b3.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";const Re=F=>(Ae("data-v-b55f7b58"),F=F(),xe(),F),Ue={class:"mt-4"},$e={key:0,style:{color:"#67c23a"}},Le={key:1,style:{color:"#fe0000"}},Ne={class:"flex mt-4 justify-end"},qe=Re(()=>g("h1",null,"\u91CD\u8981\u63D0\u9192",-1)),Me={key:0,class:"content"},Te={key:1,class:"content"},ze={class:"btn_menu"},Oe=N({name:"shopContractLists"}),je=N({...Oe,setup(F){const q=A([{id:"1",name:"\u5DF2\u7B7E\u7EA6"},{id:"0",name:"\u672A\u7B7E\u7EA6"}]),M=R(),x=v(!1),f=v({id:"",notes:""}),T=A({notes:[{required:!0,message:"\u8BF7\u8F93\u5165\u5907\u6CE8",trigger:["blur"]}]}),w=R(),z=c=>{Object.keys(f.value).forEach(n=>{f.value[n]=c[n]}),w.value.open()},O=async()=>{await ve({...f.value}),E(),w.value.close()},p=A({contract_no:"",party_a:"",party_b:"",check_status:"",status:""}),j=v([]),Q=c=>{j.value=c.map(({id:u})=>u)},{dictData:K}=Be(""),{pager:h,getLists:E,resetParams:Z,resetPage:G}=Ce({fetchFun:ke,params:p}),H=c=>{he({id:c.id}).then(u=>{J(u.url,"")})},J=(c,u)=>{let n=document.createElement("a");n.href=c,n.download=u,document.body.appendChild(n),n.click(),document.body.removeChild(n)},y=v(!1),b=v(!1),k=v(""),W=c=>{y.value=!0,b.value=!0,k.value=c.party_b},D=()=>{y.value=!1,b.value=!1},X=async()=>{await Fe({id:k.value}),E(),D()},Y=async()=>{await be({id:k.value}),E(),D()};return E(),(c,u)=>{const n=ne,C=se,ee=re,te=ie,s=pe,S=ce,P=de,d=_e,I=De("router-link"),oe=me,ae=ye,ue=fe,B=ge("perms"),le=Ee;return l(),_("div",null,[t(P,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t(S,{class:"mb-[-16px]",model:a(p),inline:""},{default:o(()=>[t(C,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_no"},{default:o(()=>[t(n,{class:"w-[280px]",modelValue:a(p).contract_no,"onUpdate:modelValue":u[0]||(u[0]=e=>a(p).contract_no=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),t(C,{label:"\u7532\u65B9",prop:"party_a"},{default:o(()=>[t(n,{class:"w-[280px]",modelValue:a(p).party_a,"onUpdate:modelValue":u[1]||(u[1]=e=>a(p).party_a=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7532\u65B9"},null,8,["modelValue"])]),_:1}),t(C,{label:"\u4E59\u65B9",prop:"party_b"},{default:o(()=>[t(n,{class:"w-[280px]",modelValue:a(p).party_b,"onUpdate:modelValue":u[2]||(u[2]=e=>a(p).party_b=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4E59\u65B9"},null,8,["modelValue"])]),_:1}),t(C,{label:"\u7B7E\u7EA6\u72B6\u6001",prop:"status"},{default:o(()=>[t(te,{modelValue:a(p).status,"onUpdate:modelValue":u[3]||(u[3]=e=>a(p).status=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"},{default:o(()=>[(l(!0),_(U,null,we(a(q),e=>(l(),r(ee,{key:e.label,value:e.id,label:e.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(C,null,{default:o(()=>[t(s,{type:"primary",onClick:a(G)},{default:o(()=>[i("\u67E5\u8BE2")]),_:1},8,["onClick"]),t(s,{onClick:a(Z)},{default:o(()=>[i("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),m((l(),r(P,{class:"!border-none",shadow:"never"},{default:o(()=>[g("div",Ue,[t(oe,{data:a(h).lists,onSelectionChange:Q},{default:o(()=>[t(d,{label:"id",width:"100",prop:"id","show-overflow-tooltip":""}),t(d,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_no","show-overflow-tooltip":""}),t(d,{label:"\u7532\u65B9",prop:"party_a_name","show-overflow-tooltip":""}),t(d,{label:"\u4E59\u65B9",prop:"party_b_name","show-overflow-tooltip":""}),t(d,{label:"\u7B7E\u7EA6\u72B6\u6001",prop:"status","show-overflow-tooltip":""},{default:o(({row:e})=>[e.status?(l(),_("span",$e,"\u5DF2\u7B7E\u7EA6")):(l(),_("span",Le,"\u672A\u7B7E\u7EA6"))]),_:1}),t(d,{label:"\u5907\u6CE8",prop:"notes","show-overflow-tooltip":""}),t(d,{label:"\u64CD\u4F5C",width:"280",fixed:"right"},{default:o(({row:e})=>[m((l(),r(s,{type:"primary",link:""},{default:o(()=>[t(I,{to:{path:"/contract/shop_contract_detail",query:{id:e.id}}},{default:o(()=>[i(Ve(e.status?"\u8BE6\u60C5":"\u5BA1\u6838"),1)]),_:2},1032,["to"])]),_:2},1024)),[[B,["shop_contract/details"]]]),m((l(),r(s,{type:"primary",link:"",onClick:V=>z(e)},{default:o(()=>[i(" \u8BBE\u7F6E\u5907\u6CE8 ")]),_:2},1032,["onClick"])),[[B,["shop_contract/details"]]]),e.status==0?(l(),_(U,{key:0},[e.check_status==1?m((l(),r(s,{key:0,type:"warning",link:""},{default:o(()=>[t(I,{to:{path:"/contract/shop_contract_detail",query:{id:e.id}}},{default:o(()=>[i("\u5F85\u5BA1\u6838")]),_:2},1032,["to"])]),_:2},1024)),[[B,["shop_contract/details"]]]):e.check_status==2?m((l(),r(s,{key:1,type:"primary",link:"",onClick:V=>W(e)},{default:o(()=>[i("\u53D1\u9001\u5408\u540C")]),_:2},1032,["onClick"])),[[B,["shop_contract/contract_send"]]]):e.check_status==3?m((l(),r(s,{key:2,type:"primary",link:"",onClick:V=>(y.value=!0,k.value=e.party_b)},{default:o(()=>[i("\u53D1\u9001\u77ED\u4FE1")]),_:2},1032,["onClick"])),[[B,["shop_contract/contract_send_again"]]]):$("",!0)],64)):m((l(),r(s,{key:1,type:"primary",link:"",onClick:V=>H(e)},{default:o(()=>[i(" \u4E0B\u8F7D\u8BC1\u636E\u5305 ")]),_:2},1032,["onClick"])),[[B,["shop_contract/evidence"]]])]),_:1})]),_:1},8,["data"])]),g("div",Ne,[t(ae,{modelValue:a(h),"onUpdate:modelValue":u[4]||(u[4]=e=>L(h)?h.value=e:null),onChange:a(E)},null,8,["modelValue","onChange"])])]),_:1})),[[le,a(h).loading]]),a(x)?(l(),r(Pe,{key:0,ref_key:"editRef",ref:M,"dict-data":a(K),onSuccess:a(E),onClose:u[5]||(u[5]=e=>x.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),t(ue,{modelValue:a(y),"onUpdate:modelValue":u[6]||(u[6]=e=>L(y)?y.value=e:null),onClose:D},{default:o(()=>[qe,a(b)?(l(),_("div",Me," \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(),_("div",Te," \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 ")),g("p",ze,[a(b)?(l(),r(s,{key:0,type:"primary",size:"large",onClick:X},{default:o(()=>[i("\u786E\u8BA4")]),_:1})):(l(),r(s,{key:1,type:"primary",size:"large",onClick:Y},{default:o(()=>[i("\u786E\u8BA4")]),_:1})),t(s,{type:"info",size:"large",onClick:D},{default:o(()=>[i("\u8FD4\u56DE")]),_:1})])]),_:1},8,["modelValue"]),t(Ie,{ref_key:"notesRef",ref:w,title:"\u8BBE\u7F6E\u5907\u6CE8",async:!0,width:"550px",onConfirm:O},{default:o(()=>[t(S,{model:a(f),rules:a(T)},{default:o(()=>[t(C,{label:"\u5907\u6CE8",prop:"notes"},{default:o(()=>[t(n,{modelValue:a(f).notes,"onUpdate:modelValue":u[7]||(u[7]=e=>a(f).notes=e),type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},512)])}}});const Pt=Se(je,[["__scopeId","data-v-b55f7b58"]]);export{Pt as default};
|