import{_ as X}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.c2f499f4.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.b7e179e6.js";import{P as h,Q as ee,D as oe,C as ue,F as te,L as le}from"./element-plus.8e273e86.js";import{_ as ae}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.f06fa423.js";import{P as ne}from"./index.0b11b102.js";import{a as re,b as de,c as ie}from"./inventory_transfer.043246fe.js";import"./lodash.41b9567d.js";import{d as O,s as x,r,b as me,Z as A,o as m,c as se,U as a,L as n,u,R as y,K as p,Q as _,j as C}from"./@vue.76ce7aa3.js";import"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import"./usePaging.f8c888e4.js";import"./useDictOptions.66a6bcee.js";import"./index.da348ba1.js";import"./@vueuse.9ffef7f8.js";import"./axios.b4cbdbc9.js";import"./@babel.80d29b7b.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"./@element-plus.73235148.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";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./dayjs.0112e2c7.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./warehouse.1b491a21.js";import"./store_product.88054e51.js";import"./store_branch_product.04c05aef.js";import"./warehouse_product_storege.a6861efc.js";import"./system_store.4b403c4a.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const pe={class:"edit-popup"},_e=O({name:"inventoryTransferEdit"}),mo=O({..._e,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(fe,{expose:W,emit:q}){const c=q,g=x(),B=x(),b=r("add"),f=r(!1),w=r(!1),E=r(!1),F=r(!1),V=r(!1),k=r(0),D=r(0),U=r(0),I=me(()=>b.value=="edit"?"\u7F16\u8F91\u5546\u54C1\u8C03\u62E8":"\u65B0\u589E\u5546\u54C1\u8C03\u62E8"),o=A({id:"",product_id:"",product_name:"",nums:"",before_nums:"",after_nums:"",one_type:"1",two_type:"1",one_id:"",one_name:"",two_id:"",two_name:"",warehouse_name:"",warehouse_name_two:""}),P=A({product_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u5546\u54C1",trigger:["blur"]}],nums:[{required:!0,message:"\u8BF7\u8F93\u5165\u6570\u91CF",trigger:["blur"]}],type:[{required:!0,message:"\u8BF7\u8F93\u51651\u5546\u62372\u4ED3\u5E93",trigger:["blur"]}],one_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F6C\u51FAid",trigger:["blur"]}],two_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F6C\u5165id",trigger:["blur"]}]}),N=l=>{o.product_name=l[0].store_name,o.product_id=l[0].product_id,f.value=!1},j=l=>{o.one_id=l[0].id,o.one_name=l[0].name,w.value=!1,k.value=l[0].id},L=l=>{o.two_id=l[0].id,o.two_name=l[0].name,E.value=!1},Q=l=>{o.one_name=l.name,o.one_id=l.id,D.value=l.id,U.value=1,F.value=!1},G=l=>{o.two_name=l.name,o.two_id=l.id,V.value=!1},R=async l=>{for(const e in o)l[e]!=null&&l[e]!=null&&(o[e]=l[e])},K=async l=>{const e=await re({id:l.id});R(e)},Z=async()=>{var e,i;await((e=g.value)==null?void 0:e.validate());const l={...o};b.value=="edit"?await de(l):await ie(l),(i=B.value)==null||i.close(),c("success")},z=(l="add")=>{var e;b.value=l,(e=B.value)==null||e.open()},H=()=>{c("close")};return W({open:z,setFormData:R,getDetail:K}),(l,e)=>{const i=h,T=ee,d=oe,s=ue,J=te,S=ae,v=le,M=Y,$=X;return m(),se("div",pe,[a(ne,{ref_key:"popupRef",ref:B,title:u(I),async:!0,width:"550px",onConfirm:Z,onClose:H},{default:n(()=>[a(J,{ref_key:"formRef",ref:g,model:u(o),"label-width":"90px",rules:u(P)},{default:n(()=>[a(d,{label:"\u8F6C\u51FA\u7C7B\u578B"},{default:n(()=>[a(T,{modelValue:u(o).one_type,"onUpdate:modelValue":e[0]||(e[0]=t=>u(o).one_type=t)},{default:n(()=>[a(i,{label:"1"},{default:n(()=>e[18]||(e[18]=[y("\u95E8\u5E97")])),_:1}),a(i,{label:"2"},{default:n(()=>e[19]||(e[19]=[y("\u4ED3\u5E93")])),_:1})]),_:1},8,["modelValue"])]),_:1}),u(o).one_type==1?(m(),p(d,{key:0,label:"\u8F6C\u51FA\u95E8\u5E97",prop:"one_id"},{default:n(()=>[a(s,{modelValue:u(o).one_name,"onUpdate:modelValue":e[1]||(e[1]=t=>u(o).one_name=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8F6C\u51FA\u65B9",readonly:!1,onClick:e[2]||(e[2]=t=>w.value=!0)},null,8,["modelValue"])]),_:1})):_("",!0),u(o).one_type==2?(m(),p(d,{key:1,label:"\u8F6C\u51FA\u4ED3\u5E93",prop:"one_id"},{default:n(()=>[a(s,{modelValue:u(o).one_name,"onUpdate:modelValue":e[3]||(e[3]=t=>u(o).one_name=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8F6C\u51FA\u65B9",readonly:!1,onClick:e[4]||(e[4]=t=>F.value=!0)},null,8,["modelValue"])]),_:1})):_("",!0),a(d,{label:"\u8F6C\u5165\u7C7B\u578B"},{default:n(()=>[a(T,{modelValue:u(o).two_type,"onUpdate:modelValue":e[5]||(e[5]=t=>u(o).two_type=t)},{default:n(()=>[a(i,{label:"1"},{default:n(()=>e[20]||(e[20]=[y("\u95E8\u5E97")])),_:1}),a(i,{label:"2"},{default:n(()=>e[21]||(e[21]=[y("\u4ED3\u5E93")])),_:1})]),_:1},8,["modelValue"])]),_:1}),u(o).two_type==1?(m(),p(d,{key:2,label:"\u8F6C\u5165\u95E8\u5E97",prop:"two_id"},{default:n(()=>[a(s,{modelValue:u(o).two_name,"onUpdate:modelValue":e[6]||(e[6]=t=>u(o).two_name=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8F6C\u5165\u65B9",readonly:!1,onClick:e[7]||(e[7]=t=>E.value=!0)},null,8,["modelValue"])]),_:1})):_("",!0),u(o).two_type==2?(m(),p(d,{key:3,label:"\u8F6C\u5165\u4ED3\u5E93",prop:"two_id"},{default:n(()=>[a(s,{modelValue:u(o).two_name,"onUpdate:modelValue":e[8]||(e[8]=t=>u(o).two_name=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8F6C\u5165\u65B9",readonly:!1,onClick:e[9]||(e[9]=t=>V.value=!0)},null,8,["modelValue"])]),_:1})):_("",!0),u(o).one_id?(m(),p(d,{key:4,label:"\u5546\u54C1",prop:"product_id"},{default:n(()=>[a(s,{modelValue:u(o).product_name,"onUpdate:modelValue":e[10]||(e[10]=t=>u(o).product_name=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1",readonly:!1,onClick:e[11]||(e[11]=t=>f.value=!0)},null,8,["modelValue"])]),_:1})):_("",!0),u(o).one_id?(m(),p(d,{key:5,label:"\u6570\u91CF",prop:"nums"},{default:n(()=>[a(s,{modelValue:u(o).nums,"onUpdate:modelValue":e[12]||(e[12]=t=>u(o).nums=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6570\u91CF",readonly:!1},null,8,["modelValue"])]),_:1})):_("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title"]),a(v,{modelValue:u(w),"onUpdate:modelValue":e[13]||(e[13]=t=>C(w)?w.value=t:null),title:"\u9009\u62E9\u95E8\u5E97",width:"70%"},{default:n(()=>[a(S,{onOnBindStore:j})]),_:1},8,["modelValue"]),a(v,{modelValue:u(E),"onUpdate:modelValue":e[14]||(e[14]=t=>C(E)?E.value=t:null),title:"\u9009\u62E9\u95E8\u5E97",width:"70%"},{default:n(()=>[a(S,{onOnBindStore:L})]),_:1},8,["modelValue"]),a(v,{modelValue:u(f),"onUpdate:modelValue":e[15]||(e[15]=t=>C(f)?f.value=t:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:n(()=>[a(M,{onOnBindStore:N,is_branch:1,store_id:u(k),warehouse_id:u(D),is_warehouse:u(U)},null,8,["store_id","warehouse_id","is_warehouse"])]),_:1},8,["modelValue"]),a(v,{modelValue:u(F),"onUpdate:modelValue":e[16]||(e[16]=t=>C(F)?F.value=t:null),title:"\u9009\u62E9\u4ED3\u5E931",width:"70%"},{default:n(()=>[a($,{onOnBindWarehouse:Q})]),_:1},8,["modelValue"]),a(v,{modelValue:u(V),"onUpdate:modelValue":e[17]||(e[17]=t=>C(V)?V.value=t:null),title:"\u9009\u62E9\u4ED3\u5E932",width:"70%"},{default:n(()=>[a($,{onOnBindWarehouse:G})]),_:1},8,["modelValue"])])}}});export{mo as default};