订单状态
diff --git a/manager/src/views/sys/app-version/appVersion.vue b/manager/src/views/sys/app-version/appVersion.vue
index a869d30b..3d411d76 100644
--- a/manager/src/views/sys/app-version/appVersion.vue
+++ b/manager/src/views/sys/app-version/appVersion.vue
@@ -347,6 +347,7 @@ export default {
this.form.versionUpdateDate / 1000
);
this.form.versionUpdateDate = versionUpdateDate;
+
this.form.updateTime = versionUpdateDate;
if (this.modalType == 0) {
// 添加 避免编辑后传入id等数据 记得删除
diff --git a/seller/package.json b/seller/package.json
index dee8c0ed..8ee9e65b 100644
--- a/seller/package.json
+++ b/seller/package.json
@@ -29,7 +29,7 @@
"sockjs-client": "^1.4.0",
"stompjs": "^2.3.3",
"swiper": "^6.3.5",
- "vue-qr": "^2.3.0",
+ "uuid": "^8.3.2",
"view-design": "^4.2.0",
"vue": "^2.6.10",
"vue-awesome": "^4.0.2",
@@ -37,15 +37,16 @@
"vue-clipboard2": "^0.3.0",
"vue-cropper": "^0.4.9",
"vue-i18n": "^8.15.1",
+ "vue-json-excel": "^0.3.0",
"vue-json-pretty": "^1.4.1",
"vue-lazyload": "^1.3.3",
+ "vue-qr": "^2.3.0",
"vue-router": "^3.1.3",
"vuedraggable": "^2.23.2",
"vuex": "^3.4.0",
"wangeditor": "^4.6.13",
"xlsx": "^0.16.2",
- "xss": "^1.0.7",
- "uuid": "^8.3.2"
+ "xss": "^1.0.7"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.4.4",
diff --git a/seller/src/api/order.js b/seller/src/api/order.js
index f18c4d2c..ce14778d 100644
--- a/seller/src/api/order.js
+++ b/seller/src/api/order.js
@@ -1,116 +1,130 @@
// 统一请求路径前缀在libs/axios.js中修改
-import {getRequest, postRequest, putRequest} from '@/libs/axios';
+import { getRequest, postRequest, putRequest ,postRequestWithNoForm } from "@/libs/axios";
+import { baseUrl } from "@/libs/axios.js";
+
+// 下载待发货的订单列表
+export const verificationCode = verificationCode => {
+ return getRequest(`/orders/getOrderByVerificationCode/${verificationCode}`);
+};
+
+// 下载待发货的订单列表
+export const downLoadDeliverExcel = params => {
+ return getRequest(`/orders/downLoadDeliverExcel`, params, 'blob');
+};
+
+
+// 上传待发货的订单列表
+export const uploadDeliverExcel = params => {
+ return postRequestWithNoForm(`/orders/batchDeliver`, params );
+};
// 获取普通订单列表
-export const getOrderList = (params) => {
- return getRequest(`/orders`, params)
-}
+export const getOrderList = params => {
+ return getRequest(`/orders`, params);
+};
// 获取普通订单详细信息
-export const getOrderDetail = (sn) => {
- return getRequest(`/orders/${sn}`)
-}
+export const getOrderDetail = sn => {
+ return getRequest(`/orders/${sn}`);
+};
// 调整订单金额
export const modifyOrderPrice = (sn, params) => {
- return putRequest(`/orders/update/${sn}/price`, params)
-}
+ return putRequest(`/orders/update/${sn}/price`, params);
+};
// 取消订单
export const cancelOrder = (sn, params) => {
- return postRequest(`/orders/${sn}/cancel`, params)
-}
+ return postRequest(`/orders/${sn}/cancel`, params);
+};
// 修改收货地址
export const editOrderConsignee = (sn, params) => {
- return postRequest(`/orders/update/${sn}/consignee`, params)
-}
+ return postRequest(`/orders/update/${sn}/consignee`, params);
+};
//获取投诉列表
-export const getComplainPage = (params) => {
- return getRequest(`/complain`, params)
-}
+export const getComplainPage = params => {
+ return getRequest(`/complain`, params);
+};
//获取投诉详情
-export const getComplainDetail = (id) => {
- return getRequest(`/complain/${id}`)
-}
+export const getComplainDetail = id => {
+ return getRequest(`/complain/${id}`);
+};
//添加交易投诉对话
-export const addOrderComplaint = (params) => {
- return postRequest(`/complain/communication/`, params)
-}
+export const addOrderComplaint = params => {
+ return postRequest(`/complain/communication/`, params);
+};
//添加交易投诉对话
-export const appeal = (params) => {
- return putRequest(`/complain/appeal`, params)
-}
+export const appeal = params => {
+ return putRequest(`/complain/appeal`, params);
+};
//获取订单日志
export const getOrderLog = (sn, params) => {
- return getRequest(`/orderLog/${sn}`, params)
-}
+ return getRequest(`/orderLog/${sn}`, params);
+};
// 订单发货
export const orderDelivery = (sn, params) => {
- return postRequest(`/orders/${sn}/delivery`, params)
-}
+ return postRequest(`/orders/${sn}/delivery`, params);
+};
// 获取商家选中的物流公司
export const getLogisticsChecked = () => {
- return getRequest(`/logistics/getChecked`)
-}
+ return getRequest(`/logistics/getChecked`);
+};
// 订单核验
-export const orderTake = (sn, params) => {
- return postRequest(`/orders/${sn}/take`, params)
-}
+export const orderTake = (sn, verificationCode) => {
+ return putRequest(`/orders/take/${sn}/${verificationCode}`);
+};
// 售后服务单
-export const afterSaleOrderPage = (params) => {
- return getRequest(`/afterSale/page`, params)
-}
+export const afterSaleOrderPage = params => {
+ return getRequest(`/afterSale/page`, params);
+};
// 售后服务单详情
-export const afterSaleOrderDetail = (sn) => {
- return getRequest(`/afterSale/${sn}`)
-}
+export const afterSaleOrderDetail = sn => {
+ return getRequest(`/afterSale/${sn}`);
+};
// 商家审核
export const afterSaleSellerReview = (sn, params) => {
- return putRequest(`/afterSale/review/${sn}`, params)
-}
+ return putRequest(`/afterSale/review/${sn}`, params);
+};
// 商家确认收货
export const afterSaleSellerConfirm = (sn, params) => {
- return putRequest(`/afterSale/confirm/${sn}`, params)
-}
+ return putRequest(`/afterSale/confirm/${sn}`, params);
+};
// 商家换货业务发货
export const afterSaleSellerDelivery = (sn, params) => {
- return postRequest(`/afterSale/${sn}/delivery`, params)
-}
+ return postRequest(`/afterSale/${sn}/delivery`, params);
+};
//查询物流
export const getTraces = (sn, params) => {
- return postRequest(`/orders/getTraces/${sn}`, params)
-}
+ return postRequest(`/orders/getTraces/${sn}`, params);
+};
//售后单查询物流
export const getSellerDeliveryTraces = (sn, params) => {
- return getRequest(`/afterSale/getSellerDeliveryTraces/${sn}`, params)
-}
+ return getRequest(`/afterSale/getSellerDeliveryTraces/${sn}`, params);
+};
//售后单查询物流
export const getAfterSaleTraces = (sn, params) => {
- return getRequest(`/afterSale/getDeliveryTraces/${sn}`, params)
-}
+ return getRequest(`/afterSale/getDeliveryTraces/${sn}`, params);
+};
//获取发票列表
-export const getReceiptPage = (params) => {
- return getRequest(`/receipt`, params)
-}
+export const getReceiptPage = params => {
+ return getRequest(`/receipt`, params);
+};
//获取发票列表
-export const invoicing = (id) => {
- return postRequest(`receipt/${id}/invoicing`)
-}
-
-
-
+export const invoicing = id => {
+ return postRequest(`receipt/${id}/invoicing`);
+};
diff --git a/seller/src/assets/download.png b/seller/src/assets/download.png
new file mode 100644
index 00000000..f2d237c2
Binary files /dev/null and b/seller/src/assets/download.png differ
diff --git a/seller/src/assets/goodsType1.png b/seller/src/assets/goodsType1.png
new file mode 100644
index 00000000..765c17c9
Binary files /dev/null and b/seller/src/assets/goodsType1.png differ
diff --git a/seller/src/assets/goodsType2.png b/seller/src/assets/goodsType2.png
new file mode 100644
index 00000000..7a957134
Binary files /dev/null and b/seller/src/assets/goodsType2.png differ
diff --git a/seller/src/assets/goodsTypeTpl.png b/seller/src/assets/goodsTypeTpl.png
new file mode 100644
index 00000000..dafa3393
Binary files /dev/null and b/seller/src/assets/goodsTypeTpl.png differ
diff --git a/seller/src/assets/logo.png b/seller/src/assets/logo.png
index 993ca619..4ee26429 100644
Binary files a/seller/src/assets/logo.png and b/seller/src/assets/logo.png differ
diff --git a/seller/src/assets/success.png b/seller/src/assets/success.png
new file mode 100644
index 00000000..92c815d1
Binary files /dev/null and b/seller/src/assets/success.png differ
diff --git a/seller/src/assets/upload.png b/seller/src/assets/upload.png
new file mode 100644
index 00000000..ff704611
Binary files /dev/null and b/seller/src/assets/upload.png differ
diff --git a/seller/src/config/index.js b/seller/src/config/index.js
index 7b283dc2..a7163666 100644
--- a/seller/src/config/index.js
+++ b/seller/src/config/index.js
@@ -22,10 +22,10 @@ export default {
buyer: 'https://buyer-api.pickmall.cn',
seller: 'https://store-api.pickmall.cn',
manager: 'https://admin-api.pickmall.cn',
- common: 'http://192.168.0.109:8890',
- buyer: 'http://192.168.0.109:8888',
- seller: 'http://192.168.0.109:8889',
- manager: 'http://192.168.0.109:8887'
+ // common: 'http://192.168.0.109:8890',
+ // buyer: 'http://192.168.0.109:8888',
+ // seller: 'http://192.168.0.109:8889',
+ // manager: 'http://192.168.0.109:8887'
},
api_prod: {
common: 'https://common-api.pickmall.cn',
diff --git a/seller/src/libs/axios.js b/seller/src/libs/axios.js
index 56d3afd8..0004efb5 100644
--- a/seller/src/libs/axios.js
+++ b/seller/src/libs/axios.js
@@ -4,28 +4,34 @@ import { getStore, setStore } from "./storage";
import { router } from "../router/index";
import { Message } from "view-design";
import Cookies from "js-cookie";
-import {handleRefreshToken} from "@/api/index"
+import { handleRefreshToken } from "@/api/index";
// 统一请求路径前缀
-export const baseUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.seller : config.api_prod.seller) + config.baseUrlPrefix;
-export const commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common);
+export const baseUrl =
+ (process.env.NODE_ENV === "development"
+ ? config.api_dev.seller
+ : config.api_prod.seller) + config.baseUrlPrefix;
+export const commonUrl =
+ process.env.NODE_ENV === "development"
+ ? config.api_dev.common
+ : config.api_prod.common;
var isRefreshToken = 0;
-const refreshToken = getTokenDebounce()
+const refreshToken = getTokenDebounce();
const service = axios.create({
timeout: 10000,
baseURL: baseUrl
-})
+});
service.interceptors.request.use(
config => {
- if (config.method == 'get') {
+ if (config.method == "get") {
config.params = {
_t: Date.parse(new Date()) / 1000,
...config.params
- }
+ };
}
- const uuid = getStore('uuid');
- config.headers['uuid'] = uuid;
+ const uuid = getStore("uuid");
+ config.headers["uuid"] = uuid;
return config;
},
err => {
@@ -85,30 +91,32 @@ service.interceptors.response.use(
},
async error => {
// 返回状态码不为200时候的错误处理
-
if (error.response) {
if (error.response.status === 401) {
// 这种情况一般调到登录页
} else if (error.response.status === 403) {
isRefreshToken++;
- if(isRefreshToken === 1) {
+ if (isRefreshToken === 1) {
const getTokenRes = await refreshToken();
- if (getTokenRes === 'success') { // 刷新token
+ if (getTokenRes === "success") {
+ // 刷新token
if (isRefreshToken === 1) {
- error.response.config.headers.accessToken = getStore('accessToken')
- return service(error.response.config)
+ error.response.config.headers.accessToken = getStore(
+ "accessToken"
+ );
+ return service(error.response.config);
} else {
- router.go(0)
+ router.go(0);
}
} else {
Cookies.set("userInfo", "");
- router.push('/login')
+ router.push("/login");
}
- isRefreshToken = 0
+ isRefreshToken = 0;
}
} else {
// 其他错误处理
- Message.error(error.response.data.message)
+ Message.error(error.response.data.message);
}
}
@@ -119,59 +127,65 @@ service.interceptors.response.use(
// 防抖闭包来一波
function getTokenDebounce() {
- let lock = false
- let success = false
- return function () {
+ let lock = false;
+ let success = false;
+ return function() {
if (!lock) {
- lock = true
+ lock = true;
let oldRefreshToken = getStore("refreshToken");
- handleRefreshToken(oldRefreshToken).then(res => {
- if (res.success) {
- let {
- accessToken,
- refreshToken
- } = res.result;
- setStore("accessToken", accessToken);
- setStore("refreshToken", refreshToken);
+ handleRefreshToken(oldRefreshToken)
+ .then(res => {
+ if (res.success) {
+ let { accessToken, refreshToken } = res.result;
+ setStore("accessToken", accessToken);
+ setStore("refreshToken", refreshToken);
- success = true
- lock = false
- } else {
- success = false
- lock = false
- // router.push('/login')
- }
- }).catch((err) => {
- success = false
- lock = false
- })
+ success = true;
+ lock = false;
+ } else {
+ success = false;
+ lock = false;
+ // router.push('/login')
+ }
+ })
+ .catch(err => {
+ success = false;
+ lock = false;
+ });
}
return new Promise(resolve => {
// 一直看lock,直到请求失败或者成功
const timer = setInterval(() => {
if (!lock) {
- clearInterval(timer)
+ clearInterval(timer);
if (success) {
- resolve('success')
+ resolve("success");
} else {
- resolve('fail')
+ resolve("fail");
}
}
- }, 500) // 轮询时间间隔
- })
- }
+ }, 500); // 轮询时间间隔
+ });
+ };
}
-export const getRequest = (url, params) => {
+export const getRequest = (url, params, resBlob) => {
let accessToken = getStore("accessToken");
- return service({
+ let data = {
method: "get",
url: `${url}`,
params: params,
headers: {
accessToken: accessToken
- }
- });
+ },
+ responseType: "blob"
+ };
+ if (resBlob != "blob") {
+ delete data.responseType;
+ }
+
+
+ return service(data);
};
export const postRequest = (url, params, headers) => {
@@ -232,29 +246,28 @@ export const postRequestWithHeaders = (url, params) => {
});
};
-
-export const putRequest = (url, params,headers) => {
+export const putRequest = (url, params, headers) => {
let accessToken = getStore("accessToken");
return service({
method: "put",
url: `${url}`,
data: params,
transformRequest: headers
- ? undefined
- : [
- function(data) {
- let ret = "";
- for (let it in data) {
- ret +=
- encodeURIComponent(it) +
- "=" +
- encodeURIComponent(data[it]) +
- "&";
+ ? undefined
+ : [
+ function(data) {
+ let ret = "";
+ for (let it in data) {
+ ret +=
+ encodeURIComponent(it) +
+ "=" +
+ encodeURIComponent(data[it]) +
+ "&";
+ }
+ ret = ret.substring(0, ret.length - 1);
+ return ret;
}
- ret = ret.substring(0, ret.length - 1);
- return ret;
- }
- ],
+ ],
headers: {
"Content-Type": "application/x-www-form-urlencoded",
accessToken: accessToken,
@@ -337,4 +350,3 @@ export const postRequestWithNoToken = (url, params) => {
params: params
});
};
-
diff --git a/seller/src/libs/routerJson.js b/seller/src/libs/routerJson.js
index 994f24e6..2016930c 100644
--- a/seller/src/libs/routerJson.js
+++ b/seller/src/libs/routerJson.js
@@ -143,6 +143,20 @@ export const result = [
url: "",
children: null,
permTypes: []
+ },
+ {
+ name: "virtualOrderList",
+ showAlways: true,
+ level: 2,
+ type: 0,
+ title: "虚拟订单",
+ path: "virtualOrderList",
+ component: "order/order/virtualOrderList",
+ icon: "md-person",
+ isMenu: true,
+ url: "",
+ children: null,
+ permTypes: []
}
]
},
@@ -381,6 +395,49 @@ export const result = [
}
]
},
+ {
+ name: "lives",
+ showAlways: true,
+ level: 1,
+ type: 0,
+ title: "直播活动",
+ path: "/promotion",
+ component: "Main",
+ icon: "md-person",
+ isMenu: true,
+ url: "",
+ permTypes: [],
+ children: [
+ {
+ name: "live",
+ showAlways: true,
+ level: 2,
+ type: 0,
+ title: "直播管理",
+ path: "live",
+ component: "promotion/live/live",
+ icon: "md-person",
+ isMenu: true,
+ url: "",
+ permTypes: [],
+ children: null
+ },
+ {
+ name: "liveGoods",
+ showAlways: true,
+ level: 2,
+ type: 0,
+ title: "直播商品",
+ path: "liveGoods",
+ component: "promotion/live/liveGoods",
+ icon: "md-person",
+ isMenu: true,
+ url: "",
+ permTypes: [],
+ children: null
+ }
+ ]
+ },
{
name: "storePromotion",
showAlways: true,
@@ -422,34 +479,7 @@ export const result = [
permTypes: [],
children: null
},
- {
- name: "live",
- showAlways: true,
- level: 2,
- type: 0,
- title: "直播管理",
- path: "live",
- component: "promotion/live/live",
- icon: "md-person",
- isMenu: true,
- url: "",
- permTypes: [],
- children: null
- },
- {
- name: "liveGoods",
- showAlways: true,
- level: 2,
- type: 0,
- title: "直播商品",
- path: "liveGoods",
- component: "promotion/live/liveGoods",
- icon: "md-person",
- isMenu: true,
- url: "",
- permTypes: [],
- children: null
- }
+
]
},
{
diff --git a/seller/src/router/router.js b/seller/src/router/router.js
index 5bb9b88e..04b15601 100644
--- a/seller/src/router/router.js
+++ b/seller/src/router/router.js
@@ -127,12 +127,19 @@ export const otherRouter = {
name: "full-cut-detail",
component: () => import("@/views/promotion/fullCut/newFullCut.vue")
},
+ {
+ path: "export-order-deliver",
+ title: "发货",
+ name: "export-order-deliver",
+ component: () => import("@/views/order/order/exportOrderDeliver.vue")
+ },
{
path: "order-detail",
title: "订单详情",
name: "order-detail",
component: () => import("@/views/order/order/orderDetail.vue")
},
+
// {
// path: "/*",
// name: "error-404",
diff --git a/seller/src/utils/filters.js b/seller/src/utils/filters.js
index f5b6f8a4..c0b03cf1 100644
--- a/seller/src/utils/filters.js
+++ b/seller/src/utils/filters.js
@@ -6,17 +6,32 @@
* @returns {*}
*/
export function unitPrice(val, unit, location) {
- let price = formatPrice(val)
- if (location === 'before') {
- return price.substr(0, price.length - 3)
+ let price = formatPrice(val);
+ if (location === "before") {
+ return price.substr(0, price.length - 3);
}
- if (location === 'after') {
- return price.substr(-2)
+ if (location === "after") {
+ return price.substr(-2);
}
- return (unit || '') + price
+ return (unit || "") + price;
}
-
+/**
+ * 订单来源
+ */
+export function clientTypeWay(val) {
+ if (val == "H5") {
+ return "移动端";
+ } else if (val == "PC") {
+ return "PC端";
+ } else if (val == "WECHAT_MP") {
+ return "小程序端";
+ } else if (val == "APP") {
+ return "移动应用端";
+ } else {
+ return val;
+ }
+}
/**
* 货币格式化
@@ -24,8 +39,8 @@ export function unitPrice(val, unit, location) {
* @returns {string}
*/
export function formatPrice(price) {
- if (typeof price !== 'number') return price
- return String(Number(price).toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g, ',')
+ if (typeof price !== "number") return price;
+ return String(Number(price).toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
/**
@@ -35,51 +50,60 @@ export function formatPrice(price) {
* @returns {*|string}
*/
export function unixToDate(unix, format) {
- let _format = format || 'yyyy-MM-dd hh:mm:ss'
- const d = new Date(unix * 1000)
+ let _format = format || "yyyy-MM-dd hh:mm:ss";
+ const d = new Date(unix * 1000);
const o = {
- 'M+': d.getMonth() + 1,
- 'd+': d.getDate(),
- 'h+': d.getHours(),
- 'm+': d.getMinutes(),
- 's+': d.getSeconds(),
- 'q+': Math.floor((d.getMonth() + 3) / 3),
+ "M+": d.getMonth() + 1,
+ "d+": d.getDate(),
+ "h+": d.getHours(),
+ "m+": d.getMinutes(),
+ "s+": d.getSeconds(),
+ "q+": Math.floor((d.getMonth() + 3) / 3),
S: d.getMilliseconds()
- }
- if (/(y+)/.test(_format)) _format = _format.replace(RegExp.$1, (d.getFullYear() + '').substr(4 - RegExp.$1.length))
- for (const k in o) if (new RegExp('(' + k + ')').test(_format)) _format = _format.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
- return _format
+ };
+ if (/(y+)/.test(_format))
+ _format = _format.replace(
+ RegExp.$1,
+ (d.getFullYear() + "").substr(4 - RegExp.$1.length)
+ );
+ for (const k in o)
+ if (new RegExp("(" + k + ")").test(_format))
+ _format = _format.replace(
+ RegExp.$1,
+ RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
+ );
+ return _format;
}
//是否格式化
export function unixWhether(status) {
switch (status) {
- case 'YES':
- return "是"
- case 'NO':
- return "否"
+ case "YES":
+ return "是";
+ case "NO":
+ return "否";
}
}
export function unixSellerBillStatus(status_code) {
switch (status_code) {
- case 'OUT':
- return '已出账'
- case 'CHECK':
- return '已对账'
- case 'EXAMINE':
- return '已审核'
- case 'PAY':
- return '已结算'
- case 'COMPLETE':
- return '已完成'
+ case "OUT":
+ return "已出账";
+ case "CHECK":
+ return "已对账";
+ case "EXAMINE":
+ return "已审核";
+ case "PAY":
+ return "已结算";
+ case "COMPLETE":
+ return "已完成";
}
}
export function unixSwitchStatus(status_code) {
switch (status_code) {
- case 'OPEN':
- return '开启'
- case 'CLOSE':
- return '关闭'
+ case "OPEN":
+ return "开启";
+ case "CLOSE":
+ return "关闭";
}
}
@@ -89,30 +113,35 @@ export function unixSwitchStatus(status_code) {
* @returns {*}
*/
export function secrecyMobile(mobile) {
- mobile = String(mobile)
+ mobile = String(mobile);
if (!/\d{11}/.test(mobile)) {
- return mobile
+ return mobile;
}
- return mobile.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3')
+ return mobile.replace(/(\d{3})(\d{4})(\d{4})/, "$1****$3");
}
-
export function formatDate(date, fmt) {
if (/(y+)/.test(fmt)) {
- fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+ fmt = fmt.replace(
+ RegExp.$1,
+ (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+ );
}
let o = {
- 'M+': date.getMonth() + 1,
- 'd+': date.getDate(),
- 'h+': date.getHours(),
- 'm+': date.getMinutes(),
- 's+': date.getSeconds()
+ "M+": date.getMonth() + 1,
+ "d+": date.getDate(),
+ "h+": date.getHours(),
+ "m+": date.getMinutes(),
+ "s+": date.getSeconds()
};
for (let k in o) {
- if (new RegExp(`(${k})`).test(fmt)) {
- let str = o[k] + '';
- fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
- }
+ if (new RegExp(`(${k})`).test(fmt)) {
+ let str = o[k] + "";
+ fmt = fmt.replace(
+ RegExp.$1,
+ RegExp.$1.length === 1 ? str : padLeftZero(str)
+ );
+ }
}
return fmt;
-};
+}
diff --git a/seller/src/views/goods/goods-seller/addGoods.scss b/seller/src/views/goods/goods-seller/addGoods.scss
index dda4752a..d7407073 100644
--- a/seller/src/views/goods/goods-seller/addGoods.scss
+++ b/seller/src/views/goods/goods-seller/addGoods.scss
@@ -3,22 +3,25 @@
padding: 15px;
margin: 0 auto;
text-align: center;
- border: 1px solid #ddd;
+ border-radius: 0.8em;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
background: none repeat 0 0 #fff;
/*商品品类*/
.goods-category {
+ min-height: 500px;
+ border-radius: 0.8em;
text-align: left;
padding: 10px;
- background: #fafafa;
- border: 1px solid #e6e6e6;
+ background: #ededed;
ul {
- padding: 8px 4px 8px 8px;
+ padding: 12px 8px;
list-style: none;
width: 300px;
background: none repeat 0 0 #fff;
- border: 1px solid #e6e6e6;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
+ border-radius: 0.4em;
display: inline-block;
letter-spacing: normal;
margin-right: 15px;
@@ -27,7 +30,7 @@
li {
line-height: 20px;
- padding: 5px;
+ padding: 10px 5px;
cursor: pointer;
color: #333;
font-size: 12px;
@@ -42,9 +45,10 @@
/** 当前品类被选中的样式 */
.activeClass {
- background-color: #d9edf7;
- border: 1px solid #bce8f1;
- color: #3a87ad;
+ border-radius: 0.4em;
+ background-color: rgba($color: $theme_color, $alpha: 0.2);
+ border: 1px solid rgba($color: $theme_color, $alpha: 0.8);
+ color: #fff;
}
/*!*当前选择的商品品类文字*!*/
@@ -215,6 +219,19 @@ div.base-info-item {
}
}
+.success {
+ > h1 {
+ font-size: 28px;
+ }
+ > * {
+ margin: 10px;
+ }
+}
+.operation {
+ > * {
+ margin: 10px 0;
+ }
+}
/*商品描述*/
.goods-intro {
line-height: 40;
@@ -223,12 +240,16 @@ div.base-info-item {
/** 底部步骤 */
.footer {
width: 100%;
+ margin-top: 20px;
padding: 10px;
background-color: #ffc;
position: sticky;
bottom: 0px;
text-align: center;
- z-index: 9;
+ z-index: 999;
+ > .ivu-btn {
+ margin: 0 10px;
+ }
}
/*图片上传组件第一张图设置封面*/
@@ -261,9 +282,20 @@ div.base-info-item {
word-break: break-all;
}
+/deep/ .ivu-steps {
+ width: 100% !important;
+ display: flex;
+}
+.step-list {
+ height: 60px;
+ margin-bottom: 20px;
+ border-radius: 0.8em;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+ // box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
+}
.step-view {
- width: 33%;
- height: 40px;
+ flex: 1;
+ height: 60px;
font-size: 19px;
text-align: center;
display: flex;
@@ -271,6 +303,14 @@ div.base-info-item {
justify-content: center;
align-items: center;
}
+.step-view:nth-of-type(1) {
+ border-top-left-radius: 0.4em;
+ border-bottom-left-radius: 0.4em;
+}
+.step-view:nth-last-child(1) {
+ border-top-right-radius: 0.4em;
+ border-bottom-right-radius: 0.4em;
+}
.add-sku-btn {
margin-top: 10px;
@@ -374,14 +414,67 @@ div.base-info-item {
right: 0;
background: rgba(0, 0, 0, 0.6);
+
+ justify-content: space-between;
+ align-items: center;
+ flex-direction: column;
}
.demo-upload-list:hover .demo-upload-list-cover {
- display: block;
+ display:flex;
}
-.demo-upload-list-cover i {
- width: 50%;
- margin-top: 8px;
- color: #fff;
- font-size: 20px;
- cursor: pointer;
+.demo-upload-list-cover div {
+ margin: 10% 0;
+ width: 100%;
+
+ > i {
+ width: 50%;
+ margin-top: 8px;
+ color: #fff;
+ font-size: 20px;
+ cursor: pointer;
+ }
+}
+.active-goods-type {
+ background: #e8e8e8;
+}
+.goods-type-list {
+ max-height: 500px;
+ overflow-y: auto;
+
+ > .goods-type-item {
+ padding: 20px 0;
+ width: 100%;
+ cursor: pointer;
+ transition: 0.35s;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ /deep/ img {
+ margin-right: 20px;
+ width: 100px;
+ }
+ /deep/ h2 {
+ cursor: pointer;
+ font-size: 21px;
+ padding: 10px 0;
+ color: #333;
+ }
+ /deep/ p {
+ color: #999;
+ font-size: 14px;
+ margin-top: 10px;
+ }
+ }
+ > .goods-type-item:hover {
+ transform: translateY(-10px);
+ }
+}
+.template-item {
+ justify-content: flex-start !important;
+}
+
+.tree-bar{
+ height: auto !important;
+ max-height: auto !important;
+ min-height: 240px !important;
}
diff --git a/seller/src/views/goods/goods-seller/goods.vue b/seller/src/views/goods/goods-seller/goods.vue
index c6d6a59a..df95601d 100644
--- a/seller/src/views/goods/goods-seller/goods.vue
+++ b/seller/src/views/goods/goods-seller/goods.vue
@@ -4,7 +4,7 @@