1 |
- import{b3 as X,ac as M,_ as K,d as Q,w as q,U as $,a$ as Y,b4 as Z,r as S,o as B,G as j,C as x,l as v,a as w,j as _,c as g,F as uu,D as eu,L as G,h as tu,M as k,aR as O,ah as au,b0 as lu,az as N}from"./index.js";import{e as ru}from"./execl-upload.359c6423.js";import{b as V,c as U,d as I,t as J,s as L,e as A}from"./shared.c745d8d9.js";import{b as iu}from"./index.61485ef8.js";import{m as z,b as ou,x as pu,c as nu,d as du}from"./status.b7512d56.js";import{E as su}from"./index.6716434d.js";import{I as fu}from"./index.214c1f62.js";const E=[{type:"index",fixed:"left",label:"\u5E8F\u53F7",width:"50"},{label:"\u4E1A\u52A1\u7F16\u53F7",prop:"invoiceCode",minWidth:"100px",required:!0,defaultData:["hp2410161627508256","hp2410161634513798"]},{label:"\u7C7B\u578B",prop:"type",minWidth:"100px",required:!0,defaultData:["\u51FA\u5E93","\u51FA\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:["91110113MA004JNJ28","91110113MA004JNJ28"]},{label:"\u8BA2\u5355\u8D2D\u4E70\u65B9\u516C\u53F8\u540D\u79F0",prop:"buyer_name",minWidth:"150px",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\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7",prop:"seller_code",minWidth:"160px",required:!0,defaultData:["91110118MACEA1R94G","91110118MACEA1R94G"]},{label:"\u8BA2\u5355\u9500\u552E\u65B9\u516C\u53F8\u540D\u79F0",prop:"seller_name",minWidth:"160px",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\u7F16\u53F7",prop:"orderCode",minWidth:"120px",required:!0,defaultData:["FCG2312151515318702","FCG2312281122491501"]},{label:"\u8BA2\u5355\u4E3B\u5355\u53F7",prop:"cxCode",minWidth:"120px",defaultData:["QR2312151514229403","QR2312281121198629"]},{label:"\u5546\u54C1\u7C7B\u578B",prop:"goodType",minWidth:"120px",required:!0,defaultData:["\u975E\u5E93\u5B58\u5546\u54C1","\u54A8\u8BE2\u5546\u54C1"]},{label:"\u5546\u54C1\u7F16\u53F7",prop:"goodNo",minWidth:"100px",required:!0,defaultData:["SKU2310111111191036","SKU2307191640103890"]},{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",minWidth:"100px",required:!0,defaultData:["JXHC \u54C1\u724C\u6587\u521B2024\u5E74\u7B80\u88C5\u672C\uFF08\u6A59\u8272\uFF09","JXHC\u6CF0\u5EB7\u5BB6\u65CF\u529E\u516C\u5BA4\u624B\u518C"]},{label:"\u8BA2\u5355\u5355\u4F4D",prop:"unit",minWidth:"80px",required:!0,defaultData:["\u672C","\u4E2A"]},{label:"\u5546\u54C1\u6570\u91CF",prop:"num",minWidth:"110px",required:!0,defaultData:["40","160"]},{label:"\u5546\u54C1\u5355\u4EF7",prop:"goodPrice",minWidth:"110px",required:!0,defaultData:["6.83","12.74"]},{label:"\u8BA2\u5355\u603B\u91D1\u989D",prop:"totalPrice",minWidth:"110px",required:!0,defaultData:["273","2038.4"]},{label:"\u7A0E\u76EE",prop:"cat_code",minWidth:"80px",required:!0,defaultData:["1060105020000000000","1060201990000000000"]},{label:"\u7A0E\u76EE\u540D\u79F0",prop:"cat_name",minWidth:"100px",required:!0,defaultData:["\u7EB8\u5236\u54C1","\u5370\u5237\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:["91110113MA004JNJ28","91110113MA004JNJ28"]},{label:"\u8D2D\u4E70\u65B9\u540D\u79F0",prop:"inv_buyer_name",minWidth:"170px",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\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:["\u7535\u5B50\u53D1\u7968\uFF08\u589E\u503C\u7A0E\u4E13\u7528\u53D1\u7968\uFF09","\u7535\u5B50\u53D1\u7968\uFF08\u589E\u503C\u7A0E\u4E13\u7528\u53D1\u7968\uFF09"]},{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:["91110118MACEA1R94G","91110118MACEA1R94G"]},{label:"\u9500\u552E\u65B9\u516C\u53F8",prop:"inv_seller_name",minWidth:"130px",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\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:["1060201990000000000","1060105990000000000"]},{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:["\u672C","\u4E2A"]},{label:"\u6570\u91CF",prop:"inv_num",minWidth:"100px",required:!0,defaultData:["40","160"]},{label:"\u7A0E\u524D\u5355\u4EF7",prop:"inv_subprice",minWidth:"100px",required:!0,defaultData:["6.0398230088496","11.274336283186"]},{label:"\u7A0E\u524D\u603B\u4EF7",prop:"inv_subtotal",minWidth:"100px",required:!0,defaultData:["241.59","1803.89"]},{label:"\u7A0E\u7387",prop:"inv_tax",minWidth:"80px",required:!0,defaultData:["13%","13%"]},{label:"\u7A0E\u989D",prop:"inv_tax_total",minWidth:"80px",required:!0,defaultData:["31.41","234.51"]},{label:"\u7A0E\u540E\u5355\u4EF7",prop:"inv_price",minWidth:"100px",required:!0,defaultData:["6.825","12.74"]},{label:"\u7A0E\u540E\u603B\u989D",prop:"inv_total",minWidth:"100px",required:!0,defaultData:["273","2038.4"]},{label:"\u7C7B\u76EE\u7F16\u53F7\u72B6\u6001",prop:"cat_diff",minWidth:"100px",required:!0,defaultData:["\u4E00\u81F4","\u4E00\u81F4"]},{label:"\u7A0E\u7387\u72B6\u6001",prop:"tax_diff",minWidth:"100px",required:!0,defaultData:["\u4E0D\u4E00\u81F4","\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-10","2024-11"]},{label:"\u5173\u8054\u5546\u54C1ID",prop:"relaGoodNo",minWidth:"120px",required:!0,defaultData:["12","14"]},{label:"\u64CD\u4F5C\u6570\u91CF",prop:"relaGoodNum",minWidth:"100px",required:!0,defaultData:["6","6"]}],Nu=new Array(3).fill(1).map((r,e)=>E.slice(1).reduce((i,o)=>{const C=e===0;let d="";return C?d=o.required?"\u5FC5\u586B":"":d=o.defaultData[e-1],{...i,[o.label]:d}},{})),mu=E.reduce((r,e)=>({...r,[e.label]:e.prop}),{}),R=E.reduce((r,e)=>({...r,[e.prop]:e.label}),{}),Eu=E.filter(r=>!!r.required).map(r=>r.prop);function Cu(r){X({type:"warning",title:"\u6570\u636E\u6821\u9A8C\u5931\u8D25",message:M("div",{style:"display: flex, flex-direction: column"},{default:()=>Object.keys(r).reduce((e,i)=>[...e,M("p",{},"\u7B2C"+i+"\u884C,"+r[i])],[])})})}function Fu(r){const e={};let i=!1,o=!1,C=!1,d=!1,b=!1,s=!1;for(const h in r){const f=r[h],a=Number(h)+1;for(const u in f){const p=String(f[u]).trim();Eu.includes(u)&&(!p||!String(p).trim())?e[a]?e[a]=e[a]+="\u3001"+R[u]:e[a]=R[u]:u==="type"&&!V[p]?i=!0:u==="source"&&!U[p]?o=!0:u==="inv_type"&&!z[p]?C=!0:u==="tax_diff"&&!I[p]?d=!0:u==="cat_diff"&&!I[p]?b=!0:u==="goodType"&&!ou[p]&&(s=!0)}e[a]?(e[a]+="\u4E0D\u80FD\u4E3A\u7A7A",i&&(e[a]+=" , \u7C7B\u578B\u5FC5\u987B\u4E3A"+J.map(({label:u})=>u).join("\u3001")),o&&(e[a]+=" ,\u8BA2\u5355\u6765\u6E90\u5FC5\u987B\u4E3A"+L.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")),s&&(e[a]+=" ,\u5546\u54C1\u7C7B\u578B\u5FC5\u987B\u4E3A"+A.map(({label:u})=>u).join("\u3001"))):(i&&(e[a]="\u7C7B\u578B\u5FC5\u987B\u4E3A"+J.map(({label:u})=>u).join("\u3001")),o&&(e[a]=" \u8BA2\u5355\u6765\u6E90\u5FC5\u987B\u4E3A"+L.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")),s&&(e[a]=" \u5546\u54C1\u7C7B\u578B\u5FC5\u987B\u4E3A"+nu.map(({label:u})=>u).join("\u3001")))}return Object.keys(e).length===0?!0:(Cu(e),!1)}function Du(r){return!!Fu(r)}const cu={key:0},Bu={key:1},bu={key:1,flex:"","justify-end":"","gap-2":"",style:{padding:"10px 0 0 0"}},vu=Q({__name:"index",props:{visible:{type:Boolean,required:!0}},emits:["refresh"],setup(r,{emit:e}){const i=q(!1),o=q([]),C=e,d=r,{getCurrentLicense:b}=$(),s=Y(d,"visible"),h=Z(),f=q({visible:!1,list:[]}),a=q({visible:!1,importColumns:[],columns:[]}),u=({results:F,header:l})=>{if(i.value=!0,F.length===0){N.error("\u8868\u683C\u65E0\u6709\u6548\u6570\u636E\uFF01"),i.value=!1;return}let D=!0;if(l.length!==E.length-1?D=!1:E.slice(1).forEach((m,W)=>{m.label!==l[W]&&(D=!1)}),!D){a.value.visible=!0,a.value.importColumns=[...l],a.value.columns=E.slice(1).map(({label:m})=>m),i.value=!1;return}o.value=[];const n=[];for(const m of F){const W={};Object.keys(m).forEach(T=>{const P=mu[T];let c=m[T];T==="\u53D1\u7968\u7C7B\u578B"&&(c=c.replace("(","\uFF08"),c=c.replace(")","\uFF09")),W[P]=c&&String(c).trim()}),n.push(W)}const t=b(),y=[...new Set(n.map(({inv_seller_code:m})=>m))];if(y.length!==1){N.warning("\u5BFC\u5165\u6570\u636E\u7684\u9500\u552E\u65B9\u516C\u53F8\u5FC5\u987B\u4E00\u81F4");return}if(y[0]!==t){N.warning("\u5BFC\u5165\u6570\u636E\u9500\u552E\u65B9\u516C\u53F8\u4E0E\u5F53\u524D\u9009\u62E9\u516C\u53F8\u4E0D\u4E00\u81F4");return}Du(n)&&(o.value=n),i.value=!1},p=async()=>{try{if(i.value)return;i.value=!0;const F=[];o.value.forEach(t=>{F.push({...t,inv_type:z[t.inv_type],source:U[t.source],type:V[t.type],goodType:du[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:D,data:n}=await iu({list:F});if(i.value=!1,l==1004&&!n){f.value.visible=!0,f.value.list=n;return}h({code:l,message:D,noMessage:!1,handler:()=>{N.success("\u6570\u636E\u5BFC\u5165\u6210\u529F\uFF01"),C("refresh"),s.value=!1}})}catch{}},H=()=>{o.value=[]};return(F,l)=>{const D=S("el-table-column"),n=S("el-table");return B(),j(v(lu),{modelValue:v(s),"onUpdate:modelValue":l[2]||(l[2]=t=>au(s)?s.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(ru),{key:0,style:{"margin-bottom":"10px"},onOnSuccess:u})):w("v-if",!0),_(n,{data:o.value,stripe:"",border:"","max-height":"500px",size:"small",style:{width:"100%"}},{default:x(()=>[(B(!0),g(uu,null,eu(v(E),(t,y)=>(B(),j(D,{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(" "+G(t.label),1)])):(B(),g("span",cu,G(t.label),1))]),_:2},1032,["minWidth","fixed","prop","type"]))),128))]),_:1},8,["data"]),o.value.length!==0?(B(),g("div",bu,[_(v(O),{size:"small",onClick:H},{default:x(()=>l[5]||(l[5]=[k("\u53D6\u6D88")])),_:1}),_(v(O),{size:"small",type:"primary",loading:i.value,onClick:p},{default:x(()=>l[6]||(l[6]=[k("\u4FDD\u5B58")])),_:1},8,["loading"])])):w("v-if",!0),_(su,{visible:f.value.visible,"onUpdate:visible":l[0]||(l[0]=t=>f.value.visible=t),list:f.value.list,title:"\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7"},null,8,["visible","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/outManager/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};
|