合并分支
commit
3c83cc9f50
|
@ -14,9 +14,10 @@
|
||||||
"js-cookie": "^2.2.1",
|
"js-cookie": "^2.2.1",
|
||||||
"less": "^3.12.2",
|
"less": "^3.12.2",
|
||||||
"less-loader": "^5.0.0",
|
"less-loader": "^5.0.0",
|
||||||
|
"mv-count-down": "^0.1.15",
|
||||||
"psl": "^1.8.0",
|
"psl": "^1.8.0",
|
||||||
"qs": "^6.9.4",
|
"qs": "^6.9.4",
|
||||||
"swiper": "^6.4.1",
|
"swiper": "^5.2.0",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"v-distpicker": "^1.0.17",
|
"v-distpicker": "^1.0.17",
|
||||||
"view-design": "^4.3.2",
|
"view-design": "^4.3.2",
|
||||||
|
|
|
@ -61,7 +61,7 @@ export function getCateById (id) {
|
||||||
// 店铺入驻协议
|
// 店铺入驻协议
|
||||||
export function agreement () {
|
export function agreement () {
|
||||||
return request({
|
return request({
|
||||||
url: `/buyer/article/get/1349291301250293760`,
|
url: `/buyer/article/type/STORE_REGISTER`,
|
||||||
needToken: true,
|
needToken: true,
|
||||||
method: Method.GET
|
method: Method.GET
|
||||||
})
|
})
|
||||||
|
|
Binary file not shown.
|
@ -11,4 +11,6 @@
|
||||||
<glyph unicode="" glyph-name="next" horiz-adv-x="1025" d="M1024.951 448c0 2.706-1.097 5.193-1.536 7.826-0.585 3.145-0.658 6.363-1.902 9.362l-0.146 0.366c-1.682 3.95-4.389 7.314-7.022 10.606-1.024 1.317-1.463 2.926-2.706 4.096 0 0-0.146 0-0.146 0.146l-241.591 240.274c-8.15 7.642-19.145 12.336-31.236 12.336-25.247 0-45.714-20.467-45.714-45.714 0-12.218 4.793-23.317 12.602-31.518l-0.018 0.019 162.889-162.085h-821.76c-25.247 0-45.714-20.467-45.714-45.714s20.467-45.714 45.714-45.714h821.76l-162.889-162.085c-8.921-8.364-14.479-20.222-14.479-33.379 0-25.247 20.467-45.714 45.714-45.714 13.029 0 24.785 5.451 33.112 14.196l0.018 0.019 241.737 240.421c1.17 1.243 1.682 2.779 2.706 4.096 2.633 3.291 5.339 6.583 7.022 10.606l0.146 0.366c1.243 2.926 1.317 6.217 1.902 9.362 0.439 2.633 1.463 5.12 1.463 7.753v0.073c0 0.073 0 0 0 0z" />
|
<glyph unicode="" glyph-name="next" horiz-adv-x="1025" d="M1024.951 448c0 2.706-1.097 5.193-1.536 7.826-0.585 3.145-0.658 6.363-1.902 9.362l-0.146 0.366c-1.682 3.95-4.389 7.314-7.022 10.606-1.024 1.317-1.463 2.926-2.706 4.096 0 0-0.146 0-0.146 0.146l-241.591 240.274c-8.15 7.642-19.145 12.336-31.236 12.336-25.247 0-45.714-20.467-45.714-45.714 0-12.218 4.793-23.317 12.602-31.518l-0.018 0.019 162.889-162.085h-821.76c-25.247 0-45.714-20.467-45.714-45.714s20.467-45.714 45.714-45.714h821.76l-162.889-162.085c-8.921-8.364-14.479-20.222-14.479-33.379 0-25.247 20.467-45.714 45.714-45.714 13.029 0 24.785 5.451 33.112 14.196l0.018 0.019 241.737 240.421c1.17 1.243 1.682 2.779 2.706 4.096 2.633 3.291 5.339 6.583 7.022 10.606l0.146 0.366c1.243 2.926 1.317 6.217 1.902 9.362 0.439 2.633 1.463 5.12 1.463 7.753v0.073c0 0.073 0 0 0 0z" />
|
||||||
<glyph unicode="" glyph-name="qq" d="M512 929.009c-265.653 0-480.989-215.345-480.989-481.012 0-265.662 215.335-481.006 480.989-481.006s480.989 215.345 480.989 481.006c-0.001 265.668-215.335 481.012-480.989 481.012v0zM776.822 298.086c-12.422-11.596-33.749 1.033-54.249 29.4-8.901-24.019-20.497-46.171-33.956-66.051 28.987-10.353 47.626-26.505 47.626-44.726 0-31.473-55.699-56.942-124.443-56.942-40.79 0-76.819 8.899-99.593 22.777-22.565-13.877-58.799-22.777-99.59-22.777-68.745 0-124.443 25.469-124.443 56.942 0 18.014 18.637 34.373 47.626 44.726-13.666 19.877-25.056 42.033-33.959 66.051-20.496-28.156-41.822-40.997-54.249-29.4-16.978 15.94-10.555 72.263 14.702 125.688 5.799 12.215 12.010 23.188 18.428 32.716 3.518 155.297 105.805 279.947 231.281 279.947h0.413c125.475 0 227.762-124.443 231.281-279.947 6.417-9.527 12.634-20.501 18.427-32.716 25.055-53.425 31.684-109.748 14.701-125.688v0z" />
|
<glyph unicode="" glyph-name="qq" d="M512 929.009c-265.653 0-480.989-215.345-480.989-481.012 0-265.662 215.335-481.006 480.989-481.006s480.989 215.345 480.989 481.006c-0.001 265.668-215.335 481.012-480.989 481.012v0zM776.822 298.086c-12.422-11.596-33.749 1.033-54.249 29.4-8.901-24.019-20.497-46.171-33.956-66.051 28.987-10.353 47.626-26.505 47.626-44.726 0-31.473-55.699-56.942-124.443-56.942-40.79 0-76.819 8.899-99.593 22.777-22.565-13.877-58.799-22.777-99.59-22.777-68.745 0-124.443 25.469-124.443 56.942 0 18.014 18.637 34.373 47.626 44.726-13.666 19.877-25.056 42.033-33.959 66.051-20.496-28.156-41.822-40.997-54.249-29.4-16.978 15.94-10.555 72.263 14.702 125.688 5.799 12.215 12.010 23.188 18.428 32.716 3.518 155.297 105.805 279.947 231.281 279.947h0.413c125.475 0 227.762-124.443 231.281-279.947 6.417-9.527 12.634-20.501 18.427-32.716 25.055-53.425 31.684-109.748 14.701-125.688v0z" />
|
||||||
<glyph unicode="" glyph-name="wechat" d="M579.6 448.4c-11.7 0-23.4-10.8-23.4-24.2 0-10.8 11.7-21.7 23.4-21.7 17.5 0 30 10.8 30 21.7 0 13.4-12.5 24.2-30 24.2zM502.8 561c18.4 0 30 11.7 30 29.2 0 18.4-11.7 29.2-30 29.2-17.5 0-34.2-10.8-34.2-29.2 0-17.5 16.7-29.2 34.2-29.2zM512 960c-282.8 0-512-229.2-512-512s229.2-512 512-512 512 229.2 512 512-229.2 512-512 512zM415.2 318.3c-30.9 0-53.4 5-82.6 13.3l-84.3-42.5 24.2 71.7c-59.2 41.7-94.3 94.3-94.3 158.5 0 113.5 106.8 200.2 236.9 200.2 115.1 0 217.7-68.4 237.7-165.2-8.3 1.7-15.9 2.5-22.5 2.5-113.5 0-201-85.1-201-187.7 0-17.5 2.5-33.4 6.7-50.1-6.6-0.7-14.1-0.7-20.8-0.7zM763.1 236.5l16.7-60.1-63.4 35.9c-24.2-5-47.5-12.5-71.7-12.5-111.8 0-200.2 76.7-200.2 171.8s88.4 171.8 200.2 171.8c105.9 0 201-76.7 201-171.8 0-53.3-35.9-100.9-82.6-135.1zM337.7 619.4c-17.5 0-35.9-10.8-35.9-29.2 0-17.5 18.4-29.2 35.9-29.2 16.7 0 30 11.7 30 29.2 0 18.4-13.4 29.2-30 29.2zM710.5 448.4c-12.5 0-23.4-10.8-23.4-24.2 0-10.8 10.8-21.7 23.4-21.7 16.7 0 29.2 10.8 29.2 21.7 0 13.4-12.5 24.2-29.2 24.2z" />
|
<glyph unicode="" glyph-name="wechat" d="M579.6 448.4c-11.7 0-23.4-10.8-23.4-24.2 0-10.8 11.7-21.7 23.4-21.7 17.5 0 30 10.8 30 21.7 0 13.4-12.5 24.2-30 24.2zM502.8 561c18.4 0 30 11.7 30 29.2 0 18.4-11.7 29.2-30 29.2-17.5 0-34.2-10.8-34.2-29.2 0-17.5 16.7-29.2 34.2-29.2zM512 960c-282.8 0-512-229.2-512-512s229.2-512 512-512 512 229.2 512 512-229.2 512-512 512zM415.2 318.3c-30.9 0-53.4 5-82.6 13.3l-84.3-42.5 24.2 71.7c-59.2 41.7-94.3 94.3-94.3 158.5 0 113.5 106.8 200.2 236.9 200.2 115.1 0 217.7-68.4 237.7-165.2-8.3 1.7-15.9 2.5-22.5 2.5-113.5 0-201-85.1-201-187.7 0-17.5 2.5-33.4 6.7-50.1-6.6-0.7-14.1-0.7-20.8-0.7zM763.1 236.5l16.7-60.1-63.4 35.9c-24.2-5-47.5-12.5-71.7-12.5-111.8 0-200.2 76.7-200.2 171.8s88.4 171.8 200.2 171.8c105.9 0 201-76.7 201-171.8 0-53.3-35.9-100.9-82.6-135.1zM337.7 619.4c-17.5 0-35.9-10.8-35.9-29.2 0-17.5 18.4-29.2 35.9-29.2 16.7 0 30 11.7 30 29.2 0 18.4-13.4 29.2-30 29.2zM710.5 448.4c-12.5 0-23.4-10.8-23.4-24.2 0-10.8 10.8-21.7 23.4-21.7 16.7 0 29.2 10.8 29.2 21.7 0 13.4-12.5 24.2-29.2 24.2z" />
|
||||||
|
<glyph unicode="" glyph-name="qrcode" d="M445.077 845.495h-290.715c-20.056 0-36.327-16.27-36.327-36.327v-290.715c0-20.056 16.27-36.327 36.327-36.327h290.715c20.056 0 36.327 16.27 36.327 36.327v290.613c0 20.056-16.27 36.429-36.327 36.429zM449.784 518.351c0-2.558-2.149-4.707-4.707-4.707h-290.715c-2.558 0-4.707 2.149-4.707 4.707v290.715c0 2.558 2.149 4.707 4.707 4.707h290.715c2.558 0 4.707-2.149 4.707-4.707v-290.715zM350.219 737.231h-101.1c-12.689 0-22.922-10.335-22.922-22.922v-101.1c0-12.689 10.335-22.922 22.922-22.922h101.1c12.689 0 22.922 10.335 22.922 22.922v101.1c0.102 12.586-10.233 22.922-22.922 22.922zM341.521 621.907h-83.705v83.705h83.705v-83.705zM350.219 306.122h-101.1c-12.689 0-22.922-10.335-22.922-22.922v-101.1c0-12.689 10.335-22.922 22.922-22.922h101.1c12.689 0 22.922 10.335 22.922 22.922v101.1c0.102 12.689-10.233 22.922-22.922 22.922zM341.521 190.798h-83.705v83.705h83.705v-83.705zM673.474 590.288h101.1c12.689 0 22.922 10.335 22.922 22.922v101.1c0 12.689-10.335 22.922-22.922 22.922h-101.1c-12.689 0-22.922-10.335-22.922-22.922v-101.1c0-12.689 10.233-22.922 22.922-22.922zM682.172 705.612h83.705v-83.705h-83.705v83.705zM445.077 417.148h-290.715c-20.056 0-36.327-16.27-36.327-36.327v-290.715c0-20.056 16.27-36.327 36.327-36.327h290.715c20.056 0 36.327 16.27 36.327 36.327v290.715c0 20.056-16.27 36.327-36.327 36.327zM449.784 90.107c0-2.558-2.149-4.707-4.707-4.707h-290.715c-2.558 0-4.707 2.149-4.707 4.707v290.715c0 2.558 2.149 4.707 4.707 4.707h290.715c2.558 0 4.707-2.149 4.707-4.707v-290.715zM580.458 416.022c-20.056 0-36.327-16.27-36.327-36.327v-167.205c0-8.698 7.061-15.861 15.861-15.861 8.698 0 15.861 7.061 15.861 15.861v167.102c0 2.558 2.149 4.707 4.707 4.707h176.005c8.698 0 15.861 7.061 15.861 15.861s-7.061 15.861-15.861 15.861h-176.107zM578.616 482.024h290.715c20.056 0 36.327 16.27 36.327 36.327v290.715c0 20.056-16.27 36.327-36.327 36.327h-290.715c-20.056 0-36.327-16.27-36.327-36.327v-290.715c0-19.954 16.373-36.327 36.327-36.327zM574.011 809.066c0 2.558 2.149 4.707 4.707 4.707h290.715c2.558 0 4.707-2.149 4.707-4.707v-290.715c0-2.558-2.149-4.707-4.707-4.707h-290.817c-2.558 0-4.707 2.149-4.707 4.707v290.715h0.102zM905.964 400.161c0 8.698-7.061 15.861-15.861 15.861h-58.020c-8.698 0-15.861-7.061-15.861-15.861s7.061-15.861 15.861-15.861h42.159v-60.988h-131.492c-8.698 0-15.861-7.061-15.861-15.861 0-8.698 7.061-15.861 15.861-15.861h147.353c8.698 0 15.861 7.061 15.861 15.861v92.71zM614.226 84.888h-38.475v44.104c0 8.698-7.061 15.861-15.861 15.861s-15.861-7.061-15.861-15.861v-59.862c0-8.698 7.061-15.861 15.861-15.861h54.336c8.698 0 15.861 7.061 15.861 15.861 0 8.698-7.061 15.759-15.861 15.759zM789.412 207.579c0 8.698-7.061 15.861-15.861 15.861h-99.975c-8.698 0-15.861-7.061-15.861-15.861v-140.088c0-8.698 7.061-15.861 15.861-15.861s15.861 7.061 15.861 15.861v124.227h84.114c8.8 0 15.861 7.061 15.861 15.861zM890.001 265.088c-8.698 0-15.861-7.061-15.861-15.861v-166.898h-143.26c-8.698 0-15.861-7.061-15.861-15.861 0-8.698 7.061-15.861 15.861-15.861h159.018c8.698 0 15.861 7.061 15.861 15.861v182.758c0 8.8-7.061 15.861-15.759 15.861zM636.431 350.839c-8.698 0-15.861-7.061-15.861-15.861v-51.471c0-8.698 7.061-15.861 15.861-15.861 8.698 0 15.861 7.061 15.861 15.861v51.471c0 8.8-7.163 15.861-15.861 15.861z" />
|
||||||
|
<glyph unicode="" glyph-name="uniE905" horiz-adv-x="1055" d="M745.891 349.28c0-26.168 21.214-47.382 47.382-47.382s47.382 21.214 47.382 47.382c0 26.168-21.214 47.382-47.382 47.382v0c-26.168 0-47.382-21.214-47.382-47.382v0zM759.195 244.935c-44.978 0.149-81.399 36.571-81.548 81.534v52.143c0.149 44.978 36.571 81.399 81.534 81.548h296.231v168.518c-0.149 44.978-36.571 81.399-81.534 81.548h-892.329c-44.978-0.149-81.399-36.571-81.548-81.534v-611.144c0.149-44.978 36.571-81.399 81.534-81.548h892.329c44.978 0.149 81.399 36.571 81.548 81.534v227.4zM905.15 762.004l-86.061 155.918c-14.23 25.257-40.876 42.035-71.44 42.035-14.412 0-27.953-3.731-39.71-10.279l0.416 0.213-339.907-187.887z" />
|
||||||
</font></defs></svg>
|
</font></defs></svg>
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
Binary file not shown.
|
@ -1,10 +1,10 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'icomoon';
|
font-family: 'icomoon';
|
||||||
src: url('icomoon.eot?4ejtdc');
|
src: url('icomoon.eot?jvagvf');
|
||||||
src: url('icomoon.eot?4ejtdc#iefix') format('embedded-opentype'),
|
src: url('icomoon.eot?jvagvf#iefix') format('embedded-opentype'),
|
||||||
url('icomoon.ttf?4ejtdc') format('truetype'),
|
url('icomoon.ttf?jvagvf') format('truetype'),
|
||||||
url('icomoon.woff?4ejtdc') format('woff'),
|
url('icomoon.woff?jvagvf') format('woff'),
|
||||||
url('icomoon.svg?4ejtdc#icomoon') format('svg');
|
url('icomoon.svg?jvagvf#icomoon') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: block;
|
font-display: block;
|
||||||
|
@ -25,6 +25,14 @@
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-wallet:before {
|
||||||
|
content: "\e905";
|
||||||
|
color: #3c56c6;
|
||||||
|
}
|
||||||
|
.icon-qrcode:before {
|
||||||
|
content: "\e904";
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
.icon-customer-service:before {
|
.icon-customer-service:before {
|
||||||
content: "\e900";
|
content: "\e900";
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
<span class="inventory"> 库存{{skuDetail.quantity}}</span>
|
<span class="inventory"> 库存{{skuDetail.quantity}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-select">
|
<div class="item-select" v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'">
|
||||||
<div class="item-select-title">
|
<div class="item-select-title">
|
||||||
<p>重量</p>
|
<p>重量</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -119,11 +119,11 @@
|
||||||
<span class="inventory"> {{skuDetail.weight}}kg</span>
|
<span class="inventory"> {{skuDetail.weight}}kg</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-buy-car" v-if="$route.query.way === 'POINT'">
|
<div class="add-buy-car" v-if="$route.query.way === 'POINT' && skuDetail.isAuth === 'PASS'">
|
||||||
<Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="pointPay">积分购买</Button>
|
<Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="pointPay">积分购买</Button>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-buy-car" v-else>
|
<div class="add-buy-car" v-if="$route.query.way !== 'POINT' && skuDetail.isAuth === 'PASS'">
|
||||||
<Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="addShoppingCartBtn">加入购物车</Button>
|
<Button type="error" v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'" :loading="loading" :disabled="skuDetail.quantity === 0" @click="addShoppingCartBtn">加入购物车</Button>
|
||||||
<Button type="warning" :loading="loading1" :disabled="skuDetail.quantity === 0" @click="buyNow">立即购买</Button>
|
<Button type="warning" :loading="loading1" :disabled="skuDetail.quantity === 0" @click="buyNow">立即购买</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ export default {
|
||||||
count: 1, // 商品数量
|
count: 1, // 商品数量
|
||||||
imgIndex: 0, // 展示图片下标
|
imgIndex: 0, // 展示图片下标
|
||||||
currentSelceted: [], // 当前商品sku
|
currentSelceted: [], // 当前商品sku
|
||||||
imgList: this.detail.data.specList[0].specImage, // 商品图片列表
|
imgList: this.detail.data.specList[0].specImage || [], // 商品图片列表
|
||||||
skuDetail: this.detail.data, // sku详情
|
skuDetail: this.detail.data, // sku详情
|
||||||
goodsSpecList: this.detail.specs, // 商品spec
|
goodsSpecList: this.detail.specs, // 商品spec
|
||||||
promotionMap: { // 活动状态
|
promotionMap: { // 活动状态
|
||||||
|
@ -200,12 +200,16 @@ export default {
|
||||||
};
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
addCartGoods(params).then(res => {
|
addCartGoods(params).then(res => {
|
||||||
|
debugger;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
||||||
} else {
|
} else {
|
||||||
this.$Message.warning(res.message);
|
this.$Message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
console.log('catch');
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
buyNow () { // 立即购买
|
buyNow () { // 立即购买
|
||||||
|
@ -214,14 +218,20 @@ export default {
|
||||||
skuId: this.skuDetail.id,
|
skuId: this.skuDetail.id,
|
||||||
cartType: 'BUY_NOW'
|
cartType: 'BUY_NOW'
|
||||||
};
|
};
|
||||||
|
// 虚拟商品购买
|
||||||
|
if (this.skuDetail.goodsType === 'VIRTUAL_GOODS') {
|
||||||
|
params.cartType = 'VIRTUAL'
|
||||||
|
}
|
||||||
this.loading1 = true;
|
this.loading1 = true;
|
||||||
addCartGoods(params).then(res => {
|
addCartGoods(params).then(res => {
|
||||||
this.loading1 = false;
|
this.loading1 = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$router.push({path: '/pay', query: {way: 'BUY_NOW'}});
|
this.$router.push({path: '/pay', query: {way: params.cartType}});
|
||||||
} else {
|
} else {
|
||||||
this.$Message.warning(res.message);
|
this.$Message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading1 = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
pointPay () { // 积分购买
|
pointPay () { // 积分购买
|
||||||
|
@ -317,6 +327,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
promotion () { // 格式化促销活动,返回当前促销的对象
|
promotion () { // 格式化促销活动,返回当前促销的对象
|
||||||
|
if (!this.detail.promotionMap) return false;
|
||||||
let keysArr = Object.keys(this.detail.promotionMap);
|
let keysArr = Object.keys(this.detail.promotionMap);
|
||||||
if (keysArr.length === 0) return false;
|
if (keysArr.length === 0) return false;
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
<TabPane label="商品参数">
|
||||||
|
<table class="mt_10" border="1" cellpadding='0' cellspacing="0" v-if="skuDetail.goodsParamsList && skuDetail.length">
|
||||||
|
<tr v-for="param in skuDetail.goodsParamsList" :key="param">
|
||||||
|
<td>{{param.paramName}}</td><td>{{param.paramValue}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- <div v-else>暂无商品参数</div> -->
|
||||||
|
</TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -475,4 +483,18 @@ export default {
|
||||||
.ivu-rate-star-full:before, .ivu-rate-star-half .ivu-rate-star-content:before {
|
.ivu-rate-star-full:before, .ivu-rate-star-half .ivu-rate-star-content:before {
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
}
|
}
|
||||||
|
table{
|
||||||
|
border-color: #eee;
|
||||||
|
color: #999;
|
||||||
|
width: 70%;
|
||||||
|
margin-left: 10px;
|
||||||
|
tr{
|
||||||
|
td:nth-child(1){
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
td{
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper';
|
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper';
|
||||||
import 'swiper/swiper-bundle.css';
|
// import 'swiper/swiper-bundle.css';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Swiper,
|
Swiper,
|
||||||
|
|
|
@ -11,42 +11,37 @@
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- 普通发票 -->
|
<!-- 普通发票 -->
|
||||||
<div class="nav-content">
|
<div class="nav-content">
|
||||||
<Form
|
<Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
|
||||||
:model="invoiceForm"
|
|
||||||
ref="form"
|
|
||||||
label-position="left"
|
|
||||||
:rules="ruleInline"
|
|
||||||
:label-width="110"
|
|
||||||
>
|
|
||||||
<FormItem label="发票类型">
|
<FormItem label="发票类型">
|
||||||
<RadioGroup v-model="invoiceForm.type" type="button" button-style="solid">
|
<RadioGroup v-model="invoice" type="button" button-style="solid">
|
||||||
|
<Radio @on-change="changeInvoice" :label="1">电子普通发票</Radio>
|
||||||
|
<Radio :label="2" :disabled="true">增值税专用发票</Radio>
|
||||||
|
</RadioGroup>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="发票抬头">
|
||||||
|
<RadioGroup v-model="type" @on-change="changeInvoice" type="button" button-style="solid">
|
||||||
<Radio :label="1">个人</Radio>
|
<Radio :label="1">个人</Radio>
|
||||||
<Radio :label="2">单位</Radio>
|
<Radio :label="2">单位</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem label="个人名称" v-if="type === 1" prop="receiptTitle">
|
||||||
label="发票抬头"
|
|
||||||
v-if="invoiceForm.type == 2"
|
|
||||||
prop="receiptTitle"
|
|
||||||
>
|
|
||||||
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem label="单位名称" v-if="type === 2" prop="receiptTitle">
|
||||||
label="纳税人识别号"
|
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
||||||
v-if="invoiceForm.type == 2"
|
</FormItem>
|
||||||
prop="taxpayerId"
|
<FormItem label="纳税人识别号" v-if="type === 2" prop="taxpayerId">
|
||||||
>
|
|
||||||
<i-input v-model="invoiceForm.taxpayerId"></i-input>
|
<i-input v-model="invoiceForm.taxpayerId"></i-input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="发票内容">
|
<FormItem label="发票内容">
|
||||||
<RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
|
<RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
|
||||||
<Radio label="不开发票">不开发票</Radio>
|
|
||||||
<Radio label="商品明细">商品明细</Radio>
|
<Radio label="商品明细">商品明细</Radio>
|
||||||
|
<Radio label="商品类别">商品类别</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<Button type="primary" :loading="loading" @click="save">保存发票信息</Button>
|
<Button type="primary" :loading="loading" @click="submit">保存发票信息</Button>
|
||||||
<Button type="default" @click="invoiceAvailable = false">取消</Button>
|
<Button type="default" @click="invoiceAvailable = false">取消</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,23 +49,24 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { saveReceipt } from '@/api/member.js';
|
import { receiptSelect } from '@/api/cart.js';
|
||||||
import { TINumber } from '@/plugins/RegExp.js';
|
import { TINumber } from '@/plugins/RegExp.js';
|
||||||
export default {
|
export default {
|
||||||
name: 'invoiceModal',
|
name: 'invoiceModal',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
invoice: 1,
|
||||||
invoiceAvailable: false, // 模态框显隐
|
invoiceAvailable: false, // 模态框显隐
|
||||||
loading: false, // 提交状态
|
loading: false, // 提交状态
|
||||||
invoiceForm: { // 发票表单
|
invoiceForm: {
|
||||||
|
// 发票表单
|
||||||
// 普票表单
|
// 普票表单
|
||||||
receiptTitle: '', // 发票抬头
|
receiptTitle: '', // 发票抬头
|
||||||
taxpayerId: '', // 纳税人识别号
|
taxpayerId: '', // 纳税人识别号
|
||||||
receiptContent: '不开发票', // 发票内容
|
receiptContent: '商品明细', // 发票内容
|
||||||
type: 1 // 1 个人 2 单位
|
|
||||||
},
|
},
|
||||||
ruleInline: { // 验证规则
|
type: 1, // 1 个人 2 单位
|
||||||
receiptTitle: [{ required: true, message: '请填写公司名称' }],
|
ruleInline: {
|
||||||
taxpayerId: [
|
taxpayerId: [
|
||||||
{ required: true, message: '请填写纳税人识别号' },
|
{ required: true, message: '请填写纳税人识别号' },
|
||||||
{ pattern: TINumber, message: '请填写正确的纳税人识别号' }
|
{ pattern: TINumber, message: '请填写正确的纳税人识别号' }
|
||||||
|
@ -78,73 +74,76 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
props: ['invoiceData'],
|
||||||
save () { // 保存发票
|
watch: {
|
||||||
if (this.invoiceForm.type === 1) {
|
invoiceData: {
|
||||||
// 个人
|
handler (val) {
|
||||||
let flag = true;
|
this.invoiceForm = { ...val };
|
||||||
this.receiptItems.forEach((e) => {
|
|
||||||
if (
|
|
||||||
e.receiptTitle === '个人' &&
|
|
||||||
e.receiptContent === this.invoiceForm.receiptContent
|
|
||||||
) {
|
|
||||||
this.$emit('change', e);
|
|
||||||
flag = false;
|
|
||||||
this.invoiceAvailable = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (flag) {
|
if (val.taxpayerId) {
|
||||||
let params = {
|
this.type = 2;
|
||||||
receiptTitle: '个人',
|
|
||||||
receiptContent: this.invoiceForm.receiptContent
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
saveReceipt(params)
|
|
||||||
.then((res) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (res.success) {
|
|
||||||
this.$emit('change', res.result);
|
|
||||||
this.invoiceAvailable = false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// 单位
|
this.type = 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immeadite: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 选择发票抬头
|
||||||
|
*/
|
||||||
|
changeInvoice (val) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.type = val;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存判断
|
||||||
|
*/
|
||||||
|
save () {
|
||||||
|
let flage = true;
|
||||||
|
|
||||||
|
// 保存分为两种类型,个人以及企业
|
||||||
|
const { type, receiptTitle, receiptContent } = JSON.parse(
|
||||||
|
JSON.stringify(this.invoiceForm)
|
||||||
|
);
|
||||||
|
|
||||||
|
// 判断是否填写发票抬头
|
||||||
|
if (!receiptTitle) {
|
||||||
|
this.$Message.error('请填写发票抬头!');
|
||||||
|
flage = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type === 2) {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (!valid) {
|
||||||
this.loading = true;
|
flage = false;
|
||||||
let params = {
|
|
||||||
receiptTitle: this.invoiceForm.receiptTitle,
|
|
||||||
taxpayerId: this.invoiceForm.taxpayerId,
|
|
||||||
receiptContent: this.invoiceForm.receiptContent
|
|
||||||
};
|
|
||||||
let flag = true;
|
|
||||||
this.receiptItems.forEach((e) => {
|
|
||||||
if (e.taxpayerId === params.taxpayerId) {
|
|
||||||
flag = false;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!flag) {
|
|
||||||
this.$Message.error('已有当前税号的发票信息,请直接选择已有发票');
|
|
||||||
} else {
|
} else {
|
||||||
saveReceipt(params)
|
delete this.invoiceForm.taxpayerId;
|
||||||
.then((res) => {
|
}
|
||||||
|
|
||||||
|
return flage;
|
||||||
|
},
|
||||||
|
|
||||||
|
async submit () {
|
||||||
|
if (this.save()) {
|
||||||
|
this.loading = true;
|
||||||
|
let submit = {
|
||||||
|
way: this.$route.query.way,
|
||||||
|
...this.invoiceForm
|
||||||
|
};
|
||||||
|
let receipt = await receiptSelect(submit);
|
||||||
|
if (receipt.success) {
|
||||||
|
this.$emit('change', true);
|
||||||
|
}
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.success) {
|
|
||||||
this.$emit('change', res.result);
|
|
||||||
this.invoiceAvailable = false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,14 +98,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.getImg();
|
// this.getImg();
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
verifyType: {
|
verifyType: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler: function (v) {
|
handler: function (v) {
|
||||||
this.type = v;
|
this.type = v;
|
||||||
this.refresh();
|
// this.refresh();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
show (v) {
|
show (v) {
|
||||||
|
|
|
@ -50,7 +50,6 @@ export default {
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.getGoodsDetail();
|
this.getGoodsDetail();
|
||||||
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
>人评价
|
>人评价
|
||||||
</div>
|
</div>
|
||||||
<div class="goods-show-seller">
|
<div class="goods-show-seller">
|
||||||
<span>{{ item.storeName }}</span>
|
<Tag v-if="item.selfOperated" style="padding:0 4px;" size="small" color="error">自营</Tag><span>{{ item.storeName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -108,7 +108,7 @@ export default {
|
||||||
this.pageNumber = 1;
|
this.pageNumber = 1;
|
||||||
this.params.pageSize = val;
|
this.params.pageSize = val;
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -132,10 +132,10 @@ export default {
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected-cate{
|
.selected-cate{
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.page-size {
|
.page-size {
|
||||||
width: 1200px;
|
width: 1200px;
|
||||||
|
|
|
@ -93,13 +93,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<Row type="flex" justify="space-around" class="help">
|
<Row type="flex" justify="space-around" class="help">
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">帮助</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">帮助</a>
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">隐私</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">隐私</a>
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">条款</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">条款</a>
|
||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © 2020 - Present
|
Copyright © 2020 - Present
|
||||||
<a href="http://lili.cn" target="_blank" style="margin: 0 5px"
|
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
|
||||||
>lili-shop</a
|
>lili-shop</a
|
||||||
>
|
>
|
||||||
版权所有
|
版权所有
|
||||||
|
|
|
@ -30,13 +30,13 @@
|
||||||
</div>
|
</div>
|
||||||
<empty v-else />
|
<empty v-else />
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<div class="page-size mt_10" v-if="paging">
|
<!-- <div class="page-size mt_10" v-if="paging">
|
||||||
<Page :total="total" @on-change="changePageNum"
|
<Page :total="total" @on-change="changePageNum"
|
||||||
@on-page-size-change="changePageSize"
|
@on-page-size-change="changePageSize"
|
||||||
:page-size="params.pageSize"
|
:page-size="params.pageSize"
|
||||||
show-sizer>
|
show-sizer>
|
||||||
</Page>
|
</Page>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ export default {
|
||||||
total: 0, // 收藏总数
|
total: 0, // 收藏总数
|
||||||
params: { // 请求参数
|
params: { // 请求参数
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
type: 'GOODS'
|
type: 'GOODS'
|
||||||
},
|
},
|
||||||
spinShow: false // 加载状态
|
spinShow: false // 加载状态
|
||||||
|
|
|
@ -44,6 +44,12 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="order-card" v-if="afterSale.afterSaleImage">
|
||||||
|
<h3 class="mb_10">图片信息</h3>
|
||||||
|
<div v-for="img in afterSale.afterSaleImage.split(',')" :key="img">
|
||||||
|
<img :src="img" width="200" height="200" @click="perviewImg(img)" class="hover-pointer" alt="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -83,6 +89,9 @@ export default {
|
||||||
filterOrderStatus (status) { // 获取订单状态中文
|
filterOrderStatus (status) { // 获取订单状态中文
|
||||||
const ob = this.afterSaleStatusList.filter(e => { return e.status === status });
|
const ob = this.afterSaleStatusList.filter(e => { return e.status === status });
|
||||||
return ob[0].name
|
return ob[0].name
|
||||||
|
},
|
||||||
|
perviewImg (img) {
|
||||||
|
window.open(img, '_blank')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<div>
|
<div>
|
||||||
<Form :model="form" ref="form" :rules="rules" :label-width="80">
|
<Form :model="form" ref="form" class="mt_10" :rules="rules" :label-width="80">
|
||||||
<FormItem label="售后类别">
|
<FormItem label="售后类别">
|
||||||
<RadioGroup v-model="form.serviceType" @on-change="changeReason" type="button" button-style="solid">
|
<RadioGroup v-model="form.serviceType" @on-change="changeReason" type="button" button-style="solid">
|
||||||
<Radio label="RETURN_GOODS">退货</Radio>
|
<Radio v-if="info.returnGoods" label="RETURN_GOODS">退货</Radio>
|
||||||
<Radio label="RETURN_MONEY">退款</Radio>
|
<Radio v-if="info.returnMoney" label="RETURN_MONEY">退款</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="提交数量" prop="num">
|
<FormItem label="提交数量" prop="num">
|
||||||
|
@ -144,6 +144,10 @@ export default {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.info = res.result
|
this.info = res.result
|
||||||
this.goodsData.push(res.result)
|
this.goodsData.push(res.result)
|
||||||
|
if (!this.info.returnGoods && this.info.returnMoney) {
|
||||||
|
this.form.serviceType = 'RETURN_MONEY'
|
||||||
|
}
|
||||||
|
this.getReason(this.form.serviceType)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -195,7 +199,6 @@ export default {
|
||||||
mounted () {
|
mounted () {
|
||||||
this.accessToken.accessToken = storage.getItem('accessToken');
|
this.accessToken.accessToken = storage.getItem('accessToken');
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
this.getReason('RETURN_GOODS')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
<div>{{ filterOrderStatus(order.orderStatus) }}</div>
|
<div>{{ filterOrderStatus(order.orderStatus) }}</div>
|
||||||
<div>
|
<div>
|
||||||
订单号:{{ order.sn }} {{order.createTime}}
|
订单号:{{ order.sn }} {{order.createTime}}
|
||||||
{{ order.memberName | secrecyMobile }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="order-detail" v-if="order.order">
|
<div class="order-detail" v-if="order.order">
|
||||||
<card _Title="订单详情" :_Size="16"></card>
|
<card _Title="订单详情" :_Size="16"></card>
|
||||||
<div class="order-card">
|
<div class="order-card">
|
||||||
<p class="global_color fontsize_18">{{ order.orderStatusValue }}</p>
|
<p class="global_color fontsize_18">{{ order.orderStatusValue }} <span class="verificationCode" v-if="order.order.verificationCode">核验码:{{order.order.verificationCode}}</span></p>
|
||||||
<p class="global_color">订单号:{{ order.order.sn }}</p>
|
<p class="global_color">订单号:{{ order.order.sn }}</p>
|
||||||
<div style="color:#999;" class="operation-time">操作时间:{{order.order.updateTime}}</div>
|
<div style="color:#999;" class="operation-time">操作时间:{{order.order.updateTime}}</div>
|
||||||
<Steps class="progress" :current="progressList.length" direction="vertical">
|
<Steps class="progress" :current="progressList.length" direction="vertical">
|
||||||
|
@ -22,8 +22,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="order-card">
|
<div class="order-card">
|
||||||
<h3>付款信息</h3>
|
<h3>付款信息</h3>
|
||||||
<p>支付方式:在线支付</p>
|
<p>支付方式:{{order.paymentMethodValue}}</p>
|
||||||
<p>付款状态:未付款</p>
|
<p>付款状态:{{order.payStatusValue}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="order-card">
|
<div class="order-card">
|
||||||
<h3>配送信息</h3>
|
<h3>配送信息</h3>
|
||||||
|
@ -234,7 +234,12 @@ table {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.verificationCode {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-left: 240px;
|
||||||
|
color: rgb(65, 63, 63);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
/** 订单进度条 */
|
/** 订单进度条 */
|
||||||
.progress {
|
.progress {
|
||||||
margin: 15px 0;
|
margin: 15px 0;
|
||||||
|
|
|
@ -215,7 +215,7 @@ export default {
|
||||||
color: 'green'
|
color: 'green'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
params.row.money
|
this.$options.filters.unitPrice(params.row.money, '+ ¥')
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
} else if (params.row.money < 0) {
|
} else if (params.row.money < 0) {
|
||||||
|
@ -227,7 +227,7 @@ export default {
|
||||||
color: 'red'
|
color: 'red'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
params.row.money
|
this.$options.filters.unitPrice(0 - params.row.money, '- ¥')
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,10 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '充值金额',
|
title: '充值金额',
|
||||||
key: 'rechargeMoney'
|
key: 'rechargeMoney',
|
||||||
|
render: (h, params) => {
|
||||||
|
return h('div', [h('span', this.$options.filters.unitPrice(params.row.rechargeMoney, '¥'))]);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '支付状态',
|
title: '支付状态',
|
||||||
|
@ -281,7 +284,9 @@ export default {
|
||||||
{
|
{
|
||||||
title: '提现金额',
|
title: '提现金额',
|
||||||
key: 'applyMoney',
|
key: 'applyMoney',
|
||||||
width: 120
|
render: (h, params) => {
|
||||||
|
return h('div', [h('span', this.$options.filters.unitPrice(params.row.applyMoney, '¥'))]);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '提现状态',
|
title: '提现状态',
|
||||||
|
@ -392,9 +397,10 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
recharge(this.formData).then((res) => {
|
recharge(this.formData).then((res) => {
|
||||||
if (res.message === 'success') {
|
if (res.message === 'success') {
|
||||||
// TODO 根据返回的值跳转到收银台进行支付,一下是输出sn
|
this.$router.push({
|
||||||
console.warn(res.result.rechargeSn);
|
path: '/payment',
|
||||||
this.modal = false;
|
query: { orderType: 'RECHARGE', sn: res.result.rechargeSn }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,14 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<div class="page-size">
|
||||||
|
<Page :total="total" @on-change="changePageNum"
|
||||||
|
@on-page-size-change="changePageSize"
|
||||||
|
:page-size="params.pageSize"
|
||||||
|
show-sizer>
|
||||||
|
</Page>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -25,7 +33,14 @@ export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
list: [], // 我的足迹,商品列表
|
list: [], // 我的足迹,商品列表
|
||||||
spinShow: false // 控制loading是否加载
|
spinShow: false, // 控制loading是否加载
|
||||||
|
params: {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 30,
|
||||||
|
order: 'desc',
|
||||||
|
sort: 'createTime'
|
||||||
|
},
|
||||||
|
total: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
@ -71,7 +86,16 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList () {
|
changePageNum (val) { // 修改页码
|
||||||
|
this.params.pageNumber = val;
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
changePageSize (val) { // 修改页数
|
||||||
|
this.pageNumber = 1;
|
||||||
|
this.params.pageSize = val;
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
getList () { // 获取足迹列表
|
||||||
this.spinShow = true;
|
this.spinShow = true;
|
||||||
tracksList(this.params).then(res => {
|
tracksList(this.params).then(res => {
|
||||||
this.spinShow = false
|
this.spinShow = false
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,7 +6,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="pay-btn">
|
<div class="pay-btn">
|
||||||
<Button type="primary" @click="$router.push('/')">继续逛逛</Button>
|
<Button type="primary" @click="$router.push('/')">继续逛逛</Button>
|
||||||
<Button type="info" @click="$router.push('home/myOrder')">查看订单</Button>
|
<Button type="info" v-if="$route.query.orderType ==='RECHARGE'" @click="$router.push('/home/MoneyManagement')">查看余额</Button>
|
||||||
|
<Button type="info" v-else @click="$router.push('/home/myOrder')">查看订单</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -5,31 +5,64 @@
|
||||||
<div class="head-left">
|
<div class="head-left">
|
||||||
<div class="left-tips">订单提交成功,请尽快付款!</div>
|
<div class="left-tips">订单提交成功,请尽快付款!</div>
|
||||||
<div class="left-tips-time">请您尽快完成支付,否则订单会被自动取消</div>
|
<div class="left-tips-time">请您尽快完成支付,否则订单会被自动取消</div>
|
||||||
|
<div class="left-tips-count-down">
|
||||||
|
<mv-count-down :startTime="startTime" class="count-down"
|
||||||
|
:endTime="endTime"
|
||||||
|
:endText="endText"
|
||||||
|
:dayTxt="'天'"
|
||||||
|
:hourTxt="'小时'"
|
||||||
|
:minutesTxt="'分钟'"
|
||||||
|
:secondsTxt="'秒'"
|
||||||
|
:isStart="isStart"></mv-count-down>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-right">
|
<div class="head-right">
|
||||||
<div>应付金额 <span class="price">{{payDetail.price | unitPrice}}</span>元</div>
|
<div>应付金额 <span class="price">{{ payDetail.price | unitPrice }}</span>元</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrapper-box">
|
<div class="wrapper-box">
|
||||||
<div class="-box-item" @click="handlePay('ALIPAY')">
|
<div v-if="support.includes('ALIPAY')" class="-box-item" @click="handlePay('ALIPAY')">
|
||||||
<img src="https://ss3.bdstatic.com/yrwDcj7w0QhBkMak8IuT_XF5ehU5bvGh7c50/logopic/a9936a369e82e0c6c42112674a5220e8_fullsize.jpg" alt="">
|
<img
|
||||||
|
src="https://ss3.bdstatic.com/yrwDcj7w0QhBkMak8IuT_XF5ehU5bvGh7c50/logopic/a9936a369e82e0c6c42112674a5220e8_fullsize.jpg"
|
||||||
|
alt="">
|
||||||
<span>支付宝</span>
|
<span>支付宝</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="-box-item" @click="handlePay('WECHAT')">
|
<div v-if="support.includes('WECHAT')" class="-box-item" @click="handlePay('WECHAT')">
|
||||||
<img src="https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=3774939867,2826752539&fm=74&app=80&f=JPEG&size=f121,121?sec=1880279984&t=796e842a5ef2d16d9edc872d6f1147ef" alt="">
|
<img
|
||||||
|
src="https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=3774939867,2826752539&fm=74&app=80&f=JPEG&size=f121,121?sec=1880279984&t=796e842a5ef2d16d9edc872d6f1147ef"
|
||||||
|
alt="">
|
||||||
<span>微信</span>
|
<span>微信</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="support.includes('WALLET') && $route.query.orderType !== 'RECHARGE'" class="-box-item" @click="handlePay('WALLET')">
|
||||||
|
<Icon custom="icomoon icon-wallet" size="60"/>
|
||||||
|
<span>余额支付</span>
|
||||||
|
<span>当前剩余({{ walletValue | unitPrice('¥') }})</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<BaseFooter></BaseFooter>
|
<BaseFooter></BaseFooter>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { tradeDetail } from '@/api/pay.js';
|
|
||||||
|
import {tradeDetail, pay} from '@/api/pay.js';
|
||||||
|
import MvCountDown from 'mv-count-down'
|
||||||
|
import {Message} from 'view-design';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
MvCountDown
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
payDetail: {}, // 支付详情
|
payDetail: {}, // 支付详情
|
||||||
qrcode: '' // 支付二维码
|
support: [], // 支持配送方式
|
||||||
|
walletValue: 0, // 当前余额
|
||||||
|
qrcode: '', // 支付二维码
|
||||||
|
startTime: new Date().getTime(), // 开始时间(时间戳)
|
||||||
|
endTime: 0, // 完成的时间(时间戳)
|
||||||
|
endText: '订单已超时取消', // 倒计时完成的提示文本
|
||||||
|
isStart: false // 控制倒计时开始的时机(异步请求完成开启)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -39,16 +72,46 @@ export default {
|
||||||
tradeDetail(params).then(res => {
|
tradeDetail(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.payDetail = res.result;
|
this.payDetail = res.result;
|
||||||
|
this.endTime = this.payDetail.autoCancel
|
||||||
|
this.isStart = true
|
||||||
|
this.support = this.payDetail.support
|
||||||
|
this.walletValue = this.payDetail.walletValue
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 支付
|
||||||
handlePay (way) {
|
handlePay (way) {
|
||||||
|
// 余额支付则直接跳转
|
||||||
|
if (way === 'WALLET') {
|
||||||
|
// 如果待支付金额大于余额,则报错
|
||||||
|
if (this.payDetail.price > this.walletValue) {
|
||||||
|
Message.error('余额不足以支付当前订单,如需充值请前往会员中心');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
const params = this.$route.query;
|
const params = this.$route.query;
|
||||||
params.paymentMethod = way;
|
params.paymentMethod = way;
|
||||||
params.paymentClient = 'NATIVE';
|
params.paymentClient = 'NATIVE';
|
||||||
params.price = this.payDetail.price;
|
params.price = this.payDetail.price;
|
||||||
|
if (way === 'WALLET') {
|
||||||
|
this.$Modal.confirm({
|
||||||
|
title: '支付确认',
|
||||||
|
content: '<p>确认使用余额支付吗?</p>',
|
||||||
|
onOk: () => {
|
||||||
|
pay(params).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.warning(res.message)
|
||||||
|
this.$router.push('/payDone');
|
||||||
|
} else {
|
||||||
|
this.$Message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
this.$router.push({path: '/qrpay', query: params});
|
this.$router.push({path: '/qrpay', query: params});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getTradeDetail();
|
this.getTradeDetail();
|
||||||
|
@ -56,64 +119,83 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.head-left{
|
.head-left {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.left-tips{
|
|
||||||
|
.left-tips {
|
||||||
font-size: 21px;
|
font-size: 21px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.-box-item{
|
|
||||||
margin-right: 30px;
|
.-box-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 21px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 20px 20px;
|
margin: 20px 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@include content_color($light_content_color);
|
@include content_color($light_content_color);
|
||||||
|
|
||||||
&:hover{color: $theme_color;}
|
&:hover {
|
||||||
|
color: $theme_color;
|
||||||
>span{
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
}
|
||||||
>img{
|
|
||||||
|
> span {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
> img {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.left-tips-time{
|
|
||||||
|
.left-tips-time {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.wrapper-head{
|
|
||||||
|
.left-tips-count-down {
|
||||||
|
font-size: 10px;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrapper-head {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
line-height: 1.75;
|
line-height: 1.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper-head,
|
.wrapper-head,
|
||||||
.wrapper-box {
|
.wrapper-box {
|
||||||
padding: 20px 40px;
|
padding: 20px 40px;
|
||||||
width: 1200px;
|
width: 1200px;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper-box {
|
.wrapper-box {
|
||||||
@include white_background_color();
|
@include white_background_color();
|
||||||
height: auto;
|
height: auto;
|
||||||
display: flex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.price{
|
|
||||||
|
.price {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
}
|
}
|
||||||
.head-right{
|
|
||||||
|
.head-right {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.count-down{
|
||||||
|
font-size: 16px!important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -70,7 +70,7 @@ export default {
|
||||||
payCallback(params).then(res => {
|
payCallback(params).then(res => {
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
clearInterval(this.interval);
|
clearInterval(this.interval);
|
||||||
this.$router.push('/payDone');
|
this.$router.push({path: '/payDone', query: {orderType: this.$route.query.orderType}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,23 +9,11 @@
|
||||||
<Step title="其他信息"></Step>
|
<Step title="其他信息"></Step>
|
||||||
<Step title="提交审核"></Step>
|
<Step title="提交审核"></Step>
|
||||||
</Steps>
|
</Steps>
|
||||||
<first-apply
|
<first-apply v-if="currentIndex == 0 && dataReview" :content="firstData" @change="nextPage"></first-apply>
|
||||||
v-if="currentIndex == 0 && dataReview"
|
|
||||||
:content="firstData"
|
|
||||||
@change="nextPage"
|
|
||||||
></first-apply>
|
|
||||||
|
|
||||||
<second-apply
|
<second-apply v-if="currentIndex == 1 && dataReview" :content="secondData" @change="nextPage"></second-apply>
|
||||||
v-if="currentIndex == 1 && dataReview"
|
|
||||||
:content="secondData"
|
|
||||||
@change="nextPage"
|
|
||||||
></second-apply>
|
|
||||||
|
|
||||||
<third-apply
|
<third-apply v-if="currentIndex == 2 && dataReview" :content="thirdData" @change="nextPage"></third-apply>
|
||||||
v-if="currentIndex == 2 && dataReview"
|
|
||||||
:content="thirdData"
|
|
||||||
@change="nextPage"
|
|
||||||
></third-apply>
|
|
||||||
|
|
||||||
<div class="success-page" v-if="currentIndex == 3">
|
<div class="success-page" v-if="currentIndex == 3">
|
||||||
<span v-if="storeDisable == '' || storeDisable == 'APPLYING'">入驻申请提交成功,等待平台审核</span>
|
<span v-if="storeDisable == '' || storeDisable == 'APPLYING'">入驻申请提交成功,等待平台审核</span>
|
||||||
|
@ -37,62 +25,51 @@
|
||||||
<Button type="primary" @click='currentIndex = 0' v-if="storeDisable === 'REFUSED' && currentIndex === 3">重新申请</Button>
|
<Button type="primary" @click='currentIndex = 0' v-if="storeDisable === 'REFUSED' && currentIndex === 3">重新申请</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Modal
|
<Modal title="店铺入驻协议" v-model="showAgreement" width="1200" :closable="false" :mask-closable="false">
|
||||||
title="店铺入驻协议"
|
|
||||||
v-model="showAgreement"
|
|
||||||
width="1200"
|
|
||||||
:closable="false"
|
|
||||||
:mask-closable="false"
|
|
||||||
>
|
|
||||||
<div class="agreeent-con" v-html="agreementCon"></div>
|
<div class="agreeent-con" v-html="agreementCon"></div>
|
||||||
|
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<p><Checkbox v-model="checked">我已同意以上协议</Checkbox></p>
|
<p>
|
||||||
<Button
|
<Checkbox v-model="checked">我已同意以上协议</Checkbox>
|
||||||
type="primary"
|
</p>
|
||||||
:disabled="!checked"
|
<Button type="primary" :disabled="!checked" class="margin" @click="showAgreement = false">同意协议填写资质信息</Button>
|
||||||
class="margin"
|
|
||||||
@click="showAgreement = false"
|
|
||||||
>同意协议填写资质信息</Button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { agreement, applyStatus } from '@/api/shopentry';
|
import { agreement, applyStatus } from "@/api/shopentry";
|
||||||
import firstApply from './first-apply';
|
import firstApply from "./first-apply";
|
||||||
import secondApply from './second-apply';
|
import secondApply from "./second-apply";
|
||||||
import thirdApply from './third-apply';
|
import thirdApply from "./third-apply";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
firstApply,
|
firstApply,
|
||||||
secondApply,
|
secondApply,
|
||||||
thirdApply
|
thirdApply,
|
||||||
},
|
},
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentIndex: 0, // 当前步骤
|
currentIndex: 0, // 当前步骤
|
||||||
showAgreement: false, // 协议显示
|
showAgreement: false, // 协议显示
|
||||||
agreementCon: '', // 协议内容
|
agreementCon: "", // 协议内容
|
||||||
checked: false, // 选中协议
|
checked: false, // 选中协议
|
||||||
applyData: {}, // 申请数据
|
applyData: {}, // 申请数据
|
||||||
firstData: {}, // 第一步数据
|
firstData: {}, // 第一步数据
|
||||||
secondData: {}, // 第二步数据
|
secondData: {}, // 第二步数据
|
||||||
thirdData: {}, // 第三步数据
|
thirdData: {}, // 第三步数据
|
||||||
storeDisable: '', // APPLY OPEN 开店中 CLOSED 关闭 REFUSED 拒绝 APPLYING 申请中,审核
|
storeDisable: "", // APPLY OPEN 开店中 CLOSED 关闭 REFUSED 拒绝 APPLYING 申请中,审核
|
||||||
dataReview: true // 根据接口返回判断是否可展示数据
|
dataReview: true, // 根据接口返回判断是否可展示数据
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getArticle () {
|
getArticle() {
|
||||||
// 入驻协议
|
// 入驻协议
|
||||||
agreement().then((res) => {
|
agreement().then((res) => {
|
||||||
console.log(res);
|
this.agreementCon = res.result.content;
|
||||||
this.agreementCon = res.result;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getData () {
|
getData() {
|
||||||
applyStatus().then((res) => {
|
applyStatus().then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (!res.result) {
|
if (!res.result) {
|
||||||
|
@ -101,34 +78,34 @@ export default {
|
||||||
this.dataReview = false;
|
this.dataReview = false;
|
||||||
let data = res.result;
|
let data = res.result;
|
||||||
let first = [
|
let first = [
|
||||||
'addressIdPath',
|
"addressIdPath",
|
||||||
'addressPath',
|
"addressPath",
|
||||||
'companyAddress',
|
"companyAddress",
|
||||||
'companyEmail',
|
"companyEmail",
|
||||||
'companyName',
|
"companyName",
|
||||||
'employeeNum',
|
"employeeNum",
|
||||||
'legalId',
|
"legalId",
|
||||||
'legalName',
|
"legalName",
|
||||||
'licencePhoto',
|
"licencePhoto",
|
||||||
'legalPhoto',
|
"legalPhoto",
|
||||||
'licenseNum',
|
"licenseNum",
|
||||||
'linkName',
|
"linkName",
|
||||||
'linkPhone',
|
"linkPhone",
|
||||||
'registeredCapital',
|
"registeredCapital",
|
||||||
'scope'
|
"scope",
|
||||||
];
|
];
|
||||||
let second = [
|
let second = [
|
||||||
'settlementBankAccountName',
|
"settlementBankAccountName",
|
||||||
'settlementBankAccountNum',
|
"settlementBankAccountNum",
|
||||||
'settlementBankBranchName',
|
"settlementBankBranchName",
|
||||||
'settlementBankJointName'
|
"settlementBankJointName",
|
||||||
];
|
];
|
||||||
let third = [
|
let third = [
|
||||||
'goodsManagementCategory',
|
"goodsManagementCategory",
|
||||||
'storeCenter',
|
"storeCenter",
|
||||||
'storeDesc',
|
"storeDesc",
|
||||||
'storeLogo',
|
"storeLogo",
|
||||||
'storeName'
|
"storeName",
|
||||||
];
|
];
|
||||||
|
|
||||||
this.storeDisable = data.storeDisable;
|
this.storeDisable = data.storeDisable;
|
||||||
|
@ -143,7 +120,7 @@ export default {
|
||||||
this.thirdData[e] = data[e];
|
this.thirdData[e] = data[e];
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.storeDisable === 'APPLY') {
|
if (this.storeDisable === "APPLY") {
|
||||||
this.currentIndex = 0;
|
this.currentIndex = 0;
|
||||||
} else {
|
} else {
|
||||||
this.currentIndex = 3;
|
this.currentIndex = 3;
|
||||||
|
@ -154,13 +131,14 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
nextPage (step) {
|
nextPage(step) {
|
||||||
this.currentIndex = step;
|
this.currentIndex = step;
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted () {
|
},
|
||||||
|
mounted() {
|
||||||
this.getData();
|
this.getData();
|
||||||
}
|
this.getArticle();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
// import Vue from 'vue';
|
// import Vue from 'vue';
|
||||||
import axios from "axios";
|
import axios from 'axios';
|
||||||
import https from "https";
|
import https from 'https';
|
||||||
import { Message, Spin, Modal } from "view-design";
|
import { Message, Spin, Modal } from 'view-design';
|
||||||
import Storage from "./storage";
|
import Storage from './storage';
|
||||||
import config from "@/config";
|
import config from '@/config';
|
||||||
import router from "../router/index.js";
|
import router from '../router/index.js';
|
||||||
import store from "../vuex/store";
|
import store from '../vuex/store';
|
||||||
import { handleRefreshToken } from "@/api/index";
|
import { handleRefreshToken } from '@/api/index';
|
||||||
const qs = require("qs");
|
const qs = require('qs');
|
||||||
export const buyerUrl =
|
export const buyerUrl =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.buyer
|
? config.api_dev.buyer
|
||||||
: config.api_prod.buyer;
|
: config.api_prod.buyer;
|
||||||
export const commonUrl =
|
export const commonUrl =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.common
|
? config.api_dev.common
|
||||||
: config.api_prod.common;
|
: config.api_prod.common;
|
||||||
export const managerUrl =
|
export const managerUrl =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.manager
|
? config.api_dev.manager
|
||||||
: config.api_prod.manager;
|
: config.api_prod.manager;
|
||||||
export const sellerUrl =
|
export const sellerUrl =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.seller
|
? config.api_dev.seller
|
||||||
: config.api_prod.seller;
|
: config.api_prod.seller;
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
|
@ -35,7 +35,7 @@ const service = axios.create({
|
||||||
}),
|
}),
|
||||||
paramsSerializer: params =>
|
paramsSerializer: params =>
|
||||||
qs.stringify(params, {
|
qs.stringify(params, {
|
||||||
arrayFormat: "repeat"
|
arrayFormat: 'repeat'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -44,15 +44,15 @@ service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
const { loading } = config;
|
const { loading } = config;
|
||||||
// 如果是put/post请求,用qs.stringify序列化参数
|
// 如果是put/post请求,用qs.stringify序列化参数
|
||||||
const isPutPost = config.method === "put" || config.method === "post";
|
const isPutPost = config.method === 'put' || config.method === 'post';
|
||||||
const isJson = config.headers["Content-Type"] === "application/json";
|
const isJson = config.headers['Content-Type'] === 'application/json';
|
||||||
const isFile = config.headers["Content-Type"] === "multipart/form-data";
|
const isFile = config.headers['Content-Type'] === 'multipart/form-data';
|
||||||
if (isPutPost && isJson) {
|
if (isPutPost && isJson) {
|
||||||
config.data = JSON.stringify(config.data);
|
config.data = JSON.stringify(config.data);
|
||||||
}
|
}
|
||||||
if (isPutPost && !isFile && !isJson) {
|
if (isPutPost && !isFile && !isJson) {
|
||||||
config.data = qs.stringify(config.data, {
|
config.data = qs.stringify(config.data, {
|
||||||
arrayFormat: "repeat"
|
arrayFormat: 'repeat'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 配置全屏加载 */
|
/** 配置全屏加载 */
|
||||||
|
@ -60,19 +60,19 @@ service.interceptors.request.use(
|
||||||
config.loading = Spin.show();
|
config.loading = Spin.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
const uuid = Storage.getItem("uuid");
|
const uuid = Storage.getItem('uuid');
|
||||||
config.headers["uuid"] = uuid;
|
config.headers['uuid'] = uuid;
|
||||||
|
|
||||||
// 获取访问Token
|
// 获取访问Token
|
||||||
let accessToken = Storage.getItem("accessToken");
|
let accessToken = Storage.getItem('accessToken');
|
||||||
if (accessToken && config.needToken) {
|
if (accessToken && config.needToken) {
|
||||||
config.headers["accessToken"] = accessToken;
|
config.headers['accessToken'] = accessToken;
|
||||||
// 解析当前token时间
|
// 解析当前token时间
|
||||||
let jwtData = JSON.parse(
|
let jwtData = JSON.parse(
|
||||||
decodeURIComponent(escape(window.atob(accessToken.split(".")[1])))
|
decodeURIComponent(escape(window.atob(accessToken.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
||||||
);
|
);
|
||||||
if (jwtData.exp < Math.round(new Date() / 1000)) {
|
if (jwtData.exp < Math.round(new Date() / 1000)) {
|
||||||
refresh()
|
refresh(config)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,33 +83,32 @@ service.interceptors.request.use(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
async function refresh() {
|
async function refresh (error) {
|
||||||
const getTokenRes = await refreshToken();
|
const getTokenRes = await refreshToken();
|
||||||
if (getTokenRes === "success") {
|
if (getTokenRes === 'success') {
|
||||||
// 刷新token
|
// 刷新token
|
||||||
if (isRefreshToken === 1) {
|
if (isRefreshToken === 1) {
|
||||||
error.response.config.headers.accessToken = Storage.getItem(
|
error.response.config.headers.accessToken = Storage.getItem(
|
||||||
"accessToken"
|
'accessToken'
|
||||||
);
|
);
|
||||||
return service(error.response.config);
|
return service(error.response.config);
|
||||||
} else {
|
} else {
|
||||||
router.go(0);
|
router.go(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Storage.removeItem("accessToken");
|
Storage.removeItem('accessToken');
|
||||||
Storage.removeItem("refreshToken");
|
Storage.removeItem('refreshToken');
|
||||||
Storage.removeItem("userInfo");
|
Storage.removeItem('userInfo');
|
||||||
Storage.setItem("cartNum", 0);
|
Storage.setItem('cartNum', 0);
|
||||||
store.commit("SET_CARTNUM", 0);
|
store.commit('SET_CARTNUM', 0);
|
||||||
console.log("1111");
|
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "请登录",
|
title: '请登录',
|
||||||
content: "<p>请登录后执行此操作</p>",
|
content: '<p>请登录后执行此操作</p>',
|
||||||
okText: "立即登录",
|
okText: '立即登录',
|
||||||
cancelText: "继续浏览",
|
cancelText: '继续浏览',
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
router.push({
|
router.push({
|
||||||
path: "/login",
|
path: '/login',
|
||||||
query: {
|
query: {
|
||||||
rePath: router.history.current.path,
|
rePath: router.history.current.path,
|
||||||
query: JSON.stringify(router.history.current.query)
|
query: JSON.stringify(router.history.current.query)
|
||||||
|
@ -140,15 +139,17 @@ service.interceptors.response.use(
|
||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
|
|
||||||
if (isRefreshToken === 1) {
|
if (isRefreshToken === 1) {
|
||||||
refresh()
|
refresh(error)
|
||||||
isRefreshToken = 0;
|
isRefreshToken = 0;
|
||||||
}
|
}
|
||||||
|
} else if (errorResponse.status === 404) {
|
||||||
|
// 避免刷新token时也提示报错信息
|
||||||
} else {
|
} else {
|
||||||
if (error.message) {
|
if (error.message) {
|
||||||
let _message =
|
let _message =
|
||||||
error.code === "ECONNABORTED"
|
error.code === 'ECONNABORTED'
|
||||||
? "连接超时,请稍候再试!"
|
? '连接超时,请稍候再试!'
|
||||||
: "网络错误,请稍后再试!";
|
: '网络错误,请稍后再试!';
|
||||||
Message.error(errorData.message || _message);
|
Message.error(errorData.message || _message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,13 +172,13 @@ const closeLoading = target => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Method = {
|
export const Method = {
|
||||||
GET: "get",
|
GET: 'get',
|
||||||
POST: "post",
|
POST: 'post',
|
||||||
PUT: "put",
|
PUT: 'put',
|
||||||
DELETE: "delete"
|
DELETE: 'delete'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function request(options) {
|
export default function request (options) {
|
||||||
// 如果是服务端或者是请求的刷新token,不需要检查token直接请求。
|
// 如果是服务端或者是请求的刷新token,不需要检查token直接请求。
|
||||||
// if (process.server || options.url.indexOf('passport/token') !== -1) {
|
// if (process.server || options.url.indexOf('passport/token') !== -1) {
|
||||||
return service(options);
|
return service(options);
|
||||||
|
@ -186,19 +187,19 @@ export default function request(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 防抖闭包来一波
|
// 防抖闭包来一波
|
||||||
function getTokenDebounce() {
|
function getTokenDebounce () {
|
||||||
let lock = false;
|
let lock = false;
|
||||||
let success = false;
|
let success = false;
|
||||||
return function() {
|
return function () {
|
||||||
if (!lock) {
|
if (!lock) {
|
||||||
lock = true;
|
lock = true;
|
||||||
let oldRefreshToken = Storage.getItem("refreshToken");
|
let oldRefreshToken = Storage.getItem('refreshToken');
|
||||||
handleRefreshToken(oldRefreshToken)
|
handleRefreshToken(oldRefreshToken)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let { accessToken, refreshToken } = res.result;
|
let { accessToken, refreshToken } = res.result;
|
||||||
Storage.setItem("accessToken", accessToken);
|
Storage.setItem('accessToken', accessToken);
|
||||||
Storage.setItem("refreshToken", refreshToken);
|
Storage.setItem('refreshToken', refreshToken);
|
||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
lock = false;
|
lock = false;
|
||||||
|
@ -220,9 +221,9 @@ function getTokenDebounce() {
|
||||||
if (!lock) {
|
if (!lock) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
if (success) {
|
if (success) {
|
||||||
resolve("success");
|
resolve('success');
|
||||||
} else {
|
} else {
|
||||||
resolve("fail");
|
resolve('fail');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 500); // 轮询时间间隔
|
}, 500); // 轮询时间间隔
|
||||||
|
|
|
@ -2051,7 +2051,7 @@ copy-webpack-plugin@^4.0.1:
|
||||||
p-limit "^1.0.0"
|
p-limit "^1.0.0"
|
||||||
serialize-javascript "^1.4.0"
|
serialize-javascript "^1.4.0"
|
||||||
|
|
||||||
core-js@^2.4.0, core-js@^2.5.0:
|
core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.5:
|
||||||
version "2.6.12"
|
version "2.6.12"
|
||||||
resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.12.tgz?cache=0&sync_timestamp=1607216048810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
|
resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.12.tgz?cache=0&sync_timestamp=1607216048810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
|
||||||
integrity sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw=
|
integrity sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw=
|
||||||
|
@ -2621,12 +2621,12 @@ dom-serializer@0:
|
||||||
domelementtype "^2.0.1"
|
domelementtype "^2.0.1"
|
||||||
entities "^2.0.0"
|
entities "^2.0.0"
|
||||||
|
|
||||||
dom7@^3.0.0:
|
dom7@^2.1.5:
|
||||||
version "3.0.0"
|
version "2.1.5"
|
||||||
resolved "https://registry.npm.taobao.org/dom7/download/dom7-3.0.0.tgz#b861ce5d67a6becd7aaa3ad02942ff14b1240331"
|
resolved "https://registry.yarnpkg.com/dom7/-/dom7-2.1.5.tgz#a79411017800b31d8400070cdaebbfc92c1f6377"
|
||||||
integrity sha1-uGHOXWemvs16qjrQKUL/FLEkAzE=
|
integrity sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==
|
||||||
dependencies:
|
dependencies:
|
||||||
ssr-window "^3.0.0-alpha.1"
|
ssr-window "^2.0.0"
|
||||||
|
|
||||||
domain-browser@^1.1.1:
|
domain-browser@^1.1.1:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
|
@ -5150,6 +5150,16 @@ mute-stream@0.0.7:
|
||||||
resolved "https://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
|
resolved "https://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
|
||||||
integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
|
integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
|
||||||
|
|
||||||
|
mv-count-down@^0.1.15:
|
||||||
|
version "0.1.15"
|
||||||
|
resolved "https://registry.npmjs.org/mv-count-down/-/mv-count-down-0.1.15.tgz#a3f3c1677576e592c7710b441b2dda96acac2702"
|
||||||
|
integrity sha512-7poh86i27D/u4AvE9Ne8QHhy61p4MYAhSf4XAVyxzL0gXVCyccJ0NtJferEOxBP6C2q9jImknpKLGdwnEeJ7qQ==
|
||||||
|
dependencies:
|
||||||
|
core-js "^2.6.5"
|
||||||
|
vue "^2.6.10"
|
||||||
|
vue-router "^3.0.3"
|
||||||
|
vuex "^3.0.1"
|
||||||
|
|
||||||
nan@^2.12.1, nan@^2.13.2:
|
nan@^2.12.1, nan@^2.13.2:
|
||||||
version "2.14.2"
|
version "2.14.2"
|
||||||
resolved "https://registry.npm.taobao.org/nan/download/nan-2.14.2.tgz?cache=0&sync_timestamp=1602591700047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
|
resolved "https://registry.npm.taobao.org/nan/download/nan-2.14.2.tgz?cache=0&sync_timestamp=1602591700047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
|
||||||
|
@ -7477,10 +7487,10 @@ sshpk@^1.7.0:
|
||||||
safer-buffer "^2.0.2"
|
safer-buffer "^2.0.2"
|
||||||
tweetnacl "~0.14.0"
|
tweetnacl "~0.14.0"
|
||||||
|
|
||||||
ssr-window@^3.0.0, ssr-window@^3.0.0-alpha.1:
|
ssr-window@^2.0.0:
|
||||||
version "3.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.npm.taobao.org/ssr-window/download/ssr-window-3.0.0.tgz#fd5b82801638943e0cc704c4691801435af7ac37"
|
resolved "https://registry.yarnpkg.com/ssr-window/-/ssr-window-2.0.0.tgz#98c301aef99523317f8d69618f0010791096efc4"
|
||||||
integrity sha1-/VuCgBY4lD4MxwTEaRgBQ1r3rDc=
|
integrity sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A==
|
||||||
|
|
||||||
ssri@^5.2.4:
|
ssri@^5.2.4:
|
||||||
version "5.3.0"
|
version "5.3.0"
|
||||||
|
@ -7743,14 +7753,13 @@ svgo@^1.0.0:
|
||||||
unquote "~1.1.1"
|
unquote "~1.1.1"
|
||||||
util.promisify "~1.0.0"
|
util.promisify "~1.0.0"
|
||||||
|
|
||||||
swiper@^6.4.1:
|
swiper@^5.2.0:
|
||||||
version "6.4.1"
|
version "5.4.5"
|
||||||
resolved "https://registry.npm.taobao.org/swiper/download/swiper-6.4.1.tgz?cache=0&sync_timestamp=1607518804170&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fswiper%2Fdownload%2Fswiper-6.4.1.tgz#6d4e9252ed4226821d4005e77924e929848de8af"
|
resolved "https://registry.yarnpkg.com/swiper/-/swiper-5.4.5.tgz#a350f654bf68426dbb651793824925512d223c0f"
|
||||||
integrity sha1-bU6SUu1CJoIdQAXneSTpKYSN6K8=
|
integrity sha512-7QjA0XpdOmiMoClfaZ2lYN6ICHcMm72LXiY+NF4fQLFidigameaofvpjEEiTQuw3xm5eksG5hzkaRsjQX57vtA==
|
||||||
dependencies:
|
dependencies:
|
||||||
dom7 "^3.0.0"
|
dom7 "^2.1.5"
|
||||||
ssr-window "^3.0.0"
|
ssr-window "^2.0.0"
|
||||||
tslib "^2.0.0"
|
|
||||||
|
|
||||||
table@4.0.2:
|
table@4.0.2:
|
||||||
version "4.0.2"
|
version "4.0.2"
|
||||||
|
@ -7932,11 +7941,6 @@ tslib@^1.10.0:
|
||||||
resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.14.1.tgz?cache=0&sync_timestamp=1602286724979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.14.1.tgz?cache=0&sync_timestamp=1602286724979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
||||||
integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=
|
integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=
|
||||||
|
|
||||||
tslib@^2.0.0:
|
|
||||||
version "2.0.3"
|
|
||||||
resolved "https://registry.npm.taobao.org/tslib/download/tslib-2.0.3.tgz?cache=0&sync_timestamp=1602286724979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftslib%2Fdownload%2Ftslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c"
|
|
||||||
integrity sha1-jgdBrEX8DCJuWKF7/D5kubxsphw=
|
|
||||||
|
|
||||||
tty-browserify@0.0.0:
|
tty-browserify@0.0.0:
|
||||||
version "0.0.0"
|
version "0.0.0"
|
||||||
resolved "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
|
resolved "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
|
||||||
|
@ -8315,6 +8319,11 @@ vue-router@^3.0.1:
|
||||||
resolved "https://registry.npm.taobao.org/vue-router/download/vue-router-3.4.9.tgz?cache=0&sync_timestamp=1607347231238&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.4.9.tgz#c016f42030ae2932f14e4748b39a1d9a0e250e66"
|
resolved "https://registry.npm.taobao.org/vue-router/download/vue-router-3.4.9.tgz?cache=0&sync_timestamp=1607347231238&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.4.9.tgz#c016f42030ae2932f14e4748b39a1d9a0e250e66"
|
||||||
integrity sha1-wBb0IDCuKTLxTkdIs5odmg4lDmY=
|
integrity sha1-wBb0IDCuKTLxTkdIs5odmg4lDmY=
|
||||||
|
|
||||||
|
vue-router@^3.0.3:
|
||||||
|
version "3.5.2"
|
||||||
|
resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.5.2.tgz#5f55e3f251970e36c3e8d88a7cd2d67a350ade5c"
|
||||||
|
integrity sha512-807gn82hTnjCYGrnF3eNmIw/dk7/GE4B5h69BlyCK9KHASwSloD1Sjcn06zg9fVG4fYH2DrsNBZkpLtb25WtaQ==
|
||||||
|
|
||||||
vue-style-loader@^3.0.0, vue-style-loader@^3.0.1:
|
vue-style-loader@^3.0.0, vue-style-loader@^3.0.1:
|
||||||
version "3.1.2"
|
version "3.1.2"
|
||||||
resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-3.1.2.tgz#6b66ad34998fc9520c2f1e4d5fa4091641c1597a"
|
resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-3.1.2.tgz#6b66ad34998fc9520c2f1e4d5fa4091641c1597a"
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
"sockjs-client": "^1.4.0",
|
"sockjs-client": "^1.4.0",
|
||||||
"stompjs": "^2.3.3",
|
"stompjs": "^2.3.3",
|
||||||
"swiper": "^6.3.5",
|
"swiper": "^6.3.5",
|
||||||
|
"uuid": "^8.3.2",
|
||||||
"view-design": "^4.2.0",
|
"view-design": "^4.2.0",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
"vue-apexcharts": "^1.5.1",
|
"vue-apexcharts": "^1.5.1",
|
||||||
|
@ -48,8 +49,7 @@
|
||||||
"vuex": "^3.4.0",
|
"vuex": "^3.4.0",
|
||||||
"wangeditor": "^4.5.3",
|
"wangeditor": "^4.5.3",
|
||||||
"xlsx": "^0.16.2",
|
"xlsx": "^0.16.2",
|
||||||
"xss": "^1.0.7",
|
"xss": "^1.0.7"
|
||||||
"uuid": "^8.3.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^4.4.4",
|
"@vue/cli-plugin-babel": "^4.4.4",
|
||||||
|
|
|
@ -5,6 +5,13 @@ import { getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios'
|
||||||
export const getManagerBrandPage = (params) => {
|
export const getManagerBrandPage = (params) => {
|
||||||
return getRequest('/goods/brand/getByPage', params)
|
return getRequest('/goods/brand/getByPage', params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量删除
|
||||||
|
export const delBrand = (ids) =>{
|
||||||
|
return deleteRequest(`/goods/brand/delByIds/${ids}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 添加
|
// 添加
|
||||||
export const addBrand = (params) => {
|
export const addBrand = (params) => {
|
||||||
return postRequest('/goods/brand', params)
|
return postRequest('/goods/brand', params)
|
||||||
|
@ -69,15 +76,15 @@ export const disableCategory = (id, type) => {
|
||||||
|
|
||||||
// 获取商品规格分页列表
|
// 获取商品规格分页列表
|
||||||
export const getSpecListData = (params) => {
|
export const getSpecListData = (params) => {
|
||||||
return getRequest('/goods/spec/page', params)
|
return getRequest('/goods/spec', params)
|
||||||
}
|
}
|
||||||
// 添加或修改规格设置
|
// 添加或修改规格设置
|
||||||
export const insertSpec = (params) => {
|
export const insertSpec = (params) => {
|
||||||
return postRequest('/goods/spec', params)
|
return postRequest('/goods/spec', params)
|
||||||
}
|
}
|
||||||
// 添加或修改规格设置
|
// 添加或修改规格设置
|
||||||
export const updateSpec = (params) => {
|
export const updateSpec = (id,params) => {
|
||||||
return putRequest('/goods/spec', params)
|
return putRequest(`/goods/spec/${id}`, params)
|
||||||
}
|
}
|
||||||
//根据分类id获取关联规格
|
//根据分类id获取关联规格
|
||||||
export const getCategorySpecListData = (category_id, params) => {
|
export const getCategorySpecListData = (category_id, params) => {
|
||||||
|
@ -87,15 +94,6 @@ export const getCategorySpecListData = (category_id, params) => {
|
||||||
export const delSpec = (id, params) => {
|
export const delSpec = (id, params) => {
|
||||||
return deleteRequest(`/goods/spec/${id}`, params)
|
return deleteRequest(`/goods/spec/${id}`, params)
|
||||||
}
|
}
|
||||||
// 获取商品规格值列表
|
|
||||||
export const getSpecValuesListData = (id, params) => {
|
|
||||||
return getRequest(`/goods/specValues/values/${id}`, params)
|
|
||||||
}
|
|
||||||
// 添加商品规格值
|
|
||||||
export const saveSpecValues = (id, params) => {
|
|
||||||
return postRequest(`/goods/specValues/save/${id}`, params)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 查询某分类下的全部子分类列表
|
// 查询某分类下的全部子分类列表
|
||||||
export const getGoodsCategory = (parent_id) => {
|
export const getGoodsCategory = (parent_id) => {
|
||||||
|
|
|
@ -30,7 +30,7 @@ export const getLiveList = params => {
|
||||||
|
|
||||||
// 获取直播间详情
|
// 获取直播间详情
|
||||||
export const getLiveInfo = studioId => {
|
export const getLiveInfo = studioId => {
|
||||||
return getRequest(`/broadcast/studio/studioInfo/${studioId}`);
|
return getRequest(`/broadcast/studio/${studioId}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取当前进行中的促销活动商品
|
// 获取当前进行中的促销活动商品
|
||||||
|
|
|
@ -64,14 +64,6 @@ service.interceptors.response.use(
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
break;
|
break;
|
||||||
case 403:
|
|
||||||
// 权限不足
|
|
||||||
if (data.message !== null) {
|
|
||||||
Message.error(data.message);
|
|
||||||
} else {
|
|
||||||
Message.error("权限不足");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 500:
|
case 500:
|
||||||
// 系统异常
|
// 系统异常
|
||||||
if (data.message !== null) {
|
if (data.message !== null) {
|
||||||
|
@ -89,6 +81,8 @@ service.interceptors.response.use(
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
// 这种情况一般调到登录页
|
// 这种情况一般调到登录页
|
||||||
|
} else if (error.response.status === 404) {
|
||||||
|
// 避免刷新token报错
|
||||||
} else if (error.response.status === 403) {
|
} else if (error.response.status === 403) {
|
||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
if(isRefreshToken === 1) {
|
if(isRefreshToken === 1) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import ViewUI from 'view-design'
|
||||||
import './styles/theme.less';
|
import './styles/theme.less';
|
||||||
|
|
||||||
import "core-js/stable"
|
import "core-js/stable"
|
||||||
import "regenerator-runtime/runtime"
|
// import "regenerator-runtime/runtime"
|
||||||
import App from './App'
|
import App from './App'
|
||||||
import { router } from './router/index'
|
import { router } from './router/index'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
|
|
|
@ -16,6 +16,22 @@ export function unitPrice(val, unit, location) {
|
||||||
return (unit || '') + price
|
return (unit || '') + price
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单来源
|
||||||
|
*/
|
||||||
|
export function clientTypeWay(val) {
|
||||||
|
if (val == "H5") {
|
||||||
|
return "移动端";
|
||||||
|
} else if (val == "PC") {
|
||||||
|
return "PC端";
|
||||||
|
} else if (val == "WECHAT_MP") {
|
||||||
|
return "小程序端";
|
||||||
|
} else if (val == "APP") {
|
||||||
|
return "移动应用端";
|
||||||
|
} else {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -147,21 +147,13 @@ export default {
|
||||||
sortable: false,
|
sortable: false,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.distributionStatus == "PASS") {
|
if (params.row.distributionStatus == "PASS") {
|
||||||
return h("Badge", {
|
return h("Tag", {props: {color: "green",},},"通过");
|
||||||
props: { status: "success", text: "审核通过" },
|
|
||||||
});
|
|
||||||
} else if (params.row.distributionStatus == "APPLY") {
|
} else if (params.row.distributionStatus == "APPLY") {
|
||||||
return h("Badge", {
|
return h("Tag", {props: {color: "geekblue",},},"待审核");
|
||||||
props: { status: "processing", text: "申请中" },
|
|
||||||
});
|
|
||||||
} else if (params.row.distributionStatus == "RETREAT") {
|
} else if (params.row.distributionStatus == "RETREAT") {
|
||||||
return h("Badge", {
|
return h("Tag", {props: {color: "volcano",},},"清退");
|
||||||
props: { status: "warning", text: "已清退" },
|
|
||||||
});
|
|
||||||
} else if (params.row.distributionStatus == "REFUSE") {
|
} else if (params.row.distributionStatus == "REFUSE") {
|
||||||
return h("Badge", {
|
return h("Tag", {props: {color: "red",},},"拒绝");
|
||||||
props: { status: "error", text: "审核拒绝" },
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,10 +67,12 @@ export default {
|
||||||
{
|
{
|
||||||
type: "selection",
|
type: "selection",
|
||||||
width: 60,
|
width: 60,
|
||||||
align: "center"
|
align: "center",
|
||||||
|
fixed: "left",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "商品图片",
|
title: "商品图片",
|
||||||
|
fixed: "left",
|
||||||
key: "thumbnail",
|
key: "thumbnail",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
|
|
@ -38,6 +38,12 @@
|
||||||
<Option value="DOWN">下架</Option>
|
<Option value="DOWN">下架</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
|
<Form-item label="商品类型" prop="status">
|
||||||
|
<Select v-model="searchForm.goodsType" placeholder="请选择" clearable style="width: 200px">
|
||||||
|
<Option value="PHYSICAL_GOODS">实物商品</Option>
|
||||||
|
<Option value="VIRTUAL_GOODS">虚拟商品</Option>
|
||||||
|
</Select>
|
||||||
|
</Form-item>
|
||||||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
|
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -174,29 +180,29 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "商品类型",
|
||||||
|
key: "goodsType",
|
||||||
|
width: 130,
|
||||||
|
render: (h, params) => {
|
||||||
|
if (params.row.goodsType === 'PHYSICAL_GOODS') {
|
||||||
|
return h("Tag", {props: {color: "green",},}, "实物商品");
|
||||||
|
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
|
||||||
|
return h("Tag", {props: {color: "volcano",},}, "虚拟商品");
|
||||||
|
} else {
|
||||||
|
return h("Tag", {props: {color: "geekblue",},}, "电子卡券");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
key: "marketEnable",
|
key: "marketEnable",
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.marketEnable == "DOWN") {
|
if (params.row.marketEnable == "DOWN") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green"},},"上架");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "下架",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.marketEnable == "UPPER") {
|
} else if (params.row.marketEnable == "UPPER") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "volcano",},},"下架");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "上架",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -206,36 +212,14 @@ export default {
|
||||||
width: 130,
|
width: 130,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.isAuth == "TOBEAUDITED") {
|
if (params.row.isAuth == "TOBEAUDITED") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "volcano",},},"待审核");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "待审核",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "PASS") {
|
} else if (params.row.isAuth == "PASS") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green"},},"通过");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "审核通过",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "REFUSE") {
|
} else if (params.row.isAuth == "REFUSE") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "red",},},"拒绝");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "审核拒绝",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "店铺名称",
|
title: "店铺名称",
|
||||||
key: "storeName",
|
key: "storeName",
|
||||||
|
|
|
@ -1,25 +1,13 @@
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "@/styles/table-common.scss";
|
@import "@/styles/table-common.scss";
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<Card>
|
<Card>
|
||||||
<Row @keydown.enter.native="handleSearch">
|
<Row @keydown.enter.native="handleSearch">
|
||||||
<Form
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
ref="searchForm"
|
|
||||||
:model="searchForm"
|
|
||||||
inline
|
|
||||||
:label-width="70"
|
|
||||||
class="search-form"
|
|
||||||
>
|
|
||||||
<Form-item label="品牌名称" prop="name">
|
<Form-item label="品牌名称" prop="name">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.name"
|
|
||||||
placeholder="请输入品牌名称"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
|
|
||||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||||
|
@ -28,64 +16,41 @@
|
||||||
<Row class="operation padding-row">
|
<Row class="operation padding-row">
|
||||||
<Button @click="add" type="primary">添加</Button>
|
<Button @click="add" type="primary">添加</Button>
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||||
:loading="loading"
|
|
||||||
border
|
|
||||||
:columns="columns"
|
|
||||||
:data="data"
|
|
||||||
ref="table"
|
|
||||||
sortable="custom"
|
|
||||||
@on-sort-change="changeSort"
|
|
||||||
@on-selection-change="changeSelect"
|
|
||||||
></Table>
|
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
<Page
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||||
:current="searchForm.pageNumber"
|
show-total show-elevator show-sizer></Page>
|
||||||
:total="total"
|
|
||||||
:page-size="searchForm.pageSize"
|
|
||||||
@on-change="changePage"
|
|
||||||
@on-page-size-change="changePageSize"
|
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-elevator
|
|
||||||
show-sizer
|
|
||||||
></Page>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
<Modal
|
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||||
:title="modalTitle"
|
|
||||||
v-model="modalVisible"
|
|
||||||
:mask-closable="false"
|
|
||||||
:width="500"
|
|
||||||
>
|
|
||||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||||
<FormItem label="品牌名称" prop="name">
|
<FormItem label="品牌名称" prop="name">
|
||||||
<Input v-model="form.name" clearable style="width: 100%"/>
|
<Input v-model="form.name" clearable style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="品牌图标" prop="logo">
|
<FormItem label="品牌图标" prop="logo">
|
||||||
<upload-pic-input
|
<upload-pic-input v-model="form.logo" style="width: 100%"></upload-pic-input>
|
||||||
v-model="form.logo"
|
|
||||||
style="width: 100%"
|
|
||||||
></upload-pic-input>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交
|
||||||
>提交
|
</Button>
|
||||||
</Button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getManagerBrandPage, addBrand,updateBrand, disableBrand} from "@/api/goods";
|
import {
|
||||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
getManagerBrandPage,
|
||||||
|
addBrand,
|
||||||
|
updateBrand,
|
||||||
|
disableBrand,
|
||||||
|
delBrand,
|
||||||
|
} from "@/api/goods";
|
||||||
|
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "brand",
|
name: "brand",
|
||||||
components: {
|
components: {
|
||||||
uploadPicInput,
|
uploadPicInput,
|
||||||
|
@ -148,23 +113,9 @@
|
||||||
align: "left",
|
align: "left",
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.deleteFlag == 0) {
|
if (params.row.deleteFlag == 0) {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green",},},"启用");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "启用",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.deleteFlag == 1) {
|
} else if (params.row.deleteFlag == 1) {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "volcano",},},"禁用");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "禁用",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: [
|
filters: [
|
||||||
|
@ -253,6 +204,24 @@
|
||||||
"编辑"
|
"编辑"
|
||||||
),
|
),
|
||||||
enableOrDisable,
|
enableOrDisable,
|
||||||
|
|
||||||
|
h(
|
||||||
|
"Button",
|
||||||
|
{
|
||||||
|
props: {
|
||||||
|
size: "small",
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
marginRight: "5px",
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
click: () => {
|
||||||
|
this.delBrand(params.row.id);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"删除"
|
||||||
|
),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -262,6 +231,16 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 删除品牌
|
||||||
|
async delBrand(id) {
|
||||||
|
let res = await delBrand(id);
|
||||||
|
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("品牌删除成功!");
|
||||||
|
this.getDataList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
@ -300,7 +279,7 @@
|
||||||
getManagerBrandPage(this.searchForm).then((res) => {
|
getManagerBrandPage(this.searchForm).then((res) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
console.warn(12)
|
console.warn(12);
|
||||||
this.data = res.result.records;
|
this.data = res.result.records;
|
||||||
this.total = res.result.total;
|
this.total = res.result.total;
|
||||||
}
|
}
|
||||||
|
@ -363,7 +342,7 @@
|
||||||
content: "您确认要启用品牌 " + v.name + " ?",
|
content: "您确认要启用品牌 " + v.name + " ?",
|
||||||
loading: true,
|
loading: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
disableBrand(v.id, {disable: false}).then((res) => {
|
disableBrand(v.id, { disable: false }).then((res) => {
|
||||||
this.$Modal.remove();
|
this.$Modal.remove();
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("操作成功");
|
this.$Message.success("操作成功");
|
||||||
|
@ -379,7 +358,7 @@
|
||||||
content: "您确认要禁用品牌 " + v.name + " ?",
|
content: "您确认要禁用品牌 " + v.name + " ?",
|
||||||
loading: true,
|
loading: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
disableBrand(v.id, {disable: true}).then((res) => {
|
disableBrand(v.id, { disable: true }).then((res) => {
|
||||||
this.$Modal.remove();
|
this.$Modal.remove();
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("操作成功");
|
this.$Message.success("操作成功");
|
||||||
|
@ -393,5 +372,5 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
|
|
||||||
<Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500">
|
<Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500">
|
||||||
<Form ref="specForm" :model="specForm" :label-width="100">
|
<Form ref="specForm" :model="specForm" :label-width="100">
|
||||||
<Select v-model="specForm.category_specs" multiple>
|
<Select v-model="specForm.categorySpecs" multiple>
|
||||||
<Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName">
|
<Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName">
|
||||||
</Option>
|
</Option>
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -134,7 +134,6 @@ import {
|
||||||
} from "@/api/goods";
|
} from "@/api/goods";
|
||||||
import TreeTable from "@/views/my-components/tree-table/Table/Table";
|
import TreeTable from "@/views/my-components/tree-table/Table/Table";
|
||||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||||
import * as filters from "@/utils/filters";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "lili-components",
|
name: "lili-components",
|
||||||
|
@ -153,7 +152,7 @@ export default {
|
||||||
specifications: [], //规格集合
|
specifications: [], //规格集合
|
||||||
categoryId: "", // 分类id
|
categoryId: "", // 分类id
|
||||||
category_brands: [], //已经选择的品牌
|
category_brands: [], //已经选择的品牌
|
||||||
category_specs: [], //已经选择的规格
|
categorySpecs: [], //已经选择的规格
|
||||||
expandLevel: 1, // 展开层级
|
expandLevel: 1, // 展开层级
|
||||||
modalType: 0, // 添加或编辑标识
|
modalType: 0, // 添加或编辑标识
|
||||||
modalVisible: false, // 添加或编辑显示
|
modalVisible: false, // 添加或编辑显示
|
||||||
|
@ -212,13 +211,17 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
categoryIndex: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
changeSortCate(val) {
|
changeSortCate(val) {
|
||||||
let way = this.categoryList.find((item) => {
|
let way = this.categoryList.find((item, index) => {
|
||||||
|
if (item.name == val) {
|
||||||
|
this.categoryIndex = index;
|
||||||
|
console.log((this.categoryIndex = index));
|
||||||
return item.name == val;
|
return item.name == val;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.tableData = [way];
|
this.tableData = [way];
|
||||||
},
|
},
|
||||||
|
@ -236,7 +239,8 @@ export default {
|
||||||
//获取所有规格
|
//获取所有规格
|
||||||
getSpecList() {
|
getSpecList() {
|
||||||
getSpecificationList().then((res) => {
|
getSpecificationList().then((res) => {
|
||||||
if (res.success) {
|
if (res.length != 0) {
|
||||||
|
|
||||||
this.specifications = res;
|
this.specifications = res;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -244,7 +248,7 @@ export default {
|
||||||
//弹出品牌关联框
|
//弹出品牌关联框
|
||||||
brandOperation(v) {
|
brandOperation(v) {
|
||||||
getCategoryBrandListData(v.id).then((res) => {
|
getCategoryBrandListData(v.id).then((res) => {
|
||||||
console.warn(res)
|
console.warn(res);
|
||||||
this.categoryId = v.id;
|
this.categoryId = v.id;
|
||||||
this.modalBrandTitle = "品牌关联";
|
this.modalBrandTitle = "品牌关联";
|
||||||
this.brandForm.categoryBrands = res.result.map((item) => item.id);
|
this.brandForm.categoryBrands = res.result.map((item) => item.id);
|
||||||
|
@ -257,7 +261,7 @@ export default {
|
||||||
getCategorySpecListData(v.id).then((res) => {
|
getCategorySpecListData(v.id).then((res) => {
|
||||||
this.categoryId = v.id;
|
this.categoryId = v.id;
|
||||||
this.modalSpecTitle = "规格关联";
|
this.modalSpecTitle = "规格关联";
|
||||||
this.specForm.category_specs = res.map((item) => item.id);
|
this.specForm.categorySpecs = res.map((item) => item.id);
|
||||||
this.modalSpecVisible = true;
|
this.modalSpecVisible = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -337,7 +341,7 @@ export default {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("添加成功");
|
this.$Message.success("添加成功");
|
||||||
this.getAllList(0);
|
this.getAllList(this.categoryIndex);
|
||||||
this.modalVisible = false;
|
this.modalVisible = false;
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
}
|
}
|
||||||
|
@ -348,7 +352,7 @@ export default {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("修改成功");
|
this.$Message.success("修改成功");
|
||||||
this.getAllList(0);
|
this.getAllList(this.categoryIndex);
|
||||||
this.modalVisible = false;
|
this.modalVisible = false;
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
}
|
}
|
||||||
|
@ -376,13 +380,11 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getAllList(parent_id) {
|
getAllList(parent_id) {
|
||||||
this.sortCateList = []
|
this.sortCateList = [];
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getCategoryTree(parent_id).then((res) => {
|
getCategoryTree(parent_id).then((res) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// 仅展开指定级数 默认后台已展开所有
|
|
||||||
let expandLevel = this.expandLevel;
|
|
||||||
localStorage.setItem("category", JSON.stringify(res.result));
|
localStorage.setItem("category", JSON.stringify(res.result));
|
||||||
res.result.forEach((e, index, arr) => {
|
res.result.forEach((e, index, arr) => {
|
||||||
this.sortCateList.push({
|
this.sortCateList.push({
|
||||||
|
@ -390,65 +392,13 @@ export default {
|
||||||
value: e.name,
|
value: e.name,
|
||||||
});
|
});
|
||||||
this.sortCate = arr[0].name;
|
this.sortCate = arr[0].name;
|
||||||
if (expandLevel == 1) {
|
|
||||||
if (e.level == 0) {
|
|
||||||
e.expand = false;
|
|
||||||
}
|
|
||||||
if (e.children && e.children.length > 0) {
|
|
||||||
e.children.forEach(function (c) {
|
|
||||||
if (c.level == 1) {
|
|
||||||
c.expand = false;
|
|
||||||
}
|
|
||||||
if (c.children && c.children.length > 0) {
|
|
||||||
c.children.forEach(function (b) {
|
|
||||||
if (b.level == 2) {
|
|
||||||
b.expand = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (expandLevel == 2) {
|
|
||||||
if (e.level == 0) {
|
|
||||||
e.expand = true;
|
|
||||||
}
|
|
||||||
if (e.children && e.children.length > 0) {
|
|
||||||
e.children.forEach(function (c) {
|
|
||||||
if (c.level == 1) {
|
|
||||||
c.expand = false;
|
|
||||||
}
|
|
||||||
if (c.children && c.children.length > 0) {
|
|
||||||
c.children.forEach(function (b) {
|
|
||||||
if (b.level == 2) {
|
|
||||||
b.expand = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (expandLevel == 3) {
|
|
||||||
if (e.level == 0) {
|
|
||||||
e.expand = true;
|
|
||||||
}
|
|
||||||
if (e.children && e.children.length > 0) {
|
|
||||||
e.children.forEach(function (c) {
|
|
||||||
if (c.level == 1) {
|
|
||||||
c.expand = true;
|
|
||||||
}
|
|
||||||
if (c.children && c.children.length > 0) {
|
|
||||||
c.children.forEach(function (b) {
|
|
||||||
if (b.level == 2) {
|
|
||||||
b.expand = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.categoryList = res.result;
|
this.categoryList = res.result;
|
||||||
this.tableData = [res.result[0]];
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$set(this, "tableData", [res.result[this.categoryIndex]]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -508,22 +458,8 @@ export default {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
.article {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 400;
|
|
||||||
margin: 12px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.href-text {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.operation {
|
.operation {
|
||||||
margin-bottom: 2vh;
|
margin-bottom: 2vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-count {
|
|
||||||
font-weight: 600;
|
|
||||||
color: #40a9ff;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
</Row>
|
||||||
<Row class="operation padding-row">
|
<Row class="operation padding-row">
|
||||||
<Button @click="add" type="primary" >添加</Button>
|
<Button @click="add" type="primary">添加</Button>
|
||||||
<Button @click="delAll" >批量删除</Button>
|
<Button @click="delAll">批量删除</Button>
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Table
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
@ -60,27 +60,11 @@
|
||||||
>
|
>
|
||||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||||
<FormItem label="规格名称" prop="specName">
|
<FormItem label="规格名称" prop="specName">
|
||||||
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%" />
|
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
<FormItem label="规格值" prop="specValue">
|
||||||
<div slot="footer">
|
|
||||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
|
||||||
<Button type="primary" :loading="submitLoading" @click="saveSpec"
|
|
||||||
>提交</Button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</Modal>
|
|
||||||
<Modal
|
|
||||||
:title="modalTitle"
|
|
||||||
v-model="dialogSpecValuesVisible"
|
|
||||||
:mask-closable="false"
|
|
||||||
:width="500"
|
|
||||||
:styles="{ top: '30px' }"
|
|
||||||
class="permModal"
|
|
||||||
>
|
|
||||||
<Form ref="specForm" :model="specForm" :label-width="100">
|
|
||||||
<Select
|
<Select
|
||||||
v-model="specForm.specValue"
|
v-model="form.specValue"
|
||||||
placeholder="输入后回车添加"
|
placeholder="输入后回车添加"
|
||||||
multiple
|
multiple
|
||||||
filterable
|
filterable
|
||||||
|
@ -90,23 +74,19 @@
|
||||||
style="width: 100%; text-align: left; margin-right: 10px"
|
style="width: 100%; text-align: left; margin-right: 10px"
|
||||||
>
|
>
|
||||||
<Option
|
<Option
|
||||||
v-for="item in specValues"
|
v-for="item in specValue"
|
||||||
:value="item.specValue"
|
:value="item"
|
||||||
:key="item.id"
|
:label="item"
|
||||||
:label="item.specValue"
|
|
||||||
>
|
>
|
||||||
</Option>
|
</Option>
|
||||||
</Select>
|
</Select>
|
||||||
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="text" @click="dialogSpecValuesVisible = false"
|
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||||
>取消</Button
|
<Button type="primary" :loading="submitLoading" @click="saveSpec"
|
||||||
>
|
>提交
|
||||||
<Button
|
</Button
|
||||||
type="primary"
|
|
||||||
:loading="submitLoading"
|
|
||||||
@click="submitSpecValuesForm"
|
|
||||||
>提交</Button
|
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
@ -118,10 +98,9 @@ import {
|
||||||
getSpecListData,
|
getSpecListData,
|
||||||
insertSpec,
|
insertSpec,
|
||||||
updateSpec,
|
updateSpec,
|
||||||
delSpec,
|
delSpec
|
||||||
getSpecValuesListData,
|
|
||||||
saveSpecValues,
|
|
||||||
} from "@/api/goods";
|
} from "@/api/goods";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "spec",
|
name: "spec",
|
||||||
components: {},
|
components: {},
|
||||||
|
@ -131,7 +110,6 @@ export default {
|
||||||
modalType: 0, // 添加或编辑标识
|
modalType: 0, // 添加或编辑标识
|
||||||
modalVisible: false, // 添加或编辑显示
|
modalVisible: false, // 添加或编辑显示
|
||||||
modalTitle: "", // 添加或编辑标题
|
modalTitle: "", // 添加或编辑标题
|
||||||
dialogSpecValuesVisible: false, // 添加或编辑规格值
|
|
||||||
specTitle: "", // 添加或编辑规格值
|
specTitle: "", // 添加或编辑规格值
|
||||||
searchForm: {
|
searchForm: {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
|
@ -145,9 +123,8 @@ export default {
|
||||||
specName: "",
|
specName: "",
|
||||||
specValue: "",
|
specValue: "",
|
||||||
},
|
},
|
||||||
specForm: {},
|
|
||||||
/** 编辑规格值 */
|
/** 编辑规格值 */
|
||||||
specValues: [],
|
specValue: [],
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {},
|
formValidate: {},
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
|
@ -179,24 +156,7 @@ export default {
|
||||||
width: 250,
|
width: 250,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h("div", [
|
return h("div", [
|
||||||
h(
|
|
||||||
"Button",
|
|
||||||
{
|
|
||||||
props: {
|
|
||||||
type: "primary",
|
|
||||||
size: "small",
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
marginRight: "5px",
|
|
||||||
},
|
|
||||||
on: {
|
|
||||||
click: () => {
|
|
||||||
this.editSpec(params.row);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"编辑规格值"
|
|
||||||
),
|
|
||||||
h(
|
h(
|
||||||
"Button",
|
"Button",
|
||||||
{
|
{
|
||||||
|
@ -239,23 +199,28 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//初始化,获取数据
|
||||||
init() {
|
init() {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//修改分页
|
||||||
changePage(v) {
|
changePage(v) {
|
||||||
this.searchForm.pageNumber = v;
|
this.searchForm.pageNumber = v;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
this.clearSelectAll();
|
this.clearSelectAll();
|
||||||
},
|
},
|
||||||
|
//修改页面大小
|
||||||
changePageSize(v) {
|
changePageSize(v) {
|
||||||
this.searchForm.pageSize = v;
|
this.searchForm.pageSize = v;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//搜索参数
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchForm.pageNumber = 1;
|
this.searchForm.pageNumber = 1;
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.pageSize = 10;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//重置搜索参数
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.$refs.searchForm.resetFields();
|
this.$refs.searchForm.resetFields();
|
||||||
this.searchForm.pageNumber = 1;
|
this.searchForm.pageNumber = 1;
|
||||||
|
@ -263,6 +228,7 @@ export default {
|
||||||
// 重新加载数据
|
// 重新加载数据
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//更改排序
|
||||||
changeSort(e) {
|
changeSort(e) {
|
||||||
this.searchForm.sort = e.key;
|
this.searchForm.sort = e.key;
|
||||||
this.searchForm.order = e.order;
|
this.searchForm.order = e.order;
|
||||||
|
@ -271,36 +237,27 @@ export default {
|
||||||
}
|
}
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//清除已选择
|
||||||
clearSelectAll() {
|
clearSelectAll() {
|
||||||
this.$refs.table.selectAll(false);
|
this.$refs.table.selectAll(false);
|
||||||
},
|
},
|
||||||
|
//修改已选择
|
||||||
changeSelect(e) {
|
changeSelect(e) {
|
||||||
this.selectList = e;
|
this.selectList = e;
|
||||||
this.selectCount = e.length;
|
this.selectCount = e.length;
|
||||||
},
|
},
|
||||||
|
//获取数据
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||||
getSpecListData(this.searchForm).then((res) => {
|
getSpecListData(this.searchForm).then((res) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.success) {
|
this.data = res.records;
|
||||||
this.data = res.result.records;
|
this.total = res.total;
|
||||||
this.total = res.result.total;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
submitSpecValuesForm() {
|
//新增规格
|
||||||
saveSpecValues(this.specForm.specId, this.specForm).then((res) => {
|
|
||||||
this.submitLoading = false;
|
|
||||||
if (res.success) {
|
|
||||||
this.$Message.success("规格值保存成功");
|
|
||||||
this.getDataList();
|
|
||||||
this.modalVisible = false;
|
|
||||||
this.dialogSpecValuesVisible = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
saveSpec() {
|
saveSpec() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -318,7 +275,7 @@ export default {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 编辑
|
// 编辑
|
||||||
updateSpec(this.form).then((res) => {
|
updateSpec(this.form.id, this.form).then((res) => {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("操作成功");
|
this.$Message.success("操作成功");
|
||||||
|
@ -330,6 +287,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//弹出添加框
|
||||||
add() {
|
add() {
|
||||||
this.modalType = 0;
|
this.modalType = 0;
|
||||||
this.modalTitle = "添加";
|
this.modalTitle = "添加";
|
||||||
|
@ -337,31 +295,31 @@ export default {
|
||||||
delete this.form.id;
|
delete this.form.id;
|
||||||
this.modalVisible = true;
|
this.modalVisible = true;
|
||||||
},
|
},
|
||||||
|
//弹出编辑框
|
||||||
edit(v) {
|
edit(v) {
|
||||||
this.modalType = 1;
|
this.modalType = 1;
|
||||||
this.modalTitle = "编辑";
|
this.modalTitle = "编辑";
|
||||||
this.$refs.form.resetFields();
|
|
||||||
// 转换null为""
|
// 转换null为""
|
||||||
for (let attr in v) {
|
for (let attr in v) {
|
||||||
if (v[attr] === null) {
|
if (v[attr] === null) {
|
||||||
v[attr] = "";
|
v[attr] = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let str = JSON.stringify(v);
|
let localVal = v.specValue;
|
||||||
let data = JSON.parse(str);
|
|
||||||
this.form = data;
|
this.form.specName = v.specName;
|
||||||
|
this.form.id = v.id;
|
||||||
|
this.form.specValue = v.specValue;
|
||||||
|
|
||||||
|
if (localVal && localVal.indexOf("," > 0)) {
|
||||||
|
this.form.specValue = localVal.split(",")
|
||||||
|
this.specValue = this.form.specValue
|
||||||
|
this.$set(this, 'specValue', this.form.specValue)
|
||||||
|
} else {
|
||||||
|
this.specValue = [];
|
||||||
|
}
|
||||||
this.modalVisible = true;
|
this.modalVisible = true;
|
||||||
},
|
},
|
||||||
editSpec(v) {
|
|
||||||
getSpecValuesListData(v.id).then((res) => {
|
|
||||||
this.modalType = 1;
|
|
||||||
this.modalTitle = "编辑";
|
|
||||||
this.specValues = res.result;
|
|
||||||
this.specForm.specValue = res.result.map(item => item.specValue)
|
|
||||||
this.specForm.specId = v.id;
|
|
||||||
this.dialogSpecValuesVisible = true;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
remove(v) {
|
remove(v) {
|
||||||
this.$Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: "确认删除",
|
title: "确认删除",
|
||||||
|
@ -415,5 +373,5 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "@/styles/table-common.scss";
|
@import "@/styles/table-common.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -135,35 +135,11 @@ export default {
|
||||||
width: 90,
|
width: 90,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.grade == "GOOD") {
|
if (params.row.grade == "GOOD") {
|
||||||
return h(
|
return h("Tag", {props: {color: "green",},}, "好评");
|
||||||
"Tag",
|
|
||||||
{
|
|
||||||
props: {
|
|
||||||
color: "success",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"好评"
|
|
||||||
);
|
|
||||||
} else if (params.row.grade == "MODERATE") {
|
} else if (params.row.grade == "MODERATE") {
|
||||||
return h(
|
return h("Tag", {props: {color: "orange",},}, "中评");
|
||||||
"Tag",
|
|
||||||
{
|
|
||||||
props: {
|
|
||||||
color: "warning",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"中评"
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
return h(
|
return h("Tag", {props: {color: "red",},}, "差评");
|
||||||
"Tag",
|
|
||||||
{
|
|
||||||
props: {
|
|
||||||
color: "error",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"差评"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -74,6 +74,11 @@ export default {
|
||||||
icon: "md-happy",
|
icon: "md-happy",
|
||||||
___type: "sign",
|
___type: "sign",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "小程序直播",
|
||||||
|
icon: "ios-videocam",
|
||||||
|
___type: "live",
|
||||||
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
linkItem: {
|
linkItem: {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © 2020 - Present
|
Copyright © 2020 - Present
|
||||||
<a
|
<a
|
||||||
href="http://lili.cn"
|
href="https://pickmall.cn/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style="margin:0 5px;"
|
style="margin:0 5px;"
|
||||||
>lili-shop</a> {{ $t('rights') }}
|
>lili-shop</a> {{ $t('rights') }}
|
||||||
|
|
|
@ -131,23 +131,9 @@
|
||||||
sortable: false,
|
sortable: false,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.payStatus == "PAID") {
|
if (params.row.payStatus == "PAID") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green",},}, "已付款");
|
||||||
h("Badge", {
|
} else {
|
||||||
props: {
|
return h("Tag", {props: {color: "red",},}, "未付款");
|
||||||
status: "success",
|
|
||||||
text: "已付款",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.payStatus == "UNPAID") {
|
|
||||||
return h("div", [
|
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "未付款",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<div class="upload-pic-thumb">
|
||||||
<vuedraggable
|
<vuedraggable
|
||||||
:list="uploadList"
|
:list="uploadList"
|
||||||
:disabled="!draggable||!multiple"
|
:disabled="!draggable||!multiple"
|
||||||
|
@ -41,7 +42,7 @@
|
||||||
<Icon type="md-camera" size="20"></Icon>
|
<Icon type="md-camera" size="20"></Icon>
|
||||||
</div>
|
</div>
|
||||||
</Upload>
|
</Upload>
|
||||||
|
</div>
|
||||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||||
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
|
@ -242,6 +243,9 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.upload-pic-thumb{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.upload-list {
|
.upload-list {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
|
@ -255,6 +259,7 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.upload-list img {
|
.upload-list img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -98,14 +98,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.getImg();
|
// this.getImg();
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
verifyType: {
|
verifyType: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler: function (v) {
|
handler: function (v) {
|
||||||
this.type = v;
|
this.type = v;
|
||||||
this.refresh();
|
// this.refresh();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
show (v) {
|
show (v) {
|
||||||
|
|
|
@ -216,11 +216,11 @@
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.serviceType == "RETURN_MONEY") {
|
if (params.row.serviceType == "RETURN_MONEY") {
|
||||||
return h('div', [h('span', {}, '退款'),]);
|
return h('div', [h('tag', {props: {color: "blue"}}, '退款'),]);
|
||||||
} else if (params.row.serviceType == "RETURN_GOODS") {
|
} else if (params.row.serviceType == "RETURN_GOODS") {
|
||||||
return h('div', [h('span', {}, '退货'),]);
|
return h('div', [h('tag', {props: {color: "volcano"}}, '退货'),]);
|
||||||
} else if (params.row.serviceType == "EXCHANGE_GOODS") {
|
} else if (params.row.serviceType == "EXCHANGE_GOODS") {
|
||||||
return h('div', [h('span', {}, '换货'),]);
|
return h('div', [h('tag', {props: {color: "green"}}, '换货'),]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -231,27 +231,23 @@
|
||||||
width: 110,
|
width: 110,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.serviceStatus == "APPLY") {
|
if (params.row.serviceStatus == "APPLY") {
|
||||||
return h('div', [h('span', {}, '申请中'),]);
|
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
|
||||||
} else if (params.row.serviceStatus == "PASS") {
|
} else if (params.row.serviceStatus == "PASS") {
|
||||||
return h('div', [h('span', {}, '通过售后'),]);
|
return h('div', [h('tag', {props: {color: "cyan"}}, '通过售后'),]);
|
||||||
} else if (params.row.serviceStatus == "REFUSE") {
|
} else if (params.row.serviceStatus == "REFUSE") {
|
||||||
return h('div', [h('span', {}, '拒绝售后'),]);
|
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
|
||||||
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
||||||
return h('div', [h('span', {}, '买家退货,待卖家收货'),]);
|
return h('div', [h('tag', {props: {color: "orange"}}, '买家退货,待卖家收货'),]);
|
||||||
} else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
|
|
||||||
return h('div', [h('span', {}, '商家换货/补发'),]);
|
|
||||||
} else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
} else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
||||||
return h('div', [h('span', {}, '卖家确认收货'),]);
|
return h('div', [h('tag', {props: {color: "gold"}}, '卖家确认收货'),]);
|
||||||
} else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
} else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
||||||
return h('div', [h('span', {}, '卖家终止售后'),]);
|
return h('div', [h('tag', {props: {color: "lime"}}, '卖家终止售后'),]);
|
||||||
} else if (params.row.serviceStatus == "BUYER_CONFIRM") {
|
|
||||||
return h('div', [h('span', {}, '买家确认收货'),]);
|
|
||||||
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
||||||
return h('div', [h('span', {}, '买家取消售后'),]);
|
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
|
||||||
} else if (params.row.serviceStatus == "COMPLETE") {
|
} else if (params.row.serviceStatus == "COMPLETE") {
|
||||||
return h('div', [h('span', {}, '完成售后'),]);
|
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
|
||||||
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
||||||
return h('div', [h('span', {}, '待平台退款'),]);
|
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -191,17 +191,17 @@
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.complainStatus == "NEW") {
|
if (params.row.complainStatus == "NEW") {
|
||||||
return h('div', [h('span', { }, '新投诉'),]);
|
return h('div', [h('tag',{props: {color: "purple"}}, '新投诉'),]);
|
||||||
} else if (params.row.complainStatus == "CANCEL") {
|
} else if (params.row.complainStatus == "CANCEL") {
|
||||||
return h('div', [h('span', { }, '已撤销'),]);
|
return h('div', [h('tag', {props: {color: "cyan"}}, '已撤销'),]);
|
||||||
} else if (params.row.complainStatus == "WAIT_APPEAL") {
|
} else if (params.row.complainStatus == "WAIT_APPEAL") {
|
||||||
return h('div', [h('span', { }, '待申诉'),]);
|
return h('div', [h('tag', {props: {color: "volcano"}}, '待申诉'),]);
|
||||||
} else if (params.row.complainStatus == "COMMUNICATION") {
|
} else if (params.row.complainStatus == "COMMUNICATION") {
|
||||||
return h('div', [h('span', { }, '对话中'),]);
|
return h('div', [h('tag', {props: {color: "orange"}}, '对话中'),]);
|
||||||
}else if (params.row.complainStatus == "WAIT_ARBITRATION") {
|
}else if (params.row.complainStatus == "WAIT_ARBITRATION") {
|
||||||
return h('div', [h('span', { }, '等待仲裁'),]);
|
return h('div', [h('tag', {props: {color: "blue"}}, '等待仲裁'),]);
|
||||||
}else if (params.row.complainStatus == "COMPLETE") {
|
}else if (params.row.complainStatus == "COMPLETE") {
|
||||||
return h('div', [h('span', { }, '已完成'),]);
|
return h('div', [h('tag', {props: {color: "green"}}, '已完成'),]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -72,51 +72,13 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.paymentMethod === "WECHAT") {
|
if (params.row.paymentMethod === "WECHAT") {
|
||||||
return h("div", [
|
return h("div", [h("Tag", {props: {color: "green",},}, "微信"),]);
|
||||||
h(
|
|
||||||
"Tag",
|
|
||||||
{
|
|
||||||
props: {
|
|
||||||
color: "green",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"微信"
|
|
||||||
),
|
|
||||||
]);
|
|
||||||
} else if (params.row.paymentMethod === "ALIPAY") {
|
} else if (params.row.paymentMethod === "ALIPAY") {
|
||||||
return h("div", [
|
return h("div", [h("Tag", {props: {color: "blue",},}, "支付宝"),]);
|
||||||
h(
|
|
||||||
"Tag",
|
|
||||||
{
|
|
||||||
props: {
|
|
||||||
color: "blue",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"支付宝"
|
|
||||||
),
|
|
||||||
]);
|
|
||||||
} else if (params.row.paymentMethod === "WALLET") {
|
} else if (params.row.paymentMethod === "WALLET") {
|
||||||
return h("div", [
|
return h("div", [h("Tag", {props: {color: "geekblue",},}, "余额支付"),]);
|
||||||
h(
|
|
||||||
"Tag",
|
|
||||||
{
|
|
||||||
props: {},
|
|
||||||
},
|
|
||||||
"余额支付"
|
|
||||||
),
|
|
||||||
]);
|
|
||||||
} else if (params.row.paymentMethod === "BANK_TRANSFER") {
|
} else if (params.row.paymentMethod === "BANK_TRANSFER") {
|
||||||
return h("div", [
|
return h("div", [h("Tag", {props: {color: "orange",},}, "银行转帐"),]);
|
||||||
h(
|
|
||||||
"Tag",
|
|
||||||
{
|
|
||||||
props: {
|
|
||||||
color: "orange",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"银行转帐"
|
|
||||||
),
|
|
||||||
]);
|
|
||||||
} else {
|
} else {
|
||||||
return h("div", [h("Tag", {}, "暂未付款")]);
|
return h("div", [h("Tag", {}, "暂未付款")]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,9 +100,9 @@ export default {
|
||||||
width: 95,
|
width: 95,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.isRefund == "1") {
|
if (params.row.isRefund == "1") {
|
||||||
return h("div", [h("span", {}, "已退款")]);
|
return h("div", [h("Tag", {props: {color: "green",},}, "已退款")]);
|
||||||
} else {
|
} else {
|
||||||
return h("div", [h("span", {}, "未退款")]);
|
return h("div", [h("Tag", {props: {color: "orange",},}, "未退款")]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -94,8 +94,8 @@
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 1, // 当前页数
|
pageNumber: 1, // 当前页数
|
||||||
pageSize: 10, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
sort: "createTime", // 默认排序字段
|
sort: "", // 默认排序字段
|
||||||
order: "desc", // 默认排序方式
|
order: "", // 默认排序方式
|
||||||
startDate: "", // 起始时间
|
startDate: "", // 起始时间
|
||||||
endDate: "", // 终止时间
|
endDate: "", // 终止时间
|
||||||
orderType: "FICTITIOUS",
|
orderType: "FICTITIOUS",
|
||||||
|
@ -118,8 +118,6 @@
|
||||||
title: "下单时间",
|
title: "下单时间",
|
||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 200,
|
width: 200,
|
||||||
sortable: true,
|
|
||||||
sortType: "desc",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "订单来源",
|
title: "订单来源",
|
||||||
|
@ -150,19 +148,15 @@
|
||||||
width:95,
|
width:95,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.orderStatus == "UNPAID") {
|
if (params.row.orderStatus == "UNPAID") {
|
||||||
return h('div', [h('span', { }, '未付款'),]);
|
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||||
} else if (params.row.orderStatus == "PAID") {
|
} else if (params.row.orderStatus == "PAID") {
|
||||||
return h('div', [h('span', { }, '已付款'),]);
|
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
|
||||||
} else if (params.row.orderStatus == "UNDELIVERED") {
|
} else if (params.row.orderStatus == "COMPLETED") {
|
||||||
return h('div', [h('span', { }, '待发货'),]);
|
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||||
} else if (params.row.orderStatus == "DELIVERED") {
|
} else if (params.row.orderStatus == "TAKE") {
|
||||||
return h('div', [h('span', { }, '已发货'),]);
|
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
|
||||||
}else if (params.row.orderStatus == "COMPLETED") {
|
} else if (params.row.orderStatus == "CANCELLED") {
|
||||||
return h('div', [h('span', { }, '已完成'),]);
|
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||||
}else if (params.row.orderStatus == "TAKE") {
|
|
||||||
return h('div', [h('span', { }, '待核验'),]);
|
|
||||||
}else if (params.row.orderStatus == "CANCELLED") {
|
|
||||||
return h('div', [h('span', { }, '已取消'),]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<div class="div-item">
|
<div class="div-item">
|
||||||
<div class="div-item-left">订单来源:</div>
|
<div class="div-item-left">订单来源:</div>
|
||||||
<div class="div-item-right">
|
<div class="div-item-right">
|
||||||
{{ orderInfo.order.clientType }}
|
{{ orderInfo.order.clientType | clientTypeWay}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</Row>
|
</Row>
|
||||||
<div>
|
<div>
|
||||||
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
|
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
|
||||||
<Button type="primary" class="export">
|
<Button type="info" class="export">
|
||||||
导出Excel
|
导出Excel
|
||||||
</Button>
|
</Button>
|
||||||
</download-excel>
|
</download-excel>
|
||||||
|
@ -72,10 +72,6 @@ export default {
|
||||||
订单编号: "sn",
|
订单编号: "sn",
|
||||||
下单时间: "createTime",
|
下单时间: "createTime",
|
||||||
客户名称: "memberName",
|
客户名称: "memberName",
|
||||||
客户账号: "",
|
|
||||||
收货人: "",
|
|
||||||
收货人手机号: "",
|
|
||||||
收货人地址: "",
|
|
||||||
支付方式: {
|
支付方式: {
|
||||||
field: "clientType",
|
field: "clientType",
|
||||||
callback: (value) => {
|
callback: (value) => {
|
||||||
|
@ -92,15 +88,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
配送方式: "",
|
|
||||||
配送费用: "",
|
|
||||||
订单商品金额: "",
|
|
||||||
订单优惠金额: "",
|
|
||||||
订单应付金额: "",
|
|
||||||
商品SKU编号: "",
|
|
||||||
商品数量: "groupNum",
|
商品数量: "groupNum",
|
||||||
买家备注: "",
|
|
||||||
订单状态: "",
|
|
||||||
付款状态: {
|
付款状态: {
|
||||||
field: "payStatus",
|
field: "payStatus",
|
||||||
callback: (value) => {
|
callback: (value) => {
|
||||||
|
@ -111,9 +99,6 @@ export default {
|
||||||
: "";
|
: "";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
发货状态: "",
|
|
||||||
发票类型: "",
|
|
||||||
发票抬头: "",
|
|
||||||
店铺: "storeName",
|
店铺: "storeName",
|
||||||
},
|
},
|
||||||
loading: true, // 表单加载状态
|
loading: true, // 表单加载状态
|
||||||
|
@ -166,13 +151,13 @@ export default {
|
||||||
width: 120,
|
width: 120,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.orderType == "NORMAL") {
|
if (params.row.orderType == "NORMAL") {
|
||||||
return h("div", [h("span", {}, "普通订单")]);
|
return h("div", [h("tag", {props: {color: "blue"}}, "普通订单")]);
|
||||||
} else if (params.row.orderType == "PINTUAN") {
|
} else if (params.row.orderType == "PINTUAN") {
|
||||||
return h("div", [h("span", {}, "拼团订单")]);
|
return h("div", [h("tag", {props: {color: "volcano"}}, "拼团订单")]);
|
||||||
} else if (params.row.orderType == "GIFT") {
|
} else if (params.row.orderType == "GIFT") {
|
||||||
return h("div", [h("span", {}, "赠品订单")]);
|
return h("div", [h("tag", {props: {color: "green"}}, "赠品订单")]);
|
||||||
} else if (params.row.orderType == "VIRTUAL") {
|
} else if (params.row.orderType == "VIRTUAL") {
|
||||||
return h("div", [h("tag", {}, "核验订单")]);
|
return h("div", [h("tag", {props: {color: "geekblue"}}, "核验订单")]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -202,19 +187,19 @@ export default {
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.orderStatus == "UNPAID") {
|
if (params.row.orderStatus == "UNPAID") {
|
||||||
return h("div", [h("span", {}, "未付款")]);
|
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||||
} else if (params.row.orderStatus == "PAID") {
|
} else if (params.row.orderStatus == "PAID") {
|
||||||
return h("div", [h("span", {}, "已付款")]);
|
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
|
||||||
} else if (params.row.orderStatus == "UNDELIVERED") {
|
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||||
return h("div", [h("span", {}, "待发货")]);
|
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
|
||||||
} else if (params.row.orderStatus == "DELIVERED") {
|
} else if (params.row.orderStatus == "DELIVERED") {
|
||||||
return h("div", [h("span", {}, "已发货")]);
|
return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]);
|
||||||
} else if (params.row.orderStatus == "COMPLETED") {
|
} else if (params.row.orderStatus == "COMPLETED") {
|
||||||
return h("div", [h("span", {}, "已完成")]);
|
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||||
} else if (params.row.orderStatus == "TAKE") {
|
} else if (params.row.orderStatus == "TAKE") {
|
||||||
return h("div", [h("span", {}, "待核验")]);
|
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
|
||||||
} else if (params.row.orderStatus == "CANCELLED") {
|
} else if (params.row.orderStatus == "CANCELLED") {
|
||||||
return h("div", [h("span", {}, "已取消")]);
|
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -222,56 +207,23 @@ export default {
|
||||||
title: "下单时间",
|
title: "下单时间",
|
||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 170,
|
width: 170,
|
||||||
sortable: true,
|
|
||||||
sortType: "desc",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 150,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h("div", [
|
return h("div", [h("Button", {props: {type: "primary", size: "small",},
|
||||||
h(
|
attrs: {disabled: params.row.orderStatus == "UNPAID" ? false : true,},
|
||||||
"Button",
|
style: {marginRight: "5px",},
|
||||||
|
on: {click: () => {this.confirmPrice(params.row);},},
|
||||||
{
|
}, "收款"
|
||||||
props: {
|
|
||||||
type: "primary",
|
|
||||||
size: "small",
|
|
||||||
},
|
|
||||||
attrs: {
|
|
||||||
disabled: params.row.orderStatus == "UNPAID" ? false : true,
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
marginRight: "5px",
|
|
||||||
},
|
|
||||||
on: {
|
|
||||||
click: () => {
|
|
||||||
this.confirmPrice(params.row);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"收款"
|
|
||||||
),
|
),
|
||||||
h(
|
h("Button", {props: {type: "info", size: "small",},
|
||||||
"Button",
|
style: {marginRight: "5px",},
|
||||||
{
|
on: {click: () => {this.detail(params.row);},},
|
||||||
props: {
|
}, "查看"
|
||||||
type: "info",
|
|
||||||
size: "small",
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
marginRight: "5px",
|
|
||||||
},
|
|
||||||
on: {
|
|
||||||
click: () => {
|
|
||||||
this.detail(params.row);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"查看"
|
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
|
|
@ -435,28 +435,13 @@ export default {
|
||||||
this.form.categoryId = res.result.categoryId;
|
this.form.categoryId = res.result.categoryId;
|
||||||
this.treeValue = data.articleCategoryName;
|
this.treeValue = data.articleCategoryName;
|
||||||
this.form.id = data.id;
|
this.form.id = data.id;
|
||||||
this.form.content = htmlEscape(res.result.content);
|
this.form.content =res.result.content;
|
||||||
this.form.title = res.result.title;
|
this.form.title = res.result.title;
|
||||||
this.form.sort = res.result.sort;
|
this.form.sort = res.result.sort;
|
||||||
this.form.openStatus = res.result.openStatus;
|
this.form.openStatus = res.result.openStatus;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
htmlEscape(text) {
|
|
||||||
return text.replace(/[<>"&]/g, function (match, pos, originalText) {
|
|
||||||
switch (match) {
|
|
||||||
case "<":
|
|
||||||
return "<";
|
|
||||||
case ">":
|
|
||||||
return ">";
|
|
||||||
case "&":
|
|
||||||
return "&";
|
|
||||||
case '"':
|
|
||||||
return """;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
remove(v) {
|
remove(v) {
|
||||||
this.$Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: "确认删除",
|
title: "确认删除",
|
||||||
|
|
|
@ -101,7 +101,7 @@ export default {
|
||||||
{
|
{
|
||||||
title: "面额/折扣",
|
title: "面额/折扣",
|
||||||
key: "price",
|
key: "price",
|
||||||
width: 120,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.price) {
|
if (params.row.price) {
|
||||||
return h(
|
return h(
|
||||||
|
@ -117,27 +117,28 @@ export default {
|
||||||
{
|
{
|
||||||
title: "领取数量/总数量",
|
title: "领取数量/总数量",
|
||||||
key: "publishNum",
|
key: "publishNum",
|
||||||
width: 150,
|
width: 130,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h(
|
return h(
|
||||||
"div",
|
"div",
|
||||||
params.row.receivedNum + "/" + params.row.publishNum
|
params.row.receivedNum + "/" + params.row.publishNum
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
minWidth: 130,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "优惠券类型",
|
title: "优惠券类型",
|
||||||
key: "couponType",
|
key: "couponType",
|
||||||
width: 120,
|
width: 120,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
let text = "未知";
|
let text = "";
|
||||||
if (params.row.couponType === "DISCOUNT") {
|
if (params.row.couponType === "DISCOUNT") {
|
||||||
text = "打折";
|
return h("Tag", {props: {color: "blue",},}, "打折");
|
||||||
} else if (params.row.couponType === "PRICE") {
|
} else if (params.row.couponType === "PRICE") {
|
||||||
text = "减免现金";
|
return h("Tag", {props: {color: "geekblue",},}, "减免现金");
|
||||||
|
}else {
|
||||||
|
return h("Tag", {props: {color: "purple",},}, "未知");
|
||||||
}
|
}
|
||||||
return h("div", [text]);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -160,7 +161,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "活动时间",
|
title: "活动时间",
|
||||||
|
width: 150,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.getType === "ACTIVITY") {
|
if (params.row.getType === "ACTIVITY") {
|
||||||
return h("div", "长期有效");
|
return h("div", "长期有效");
|
||||||
|
@ -184,7 +185,7 @@ export default {
|
||||||
color = "red";
|
color = "red";
|
||||||
if (params.row.promotionStatus == "NEW") {
|
if (params.row.promotionStatus == "NEW") {
|
||||||
text = "未开始";
|
text = "未开始";
|
||||||
color = "default";
|
color = "geekblue";
|
||||||
} else if (params.row.promotionStatus == "START") {
|
} else if (params.row.promotionStatus == "START") {
|
||||||
text = "已开始";
|
text = "已开始";
|
||||||
color = "green";
|
color = "green";
|
||||||
|
|
|
@ -39,9 +39,11 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="发放数量" prop="publishNum" v-if="form.getType==='FREE'">
|
<FormItem label="发放数量" prop="publishNum" v-if="form.getType==='FREE'">
|
||||||
<Input v-model="form.publishNum" placeholder="发放数量" style="width: 260px"/>
|
<Input v-model="form.publishNum" placeholder="发放数量" style="width: 260px"/>
|
||||||
|
<div class="tips">如果发放数量为0时,则代表不限制发放数量</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="领取数量限制" prop="couponLimitNum" v-if="form.getType==='FREE'">
|
<FormItem label="领取数量限制" prop="couponLimitNum" v-if="form.getType==='FREE'">
|
||||||
<Input v-model="form.couponLimitNum" placeholder="领取限制" clearable style="width: 260px"/>
|
<Input v-model="form.couponLimitNum" placeholder="领取限制" clearable style="width: 260px"/>
|
||||||
|
<div class="tips">如果领取数量为0时,则代表不限制领取数量</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="范围描述" prop="description">
|
<FormItem label="范围描述" prop="description">
|
||||||
<Input v-model="form.description" type="textarea" :rows="4" maxlength="50" show-word-limit clearable
|
<Input v-model="form.description" type="textarea" :rows="4" maxlength="50" show-word-limit clearable
|
||||||
|
@ -576,5 +578,9 @@ h4 {
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tips {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ export default {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 0, // 当前页数
|
pageNumber: 0, // 当前页数
|
||||||
pageSize: 10, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
sort: "startTime", // 默认排序字段
|
sort: "createTime", // 默认排序字段
|
||||||
order: "desc", // 默认排序方式
|
order: "desc", // 默认排序方式
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
|
|
|
@ -132,19 +132,19 @@ export default {
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
let text = "未知",
|
let text = "未知",
|
||||||
color = "default";
|
color = "purple";
|
||||||
if (params.row.promotionStatus == "NEW") {
|
if (params.row.promotionStatus == "NEW") {
|
||||||
text = "未开始";
|
text = "未开始";
|
||||||
color = "default";
|
color = "geekblue";
|
||||||
} else if (params.row.promotionStatus == "START") {
|
} else if (params.row.promotionStatus == "START") {
|
||||||
text = "已开始";
|
text = "已开始";
|
||||||
color = "green";
|
color = "blue";
|
||||||
} else if (params.row.promotionStatus == "END") {
|
} else if (params.row.promotionStatus == "END") {
|
||||||
text = "已结束";
|
text = "已结束";
|
||||||
color = "blue";
|
color = "green";
|
||||||
} else if (params.row.promotionStatus == "CLOSE") {
|
} else if (params.row.promotionStatus == "CLOSE") {
|
||||||
text = "已关闭";
|
text = "已关闭";
|
||||||
color = "red";
|
color = "volcano";
|
||||||
}
|
}
|
||||||
return h("div", [
|
return h("div", [
|
||||||
h(
|
h(
|
||||||
|
|
|
@ -119,14 +119,13 @@ export default {
|
||||||
{
|
{
|
||||||
title: "直播状态",
|
title: "直播状态",
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h(
|
if(params.row.status == "NEW"){
|
||||||
"span",
|
return h("div", [h("tag", {props: {color: "blue"}}, "未开始")]);
|
||||||
params.row.status == "NEW"
|
}else if(params.row.status == "START"){
|
||||||
? "未开始"
|
return h("div", [h("tag", {props: {color: "green"}}, "直播中")]);
|
||||||
: params.row.status == "START"
|
}else{
|
||||||
? "直播中"
|
return h("div", [h("tag", {props: {color: "volcano"}}, "已结束")]);
|
||||||
: "已结束"
|
}
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -122,16 +122,16 @@ export default {
|
||||||
color = "";
|
color = "";
|
||||||
if (params.row.promotionStatus == "NEW") {
|
if (params.row.promotionStatus == "NEW") {
|
||||||
text = "未开始";
|
text = "未开始";
|
||||||
color = "default";
|
color = "geekblue";
|
||||||
} else if (params.row.promotionStatus == "START") {
|
} else if (params.row.promotionStatus == "START") {
|
||||||
text = "已开始";
|
text = "已开始";
|
||||||
color = "green";
|
color = "blue";
|
||||||
} else if (params.row.promotionStatus == "END") {
|
} else if (params.row.promotionStatus == "END") {
|
||||||
text = "已结束";
|
text = "已结束";
|
||||||
color = "blue";
|
color = "green";
|
||||||
} else if (params.row.promotionStatus == "CLOSE") {
|
} else if (params.row.promotionStatus == "CLOSE") {
|
||||||
text = "已关闭";
|
text = "已关闭";
|
||||||
color = "red";
|
color = "volcano";
|
||||||
}
|
}
|
||||||
return h("div", [
|
return h("div", [
|
||||||
h(
|
h(
|
||||||
|
|
|
@ -2,72 +2,31 @@
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<Card>
|
<Card>
|
||||||
<Row>
|
<Row>
|
||||||
<Form
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
ref="searchForm"
|
|
||||||
:model="searchForm"
|
|
||||||
inline
|
|
||||||
:label-width="70"
|
|
||||||
class="search-form"
|
|
||||||
>
|
|
||||||
<Form-item label="商品名称">
|
<Form-item label="商品名称">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.goodsName"
|
|
||||||
placeholder="请输入商品名称"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="积分区间">
|
<Form-item label="积分区间">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.pointsS" placeholder="请输入开始区间" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.pointsS"
|
|
||||||
placeholder="请输入开始区间"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
-
|
-
|
||||||
<Input
|
<Input type="text" v-model="searchForm.pointsE" placeholder="请输入结束区间" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.pointsE"
|
|
||||||
placeholder="请输入结束区间"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="状态">
|
<Form-item label="状态">
|
||||||
<Select v-model="searchForm.promotionStatus" style="width: 200px">
|
<Select v-model="searchForm.promotionStatus" style="width: 200px">
|
||||||
<Option
|
<Option v-for="item in statusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||||
v-for="item in statusList"
|
|
||||||
:value="item.value"
|
|
||||||
:key="item.value"
|
|
||||||
>{{ item.label }}</Option
|
|
||||||
>
|
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="SKU编码">
|
<Form-item label="SKU编码">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.skuId" placeholder="请输入SKU编码" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.skuId"
|
|
||||||
placeholder="请输入SKU编码"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
</Row>
|
||||||
<Row class="operation padding-row">
|
<Row class="operation padding-row">
|
||||||
<Button @click="addPointsGoods" type="primary" >添加积分商品</Button>
|
<Button @click="addPointsGoods" type="primary">添加积分商品</Button>
|
||||||
|
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
|
||||||
:loading="loading"
|
|
||||||
border
|
|
||||||
:columns="columns"
|
|
||||||
:data="data"
|
|
||||||
ref="table"
|
|
||||||
>
|
|
||||||
<template slot-scope="{ row }" slot="goodsName">
|
<template slot-scope="{ row }" slot="goodsName">
|
||||||
<div>
|
<div>
|
||||||
<a class="mr_10" @click="linkTo(row.goodsSku.goodsId,row.goodsSku.skuId)">{{row.goodsSku.goodsName}}</a>
|
<a class="mr_10" @click="linkTo(row.goodsSku.goodsId,row.goodsSku.skuId)">{{row.goodsSku.goodsName}}</a>
|
||||||
|
@ -94,48 +53,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot-scope="{ row }" slot="action">
|
<template slot-scope="{ row }" slot="action">
|
||||||
<Button
|
<Button v-if="row.promotionStatus == 'NEW'" type="info" size="small" @click="edit(row.id)" style="margin-right: 5px">编辑</Button>
|
||||||
v-if="row.promotionStatus == 'NEW'"
|
<Button v-if="row.promotionStatus == 'START'" type="warning" size="small" @click="statusChanged(row.id, 'CLOSE')" style="margin-right: 5px">停用</Button>
|
||||||
type="info"
|
<Button v-if="row.promotionStatus == 'CLOSE'" type="warning" size="small" @click="statusChanged(row.id, 'START')" style="margin-right: 5px">启用</Button>
|
||||||
size="small"
|
<Button type="error" size="small" @click="close(row.id)">删除</Button>
|
||||||
@click="edit(row.id)"
|
|
||||||
style="margin-right: 5px"
|
|
||||||
>编辑</Button
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
v-if="row.promotionStatus == 'START'"
|
|
||||||
type="warning"
|
|
||||||
size="small"
|
|
||||||
@click="statusChanged(row.id, 'CLOSE')"
|
|
||||||
style="margin-right: 5px"
|
|
||||||
>停用</Button
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
v-if="row.promotionStatus == 'CLOSE'"
|
|
||||||
type="warning"
|
|
||||||
size="small"
|
|
||||||
@click="statusChanged(row.id, 'START')"
|
|
||||||
style="margin-right: 5px"
|
|
||||||
>启用</Button
|
|
||||||
>
|
|
||||||
<Button type="error" size="small" @click="close(row.id)"
|
|
||||||
>删除</Button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
<Page
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||||
:current="searchForm.pageNumber"
|
show-total show-elevator show-sizer></Page>
|
||||||
:total="total"
|
|
||||||
:page-size="searchForm.pageSize"
|
|
||||||
@on-change="changePage"
|
|
||||||
@on-page-size-change="changePageSize"
|
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-elevator
|
|
||||||
show-sizer
|
|
||||||
></Page>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -159,78 +85,91 @@ export default {
|
||||||
pageSize: 10, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
order: "desc", // 默认排序方式
|
order: "desc", // 默认排序方式
|
||||||
},
|
},
|
||||||
statusList: [ // 活动状态
|
statusList: [
|
||||||
|
// 活动状态
|
||||||
{ label: "未开始", value: "NEW" },
|
{ label: "未开始", value: "NEW" },
|
||||||
{ label: "已开始", value: "START" },
|
{ label: "已开始", value: "START" },
|
||||||
{ label: "已结束", value: "END" },
|
{ label: "已结束", value: "END" },
|
||||||
{ label: "已关闭", value: "CLOSE" },
|
{ label: "已关闭", value: "CLOSE" },
|
||||||
],
|
],
|
||||||
columns: [ // 表头
|
columns: [
|
||||||
|
// 表头
|
||||||
{
|
{
|
||||||
title: "商品名称",
|
title: "商品名称",
|
||||||
slot: "goodsName",
|
slot: "goodsName",
|
||||||
minWidth: 120,
|
minWidth: 150,
|
||||||
|
fixed: "left",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "市场价",
|
title: "市场价",
|
||||||
slot: "price",
|
slot: "price",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "结算价",
|
title: "结算价",
|
||||||
slot: "settlementPrice",
|
slot: "settlementPrice",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "分类",
|
|
||||||
key: "pointsGoodsCategoryName",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "库存数量",
|
title: "库存数量",
|
||||||
slot: "quantity",
|
slot: "quantity",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "活动剩余库存",
|
title: "活动剩余库存",
|
||||||
key: "activeStock",
|
key: "activeStock",
|
||||||
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "兑换积分",
|
title: "兑换积分",
|
||||||
key: "points",
|
key: "points",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "所属店铺",
|
title: "所属店铺",
|
||||||
key: "storeName",
|
key: "storeName",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "活动开始时间",
|
title: "活动开始时间",
|
||||||
slot: "startTime",
|
slot: "startTime",
|
||||||
minWidth:100
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
key: "promotionStatus",
|
key: "promotionStatus",
|
||||||
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
let text = "未知",
|
let text = "未知",
|
||||||
color = "";
|
color = "";
|
||||||
if (params.row.promotionStatus == "NEW") {
|
if (params.row.promotionStatus == "NEW") {
|
||||||
text = "未开始";
|
text = "未开始";
|
||||||
color = "default";
|
color = "geekblue";
|
||||||
} else if (params.row.promotionStatus == "START") {
|
} else if (params.row.promotionStatus == "START") {
|
||||||
text = "已开始";
|
text = "已开始";
|
||||||
color = "green";
|
color = "blue";
|
||||||
} else if (params.row.promotionStatus == "END") {
|
} else if (params.row.promotionStatus == "END") {
|
||||||
text = "已结束";
|
text = "已结束";
|
||||||
color = "blue";
|
color = "green";
|
||||||
} else if (params.row.promotionStatus == "CLOSE") {
|
} else if (params.row.promotionStatus == "CLOSE") {
|
||||||
text = "已关闭";
|
text = "已关闭";
|
||||||
color = "red";
|
color = "volcano";
|
||||||
}
|
}
|
||||||
return h("div", [h("Tag", { props: { color: color } }, text)]);
|
return h("div", [h("Tag", { props: { color: color } }, text)]);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "分类",
|
||||||
|
key: "pointsGoodsCategoryName",
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
slot: "action",
|
slot: "action",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
fixed: "right",
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -327,5 +266,5 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "@/styles/table-common.scss";
|
@import "@/styles/table-common.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -24,78 +24,35 @@
|
||||||
<Row class="operation padding-row">
|
<Row class="operation padding-row">
|
||||||
<Button type="primary" @click="add">添加活动</Button>
|
<Button type="primary" @click="add">添加活动</Button>
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Tabs value="list" @on-click="clickTabPane">
|
||||||
:loading="loading"
|
<TabPane label="秒杀活动列表" name="list">
|
||||||
border
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="page">
|
||||||
:columns="columns"
|
|
||||||
:data="data"
|
|
||||||
ref="table"
|
|
||||||
class="page"
|
|
||||||
>
|
|
||||||
<template slot-scope="{ row }" slot="action">
|
<template slot-scope="{ row }" slot="action">
|
||||||
<Button
|
<Button type="info" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW'" @click="edit(row)">编辑</Button>
|
||||||
type="info"
|
|
||||||
size="small"
|
|
||||||
class="mr_5"
|
|
||||||
v-if="row.promotionStatus == 'NEW'"
|
|
||||||
@click="edit(row)"
|
|
||||||
>编辑</Button
|
|
||||||
>
|
|
||||||
|
|
||||||
<Button
|
<Button type="info" size="small" class="mr_5" v-else @click="manage(row)">查看</Button>
|
||||||
type="info"
|
|
||||||
size="small"
|
|
||||||
class="mr_5"
|
|
||||||
v-else
|
|
||||||
@click="manage(row)"
|
|
||||||
>查看</Button
|
|
||||||
>
|
|
||||||
|
|
||||||
<Button
|
<Button type="primary" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW'" @click="manage(row)">管理</Button>
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
class="mr_5"
|
|
||||||
v-if="row.promotionStatus == 'NEW'"
|
|
||||||
@click="manage(row)"
|
|
||||||
>管理</Button
|
|
||||||
>
|
|
||||||
|
|
||||||
<!-- <Button type="success" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW' || row.promotionStatus == 'END'" @click="upper(row)">上架</Button> -->
|
<Button type="error" size="small" v-if="
|
||||||
<Button
|
|
||||||
type="error"
|
|
||||||
size="small"
|
|
||||||
v-if="
|
|
||||||
row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
|
row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
|
||||||
"
|
" class="mr_5" @click="off(row)">下架</Button>
|
||||||
class="mr_5"
|
|
||||||
@click="off(row)"
|
<Button type="error" size="small" v-if="row.promotionStatus == 'CLOSE'" ghost @click="expire(row)">删除</Button>
|
||||||
>下架</Button
|
|
||||||
>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
type="error"
|
|
||||||
size="small"
|
|
||||||
v-if="row.promotionStatus == 'CLOSE'"
|
|
||||||
ghost
|
|
||||||
@click="expire(row)"
|
|
||||||
>删除</Button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
|
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
<Page
|
<Page style="margin: 20px 0;" :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize"
|
||||||
:current="searchForm.pageNumber + 1"
|
:page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page>
|
||||||
:total="total"
|
|
||||||
:page-size="searchForm.pageSize"
|
|
||||||
@on-change="changePage"
|
|
||||||
@on-page-size-change="changePageSize"
|
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-elevator
|
|
||||||
show-sizer
|
|
||||||
></Page>
|
|
||||||
</Row>
|
</Row>
|
||||||
|
</TabPane>
|
||||||
|
<TabPane label="秒杀活动设置" name="setup">
|
||||||
|
|
||||||
|
<setupSeckill v-if="setupFlag"></setupSeckill>
|
||||||
|
</TabPane>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -145,41 +102,13 @@ export default {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.promotionStatus == "NEW") {
|
if (params.row.promotionStatus == "NEW") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "geekblue",},},"新建");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "新建",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.promotionStatus == "START") {
|
} else if (params.row.promotionStatus == "START") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green",},},"开始");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "开始",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.promotionStatus == "END") {
|
} else if (params.row.promotionStatus == "END") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "volcano",},},"结束");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "结束",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.promotionStatus == "CLOSE") {
|
} else if (params.row.promotionStatus == "CLOSE") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "red",},},"结束");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "废弃",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -302,7 +231,7 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "@/styles/table-common.scss";
|
@import "@/styles/table-common.scss";
|
||||||
.mr_5{
|
.mr_5 {
|
||||||
margin: 0 4px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div v-if="templateShow">
|
||||||
<Form :model="form" :label-width="120">
|
<Form :model="form" :label-width="120">
|
||||||
<FormItem label="每日场次设置">
|
<FormItem label="每日场次设置">
|
||||||
<Row :gutter="16" class="row">
|
<Row :gutter="16" class="row">
|
||||||
|
@ -27,6 +27,7 @@ import { getSetting, setSetting } from "@/api/index";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
templateShow:false,
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
selectedTime: [],
|
selectedTime: [],
|
||||||
times: [], //时间集合 1-24点
|
times: [], //时间集合 1-24点
|
||||||
|
@ -81,6 +82,7 @@ export default {
|
||||||
async init() {
|
async init() {
|
||||||
let result = await getSetting("SECKILL_SETTING");
|
let result = await getSetting("SECKILL_SETTING");
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
this.templateShow = true
|
||||||
this.form.seckillRule = result.result.seckillRule;
|
this.form.seckillRule = result.result.seckillRule;
|
||||||
this.times=[]
|
this.times=[]
|
||||||
for (let i = 0; i < 24; i++) {
|
for (let i = 0; i < 24; i++) {
|
||||||
|
|
|
@ -95,13 +95,13 @@ export default {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.billStatus == "OUT") {
|
if (params.row.billStatus == "OUT") {
|
||||||
return h("div", "已出账");
|
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||||
} else if (params.row.billStatus == "CHECK") {
|
} else if (params.row.billStatus == "CHECK") {
|
||||||
return h("div", "已对账");
|
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||||
} else if (params.row.billStatus == "EXAMINE") {
|
} else if (params.row.billStatus == "EXAMINE") {
|
||||||
return h("div", "已审核");
|
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||||
} else {
|
} else {
|
||||||
return h("div", "已付款");
|
return h("Tag", {props: {color: "green",},},"已付款");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -106,13 +106,13 @@ export default {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.billStatus == "OUT") {
|
if (params.row.billStatus == "OUT") {
|
||||||
return h("div", "已出账");
|
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||||
} else if (params.row.billStatus == "CHECK") {
|
} else if (params.row.billStatus == "CHECK") {
|
||||||
return h("div", "已对账");
|
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||||
} else if (params.row.billStatus == "EXAMINE") {
|
} else if (params.row.billStatus == "EXAMINE") {
|
||||||
return h("div", "已审核");
|
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||||
} else {
|
} else {
|
||||||
return h("div", "已付款");
|
return h("Tag", {props: {color: "green",},},"已付款");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -126,7 +126,7 @@ export default {
|
||||||
"Tag",
|
"Tag",
|
||||||
{
|
{
|
||||||
props: {
|
props: {
|
||||||
color: params.row.selfOperated ? "error" : "success",
|
color: params.row.selfOperated ? "volcano" : "green",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
params.row.selfOperated ? "自营" : "非自营"
|
params.row.selfOperated ? "自营" : "非自营"
|
||||||
|
@ -141,50 +141,15 @@ export default {
|
||||||
width: 130,
|
width: 130,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.storeDisable == "OPEN") {
|
if (params.row.storeDisable == "OPEN") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green",},},"开启中");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "开启中",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.storeDisable == "CLOSED") {
|
} else if (params.row.storeDisable == "CLOSED") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "volcano",},},"已关闭");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "已关闭",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.storeDisable == "APPLY") {
|
} else if (params.row.storeDisable == "APPLY") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "geekblue",},},"申请中");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "申请中",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.storeDisable == "APPLYING") {
|
} else if (params.row.storeDisable == "APPLYING") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "purple",},},"审核中");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "审核中",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.storeDisable == "REFUSED") {
|
} else if (params.row.storeDisable == "REFUSED") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "red",},},"审核拒绝");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "审核拒绝",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -65,13 +65,13 @@
|
||||||
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
||||||
<Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" />
|
<Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<!-- <Divider orientation="left">腾讯云智服</Divider>
|
<Divider orientation="left">腾讯云智服</Divider>
|
||||||
<FormItem label="唯一标识" prop="salesConsigneeDetail">
|
<FormItem label="唯一标识" prop="salesConsigneeDetail">
|
||||||
<Input v-model="shopForm.yzfSign" clearable style="width: 350px" />
|
<Input v-model="shopForm.yzfSign" clearable style="width: 350px" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="小程序唯一标识" prop="salesConsigneeDetail">
|
<FormItem label="小程序唯一标识" prop="salesConsigneeDetail">
|
||||||
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
||||||
</FormItem> -->
|
</FormItem>
|
||||||
<Spin fix v-if="loading"></Spin>
|
<Spin fix v-if="loading"></Spin>
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="shop-item">
|
<div class="shop-item">
|
||||||
<div class="label-item">
|
<div class="label-item">
|
||||||
<span>订单来源</span>
|
<span>订单来源</span>
|
||||||
<span>{{res.clientType}}</span>
|
<span>{{res.clientType | clientTypeWay}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="label-item">
|
<div class="label-item">
|
||||||
<span>订单状态</span>
|
<span>订单状态</span>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"sockjs-client": "^1.4.0",
|
"sockjs-client": "^1.4.0",
|
||||||
"stompjs": "^2.3.3",
|
"stompjs": "^2.3.3",
|
||||||
"swiper": "^6.3.5",
|
"swiper": "^6.3.5",
|
||||||
"vue-qr": "^2.3.0",
|
"uuid": "^8.3.2",
|
||||||
"view-design": "^4.2.0",
|
"view-design": "^4.2.0",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
"vue-awesome": "^4.0.2",
|
"vue-awesome": "^4.0.2",
|
||||||
|
@ -37,15 +37,16 @@
|
||||||
"vue-clipboard2": "^0.3.0",
|
"vue-clipboard2": "^0.3.0",
|
||||||
"vue-cropper": "^0.4.9",
|
"vue-cropper": "^0.4.9",
|
||||||
"vue-i18n": "^8.15.1",
|
"vue-i18n": "^8.15.1",
|
||||||
|
"vue-json-excel": "^0.3.0",
|
||||||
"vue-json-pretty": "^1.4.1",
|
"vue-json-pretty": "^1.4.1",
|
||||||
"vue-lazyload": "^1.3.3",
|
"vue-lazyload": "^1.3.3",
|
||||||
|
"vue-qr": "^2.3.0",
|
||||||
"vue-router": "^3.1.3",
|
"vue-router": "^3.1.3",
|
||||||
"vuedraggable": "^2.23.2",
|
"vuedraggable": "^2.23.2",
|
||||||
"vuex": "^3.4.0",
|
"vuex": "^3.4.0",
|
||||||
"wangeditor": "^4.6.13",
|
"wangeditor": "^4.6.13",
|
||||||
"xlsx": "^0.16.2",
|
"xlsx": "^0.16.2",
|
||||||
"xss": "^1.0.7",
|
"xss": "^1.0.7"
|
||||||
"uuid": "^8.3.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^4.4.4",
|
"@vue/cli-plugin-babel": "^4.4.4",
|
||||||
|
|
|
@ -132,13 +132,13 @@ export const delSpec = (id, params) => {
|
||||||
return deleteRequest(`/goods/spec/del/${id}`, params);
|
return deleteRequest(`/goods/spec/del/${id}`, params);
|
||||||
};
|
};
|
||||||
// 获取商品规格值列表
|
// 获取商品规格值列表
|
||||||
export const getSpecValuesListData = (id, params) => {
|
// export const getSpecValuesListData = (id, params) => {
|
||||||
return getRequest(`/goods/spec-values/values/${id}`, params);
|
// return getRequest(`/goods/spec-values/values/${id}`, params);
|
||||||
};
|
// };
|
||||||
// 添加商品规格值
|
// 添加商品规格值
|
||||||
export const saveSpecValues = (id, params) => {
|
// export const saveSpecValues = (id, params) => {
|
||||||
return postRequest(`/goods/spec-values/save/${id}`, params);
|
// return postRequest(`/goods/spec-values/save/${id}`, params);
|
||||||
};
|
// };
|
||||||
|
|
||||||
// 查询某分类下的全部子分类列表
|
// 查询某分类下的全部子分类列表
|
||||||
export const getGoodsCategory = parent_id => {
|
export const getGoodsCategory = parent_id => {
|
||||||
|
@ -209,24 +209,19 @@ export const deleteParamsGroup = (id, params) => {
|
||||||
return deleteRequest(`/goods/category/parameters/${id}`, params);
|
return deleteRequest(`/goods/category/parameters/${id}`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
//保存获取关联规格
|
|
||||||
export const getGoodsSpecInfo = (category_id, params) => {
|
|
||||||
return getRequest(`/goods/category/spec/goods/${category_id}`, params);
|
|
||||||
};
|
|
||||||
|
|
||||||
//获取sku列表
|
//获取sku列表
|
||||||
export const getSkuPage = params => {
|
export const getSkuPage = params => {
|
||||||
return getRequest(`/goodsSku/getByPage`, params);
|
return getRequest(`/goodsSku/getByPage`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取商品规格值列表
|
// 获取商品规格值列表
|
||||||
export const getSpecValuesListSellerData = (id, params) => {
|
// export const getSpecValuesListSellerData = (id, params) => {
|
||||||
return getRequest(`/goods/spec-values/values/${id}`, params);
|
// return getRequest(`/goods/spec-values/values/${id}`, params);
|
||||||
};
|
// };
|
||||||
// 添加商品规格值
|
// 添加商品规格值
|
||||||
export const saveSpecValuesSeller = (id, params) => {
|
// export const saveSpecValuesSeller = (id, params) => {
|
||||||
return postRequest(`/goods/spec-values/save/${id}`, params);
|
// return postRequest(`/goods/spec-values/save/${id}`, params);
|
||||||
};
|
// };
|
||||||
|
|
||||||
// 获取商品规格分页列表
|
// 获取商品规格分页列表
|
||||||
export const getSpecListSellerData = params => {
|
export const getSpecListSellerData = params => {
|
||||||
|
@ -317,8 +312,8 @@ export const getCategoryParamsListDataSeller = (id, params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
//保存获取关联规格
|
//保存获取关联规格
|
||||||
export const getGoodsSpecInfoSeller = (category_id, params) => {
|
export const getGoodsSpecInfoSeller = (category_id) => {
|
||||||
return getRequest(`/goods/category/spec/goods/${category_id}`, params);
|
return getRequest(`/goods/spec/${category_id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
//批量设置运费模板
|
//批量设置运费模板
|
||||||
|
|
|
@ -69,14 +69,6 @@ service.interceptors.response.use(
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 403:
|
|
||||||
// 权限不足
|
|
||||||
if (data.message !== null) {
|
|
||||||
Message.error(data.message);
|
|
||||||
} else {
|
|
||||||
Message.error("权限不足");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 500:
|
case 500:
|
||||||
// 系统异常
|
// 系统异常
|
||||||
if (data.message !== null) {
|
if (data.message !== null) {
|
||||||
|
@ -94,6 +86,8 @@ service.interceptors.response.use(
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
// 这种情况一般调到登录页
|
// 这种情况一般调到登录页
|
||||||
|
} else if (error.response.status === 404) {
|
||||||
|
// 避免刷新token报错
|
||||||
} else if (error.response.status === 403) {
|
} else if (error.response.status === 403) {
|
||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
if (isRefreshToken === 1) {
|
if (isRefreshToken === 1) {
|
||||||
|
|
|
@ -54,20 +54,20 @@ export const result = [
|
||||||
children: null,
|
children: null,
|
||||||
permTypes: []
|
permTypes: []
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "daft-goods",
|
// name: "daft-goods",
|
||||||
showAlways: true,
|
// showAlways: true,
|
||||||
level: 2,
|
// level: 2,
|
||||||
type: 0,
|
// type: 0,
|
||||||
title: "草稿商品",
|
// title: "草稿商品",
|
||||||
path: "daft-goods",
|
// path: "daft-goods",
|
||||||
component: "goods/goods-seller/draftGoods",
|
// component: "goods/goods-seller/draftGoods",
|
||||||
icon: "md-person",
|
// icon: "md-person",
|
||||||
isMenu: true,
|
// isMenu: true,
|
||||||
url: "",
|
// url: "",
|
||||||
children: null,
|
// children: null,
|
||||||
permTypes: []
|
// permTypes: []
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "template-goods",
|
path: "template-goods",
|
||||||
|
@ -143,6 +143,20 @@ export const result = [
|
||||||
url: "",
|
url: "",
|
||||||
children: null,
|
children: null,
|
||||||
permTypes: []
|
permTypes: []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "virtualOrderList",
|
||||||
|
showAlways: true,
|
||||||
|
level: 2,
|
||||||
|
type: 0,
|
||||||
|
title: "虚拟订单",
|
||||||
|
path: "virtualOrderList",
|
||||||
|
component: "order/order/virtualOrderList",
|
||||||
|
icon: "md-person",
|
||||||
|
isMenu: true,
|
||||||
|
url: "",
|
||||||
|
children: null,
|
||||||
|
permTypes: []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -381,6 +395,49 @@ export const result = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "lives",
|
||||||
|
showAlways: true,
|
||||||
|
level: 1,
|
||||||
|
type: 0,
|
||||||
|
title: "直播活动",
|
||||||
|
path: "/promotion",
|
||||||
|
component: "Main",
|
||||||
|
icon: "md-person",
|
||||||
|
isMenu: true,
|
||||||
|
url: "",
|
||||||
|
permTypes: [],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: "live",
|
||||||
|
showAlways: true,
|
||||||
|
level: 2,
|
||||||
|
type: 0,
|
||||||
|
title: "直播管理",
|
||||||
|
path: "live",
|
||||||
|
component: "promotion/live/live",
|
||||||
|
icon: "md-person",
|
||||||
|
isMenu: true,
|
||||||
|
url: "",
|
||||||
|
permTypes: [],
|
||||||
|
children: null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "liveGoods",
|
||||||
|
showAlways: true,
|
||||||
|
level: 2,
|
||||||
|
type: 0,
|
||||||
|
title: "直播商品",
|
||||||
|
path: "liveGoods",
|
||||||
|
component: "promotion/live/liveGoods",
|
||||||
|
icon: "md-person",
|
||||||
|
isMenu: true,
|
||||||
|
url: "",
|
||||||
|
permTypes: [],
|
||||||
|
children: null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "storePromotion",
|
name: "storePromotion",
|
||||||
showAlways: true,
|
showAlways: true,
|
||||||
|
@ -422,34 +479,7 @@ export const result = [
|
||||||
permTypes: [],
|
permTypes: [],
|
||||||
children: null
|
children: null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "live",
|
|
||||||
showAlways: true,
|
|
||||||
level: 2,
|
|
||||||
type: 0,
|
|
||||||
title: "直播管理",
|
|
||||||
path: "live",
|
|
||||||
component: "promotion/live/live",
|
|
||||||
icon: "md-person",
|
|
||||||
isMenu: true,
|
|
||||||
url: "",
|
|
||||||
permTypes: [],
|
|
||||||
children: null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "liveGoods",
|
|
||||||
showAlways: true,
|
|
||||||
level: 2,
|
|
||||||
type: 0,
|
|
||||||
title: "直播商品",
|
|
||||||
path: "liveGoods",
|
|
||||||
component: "promotion/live/liveGoods",
|
|
||||||
icon: "md-person",
|
|
||||||
isMenu: true,
|
|
||||||
url: "",
|
|
||||||
permTypes: [],
|
|
||||||
children: null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ import ViewUI from "view-design";
|
||||||
import "./styles/theme.less";
|
import "./styles/theme.less";
|
||||||
|
|
||||||
import "core-js/stable";
|
import "core-js/stable";
|
||||||
import "regenerator-runtime/runtime";
|
// import "regenerator-runtime/runtime";
|
||||||
import vueQr from 'vue-qr'
|
import vueQr from 'vue-qr'
|
||||||
|
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
|
|
|
@ -5,7 +5,7 @@ export const loginRouter = {
|
||||||
path: "/login",
|
path: "/login",
|
||||||
name: "login",
|
name: "login",
|
||||||
meta: {
|
meta: {
|
||||||
title: "登录 - lili商家后台 "
|
title: "登录 - lili商家后台"
|
||||||
},
|
},
|
||||||
component: () => import("@/views/login.vue")
|
component: () => import("@/views/login.vue")
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,6 +7,7 @@ import Vue from 'vue';
|
||||||
const app = {
|
const app = {
|
||||||
state: {
|
state: {
|
||||||
shipTemplates:"",
|
shipTemplates:"",
|
||||||
|
regions:[], //此处是在地区选择器时赋值一次
|
||||||
styleStore:"", //移动端楼层装修中选择风格存储
|
styleStore:"", //移动端楼层装修中选择风格存储
|
||||||
loading: false, // 全局加载动画
|
loading: false, // 全局加载动画
|
||||||
added: false, // 加载路由标识
|
added: false, // 加载路由标识
|
||||||
|
|
|
@ -6,17 +6,32 @@
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function unitPrice(val, unit, location) {
|
export function unitPrice(val, unit, location) {
|
||||||
let price = formatPrice(val)
|
let price = formatPrice(val);
|
||||||
if (location === 'before') {
|
if (location === "before") {
|
||||||
return price.substr(0, price.length - 3)
|
return price.substr(0, price.length - 3);
|
||||||
}
|
}
|
||||||
if (location === 'after') {
|
if (location === "after") {
|
||||||
return price.substr(-2)
|
return price.substr(-2);
|
||||||
}
|
}
|
||||||
return (unit || '') + price
|
return (unit || "") + price;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单来源
|
||||||
|
*/
|
||||||
|
export function clientTypeWay(val) {
|
||||||
|
if (val == "H5") {
|
||||||
|
return "移动端";
|
||||||
|
} else if (val == "PC") {
|
||||||
|
return "PC端";
|
||||||
|
} else if (val == "WECHAT_MP") {
|
||||||
|
return "小程序端";
|
||||||
|
} else if (val == "APP") {
|
||||||
|
return "移动应用端";
|
||||||
|
} else {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 货币格式化
|
* 货币格式化
|
||||||
|
@ -24,8 +39,8 @@ export function unitPrice(val, unit, location) {
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export function formatPrice(price) {
|
export function formatPrice(price) {
|
||||||
if (typeof price !== 'number') return price
|
if (typeof price !== "number") return price;
|
||||||
return String(Number(price).toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
return String(Number(price).toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,51 +50,60 @@ export function formatPrice(price) {
|
||||||
* @returns {*|string}
|
* @returns {*|string}
|
||||||
*/
|
*/
|
||||||
export function unixToDate(unix, format) {
|
export function unixToDate(unix, format) {
|
||||||
let _format = format || 'yyyy-MM-dd hh:mm:ss'
|
let _format = format || "yyyy-MM-dd hh:mm:ss";
|
||||||
const d = new Date(unix * 1000)
|
const d = new Date(unix * 1000);
|
||||||
const o = {
|
const o = {
|
||||||
'M+': d.getMonth() + 1,
|
"M+": d.getMonth() + 1,
|
||||||
'd+': d.getDate(),
|
"d+": d.getDate(),
|
||||||
'h+': d.getHours(),
|
"h+": d.getHours(),
|
||||||
'm+': d.getMinutes(),
|
"m+": d.getMinutes(),
|
||||||
's+': d.getSeconds(),
|
"s+": d.getSeconds(),
|
||||||
'q+': Math.floor((d.getMonth() + 3) / 3),
|
"q+": Math.floor((d.getMonth() + 3) / 3),
|
||||||
S: d.getMilliseconds()
|
S: d.getMilliseconds()
|
||||||
}
|
};
|
||||||
if (/(y+)/.test(_format)) _format = _format.replace(RegExp.$1, (d.getFullYear() + '').substr(4 - RegExp.$1.length))
|
if (/(y+)/.test(_format))
|
||||||
for (const k in o) if (new RegExp('(' + k + ')').test(_format)) _format = _format.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
_format = _format.replace(
|
||||||
return _format
|
RegExp.$1,
|
||||||
|
(d.getFullYear() + "").substr(4 - RegExp.$1.length)
|
||||||
|
);
|
||||||
|
for (const k in o)
|
||||||
|
if (new RegExp("(" + k + ")").test(_format))
|
||||||
|
_format = _format.replace(
|
||||||
|
RegExp.$1,
|
||||||
|
RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
|
||||||
|
);
|
||||||
|
return _format;
|
||||||
}
|
}
|
||||||
//是否格式化
|
//是否格式化
|
||||||
export function unixWhether(status) {
|
export function unixWhether(status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 'YES':
|
case "YES":
|
||||||
return "是"
|
return "是";
|
||||||
case 'NO':
|
case "NO":
|
||||||
return "否"
|
return "否";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function unixSellerBillStatus(status_code) {
|
export function unixSellerBillStatus(status_code) {
|
||||||
switch (status_code) {
|
switch (status_code) {
|
||||||
case 'OUT':
|
case "OUT":
|
||||||
return '已出账'
|
return "已出账";
|
||||||
case 'CHECK':
|
case "CHECK":
|
||||||
return '已对账'
|
return "已对账";
|
||||||
case 'EXAMINE':
|
case "EXAMINE":
|
||||||
return '已审核'
|
return "已审核";
|
||||||
case 'PAY':
|
case "PAY":
|
||||||
return '已结算'
|
return "已结算";
|
||||||
case 'COMPLETE':
|
case "COMPLETE":
|
||||||
return '已完成'
|
return "已完成";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function unixSwitchStatus(status_code) {
|
export function unixSwitchStatus(status_code) {
|
||||||
switch (status_code) {
|
switch (status_code) {
|
||||||
case 'OPEN':
|
case "OPEN":
|
||||||
return '开启'
|
return "开启";
|
||||||
case 'CLOSE':
|
case "CLOSE":
|
||||||
return '关闭'
|
return "关闭";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,30 +113,35 @@ export function unixSwitchStatus(status_code) {
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function secrecyMobile(mobile) {
|
export function secrecyMobile(mobile) {
|
||||||
mobile = String(mobile)
|
mobile = String(mobile);
|
||||||
if (!/\d{11}/.test(mobile)) {
|
if (!/\d{11}/.test(mobile)) {
|
||||||
return mobile
|
return mobile;
|
||||||
}
|
}
|
||||||
return mobile.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3')
|
return mobile.replace(/(\d{3})(\d{4})(\d{4})/, "$1****$3");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function formatDate(date, fmt) {
|
export function formatDate(date, fmt) {
|
||||||
if (/(y+)/.test(fmt)) {
|
if (/(y+)/.test(fmt)) {
|
||||||
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
|
fmt = fmt.replace(
|
||||||
|
RegExp.$1,
|
||||||
|
(date.getFullYear() + "").substr(4 - RegExp.$1.length)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
let o = {
|
let o = {
|
||||||
'M+': date.getMonth() + 1,
|
"M+": date.getMonth() + 1,
|
||||||
'd+': date.getDate(),
|
"d+": date.getDate(),
|
||||||
'h+': date.getHours(),
|
"h+": date.getHours(),
|
||||||
'm+': date.getMinutes(),
|
"m+": date.getMinutes(),
|
||||||
's+': date.getSeconds()
|
"s+": date.getSeconds()
|
||||||
};
|
};
|
||||||
for (let k in o) {
|
for (let k in o) {
|
||||||
if (new RegExp(`(${k})`).test(fmt)) {
|
if (new RegExp(`(${k})`).test(fmt)) {
|
||||||
let str = o[k] + '';
|
let str = o[k] + "";
|
||||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
|
fmt = fmt.replace(
|
||||||
|
RegExp.$1,
|
||||||
|
RegExp.$1.length === 1 ? str : padLeftZero(str)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fmt;
|
return fmt;
|
||||||
};
|
}
|
||||||
|
|
|
@ -395,11 +395,11 @@ div.base-info-item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
display: inline-flex;
|
display: inline-block;
|
||||||
flex-direction: column;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
.demo-upload-list img {
|
.demo-upload-list img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -12,6 +12,12 @@
|
||||||
<Option value="UPPER">上架</Option>
|
<Option value="UPPER">上架</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
|
<Form-item label="商品类型" prop="status">
|
||||||
|
<Select v-model="searchForm.goodsType" placeholder="请选择" clearable style="width: 200px">
|
||||||
|
<Option value="PHYSICAL_GOODS">实物商品</Option>
|
||||||
|
<Option value="VIRTUAL_GOODS">虚拟商品</Option>
|
||||||
|
</Select>
|
||||||
|
</Form-item>
|
||||||
<Form-item label="商品编号" prop="sn">
|
<Form-item label="商品编号" prop="sn">
|
||||||
<Input type="text" v-model="searchForm.sn" placeholder="商品编号" clearable style="width: 200px" />
|
<Input type="text" v-model="searchForm.sn" placeholder="商品编号" clearable style="width: 200px" />
|
||||||
</Form-item>
|
</Form-item>
|
||||||
|
@ -45,7 +51,7 @@
|
||||||
|
|
||||||
<div style="margin-left: 13px;">
|
<div style="margin-left: 13px;">
|
||||||
<div class="div-zoom">
|
<div class="div-zoom">
|
||||||
<a @click="linkTo(row.id,row.skuId)">{{row.goodsName}}</a>
|
<a @click="linkTo(row.id,row.skuId)">{{ row.goodsName }}</a>
|
||||||
</div>
|
</div>
|
||||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
|
@ -66,8 +72,15 @@
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500">
|
<Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500">
|
||||||
<Input type="number" v-model="stockAllUpdate" placeholder="全部修改,如不需全部修改,则不需输入" />
|
<Tabs value="updateStock">
|
||||||
|
<TabPane label="手动规格更新" name="updateStock">
|
||||||
<Table :columns="updateStockColumns" :data="stockList" border :span-method="handleSpan"></Table>
|
<Table :columns="updateStockColumns" :data="stockList" border :span-method="handleSpan"></Table>
|
||||||
|
</TabPane>
|
||||||
|
<TabPane label="批量规格更新" name="stockAll">
|
||||||
|
<Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" />
|
||||||
|
</TabPane>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="text" @click="updateStockModalVisible = false">取消</Button>
|
<Button type="text" @click="updateStockModalVisible = false">取消</Button>
|
||||||
<Button type="primary" @click="updateStock">更新</Button>
|
<Button type="primary" @click="updateStock">更新</Button>
|
||||||
|
@ -161,32 +174,11 @@ export default {
|
||||||
width: 130,
|
width: 130,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.isAuth == "TOBEAUDITED") {
|
if (params.row.isAuth == "TOBEAUDITED") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "blue",},},"待审核");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "待审核",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "PASS") {
|
} else if (params.row.isAuth == "PASS") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green",},},"通过");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "审核通过",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "REFUSE") {
|
} else if (params.row.isAuth == "REFUSE") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "red",},},"审核拒绝");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "审核拒绝",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -245,6 +237,20 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "商品类型",
|
||||||
|
key: "goodsType",
|
||||||
|
width: 130,
|
||||||
|
render: (h, params) => {
|
||||||
|
if (params.row.goodsType === 'PHYSICAL_GOODS') {
|
||||||
|
return h("Tag", {props: {color: "geekblue"}},"实物商品");
|
||||||
|
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
|
||||||
|
return h("Tag", {props: {color: "purple"}},"虚拟商品");
|
||||||
|
} else {
|
||||||
|
return h("Tag", {props: {color: "cyan"}},"电子卡券");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "商品价格",
|
title: "商品价格",
|
||||||
key: "price",
|
key: "price",
|
||||||
|
@ -274,32 +280,11 @@ export default {
|
||||||
width: 120,
|
width: 120,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.isAuth == "PASS") {
|
if (params.row.isAuth == "PASS") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green"}},"通过");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "审核通过",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "TOBEAUDITED") {
|
} else if (params.row.isAuth == "TOBEAUDITED") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "volcano"}},"待审核");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "待审核",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "REFUSE") {
|
} else if (params.row.isAuth == "REFUSE") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "red"}},"审核拒绝");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "审核拒绝",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -310,28 +295,12 @@ export default {
|
||||||
sortable: false,
|
sortable: false,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.marketEnable == "DOWN") {
|
if (params.row.marketEnable == "DOWN") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "red"}},"下架");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "下架",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.marketEnable == "UPPER") {
|
} else if (params.row.marketEnable == "UPPER") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green"}},"上架");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "上架",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
|
@ -481,28 +450,28 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
changePage (v) {
|
changePage(v) {
|
||||||
this.searchForm.pageNumber = v;
|
this.searchForm.pageNumber = v;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
this.clearSelectAll();
|
this.clearSelectAll();
|
||||||
},
|
},
|
||||||
changePageSize (v) {
|
changePageSize(v) {
|
||||||
this.searchForm.pageSize = v;
|
this.searchForm.pageSize = v;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
handleSearch () {
|
handleSearch() {
|
||||||
this.searchForm.pageNumber = 1;
|
this.searchForm.pageNumber = 1;
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.pageSize = 10;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
handleReset () {
|
handleReset() {
|
||||||
this.searchForm = {};
|
this.searchForm = {};
|
||||||
this.searchForm.pageNumber = 1;
|
this.searchForm.pageNumber = 1;
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.pageSize = 10;
|
||||||
// 重新加载数据
|
// 重新加载数据
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
changeSort (e) {
|
changeSort(e) {
|
||||||
this.searchForm.sort = e.key;
|
this.searchForm.sort = e.key;
|
||||||
this.searchForm.order = e.order;
|
this.searchForm.order = e.order;
|
||||||
if (e.order === "normal") {
|
if (e.order === "normal") {
|
||||||
|
@ -510,15 +479,15 @@ export default {
|
||||||
}
|
}
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
clearSelectAll () {
|
clearSelectAll() {
|
||||||
this.$refs.table.selectAll(false);
|
this.$refs.table.selectAll(false);
|
||||||
},
|
},
|
||||||
changeSelect (e) {
|
changeSelect(e) {
|
||||||
this.selectList = e;
|
this.selectList = e;
|
||||||
this.selectCount = e.length;
|
this.selectCount = e.length;
|
||||||
},
|
},
|
||||||
//保存运费模板信息
|
//保存运费模板信息
|
||||||
saveShipTemplate () {
|
saveShipTemplate() {
|
||||||
if (this.shipTemplateForm.freightPayer == "STORE") {
|
if (this.shipTemplateForm.freightPayer == "STORE") {
|
||||||
{
|
{
|
||||||
this.shipTemplateForm.templateId = 0;
|
this.shipTemplateForm.templateId = 0;
|
||||||
|
@ -716,10 +685,10 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
activated () {
|
activated() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -44,23 +44,27 @@ export default {
|
||||||
*/
|
*/
|
||||||
open(val, index) {
|
open(val, index) {
|
||||||
if (val) {
|
if (val) {
|
||||||
|
// console.warn(val);
|
||||||
//已选中的地址
|
//已选中的地址
|
||||||
let checkedData = this.$store.state.shipTemplate;
|
let checkedData = this.$store.state.shipTemplate;
|
||||||
|
|
||||||
|
// console.warn(this.$store.state.shipTemplate);
|
||||||
// 禁止选中的地址
|
// 禁止选中的地址
|
||||||
let disabledData = checkedData.filter((item, i) => {
|
let disabledData = checkedData.filter((item, i) => {
|
||||||
return i != index;
|
return i != index;
|
||||||
});
|
});
|
||||||
|
|
||||||
disabledData.forEach((dis) => {
|
disabledData.forEach((dis) => {
|
||||||
|
console.log(dis)
|
||||||
// 循环出已经选中的地址id
|
// 循环出已经选中的地址id
|
||||||
dis.areaId.split(",").forEach((ids) => {
|
dis.areaId.split(",").forEach((ids) => {
|
||||||
// 循环出省份
|
// 循环出省份
|
||||||
this.data.forEach((item) => {
|
this.data.forEach((item) => {
|
||||||
// 如果当前省份下市区全部选中则选中该省份
|
// 如果当前省份下市区全部选中则选中该省份
|
||||||
|
|
||||||
if (dis.selectedAll) {
|
if (dis.selectedAll) {
|
||||||
dis.area.split(",").forEach((area) => {
|
dis.area.split(",").forEach((area) => {
|
||||||
if (area == item.name) {
|
if (area == item.name) {
|
||||||
|
console.log(item.name +"选中")
|
||||||
this.$set(item, "disabled", true);
|
this.$set(item, "disabled", true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -99,7 +103,11 @@ export default {
|
||||||
|
|
||||||
// 筛选出当前选中的市
|
// 筛选出当前选中的市
|
||||||
sort.forEach((sortItem, sortIndex) => {
|
sort.forEach((sortItem, sortIndex) => {
|
||||||
if (item.level != "province" && sortItem.id == item.parentId && !item.disabled) {
|
if (
|
||||||
|
item.level != "province" &&
|
||||||
|
sortItem.id == item.parentId &&
|
||||||
|
!item.disabled
|
||||||
|
) {
|
||||||
sortItem.selectedList.push({
|
sortItem.selectedList.push({
|
||||||
...item,
|
...item,
|
||||||
});
|
});
|
||||||
|
@ -147,6 +155,7 @@ export default {
|
||||||
this.selectedWay.push({ name: data.title, id: data.id });
|
this.selectedWay.push({ name: data.title, id: data.id });
|
||||||
});
|
});
|
||||||
console.log(this.data);
|
console.log(this.data);
|
||||||
|
this.$store.state.regions = this.data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -162,7 +162,7 @@ export default {
|
||||||
}
|
}
|
||||||
.login {
|
.login {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: url("../assets/background.svg") no-repeat;
|
background: url("../assets/background.png") no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
background-position-y: bottom;
|
background-position-y: bottom;
|
||||||
background-color: #edf0f3;
|
background-color: #edf0f3;
|
||||||
|
|
|
@ -134,21 +134,18 @@ export default {
|
||||||
key: "name",
|
key: "name",
|
||||||
minWidth: 120
|
minWidth: 120
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
key: "disabled",
|
key: "disabled",
|
||||||
minWidth: 50,
|
minWidth: 50,
|
||||||
render(h, params) {
|
render(h, params) {
|
||||||
return h("Badge", {
|
if(params.row.disabled){
|
||||||
props: {
|
return h("div", [h("tag", {props: {color: "green"}}, "开启")]);
|
||||||
status: params.row.disabled ? "success" : "error",
|
}else{
|
||||||
text: params.row.disabled ? "开启" : "关闭",
|
return h("div", [h("tag", {props: {color: "volcano"}}, "关闭")]);
|
||||||
},
|
}
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<Row type="flex" justify="space-around" class="help">
|
<Row type="flex" justify="space-around" class="help">
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">{{ $t('help') }}</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('help') }}</a>
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">{{ $t('privacy') }}</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('privacy') }}</a>
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">{{ $t('terms') }}</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('terms') }}</a>
|
||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © 2020 - Present
|
Copyright © 2020 - Present
|
||||||
<a
|
<a
|
||||||
href="http://lili.cn"
|
href="https://pickmall.cn/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style="margin:0 5px;"
|
style="margin:0 5px;"
|
||||||
>lili-shop</a> {{ $t('rights') }}
|
>lili-shop</a> {{ $t('rights') }}
|
||||||
|
|
|
@ -210,11 +210,11 @@ export default {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.grade == "GOOD") {
|
if (params.row.grade == "GOOD") {
|
||||||
return h("Badge", {props: {status: "success", text: "好评"}})
|
return h("Tag", {props: {color: "green",},}, "好评");
|
||||||
} else if (params.row.grade == "MODERATE") {
|
} else if (params.row.grade == "MODERATE") {
|
||||||
return h("Badge", {props: {status: "success", text: "中评"}})
|
return h("Tag", {props: {color: "orange",},}, "中评");
|
||||||
} else if (params.row.grade == "WORSE") {
|
} else {
|
||||||
return h("Badge", {props: {status: "error", text: "差评"}})
|
return h("Tag", {props: {color: "red",},}, "差评");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -224,9 +224,9 @@ export default {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.status === "OPEN") {
|
if (params.row.status === "OPEN") {
|
||||||
return h("Badge", {props: {status: "success", text: "展示"}})
|
return h("Tag", {props: {color: "green"}},"展示")
|
||||||
} else {
|
} else {
|
||||||
return h("Badge", {props: {status: "error", text: "隐藏"}})
|
return h("Tag", {props: {color: "red"}},"隐藏")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -236,9 +236,9 @@ export default {
|
||||||
width: 110,
|
width: 110,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.replyStatus) {
|
if (params.row.replyStatus) {
|
||||||
return h("Badge", {props: {status: "success", text: "已回复"}})
|
return h("Tag", {props: {color: "green"}},"已回复")
|
||||||
} else {
|
} else {
|
||||||
return h("Badge", {props: {status: "error", text: "未回复"}})
|
return h("Tag", {props: {color: "blue"}},"未回复")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<div class="upload-pic-thumb">
|
||||||
<vuedraggable
|
<vuedraggable
|
||||||
:list="uploadList"
|
:list="uploadList"
|
||||||
:disabled="!draggable||!multiple"
|
:disabled="!draggable||!multiple"
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
<Icon type="md-camera" size="20"></Icon>
|
<Icon type="md-camera" size="20"></Icon>
|
||||||
</div>
|
</div>
|
||||||
</Upload>
|
</Upload>
|
||||||
|
</div>
|
||||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||||
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
|
@ -252,10 +253,12 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.upload-pic-thumb{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.upload-list {
|
.upload-list {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -267,6 +270,7 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.upload-list img {
|
.upload-list img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -98,14 +98,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.getImg();
|
// this.getImg();
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
verifyType: {
|
verifyType: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler: function (v) {
|
handler: function (v) {
|
||||||
this.type = v;
|
this.type = v;
|
||||||
this.refresh();
|
// this.refresh();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
show (v) {
|
show (v) {
|
||||||
|
|
|
@ -185,17 +185,17 @@
|
||||||
key: "complainStatus",
|
key: "complainStatus",
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.complainStatus == "NEW") {
|
if (params.row.complainStatus == "NEW") {
|
||||||
return h('div', [h('span', { }, '新投诉'),]);
|
return h('div', [h('tag',{props: {color: "purple"}}, '新投诉'),]);
|
||||||
} else if (params.row.complainStatus == "CANCEL") {
|
} else if (params.row.complainStatus == "CANCEL") {
|
||||||
return h('div', [h('span', { }, '已撤销'),]);
|
return h('div', [h('tag', {props: {color: "cyan"}}, '已撤销'),]);
|
||||||
} else if (params.row.complainStatus == "WAIT_APPEAL") {
|
} else if (params.row.complainStatus == "WAIT_APPEAL") {
|
||||||
return h('div', [h('span', { }, '待申诉'),]);
|
return h('div', [h('tag', {props: {color: "volcano"}}, '待申诉'),]);
|
||||||
} else if (params.row.complainStatus == "COMMUNICATION") {
|
} else if (params.row.complainStatus == "COMMUNICATION") {
|
||||||
return h('div', [h('span', { }, '对话中'),]);
|
return h('div', [h('tag', {props: {color: "orange"}}, '对话中'),]);
|
||||||
}else if (params.row.complainStatus == "WAIT_ARBITRATION") {
|
}else if (params.row.complainStatus == "WAIT_ARBITRATION") {
|
||||||
return h('div', [h('span', { }, '等待仲裁'),]);
|
return h('div', [h('tag', {props: {color: "blue"}}, '等待仲裁'),]);
|
||||||
}else if (params.row.complainStatus == "COMPLETE") {
|
}else if (params.row.complainStatus == "COMPLETE") {
|
||||||
return h('div', [h('span', { }, '已完成'),]);
|
return h('div', [h('tag', {props: {color: "green"}}, '已完成'),]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -176,25 +176,23 @@
|
||||||
width: 120,
|
width: 120,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.serviceStatus == "APPLY") {
|
if (params.row.serviceStatus == "APPLY") {
|
||||||
return h('div', [h('span', { }, '申请售后'),]);
|
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
|
||||||
} else if (params.row.serviceStatus == "PASS") {
|
} else if (params.row.serviceStatus == "PASS") {
|
||||||
return h('div', [h('span', { }, '审核通过'),]);
|
return h('div', [h('tag', {props: {color: "cyan"}}, '通过售后'),]);
|
||||||
} else if (params.row.serviceStatus == "REFUSE") {
|
} else if (params.row.serviceStatus == "REFUSE") {
|
||||||
return h('div', [h('span', { }, '审核拒绝'),]);
|
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
|
||||||
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
||||||
return h('div', [h('span', { }, '买家退货,待卖家收货'),]);
|
return h('div', [h('tag', {props: {color: "orange"}}, '买家退货,待卖家收货'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
|
} else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
||||||
return h('div', [h('span', { }, '商家换货/补发'),]);
|
return h('div', [h('tag', {props: {color: "gold"}}, '卖家确认收货'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
} else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
||||||
return h('div', [h('span', { }, '卖家确认收货'),]);
|
return h('div', [h('tag', {props: {color: "lime"}}, '卖家终止售后'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
||||||
return h('div', [h('span', { }, '卖家终止售后'),]);
|
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
|
||||||
}else if (params.row.serviceStatus == "BUYER_CONFIRM") {
|
} else if (params.row.serviceStatus == "COMPLETE") {
|
||||||
return h('div', [h('span', { }, '买家确认收货'),]);
|
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
|
||||||
}else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
||||||
return h('div', [h('span', { }, '买家取消售后'),]);
|
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
|
||||||
}else if (params.row.serviceStatus == "COMPLETE") {
|
|
||||||
return h('div', [h('span', { }, '完成'),]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -182,27 +182,17 @@
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.serviceStatus == "APPLY") {
|
if (params.row.serviceStatus == "APPLY") {
|
||||||
return h('div', [h('span', { }, '申请售后'),]);
|
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
|
||||||
} else if (params.row.serviceStatus == "PASS") {
|
} else if (params.row.serviceStatus == "PASS") {
|
||||||
return h('div', [h('span', { }, '审核通过'),]);
|
return h('div', [h('tag', {props: {color: "cyan"}}, '通过售后'),]);
|
||||||
} else if (params.row.serviceStatus == "REFUSE") {
|
} else if (params.row.serviceStatus == "REFUSE") {
|
||||||
return h('div', [h('span', { }, '审核拒绝'),]);
|
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
|
||||||
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
||||||
return h('div', [h('span', { }, '买家退货,待卖家收货'),]);
|
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
|
} else if (params.row.serviceStatus == "COMPLETE") {
|
||||||
return h('div', [h('span', { }, '商家换货/补发'),]);
|
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
|
||||||
return h('div', [h('span', { }, '卖家确认收货'),]);
|
|
||||||
}else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
|
||||||
return h('div', [h('span', { }, '卖家终止售后'),]);
|
|
||||||
}else if (params.row.serviceStatus == "BUYER_CONFIRM") {
|
|
||||||
return h('div', [h('span', { }, '买家确认收货'),]);
|
|
||||||
}else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
|
||||||
return h('div', [h('span', { }, '买家取消售后'),]);
|
|
||||||
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
||||||
return h('div', [h('span', { }, '等待平台退款'),]);
|
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
|
||||||
}else if (params.row.serviceStatus == "COMPLETE") {
|
|
||||||
return h('div', [h('span', { }, '完成'),]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 上传 -->
|
<!-- 上传 -->
|
||||||
<div v-if="item.checked && index ==1" class="tpl">
|
<div v-if="item.checked && index ==1" class="tpl">
|
||||||
<Upload :before-upload="handleUpload" name="files" style="width:50%; height:400px;"
|
<Upload :before-upload="handleUpload" name="files" style="width:50%; height:400px;" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
||||||
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" multiple type="drag" :action="action" :headers="accessToken">
|
multiple type="drag" :action="action" :headers="accessToken">
|
||||||
<div style="padding: 50px 0">
|
<div style="padding: 50px 0">
|
||||||
<Icon type="ios-cloud-upload" size="102" style="color: #3399ff"></Icon>
|
<Icon type="ios-cloud-upload" size="102" style="color: #3399ff"></Icon>
|
||||||
<h2>选择或拖拽文件上传</h2>
|
<h2>选择或拖拽文件上传</h2>
|
||||||
|
@ -26,11 +26,13 @@
|
||||||
</Upload>
|
</Upload>
|
||||||
</div>
|
</div>
|
||||||
<!-- 上传 -->
|
<!-- 上传 -->
|
||||||
<div v-if="item.checked && index ==2" class="tpl">
|
<div v-if="item.checked && index ==2" class="tpl success">
|
||||||
|
|
||||||
<h1>发货完成</h1>
|
<h1>发货完成</h1>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Button>关闭页面</Button>
|
<Button class="btn" @click="close">关闭页面</Button>
|
||||||
|
<Button class="btn" type="primary" @click="navigationToGoodsOrder">商品订单</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -79,28 +81,50 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 点击选择步骤
|
// 点击选择步骤
|
||||||
handleCheckStep(val) {
|
handleCheckStep(val) {
|
||||||
|
if (val.title.search("3") == -1) {
|
||||||
|
console.warn(val);
|
||||||
this.stepList.map((item) => {
|
this.stepList.map((item) => {
|
||||||
item.checked = false;
|
item.checked = false;
|
||||||
});
|
});
|
||||||
val.checked = true;
|
val.checked = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
handleUpload(file) {
|
handleUpload(file) {
|
||||||
this.file = file;
|
this.file = file;
|
||||||
this.upload();
|
this.upload();
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
navigationToGoodsOrder() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/order/orderList",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.$store.commit("removeTag", "export-order-deliver");
|
||||||
|
localStorage.storeOpenedList = JSON.stringify(
|
||||||
|
this.$store.state.app.storeOpenedList
|
||||||
|
);
|
||||||
|
this.$router.go(-1);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件
|
* 上传文件
|
||||||
*/
|
*/
|
||||||
async upload() {
|
async upload() {
|
||||||
let fd = new FormData();
|
let fd = new FormData();
|
||||||
fd.append("files", this.file);
|
fd.append("files", this.file);
|
||||||
await uploadDeliverExcel(fd);
|
let res = await uploadDeliverExcel(fd);
|
||||||
},
|
if (res.success) {
|
||||||
|
this.stepList.map((item) => {
|
||||||
|
item.checked = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.stepList[2].checked = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载excel
|
* 下载excel
|
||||||
|
@ -172,4 +196,15 @@ img {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
.success {
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
> h1 {
|
||||||
|
font-size: 28px;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
/deep/ .btn {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="div-item">
|
<div class="div-item">
|
||||||
<div class="div-item-left">订单来源:</div>
|
<div class="div-item-left">订单来源:</div>
|
||||||
<div class="div-item-right">
|
<div class="div-item-right">
|
||||||
{{ orderInfo.order.clientType }}
|
{{ orderInfo.order.clientType | clientTypeWay }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
<div class="div-item-right">{{ orderInfo.order.remark }}</div>
|
<div class="div-item-right">{{ orderInfo.order.remark }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="div-item">
|
<div class="div-item" v-if="orderInfo.order.orderType != 'VIRTUAL'">
|
||||||
<div class="div-item-left">配送方式:</div>
|
<div class="div-item-left">配送方式:</div>
|
||||||
<div class="div-item-right">
|
<div class="div-item-right">
|
||||||
{{
|
{{
|
||||||
|
@ -521,6 +521,7 @@ export default {
|
||||||
},
|
},
|
||||||
//弹出订单核销框
|
//弹出订单核销框
|
||||||
orderTake() {
|
orderTake() {
|
||||||
|
this.orderTakeForm.qrCode = this.orderInfo.order.verificationCode
|
||||||
this.orderTakeModal = true;
|
this.orderTakeModal = true;
|
||||||
},
|
},
|
||||||
//订单核销提交
|
//订单核销提交
|
||||||
|
|
|
@ -8,14 +8,6 @@
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="会员名称" prop="buyerName">
|
<Form-item label="会员名称" prop="buyerName">
|
||||||
<Input type="text" v-model="searchForm.buyerName" clearable placeholder="请输入会员名称" style="width: 160px" />
|
<Input type="text" v-model="searchForm.buyerName" clearable placeholder="请输入会员名称" style="width: 160px" />
|
||||||
</Form-item>
|
|
||||||
<Form-item label="订单类型" prop="orderType">
|
|
||||||
<Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px">
|
|
||||||
<Option value="NORMAL">普通订单</Option>
|
|
||||||
<Option value="PINTUAN">拼团订单</Option>
|
|
||||||
<Option value="GIFT">赠品订单</Option>
|
|
||||||
<Option value="VIRTUAL">核验订单</Option>
|
|
||||||
</Select>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="订单状态" prop="orderStatus">
|
<Form-item label="订单状态" prop="orderStatus">
|
||||||
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
|
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
|
||||||
|
@ -24,7 +16,6 @@
|
||||||
<Option value="UNDELIVERED">待发货</Option>
|
<Option value="UNDELIVERED">待发货</Option>
|
||||||
<Option value="DELIVERED">已发货</Option>
|
<Option value="DELIVERED">已发货</Option>
|
||||||
<Option value="COMPLETED">已完成</Option>
|
<Option value="COMPLETED">已完成</Option>
|
||||||
<Option value="TAKE">待核验</Option>
|
|
||||||
<Option value="CANCELLED">已取消</Option>
|
<Option value="CANCELLED">已取消</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
|
@ -38,21 +29,7 @@
|
||||||
<div>
|
<div>
|
||||||
<Button type="primary" class="export" @click="expressOrderDeliver">
|
<Button type="primary" class="export" @click="expressOrderDeliver">
|
||||||
批量发货
|
批量发货
|
||||||
<Icon type="ios-arrow-down"></Icon>
|
|
||||||
</Button>
|
</Button>
|
||||||
<Poptip @keydown.enter.native="orderVerification" placement="bottom-start" width="400">
|
|
||||||
<Button class="export">
|
|
||||||
核验订单
|
|
||||||
</Button>
|
|
||||||
<div class="api" slot="content">
|
|
||||||
<h2>核验订单号</h2>
|
|
||||||
<div style="margin:10px 0;">
|
|
||||||
<Input v-model="orderCode" style="width:300px; margin-right:10px;" />
|
|
||||||
<Button style="primary" @click="orderVerification">核验</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Poptip>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
|
@ -76,13 +53,14 @@ export default {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 1, // 当前页数
|
pageNumber: 1, // 当前页数
|
||||||
pageSize: 10, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
sort: "createTime", // 默认排序字段
|
sort: "", // 默认排序字段
|
||||||
order: "desc", // 默认排序方式
|
order: "", // 默认排序方式
|
||||||
startDate: "", // 起始时间
|
startDate: "", // 起始时间
|
||||||
endDate: "", // 终止时间
|
endDate: "", // 终止时间
|
||||||
orderSn: "",
|
orderSn: "",
|
||||||
buyerName: "",
|
buyerName: "",
|
||||||
orderStatus: "",
|
orderStatus: "",
|
||||||
|
orderType: "NORMAL",
|
||||||
},
|
},
|
||||||
selectDate: null,
|
selectDate: null,
|
||||||
form: {
|
form: {
|
||||||
|
@ -102,7 +80,7 @@ export default {
|
||||||
{
|
{
|
||||||
title: "订单号",
|
title: "订单号",
|
||||||
key: "sn",
|
key: "sn",
|
||||||
minWidth: 240,
|
minWidth: 200,
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -117,28 +95,12 @@ export default {
|
||||||
} else if (params.row.clientType == "WECHAT_MP") {
|
} else if (params.row.clientType == "WECHAT_MP") {
|
||||||
return h("div", {}, "小程序端");
|
return h("div", {}, "小程序端");
|
||||||
} else if (params.row.clientType == "APP") {
|
} else if (params.row.clientType == "APP") {
|
||||||
return h("div", {}, "移动应用端");
|
return h("div", {}, "APP端");
|
||||||
} else {
|
} else {
|
||||||
return h("div", {}, params.row.clientType);
|
return h("div", {}, params.row.clientType);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "订单类型",
|
|
||||||
key: "orderType",
|
|
||||||
width: 120,
|
|
||||||
render: (h, params) => {
|
|
||||||
if (params.row.orderType == "NORMAL") {
|
|
||||||
return h("div", [h("span", {}, "普通订单")]);
|
|
||||||
} else if (params.row.orderType == "PINTUAN") {
|
|
||||||
return h("div", [h("span", {}, "拼团订单")]);
|
|
||||||
} else if (params.row.orderType == "GIFT") {
|
|
||||||
return h("div", [h("span", {}, "赠品订单")]);
|
|
||||||
} else if (params.row.orderType == "VIRTUAL") {
|
|
||||||
return h("div", [h("tag", {}, "核验订单")]);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "买家名称",
|
title: "买家名称",
|
||||||
key: "memberName",
|
key: "memberName",
|
||||||
|
@ -164,30 +126,27 @@ export default {
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.orderStatus == "UNPAID") {
|
if (params.row.orderStatus == "UNPAID") {
|
||||||
return h("div", [h("span", {}, "未付款")]);
|
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||||
} else if (params.row.orderStatus == "PAID") {
|
} else if (params.row.orderStatus == "PAID") {
|
||||||
return h("div", [h("span", {}, "已付款")]);
|
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
|
||||||
} else if (params.row.orderStatus == "UNDELIVERED") {
|
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||||
return h("div", [h("span", {}, "待发货")]);
|
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
|
||||||
} else if (params.row.orderStatus == "DELIVERED") {
|
} else if (params.row.orderStatus == "DELIVERED") {
|
||||||
return h("div", [h("span", {}, "已发货")]);
|
return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]);
|
||||||
} else if (params.row.orderStatus == "COMPLETED") {
|
} else if (params.row.orderStatus == "COMPLETED") {
|
||||||
return h("div", [h("span", {}, "已完成")]);
|
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||||
} else if (params.row.orderStatus == "TAKE") {
|
} else if (params.row.orderStatus == "TAKE") {
|
||||||
return h("div", [h("span", {}, "待核验")]);
|
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
|
||||||
} else if (params.row.orderStatus == "CANCELLED") {
|
} else if (params.row.orderStatus == "CANCELLED") {
|
||||||
return h("div", [h("span", {}, "已取消")]);
|
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "下单时间",
|
title: "下单时间",
|
||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 170,
|
width: 170
|
||||||
sortable: true,
|
|
||||||
sortType: "desc",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
|
@ -229,8 +188,6 @@ export default {
|
||||||
let result = await verificationCode(this.orderCode);
|
let result = await verificationCode(this.orderCode);
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
|
||||||
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "order-detail",
|
name: "order-detail",
|
||||||
query: { sn: result.result.sn || this.orderCode },
|
query: { sn: result.result.sn || this.orderCode },
|
||||||
|
@ -309,6 +266,9 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,285 @@
|
||||||
|
<template>
|
||||||
|
<div class="search">
|
||||||
|
<Card>
|
||||||
|
<Row @keydown.enter.native="handleSearch">
|
||||||
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
|
<Form-item label="订单编号" prop="orderSn">
|
||||||
|
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 160px" />
|
||||||
|
</Form-item>
|
||||||
|
<Form-item label="会员名称" prop="buyerName">
|
||||||
|
<Input type="text" v-model="searchForm.buyerName" clearable placeholder="请输入会员名称" style="width: 160px" />
|
||||||
|
</Form-item>
|
||||||
|
<Form-item label="订单状态" prop="orderStatus">
|
||||||
|
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
|
||||||
|
<Option value="UNPAID">未付款</Option>
|
||||||
|
<Option value="PAID">已付款</Option>
|
||||||
|
<Option value="COMPLETED">已完成</Option>
|
||||||
|
<Option value="TAKE">待核验</Option>
|
||||||
|
<Option value="CANCELLED">已取消</Option>
|
||||||
|
</Select>
|
||||||
|
</Form-item>
|
||||||
|
<Form-item label="下单时间">
|
||||||
|
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
|
||||||
|
</Form-item>
|
||||||
|
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||||
|
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||||
|
</Form>
|
||||||
|
</Row>
|
||||||
|
<div>
|
||||||
|
<Poptip @keydown.enter.native="orderVerification" placement="bottom-start" width="400">
|
||||||
|
<Button class="export">
|
||||||
|
核验订单
|
||||||
|
</Button>
|
||||||
|
<div class="api" slot="content">
|
||||||
|
<h2>核验码</h2>
|
||||||
|
<div style="margin:10px 0;">
|
||||||
|
<Input v-model="orderCode" style="width:300px; margin-right:10px;" />
|
||||||
|
<Button style="primary" @click="orderVerification">核验</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Poptip>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||||
|
<Row type="flex" justify="end" class="page">
|
||||||
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||||
|
show-total show-elevator show-sizer></Page>
|
||||||
|
</Row>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as API_Order from "@/api/order";
|
||||||
|
import { verificationCode } from "@/api/order";
|
||||||
|
export default {
|
||||||
|
name: "virtualOrderList",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
orderCode: "",
|
||||||
|
loading: true, // 表单加载状态
|
||||||
|
searchForm: {
|
||||||
|
// 搜索框初始化对象
|
||||||
|
pageNumber: 1, // 当前页数
|
||||||
|
pageSize: 10, // 页面大小
|
||||||
|
sort: "createTime", // 默认排序字段
|
||||||
|
order: "desc", // 默认排序方式
|
||||||
|
startDate: "", // 起始时间
|
||||||
|
endDate: "", // 终止时间
|
||||||
|
orderSn: "",
|
||||||
|
buyerName: "",
|
||||||
|
orderStatus: "",
|
||||||
|
orderType: "VIRTUAL",
|
||||||
|
},
|
||||||
|
selectDate: null,
|
||||||
|
form: {
|
||||||
|
// 添加或编辑表单对象初始化数据
|
||||||
|
sn: "",
|
||||||
|
sellerName: "",
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
billPrice: "",
|
||||||
|
},
|
||||||
|
// 表单验证规则
|
||||||
|
formValidate: {},
|
||||||
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
|
selectList: [], // 多选数据
|
||||||
|
selectCount: 0, // 多选计数
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: "订单号",
|
||||||
|
key: "sn",
|
||||||
|
minWidth: 240,
|
||||||
|
tooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "订单来源",
|
||||||
|
key: "clientType",
|
||||||
|
width: 120,
|
||||||
|
render: (h, params) => {
|
||||||
|
if (params.row.clientType == "H5") {
|
||||||
|
return h("div", {}, "移动端");
|
||||||
|
} else if (params.row.clientType == "PC") {
|
||||||
|
return h("div", {}, "PC端");
|
||||||
|
} else if (params.row.clientType == "WECHAT_MP") {
|
||||||
|
return h("div", {}, "小程序端");
|
||||||
|
} else if (params.row.clientType == "APP") {
|
||||||
|
return h("div", {}, "移动应用端");
|
||||||
|
} else {
|
||||||
|
return h("div", {}, params.row.clientType);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "买家名称",
|
||||||
|
key: "memberName",
|
||||||
|
minWidth: 130,
|
||||||
|
tooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "订单金额",
|
||||||
|
key: "flowPrice",
|
||||||
|
minWidth: 100,
|
||||||
|
tooltip: true,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h(
|
||||||
|
"div",
|
||||||
|
this.$options.filters.unitPrice(params.row.flowPrice, "¥")
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: "订单状态",
|
||||||
|
key: "orderStatus",
|
||||||
|
minWidth: 100,
|
||||||
|
render: (h, params) => {
|
||||||
|
if (params.row.orderStatus == "UNPAID") {
|
||||||
|
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||||
|
} else if (params.row.orderStatus == "PAID") {
|
||||||
|
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
|
||||||
|
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||||
|
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
|
||||||
|
} else if (params.row.orderStatus == "DELIVERED") {
|
||||||
|
return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]);
|
||||||
|
} else if (params.row.orderStatus == "COMPLETED") {
|
||||||
|
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||||
|
} else if (params.row.orderStatus == "TAKE") {
|
||||||
|
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
|
||||||
|
} else if (params.row.orderStatus == "CANCELLED") {
|
||||||
|
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "下单时间",
|
||||||
|
key: "createTime",
|
||||||
|
width: 170,
|
||||||
|
sortable: true,
|
||||||
|
sortType: "desc",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
key: "action",
|
||||||
|
align: "center",
|
||||||
|
width: 100,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", [
|
||||||
|
h(
|
||||||
|
"Button",
|
||||||
|
{
|
||||||
|
props: {
|
||||||
|
type: "info",
|
||||||
|
size: "small",
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
marginRight: "5px",
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
click: () => {
|
||||||
|
this.detail(params.row);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"查看"
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
data: [], // 表单数据
|
||||||
|
total: 0, // 表单数据总数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 核验订单
|
||||||
|
*/
|
||||||
|
async orderVerification() {
|
||||||
|
let result = await verificationCode(this.orderCode);
|
||||||
|
|
||||||
|
if (result.success) {
|
||||||
|
this.$router.push({
|
||||||
|
name: "order-detail",
|
||||||
|
query: { sn: result.result.sn || this.orderCode },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
init() {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
changePage(v) {
|
||||||
|
this.searchForm.pageNumber = v;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
changePageSize(v) {
|
||||||
|
this.searchForm.pageSize = v;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
handleSearch() {
|
||||||
|
this.searchForm.pageNumber = 1;
|
||||||
|
this.searchForm.pageSize = 10;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
handleReset() {
|
||||||
|
this.searchForm = {};
|
||||||
|
this.searchForm.pageNumber = 1;
|
||||||
|
this.searchForm.pageSize = 10;
|
||||||
|
this.searchForm.orderType = "VIRTUAL";
|
||||||
|
this.selectDate = null;
|
||||||
|
this.searchForm.startDate = "";
|
||||||
|
this.searchForm.endDate = "";
|
||||||
|
// 重新加载数据
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
changeSort(e) {
|
||||||
|
this.searchForm.sort = e.key;
|
||||||
|
this.searchForm.order = e.order;
|
||||||
|
if (e.order === "normal") {
|
||||||
|
this.searchForm.order = "";
|
||||||
|
}
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
|
||||||
|
changeSelect(e) {
|
||||||
|
this.selectList = e;
|
||||||
|
this.selectCount = e.length;
|
||||||
|
},
|
||||||
|
selectDateRange(v) {
|
||||||
|
if (v) {
|
||||||
|
this.searchForm.startDate = v[0];
|
||||||
|
this.searchForm.endDate = v[1];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getDataList() {
|
||||||
|
this.loading = true;
|
||||||
|
API_Order.getOrderList(this.searchForm).then((res) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (res.success) {
|
||||||
|
this.data = res.result.records;
|
||||||
|
this.total = res.result.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
detail(v) {
|
||||||
|
let sn = v.sn;
|
||||||
|
this.$router.push({
|
||||||
|
name: "order-detail",
|
||||||
|
query: { sn: sn },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
// 建议引入通用样式 可删除下面样式代码
|
||||||
|
@import "@/styles/table-common.scss";
|
||||||
|
.export {
|
||||||
|
margin: 10px 20px 10px 0;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -2,39 +2,15 @@
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<Card>
|
<Card>
|
||||||
<Row @keydown.enter.native="handleSearch">
|
<Row @keydown.enter.native="handleSearch">
|
||||||
<Form
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
ref="searchForm"
|
|
||||||
:model="searchForm"
|
|
||||||
inline
|
|
||||||
:label-width="70"
|
|
||||||
class="search-form"
|
|
||||||
>
|
|
||||||
<Form-item label="订单编号" prop="orderSn">
|
<Form-item label="订单编号" prop="orderSn">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.orderSn"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入订单编号"
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="会员名称" prop="memberName">
|
<Form-item label="会员名称" prop="memberName">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.memberName" clearable placeholder="请输入会员名称" style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.memberName"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入会员名称"
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="发票抬头" prop="receiptTitle">
|
<Form-item label="发票抬头" prop="receiptTitle">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.receiptTitle" clearable placeholder="请输入发票抬头" style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.receiptTitle"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入发票抬头"
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="状态" prop="receiptStatus">
|
<Form-item label="状态" prop="receiptStatus">
|
||||||
<Select v-model="searchForm.receiptStatus" placeholder="请选择" clearable style="width: 200px">
|
<Select v-model="searchForm.receiptStatus" placeholder="请选择" clearable style="width: 200px">
|
||||||
|
@ -46,44 +22,24 @@
|
||||||
<Button @click="handleReset" class="search-btn">重置</Button>
|
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||||
:loading="loading"
|
|
||||||
border
|
|
||||||
:columns="columns"
|
|
||||||
:data="data"
|
|
||||||
ref="table"
|
|
||||||
sortable="custom"
|
|
||||||
@on-sort-change="changeSort"
|
|
||||||
@on-selection-change="changeSelect"
|
|
||||||
>
|
|
||||||
<!-- 订单详情格式化 -->
|
<!-- 订单详情格式化 -->
|
||||||
<template slot="orderSlot" slot-scope="scope">
|
<template slot="orderSlot" slot-scope="scope">
|
||||||
<a
|
<a @click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
|
||||||
@click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
|
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
<Page
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||||
:current="searchForm.pageNumber"
|
show-total show-elevator show-sizer></Page>
|
||||||
:total="total"
|
|
||||||
:page-size="searchForm.pageSize"
|
|
||||||
@on-change="changePage"
|
|
||||||
@on-page-size-change="changePageSize"
|
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-elevator
|
|
||||||
show-sizer
|
|
||||||
></Page>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as API_Order from "@/api/order";
|
import * as API_Order from "@/api/order";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "storeBill",
|
name: "storeBill",
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
|
@ -121,32 +77,40 @@
|
||||||
title: "会员名称",
|
title: "会员名称",
|
||||||
key: "memberName",
|
key: "memberName",
|
||||||
minWidth: 90,
|
minWidth: 90,
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "发票抬头",
|
title: "发票抬头",
|
||||||
key: "receiptTitle",
|
key: "receiptTitle",
|
||||||
minWidth: 90,
|
minWidth: 90,
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", params.row.receiptTitle || "暂未填写");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "纳税人识别号",
|
title: "纳税人识别号",
|
||||||
key: "taxpayerId",
|
key: "taxpayerId",
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", params.row.taxpayerId || "暂未填写");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "发票内容",
|
title: "发票内容",
|
||||||
key: "receiptContent",
|
key: "receiptContent",
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", params.row.receiptContent || "暂未填写");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "发票金额",
|
title: "发票金额",
|
||||||
key: "billPrice",
|
key: "billPrice",
|
||||||
width: 90,
|
width: 150,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h(
|
return h(
|
||||||
"div",
|
"div",
|
||||||
|
@ -160,18 +124,15 @@
|
||||||
width: 90,
|
width: 90,
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if(params.row.receiptStatus == 0){
|
if (params.row.receiptStatus == 0) {
|
||||||
return h(
|
return h("div", [
|
||||||
"div",
|
h("tag", { props: { color: "volcano" } }, "未开票"),
|
||||||
"未开票"
|
]);
|
||||||
);
|
} else {
|
||||||
}else{
|
return h("div", [
|
||||||
return h(
|
h("tag", { props: { color: "green" } }, "未开票"),
|
||||||
"div",
|
]);
|
||||||
"已开票"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -180,22 +141,37 @@
|
||||||
width: 90,
|
width: 90,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.orderStatus == "UNPAID") {
|
if (params.row.orderStatus == "UNPAID") {
|
||||||
return h('div', [h('span', { }, '未付款'),]);
|
return h("div", [
|
||||||
|
h("tag", { props: { color: "magenta" } }, "未付款"),
|
||||||
|
]);
|
||||||
} else if (params.row.orderStatus == "PAID") {
|
} else if (params.row.orderStatus == "PAID") {
|
||||||
return h('div', [h('span', { }, '已付款'),]);
|
return h("div", [
|
||||||
|
h("tag", { props: { color: "blue" } }, "已付款"),
|
||||||
|
]);
|
||||||
} else if (params.row.orderStatus == "UNDELIVERED") {
|
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||||
return h('div', [h('span', { }, '待发货'),]);
|
return h("div", [
|
||||||
}else if (params.row.orderStatus == "DELIVERED") {
|
h("tag", { props: { color: "geekblue" } }, "待发货"),
|
||||||
return h('div', [h('span', { }, '已发货'),]);
|
]);
|
||||||
}else if (params.row.orderStatus == "COMPLETED") {
|
} else if (params.row.orderStatus == "DELIVERED") {
|
||||||
return h('div', [h('span', { }, '已完成'),]);
|
return h("div", [
|
||||||
}else if (params.row.orderStatus == "TAKE") {
|
h("tag", { props: { color: "cyan" } }, "已发货"),
|
||||||
return h('div', [h('span', { }, '待核验'),]);
|
]);
|
||||||
}else if (params.row.orderStatus == "CANCELLED") {
|
} else if (params.row.orderStatus == "COMPLETED") {
|
||||||
return h('div', [h('span', { }, '已取消'),]);
|
return h("div", [
|
||||||
}
|
h("tag", { props: { color: "green" } }, "已完成"),
|
||||||
|
]);
|
||||||
|
} else if (params.row.orderStatus == "TAKE") {
|
||||||
|
return h("div", [
|
||||||
|
h("tag", { props: { color: "volcano" } }, "待核验"),
|
||||||
|
]);
|
||||||
|
} else if (params.row.orderStatus == "CANCELLED") {
|
||||||
|
return h("div", [
|
||||||
|
h("tag", { props: { color: "red" } }, "已取消"),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
|
@ -211,7 +187,11 @@
|
||||||
size: "small",
|
size: "small",
|
||||||
},
|
},
|
||||||
attrs: {
|
attrs: {
|
||||||
disabled: params.row.orderStatus == "COMPLETED" && params.row.receiptStatus == 0? false : true,
|
disabled:
|
||||||
|
params.row.orderStatus == "COMPLETED" &&
|
||||||
|
params.row.receiptStatus == 0
|
||||||
|
? false
|
||||||
|
: true,
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
marginRight: "5px",
|
marginRight: "5px",
|
||||||
|
@ -251,7 +231,7 @@
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchForm = {}
|
this.searchForm = {};
|
||||||
this.searchForm.pageNumber = 1;
|
this.searchForm.pageNumber = 1;
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.pageSize = 10;
|
||||||
this.getData();
|
this.getData();
|
||||||
|
@ -290,7 +270,7 @@
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
//开发票
|
//开发票
|
||||||
invoicing(params){
|
invoicing(params) {
|
||||||
this.$Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: "确认开票",
|
title: "确认开票",
|
||||||
content: "您确认已经开具发票 ?",
|
content: "您确认已经开具发票 ?",
|
||||||
|
@ -303,18 +283,19 @@
|
||||||
this.$Modal.remove();
|
this.$Modal.remove();
|
||||||
this.getData();
|
this.getData();
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
// 建议引入通用样式 可删除下面样式代码
|
// 建议引入通用样式 可删除下面样式代码
|
||||||
@import "@/styles/table-common.scss";
|
@import "@/styles/table-common.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,29 +2,12 @@
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<Card>
|
<Card>
|
||||||
<Row>
|
<Row>
|
||||||
<Form
|
<Form ref="searchForm" :model="searchForm" inline :label-width="100" class="search-form">
|
||||||
ref="searchForm"
|
|
||||||
:model="searchForm"
|
|
||||||
inline
|
|
||||||
:label-width="100"
|
|
||||||
class="search-form"
|
|
||||||
>
|
|
||||||
<Form-item label="优惠券名称">
|
<Form-item label="优惠券名称">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.couponName" placeholder="请输入优惠券名称" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.couponName"
|
|
||||||
placeholder="请输入优惠券名称"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="活动状态" prop="promotionStatus">
|
<Form-item label="活动状态" prop="promotionStatus">
|
||||||
<Select
|
<Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px">
|
||||||
v-model="searchForm.promotionStatus"
|
|
||||||
placeholder="请选择"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<Option value="NEW">未开始</Option>
|
<Option value="NEW">未开始</Option>
|
||||||
<Option value="START">已开始/上架</Option>
|
<Option value="START">已开始/上架</Option>
|
||||||
<Option value="END">已结束/下架</Option>
|
<Option value="END">已结束/下架</Option>
|
||||||
|
@ -32,21 +15,9 @@
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="活动时间">
|
<Form-item label="活动时间">
|
||||||
<DatePicker
|
<DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px"></DatePicker>
|
||||||
v-model="selectDate"
|
|
||||||
type="daterange"
|
|
||||||
clearable
|
|
||||||
placeholder="选择起始时间"
|
|
||||||
style="width: 200px"
|
|
||||||
></DatePicker>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Button
|
<Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button>
|
||||||
@click="handleSearch"
|
|
||||||
type="primary"
|
|
||||||
class="search-btn"
|
|
||||||
icon="ios-search"
|
|
||||||
>搜索</Button
|
|
||||||
>
|
|
||||||
<Button @click="handleReset" class="search-btn">重置</Button>
|
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -55,57 +26,22 @@
|
||||||
<Button @click="delAll" class="ml_10">批量下架</Button>
|
<Button @click="delAll" class="ml_10">批量下架</Button>
|
||||||
<!-- <Button @click="upAll">批量上架</Button> -->
|
<!-- <Button @click="upAll">批量上架</Button> -->
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||||
:loading="loading"
|
|
||||||
border
|
|
||||||
:columns="columns"
|
|
||||||
:data="data"
|
|
||||||
ref="table"
|
|
||||||
sortable="custom"
|
|
||||||
@on-sort-change="changeSort"
|
|
||||||
@on-selection-change="changeSelect"
|
|
||||||
>
|
|
||||||
<template slot-scope="{ row }" slot="action">
|
<template slot-scope="{ row }" slot="action">
|
||||||
<Button
|
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="info" size="small" style="margin-right: 10px" @click="edit(row)">编辑</Button>
|
||||||
v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'"
|
<Button v-if="row.promotionStatus !== 'CLOSE'" type="error" size="small" @click="remove(row)">下架</Button>
|
||||||
type="info"
|
|
||||||
size="small"
|
|
||||||
style="margin-right: 10px"
|
|
||||||
@click="edit(row)"
|
|
||||||
>编辑</Button
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
v-if="row.promotionStatus !== 'CLOSE'"
|
|
||||||
type="error"
|
|
||||||
size="small"
|
|
||||||
@click="remove(row)"
|
|
||||||
>下架</Button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
<Page
|
<Page :current="searchForm.pageNumber + 1" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||||
:current="searchForm.pageNumber + 1"
|
size="small" show-total show-elevator show-sizer></Page>
|
||||||
:total="total"
|
|
||||||
:page-size="searchForm.pageSize"
|
|
||||||
@on-change="changePage"
|
|
||||||
@on-page-size-change="changePageSize"
|
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-elevator
|
|
||||||
show-sizer
|
|
||||||
></Page>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { getShopCouponList, updateCouponStatus } from "@/api/promotion";
|
||||||
getShopCouponList,
|
|
||||||
updateCouponStatus,
|
|
||||||
} from "@/api/promotion";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "coupon",
|
name: "coupon",
|
||||||
|
@ -143,18 +79,19 @@ export default {
|
||||||
{
|
{
|
||||||
title: "活动名称",
|
title: "活动名称",
|
||||||
key: "promotionName",
|
key: "promotionName",
|
||||||
width: 120,
|
minWidth: 100,
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "优惠券名称",
|
title: "优惠券名称",
|
||||||
key: "couponName",
|
key: "couponName",
|
||||||
width: 120,
|
minWidth: 100,
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
title: "面额/折扣",
|
title: "面额/折扣",
|
||||||
key: "price",
|
key: "price",
|
||||||
width: 120,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.price) {
|
if (params.row.price) {
|
||||||
return h(
|
return h(
|
||||||
|
@ -170,11 +107,13 @@ export default {
|
||||||
{
|
{
|
||||||
title: "领取数量/总数量",
|
title: "领取数量/总数量",
|
||||||
key: "publishNum",
|
key: "publishNum",
|
||||||
|
width: 130,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h(
|
return h(
|
||||||
"div", params.row.receivedNum + "/" + params.row.publishNum)
|
"div",
|
||||||
|
params.row.receivedNum + "/" + params.row.publishNum
|
||||||
|
);
|
||||||
},
|
},
|
||||||
minWidth:130,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "优惠券类型",
|
title: "优惠券类型",
|
||||||
|
@ -210,21 +149,28 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "活动时间",
|
title: "活动时间",
|
||||||
|
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
|
if (params.row.getType === "ACTIVITY") {
|
||||||
|
return h("div", "长期有效");
|
||||||
|
} else {
|
||||||
return h("div", {
|
return h("div", {
|
||||||
domProps:
|
domProps: {
|
||||||
{innerHTML: params.row.startTime + "<br/>" + params.row.endTime}
|
innerHTML:
|
||||||
});
|
params.row.startTime + "<br/>" + params.row.endTime,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
minWidth:150,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
|
width: 100,
|
||||||
key: "promotionStatus",
|
key: "promotionStatus",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
let text = "未知",
|
let text = "未知",
|
||||||
color = "";
|
color = "red";
|
||||||
if (params.row.promotionStatus == "NEW") {
|
if (params.row.promotionStatus == "NEW") {
|
||||||
text = "未开始";
|
text = "未开始";
|
||||||
color = "default";
|
color = "default";
|
||||||
|
@ -250,14 +196,14 @@ export default {
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
minWidth:70,
|
minWidth: 70,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
slot: "action",
|
slot: "action",
|
||||||
align: "center",
|
align: "center",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
minWidth: 140
|
maxWidth: 140,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
data: [], // 表单数据
|
data: [], // 表单数据
|
||||||
|
@ -292,8 +238,8 @@ export default {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchForm = {}
|
this.searchForm = {};
|
||||||
this.selectDate = ''
|
this.selectDate = "";
|
||||||
this.searchForm.pageNumber = 0;
|
this.searchForm.pageNumber = 0;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
@ -423,7 +369,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
activated () {
|
activated() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,22 +6,10 @@
|
||||||
<h4>基本信息</h4>
|
<h4>基本信息</h4>
|
||||||
<div class="form-item-view">
|
<div class="form-item-view">
|
||||||
<FormItem label="活动名称" prop="promotionName">
|
<FormItem label="活动名称" prop="promotionName">
|
||||||
<Input
|
<Input type="text" v-model="form.promotionName" placeholder="活动名称" clearable style="width: 260px" />
|
||||||
type="text"
|
|
||||||
v-model="form.promotionName"
|
|
||||||
placeholder="活动名称"
|
|
||||||
clearable
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="优惠券名称" prop="couponName">
|
<FormItem label="优惠券名称" prop="couponName">
|
||||||
<Input
|
<Input type="text" v-model="form.couponName" placeholder="优惠券名称" clearable style="width: 260px" />
|
||||||
type="text"
|
|
||||||
v-model="form.couponName"
|
|
||||||
placeholder="优惠券名称"
|
|
||||||
clearable
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="优惠券类型" prop="couponType">
|
<FormItem label="优惠券类型" prop="couponType">
|
||||||
<Select v-model="form.couponType" style="width: 260px">
|
<Select v-model="form.couponType" style="width: 260px">
|
||||||
|
@ -29,32 +17,12 @@
|
||||||
<Option value="PRICE">减免现金</Option>
|
<Option value="PRICE">减免现金</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem label="折扣" prop="discount" v-if="form.couponType == 'DISCOUNT'">
|
||||||
label="折扣"
|
<Input type="number" v-model="form.couponDiscount" placeholder="折扣" clearable style="width: 260px" />
|
||||||
prop="discount"
|
|
||||||
v-if="form.couponType == 'DISCOUNT'"
|
|
||||||
>
|
|
||||||
<Input
|
|
||||||
type="number"
|
|
||||||
v-model="form.couponDiscount"
|
|
||||||
placeholder="折扣"
|
|
||||||
clearable
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
<span class="describe">请输入0-10之间数字,可以输入一位小数</span>
|
<span class="describe">请输入0-10之间数字,可以输入一位小数</span>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem label="面额" prop="price" v-if="form.couponType == 'PRICE'">
|
||||||
label="面额"
|
<Input type="text" v-model="form.price" placeholder="面额" clearable style="width: 260px" />
|
||||||
prop="price"
|
|
||||||
v-if="form.couponType == 'PRICE'"
|
|
||||||
>
|
|
||||||
<Input
|
|
||||||
type="text"
|
|
||||||
v-model="form.price"
|
|
||||||
placeholder="面额"
|
|
||||||
clearable
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="活动类型" prop="getType">
|
<FormItem label="活动类型" prop="getType">
|
||||||
<Select v-model="form.getType" style="width: 260px">
|
<Select v-model="form.getType" style="width: 260px">
|
||||||
|
@ -63,42 +31,22 @@
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="发放数量" prop="publishNum">
|
<FormItem label="发放数量" v-if="form.getType == 'FREE'" prop="publishNum">
|
||||||
<Input
|
<Input v-model="form.publishNum" placeholder="发放数量" style="width: 260px" />
|
||||||
v-model="form.publishNum"
|
<div class="tips">如果发放数量为0时,则代表不限制发放数量</div>
|
||||||
placeholder="发放数量"
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<h4>使用限制</h4>
|
<h4>使用限制</h4>
|
||||||
<div class="form-item-view">
|
<div class="form-item-view">
|
||||||
<FormItem label="消费门槛" prop="consumeThreshold">
|
<FormItem label="消费门槛" prop="consumeThreshold">
|
||||||
<Input
|
<Input type="text" v-model="form.consumeThreshold" placeholder="消费门槛" clearable style="width: 260px" />
|
||||||
type="text"
|
|
||||||
v-model="form.consumeThreshold"
|
|
||||||
placeholder="消费门槛"
|
|
||||||
clearable
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="领取限制" prop="couponLimitNum">
|
<FormItem label="领取限制" v-if="form.getType == 'FREE'" prop="couponLimitNum">
|
||||||
<Input
|
<Input v-model="form.couponLimitNum" placeholder="领取限制" clearable style="width: 260px" />
|
||||||
v-model="form.couponLimitNum"
|
<div class="tips">如果领取限制为0时,则代表不限制领取数量</div>
|
||||||
placeholder="领取限制"
|
|
||||||
clearable
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="有效期" prop="rangeTime">
|
<FormItem label="有效期" prop="rangeTime">
|
||||||
<DatePicker
|
<DatePicker type="datetimerange" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择" :options="options" style="width: 260px">
|
||||||
type="datetimerange"
|
|
||||||
v-model="form.rangeTime"
|
|
||||||
format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
placeholder="请选择"
|
|
||||||
:options="options"
|
|
||||||
style="width: 260px"
|
|
||||||
>
|
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="使用范围" prop="scopeType">
|
<FormItem label="使用范围" prop="scopeType">
|
||||||
|
@ -109,34 +57,14 @@
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem
|
<FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'">
|
||||||
style="width: 100%"
|
|
||||||
v-if="form.scopeType == 'PORTION_GOODS'"
|
|
||||||
>
|
|
||||||
<div style="display: flex; margin-bottom: 10px">
|
<div style="display: flex; margin-bottom: 10px">
|
||||||
<Button type="primary" @click="openSkuList"
|
<Button type="primary" @click="openSkuList">选择商品</Button>
|
||||||
>选择商品</Button>
|
<Button type="error" ghost style="margin-left: 10px" @click="delSelectGoods">批量删除</Button>
|
||||||
<Button
|
|
||||||
type="error"
|
|
||||||
ghost
|
|
||||||
style="margin-left: 10px"
|
|
||||||
@click="delSelectGoods"
|
|
||||||
>批量删除</Button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<Table
|
<Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect">
|
||||||
border
|
|
||||||
:columns="columns"
|
|
||||||
:data="form.promotionGoodsList"
|
|
||||||
@on-selection-change="changeSelect"
|
|
||||||
>
|
|
||||||
<template slot-scope="{ row }" slot="QRCode">
|
<template slot-scope="{ row }" slot="QRCode">
|
||||||
<img
|
<img :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px" alt="" />
|
||||||
:src="row.QRCode || '../../../assets/lili.png'"
|
|
||||||
width="50px"
|
|
||||||
height="50px"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
@ -147,35 +75,17 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="范围描述" prop="description">
|
<FormItem label="范围描述" prop="description">
|
||||||
<Input
|
<Input v-model="form.description" type="textarea" :rows="4" maxlength="50" show-word-limit clearable style="width: 260px" />
|
||||||
v-model="form.description"
|
|
||||||
type="textarea"
|
|
||||||
:rows="4"
|
|
||||||
maxlength="50"
|
|
||||||
show-word-limit
|
|
||||||
clearable
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<div>
|
<div>
|
||||||
<Button type="text" @click="$router.push({ name: 'coupon' })"
|
<Button type="text" @click="$router.push({ name: 'coupon' })">返回</Button>
|
||||||
>返回</Button
|
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
||||||
>
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
:loading="submitLoading"
|
|
||||||
@click="handleSubmit"
|
|
||||||
>提交</Button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</Card>
|
</Card>
|
||||||
<sku-select
|
<sku-select ref="skuSelect" @selectedGoodsData="selectedGoodsData"></sku-select>
|
||||||
ref="skuSelect"
|
|
||||||
@selectedGoodsData="selectedGoodsData"
|
|
||||||
></sku-select>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -232,6 +142,7 @@ export default {
|
||||||
getType: "FREE",
|
getType: "FREE",
|
||||||
promotionGoodsList: [],
|
promotionGoodsList: [],
|
||||||
scopeIdGoods: [],
|
scopeIdGoods: [],
|
||||||
|
rangeDayType: "FIXEDTIME",
|
||||||
},
|
},
|
||||||
id: this.$route.query.id,
|
id: this.$route.query.id,
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
|
@ -392,7 +303,11 @@ export default {
|
||||||
params.endTime = this.$options.filters.unixToDate(
|
params.endTime = this.$options.filters.unixToDate(
|
||||||
this.form.rangeTime[1] / 1000
|
this.form.rangeTime[1] / 1000
|
||||||
);
|
);
|
||||||
delete params.rangeTime
|
if (params.getType == "ACTIVITY") {
|
||||||
|
params.couponLimitNum = 0;
|
||||||
|
params.publishNum = 0;
|
||||||
|
}
|
||||||
|
delete params.rangeTime;
|
||||||
let scopeId = [];
|
let scopeId = [];
|
||||||
if (
|
if (
|
||||||
params.scopeType == "PORTION_GOODS" &&
|
params.scopeType == "PORTION_GOODS" &&
|
||||||
|
@ -465,12 +380,13 @@ export default {
|
||||||
name: "coupon",
|
name: "coupon",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
openSkuList() { // 显示商品选择器
|
openSkuList() {
|
||||||
|
// 显示商品选择器
|
||||||
this.$refs.skuSelect.open("goods");
|
this.$refs.skuSelect.open("goods");
|
||||||
let data = JSON.parse(JSON.stringify(this.form.promotionGoodsList))
|
let data = JSON.parse(JSON.stringify(this.form.promotionGoodsList));
|
||||||
data.forEach(e => {
|
data.forEach((e) => {
|
||||||
e.id = e.skuId
|
e.id = e.skuId;
|
||||||
})
|
});
|
||||||
this.$refs.skuSelect.goodsData = data;
|
this.$refs.skuSelect.goodsData = data;
|
||||||
},
|
},
|
||||||
changeSelect(e) {
|
changeSelect(e) {
|
||||||
|
@ -598,11 +514,15 @@ h4 {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
.ivu-form-item{
|
.ivu-form-item {
|
||||||
margin-bottom: 24px !important;
|
margin-bottom: 24px !important;
|
||||||
}
|
}
|
||||||
.wrapper{
|
.wrapper {
|
||||||
min-height: 1000px;
|
min-height: 1000px;
|
||||||
}
|
}
|
||||||
|
.tips {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -113,9 +113,11 @@
|
||||||
>
|
>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
:disabled="form.promotionStatus != 'NEW'"
|
:disabled="form.promotionStatus != 'NEW'"
|
||||||
|
v-if="JSON.parse(getStore('userInfo')).selfOperated"
|
||||||
v-model="form.isPoint"
|
v-model="form.isPoint"
|
||||||
>送积分</Checkbox
|
>送积分</Checkbox
|
||||||
>
|
>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="form.isCoupon" label="赠送优惠券" prop="couponId">
|
<FormItem v-if="form.isCoupon" label="赠送优惠券" prop="couponId">
|
||||||
<Select
|
<Select
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="商品" v-if="$route.query.id">
|
<FormItem label="商品" v-if="$route.query.id">
|
||||||
<Button type="primary" :disabled="liveStatus!='NEW'" ghost @click="liveGoodsVisible=true" icon="md-add">添加商品</Button>
|
<Button type="primary" ghost @click="liveGoodsVisible=true" :disabled="liveStatus!='NEW'" icon="md-add">添加商品</Button>
|
||||||
<Table class="goods-table" :columns="liveColumns" :data="liveData">
|
<Table class="goods-table" :columns="liveColumns" :data="liveData">
|
||||||
<template slot-scope="{ row,index }" slot="goodsName">
|
<template slot-scope="{ row,index }" slot="goodsName">
|
||||||
<div class="flex-goods">
|
<div class="flex-goods">
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<Button type="primary" @click="createLives()">保存</Button>
|
<Button type="primary" v-if="liveStatus=='NEW'" @click="createLives()">保存</Button>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -140,8 +140,8 @@
|
||||||
<img :src="imageSrc" v-if="imageVisible" style="width: 100%">
|
<img :src="imageSrc" v-if="imageVisible" style="width: 100%">
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<Modal width="800" v-model="liveGoodsVisible" @on-ok="addGoods">
|
<Modal width="800" v-model="liveGoodsVisible" footer-hide>
|
||||||
<liveGoods :init="liveData" @selectedGoods="callBackData" reviewed />
|
<liveGoods @selectedGoods="callBackData" reviewed />
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -172,6 +172,7 @@ export default {
|
||||||
// 不能选择今天以前的时间
|
// 不能选择今天以前的时间
|
||||||
optionsTime: {
|
optionsTime: {
|
||||||
disabledDate(date) {
|
disabledDate(date) {
|
||||||
|
// console.log(data)
|
||||||
return date && date.valueOf() < Date.now() - 86400000;
|
return date && date.valueOf() < Date.now() - 86400000;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -191,7 +192,7 @@ export default {
|
||||||
startTime: [
|
startTime: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入开始时间以及结束时间",
|
message: "请正确输入开始时间以及结束时间",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
feedsImg: [
|
feedsImg: [
|
||||||
|
@ -258,10 +259,14 @@ export default {
|
||||||
* 删除直播间商品
|
* 删除直播间商品
|
||||||
*/
|
*/
|
||||||
async deleteGoods(val, index) {
|
async deleteGoods(val, index) {
|
||||||
|
this.$Spin.show();
|
||||||
let res = await delRoomLiveGoods(this.liveForm.roomId, val.liveGoodsId);
|
let res = await delRoomLiveGoods(this.liveForm.roomId, val.liveGoodsId);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("删除成功!");
|
this.$Message.success("删除成功!");
|
||||||
this.liveData.splice(index, 1);
|
this.liveData.splice(index, 1);
|
||||||
|
this.$Spin.hide();
|
||||||
|
} else {
|
||||||
|
this.$Spin.hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -324,23 +329,21 @@ export default {
|
||||||
* 回调的商品选择数据
|
* 回调的商品选择数据
|
||||||
*/
|
*/
|
||||||
callBackData(way) {
|
callBackData(way) {
|
||||||
this.$set(this, "liveData", way);
|
console.log(way);
|
||||||
},
|
this.liveGoodsVisible = false;
|
||||||
|
this.$Spin.show();
|
||||||
/**
|
|
||||||
* dialog点击确定时判断
|
|
||||||
*/
|
|
||||||
addGoods() {
|
|
||||||
this.liveData.forEach((item) => {
|
|
||||||
this.commodityList.forEach((oldVal) => {
|
|
||||||
if (oldVal.liveGoodsId != item.liveGoodsId) {
|
|
||||||
addLiveGoods({
|
addLiveGoods({
|
||||||
roomId: this.$route.query.roomId,
|
roomId: this.$route.query.roomId,
|
||||||
liveGoodsId: item.liveGoodsId,
|
liveGoodsId: way.liveGoodsId,
|
||||||
});
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.liveData.push(way);
|
||||||
|
this.$Spin.hide();
|
||||||
|
console.log(this.liveData);
|
||||||
|
} else {
|
||||||
|
this.$Spin.hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -389,11 +392,55 @@ export default {
|
||||||
this.liveForm.coverImg = res.result;
|
this.liveForm.coverImg = res.result;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
tipsDateError() {
|
||||||
|
this.$Message.error({
|
||||||
|
content:
|
||||||
|
"直播开播时间需要在当前时间的10分钟后并且,开始时间不能在6个月后,直播计划结束时间(开播时间和结束时间间隔不得短于30分钟,不得超过24小时)",
|
||||||
|
duration: 5,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选择时间后的回调
|
* 选择时间后的回调
|
||||||
*/
|
*/
|
||||||
handleChangeTime(daterange) {
|
handleChangeTime(daterange) {
|
||||||
this.times = daterange;
|
/**
|
||||||
|
* 直播开播时间需要在当前时间的10分钟后
|
||||||
|
* 此处设置默认为15分钟方便调整
|
||||||
|
*/
|
||||||
|
let siteTime = new Date().getTime() / 1000;
|
||||||
|
let selectTime = new Date(daterange[0]).getTime() / 1000;
|
||||||
|
let currentTime = this.$options.filters.unixToDate(siteTime);
|
||||||
|
/**
|
||||||
|
* 开播时间和结束时间间隔不得短于30分钟,不得超过24小时
|
||||||
|
* 判断用户设置的结束时间
|
||||||
|
*/
|
||||||
|
let endTime = new Date(daterange[1]).getTime() / 1000;
|
||||||
|
if (selectTime <= siteTime + 15 * 60) {
|
||||||
|
this.tipsDateError();
|
||||||
|
return false;
|
||||||
|
} else if (selectTime + 30 * 60 >= endTime) {
|
||||||
|
// 不能小于30分钟
|
||||||
|
|
||||||
|
this.tipsDateError();
|
||||||
|
return false;
|
||||||
|
} else if (selectTime + 24 * 60 * 60 <= endTime) {
|
||||||
|
// 不能超过24小时
|
||||||
|
|
||||||
|
this.tipsDateError();
|
||||||
|
return false;
|
||||||
|
} else if (
|
||||||
|
// 不能超过6个月
|
||||||
|
siteTime >=
|
||||||
|
new Date().getTime() + 6 * 31 * 24 * 3600 * 1000 + 86400000
|
||||||
|
) {
|
||||||
|
this.tipsDateError();
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
this.$set(this.times, [0], currentTime);
|
||||||
|
this.times[1] = daterange[1];
|
||||||
|
|
||||||
|
// this.times = daterange;
|
||||||
this.$set(
|
this.$set(
|
||||||
this.liveForm,
|
this.liveForm,
|
||||||
"startTime",
|
"startTime",
|
||||||
|
@ -404,6 +451,7 @@ export default {
|
||||||
"endTime",
|
"endTime",
|
||||||
new Date(daterange[1]).getTime() / 1000
|
new Date(daterange[1]).getTime() / 1000
|
||||||
);
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -448,13 +496,15 @@ export default {
|
||||||
// 需判断当前是否是添加商品
|
// 需判断当前是否是添加商品
|
||||||
if (this.$route.query.id && this.liveData.length != 0) {
|
if (this.$route.query.id && this.liveData.length != 0) {
|
||||||
this.spinShow = true;
|
this.spinShow = true;
|
||||||
this.liveForm.commodityList = JSON.stringify(this.liveForm.commodityList);
|
this.liveForm.commodityList = JSON.stringify(
|
||||||
|
this.liveForm.commodityList
|
||||||
|
);
|
||||||
// 将当前直播间修改
|
// 将当前直播间修改
|
||||||
editLive(this.liveForm).then((res) => {
|
editLive(this.liveForm).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("修改成功!");
|
this.$Message.success("修改成功!");
|
||||||
|
|
||||||
this.$router.push({ path: "/storePromotion/live" });
|
this.$router.push({ path: "/promotion/live" });
|
||||||
}
|
}
|
||||||
this.spinShow = false;
|
this.spinShow = false;
|
||||||
});
|
});
|
||||||
|
@ -465,7 +515,7 @@ export default {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("添加成功!");
|
this.$Message.success("添加成功!");
|
||||||
|
|
||||||
this.$router.push({ path: "/storePromotion/live" });
|
this.$router.push({ path: "/promotion/live" });
|
||||||
}
|
}
|
||||||
this.spinShow = false;
|
this.spinShow = false;
|
||||||
});
|
});
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue