1 |
- import{b3 as H,ac as T,_ as $,d as J,w as k,U as K,a_ as Q,b4 as X,r as O,o as f,G as g,C as x,l as b,a as w,j,c as W,F as Y,D as Z,L,h as uu,M as N,aR as I,ah as eu,a$ as au,az as _}from"./index.js";import{e as tu}from"./execl-upload.615bf98a.js";import{b as z,c as P,d as M,t as S,s as V,e as m}from"./shared.cf063854.js";import{a as ru}from"./index.ac9c33da.js";import{m as U,b as lu,x as iu,d as ou}from"./status.0f771e9a.js";const c=[{type:"index",fixed:"left",label:"\u5E8F\u53F7",width:"50"},{label:"\u4E1A\u52A1\u7F16\u53F7",prop:"invoiceCode",minWidth:"100px",defaultData:"",required:!0},{label:"\u7C7B\u578B",prop:"type",minWidth:"100px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u6765\u6E90",prop:"source",minWidth:"100px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u8D2D\u4E70\u65B9\u7EB3\u7A0E\u53F7",prop:"buyer_code",minWidth:"130px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u8D2D\u4E70\u65B9\u516C\u53F8\u540D\u79F0",prop:"buyer_name",minWidth:"150px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u53F7",prop:"seller_code",minWidth:"160px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u9500\u552E\u65B9\u516C\u53F8\u540D\u79F0",prop:"seller_name",minWidth:"160px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u7F16\u53F7",prop:"orderCode",minWidth:"120px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u4E3B\u5355\u53F7",prop:"cxCode",minWidth:"120px",defaultData:""},{label:"\u5546\u54C1\u7C7B\u578B",prop:"goodType",minWidth:"120px",defaultData:"",required:!0},{label:"\u5546\u54C1\u7F16\u53F7",prop:"goodNo",minWidth:"100px",defaultData:"",required:!0},{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName",minWidth:"100px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u5355\u4F4D",prop:"unit",minWidth:"80px",defaultData:"",required:!0},{label:"\u5546\u54C1\u6570\u91CF",prop:"num",minWidth:"110px",defaultData:"",required:!0},{label:"\u5546\u54C1\u5355\u4EF7",prop:"goodPrice",minWidth:"110px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u603B\u91D1\u989D",prop:"totalPrice",minWidth:"110px",defaultData:"",required:!0},{label:"\u7A0E\u76EE",prop:"cat_code",minWidth:"80px",defaultData:"",required:!0},{label:"\u7A0E\u76EE\u540D\u79F0",prop:"cat_name",minWidth:"100px",defaultData:"",required:!0},{label:"\u8BA2\u5355\u7A0E\u7387",prop:"tax",minWidth:"100px",defaultData:"",required:!0},{label:"\u5173\u8054\u91D1\u989D",prop:"inv_fee",minWidth:"100px",defaultData:"",required:!0},{label:"\u8D2D\u4E70\u65B9\u7EB3\u7A0E\u53F7",prop:"inv_buyer_code",minWidth:"130px",defaultData:"",required:!0},{label:"\u8D2D\u4E70\u65B9\u540D\u79F0",prop:"inv_buyer_name",minWidth:"170px",defaultData:"",required:!0},{label:"\u53D1\u7968\u53F7\u7801",prop:"inv_number",minWidth:"100px",defaultData:"",required:!0},{label:"\u5F00\u7968\u65E5\u671F",prop:"inv_open_date",minWidth:"100px",defaultData:"",required:!0},{label:"\u53D1\u7968\u7C7B\u578B",prop:"inv_type",minWidth:"100px",defaultData:"",required:!0},{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",defaultData:"",required:!0},{label:"\u9500\u552E\u65B9\u516C\u53F8",prop:"inv_seller_name",minWidth:"130px",defaultData:"",required:!0},{label:"\u53D1\u7968\u660E\u7EC6ID",prop:"inv_item_id",minWidth:"110px",defaultData:""},{label:"\u8D27\u7269\u6216\u5E94\u7A0E\u52B3\u52A1\u3001\u670D\u52A1\u540D\u79F0",prop:"inv_good_name",minWidth:"200px",defaultData:"",required:!0},{label:"\u7C7B\u76EE\u7F16\u53F7",prop:"inv_cat_code",minWidth:"90px",defaultData:"",required:!0},{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:""},{label:"\u6570\u91CF",prop:"inv_num",minWidth:"100px",defaultData:"",required:!0},{label:"\u7A0E\u524D\u5355\u4EF7",prop:"inv_subprice",minWidth:"100px",defaultData:"",required:!0},{label:"\u7A0E\u524D\u603B\u4EF7",prop:"inv_subtotal",minWidth:"100px",defaultData:"",required:!0},{label:"\u7A0E\u7387",prop:"inv_tax",minWidth:"80px",defaultData:"",required:!0},{label:"\u7A0E\u989D",prop:"inv_tax_total",minWidth:"80px",defaultData:"",required:!0},{label:"\u7A0E\u540E\u5355\u4EF7",prop:"inv_price",minWidth:"100px",defaultData:"",required:!0},{label:"\u7A0E\u540E\u603B\u989D",prop:"inv_total",minWidth:"100px",defaultData:"",required:!0},{label:"\u7C7B\u76EE\u7F16\u53F7\u72B6\u6001",prop:"cat_diff",minWidth:"100px",defaultData:"",required:!0},{label:"\u7A0E\u7387\u72B6\u6001",prop:"tax_diff",minWidth:"100px",defaultData:"",required:!0},{label:"\u5907\u6CE8",prop:"remark",minWidth:"80px",defaultData:""},{label:"\u5173\u8054\u5546\u54C1ID",prop:"relaGoodNo",minWidth:"120px",defaultData:"",required:!0},{label:"\u64CD\u4F5C\u6570\u91CF",prop:"relaGoodNum",minWidth:"100px",defaultData:"",required:!0},{label:"\u5B50\u5546\u54C1\u7F16\u53F7",prop:"childCode",minWidth:"100px",defaultData:""},{label:"\u5B50\u5546\u54C1\u64CD\u4F5C\u6570\u91CF",prop:"childNum",minWidth:"120px",defaultData:""}],hu=[c.slice(1).reduce((r,e)=>({...r,[e.label]:e.defaultData?e.defaultData:""}),{})],pu=c.reduce((r,e)=>({...r,[e.label]:e.prop}),{}),G=c.reduce((r,e)=>({...r,[e.prop]:e.label}),{}),nu=c.filter(r=>!!r.required).map(r=>r.prop);function du(r){H({type:"warning",title:"\u6570\u636E\u6821\u9A8C\u5931\u8D25",message:T("div",{style:"display: flex, flex-direction: column"},{default:()=>Object.keys(r).reduce((e,i)=>[...e,T("p",{},"\u7B2C"+i+"\u884C,"+r[i])],[])})})}function su(r){const e={};let i=!1,p=!1,F=!1,C=!1,D=!1,n=!1;for(const h in r){const v=r[h],t=Number(h)+1;for(const u in v){const l=String(v[u]).trim();nu.includes(u)&&(!l||!String(l).trim())?e[t]?e[t]=e[t]+="\u3001"+G[u]:e[t]=G[u]:u==="type"&&!z[l]?i=!0:u==="source"&&!P[l]?p=!0:u==="inv_type"&&!U[l]?F=!0:u==="tax_diff"&&!M[l]?C=!0:u==="cat_diff"&&!M[l]?D=!0:u==="goodType"&&lu[l]&&(n=!1)}e[t]?(e[t]+="\u4E0D\u80FD\u4E3A\u7A7A",i&&(e[t]+=" , \u7C7B\u578B\u5FC5\u987B\u4E3A"+S.map(({label:u})=>u).join("\u3001")),p&&(e[t]+=" ,\u8BA2\u5355\u6765\u6E90\u5FC5\u987B\u4E3A"+V.map(({label:u})=>u).join("\u3001")),F&&(e[t]+=" ,\u53D1\u7968\u7C7B\u578B\u5FC5\u987B\u4E3A"+iu.map(({label:u})=>u).join("\u3001")),C&&(e[t]+=" ,\u7C7B\u76EE\u7F16\u53F7\u72B6\u6001\u5FC5\u987B\u4E3A"+m.map(({label:u})=>u).join("\u3001")),D&&(e[t]+=" ,\u7A0E\u7387\u72B6\u6001\u5FC5\u987B\u4E3A"+m.map(({label:u})=>u).join("\u3001")),D&&(e[t]+=" ,\u7A0E\u7387\u72B6\u6001"+m.map(({label:u})=>u).join("\u3001")),n&&(e[t]+=" ,\u5546\u54C1\u7C7B\u578B\u5FC5\u987B\u4E3A"+m.map(({label:u})=>u).join("\u3001"))):(i&&(e[t]="\u7C7B\u578B\u5FC5\u987B\u4E3A"+S.map(({label:u})=>u).join("\u3001")),p&&(e[t]=" \u8BA2\u5355\u6765\u6E90\u5FC5\u987B\u4E3A"+V.map(({label:u})=>u).join("\u3001")),F&&(e[t]=" \u7C7B\u76EE\u7F16\u53F7\u72B6\u6001\u5FC5\u987B\u4E3A"+m.map(({label:u})=>u).join("\u3001")),D&&(e[t]=" \u7A0E\u7387\u72B6\u6001\u5FC5\u987B\u4E3A"+m.map(({label:u})=>u).join("\u3001")),n&&(e[t]=" \u5546\u54C1\u7C7B\u578B\u5FC5\u987B\u4E3A"+m.map(({label:u})=>u).join("\u3001")))}return Object.keys(e).length===0?!0:(du(e),!1)}function fu(r){return!!su(r)}const mu={key:0},cu={key:1},Du={key:1,flex:"","justify-end":"","gap-2":"",style:{padding:"10px 0 0 0"}},Eu=J({__name:"index",props:{visible:{type:Boolean,required:!0}},emits:["refresh"],setup(r,{emit:e}){const i=k(!1),p=k([]),F=e,C=r,{getCurrentLicense:D}=K(),n=Q(C,"visible"),h=X(),v=({results:l,header:o})=>{if(i.value=!0,l.length===0){_.error("\u8868\u683C\u65E0\u6709\u6548\u6570\u636E\uFF01"),i.value=!1;return}let d=!0;if(o.length!==c.length-1?d=!1:c.slice(1).forEach((E,A)=>{E.label!==o[A]&&(d=!1)}),!d){_.error("\u8868\u5934\u4E0E\u5BFC\u5165\u6A21\u677F\u4E0D\u5339\u914D\uFF01"),i.value=!1;return}p.value=[];const s=[];for(const E of l){const A={};Object.keys(E).forEach(q=>{const R=pu[q];let B=E[q];q==="\u53D1\u7968\u7C7B\u578B"&&(B=B.replace("(","\uFF08"),B=B.replace(")","\uFF09")),A[R]=B}),s.push(A)}const a=D(),y=[...new Set(s.map(({inv_seller_code:E})=>E))];if(y.length!==1){_.warning("\u5BFC\u5165\u6570\u636E\u7684\u9500\u552E\u65B9\u516C\u53F8\u5FC5\u987B\u4E00\u81F4");return}if(y[0]!==a){_.warning("\u5BFC\u5165\u6570\u636E\u9500\u552E\u65B9\u516C\u53F8\u4E0E\u5F53\u524D\u9009\u62E9\u516C\u53F8\u4E0D\u4E00\u81F4");return}fu(s)&&(p.value=s),i.value=!1},t=async()=>{try{if(i.value)return;i.value=!0;const l=[];p.value.forEach(a=>{l.push({...a,inv_type:U[a.inv_type],source:P[a.source],type:z[a.type],goodType:ou[a.goodType],inv_num:Number(a.inv_num).toFixed(8),inv_subprice:Number(a.inv_subprice).toFixed(8),inv_subtotal:Number(a.inv_subtotal).toFixed(8),inv_price:Number(a.inv_price).toFixed(8),inv_total:Number(a.inv_tax_total).toFixed(8),platform_type:"1",channel:"2",relaArr:[{id:a.relaGoodNo,num:a.relaGoodNum}]})});const{code:o,message:d,data:s}=await ru({list:l});i.value=!1,h({code:o,message:d,noMessage:!1,handler:()=>{_.success("\u6570\u636E\u5BFC\u5165\u6210\u529F\uFF01"),F("refresh"),n.value=!1}})}catch{}},u=()=>{p.value=[]};return(l,o)=>{const d=O("el-table-column"),s=O("el-table");return f(),g(b(au),{modelValue:b(n),"onUpdate:modelValue":o[0]||(o[0]=a=>eu(n)?n.value=a:null),"close-on-click-modal":!1,title:"\u975E\u8BA2\u5355\u5546\u54C1\u5BFC\u5165",width:"1040px",top:"8vh",center:"",onClose:o[1]||(o[1]=a=>p.value=[])},{default:x(()=>[p.value.length===0?(f(),g(b(tu),{key:0,style:{"margin-bottom":"10px"},onOnSuccess:v})):w("v-if",!0),j(s,{data:p.value,stripe:"",border:"","max-height":"500px",size:"small",style:{width:"100%"}},{default:x(()=>[(f(!0),W(Y,null,Z(b(c),(a,y)=>(f(),g(d,{minWidth:a.minWidth,"show-overflow-tooltip":"",fixed:a.fixed,prop:a.prop,type:a.type,key:y},{header:x(()=>[a.required?(f(),W("p",cu,[o[2]||(o[2]=uu("span",{style:{color:"#f56c6c","font-size":"14px"}},"* ",-1)),N(" "+L(a.label),1)])):(f(),W("span",mu,L(a.label),1))]),_:2},1032,["minWidth","fixed","prop","type"]))),128))]),_:1},8,["data"]),p.value.length!==0?(f(),W("div",Du,[j(b(I),{size:"small",onClick:u},{default:x(()=>o[3]||(o[3]=[N("\u53D6\u6D88")])),_:1}),j(b(I),{size:"small",type:"primary",loading:i.value,onClick:t},{default:x(()=>o[4]||(o[4]=[N("\u4FDD\u5B58")])),_:1},8,["loading"])])):w("v-if",!0)]),_:1},8,["modelValue"])}}});var bu=$(Eu,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/outManager/components/NotOrderImportModal/index.vue"]]),vu=Object.freeze(Object.defineProperty({__proto__:null,default:bu},Symbol.toStringTag,{value:"Module"}));export{bu as N,vu as i,hu as n};
|