import{d as E,e as t,n as h,D as V,p as $,C as G,A as d,B as v,c as j,f as o,w as n,a as r,y as q,E as H,r as _,o as K,g as b,t as u,G as M,H as U,_ as J}from"./index-deud-udu.js";const O=p=>(M("data-v-5f8f70c7"),p=p(),U(),p),Q={class:"p-4 bg-white"},W=O(()=>r("div",{class:"text-center my-4"},null,-1)),X={class:"flex justify-center mt-4"},Y=E({__name:"check",setup(p){t(""),t(!1),t([]),t("");const k=q(),x=H(),L=t("basic-info"),T=t(x.params.id),a=h({out_warehouse_id:"",in_warehouse_id:"",product_list:[],send_type:"",remark:"",transfer_time:""}),A=t(),I=h({type:[{required:!0,message:"Please select Activity count",trigger:"change"}]});h({bar_code:"",sn_code:""}),t(null),t(null);const C=t([]),f=t([]),S=t([]),B=t([]),P=t([]);t(-1),t("");const c=t(""),g=t([]);V(L,(e,s)=>{console.log(`Tab changed from ${s} to ${e}`)}),$(async()=>{await N(),D()});const y=()=>{k.push({name:"allocation"})},D=async()=>{try{const e=await G.getstockTransfer(T.value);a.out_warehouse_id=e.data.out_warehouse_id,a.in_warehouse_id=e.data.in_warehouse_id,a.send_type=e.data.send_type,a.remark=e.data.remark,a.transfer_time=e.data.transfer_time,a.product_list=e.data.product_list,console.log(a)}catch(e){console.error("Failed to fetch order details:",e)}},w=e=>{if(e&&f.value){const s=f.value.find(l=>l.id===e);return s?s.name:""}},F=e=>{if(e&&c.value&&c.value.data&&c.value.data.data){const s=c.value.data.data.find(l=>l.id===e);return s?s.name:"未知类型"}},N=async()=>{const e=await d.warehouseList({});f.value=e.data,C.value=await d.customer({}),g.value=await d.getAdmin({page_no:1,page_size:9999,user_state:0}),console.log(g),S.value=await d.collectingAccount({});const s=await v.getPage({dictType:"inventory_type"});B.value=s.data.data,P.value=await v.getPage({dictType:"Sale_order_send_status"}),c.value=await d.getExpressList({page_no:1,page_size:9999})};return(e,s)=>{const l=_("el-button"),i=_("el-form-item"),m=_("el-table-column"),R=_("el-table"),z=_("el-form");return K(),j("div",Q,[o(l,{type:"text",onClick:y},{default:n(()=>[b("返回")]),_:1}),W,o(z,{model:a,ref_key:"ruleFormRef",ref:A,rules:I,"label-width":"auto",style:{"max-width":"600px"}},{default:n(()=>[o(i,{prop:"inventory_time",label:"调拨时间:",class:"change-form-item"},{default:n(()=>[r("span",null,u(a.transfer_time),1)]),_:1}),o(i,{prop:"out_warehouse_id",label:"调出仓库:",class:"change-form-item"},{default:n(()=>[r("span",null,u(w(a.out_warehouse_id)),1)]),_:1}),o(i,{label:"调入仓库:",prop:"in_warehouse_id",class:"change-form-item"},{default:n(()=>[r("span",null,u(w(a.in_warehouse_id)),1)]),_:1}),o(i,{label:"配送方式:",prop:"creator_id",class:"change-form-item"},{default:n(()=>[r("span",null,u(F(a.send_type)),1)]),_:1}),o(i,{label:"备注:",prop:"remark",class:"change-form-item"},{default:n(()=>[r("span",null,u(a.remark),1)]),_:1}),o(R,{data:a.product_list,style:{width:"100%"}},{default:n(()=>[o(m,{prop:"goods_vo.name",label:"商品名称"}),o(m,{prop:"product_vo.sku",label:"SKU"}),o(m,{prop:"use_able_num",label:"库存数量"}),o(m,{prop:"num",label:"调拨数量"})]),_:1},8,["data"])]),_:1},8,["model","rules"]),r("div",X,[o(l,{type:"primary",size:"large",onClick:s[0]||(s[0]=Z=>y())},{default:n(()=>[b("返回")]),_:1})])])}}}),te=J(Y,[["__scopeId","data-v-5f8f70c7"]]);export{te as default};
