import{C as U,D as j,N as K,O,w as q,F as G,K as H,G as M,b as Q,H as Z,I as z}from"./element-plus.8e273e86.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{u as W}from"./usePaging.f8c888e4.js";import{u as X}from"./useDictOptions.398988e6.js";import{d as Y,e as ee}from"./store_product_price.3c62f082.js";import{d as g,s as te,r as k,Z as oe,ap as le,o as m,c as ue,U as t,L as l,u,R as f,M as b,K as E,a as r,S as a,Q as h,j as ae,n as re}from"./@vue.76ce7aa3.js";import"./lodash.41b9567d.js";import{f as ie}from"./index.7ae54951.js";import{_ as se}from"./edit.vue_vue_type_script_setup_true_name_storeProductPriceEdit_lang.ffebbce5.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.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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"./index.e88a03af.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const ne={class:"mt-4"},pe={class:"flex mt-4 justify-end"},me=g({name:"storeProductPriceLists"}),et=g({...me,setup(de){const v=te(),F=k(!1),s=oe({store_name:"",status:""});k([]);const{dictData:y}=X(""),{pager:n,getLists:d,resetParams:V,resetPage:x}=W({fetchFun:ee,params:s}),P=async p=>{var o,c;F.value=!0,await re(),(o=v.value)==null||o.open("edit"),(c=v.value)==null||c.setFormData(p)},S=async p=>{await ie.confirm("\u662F\u5426\u6539\u4EF7:"+p.store_name),await Y({id:p.id}),d()};return d(),(p,o)=>{const c=U,C=j,w=K,L=O,_=q,N=G,B=H,i=M,R=Q,$=Z,A=J,D=le("perms"),I=z;return m(),ue("div",null,[t(B,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[t(N,{class:"mb-[-16px]",model:u(s),inline:""},{default:l(()=>[t(C,{label:"\u5546\u54C1",prop:"store_name"},{default:l(()=>[t(c,{class:"w-[280px]",modelValue:u(s).store_name,"onUpdate:modelValue":o[0]||(o[0]=e=>u(s).store_name=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),t(C,{label:"\u72B6\u6001",prop:"status"},{default:l(()=>[t(L,{modelValue:u(s).status,"onUpdate:modelValue":o[1]||(o[1]=e=>u(s).status=e),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",style:{width:"240px"}},{default:l(()=>[t(w,{value:0,label:"\u672A\u8BBE\u7F6E"}),t(w,{value:1,label:"\u5DF2\u8BBE\u7F6E"})]),_:1},8,["modelValue"])]),_:1}),t(C,null,{default:l(()=>[t(_,{type:"primary",onClick:u(x)},{default:l(()=>o[4]||(o[4]=[f("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(_,{onClick:u(V)},{default:l(()=>o[5]||(o[5]=[f("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),b((m(),E(B,{class:"!border-none",shadow:"never"},{default:l(()=>[r("div",ne,[t($,{data:u(n).lists},{default:l(()=>[t(i,{label:"\u6EAF\u6E90",width:"150"},{default:l(({row:e})=>[r("div",null,"id: "+a(e.id),1),r("div",null,"\u9884\u8BA2\u5355id: "+a(e.bhoid),1),r("div",null,"\u91C7\u8D2D\u6E90id: "+a(e.offer_id),1)]),_:1}),t(i,{label:"\u5546\u54C1\u4FE1\u606F",width:"150","show-overflow-tooltip":""},{default:l(({row:e})=>[r("div",null,"\u5546\u54C1\u540D\u79F0: "+a(e.store_name),1),r("div",null,"\u5355\u4F4D: "+a(e.unit_name),1)]),_:1}),t(i,{label:"\u89C4\u683C",prop:"store_info","show-overflow-tooltip":""}),t(i,{label:"\u5546\u54C1\u56FE\u7247",prop:"image",width:"120"},{default:l(({row:e})=>[t(R,{style:{width:"50px",height:"50px"},src:e.image,"preview-teleported":!0},null,8,["src"])]),_:1}),t(i,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase_price","show-overflow-tooltip":""}),t(i,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","show-overflow-tooltip":""},{default:l(({row:e})=>[r("div",null,"\u8BBE\u7F6E\u4EF7:"+a(e.purchase)+"|"+a(e.purchase_lv)+"%",1),r("div",null,"\u5F53\u524D\u4EF7:"+a(e.current_purchase),1)]),_:1}),t(i,{label:"\u5546\u6237\u4EF7",prop:"cost","show-overflow-tooltip":""},{default:l(({row:e})=>[r("div",null,"\u8BBE\u7F6E\u4EF7:"+a(e.cost)+"|"+a(e.cost_lv)+"%",1),r("div",null,"\u5F53\u524D\u4EF7:"+a(e.current_cost),1)]),_:1}),t(i,{label:"\u96F6\u552E\u4EF7",prop:"price","show-overflow-tooltip":""},{default:l(({row:e})=>[r("div",null,"\u8BBE\u7F6E\u4EF7:"+a(e.price)+"|"+a(e.price_lv)+"%",1),r("div",null,"\u5F53\u524D\u4EF7:"+a(e.current_price),1)]),_:1}),t(i,{label:"\u72B6\u6001",prop:"status_name","show-overflow-tooltip":""}),t(i,{label:"\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":"",width:"180"}),t(i,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),t(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:e})=>[e.status==0?b((m(),E(_,{key:0,type:"primary",link:"",onClick:T=>P(e)},{default:l(()=>o[6]||(o[6]=[f(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[D,["store_product_price.store_product_price/edit"]]]):h("",!0),e.status==0?b((m(),E(_,{key:1,type:"danger",link:"",onClick:T=>S(e)},{default:l(()=>o[7]||(o[7]=[f(" \u786E\u8BA4 ")])),_:2},1032,["onClick"])),[[D,["store_product_price.store_product_price/delete"]]]):h("",!0)]),_:1})]),_:1},8,["data"])]),r("div",pe,[t(A,{modelValue:u(n),"onUpdate:modelValue":o[2]||(o[2]=e=>ae(n)?n.value=e:null),onChange:u(d)},null,8,["modelValue","onChange"])])]),_:1})),[[I,u(n).loading]]),u(F)?(m(),E(se,{key:0,ref_key:"editRef",ref:v,"dict-data":u(y),onSuccess:u(d),onClose:o[3]||(o[3]=e=>F.value=!1)},null,8,["dict-data","onSuccess"])):h("",!0)])}}});export{et as default};