engineering/public/admin/assets/index.83380077.js
2024-02-27 10:28:16 +08:00

2 lines
8.8 KiB
JavaScript

import{G as X,H as Y,y as Z,I as ee,w as te,D as oe,C as ae,L as le,M as ue,N as ne}from"./element-plus.517d4382.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import{f as re,a as pe}from"./index.8b1962e9.js";import{u as me}from"./usePaging.f6660143.js";import{u as ce}from"./useDictOptions.b5854a9e.js";import{a as de,b as $,e as _e}from"./project_estimate.b878230f.js";import"./lodash.1d82ee7c.js";import{_ as fe}from"./edit.vue_vue_type_script_setup_true_name_projectEstimateEdit_lang.d13a5a34.js";import ve from"./detail.891fe549.js";import{d as T,s as P,r as k,a0 as Fe,ai as be,o as u,c as j,V as e,M as a,O as b,u as n,L as p,S as L,W as R,a8 as S,a as N,k as Be,T as f,n as x}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"./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.vue_vue_type_script_setup_true_lang.6688b044.js";import"./customer_demand.ccb61d2f.js";import"./index.b17dae19.js";import"./department.b8dec04d.js";import"./organization.5e75830a.js";import"./index.vue_vue_type_script_setup_true_lang.ed719f67.js";import"./project.a81dff6c.js";import"./custom_contacts.ce9803c8.js";import"./common.9d529cba.js";import"./custom.99349afc.js";const Ee=f("\u67E5\u8BE2"),we=f("\u91CD\u7F6E"),Ce=f(" \u65B0\u589E "),Ve=f(" \u5220\u9664 "),De={class:"mt-4"},he=f(" \u7F16\u8F91 "),ye=f(" \u5220\u9664 "),ke=f(" \u8BE6\u60C5 "),je={class:"flex mt-4 justify-end"},xe=T({name:"projectEstimateLists"}),kt=T({...xe,setup(ge){const D=P(),w=P(),C=k(!1),h=k(!1),l=Fe({project_name:"",custom_name:"",contact_name:"",contact_phone:"",technician_name:"",create_user:"",customer_demand_name:"",invoice_type:"",estimate_source:""}),y=k([]),I=i=>{y.value=i.map(({id:o})=>o)},{dictData:v}=ce("estimate_source,invoice_type"),{pager:B,getLists:V,resetParams:q,resetPage:M}=me({fetchFun:de,params:l}),O=async()=>{var i;C.value=!0,await x(),(i=w.value)==null||i.open("add")},G=async i=>{var m,c;let o=await $({id:i.id});C.value=!0,await x(),(m=w.value)==null||m.open("edit"),(c=w.value)==null||c.setFormData(o)},g=async i=>{await re.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await _e({id:i}),V()},H=async i=>{var m,c;let o=await $({id:i.id});h.value=!0,await x(),(m=D.value)==null||m.open(),(c=D.value)==null||c.setFormData(o)};return V(),(i,o)=>{const m=X,c=Y,r=Z,d=ee,_=te,W=oe,A=ae,z=pe,s=le,U=ie,J=ue,K=se,E=be("perms"),Q=ne;return u(),j("div",null,[e(A,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(W,{class:"mb-[-16px]",model:l,"label-width":"auto",inline:""},{default:a(()=>[e(r,{label:"\u6982\u7B97\u6765\u6E90",prop:"estimate_source"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:l.estimate_source,"onUpdate:modelValue":o[0]||(o[0]=t=>l.estimate_source=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u6982\u7B97\u6765\u6E90"},{default:a(()=>[(u(!0),j(R,null,S(n(v).estimate_source,(t,F)=>(u(),p(m,{key:F,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(r,{label:"\u53D1\u7968\u7C7B\u578B",prop:"invoice_type"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:l.invoice_type,"onUpdate:modelValue":o[1]||(o[1]=t=>l.invoice_type=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u53D1\u7968\u7C7B\u578B"},{default:a(()=>[(u(!0),j(R,null,S(n(v).invoice_type,(t,F)=>(u(),p(m,{key:F,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(r,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name"},{default:a(()=>[e(d,{class:"w-[280px]",modelValue:l.project_name,"onUpdate:modelValue":o[2]||(o[2]=t=>l.project_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u5BA2\u6237\u540D\u79F0",prop:"custom_name"},{default:a(()=>[e(d,{class:"w-[280px]",modelValue:l.custom_name,"onUpdate:modelValue":o[3]||(o[3]=t=>l.custom_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u5BA2\u6237\u9700\u6C42\u540D\u79F0",prop:"customer_demand_name"},{default:a(()=>[e(d,{class:"w-[280px]",modelValue:l.customer_demand_name,"onUpdate:modelValue":o[4]||(o[4]=t=>l.customer_demand_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u9700\u6C42\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u8054\u7CFB\u4EBA",prop:"contact_name"},{default:a(()=>[e(d,{class:"w-[280px]",modelValue:l.contact_name,"onUpdate:modelValue":o[5]||(o[5]=t=>l.contact_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"contact_phone"},{default:a(()=>[e(d,{class:"w-[280px]",modelValue:l.contact_phone,"onUpdate:modelValue":o[6]||(o[6]=t=>l.contact_phone=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u6280\u672F\u4EBA\u5458",prop:"technician_name"},{default:a(()=>[e(d,{class:"w-[280px]",modelValue:l.technician_name,"onUpdate:modelValue":o[7]||(o[7]=t=>l.technician_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6280\u672F\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u5236\u5355\u4EBA",prop:"create_user"},{default:a(()=>[e(d,{class:"w-[280px]",modelValue:l.create_user,"onUpdate:modelValue":o[8]||(o[8]=t=>l.create_user=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5236\u5355\u4EBA"},null,8,["modelValue"])]),_:1}),e(r,null,{default:a(()=>[e(_,{type:"primary",onClick:n(M)},{default:a(()=>[Ee]),_:1},8,["onClick"]),e(_,{onClick:n(q)},{default:a(()=>[we]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),b((u(),p(A,{class:"!border-none",shadow:"never"},{default:a(()=>[b((u(),p(_,{type:"primary",onClick:O},{icon:a(()=>[e(z,{name:"el-icon-Plus"})]),default:a(()=>[Ce]),_:1})),[[E,["project.project_estimate/add"]]]),b((u(),p(_,{disabled:!y.value.length,onClick:o[9]||(o[9]=t=>g(y.value))},{default:a(()=>[Ve]),_:1},8,["disabled"])),[[E,["project.project_estimate/delete"]]]),N("div",De,[e(J,{data:n(B).lists,onSelectionChange:I},{default:a(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(s,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(s,{label:"\u5BA2\u6237\u540D\u79F0",prop:"custom_name","show-overflow-tooltip":""}),e(s,{label:"\u9700\u6C42",prop:"customer_demand_name","show-overflow-tooltip":""}),e(s,{label:"\u6982\u7B97\u6765\u6E90",prop:"estimate_source"},{default:a(({row:t})=>[e(U,{options:n(v).estimate_source,value:t.estimate_source},null,8,["options","value"])]),_:1}),e(s,{label:"\u5236\u5355\u4EBA",prop:"create_user","show-overflow-tooltip":""}),e(s,{label:"\u62A5\u4EF7\u65E5\u671F",prop:"quotation_date","show-overflow-tooltip":""}),e(s,{label:"\u53D1\u7968\u7C7B\u578B",prop:"invoice_type"},{default:a(({row:t})=>[e(U,{options:n(v).invoice_type,value:t.invoice_type},null,8,["options","value"])]),_:1}),e(s,{label:"\u6280\u672F\u4EBA\u5458",prop:"technician_name","show-overflow-tooltip":""}),e(s,{label:"\u6982\u7B97\u91D1\u989D",prop:"estimate_amount","show-overflow-tooltip":""}),e(s,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:a(({row:t})=>[b((u(),p(_,{type:"primary",link:"",onClick:F=>G(t)},{default:a(()=>[he]),_:2},1032,["onClick"])),[[E,["project.project_estimate/edit"]]]),b((u(),p(_,{type:"danger",link:"",onClick:F=>g(t.id)},{default:a(()=>[ye]),_:2},1032,["onClick"])),[[E,["project.project_estimate/delete"]]]),b((u(),p(_,{link:"",onClick:F=>H(t)},{default:a(()=>[ke]),_:2},1032,["onClick"])),[[E,["project.project_estimate/detail"]]])]),_:1})]),_:1},8,["data"])]),N("div",je,[e(K,{modelValue:n(B),"onUpdate:modelValue":o[10]||(o[10]=t=>Be(B)?B.value=t:null),onChange:n(V)},null,8,["modelValue","onChange"])])]),_:1})),[[Q,n(B).loading]]),C.value?(u(),p(fe,{key:0,ref_key:"editRef",ref:w,"dict-data":n(v),onSuccess:n(V),onClose:o[11]||(o[11]=t=>C.value=!1)},null,8,["dict-data","onSuccess"])):L("",!0),h.value?(u(),p(ve,{key:1,ref_key:"detailRef",ref:D,"dict-data":n(v),onClose:o[12]||(o[12]=t=>h.value=!1)},null,8,["dict-data"])):L("",!0)])}}});export{kt as default};