2 lines
8.5 KiB
JavaScript
2 lines
8.5 KiB
JavaScript
import{B as re,C as ie,M as pe,N as ce,w as de,D as _e,I as me,O as fe,P as Ee,L as ye,Q as Ce}from"./element-plus.9c2fdfa8.js";import{_ as ve}from"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import{u as Be}from"./usePaging.c22e2b6f.js";import{u as he}from"./useDictOptions.aa9aa458.js";import{e as Fe,f as ke,g as be,h as De,i as ge}from"./shop_contract.b3e64dde.js";import{d as M,$ as A,s as $,r as d,a4 as Ve,af as we,o as l,c as m,U as t,L as o,M as f,u as a,K as i,Q as L,k as N,T as q,a7 as Ae,R as p,a as g,S as xe,bf as Se,be as Pe}from"./@vue.53f8d7c3.js";import"./lodash.47b8af7d.js";import{d as Ie}from"./index.5be037e5.js";import{_ as Re}from"./edit.vue_vue_type_script_setup_true_name_shopContractEdit_lang.5be2e16a.js";import{P as Ue}from"./index.da6dd366.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"./vue-router.e2f4a118.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";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";const $e=F=>(Se("data-v-777caf7b"),F=F(),Pe(),F),Le={class:"mt-4"},Ne={key:0,style:{color:"#67c23a"}},qe={key:1,style:{color:"#fe0000"}},Me={class:"flex mt-4 justify-end"},Te=$e(()=>g("h1",null,"\u91CD\u8981\u63D0\u9192",-1)),ze={key:0,class:"content"},Oe={key:1,class:"content"},je={class:"btn_menu"},Qe=M({name:"shopContractLists"}),Ke=M({...Qe,setup(F){const T=A([{id:"1",name:"\u5DF2\u7B7E\u7EA6"},{id:"0",name:"\u672A\u7B7E\u7EA6"}]),z=$(),x=d(!1),E=d({id:"",notes:""}),O=A({notes:[{required:!0,message:"\u8BF7\u8F93\u5165\u5907\u6CE8",trigger:["blur"]}]}),V=$(),j=s=>{Object.keys(E.value).forEach(n=>{E.value[n]=s[n]}),V.value.open()},Q=async()=>{await Fe({...E.value}),y(),V.value.close()},c=A({contract_no:"",party_a:"",party_b:"",check_status:"",status:""}),K=d([]),Z=s=>{K.value=s.map(({id:u})=>u)},{dictData:G}=he(""),{pager:h,getLists:y,resetParams:H,resetPage:J}=Be({fetchFun:ke,params:c}),W=s=>{be({id:s.id}).then(u=>{X(u.url,"")})},X=(s,u)=>{let n=document.createElement("a");n.href=s,n.download=u,document.body.appendChild(n),n.click(),document.body.removeChild(n)},C=d(!1),k=d(!1),b=d(""),S=d(""),P=d(""),Y=s=>{C.value=!0,k.value=!0,b.value=s.id,P.value=s.party_b,S.value=s.type},D=()=>{C.value=!1,k.value=!1},ee=async()=>{await De({id:b.value,part_b:P.value,type:S.value}),y(),D()},te=async()=>{await ge({id:b.value}),y(),D()};return y(),(s,u)=>{const n=re,v=ie,oe=pe,ae=ce,r=de,I=_e,R=me,_=fe,U=Ve("router-link"),ue=Ee,le=ve,ne=ye,B=we("perms"),se=Ce;return l(),m("div",null,[t(R,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t(I,{class:"mb-[-16px]",model:a(c),inline:""},{default:o(()=>[t(v,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_no"},{default:o(()=>[t(n,{class:"w-[280px]",modelValue:a(c).contract_no,"onUpdate:modelValue":u[0]||(u[0]=e=>a(c).contract_no=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),t(v,{label:"\u7532\u65B9",prop:"party_a"},{default:o(()=>[t(n,{class:"w-[280px]",modelValue:a(c).party_a,"onUpdate:modelValue":u[1]||(u[1]=e=>a(c).party_a=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7532\u65B9"},null,8,["modelValue"])]),_:1}),t(v,{label:"\u4E59\u65B9",prop:"party_b"},{default:o(()=>[t(n,{class:"w-[280px]",modelValue:a(c).party_b,"onUpdate:modelValue":u[2]||(u[2]=e=>a(c).party_b=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4E59\u65B9"},null,8,["modelValue"])]),_:1}),t(v,{label:"\u7B7E\u7EA6\u72B6\u6001",prop:"status"},{default:o(()=>[t(ae,{modelValue:a(c).status,"onUpdate:modelValue":u[3]||(u[3]=e=>a(c).status=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"},{default:o(()=>[(l(!0),m(q,null,Ae(a(T),e=>(l(),i(oe,{key:e.label,value:e.id,label:e.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(v,null,{default:o(()=>[t(r,{type:"primary",onClick:a(J)},{default:o(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),t(r,{onClick:a(H)},{default:o(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((l(),i(R,{class:"!border-none",shadow:"never"},{default:o(()=>[g("div",Le,[t(ue,{data:a(h).lists,onSelectionChange:Z},{default:o(()=>[t(_,{label:"id",width:"100",prop:"id","show-overflow-tooltip":""}),t(_,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_no","show-overflow-tooltip":""}),t(_,{label:"\u7532\u65B9",prop:"party_a_name","show-overflow-tooltip":""}),t(_,{label:"\u4E59\u65B9",prop:"party_b_name","show-overflow-tooltip":""}),t(_,{label:"\u7B7E\u7EA6\u72B6\u6001",prop:"status","show-overflow-tooltip":""},{default:o(({row:e})=>[e.status?(l(),m("span",Ne,"\u5DF2\u7B7E\u7EA6")):(l(),m("span",qe,"\u672A\u7B7E\u7EA6"))]),_:1}),t(_,{label:"\u5907\u6CE8",prop:"notes","show-overflow-tooltip":""}),t(_,{label:"\u64CD\u4F5C",width:"280",fixed:"right"},{default:o(({row:e})=>[f((l(),i(r,{type:"primary",link:""},{default:o(()=>[t(U,{to:{path:"/contract/shop_contract_detail",query:{id:e.id}}},{default:o(()=>[p(xe(e.status?"\u8BE6\u60C5":"\u5BA1\u6838"),1)]),_:2},1032,["to"])]),_:2},1024)),[[B,["shop_contract/details"]]]),f((l(),i(r,{type:"primary",link:"",onClick:w=>j(e)},{default:o(()=>[p(" \u8BBE\u7F6E\u5907\u6CE8 ")]),_:2},1032,["onClick"])),[[B,["shop_contract/details"]]]),e.status==0?(l(),m(q,{key:0},[e.check_status==1?f((l(),i(r,{key:0,type:"warning",link:""},{default:o(()=>[t(U,{to:{path:"/contract/shop_contract_detail",query:{id:e.id}}},{default:o(()=>[p("\u5F85\u5BA1\u6838")]),_:2},1032,["to"])]),_:2},1024)),[[B,["shop_contract/details"]]]):e.check_status==2?f((l(),i(r,{key:1,type:"primary",link:"",onClick:w=>Y(e)},{default:o(()=>[p("\u53D1\u9001\u5408\u540C")]),_:2},1032,["onClick"])),[[B,["shop_contract/contract_send"]]]):e.check_status==3?f((l(),i(r,{key:2,type:"primary",link:"",onClick:w=>(C.value=!0,b.value=e.party_b)},{default:o(()=>[p("\u53D1\u9001\u77ED\u4FE1")]),_:2},1032,["onClick"])),[[B,["shop_contract/contract_send_again"]]]):L("",!0)],64)):f((l(),i(r,{key:1,type:"primary",link:"",onClick:w=>W(e)},{default:o(()=>[p(" \u4E0B\u8F7D\u8BC1\u636E\u5305 ")]),_:2},1032,["onClick"])),[[B,["shop_contract/evidence"]]])]),_:1})]),_:1},8,["data"])]),g("div",Me,[t(le,{modelValue:a(h),"onUpdate:modelValue":u[4]||(u[4]=e=>N(h)?h.value=e:null),onChange:a(y)},null,8,["modelValue","onChange"])])]),_:1})),[[se,a(h).loading]]),a(x)?(l(),i(Re,{key:0,ref_key:"editRef",ref:z,"dict-data":a(G),onSuccess:a(y),onClose:u[5]||(u[5]=e=>x.value=!1)},null,8,["dict-data","onSuccess"])):L("",!0),t(ne,{modelValue:a(C),"onUpdate:modelValue":u[6]||(u[6]=e=>N(C)?C.value=e:null),onClose:D},{default:o(()=>[Te,a(k)?(l(),m("div",ze," \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",Oe," \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",je,[a(k)?(l(),i(r,{key:0,type:"primary",size:"large",onClick:ee},{default:o(()=>[p("\u786E\u8BA4")]),_:1})):(l(),i(r,{key:1,type:"primary",size:"large",onClick:te},{default:o(()=>[p("\u786E\u8BA4")]),_:1})),t(r,{type:"info",size:"large",onClick:D},{default:o(()=>[p("\u8FD4\u56DE")]),_:1})])]),_:1},8,["modelValue"]),t(Ue,{ref_key:"notesRef",ref:V,title:"\u8BBE\u7F6E\u5907\u6CE8",async:!0,width:"550px",onConfirm:Q},{default:o(()=>[t(I,{model:a(E),rules:a(O)},{default:o(()=>[t(v,{label:"\u5907\u6CE8",prop:"notes"},{default:o(()=>[t(n,{modelValue:a(E).notes,"onUpdate:modelValue":u[7]||(u[7]=e=>a(E).notes=e),type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},512)])}}});const Ut=Ie(Ke,[["__scopeId","data-v-777caf7b"]]);export{Ut as default};
|