2 lines
7.6 KiB
JavaScript
2 lines
7.6 KiB
JavaScript
import{B as Z,D as ee,y as te,A as oe,w as ae,L as ne,C as le,O as ie,P as re,Q as ue}from"./element-plus.76ad22d1.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.53484866.js";import{f as ce,a as de}from"./index.ba0b8151.js";import{_ as pe}from"./index.vue_vue_type_style_index_0_lang.c554e64d.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.70540139.js";import{u as _e}from"./usePaging.0b2adcee.js";import{u as fe}from"./useDictOptions.ecef5e87.js";import{d as $,a as S,e as he}from"./contract_negotiation.f806b4b4.js";import{b as De}from"./contract.56c966c6.js";import{a as ge}from"./project.83f9f7a6.js";import{b as ve}from"./custom.80649d41.js";import{_ as Ce}from"./edit.vue_vue_type_script_setup_true_name_contractNegotiationEdit_lang.bfb97998.js";import be from"./detail.64a84a4f.js";import{u as Fe}from"./vue-router.87ebc608.js";import{d as W,s as N,r as w,a0 as ye,ai as Ee,o as s,c as P,V as e,M as o,O as f,u as t,L as p,S as R,W as we,a8 as ke,a as L,k as Be,T as _,n as k}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.9bff6341.js";import"./dayjs.4e54c873.js";import"./axios.c27a9cd7.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"./lodash.12303e67.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.ce2b95b7.js";import"./color.0b62cf11.js";import"./clone.b8d2a027.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.026d6bda.js";import"./vue-clipboard3.1a74f940.js";import"./clipboard.80ee0599.js";import"./echarts.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.d693a0d8.js";import"./index.b414519e.js";import"./index.vue_vue_type_script_setup_true_lang.e76d718b.js";import"./index.vue_vue_type_script_setup_true_lang.06812fd5.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./index.ae9bfb67.js";import"./approve.0ab27e29.js";import"./flow.9fcb8fb6.js";import"./flowSet.844dff14.js";const Ve=_("\u67E5\u8BE2"),xe=_("\u91CD\u7F6E"),Ae=_(" \u65B0\u589E "),$e=_(" \u5220\u9664 "),Se={class:"mt-4"},Ne=_(" \u7F16\u8F91 "),Pe=_(" \u5220\u9664 "),Re=_(" \u8BE6\u60C5 "),Le={class:"flex justify-end mt-4"},We=W({name:"contractNegotiationLists"}),Rt=W({...We,setup(je){var x;const b=N(),D=N(),g=w(!1),F=w(!1),c=ye({contract_id:"",project_id:"",custom_id:"",negotiation_no:"",negotiation_type:""}),y=w([]),j=u=>{y.value=u.map(({id:a})=>a)},{dictData:E}=fe("negotiation_type,contract_type,contract_pricing_method"),{pager:i,getLists:v,resetParams:T,resetPage:I}=_e({fetchFun:$,params:c}),q=async()=>{var u;g.value=!0,await k(),(u=D.value)==null||u.open("add")},z=async u=>{var d,r;let a=await S({id:u.id});g.value=!0,await k(),(d=D.value)==null||d.open("edit"),(r=D.value)==null||r.setFormData(a)},B=async u=>{await ce.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await he({id:u}),v()},O=async u=>{var d,r;let a=await S({id:u.id});F.value=!0,await k(),(d=b.value)==null||d.open(),(r=b.value)==null||r.setFormData(a)},V=Fe();return(x=V.query)!=null&&x.listId&&handledetail({id:V.query.listId}),v(),(u,a)=>{const d=me,r=Z,U=ee,M=te,Q=oe,m=ae,G=pe,H=ne,A=le,J=de,l=ie,K=re,X=se,h=Ee("perms"),Y=ue;return s(),P("div",null,[e(A,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(H,{class:"mb-[-16px]",model:c,inline:""},{default:o(()=>[e(r,{label:"\u5173\u8054\u5408\u540C",prop:"contract_id"},{default:o(()=>[e(d,{formData:c,model:"contract_id",api:t(De)},null,8,["formData","api"])]),_:1}),e(r,{label:"\u6240\u5C5E\u9879\u76EE",prop:"project_id"},{default:o(()=>[e(d,{formData:c,model:"project_id",api:t(ge)},null,8,["formData","api"])]),_:1}),e(r,{label:"\u5BA2\u6237\u540D\u79F0",prop:"custom_id"},{default:o(()=>[e(d,{formData:c,model:"custom_id",api:t(ve)},null,8,["formData","api"])]),_:1}),e(r,{label:"\u6D3D\u5546\u7F16\u53F7",prop:"negotiation_no"},{default:o(()=>[e(U,{class:"w-[280px]",modelValue:c.negotiation_no,"onUpdate:modelValue":a[0]||(a[0]=n=>c.negotiation_no=n),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6D3D\u5546\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u6D3D\u5546\u7C7B\u522B",prop:"negotiation_type"},{default:o(()=>[e(Q,{class:"w-[280px]",modelValue:c.negotiation_type,"onUpdate:modelValue":a[1]||(a[1]=n=>c.negotiation_type=n),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u6D3D\u5546\u7C7B\u522B"},{default:o(()=>[(s(!0),P(we,null,ke(t(E).negotiation_type,(n,C)=>(s(),p(M,{key:C,label:n.name,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:o(()=>[e(m,{type:"primary",onClick:t(I)},{default:o(()=>[Ve]),_:1},8,["onClick"]),e(m,{onClick:t(T)},{default:o(()=>[xe]),_:1},8,["onClick"]),e(G,{class:"ml-2.5","fetch-fun":t($),params:c,"page-size":t(i).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),f((s(),p(A,{class:"!border-none",shadow:"never"},{default:o(()=>[f((s(),p(m,{type:"primary",onClick:q},{icon:o(()=>[e(J,{name:"el-icon-Plus"})]),default:o(()=>[Ae]),_:1})),[[h,["contract.contract_negotiation/add"]]]),f((s(),p(m,{disabled:!y.value.length,onClick:a[2]||(a[2]=n=>B(y.value))},{default:o(()=>[$e]),_:1},8,["disabled"])),[[h,["contract.contract_negotiation/delete"]]]),L("div",Se,[e(K,{border:"",data:t(i).lists,onSelectionChange:j},{default:o(()=>[e(l,{type:"selection",width:"55"}),e(l,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(l,{label:"\u6D3D\u5546\u7F16\u53F7",prop:"negotiation_no","render-header":t(i).calcWidth},null,8,["render-header"]),e(l,{label:"\u5408\u540C\u7F16\u53F7",prop:"contract_code","render-header":t(i).calcWidth},null,8,["render-header"]),e(l,{label:"\u5408\u540C\u540D\u79F0",prop:"contract_name","render-header":t(i).calcWidth},null,8,["render-header"]),e(l,{label:"\u5BA2\u6237\u540D\u79F0",prop:"custom_name","show-overflow-tooltip":""}),e(l,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","render-header":t(i).calcWidth},null,8,["render-header"]),e(l,{label:"\u6D3D\u5546\u62A5\u4EF7\u91D1\u989D",prop:"negotiation_amount","render-header":t(i).calcWidth},null,8,["render-header"]),e(l,{label:"\u6D3D\u5546\u7C7B\u522B",prop:"negotiation_type","show-overflow-tooltip":""}),e(l,{label:"\u7B7E\u7EA6\u65E5\u671F",prop:"contract_date","show-overflow-tooltip":""}),e(l,{label:"\u4E1A\u52A1\u8D1F\u8D23\u4EBA",prop:"business_director","render-header":t(i).calcWidth},null,8,["render-header"]),e(l,{label:"\u5229\u6DA6",prop:"profit","show-overflow-tooltip":""}),e(l,{label:"\u5229\u6DA6\u7387",prop:"profit_rate","show-overflow-tooltip":""}),e(l,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:n})=>[f((s(),p(m,{type:"primary",link:"",onClick:C=>z(n)},{default:o(()=>[Ne]),_:2},1032,["onClick"])),[[h,["contract.contract_negotiation/edit"]]]),f((s(),p(m,{type:"danger",link:"",onClick:C=>B(n.id)},{default:o(()=>[Pe]),_:2},1032,["onClick"])),[[h,["contract.contract_negotiation/delete"]]]),f((s(),p(m,{link:"",onClick:C=>O(n)},{default:o(()=>[Re]),_:2},1032,["onClick"])),[[h,["contract.contract_negotiation/detail"]]])]),_:1})]),_:1},8,["data"])]),L("div",Le,[e(X,{modelValue:t(i),"onUpdate:modelValue":a[3]||(a[3]=n=>Be(i)?i.value=n:null),onChange:t(v)},null,8,["modelValue","onChange"])])]),_:1})),[[Y,t(i).loading]]),F.value?(s(),p(be,{key:0,ref_key:"detailRef",ref:b,"dict-data":t(E),onClose:a[4]||(a[4]=n=>F.value=!1)},null,8,["dict-data"])):R("",!0),g.value?(s(),p(Ce,{key:1,ref_key:"editRef",ref:D,"dict-data":t(E),onSuccess:t(v),onClose:a[5]||(a[5]=n=>g.value=!1)},null,8,["dict-data","onSuccess"])):R("",!0)])}}});export{Rt as default};
|