2 lines
6.6 KiB
JavaScript
2 lines
6.6 KiB
JavaScript
import{k as Q,G as W,H as X,D as Y,C as ee,w as te,F as ue,M as oe,I as le,J as ae,N as ne,K as re}from"./element-plus.b2546c95.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang.00c0a49e.js";import{r as w,f as L,b as se}from"./index.fae88678.js";import{u as de}from"./usePaging.f8c888e4.js";import{u as pe}from"./useDictOptions.25e27f78.js";import{d as I,r as g,Z as me,ap as ce,o as n,c as E,U as t,L as u,u as l,T as S,a9 as Z,K as y,R as m,M as k,a as V,S as Ce,Q as _e,j as x}from"./@vue.76ce7aa3.js";import"./lodash.4e6d2a38.js";import{_ as fe}from"./productPop.vue_vue_type_script_setup_true_name_systemStoreLists_lang.259e55b0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./store_product.2ceba00c.js";function ve(r){return w.get({url:"/activityzone/lists",params:r})}function Ee(r){return w.post({url:"/activityzone/add",params:r})}function ye(r){return w.post({url:"/activityzone/delete",params:r})}function Fe(r){return w.get({url:"/activityzone/export",params:r})}const Be={class:"mt-4"},ke={key:0},we={class:"flex mt-4 justify-end"},be=I({name:"activityZoneLists"}),pt=I({...be,setup(r){const C=g(!1),_=g(!1),a=me({type:"",keyword:"",remark:"\u6570\u91CF\u91D1\u989D\u6700\u7EC8\u4EE5\u5B9E\u9645\u6536\u8D27\u91D1\u989D\u7ED3\u7B97\uFF0C\u591A\u9000\u5C11\u8865\uFF1B\u751F\u9C9C\u4E0B\u5355\u540E\u4E0D\u9000\u6362\uFF0C\u6563\u8D27\u65E0\u5305\u88C5\u5F53\u9762\u9A8C\u6536\u540E\u4E0D\u9000\u6362\uFF0C\u5305\u88C5\u5546\u54C1\u5DF2\u7ECF\u6253\u5F00\u5305\u88C5\u6216\u8005\u5305\u88C5\u635F\u574F\u4E0D\u9000\u6362\u3002\u9752\u83DC\u7C7B\u3001\u8304\u679C\u7C7B\u3001\u6839\u830E\u7C7B\u3001\u9C9C\u83C7\u7C7B\u3001\u6C34\u4EA7\u7C7B\uFF0C\u4EE5\u5B9E\u9645\u91CD\u91CF\u4E3A\u51C6\u3002"}),b=g([]),M=i=>{b.value=i.map(({id:e})=>e)},N=async(i,e)=>{let c={type:e,product_ids:[]};i.forEach(B=>{c.product_ids.find(s=>s.id==B.id)||c.product_ids.push(B.id)}),await Ee(c),C.value=!1,F()},h=()=>{C.value=!0},{dictData:A}=pe("activity_zone"),{pager:f,getLists:F,resetParams:R,resetPage:T}=de({fetchFun:ve,params:a}),z=async i=>{await L.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ye({id:i}),F()},j=()=>{if(a.type==""){L.alertError("\u8BF7\u9009\u62E9\u7C7B\u578B");return}_.value=!0},q=()=>{_.value=!1,Fe({type:a.type,remark:a.remark}).then(i=>{window.open(i.url,"_blank"),Q.success("\u5BFC\u51FA\u6210\u529F")})};return F(),(i,e)=>{const c=W,B=X,s=Y,P=ee,d=te,K=ue,U=oe,O=se,p=le,G=ae,H=ie,$=ne,D=ce("perms"),J=re;return n(),E("div",null,[t(U,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[t(K,{class:"mb-[-16px]",model:l(a),inline:""},{default:u(()=>[t(s,{class:"w-[180px]",label:"\u7C7B\u578B",prop:"type"},{default:u(()=>[t(B,{modelValue:l(a).type,"onUpdate:modelValue":e[0]||(e[0]=o=>l(a).type=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B"},{default:u(()=>[t(c,{label:"\u5168\u90E8",value:""}),(n(!0),E(S,null,Z(l(A).activity_zone,(o,v)=>(n(),y(c,{key:v,label:o.remark,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(s,{label:"\u5546\u54C1",prop:"keyword"},{default:u(()=>[t(P,{class:"w-[280px]",modelValue:l(a).keyword,"onUpdate:modelValue":e[1]||(e[1]=o=>l(a).keyword=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),t(s,null,{default:u(()=>[t(d,{type:"primary",onClick:l(T)},{default:u(()=>e[9]||(e[9]=[m("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(d,{onClick:l(R)},{default:u(()=>e[10]||(e[10]=[m("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),k((n(),y(U,{class:"!border-none",shadow:"never"},{default:u(()=>[k((n(),y(d,{type:"primary",onClick:e[2]||(e[2]=o=>h())},{icon:u(()=>[t(O,{name:"el-icon-Plus"})]),default:u(()=>[e[11]||(e[11]=m(" \u65B0\u589E "))]),_:1})),[[D,["activity_zone/add"]]]),k((n(),y(d,{disabled:!l(b).length,onClick:e[3]||(e[3]=o=>z(l(b)))},{default:u(()=>e[12]||(e[12]=[m(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[D,["activity_zone/delete"]]]),t(d,{onClick:e[4]||(e[4]=o=>j())},{default:u(()=>e[13]||(e[13]=[m(" \u5BFC\u51FA ")])),_:1}),V("div",Be,[t(G,{data:l(f).lists,onSelectionChange:M},{default:u(()=>[t(p,{type:"selection",width:"55"}),t(p,{label:"ID",prop:"id","show-overflow-tooltip":""}),t(p,{label:"\u7C7B\u578B",prop:"type"},{default:u(({row:o})=>[(n(!0),E(S,null,Z(l(A).activity_zone,(v,De)=>(n(),E("div",null,[v.value==o.type?(n(),E("div",ke,Ce(v.remark),1)):_e("",!0)]))),256))]),_:1}),t(p,{label:"\u5546\u54C1ID",prop:"product_id","show-overflow-tooltip":""}),t(p,{label:"\u5546\u54C1",prop:"store_name","show-overflow-tooltip":""}),t(p,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),t(p,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:u(({row:o})=>[k((n(),y(d,{type:"danger",link:"",onClick:v=>z(o.id)},{default:u(()=>e[14]||(e[14]=[m(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[D,["activity_zone/delete"]]])]),_:1})]),_:1},8,["data"])]),V("div",we,[t(H,{modelValue:l(f),"onUpdate:modelValue":e[5]||(e[5]=o=>x(f)?f.value=o:null),onChange:l(F)},null,8,["modelValue","onChange"])])]),_:1})),[[J,l(f).loading]]),t($,{modelValue:l(C),"onUpdate:modelValue":e[6]||(e[6]=o=>x(C)?C.value=o:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:u(()=>[t(fe,{onOnBindStore:N})]),_:1},8,["modelValue"]),t($,{modelValue:l(_),"onUpdate:modelValue":e[8]||(e[8]=o=>x(_)?_.value=o:null),title:"\u8868\u5355\u5907\u6CE8",width:"50%",center:""},{default:u(()=>[V("div",null,[t(s,{label:"\u5907\u6CE8",prop:"remark"},{default:u(()=>[t(P,{rows:3,type:"textarea",modelValue:l(a).remark,"onUpdate:modelValue":e[7]||(e[7]=o=>l(a).remark=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1}),t(s,{style:{"margin-left":"45%"}},{default:u(()=>[t(d,{type:"primary",onClick:q},{default:u(()=>e[15]||(e[15]=[m("\u5BFC\u51FA")])),_:1})]),_:1})])]),_:1},8,["modelValue"])])}}});export{pt as default};
|