2024-06-20 18:07:07 +08:00
|
|
|
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.61695454.js";import{r as _}from"./index.f207e39d.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.165ed42a.js";import{d as k,s as ne,r as re,a0 as F,i as se,o as s,M as c,O as u,a as ie,W as t,u as a,j as pe,c as y,V as g,a7 as B,T 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 me(){return _.get({url:"/config/province"})}function de(i){return _.get({url:"/config/city",params:i})}function _e(i){return _.get({url:"/config/area",params:i})}function ce(){return _.post({url:"/config/store"})}function fe(i){return _.post({url:"/config/saveStore",params:i})}const ve={class:"w-[900px]"},Ee=k({name:"oaPlanEdit"}),Ze=k({...Ee,setup(i){const L=ne(),f=re("first"),p=F({provinceList:[],cityList:[],areaList:[],townList:[]}),o=F({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}),x=F({}),U=async n=>{for(const e in o)n[e]!=null&&n[e]!=null&&(o[e]=n[e])};se(()=>{ce().then(n=>{U(n)})});const S=async()=>{var e;await((e=L.value)==null?void 0:e.validate());const n={...o};await fe(n)},A=async n=>{let e=await me();if(p.provinceList=e,n)return Promise.resolve({msg:"\u83B7\u53D6\u6210\u529F"})},R=async(n,e)=>{let m=await de({code:n});if(p.cityList=m,e)return Promise.resolve({msg:"\u83B7\u53D6\u6210\u529F"})},P=async(n,e)=>{let m=await _e({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,v=X,I=O,E=Y,V=Z,b=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(()=>[ie("div",ve,[t(H,{ref_key:"formRef",ref:L,model:a(o),"label-width":"120px",rules:a(x)},{default:u(()=>[t(G,{modelValue:a(f),"onUpdate:modelValue":e[13]||(e[13]=l=>pe(f)?f.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(v,{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"},{d
|