2 lines
6.6 KiB
JavaScript
2 lines
6.6 KiB
JavaScript
|
import{a5 as O,$ as j,a0 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.a40e8d80.js";import{r as _}from"./index.9d786a17.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.1b5d92a8.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.43c06794.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\u57
|