2 lines
6.6 KiB
JavaScript
2 lines
6.6 KiB
JavaScript
import{a5 as O,_ as j,$ as q,x as Q,y as W,C as J,D as K,t as X,Q as Y,R as Z,v as h,G as ee,H as le,F as te,w as ae,I as oe}from"./element-plus.eb2e53ea.js";import{r as _}from"./index.01e2b43c.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.afc45fe5.js";import{d as U,s as ne,r as re,a0 as y,i as se,o as s,M as c,O as u,T as f,U as ie,u as a,a as pe,W as t,j as me,c as g,V as B,a7 as D}from"./@vue.c3e77981.js";import"./@vueuse.a48d0173.js";import"./@element-plus.12c58ce2.js";import"./lodash-es.2b5acb28.js";import"./dayjs.16ed1fda.js";import"./axios.a8078129.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.b082b0c1.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.a2abcd4b.js";import"./vue-router.995b143f.js";import"./pinia.b5130627.js";import"./css-color-function.975e80a5.js";import"./color.d986aa86.js";import"./clone.704d8332.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.ded7f805.js";import"./vue-clipboard3.987889a8.js";import"./clipboard.af74a91f.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b8b719e9.js";import"./vue-jsonp.3d85fcb6.js";function de(){return _.get({url:"/config/province"})}function _e(i){return _.get({url:"/config/city",params:i})}function ce(i){return _.get({url:"/config/area",params:i})}function fe(){return _.post({url:"/config/store"})}function ve(i){return _.post({url:"/config/saveStore",params:i})}const Ee={class:"w-[900px]"},Ve=U({name:"oaPlanEdit"}),he=U({...Ve,setup(i){const L=ne(),v=re("first"),p=y({provinceList:[],cityList:[],areaList:[],townList:[]}),o=y({id:"",store_name:"",status:0,times:"",phone:"",province_id:"",city_id:"",area_id:"",street_id:"",address:"",title:"",lat:"",lng:"",range:"1",isCity:"",isSelf:"",defalut_types:1}),k=y({}),x=async n=>{for(const e in o)n[e]!=null&&n[e]!=null&&(o[e]=n[e])};se(()=>{fe().then(n=>{x(n)})});const S=async()=>{var e;await((e=L.value)==null?void 0:e.validate());const n={...o};await ve(n)},A=async n=>{let e=await de();if(p.provinceList=e,n)return Promise.resolve({msg:"\u83B7\u53D6\u6210\u529F"})},R=async(n,e)=>{let m=await _e({code:n});if(p.cityList=m,e)return Promise.resolve({msg:"\u83B7\u53D6\u6210\u529F"})},P=async(n,e)=>{let m=await ce({code:n});if(p.areaList=m,e)return Promise.resolve({msg:"\u83B7\u53D6\u6210\u529F"})};return A(!1),(n,e)=>{const m=J,r=K,E=X,I=O,V=Y,b=Z,F=j,N=q,T=h,w=Q,C=ee,$=le,G=W,H=te,z=ae,M=oe;return s(),c(M,null,{default:u(()=>[f(ie(a(o))+" ",1),pe("div",Ee,[t(H,{ref_key:"formRef",ref:L,model:a(o),"label-width":"120px",rules:a(k)},{default:u(()=>[t(G,{modelValue:a(v),"onUpdate:modelValue":e[13]||(e[13]=l=>me(v)?v.value=l:null),class:"demo-tabs"},{default:u(()=>[t(w,{label:"\u57FA\u7840\u8BBE\u7F6E",name:"first"},{default:u(()=>[t(r,{label:"\u95E8\u5E97\u540D\u79F0"},{default:u(()=>[t(m,{modelValue:a(o).store_name,"onUpdate:modelValue":e[0]||(e[0]=l=>a(o).store_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5E97\u5458\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(r,{label:"\u95E8\u5E97\u624B\u673A\u53F7",prop:"title"},{default:u(()=>[t(m,{modelValue:a(o).phone,"onUpdate:modelValue":e[1]||(e[1]=l=>a(o).phone=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5E97\u5458\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(r,{label:"\u8425\u4E1A\u72B6\u6001",prop:"title"},{default:u(()=>[t(E,{modelValue:a(o).status,"onUpdate:modelValue":e[2]||(e[2]=l=>a(o).status=l),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1}),t(r,{label:"\u8425\u4E1A\u65F6\u95F4",prop:"title"},{default:u(()=>[t(I,{modelValue:a(o).times,"onUpdate:modelValue":e[3]||(e[3]=l=>a(o).times=l),"is-range":"","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4","value-format":"HH:mm:ss"},null,8,["modelValue"])]),_:1}),t(r,{label:"\u95E8\u5E97\u5730\u5740",prop:"title"},{default:u(()=>[t(N,null,{default:u(()=>[t(F,{span:6},{default:u(()=>[t(b,{class:"flex-1",modelValue:a(o).province_id,"onUpdate:modelValue":e[4]||(e[4]=l=>a(o).province_id=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9",onChange:e[5]||(e[5]=l=>R(a(o).province_id,!1))},{default:u(()=>[(s(!0),g(B,null,D(a(p).provinceList,(l,d)=>(s(),c(V,{key:d,label:l.province_name,value:parseInt(l.province_code)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(F,{span:6},{default:u(()=>[t(b,{class:"flex-1",modelValue:a(o).city_id,"onUpdate:modelValue":e[6]||(e[6]=l=>a(o).city_id=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9",onChange:e[7]||(e[7]=l=>P(a(o).city_id,!1))},{default:u(()=>[(s(!0),g(B,null,D(a(p).cityList,(l,d)=>(s(),c(V,{key:d,label:l.city_name,value:parseInt(l.city_code)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(F,{span:6},{default:u(()=>[t(b,{class:"flex-1",modelValue:a(o).area_id,"onUpdate:modelValue":e[8]||(e[8]=l=>a(o).area_id=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9"},{default:u(()=>[(s(!0),g(B,null,D(a(p).areaList,(l,d)=>(s(),c(V,{key:d,label:l.area_name,value:parseInt(l.area_code)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(r,{label:"\u914D\u9001\u8303\u56F4(km)",prop:"title"},{default:u(()=>[t(T,{modelValue:a(o).range,"onUpdate:modelValue":e[9]||(e[9]=l=>a(o).range=l),step:1},null,8,["modelValue"])]),_:1}),t(r,{label:"\u95E8\u5E97\u8BE6\u7EC6\u5730\u5740",prop:"title",class:"w-[900px] h-[600px]"},{default:u(()=>[t(ue,{formData:a(o)},null,8,["formData"])]),_:1})]),_:1}),t(w,{label:"\u914D\u9001\u8BBE\u7F6E",name:"second"},{default:u(()=>[t(r,{label:"\u540C\u57CE\u914D\u9001",prop:"title"},{default:u(()=>[t(E,{modelValue:a(o).isCity,"onUpdate:modelValue":e[10]||(e[10]=l=>a(o).isCity=l),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1}),t(r,{label:"\u5230\u5E97\u81EA\u63D0",prop:"title"},{default:u(()=>[t(E,{modelValue:a(o).isSelf,"onUpdate:modelValue":e[11]||(e[11]=l=>a(o).isSelf=l),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1}),t(r,{label:"\u9ED8\u8BA4\u914D\u9001\u65B9\u5F0F",prop:"title"},{default:u(()=>[t($,{modelValue:a(o).defalut_types,"onUpdate:modelValue":e[12]||(e[12]=l=>a(o).defalut_types=l),class:"ml-4"},{default:u(()=>[t(C,{label:"1",size:"large"},{default:u(()=>[f("\u914D\u9001")]),_:1}),t(C,{label:"2",size:"large"},{default:u(()=>[f("\u81EA\u63D0")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["model","rules"]),t(z,{type:"primary",onClick:S},{default:u(()=>[f("\u4FDD\u5B58")]),_:1})])]),_:1})}}});export{he as default};
|