1 |
- import{by as Q,a7 as M,_ as K,d as X,m as q,O as $,bs as Y,bz as Z,r as O,o as b,A as j,x,h as v,a as S,f as _,c as g,F as uu,y as eu,G as I,e as tu,H as k,bm as w,ac as au,bt as lu,az as N}from"./index.js";import{e as iu}from"./execl-upload.8692a4ce.js";import{b as J,d as z,e as V,t as G,s as R,f as A}from"./shared.110b48c6.js";import{c as ru}from"./index.004a0bb2.js";import{m as U,b as ou,x as pu,c as nu,d as su}from"./status.b7512d56.js";import{E as du}from"./index.71c29d4d.js";import{I as fu}from"./index.e25db4d1.js";const D=[{type:"index",fixed:"left",label:"\u5E8F\u53F7",width:"50"},{label:"\u4E1A\u52A1\u7F16\u53F7",prop:"invoiceCode",minWidth:"100px",required:!0,defaultData:["INV2410240908118985","INV2410281054597892"]},{label:"\u7C7B\u578B",prop:"type",minWidth:"100px",required:!0,defaultData:["\u5165\u5E93","\u5165\u5E93\u7EA2\u51B2"]},{label:"\u8BA2\u5355\u6765\u6E90",prop:"source",minWidth:"100px",required:!0,defaultData:["\u91C7\u9500\u7ED3\u7B97","\u975E\u91C7\u9500\u7ED3\u7B97"]},{label:"\u8BA2\u5355\u8D2D\u4E70\u65B9\u7EB3\u7A0E\u53F7",prop:"buyer_code",minWidth:"130px",required:!0,defaultData:["91110118MACEA1R94G","91110118MACEA1R94G"]},{label:"\u8BA2\u5355\u8D2D\u4E70\u65B9\u516C\u53F8\u540D\u79F0",prop:"buyer_name",minWidth:"150px",required:!0,defaultData:["\u5317\u4EAC\u9526\u5174\u5F18\u660C\u79D1\u6280\u6709\u9650\u516C\u53F8","\u5317\u4EAC\u9526\u5174\u5F18\u660C\u79D1\u6280\u6709\u9650\u516C\u53F8"]},{label:"\u8BA2\u5355\u9500\u552E\u65B9\u7EB3\u7A0E\u53F7",prop:"seller_code",minWidth:"160px",required:!0,defaultData:["91110113MA004JNJ28","91110113MA004JNJ28"]},{label:"\u8BA2\u5355\u9500\u552E\u65B9\u516C\u53F8\u540D\u79F0",prop:"seller_name",minWidth:"160px",required:!0,defaultData:["\u5317\u4EAC\u4E07\u5B87\u6052\u901A\u56FD\u9645\u79D1\u8D38\u6709\u9650\u516C\u53F8","\u5317\u4EAC\u4E07\u5B87\u6052\u901A\u56FD\u9645\u79D1\u8D38\u6709\u9650\u516C\u53F8"]},{label:"\u8BA2\u5355\u7F16\u53F7",prop:"orderCode",minWidth:"120px",required:!0,defaultData:["FQR2408091410078906","FQR2408091408089205"]},{label:"\u8BA2\u5355\u4E3B\u5355\u53F7",prop:"cxCode",minWidth:"120px",defaultData:["QR2408091409232833","QR2408091407526489"]},{label:"\u5546\u54C1\u7C7B\u578B",prop:"goodType",minWidth:"120px",required:!0,defaultData:["\u5E93\u5B58\u5546\u54C1","\u54A8\u8BE2\u5546\u54C1"]},{label:"\u5546\u54C1\u7F16\u53F7",prop:"goodNo",minWidth:"100px",required:!0,defaultData:["SKU2402041456190398","SKU2403201007265803"]},{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",minWidth:"100px",required:!0,defaultData:["\u6237\u5916\u4FBF\u643A \u5E78\u798F\u6709\u7EA6\u8FD0\u52A8\u5957\u88C5","\u6CF0\u5EB7\u5F00\u6CF0\u8BF4\u7CFB\u5217-\u76DB\u4E16\u6CF0\u5EB7\u6587\u4EF6\u518C"]},{label:"\u8BA2\u5355\u5355\u4F4D",prop:"unit",minWidth:"80px",required:!0,defaultData:["\u5957","\u4E2A"]},{label:"\u5546\u54C1\u6570\u91CF",prop:"num",minWidth:"110px",required:!0,defaultData:["6","6"]},{label:"\u5546\u54C1\u5355\u4EF7",prop:"goodPrice",minWidth:"110px",required:!0,defaultData:["91.15","91.15"]},{label:"\u8BA2\u5355\u603B\u91D1\u989D",prop:"totalPrice",minWidth:"110px",required:!0,defaultData:["273.45","273.45"]},{label:"\u7A0E\u76EE",prop:"cat_code",minWidth:"80px",required:!0,defaultData:["1060502040000000000","1060105040000000000"]},{label:"\u7A0E\u76EE\u540D\u79F0",prop:"cat_name",minWidth:"100px",required:!0,defaultData:["\u5DE5\u827A\u54C1","\u7EB8\u5236\u54C1"]},{label:"\u8BA2\u5355\u7A0E\u7387",prop:"tax",minWidth:"100px",required:!0,defaultData:["13","13"]},{label:"\u5173\u8054\u91D1\u989D",prop:"inv_fee",minWidth:"100px",required:!0,defaultData:["273","2038.4"]},{label:"\u8D2D\u4E70\u65B9\u7EB3\u7A0E\u53F7",prop:"inv_buyer_code",minWidth:"130px",required:!0,defaultData:["91110118MACEA1R94G","91110118MACEA1R94G"]},{label:"\u8D2D\u4E70\u65B9\u540D\u79F0",prop:"inv_buyer_name",minWidth:"170px",required:!0,defaultData:["\u5317\u4EAC\u9526\u5174\u5F18\u660C\u79D1\u6280\u6709\u9650\u516C\u53F8","\u5317\u4EAC\u9526\u5174\u5F18\u660C\u79D1\u6280\u6709\u9650\u516C\u53F8"]},{label:"\u53D1\u7968\u53F7\u7801",prop:"inv_number",minWidth:"100px",required:!0,defaultData:["24112000000154116434","24112000000154116434"]},{label:"\u5F00\u7968\u65E5\u671F",prop:"inv_open_date",minWidth:"100px",required:!0,defaultData:["2024-10-16","2024-11-18"]},{label:"\u53D1\u7968\u7C7B\u578B",prop:"inv_type",minWidth:"100px",required:!0,defaultData:["\u589E\u503C\u7A0E\u4E13\u7528\u53D1\u7968","\u589E\u503C\u7A0E\u666E\u901A\u53D1\u7968"]},{label:"\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7",mapLabel:"\u53D1\u7968\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7",prop:"inv_seller_code",minWidth:"170px",required:!0,defaultData:["91110113MA004JNJ28","91110113MA004JNJ28"]},{label:"\u9500\u552E\u65B9\u516C\u53F8",prop:"inv_seller_name",minWidth:"130px",required:!0,defaultData:["\u5317\u4EAC\u4E07\u5B87\u6052\u901A\u56FD\u9645\u79D1\u8D38\u6709\u9650\u516C\u53F8","\u5317\u4EAC\u4E07\u5B87\u6052\u901A\u56FD\u9645\u79D1\u8D38\u6709\u9650\u516C\u53F8"]},{label:"\u53D1\u7968\u660E\u7EC6ID",prop:"inv_item_id",minWidth:"110px",defaultData:["1280","1281"]},{label:"\u8D27\u7269\u6216\u5E94\u7A0E\u52B3\u52A1\u3001\u670D\u52A1\u540D\u79F0",prop:"inv_good_name",minWidth:"200px",required:!0,defaultData:["*\u5370\u5237\u54C1*JXHC \u54C1\u724C\u6587\u521B2024\u5E74\u7B80\u88C5\u672C\uFF08\u6A59\u8272\uFF09","*\u7EB8\u5236\u54C1*JXHC\u6CF0\u5EB7\u5BB6\u65CF\u529E\u516C\u5BA4\u624B\u518C"]},{label:"\u7C7B\u76EE\u7F16\u53F7",prop:"inv_cat_code",minWidth:"90px",required:!0,defaultData:["1060408990000000000","1060408990000000000"]},{label:"\u89C4\u683C\u578B\u53F7",prop:"inv_spec",minWidth:"110px",defaultData:["",""]},{label:"\u5355\u4F4D",mapLabel:"\u53D1\u7968\u5546\u54C1\u5355\u4F4D",prop:"inv_unit",minWidth:"100px",defaultData:["\u5957","\u4E2A"]},{label:"\u6570\u91CF",prop:"inv_num",minWidth:"100px",defaultData:["6","6"]},{label:"\u7A0E\u524D\u5355\u4EF7",prop:"inv_subprice",minWidth:"100px",defaultData:["91.150442477876","11.858407079646"]},{label:"\u7A0E\u524D\u603B\u4EF7",prop:"inv_subtotal",minWidth:"100px",required:!0,defaultData:["273.45","273.45"]},{label:"\u7A0E\u7387",prop:"inv_tax",minWidth:"80px",required:!0,defaultData:["273.45","273.45"]},{label:"\u7A0E\u989D",prop:"inv_tax_total",minWidth:"80px",required:!0,defaultData:["13%","13%"]},{label:"\u7A0E\u540E\u5355\u4EF7",prop:"inv_price",minWidth:"100px",defaultData:["103","103"]},{label:"\u7A0E\u540E\u603B\u989D",prop:"inv_total",minWidth:"100px",required:!0,defaultData:["309","309"]},{label:"\u7C7B\u76EE\u7F16\u53F7\u72B6\u6001",prop:"cat_diff",minWidth:"100px",required:!0,defaultData:["\u4E00\u81F4","\u4E0D\u4E00\u81F4"]},{label:"\u7A0E\u7387\u72B6\u6001",prop:"tax_diff",minWidth:"100px",required:!0,defaultData:["\u4E00\u81F4","\u4E0D\u4E00\u81F4"]},{label:"\u5907\u6CE8",prop:"remark",minWidth:"80px",defaultData:["","\u540C\u610F"]},{label:"\u5165\u8D26\u6708\u4EFD",prop:"fz_date",minWidth:"80px",required:!0,defaultData:["2024-11","2024-11"]},{label:"\u5173\u8054\u5546\u54C1ID",prop:"relaGoodNo",minWidth:"120px",required:!0,defaultData:["10","11"]},{label:"\u64CD\u4F5C\u6570\u91CF",prop:"relaGoodNum",minWidth:"100px",required:!0,defaultData:["6","6"]}],Nu=new Array(3).fill(1).map((i,e)=>D.slice(1).reduce((r,o)=>{const C=e===0;let d="";return C?d=o.required?"\u5FC5\u586B":"":d=o.defaultData[e-1],{...r,[o.label]:d}},{})),mu=D.reduce((i,e)=>({...i,[e.label]:e.prop}),{}),L=D.reduce((i,e)=>({...i,[e.prop]:e.label}),{}),Eu=D.filter(i=>!!i.required).map(i=>i.prop);function Du(i){Q({type:"warning",title:"\u6570\u636E\u6821\u9A8C\u5931\u8D25",message:M("div",{style:"display: flex, flex-direction: column"},{default:()=>Object.keys(i).reduce((e,r)=>[...e,M("p",{},"\u7B2C"+r+"\u884C,"+i[r])],[])})})}function Cu(i){const e={};let r=!1,o=!1,C=!1,d=!1,B=!1,f=!1;for(const h in i){const p=i[h],a=Number(h)+1;for(const u in p){const n=String(p[u]).trim();Eu.includes(u)&&(!n||!String(n).trim())?e[a]?e[a]=e[a]+="\u3001"+L[u]:e[a]=L[u]:u==="type"&&!J[n]?r=!0:u==="source"&&!z[n]?o=!0:u==="inv_type"&&!U[n]?C=!0:u==="tax_diff"&&!V[n]?d=!0:u==="cat_diff"&&!V[n]?B=!0:u==="goodType"&&!ou[n]&&(f=!0)}e[a]?(e[a]+="\u4E0D\u80FD\u4E3A\u7A7A",r&&(e[a]+=" , \u7C7B\u578B\u5FC5\u987B\u4E3A"+G.map(({label:u})=>u).join("\u3001")),o&&(e[a]+=" ,\u8BA2\u5355\u6765\u6E90\u5FC5\u987B\u4E3A"+R.map(({label:u})=>u).join("\u3001")),C&&(e[a]+=" ,\u53D1\u7968\u7C7B\u578B\u5FC5\u987B\u4E3A"+pu.map(({label:u})=>u).join("\u3001")),d&&(e[a]+=" ,\u7C7B\u76EE\u7F16\u53F7\u72B6\u6001\u5FC5\u987B\u4E3A"+A.map(({label:u})=>u).join("\u3001")),B&&(e[a]+=" ,\u7A0E\u7387\u72B6\u6001\u5FC5\u987B\u4E3A"+A.map(({label:u})=>u).join("\u3001")),B&&(e[a]+=" ,\u7A0E\u7387\u72B6\u6001"+A.map(({label:u})=>u).join("\u3001")),f&&(e[a]+=" ,\u5546\u54C1\u7C7B\u578B\u5FC5\u987B\u4E3A"+A.map(({label:u})=>u).join("\u3001"))):(r&&(e[a]="\u7C7B\u578B\u5FC5\u987B\u4E3A"+G.map(({label:u})=>u).join("\u3001")),o&&(e[a]=" \u8BA2\u5355\u6765\u6E90\u5FC5\u987B\u4E3A"+R.map(({label:u})=>u).join("\u3001")),C&&(e[a]=" \u7C7B\u76EE\u7F16\u53F7\u72B6\u6001\u5FC5\u987B\u4E3A"+A.map(({label:u})=>u).join("\u3001")),B&&(e[a]=" \u7A0E\u7387\u72B6\u6001\u5FC5\u987B\u4E3A"+A.map(({label:u})=>u).join("\u3001")),f&&(e[a]=" \u5546\u54C1\u7C7B\u578B\u5FC5\u987B\u4E3A"+nu.map(({label:u})=>u).join("\u3001")))}return Object.keys(e).length===0?!0:(Du(e),!1)}function Fu(i){return!!Cu(i)}const cu={key:0},bu={key:1},Bu={key:1,flex:"","justify-end":"","gap-2":"",style:{padding:"10px 0 0 0"}},vu=X({__name:"index",props:{visible:{type:Boolean,required:!0}},emits:["refresh"],setup(i,{emit:e}){const r=q(!1),o=q([]),C=e,d=i,{getCurrentLicense:B}=$(),f=Y(d,"visible"),h=Z(),p=q({visible:!1,list:[],title:""}),a=q({visible:!1,importColumns:[],columns:[]}),u=({results:F,header:l})=>{if(r.value=!0,F.length===0){N.error("\u8868\u683C\u65E0\u6709\u6548\u6570\u636E\uFF01"),r.value=!1;return}let m=!0;if(l.length!==D.length-1?m=!1:D.slice(1).forEach((E,W)=>{E.label!==l[W]&&(m=!1)}),!m){a.value.visible=!0,a.value.importColumns=[...l],a.value.columns=D.slice(1).map(({label:E})=>E),r.value=!1;return}o.value=[];const s=[];for(const E of F){const W={};Object.keys(E).forEach(T=>{const H=mu[T];let c=E[T];T==="\u53D1\u7968\u7C7B\u578B"&&(c=c.replace("(","\uFF08"),c=c.replace(")","\uFF09")),W[H]=c&&String(c).trim()}),s.push(W)}const t=B(),y=[...new Set(s.map(({inv_buyer_code:E})=>E))];if(y.length!==1){N.warning("\u5BFC\u5165\u6570\u636E\u7684\u8D2D\u4E70\u65B9\u516C\u53F8\u5FC5\u987B\u4E00\u81F4");return}if(y[0]!==t){N.warning("\u5BFC\u5165\u6570\u636E\u8D2D\u4E70\u65B9\u516C\u53F8\u4E0E\u5F53\u524D\u9009\u62E9\u516C\u53F8\u4E0D\u4E00\u81F4");return}Fu(s)&&(o.value=s),r.value=!1},n=async()=>{try{if(r.value)return;r.value=!0;const F=[];o.value.forEach(t=>{F.push({...t,inv_type:U[t.inv_type],source:z[t.source],type:J[t.type],goodType:su[t.goodType],inv_num:Number(t.inv_num).toFixed(15),inv_subprice:Number(t.inv_subprice).toFixed(15),inv_subtotal:Number(t.inv_subtotal).toFixed(15),inv_price:Number(t.inv_price).toFixed(15),inv_total:Number(t.inv_tax_total).toFixed(15),platform_type:"1",channel:"2",relaArr:[{id:t.relaGoodNo,num:t.relaGoodNum}]})});const{code:l,message:m,data:s}=await ru({list:F});if(r.value=!1,l==1004&&s){p.value.visible=!0,p.value.title=m,p.value.list=s;return}h({code:l,message:m,noMessage:!1,handler:()=>{N.success("\u6570\u636E\u5BFC\u5165\u6210\u529F\uFF01"),C("refresh"),f.value=!1}})}catch{}},P=()=>{o.value=[]};return(F,l)=>{const m=O("el-table-column"),s=O("el-table");return b(),j(v(lu),{modelValue:v(f),"onUpdate:modelValue":l[2]||(l[2]=t=>au(f)?f.value=t:null),"close-on-click-modal":!1,title:"\u975E\u8BA2\u5355\u5546\u54C1\u5BFC\u5165",width:"1040px",top:"8vh",center:"",onClose:l[3]||(l[3]=t=>o.value=[])},{default:x(()=>[o.value.length===0?(b(),j(v(iu),{key:0,style:{"margin-bottom":"10px"},onOnSuccess:u})):S("v-if",!0),_(s,{data:o.value,stripe:"",border:"","max-height":"500px",size:"small",style:{width:"100%"}},{default:x(()=>[(b(!0),g(uu,null,eu(v(D),(t,y)=>(b(),j(m,{minWidth:t.minWidth,"show-overflow-tooltip":"",fixed:t.fixed,prop:t.prop,type:t.type,key:y},{header:x(()=>[t.required?(b(),g("p",bu,[l[4]||(l[4]=tu("span",{style:{color:"#f56c6c","font-size":"14px"}},"* ",-1)),k(" "+I(t.label),1)])):(b(),g("span",cu,I(t.label),1))]),_:2},1032,["minWidth","fixed","prop","type"]))),128))]),_:1},8,["data"]),o.value.length!==0?(b(),g("div",Bu,[_(v(w),{size:"small",onClick:P},{default:x(()=>l[5]||(l[5]=[k("\u53D6\u6D88")])),_:1}),_(v(w),{size:"small",type:"primary",loading:r.value,onClick:n},{default:x(()=>l[6]||(l[6]=[k("\u4FDD\u5B58")])),_:1},8,["loading"])])):S("v-if",!0),_(du,{visible:p.value.visible,"onUpdate:visible":l[0]||(l[0]=t=>p.value.visible=t),title:p.value.title,list:p.value.list},null,8,["visible","title","list"]),_(fu,{visible:a.value.visible,"onUpdate:visible":l[1]||(l[1]=t=>a.value.visible=t),"import-columns":a.value.importColumns,columns:a.value.columns},null,8,["visible","import-columns","columns"])]),_:1},8,["modelValue"])}}});var Au=K(vu,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/inManager/components/NotOrderImportModal/index.vue"]]),Tu=Object.freeze(Object.defineProperty({__proto__:null,default:Au},Symbol.toStringTag,{value:"Module"}));export{Au as N,Tu as i,Nu as n};
|