谢杰标 2 лет назад
Родитель
Сommit
48c548ad21

+ 43 - 0
src/api/goods/index.js

@@ -59,3 +59,46 @@ export function mgoodscategorybatchdel(data) {
     data,
   });
 }
+
+// 积分商品列表
+export function goodslistPoints(data) {
+  return request({
+    url: "/goods/listPoints",
+    method: "get",
+    params: data,
+  });
+}
+//新增积分商品
+export function addgoodspoints(data) {
+  return request({
+    url: "/goods/points",
+    method: "post",
+    data,
+  });
+}
+//编辑积分商品
+export function editgoodspoints(data) {
+  return request({
+    url: "/goods/updatePoints",
+    method: "post",
+    data,
+  });
+}
+
+// 商品详情
+export function getGoodsDetail(id) {
+  return request({
+    url: "/goods/points/" + id,
+    method: "get",
+  });
+}
+
+// 积分规则
+export function getPointsRule(data) {
+  return request({
+    url: "/store/configKey/pointsRule",
+    method: "get",
+    params: data,
+  });
+}
+

+ 7 - 0
src/assets/icons/svg/icon_goods.svg

@@ -0,0 +1,7 @@
+<svg width="22" height="22" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
+<g id="icon_&#229;&#149;&#134;&#229;&#147;&#129;&#231;&#174;&#161;&#231;&#144;&#134;">
+<path id="Vector" d="M16.8983 2.32764H5.20422C3.63452 2.32764 2.35742 3.60474 2.35742 5.17444V16.8685C2.35742 18.4382 3.63452 19.7153 5.20422 19.7153H16.8983C18.468 19.7153 19.7451 18.4382 19.7451 16.8685V5.17334C19.7451 3.60364 18.468 2.32764 16.8983 2.32764ZM18.4251 16.8674C18.4251 17.7089 17.7398 18.3942 16.8983 18.3942H5.20422C4.36272 18.3942 3.67742 17.7089 3.67742 16.8674V5.17334C3.67742 4.33184 4.36272 3.64654 5.20422 3.64654H16.8983C17.7398 3.64654 18.4251 4.33184 18.4251 5.17334V16.8674Z"/>
+<path id="Vector_2" d="M11.052 9.65696C12.8142 9.65696 14.3641 8.53166 14.9075 6.85636C15.0197 6.50986 14.8305 6.13695 14.484 6.02475C14.1364 5.91255 13.7646 6.10176 13.6524 6.44826C13.2861 7.57796 12.2411 8.33696 11.052 8.33696C9.86405 8.33696 8.81905 7.57796 8.45165 6.44936C8.33945 6.10286 7.96655 5.91366 7.62005 6.02586C7.53759 6.05259 7.46122 6.09532 7.3953 6.1516C7.32938 6.20788 7.2752 6.2766 7.23586 6.35384C7.19653 6.43108 7.17281 6.51532 7.16606 6.60173C7.15932 6.68815 7.16968 6.77505 7.19655 6.85745C7.73995 8.53165 9.28985 9.65696 11.052 9.65696Z"/>
+<path id="Vector_3" d="M14.5497 15.2988H7.55258C7.18848 15.2988 6.89258 15.5947 6.89258 15.9588C6.89258 16.3229 7.18848 16.6188 7.55258 16.6188H14.5497C14.9138 16.6188 15.2097 16.3229 15.2097 15.9588C15.2097 15.5947 14.9149 15.2988 14.5497 15.2988Z"/>
+</g>
+</svg>

+ 6 - 0
src/assets/icons/svg/icon_member.svg

@@ -0,0 +1,6 @@
+<svg width="22" height="22" viewBox="0 0 22 22"  xmlns="http://www.w3.org/2000/svg">
+<g id="icon_&#228;&#188;&#154;&#229;&#145;&#152;&#231;&#174;&#161;&#231;&#144;&#134;">
+<path id="Vector" d="M19.9121 7.79139L16.9234 3.80279C16.49 3.22419 15.7992 2.87769 15.0754 2.87769H6.92548C6.20498 2.87769 5.51528 3.22089 5.08188 3.79619L2.03708 7.83319C1.36718 8.72089 1.42548 9.96059 2.17568 10.7812L9.28278 18.5648C9.49927 18.8016 9.76264 18.9907 10.0562 19.1203C10.3497 19.2498 10.6669 19.3169 10.9878 19.3172H10.9933C11.6434 19.3161 12.2649 19.0378 12.7005 18.556L19.7779 10.724C20.516 9.90779 20.5732 8.67359 19.9121 7.79139ZM18.7978 9.84069L11.7215 17.6716C11.6297 17.7747 11.5169 17.857 11.3908 17.9132C11.2647 17.9693 11.128 17.998 10.99 17.9972H10.9878C10.7062 17.9972 10.4466 17.8828 10.2574 17.6749L3.14918 9.89239C2.82798 9.54039 2.80268 9.00909 3.08978 8.62959L6.13568 4.59259C6.2282 4.47065 6.34759 4.37169 6.48457 4.30339C6.62154 4.2351 6.77242 4.1993 6.92548 4.19879H15.0754C15.3856 4.19879 15.6815 4.34729 15.8674 4.59479L18.8561 8.58339C18.9932 8.76738 19.0624 8.99322 19.0517 9.22246C19.0411 9.4517 18.9514 9.67017 18.7978 9.84069Z"/>
+<path id="Vector_2" d="M14.3198 9.64473L10.9736 13.1713L7.62524 9.62163C7.50514 9.49437 7.33943 9.41999 7.16453 9.41484C6.98962 9.40968 6.81982 9.47417 6.69244 9.59413C6.56517 9.71423 6.4908 9.87994 6.48564 10.0548C6.48048 10.2297 6.54497 10.3995 6.66494 10.5269L10.4918 14.5837C10.5535 14.6491 10.6278 14.7011 10.7103 14.7367C10.7927 14.7722 10.8816 14.7906 10.9714 14.7905H10.9725C11.154 14.7905 11.3267 14.7157 11.451 14.5848L15.2779 10.5522C15.5287 10.2882 15.5177 9.87023 15.2537 9.61943C15.1908 9.55975 15.1167 9.51307 15.0356 9.48204C14.9546 9.45101 14.8683 9.43625 14.7815 9.4386C14.6948 9.44095 14.6094 9.46036 14.5302 9.49573C14.451 9.5311 14.3795 9.58173 14.3198 9.64473Z"/>
+</g>
+</svg>

+ 6 - 0
src/assets/icons/svg/icon_record.svg

@@ -0,0 +1,6 @@
+<svg width="22" height="22" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
+<g id="icon_&#230;&#160;&#184;&#233;&#148;&#128;&#231;&#174;&#161;&#231;&#144;&#134;">
+<path id="Vector" d="M18.4307 5.22828L12.4566 1.77978C11.6118 1.29248 10.5624 1.29248 9.71762 1.77978L3.74352 5.22828C2.89872 5.71558 2.37402 6.62528 2.37402 7.60098V14.4991C2.37402 15.4748 2.89872 16.3834 3.74352 16.8718L9.71762 20.3203C10.14 20.5645 10.6141 20.6866 11.0871 20.6866C11.5601 20.6866 12.0342 20.5645 12.4566 20.3203L18.4307 16.8718C19.2755 16.3845 19.8002 15.4748 19.8002 14.4991V7.59988C19.8002 6.62418 19.2755 5.71558 18.4307 5.22828ZM18.4802 14.498C18.4802 15.0029 18.2085 15.4748 17.7707 15.7267L11.7966 19.1752C11.3588 19.4282 10.8154 19.4282 10.3776 19.1752L4.40352 15.7267C3.96572 15.4737 3.69402 15.0029 3.69402 14.498V7.59988C3.69402 7.09498 3.96572 6.62308 4.40352 6.37118L10.3776 2.92158C10.5965 2.79508 10.8418 2.73238 11.0871 2.73238C11.3324 2.73238 11.5777 2.79508 11.7966 2.92158L17.7707 6.37118C18.2085 6.62418 18.4802 7.09498 18.4802 7.59988V14.498Z"/>
+<path id="Vector_2" d="M14.1237 10.7438C14.4878 10.7438 14.7837 10.4479 14.7837 10.0838C14.7837 9.7197 14.4878 9.4238 14.1237 9.4238H12.6541L13.9708 8.0158C14.0902 7.88783 14.1539 7.7177 14.1479 7.54279C14.1419 7.36789 14.0668 7.20251 13.9389 7.083C13.811 6.96362 13.6408 6.89992 13.4659 6.9059C13.291 6.91189 13.1256 6.98705 13.0061 7.1149L11.0723 9.184L9.17703 7.1886C9.11734 7.12575 9.04585 7.0753 8.96664 7.04012C8.88743 7.00494 8.80206 6.98572 8.71542 6.98358C8.62877 6.98143 8.54256 6.9964 8.4617 7.02761C8.38085 7.05883 8.30695 7.10568 8.24423 7.1655C8.18138 7.22518 8.13093 7.29667 8.09575 7.37588C8.06057 7.45509 8.04135 7.54046 8.03921 7.6271C8.03706 7.71375 8.05203 7.79996 8.08324 7.88082C8.11446 7.96167 8.16131 8.03557 8.22113 8.0983L9.48173 9.4238H8.05173C7.68763 9.4238 7.39173 9.7197 7.39173 10.0838C7.39173 10.4479 7.68763 10.7438 8.05173 10.7438H10.4288V12.2343H8.05063C7.68653 12.2343 7.39062 12.5302 7.39062 12.8943C7.39062 13.2584 7.68653 13.5543 8.05063 13.5543H10.4277V14.9832C10.4277 15.3473 10.7236 15.6432 11.0877 15.6432C11.4518 15.6432 11.7477 15.3473 11.7477 14.9832V13.5543H14.1248C14.4889 13.5543 14.7848 13.2584 14.7848 12.8943C14.7848 12.5302 14.4889 12.2343 14.1248 12.2343H11.7477V10.7438H14.1237Z">
+</g>
+</svg>

+ 7 - 0
src/assets/icons/svg/icon_report.svg

@@ -0,0 +1,7 @@
+<svg width="22" height="22" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
+<g id="icon_&#230;&#149;&#176;&#230;&#141;&#174;&#230;&#138;&#165;&#232;&#161;&#168;">
+<path id="Vector" d="M16.9869 17.4097C16.8186 17.4097 16.6514 17.3459 16.5227 17.2183L10.5112 11.2673C10.4492 11.206 10.4 11.133 10.3664 11.0526C10.3328 10.9721 10.3155 10.8858 10.3154 10.7987V2.55966C10.3154 2.19556 10.6113 1.89966 10.9754 1.89966C11.3395 1.89966 11.6354 2.19556 11.6354 2.55966V10.5237L17.4511 16.28C17.5754 16.4033 17.6456 16.5709 17.6464 16.746C17.6472 16.9211 17.5786 17.0893 17.4555 17.2139C17.3943 17.2759 17.3213 17.3252 17.2409 17.3588C17.1604 17.3924 17.0741 17.4097 16.9869 17.4097Z"/>
+<path id="Vector_2" d="M19.3109 11.386H11.2996C10.9355 11.386 10.6396 11.0901 10.6396 10.726C10.6396 10.3619 10.9355 10.066 11.2996 10.066H19.3109C19.675 10.066 19.9709 10.3619 19.9709 10.726C19.9709 11.0901 19.6761 11.386 19.3109 11.386Z"/>
+<path id="Vector_3" d="M11.0161 20.0079C5.94178 20.0079 1.81348 15.8796 1.81348 10.8053C1.81348 5.73096 5.94178 1.60266 11.0161 1.60266C16.0904 1.60266 20.2187 5.73096 20.2187 10.8053C20.2187 15.8796 16.0893 20.0079 11.0161 20.0079ZM11.0161 2.92376C6.66998 2.92376 3.13348 6.46026 3.13348 10.8064C3.13348 15.1525 6.66888 18.689 11.0161 18.689C15.3633 18.689 18.8987 15.1525 18.8987 10.8064C18.8987 6.46026 15.3622 2.92376 11.0161 2.92376Z"/>
+</g>
+</svg>

+ 7 - 0
src/assets/icons/svg/icon_staff.svg

@@ -0,0 +1,7 @@
+<svg width="22" height="22" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
+<g id="icon_&#229;&#186;&#151;&#229;&#145;&#152;&#231;&#174;&#161;&#231;&#144;&#134;">
+<path id="Vector" d="M16.8787 2.32761H5.18567C3.61597 2.32761 2.33887 3.60471 2.33887 5.17441V16.8685C2.33887 18.4382 3.61597 19.7153 5.18567 19.7153H16.8798C18.4495 19.7153 19.7266 18.4382 19.7266 16.8685V5.17331C19.7255 3.60361 18.4484 2.32761 16.8787 2.32761ZM18.4055 16.8674C18.4055 17.7089 17.7202 18.3942 16.8787 18.3942H5.18567C4.34417 18.3942 3.65887 17.7089 3.65887 16.8674V5.17331C3.65887 4.33181 4.34417 3.64651 5.18567 3.64651H16.8798C17.7213 3.64651 18.4066 4.33181 18.4066 5.17331V16.8674H18.4055Z"/>
+<path id="Vector_2" d="M14.9444 15.4825H7.11898C6.75488 15.4825 6.45898 15.7784 6.45898 16.1425C6.45898 16.5066 6.75488 16.8025 7.11898 16.8025H14.9455C15.3096 16.8025 15.6055 16.5066 15.6055 16.1425C15.6055 15.7784 15.3096 15.4825 14.9444 15.4825Z"/>
+<path id="Vector_3" d="M7.17563 14.7092H14.8888C15.2529 14.7092 15.5488 14.4133 15.5488 14.0492C15.5488 12.1374 14.3542 10.5006 12.6734 9.8428C13.2641 9.3632 13.6436 8.6328 13.6436 7.8144C13.6436 6.3745 12.4721 5.203 11.0322 5.203C9.59233 5.203 8.42083 6.3745 8.42083 7.8144C8.42083 8.6328 8.79922 9.3643 9.39102 9.8428C7.71022 10.5006 6.51562 12.1374 6.51562 14.0492C6.51562 14.4144 6.81153 14.7092 7.17563 14.7092ZM11.0322 6.5241C11.7439 6.5241 12.3236 7.1027 12.3236 7.8155C12.3236 8.5283 11.745 9.1058 11.0322 9.1058C10.3194 9.1058 9.74083 8.5272 9.74083 7.8155C9.74083 7.1038 10.3205 6.5241 11.0322 6.5241ZM11.0322 10.8537C12.5689 10.8537 13.8548 11.9427 14.1595 13.3903H7.90383C8.20963 11.9427 9.49553 10.8537 11.0322 10.8537Z"/>
+</g>
+</svg>

Разница между файлами не показана из-за своего большого размера
+ 2 - 0
src/assets/icons/svg/icon_store.svg


+ 7 - 0
src/assets/icons/svg/icon_strik.svg

@@ -0,0 +1,7 @@
+<svg width="22" height="22" viewBox="0 0 22 22"  xmlns="http://www.w3.org/2000/svg">
+<g id="icon_&#229;&#134;&#178;&#232;&#180;&#166;&#231;&#174;&#161;&#231;&#144;&#134;">
+<path id="Vector" d="M10.4108 18.7451H5.69182C4.88222 18.7451 4.22332 18.0862 4.22332 17.2766V6.28428C4.22332 5.47468 4.88222 4.81578 5.69182 4.81578H6.90622C7.03932 5.78158 7.86762 6.52848 8.86862 6.52848H12.7615C13.7636 6.52848 14.5919 5.78158 14.7239 4.81578H15.9383C16.7479 4.81578 17.4068 5.47468 17.4068 6.28428V10.6359C17.4068 11 17.7027 11.2959 18.0668 11.2959C18.4309 11.2959 18.7268 11 18.7268 10.6359V6.28428C18.7268 4.74648 17.4761 3.49578 15.9383 3.49578H14.7085C14.5347 2.57948 13.7284 1.88318 12.7615 1.88318H8.86972C7.90282 1.88318 7.09652 2.57838 6.92272 3.49578H5.69182C4.15402 3.49578 2.90332 4.74648 2.90332 6.28428V17.2755C2.90332 18.8133 4.15402 20.064 5.69182 20.064H10.4108C10.7749 20.064 11.0708 19.7681 11.0708 19.404C11.0708 19.0399 10.7749 18.7451 10.4108 18.7451ZM8.20642 3.86648C8.20642 3.50018 8.50452 3.20318 8.86972 3.20318H12.7626C13.1289 3.20318 13.4259 3.50128 13.4259 3.86648V4.54518C13.4259 4.91148 13.1278 5.20848 12.7626 5.20848H8.86972C8.50342 5.20848 8.20642 4.91038 8.20642 4.54518V3.86648Z"/>
+<path id="Vector_2" d="M19.4264 15.3868L18.1108 13.1076C17.9707 12.8657 17.7695 12.6649 17.5275 12.5252C17.2854 12.3854 17.0109 12.3116 16.7314 12.3112H14.1002C13.5326 12.3112 13.0035 12.617 12.7208 13.1076L11.4052 15.3868C11.2658 15.629 11.1924 15.9036 11.1924 16.1832C11.1924 16.4627 11.2658 16.7373 11.4052 16.9796L12.7208 19.2588C13.0046 19.7505 13.5337 20.0552 14.1002 20.0552H16.7314C17.299 20.0552 17.8281 19.7494 18.1108 19.2588L19.4264 16.9796C19.5659 16.7373 19.6393 16.4627 19.6393 16.1832C19.6393 15.9036 19.5659 15.629 19.4264 15.3868ZM18.2835 16.3207L16.9679 18.5999C16.9195 18.6846 16.8282 18.7363 16.7314 18.7363H14.1002C14.0034 18.7363 13.9121 18.6835 13.8637 18.5999L12.5481 16.3207C12.4997 16.236 12.4997 16.1315 12.5481 16.0468L13.8637 13.7676C13.9121 13.6829 14.0034 13.6312 14.1002 13.6312H16.7314C16.8293 13.6312 16.9195 13.684 16.9679 13.7676L18.2835 16.0468C18.3319 16.1315 18.3319 16.236 18.2835 16.3207Z"/>
+<path id="Vector_3" d="M15.4145 14.5178C14.496 14.5178 13.7491 15.2647 13.7491 16.1832C13.7491 17.1017 14.496 17.8486 15.4145 17.8486C16.333 17.8486 17.0799 17.1017 17.0799 16.1832C17.0799 15.2647 16.333 14.5178 15.4145 14.5178ZM15.4145 16.6397C15.1626 16.6397 14.9591 16.4351 14.9591 16.1843C14.9591 15.9335 15.1637 15.7289 15.4145 15.7289C15.6653 15.7289 15.8699 15.9335 15.8699 16.1843C15.8699 16.4351 15.6664 16.6397 15.4145 16.6397ZM14.8766 10.3147C14.8766 9.95056 14.5807 9.65466 14.2166 9.65466H7.55063C7.18653 9.65466 6.89062 9.95056 6.89062 10.3147C6.89062 10.6788 7.18653 10.9747 7.55063 10.9747H14.2177C14.5818 10.9747 14.8766 10.6788 14.8766 10.3147ZM7.55063 14.1713C7.18653 14.1713 6.89062 14.4672 6.89062 14.8313C6.89062 15.1954 7.18653 15.4913 7.55063 15.4913H9.36782C9.73192 15.4913 10.0278 15.1954 10.0278 14.8313C10.0278 14.4672 9.73192 14.1713 9.36782 14.1713H7.55063Z"/>
+</g>
+</svg>

+ 9 - 0
src/assets/icons/svg/icon_type.svg

@@ -0,0 +1,9 @@
+<svg width="22" height="22" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
+<g id="icon_&#229;&#149;&#134;&#229;&#147;&#129;&#229;&#136;&#134;&#231;&#177;&#187;">
+<path id="Vector" d="M16.911 2.24731H5.21692C3.64722 2.24731 2.37012 3.52441 2.37012 5.09411V16.7882C2.37012 18.3579 3.64722 19.635 5.21692 19.635H16.911C18.4807 19.635 19.7578 18.3579 19.7578 16.7882V5.09411C19.7567 3.52441 18.4796 2.24731 16.911 2.24731ZM18.4367 16.7882C18.4367 17.6297 17.7514 18.315 16.9099 18.315H5.21692C4.37542 18.315 3.69012 17.6297 3.69012 16.7882V5.09411C3.69012 4.25261 4.37542 3.56731 5.21692 3.56731H16.911C17.7525 3.56731 18.4378 4.25261 18.4378 5.09411V16.7882H18.4367Z"/>
+<path id="Vector_2" d="M8.58143 11.8547H5.69613C5.33203 11.8547 5.03613 12.1506 5.03613 12.5147V15.5782C5.03613 15.9423 5.33203 16.2382 5.69613 16.2382H8.58143C8.94553 16.2382 9.24143 15.9423 9.24143 15.5782V12.5147C9.24143 12.1495 8.94663 11.8547 8.58143 11.8547ZM7.92143 14.9182H6.35613V13.1747H7.92143V14.9182Z" />
+<path id="Vector_3" d="M16.5558 11.8547H10.7489C10.3848 11.8547 10.0889 12.1506 10.0889 12.5147V15.5782C10.0889 15.9423 10.3848 16.2382 10.7489 16.2382H16.5558C16.9199 16.2382 17.2158 15.9423 17.2158 15.5782V12.5147C17.2158 12.1495 16.9199 11.8547 16.5558 11.8547ZM15.8958 14.9182H11.4089V13.1747H15.8958V14.9182Z" />
+<path id="Vector_4" d="M8.58143 5.64404H5.69613C5.33203 5.64404 5.03613 5.93994 5.03613 6.30404V9.36754C5.03613 9.73164 5.33203 10.0275 5.69613 10.0275H8.58143C8.94553 10.0275 9.24143 9.73164 9.24143 9.36754V6.30404C9.24143 5.93884 8.94663 5.64404 8.58143 5.64404ZM7.92143 8.70754H6.35613V6.96404H7.92143V8.70754Z" />
+<path id="Vector_5" d="M16.5558 5.64404H10.7489C10.3848 5.64404 10.0889 5.93994 10.0889 6.30404V9.36754C10.0889 9.73164 10.3848 10.0275 10.7489 10.0275H16.5558C16.9199 10.0275 17.2158 9.73164 17.2158 9.36754V6.30404C17.2158 5.93884 16.9199 5.64404 16.5558 5.64404ZM15.8958 8.70754H11.4089V6.96404H15.8958V8.70754Z" />
+</g>
+</svg>

+ 6 - 0
src/assets/icons/svg/icon_work.svg

@@ -0,0 +1,6 @@
+<svg width="22" height="22" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
+<g id="icon_&#229;&#183;&#165;&#228;&#189;&#156;&#229;&#143;&#176;">
+<path id="Vector" d="M17.1887 2.39258H4.86873C3.37383 2.39258 2.15723 3.60918 2.15723 5.10408V13.8282C2.15723 15.3231 3.37383 16.5397 4.86873 16.5397H17.1887C18.6836 16.5397 19.9002 15.3231 19.9002 13.8282V5.10408C19.9002 3.60918 18.6836 2.39258 17.1887 2.39258ZM18.5802 13.8282C18.5802 14.596 17.9565 15.2197 17.1887 15.2197H4.86873C4.10093 15.2197 3.47723 14.596 3.47723 13.8282V5.10408C3.47723 4.33628 4.10093 3.71258 4.86873 3.71258H17.1887C17.9565 3.71258 18.5802 4.33628 18.5802 5.10408V13.8282ZM16.1305 18.1919H5.87853C5.51443 18.1919 5.21853 18.4878 5.21853 18.8519C5.21853 19.216 5.51443 19.5119 5.87853 19.5119H16.1305C16.4946 19.5119 16.7905 19.216 16.7905 18.8519C16.7905 18.4878 16.4957 18.1919 16.1305 18.1919Z"/>
+<path id="Vector_2" d="M7.65121 9.16855C7.28711 9.16855 6.99121 9.46445 6.99121 9.82855V13.1638C6.99121 13.5279 7.28711 13.8238 7.65121 13.8238C8.01531 13.8238 8.31121 13.5279 8.31121 13.1638V9.82855C8.31121 9.46445 8.01641 9.16855 7.65121 9.16855ZM10.9798 5.36035C10.6157 5.36035 10.3198 5.65625 10.3198 6.02035V13.1638C10.3198 13.5279 10.6157 13.8238 10.9798 13.8238C11.3439 13.8238 11.6398 13.5279 11.6398 13.1638V6.02035C11.6398 5.65625 11.3439 5.36035 10.9798 5.36035ZM14.3568 7.35025C13.9927 7.35025 13.6968 7.64615 13.6968 8.01025V13.1638C13.6968 13.5279 13.9927 13.8238 14.3568 13.8238C14.7209 13.8238 15.0168 13.5279 15.0168 13.1638V8.01025C15.0168 7.64505 14.7209 7.35025 14.3568 7.35025Z"/>
+</g>
+</svg>

+ 16 - 17
src/assets/styles/sidebar.scss

@@ -1,16 +1,15 @@
 #app {
-
   .main-container {
     min-height: 100%;
-    transition: margin-left .28s;
+    transition: margin-left 0.28s;
     margin-left: $base-sidebar-width;
     position: relative;
-    background: #F6F7F9;
+    background: #f6f7f9;
     padding: 10px;
   }
 
   .sidebar-container {
-    -webkit-transition: width .28s;
+    -webkit-transition: width 0.28s;
     transition: width 0.28s;
     width: $base-sidebar-width !important;
     background-color: $base-menu-background;
@@ -27,7 +26,8 @@
 
     // reset element-ui css
     .horizontal-collapse-transition {
-      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
+      transition: 0s width ease-in-out, 0s padding-left ease-in-out,
+        0s padding-right ease-in-out;
     }
 
     .scrollbar-wrapper {
@@ -68,7 +68,8 @@
       width: 100% !important;
     }
 
-    .el-menu-item, .el-submenu__title {
+    .el-menu-item,
+    .el-submenu__title {
       overflow: hidden !important;
       text-overflow: ellipsis !important;
       white-space: nowrap !important;
@@ -86,7 +87,7 @@
       color: $base-menu-color-active !important;
     }
 
-    & .nest-menu .el-submenu>.el-submenu__title,
+    & .nest-menu .el-submenu > .el-submenu__title,
     & .el-submenu .el-menu-item {
       min-width: $base-sidebar-width !important;
 
@@ -95,7 +96,7 @@
       }
     }
 
-    & .theme-dark .nest-menu .el-submenu>.el-submenu__title,
+    & .theme-dark .nest-menu .el-submenu > .el-submenu__title,
     & .theme-dark .el-submenu .el-menu-item {
       background-color: $base-sub-menu-background !important;
 
@@ -130,20 +131,19 @@
     .el-submenu {
       overflow: hidden;
 
-      &>.el-submenu__title {
+      & > .el-submenu__title {
         padding: 0 !important;
 
         .svg-icon {
           margin-left: 20px;
         }
-
       }
     }
 
     .el-menu--collapse {
       .el-submenu {
-        &>.el-submenu__title {
-          &>span {
+        & > .el-submenu__title {
+          & > span {
             height: 0;
             width: 0;
             overflow: hidden;
@@ -166,7 +166,7 @@
     }
 
     .sidebar-container {
-      transition: transform .28s;
+      transition: transform 0.28s;
       width: $base-sidebar-width !important;
     }
 
@@ -180,7 +180,6 @@
   }
 
   .withoutAnimation {
-
     .main-container,
     .sidebar-container {
       transition: none;
@@ -190,13 +189,13 @@
 
 // when menu collapsed
 .el-menu--vertical {
-  &>.el-menu {
+  & > .el-menu {
     .svg-icon {
       margin-right: 16px;
     }
   }
 
-  .nest-menu .el-submenu>.el-submenu__title,
+  .nest-menu .el-submenu > .el-submenu__title,
   .el-menu-item {
     &:hover {
       // you can use $subMenuHover
@@ -205,7 +204,7 @@
   }
 
   // the scroll bar appears when the subMenu is too long
-  >.el-menu--popup {
+  > .el-menu--popup {
     max-height: 100vh;
     overflow-y: auto;
 

+ 7 - 3
src/components/FileUpload/index.vue

@@ -88,7 +88,11 @@ export default {
           // 然后将数组转为对象数组
           this.fileList = list.map((item) => {
             if (typeof item === "string") {
-              item = { name: item, url: item };
+              item = {
+                name: item,
+                url: this.$methodsTools.splitImgHost(item),
+                oUrl: item,
+              };
             }
             item.uid = item.uid || new Date().getTime() + temp++;
             return item;
@@ -128,10 +132,10 @@ export default {
     },
     requestUpload({ file }) {
       this.$upload.upload(file, 0).then((res) => {
-        const url = this.$methodsTools.splitImgHost(res);
         this.upload_List.push({
           name: file.name,
-          url: url,
+          url: this.$methodsTools.splitImgHost(res),
+          oUrl: res,
           uid: file.uid,
         });
         this.$emit("changeFlie", JSON.parse(JSON.stringify(this.upload_List)));

+ 12 - 10
src/components/Hamburger/index.vue

@@ -1,33 +1,35 @@
 <template>
-  <div style="padding: 0 15px;" @click="toggleClick">
+  <div style="padding: 0 15px" @click="toggleClick">
     <svg
-      :class="{'is-active':isActive}"
+      :class="{ 'is-active': isActive }"
       class="hamburger"
       viewBox="0 0 1024 1024"
       xmlns="http://www.w3.org/2000/svg"
       width="64"
       height="64"
     >
-      <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
+      <path
+        d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"
+      />
     </svg>
   </div>
 </template>
 
 <script>
 export default {
-  name: 'Hamburger',
+  name: "Hamburger",
   props: {
     isActive: {
       type: Boolean,
-      default: false
-    }
+      default: false,
+    },
   },
   methods: {
     toggleClick() {
-      this.$emit('toggleClick')
-    }
-  }
-}
+      this.$emit("toggleClick");
+    },
+  },
+};
 </script>
 
 <style scoped>

+ 1 - 1
src/router/index.js

@@ -68,7 +68,7 @@ export const constantRoutes = [
         path: "index",
         component: (resolve) => require(["@/views/index"], resolve),
         name: "Index",
-        meta: { title: "工作台", icon: "dashboard", affix: true },
+        meta: { title: "工作台", icon: "icon_work", affix: true },
       },
     ],
   },

+ 9 - 0
src/store/getters.js

@@ -1,5 +1,6 @@
 import api from "@/api/api";
 import { getAllStoreList } from "../api/store/index";
+import { goodscategorytree } from "../api/goods/index";
 const getters = {
   sidebar: (state) => state.app.sidebar,
   size: (state) => state.app.size,
@@ -49,5 +50,13 @@ const getters = {
     }
     return state.dict.storeList;
   },
+  categoryList(state) {
+    if (!state.dict.categoryList.length) {
+      goodscategorytree({ status: 1 }).then((res) => {
+        state.dict.categoryList = res.data;
+      });
+    }
+    return state.dict.categoryList;
+  },
 };
 export default getters;

+ 7 - 0
src/store/modules/dict.js

@@ -1,8 +1,10 @@
 import api from "@/api/api";
 import { getAllStoreList } from "../../api/store/index";
+import { goodscategorytree } from "../../api/goods/index";
 const state = {
   roleList: null, //角色列表
   storeList: [],
+  categoryList: [],
 };
 const mutations = {
   //更新角色列表
@@ -16,6 +18,11 @@ const mutations = {
       state.storeList = res.rows;
     });
   },
+  EDICSCATEGORY(state) {
+    goodscategorytree({ status: 1 }).then((res) => {
+      state.categoryList = res.data;
+    });
+  },
 };
 
 const actions = {};

+ 29 - 16
src/views/components/index/goodsList.vue

@@ -10,12 +10,13 @@
     </div>
     <div class="good-main">
       <div class="good-category">
-        <el-tree
+        <!-- <el-tree
           highlight-current
           :data="data"
           :props="defaultProps"
           :render-content="renderContent"
-        ></el-tree>
+        ></el-tree> -->
+        <category-tree></category-tree>
       </div>
       <div class="good-list scrollbar">
         <div
@@ -38,6 +39,8 @@
 </template>
 
 <script>
+import { mapGetters } from "vuex";
+import CategoryTree from "./tree.vue";
 export default {
   name: "SaasMemberGoodsList",
   props: {
@@ -136,9 +139,8 @@ export default {
       }
     },
     renderContent(h, { node, data, store }) {
-      let rgba = "rgba(0, 0, 0,  " + (node.level - 1) * 0.08 + ")";
       return (
-        <span class="custom-tree-node fl_b" style={{ background: rgba }}>
+        <span class="custom-tree-node fl_b">
           <span class="custom-tree-text line1">{node.label}</span>
         </span>
       );
@@ -148,6 +150,10 @@ export default {
     activeIds() {
       return this.selectedList.map((e) => e.id);
     },
+    ...mapGetters(["categoryList"]),
+  },
+  components: {
+    CategoryTree,
   },
 };
 </script>
@@ -163,11 +169,6 @@ export default {
     border-radius: 8px;
     width: 120px;
     /deep/ {
-      .el-tree-node__expand-icon {
-        position: absolute;
-        right: 0;
-        font-size: 16px;
-      }
       .el-tree {
         background: #f6f7f9;
         border-radius: 8px;
@@ -175,23 +176,35 @@ export default {
       .el-tree-node__content {
         height: 48px;
         color: #4a4a4b;
-        padding-left: 0 !important;
+      }
+      div {
+        .el-tree-node__label {
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+        }
+        &[style="padding-left: 18px;"] {
+          padding-left: 6px !important;
+        }
+        &[style="padding-left: 36px;"] {
+          padding-left: 12px !important;
+        }
       }
       .el-tree--highlight-current
         .el-tree-node.is-current
         > .el-tree-node__content {
-        background: #fa821f;
-        color: #ffffff;
+        background: #f6f7f9;
+        color: #fa821f;
       }
       .custom-tree-node {
-        width: 100%;
-        display: flex;
         height: 48px;
-        padding: 0 12px;
         .custom-tree-text {
-          width: 86px;
+          width: 90px;
         }
       }
+      .el-tree-node__expand-icon {
+        font-size: 16px;
+      }
     }
   }
   .good-list {

+ 6 - 1
src/views/components/index/payContain.vue

@@ -49,7 +49,7 @@
         <div>可用积分:100积分(200.00元)</div>
         <div>抵扣积分:100积分(200.00元)</div>
         <div>积分补差:100积分(200.00元)</div>
-
+        <div class="line"></div>
         <div class="c48">
           优惠金额:<span class="discount-money">¥100.00</span>
         </div>
@@ -270,6 +270,11 @@ export default {
       background: #fffaf7;
       color: #00908c;
     }
+    .line{
+      height: 2px;
+      background: #F1F1F1;
+      margin: 16px 0;
+    }
   }
   .btn {
     width: 382px;

+ 48 - 0
src/views/components/index/tree.vue

@@ -0,0 +1,48 @@
+<template>
+  <el-tree
+    highlight-current
+    :expand-on-click-node="false"
+    :data="categoryList"
+    :props="defaultProps"
+  ></el-tree>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  name: "SaasMemberTree",
+  props: {
+    treeList: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+  },
+  data() {
+    return {
+      defaultProps: {
+        children: "children",
+        label: "categoryName",
+      },
+    };
+  },
+
+  mounted() {},
+
+  methods: {
+    renderContent(h, { node, data, store }) {
+      return (
+        <span class="custom-tree-node fl_b">
+          <span class="custom-tree-text line1">{node.label}</span>
+        </span>
+      );
+    },
+  },
+  computed: {
+    ...mapGetters(["categoryList"]),
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 3 - 9
src/views/goodsMag/classify.vue

@@ -107,6 +107,7 @@ export default {
       dialogVisible: false,
       categoryId: "",
       parentId: "",
+      storeId: "",
     };
   },
 
@@ -154,17 +155,9 @@ export default {
       editCategory({ categoryId, status }).then((res) => {
         status == -1 && this.$message.success("删除成功");
         this.search();
+        this.$store.commit("EDICSCATEGORY");
       });
     },
-    resetPass(id) {
-      this.$confirm("确定恢复为初始密码吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {})
-        .catch(() => {});
-    },
     batchDel() {
       let len = this.$refs.tableList.allCheckData.length;
       if (!len) {
@@ -183,6 +176,7 @@ export default {
             this.$message.success("批量删除成功");
             this.$refs.tableList.clearMoreActive();
             this.search();
+            this.$store.commit("EDICSCATEGORY");
           });
         })
         .catch(() => {});

+ 5 - 12
src/views/goodsMag/components/ClassSetDlg.vue

@@ -17,7 +17,7 @@
     >
       <el-form-item label="所属店铺:" prop="storeId">
         <el-select
-          :disabled="categoryId"
+          :disabled="!!categoryId"
           :style="{ width: '100%' }"
           v-model="form.storeId"
           placeholder="请选择所属店铺"
@@ -34,10 +34,10 @@
       <el-form-item label="上级分类:" prop="parentId">
         <el-cascader
           @change="changeCategory"
-          :disabled="categoryId"
+          :disabled="!!categoryId"
           ref="cascader"
           placeholder="请选择上级分类"
-          :options="computerTree(categorytreeList)"
+          :options="computerTree(categoryList)"
           :show-all-levels="false"
           clearable
           filterable
@@ -70,7 +70,6 @@
 <script>
 import { mapGetters } from "vuex";
 import {
-  goodscategorytree,
   addCategory,
   editCategory,
   getCategoryDetail,
@@ -135,13 +134,11 @@ export default {
           ],
         },
       ],
-      categorytreeList: [],
     };
   },
   methods: {
     open() {
       this.resetForm();
-      this.goodscategorytree();
       this.categoryId && this.getDatail();
     },
     resetForm() {
@@ -169,6 +166,7 @@ export default {
             .then((res) => {
               this.$message.success(this.categoryId ? "修改成功" : "新增成功");
               this.$emit("search");
+              this.$store.commit("EDICSCATEGORY");
               this.isShow = false;
             })
             .catch(() => {});
@@ -181,11 +179,6 @@ export default {
       this.resetForm();
       this.clearForm("form");
     },
-    goodscategorytree() {
-      goodscategorytree({ status: 1 }).then((res) => {
-        this.categorytreeList = res.data;
-      });
-    },
     changeCategory(val) {
       if (this.form.storeId) return;
       let data = this.$refs["cascader"].getCheckedNodes()[0].data;
@@ -216,7 +209,7 @@ export default {
         return array;
       };
     },
-    ...mapGetters(["storeList"]),
+    ...mapGetters(["storeList","categoryList"]),
   },
   components: {},
 };

+ 61 - 29
src/views/goodsMag/components/GoodSetDlg.vue

@@ -1,6 +1,6 @@
 <template>
   <Base-dialog
-    :title="form.id ? '编辑分类' : '添加分类'"
+    :title="form.id ? '编辑商品' : '添加商品'"
     :isShow.sync="isShow"
     @close="close"
     @open="open"
@@ -17,7 +17,7 @@
     >
       <el-form-item label="所属店铺:" prop="storeId">
         <el-select
-          :disabled="goodsId"
+          :disabled="!!goodsId"
           :style="{ width: '100%' }"
           v-model="form.storeId"
           placeholder="请选择所属店铺"
@@ -34,10 +34,10 @@
       <el-form-item label="商品分类:" prop="categoryIds">
         <el-cascader
           @change="changeCategory"
-          :disabled="goodsId"
+          :disabled="!!goodsId"
           ref="cascader"
           placeholder="请选择商品分类"
-          :options="computerTree(categorytreeList)"
+          :options="computerTree(categoryList)"
           :show-all-levels="false"
           clearable
           filterable
@@ -58,26 +58,27 @@
         <file-upload v-model="form.mainImg" :limit="20"></file-upload>
       </el-form-item>
       <el-form-item label="产品原价:" prop="standPrice">
-        <el-input v-model.Number="form.standPrice" placeholder="请输入产品原价">
+        <el-input
+          v-int
+          v-model.Number="form.standPrice"
+          placeholder="请输入产品原价"
+        >
         </el-input>
       </el-form-item>
       <el-form-item label="会员优惠价:" prop="specialPrice">
         <el-input
+          v-int
           v-model.Number="form.specialPrice"
           placeholder="请输入会员优惠价"
         >
         </el-input>
       </el-form-item>
       <el-form-item label="可抵扣积分:">
-        <el-input
-          disable
-          v-model.Number="form.userName"
-          placeholder="请输入可抵扣积分"
-        >
+        <el-input disabled v-model="integral" placeholder="请输入可抵扣积分">
         </el-input>
       </el-form-item>
-      <el-form-item label="上架状态:" prop="status">
-        <el-radio-group v-model="form.status">
+      <el-form-item label="上架状态:" prop="goodsStatus">
+        <el-radio-group v-model="form.goodsStatus">
           <el-radio :label="1">上架</el-radio
           ><el-radio :label="0">下架</el-radio>
         </el-radio-group>
@@ -87,7 +88,7 @@
           class="ql-editor"
           ref="myQuillEditor"
           :options="editorOption"
-          @change="onEditorChange($event)"
+          v-model="form.mobileDetailHtml"
         >
         </quill-editor>
       </el-form-item>
@@ -99,7 +100,11 @@
 import { mapGetters } from "vuex";
 import FileUpload from "../../../components/FileUpload/index.vue";
 import { quillEditor } from "vue-quill-editor";
-import { goodscategorytree } from "../../../api/goods/index";
+import {
+  editgoodspoints,
+  addgoodspoints,
+  getGoodsDetail,
+} from "../../../api/goods/index";
 export default {
   props: {
     dialogVisible: {
@@ -109,8 +114,19 @@ export default {
     goodsId: {
       type: [Number, String],
     },
+    getRules: {
+      type: Number,
+      default: 0,
+    },
   },
   data() {
+    const checkPrice = (rule, value, callback) => {
+      if (value > this.form.standPrice) {
+        callback(new Error("会员优惠价需小于原价"));
+      } else {
+        callback();
+      }
+    };
     return {
       form: {},
       rules: {
@@ -122,6 +138,10 @@ export default {
         ],
         specialPrice: [
           { required: true, message: "请输入会员优惠价", trigger: "blur" },
+          {
+            validator: checkPrice,
+            trigger: "change",
+          },
         ],
         categoryIds: [
           { required: true, message: "请选择商品分类", trigger: "change" },
@@ -163,13 +183,11 @@ export default {
           ],
         },
       },
-      categorytreeList: [],
     };
   },
   methods: {
     open() {
       this.resetForm();
-      this.goodscategorytree();
       this.goodsId && this.getDatail();
     },
     resetForm() {
@@ -180,19 +198,27 @@ export default {
         standPrice: undefined,
         specialPrice: undefined,
         categoryIds: undefined,
+        mobileDetailHtml: undefined,
         mainImg: [],
+        goodsStatus: 1,
         status: 1,
+        goodsType: undefined,
       };
       this.clearForm("form");
     },
     submitForm() {
       this.$refs.form.validate(async (valid) => {
         if (valid) {
-          withdrawal(this.form).then((res) => {
+          const fn = this.goodsId ? editgoodspoints : addgoodspoints;
+          let { mainImg } = this.form;
+          this.form.mainImg = Array.isArray(mainImg)
+            ? mainImg.map((e) => e.oUrl).join(",")
+            : mainImg;
+          fn(this.form).then((res) => {
             if (res.code == 200) {
-              this.$message.success("提现申请成功");
+              this.$message.success(this.goodsId ? "修改成功" : "新增成功");
+              this.$emit("search");
               this.isShow = false;
-              this.$emit("getSellerInfo");
             }
           });
         } else {
@@ -201,18 +227,16 @@ export default {
       });
     },
     close() {
-      //   this.isShow = false;
-      this.clearForm("form");
-    },
-    onEditorChange({ quill, html, text }) {
-      this.form.mobileDetailHtml = html;
+      this.resetForm();
     },
-    goodscategorytree() {
-      goodscategorytree({ status: 1 }).then((res) => {
-        this.categorytreeList = res.data;
+    getDatail() {
+      getGoodsDetail(this.goodsId).then(({ data }) => {
+        data.categoryIds = data.categoryIds * 1;
+        Object.keys(this.form).forEach((key) => {
+          this.form[key] = data[key];
+        });
       });
     },
-    getDatail() {},
     changeCategory(val) {
       if (this.form.storeId) return;
       let data = this.$refs["cascader"].getCheckedNodes()[0].data;
@@ -236,7 +260,15 @@ export default {
         return rows;
       };
     },
-    ...mapGetters(["roleList", "storeList"]),
+    integral() {
+      let { standPrice, specialPrice } = this.form;
+      const integral = standPrice - specialPrice;
+      if (integral < 0 || Number.isNaN(integral)) {
+        return 0;
+      }
+      return parseInt(integral) * this.getRules;
+    },
+    ...mapGetters(["roleList", "storeList", "categoryList"]),
   },
   created() {},
   components: { FileUpload, quillEditor },

+ 92 - 37
src/views/goodsMag/index.vue

@@ -1,7 +1,7 @@
 <template>
   <container title="商品管理">
     <template v-slot:btn>
-      <el-button type="primary" @click="dialogVisible = true"
+      <el-button type="primary" @click="handelEdit(undefined)"
         >添加产品</el-button
       >
       <el-button @click="batchDel">批量删除</el-button>
@@ -20,6 +20,7 @@
       :navText="navText"
       rowKey="id"
       :loading="loading"
+      @switchChange="editGoods"
     >
       <template slot="images" slot-scope="props">
         <el-image
@@ -37,14 +38,18 @@
         >
         </el-image>
       </template>
+      <template slot="rule" slot-scope="props">
+        {{
+          parseInt(props.scope.row.standPrice - props.scope.row.specialPrice) *
+          getRules
+        }}
+      </template>
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="handelClick(2, props.scope.row.tpId)"
+        <el-button type="text" @click="handelEdit(props.scope.row.goodsId)"
           >编辑</el-button
         >
 
-        <el-button type="text" @click="handelDel(props.scope.row.tpId)"
-          >删除</el-button
-        >
+        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
         <el-button type="text" @click="resetPass(props.scope.row.tpId)"
           >记录</el-button
         >
@@ -56,12 +61,22 @@
       :currentPage.sync="formData.pageNum"
       @search="search"
     />
-    <good-set-dlg :dialogVisible.sync="dialogVisible"></good-set-dlg>
+    <good-set-dlg
+      :goodsId="goodsId"
+      :getRules="getRules"
+      @search="search"
+      :dialogVisible.sync="dialogVisible"
+    ></good-set-dlg>
   </container>
 </template>
 
 <script>
 import GoodSetDlg from "./components/GoodSetDlg";
+import {
+  goodslistPoints,
+  editgoodspoints,
+  getPointsRule,
+} from "../../api/goods/index";
 export default {
   name: "SaasMemberRecord",
 
@@ -69,7 +84,6 @@ export default {
     return {
       loading: false,
       navText: {
-        index: 0,
         num: true,
         choice: true,
         addHide: true,
@@ -94,7 +108,8 @@ export default {
         },
         {
           label: "可抵扣积分",
-          prop: "tpName",
+          scope: "solt",
+          soltName: "rule",
         },
         {
           label: "商品原价",
@@ -108,7 +123,7 @@ export default {
           label: "上架状态",
           prop: "goodsStatus",
           scope: "switch",
-          id: "categoryId",
+          id: "goodsId",
         },
         {
           label: "录入时间",
@@ -116,7 +131,7 @@ export default {
           scope: "aTimeList",
         },
       ],
-      tableData: [{}],
+      tableData: [],
       total: 0,
       formList: [
         {
@@ -124,54 +139,89 @@ export default {
           scope: "store",
         },
         {
-          prop: "name",
+          prop: "goodsName",
           placeholder: "请输如产品名称",
         },
       ],
       dialogVisible: false,
+      getRules: 0,
+      goodsId: "",
     };
   },
 
-  mounted() {},
+  mounted() {
+    this.init();
+  },
 
   methods: {
     search(v) {
-      console.log(this.formData, 789);
+      this.loading = true;
+      if (v === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+          status: "0,1",
+        };
+        this.$nextTick(() => {
+          this.$refs.tableList.clearMoreActive();
+        });
+      }
+      goodslistPoints(this.formData)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
     },
     init() {
-      this.search();
+      this.search(2);
+      this.getPointsRule();
     },
-    del(id) {
-      this.$confirm("确定删除吗?", "提示", {
+    del(row) {
+      this.$confirm("确定删除该商品吗?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
       })
-        .then(() => {})
+        .then(() => {
+          this.editGoods(row.goodsId, -1, row);
+        })
         .catch(() => {});
     },
-    resetPass(id) {
-      this.$confirm("确定恢复为初始密码吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {})
-        .catch(() => {});
+    editGoods(goodsId, status, row) {
+      let data = {
+        goodsId,
+        status: status === -1 ? -1 : 1,
+        goodsType: row.goodsType,
+      };
+      if (status != -1) {
+        data.goodsStatus = status;
+      }
+      editgoodspoints(data).then((res) => {
+        status == -1 && this.$message.success("删除成功");
+        this.search();
+      });
+    },
+    getPointsRule() {
+      getPointsRule().then((res) => {
+        this.getRules = res.data.oneExchangeValue;
+      });
     },
     batchDel() {
       let len = this.$refs.tableList.allCheckData.length;
       if (!len) {
         return this.$message.warning("请先勾选店员");
       }
-      this.$confirm(`此操作将永久删除所勾选的${len}条店员, 是否继续?`, "提示", {
+      this.$confirm(`此操作将永久删除所勾选的${len}条商品, 是否继续?`, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
       })
         .then(() => {
           const ids = this.$refs.tableList.allCheckData.map(
-            (item) => item.moduleExamId
+            (item) => item.goodsId
           );
           moduleVolumeBatchDel({
             status: -1,
@@ -184,16 +234,21 @@ export default {
         })
         .catch(() => {});
     },
-    statusChange(e, row) {
-      //   this.$api
-      //     .editmallstore({ storeId: row.storeId, status: e })
-      //     .then((res) => {
-      //       this.$message.success("操作成功");
-      //       row.status = e;
-      //     })
-      //     .catch(() => {
-      //       return (row.status = e ? 0 : 1);
-      //     });
+    handelEdit(goodsId) {
+      this.goodsId = goodsId;
+      this.dialogVisible = true;
+    },
+  },
+  computed: {
+    imgListComputer: function () {
+      return function (str) {
+        return str?.split(",") || [];
+      };
+    },
+    arrayStr: function () {
+      return function (str) {
+        return str?.split(",") || [];
+      };
     },
   },
   components: { GoodSetDlg },

+ 0 - 1
src/views/storeMag/components/StoreSetDlg.vue

@@ -72,7 +72,6 @@ export default {
         status: 1,
         storeName: undefined,
         address: undefined,
-        merId: "1",
       };
       this.clearForm("form");
     },

+ 1 - 1
src/views/storeMag/index.vue

@@ -136,7 +136,7 @@ export default {
         .catch(() => {});
     },
     editStore(storeId, status) {
-      editStore({ storeId, status, merId: "1" }).then((res) => {
+      editStore({ storeId, status }).then((res) => {
         status == -1 && this.$message.success("删除成功");
         this.$store.commit("EDICSTORELIST");
         this.search();

Некоторые файлы не были показаны из-за большого количества измененных файлов