import{w as W,G as L,b as A,H as I,C as N,D as S,F as T,L as j}from"./element-plus.8e273e86.js";import{_ as $}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{u as O}from"./usePaging.f8c888e4.js";import{a as q,b as G}from"./warehouse_product_return.66155022.js";import{j as H}from"./beforehand_order.9a0d8fd3.js";import{d as E,r as C,Z as K,ap as M,o as c,c as Q,a as b,U as e,L as t,R as p,M as Z,K as w,u,j as h,Q as z,T as J}from"./@vue.76ce7aa3.js";const X={class:"flex mt-4 justify-end"},Y={class:"dialog-footer"},ee=E({name:"subOrder"}),me=E({...ee,setup(oe,{expose:F}){const s=C(!1),a=C({id:"",nums:"",store_name:"",financial_pm:0,return_type:2,bhoid:"",mark:""}),d=K({bhoid:"",return_type:1}),g=r=>{s.value=!0,a.value.id=r.id,a.value.bhoid=d.bhoid,a.value.store_name=r.store_name,a.value.nums=r.nums},k=r=>{s.value=!1,q(a.value).then(o=>{})},V=()=>{H({id:d.bhoid}).then(r=>{r.url!=""&&window.open(r.url,"_blank")})},{pager:i,getLists:v,resetParams:le,resetPage:te}=O({fetchFun:G,params:d});function y(r){d.bhoid=r.id,v()}return F({getList:y}),(r,o)=>{const m=W,n=L,B=A,D=I,x=$,_=N,f=S,P=T,R=j,U=M("perms");return c(),Q(J,null,[b("div",null,[e(m,{type:"primary",onClick:V},{default:t(()=>o[6]||(o[6]=[p(" \u5BFC\u51FA\u9000\u5E93\u5355 ")])),_:1}),e(D,{data:u(i).lists,border:"",style:{width:"100%","margin-top":"10px"}},{default:t(()=>[e(n,{prop:"id",label:"ID",width:"60"}),e(n,{label:"\u5546\u54C1\u56FE\u7247",prop:"image",width:"120"},{default:t(({row:l})=>[e(B,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),e(n,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),e(n,{label:"\u9000\u5E93\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),e(n,{label:"\u9000\u5E93\u4EF7",prop:"price","show-overflow-tooltip":""}),e(n,{label:"\u9000\u5E93\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""}),e(n,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),e(n,{label:"\u64CD\u4F5C",fixed:"right"},{default:t(({row:l})=>[Z((c(),w(m,{type:"primary",link:"",onClick:ae=>g(l)},{default:t(()=>o[7]||(o[7]=[p("\u9000\u4F9B\u5E94\u5546")])),_:2},1032,["onClick"])),[[U,["beforehand_order.beforehand_order/returnSupplierClick"]]])]),_:1})]),_:1},8,["data"]),b("div",X,[u(i).lists?(c(),w(x,{key:0,modelValue:u(i),"onUpdate:modelValue":o[0]||(o[0]=l=>h(i)?i.value=l:null),onChange:u(v)},null,8,["modelValue","onChange"])):z("",!0)])]),e(R,{modelValue:u(s),"onUpdate:modelValue":o[5]||(o[5]=l=>h(s)?s.value=l:null),title:"\u9000\u8D27\u8BBE\u7F6E",width:"600"},{footer:t(()=>[b("div",Y,[e(m,{onClick:o[4]||(o[4]=l=>s.value=!1)},{default:t(()=>o[8]||(o[8]=[p("\u53D6\u6D88")])),_:1}),e(m,{type:"primary",onClick:k},{default:t(()=>o[9]||(o[9]=[p(" \u786E\u8BA4 ")])),_:1})])]),default:t(()=>[e(P,{model:u(a),"label-width":"90px"},{default:t(()=>[e(f,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(_,{modelValue:u(a).store_name,"onUpdate:modelValue":o[1]||(o[1]=l=>u(a).store_name=l),clearable:"",readonly:!1,disabled:""},null,8,["modelValue"])]),_:1}),e(f,{label:"\u6570\u91CF",prop:"nums"},{default:t(()=>[e(_,{modelValue:u(a).nums,"onUpdate:modelValue":o[2]||(o[2]=l=>u(a).nums=l),clearable:"",readonly:!1,placeholder:"\u8BF7\u8F93\u5165\u6570\u91CF"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u5907\u6CE8",prop:"mark"},{default:t(()=>[e(_,{modelValue:u(a).mark,"onUpdate:modelValue":o[3]||(o[3]=l=>u(a).mark=l),clearable:"",readonly:!1,placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])],64)}}});export{me as _};
