diff --git a/buyer/src/api/member.js b/buyer/src/api/member.js
index 301b7414..eeb7de21 100644
--- a/buyer/src/api/member.js
+++ b/buyer/src/api/member.js
@@ -59,7 +59,7 @@ export function withdrawalApply (params) {
});
}
-// 收藏商品、店铺
+// 收藏商品
export function collectGoods (type, id) {
return request({
url: `/buyer/member/collection/add/${type}/${id}`,
@@ -68,7 +68,16 @@ export function collectGoods (type, id) {
});
}
-// 取消 收藏商品、店铺
+// 收藏店铺
+export function collectStore (type, id) {
+ return request({
+ url: `/buyer/member/storeCollection/add/${type}/${id}`,
+ method: Method.POST,
+ needToken: true
+ });
+}
+
+// 取消 收藏商品
export function cancelCollect (type, id) {
return request({
url: `/buyer/member/collection/delete/${type}/${id}`,
@@ -77,7 +86,16 @@ export function cancelCollect (type, id) {
});
}
-// 查看是否收藏
+// 取消 收藏店铺
+export function cancelStoreCollect (type, id) {
+ return request({
+ url: `/buyer/member/storeCollection/delete/${type}/${id}`,
+ method: Method.DELETE,
+ needToken: true
+ });
+}
+
+// 查看是否收藏商品
export function isCollection (type, goodsId) {
return request({
url: `/buyer/member/collection/isCollection/${type}/${goodsId}`,
@@ -86,7 +104,16 @@ export function isCollection (type, goodsId) {
});
}
-// 会员收藏列表
+// 查看是否收藏店铺
+export function isStoreCollection (type, goodsId) {
+ return request({
+ url: `/buyer/member/storeCollection/isCollection/${type}/${goodsId}`,
+ method: Method.GET,
+ needToken: true
+ });
+}
+
+// 会员收藏商品列表
export function collectList (params) {
return request({
url: `/buyer/member/collection/${params.type}`,
@@ -96,6 +123,16 @@ export function collectList (params) {
});
}
+// 会员收藏店铺列表
+export function storeCollectList (params) {
+ return request({
+ url: `/buyer/member/storeCollection/${params.type}`,
+ method: Method.GET,
+ needToken: true,
+ params
+ });
+}
+
// 单个商品评价
export function goodsComment (params) {
return request({
diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue
index 14870db6..63a421f0 100644
--- a/buyer/src/pages/GoodsDetail.vue
+++ b/buyer/src/pages/GoodsDetail.vue
@@ -44,9 +44,9 @@ import ShowGoods from "@/components/goodsDetail/ShowGoods";
import ShowGoodsDetail from "@/components/goodsDetail/ShowGoodsDetail";
import { goodsSkuDetail } from "@/api/goods";
import {
- cancelCollect,
- collectGoods,
- isCollection,
+ cancelStoreCollect,
+ collectStore,
+ isStoreCollection,
getGoodsDistribution,
} from "@/api/member";
import { getDetailById } from "@/api/shopentry";
@@ -121,7 +121,7 @@ export default {
this.$set(this, "goodsMsg", res.result);
// 判断是否收藏
if (this.Cookies.getItem("userInfo")) {
- isCollection("STORE", this.goodsMsg.data.storeId).then((res) => {
+ isStoreCollection("STORE", this.goodsMsg.data.storeId).then((res) => {
if (res.success && res.result) {
this.storeCollected = true;
}
@@ -159,13 +159,13 @@ export default {
async collect () {
// 收藏店铺
if (this.storeCollected) {
- let cancel = await cancelCollect("STORE", this.goodsMsg.data.storeId);
+ let cancel = await cancelStoreCollect("STORE", this.goodsMsg.data.storeId);
if (cancel.success) {
this.$Message.success("已取消收藏");
this.storeCollected = false;
}
} else {
- let collect = await collectGoods("STORE", this.goodsMsg.data.storeId);
+ let collect = await collectStore("STORE", this.goodsMsg.data.storeId);
if (collect.code === 200) {
this.storeCollected = true;
this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看");
diff --git a/buyer/src/pages/Merchant.vue b/buyer/src/pages/Merchant.vue
index 3cf82442..773d8ac8 100644
--- a/buyer/src/pages/Merchant.vue
+++ b/buyer/src/pages/Merchant.vue
@@ -108,7 +108,7 @@
+
+
diff --git a/seller/src/views/login.vue b/seller/src/views/login.vue
index e46cbc8e..64b05c3c 100644
--- a/seller/src/views/login.vue
+++ b/seller/src/views/login.vue
@@ -2,59 +2,58 @@
-
-
-
-
-
-
-
登录
-
登录中
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+ 登录
+ 登录中
+
-
-
-
+
+
+
+
@@ -62,7 +61,8 @@
@@ -184,12 +265,14 @@ export default {
display: flex;
align-items: center;
justify-content: center;
+
.verify-con {
position: absolute;
top: 126px;
z-index: 10;
left: 20px;
}
+
.form {
padding-top: 1vh;
}
@@ -208,9 +291,11 @@ export default {
text-align: center;
transition: 0.35s;
}
+
.login-btn:hover {
opacity: 0.9;
border-radius: 10px;
}
+
}
diff --git a/seller/src/views/order/order/orderDetail.vue b/seller/src/views/order/order/orderDetail.vue
index cef64414..ddc012bb 100644
--- a/seller/src/views/order/order/orderDetail.vue
+++ b/seller/src/views/order/order/orderDetail.vue
@@ -2,179 +2,154 @@
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
订单号:
+
{{ orderInfo.order.sn }}
+
+
+
订单来源:
+
+ {{ orderInfo.order.clientType | clientTypeWay }}
+
+
+
+
订单状态:
+
+ {{ orderInfo.orderStatusValue }}
+
+
+
+
+
下单时间:
+
+ {{ orderInfo.order.createTime }}
+
+
+
+
-
订单号:
-
{{ orderInfo.order.sn }}
-
-
-
订单来源:
-
- {{ orderInfo.order.clientType | clientTypeWay }}
-
-
-
-
订单状态:
-
- {{ orderInfo.orderStatusValue }}
-
-
-
-
-
下单时间:
-
- {{ orderInfo.order.createTime }}
-
-
-
-
-
-
发票抬头:
-
- {{
- orderInfo.receipt.receiptTitle
- ? orderInfo.receipt.receiptTitle
- : "暂无"
- }}
-
-
-
-
-
发票税号:
-
- {{
- orderInfo.receipt.taxpayerId
- ? orderInfo.receipt.taxpayerId
- : "暂无"
- }}
-
-
-
-
-
发票内容:
-
- {{
- orderInfo.receipt.receiptContent
- ? orderInfo.receipt.receiptContent
- : "暂无"
- }}
-
-
-
-
-
发票金额:
-
- ¥{{
- orderInfo.receipt.receiptPrice
- ? orderInfo.receipt.receiptPrice
- : "暂无" | unitPrice
- }}
-
-
-
-
-
是否开票:
-
- {{ orderInfo.receipt.receiptStatus == 0 ? "未开" : "已开" }}
-
-
-
-
-
-
-
收货信息:
-
- {{ orderInfo.order.consigneeName }}
- {{ orderInfo.order.consigneeMobile }}
- {{ orderInfo.order.consigneeAddressPath }}
- {{ orderInfo.order.consigneeDetail }}
-
-
-
-
自提信息:
-
- {{ orderInfo.order.storeAddressPath }}
- {{ orderInfo.order.storeAddressMobile }}
-
-
-
-
支付方式:
-
- {{ orderInfo.paymentMethodValue }}
-
-
-
-
-
买家留言:
-
{{ orderInfo.order.remark }}
-
-
-
-
配送方式:
+
发票抬头:
{{
- orderInfo.deliveryMethodValue
- ? orderInfo.deliveryMethodValue
- : "暂无配送方式"
+ orderInfo.receipt.receiptTitle
+ ? orderInfo.receipt.receiptTitle
+ : "暂无"
}}
+
+
+
发票税号:
+
+ {{
+ orderInfo.receipt.taxpayerId
+ ? orderInfo.receipt.taxpayerId
+ : "暂无"
+ }}
+
+
+
+
+
发票内容:
+
+ {{
+ orderInfo.receipt.receiptContent
+ ? orderInfo.receipt.receiptContent
+ : "暂无"
+ }}
+
+
+
+
+
发票金额:
+
+ ¥{{
+ orderInfo.receipt.receiptPrice
+ ? orderInfo.receipt.receiptPrice
+ : "暂无" | unitPrice
+ }}
+
+
+
+
+
是否开票:
+
+ {{ orderInfo.receipt.receiptStatus == 0 ? "未开" : "已开" }}
+
+
+
+
+
+
+
收货信息:
+
+ {{ orderInfo.order.consigneeName }}
+ {{ orderInfo.order.consigneeMobile }}
+ {{ orderInfo.order.consigneeAddressPath }}
+ {{ orderInfo.order.consigneeDetail }}
+
+
+
+
自提信息:
+
+ {{ orderInfo.order.storeAddressPath }}
+ {{ orderInfo.order.storeAddressMobile }}
+
+
+
+
支付方式:
+
+ {{ orderInfo.paymentMethodValue }}
+
+
+
+
+
买家留言:
+
{{ orderInfo.order.remark }}
+
+
+
+
配送方式:
+
+ {{
+ orderInfo.deliveryMethodValue
+ ? orderInfo.deliveryMethodValue
+ : "暂无配送方式"
+ }}
+
+
-
+
-
+
@@ -184,35 +159,16 @@
}}
-
+
{{ key }} : {{ item }}
-
+
-
+
-
+
@@ -235,31 +191,33 @@
优惠券金额:
{{ orderInfo.order.priceDetailDTO.couponPrice | unitPrice('¥') }}
-
+
-
-
-
-
-
+
+
+
+
+
- 优惠详情: |
+ 优惠详情: |
-
-
-
- {{item.promotionName}}: |
- ¥{{ item.discountPrice | unitPrice }} |
+
+
+
+ {{ item.promotionName }}: |
+ ¥{{ item.discountPrice | unitPrice }} |
-
-
+
+
+
+
+
+
优惠详情:
-
-
- 优惠详情:
-
-
+
运费:
{{
@@ -267,10 +225,10 @@
}}
- 修改金额:
- ¥{{ orderInfo.order.priceDetailDTO.updatePrice | unitPrice }}
-
-
-
-
+
+
@@ -541,55 +413,59 @@
-
+
打印发货单
-
+
- 备注:{{ orderInfo.order.remark }}
-
+ 备注:{{ orderInfo.order.remark }}
+
-
- 收件人:{{ orderInfo.order.consigneeName }}
-
-
- 手机号:{{ orderInfo.order.consigneeMobile.replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") }}
- 手机号:{{ orderInfo.order.consigneeMobile }}
-
+
+ 收件人:{{ orderInfo.order.consigneeName }}
+
+
+ 手机号:{{
+ orderInfo.order.consigneeMobile.replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") }}
+ 手机号:{{ orderInfo.order.consigneeMobile }}
+
-
- 收货地址:{{ orderInfo.order.consigneeAddressPath }}{{ orderInfo.order.consigneeDetail }}
-
+
+ 收货地址:{{ orderInfo.order.consigneeAddressPath }}{{ orderInfo.order.consigneeDetail }}
+
+
-
- 商品信息
-
-
-
-
{{item.goodsName}}
-
-
-
- {{ keychild }} : {{ itemchild }}
-
-
-
-
-
数量:{{item.num}}
+
+
商品信息
+
+
+
+
{{ item.goodsName }}
+
+
+
+ {{ keychild }} : {{ itemchild }}
+
+
-
+
数量:{{ item.num }}
+
+
+
-
+
@@ -613,17 +489,18 @@ export default {
},
data() {
return {
- typeList:[],
- showPrices:false,
- printHiddenFlag:false,//隐藏信息
- printInfoObj:{
+ typeList: [],
+ showPrices: false,
+ printHiddenFlag: false,//隐藏信息
+ printInfoObj: {
id: "printInfo",//要打印的id名 无#号
- popTitle:' ',//页眉标题 默认浏览器标题 空字符串时显示undefined 使用html语言
- extraHead:'',//头部文字 默认空
+ popTitle: ' ',//页眉标题 默认浏览器标题 空字符串时显示undefined 使用html语言
+ extraHead: '',//头部文字 默认空
},
submitLoading: false, // 添加或编辑提交状态
region: [], //地区
regionId: [], //地区id
+ logisticsType: 'KUAIDINIAO', //物流类型
showRegion: false,
someJSONdata: '',
faceSheetForm: {
@@ -631,7 +508,7 @@ export default {
},
faceSheetFormValidate: {
logisticsId: [
- { required: true, message: "请选择物流公司"},
+ { required: true, message: "请选择物流公司" },
],
},
facesheetFlag: false, //电子面单标识
@@ -652,7 +529,7 @@ export default {
},
},
modal: false, //弹出调整价格框
- printModal:false,//弹出打印发货单
+ printModal: false,//弹出打印发货单
//调整价格表单
modifyPriceForm: {
orderPrice: 0,
@@ -826,13 +703,13 @@ export default {
this.orderTakeModal = true;
},
//打印发货单
- printOrder(){
+ printOrder() {
this.printModal = true;
},
- printHiddenInfo(){
+ printHiddenInfo() {
this.printHiddenFlag = !this.printHiddenFlag;
},
- printCancel(){
+ printCancel() {
// this.printHiddenFlag = false;
},
//订单核销提交
@@ -851,28 +728,28 @@ export default {
}
});
},
- getOrderPrice(){
- if(this.showPrices){
+ getOrderPrice() {
+ if (this.showPrices) {
this.showPrices = false
- }else if(!this.showPrices){
+ } else if (!this.showPrices) {
this.showPrices = true
}
},
- getContentPrice(){
- for (let i = 0; i < this.typeList.length; i++) {
- for (let j = i + 1; j < this.typeList.length; j++) {
- if (this.typeList[i].promotionId === this.typeList[j].promotionId) {
- this.typeList[i].discountPrice = this.typeList[i].discountPrice + this.typeList[j].discountPrice
- this.typeList.splice(j, 1)
- }
+ getContentPrice() {
+ for (let i = 0; i < this.typeList.length; i++) {
+ for (let j = i + 1; j < this.typeList.length; j++) {
+ if (this.typeList[i].promotionId === this.typeList[j].promotionId) {
+ this.typeList[i].discountPrice = this.typeList[i].discountPrice + this.typeList[j].discountPrice
+ this.typeList.splice(j, 1)
}
}
- console.log(this.typeList)
- if(this.typeList.length >= 3){
- console.log(123123)
- this.getContentPrice()
- }
- },
+ }
+ console.log(this.typeList)
+ if (this.typeList.length >= 3) {
+ console.log(123123)
+ this.getContentPrice()
+ }
+ },
//获取订单详细信息
getDataDetail() {
this.loading = true;
@@ -889,7 +766,7 @@ export default {
}
});
},
- Toprint(){
+ Toprint() {
this.facesheetFlag = true;
API_Logistics.getCheckedOn().then(res => {
if (res.success) {
@@ -937,35 +814,83 @@ export default {
//订单发货
orderDeliver() {
this.facesheetFlag = false
- API_Order.getLogisticsChecked().then((res) => {
- if (res.success) {
- this.checkedLogistics = res.result;
- this.orderDeliverModal = true;
- }
- });
+ if (this.logisticsType == 'SHUNFENG') {
+ this.$Modal.confirm({
+ title: "确认发货",
+ content: "您确认使用顺丰发货 " + this.sn + " 订单?",
+ loading: true,
+ onOk: () => {
+ API_Order.orderShunFengDelivery(this.sn).then((res) => {
+ if (res.success) {
+ this.$Modal.remove();
+ this.$Message.success("订单发货成功");
+ this.getDataDetail()
+ }
+ })
+ }
+ })
+ } else {
+ API_Order.getLogisticsChecked().then((res) => {
+ if (res.success) {
+ this.checkedLogistics = res.result;
+ this.orderDeliverModal = true;
+ }
+ });
+ }
},
- Toprints(){
- if(this.form.logisticsId != null && this.form.logisticsId != ''){
+ //顺丰打印面单
+ sfPrint() {
+ API_Order.getOrderFaceSheet(this.sn, this.faceSheetForm).then(res => {
+ if (res.success) {
+ let headers = {
+ 'X-Auth-token': res.result.token
+ }
+ API_Logistics.getShunFengFaceSheet(res.result.url, headers).then(res => {
+ const blob = new Blob([res], {
+ type: "application/pdf;charset=utf-8",
+ });
+ console.log("出发blob");
+ //对于
标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
+ //IE10以上支持blob但是依然不支持download
+ if ("download" in document.createElement("a")) {
+ //支持a标签download的浏览器
+ const link = document.createElement("a"); //创建a标签
+ link.download = this.orderInfo.order.sn + ".pdf"; //a标签添加属性
+ link.style.display = "none";
+ link.href = URL.createObjectURL(blob);
+ document.body.appendChild(link);
+ link.click(); //执行下载
+ URL.revokeObjectURL(link.href); //释放url
+ document.body.removeChild(link); //释放标签
+ } else {
+ navigator.msSaveBlob(blob, fileName);
+ }
+ })
+ }
+ })
+ },
+ Toprints() {
+ if (this.form.logisticsId != null && this.form.logisticsId != '') {
this.orderDeliverModal = false;
}
},
//订单发货提交
orderDeliverySubmit() {
- if(this.facesheetFlag){
+ if (this.facesheetFlag) {
this.$refs['faceSheetForm'].validate((valid) => {
if (valid) {
API_Order.getOrderFaceSheet(this.sn, this.faceSheetForm).then(res => {
if (res.success) {
- this.someJSONdata = res.result;
+ this.someJSONdata = res.result.printTemplate;
this.Toprints();
}
})
}
})
- }else{
+ } else {
this.$refs['orderDeliveryForm'].validate((valid) => {
if (valid) {
- API_Order.orderDelivery(this.sn,this.orderDeliveryForm).then(
+ API_Order.orderDelivery(this.sn, this.orderDeliveryForm).then(
(res) => {
if (res.success) {
this.$Message.success("订单发货成功");
@@ -1014,14 +939,24 @@ export default {
}
});
},
+
+ getLogisticsSetting() {
+ API_Logistics.getLogisticsSetting().then(res => {
+ if (res.success) {
+ this.logisticsType = res.result;
+ }
+ })
+ },
+
},
mounted() {
this.sn = this.$route.query.sn;
this.getDataDetail();
+ this.getLogisticsSetting();
},
// 如果是从详情页返回列表页,修改列表页keepAlive为true,确保不刷新页面
- beforeRouteLeave(to, from, next){
- if(to.name === 'orderList' || to.name === 'virtualOrderList') {
+ beforeRouteLeave(to, from, next) {
+ if (to.name === 'orderList' || to.name === 'virtualOrderList') {
to.meta.keepAlive = true
}
next()
@@ -1031,9 +966,10 @@ export default {
diff --git a/seller/src/views/shop/ship/logistics.vue b/seller/src/views/shop/ship/logistics.vue
index d11b99b6..a3e0889e 100644
--- a/seller/src/views/shop/ship/logistics.vue
+++ b/seller/src/views/shop/ship/logistics.vue
@@ -139,7 +139,7 @@ export default {
minWidth: 120,
sortable: true,
render: (h, params) => {
- if (params.row.selected === null || params.row.selected === "") {
+ if (!params.row.selected) {
return h("div", [h("tag", {props: {color: "volcano"}}, "关闭")]);
} else {
return h("div", [h("tag", {props: {color: "green"}}, "开启")]);
@@ -152,7 +152,7 @@ export default {
align: "center",
width: 200,
render: (h, params) => {
- if (params.row.selected === null) {
+ if (!params.row.selected) {
return h("div", [
h(
"Button",
@@ -301,7 +301,7 @@ export default {
},
submit() {
- if ( this.row.selected === null || this.row.selected === "") {
+ if ( !this.row.selected) {
API_Shop.logisticsChecked(
this.row.logisticsId,
this.faceSheetForm
@@ -329,7 +329,7 @@ export default {
content: "您确认关闭此物流公司?",
loading: true,
onOk: () => {
- API_Shop.logisticsUnChecked(v.selected).then((res) => {
+ API_Shop.logisticsUnChecked(v.logisticsId).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("物流公司关闭成功");