import{_ as j}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{C as q,D as A,w as R,F as S,G,b as H,H as K}from"./element-plus.8e273e86.js";import{_ as M}from"./index.vue_vue_type_script_setup_true_lang.bb2b92ec.js";import{u as Q}from"./usePaging.f8c888e4.js";import{a as g,b as Z}from"./purchase_product_offer.ba98288a.js";import{f as J}from"./index.a39f73a6.js";import{a as X}from"./warehouse.ed0b9ba0.js";import{u as Y}from"./useDictOptions.19d08143.js";import{d as C,r as s,Z as ee,ap as oe,o as p,c as te,U as e,L as a,u as r,R as _,M as v,K as c,a as re,j as ae,Q as se}from"./@vue.76ce7aa3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.1c24829c.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./lodash.41b9567d.js";import"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";const le={class:"flex mt-4 justify-end"},ie=C({name:"subOrder"}),Xe=C({...ie,setup(ue,{expose:k}){const m=s({id:0}),F=s(!1),y=s([]),D=s(!1),E=s({bhoid:m.value.id,warehouse_id:"",remark:""}),x=s({id:"",bhoid:m.value.id,supplier_id:"",purchase:0,outbound_price:0,total_price:0,buyer_nums:0,package:"",store_info:"",marques:"",after_sales:"",pay_type:1}),f=s({id:"",store_name:"",nums:""}),B=o=>{D.value=!0,f.value.id=o.id,f.value.store_name=o.store_name,f.value.nums=o.nums},V=()=>{F.value=!0,X({}).then(o=>{y.value=o.lists})},u=ee({order_id:m.value.id,store_name:"",is_adopt:"",is_mer:1});s(!1),s([]);const{pager:n,getLists:h,resetParams:ne,resetPage:P}=Q({fetchFun:g,params:u});Y("outbound_floating");function L(o){m.value.id=o,E.value.bhoid=o,x.value.bhoid=o,u.order_id=o,h()}const N=async o=>{await J.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Z({id:o}),h()};return k({getList:L}),(o,t)=>{const I=q,w=A,d=R,O=M,W=S,l=G,$=H,z=K,T=j,b=oe("perms");return p(),te("div",null,[e(W,{class:"inline-block",model:r(u),inline:""},{default:a(()=>[e(w,{label:"\u540D\u79F0",prop:"store_name"},{default:a(()=>[e(I,{class:"w-[280px]",modelValue:r(u).store_name,"onUpdate:modelValue":t[0]||(t[0]=i=>r(u).store_name=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(w,null,{default:a(()=>[e(d,{type:"primary",onClick:r(P)},{default:a(()=>t[2]||(t[2]=[_("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(O,{class:"ml-2.5","fetch-fun":r(g),params:r(u),"page-size":r(n).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"]),v((p(),c(d,{type:"primary",onClick:V,class:"mb-4"},{default:a(()=>t[3]||(t[3]=[_(" \u4E00\u952E\u62A5\u635F ")])),_:1})),[[b,["beforehand_order.beforehand_order/oneClickStorage"]]]),e(z,{data:r(n).lists,border:"",style:{width:"100%","margin-top":"10px"}},{default:a(()=>[e(l,{prop:"id",label:"ID",width:"60"}),e(l,{label:"\u5546\u54C1\u56FE\u7247",prop:"image",width:"120"},{default:a(({row:i})=>[e($,{style:{width:"50px",height:"50px"},src:i.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(l,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),e(l,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),e(l,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),e(l,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),e(l,{label:"\u539F\u56E0",prop:"mark","show-overflow-tooltip":""}),e(l,{label:"\u64CD\u4F5C",fixed:"right",width:"180"},{default:a(({row:i})=>[v((p(),c(d,{type:"primary",link:"",onClick:U=>B(i)},{default:a(()=>t[4]||(t[4]=[_("\u91CD\u7F6E\u6570\u91CF")])),_:2},1032,["onClick"])),[[b,["warehouse_product.warehouse_product/resetNums"]]]),v((p(),c(d,{type:"danger",link:"",onClick:U=>N(i.id)},{default:a(()=>t[5]||(t[5]=[_("\u5220\u9664")])),_:2},1032,["onClick"])),[[b,["purchase_product_offer.purchase_product_offer/delete"]]])]),_:1})]),_:1},8,["data"]),re("div",le,[r(n).lists?(p(),c(T,{key:0,modelValue:r(n),"onUpdate:modelValue":t[1]||(t[1]=i=>ae(n)?n.value=i:null),onChange:r(h)},null,8,["modelValue","onChange"])):se("",!0)])])}}});export{Xe as default};
