2 lines
7.2 KiB
JavaScript
2 lines
7.2 KiB
JavaScript
import{G as Y,H as Z,y as ee,w as te,D as oe,C as le,L as ae,M as ne,N as ue}from"./element-plus.4ff6f47d.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.7dabd2cb.js";import{f as ie,a as se}from"./index.aaca920c.js";import{u as de}from"./usePaging.f6660143.js";import{u as pe}from"./useDictOptions.c83e2497.js";import{d as ce,a as R,e as me}from"./refundrecord.8bc5c9e2.js";import{d as A,a0 as N,s as T,r as y,ai as _e,o as a,c as h,V as t,M as o,O as f,u as i,L as r,S as U,W as x,a8 as $,a as j,T as p,U as I,k as fe,n as L}from"./@vue.ab566ce7.js";import"./lodash.8ea2174a.js";import{d as ve}from"./procurement_contract.38e1c48b.js";import{_ as Fe}from"./edit.vue_vue_type_script_setup_true_name_projectEdit_lang.a1560929.js";import be from"./detail.c7212122.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.8497a500.js";import"./lodash-es.49f4af13.js";import"./dayjs.fc5568d8.js";import"./axios.5b893b79.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.4cbccc26.js";import"./color.033abf8c.js";import"./clone.a6258514.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.7eedf28f.js";import"./ms.a9ae1d6d.js";import"./nprogress.93182424.js";import"./vue-clipboard3.6a55d49e.js";import"./clipboard.2986c82d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.ff7c6188.js";import"./index.vue_vue_type_script_setup_true_lang.33f5ebfe.js";import"./suppler_list.326841bf.js";import"./index.vue_vue_type_script_setup_true_lang.b054bde7.js";import"./subcontracting.vue_vue_type_script_setup_true_lang.47df0d76.js";import"./subcontracting_contract.8c088cec.js";import"./index.vue_vue_type_script_setup_true_lang.f6128439.js";import"./bank_account.bfd9beef.js";import"./projecttype.6db09bf7.js";import"./custom.01004c04.js";const Ce=p("\u67E5\u8BE2"),Ee=p("\u91CD\u7F6E"),we=p(" \u65B0\u589E "),ye=p(" \u5220\u9664 "),he={class:"mt-4"},ke=p(" \u7F16\u8F91 "),Be=p(" \u5220\u9664 "),ge=p(" \u8BE6\u60C5 "),De={class:"flex justify-end mt-4"},Ve=A({name:"projectLists"}),Dt=A({...Ve,setup(xe){N([]);const k=T(),b=T(),C=y(!1),B=y(!1),g=y([]),c=N({refund_type:"",contract_id:"",supplier_id:""}),D=y([]),M=n=>{D.value=n.map(({id:l})=>l)},{dictData:V}=pe("refund_type,isaccrued,contract_type"),{pager:v,getLists:E,resetParams:O,resetPage:q}=de({fetchFun:ce,params:c}),G=async()=>{var n;C.value=!0,await L(),(n=b.value)==null||n.open("add")},H=async n=>{var s,d;console.log(n.id);let l=await R({id:n.id});C.value=!0,await L(),(s=b.value)==null||s.open("edit"),(d=b.value)==null||d.setFormData(l)},P=async n=>{await ie.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:n}),E()},W=async n=>{var s,d;let l=await R({id:n.id});B.value=!0,await L(),(s=k.value)==null||s.open(),(d=k.value)==null||d.setFormData(l)};return(()=>{ve({project_id:"",supplier_id:"",contract_no:"",all:1}).then(n=>{g.value=n.lists})})(),E(),(n,l)=>{const s=Y,d=Z,w=ee,_=te,z=oe,S=le,J=se,u=ae,K=ne,Q=re,F=_e("perms"),X=ue;return a(),h("div",null,[t(S,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t(z,{class:"mb-[-16px]",model:c,inline:""},{default:o(()=>[t(w,{label:"\u9000\u6B3E\u65B9\u5F0F",prop:"contacts"},{default:o(()=>[t(d,{class:"flex-1",modelValue:c.refund_type,"onUpdate:modelValue":l[0]||(l[0]=e=>c.refund_type=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u9000\u6B3E\u65B9\u5F0F"},{default:o(()=>[(a(!0),h(x,null,$(i(V).refund_type,(e,m)=>(a(),r(s,{key:m,label:e.name,value:parseInt(e.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(w,{label:"\u5408\u540C",prop:"contract_id"},{default:o(()=>[t(d,{class:"flex-1",modelValue:c.contract_id,"onUpdate:modelValue":l[1]||(l[1]=e=>c.contract_id=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5408\u540C"},{default:o(()=>[(a(!0),h(x,null,$(g.value,(e,m)=>(a(),r(s,{key:m,label:e.contract_name,value:parseInt(e.id)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(w,{label:"\u4F9B\u5E94\u5546",prop:"supplier_id"},{default:o(()=>[t(d,{class:"flex-1",modelValue:c.contract_id,"onUpdate:modelValue":l[2]||(l[2]=e=>c.contract_id=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5408\u540C"},{default:o(()=>[(a(!0),h(x,null,$(g.value,(e,m)=>(a(),r(s,{key:m,label:e.contract_name,value:parseInt(e.id)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(w,null,{default:o(()=>[t(_,{type:"primary",onClick:i(q)},{default:o(()=>[Ce]),_:1},8,["onClick"]),t(_,{onClick:i(O)},{default:o(()=>[Ee]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((a(),r(S,{class:"!border-none",shadow:"never"},{default:o(()=>[f((a(),r(_,{type:"primary",onClick:G},{icon:o(()=>[t(J,{name:"el-icon-Plus"})]),default:o(()=>[we]),_:1})),[[F,["refund.refund/add"]]]),f((a(),r(_,{disabled:!D.value.length,onClick:l[3]||(l[3]=e=>P(D.value))},{default:o(()=>[ye]),_:1},8,["disabled"])),[[F,["refund.refund/delete"]]]),j("div",he,[t(K,{data:i(v).lists,onSelectionChange:M},{default:o(()=>[t(u,{type:"selection",width:"55"}),t(u,{label:"\u5E8F\u53F7",type:"index",width:"55"}),t(u,{label:"\u4F9B\u5E94\u5546\u540D\u79F0",prop:"supplier_name","show-overflow-tooltip":""}),t(u,{label:"\u4F9B\u5E94\u5546\u7F16\u7801",prop:"supplier_code","show-overflow-tooltip":""}),t(u,{label:"\u5408\u540C\u7C7B\u578B",prop:"contract_type"},{default:o(({row:e})=>[p(I(e.contract_type_text),1)]),_:1}),t(u,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_no","show-overflow-tooltip":""}),t(u,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),t(u,{label:"\u9000\u6B3E\u65E5\u671F",prop:"refund_date","show-overflow-tooltip":""}),t(u,{label:"\u9000\u6B3E\u91D1\u989D",prop:"refund_amount","show-overflow-tooltip":""}),t(u,{label:"\u9000\u6B3E\u539F\u56E0",prop:"reason","show-overflow-tooltip":""}),t(u,{label:"\u9000\u6B3E\u65B9\u5F0F",prop:"refund_type","show-overflow-tooltip":""},{default:o(({row:e})=>[p(I(e.refund_type_text),1)]),_:1}),t(u,{label:"\u5907\u6CE8",prop:"remark","show-overflow-tooltip":""}),t(u,{label:"\u64CD\u4F5C",width:"150",fixed:"right"},{default:o(({row:e})=>[f((a(),r(_,{type:"primary",link:"",onClick:m=>H(e)},{default:o(()=>[ke]),_:2},1032,["onClick"])),[[F,["refund.refund/edit"]]]),f((a(),r(_,{type:"danger",link:"",onClick:m=>P(e.id)},{default:o(()=>[Be]),_:2},1032,["onClick"])),[[F,["refund.refund/delete"]]]),f((a(),r(_,{link:"",onClick:m=>W(e)},{default:o(()=>[ge]),_:2},1032,["onClick"])),[[F,["refund.refund/detail"]]])]),_:1})]),_:1},8,["data"])]),j("div",De,[t(Q,{modelValue:i(v),"onUpdate:modelValue":l[4]||(l[4]=e=>fe(v)?v.value=e:null),onChange:i(E)},null,8,["modelValue","onChange"])])]),_:1})),[[X,i(v).loading]]),C.value?(a(),r(Fe,{key:0,ref_key:"editRef",ref:b,"dict-data":i(V),onSuccess:i(E),onClose:l[5]||(l[5]=e=>C.value=!1)},null,8,["dict-data","onSuccess"])):U("",!0),B.value?(a(),r(be,{key:1,ref_key:"detailRef",ref:k,"dict-data":i(V),onClose:l[6]||(l[6]=e=>B.value=!1)},null,8,["dict-data"])):U("",!0)])}}});export{Dt as default};
|