Merge branch 'master' into ma
commit
7b2054206a
|
@ -151,7 +151,7 @@ export default {
|
||||||
count: 1, // 商品数量
|
count: 1, // 商品数量
|
||||||
imgIndex: 0, // 展示图片下标
|
imgIndex: 0, // 展示图片下标
|
||||||
currentSelceted: [], // 当前商品sku
|
currentSelceted: [], // 当前商品sku
|
||||||
imgList: this.detail.data.specList[0].specImage, // 商品图片列表
|
imgList: this.detail.data.specList[0].specImage || [], // 商品图片列表
|
||||||
skuDetail: this.detail.data, // sku详情
|
skuDetail: this.detail.data, // sku详情
|
||||||
goodsSpecList: this.detail.specs, // 商品spec
|
goodsSpecList: this.detail.specs, // 商品spec
|
||||||
promotionMap: { // 活动状态
|
promotionMap: { // 活动状态
|
||||||
|
@ -199,13 +199,18 @@ export default {
|
||||||
skuId: this.skuDetail.id
|
skuId: this.skuDetail.id
|
||||||
};
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
console.log(11111111);
|
||||||
addCartGoods(params).then(res => {
|
addCartGoods(params).then(res => {
|
||||||
|
debugger;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
||||||
} else {
|
} else {
|
||||||
this.$Message.warning(res.message);
|
this.$Message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
console.log('catch');
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
buyNow () { // 立即购买
|
buyNow () { // 立即购买
|
||||||
|
@ -222,6 +227,8 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$Message.warning(res.message);
|
this.$Message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading1 = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
pointPay () { // 积分购买
|
pointPay () { // 积分购买
|
||||||
|
|
|
@ -11,42 +11,37 @@
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- 普通发票 -->
|
<!-- 普通发票 -->
|
||||||
<div class="nav-content">
|
<div class="nav-content">
|
||||||
<Form
|
<Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
|
||||||
:model="invoiceForm"
|
|
||||||
ref="form"
|
|
||||||
label-position="left"
|
|
||||||
:rules="ruleInline"
|
|
||||||
:label-width="110"
|
|
||||||
>
|
|
||||||
<FormItem label="发票类型">
|
<FormItem label="发票类型">
|
||||||
<RadioGroup v-model="invoiceForm.type" type="button" button-style="solid">
|
<RadioGroup v-model="invoice" type="button" button-style="solid">
|
||||||
|
<Radio @on-change="changeInvoice" :label="1">电子普通发票</Radio>
|
||||||
|
<Radio :label="2" :disabled="true">增值税专用发票</Radio>
|
||||||
|
</RadioGroup>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="发票抬头">
|
||||||
|
<RadioGroup v-model="type" @on-change="changeInvoice" type="button" button-style="solid">
|
||||||
<Radio :label="1">个人</Radio>
|
<Radio :label="1">个人</Radio>
|
||||||
<Radio :label="2">单位</Radio>
|
<Radio :label="2">单位</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem label="个人名称" v-if="type === 1" prop="receiptTitle">
|
||||||
label="发票抬头"
|
|
||||||
v-if="invoiceForm.type == 2"
|
|
||||||
prop="receiptTitle"
|
|
||||||
>
|
|
||||||
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem label="单位名称" v-if="type === 2" prop="receiptTitle">
|
||||||
label="纳税人识别号"
|
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
||||||
v-if="invoiceForm.type == 2"
|
</FormItem>
|
||||||
prop="taxpayerId"
|
<FormItem label="纳税人识别号" v-if="type === 2" prop="taxpayerId">
|
||||||
>
|
|
||||||
<i-input v-model="invoiceForm.taxpayerId"></i-input>
|
<i-input v-model="invoiceForm.taxpayerId"></i-input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="发票内容">
|
<FormItem label="发票内容">
|
||||||
<RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
|
<RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
|
||||||
<Radio label="不开发票">不开发票</Radio>
|
|
||||||
<Radio label="商品明细">商品明细</Radio>
|
<Radio label="商品明细">商品明细</Radio>
|
||||||
|
<Radio label="商品类别">商品类别</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<Button type="primary" :loading="loading" @click="save">保存发票信息</Button>
|
<Button type="primary" :loading="loading" @click="submit">保存发票信息</Button>
|
||||||
<Button type="default" @click="invoiceAvailable = false">取消</Button>
|
<Button type="default" @click="invoiceAvailable = false">取消</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,20 +49,21 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { saveReceipt } from '@/api/member.js';
|
import { receiptSelect } from '@/api/cart.js';
|
||||||
import { TINumber } from '@/plugins/RegExp.js';
|
import { TINumber } from '@/plugins/RegExp.js';
|
||||||
export default {
|
export default {
|
||||||
name: 'invoiceModal',
|
name: 'invoiceModal',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
invoice: 1,
|
||||||
invoiceAvailable: false, // 模态框显隐
|
invoiceAvailable: false, // 模态框显隐
|
||||||
loading: false, // 提交状态
|
loading: false, // 提交状态
|
||||||
invoiceForm: { // 发票表单
|
invoiceForm: {
|
||||||
|
// 发票表单
|
||||||
// 普票表单
|
// 普票表单
|
||||||
receiptTitle: '', // 发票抬头
|
receiptTitle: '', // 发票抬头
|
||||||
taxpayerId: '', // 纳税人识别号
|
taxpayerId: '', // 纳税人识别号
|
||||||
receiptContent: '不开发票', // 发票内容
|
receiptContent: '商品明细', // 发票内容
|
||||||
type: 1 // 1 个人 2 单位
|
|
||||||
},
|
},
|
||||||
type: 1, // 1 个人 2 单位
|
type: 1, // 1 个人 2 单位
|
||||||
ruleInline: {
|
ruleInline: {
|
||||||
|
@ -78,63 +74,76 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ["invoiceData"],
|
props: ['invoiceData'],
|
||||||
watch: {
|
watch: {
|
||||||
invoiceData: {
|
invoiceData: {
|
||||||
handler(val) {
|
handler (val) {
|
||||||
this.invoiceForm = { ...val };
|
this.invoiceForm = { ...val };
|
||||||
|
|
||||||
if (flag) {
|
if (val.taxpayerId) {
|
||||||
let params = {
|
this.type = 2;
|
||||||
receiptTitle: '个人',
|
} else {
|
||||||
receiptContent: this.invoiceForm.receiptContent
|
this.type = 1;
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
saveReceipt(params)
|
|
||||||
.then((res) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (res.success) {
|
|
||||||
this.$emit('change', res.result);
|
|
||||||
this.invoiceAvailable = false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} else {
|
},
|
||||||
// 单位
|
deep: true,
|
||||||
|
immeadite: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 选择发票抬头
|
||||||
|
*/
|
||||||
|
changeInvoice (val) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.type = val;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存判断
|
||||||
|
*/
|
||||||
|
save () {
|
||||||
|
let flage = true;
|
||||||
|
|
||||||
|
// 保存分为两种类型,个人以及企业
|
||||||
|
const { type, receiptTitle, receiptContent } = JSON.parse(
|
||||||
|
JSON.stringify(this.invoiceForm)
|
||||||
|
);
|
||||||
|
|
||||||
|
// 判断是否填写发票抬头
|
||||||
|
if (!receiptTitle) {
|
||||||
|
this.$Message.error('请填写发票抬头!');
|
||||||
|
flage = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type === 2) {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (!valid) {
|
||||||
this.loading = true;
|
flage = false;
|
||||||
let params = {
|
|
||||||
receiptTitle: this.invoiceForm.receiptTitle,
|
|
||||||
taxpayerId: this.invoiceForm.taxpayerId,
|
|
||||||
receiptContent: this.invoiceForm.receiptContent
|
|
||||||
};
|
|
||||||
let flag = true;
|
|
||||||
this.receiptItems.forEach((e) => {
|
|
||||||
if (e.taxpayerId === params.taxpayerId) {
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (!flag) {
|
|
||||||
this.$Message.error('已有当前税号的发票信息,请直接选择已有发票');
|
|
||||||
} else {
|
|
||||||
saveReceipt(params)
|
|
||||||
.then((res) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (res.success) {
|
|
||||||
this.$emit('change', res.result);
|
|
||||||
this.invoiceAvailable = false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.loading = 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 () {
|
created () {
|
||||||
this.getGoodsDetail();
|
this.getGoodsDetail();
|
||||||
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
>人评价
|
>人评价
|
||||||
</div>
|
</div>
|
||||||
<div class="goods-show-seller">
|
<div class="goods-show-seller">
|
||||||
<span>{{ item.storeName }}</span>
|
<Tag v-if="item.selfOperated" style="padding:0 4px;" size="small" color="error">自营</Tag><span>{{ item.storeName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -108,7 +108,7 @@ export default {
|
||||||
this.pageNumber = 1;
|
this.pageNumber = 1;
|
||||||
this.params.pageSize = val;
|
this.params.pageSize = val;
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -132,10 +132,10 @@ export default {
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected-cate{
|
.selected-cate{
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.page-size {
|
.page-size {
|
||||||
width: 1200px;
|
width: 1200px;
|
||||||
|
|
|
@ -93,13 +93,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<Row type="flex" justify="space-around" class="help">
|
<Row type="flex" justify="space-around" class="help">
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">帮助</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">帮助</a>
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">隐私</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">隐私</a>
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">条款</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">条款</a>
|
||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © 2020 - Present
|
Copyright © 2020 - Present
|
||||||
<a href="http://lili.cn" target="_blank" style="margin: 0 5px"
|
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
|
||||||
>lili-shop</a
|
>lili-shop</a
|
||||||
>
|
>
|
||||||
版权所有
|
版权所有
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
<div>{{ filterOrderStatus(order.orderStatus) }}</div>
|
<div>{{ filterOrderStatus(order.orderStatus) }}</div>
|
||||||
<div>
|
<div>
|
||||||
订单号:{{ order.sn }} {{order.createTime}}
|
订单号:{{ order.sn }} {{order.createTime}}
|
||||||
{{ order.memberName | secrecyMobile }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -4,15 +4,23 @@
|
||||||
<!-- LOGO 步骤条 -->
|
<!-- LOGO 步骤条 -->
|
||||||
<div class="width_1200 logo">
|
<div class="width_1200 logo">
|
||||||
<div>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<div class="cart-steps">
|
<div class="cart-steps">
|
||||||
<span :class="stepIndex==1?'active':''">1.我的购物车</span>
|
<span :class="stepIndex == 1 ? 'active' : ''">1.我的购物车</span>
|
||||||
<Icon :class="stepIndex==1?'active-arrow':''" custom="icomoon icon-next"></Icon>
|
<Icon
|
||||||
<span :class="stepIndex==1?'active':''">2.填写订单信息</span>
|
:class="stepIndex == 1 ? 'active-arrow' : ''"
|
||||||
<Icon :class="stepIndex==1?'active-arrow':''" custom="icomoon icon-next"></Icon>
|
custom="icomoon icon-next"
|
||||||
<span :class="stepIndex==2?'active':''">3.成功提交订单</span>
|
></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>
|
||||||
</div>
|
</div>
|
||||||
<Divider />
|
<Divider />
|
||||||
|
@ -24,18 +32,35 @@
|
||||||
<span @click="goAddressManage">管理收货人地址</span>
|
<span @click="goAddressManage">管理收货人地址</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="address-manage">
|
<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 = ''"
|
<div
|
||||||
@click="selectAddress(item)" v-for="(item,index) in addressList" :key="index">
|
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>
|
<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.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>
|
||||||
<div>{{item.mobile}}</div>
|
|
||||||
<div>{{ item.consigneeAddressPath | unitAddress }} {{item.detail}}</div>
|
|
||||||
<div class="edit-btn" v-show="showEditBtn === index">
|
<div class="edit-btn" v-show="showEditBtn === index">
|
||||||
<span @click.stop="editAddress(item.id)">修改</span>
|
<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>
|
||||||
<div class="corner-icon" v-show="selectedAddress.id === item.id">
|
<div class="corner-icon" v-show="selectedAddress.id === item.id">
|
||||||
<div></div>
|
<div></div>
|
||||||
|
@ -48,8 +73,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="more-addr" @click="moreAddr = !moreAddr" v-if="addressList.length>3">
|
<div
|
||||||
{{moreAddr ? '收起地址' : '更多地址'}}
|
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-dropdown" />
|
||||||
<Icon v-show="moreAddr" type="md-arrow-dropup" />
|
<Icon v-show="moreAddr" type="md-arrow-dropup" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,10 +89,17 @@
|
||||||
<span>商品信息</span>
|
<span>商品信息</span>
|
||||||
<span @click="$router.push('/cart')">返回购物车</span>
|
<span @click="$router.push('/cart')">返回购物车</span>
|
||||||
</div>
|
</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">
|
<div class="shop-name">
|
||||||
<span>
|
<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>
|
||||||
<!-- <span>
|
<!-- <span>
|
||||||
<p style="width:120px">配送方式:</p>
|
<p style="width:120px">配送方式:</p>
|
||||||
|
@ -73,33 +109,60 @@
|
||||||
</span> -->
|
</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="goods-list">
|
<div class="goods-list">
|
||||||
<div class="goods-item" v-for="(goods,goodsIndex) in shop.skuList" :key="goodsIndex">
|
<div
|
||||||
<span class="hover-color" @click="goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)">
|
class="goods-item"
|
||||||
<img :src="goods.goodsSku.thumbnail" alt="">
|
v-for="(goods, goodsIndex) in shop.skuList"
|
||||||
<span style="vertical-align:top;">{{goods.goodsSku.goodsName}}</span>
|
: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>
|
||||||
<span class="goods-price">{{goods.goodsSku.price | unitPrice('¥')}}</span>
|
<span class="goods-price">{{
|
||||||
<span>x{{goods.num}}</span>
|
goods.goodsSku.price | unitPrice("¥")
|
||||||
<span>{{goods.goodsSku.quantity > 0 ? '有货' : '无货'}}</span>
|
}}</span>
|
||||||
<span class="goods-price">{{goods.goodsSku.price * goods.num | 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>
|
</div>
|
||||||
<div class="order-mark">
|
<div class="order-mark">
|
||||||
<Input type="textarea" maxlength="60" v-model="shop.remark" show-word-limit placeholder="订单备注" />
|
<Input
|
||||||
<span style="font-size:12px;color:#999;">提示:请勿填写有关支付、收货、发票方面的信息</span>
|
type="textarea"
|
||||||
|
maxlength="60"
|
||||||
|
v-model="shop.remark"
|
||||||
|
show-word-limit
|
||||||
|
placeholder="订单备注"
|
||||||
|
/>
|
||||||
|
<span style="font-size: 12px; color: #999"
|
||||||
|
>提示:请勿填写有关支付、收货、发票方面的信息</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 发票信息 -->
|
<!-- 发票信息 -->
|
||||||
<div class="invoice">
|
<div class="invoice">
|
||||||
<div class="card-head mt_20 mb_20">
|
<div class="card-head mt_20 mb_20">
|
||||||
<span class="relative">发票信息<span class="inv-tips">
|
<span class="relative"
|
||||||
<Icon type="ios-alert-outline" />开企业抬头发票须填写纳税人识别号,以免影响报销
|
>发票信息<span class="inv-tips">
|
||||||
</span></span>
|
<Icon
|
||||||
|
type="ios-alert-outline"
|
||||||
|
/>开企业抬头发票须填写纳税人识别号,以免影响报销
|
||||||
|
</span></span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="inovice-content">
|
<div class="inovice-content">
|
||||||
<span>{{invoiceData.receiptTitle}}</span>
|
<span>{{ invoiceData.receiptTitle }}</span>
|
||||||
<span>{{invoiceData.receiptContent}}</span>
|
<span>{{ invoiceData.receiptContent }}</span>
|
||||||
<span @click="editInvoice">编辑</span>
|
<span @click="editInvoice">编辑</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -108,24 +171,49 @@
|
||||||
<div class="card-head mt_20 mb_20">
|
<div class="card-head mt_20 mb_20">
|
||||||
<span class="relative">优惠券</span>
|
<span class="relative">优惠券</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="couponList.length === 0">
|
<div v-if="couponList.length === 0">无可用优惠券</div>
|
||||||
无可用优惠券
|
|
||||||
</div>
|
|
||||||
<ul v-else class="coupon-list">
|
<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 class="c-left">
|
||||||
<div>
|
<div>
|
||||||
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
|
<span
|
||||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span>折</span>
|
v-if="item.couponType === 'PRICE'"
|
||||||
<span class="describe">满{{item.consumeThreshold}}元可用</span>
|
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>
|
</div>
|
||||||
<p>使用范围:{{useScope(item.scopeType)}}</p>
|
<p>使用范围:{{ useScope(item.scopeType) }}</p>
|
||||||
<p>有效期:{{item.endTime}}</p>
|
<p>有效期:{{ item.endTime }}</p>
|
||||||
</div>
|
</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>
|
<b></b>
|
||||||
<a class="c-right" @click="useCoupon(item.id, true)">立即使用</a>
|
<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-top"></i>
|
||||||
<i class="circle-bottom"></i>
|
<i class="circle-bottom"></i>
|
||||||
</li>
|
</li>
|
||||||
|
@ -138,81 +226,116 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<span>使用积分:</span><Input type="text" style="width:100px;" v-model.number="otherMsgForm.point" placeholder="请输入使用积分" /> <span style="color:#999;">您当前的可用积分为 {{otherMsgForm.totalPoint}}
|
<span>使用积分:</span
|
||||||
,本订单最多可以使用{{otherMsgForm.availablePoint}}</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>
|
||||||
</div>
|
</div>
|
||||||
<!-- 订单价格 -->
|
<!-- 订单价格 -->
|
||||||
<div class="order-price">
|
<div class="order-price">
|
||||||
<div>
|
<div>
|
||||||
<span>{{totalNum}}件商品,总商品金额:</span><span>{{priceDetailDTO.goodsPrice | unitPrice('¥')}}</span>
|
<span>{{ totalNum }}件商品,总商品金额:</span
|
||||||
|
><span>{{ priceDetailDTO.goodsPrice | unitPrice("¥") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>运费:</span><span>{{ priceDetailDTO.freightPrice | unitPrice('¥')}}</span>
|
<span>运费:</span
|
||||||
|
><span>{{ priceDetailDTO.freightPrice | unitPrice("¥") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
||||||
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 底部支付栏 -->
|
<!-- 底部支付栏 -->
|
||||||
<div class="order-footer width_1200">
|
<div class="order-footer width_1200">
|
||||||
<div class="pay ml_20" @click="pay">提交订单</div>
|
<div class="pay ml_20" @click="pay">提交订单</div>
|
||||||
<div class="pay-address" v-if="addressList.length">配送至:{{ selectedAddress.consigneeAddressPath | unitAddress }}
|
<div class="pay-address" v-if="addressList.length">
|
||||||
{{selectedAddress.detail}} 收货人:{{selectedAddress.name}} {{selectedAddress.mobile}}</div>
|
配送至:{{ selectedAddress.consigneeAddressPath | unitAddress }}
|
||||||
|
{{ selectedAddress.detail }} 收货人:{{
|
||||||
|
selectedAddress.name
|
||||||
|
}} {{ selectedAddress.mobile }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<BaseFooter></BaseFooter>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import invoiceModal from "@/components/invoiceModal";
|
import invoiceModal from '@/components/invoiceModal';
|
||||||
import addressManage from "@/components/addressManage";
|
import addressManage from '@/components/addressManage';
|
||||||
import { memberAddress, delMemberAddress } from "@/api/address";
|
import { memberAddress, delMemberAddress } from '@/api/address';
|
||||||
import {
|
import {
|
||||||
cartGoodsPay,
|
cartGoodsPay,
|
||||||
createTrade,
|
createTrade,
|
||||||
selectAddr,
|
selectAddr,
|
||||||
shippingMethod,
|
shippingMethod,
|
||||||
selectCoupon,
|
selectCoupon,
|
||||||
couponNum,
|
couponNum
|
||||||
} from "@/api/cart";
|
} from '@/api/cart';
|
||||||
import { canUseCouponList } from "@/api/member.js";
|
import { canUseCouponList } from '@/api/member.js';
|
||||||
import { getLogo } from "@/api/common.js";
|
import { getLogo } from '@/api/common.js';
|
||||||
export default {
|
export default {
|
||||||
name: "Pay",
|
name: 'Pay',
|
||||||
components: { invoiceModal, addressManage },
|
components: { invoiceModal, addressManage },
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
stepIndex: 1, // 顶部步骤条状态
|
stepIndex: 1, // 顶部步骤条状态
|
||||||
invoiceAvailable: false, // 发票编辑按钮
|
invoiceAvailable: false, // 发票编辑按钮
|
||||||
showEditBtn: "", // 鼠标移入显示编辑按钮
|
showEditBtn: '', // 鼠标移入显示编辑按钮
|
||||||
orderMark: "", // 订单备注
|
orderMark: '', // 订单备注
|
||||||
invoiceData: {
|
invoiceData: {
|
||||||
// 发票数据
|
// 发票数据
|
||||||
receiptTitle: "个人",
|
receiptTitle: '个人',
|
||||||
receiptContent: "不开发票",
|
receiptContent: '不开发票'
|
||||||
},
|
},
|
||||||
otherMsgForm: {
|
otherMsgForm: {
|
||||||
// 其他信息模块数据
|
// 其他信息模块数据
|
||||||
point: 0,
|
point: 0,
|
||||||
availablePoint: 10,
|
availablePoint: 10,
|
||||||
totalPoint: 100,
|
totalPoint: 100,
|
||||||
noGoods: 0,
|
noGoods: 0
|
||||||
},
|
},
|
||||||
deliveryList: [
|
deliveryList: [
|
||||||
// 物流
|
// 物流
|
||||||
// {value: 'SELF_PICK_UP', label: '自提'},
|
// {value: 'SELF_PICK_UP', label: '自提'},
|
||||||
{ value: "LOGISTICS", label: "物流" },
|
{ value: 'LOGISTICS', label: '物流' }
|
||||||
// {value: 'LOCAL_TOWN_DELIVERY', label: '同城配送'}
|
// {value: 'LOCAL_TOWN_DELIVERY', label: '同城配送'}
|
||||||
],
|
],
|
||||||
addressList: [], // 地址列表
|
addressList: [], // 地址列表
|
||||||
|
@ -220,37 +343,37 @@ export default {
|
||||||
goodsList: [], // 商品列表
|
goodsList: [], // 商品列表
|
||||||
priceDetailDTO: {}, // 商品价格
|
priceDetailDTO: {}, // 商品价格
|
||||||
totalNum: 0, // 购买数量
|
totalNum: 0, // 购买数量
|
||||||
addrId: "", // 编辑地址传入的id
|
addrId: '', // 编辑地址传入的id
|
||||||
moreAddr: false, // 更多地址
|
moreAddr: false, // 更多地址
|
||||||
canUseCouponNum: 0, // 可用优惠券数量
|
canUseCouponNum: 0, // 可用优惠券数量
|
||||||
couponList: [], // 可用优惠券列表
|
couponList: [], // 可用优惠券列表
|
||||||
logoImg: "", // 平台logo
|
logoImg: '', // 平台logo
|
||||||
usedCouponId: [], // 已使用优惠券id
|
usedCouponId: [], // 已使用优惠券id
|
||||||
selectedCoupon: {}, // 已选优惠券对象
|
selectedCoupon: {} // 已选优惠券对象
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted () {
|
||||||
this.init();
|
this.init();
|
||||||
if (!this.Cookies.getItem("logo")) {
|
if (!this.Cookies.getItem('logo')) {
|
||||||
getLogo().then((res) => {
|
getLogo().then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let logoObj = JSON.parse(res.result.settingValue);
|
let logoObj = JSON.parse(res.result.settingValue);
|
||||||
this.Cookies.setItem("logo", logoObj.buyerSideLogo);
|
this.Cookies.setItem('logo', logoObj.buyerSideLogo);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.logoImg = this.Cookies.getItem("logo");
|
this.logoImg = this.Cookies.getItem('logo');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init () {
|
||||||
this.getGoodsDetail();
|
this.getGoodsDetail();
|
||||||
},
|
},
|
||||||
goAddressManage() {
|
goAddressManage () {
|
||||||
// 跳转地址管理页面
|
// 跳转地址管理页面
|
||||||
this.$router.push("/home/MyAddress");
|
this.$router.push('/home/MyAddress');
|
||||||
},
|
},
|
||||||
getAddress() {
|
getAddress () {
|
||||||
// 获取收货地址列表
|
// 获取收货地址列表
|
||||||
memberAddress().then((res) => {
|
memberAddress().then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
@ -263,7 +386,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getGoodsDetail() {
|
getGoodsDetail () {
|
||||||
// 订单商品详情
|
// 订单商品详情
|
||||||
this.$Spin.show();
|
this.$Spin.show();
|
||||||
cartGoodsPay({ way: this.$route.query.way })
|
cartGoodsPay({ way: this.$route.query.way })
|
||||||
|
@ -274,24 +397,21 @@ export default {
|
||||||
this.priceDetailDTO = res.result.priceDetailDTO;
|
this.priceDetailDTO = res.result.priceDetailDTO;
|
||||||
this.skuList = res.result.skuList;
|
this.skuList = res.result.skuList;
|
||||||
|
|
||||||
res.result.receiptVO
|
res.result.receiptVO ? (this.invoiceData = res.result.receiptVO) : '';
|
||||||
? (this.invoiceData = res.result.receiptVO)
|
|
||||||
: "";
|
|
||||||
|
|
||||||
let notSupArea = res.result.notSupportFreight;
|
let notSupArea = res.result.notSupportFreight;
|
||||||
this.selectedCoupon = {};
|
this.selectedCoupon = {};
|
||||||
if (res.result.platformCoupon)
|
if (res.result.platformCoupon) this.selectedCoupon.platformCoupon = res.result.platformCoupon;
|
||||||
this.selectedCoupon.platformCoupon = res.result.platformCoupon;
|
|
||||||
Object.assign(this.selectedCoupon, res.result.storeCoupons);
|
Object.assign(this.selectedCoupon, res.result.storeCoupons);
|
||||||
if (notSupArea) {
|
if (notSupArea) {
|
||||||
let content = [];
|
let content = [];
|
||||||
let title = "";
|
let title = '';
|
||||||
notSupArea.forEach((e) => {
|
notSupArea.forEach((e) => {
|
||||||
title = e.errorMessage;
|
title = e.errorMessage;
|
||||||
content.push(e.goodsSku.goodsName);
|
content.push(e.goodsSku.goodsName);
|
||||||
});
|
});
|
||||||
this.$Modal.warning({
|
this.$Modal.warning({
|
||||||
title: "以下商品超出配送区域" || title,
|
title: '以下商品超出配送区域' || title,
|
||||||
content: content.toString(),
|
content: content.toString(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -310,7 +430,7 @@ export default {
|
||||||
this.$Spin.hide();
|
this.$Spin.hide();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCouponNum() {
|
getCouponNum () {
|
||||||
// 获取可用优惠券数量
|
// 获取可用优惠券数量
|
||||||
couponNum({ way: this.$route.query.way }).then((res) => {
|
couponNum({ way: this.$route.query.way }).then((res) => {
|
||||||
this.canUseCouponNum = res.result;
|
this.canUseCouponNum = res.result;
|
||||||
|
@ -326,10 +446,10 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
memberCouponStatus: "NEW",
|
memberCouponStatus: 'NEW',
|
||||||
scopeId: skuArr.toString(),
|
scopeId: skuArr.toString(),
|
||||||
storeId: storeArr.toString(),
|
storeId: storeArr.toString(),
|
||||||
totalPrice: this.priceDetailDTO.goodsPrice,
|
totalPrice: this.priceDetailDTO.goodsPrice
|
||||||
};
|
};
|
||||||
canUseCouponList(params).then((res) => {
|
canUseCouponList(params).then((res) => {
|
||||||
// 可用优惠券列表
|
// 可用优惠券列表
|
||||||
|
@ -350,86 +470,85 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
selectAddress(item) {
|
selectAddress (item) {
|
||||||
// 选择地址
|
// 选择地址
|
||||||
let params = {
|
let params = {
|
||||||
way: this.$route.query.way,
|
way: this.$route.query.way,
|
||||||
shippingAddressId: item.id,
|
shippingAddressId: item.id
|
||||||
};
|
};
|
||||||
selectAddr(params).then((res) => {
|
selectAddr(params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("选择收货地址成功");
|
this.$Message.success('选择收货地址成功');
|
||||||
this.selectedAddress = item;
|
this.selectedAddress = item;
|
||||||
this.getGoodsDetail();
|
this.getGoodsDetail();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
editAddress(id) {
|
editAddress (id) {
|
||||||
// 编辑地址
|
// 编辑地址
|
||||||
this.addrId = id;
|
this.addrId = id;
|
||||||
this.$refs.address.show();
|
this.$refs.address.show();
|
||||||
},
|
},
|
||||||
addrChange(item) {
|
addrChange () {
|
||||||
// 添加,编辑地址回显
|
// 添加,编辑地址回显
|
||||||
this.getAddress();
|
this.getAddress();
|
||||||
},
|
},
|
||||||
delAddress(item) {
|
delAddress (item) {
|
||||||
// 删除地址
|
// 删除地址
|
||||||
this.$Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: "提示",
|
title: '提示',
|
||||||
content: "你确定删除这个收货地址",
|
content: '你确定删除这个收货地址',
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
delMemberAddress(item.id).then((res) => {
|
delMemberAddress(item.id).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("删除成功");
|
this.$Message.success('删除成功');
|
||||||
this.getAddress();
|
this.getAddress();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onCancel: () => {},
|
onCancel: () => {}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goGoodsDetail(skuId, goodsId) {
|
goGoodsDetail (skuId, goodsId) {
|
||||||
// 跳转商品详情
|
// 跳转商品详情
|
||||||
let routeUrl = this.$router.resolve({
|
let routeUrl = this.$router.resolve({
|
||||||
path: "/goodsDetail",
|
path: '/goodsDetail',
|
||||||
query: { skuId, goodsId },
|
query: { skuId, goodsId }
|
||||||
});
|
});
|
||||||
window.open(routeUrl.href, "_blank");
|
window.open(routeUrl.href, '_blank');
|
||||||
},
|
},
|
||||||
// 跳转店铺首页
|
// 跳转店铺首页
|
||||||
goShopPage(id) {
|
goShopPage (id) {
|
||||||
let routeUrl = this.$router.resolve({
|
let routeUrl = this.$router.resolve({
|
||||||
path: "/Merchant",
|
path: '/Merchant',
|
||||||
query: { id: id },
|
query: { id: id }
|
||||||
});
|
});
|
||||||
window.open(routeUrl.href, "_blank");
|
window.open(routeUrl.href, '_blank');
|
||||||
},
|
},
|
||||||
selectDelivery(delivery) {
|
selectDelivery (delivery) {
|
||||||
// 选择配送方式
|
// 选择配送方式
|
||||||
let params = {
|
let params = {
|
||||||
way: this.$route.query.way,
|
way: this.$route.query.way,
|
||||||
shippingMethod: delivery.value,
|
shippingMethod: delivery.value
|
||||||
};
|
};
|
||||||
shippingMethod(params).then((res) => {});
|
shippingMethod(params).then((res) => {});
|
||||||
},
|
},
|
||||||
useCoupon(id, used) {
|
useCoupon (id, used) {
|
||||||
// 使用优惠券
|
// 使用优惠券
|
||||||
let params = {
|
let params = {
|
||||||
way: this.$route.query.way,
|
way: this.$route.query.way,
|
||||||
memberCouponId: id,
|
memberCouponId: id,
|
||||||
used: used, // true 为使用, false为弃用
|
used: used // true 为使用, false为弃用
|
||||||
};
|
};
|
||||||
selectCoupon(params).then((res) => {
|
selectCoupon(params).then((res) => {
|
||||||
if (res.success) this.init();
|
if (res.success) this.init();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
editInvoice() {
|
editInvoice () {
|
||||||
|
|
||||||
// 编辑发票信息
|
// 编辑发票信息
|
||||||
this.$refs.invModal.invoiceAvailable = true;
|
this.$refs.invModal.invoiceAvailable = true;
|
||||||
},
|
},
|
||||||
getInvMsg(item) {
|
getInvMsg (item) {
|
||||||
// 获取发票信息
|
// 获取发票信息
|
||||||
if (item) {
|
if (item) {
|
||||||
this.init();
|
this.init();
|
||||||
|
@ -437,18 +556,18 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
pay() {
|
pay () {
|
||||||
// 结算
|
// 结算
|
||||||
const params = {
|
const params = {
|
||||||
client: "PC",
|
client: 'PC',
|
||||||
remark: [],
|
remark: [],
|
||||||
way: this.$route.query.way,
|
way: this.$route.query.way
|
||||||
};
|
};
|
||||||
this.goodsList.forEach((e) => {
|
this.goodsList.forEach((e) => {
|
||||||
if (e.remark) {
|
if (e.remark) {
|
||||||
params.remark.push({
|
params.remark.push({
|
||||||
remark: e.remark,
|
remark: e.remark,
|
||||||
storeId: e.storeId,
|
storeId: e.storeId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -461,8 +580,8 @@ export default {
|
||||||
this.$Spin.hide();
|
this.$Spin.hide();
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/payment",
|
path: '/payment',
|
||||||
query: { orderType: "TRADE", sn: res.result.sn },
|
query: { orderType: 'TRADE', sn: res.result.sn }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -470,22 +589,22 @@ export default {
|
||||||
this.$Spin.hide();
|
this.$Spin.hide();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
useScope(type) {
|
useScope (type) {
|
||||||
let goods = "全部商品";
|
let goods = '全部商品';
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "ALL":
|
case 'ALL':
|
||||||
goods = "全部商品";
|
goods = '全部商品';
|
||||||
break;
|
break;
|
||||||
case "PORTION_GOODS":
|
case 'PORTION_GOODS':
|
||||||
goods = "部分商品";
|
goods = '部分商品';
|
||||||
break;
|
break;
|
||||||
case "PORTION_GOODS_CATEGORY":
|
case 'PORTION_GOODS_CATEGORY':
|
||||||
goods = "部分分类商品";
|
goods = '部分分类商品';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return `${goods}可用`;
|
return `${goods}可用`;
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -69,10 +69,10 @@ service.interceptors.request.use(
|
||||||
config.headers['accessToken'] = accessToken;
|
config.headers['accessToken'] = accessToken;
|
||||||
// 解析当前token时间
|
// 解析当前token时间
|
||||||
let jwtData = JSON.parse(
|
let jwtData = JSON.parse(
|
||||||
decodeURIComponent(escape(window.atob(accessToken.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
decodeURIComponent(escape(window.atob(accessToken.split('.')[1])))
|
||||||
);
|
);
|
||||||
if (jwtData.exp < Math.round(new Date() / 1000)) {
|
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();
|
const getTokenRes = await refreshToken();
|
||||||
if (getTokenRes === 'success') {
|
if (getTokenRes === 'success') {
|
||||||
// 刷新token
|
// 刷新token
|
||||||
|
@ -101,7 +101,6 @@ async function refresh () {
|
||||||
Storage.removeItem('userInfo');
|
Storage.removeItem('userInfo');
|
||||||
Storage.setItem('cartNum', 0);
|
Storage.setItem('cartNum', 0);
|
||||||
store.commit('SET_CARTNUM', 0);
|
store.commit('SET_CARTNUM', 0);
|
||||||
console.log('1111');
|
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '请登录',
|
title: '请登录',
|
||||||
content: '<p>请登录后执行此操作</p>',
|
content: '<p>请登录后执行此操作</p>',
|
||||||
|
@ -140,9 +139,11 @@ service.interceptors.response.use(
|
||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
|
|
||||||
if (isRefreshToken === 1) {
|
if (isRefreshToken === 1) {
|
||||||
refresh()
|
refresh(error)
|
||||||
isRefreshToken = 0;
|
isRefreshToken = 0;
|
||||||
}
|
}
|
||||||
|
} else if (errorResponse.status === 404) {
|
||||||
|
// 避免刷新token时也提示报错信息
|
||||||
} else {
|
} else {
|
||||||
if (error.message) {
|
if (error.message) {
|
||||||
let _message =
|
let _message =
|
||||||
|
|
|
@ -76,15 +76,15 @@ export const disableCategory = (id, type) => {
|
||||||
|
|
||||||
// 获取商品规格分页列表
|
// 获取商品规格分页列表
|
||||||
export const getSpecListData = (params) => {
|
export const getSpecListData = (params) => {
|
||||||
return getRequest('/goods/spec/page', params)
|
return getRequest('/goods/spec', params)
|
||||||
}
|
}
|
||||||
// 添加或修改规格设置
|
// 添加或修改规格设置
|
||||||
export const insertSpec = (params) => {
|
export const insertSpec = (params) => {
|
||||||
return postRequest('/goods/spec', params)
|
return postRequest('/goods/spec', params)
|
||||||
}
|
}
|
||||||
// 添加或修改规格设置
|
// 添加或修改规格设置
|
||||||
export const updateSpec = (params) => {
|
export const updateSpec = (id,params) => {
|
||||||
return putRequest('/goods/spec', params)
|
return putRequest(`/goods/spec/${id}`, params)
|
||||||
}
|
}
|
||||||
//根据分类id获取关联规格
|
//根据分类id获取关联规格
|
||||||
export const getCategorySpecListData = (category_id, params) => {
|
export const getCategorySpecListData = (category_id, params) => {
|
||||||
|
@ -94,15 +94,6 @@ export const getCategorySpecListData = (category_id, params) => {
|
||||||
export const delSpec = (id, params) => {
|
export const delSpec = (id, params) => {
|
||||||
return deleteRequest(`/goods/spec/${id}`, params)
|
return deleteRequest(`/goods/spec/${id}`, params)
|
||||||
}
|
}
|
||||||
// 获取商品规格值列表
|
|
||||||
export const getSpecValuesListData = (id, params) => {
|
|
||||||
return getRequest(`/goods/specValues/values/${id}`, params)
|
|
||||||
}
|
|
||||||
// 添加商品规格值
|
|
||||||
export const saveSpecValues = (id, params) => {
|
|
||||||
return postRequest(`/goods/specValues/save/${id}`, params)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 查询某分类下的全部子分类列表
|
// 查询某分类下的全部子分类列表
|
||||||
export const getGoodsCategory = (parent_id) => {
|
export const getGoodsCategory = (parent_id) => {
|
||||||
|
|
|
@ -30,7 +30,7 @@ export const getLiveList = params => {
|
||||||
|
|
||||||
// 获取直播间详情
|
// 获取直播间详情
|
||||||
export const getLiveInfo = studioId => {
|
export const getLiveInfo = studioId => {
|
||||||
return getRequest(`/broadcast/studio/studioInfo/${studioId}`);
|
return getRequest(`/broadcast/studio/${studioId}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取当前进行中的促销活动商品
|
// 获取当前进行中的促销活动商品
|
||||||
|
|
|
@ -17,14 +17,14 @@ export default {
|
||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
api_dev: {
|
api_dev: {
|
||||||
// common: "https://common-api.pickmall.cn",
|
common: "https://common-api.pickmall.cn",
|
||||||
// buyer: "https://buyer-api.pickmall.cn",
|
buyer: "https://buyer-api.pickmall.cn",
|
||||||
// seller: "https://store-api.pickmall.cn",
|
seller: "https://store-api.pickmall.cn",
|
||||||
// manager: "https://admin-api.pickmall.cn"
|
manager: "https://admin-api.pickmall.cn"
|
||||||
common: 'http://192.168.0.109:8890',
|
// common: 'http://192.168.0.109:8890',
|
||||||
buyer: 'http://192.168.0.109:8888',
|
// buyer: 'http://192.168.0.109:8888',
|
||||||
seller: 'http://192.168.0.109:8889',
|
// seller: 'http://192.168.0.109:8889',
|
||||||
manager: 'http://192.168.0.109:8887'
|
// manager: 'http://192.168.0.109:8887'
|
||||||
},
|
},
|
||||||
api_prod: {
|
api_prod: {
|
||||||
common: "https://common-api.pickmall.cn",
|
common: "https://common-api.pickmall.cn",
|
||||||
|
|
|
@ -64,14 +64,6 @@ service.interceptors.response.use(
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
break;
|
break;
|
||||||
case 403:
|
|
||||||
// 权限不足
|
|
||||||
if (data.message !== null) {
|
|
||||||
Message.error(data.message);
|
|
||||||
} else {
|
|
||||||
Message.error("权限不足");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 500:
|
case 500:
|
||||||
// 系统异常
|
// 系统异常
|
||||||
if (data.message !== null) {
|
if (data.message !== null) {
|
||||||
|
@ -89,6 +81,8 @@ service.interceptors.response.use(
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
// 这种情况一般调到登录页
|
// 这种情况一般调到登录页
|
||||||
|
} else if (error.response.status === 404) {
|
||||||
|
// 避免刷新token报错
|
||||||
} else if (error.response.status === 403) {
|
} else if (error.response.status === 403) {
|
||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
if(isRefreshToken === 1) {
|
if(isRefreshToken === 1) {
|
||||||
|
|
|
@ -16,6 +16,22 @@ export function unitPrice(val, unit, location) {
|
||||||
return (unit || '') + price
|
return (unit || '') + price
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单来源
|
||||||
|
*/
|
||||||
|
export function clientTypeWay(val) {
|
||||||
|
if (val == "H5") {
|
||||||
|
return "移动端";
|
||||||
|
} else if (val == "PC") {
|
||||||
|
return "PC端";
|
||||||
|
} else if (val == "WECHAT_MP") {
|
||||||
|
return "小程序端";
|
||||||
|
} else if (val == "APP") {
|
||||||
|
return "移动应用端";
|
||||||
|
} else {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,10 +67,12 @@ export default {
|
||||||
{
|
{
|
||||||
type: "selection",
|
type: "selection",
|
||||||
width: 60,
|
width: 60,
|
||||||
align: "center"
|
align: "center",
|
||||||
|
fixed: "left",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "商品图片",
|
title: "商品图片",
|
||||||
|
fixed: "left",
|
||||||
key: "thumbnail",
|
key: "thumbnail",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
|
|
@ -261,7 +261,6 @@ export default {
|
||||||
getCategorySpecListData(v.id).then((res) => {
|
getCategorySpecListData(v.id).then((res) => {
|
||||||
this.categoryId = v.id;
|
this.categoryId = v.id;
|
||||||
this.modalSpecTitle = "规格关联";
|
this.modalSpecTitle = "规格关联";
|
||||||
console.log(res);
|
|
||||||
this.specForm.categorySpecs = res.map((item) => item.id);
|
this.specForm.categorySpecs = res.map((item) => item.id);
|
||||||
this.modalSpecVisible = true;
|
this.modalSpecVisible = true;
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
</Row>
|
||||||
<Row class="operation padding-row">
|
<Row class="operation padding-row">
|
||||||
<Button @click="add" type="primary" >添加</Button>
|
<Button @click="add" type="primary">添加</Button>
|
||||||
<Button @click="delAll" >批量删除</Button>
|
<Button @click="delAll">批量删除</Button>
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Table
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
@ -60,53 +60,33 @@
|
||||||
>
|
>
|
||||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||||
<FormItem label="规格名称" prop="specName">
|
<FormItem label="规格名称" prop="specName">
|
||||||
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%" />
|
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%"/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="规格值" prop="specValue">
|
||||||
|
<Select
|
||||||
|
v-model="form.specValue"
|
||||||
|
placeholder="输入后回车添加"
|
||||||
|
multiple
|
||||||
|
filterable
|
||||||
|
allow-create
|
||||||
|
:popper-append-to-body="false"
|
||||||
|
popper-class="spec-values-popper"
|
||||||
|
style="width: 100%; text-align: left; margin-right: 10px"
|
||||||
|
>
|
||||||
|
<Option
|
||||||
|
v-for="item in specValue"
|
||||||
|
:value="item"
|
||||||
|
:label="item"
|
||||||
|
>
|
||||||
|
</Option>
|
||||||
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||||
<Button type="primary" :loading="submitLoading" @click="saveSpec"
|
<Button type="primary" :loading="submitLoading" @click="saveSpec"
|
||||||
>提交</Button
|
>提交
|
||||||
>
|
</Button
|
||||||
</div>
|
|
||||||
</Modal>
|
|
||||||
<Modal
|
|
||||||
:title="modalTitle"
|
|
||||||
v-model="dialogSpecValuesVisible"
|
|
||||||
:mask-closable="false"
|
|
||||||
:width="500"
|
|
||||||
:styles="{ top: '30px' }"
|
|
||||||
class="permModal"
|
|
||||||
>
|
|
||||||
<Form ref="specForm" :model="specForm" :label-width="100">
|
|
||||||
<Select
|
|
||||||
v-model="specForm.specValue"
|
|
||||||
placeholder="输入后回车添加"
|
|
||||||
multiple
|
|
||||||
filterable
|
|
||||||
allow-create
|
|
||||||
:popper-append-to-body="false"
|
|
||||||
popper-class="spec-values-popper"
|
|
||||||
style="width: 100%; text-align: left; margin-right: 10px"
|
|
||||||
>
|
|
||||||
<Option
|
|
||||||
v-for="item in specValues"
|
|
||||||
:value="item.specValue"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.specValue"
|
|
||||||
>
|
|
||||||
</Option>
|
|
||||||
</Select>
|
|
||||||
</Form>
|
|
||||||
<div slot="footer">
|
|
||||||
<Button type="text" @click="dialogSpecValuesVisible = false"
|
|
||||||
>取消</Button
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
:loading="submitLoading"
|
|
||||||
@click="submitSpecValuesForm"
|
|
||||||
>提交</Button
|
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
@ -118,10 +98,9 @@ import {
|
||||||
getSpecListData,
|
getSpecListData,
|
||||||
insertSpec,
|
insertSpec,
|
||||||
updateSpec,
|
updateSpec,
|
||||||
delSpec,
|
delSpec
|
||||||
getSpecValuesListData,
|
|
||||||
saveSpecValues,
|
|
||||||
} from "@/api/goods";
|
} from "@/api/goods";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "spec",
|
name: "spec",
|
||||||
components: {},
|
components: {},
|
||||||
|
@ -131,7 +110,6 @@ export default {
|
||||||
modalType: 0, // 添加或编辑标识
|
modalType: 0, // 添加或编辑标识
|
||||||
modalVisible: false, // 添加或编辑显示
|
modalVisible: false, // 添加或编辑显示
|
||||||
modalTitle: "", // 添加或编辑标题
|
modalTitle: "", // 添加或编辑标题
|
||||||
dialogSpecValuesVisible: false, // 添加或编辑规格值
|
|
||||||
specTitle: "", // 添加或编辑规格值
|
specTitle: "", // 添加或编辑规格值
|
||||||
searchForm: {
|
searchForm: {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
|
@ -145,9 +123,8 @@ export default {
|
||||||
specName: "",
|
specName: "",
|
||||||
specValue: "",
|
specValue: "",
|
||||||
},
|
},
|
||||||
specForm: {},
|
|
||||||
/** 编辑规格值 */
|
/** 编辑规格值 */
|
||||||
specValues: [],
|
specValue: [],
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {},
|
formValidate: {},
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
|
@ -179,24 +156,7 @@ export default {
|
||||||
width: 250,
|
width: 250,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h("div", [
|
return h("div", [
|
||||||
h(
|
|
||||||
"Button",
|
|
||||||
{
|
|
||||||
props: {
|
|
||||||
type: "primary",
|
|
||||||
size: "small",
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
marginRight: "5px",
|
|
||||||
},
|
|
||||||
on: {
|
|
||||||
click: () => {
|
|
||||||
this.editSpec(params.row);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"编辑规格值"
|
|
||||||
),
|
|
||||||
h(
|
h(
|
||||||
"Button",
|
"Button",
|
||||||
{
|
{
|
||||||
|
@ -239,23 +199,28 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//初始化,获取数据
|
||||||
init() {
|
init() {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//修改分页
|
||||||
changePage(v) {
|
changePage(v) {
|
||||||
this.searchForm.pageNumber = v;
|
this.searchForm.pageNumber = v;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
this.clearSelectAll();
|
this.clearSelectAll();
|
||||||
},
|
},
|
||||||
|
//修改页面大小
|
||||||
changePageSize(v) {
|
changePageSize(v) {
|
||||||
this.searchForm.pageSize = v;
|
this.searchForm.pageSize = v;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//搜索参数
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchForm.pageNumber = 1;
|
this.searchForm.pageNumber = 1;
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.pageSize = 10;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//重置搜索参数
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.$refs.searchForm.resetFields();
|
this.$refs.searchForm.resetFields();
|
||||||
this.searchForm.pageNumber = 1;
|
this.searchForm.pageNumber = 1;
|
||||||
|
@ -263,6 +228,7 @@ export default {
|
||||||
// 重新加载数据
|
// 重新加载数据
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//更改排序
|
||||||
changeSort(e) {
|
changeSort(e) {
|
||||||
this.searchForm.sort = e.key;
|
this.searchForm.sort = e.key;
|
||||||
this.searchForm.order = e.order;
|
this.searchForm.order = e.order;
|
||||||
|
@ -271,36 +237,27 @@ export default {
|
||||||
}
|
}
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
//清除已选择
|
||||||
clearSelectAll() {
|
clearSelectAll() {
|
||||||
this.$refs.table.selectAll(false);
|
this.$refs.table.selectAll(false);
|
||||||
},
|
},
|
||||||
|
//修改已选择
|
||||||
changeSelect(e) {
|
changeSelect(e) {
|
||||||
this.selectList = e;
|
this.selectList = e;
|
||||||
this.selectCount = e.length;
|
this.selectCount = e.length;
|
||||||
},
|
},
|
||||||
|
//获取数据
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||||
getSpecListData(this.searchForm).then((res) => {
|
getSpecListData(this.searchForm).then((res) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.success) {
|
this.data = res.records;
|
||||||
this.data = res.result.records;
|
this.total = res.total;
|
||||||
this.total = res.result.total;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
submitSpecValuesForm() {
|
//新增规格
|
||||||
saveSpecValues(this.specForm.specId, this.specForm).then((res) => {
|
|
||||||
this.submitLoading = false;
|
|
||||||
if (res.success) {
|
|
||||||
this.$Message.success("规格值保存成功");
|
|
||||||
this.getDataList();
|
|
||||||
this.modalVisible = false;
|
|
||||||
this.dialogSpecValuesVisible = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
saveSpec() {
|
saveSpec() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -318,7 +275,7 @@ export default {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 编辑
|
// 编辑
|
||||||
updateSpec(this.form).then((res) => {
|
updateSpec(this.form.id, this.form).then((res) => {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("操作成功");
|
this.$Message.success("操作成功");
|
||||||
|
@ -330,6 +287,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//弹出添加框
|
||||||
add() {
|
add() {
|
||||||
this.modalType = 0;
|
this.modalType = 0;
|
||||||
this.modalTitle = "添加";
|
this.modalTitle = "添加";
|
||||||
|
@ -337,31 +295,31 @@ export default {
|
||||||
delete this.form.id;
|
delete this.form.id;
|
||||||
this.modalVisible = true;
|
this.modalVisible = true;
|
||||||
},
|
},
|
||||||
|
//弹出编辑框
|
||||||
edit(v) {
|
edit(v) {
|
||||||
this.modalType = 1;
|
this.modalType = 1;
|
||||||
this.modalTitle = "编辑";
|
this.modalTitle = "编辑";
|
||||||
this.$refs.form.resetFields();
|
|
||||||
// 转换null为""
|
// 转换null为""
|
||||||
for (let attr in v) {
|
for (let attr in v) {
|
||||||
if (v[attr] === null) {
|
if (v[attr] === null) {
|
||||||
v[attr] = "";
|
v[attr] = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let str = JSON.stringify(v);
|
let localVal = v.specValue;
|
||||||
let data = JSON.parse(str);
|
|
||||||
this.form = data;
|
this.form.specName = v.specName;
|
||||||
|
this.form.id = v.id;
|
||||||
|
this.form.specValue = v.specValue;
|
||||||
|
|
||||||
|
if (localVal && localVal.indexOf("," > 0)) {
|
||||||
|
this.form.specValue = localVal.split(",")
|
||||||
|
this.specValue = this.form.specValue
|
||||||
|
this.$set(this, 'specValue', this.form.specValue)
|
||||||
|
} else {
|
||||||
|
this.specValue = [];
|
||||||
|
}
|
||||||
this.modalVisible = true;
|
this.modalVisible = true;
|
||||||
},
|
},
|
||||||
editSpec(v) {
|
|
||||||
getSpecValuesListData(v.id).then((res) => {
|
|
||||||
this.modalType = 1;
|
|
||||||
this.modalTitle = "编辑";
|
|
||||||
this.specValues = res.result;
|
|
||||||
this.specForm.specValue = res.result.map(item => item.specValue)
|
|
||||||
this.specForm.specId = v.id;
|
|
||||||
this.dialogSpecValuesVisible = true;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
remove(v) {
|
remove(v) {
|
||||||
this.$Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: "确认删除",
|
title: "确认删除",
|
||||||
|
@ -415,5 +373,5 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "@/styles/table-common.scss";
|
@import "@/styles/table-common.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © 2020 - Present
|
Copyright © 2020 - Present
|
||||||
<a
|
<a
|
||||||
href="http://lili.cn"
|
href="https://pickmall.cn/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style="margin:0 5px;"
|
style="margin:0 5px;"
|
||||||
>lili-shop</a> {{ $t('rights') }}
|
>lili-shop</a> {{ $t('rights') }}
|
||||||
|
|
|
@ -1,47 +1,48 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<vuedraggable
|
<div class="upload-pic-thumb">
|
||||||
:list="uploadList"
|
<vuedraggable
|
||||||
:disabled="!draggable||!multiple"
|
:list="uploadList"
|
||||||
:animation="200"
|
:disabled="!draggable||!multiple"
|
||||||
class="list-group"
|
:animation="200"
|
||||||
ghost-class="thumb-ghost"
|
class="list-group"
|
||||||
@end="onEnd"
|
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;">
|
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
||||||
<img :src="item.url" />
|
<div v-if="item.status == 'finished'" style="height:60px;">
|
||||||
<div class="upload-list-cover">
|
<img :src="item.url" />
|
||||||
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
<div class="upload-list-cover">
|
||||||
<Icon type="ios-trash-outline" @click="handleRemove(item)"></Icon>
|
<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>
|
</div>
|
||||||
<div v-else>
|
</vuedraggable>
|
||||||
<Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
|
<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>
|
||||||
</div>
|
</Upload>
|
||||||
</vuedraggable>
|
</div>
|
||||||
<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>
|
|
||||||
|
|
||||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||||
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
|
@ -242,6 +243,9 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.upload-pic-thumb{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.upload-list {
|
.upload-list {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
|
@ -255,6 +259,7 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.upload-list img {
|
.upload-list img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</Row>
|
</Row>
|
||||||
<div>
|
<div>
|
||||||
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
|
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
|
||||||
<Button type="primary" class="export">
|
<Button type="info" class="export">
|
||||||
导出Excel
|
导出Excel
|
||||||
</Button>
|
</Button>
|
||||||
</download-excel>
|
</download-excel>
|
||||||
|
@ -72,10 +72,6 @@ export default {
|
||||||
订单编号: "sn",
|
订单编号: "sn",
|
||||||
下单时间: "createTime",
|
下单时间: "createTime",
|
||||||
客户名称: "memberName",
|
客户名称: "memberName",
|
||||||
客户账号: "",
|
|
||||||
收货人: "",
|
|
||||||
收货人手机号: "",
|
|
||||||
收货人地址: "",
|
|
||||||
支付方式: {
|
支付方式: {
|
||||||
field: "clientType",
|
field: "clientType",
|
||||||
callback: (value) => {
|
callback: (value) => {
|
||||||
|
@ -92,15 +88,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
配送方式: "",
|
|
||||||
配送费用: "",
|
|
||||||
订单商品金额: "",
|
|
||||||
订单优惠金额: "",
|
|
||||||
订单应付金额: "",
|
|
||||||
商品SKU编号: "",
|
|
||||||
商品数量: "groupNum",
|
商品数量: "groupNum",
|
||||||
买家备注: "",
|
|
||||||
订单状态: "",
|
|
||||||
付款状态: {
|
付款状态: {
|
||||||
field: "payStatus",
|
field: "payStatus",
|
||||||
callback: (value) => {
|
callback: (value) => {
|
||||||
|
@ -111,9 +99,6 @@ export default {
|
||||||
: "";
|
: "";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
发货状态: "",
|
|
||||||
发票类型: "",
|
|
||||||
发票抬头: "",
|
|
||||||
店铺: "storeName",
|
店铺: "storeName",
|
||||||
},
|
},
|
||||||
loading: true, // 表单加载状态
|
loading: true, // 表单加载状态
|
||||||
|
@ -222,56 +207,23 @@ export default {
|
||||||
title: "下单时间",
|
title: "下单时间",
|
||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 170,
|
width: 170,
|
||||||
sortable: true,
|
|
||||||
sortType: "desc",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 150,
|
width: 150,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h("div", [
|
return h("div", [h("Button", {props: {type: "primary", size: "small",},
|
||||||
h(
|
attrs: {disabled: params.row.orderStatus == "UNPAID" ? false : true,},
|
||||||
"Button",
|
style: {marginRight: "5px",},
|
||||||
|
on: {click: () => {this.confirmPrice(params.row);},},
|
||||||
{
|
}, "收款"
|
||||||
props: {
|
|
||||||
type: "primary",
|
|
||||||
size: "small",
|
|
||||||
},
|
|
||||||
attrs: {
|
|
||||||
disabled: params.row.orderStatus == "UNPAID" ? false : true,
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
marginRight: "5px",
|
|
||||||
},
|
|
||||||
on: {
|
|
||||||
click: () => {
|
|
||||||
this.confirmPrice(params.row);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"收款"
|
|
||||||
),
|
),
|
||||||
h(
|
h("Button", {props: {type: "info", size: "small",},
|
||||||
"Button",
|
style: {marginRight: "5px",},
|
||||||
{
|
on: {click: () => {this.detail(params.row);},},
|
||||||
props: {
|
}, "查看"
|
||||||
type: "info",
|
|
||||||
size: "small",
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
marginRight: "5px",
|
|
||||||
},
|
|
||||||
on: {
|
|
||||||
click: () => {
|
|
||||||
this.detail(params.row);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"查看"
|
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<Input type="number" v-model="form.sort" clearable style="width: 10%" />
|
<Input type="number" v-model="form.sort" clearable style="width: 10%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem class="form-item-view-el" label="文章内容" prop="content">
|
<FormItem class="form-item-view-el" label="文章内容" prop="content">
|
||||||
<editor openXss v-model="form.content"></editor>
|
<editor openXss v-model="form.content"></editor>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="是否展示" prop="openStatus">
|
<FormItem label="是否展示" prop="openStatus">
|
||||||
<i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
|
<i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
|
||||||
|
@ -435,28 +435,13 @@ export default {
|
||||||
this.form.categoryId = res.result.categoryId;
|
this.form.categoryId = res.result.categoryId;
|
||||||
this.treeValue = data.articleCategoryName;
|
this.treeValue = data.articleCategoryName;
|
||||||
this.form.id = data.id;
|
this.form.id = data.id;
|
||||||
this.form.content = htmlEscape(res.result.content);
|
this.form.content =res.result.content;
|
||||||
this.form.title = res.result.title;
|
this.form.title = res.result.title;
|
||||||
this.form.sort = res.result.sort;
|
this.form.sort = res.result.sort;
|
||||||
this.form.openStatus = res.result.openStatus;
|
this.form.openStatus = res.result.openStatus;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
htmlEscape(text) {
|
|
||||||
return text.replace(/[<>"&]/g, function (match, pos, originalText) {
|
|
||||||
switch (match) {
|
|
||||||
case "<":
|
|
||||||
return "<";
|
|
||||||
case ">":
|
|
||||||
return ">";
|
|
||||||
case "&":
|
|
||||||
return "&";
|
|
||||||
case '"':
|
|
||||||
return """;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
remove(v) {
|
remove(v) {
|
||||||
this.$Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: "确认删除",
|
title: "确认删除",
|
||||||
|
|
|
@ -161,7 +161,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "活动时间",
|
title: "活动时间",
|
||||||
|
width: 150,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.getType === "ACTIVITY") {
|
if (params.row.getType === "ACTIVITY") {
|
||||||
return h("div", "长期有效");
|
return h("div", "长期有效");
|
||||||
|
|
|
@ -119,14 +119,13 @@ export default {
|
||||||
{
|
{
|
||||||
title: "直播状态",
|
title: "直播状态",
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h(
|
if(params.row.status == "NEW"){
|
||||||
"span",
|
return h("div", [h("tag", {props: {color: "blue"}}, "未开始")]);
|
||||||
params.row.status == "NEW"
|
}else if(params.row.status == "START"){
|
||||||
? "未开始"
|
return h("div", [h("tag", {props: {color: "green"}}, "直播中")]);
|
||||||
: params.row.status == "START"
|
}else{
|
||||||
? "直播中"
|
return h("div", [h("tag", {props: {color: "volcano"}}, "已结束")]);
|
||||||
: "已结束"
|
}
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,78 +2,37 @@
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<Card>
|
<Card>
|
||||||
<Row>
|
<Row>
|
||||||
<Form
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
ref="searchForm"
|
|
||||||
:model="searchForm"
|
|
||||||
inline
|
|
||||||
:label-width="70"
|
|
||||||
class="search-form"
|
|
||||||
>
|
|
||||||
<Form-item label="商品名称">
|
<Form-item label="商品名称">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.goodsName"
|
|
||||||
placeholder="请输入商品名称"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="积分区间">
|
<Form-item label="积分区间">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.pointsS" placeholder="请输入开始区间" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.pointsS"
|
|
||||||
placeholder="请输入开始区间"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
-
|
-
|
||||||
<Input
|
<Input type="text" v-model="searchForm.pointsE" placeholder="请输入结束区间" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.pointsE"
|
|
||||||
placeholder="请输入结束区间"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="状态">
|
<Form-item label="状态">
|
||||||
<Select v-model="searchForm.promotionStatus" style="width: 200px">
|
<Select v-model="searchForm.promotionStatus" style="width: 200px">
|
||||||
<Option
|
<Option v-for="item in statusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||||
v-for="item in statusList"
|
|
||||||
:value="item.value"
|
|
||||||
:key="item.value"
|
|
||||||
>{{ item.label }}</Option
|
|
||||||
>
|
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="SKU编码">
|
<Form-item label="SKU编码">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.skuId" placeholder="请输入SKU编码" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.skuId"
|
|
||||||
placeholder="请输入SKU编码"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
</Row>
|
||||||
<Row class="operation padding-row">
|
<Row class="operation padding-row">
|
||||||
<Button @click="addPointsGoods" type="primary" >添加积分商品</Button>
|
<Button @click="addPointsGoods" type="primary">添加积分商品</Button>
|
||||||
|
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
|
||||||
:loading="loading"
|
|
||||||
border
|
|
||||||
:columns="columns"
|
|
||||||
:data="data"
|
|
||||||
ref="table"
|
|
||||||
>
|
|
||||||
<template slot-scope="{ row }" slot="goodsName">
|
<template slot-scope="{ row }" slot="goodsName">
|
||||||
<div>
|
<div>
|
||||||
<a class="mr_10" @click="linkTo(row.goodsSku.goodsId,row.goodsSku.skuId)">{{row.goodsSku.goodsName}}</a>
|
<a class="mr_10" @click="linkTo(row.goodsSku.goodsId,row.goodsSku.skuId)">{{row.goodsSku.goodsName}}</a>
|
||||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<vue-qr :text="wapLinkTo(row.goodsSku.goodsId,row.goodsSku.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
<vue-qr :text="wapLinkTo(row.goodsSku.goodsId,row.goodsSku.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||||
</div>
|
</div>
|
||||||
<img src="../../../assets/qrcode.svg" style="vertical-align:middle;" class="hover-pointer" width="20" height="20" alt="">
|
<img src="../../../assets/qrcode.svg" style="vertical-align:middle;" class="hover-pointer" width="20" height="20" alt="">
|
||||||
</Poptip>
|
</Poptip>
|
||||||
|
@ -94,48 +53,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot-scope="{ row }" slot="action">
|
<template slot-scope="{ row }" slot="action">
|
||||||
<Button
|
<Button v-if="row.promotionStatus == 'NEW'" type="info" size="small" @click="edit(row.id)" style="margin-right: 5px">编辑</Button>
|
||||||
v-if="row.promotionStatus == 'NEW'"
|
<Button v-if="row.promotionStatus == 'START'" type="warning" size="small" @click="statusChanged(row.id, 'CLOSE')" style="margin-right: 5px">停用</Button>
|
||||||
type="info"
|
<Button v-if="row.promotionStatus == 'CLOSE'" type="warning" size="small" @click="statusChanged(row.id, 'START')" style="margin-right: 5px">启用</Button>
|
||||||
size="small"
|
<Button type="error" size="small" @click="close(row.id)">删除</Button>
|
||||||
@click="edit(row.id)"
|
|
||||||
style="margin-right: 5px"
|
|
||||||
>编辑</Button
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
v-if="row.promotionStatus == 'START'"
|
|
||||||
type="warning"
|
|
||||||
size="small"
|
|
||||||
@click="statusChanged(row.id, 'CLOSE')"
|
|
||||||
style="margin-right: 5px"
|
|
||||||
>停用</Button
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
v-if="row.promotionStatus == 'CLOSE'"
|
|
||||||
type="warning"
|
|
||||||
size="small"
|
|
||||||
@click="statusChanged(row.id, 'START')"
|
|
||||||
style="margin-right: 5px"
|
|
||||||
>启用</Button
|
|
||||||
>
|
|
||||||
<Button type="error" size="small" @click="close(row.id)"
|
|
||||||
>删除</Button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
<Page
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||||
:current="searchForm.pageNumber"
|
show-total show-elevator show-sizer></Page>
|
||||||
:total="total"
|
|
||||||
:page-size="searchForm.pageSize"
|
|
||||||
@on-change="changePage"
|
|
||||||
@on-page-size-change="changePageSize"
|
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-elevator
|
|
||||||
show-sizer
|
|
||||||
></Page>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -159,55 +85,62 @@ export default {
|
||||||
pageSize: 10, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
order: "desc", // 默认排序方式
|
order: "desc", // 默认排序方式
|
||||||
},
|
},
|
||||||
statusList: [ // 活动状态
|
statusList: [
|
||||||
|
// 活动状态
|
||||||
{ label: "未开始", value: "NEW" },
|
{ label: "未开始", value: "NEW" },
|
||||||
{ label: "已开始", value: "START" },
|
{ label: "已开始", value: "START" },
|
||||||
{ label: "已结束", value: "END" },
|
{ label: "已结束", value: "END" },
|
||||||
{ label: "已关闭", value: "CLOSE" },
|
{ label: "已关闭", value: "CLOSE" },
|
||||||
],
|
],
|
||||||
columns: [ // 表头
|
columns: [
|
||||||
|
// 表头
|
||||||
{
|
{
|
||||||
title: "商品名称",
|
title: "商品名称",
|
||||||
slot: "goodsName",
|
slot: "goodsName",
|
||||||
minWidth: 120,
|
minWidth: 150,
|
||||||
|
fixed: "left",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "市场价",
|
title: "市场价",
|
||||||
slot: "price",
|
slot: "price",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "结算价",
|
title: "结算价",
|
||||||
slot: "settlementPrice",
|
slot: "settlementPrice",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "分类",
|
|
||||||
key: "pointsGoodsCategoryName",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "库存数量",
|
title: "库存数量",
|
||||||
slot: "quantity",
|
slot: "quantity",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "活动剩余库存",
|
title: "活动剩余库存",
|
||||||
key: "activeStock",
|
key: "activeStock",
|
||||||
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "兑换积分",
|
title: "兑换积分",
|
||||||
key: "points",
|
key: "points",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "所属店铺",
|
title: "所属店铺",
|
||||||
key: "storeName",
|
key: "storeName",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "活动开始时间",
|
title: "活动开始时间",
|
||||||
slot: "startTime",
|
slot: "startTime",
|
||||||
minWidth:100
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
key: "promotionStatus",
|
key: "promotionStatus",
|
||||||
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
let text = "未知",
|
let text = "未知",
|
||||||
color = "";
|
color = "";
|
||||||
|
@ -227,10 +160,16 @@ export default {
|
||||||
return h("div", [h("Tag", { props: { color: color } }, text)]);
|
return h("div", [h("Tag", { props: { color: color } }, text)]);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "分类",
|
||||||
|
key: "pointsGoodsCategoryName",
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
slot: "action",
|
slot: "action",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
fixed: "right",
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -327,5 +266,5 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "@/styles/table-common.scss";
|
@import "@/styles/table-common.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -102,13 +102,13 @@ export default {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.promotionStatus == "NEW") {
|
if (params.row.promotionStatus == "NEW") {
|
||||||
return h("Tag", {props: {color: "volcano",},},"新建");
|
return h("Tag", {props: {color: "geekblue",},},"新建");
|
||||||
} else if (params.row.promotionStatus == "START") {
|
} else if (params.row.promotionStatus == "START") {
|
||||||
return h("Tag", {props: {color: "blue",},},"开始");
|
return h("Tag", {props: {color: "green",},},"开始");
|
||||||
} else if (params.row.promotionStatus == "END") {
|
} else if (params.row.promotionStatus == "END") {
|
||||||
return h("Tag", {props: {color: "green",},},"结束");
|
|
||||||
} else if (params.row.promotionStatus == "CLOSE") {
|
|
||||||
return h("Tag", {props: {color: "volcano",},},"结束");
|
return h("Tag", {props: {color: "volcano",},},"结束");
|
||||||
|
} else if (params.row.promotionStatus == "CLOSE") {
|
||||||
|
return h("Tag", {props: {color: "red",},},"结束");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -65,13 +65,13 @@
|
||||||
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
||||||
<Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" />
|
<Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<!-- <Divider orientation="left">腾讯云智服</Divider>
|
<Divider orientation="left">腾讯云智服</Divider>
|
||||||
<FormItem label="唯一标识" prop="salesConsigneeDetail">
|
<FormItem label="唯一标识" prop="salesConsigneeDetail">
|
||||||
<Input v-model="shopForm.yzfSign" clearable style="width: 350px" />
|
<Input v-model="shopForm.yzfSign" clearable style="width: 350px" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="小程序唯一标识" prop="salesConsigneeDetail">
|
<FormItem label="小程序唯一标识" prop="salesConsigneeDetail">
|
||||||
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
||||||
</FormItem> -->
|
</FormItem>
|
||||||
<Spin fix v-if="loading"></Spin>
|
<Spin fix v-if="loading"></Spin>
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
|
@ -132,13 +132,13 @@ export const delSpec = (id, params) => {
|
||||||
return deleteRequest(`/goods/spec/del/${id}`, params);
|
return deleteRequest(`/goods/spec/del/${id}`, params);
|
||||||
};
|
};
|
||||||
// 获取商品规格值列表
|
// 获取商品规格值列表
|
||||||
export const getSpecValuesListData = (id, params) => {
|
// export const getSpecValuesListData = (id, params) => {
|
||||||
return getRequest(`/goods/spec-values/values/${id}`, params);
|
// return getRequest(`/goods/spec-values/values/${id}`, params);
|
||||||
};
|
// };
|
||||||
// 添加商品规格值
|
// 添加商品规格值
|
||||||
export const saveSpecValues = (id, params) => {
|
// export const saveSpecValues = (id, params) => {
|
||||||
return postRequest(`/goods/spec-values/save/${id}`, params);
|
// return postRequest(`/goods/spec-values/save/${id}`, params);
|
||||||
};
|
// };
|
||||||
|
|
||||||
// 查询某分类下的全部子分类列表
|
// 查询某分类下的全部子分类列表
|
||||||
export const getGoodsCategory = parent_id => {
|
export const getGoodsCategory = parent_id => {
|
||||||
|
@ -209,24 +209,19 @@ export const deleteParamsGroup = (id, params) => {
|
||||||
return deleteRequest(`/goods/category/parameters/${id}`, params);
|
return deleteRequest(`/goods/category/parameters/${id}`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
//保存获取关联规格
|
|
||||||
export const getGoodsSpecInfo = (category_id, params) => {
|
|
||||||
return getRequest(`/goods/category/spec/goods/${category_id}`, params);
|
|
||||||
};
|
|
||||||
|
|
||||||
//获取sku列表
|
//获取sku列表
|
||||||
export const getSkuPage = params => {
|
export const getSkuPage = params => {
|
||||||
return getRequest(`/goodsSku/getByPage`, params);
|
return getRequest(`/goodsSku/getByPage`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取商品规格值列表
|
// 获取商品规格值列表
|
||||||
export const getSpecValuesListSellerData = (id, params) => {
|
// export const getSpecValuesListSellerData = (id, params) => {
|
||||||
return getRequest(`/goods/spec-values/values/${id}`, params);
|
// return getRequest(`/goods/spec-values/values/${id}`, params);
|
||||||
};
|
// };
|
||||||
// 添加商品规格值
|
// 添加商品规格值
|
||||||
export const saveSpecValuesSeller = (id, params) => {
|
// export const saveSpecValuesSeller = (id, params) => {
|
||||||
return postRequest(`/goods/spec-values/save/${id}`, params);
|
// return postRequest(`/goods/spec-values/save/${id}`, params);
|
||||||
};
|
// };
|
||||||
|
|
||||||
// 获取商品规格分页列表
|
// 获取商品规格分页列表
|
||||||
export const getSpecListSellerData = params => {
|
export const getSpecListSellerData = params => {
|
||||||
|
@ -317,8 +312,8 @@ export const getCategoryParamsListDataSeller = (id, params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
//保存获取关联规格
|
//保存获取关联规格
|
||||||
export const getGoodsSpecInfoSeller = (category_id, params) => {
|
export const getGoodsSpecInfoSeller = (category_id) => {
|
||||||
return getRequest(`/goods/category/spec/goods/${category_id}`, params);
|
return getRequest(`/goods/spec/${category_id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
//批量设置运费模板
|
//批量设置运费模板
|
||||||
|
|
|
@ -69,14 +69,6 @@ service.interceptors.response.use(
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 403:
|
|
||||||
// 权限不足
|
|
||||||
if (data.message !== null) {
|
|
||||||
Message.error(data.message);
|
|
||||||
} else {
|
|
||||||
Message.error("权限不足");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 500:
|
case 500:
|
||||||
// 系统异常
|
// 系统异常
|
||||||
if (data.message !== null) {
|
if (data.message !== null) {
|
||||||
|
@ -94,6 +86,8 @@ service.interceptors.response.use(
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
// 这种情况一般调到登录页
|
// 这种情况一般调到登录页
|
||||||
|
} else if (error.response.status === 404) {
|
||||||
|
// 避免刷新token报错
|
||||||
} else if (error.response.status === 403) {
|
} else if (error.response.status === 403) {
|
||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
if (isRefreshToken === 1) {
|
if (isRefreshToken === 1) {
|
||||||
|
|
|
@ -54,20 +54,20 @@ export const result = [
|
||||||
children: null,
|
children: null,
|
||||||
permTypes: []
|
permTypes: []
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "daft-goods",
|
// name: "daft-goods",
|
||||||
showAlways: true,
|
// showAlways: true,
|
||||||
level: 2,
|
// level: 2,
|
||||||
type: 0,
|
// type: 0,
|
||||||
title: "草稿商品",
|
// title: "草稿商品",
|
||||||
path: "daft-goods",
|
// path: "daft-goods",
|
||||||
component: "goods/goods-seller/draftGoods",
|
// component: "goods/goods-seller/draftGoods",
|
||||||
icon: "md-person",
|
// icon: "md-person",
|
||||||
isMenu: true,
|
// isMenu: true,
|
||||||
url: "",
|
// url: "",
|
||||||
children: null,
|
// children: null,
|
||||||
permTypes: []
|
// permTypes: []
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "template-goods",
|
path: "template-goods",
|
||||||
|
|
|
@ -5,7 +5,7 @@ import ViewUI from "view-design";
|
||||||
import "./styles/theme.less";
|
import "./styles/theme.less";
|
||||||
|
|
||||||
import "core-js/stable";
|
import "core-js/stable";
|
||||||
import "regenerator-runtime/runtime";
|
// import "regenerator-runtime/runtime";
|
||||||
import vueQr from 'vue-qr'
|
import vueQr from 'vue-qr'
|
||||||
|
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
|
|
|
@ -5,7 +5,7 @@ export const loginRouter = {
|
||||||
path: "/login",
|
path: "/login",
|
||||||
name: "login",
|
name: "login",
|
||||||
meta: {
|
meta: {
|
||||||
title: "登录 - lili商家后台 "
|
title: "登录 - lili商家后台"
|
||||||
},
|
},
|
||||||
component: () => import("@/views/login.vue")
|
component: () => import("@/views/login.vue")
|
||||||
};
|
};
|
||||||
|
|
|
@ -395,11 +395,11 @@ div.base-info-item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
display: inline-flex;
|
display: inline-block;
|
||||||
flex-direction: column;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
.demo-upload-list img {
|
.demo-upload-list img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<Row @keydown.enter.native="handleSearch">
|
<Row @keydown.enter.native="handleSearch">
|
||||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
<Form-item label="商品名称" prop="goodsName">
|
<Form-item label="商品名称" prop="goodsName">
|
||||||
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px"/>
|
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" />
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="状态" prop="status">
|
<Form-item label="状态" prop="status">
|
||||||
<Select v-model="searchForm.marketEnable" placeholder="请选择" clearable style="width: 200px">
|
<Select v-model="searchForm.marketEnable" placeholder="请选择" clearable style="width: 200px">
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="商品编号" prop="sn">
|
<Form-item label="商品编号" prop="sn">
|
||||||
<Input type="text" v-model="searchForm.sn" placeholder="商品编号" clearable style="width: 200px"/>
|
<Input type="text" v-model="searchForm.sn" placeholder="商品编号" clearable style="width: 200px" />
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||||
<Button @click="handleReset" class="search-btn">重置</Button>
|
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||||
|
@ -55,8 +55,7 @@
|
||||||
</div>
|
</div>
|
||||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<vue-qr :text="wapLinkTo(row.id,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff"
|
<vue-qr :text="wapLinkTo(row.id,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||||
:size="150"></vue-qr>
|
|
||||||
</div>
|
</div>
|
||||||
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
|
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
|
||||||
</Poptip>
|
</Poptip>
|
||||||
|
@ -67,15 +66,21 @@
|
||||||
</Table>
|
</Table>
|
||||||
|
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||||
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
show-total show-elevator show-sizer></Page>
|
||||||
show-total show-elevator show-sizer></Page>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500">
|
<Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500">
|
||||||
<Input type="number" v-model="stockAllUpdate" placeholder="全部修改,如不需全部修改,则不需输入"/>
|
<Tabs value="updateStock">
|
||||||
<Table :columns="updateStockColumns" :data="stockList" border :span-method="handleSpan"></Table>
|
<TabPane label="手动规格更新" name="updateStock">
|
||||||
|
<Table :columns="updateStockColumns" :data="stockList" border :span-method="handleSpan"></Table>
|
||||||
|
</TabPane>
|
||||||
|
<TabPane label="批量规格更新" name="stockAll">
|
||||||
|
<Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" />
|
||||||
|
</TabPane>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="text" @click="updateStockModalVisible = false">取消</Button>
|
<Button type="text" @click="updateStockModalVisible = false">取消</Button>
|
||||||
<Button type="primary" @click="updateStock">更新</Button>
|
<Button type="primary" @click="updateStock">更新</Button>
|
||||||
|
@ -86,8 +91,7 @@
|
||||||
<Modal title="批量设置运费模板" v-model="shipTemplateModal" :mask-closable="false" :width="500">
|
<Modal title="批量设置运费模板" v-model="shipTemplateModal" :mask-closable="false" :width="500">
|
||||||
<Form ref="shipTemplateForm" :model="shipTemplateForm" :label-width="120">
|
<Form ref="shipTemplateForm" :model="shipTemplateForm" :label-width="120">
|
||||||
<FormItem class="form-item-view-el" label="运费" prop="freightPayer">
|
<FormItem class="form-item-view-el" label="运费" prop="freightPayer">
|
||||||
<RadioGroup type="button" button-style="solid" @on-change="logisticsTemplateUndertakerChange"
|
<RadioGroup type="button" button-style="solid" @on-change="logisticsTemplateUndertakerChange" v-model="shipTemplateForm.freightPayer">
|
||||||
v-model="shipTemplateForm.freightPayer">
|
|
||||||
<Radio label="STORE">
|
<Radio label="STORE">
|
||||||
<span>卖家承担运费</span>
|
<span>卖家承担运费</span>
|
||||||
</Radio>
|
</Radio>
|
||||||
|
@ -170,32 +174,11 @@ export default {
|
||||||
width: 130,
|
width: 130,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.isAuth == "TOBEAUDITED") {
|
if (params.row.isAuth == "TOBEAUDITED") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "blue",},},"待审核");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "待审核",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "PASS") {
|
} else if (params.row.isAuth == "PASS") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green",},},"通过");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "审核通过",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "REFUSE") {
|
} else if (params.row.isAuth == "REFUSE") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "red",},},"审核拒绝");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "审核拒绝",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -260,11 +243,11 @@ export default {
|
||||||
width: 130,
|
width: 130,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.goodsType === 'PHYSICAL_GOODS') {
|
if (params.row.goodsType === 'PHYSICAL_GOODS') {
|
||||||
return h("div", "实物商品");
|
return h("Tag", {props: {color: "geekblue"}},"实物商品");
|
||||||
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
|
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
|
||||||
return h("div", "虚拟商品");
|
return h("Tag", {props: {color: "purple"}},"虚拟商品");
|
||||||
} else {
|
} else {
|
||||||
return h("div", "电子卡券");
|
return h("Tag", {props: {color: "cyan"}},"电子卡券");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -297,32 +280,11 @@ export default {
|
||||||
width: 120,
|
width: 120,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.isAuth == "PASS") {
|
if (params.row.isAuth == "PASS") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green"}},"通过");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "审核通过",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "TOBEAUDITED") {
|
} else if (params.row.isAuth == "TOBEAUDITED") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "volcano"}},"待审核");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "待审核",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.isAuth == "REFUSE") {
|
} else if (params.row.isAuth == "REFUSE") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "red"}},"审核拒绝");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "审核拒绝",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -333,28 +295,12 @@ export default {
|
||||||
sortable: false,
|
sortable: false,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.marketEnable == "DOWN") {
|
if (params.row.marketEnable == "DOWN") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "red"}},"下架");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "下架",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.marketEnable == "UPPER") {
|
} else if (params.row.marketEnable == "UPPER") {
|
||||||
return h("div", [
|
return h("Tag", {props: {color: "green"}},"上架");
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "上架",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
|
@ -455,10 +401,10 @@ export default {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
addGoods() {
|
addGoods() {
|
||||||
this.$router.push({name: "goods-operation"});
|
this.$router.push({ name: "goods-operation" });
|
||||||
},
|
},
|
||||||
editGoods(v) {
|
editGoods(v) {
|
||||||
this.$router.push({name: "goods-operation-edit", query: {id: v.id}});
|
this.$router.push({ name: "goods-operation-edit", query: { id: v.id } });
|
||||||
},
|
},
|
||||||
|
|
||||||
//批量操作
|
//批量操作
|
||||||
|
@ -481,7 +427,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getStockDetail(id) {
|
getStockDetail(id) {
|
||||||
getGoodsSkuListDataSeller({goodsId: id, pageSize: 1000}).then((res) => {
|
getGoodsSkuListDataSeller({ goodsId: id, pageSize: 1000 }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.updateStockModalVisible = true;
|
this.updateStockModalVisible = true;
|
||||||
this.stockAllUpdate = undefined;
|
this.stockAllUpdate = undefined;
|
||||||
|
@ -491,7 +437,7 @@ export default {
|
||||||
},
|
},
|
||||||
updateStock() {
|
updateStock() {
|
||||||
let updateStockList = this.stockList.map((i) => {
|
let updateStockList = this.stockList.map((i) => {
|
||||||
let j = {skuId: i.id, quantity: i.quantity};
|
let j = { skuId: i.id, quantity: i.quantity };
|
||||||
if (this.stockAllUpdate) {
|
if (this.stockAllUpdate) {
|
||||||
j.quantity = this.stockAllUpdate;
|
j.quantity = this.stockAllUpdate;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,46 +185,33 @@
|
||||||
<div class="sku-item" v-for="(item, $index) in skuInfo" :key="$index">
|
<div class="sku-item" v-for="(item, $index) in skuInfo" :key="$index">
|
||||||
<Card :bordered="true">
|
<Card :bordered="true">
|
||||||
<FormItem label="规格名:" class="sku-item-content-name">
|
<FormItem label="规格名:" class="sku-item-content-name">
|
||||||
<AutoComplete style="width: 150px" v-model="item.name" :maxlength="30" :data="specListSelected" placeholder="请输入规格项名称" :filter-method="filterMethod"
|
<AutoComplete style="width: 150px" v-model="item.name" :maxlength="30" placeholder="请输入规格项名称"
|
||||||
@on-change="skuItemChange(item.name, $index)" @keyup.enter.native="editSkuItem(item, $index)" @on-focus="
|
:filter-method="filterMethod" :data="skuData"
|
||||||
getActiveSkuItem(index, $index, item, val)
|
@on-change="editSkuItem">
|
||||||
" @on-blur="editSkuItem(item, $index)" />
|
</AutoComplete>
|
||||||
<Button type="error" style="margin-left: 10px" @click="handleCloseSkuItem($index)">删除
|
<Button type="error" style="margin-left: 10px" @click="handleCloseSkuItem($index)">删除</Button>
|
||||||
</Button>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="规格值:" prop="sku">
|
<FormItem label="规格值:" prop="sku">
|
||||||
<!--规格值文本列表-->
|
<!--规格值文本列表-->
|
||||||
<div v-for="(val, index) in item.spec_values" :key="index" style="padding: 0px 20px 10px 0px; float: left">
|
<div v-for="(val, index) in item.spec_values" :key="index" style="padding: 0px 20px 10px 0px; float: left">
|
||||||
<div>
|
<div>
|
||||||
<AutoComplete style="width: 150px; float: left" v-model="val.value" :maxlength="30" :data="skuValue" placeholder="请输入规格值名称" :filter-method="filterMethod" @on-change="
|
<AutoComplete style="width: 150px; float: left" v-if="skuValVisible" v-model="val.value" :maxlength="30" placeholder="请输入规格值名称"
|
||||||
skuValueChange(val.value, index, item)
|
:filter-method="filterMethod" :data="skuVal" @on-focus="changeSkuVals(item.name)"
|
||||||
" @on-focus="
|
@on-change="skuValueChange(val.value, $index, item)">
|
||||||
getActiveSkuValueItem(
|
|
||||||
index,
|
</AutoComplete>
|
||||||
$index,
|
<Button type="error" style="margin-left: 10px" @click="handleCloseSkuValue(item, index)">删除</Button>
|
||||||
item,
|
|
||||||
val
|
|
||||||
)
|
|
||||||
" @keyup.enter.native="
|
|
||||||
editSkuIValue(item, val, $index, index)
|
|
||||||
" @on-blur="
|
|
||||||
editSkuIValue(item, val, $index, $index)
|
|
||||||
"></AutoComplete>
|
|
||||||
<Button type="error" style="float: left; margin-left: 10px" @click="handleCloseSkuValue($index, index)">删除
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left">
|
<div style="float: left">
|
||||||
<Button type="primary" @click="addSpec($index, item)">添加规格值
|
<Button type="primary" @click="addSpec($index, item)">添加规格值</Button>
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
<Button class="add-sku-btn" type="primary" size="mini" @click="addSkuItem">添加规格项目
|
<Button class="add-sku-btn" type="primary" size="mini" @click="addSkuItem">添加规格项目</Button>
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel name="2">
|
<Panel name="2">
|
||||||
|
@ -317,7 +304,7 @@
|
||||||
<editor id="mobileIntr" v-model="baseInfoForm.mobileIntro"></editor>
|
<editor id="mobileIntr" v-model="baseInfoForm.mobileIntro"></editor>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="this.baseInfoForm.goodsType!='VIRTUAL_GOODS'">
|
<div v-if="baseInfoForm.goodsType!='VIRTUAL_GOODS'">
|
||||||
<h4>商品物流信息</h4>
|
<h4>商品物流信息</h4>
|
||||||
<div class="form-item-view">
|
<div class="form-item-view">
|
||||||
<FormItem class="form-item-view-el" label="商品重量" prop="weight">
|
<FormItem class="form-item-view-el" label="商品重量" prop="weight">
|
||||||
|
@ -325,24 +312,11 @@
|
||||||
<span slot="append">kg</span>
|
<span slot="append">kg</span>
|
||||||
</Input>
|
</Input>
|
||||||
</FormItem>
|
</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
|
<FormItem
|
||||||
class="form-item-view-el"
|
class="form-item-view-el"
|
||||||
label="物流模板"
|
label="物流模板"
|
||||||
prop="templateId"
|
prop="templateId"
|
||||||
v-if="logisticsTemplateShow"
|
|
||||||
>
|
>
|
||||||
<Select v-model="baseInfoForm.templateId" style="width: 200px">
|
<Select v-model="baseInfoForm.templateId" style="width: 200px">
|
||||||
<Option
|
<Option
|
||||||
|
@ -431,10 +405,11 @@
|
||||||
<Button type="primary" @click="save" :loading="submitLoading" v-if="activestep === 1">
|
<Button type="primary" @click="save" :loading="submitLoading" v-if="activestep === 1">
|
||||||
{{ this.goodsId ? "保存" : "保存商品" }}
|
{{ this.goodsId ? "保存" : "保存商品" }}
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="primary" @click="saveToDraft('TEMPLATE')" v-if="activestep === 1">保存为模版
|
<Button type="primary" @click="saveToDraft('TEMPLATE')" v-if="activestep === 1">
|
||||||
</Button>
|
保存为模版
|
||||||
<Button type="primary" @click="saveToDraft('DRAFT')" v-if="activestep === 1 && !isOperationGoods">保存至草稿箱
|
|
||||||
</Button>
|
</Button>
|
||||||
|
<!-- <Button type="primary" @click="saveToDraft('DRAFT')" v-if="activestep === 1 && !isOperationGoods">保存至草稿箱
|
||||||
|
</Button> -->
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -552,7 +527,6 @@ export default {
|
||||||
check: false,
|
check: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
show: "1",
|
|
||||||
//提交状态
|
//提交状态
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
//上传图片路径
|
//上传图片路径
|
||||||
|
@ -632,8 +606,6 @@ export default {
|
||||||
salesModel: "RETAIL",
|
salesModel: "RETAIL",
|
||||||
/** 商品参数列表 */
|
/** 商品参数列表 */
|
||||||
goodsParamsList: [],
|
goodsParamsList: [],
|
||||||
/** 运费承担者 */
|
|
||||||
// freightPayer: "STORE",
|
|
||||||
/** 商品重量 */
|
/** 商品重量 */
|
||||||
weight: "",
|
weight: "",
|
||||||
/** 商品相册列表 */
|
/** 商品相册列表 */
|
||||||
|
@ -647,8 +619,9 @@ export default {
|
||||||
brandId: 0,
|
brandId: 0,
|
||||||
/** 计量单位 **/
|
/** 计量单位 **/
|
||||||
goodsUnit: "",
|
goodsUnit: "",
|
||||||
|
/** 商品类型 **/
|
||||||
goodsType: "",
|
goodsType: "",
|
||||||
/** 路径 **/
|
/** 分类路径 **/
|
||||||
categoryPath: "",
|
categoryPath: "",
|
||||||
/** 商品卖点 **/
|
/** 商品卖点 **/
|
||||||
sellingPoint: "",
|
sellingPoint: "",
|
||||||
|
@ -668,50 +641,20 @@ export default {
|
||||||
/** 表格数据 */
|
/** 表格数据 */
|
||||||
skuTableData: [],
|
skuTableData: [],
|
||||||
|
|
||||||
/** 请求数据*/
|
/** 默认的规格参数 */
|
||||||
skuData: [],
|
skuData: [],
|
||||||
|
|
||||||
/** 当前可选择的 规格名称*/
|
/** 默认的规格值 */
|
||||||
skuKey: [],
|
skuVals: [],
|
||||||
|
// 某一规格名下的规格值
|
||||||
/** 当前可选择的 规格值*/
|
skuVal: [],
|
||||||
skuValue: [],
|
|
||||||
|
|
||||||
open_panel: [1, 2],
|
open_panel: [1, 2],
|
||||||
|
|
||||||
/** 要提交的规格数据*/
|
/** 要提交的规格数据*/
|
||||||
skuInfo: [],
|
skuInfo: [],
|
||||||
|
|
||||||
/** 当前选择的规格项*/
|
|
||||||
specSelected: "",
|
|
||||||
|
|
||||||
/** 当前选择的规格值*/
|
|
||||||
specValSelected: "",
|
|
||||||
/** 当前规格项下的规格值列表*/
|
|
||||||
specListSelected: [],
|
|
||||||
|
|
||||||
/** 当前规格项下的规格值列表*/
|
|
||||||
specList: [],
|
|
||||||
|
|
||||||
/** 当前规格项索引 */
|
|
||||||
activeSkuItemIndex: 0,
|
|
||||||
|
|
||||||
/** 当前规格项 */
|
|
||||||
activeSkuItem: {},
|
|
||||||
|
|
||||||
/** 规格图片 */
|
/** 规格图片 */
|
||||||
images: [],
|
images: [],
|
||||||
/** 当前规格值索引 */
|
|
||||||
activeSkuValIndex: 0,
|
|
||||||
|
|
||||||
/** 当前规格值 */
|
|
||||||
activeSkuVal: {},
|
|
||||||
|
|
||||||
/** 当前百分比 */
|
|
||||||
currentPercent: 0,
|
|
||||||
|
|
||||||
/** 物流模板是否展示 **/
|
|
||||||
logisticsTemplateShow: false,
|
|
||||||
|
|
||||||
/** 运费模板 **/
|
/** 运费模板 **/
|
||||||
logisticsTemplate: [],
|
logisticsTemplate: [],
|
||||||
|
@ -772,6 +715,7 @@ export default {
|
||||||
"specId",
|
"specId",
|
||||||
"specValueId",
|
"specValueId",
|
||||||
],
|
],
|
||||||
|
skuValVisible: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -779,14 +723,21 @@ export default {
|
||||||
this.accessToken = {
|
this.accessToken = {
|
||||||
accessToken: this.getStore("accessToken"),
|
accessToken: this.getStore("accessToken"),
|
||||||
};
|
};
|
||||||
|
// 获取运费模板
|
||||||
|
API_Shop.getShipTemplate().then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.logisticsTemplate = res.result;
|
||||||
|
}
|
||||||
|
})
|
||||||
//编辑商品
|
//编辑商品
|
||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
this.activestep = 1;
|
this.activestep = 1;
|
||||||
this.goodsId = this.$route.query.id;
|
this.goodsId = this.$route.query.id;
|
||||||
this.GET_GoodData();
|
this.GET_GoodData();
|
||||||
this.selectGoodsType = false;
|
this.selectGoodsType = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
//编辑模版/草稿
|
//编辑模版
|
||||||
else if (this.$route.query.draftId) {
|
else if (this.$route.query.draftId) {
|
||||||
this.draftId = this.$route.query.draftId;
|
this.draftId = this.$route.query.draftId;
|
||||||
this.activestep = 1;
|
this.activestep = 1;
|
||||||
|
@ -806,7 +757,6 @@ export default {
|
||||||
this.baseInfoForm = {
|
this.baseInfoForm = {
|
||||||
salesModel: "RETAIL",
|
salesModel: "RETAIL",
|
||||||
goodsParamsList: [],
|
goodsParamsList: [],
|
||||||
// freightPayer: "STORE",
|
|
||||||
weight: "",
|
weight: "",
|
||||||
goodsGalleryFiles: [],
|
goodsGalleryFiles: [],
|
||||||
release: "true",
|
release: "true",
|
||||||
|
@ -865,6 +815,7 @@ export default {
|
||||||
fieldData.unshift(fieldData.splice(index, 1)[0]);
|
fieldData.unshift(fieldData.splice(index, 1)[0]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 获取商品模板
|
||||||
GET_GoodsTemplate() {
|
GET_GoodsTemplate() {
|
||||||
let searchParams = {
|
let searchParams = {
|
||||||
saveType: "TEMPLATE",
|
saveType: "TEMPLATE",
|
||||||
|
@ -877,6 +828,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 编辑sku图片
|
||||||
editSkuPicture(row) {
|
editSkuPicture(row) {
|
||||||
console.log(row);
|
console.log(row);
|
||||||
if (row.images && row.images.length > 0) {
|
if (row.images && row.images.length > 0) {
|
||||||
|
@ -964,40 +916,7 @@ export default {
|
||||||
}
|
}
|
||||||
return !check;
|
return !check;
|
||||||
},
|
},
|
||||||
async getActiveSkuItem(index, $index, item, val) {
|
// 跳转商品列表
|
||||||
this.specSelected = "";
|
|
||||||
await this.GET_SkuSpec();
|
|
||||||
},
|
|
||||||
async getActiveSkuValueItem(index, $index, item, val) {
|
|
||||||
this.specValSelected = "";
|
|
||||||
await this.GET_SkuSpecVal(item.spec_id);
|
|
||||||
},
|
|
||||||
async editSkuItem(item, $index) {
|
|
||||||
if (item.name) {
|
|
||||||
API_GOODS.insertSpecSeller({
|
|
||||||
specName: item.name,
|
|
||||||
categoryPath: this.baseInfoForm.categoryPath,
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.message !== "60001") {
|
|
||||||
this.skuItemChange(item.name, $index);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//选择运费模板则展示运费规则
|
|
||||||
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() {
|
gotoGoodsList() {
|
||||||
this.$router.push({ name: "goods" });
|
this.$router.push({ name: "goods" });
|
||||||
},
|
},
|
||||||
|
@ -1041,6 +960,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 编辑时获取商品信息
|
||||||
async GET_GoodData() {
|
async GET_GoodData() {
|
||||||
let response = {};
|
let response = {};
|
||||||
if (this.draftId) {
|
if (this.draftId) {
|
||||||
|
@ -1053,15 +973,8 @@ export default {
|
||||||
...this.baseInfoForm,
|
...this.baseInfoForm,
|
||||||
...response.result,
|
...response.result,
|
||||||
};
|
};
|
||||||
console.warn(this.baseInfoForm);
|
// console.warn(this.baseInfoForm);
|
||||||
// if (this.baseInfoForm.freightPayer === "BUYER") {
|
|
||||||
// API_Shop.getShipTemplate().then((res) => {
|
|
||||||
// if (res.success) {
|
|
||||||
// this.logisticsTemplate = res.result;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// this.logisticsTemplateShow = true;
|
|
||||||
// }
|
|
||||||
this.baseInfoForm.release = "true";
|
this.baseInfoForm.release = "true";
|
||||||
this.baseInfoForm.recommend = this.baseInfoForm.recommend
|
this.baseInfoForm.recommend = this.baseInfoForm.recommend
|
||||||
? "true"
|
? "true"
|
||||||
|
@ -1073,6 +986,8 @@ export default {
|
||||||
this.activeCategoryName3 = response.result.categoryName[2];
|
this.activeCategoryName3 = response.result.categoryName[2];
|
||||||
|
|
||||||
this.baseInfoForm.categoryId = response.result.categoryPath.split(",");
|
this.baseInfoForm.categoryId = response.result.categoryPath.split(",");
|
||||||
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
response.result.goodsGalleryList &&
|
response.result.goodsGalleryList &&
|
||||||
response.result.goodsGalleryList.length > 0
|
response.result.goodsGalleryList.length > 0
|
||||||
|
@ -1086,6 +1001,8 @@ export default {
|
||||||
|
|
||||||
this.categoryId = this.baseInfoForm.categoryId[2];
|
this.categoryId = this.baseInfoForm.categoryId[2];
|
||||||
|
|
||||||
|
this.Get_SkuInfoByCategory(this.categoryId)
|
||||||
|
|
||||||
this.renderGoodsDetailSku(response.result.skuList);
|
this.renderGoodsDetailSku(response.result.skuList);
|
||||||
|
|
||||||
/** 查询品牌列表 */
|
/** 查询品牌列表 */
|
||||||
|
@ -1096,7 +1013,7 @@ export default {
|
||||||
this.GET_ShopGoodsLabel();
|
this.GET_ShopGoodsLabel();
|
||||||
this.GET_GoodsUnit();
|
this.GET_GoodsUnit();
|
||||||
},
|
},
|
||||||
|
// 渲染sku数据
|
||||||
renderGoodsDetailSku(skuList) {
|
renderGoodsDetailSku(skuList) {
|
||||||
let skus = [];
|
let skus = [];
|
||||||
let skusInfo = [];
|
let skusInfo = [];
|
||||||
|
@ -1202,25 +1119,7 @@ export default {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
async GET_SkuSpec() {
|
|
||||||
if(!this.specSelected){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let specResult = await API_GOODS.getSpecListSellerData({
|
|
||||||
pageNumber: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
specName: this.specSelected,
|
|
||||||
categoryPath: this.baseInfoForm.categoryPath,
|
|
||||||
});
|
|
||||||
if (specResult.success && specResult.result.records.length > 0) {
|
|
||||||
this.specListSelected = specResult.result.records.map(
|
|
||||||
(i) => i.specName
|
|
||||||
);
|
|
||||||
this.specList = specResult.result.records;
|
|
||||||
} else {
|
|
||||||
this.specListSelected = [];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 添加规格项 */
|
/** 添加规格项 */
|
||||||
addSkuItem() {
|
addSkuItem() {
|
||||||
if (this.skuInfo.length >= 5) {
|
if (this.skuInfo.length >= 5) {
|
||||||
|
@ -1236,16 +1135,31 @@ export default {
|
||||||
*/
|
*/
|
||||||
this.renderTableData();
|
this.renderTableData();
|
||||||
},
|
},
|
||||||
async GET_SkuSpecVal(id) {
|
// 编辑规格名
|
||||||
let specValResult = await API_GOODS.getSpecValuesListSellerData(id, {
|
editSkuItem () {
|
||||||
pageNumber: 1,
|
this.renderTableData();
|
||||||
pageSize: 10,
|
},
|
||||||
specVal: this.specValSelected,
|
// 编辑规格值
|
||||||
});
|
async skuValueChange(val, index, item) {
|
||||||
if (specValResult.success && specValResult.result.records.length > 0) {
|
/** 更新skuInfo数据 */
|
||||||
this.skuValue = specValResult.result.records.map((i) => i.specValue);
|
let _arr = cloneObj(item);
|
||||||
} else {
|
this.$set(item, "name", _arr.name);
|
||||||
this.skuValue = [];
|
this.$set(this.skuInfo, index, _arr);
|
||||||
|
/**
|
||||||
|
* 渲染规格详细表格
|
||||||
|
*/
|
||||||
|
this.renderTableData();
|
||||||
|
},
|
||||||
|
// 获取焦点时,取得规格名对应的规格值
|
||||||
|
changeSkuVals (name) {
|
||||||
|
if (name) {
|
||||||
|
this.skuData.forEach((e, index) => {
|
||||||
|
if (e === name) {
|
||||||
|
if (this.skuVal.length != this.skuVals[index].length) {
|
||||||
|
this.skuVal = this.skuVals[index]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 移除当前规格项 进行数据变化*/
|
/** 移除当前规格项 进行数据变化*/
|
||||||
|
@ -1256,6 +1170,7 @@ export default {
|
||||||
*/
|
*/
|
||||||
this.renderTableData();
|
this.renderTableData();
|
||||||
},
|
},
|
||||||
|
// 添加规格值的验证
|
||||||
validateEmpty(params) {
|
validateEmpty(params) {
|
||||||
let flag = true;
|
let flag = true;
|
||||||
params.forEach((item) => {
|
params.forEach((item) => {
|
||||||
|
@ -1272,16 +1187,15 @@ export default {
|
||||||
},
|
},
|
||||||
/** 添加当前规格项的规格值*/
|
/** 添加当前规格项的规格值*/
|
||||||
addSpec($index, item) {
|
addSpec($index, item) {
|
||||||
this.activeSkuItemIndex = $index;
|
|
||||||
|
|
||||||
if (this.validateEmpty(this.skuInfo[$index].spec_values)) {
|
if (this.validateEmpty(item.spec_values)) {
|
||||||
if (this.skuInfo[$index].spec_values.length >= 10) {
|
if (item.spec_values.length >= 10) {
|
||||||
this.$Message.error("规格值不能大于10个!");
|
this.$Message.error("规格值不能大于10个!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$set(
|
this.$set(
|
||||||
this.skuInfo[$index].spec_values,
|
item.spec_values,
|
||||||
this.skuInfo[$index].spec_values.length,
|
item.spec_values.length,
|
||||||
{
|
{
|
||||||
name: item.name,
|
name: item.name,
|
||||||
}
|
}
|
||||||
|
@ -1293,21 +1207,10 @@ export default {
|
||||||
this.renderTableData();
|
this.renderTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 根据规格项名称,搜索对应的规格对象(如果是服务器设置过的话)
|
|
||||||
*/
|
|
||||||
findSpec(name) {
|
|
||||||
let spec = { name: name };
|
|
||||||
this.skuData.forEach((item) => {
|
|
||||||
if (item.name === name) {
|
|
||||||
spec = item;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return spec;
|
|
||||||
},
|
|
||||||
/** 移除当前规格值 */
|
/** 移除当前规格值 */
|
||||||
handleCloseSkuValue($index, index) {
|
handleCloseSkuValue(item, index) {
|
||||||
this.skuInfo[$index].spec_values.splice(index, 1);
|
item.spec_values.splice(index, 1);
|
||||||
|
|
||||||
this.baseInfoForm.regeneratorSkuFlag = true;
|
this.baseInfoForm.regeneratorSkuFlag = true;
|
||||||
/**
|
/**
|
||||||
|
@ -1315,62 +1218,7 @@ export default {
|
||||||
*/
|
*/
|
||||||
this.renderTableData();
|
this.renderTableData();
|
||||||
},
|
},
|
||||||
/** 选择规格值时触发 */
|
|
||||||
async skuValueChange(val, index, item) {
|
|
||||||
this.specValSelected = val;
|
|
||||||
await this.GET_SkuSpecVal(item.spec_id);
|
|
||||||
/** 更新skuInfo数据 */
|
|
||||||
let _arr = cloneObj(this.skuInfo[this.activeSkuItemIndex]);
|
|
||||||
this.$set(this.skuInfo[this.activeSkuItemIndex], "name", _arr.name);
|
|
||||||
this.$set(this.skuInfo, this.activeSkuItemIndex, _arr);
|
|
||||||
/**
|
|
||||||
* 渲染规格详细表格
|
|
||||||
*/
|
|
||||||
this.renderTableData();
|
|
||||||
},
|
|
||||||
/** 编辑规格值时触发 */
|
|
||||||
async editSkuIValue(item, val, $index, index) {
|
|
||||||
await API_GOODS.saveSpecValuesSeller(item.spec_id, {
|
|
||||||
spec_value: [val.value],
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 渲染规格详细表格
|
|
||||||
*/
|
|
||||||
this.renderTableData();
|
|
||||||
},
|
|
||||||
/** 获取编辑时的skuInfo信息 */
|
|
||||||
getSkuInfo() {
|
|
||||||
/** 下拉列表数据(skuData)存在时 检测productSkuInfo中对应的规格(spec_id)项 并且赋值于skuInfo中对应的规格项信息(描述 + 名称) */
|
|
||||||
if (this.categoryId) {
|
|
||||||
API_GOODS.getSpecValuesListData(this.categoryId, {}).then(
|
|
||||||
(response) => {
|
|
||||||
this.skuData = response;
|
|
||||||
if (
|
|
||||||
this.skuData.length > 0 &&
|
|
||||||
Array.isArray(this.productSkuInfo) &&
|
|
||||||
this.productSkuInfo.length > 0
|
|
||||||
) {
|
|
||||||
this.skuInfo = cloneObj(this.productSkuInfo);
|
|
||||||
if (this.skuInfo.length > 0) {
|
|
||||||
this.skuInfo.forEach((key) => {
|
|
||||||
this.skuData.forEach((item) => {
|
|
||||||
if (key.spec_id === item.spec_id) {
|
|
||||||
key.name = item.name;
|
|
||||||
key.spec_memo = item.spec_memo;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 渲染规格详细表格
|
|
||||||
*/
|
|
||||||
this.renderTableData();
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* 渲染table所需要的column 和 data
|
* 渲染table所需要的column 和 data
|
||||||
*/
|
*/
|
||||||
|
@ -1438,35 +1286,34 @@ export default {
|
||||||
});
|
});
|
||||||
cloneTemp.splice(0, 1);
|
cloneTemp.splice(0, 1);
|
||||||
result = this.specIterator(result, cloneTemp);
|
result = this.specIterator(result, cloneTemp);
|
||||||
result = this.defaultParams(result);
|
// result = this.defaultParams(result);
|
||||||
this.skuTableData = result;
|
this.skuTableData = result;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 自动完成表单所需方法*/
|
|
||||||
filterMethod(value, option) {
|
|
||||||
return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
|
|
||||||
},
|
|
||||||
/** 根据分类id获取系统设置规格信息*/
|
/** 根据分类id获取系统设置规格信息*/
|
||||||
Get_SkuInfoByCategory() {
|
Get_SkuInfoByCategory(categoryId) {
|
||||||
if (this.baseInfoForm.categoryId) {
|
if (categoryId) {
|
||||||
API_GOODS.getGoodsSpecInfoSeller(this.baseInfoForm.categoryId, {}).then(
|
API_GOODS.getGoodsSpecInfoSeller(categoryId).then(res => {
|
||||||
(response) => {
|
if(res.length) {
|
||||||
this.skuData = response;
|
res.forEach(e => {
|
||||||
if (this.skuData.length > 0) {
|
this.skuData.push(e.specName)
|
||||||
this.skuData.forEach((spec) => {
|
this.skuVals.push(e.specValue ? e.specValue.split(',') : [])
|
||||||
this.skuKey.push(spec.name);
|
})
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/** 自动完成表单所需方法*/
|
||||||
|
filterMethod(value, option) {
|
||||||
|
return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 添加固有属性
|
* 添加固有属性
|
||||||
*/
|
*/
|
||||||
defaultParams(tableData) {
|
// defaultParams(tableData) {
|
||||||
return tableData;
|
// return tableData;
|
||||||
},
|
// },
|
||||||
/**
|
/**
|
||||||
* 迭代属性,形成表格
|
* 迭代属性,形成表格
|
||||||
* result 渲染的数据
|
* result 渲染的数据
|
||||||
|
@ -1495,6 +1342,7 @@ export default {
|
||||||
}
|
}
|
||||||
return this.specIterator(result, cloneTemp);
|
return this.specIterator(result, cloneTemp);
|
||||||
},
|
},
|
||||||
|
// 规格表格操作
|
||||||
handleSpan({ row, column, rowIndex, columnIndex }) {},
|
handleSpan({ row, column, rowIndex, columnIndex }) {},
|
||||||
/** 数据改变之后 抛出数据 */
|
/** 数据改变之后 抛出数据 */
|
||||||
updateSkuTable(row, item) {
|
updateSkuTable(row, item) {
|
||||||
|
@ -1555,7 +1403,6 @@ export default {
|
||||||
},
|
},
|
||||||
/** 下一步*/
|
/** 下一步*/
|
||||||
next() {
|
next() {
|
||||||
console.log(111);
|
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
if (this.activestep === 0 && this.draftId) {
|
if (this.activestep === 0 && this.draftId) {
|
||||||
this.activestep = 1;
|
this.activestep = 1;
|
||||||
|
@ -1583,7 +1430,7 @@ export default {
|
||||||
/** 查询品牌列表 */
|
/** 查询品牌列表 */
|
||||||
this.getGoodsBrandList();
|
this.getGoodsBrandList();
|
||||||
/** 查询分类绑定的规格信息 */
|
/** 查询分类绑定的规格信息 */
|
||||||
this.Get_SkuInfoByCategory();
|
this.Get_SkuInfoByCategory(this.baseInfoForm.categoryId);
|
||||||
// 获取商品单位
|
// 获取商品单位
|
||||||
this.GET_GoodsUnit();
|
this.GET_GoodsUnit();
|
||||||
// 获取当前店铺分类
|
// 获取当前店铺分类
|
||||||
|
@ -1614,6 +1461,7 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (this.activestep++ > 2) return;
|
if (this.activestep++ > 2) return;
|
||||||
},
|
},
|
||||||
|
// 店内分类选择
|
||||||
selectTree(v) {
|
selectTree(v) {
|
||||||
if (v.length > 0) {
|
if (v.length > 0) {
|
||||||
// 转换null为""
|
// 转换null为""
|
||||||
|
@ -1628,6 +1476,7 @@ export default {
|
||||||
this.editTitle = menu.title;
|
this.editTitle = menu.title;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 店内分类选中
|
||||||
changeSelect(v) {
|
changeSelect(v) {
|
||||||
this.selectCount = v.length;
|
this.selectCount = v.length;
|
||||||
let ids = "";
|
let ids = "";
|
||||||
|
@ -1666,10 +1515,6 @@ export default {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//如果选择的是卖家承担运费 则运费模板重置为0
|
|
||||||
// if (this.baseInfoForm.freightPayer !== "BUYER") {
|
|
||||||
// this.baseInfoForm.templateId = 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.baseInfoForm.skuList = this.skuTableData.map((sku) => {
|
this.baseInfoForm.skuList = this.skuTableData.map((sku) => {
|
||||||
delete sku._index;
|
delete sku._index;
|
||||||
|
@ -1714,7 +1559,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 保存至草稿箱 */
|
/** 保存为模板 */
|
||||||
saveToDraft(saveType) {
|
saveToDraft(saveType) {
|
||||||
let showType = saveType === "TEMPLATE" ? "模版" : "草稿";
|
let showType = saveType === "TEMPLATE" ? "模版" : "草稿";
|
||||||
this.baseInfoForm.skuList = this.skuTableData;
|
this.baseInfoForm.skuList = this.skuTableData;
|
||||||
|
@ -1762,7 +1607,7 @@ export default {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
SAVE_DRAFT_GOODS() {
|
SAVE_DRAFT_GOODS() { // 保存模板
|
||||||
API_GOODS.saveDraftGoods(this.baseInfoForm).then((res) => {
|
API_GOODS.saveDraftGoods(this.baseInfoForm).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.info("保存成功!");
|
this.$Message.info("保存成功!");
|
||||||
|
|
|
@ -162,7 +162,7 @@ export default {
|
||||||
}
|
}
|
||||||
.login {
|
.login {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: url("../assets/background.svg") no-repeat;
|
background: url("../assets/background.png") no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
background-position-y: bottom;
|
background-position-y: bottom;
|
||||||
background-color: #edf0f3;
|
background-color: #edf0f3;
|
||||||
|
|
|
@ -134,21 +134,18 @@ export default {
|
||||||
key: "name",
|
key: "name",
|
||||||
minWidth: 120
|
minWidth: 120
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
key: "disabled",
|
key: "disabled",
|
||||||
minWidth: 50,
|
minWidth: 50,
|
||||||
render(h, params) {
|
render(h, params) {
|
||||||
return h("Badge", {
|
if(params.row.disabled){
|
||||||
props: {
|
return h("div", [h("tag", {props: {color: "green"}}, "开启")]);
|
||||||
status: params.row.disabled ? "success" : "error",
|
}else{
|
||||||
text: params.row.disabled ? "开启" : "关闭",
|
return h("div", [h("tag", {props: {color: "volcano"}}, "关闭")]);
|
||||||
},
|
}
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<Row type="flex" justify="space-around" class="help">
|
<Row type="flex" justify="space-around" class="help">
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">{{ $t('help') }}</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('help') }}</a>
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">{{ $t('privacy') }}</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('privacy') }}</a>
|
||||||
<a class="item" href="https://lilishop.com" target="_blank">{{ $t('terms') }}</a>
|
<a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('terms') }}</a>
|
||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © 2020 - Present
|
Copyright © 2020 - Present
|
||||||
<a
|
<a
|
||||||
href="http://lili.cn"
|
href="https://pickmall.cn/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style="margin:0 5px;"
|
style="margin:0 5px;"
|
||||||
>lili-shop</a> {{ $t('rights') }}
|
>lili-shop</a> {{ $t('rights') }}
|
||||||
|
|
|
@ -210,11 +210,11 @@ export default {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.grade == "GOOD") {
|
if (params.row.grade == "GOOD") {
|
||||||
return h("Badge", {props: {status: "success", text: "好评"}})
|
return h("Tag", {props: {color: "green",},}, "好评");
|
||||||
} else if (params.row.grade == "MODERATE") {
|
} else if (params.row.grade == "MODERATE") {
|
||||||
return h("Badge", {props: {status: "success", text: "中评"}})
|
return h("Tag", {props: {color: "orange",},}, "中评");
|
||||||
} else if (params.row.grade == "WORSE") {
|
} else {
|
||||||
return h("Badge", {props: {status: "error", text: "差评"}})
|
return h("Tag", {props: {color: "red",},}, "差评");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -224,9 +224,9 @@ export default {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.status === "OPEN") {
|
if (params.row.status === "OPEN") {
|
||||||
return h("Badge", {props: {status: "success", text: "展示"}})
|
return h("Tag", {props: {color: "green"}},"展示")
|
||||||
} else {
|
} else {
|
||||||
return h("Badge", {props: {status: "error", text: "隐藏"}})
|
return h("Tag", {props: {color: "red"}},"隐藏")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -236,9 +236,9 @@ export default {
|
||||||
width: 110,
|
width: 110,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.replyStatus) {
|
if (params.row.replyStatus) {
|
||||||
return h("Badge", {props: {status: "success", text: "已回复"}})
|
return h("Tag", {props: {color: "green"}},"已回复")
|
||||||
} else {
|
} else {
|
||||||
return h("Badge", {props: {status: "error", text: "未回复"}})
|
return h("Tag", {props: {color: "blue"}},"未回复")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,49 +1,50 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<vuedraggable
|
<div class="upload-pic-thumb">
|
||||||
:list="uploadList"
|
<vuedraggable
|
||||||
:disabled="!draggable||!multiple"
|
:list="uploadList"
|
||||||
:animation="200"
|
:disabled="!draggable||!multiple"
|
||||||
class="list-group"
|
:animation="200"
|
||||||
ghost-class="thumb-ghost"
|
class="list-group"
|
||||||
@end="onEnd"
|
ghost-class="thumb-ghost"
|
||||||
>
|
@end="onEnd"
|
||||||
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
>
|
||||||
<div v-if="item.status == 'finished'">
|
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
||||||
<img :src="item.url" />
|
<div v-if="item.status == 'finished'">
|
||||||
<div class="upload-list-cover">
|
<img :src="item.url" />
|
||||||
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
<div class="upload-list-cover">
|
||||||
<Icon v-if="remove" type="ios-trash-outline" @click="handleRemove(item)"></Icon>
|
<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>
|
</div>
|
||||||
<div v-else>
|
</vuedraggable>
|
||||||
<Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
|
<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>
|
||||||
</div>
|
</Upload>
|
||||||
</vuedraggable>
|
</div>
|
||||||
<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>
|
|
||||||
|
|
||||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||||
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
|
@ -252,10 +253,12 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.upload-pic-thumb{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.upload-list {
|
.upload-list {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -267,6 +270,7 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.upload-list img {
|
.upload-list img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -185,17 +185,17 @@
|
||||||
key: "complainStatus",
|
key: "complainStatus",
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.complainStatus == "NEW") {
|
if (params.row.complainStatus == "NEW") {
|
||||||
return h('div', [h('span', { }, '新投诉'),]);
|
return h('div', [h('tag',{props: {color: "purple"}}, '新投诉'),]);
|
||||||
} else if (params.row.complainStatus == "CANCEL") {
|
} else if (params.row.complainStatus == "CANCEL") {
|
||||||
return h('div', [h('span', { }, '已撤销'),]);
|
return h('div', [h('tag', {props: {color: "cyan"}}, '已撤销'),]);
|
||||||
} else if (params.row.complainStatus == "WAIT_APPEAL") {
|
} else if (params.row.complainStatus == "WAIT_APPEAL") {
|
||||||
return h('div', [h('span', { }, '待申诉'),]);
|
return h('div', [h('tag', {props: {color: "volcano"}}, '待申诉'),]);
|
||||||
} else if (params.row.complainStatus == "COMMUNICATION") {
|
} else if (params.row.complainStatus == "COMMUNICATION") {
|
||||||
return h('div', [h('span', { }, '对话中'),]);
|
return h('div', [h('tag', {props: {color: "orange"}}, '对话中'),]);
|
||||||
}else if (params.row.complainStatus == "WAIT_ARBITRATION") {
|
}else if (params.row.complainStatus == "WAIT_ARBITRATION") {
|
||||||
return h('div', [h('span', { }, '等待仲裁'),]);
|
return h('div', [h('tag', {props: {color: "blue"}}, '等待仲裁'),]);
|
||||||
}else if (params.row.complainStatus == "COMPLETE") {
|
}else if (params.row.complainStatus == "COMPLETE") {
|
||||||
return h('div', [h('span', { }, '已完成'),]);
|
return h('div', [h('tag', {props: {color: "green"}}, '已完成'),]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -176,25 +176,23 @@
|
||||||
width: 120,
|
width: 120,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.serviceStatus == "APPLY") {
|
if (params.row.serviceStatus == "APPLY") {
|
||||||
return h('div', [h('span', { }, '申请售后'),]);
|
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
|
||||||
} else if (params.row.serviceStatus == "PASS") {
|
} else if (params.row.serviceStatus == "PASS") {
|
||||||
return h('div', [h('span', { }, '审核通过'),]);
|
return h('div', [h('tag', {props: {color: "cyan"}}, '通过售后'),]);
|
||||||
} else if (params.row.serviceStatus == "REFUSE") {
|
} else if (params.row.serviceStatus == "REFUSE") {
|
||||||
return h('div', [h('span', { }, '审核拒绝'),]);
|
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
|
||||||
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
||||||
return h('div', [h('span', { }, '买家退货,待卖家收货'),]);
|
return h('div', [h('tag', {props: {color: "orange"}}, '买家退货,待卖家收货'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
|
} else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
||||||
return h('div', [h('span', { }, '商家换货/补发'),]);
|
return h('div', [h('tag', {props: {color: "gold"}}, '卖家确认收货'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
} else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
||||||
return h('div', [h('span', { }, '卖家确认收货'),]);
|
return h('div', [h('tag', {props: {color: "lime"}}, '卖家终止售后'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
||||||
return h('div', [h('span', { }, '卖家终止售后'),]);
|
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
|
||||||
}else if (params.row.serviceStatus == "BUYER_CONFIRM") {
|
} else if (params.row.serviceStatus == "COMPLETE") {
|
||||||
return h('div', [h('span', { }, '买家确认收货'),]);
|
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
|
||||||
}else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
||||||
return h('div', [h('span', { }, '买家取消售后'),]);
|
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
|
||||||
}else if (params.row.serviceStatus == "COMPLETE") {
|
|
||||||
return h('div', [h('span', { }, '完成'),]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -182,27 +182,17 @@
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.serviceStatus == "APPLY") {
|
if (params.row.serviceStatus == "APPLY") {
|
||||||
return h('div', [h('span', { }, '申请售后'),]);
|
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
|
||||||
} else if (params.row.serviceStatus == "PASS") {
|
} else if (params.row.serviceStatus == "PASS") {
|
||||||
return h('div', [h('span', { }, '审核通过'),]);
|
return h('div', [h('tag', {props: {color: "cyan"}}, '通过售后'),]);
|
||||||
} else if (params.row.serviceStatus == "REFUSE") {
|
} else if (params.row.serviceStatus == "REFUSE") {
|
||||||
return h('div', [h('span', { }, '审核拒绝'),]);
|
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
|
||||||
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
||||||
return h('div', [h('span', { }, '买家退货,待卖家收货'),]);
|
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
|
} else if (params.row.serviceStatus == "COMPLETE") {
|
||||||
return h('div', [h('span', { }, '商家换货/补发'),]);
|
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
|
||||||
}else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
|
||||||
return h('div', [h('span', { }, '卖家确认收货'),]);
|
|
||||||
}else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
|
||||||
return h('div', [h('span', { }, '卖家终止售后'),]);
|
|
||||||
}else if (params.row.serviceStatus == "BUYER_CONFIRM") {
|
|
||||||
return h('div', [h('span', { }, '买家确认收货'),]);
|
|
||||||
}else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
|
||||||
return h('div', [h('span', { }, '买家取消售后'),]);
|
|
||||||
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
||||||
return h('div', [h('span', { }, '等待平台退款'),]);
|
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
|
||||||
}else if (params.row.serviceStatus == "COMPLETE") {
|
|
||||||
return h('div', [h('span', { }, '完成'),]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -53,8 +53,8 @@ export default {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 1, // 当前页数
|
pageNumber: 1, // 当前页数
|
||||||
pageSize: 10, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
sort: "createTime", // 默认排序字段
|
sort: "", // 默认排序字段
|
||||||
order: "desc", // 默认排序方式
|
order: "", // 默认排序方式
|
||||||
startDate: "", // 起始时间
|
startDate: "", // 起始时间
|
||||||
endDate: "", // 终止时间
|
endDate: "", // 终止时间
|
||||||
orderSn: "",
|
orderSn: "",
|
||||||
|
@ -80,7 +80,7 @@ export default {
|
||||||
{
|
{
|
||||||
title: "订单号",
|
title: "订单号",
|
||||||
key: "sn",
|
key: "sn",
|
||||||
minWidth: 240,
|
minWidth: 200,
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -95,7 +95,7 @@ export default {
|
||||||
} else if (params.row.clientType == "WECHAT_MP") {
|
} else if (params.row.clientType == "WECHAT_MP") {
|
||||||
return h("div", {}, "小程序端");
|
return h("div", {}, "小程序端");
|
||||||
} else if (params.row.clientType == "APP") {
|
} else if (params.row.clientType == "APP") {
|
||||||
return h("div", {}, "移动应用端");
|
return h("div", {}, "APP端");
|
||||||
} else {
|
} else {
|
||||||
return h("div", {}, params.row.clientType);
|
return h("div", {}, params.row.clientType);
|
||||||
}
|
}
|
||||||
|
@ -126,30 +126,27 @@ export default {
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.orderStatus == "UNPAID") {
|
if (params.row.orderStatus == "UNPAID") {
|
||||||
return h("div", [h("span", {}, "未付款")]);
|
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||||
} else if (params.row.orderStatus == "PAID") {
|
} else if (params.row.orderStatus == "PAID") {
|
||||||
return h("div", [h("span", {}, "已付款")]);
|
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
|
||||||
} else if (params.row.orderStatus == "UNDELIVERED") {
|
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||||
return h("div", [h("span", {}, "待发货")]);
|
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
|
||||||
} else if (params.row.orderStatus == "DELIVERED") {
|
} else if (params.row.orderStatus == "DELIVERED") {
|
||||||
return h("div", [h("span", {}, "已发货")]);
|
return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]);
|
||||||
} else if (params.row.orderStatus == "COMPLETED") {
|
} else if (params.row.orderStatus == "COMPLETED") {
|
||||||
return h("div", [h("span", {}, "已完成")]);
|
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||||
} else if (params.row.orderStatus == "TAKE") {
|
} else if (params.row.orderStatus == "TAKE") {
|
||||||
return h("div", [h("span", {}, "待核验")]);
|
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
|
||||||
} else if (params.row.orderStatus == "CANCELLED") {
|
} else if (params.row.orderStatus == "CANCELLED") {
|
||||||
return h("div", [h("span", {}, "已取消")]);
|
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "下单时间",
|
title: "下单时间",
|
||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 170,
|
width: 170
|
||||||
sortable: true,
|
|
||||||
sortType: "desc",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
|
|
|
@ -69,7 +69,7 @@ export default {
|
||||||
orderSn: "",
|
orderSn: "",
|
||||||
buyerName: "",
|
buyerName: "",
|
||||||
orderStatus: "",
|
orderStatus: "",
|
||||||
orderType:"VIRTUAL"
|
orderType: "VIRTUAL",
|
||||||
},
|
},
|
||||||
selectDate: null,
|
selectDate: null,
|
||||||
form: {
|
form: {
|
||||||
|
@ -135,19 +135,19 @@ export default {
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.orderStatus == "UNPAID") {
|
if (params.row.orderStatus == "UNPAID") {
|
||||||
return h("div", [h("span", {}, "未付款")]);
|
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||||
} else if (params.row.orderStatus == "PAID") {
|
} else if (params.row.orderStatus == "PAID") {
|
||||||
return h("div", [h("span", {}, "已付款")]);
|
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
|
||||||
} else if (params.row.orderStatus == "UNDELIVERED") {
|
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||||
return h("div", [h("span", {}, "待发货")]);
|
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
|
||||||
} else if (params.row.orderStatus == "DELIVERED") {
|
} else if (params.row.orderStatus == "DELIVERED") {
|
||||||
return h("div", [h("span", {}, "已发货")]);
|
return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]);
|
||||||
} else if (params.row.orderStatus == "COMPLETED") {
|
} else if (params.row.orderStatus == "COMPLETED") {
|
||||||
return h("div", [h("span", {}, "已完成")]);
|
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||||
} else if (params.row.orderStatus == "TAKE") {
|
} else if (params.row.orderStatus == "TAKE") {
|
||||||
return h("div", [h("span", {}, "待核验")]);
|
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
|
||||||
} else if (params.row.orderStatus == "CANCELLED") {
|
} else if (params.row.orderStatus == "CANCELLED") {
|
||||||
return h("div", [h("span", {}, "已取消")]);
|
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -200,8 +200,6 @@ export default {
|
||||||
let result = await verificationCode(this.orderCode);
|
let result = await verificationCode(this.orderCode);
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
|
||||||
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "order-detail",
|
name: "order-detail",
|
||||||
query: { sn: result.result.sn || this.orderCode },
|
query: { sn: result.result.sn || this.orderCode },
|
||||||
|
@ -228,6 +226,7 @@ export default {
|
||||||
this.searchForm = {};
|
this.searchForm = {};
|
||||||
this.searchForm.pageNumber = 1;
|
this.searchForm.pageNumber = 1;
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.pageSize = 10;
|
||||||
|
this.searchForm.orderType = "VIRTUAL";
|
||||||
this.selectDate = null;
|
this.selectDate = null;
|
||||||
this.searchForm.startDate = "";
|
this.searchForm.startDate = "";
|
||||||
this.searchForm.endDate = "";
|
this.searchForm.endDate = "";
|
||||||
|
|
|
@ -2,39 +2,15 @@
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<Card>
|
<Card>
|
||||||
<Row @keydown.enter.native="handleSearch">
|
<Row @keydown.enter.native="handleSearch">
|
||||||
<Form
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
ref="searchForm"
|
|
||||||
:model="searchForm"
|
|
||||||
inline
|
|
||||||
:label-width="70"
|
|
||||||
class="search-form"
|
|
||||||
>
|
|
||||||
<Form-item label="订单编号" prop="orderSn">
|
<Form-item label="订单编号" prop="orderSn">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.orderSn"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入订单编号"
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="会员名称" prop="memberName">
|
<Form-item label="会员名称" prop="memberName">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.memberName" clearable placeholder="请输入会员名称" style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.memberName"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入会员名称"
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="发票抬头" prop="receiptTitle">
|
<Form-item label="发票抬头" prop="receiptTitle">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.receiptTitle" clearable placeholder="请输入发票抬头" style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.receiptTitle"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入发票抬头"
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="状态" prop="receiptStatus">
|
<Form-item label="状态" prop="receiptStatus">
|
||||||
<Select v-model="searchForm.receiptStatus" placeholder="请选择" clearable style="width: 200px">
|
<Select v-model="searchForm.receiptStatus" placeholder="请选择" clearable style="width: 200px">
|
||||||
|
@ -46,275 +22,280 @@
|
||||||
<Button @click="handleReset" class="search-btn">重置</Button>
|
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||||
:loading="loading"
|
|
||||||
border
|
|
||||||
:columns="columns"
|
|
||||||
:data="data"
|
|
||||||
ref="table"
|
|
||||||
sortable="custom"
|
|
||||||
@on-sort-change="changeSort"
|
|
||||||
@on-selection-change="changeSelect"
|
|
||||||
>
|
|
||||||
<!-- 订单详情格式化 -->
|
<!-- 订单详情格式化 -->
|
||||||
<template slot="orderSlot" slot-scope="scope">
|
<template slot="orderSlot" slot-scope="scope">
|
||||||
<a
|
<a @click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
|
||||||
@click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
|
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
<Page
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||||
:current="searchForm.pageNumber"
|
show-total show-elevator show-sizer></Page>
|
||||||
:total="total"
|
|
||||||
:page-size="searchForm.pageSize"
|
|
||||||
@on-change="changePage"
|
|
||||||
@on-page-size-change="changePageSize"
|
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-elevator
|
|
||||||
show-sizer
|
|
||||||
></Page>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as API_Order from "@/api/order";
|
import * as API_Order from "@/api/order";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "storeBill",
|
name: "storeBill",
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true, // 表单加载状态
|
loading: true, // 表单加载状态
|
||||||
searchForm: {
|
searchForm: {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 1, // 当前页数
|
pageNumber: 1, // 当前页数
|
||||||
pageSize: 10, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
sort: "createTime", // 默认排序字段
|
sort: "createTime", // 默认排序字段
|
||||||
order: "desc", // 默认排序方式
|
order: "desc", // 默认排序方式
|
||||||
receiptStatus: "", // 起始时间
|
receiptStatus: "", // 起始时间
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
// 添加或编辑表单对象初始化数据
|
||||||
|
sn: "",
|
||||||
|
sellerName: "",
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
billPrice: "",
|
||||||
|
},
|
||||||
|
// 表单验证规则
|
||||||
|
formValidate: {},
|
||||||
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
|
selectList: [], // 多选数据
|
||||||
|
selectCount: 0, // 多选计数
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: "订单号",
|
||||||
|
key: "orderSn",
|
||||||
|
minWidth: 120,
|
||||||
|
slot: "orderSlot",
|
||||||
},
|
},
|
||||||
form: {
|
{
|
||||||
// 添加或编辑表单对象初始化数据
|
title: "会员名称",
|
||||||
sn: "",
|
key: "memberName",
|
||||||
sellerName: "",
|
minWidth: 90,
|
||||||
startTime: "",
|
tooltip: true,
|
||||||
endTime: "",
|
|
||||||
billPrice: "",
|
|
||||||
},
|
},
|
||||||
// 表单验证规则
|
|
||||||
formValidate: {},
|
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
|
||||||
selectList: [], // 多选数据
|
|
||||||
selectCount: 0, // 多选计数
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: "订单号",
|
|
||||||
key: "orderSn",
|
|
||||||
minWidth: 120,
|
|
||||||
slot: "orderSlot",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "会员名称",
|
|
||||||
key: "memberName",
|
|
||||||
minWidth: 90,
|
|
||||||
tooltip: true
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "发票抬头",
|
title: "发票抬头",
|
||||||
key: "receiptTitle",
|
key: "receiptTitle",
|
||||||
minWidth: 90,
|
minWidth: 90,
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", params.row.receiptTitle || "暂未填写");
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
title: "纳税人识别号",
|
{
|
||||||
key: "taxpayerId",
|
title: "纳税人识别号",
|
||||||
minWidth: 100,
|
key: "taxpayerId",
|
||||||
tooltip: true
|
minWidth: 100,
|
||||||
|
tooltip: true,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", params.row.taxpayerId || "暂未填写");
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
title: "发票内容",
|
{
|
||||||
key: "receiptContent",
|
title: "发票内容",
|
||||||
minWidth: 120,
|
key: "receiptContent",
|
||||||
tooltip: true
|
minWidth: 120,
|
||||||
|
tooltip: true,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", params.row.receiptContent || "暂未填写");
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
title: "发票金额",
|
{
|
||||||
key: "billPrice",
|
title: "发票金额",
|
||||||
width: 90,
|
key: "billPrice",
|
||||||
render: (h, params) => {
|
width: 150,
|
||||||
return h(
|
render: (h, params) => {
|
||||||
"div",
|
return h(
|
||||||
this.$options.filters.unitPrice(params.row.receiptPrice, "¥")
|
"div",
|
||||||
);
|
this.$options.filters.unitPrice(params.row.receiptPrice, "¥")
|
||||||
},
|
);
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
title: "发票状态",
|
{
|
||||||
key: "receiptStatus",
|
title: "发票状态",
|
||||||
width: 90,
|
key: "receiptStatus",
|
||||||
tooltip: true,
|
width: 90,
|
||||||
render: (h, params) => {
|
tooltip: true,
|
||||||
if(params.row.receiptStatus == 0){
|
render: (h, params) => {
|
||||||
return h(
|
if (params.row.receiptStatus == 0) {
|
||||||
"div",
|
return h("div", [
|
||||||
"未开票"
|
h("tag", { props: { color: "volcano" } }, "未开票"),
|
||||||
);
|
]);
|
||||||
}else{
|
} else {
|
||||||
return h(
|
return h("div", [
|
||||||
"div",
|
h("tag", { props: { color: "green" } }, "未开票"),
|
||||||
"已开票"
|
]);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "订单状态",
|
|
||||||
key: "orderStatus",
|
|
||||||
width: 90,
|
|
||||||
render: (h, params) => {
|
|
||||||
if (params.row.orderStatus == "UNPAID") {
|
|
||||||
return h('div', [h('span', { }, '未付款'),]);
|
|
||||||
} 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', { }, '已取消'),]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
title: "操作",
|
{
|
||||||
key: "action",
|
title: "订单状态",
|
||||||
align: "center",
|
key: "orderStatus",
|
||||||
width: 80,
|
width: 90,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
|
if (params.row.orderStatus == "UNPAID") {
|
||||||
return h("div", [
|
return h("div", [
|
||||||
h(
|
h("tag", { props: { color: "magenta" } }, "未付款"),
|
||||||
"Button",
|
]);
|
||||||
{
|
} else if (params.row.orderStatus == "PAID") {
|
||||||
props: {
|
return h("div", [
|
||||||
type: "info",
|
h("tag", { props: { color: "blue" } }, "已付款"),
|
||||||
size: "small",
|
]);
|
||||||
},
|
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||||
attrs: {
|
return h("div", [
|
||||||
disabled: params.row.orderStatus == "COMPLETED" && params.row.receiptStatus == 0? false : true,
|
h("tag", { props: { color: "geekblue" } }, "待发货"),
|
||||||
},
|
]);
|
||||||
style: {
|
} else if (params.row.orderStatus == "DELIVERED") {
|
||||||
marginRight: "5px",
|
return h("div", [
|
||||||
},
|
h("tag", { props: { color: "cyan" } }, "已发货"),
|
||||||
on: {
|
]);
|
||||||
click: () => {
|
} else if (params.row.orderStatus == "COMPLETED") {
|
||||||
this.invoicing(params.row);
|
return h("div", [
|
||||||
},
|
h("tag", { props: { color: "green" } }, "已完成"),
|
||||||
|
]);
|
||||||
|
} else if (params.row.orderStatus == "TAKE") {
|
||||||
|
return h("div", [
|
||||||
|
h("tag", { props: { color: "volcano" } }, "待核验"),
|
||||||
|
]);
|
||||||
|
} else if (params.row.orderStatus == "CANCELLED") {
|
||||||
|
return h("div", [
|
||||||
|
h("tag", { props: { color: "red" } }, "已取消"),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
key: "action",
|
||||||
|
align: "center",
|
||||||
|
width: 80,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", [
|
||||||
|
h(
|
||||||
|
"Button",
|
||||||
|
{
|
||||||
|
props: {
|
||||||
|
type: "info",
|
||||||
|
size: "small",
|
||||||
|
},
|
||||||
|
attrs: {
|
||||||
|
disabled:
|
||||||
|
params.row.orderStatus == "COMPLETED" &&
|
||||||
|
params.row.receiptStatus == 0
|
||||||
|
? false
|
||||||
|
: true,
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
marginRight: "5px",
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
click: () => {
|
||||||
|
this.invoicing(params.row);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"开票"
|
},
|
||||||
),
|
"开票"
|
||||||
]);
|
),
|
||||||
},
|
]);
|
||||||
},
|
},
|
||||||
],
|
},
|
||||||
data: [], // 表单数据
|
],
|
||||||
total: 0, // 表单数据总数
|
data: [], // 表单数据
|
||||||
};
|
total: 0, // 表单数据总数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
this.getData();
|
||||||
},
|
},
|
||||||
methods: {
|
changePage(v) {
|
||||||
init() {
|
this.searchForm.pageNumber = v;
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
this.clearSelectAll();
|
||||||
changePage(v) {
|
},
|
||||||
this.searchForm.pageNumber = v;
|
changePageSize(v) {
|
||||||
this.getData();
|
this.searchForm.pageSize = v;
|
||||||
this.clearSelectAll();
|
this.getData();
|
||||||
},
|
},
|
||||||
changePageSize(v) {
|
handleSearch() {
|
||||||
this.searchForm.pageSize = v;
|
this.searchForm.pageNumber = 1;
|
||||||
this.getData();
|
this.searchForm.pageSize = 10;
|
||||||
},
|
this.getData();
|
||||||
handleSearch() {
|
},
|
||||||
this.searchForm.pageNumber = 1;
|
handleReset() {
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm = {};
|
||||||
this.getData();
|
this.searchForm.pageNumber = 1;
|
||||||
},
|
this.searchForm.pageSize = 10;
|
||||||
handleReset() {
|
this.getData();
|
||||||
this.searchForm = {}
|
},
|
||||||
this.searchForm.pageNumber = 1;
|
changeSort(e) {
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.sort = e.key;
|
||||||
this.getData();
|
this.searchForm.order = e.order;
|
||||||
},
|
if (e.order === "normal") {
|
||||||
changeSort(e) {
|
this.searchForm.order = "";
|
||||||
this.searchForm.sort = e.key;
|
}
|
||||||
this.searchForm.order = e.order;
|
this.getData();
|
||||||
if (e.order === "normal") {
|
},
|
||||||
this.searchForm.order = "";
|
clearSelectAll() {
|
||||||
}
|
this.$refs.table.selectAll(false);
|
||||||
this.getData();
|
},
|
||||||
},
|
changeSelect(e) {
|
||||||
clearSelectAll() {
|
this.selectList = e;
|
||||||
this.$refs.table.selectAll(false);
|
this.selectCount = e.length;
|
||||||
},
|
},
|
||||||
changeSelect(e) {
|
selectDateRange(v) {
|
||||||
this.selectList = e;
|
if (v) {
|
||||||
this.selectCount = e.length;
|
this.searchForm.startDate = v[0];
|
||||||
},
|
this.searchForm.endDate = v[1];
|
||||||
selectDateRange(v) {
|
}
|
||||||
if (v) {
|
},
|
||||||
this.searchForm.startDate = v[0];
|
getData() {
|
||||||
this.searchForm.endDate = v[1];
|
this.loading = true;
|
||||||
}
|
API_Order.getReceiptPage(this.searchForm).then((res) => {
|
||||||
},
|
|
||||||
getData() {
|
|
||||||
this.loading = true;
|
|
||||||
API_Order.getReceiptPage(this.searchForm).then((res) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (res.success) {
|
|
||||||
this.data = res.result.records;
|
|
||||||
this.total = res.result.total;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.total = this.data.length;
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
if (res.success) {
|
||||||
//开发票
|
this.data = res.result.records;
|
||||||
invoicing(params){
|
this.total = res.result.total;
|
||||||
this.$Modal.confirm({
|
}
|
||||||
title: "确认开票",
|
});
|
||||||
content: "您确认已经开具发票 ?",
|
this.total = this.data.length;
|
||||||
loading: true,
|
this.loading = false;
|
||||||
onOk: () => {
|
|
||||||
API_Order.invoicing(params.id).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.$Message.success("开票成功");
|
|
||||||
}
|
|
||||||
this.$Modal.remove();
|
|
||||||
this.getData();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
activated() {
|
//开发票
|
||||||
this.init();
|
invoicing(params) {
|
||||||
|
this.$Modal.confirm({
|
||||||
|
title: "确认开票",
|
||||||
|
content: "您确认已经开具发票 ?",
|
||||||
|
loading: true,
|
||||||
|
onOk: () => {
|
||||||
|
API_Order.invoicing(params.id).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("开票成功");
|
||||||
|
}
|
||||||
|
this.$Modal.remove();
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
},
|
},
|
||||||
};
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
// 建议引入通用样式 可删除下面样式代码
|
// 建议引入通用样式 可删除下面样式代码
|
||||||
@import "@/styles/table-common.scss";
|
@import "@/styles/table-common.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -113,9 +113,11 @@
|
||||||
>
|
>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
:disabled="form.promotionStatus != 'NEW'"
|
:disabled="form.promotionStatus != 'NEW'"
|
||||||
|
v-if="JSON.parse(getStore('userInfo')).selfOperated"
|
||||||
v-model="form.isPoint"
|
v-model="form.isPoint"
|
||||||
>送积分</Checkbox
|
>送积分</Checkbox
|
||||||
>
|
>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="form.isCoupon" label="赠送优惠券" prop="couponId">
|
<FormItem v-if="form.isCoupon" label="赠送优惠券" prop="couponId">
|
||||||
<Select
|
<Select
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<Button type="primary" @click="createLives()">保存</Button>
|
<Button type="primary" v-if="liveStatus=='NEW'" @click="createLives()">保存</Button>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -342,8 +342,7 @@ export default {
|
||||||
* dialog点击确定时判断
|
* dialog点击确定时判断
|
||||||
*/
|
*/
|
||||||
addGoods() {
|
addGoods() {
|
||||||
console.log(this.commodityList);
|
this.liveData.forEach((item) => {
|
||||||
this.liveData.forEach((item, index) => {
|
|
||||||
if (this.commodityList.length == 1 && this.liveData.length == 1) {
|
if (this.commodityList.length == 1 && this.liveData.length == 1) {
|
||||||
addLiveGoods({
|
addLiveGoods({
|
||||||
roomId: this.$route.query.roomId,
|
roomId: this.$route.query.roomId,
|
||||||
|
@ -517,7 +516,7 @@ export default {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("修改成功!");
|
this.$Message.success("修改成功!");
|
||||||
|
|
||||||
this.$router.push({ path: "/storePromotion/live" });
|
this.$router.push({ path: "/promotion/live" });
|
||||||
}
|
}
|
||||||
this.spinShow = false;
|
this.spinShow = false;
|
||||||
});
|
});
|
||||||
|
@ -528,7 +527,7 @@ export default {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("添加成功!");
|
this.$Message.success("添加成功!");
|
||||||
|
|
||||||
this.$router.push({ path: "/storePromotion/live" });
|
this.$router.push({ path: "/promotion/live" });
|
||||||
}
|
}
|
||||||
this.spinShow = false;
|
this.spinShow = false;
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,41 +1,11 @@
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
.operation {
|
.operation {
|
||||||
margin-bottom: 2vh;
|
margin-bottom: 2vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-count {
|
|
||||||
font-weight: 600;
|
|
||||||
color: #40a9ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-clear {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
margin-top: 2vh;
|
margin-top: 2vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drop-down {
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
.row {
|
||||||
.newPromotionView {
|
margin-bottom: 5px;
|
||||||
width: 80%;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
|
|
||||||
Input {
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slotSpan {
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
@on-selection-change="changeSelect"
|
@on-selection-change="changeSelect"
|
||||||
>
|
>
|
||||||
<template slot-scope="{ row }" slot="action">
|
<template slot-scope="{ row }" slot="action">
|
||||||
|
<div class="row">
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -97,6 +98,7 @@
|
||||||
@click="close(row)"
|
@click="close(row)"
|
||||||
>关闭</Button
|
>关闭</Button
|
||||||
>
|
>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
|
|
|
@ -105,13 +105,13 @@ export default {
|
||||||
color = "default";
|
color = "default";
|
||||||
if (params.row.promotionStatus == "NEW") {
|
if (params.row.promotionStatus == "NEW") {
|
||||||
text = "未开始";
|
text = "未开始";
|
||||||
color = "default";
|
color = "geekblue";
|
||||||
} else if (params.row.promotionStatus == "START") {
|
} else if (params.row.promotionStatus == "START") {
|
||||||
text = "已开始";
|
text = "已开始";
|
||||||
color = "green";
|
color = "green";
|
||||||
} else if (params.row.promotionStatus == "END") {
|
} else if (params.row.promotionStatus == "END") {
|
||||||
text = "已结束";
|
text = "已结束";
|
||||||
color = "red";
|
color = "volcano";
|
||||||
} else if (params.row.promotionStatus == "CLOSE") {
|
} else if (params.row.promotionStatus == "CLOSE") {
|
||||||
text = "已关闭";
|
text = "已关闭";
|
||||||
color = "red";
|
color = "red";
|
||||||
|
|
|
@ -132,15 +132,13 @@
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.billStatus == "OUT") {
|
if (params.row.billStatus == "OUT") {
|
||||||
return h( "Badge", {props: { status: "success",text: "已出账" } })
|
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||||
} else if (params.row.billStatus == "EXAMINE") {
|
|
||||||
return h( "Badge", {props: { status: "success",text: "已审核" } })
|
|
||||||
} else if (params.row.billStatus == "CHECK") {
|
} else if (params.row.billStatus == "CHECK") {
|
||||||
return h( "Badge", {props: { status: "success",text: "已对账" } })
|
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||||
} else if (params.row.billStatus == "PAY") {
|
} else if (params.row.billStatus == "EXAMINE") {
|
||||||
return h( "Badge", {props: { status: "success",text: "已付款" } })
|
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||||
}else if (params.row.billStatus == "COMPLETE") {
|
} else {
|
||||||
return h( "Badge", {props: { status: "success",text: "已完成" } })
|
return h("Tag", {props: {color: "green",},},"已付款");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -143,15 +143,13 @@
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.billStatus == "OUT") {
|
if (params.row.billStatus == "OUT") {
|
||||||
return h( "Badge", {props: { status: "success",text: "已出账" } })
|
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||||
} else if (params.row.billStatus == "EXAMINE") {
|
|
||||||
return h( "Badge", {props: { status: "success",text: "已审核" } })
|
|
||||||
} else if (params.row.billStatus == "CHECK") {
|
} else if (params.row.billStatus == "CHECK") {
|
||||||
return h( "Badge", {props: { status: "success",text: "已对账" } })
|
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||||
} else if (params.row.billStatus == "PAY") {
|
} else if (params.row.billStatus == "EXAMINE") {
|
||||||
return h( "Badge", {props: { status: "success",text: "已付款" } })
|
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||||
}else if (params.row.billStatus == "COMPLETE") {
|
} else {
|
||||||
return h( "Badge", {props: { status: "success",text: "已完成" } })
|
return h("Tag", {props: {color: "green",},},"已付款");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -58,10 +58,10 @@
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.selected === null || params.row.selected === "") {
|
if(params.row.selected === null || params.row.selected === ""){
|
||||||
return h( "Badge", {props: { status: "error",text: "关闭" } })
|
return h("div", [h("tag", {props: {color: "volcano"}}, "关闭")]);
|
||||||
} else if (params.row.selected !== "") {
|
}else{
|
||||||
return h( "Badge", {props: { status: "success",text: "开启" } })
|
return h("div", [h("tag", {props: {color: "green"}}, "开启")]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue