2 lines
57 KiB
JavaScript
2 lines
57 KiB
JavaScript
|
|
import{_ as je,q as oe,V as Re,o as v,c as H,a as g,e,f as l,k as U,j as y,h as i,m as O,L as Ae,t as m,g as x,d as D,M as X,F as ze,r as Me,E as Y}from"./index-C1KISTGN.js";import{S as Fe}from"./SelectAnnualPlanDialog-BZD-2g5o.js";const Qe={class:"inquiry-entry"},Le={class:"table-toolbar"},Ie={key:1,class:"table-toolbar"},$e={class:"form-actions"},He={class:"detail-table-toolbar"},Oe={style:{"margin-top":"10px","text-align":"right"}},Ee={style:{"font-size":"16px","font-weight":"bold",color:"#409eff","margin-left":"10px"}},Be={style:{color:"#909399","margin-left":"10px"}},We={__name:"Entry",setup(Ge){const A=U("apply"),z=U(null),E=U(null),B=U(!1),M=U(!1),F=U(!1),de=U(0),ne=U(0),Q=U(!1),j=U(0),k=U([{supplierName:"山东迈瑞医疗器械有限公司",contactPerson:"李明",contactPhone:"138-0013-8001",email:"liming@mairui.com",inviteStatus:"待邀请"},{supplierName:"国药控股山东有限公司",contactPerson:"王芳",contactPhone:"138-0013-8002",email:"wangfang@sdgykg.com",inviteStatus:"已邀请"},{supplierName:"西门子医疗系统有限公司",contactPerson:"张伟",contactPhone:"138-0013-8003",email:"zhangwei@siemens.com",inviteStatus:"已确认"},{supplierName:"山东新华医疗器械股份有限公司",contactPerson:"刘洋",contactPhone:"138-0013-8004",email:"liuyang@xinhuamed.com",inviteStatus:"待邀请"},{supplierName:"威高集团有限公司",contactPerson:"陈静",contactPhone:"138-0013-8005",email:"chenjing@weigao.com",inviteStatus:"待邀请"}]),L=U([]),K=[{itemName:"超声诊断仪",unit:"台",quantity:2,brandName:"迈瑞医疗",priceUpper:29e4,priceLower:27e4,quote:275e3,demandDate:"2024-07-15"},{itemName:"心电图机",unit:"台",quantity:3,brandName:"理邦仪器",priceUpper:88e3,priceLower:8e4,quote:82e3,demandDate:"2024-07-20"},{itemName:"多参数监护仪",unit:"台",quantity:5,brandName:"迈瑞医疗",priceUpper:45e3,priceLower:4e4,quote:43e3,demandDate:"2024-07-10"},{itemName:"输液泵",unit:"台",quantity:10,brandName:"科力建元",priceUpper:12e3,priceLower:11e3,quote:11500,demandDate:"2024-07-25"},{itemName:"除颤仪",unit:"台",quantity:2,brandName:"迈瑞医疗",priceUpper:65e3,priceLower:6e4,quote:62500,demandDate:"2024-07-18"}],ie=[{round:1,quoteTime:"2024-06-15 10:30:00",totalAmount:1485e3,materials:[{itemName:"超声诊断仪",unit:"台",quantity:2,quote:28e4,brand:"飞利浦"},{itemName:"心电图机",unit:"台",quantity:3,quote:85e3,brand:"光电"},{itemName:"多参数监护仪",unit:"台",quantity:5,quote:44e3,brand:"迈瑞医疗"},{itemName:"输液泵",unit:"台",quantity:10,quote:12e3,brand:"贝朗"},{itemName:"除颤仪",unit:"台",quantity:2,quote:65e3,brand:"卓尔典"}]}],Z=r=>{if(r===0)return"零元整";const t=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],c=["","拾","佰","仟","万","拾","佰","仟","亿"],u=["角","分"],p=b=>{let h="",_=0;const w=Math.floor(b).toString();for(let S=0;S<w.length;S++){const R=parseInt(w[S]),n=w.length-S-1;R===0?(_++,n%4===0&&_<4&&h!==""&&(h+=c[n])):(_=0,h+=t[R]+c[n])}return h.replace(/零+$/,"").replace(/零+/g,"零")},s=b=>{let h="";const _=Math.round((r-Math.floor(r))*100).toString().padStart(2,"0");return _[0]!=="0"&&(h+=t[parseInt(_[0])]+u[0]),_[1]!=="0"&&(h+=t[parseInt(_[1])]+u[1]),h},P=p(r),V=s();return P+"元"+(V||"整")},re=r=>{f.totalAmountInWords=Z(r||0)},pe=()=>{j.value=f.materials.reduce((r,t)=>r+(t.quote||0)*(t.quantity||0),0),f.totalAmount=j.value,f.totalAmountInWords=Z(j.value)},ue=()=>{Q.value=!0},se=r=>{L.value=r},me=()=>{const r={supplierName:"",contactPerson:"",contactPhone:"",email:"",inviteStatus:"待邀请"};k.value.push(r),Y.success("已添加一行,请填写供应商信息")},fe=(r,t)=>{k.value[t].inviteStatus="已邀请",Y.success(`已向 ${r.supplierName} 发送邀请`)},be=(r,t)=>{k.value[t].inviteStatus="待邀请",Y.info(`已取消对 ${r.supplierName} 的邀请`)},Ve=()=>{if(L.value.length===0){Y.warning("请至少选择一条记录");return}L.value.forEach(r=>{const t=k.value.findIndex(c=>c.supplierName===r.supplierName);t!==-1&&k.value[t].inviteStatus==="待邀请"&&(k.value[t].invit
|