1 |
- import{a7 as s,bq as n,_ as x,d as D,bs as k,j as P,m as S,r as h,o as g,A as E,x as B,h as i,a as O,f as T,H as z,ac as R,bt as V,az as p}from"./index.js";import{u as M}from"./use-page-search.dfa27a70.js";import{a as I}from"./index.3a2f6f6a.js";import{t as N}from"./shared.129caa24.js";import{u as q,c as L}from"./status.b7512d56.js";import{r as f}from"./columnRenderHelper.8411add2.js";import{b as j}from"./columns.74c15f1e.js";import"./tootip.c6ca5db9.js";const v=[{value:"1",label:"\u5F85\u5904\u7406",type:"warning"},{value:"2",label:"\u6B63\u5E38",type:"success"},{value:"3",label:"\u8BA1\u63D0",type:"success"},{value:"4",label:"\u5F02\u5E38",type:"danger"}],H=[{width:40,type:"selection",fixed:"left"},{label:"\u786E\u8BA4\u5355\u7F16\u53F7",prop:"orderCode",width:150},{label:"\u9500\u552E\u4E3B\u5355\u53F7",prop:"cxCode",width:150},{label:"\u4E1A\u52A1\u7C7B\u578B",prop:"type",width:80,cellRenderer({row:t}){return s(n,{size:"small"},{default:()=>{var u;return((u=N.find(e=>e.value==t.type))==null?void 0:u.label)||"--"}})}},{label:"\u72B6\u6001",width:90,cellRenderer({row:t}){var u;return s(n,{size:"small",type:((u=v.find(e=>e.value==t.status))==null?void 0:u.type)||"warning"},{default:()=>{var e;return((e=v.find(d=>d.value==t.status))==null?void 0:e.label)||"--"}})}},{label:"\u5F02\u5E38\u539F\u56E0",width:120,prop:"error_remark"},{label:"\u5E73\u53F0\u8BA2\u5355\u53F7",prop:"poCode",width:100},{label:"\u5E73\u53F0\u7C7B\u578B",width:80,cellRenderer({row:t}){return s(n,{size:"small"},{default:()=>{var u;return((u=q.find(e=>e.value==t.platform_type))==null?void 0:u.label)||"--"}})}},{label:"\u5356\u51FA\u65B9\u516C\u53F8",width:160,...f("seller_code","seller_name","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u53F7\uFF1A")},{label:"\u5BA2\u6237\u516C\u53F8",width:160,...f("buyer_code","buyer_name","\u5BA2\u6237\u516C\u53F8\u7F16\u53F7:")},{label:"\u5546\u54C1\u540D\u79F0",width:160,...f("goodNo","goodName","\u5546\u54C1\u7F16\u53F7:")},{label:"\u5546\u54C1\u7C7B\u578B",width:95,cellRenderer({row:t}){return s(n,{size:"small"},{default:()=>{var u;return((u=L.find(e=>e.value==t.goodType))==null?void 0:u.label)||"--"}})}},{label:"\u5546\u54C1\u6765\u6E90",width:95,cellRenderer({row:t}){return s(n,{size:"small"},{default:()=>{var u;return((u=j.find(e=>e.value==t.source))==null?void 0:u.label)||"--"}})}},{label:"\u6570\u91CF",prop:"balance_num",width:100},{label:"\u9500\u552E\u5355\u4EF7",prop:"goodPrice",width:100},{label:"\u9500\u552E\u5408\u8BA1",prop:"totalPrice",width:100},{label:"\u51FA\u5E93\u65F6\u95F4",prop:"fz_date",width:100},{label:"\u64CD\u4F5C",fixed:"right",width:50,slot:"operation"}],U={columns:H,permissions:["007"],companyProp:"seller_code",apis:{httpList:(t={})=>I({...t,channel:[3],status:"1,4"}),httpAdd:!0}},y={formItems:[{field:"timer",type:"date_picker",span:7,label:"\u521B\u5EFA\u65F6\u95F4",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"}}]},G=D({__name:"index",props:{visible:{type:Boolean,required:!0},goodType:{type:String,required:!1},source:{type:String,required:!1}},emits:["submit"],setup(t,{emit:u}){const e=t,d=u,r=k(e,"visible"),C=P(),w={pageSearchHook:()=>M(void 0,void 0,y)},l=S([]),_={content:{preview:({id:c})=>C.push("/invoiceInOut/productManagerDetail?id="+c),create:()=>C.push("/invoiceInOut/productManagerDetail")}};function A(){if(l.value.length===0){p.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u8BA2\u5355");return}if([...new Set(l.value.map(({goodNo:o})=>o))].length!==1){p.warning("\u9009\u62E9\u7684\u8BA2\u5355\u7684\u5546\u54C1\u7F16\u53F7\u5FC5\u987B\u4E00\u81F4");return}const a=[...new Set(l.value.map(({goodType:o})=>o))],m=[...new Set(l.value.map(({source:o})=>o))];if(a.length!==1||m.length!==1){p.warning("\u9009\u62E9\u8BA2\u5355\u7684\u5546\u54C1\u7C7B\u578B\u548C\u5546\u54C1\u6765\u6E90\u5FC5\u987B\u4E00\u81F4");return}if(e.goodType){l.value.some(o=>o.goodType!==e.goodType||o.source!==e.source),p.warning("\u9009\u62E9\u7684\u8BA2\u5355\u5546\u54C1\u7C7B\u578B\u548C\u5546\u54C1\u6765\u6E90\u4E0E\u5DF2\u9009\u62E9\u7684\u8BA2\u5355\u4E0D\u4E00\u81F4");return}r.value=!1,d("submit",l.value)}return(c,a)=>{const m=h("PageContainer"),o=h("ElButton");return g(),E(i(V),{class:"relative",modelValue:i(r),"onUpdate:modelValue":a[1]||(a[1]=F=>R(r)?r.value=F:null),title:"\u9009\u62E9C\u7AEF\u65E0\u53D1\u7968\u8BA2\u5355",center:"",top:"10px"},{default:B(()=>[i(r)?(g(),E(m,{key:0,hooks:w,events:_,searchConfig:i(y),contentConfig:i(U),isPageStart:!0,onContentSelectChange:a[0]||(a[0]=F=>l.value=F.map(b=>({...b,child_num:"1",child_id:b.id})))},null,8,["searchConfig","contentConfig"])):O("v-if",!0),T(o,{class:"absolute bottom-[30px] right-[20px]",type:"primary",onClick:A},{default:B(()=>a[2]||(a[2]=[z("\u4FDD\u5B58 ")])),_:1})]),_:1},8,["modelValue"])}}});var ee=x(G,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/clientC/components/ChooseOrderModal/index.vue"]]);export{ee as default};
|