123 |
- import{_ as h,d as I,bs as U,w,x as O,o as v,G as y,l as e,aq as S,bY as J,bw as X,bZ as Z,aT as L,ac as K,aU as ee,ag as G,aN as T,z as le,r as m,aC as ue,C as t,H as M,b1 as H,j as l,c as k,F as q,D as N,h as E,M as $,J as Q,W as te,b_ as ae,bW as oe,a as se,L as ne}from"./index.js";import{c as de,d as re,e as ie}from"./_options.e9511092.js";import{u as P}from"./useTask.8a645393.js";import"./validator.92b8f4b2.js";const pe=I({__name:"unit-query",props:{modelValue:{type:String,required:!1}},emits:["change"],setup(i,{expose:F,emit:_}){const r=U(i,"modelValue"),u=w(null);return O(()=>{r.value&&u.value.initalData(r.value)}),F({initialData:f=>u.value.initalData(f),getRecurrentValue:f=>u.value.getRecurrentValue(f)}),(f,n)=>(v(),y(e(X),{modelValue:e(r),"onUpdate:modelValue":n[0]||(n[0]=c=>S(r)?r.value=c:null),ref_key:"RemoteSelectRef",ref:u,style:{width:"100%"},api:e(J),"request-prop":"unit","response-val-prop":"id",onClear:n[1]||(n[1]=c=>_("change")),"response-label-prop":"unit",onItemChange:n[2]||(n[2]=c=>_("change",c))},null,8,["modelValue","api"]))}});var ce=h(pe,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/BasicForm/src/fields/unit-query.vue"]]);const me=I({__name:"category-flatten-query",props:{companyNo:{type:String,required:!0},modelValue:{type:String,required:!1},disabled:{type:Boolean,required:!1},prop:{type:null,required:!0}},emits:["change"],setup(i,{expose:F,emit:_}){const r=U(i,"modelValue"),u=w(null);return O(()=>{r.value&&u.value.initalData(r.value)}),F({initialData:f=>u.value.initalData(f)}),(f,n)=>(v(),y(e(X),{ref_key:"RemoteSelectRef",ref:u,disabled:i.disabled,modelValue:e(r),"onUpdate:modelValue":n[0]||(n[0]=c=>S(r)?r.value=c:null),style:{width:"100%"},api:e(Z),"request-prop":"cat_name","response-label-prop":"cat_name","response-val-prop":i.prop||"id",onItemChange:n[1]||(n[1]=c=>_("change",c)),onClear:n[2]||(n[2]=c=>_("change")),"pro-data":()=>({companyNo:i.companyNo})},null,8,["disabled","modelValue","api","response-val-prop","pro-data"]))}});var _e=h(me,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/BasicForm/src/fields/category-flatten-query.vue"]]);const{VITE_PROXY_DOMAIN_REAL:Oe,VITE_PROXY_USER_REAL:ve}=K(),z=ve+"/admin/",fe=(i={})=>L.request("post",`${z}specstitle`,{data:i}),Y=i=>L.request("post",`${z}valueall`,{data:i}),Ce=i=>L.request("post",`${z}valuecreate`,{data:i}),W={spec_id:"",spec_value_id:""},be={spec_id:[{required:!0,message:"\u8BF7\u9009\u62E9\u89C4\u683C\u7C7B\u578B",trigger:"change"}],spec_value_id:[{required:!0,message:"\u8BF7\u9009\u62E9\u89C4\u683C\u503C",trigger:"change"}]},Ve={key:1},Ee={class:"flex justify-between"},ye={class:"flex"},ge=I({__name:"specModal",props:{visible:{type:Boolean,required:!0},index:{type:Number,required:!0},data:{type:null,required:!0}},emits:["add","update"],setup(i,{emit:F}){const _=i,s=U(_,"data"),r=U(_,"visible"),u=ee(""),f=G(()=>_.index!==-1),n=w(null),c=P({initialData:[]}),b=P({initialData:[]}),o=P({success(){T.success("\u89C4\u683C\u503C\u6DFB\u52A0\u6210\u529F!"),b.run(Y({spec_id:s.value.spec_id})),u.value=""}});function A(){if(!s.value.spec_id){T.warning("\u8BF7\u9009\u62E9\u89C4\u683C\u7C7B\u578B");return}if(u.value.trim().length===0){T.warning("\u8BF7\u8F93\u5165\u89C4\u683C\u503C\u540D\u79F0");return}o.run(Ce({spec_id:s.value.spec_id,spec_value:u.value}))}async function d(){try{await n.value.validate();const{spec_id:p,spec_value_id:V}=s.value,x=c.data.find(({id:g})=>p===g),D=b.data.find(({id:g})=>V===g),B={spec_id:p,spec_value_id:V,spec_label:x.spec_name,spec_value_label:D.spec_value};F(f.value?"update":"add",B,_.index),r.value=!1}catch{}}return O(()=>c.run(fe())),le(()=>s.value.spec_id,p=>{if(p)b.run(Y({spec_id:p}));else{b.data=[];return}},{immediate:!0}),(p,V)=>{const x=m("ElOption"),D=m("ElSelect"),B=m("ElFormItem"),g=m("ElInput"),R=m("ElButton"),j=m("ElDialog"),a=ue("loading");return v(),y(j,{modelValue:e(r),"onUpdate:modelValue":V[3]||(V[3]=C=>S(r)?r.value=C:null),center:"",title:`${e(f)?"\u7F16\u8F91":"\u6DFB\u52A0"}\u5546\u54C1\u89C4\u683C\u503C`},{default:t(()=>[M((v(),y(e(H),{"label-width":"80px",rules:e(be),model:e(s),ref_key:"formRef",ref:n},{default:t(()=>[l(B,{label:"\u89C4\u683C\u7C7B\u578B",prop:"spec_id"},{default:t(()=>[M((v(),y(D,{modelValue:e(s).spec_id,"onUpdate:modelValue":V[0]||(V[0]=C=>e(s).spec_id=C),style:{width:"100%"},placeholder:"\u89C4\u683C\u7C7B\u578B",clearable:""},{default:t(()=>[(v(!0),k(q,null,N(e(c).data,C=>(v(),y(x,{disabled:C.status==="0",label:C.spec_name,value:C.id,key:C.id},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"])),[[a,e(c).loading]])]),_:1}),l(B,{label:"\u89C4\u683C\u503C",prop:"spec_value_id"},{default:t(()=>[e(b).data.length>0?M((v(),y(D,{key:0,modelValue:e(s).spec_value_id,"onUpdate:modelValue":V[1]||(V[1]=C=>e(s).spec_value_id=C),style:{width:"100%"}},{default:t(()=>[(v(!0),k(q,null,N(e(b).data,C=>(v(),y(x,{label:C.spec_value,value:C.id,key:C.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])),[[a,e(b).loading]]):(v(),k("p",Ve,"\u6682\u65E0\u89C4\u683C\u503C,\u8BF7\u6DFB\u52A0\uFF01"))]),_:1}),E("div",Ee,[E("div",ye,[l(g,{class:"mr-[10px]",modelValue:e(u),"onUpdate:modelValue":V[2]||(V[2]=C=>S(u)?u.value=C:null),placeholder:"\u89C4\u683C\u503C\u540D\u79F0,\u5982\u7EA2\u8272"},null,8,["modelValue"]),l(R,{onClick:A},{default:t(()=>[$("\u65B0\u589E\u89C4\u683C\u503C")]),_:1})]),l(R,{type:"primary",onClick:d},{default:t(()=>[$("\u4FDD\u5B58")]),_:1})])]),_:1},8,["rules","model"])),[[a,e(o).loading]])]),_:1},8,["modelValue","title"])}}});var Fe=h(ge,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/SpecForm/src/specModal.vue"]]);const De={class:"flex justify-between"},Be=E("p",null,"\u64CD\u4F5C",-1),xe=I({__name:"index",props:{specs:{type:Array,required:!0}},setup(i){const _=U(i,"specs"),s=w({data:{...W},visible:!1,index:-1});function r(){s.value.data={...W},s.value.index=-1,s.value.visible=!0}function u(f){s.value.data={..._.value[f]},s.value.index=f,s.value.visible=!0}return(f,n)=>{const c=m("ElTableColumn"),b=m("ElButton"),o=m("ElTooltip"),A=m("ElTable");return v(),k(q,null,[l(A,{size:"small",border:"",data:e(_)},{default:t(()=>[l(c,{label:"\u89C4\u683C\u7C7B\u578B",prop:"spec_label"}),l(c,{label:"\u89C4\u683C\u503C",prop:"spec_value_label"}),l(c,{width:"80px"},{header:t(()=>[E("div",De,[Be,l(o,{content:"\u6DFB\u52A0\u89C4\u683C\u7C7B\u578B",placement:"top"},{default:t(()=>[l(b,{link:"",type:"primary",icon:e(Q)("add"),onClick:r},null,8,["icon"])]),_:1})])]),default:t(({$index:d})=>[l(o,{content:"\u7F16\u8F91",placement:"top"},{default:t(()=>[l(b,{link:"",type:"primary",icon:e(Q)("edit"),onClick:p=>u(d)},null,8,["icon","onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data"]),l(Fe,{visible:s.value.visible,"onUpdate:visible":n[0]||(n[0]=d=>s.value.visible=d),data:s.value.data,"onUpdate:data":n[1]||(n[1]=d=>s.value.data=d),index:s.value.index,onAdd:n[2]||(n[2]=d=>e(_).push(d)),onUpdate:n[3]||(n[3]=d=>e(_)[s.value.index]={...d})},null,8,["visible","data","index"])],64)}}});var Ue=h(xe,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/components/SpecForm/src/index.vue"]]);const ke={class:"flex"},we=E("span",{class:"ml-[5px]"},"\u5143",-1),Ae={class:"flex"},Re=E("span",{class:"ml-[5px]"},"g",-1),Se={class:"flex justify-start"},qe=E("p",{class:"ml-[10px]"},"\u5C0F\u4E8E1Mb",-1),he={class:"w-full h-full flex flex-col items-end"},Ie={class:"text-right font-bold mb-[5px]"},Ne={class:"w-full flex justify-end"},$e=I({__name:"activityProductModal",props:{visible:{type:Boolean,required:!0},data:{type:null,required:!0},isProject:{type:Boolean,required:!0},index:{type:Number,required:!0}},emits:["submit"],setup(i,{emit:F}){const _=i,s=w(null),r=U(_,"visible"),u=U(_,"data");w([]);const f=G(()=>{const{budget_price:b,num:o}=u.value;return Number(b*o).toFixed(2)}),{currentCompany:n}=te();async function c(){try{await s.value.validate(),F("submit",{newData:u.value,index:_.index}),r.value=!1}catch{}}return(b,o)=>{const A=m("ElDatePicker"),d=m("ElFormItem"),p=m("ElCol"),V=m("ElOption"),x=m("ElSelect"),D=m("ElInputNumber"),B=m("ElRow"),g=m("ElInput"),R=m("ElButton"),j=m("ElDialog");return v(),y(j,{modelValue:e(r),"onUpdate:modelValue":o[16]||(o[16]=a=>S(r)?r.value=a:null),title:"\u6DFB\u52A0\u7ADE\u4EF7\u5546\u54C1",center:""},{default:t(()=>[l(e(H),{"label-width":"80px",rules:e(de),ref_key:"formRef",ref:s,model:e(u)},{default:t(()=>[l(B,{gutter:10},{default:t(()=>[l(p,{span:6},{default:t(()=>[l(d,{label:"\u5230\u8D27\u65E5\u671F",prop:"arrival_time"},{default:t(()=>[l(A,{modelValue:e(u).arrival_time,"onUpdate:modelValue":o[0]||(o[0]=a=>e(u).arrival_time=a),disabled:i.isProject,placeholder:"\u5230\u8D27\u65E5\u671F"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),l(p,{span:6},{default:t(()=>[l(d,{label:"\u662F\u5426\u591A\u5730",prop:"is_addrs"},{default:t(()=>[l(x,{placeholder:"\u662F\u5426\u591A\u5730",modelValue:e(u).is_addrs,"onUpdate:modelValue":o[1]||(o[1]=a=>e(u).is_addrs=a)},{default:t(()=>[(v(!0),k(q,null,N(e(re),a=>(v(),y(V,{label:a.label,value:a.value,key:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(p,{span:6},{default:t(()=>[l(d,{label:"\u9884\u7B97\u5355\u4EF7",prop:"budget_price"},{default:t(()=>[E("div",ke,[l(D,{style:{width:"100%"},placeholder:"\u9884\u7B97\u5355\u4EF7","controls-position":"right",modelValue:e(u).budget_price,"onUpdate:modelValue":o[2]||(o[2]=a=>e(u).budget_price=a),disabled:i.isProject},null,8,["modelValue","disabled"]),we])]),_:1})]),_:1}),l(p,{span:6},{default:t(()=>[l(d,{label:"\u6570\u91CF",prop:"num"},{default:t(()=>[l(D,{modelValue:e(u).num,"onUpdate:modelValue":o[3]||(o[3]=a=>e(u).num=a),style:{width:"100%"},"controls-position":"right",placeholder:"\u6570\u91CF",disabled:i.isProject},null,8,["modelValue","disabled"])]),_:1})]),_:1}),l(p,{span:6},{default:t(()=>[l(d,{label:"\u662F\u5426\u5B9A\u5236",prop:"is_custom"},{default:t(()=>[l(x,{style:{width:"100%"},placeholder:"\u662F\u5426\u8BA2\u5355",modelValue:e(u).is_custom,"onUpdate:modelValue":o[4]||(o[4]=a=>e(u).is_custom=a)},{default:t(()=>[(v(!0),k(q,null,N(e(ie),a=>(v(),y(V,{label:a.label,value:a.value,key:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(p,{span:6},{default:t(()=>[l(d,{label:"\u91CD\u91CF",prop:"total_weight"},{default:t(()=>[E("div",Ae,[l(D,{style:{width:"100%"},"controls-position":"right",modelValue:e(u).total_weight,"onUpdate:modelValue":o[5]||(o[5]=a=>e(u).total_weight=a)},null,8,["modelValue"]),Re])]),_:1})]),_:1}),l(p,{span:6},{default:t(()=>[l(d,{label:"\u5355\u4F4D",prop:"unit"},{default:t(()=>[l(e(ce),{modelValue:e(u).unit,"onUpdate:modelValue":o[6]||(o[6]=a=>e(u).unit=a)},null,8,["modelValue"])]),_:1})]),_:1}),l(p,{span:6},{default:t(()=>[l(d,{label:"\u54C1\u724C",prop:"brand_id"},{default:t(()=>[l(e(ae),{modelValue:e(u).brand_id,"onUpdate:modelValue":o[7]||(o[7]=a=>e(u).brand_id=a)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(B,{gutter:10},{default:t(()=>[l(p,{span:12},{default:t(()=>[l(d,{label:"\u5546\u54C1\u5206\u7C7B",prop:"cat_id"},{default:t(()=>[l(e(_e),{modelValue:e(u).cat_id,"onUpdate:modelValue":o[8]||(o[8]=a=>e(u).cat_id=a),companyNo:e(n).companyNo},null,8,["modelValue","companyNo"])]),_:1}),l(d,{label:"\u5DE5\u827A\u8BF4\u660E",prop:"cost_desc"},{default:t(()=>[l(g,{modelValue:e(u).cost_desc,"onUpdate:modelValue":o[9]||(o[9]=a=>e(u).cost_desc=a),placeholder:"\u5DE5\u827A\u8BF4\u660E"},null,8,["modelValue"])]),_:1}),l(d,{label:"\u4EA7\u54C1\u7528\u9014",prop:"use_desc"},{default:t(()=>[l(g,{modelValue:e(u).use_desc,"onUpdate:modelValue":o[10]||(o[10]=a=>e(u).use_desc=a),placeholder:"\u4EA7\u54C1\u7528\u9014"},null,8,["modelValue"])]),_:1}),l(d,{label:"\u4EA7\u54C1\u5907\u6CE8",prop:"remark"},{default:t(()=>[l(g,{modelValue:e(u).remark,"onUpdate:modelValue":o[11]||(o[11]=a=>e(u).remark=a),placeholder:"\u4EA7\u54C1\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1}),l(p,{span:12},{default:t(()=>[l(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"good_name"},{default:t(()=>[l(g,{modelValue:e(u).good_name,"onUpdate:modelValue":o[12]||(o[12]=a=>e(u).good_name=a),placeholder:"\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),l(e(Ue),{specs:e(u).specs,"onUpdate:specs":o[13]||(o[13]=a=>e(u).specs=a)},null,8,["specs"])]),_:1})]),_:1}),l(B,null,{default:t(()=>[l(p,{span:9},{default:t(()=>[l(d,{label:"\u5546\u54C1\u56FE\u7247",prop:"good_img"},{default:t(()=>[E("div",Se,[l(e(oe),{modelValue:e(u).good_img,"onUpdate:modelValue":o[14]||(o[14]=a=>e(u).good_img=a)},null,8,["modelValue"]),qe])]),_:1})]),_:1}),se(` <ElCol :span="9">\r
- <ElFormItem label="\u9644\u4EF6" prop="enclosure_file"></ElFormItem>\r
- </ElCol> `),l(p,{span:15},{default:t(()=>[E("div",he,[E("h3",Ie,"\u7ADE\u4EF7\u5355\u603B\u989D: "+ne(e(f)),1),E("div",Ne,[l(R,{type:"primary",onClick:c},{default:t(()=>[$("\u4FDD\u5B58")]),_:1}),l(R,{onClick:o[15]||(o[15]=a=>r.value=!1)},{default:t(()=>[$("\u53D6\u6D88")]),_:1})])])]),_:1})]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])}}});var Le=h($e,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/sellOut/zixunOrder/components/activityProductModal.vue"]]);export{Le as default};
|