Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui
commit
ee5759c86a
|
@ -126,7 +126,7 @@
|
|||
<Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="addShoppingCartBtn">加入购物车</Button>
|
||||
<Button type="warning" :loading="loading1" :disabled="skuDetail.quantity === 0" @click="buyNow">立即购买</Button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -199,13 +199,18 @@ export default {
|
|||
skuId: this.skuDetail.id
|
||||
};
|
||||
this.loading = true;
|
||||
console.log(11111111);
|
||||
addCartGoods(params).then(res => {
|
||||
debugger;
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
console.log('catch');
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
buyNow () { // 立即购买
|
||||
|
@ -222,6 +227,8 @@ export default {
|
|||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading1 = false;
|
||||
});
|
||||
},
|
||||
pointPay () { // 积分购买
|
||||
|
@ -339,7 +346,7 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
this.formatSku(this.goodsSpecList);
|
||||
this.promotion()
|
||||
document.title = this.skuDetail.goodsName
|
||||
|
|
|
@ -11,42 +11,37 @@
|
|||
</div> -->
|
||||
<!-- 普通发票 -->
|
||||
<div class="nav-content">
|
||||
<Form
|
||||
:model="invoiceForm"
|
||||
ref="form"
|
||||
label-position="left"
|
||||
:rules="ruleInline"
|
||||
:label-width="110"
|
||||
>
|
||||
<Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
|
||||
<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="2">单位</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="发票抬头"
|
||||
v-if="invoiceForm.type == 2"
|
||||
prop="receiptTitle"
|
||||
>
|
||||
<FormItem label="个人名称" v-if="type === 1" prop="receiptTitle">
|
||||
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="纳税人识别号"
|
||||
v-if="invoiceForm.type == 2"
|
||||
prop="taxpayerId"
|
||||
>
|
||||
<FormItem label="单位名称" v-if="type === 2" prop="receiptTitle">
|
||||
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
||||
</FormItem>
|
||||
<FormItem label="纳税人识别号" v-if="type === 2" prop="taxpayerId">
|
||||
<i-input v-model="invoiceForm.taxpayerId"></i-input>
|
||||
</FormItem>
|
||||
<FormItem label="发票内容">
|
||||
<RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
|
||||
<Radio label="不开发票">不开发票</Radio>
|
||||
<Radio label="商品明细">商品明细</Radio>
|
||||
<Radio label="商品类别">商品类别</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,23 +49,24 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { saveReceipt } from '@/api/member.js';
|
||||
import { receiptSelect } from '@/api/cart.js';
|
||||
import { TINumber } from '@/plugins/RegExp.js';
|
||||
export default {
|
||||
name: 'invoiceModal',
|
||||
data () {
|
||||
return {
|
||||
invoice: 1,
|
||||
invoiceAvailable: false, // 模态框显隐
|
||||
loading: false, // 提交状态
|
||||
invoiceForm: { // 发票表单
|
||||
invoiceForm: {
|
||||
// 发票表单
|
||||
// 普票表单
|
||||
receiptTitle: '', // 发票抬头
|
||||
taxpayerId: '', // 纳税人识别号
|
||||
receiptContent: '不开发票', // 发票内容
|
||||
type: 1 // 1 个人 2 单位
|
||||
receiptContent: '商品明细', // 发票内容
|
||||
},
|
||||
ruleInline: { // 验证规则
|
||||
receiptTitle: [{ required: true, message: '请填写公司名称' }],
|
||||
type: 1, // 1 个人 2 单位
|
||||
ruleInline: {
|
||||
taxpayerId: [
|
||||
{ required: true, message: '请填写纳税人识别号' },
|
||||
{ pattern: TINumber, message: '请填写正确的纳税人识别号' }
|
||||
|
@ -78,73 +74,76 @@ export default {
|
|||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
save () { // 保存发票
|
||||
if (this.invoiceForm.type === 1) {
|
||||
// 个人
|
||||
let flag = true;
|
||||
this.receiptItems.forEach((e) => {
|
||||
if (
|
||||
e.receiptTitle === '个人' &&
|
||||
e.receiptContent === this.invoiceForm.receiptContent
|
||||
) {
|
||||
this.$emit('change', e);
|
||||
flag = false;
|
||||
this.invoiceAvailable = false;
|
||||
}
|
||||
});
|
||||
props: ['invoiceData'],
|
||||
watch: {
|
||||
invoiceData: {
|
||||
handler (val) {
|
||||
this.invoiceForm = { ...val };
|
||||
|
||||
if (flag) {
|
||||
let params = {
|
||||
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;
|
||||
});
|
||||
if (val.taxpayerId) {
|
||||
this.type = 2;
|
||||
} else {
|
||||
this.type = 1;
|
||||
}
|
||||
} else {
|
||||
// 单位
|
||||
},
|
||||
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) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
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 {
|
||||
saveReceipt(params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$emit('change', res.result);
|
||||
this.invoiceAvailable = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
if (!valid) {
|
||||
flage = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
delete this.invoiceForm.taxpayerId;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ export default {
|
|||
},
|
||||
created () {
|
||||
this.getGoodsDetail();
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
>人评价
|
||||
</div>
|
||||
<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>
|
||||
|
|
|
@ -108,7 +108,7 @@ export default {
|
|||
this.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -132,10 +132,10 @@ export default {
|
|||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
|
||||
.selected-cate{
|
||||
color: $theme_color;
|
||||
}
|
||||
|
||||
}
|
||||
.page-size {
|
||||
width: 1200px;
|
||||
|
|
|
@ -4,15 +4,23 @@
|
|||
<!-- LOGO 步骤条 -->
|
||||
<div class="width_1200 logo">
|
||||
<div>
|
||||
<router-link to="/"><img :src="logoImg" alt="lili shop" title="lilishop"></router-link>
|
||||
<router-link to="/"
|
||||
><img :src="logoImg" alt="lili shop" title="lilishop"
|
||||
/></router-link>
|
||||
<div>结算页</div>
|
||||
</div>
|
||||
<div class="cart-steps">
|
||||
<span :class="stepIndex==1?'active':''">1.我的购物车</span>
|
||||
<Icon :class="stepIndex==1?'active-arrow':''" custom="icomoon icon-next"></Icon>
|
||||
<span :class="stepIndex==1?'active':''">2.填写订单信息</span>
|
||||
<Icon :class="stepIndex==1?'active-arrow':''" custom="icomoon icon-next"></Icon>
|
||||
<span :class="stepIndex==2?'active':''">3.成功提交订单</span>
|
||||
<span :class="stepIndex == 1 ? 'active' : ''">1.我的购物车</span>
|
||||
<Icon
|
||||
:class="stepIndex == 1 ? 'active-arrow' : ''"
|
||||
custom="icomoon icon-next"
|
||||
></Icon>
|
||||
<span :class="stepIndex == 1 ? 'active' : ''">2.填写订单信息</span>
|
||||
<Icon
|
||||
:class="stepIndex == 1 ? 'active-arrow' : ''"
|
||||
custom="icomoon icon-next"
|
||||
></Icon>
|
||||
<span :class="stepIndex == 2 ? 'active' : ''">3.成功提交订单</span>
|
||||
</div>
|
||||
</div>
|
||||
<Divider />
|
||||
|
@ -24,18 +32,35 @@
|
|||
<span @click="goAddressManage">管理收货人地址</span>
|
||||
</div>
|
||||
<div class="address-manage">
|
||||
<div class="address-item" v-show="moreAddr ? true : index < 3" :class="selectedAddress.id === item.id?'border-red':''" @mouseenter="showEditBtn = index" @mouseleave="showEditBtn = ''"
|
||||
@click="selectAddress(item)" v-for="(item,index) in addressList" :key="index">
|
||||
<div
|
||||
class="address-item"
|
||||
v-show="moreAddr ? true : index < 3"
|
||||
:class="selectedAddress.id === item.id ? 'border-red' : ''"
|
||||
@mouseenter="showEditBtn = index"
|
||||
@mouseleave="showEditBtn = ''"
|
||||
@click="selectAddress(item)"
|
||||
v-for="(item, index) in addressList"
|
||||
:key="index"
|
||||
>
|
||||
<div>
|
||||
<span>{{item.name}}</span>
|
||||
<span>{{ item.name }}</span>
|
||||
<Tag class="ml_10" v-if="item.isDefault" color="red">默认</Tag>
|
||||
<Tag class="ml_10" v-if="item.alias" color="warning">{{item.alias}}</Tag>
|
||||
<Tag class="ml_10" v-if="item.alias" color="warning">{{
|
||||
item.alias
|
||||
}}</Tag>
|
||||
</div>
|
||||
<div>{{ item.mobile }}</div>
|
||||
<div>
|
||||
{{ item.consigneeAddressPath | unitAddress }} {{ item.detail }}
|
||||
</div>
|
||||
<div>{{item.mobile}}</div>
|
||||
<div>{{ item.consigneeAddressPath | unitAddress }} {{item.detail}}</div>
|
||||
<div class="edit-btn" v-show="showEditBtn === index">
|
||||
<span @click.stop="editAddress(item.id)">修改</span>
|
||||
<span class="ml_10" v-if="!item.isDefault" @click.stop="delAddress(item)">删除</span>
|
||||
<span
|
||||
class="ml_10"
|
||||
v-if="!item.isDefault"
|
||||
@click.stop="delAddress(item)"
|
||||
>删除</span
|
||||
>
|
||||
</div>
|
||||
<div class="corner-icon" v-show="selectedAddress.id === item.id">
|
||||
<div></div>
|
||||
|
@ -48,8 +73,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="more-addr" @click="moreAddr = !moreAddr" v-if="addressList.length>3">
|
||||
{{moreAddr ? '收起地址' : '更多地址'}}
|
||||
<div
|
||||
class="more-addr"
|
||||
@click="moreAddr = !moreAddr"
|
||||
v-if="addressList.length > 3"
|
||||
>
|
||||
{{ moreAddr ? "收起地址" : "更多地址" }}
|
||||
<Icon v-show="!moreAddr" type="md-arrow-dropdown" />
|
||||
<Icon v-show="moreAddr" type="md-arrow-dropup" />
|
||||
</div>
|
||||
|
@ -60,10 +89,17 @@
|
|||
<span>商品信息</span>
|
||||
<span @click="$router.push('/cart')">返回购物车</span>
|
||||
</div>
|
||||
<div class="goods-msg" v-for="(shop,shopIndex) in goodsList" :key="shopIndex">
|
||||
<div
|
||||
class="goods-msg"
|
||||
v-for="(shop, shopIndex) in goodsList"
|
||||
:key="shopIndex"
|
||||
>
|
||||
<div class="shop-name">
|
||||
<span>
|
||||
<span class="hover-color" @click="goShopPage(shop.storeId)">{{shop.storeName}}</span>
|
||||
<span class="hover-color" @click="goShopPage(shop.storeId)">{{
|
||||
shop.storeName
|
||||
}}</span
|
||||
>
|
||||
</span>
|
||||
<!-- <span>
|
||||
<p style="width:120px">配送方式:</p>
|
||||
|
@ -73,33 +109,60 @@
|
|||
</span> -->
|
||||
</div>
|
||||
<div class="goods-list">
|
||||
<div class="goods-item" v-for="(goods,goodsIndex) in shop.skuList" :key="goodsIndex">
|
||||
<span class="hover-color" @click="goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)">
|
||||
<img :src="goods.goodsSku.thumbnail" alt="">
|
||||
<span style="vertical-align:top;">{{goods.goodsSku.goodsName}}</span>
|
||||
<div
|
||||
class="goods-item"
|
||||
v-for="(goods, goodsIndex) in shop.skuList"
|
||||
:key="goodsIndex"
|
||||
>
|
||||
<span
|
||||
class="hover-color"
|
||||
@click="
|
||||
goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)
|
||||
"
|
||||
>
|
||||
<img :src="goods.goodsSku.thumbnail" alt="" />
|
||||
<span style="vertical-align: top">{{
|
||||
goods.goodsSku.goodsName
|
||||
}}</span>
|
||||
</span>
|
||||
<span class="goods-price">{{goods.goodsSku.price | unitPrice('¥')}}</span>
|
||||
<span>x{{goods.num}}</span>
|
||||
<span>{{goods.goodsSku.quantity > 0 ? '有货' : '无货'}}</span>
|
||||
<span class="goods-price">{{goods.goodsSku.price * goods.num | unitPrice('¥')}}</span>
|
||||
<span class="goods-price">{{
|
||||
goods.goodsSku.price | unitPrice("¥")
|
||||
}}</span>
|
||||
<span>x{{ goods.num }}</span>
|
||||
<span>{{ goods.goodsSku.quantity > 0 ? "有货" : "无货" }}</span>
|
||||
<span class="goods-price">{{
|
||||
(goods.goodsSku.price * goods.num) | unitPrice("¥")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-mark">
|
||||
<Input type="textarea" maxlength="60" v-model="shop.remark" show-word-limit placeholder="订单备注" />
|
||||
<span style="font-size:12px;color:#999;">提示:请勿填写有关支付、收货、发票方面的信息</span>
|
||||
<Input
|
||||
type="textarea"
|
||||
maxlength="60"
|
||||
v-model="shop.remark"
|
||||
show-word-limit
|
||||
placeholder="订单备注"
|
||||
/>
|
||||
<span style="font-size: 12px; color: #999"
|
||||
>提示:请勿填写有关支付、收货、发票方面的信息</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 发票信息 -->
|
||||
<div class="invoice">
|
||||
<div class="card-head mt_20 mb_20">
|
||||
<span class="relative">发票信息<span class="inv-tips">
|
||||
<Icon type="ios-alert-outline" />开企业抬头发票须填写纳税人识别号,以免影响报销
|
||||
</span></span>
|
||||
<span class="relative"
|
||||
>发票信息<span class="inv-tips">
|
||||
<Icon
|
||||
type="ios-alert-outline"
|
||||
/>开企业抬头发票须填写纳税人识别号,以免影响报销
|
||||
</span></span
|
||||
>
|
||||
</div>
|
||||
<div class="inovice-content">
|
||||
<span>{{invoiceData.receiptTitle}}</span>
|
||||
<span>{{invoiceData.receiptContent}}</span>
|
||||
<span>{{ invoiceData.receiptTitle }}</span>
|
||||
<span>{{ invoiceData.receiptContent }}</span>
|
||||
<span @click="editInvoice">编辑</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -108,24 +171,49 @@
|
|||
<div class="card-head mt_20 mb_20">
|
||||
<span class="relative">优惠券</span>
|
||||
</div>
|
||||
<div v-if="couponList.length === 0">
|
||||
无可用优惠券
|
||||
</div>
|
||||
<div v-if="couponList.length === 0">无可用优惠券</div>
|
||||
<ul v-else class="coupon-list">
|
||||
<li v-for="(item, index) in couponList" class="coupon-item" :key="index">
|
||||
<li
|
||||
v-for="(item, index) in couponList"
|
||||
class="coupon-item"
|
||||
:key="index"
|
||||
>
|
||||
<div class="c-left">
|
||||
<div>
|
||||
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span>折</span>
|
||||
<span class="describe">满{{item.consumeThreshold}}元可用</span>
|
||||
<span
|
||||
v-if="item.couponType === 'PRICE'"
|
||||
class="fontsize_12 global_color"
|
||||
>¥<span class="price">{{
|
||||
item.price | unitPrice
|
||||
}}</span></span
|
||||
>
|
||||
<span
|
||||
v-if="item.couponType === 'DISCOUNT'"
|
||||
class="fontsize_12 global_color"
|
||||
><span class="price">{{ item.couponDiscount }}</span
|
||||
>折</span
|
||||
>
|
||||
<span class="describe"
|
||||
>满{{ item.consumeThreshold }}元可用</span
|
||||
>
|
||||
</div>
|
||||
<p>使用范围:{{useScope(item.scopeType)}}</p>
|
||||
<p>有效期:{{item.endTime}}</p>
|
||||
<p>使用范围:{{ useScope(item.scopeType) }}</p>
|
||||
<p>有效期:{{ item.endTime }}</p>
|
||||
</div>
|
||||
<img class="used" v-if="usedCouponId.includes(item.id)" src="../../assets/images/geted.png" alt="">
|
||||
<img
|
||||
class="used"
|
||||
v-if="usedCouponId.includes(item.id)"
|
||||
src="../../assets/images/geted.png"
|
||||
alt=""
|
||||
/>
|
||||
<b></b>
|
||||
<a class="c-right" @click="useCoupon(item.id, true)">立即使用</a>
|
||||
<a class="c-right" v-if="usedCouponId.includes(item.id)" @click="useCoupon(item.id, false)">放弃优惠</a>
|
||||
<a
|
||||
class="c-right"
|
||||
v-if="usedCouponId.includes(item.id)"
|
||||
@click="useCoupon(item.id, false)"
|
||||
>放弃优惠</a
|
||||
>
|
||||
<i class="circle-top"></i>
|
||||
<i class="circle-bottom"></i>
|
||||
</li>
|
||||
|
@ -138,81 +226,116 @@
|
|||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<span>使用积分:</span><Input type="text" style="width:100px;" v-model.number="otherMsgForm.point" placeholder="请输入使用积分" /> <span style="color:#999;">您当前的可用积分为 {{otherMsgForm.totalPoint}}
|
||||
,本订单最多可以使用{{otherMsgForm.availablePoint}}</span>
|
||||
<span>使用积分:</span
|
||||
><Input
|
||||
type="text"
|
||||
style="width: 100px"
|
||||
v-model.number="otherMsgForm.point"
|
||||
placeholder="请输入使用积分"
|
||||
/>
|
||||
<span style="color: #999"
|
||||
>您当前的可用积分为
|
||||
{{ otherMsgForm.totalPoint }} ,本订单最多可以使用{{
|
||||
otherMsgForm.availablePoint
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 订单价格 -->
|
||||
<div class="order-price">
|
||||
<div>
|
||||
<span>{{totalNum}}件商品,总商品金额:</span><span>{{priceDetailDTO.goodsPrice | unitPrice('¥')}}</span>
|
||||
<span>{{ totalNum }}件商品,总商品金额:</span
|
||||
><span>{{ priceDetailDTO.goodsPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>运费:</span><span>{{ priceDetailDTO.freightPrice | unitPrice('¥')}}</span>
|
||||
<span>运费:</span
|
||||
><span>{{ priceDetailDTO.freightPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>优惠金额:</span><span>-{{ priceDetailDTO.discountPrice + priceDetailDTO.couponPrice + priceDetailDTO.updatePrice | unitPrice('¥')}}</span>
|
||||
<span>优惠金额:</span
|
||||
><span
|
||||
>-{{
|
||||
(priceDetailDTO.discountPrice +
|
||||
priceDetailDTO.couponPrice +
|
||||
priceDetailDTO.updatePrice)
|
||||
| unitPrice("¥")
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span>应付金额:</span><span class='actrual-price'>{{priceDetailDTO.billPrice | unitPrice('¥')}}</span>
|
||||
<span>应付金额:</span
|
||||
><span class="actrual-price">{{
|
||||
priceDetailDTO.billPrice | unitPrice("¥")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- 底部支付栏 -->
|
||||
<div class="order-footer width_1200">
|
||||
<div class="pay ml_20" @click="pay">提交订单</div>
|
||||
<div class="pay-address" v-if="addressList.length">配送至:{{ selectedAddress.consigneeAddressPath | unitAddress }}
|
||||
{{selectedAddress.detail}} 收货人:{{selectedAddress.name}} {{selectedAddress.mobile}}</div>
|
||||
<div class="pay-address" v-if="addressList.length">
|
||||
配送至:{{ selectedAddress.consigneeAddressPath | unitAddress }}
|
||||
{{ selectedAddress.detail }} 收货人:{{
|
||||
selectedAddress.name
|
||||
}} {{ selectedAddress.mobile }}
|
||||
</div>
|
||||
</div>
|
||||
<BaseFooter></BaseFooter>
|
||||
<!-- 添加发票模态框 -->
|
||||
<invoice-modal ref="invModal" :invoiceData="invoiceData" @change="getInvMsg" />
|
||||
<invoice-modal
|
||||
ref="invModal"
|
||||
:invoiceData="invoiceData"
|
||||
@change="getInvMsg"
|
||||
/>
|
||||
<!-- 选择地址模态框 -->
|
||||
<address-manage ref="address" :id="addrId" @change="addrChange"></address-manage>
|
||||
<address-manage
|
||||
ref="address"
|
||||
:id="addrId"
|
||||
@change="addrChange"
|
||||
></address-manage>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import invoiceModal from "@/components/invoiceModal";
|
||||
import addressManage from "@/components/addressManage";
|
||||
import { memberAddress, delMemberAddress } from "@/api/address";
|
||||
import invoiceModal from '@/components/invoiceModal';
|
||||
import addressManage from '@/components/addressManage';
|
||||
import { memberAddress, delMemberAddress } from '@/api/address';
|
||||
import {
|
||||
cartGoodsPay,
|
||||
createTrade,
|
||||
selectAddr,
|
||||
shippingMethod,
|
||||
selectCoupon,
|
||||
couponNum,
|
||||
} from "@/api/cart";
|
||||
import { canUseCouponList } from "@/api/member.js";
|
||||
import { getLogo } from "@/api/common.js";
|
||||
couponNum
|
||||
} from '@/api/cart';
|
||||
import { canUseCouponList } from '@/api/member.js';
|
||||
import { getLogo } from '@/api/common.js';
|
||||
export default {
|
||||
name: "Pay",
|
||||
name: 'Pay',
|
||||
components: { invoiceModal, addressManage },
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
stepIndex: 1, // 顶部步骤条状态
|
||||
invoiceAvailable: false, // 发票编辑按钮
|
||||
showEditBtn: "", // 鼠标移入显示编辑按钮
|
||||
orderMark: "", // 订单备注
|
||||
showEditBtn: '', // 鼠标移入显示编辑按钮
|
||||
orderMark: '', // 订单备注
|
||||
invoiceData: {
|
||||
// 发票数据
|
||||
receiptTitle: "个人",
|
||||
receiptContent: "不开发票",
|
||||
receiptTitle: '个人',
|
||||
receiptContent: '不开发票'
|
||||
},
|
||||
otherMsgForm: {
|
||||
// 其他信息模块数据
|
||||
point: 0,
|
||||
availablePoint: 10,
|
||||
totalPoint: 100,
|
||||
noGoods: 0,
|
||||
noGoods: 0
|
||||
},
|
||||
deliveryList: [
|
||||
// 物流
|
||||
// {value: 'SELF_PICK_UP', label: '自提'},
|
||||
{ value: "LOGISTICS", label: "物流" },
|
||||
{ value: 'LOGISTICS', label: '物流' }
|
||||
// {value: 'LOCAL_TOWN_DELIVERY', label: '同城配送'}
|
||||
],
|
||||
addressList: [], // 地址列表
|
||||
|
@ -220,37 +343,37 @@ export default {
|
|||
goodsList: [], // 商品列表
|
||||
priceDetailDTO: {}, // 商品价格
|
||||
totalNum: 0, // 购买数量
|
||||
addrId: "", // 编辑地址传入的id
|
||||
addrId: '', // 编辑地址传入的id
|
||||
moreAddr: false, // 更多地址
|
||||
canUseCouponNum: 0, // 可用优惠券数量
|
||||
couponList: [], // 可用优惠券列表
|
||||
logoImg: "", // 平台logo
|
||||
logoImg: '', // 平台logo
|
||||
usedCouponId: [], // 已使用优惠券id
|
||||
selectedCoupon: {}, // 已选优惠券对象
|
||||
selectedCoupon: {} // 已选优惠券对象
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
mounted () {
|
||||
this.init();
|
||||
if (!this.Cookies.getItem("logo")) {
|
||||
if (!this.Cookies.getItem('logo')) {
|
||||
getLogo().then((res) => {
|
||||
if (res.success) {
|
||||
let logoObj = JSON.parse(res.result.settingValue);
|
||||
this.Cookies.setItem("logo", logoObj.buyerSideLogo);
|
||||
this.Cookies.setItem('logo', logoObj.buyerSideLogo);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.logoImg = this.Cookies.getItem("logo");
|
||||
this.logoImg = this.Cookies.getItem('logo');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
init () {
|
||||
this.getGoodsDetail();
|
||||
},
|
||||
goAddressManage() {
|
||||
goAddressManage () {
|
||||
// 跳转地址管理页面
|
||||
this.$router.push("/home/MyAddress");
|
||||
this.$router.push('/home/MyAddress');
|
||||
},
|
||||
getAddress() {
|
||||
getAddress () {
|
||||
// 获取收货地址列表
|
||||
memberAddress().then((res) => {
|
||||
if (res.success) {
|
||||
|
@ -263,7 +386,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
getGoodsDetail() {
|
||||
getGoodsDetail () {
|
||||
// 订单商品详情
|
||||
this.$Spin.show();
|
||||
cartGoodsPay({ way: this.$route.query.way })
|
||||
|
@ -274,24 +397,21 @@ export default {
|
|||
this.priceDetailDTO = res.result.priceDetailDTO;
|
||||
this.skuList = res.result.skuList;
|
||||
|
||||
res.result.receiptVO
|
||||
? (this.invoiceData = res.result.receiptVO)
|
||||
: "";
|
||||
res.result.receiptVO ? (this.invoiceData = res.result.receiptVO) : '';
|
||||
|
||||
let notSupArea = res.result.notSupportFreight;
|
||||
this.selectedCoupon = {};
|
||||
if (res.result.platformCoupon)
|
||||
this.selectedCoupon.platformCoupon = res.result.platformCoupon;
|
||||
if (res.result.platformCoupon) this.selectedCoupon.platformCoupon = res.result.platformCoupon;
|
||||
Object.assign(this.selectedCoupon, res.result.storeCoupons);
|
||||
if (notSupArea) {
|
||||
let content = [];
|
||||
let title = "";
|
||||
let title = '';
|
||||
notSupArea.forEach((e) => {
|
||||
title = e.errorMessage;
|
||||
content.push(e.goodsSku.goodsName);
|
||||
});
|
||||
this.$Modal.warning({
|
||||
title: "以下商品超出配送区域" || title,
|
||||
title: '以下商品超出配送区域' || title,
|
||||
content: content.toString(),
|
||||
});
|
||||
}
|
||||
|
@ -310,7 +430,7 @@ export default {
|
|||
this.$Spin.hide();
|
||||
});
|
||||
},
|
||||
getCouponNum() {
|
||||
getCouponNum () {
|
||||
// 获取可用优惠券数量
|
||||
couponNum({ way: this.$route.query.way }).then((res) => {
|
||||
this.canUseCouponNum = res.result;
|
||||
|
@ -326,10 +446,10 @@ export default {
|
|||
let params = {
|
||||
pageNumber: 1,
|
||||
pageSize: 100,
|
||||
memberCouponStatus: "NEW",
|
||||
memberCouponStatus: 'NEW',
|
||||
scopeId: skuArr.toString(),
|
||||
storeId: storeArr.toString(),
|
||||
totalPrice: this.priceDetailDTO.goodsPrice,
|
||||
totalPrice: this.priceDetailDTO.goodsPrice
|
||||
};
|
||||
canUseCouponList(params).then((res) => {
|
||||
// 可用优惠券列表
|
||||
|
@ -350,86 +470,85 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
selectAddress(item) {
|
||||
selectAddress (item) {
|
||||
// 选择地址
|
||||
let params = {
|
||||
way: this.$route.query.way,
|
||||
shippingAddressId: item.id,
|
||||
shippingAddressId: item.id
|
||||
};
|
||||
selectAddr(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("选择收货地址成功");
|
||||
this.$Message.success('选择收货地址成功');
|
||||
this.selectedAddress = item;
|
||||
this.getGoodsDetail();
|
||||
}
|
||||
});
|
||||
},
|
||||
editAddress(id) {
|
||||
editAddress (id) {
|
||||
// 编辑地址
|
||||
this.addrId = id;
|
||||
this.$refs.address.show();
|
||||
},
|
||||
addrChange(item) {
|
||||
addrChange () {
|
||||
// 添加,编辑地址回显
|
||||
this.getAddress();
|
||||
},
|
||||
delAddress(item) {
|
||||
delAddress (item) {
|
||||
// 删除地址
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
content: "你确定删除这个收货地址",
|
||||
title: '提示',
|
||||
content: '你确定删除这个收货地址',
|
||||
onOk: () => {
|
||||
delMemberAddress(item.id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("删除成功");
|
||||
this.$Message.success('删除成功');
|
||||
this.getAddress();
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {},
|
||||
onCancel: () => {}
|
||||
});
|
||||
},
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
window.open(routeUrl.href, '_blank');
|
||||
},
|
||||
// 跳转店铺首页
|
||||
goShopPage(id) {
|
||||
goShopPage (id) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: "/Merchant",
|
||||
query: { id: id },
|
||||
path: '/Merchant',
|
||||
query: { id: id }
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
window.open(routeUrl.href, '_blank');
|
||||
},
|
||||
selectDelivery(delivery) {
|
||||
selectDelivery (delivery) {
|
||||
// 选择配送方式
|
||||
let params = {
|
||||
way: this.$route.query.way,
|
||||
shippingMethod: delivery.value,
|
||||
shippingMethod: delivery.value
|
||||
};
|
||||
shippingMethod(params).then((res) => {});
|
||||
},
|
||||
useCoupon(id, used) {
|
||||
useCoupon (id, used) {
|
||||
// 使用优惠券
|
||||
let params = {
|
||||
way: this.$route.query.way,
|
||||
memberCouponId: id,
|
||||
used: used, // true 为使用, false为弃用
|
||||
used: used // true 为使用, false为弃用
|
||||
};
|
||||
selectCoupon(params).then((res) => {
|
||||
if (res.success) this.init();
|
||||
});
|
||||
},
|
||||
editInvoice() {
|
||||
|
||||
editInvoice () {
|
||||
// 编辑发票信息
|
||||
this.$refs.invModal.invoiceAvailable = true;
|
||||
},
|
||||
getInvMsg(item) {
|
||||
getInvMsg (item) {
|
||||
// 获取发票信息
|
||||
if (item) {
|
||||
this.init();
|
||||
|
@ -437,18 +556,18 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
pay() {
|
||||
pay () {
|
||||
// 结算
|
||||
const params = {
|
||||
client: "PC",
|
||||
client: 'PC',
|
||||
remark: [],
|
||||
way: this.$route.query.way,
|
||||
way: this.$route.query.way
|
||||
};
|
||||
this.goodsList.forEach((e) => {
|
||||
if (e.remark) {
|
||||
params.remark.push({
|
||||
remark: e.remark,
|
||||
storeId: e.storeId,
|
||||
storeId: e.storeId
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -461,8 +580,8 @@ export default {
|
|||
this.$Spin.hide();
|
||||
if (res.success) {
|
||||
this.$router.push({
|
||||
path: "/payment",
|
||||
query: { orderType: "TRADE", sn: res.result.sn },
|
||||
path: '/payment',
|
||||
query: { orderType: 'TRADE', sn: res.result.sn }
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -470,22 +589,22 @@ export default {
|
|||
this.$Spin.hide();
|
||||
});
|
||||
},
|
||||
useScope(type) {
|
||||
let goods = "全部商品";
|
||||
useScope (type) {
|
||||
let goods = '全部商品';
|
||||
switch (type) {
|
||||
case "ALL":
|
||||
goods = "全部商品";
|
||||
case 'ALL':
|
||||
goods = '全部商品';
|
||||
break;
|
||||
case "PORTION_GOODS":
|
||||
goods = "部分商品";
|
||||
case 'PORTION_GOODS':
|
||||
goods = '部分商品';
|
||||
break;
|
||||
case "PORTION_GOODS_CATEGORY":
|
||||
goods = "部分分类商品";
|
||||
case 'PORTION_GOODS_CATEGORY':
|
||||
goods = '部分分类商品';
|
||||
break;
|
||||
}
|
||||
return `${goods}可用`;
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -69,10 +69,10 @@ service.interceptors.request.use(
|
|||
config.headers['accessToken'] = accessToken;
|
||||
// 解析当前token时间
|
||||
let jwtData = JSON.parse(
|
||||
decodeURIComponent(escape(window.atob(accessToken.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
||||
decodeURIComponent(escape(window.atob(accessToken.split('.')[1])))
|
||||
);
|
||||
if (jwtData.exp < Math.round(new Date() / 1000)) {
|
||||
refresh()
|
||||
refresh(config)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ service.interceptors.request.use(
|
|||
}
|
||||
);
|
||||
|
||||
async function refresh () {
|
||||
async function refresh (error) {
|
||||
const getTokenRes = await refreshToken();
|
||||
if (getTokenRes === 'success') {
|
||||
// 刷新token
|
||||
|
@ -101,7 +101,6 @@ async function refresh () {
|
|||
Storage.removeItem('userInfo');
|
||||
Storage.setItem('cartNum', 0);
|
||||
store.commit('SET_CARTNUM', 0);
|
||||
console.log('1111');
|
||||
Modal.confirm({
|
||||
title: '请登录',
|
||||
content: '<p>请登录后执行此操作</p>',
|
||||
|
@ -140,9 +139,11 @@ service.interceptors.response.use(
|
|||
isRefreshToken++;
|
||||
|
||||
if (isRefreshToken === 1) {
|
||||
refresh()
|
||||
refresh(error)
|
||||
isRefreshToken = 0;
|
||||
}
|
||||
} else if (errorResponse.status === 404) {
|
||||
// 避免刷新token时也提示报错信息
|
||||
} else {
|
||||
if (error.message) {
|
||||
let _message =
|
||||
|
|
|
@ -64,14 +64,6 @@ service.interceptors.response.use(
|
|||
}
|
||||
return data;
|
||||
break;
|
||||
case 403:
|
||||
// 权限不足
|
||||
if (data.message !== null) {
|
||||
Message.error(data.message);
|
||||
} else {
|
||||
Message.error("权限不足");
|
||||
}
|
||||
break;
|
||||
case 500:
|
||||
// 系统异常
|
||||
if (data.message !== null) {
|
||||
|
@ -89,6 +81,8 @@ service.interceptors.response.use(
|
|||
if (error.response) {
|
||||
if (error.response.status === 401) {
|
||||
// 这种情况一般调到登录页
|
||||
} else if (error.response.status === 404) {
|
||||
// 避免刷新token报错
|
||||
} else if (error.response.status === 403) {
|
||||
isRefreshToken++;
|
||||
if(isRefreshToken === 1) {
|
||||
|
|
|
@ -147,21 +147,13 @@ export default {
|
|||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.distributionStatus == "PASS") {
|
||||
return h("Badge", {
|
||||
props: { status: "success", text: "审核通过" },
|
||||
});
|
||||
return h("Tag", {props: {color: "green",},},"通过");
|
||||
} else if (params.row.distributionStatus == "APPLY") {
|
||||
return h("Badge", {
|
||||
props: { status: "processing", text: "申请中" },
|
||||
});
|
||||
return h("Tag", {props: {color: "geekblue",},},"待审核");
|
||||
} else if (params.row.distributionStatus == "RETREAT") {
|
||||
return h("Badge", {
|
||||
props: { status: "warning", text: "已清退" },
|
||||
});
|
||||
return h("Tag", {props: {color: "volcano",},},"清退");
|
||||
} else if (params.row.distributionStatus == "REFUSE") {
|
||||
return h("Badge", {
|
||||
props: { status: "error", text: "审核拒绝" },
|
||||
});
|
||||
return h("Tag", {props: {color: "red",},},"拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -186,11 +186,11 @@ export default {
|
|||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.goodsType === 'PHYSICAL_GOODS') {
|
||||
return h("div", "实物商品");
|
||||
return h("Tag", {props: {color: "green",},}, "实物商品");
|
||||
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
|
||||
return h("div", "虚拟商品");
|
||||
return h("Tag", {props: {color: "volcano",},}, "虚拟商品");
|
||||
} else {
|
||||
return h("div", "电子卡券");
|
||||
return h("Tag", {props: {color: "geekblue",},}, "电子卡券");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -200,23 +200,9 @@ export default {
|
|||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.marketEnable == "DOWN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "下架",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green"},},"上架");
|
||||
} else if (params.row.marketEnable == "UPPER") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "上架",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"下架");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -226,36 +212,14 @@ export default {
|
|||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.isAuth == "TOBEAUDITED") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "待审核",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"待审核");
|
||||
} else if (params.row.isAuth == "PASS") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "审核通过",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green"},},"通过");
|
||||
} else if (params.row.isAuth == "REFUSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "审核拒绝",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "red",},},"拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "storeName",
|
||||
|
|
|
@ -113,23 +113,9 @@ export default {
|
|||
align: "left",
|
||||
render: (h, params) => {
|
||||
if (params.row.deleteFlag == 0) {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "启用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green",},},"启用");
|
||||
} else if (params.row.deleteFlag == 1) {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "禁用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"禁用");
|
||||
}
|
||||
},
|
||||
filters: [
|
||||
|
|
|
@ -135,35 +135,11 @@ export default {
|
|||
width: 90,
|
||||
render: (h, params) => {
|
||||
if (params.row.grade == "GOOD") {
|
||||
return h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "success",
|
||||
},
|
||||
},
|
||||
"好评"
|
||||
);
|
||||
return h("Tag", {props: {color: "green",},}, "好评");
|
||||
} else if (params.row.grade == "MODERATE") {
|
||||
return h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "warning",
|
||||
},
|
||||
},
|
||||
"中评"
|
||||
);
|
||||
return h("Tag", {props: {color: "orange",},}, "中评");
|
||||
} else {
|
||||
return h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "error",
|
||||
},
|
||||
},
|
||||
"差评"
|
||||
);
|
||||
return h("Tag", {props: {color: "red",},}, "差评");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<Input type="text" @keyup="handleLink(linkItem,linkList.length)" v-model="linkItem.url" placeholder="https://"></Input>
|
||||
</div>
|
||||
</Poptip>
|
||||
|
||||
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
|
@ -74,7 +74,12 @@ export default {
|
|||
icon: "md-happy",
|
||||
___type: "sign",
|
||||
},
|
||||
|
||||
{
|
||||
title: "小程序直播",
|
||||
icon: "ios-videocam",
|
||||
___type: "live",
|
||||
},
|
||||
|
||||
],
|
||||
linkItem: {
|
||||
title: "外部链接",
|
||||
|
|
|
@ -131,23 +131,9 @@
|
|||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.payStatus == "PAID") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "已付款",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.payStatus == "UNPAID") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "未付款",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green",},}, "已付款");
|
||||
} else {
|
||||
return h("Tag", {props: {color: "red",},}, "未付款");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,47 +1,48 @@
|
|||
<template>
|
||||
<div>
|
||||
<vuedraggable
|
||||
:list="uploadList"
|
||||
:disabled="!draggable||!multiple"
|
||||
:animation="200"
|
||||
class="list-group"
|
||||
ghost-class="thumb-ghost"
|
||||
@end="onEnd"
|
||||
>
|
||||
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
||||
<div v-if="item.status == 'finished'" style="height:60px;">
|
||||
<img :src="item.url" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click="handleRemove(item)"></Icon>
|
||||
<div class="upload-pic-thumb">
|
||||
<vuedraggable
|
||||
:list="uploadList"
|
||||
:disabled="!draggable||!multiple"
|
||||
:animation="200"
|
||||
class="list-group"
|
||||
ghost-class="thumb-ghost"
|
||||
@end="onEnd"
|
||||
>
|
||||
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
||||
<div v-if="item.status == 'finished'" style="height:60px;">
|
||||
<img :src="item.url" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click="handleRemove(item)"></Icon>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
|
||||
</vuedraggable>
|
||||
<Upload
|
||||
ref="upload"
|
||||
:multiple="multiple"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleError"
|
||||
:format="['jpg','jpeg','png','gif']"
|
||||
:max-size="maxSize*1024"
|
||||
:on-format-error="handleFormatError"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
:before-upload="handleBeforeUpload"
|
||||
type="drag"
|
||||
:action="uploadFileUrl"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block;width:58px;"
|
||||
>
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Icon type="md-camera" size="20"></Icon>
|
||||
</div>
|
||||
</div>
|
||||
</vuedraggable>
|
||||
<Upload
|
||||
ref="upload"
|
||||
:multiple="multiple"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleError"
|
||||
:format="['jpg','jpeg','png','gif']"
|
||||
:max-size="maxSize*1024"
|
||||
:on-format-error="handleFormatError"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
:before-upload="handleBeforeUpload"
|
||||
type="drag"
|
||||
:action="uploadFileUrl"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block;width:58px;"
|
||||
>
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Icon type="md-camera" size="20"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
|
||||
</Upload>
|
||||
</div>
|
||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
||||
<div slot="footer">
|
||||
|
@ -242,6 +243,9 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.upload-pic-thumb{
|
||||
display: flex;
|
||||
}
|
||||
.upload-list {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
|
@ -255,6 +259,7 @@ export default {
|
|||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
margin-right: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.upload-list img {
|
||||
width: 100%;
|
||||
|
|
|
@ -216,11 +216,11 @@
|
|||
width: 100,
|
||||
render: (h, params) => {
|
||||
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") {
|
||||
return h('div', [h('span', {}, '退货'),]);
|
||||
return h('div', [h('tag', {props: {color: "volcano"}}, '退货'),]);
|
||||
} 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,
|
||||
render: (h, params) => {
|
||||
if (params.row.serviceStatus == "APPLY") {
|
||||
return h('div', [h('span', {}, '申请中'),]);
|
||||
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
|
||||
} 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") {
|
||||
return h('div', [h('span', {}, '拒绝售后'),]);
|
||||
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
|
||||
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
||||
return h('div', [h('span', {}, '买家退货,待卖家收货'),]);
|
||||
} else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
|
||||
return h('div', [h('span', {}, '商家换货/补发'),]);
|
||||
return h('div', [h('tag', {props: {color: "orange"}}, '买家退货,待卖家收货'),]);
|
||||
} 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") {
|
||||
return h('div', [h('span', {}, '卖家终止售后'),]);
|
||||
} else if (params.row.serviceStatus == "BUYER_CONFIRM") {
|
||||
return h('div', [h('span', {}, '买家确认收货'),]);
|
||||
return h('div', [h('tag', {props: {color: "lime"}}, '卖家终止售后'),]);
|
||||
} 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") {
|
||||
return h('div', [h('span', {}, '完成售后'),]);
|
||||
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
|
||||
}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,
|
||||
render: (h, params) => {
|
||||
if (params.row.complainStatus == "NEW") {
|
||||
return h('div', [h('span', { }, '新投诉'),]);
|
||||
return h('div', [h('tag',{props: {color: "purple"}}, '新投诉'),]);
|
||||
} 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") {
|
||||
return h('div', [h('span', { }, '待申诉'),]);
|
||||
return h('div', [h('tag', {props: {color: "volcano"}}, '待申诉'),]);
|
||||
} 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") {
|
||||
return h('div', [h('span', { }, '等待仲裁'),]);
|
||||
return h('div', [h('tag', {props: {color: "blue"}}, '等待仲裁'),]);
|
||||
}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",
|
||||
render: (h, params) => {
|
||||
if (params.row.paymentMethod === "WECHAT") {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "green",
|
||||
},
|
||||
},
|
||||
"微信"
|
||||
),
|
||||
]);
|
||||
return h("div", [h("Tag", {props: {color: "green",},}, "微信"),]);
|
||||
} else if (params.row.paymentMethod === "ALIPAY") {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "blue",
|
||||
},
|
||||
},
|
||||
"支付宝"
|
||||
),
|
||||
]);
|
||||
return h("div", [h("Tag", {props: {color: "blue",},}, "支付宝"),]);
|
||||
} else if (params.row.paymentMethod === "WALLET") {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {},
|
||||
},
|
||||
"余额支付"
|
||||
),
|
||||
]);
|
||||
return h("div", [h("Tag", {props: {color: "geekblue",},}, "余额支付"),]);
|
||||
} else if (params.row.paymentMethod === "BANK_TRANSFER") {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "orange",
|
||||
},
|
||||
},
|
||||
"银行转帐"
|
||||
),
|
||||
]);
|
||||
return h("div", [h("Tag", {props: {color: "orange",},}, "银行转帐"),]);
|
||||
} else {
|
||||
return h("div", [h("Tag", {}, "暂未付款")]);
|
||||
}
|
||||
|
|
|
@ -100,9 +100,9 @@ export default {
|
|||
width: 95,
|
||||
render: (h, params) => {
|
||||
if (params.row.isRefund == "1") {
|
||||
return h("div", [h("span", {}, "已退款")]);
|
||||
return h("div", [h("Tag", {props: {color: "green",},}, "已退款")]);
|
||||
} else {
|
||||
return h("div", [h("span", {}, "未退款")]);
|
||||
return h("div", [h("Tag", {props: {color: "orange",},}, "未退款")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -94,8 +94,8 @@
|
|||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
sort: "", // 默认排序字段
|
||||
order: "", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
endDate: "", // 终止时间
|
||||
orderType: "FICTITIOUS",
|
||||
|
@ -118,8 +118,6 @@
|
|||
title: "下单时间",
|
||||
key: "createTime",
|
||||
width: 200,
|
||||
sortable: true,
|
||||
sortType: "desc",
|
||||
},
|
||||
{
|
||||
title: "订单来源",
|
||||
|
@ -150,19 +148,15 @@
|
|||
width:95,
|
||||
render: (h, params) => {
|
||||
if (params.row.orderStatus == "UNPAID") {
|
||||
return h('div', [h('span', { }, '未付款'),]);
|
||||
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||
} else if (params.row.orderStatus == "PAID") {
|
||||
return h('div', [h('span', { }, '已付款'),]);
|
||||
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||
return h('div', [h('span', { }, '待发货'),]);
|
||||
} else if (params.row.orderStatus == "DELIVERED") {
|
||||
return h('div', [h('span', { }, '已发货'),]);
|
||||
}else if (params.row.orderStatus == "COMPLETED") {
|
||||
return h('div', [h('span', { }, '已完成'),]);
|
||||
}else if (params.row.orderStatus == "TAKE") {
|
||||
return h('div', [h('span', { }, '待核验'),]);
|
||||
}else if (params.row.orderStatus == "CANCELLED") {
|
||||
return h('div', [h('span', { }, '已取消'),]);
|
||||
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
|
||||
} 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"}}, "已取消")]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<div class="div-item">
|
||||
<div class="div-item-left">订单来源:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.order.clientType }}
|
||||
{{ orderInfo.order.clientType | clientTypeWay}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -166,13 +166,13 @@ export default {
|
|||
width: 120,
|
||||
render: (h, params) => {
|
||||
if (params.row.orderType == "NORMAL") {
|
||||
return h("div", [h("span", {}, "普通订单")]);
|
||||
return h("div", [h("tag", {props: {color: "blue"}}, "普通订单")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "赠品订单")]);
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "赠品订单")]);
|
||||
} else if (params.row.orderType == "VIRTUAL") {
|
||||
return h("div", [h("tag", {}, "核验订单")]);
|
||||
return h("div", [h("tag", {props: {color: "geekblue"}}, "核验订单")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -202,19 +202,19 @@ export default {
|
|||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.orderStatus == "UNPAID") {
|
||||
return h("div", [h("span", {}, "未付款")]);
|
||||
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "待发货")]);
|
||||
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "已完成")]);
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "已取消")]);
|
||||
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -230,7 +230,7 @@ export default {
|
|||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
width: 100,
|
||||
width: 150,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
|
|
|
@ -101,7 +101,7 @@ export default {
|
|||
{
|
||||
title: "面额/折扣",
|
||||
key: "price",
|
||||
width: 120,
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.price) {
|
||||
return h(
|
||||
|
@ -117,27 +117,28 @@ export default {
|
|||
{
|
||||
title: "领取数量/总数量",
|
||||
key: "publishNum",
|
||||
width: 150,
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
params.row.receivedNum + "/" + params.row.publishNum
|
||||
);
|
||||
},
|
||||
minWidth: 130,
|
||||
|
||||
},
|
||||
{
|
||||
title: "优惠券类型",
|
||||
key: "couponType",
|
||||
width: 120,
|
||||
render: (h, params) => {
|
||||
let text = "未知";
|
||||
let text = "";
|
||||
if (params.row.couponType === "DISCOUNT") {
|
||||
text = "打折";
|
||||
return h("Tag", {props: {color: "blue",},}, "打折");
|
||||
} else if (params.row.couponType === "PRICE") {
|
||||
text = "减免现金";
|
||||
return h("Tag", {props: {color: "geekblue",},}, "减免现金");
|
||||
}else {
|
||||
return h("Tag", {props: {color: "purple",},}, "未知");
|
||||
}
|
||||
return h("div", [text]);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -184,7 +185,7 @@ export default {
|
|||
color = "red";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "default";
|
||||
color = "geekblue";
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
text = "已开始";
|
||||
color = "green";
|
||||
|
|
|
@ -132,19 +132,19 @@ export default {
|
|||
minWidth: 60,
|
||||
render: (h, params) => {
|
||||
let text = "未知",
|
||||
color = "default";
|
||||
color = "purple";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "default";
|
||||
color = "geekblue";
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
text = "已开始";
|
||||
color = "green";
|
||||
color = "blue";
|
||||
} else if (params.row.promotionStatus == "END") {
|
||||
text = "已结束";
|
||||
color = "blue";
|
||||
color = "green";
|
||||
} else if (params.row.promotionStatus == "CLOSE") {
|
||||
text = "已关闭";
|
||||
color = "red";
|
||||
color = "volcano";
|
||||
}
|
||||
return h("div", [
|
||||
h(
|
||||
|
|
|
@ -119,14 +119,13 @@ export default {
|
|||
{
|
||||
title: "直播状态",
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"span",
|
||||
params.row.status == "NEW"
|
||||
? "未开始"
|
||||
: params.row.status == "START"
|
||||
? "直播中"
|
||||
: "已结束"
|
||||
);
|
||||
if(params.row.status == "NEW"){
|
||||
return h("div", [h("tag", {props: {color: "blue"}}, "未开始")]);
|
||||
}else if(params.row.status == "START"){
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "直播中")]);
|
||||
}else{
|
||||
return h("div", [h("tag", {props: {color: "volcano"}}, "已结束")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -122,16 +122,16 @@ export default {
|
|||
color = "";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "default";
|
||||
color = "geekblue";
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
text = "已开始";
|
||||
color = "green";
|
||||
color = "blue";
|
||||
} else if (params.row.promotionStatus == "END") {
|
||||
text = "已结束";
|
||||
color = "blue";
|
||||
color = "green";
|
||||
} else if (params.row.promotionStatus == "CLOSE") {
|
||||
text = "已关闭";
|
||||
color = "red";
|
||||
color = "volcano";
|
||||
}
|
||||
return h("div", [
|
||||
h(
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<div>{{ row.startTime }}</div>
|
||||
<div>{{ row.endTime }}</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
v-if="row.promotionStatus == 'NEW'"
|
||||
|
@ -213,16 +213,16 @@ export default {
|
|||
color = "";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "default";
|
||||
color = "geekblue";
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
text = "已开始";
|
||||
color = "green";
|
||||
color = "blue";
|
||||
} else if (params.row.promotionStatus == "END") {
|
||||
text = "已结束";
|
||||
color = "blue";
|
||||
color = "green";
|
||||
} else if (params.row.promotionStatus == "CLOSE") {
|
||||
text = "已关闭";
|
||||
color = "red";
|
||||
color = "volcano";
|
||||
}
|
||||
return h("div", [h("Tag", { props: { color: color } }, text)]);
|
||||
},
|
||||
|
|
|
@ -24,78 +24,35 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button type="primary" @click="add">添加活动</Button>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
class="page"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
type="info"
|
||||
size="small"
|
||||
class="mr_5"
|
||||
v-if="row.promotionStatus == 'NEW'"
|
||||
@click="edit(row)"
|
||||
>编辑</Button
|
||||
>
|
||||
<Tabs value="list" @on-click="clickTabPane">
|
||||
<TabPane label="秒杀活动列表" name="list">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="page">
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button type="info" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW'" @click="edit(row)">编辑</Button>
|
||||
|
||||
<Button
|
||||
type="info"
|
||||
size="small"
|
||||
class="mr_5"
|
||||
v-else
|
||||
@click="manage(row)"
|
||||
>查看</Button
|
||||
>
|
||||
<Button type="info" size="small" class="mr_5" v-else @click="manage(row)">查看</Button>
|
||||
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
class="mr_5"
|
||||
v-if="row.promotionStatus == 'NEW'"
|
||||
@click="manage(row)"
|
||||
>管理</Button
|
||||
>
|
||||
<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="
|
||||
row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
|
||||
"
|
||||
class="mr_5"
|
||||
@click="off(row)"
|
||||
>下架</Button
|
||||
>
|
||||
<Button type="error" size="small" v-if="
|
||||
row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
|
||||
" class="mr_5" @click="off(row)">下架</Button>
|
||||
|
||||
<Button type="error" size="small" v-if="row.promotionStatus == 'CLOSE'" ghost @click="expire(row)">删除</Button>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page style="margin: 20px 0;" :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>
|
||||
</TabPane>
|
||||
<TabPane label="秒杀活动设置" name="setup">
|
||||
|
||||
<setupSeckill v-if="setupFlag"></setupSeckill>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
<Button
|
||||
type="error"
|
||||
size="small"
|
||||
v-if="row.promotionStatus == 'CLOSE'"
|
||||
ghost
|
||||
@click="expire(row)"
|
||||
>删除</Button
|
||||
>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="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]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -145,41 +102,13 @@ export default {
|
|||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "新建",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"新建");
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "开始",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "blue",},},"开始");
|
||||
} else if (params.row.promotionStatus == "END") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "结束",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green",},},"结束");
|
||||
} else if (params.row.promotionStatus == "CLOSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "废弃",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"结束");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -302,7 +231,7 @@ export default {
|
|||
</script>
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
.mr_5{
|
||||
margin: 0 4px;
|
||||
.mr_5 {
|
||||
margin: 0 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<div v-if="templateShow">
|
||||
<Form :model="form" :label-width="120">
|
||||
<FormItem label="每日场次设置">
|
||||
<Row :gutter="16" class="row">
|
||||
|
@ -27,6 +27,7 @@ import { getSetting, setSetting } from "@/api/index";
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
templateShow:false,
|
||||
submitLoading: false,
|
||||
selectedTime: [],
|
||||
times: [], //时间集合 1-24点
|
||||
|
@ -81,6 +82,7 @@ export default {
|
|||
async init() {
|
||||
let result = await getSetting("SECKILL_SETTING");
|
||||
if (result.success) {
|
||||
this.templateShow = true
|
||||
this.form.seckillRule = result.result.seckillRule;
|
||||
this.times=[]
|
||||
for (let i = 0; i < 24; i++) {
|
||||
|
|
|
@ -95,13 +95,13 @@ export default {
|
|||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.billStatus == "OUT") {
|
||||
return h("div", "已出账");
|
||||
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||
} else if (params.row.billStatus == "CHECK") {
|
||||
return h("div", "已对账");
|
||||
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||
} else if (params.row.billStatus == "EXAMINE") {
|
||||
return h("div", "已审核");
|
||||
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||
} else {
|
||||
return h("div", "已付款");
|
||||
return h("Tag", {props: {color: "green",},},"已付款");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -106,13 +106,13 @@ export default {
|
|||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.billStatus == "OUT") {
|
||||
return h("div", "已出账");
|
||||
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||
} else if (params.row.billStatus == "CHECK") {
|
||||
return h("div", "已对账");
|
||||
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||
} else if (params.row.billStatus == "EXAMINE") {
|
||||
return h("div", "已审核");
|
||||
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||
} else {
|
||||
return h("div", "已付款");
|
||||
return h("Tag", {props: {color: "green",},},"已付款");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -126,7 +126,7 @@ export default {
|
|||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: params.row.selfOperated ? "error" : "success",
|
||||
color: params.row.selfOperated ? "volcano" : "green",
|
||||
},
|
||||
},
|
||||
params.row.selfOperated ? "自营" : "非自营"
|
||||
|
@ -141,50 +141,15 @@ export default {
|
|||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.storeDisable == "OPEN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "开启中",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green",},},"开启中");
|
||||
} else if (params.row.storeDisable == "CLOSED") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "已关闭",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"已关闭");
|
||||
} else if (params.row.storeDisable == "APPLY") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "申请中",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "geekblue",},},"申请中");
|
||||
} else if (params.row.storeDisable == "APPLYING") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "审核中",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "purple",},},"审核中");
|
||||
} else if (params.row.storeDisable == "REFUSED") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "审核拒绝",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "red",},},"审核拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="shop-item">
|
||||
<div class="label-item">
|
||||
<span>订单来源</span>
|
||||
<span>{{res.clientType}}</span>
|
||||
<span>{{res.clientType | clientTypeWay}}</span>
|
||||
</div>
|
||||
<div class="label-item">
|
||||
<span>订单状态</span>
|
||||
|
|
|
@ -209,11 +209,6 @@ export const deleteParamsGroup = (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列表
|
||||
export const getSkuPage = params => {
|
||||
return getRequest(`/goodsSku/getByPage`, params);
|
||||
|
@ -318,7 +313,7 @@ export const getCategoryParamsListDataSeller = (id, params) => {
|
|||
|
||||
//保存获取关联规格
|
||||
export const getGoodsSpecInfoSeller = (category_id, params) => {
|
||||
return getRequest(`/goods/category/spec/goods/${category_id}`, params);
|
||||
return getRequest(`/goods/spec/${category_id}`, params);
|
||||
};
|
||||
|
||||
//批量设置运费模板
|
||||
|
|
|
@ -69,14 +69,6 @@ service.interceptors.response.use(
|
|||
router.push("/login");
|
||||
}
|
||||
break;
|
||||
case 403:
|
||||
// 权限不足
|
||||
if (data.message !== null) {
|
||||
Message.error(data.message);
|
||||
} else {
|
||||
Message.error("权限不足");
|
||||
}
|
||||
break;
|
||||
case 500:
|
||||
// 系统异常
|
||||
if (data.message !== null) {
|
||||
|
@ -94,6 +86,8 @@ service.interceptors.response.use(
|
|||
if (error.response) {
|
||||
if (error.response.status === 401) {
|
||||
// 这种情况一般调到登录页
|
||||
} else if (error.response.status === 404) {
|
||||
// 避免刷新token报错
|
||||
} else if (error.response.status === 403) {
|
||||
isRefreshToken++;
|
||||
if (isRefreshToken === 1) {
|
||||
|
|
|
@ -54,20 +54,20 @@ export const result = [
|
|||
children: null,
|
||||
permTypes: []
|
||||
},
|
||||
{
|
||||
name: "daft-goods",
|
||||
showAlways: true,
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "草稿商品",
|
||||
path: "daft-goods",
|
||||
component: "goods/goods-seller/draftGoods",
|
||||
icon: "md-person",
|
||||
isMenu: true,
|
||||
url: "",
|
||||
children: null,
|
||||
permTypes: []
|
||||
},
|
||||
// {
|
||||
// name: "daft-goods",
|
||||
// showAlways: true,
|
||||
// level: 2,
|
||||
// type: 0,
|
||||
// title: "草稿商品",
|
||||
// path: "daft-goods",
|
||||
// component: "goods/goods-seller/draftGoods",
|
||||
// icon: "md-person",
|
||||
// isMenu: true,
|
||||
// url: "",
|
||||
// children: null,
|
||||
// permTypes: []
|
||||
// },
|
||||
|
||||
{
|
||||
path: "template-goods",
|
||||
|
|
|
@ -5,7 +5,7 @@ import ViewUI from "view-design";
|
|||
import "./styles/theme.less";
|
||||
|
||||
import "core-js/stable";
|
||||
import "regenerator-runtime/runtime";
|
||||
// import "regenerator-runtime/runtime";
|
||||
import vueQr from 'vue-qr'
|
||||
|
||||
import App from "./App";
|
||||
|
|
|
@ -5,7 +5,7 @@ export const loginRouter = {
|
|||
path: "/login",
|
||||
name: "login",
|
||||
meta: {
|
||||
title: "登录 - lili商家后台 "
|
||||
title: "登录 - lili商家后台"
|
||||
},
|
||||
component: () => import("@/views/login.vue")
|
||||
};
|
||||
|
|
|
@ -6,17 +6,32 @@
|
|||
* @returns {*}
|
||||
*/
|
||||
export function unitPrice(val, unit, location) {
|
||||
let price = formatPrice(val)
|
||||
if (location === 'before') {
|
||||
return price.substr(0, price.length - 3)
|
||||
let price = formatPrice(val);
|
||||
if (location === "before") {
|
||||
return price.substr(0, price.length - 3);
|
||||
}
|
||||
if (location === 'after') {
|
||||
return price.substr(-2)
|
||||
if (location === "after") {
|
||||
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}
|
||||
*/
|
||||
export function formatPrice(price) {
|
||||
if (typeof price !== 'number') return price
|
||||
return String(Number(price).toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
||||
if (typeof price !== "number") return price;
|
||||
return String(Number(price).toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,51 +50,60 @@ export function formatPrice(price) {
|
|||
* @returns {*|string}
|
||||
*/
|
||||
export function unixToDate(unix, format) {
|
||||
let _format = format || 'yyyy-MM-dd hh:mm:ss'
|
||||
const d = new Date(unix * 1000)
|
||||
let _format = format || "yyyy-MM-dd hh:mm:ss";
|
||||
const d = new Date(unix * 1000);
|
||||
const o = {
|
||||
'M+': d.getMonth() + 1,
|
||||
'd+': d.getDate(),
|
||||
'h+': d.getHours(),
|
||||
'm+': d.getMinutes(),
|
||||
's+': d.getSeconds(),
|
||||
'q+': Math.floor((d.getMonth() + 3) / 3),
|
||||
"M+": d.getMonth() + 1,
|
||||
"d+": d.getDate(),
|
||||
"h+": d.getHours(),
|
||||
"m+": d.getMinutes(),
|
||||
"s+": d.getSeconds(),
|
||||
"q+": Math.floor((d.getMonth() + 3) / 3),
|
||||
S: d.getMilliseconds()
|
||||
}
|
||||
if (/(y+)/.test(_format)) _format = _format.replace(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
|
||||
};
|
||||
if (/(y+)/.test(_format))
|
||||
_format = _format.replace(
|
||||
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) {
|
||||
switch (status) {
|
||||
case 'YES':
|
||||
return "是"
|
||||
case 'NO':
|
||||
return "否"
|
||||
case "YES":
|
||||
return "是";
|
||||
case "NO":
|
||||
return "否";
|
||||
}
|
||||
}
|
||||
|
||||
export function unixSellerBillStatus(status_code) {
|
||||
switch (status_code) {
|
||||
case 'OUT':
|
||||
return '已出账'
|
||||
case 'CHECK':
|
||||
return '已对账'
|
||||
case 'EXAMINE':
|
||||
return '已审核'
|
||||
case 'PAY':
|
||||
return '已结算'
|
||||
case 'COMPLETE':
|
||||
return '已完成'
|
||||
case "OUT":
|
||||
return "已出账";
|
||||
case "CHECK":
|
||||
return "已对账";
|
||||
case "EXAMINE":
|
||||
return "已审核";
|
||||
case "PAY":
|
||||
return "已结算";
|
||||
case "COMPLETE":
|
||||
return "已完成";
|
||||
}
|
||||
}
|
||||
export function unixSwitchStatus(status_code) {
|
||||
switch (status_code) {
|
||||
case 'OPEN':
|
||||
return '开启'
|
||||
case 'CLOSE':
|
||||
return '关闭'
|
||||
case "OPEN":
|
||||
return "开启";
|
||||
case "CLOSE":
|
||||
return "关闭";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,30 +113,35 @@ export function unixSwitchStatus(status_code) {
|
|||
* @returns {*}
|
||||
*/
|
||||
export function secrecyMobile(mobile) {
|
||||
mobile = String(mobile)
|
||||
mobile = String(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) {
|
||||
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 = {
|
||||
'M+': date.getMonth() + 1,
|
||||
'd+': date.getDate(),
|
||||
'h+': date.getHours(),
|
||||
'm+': date.getMinutes(),
|
||||
's+': date.getSeconds()
|
||||
"M+": date.getMonth() + 1,
|
||||
"d+": date.getDate(),
|
||||
"h+": date.getHours(),
|
||||
"m+": date.getMinutes(),
|
||||
"s+": date.getSeconds()
|
||||
};
|
||||
for (let k in o) {
|
||||
if (new RegExp(`(${k})`).test(fmt)) {
|
||||
let str = o[k] + '';
|
||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
|
||||
}
|
||||
if (new RegExp(`(${k})`).test(fmt)) {
|
||||
let str = o[k] + "";
|
||||
fmt = fmt.replace(
|
||||
RegExp.$1,
|
||||
RegExp.$1.length === 1 ? str : padLeftZero(str)
|
||||
);
|
||||
}
|
||||
}
|
||||
return fmt;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -395,11 +395,11 @@ div.base-info-item {
|
|||
text-align: center;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
display: inline-block;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
margin-right: 4px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.demo-upload-list img {
|
||||
width: 100%;
|
||||
|
|
|
@ -170,32 +170,11 @@ export default {
|
|||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.isAuth == "TOBEAUDITED") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "待审核",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "blue",},},"待审核");
|
||||
} else if (params.row.isAuth == "PASS") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "审核通过",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green",},},"通过");
|
||||
} else if (params.row.isAuth == "REFUSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "审核拒绝",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "red",},},"审核拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -260,11 +239,11 @@ export default {
|
|||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.goodsType === 'PHYSICAL_GOODS') {
|
||||
return h("div", "实物商品");
|
||||
return h("Tag", {props: {color: "geekblue"}},"实物商品");
|
||||
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
|
||||
return h("div", "虚拟商品");
|
||||
return h("Tag", {props: {color: "purple"}},"虚拟商品");
|
||||
} else {
|
||||
return h("div", "电子卡券");
|
||||
return h("Tag", {props: {color: "cyan"}},"电子卡券");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -297,32 +276,11 @@ export default {
|
|||
width: 120,
|
||||
render: (h, params) => {
|
||||
if (params.row.isAuth == "PASS") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "审核通过",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green"}},"通过");
|
||||
} else if (params.row.isAuth == "TOBEAUDITED") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "待审核",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano"}},"待审核");
|
||||
} else if (params.row.isAuth == "REFUSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "审核拒绝",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "red"}},"审核拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -333,28 +291,12 @@ export default {
|
|||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.marketEnable == "DOWN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "下架",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "red"}},"下架");
|
||||
} else if (params.row.marketEnable == "UPPER") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "上架",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else {
|
||||
return h("Tag", {props: {color: "green"}},"上架");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
|
|
|
@ -317,7 +317,7 @@
|
|||
<editor id="mobileIntr" v-model="baseInfoForm.mobileIntro"></editor>
|
||||
</FormItem>
|
||||
</div>
|
||||
<div v-if="this.baseInfoForm.goodsType!='VIRTUAL_GOODS'">
|
||||
<div v-if="baseInfoForm.goodsType!='VIRTUAL_GOODS'">
|
||||
<h4>商品物流信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem class="form-item-view-el" label="商品重量" prop="weight">
|
||||
|
@ -325,24 +325,11 @@
|
|||
<span slot="append">kg</span>
|
||||
</Input>
|
||||
</FormItem>
|
||||
<FormItem class="form-item-view-el" label="运费" prop="skuList">
|
||||
<RadioGroup type="button" button-style="solid"
|
||||
@on-change="logisticsTemplateChange"
|
||||
v-model="baseInfoForm.freightPayer"
|
||||
>
|
||||
<Radio label="STORE">
|
||||
<span>卖家承担运费</span>
|
||||
</Radio>
|
||||
<Radio label="BUYER">
|
||||
<span>使用物流规则</span>
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="物流模板"
|
||||
prop="templateId"
|
||||
v-if="logisticsTemplateShow"
|
||||
>
|
||||
<Select v-model="baseInfoForm.templateId" style="width: 200px">
|
||||
<Option
|
||||
|
@ -352,7 +339,7 @@
|
|||
>{{ item.name }}
|
||||
</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
</FormItem>
|
||||
</div>
|
||||
<h4>其他信息</h4>
|
||||
<div class="form-item-view">
|
||||
|
@ -431,10 +418,11 @@
|
|||
<Button type="primary" @click="save" :loading="submitLoading" v-if="activestep === 1">
|
||||
{{ this.goodsId ? "保存" : "保存商品" }}
|
||||
</Button>
|
||||
<Button type="primary" @click="saveToDraft('TEMPLATE')" v-if="activestep === 1">保存为模版
|
||||
</Button>
|
||||
<Button type="primary" @click="saveToDraft('DRAFT')" v-if="activestep === 1 && !isOperationGoods">保存至草稿箱
|
||||
<Button type="primary" @click="saveToDraft('TEMPLATE')" v-if="activestep === 1">
|
||||
保存为模版
|
||||
</Button>
|
||||
<!-- <Button type="primary" @click="saveToDraft('DRAFT')" v-if="activestep === 1 && !isOperationGoods">保存至草稿箱
|
||||
</Button> -->
|
||||
</ButtonGroup>
|
||||
|
||||
</div>
|
||||
|
@ -632,8 +620,6 @@ export default {
|
|||
salesModel: "RETAIL",
|
||||
/** 商品参数列表 */
|
||||
goodsParamsList: [],
|
||||
/** 运费承担者 */
|
||||
// freightPayer: "STORE",
|
||||
/** 商品重量 */
|
||||
weight: "",
|
||||
/** 商品相册列表 */
|
||||
|
@ -710,9 +696,6 @@ export default {
|
|||
/** 当前百分比 */
|
||||
currentPercent: 0,
|
||||
|
||||
/** 物流模板是否展示 **/
|
||||
logisticsTemplateShow: false,
|
||||
|
||||
/** 运费模板 **/
|
||||
logisticsTemplate: [],
|
||||
|
||||
|
@ -779,6 +762,12 @@ export default {
|
|||
this.accessToken = {
|
||||
accessToken: this.getStore("accessToken"),
|
||||
};
|
||||
// 获取运费模板
|
||||
API_Shop.getShipTemplate().then((res) => {
|
||||
if (res.success) {
|
||||
this.logisticsTemplate = res.result;
|
||||
}
|
||||
})
|
||||
//编辑商品
|
||||
if (this.$route.query.id) {
|
||||
this.activestep = 1;
|
||||
|
@ -786,7 +775,7 @@ export default {
|
|||
this.GET_GoodData();
|
||||
this.selectGoodsType = false;
|
||||
}
|
||||
//编辑模版/草稿
|
||||
//编辑模版
|
||||
else if (this.$route.query.draftId) {
|
||||
this.draftId = this.$route.query.draftId;
|
||||
this.activestep = 1;
|
||||
|
@ -806,7 +795,6 @@ export default {
|
|||
this.baseInfoForm = {
|
||||
salesModel: "RETAIL",
|
||||
goodsParamsList: [],
|
||||
// freightPayer: "STORE",
|
||||
weight: "",
|
||||
goodsGalleryFiles: [],
|
||||
release: "true",
|
||||
|
@ -984,20 +972,7 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
//选择运费模板则展示运费规则
|
||||
logisticsTemplateChange(v) {
|
||||
if (v == "BUYER") {
|
||||
// 如果买家承担运费 则需要查询运费规则
|
||||
API_Shop.getShipTemplate().then((res) => {
|
||||
if (res.success) {
|
||||
this.logisticsTemplate = res.result;
|
||||
}
|
||||
});
|
||||
this.logisticsTemplateShow = true;
|
||||
} else {
|
||||
this.logisticsTemplateShow = false;
|
||||
}
|
||||
},
|
||||
|
||||
gotoGoodsList() {
|
||||
this.$router.push({ name: "goods" });
|
||||
},
|
||||
|
@ -1053,15 +1028,8 @@ export default {
|
|||
...this.baseInfoForm,
|
||||
...response.result,
|
||||
};
|
||||
console.warn(this.baseInfoForm);
|
||||
// if (this.baseInfoForm.freightPayer === "BUYER") {
|
||||
// API_Shop.getShipTemplate().then((res) => {
|
||||
// if (res.success) {
|
||||
// this.logisticsTemplate = res.result;
|
||||
// }
|
||||
// });
|
||||
// this.logisticsTemplateShow = true;
|
||||
// }
|
||||
// console.warn(this.baseInfoForm);
|
||||
|
||||
this.baseInfoForm.release = "true";
|
||||
this.baseInfoForm.recommend = this.baseInfoForm.recommend
|
||||
? "true"
|
||||
|
@ -1555,7 +1523,6 @@ export default {
|
|||
},
|
||||
/** 下一步*/
|
||||
next() {
|
||||
console.log(111);
|
||||
window.scrollTo(0, 0);
|
||||
if (this.activestep === 0 && this.draftId) {
|
||||
this.activestep = 1;
|
||||
|
@ -1666,10 +1633,6 @@ export default {
|
|||
this.submitLoading = false;
|
||||
return;
|
||||
}
|
||||
//如果选择的是卖家承担运费 则运费模板重置为0
|
||||
// if (this.baseInfoForm.freightPayer !== "BUYER") {
|
||||
// this.baseInfoForm.templateId = 0;
|
||||
// }
|
||||
|
||||
this.baseInfoForm.skuList = this.skuTableData.map((sku) => {
|
||||
delete sku._index;
|
||||
|
@ -1762,7 +1725,7 @@ export default {
|
|||
},
|
||||
});
|
||||
},
|
||||
SAVE_DRAFT_GOODS() {
|
||||
SAVE_DRAFT_GOODS() { // 保存草稿商品
|
||||
API_GOODS.saveDraftGoods(this.baseInfoForm).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.info("保存成功!");
|
||||
|
|
|
@ -134,21 +134,18 @@ export default {
|
|||
key: "name",
|
||||
minWidth: 120
|
||||
},
|
||||
|
||||
{
|
||||
title: "状态",
|
||||
key: "disabled",
|
||||
minWidth: 50,
|
||||
render(h, params) {
|
||||
return h("Badge", {
|
||||
props: {
|
||||
status: params.row.disabled ? "success" : "error",
|
||||
text: params.row.disabled ? "开启" : "关闭",
|
||||
},
|
||||
});
|
||||
if(params.row.disabled){
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "开启")]);
|
||||
}else{
|
||||
return h("div", [h("tag", {props: {color: "volcano"}}, "关闭")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
|
|
|
@ -210,11 +210,11 @@ export default {
|
|||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.grade == "GOOD") {
|
||||
return h("Badge", {props: {status: "success", text: "好评"}})
|
||||
return h("Tag", {props: {color: "green",},}, "好评");
|
||||
} else if (params.row.grade == "MODERATE") {
|
||||
return h("Badge", {props: {status: "success", text: "中评"}})
|
||||
} else if (params.row.grade == "WORSE") {
|
||||
return h("Badge", {props: {status: "error", text: "差评"}})
|
||||
return h("Tag", {props: {color: "orange",},}, "中评");
|
||||
} else {
|
||||
return h("Tag", {props: {color: "red",},}, "差评");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -224,9 +224,9 @@ export default {
|
|||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.status === "OPEN") {
|
||||
return h("Badge", {props: {status: "success", text: "展示"}})
|
||||
return h("Tag", {props: {color: "green"}},"展示")
|
||||
} else {
|
||||
return h("Badge", {props: {status: "error", text: "隐藏"}})
|
||||
return h("Tag", {props: {color: "red"}},"隐藏")
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -236,9 +236,9 @@ export default {
|
|||
width: 110,
|
||||
render: (h, params) => {
|
||||
if (params.row.replyStatus) {
|
||||
return h("Badge", {props: {status: "success", text: "已回复"}})
|
||||
return h("Tag", {props: {color: "green"}},"已回复")
|
||||
} else {
|
||||
return h("Badge", {props: {status: "error", text: "未回复"}})
|
||||
return h("Tag", {props: {color: "blue"}},"未回复")
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -334,7 +334,7 @@ export default {
|
|||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -1,49 +1,50 @@
|
|||
<template>
|
||||
<div>
|
||||
<vuedraggable
|
||||
:list="uploadList"
|
||||
:disabled="!draggable||!multiple"
|
||||
:animation="200"
|
||||
class="list-group"
|
||||
ghost-class="thumb-ghost"
|
||||
@end="onEnd"
|
||||
>
|
||||
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
||||
<div v-if="item.status == 'finished'">
|
||||
<img :src="item.url" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
||||
<Icon v-if="remove" type="ios-trash-outline" @click="handleRemove(item)"></Icon>
|
||||
<div class="upload-pic-thumb">
|
||||
<vuedraggable
|
||||
:list="uploadList"
|
||||
:disabled="!draggable||!multiple"
|
||||
:animation="200"
|
||||
class="list-group"
|
||||
ghost-class="thumb-ghost"
|
||||
@end="onEnd"
|
||||
>
|
||||
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
||||
<div v-if="item.status == 'finished'">
|
||||
<img :src="item.url" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
||||
<Icon v-if="remove" type="ios-trash-outline" @click="handleRemove(item)"></Icon>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
|
||||
</vuedraggable>
|
||||
<Upload
|
||||
:disabled="disable"
|
||||
ref="upload"
|
||||
:multiple="multiple"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleError"
|
||||
:format="['jpg','jpeg','png','gif']"
|
||||
:max-size="maxSize*1024"
|
||||
:on-format-error="handleFormatError"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
:before-upload="handleBeforeUpload"
|
||||
type="drag"
|
||||
:action="uploadFileUrl"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block;width:58px;"
|
||||
v-if="!isView"
|
||||
>
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Icon type="md-camera" size="20"></Icon>
|
||||
</div>
|
||||
</div>
|
||||
</vuedraggable>
|
||||
<Upload
|
||||
:disabled="disable"
|
||||
ref="upload"
|
||||
:multiple="multiple"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleError"
|
||||
:format="['jpg','jpeg','png','gif']"
|
||||
:max-size="maxSize*1024"
|
||||
:on-format-error="handleFormatError"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
:before-upload="handleBeforeUpload"
|
||||
type="drag"
|
||||
:action="uploadFileUrl"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block;width:58px;"
|
||||
v-if="!isView"
|
||||
>
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Icon type="md-camera" size="20"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
|
||||
</Upload>
|
||||
</div>
|
||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
||||
<div slot="footer">
|
||||
|
@ -252,10 +253,12 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.upload-pic-thumb{
|
||||
display: flex;
|
||||
}
|
||||
.upload-list {
|
||||
display: inline-block;
|
||||
display: inline-flex;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
|
@ -267,6 +270,7 @@ export default {
|
|||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
margin-right: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.upload-list img {
|
||||
width: 100%;
|
||||
|
|
|
@ -185,17 +185,17 @@
|
|||
key: "complainStatus",
|
||||
render: (h, params) => {
|
||||
if (params.row.complainStatus == "NEW") {
|
||||
return h('div', [h('span', { }, '新投诉'),]);
|
||||
return h('div', [h('tag',{props: {color: "purple"}}, '新投诉'),]);
|
||||
} 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") {
|
||||
return h('div', [h('span', { }, '待申诉'),]);
|
||||
return h('div', [h('tag', {props: {color: "volcano"}}, '待申诉'),]);
|
||||
} 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") {
|
||||
return h('div', [h('span', { }, '等待仲裁'),]);
|
||||
return h('div', [h('tag', {props: {color: "blue"}}, '等待仲裁'),]);
|
||||
}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,
|
||||
render: (h, params) => {
|
||||
if (params.row.serviceStatus == "APPLY") {
|
||||
return h('div', [h('span', { }, '申请售后'),]);
|
||||
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
|
||||
} 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") {
|
||||
return h('div', [h('span', { }, '审核拒绝'),]);
|
||||
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
|
||||
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
||||
return h('div', [h('span', { }, '买家退货,待卖家收货'),]);
|
||||
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
|
||||
return h('div', [h('span', { }, '商家换货/补发'),]);
|
||||
}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 == "COMPLETE") {
|
||||
return h('div', [h('span', { }, '完成'),]);
|
||||
return h('div', [h('tag', {props: {color: "orange"}}, '买家退货,待卖家收货'),]);
|
||||
} else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
||||
return h('div', [h('tag', {props: {color: "gold"}}, '卖家确认收货'),]);
|
||||
} else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
||||
return h('div', [h('tag', {props: {color: "lime"}}, '卖家终止售后'),]);
|
||||
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
||||
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
|
||||
} else if (params.row.serviceStatus == "COMPLETE") {
|
||||
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
|
||||
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
||||
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -182,27 +182,17 @@
|
|||
minWidth: 120,
|
||||
render: (h, params) => {
|
||||
if (params.row.serviceStatus == "APPLY") {
|
||||
return h('div', [h('span', { }, '申请售后'),]);
|
||||
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
|
||||
} 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") {
|
||||
return h('div', [h('span', { }, '审核拒绝'),]);
|
||||
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
||||
return h('div', [h('span', { }, '买家退货,待卖家收货'),]);
|
||||
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
|
||||
return h('div', [h('span', { }, '商家换货/补发'),]);
|
||||
}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', { }, '买家取消售后'),]);
|
||||
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
|
||||
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
||||
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
|
||||
} else if (params.row.serviceStatus == "COMPLETE") {
|
||||
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
|
||||
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
||||
return h('div', [h('span', { }, '等待平台退款'),]);
|
||||
}else if (params.row.serviceStatus == "COMPLETE") {
|
||||
return h('div', [h('span', { }, '完成'),]);
|
||||
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<div class="div-item">
|
||||
<div class="div-item-left">订单来源:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.order.clientType }}
|
||||
{{ orderInfo.order.clientType | clientTypeWay }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -126,19 +126,19 @@ export default {
|
|||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.orderStatus == "UNPAID") {
|
||||
return h("div", [h("span", {}, "未付款")]);
|
||||
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "待发货")]);
|
||||
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "已完成")]);
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "已取消")]);
|
||||
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -135,19 +135,19 @@ export default {
|
|||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.orderStatus == "UNPAID") {
|
||||
return h("div", [h("span", {}, "未付款")]);
|
||||
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "待发货")]);
|
||||
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "已完成")]);
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||
} 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") {
|
||||
return h("div", [h("span", {}, "已取消")]);
|
||||
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -161,17 +161,10 @@
|
|||
tooltip: true,
|
||||
render: (h, params) => {
|
||||
if(params.row.receiptStatus == 0){
|
||||
return h(
|
||||
"div",
|
||||
"未开票"
|
||||
);
|
||||
return h("div", [h("tag", {props: {color: "volcano"}}, "未开票")]);
|
||||
}else{
|
||||
return h(
|
||||
"div",
|
||||
"已开票"
|
||||
);
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "未开票")]);
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -180,19 +173,19 @@
|
|||
width: 90,
|
||||
render: (h, params) => {
|
||||
if (params.row.orderStatus == "UNPAID") {
|
||||
return h('div', [h('span', { }, '未付款'),]);
|
||||
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||
} 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") {
|
||||
return h('div', [h('span', { }, '待发货'),]);
|
||||
}else if (params.row.orderStatus == "DELIVERED") {
|
||||
return h('div', [h('span', { }, '已发货'),]);
|
||||
}else if (params.row.orderStatus == "COMPLETED") {
|
||||
return h('div', [h('span', { }, '已完成'),]);
|
||||
}else if (params.row.orderStatus == "TAKE") {
|
||||
return h('div', [h('span', { }, '待核验'),]);
|
||||
}else if (params.row.orderStatus == "CANCELLED") {
|
||||
return h('div', [h('span', { }, '已取消'),]);
|
||||
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"}}, "已取消")]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,29 +2,12 @@
|
|||
<div class="search">
|
||||
<Card>
|
||||
<Row>
|
||||
<Form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="100"
|
||||
class="search-form"
|
||||
>
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="100" class="search-form">
|
||||
<Form-item label="优惠券名称">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.couponName"
|
||||
placeholder="请输入优惠券名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
<Input type="text" v-model="searchForm.couponName" placeholder="请输入优惠券名称" clearable style="width: 200px" />
|
||||
</Form-item>
|
||||
<Form-item label="活动状态" prop="promotionStatus">
|
||||
<Select
|
||||
v-model="searchForm.promotionStatus"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px">
|
||||
<Option value="NEW">未开始</Option>
|
||||
<Option value="START">已开始/上架</Option>
|
||||
<Option value="END">已结束/下架</Option>
|
||||
|
@ -32,21 +15,9 @@
|
|||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="活动时间">
|
||||
<DatePicker
|
||||
v-model="selectDate"
|
||||
type="daterange"
|
||||
clearable
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
></DatePicker>
|
||||
<DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px"></DatePicker>
|
||||
</Form-item>
|
||||
<Button
|
||||
@click="handleSearch"
|
||||
type="primary"
|
||||
class="search-btn"
|
||||
icon="ios-search"
|
||||
>搜索</Button
|
||||
>
|
||||
<Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button>
|
||||
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
|
@ -55,57 +26,22 @@
|
|||
<Button @click="delAll" class="ml_10">批量下架</Button>
|
||||
<!-- <Button @click="upAll">批量上架</Button> -->
|
||||
</Row>
|
||||
<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">
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'"
|
||||
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
|
||||
>
|
||||
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" 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>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="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]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></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]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getShopCouponList,
|
||||
updateCouponStatus,
|
||||
} from "@/api/promotion";
|
||||
import { getShopCouponList, updateCouponStatus } from "@/api/promotion";
|
||||
|
||||
export default {
|
||||
name: "coupon",
|
||||
|
@ -143,18 +79,19 @@ export default {
|
|||
{
|
||||
title: "活动名称",
|
||||
key: "promotionName",
|
||||
width: 120,
|
||||
minWidth: 100,
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "优惠券名称",
|
||||
key: "couponName",
|
||||
width: 120,
|
||||
tooltip: true
|
||||
}, {
|
||||
minWidth: 100,
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
title: "面额/折扣",
|
||||
key: "price",
|
||||
width: 120,
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.price) {
|
||||
return h(
|
||||
|
@ -170,11 +107,13 @@ export default {
|
|||
{
|
||||
title: "领取数量/总数量",
|
||||
key: "publishNum",
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div", params.row.receivedNum + "/" + params.row.publishNum)
|
||||
"div",
|
||||
params.row.receivedNum + "/" + params.row.publishNum
|
||||
);
|
||||
},
|
||||
minWidth:130,
|
||||
},
|
||||
{
|
||||
title: "优惠券类型",
|
||||
|
@ -210,21 +149,28 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "活动时间",
|
||||
|
||||
render: (h, params) => {
|
||||
return h("div", {
|
||||
domProps:
|
||||
{innerHTML: params.row.startTime + "<br/>" + params.row.endTime}
|
||||
});
|
||||
if (params.row.getType === "ACTIVITY") {
|
||||
return h("div", "长期有效");
|
||||
} else {
|
||||
return h("div", {
|
||||
domProps: {
|
||||
innerHTML:
|
||||
params.row.startTime + "<br/>" + params.row.endTime,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
minWidth:150,
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
width: 100,
|
||||
key: "promotionStatus",
|
||||
fixed: "right",
|
||||
render: (h, params) => {
|
||||
let text = "未知",
|
||||
color = "";
|
||||
color = "red";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "default";
|
||||
|
@ -250,14 +196,14 @@ export default {
|
|||
),
|
||||
]);
|
||||
},
|
||||
minWidth:70,
|
||||
minWidth: 70,
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
slot: "action",
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
minWidth: 140
|
||||
maxWidth: 140,
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
|
@ -292,8 +238,8 @@ export default {
|
|||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.searchForm = {}
|
||||
this.selectDate = ''
|
||||
this.searchForm = {};
|
||||
this.selectDate = "";
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.getDataList();
|
||||
},
|
||||
|
@ -423,7 +369,7 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
activated () {
|
||||
activated() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
|
|
|
@ -328,20 +328,34 @@ export default {
|
|||
this.$set(this, "liveData", way);
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交直播间商品
|
||||
*/
|
||||
addGoods() {
|
||||
addLiveGoods({
|
||||
roomId: this.$route.query.roomId,
|
||||
liveGoodsId: item.liveGoodsId,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* dialog点击确定时判断
|
||||
*/
|
||||
addGoods() {
|
||||
console.log(this.commodityList);
|
||||
this.liveData.forEach((item, index) => {
|
||||
this.commodityList.forEach((oldVal, i) => {
|
||||
// 如果商品里面没有商品,以及添加商品为第一次的话
|
||||
if (oldVal.liveGoodsId != item.liveGoodsId) {
|
||||
addLiveGoods({
|
||||
roomId: this.$route.query.roomId,
|
||||
liveGoodsId: item.liveGoodsId,
|
||||
});
|
||||
}
|
||||
});
|
||||
if (this.commodityList.length == 1 && this.liveData.length == 1) {
|
||||
addLiveGoods({
|
||||
roomId: this.$route.query.roomId,
|
||||
liveGoodsId: item.liveGoodsId,
|
||||
});
|
||||
} else {
|
||||
this.commodityList.forEach((oldVal, i) => {
|
||||
// 如果商品里面没有商品,以及添加商品为第一次的话
|
||||
if (oldVal.liveGoodsId != item.liveGoodsId) {
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -132,15 +132,13 @@
|
|||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.billStatus == "OUT") {
|
||||
return h( "Badge", {props: { status: "success",text: "已出账" } })
|
||||
} else if (params.row.billStatus == "EXAMINE") {
|
||||
return h( "Badge", {props: { status: "success",text: "已审核" } })
|
||||
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||
} else if (params.row.billStatus == "CHECK") {
|
||||
return h( "Badge", {props: { status: "success",text: "已对账" } })
|
||||
} else if (params.row.billStatus == "PAY") {
|
||||
return h( "Badge", {props: { status: "success",text: "已付款" } })
|
||||
}else if (params.row.billStatus == "COMPLETE") {
|
||||
return h( "Badge", {props: { status: "success",text: "已完成" } })
|
||||
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||
} else if (params.row.billStatus == "EXAMINE") {
|
||||
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||
} else {
|
||||
return h("Tag", {props: {color: "green",},},"已付款");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -143,15 +143,13 @@
|
|||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.billStatus == "OUT") {
|
||||
return h( "Badge", {props: { status: "success",text: "已出账" } })
|
||||
} else if (params.row.billStatus == "EXAMINE") {
|
||||
return h( "Badge", {props: { status: "success",text: "已审核" } })
|
||||
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||
} else if (params.row.billStatus == "CHECK") {
|
||||
return h( "Badge", {props: { status: "success",text: "已对账" } })
|
||||
} else if (params.row.billStatus == "PAY") {
|
||||
return h( "Badge", {props: { status: "success",text: "已付款" } })
|
||||
}else if (params.row.billStatus == "COMPLETE") {
|
||||
return h( "Badge", {props: { status: "success",text: "已完成" } })
|
||||
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||
} else if (params.row.billStatus == "EXAMINE") {
|
||||
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||
} else {
|
||||
return h("Tag", {props: {color: "green",},},"已付款");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -58,10 +58,10 @@
|
|||
minWidth: 120,
|
||||
sortable: true,
|
||||
render: (h, params) => {
|
||||
if (params.row.selected === null || params.row.selected === "") {
|
||||
return h( "Badge", {props: { status: "error",text: "关闭" } })
|
||||
} else if (params.row.selected !== "") {
|
||||
return h( "Badge", {props: { status: "success",text: "开启" } })
|
||||
if(params.row.selected === null || params.row.selected === ""){
|
||||
return h("div", [h("tag", {props: {color: "volcano"}}, "关闭")]);
|
||||
}else{
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "开启")]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue