2 lines
8.1 KiB
JavaScript
2 lines
8.1 KiB
JavaScript
import{U as X,G as ee,H as oe,k as S,J as te,K as ue,D as le,C as ae,w as se,M as re,b as ie,N as ne,F as pe,I as de,L as me}from"./element-plus.4a7d92a3.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.c41a09ce.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.2dc4dfc2.js";import{k as fe}from"./index.5488da9c.js";import{a as Ee}from"./warehouse_order.7c95276b.js";import{d as I,s as we,r,Z as ve,ap as he,o as h,K as k,L as t,a as c,U as e,u as s,j as D,c as be,T as ke,a9 as De,R as n,S as Ce,M as R}from"./@vue.18505fe0.js";import"./lodash.9dc701ad.js";import{u as ye,a as Be}from"./vue-router.101084e3.js";import{a as Ve}from"./store_product_unit.87ce7958.js";import{a as ge}from"./warehouse.61826842.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import"./usePaging.6a6670f9.js";import"./useDictOptions.d26b50f5.js";import"./store_product.4d10c196.js";import"./store_branch_product.2381a090.js";import"./warehouse_product_storege.698b1116.js";import"./system_store.5b8f6d2d.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const Fe=c("div",{class:"mb-4 text-lg font-bold"},"\u51FA\u5E93\u5546\u54C1\u5230\u95E8\u5E97",-1),xe={class:"flex-1 w-full"},Ue={class:"mb-2"},Ae={class:"flex-1 w-full"},Le={class:"mb-2"},Se=c("span",{class:"text-info text-xs ml-6"},"\u9ED8\u8BA4\u4E3A\u5206\u914D\u552E\u5356\u5E93\u5B58, \u5982\u9700\u5206\u914D\u5151\u6362\u5E93\u5B58\u8BF7\u9009\u62E9\u5206\u914D\u5151\u6362\u5E93\u5B58",-1),Re=I({name:"storeProductEdit"}),Fo=I({...Re,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ie,{emit:Me}){const B=ye(),M=we();fe(),r("add");const p=r(""),V=r([]);r(0);const d=ve({store_id:"",manufacture:"",remark:""});B.query.warehouse_id&&(p.value=parseInt(B.query.warehouse_id));const O=()=>{ge({}).then(l=>{V.value=l.lists})},E=r(!1),f=r([]),P=l=>{f.value=f.value.filter(u=>u.id!==l)},T=l=>{f.value=[],f.value.push(l),C(),E.value=!1},w=r(!1),m=r([]),$=l=>{m.value=m.value.filter(u=>u.id!==l)},N=l=>{l.forEach(u=>{m.value.find(i=>i.id==u.id)||m.value.push(u)}),w.value=!1},Y=r([]);(()=>{Ve({}).then(l=>{Y.value=l.lists})})();const b=r(1),j=r(!0),C=()=>{m.value.map(l=>({id:l.product_id,stock:l.new_stock||0,stocks:l.stock||0}))},q=Be(),G=async()=>{if(p.value==""){S.error("\u8BF7\u9009\u62E9\u4ED3\u5E93");return}if(C(),j.value==!1)return;const l=m.value.map(i=>({id:i.product_id,stock:i.new_stock||0,batch:i.batch||0})),u=f.value.map(i=>i.id);if(u.length>1){S.error("\u95E8\u5E97\u4E0D\u80FD\u8D85\u8FC7\u4E00\u4E2A");return}Ee({product_arr:l,store_arr:u,stock_type:b.value,warehouse_id:p.value,delivery_time:d.manufacture,mark:d.remark}).then(i=>{setTimeout(()=>{q.push({path:"/warehouse/outbound_order"})},2e3)})};return O(),(l,u)=>{const i=te,K=ue,_=le,W=X,g=ae,v=se,a=re,F=ie,x=ne,U=ee,H=oe,J=pe,Z=ce,A=de,z=_e,Q=me,L=he("perms");return h(),k(Q,null,{default:t(()=>[Fe,c("div",null,[e(J,{ref_key:"formRef",ref:M,model:s(d),"label-width":"90px"},{default:t(()=>[e(_,{label:"\u4ED3\u5E93",prop:"uid"},{default:t(()=>[e(K,{modelValue:s(p),"onUpdate:modelValue":u[0]||(u[0]=o=>D(p)?p.value=o:null),style:{width:"240px"}},{default:t(()=>[(h(!0),be(ke,null,De(s(V),o=>(h(),k(i,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(_,{label:"\u9001\u8D27\u65F6\u95F4"},{default:t(()=>[e(W,{readonly:!1,class:"flex-1 !flex",modelValue:s(d).manufacture,"onUpdate:modelValue":u[1]||(u[1]=o=>s(d).manufacture=o),clearable:"",type:"datetime","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u751F\u4EA7\u65E5\u671F"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u5907\u6CE8"},{default:t(()=>[e(g,{modelValue:s(d).remark,"onUpdate:modelValue":u[2]||(u[2]=o=>s(d).remark=o),type:"input",rows:"4"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u95E8\u5E97",prop:"store_id"},{default:t(()=>[c("div",xe,[c("div",Ue,[e(v,{type:"primary",onClick:u[3]||(u[3]=o=>E.value=!0)},{default:t(()=>[n("\u6DFB\u52A0\u95E8\u5E97")]),_:1})]),e(x,{data:s(f)},{default:t(()=>[e(a,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(a,{label:"\u95E8\u5E97\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(a,{label:"\u624B\u673A\u53F7\u7801",prop:"phone","show-overflow-tooltip":""}),e(a,{label:"\u8BE6\u7EC6\u5730\u5740",prop:"detailed_address","show-overflow-tooltip":""}),e(a,{label:"\u95E8\u5E97logo",prop:"image","show-overflow-tooltip":""},{default:t(({row:o})=>[e(F,{src:o.image,class:"w-[40px] h-[40px]","preview-teleported":!0},null,8,["src"])]),_:1}),e(a,{label:"\u8425\u4E1A\u72B6\u6001",prop:"is_show","show-overflow-tooltip":""},{default:t(({row:o})=>[n(Ce(o.is_show?"\u8425\u4E1A":"\u6253\u70CA"),1)]),_:1}),e(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:o})=>[R((h(),k(v,{type:"danger",link:"",onClick:y=>P(o.id)},{default:t(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[L,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])])]),_:1}),e(_,{label:"\u5546\u54C1",prop:"store_id"},{default:t(()=>[c("div",Ae,[c("div",Le,[e(v,{type:"primary",onClick:u[4]||(u[4]=o=>w.value=!0)},{default:t(()=>[n("\u6DFB\u52A0\u5546\u54C1")]),_:1})]),e(x,{data:s(m)},{default:t(()=>[e(a,{label:"\u5546\u54C1ID",prop:"product_id","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:t(({row:o})=>[e(F,{style:{width:"50px",height:"50px"},src:o.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(a,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(a,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(a,{label:"\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),e(a,{label:"\u5206\u914D\u5E93\u5B58","min-width":"150"},{default:t(({row:o})=>[e(g,{modelValue:o.new_stock,"onUpdate:modelValue":y=>o.new_stock=y,onChange:C},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:o})=>[R((h(),k(v,{type:"danger",link:"",onClick:y=>$(o.id)},{default:t(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[L,["system_store.system_store/delete"]]])]),_:1})]),_:1},8,["data"])])]),_:1}),e(_,{label:"\u5E93\u5B58\u7C7B\u578B",prop:"stock_type"},{default:t(()=>[e(H,{modelValue:s(b),"onUpdate:modelValue":u[5]||(u[5]=o=>D(b)?b.value=o:null),class:"ml-6"},{default:t(()=>[e(U,{value:1,label:1},{default:t(()=>[n("\u5206\u914D\u552E\u5356\u5E93\u5B58")]),_:1}),e(U,{value:2,label:2},{default:t(()=>[n("\u5206\u914D\u5151\u6362\u5E93\u5B58")]),_:1})]),_:1},8,["modelValue"]),Se]),_:1}),e(_,{label:""},{default:t(()=>[e(v,{onClick:G,type:"primary",class:"w-40"},{default:t(()=>[n("\u63D0\u4EA4")]),_:1})]),_:1})]),_:1},8,["model"])]),e(A,{modelValue:s(E),"onUpdate:modelValue":u[6]||(u[6]=o=>D(E)?E.value=o:null),title:"\u9009\u62E9\u95E8\u5E97",width:"70%"},{default:t(()=>[e(Z,{onOnBindStore:T,is_selection:0})]),_:1},8,["modelValue"]),e(A,{modelValue:s(w),"onUpdate:modelValue":u[7]||(u[7]=o=>D(w)?w.value=o:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:t(()=>[e(z,{onOnBindStore:N,is_warehouse:"1",warehouse_id:s(p)},null,8,["warehouse_id"])]),_:1},8,["modelValue"])]),_:1})}}});export{Fo as default};
|