2 lines
7.2 KiB
JavaScript
2 lines
7.2 KiB
JavaScript
import{G as Q,H as X,y as Y,w as Z,D as ee,C as oe,L as te,M as le,N as ae}from"./element-plus.517d4382.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as re,a as ie}from"./index.8b1962e9.js";import{u as se}from"./usePaging.f6660143.js";import{u as pe}from"./useDictOptions.b5854a9e.js";import{M as ne,a as $,b as de}from"./project_material_budget_detail.ace9a748.js";import{_ as me}from"./edit.vue_vue_type_script_setup_true_name_procurementContractEdit_lang.2f31608f.js";import ce from"./detail.626133cf.js";import{d as T,a0 as L,s as M,r as B,ai as _e,o as u,c as D,V as e,M as a,O as f,u as i,L as s,S as P,W as R,a8 as S,a as N,k as fe,T as m,n as j}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.1d82ee7c.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.b17dae19.js";import"./project_material_budget.35091f07.js";import"./index.vue_vue_type_script_setup_true_lang.e3193673.js";import"./material_list.935b5931.js";import"./index.011c79f0.js";import"./approve.bbbe5096.js";import"./flow.34e13ba8.js";import"./flowSet.6da79e1c.js";import"./custom.99349afc.js";const ve=m("\u67E5\u8BE2"),we=m("\u91CD\u7F6E"),be=m(" \u65B0\u589E "),Ce=m(" \u5220\u9664 "),he={class:"mt-4"},Fe=m(" \u7F16\u8F91 "),ye=m(" \u5220\u9664 "),ge=m(" \u8BE6\u60C5 "),Ee={class:"flex justify-end mt-4"},ke=T({name:"projectLists"}),yo=T({...ke,setup(Be){L([]);const y=M(),b=M(),C=B(!1),g=B(!1),c=L({contract_type:"",budget_type:""}),E=B([]),U=r=>{E.value=r.map(({id:t})=>t)},{dictData:h}=pe("budget_type,is_residual"),{pager:v,getLists:F,resetParams:A,resetPage:I}=se({fetchFun:ne,params:c}),O=async()=>{var r;C.value=!0,await j(),(r=b.value)==null||r.open("add")},q=async r=>{var p,n;console.log(r.id);let t=await $({id:r.id});C.value=!0,await j(),(p=b.value)==null||p.open("edit"),(n=b.value)==null||n.setFormData(t)},V=async r=>{await re.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:r}),F()},G=async r=>{var p,n;let t=await $({id:r.id});g.value=!0,await j(),(p=y.value)==null||p.open(),(n=y.value)==null||n.setFormData(t)};return F(),(r,t)=>{const p=Q,n=X,k=Y,d=Z,H=ee,x=oe,W=ie,o=te,z=le,J=ue,w=_e("perms"),K=ae;return u(),D("div",null,[e(x,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(H,{class:"mb-[-16px]",model:c,inline:""},{default:a(()=>[e(k,{label:"\u662F\u5426\u6709\u5269\u4F59",prop:"is_residual"},{default:a(()=>[e(n,{class:"w-[280px]",modelValue:c.is_residual,"onUpdate:modelValue":t[0]||(t[0]=l=>c.is_residual=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u6709\u5269\u4F59"},{default:a(()=>[(u(!0),D(R,null,S(i(h).is_residual,(l,_)=>(u(),s(p,{key:_,label:l.name,value:parseInt(l.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(k,{label:"\u7C7B\u578B",prop:"budget_type"},{default:a(()=>[e(n,{class:"w-[280px]",modelValue:c.budget_type,"onUpdate:modelValue":t[1]||(t[1]=l=>c.budget_type=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B"},{default:a(()=>[e(p,{label:"\u5168\u90E8",value:""}),(u(!0),D(R,null,S(i(h).budget_type,(l,_)=>(u(),s(p,{key:_,label:l.name,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(k,null,{default:a(()=>[e(d,{type:"primary",onClick:i(I)},{default:a(()=>[ve]),_:1},8,["onClick"]),e(d,{onClick:i(A)},{default:a(()=>[we]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((u(),s(x,{class:"!border-none",shadow:"never"},{default:a(()=>[f((u(),s(d,{type:"primary",onClick:O},{icon:a(()=>[e(W,{name:"el-icon-Plus"})]),default:a(()=>[be]),_:1})),[[w,["project.project/add"]]]),f((u(),s(d,{disabled:!E.value.length,onClick:t[2]||(t[2]=l=>V(E.value))},{default:a(()=>[Ce]),_:1},8,["disabled"])),[[w,["project.project/delete"]]]),N("div",he,[e(z,{data:i(v).lists,onSelectionChange:U},{default:a(()=>[e(o,{type:"selection",width:"55"}),e(o,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(o,{label:"\u9884\u7B97\u5355\u53F7",prop:"material_budget_code","show-overflow-tooltip":""}),e(o,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(o,{label:"\u9879\u76EE\u7F16\u7801",prop:"project_code","show-overflow-tooltip":""}),e(o,{label:"\u7C7B\u578B",prop:"budget_type","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u5927\u7C7B",prop:"material_first_level","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u4E2D\u7C7B",prop:"material_second_level","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u5C0F\u7C7B",prop:"material_three_level","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u540D\u79F0",prop:"material_name","show-overflow-tooltip":""}),e(o,{label:"\u6750\u6599\u7F16\u7801",prop:"material_code","show-overflow-tooltip":""}),e(o,{label:"\u89C4\u683C\u578B\u53F7",prop:"material_specs","show-overflow-tooltip":""}),e(o,{label:"\u54C1\u724C",prop:"material_brand","show-overflow-tooltip":""}),e(o,{label:"\u53C2\u6570\u8BF4\u660E",prop:"material_parameter_description","show-overflow-tooltip":""}),e(o,{label:"\u5355\u4F4D",prop:"material_unit","show-overflow-tooltip":""}),e(o,{label:"\u7533\u8BF7\u6570\u91CF",prop:"apply_num","show-overflow-tooltip":""}),e(o,{label:"\u9884\u7B97\u6570\u91CF",prop:"num","show-overflow-tooltip":""}),e(o,{label:"\u5269\u4F59\u9884\u7B97\u6570\u91CF",prop:"residual_num","show-overflow-tooltip":""}),e(o,{label:"\u5355\u4EF7",prop:"price","show-overflow-tooltip":""}),e(o,{label:"\u91D1\u989D",prop:"amount","show-overflow-tooltip":""}),e(o,{label:"\u5907\u6CE8",prop:"remark","show-overflow-tooltip":""}),e(o,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:a(({row:l})=>[f((u(),s(d,{type:"primary",link:"",onClick:_=>q(l)},{default:a(()=>[Fe]),_:2},1032,["onClick"])),[[w,["project.project/edit"]]]),f((u(),s(d,{type:"danger",link:"",onClick:_=>V(l.id)},{default:a(()=>[ye]),_:2},1032,["onClick"])),[[w,["project.project/delete"]]]),f((u(),s(d,{link:"",onClick:_=>G(l)},{default:a(()=>[ge]),_:2},1032,["onClick"])),[[w,["project.project/detail"]]])]),_:1})]),_:1},8,["data"])]),N("div",Ee,[e(J,{modelValue:i(v),"onUpdate:modelValue":t[3]||(t[3]=l=>fe(v)?v.value=l:null),onChange:i(F)},null,8,["modelValue","onChange"])])]),_:1})),[[K,i(v).loading]]),C.value?(u(),s(me,{key:0,ref_key:"editRef",ref:b,"dict-data":i(h),onSuccess:i(F),onClose:t[4]||(t[4]=l=>C.value=!1)},null,8,["dict-data","onSuccess"])):P("",!0),g.value?(u(),s(ce,{key:1,ref_key:"detailRef",ref:y,"dict-data":i(h),onClose:t[5]||(t[5]=l=>g.value=!1)},null,8,["dict-data"])):P("",!0)])}}});export{yo as default};
|