Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui

This commit is contained in:
Chopper
2021-05-17 17:42:56 +08:00
58 changed files with 161 additions and 133 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -124,7 +124,7 @@ function getTokenDebounce() {
lock = true
let oldRefreshToken = getStore("refreshToken");
handleRefreshToken(oldRefreshToken).then(res => {
if (res.code === 200) {
if (res.success) {
let {
accessToken,
refreshToken

View File

@@ -14,7 +14,9 @@ $theme_color: #804ed1;
border-radius: 1em;
background-color: rgba(50,50,50,.1);
}
.ivu-table table {
width: 100%!important;
}
.flex{
display: flex !important;

View File

@@ -28,7 +28,7 @@
:key="index"
>
<span>{{ item.name }}</span>
<span></span>
<span>&gt;</span>
</li>
</ul>
<ul v-if="categoryListLevel2 && categoryListLevel2.length > 0">
@@ -39,7 +39,7 @@
:key="index"
>
<span>{{ item.name }}</span>
<span></span>
<span>&gt;</span>
</li>
</ul>
<ul v-if="categoryListLevel3 && categoryListLevel3.length > 0">
@@ -701,6 +701,34 @@ export default {
this.activestep = 1;
this.isOperationGoods = false;
this.GET_GoodData();
} else if (to.query.id) {
this.activestep = 1;
this.goodsId = this.$route.query.id;
this.GET_GoodData();
} else {
this.baseInfoForm = {
salesModel: "RETAIL",
goodsParamsList: [],
freightPayer: "BUYER",
weight: "",
goodsGalleryFiles: [],
release: "true",
recommend: "true",
storeCategoryPath: "",
brandId: 0,
goodsUnit: "",
categoryPath: "",
sellingPoint: "",
intro: "",
mobileIntro: "",
updateSku: true,
regeneratorSkuFlag: false,
templateId: 0,
};
this.activestep = 0;
this.isPublish = true;
this.GET_GoodsTemplate();
this.GET_NextLevelCategory();
}
}
},
@@ -985,7 +1013,25 @@ export default {
}
//新增商品
else {
this.baseInfoForm = {};
this.baseInfoForm = {
salesModel: "RETAIL",
goodsParamsList: [],
freightPayer: "BUYER",
weight: "",
goodsGalleryFiles: [],
release: "true",
recommend: "true",
storeCategoryPath: "",
brandId: 0,
goodsUnit: "",
categoryPath: "",
sellingPoint: "",
intro: "",
mobileIntro: "",
updateSku: true,
regeneratorSkuFlag: false,
templateId: 0,
};
this.activestep = 0;
this.isPublish = true;
this.GET_GoodsTemplate();
@@ -1088,6 +1134,7 @@ export default {
});
},
handleBeforeUploadGoodsPicture() {
console.log(this.baseInfoForm);
const check = this.baseInfoForm.goodsGalleryFiles.length < 5;
if (!check) {
this.$Notice.warning({
@@ -1198,6 +1245,7 @@ export default {
...this.baseInfoForm,
...response.result,
};
console.warn(this.baseInfoForm);
if (this.baseInfoForm.freightPayer != "BUYER") {
API_Shop.getShipTemplate().then((res) => {
if (res.success) {
@@ -1702,6 +1750,7 @@ export default {
this.GET_GoodData();
return;
}
console.log(this.baseInfoForm);
this.GET_GoodsParams();
/** 1级校验 */
this.loading = true;

View File

@@ -258,7 +258,7 @@
top: 100px;
right: 0;
bottom: 0;
height: calc(100% + 52px);
height: calc(100% + 200px);
width: calc(100% - 240px);
background-color: #f0f0f0;

View File

@@ -58,7 +58,7 @@ methods: {
townName: this.addrContent.regeocode.addressComponent.township
}
getRegion(params).then(res=>{
if(res.code == 200) {
if(res.success) {
this.addrContent.addr = res.result.name.replace(/,/g," ")
this.addrContent.addrId = res.result.id
this.loading = false

View File

@@ -19,11 +19,14 @@
<Row class="operation">
<Table :loading="loading" border :columns="goodsColumns" :data="goodsData" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
<template slot-scope="{ row, index }" slot="price">
<Input v-model="row.price" @input="goodsData[index].price = row.price" />
<Input v-model="row.price" :disabled="status==='view'" @input="goodsData[index].price = row.price" />
</template>
<template slot-scope="{ row }" slot="QRCode">
<img :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px" alt="" />
</template>
<template slot-scope="{ index }" slot="action">
<Button type="error" size="small" ghost v-if="status === 'manager'" @click="delGoods(index)">删除</Button>
</template>
</Table>
</Row>
<Row type="flex" justify="end" class="page operation">
@@ -138,27 +141,9 @@ export default {
{
title: "操作",
key: "action",
slot: "action",
minWidth: 50,
align: "center",
render: (h, params) => {
return h(
"Button",
{
props: {
size: "small",
type: "error",
ghost: true,
},
on: {
click: () => {
this.delGoods(params.index);
},
},
},
"删除"
);
},
},
],
goodsData: [], // 商品列表
@@ -327,9 +312,9 @@ export default {
margin: 20px 0;
font-size: 15px;
&::before{
content: '';
border: 1px solid $theme_color;
height: 10px;
content: '|';
color: $theme_color;
display: inline-block;
font-weight: bold;
font-size: 16px;
margin-right: 5px;

View File

@@ -64,14 +64,19 @@
</template>
<template slot-scope="{ row }" slot="action">
<Button
v-if="
row.promotionStatus === 'NEW'
"
v-if="row.promotionStatus === 'NEW'"
type="primary"
size="small"
@click="manage(row)"
>管理</Button
>
<Button
v-else
type="info"
size="small"
@click="manage(row)"
>查看</Button
>
</template>
</Table>
</Row>

View File

@@ -16,7 +16,7 @@
<Button @click="delAll">批量删除</Button>
</template>
</Row>
<Row v-show="openTip">
<Row v-show="openTip" v-if="promotionStatus == 'NEW'">
<Alert show-icon>
已选择 <span class="select-count">{{ selectCount }}</span>
</Alert>
@@ -101,8 +101,7 @@
<template slot-scope="{ row, index }" slot="action">
<Button
type="error"
v-if="row.promotionApplyStatus !== 'PASS'"
:disabled="promotionStatus != 'NEW'"
v-if="promotionStatus === 'NEW'"
size="small"
ghost
@click="delGoods(index, row.id)"
@@ -119,7 +118,7 @@
<Button
type="primary"
:loading="submitLoading"
:disabled="promotionStatus != 'NEW'"
v-if="promotionStatus === 'NEW'"
@click="save"
>提交</Button
>

View File

@@ -478,7 +478,7 @@ export default {
onOk: () => {
API_Shop.reconciliation(this.id).then((res) => {
this.$Modal.remove();
if (res.code == 200) {
if (res.success) {
this.$Message.success("账单核对成功");
this.init();
}

View File

@@ -165,7 +165,7 @@
onOk: () => {
API_Shop.logisticsChecked(v.id).then((res) => {
this.$Modal.remove();
if (res.code == 200) {
if (res.success) {
this.$Message.success("物流公司开启成功");
this.init();
}
@@ -183,7 +183,7 @@
onOk: () => {
API_Shop.logisticsUnChecked(v.selected).then((res) => {
this.$Modal.remove();
if (res.code == 200) {
if (res.success) {
this.$Message.success("物流公司关闭成功");
this.init();
}

View File

@@ -320,7 +320,7 @@
onOk: () => {
API_Shop.deleteShopAddress(v.id).then((res) => {
this.$Modal.remove();
if (res.code == 200) {
if (res.success) {
this.$Message.success("此自自提地址已删除");
this.init();
}