moreShopAdmin/build/admin/assets/add.703ab234.js

2 lines
6.1 KiB
JavaScript
Raw Normal View History

2024-10-15 21:12:52 +08:00
import{G as $,H as N,C as O,D as P,J as j,K as z,w as G,M as K,b as H,N as J,F as M,I as Z,L as q}from"./element-plus.a63a26dd.js";import{_ as Q}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.e3a0bbf9.js";import{a as W}from"./vue-router.101084e3.js";import{a as X}from"./beforehand_order.b74d20f4.js";import{a as Y}from"./system_store.0ebd35e8.js";import{d as v,s as ee,Z as le,r as h,o as V,K as F,L as t,a as f,U as e,u as r,R as i,c as oe,T as te,a9 as ae,j as ue}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.4884cfc2.js";import"./axios.932d3f8a.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import"./usePaging.6a6670f9.js";import"./useDictOptions.9851f478.js";import"./index.f6b01d13.js";import"./lodash.2473fc51.js";import"./pinia.a969beab.js";import"./css-color-function.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.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.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./store_product.cda57076.js";import"./store_branch_product.81680c31.js";import"./warehouse_product_storege.44bc818a.js";const re=f("div",{class:"mb-4 text-lg font-bold"},"\u9884\u5B9A\u5355\u6DFB\u52A0",-1),pe={class:"flex-1 w-full"},de={class:"mb-2"},ne=v({name:"storeProductEdit"}),Xe=v({...ne,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(ie,{emit:se}){const B=ee(),u=le({warehouse_id:"",supplier_id:"",code:"",total_price:0,order_type:1,store_id:"",mark:""}),_=h(!1),s=h([]),g=a=>{s.value=s.value.filter(o=>o.id!==a)},y=a=>{a.forEach(o=>{s.value.find(n=>n.id==o.id)||(u.order_type!=2&&(o.purchase=o.price),s.value.push(o))}),_.value=!1};function E(a){a.total_price=(a.nums*a.purchase).toFixed(2),a.total_price>0&&(u.total_price=(parseFloat(u.total_price)+parseFloat(a.total_price)).toFixed(2))}const k=W(),D=async()=>{const a=s.value.map(o=>({product_id:o.id,nums:o.nums,purchase:o.purchase||0,total_price:o.total_price||0,mark:o.mark}));X({product_arr:a,...u}).then(o=>{setTimeout(()=>{k.push({path:"/order/beforehand_order"})},2e3)})},C=h([]);return Y({page_no:1,page_size:100}).then(a=>{C.value=a.lists}),(a,o)=>{const n=O,m=P,c=$,w=N,x=j,U=z,b=G,d=K,A=H,R=J,L=M,I=Q,S=Z,T=q;return V(),F(T,null,{default:t(()=>[re,f("div",null,[e(L,{ref_key:"formRef",ref:B,model:r(u),"label-width":"90px"},{default:t(()=>[e(m,{label:"\u603B\u4EF7",prop:"total_price"},{default:t(()=>[e(n,{modelValue:r(u).total_price,"onUpdate:modelValue":o[0]||(o[0]=l=>r(u).total_price=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u603B\u4EF7",readonly:!1,style:{width:"240px"}},null,8,["modelValue"])]),_:1}),e(m,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type"},{default:t(()=>[e(w,{modelValue:r(u).order_type,"onUpdate:modelValue":o[1]||(o[1]=l=>r(u).order_type=l)},{default:t(()=>[e(c,{label:1},{default:t(()=>[i("\u94FA\u8D27\u8BA2\u5355")]),_:1}),e(c,{label:2},{default:t(()=>[i("\u644A\u8D29\u8BA2\u5355")]),_:1}),e(c,{label:3},{default:t(()=>[i("\u4E00\u6761\u9F99\u8BA2\u5355")]),_:1}),e(c,{label:5},{default:t(()=>[i("\u4ED3\u5E93\u8865\u8D27")]),_:1}),e(c,{label:6},{default:t(()=>[i("\u5F80\u671F\u8865\u5355")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(m,{label:"\u95E8\u5E97",prop:"store_id"},{default:t(()=>[e(U,{modelValue:r(u).store_id,"onUpdate:modelValue":o[2]||(o[2]=l=>r(u).store_id=l),placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",size:"large",style:{width:"240px"}},{default:t(()=>[(V(!0),oe(te,null,ae(r(C),l=>(V(),F(x,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["m