mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
This commit is contained in:
@@ -2,10 +2,10 @@ import {commonUrl, getRequest} from '@/libs/axios';
|
||||
|
||||
// 通过id获取子地区
|
||||
export const getChildRegion = (id) => {
|
||||
return getRequest(`${commonUrl}/common/region/item/${id}`);
|
||||
return getRequest(`${commonUrl}/common/common/region/item/${id}`);
|
||||
};
|
||||
|
||||
// 点地图获取地址信息
|
||||
export const getRegion = (params) => {
|
||||
return getRequest(`${commonUrl}/common/region/region`, params);
|
||||
return getRequest(`${commonUrl}/common/common/region/region`, params);
|
||||
};
|
||||
|
||||
@@ -5,17 +5,17 @@ import {getRequest, postRequest, putRequest, deleteRequest, importRequest, getRe
|
||||
|
||||
//获取分销商品列表
|
||||
export const getDistributionGoods = (params) => {
|
||||
return getRequest('/distributionGoods', params)
|
||||
return getRequest('/distribution/goods', params)
|
||||
}
|
||||
|
||||
// 取消分销商品
|
||||
export const distributionGoodsCancel = (id) => {
|
||||
return deleteRequest(`/distributionGoods/cancel/${id}`)
|
||||
return deleteRequest(`/distribution/goods/cancel/${id}`)
|
||||
}
|
||||
|
||||
// 选择分销商品
|
||||
export const distributionGoodsCheck = (id,param) => {
|
||||
return putRequest(`/distributionGoods/checked/${id}`,param)
|
||||
return putRequest(`/distribution/goods/checked/${id}`,param)
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export const getDistributionSetting = (id, params) => {
|
||||
|
||||
//获取分销订单列表
|
||||
export const getDistributionOrder = (params) => {
|
||||
return getRequest('/distributionOrder', params)
|
||||
return getRequest('/distribution/order', params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@ export const delCategdelShopGoodsLabel = id => {
|
||||
|
||||
// 根据goodsId分页获取商品列表
|
||||
export const getQueryGoodsIdGoodsList = goodsId => {
|
||||
return getRequest(`/goods/sku/${goodsId}/list`);
|
||||
return getRequest(`/goods/goods/sku/${goodsId}/list`);
|
||||
};
|
||||
|
||||
// 获取商品分页列表
|
||||
export const getGoodsSkuListDataSeller = params => {
|
||||
return getRequest("/goods/sku/list", params);
|
||||
return getRequest("/goods/goods/sku/list", params);
|
||||
};
|
||||
|
||||
// 获取商品品牌分页列表
|
||||
@@ -69,7 +69,7 @@ export const saveCategoryBrand = (category_id, params) => {
|
||||
};
|
||||
//保存获取关联规格
|
||||
export const saveCategorySpec = (category_id, params) => {
|
||||
return postRequest(`/goods/category/spec/${category_id}`, params);
|
||||
return postRequest(`/goods/categorySpec/${category_id}`, params);
|
||||
};
|
||||
|
||||
//获取所有可用品牌
|
||||
@@ -117,7 +117,7 @@ export const insertOrUpdateSpec = params => {
|
||||
};
|
||||
//根据分类id获取关联规格
|
||||
export const getCategorySpecListData = (category_id, params) => {
|
||||
return getRequest(`/goods/category/spec/${category_id}`, params);
|
||||
return getRequest(`/goods/categorySpec/${category_id}`, params);
|
||||
};
|
||||
//删除gUI个
|
||||
export const delSpec = (id, params) => {
|
||||
@@ -139,12 +139,12 @@ export const getGoodsCategory = parent_id => {
|
||||
|
||||
// 获取商品sku分页列表
|
||||
export const getGoodsSkuData = params => {
|
||||
return getRequest("/goods/sku/list", params);
|
||||
return getRequest("/goods/goods/sku/list", params);
|
||||
};
|
||||
|
||||
// 获取商品分页列表
|
||||
export const getGoodsListData = params => {
|
||||
return getRequest("/goods/list", params);
|
||||
return getRequest("/goods/goods/list", params);
|
||||
};
|
||||
// 获取待审核商品分页列表
|
||||
export const getAuthGoodsListData = params => {
|
||||
@@ -178,7 +178,7 @@ export const getShopGoodsLabelListSeller = () => {
|
||||
|
||||
//查询分类绑定参数信息
|
||||
export const getCategoryParamsListData = (id, params) => {
|
||||
return getRequest(`/goods/category/parameters/${id}`, params);
|
||||
return getRequest(`/goods/categoryParameters/${id}`, params);
|
||||
};
|
||||
//查询商品绑定参数信息
|
||||
export const getCategoryParamsByGoodsId = (goodsId, categoryId) => {
|
||||
@@ -194,11 +194,11 @@ export const deleteParams = (id, params) => {
|
||||
};
|
||||
//更新或者保存参数组
|
||||
export const insertOrUpdateParamsGroup = params => {
|
||||
return postRequest("/goods/category/parameters/save", params);
|
||||
return postRequest("/goods/categoryParameters/save", params);
|
||||
};
|
||||
//删除参数组
|
||||
export const deleteParamsGroup = (id, params) => {
|
||||
return deleteRequest(`/goods/category/parameters/${id}`, params);
|
||||
return deleteRequest(`/goods/categoryParameters/${id}`, params);
|
||||
};
|
||||
|
||||
//获取sku列表
|
||||
@@ -226,38 +226,38 @@ export const insertSpecSeller = params => {
|
||||
|
||||
// 更新商品库存
|
||||
export const updateGoodsSkuStocks = params => {
|
||||
return putRequest("/goods/update/stocks", params, {
|
||||
return putRequest("/goods/goods/update/stocks", params, {
|
||||
"Content-Type": "application/json"
|
||||
});
|
||||
};
|
||||
// 获取商品分页列表
|
||||
export const getGoodsListDataSeller = params => {
|
||||
return getRequest("/goods/list", params);
|
||||
return getRequest("/goods/goods/list", params);
|
||||
};
|
||||
// 获取商品告警分页列表
|
||||
export const getGoodsListDataByStockSeller = params => {
|
||||
return getRequest("/goods/list/stock", params);
|
||||
return getRequest("/goods/goods/list/stock", params);
|
||||
};
|
||||
// 获取商品详情
|
||||
export const getGoods = id => {
|
||||
return getRequest(`/goods/get/${id}`);
|
||||
return getRequest(`/goods/goods/get/${id}`);
|
||||
};
|
||||
// 上架商品
|
||||
export const upGoods = params => {
|
||||
return putRequest(`/goods/up`, params);
|
||||
return putRequest(`/goods/goods/up`, params);
|
||||
};
|
||||
// 删除商品
|
||||
export const deleteGoods = params => {
|
||||
return putRequest(`/goods/delete`, params);
|
||||
return putRequest(`/goods/goods/delete`, params);
|
||||
};
|
||||
// 下架商品
|
||||
export const lowGoods = params => {
|
||||
return putRequest(`/goods/under`, params);
|
||||
return putRequest(`/goods/goods/under`, params);
|
||||
};
|
||||
|
||||
// 获取商品单位列表
|
||||
export const getGoodsUnitList = () => {
|
||||
return getRequest(`/goods/unit`);
|
||||
return getRequest(`/goods/goodsUnit`);
|
||||
};
|
||||
//根据分类id获取关联品牌
|
||||
export const getCategoryBrandListDataSeller = (category_id, params) => {
|
||||
@@ -265,42 +265,42 @@ export const getCategoryBrandListDataSeller = (category_id, params) => {
|
||||
};
|
||||
|
||||
export function createGoods(params) {
|
||||
return postRequest("/goods/create", params, {
|
||||
return postRequest("/goods/goods/create", params, {
|
||||
"Content-Type": "application/json"
|
||||
});
|
||||
}
|
||||
|
||||
export function editGoods(goodsId, params) {
|
||||
return putRequest(`/goods/update/${goodsId}`, params, {
|
||||
return putRequest(`/goods/goods/update/${goodsId}`, params, {
|
||||
"Content-Type": "application/json"
|
||||
});
|
||||
}
|
||||
|
||||
// 获取草稿商品分页列表
|
||||
export const getDraftGoodsListData = params => {
|
||||
return getRequest("/draft/goods/page", params);
|
||||
return getRequest("/goods/draftGoods/page", params);
|
||||
};
|
||||
|
||||
// 获取草稿商品详情
|
||||
export const getDraftGoodsDetail = id => {
|
||||
return getRequest(`/draft/goods/${id}`);
|
||||
return getRequest(`/goods/draftGoods/${id}`);
|
||||
};
|
||||
|
||||
// 保存草稿商品
|
||||
export function saveDraftGoods(params) {
|
||||
return postRequest("/draft/goods/save", params, {
|
||||
return postRequest("/goods/draftGoods/save", params, {
|
||||
"Content-Type": "application/json"
|
||||
});
|
||||
}
|
||||
|
||||
// 删除草稿商品
|
||||
export const deleteDraftGoods = id => {
|
||||
return deleteRequest(`/draft/goods/${id}`);
|
||||
return deleteRequest(`/goods/draftGoods/${id}`);
|
||||
};
|
||||
|
||||
//查询分类绑定参数信息
|
||||
export const getCategoryParamsListDataSeller = (id, params) => {
|
||||
return getRequest(`/goods/category/parameters/${id}`, params);
|
||||
return getRequest(`/goods/categoryParameters/${id}`, params);
|
||||
};
|
||||
|
||||
//保存获取关联规格
|
||||
@@ -310,7 +310,7 @@ export const getGoodsSpecInfoSeller = (category_id) => {
|
||||
|
||||
//批量设置运费模板
|
||||
export const batchShipTemplate = params => {
|
||||
return putRequest(`/goods/freight`, params);
|
||||
return putRequest(`/goods/goods/freight`, params);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ import {
|
||||
|
||||
//获取所有city
|
||||
export const getAllCity = (params) => {
|
||||
return getRequest(commonUrl+'/common/region/allCity', params)
|
||||
return getRequest(commonUrl+'/common/common/region/allCity', params)
|
||||
}
|
||||
|
||||
// 登陆
|
||||
export const getHomeNotice = params => {
|
||||
return getRequest("/article/getByPage?type=STORE_ARTICLE&pageSize=15");
|
||||
return getRequest("/other/article/getByPage?type=STORE_ARTICLE&pageSize=15");
|
||||
};
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@ export const getSellerHomeData = params => {
|
||||
|
||||
// 登陆
|
||||
export const login = params => {
|
||||
return postRequestWithNoTokenData("/login/userLogin", params);
|
||||
return postRequestWithNoTokenData("/passport/login/userLogin", params);
|
||||
};
|
||||
|
||||
// 登出
|
||||
export const logout = () => {
|
||||
return postRequest("/login/logout");
|
||||
return postRequest("/passport/login/logout");
|
||||
};
|
||||
|
||||
// 获取用户登录信息
|
||||
@@ -43,7 +43,7 @@ export const userInfo = params => {
|
||||
};
|
||||
// 获取登录信息
|
||||
export const userMsg = params => {
|
||||
return getRequest('/settings', params)
|
||||
return getRequest('/settings/storeSettings', params)
|
||||
}
|
||||
// 注册
|
||||
export const regist = params => {
|
||||
@@ -171,47 +171,47 @@ export const getLogListData = params => {
|
||||
};
|
||||
// 分页获取消息数据
|
||||
export const getMessageData = params => {
|
||||
return getRequest("/message/getByCondition", params);
|
||||
return getRequest("/message/storeMessage/getByCondition", params);
|
||||
};
|
||||
// 获取单个消息详情
|
||||
export const getMessageDataById = (id, params) => {
|
||||
return getRequest(`/message/get/${id}`, params);
|
||||
return getRequest(`/message/storeMessage/get/${id}`, params);
|
||||
};
|
||||
// 添加消息
|
||||
export const addMessage = params => {
|
||||
return postRequest("/message/add", params);
|
||||
return postRequest("/message/storeMessage/add", params);
|
||||
};
|
||||
// 编辑消息
|
||||
export const editMessage = params => {
|
||||
return postRequest("/message/edit", params);
|
||||
return postRequest("/message/storeMessage/edit", params);
|
||||
};
|
||||
// 回收站还原消息
|
||||
export const reductionMessage = (ids, params) => {
|
||||
return putRequest(`/message/${ids}/reduction`, params);
|
||||
return putRequest(`/message/storeMessage/${ids}/reduction`, params);
|
||||
};
|
||||
// 彻底删除消息
|
||||
export const clearMessage = (ids, params) => {
|
||||
return deleteRequest(`/message/${ids}`, params);
|
||||
return deleteRequest(`/message/storeMessage/${ids}`, params);
|
||||
};
|
||||
// 已读消息放入回收站
|
||||
export const deleteMessage = (ids, params) => {
|
||||
return deleteRequest(`/message/${ids}/delete`, params);
|
||||
return deleteRequest(`/message/storeMessage/${ids}/delete`, params);
|
||||
};
|
||||
// 分页获取消息推送数据
|
||||
export const getMessageSendData = params => {
|
||||
return getRequest("/message", params);
|
||||
return getRequest("/message/storeMessage", params);
|
||||
};
|
||||
// 进入消息中心首次加载全部数据
|
||||
export const getAllMessage = params => {
|
||||
return getRequest("/message/all", params);
|
||||
return getRequest("/message/storeMessage/all", params);
|
||||
};
|
||||
// 已读消息
|
||||
export const read = (id) => {
|
||||
return putRequest(`/message/${id}/read`);
|
||||
return putRequest(`/message/storeMessage/${id}/read`);
|
||||
};
|
||||
// 删除发送消息
|
||||
export const deleteMessageSend = (ids, params) => {
|
||||
return deleteRequest(`/messageSend/delByIds/${ids}`, params);
|
||||
return deleteRequest(`/message/storeMessageSend/delByIds/${ids}`, params);
|
||||
};
|
||||
|
||||
// 分页获取文件数据
|
||||
@@ -240,7 +240,7 @@ export const aliDownloadFile = (fKey, params) => {
|
||||
|
||||
// base64上传
|
||||
export const base64Upload = params => {
|
||||
return postRequest("/upload/file", params);
|
||||
return postRequest("/common/common/upload/file", params);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -12,23 +12,23 @@ import {
|
||||
|
||||
// 分页获取物流公司
|
||||
export const getLogisticsPage = params => {
|
||||
return getRequest(`/logistics/getByPage`, params);
|
||||
return getRequest(`/other/logistics/getByPage`, params);
|
||||
};
|
||||
// 删除
|
||||
export const delLogistics = id => {
|
||||
return deleteRequest(`/logistics/delete/${id}`);
|
||||
return deleteRequest(`/other/logistics/delete/${id}`);
|
||||
};
|
||||
// 添加
|
||||
export const addLogistics = params => {
|
||||
return postRequest(`/logistics/save`,params);
|
||||
return postRequest(`/other/logistics/save`,params);
|
||||
};
|
||||
// 通过id查询详情
|
||||
export const getLogisticsDetail = id => {
|
||||
return getRequest(`/logistics/get/${id}`);
|
||||
return getRequest(`/other/logistics/get/${id}`);
|
||||
};
|
||||
// 编辑
|
||||
export const updateLogistics = (id,params) => {
|
||||
return putRequest(`/logistics/${id}`,params);
|
||||
return putRequest(`/other/logistics/${id}`,params);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3,17 +3,17 @@ import {getRequest, putRequest, postRequest} from "@/libs/axios";
|
||||
|
||||
// 分页获取会员评价
|
||||
export const getMemberReview = params => {
|
||||
return getRequest("/memberEvaluation", params);
|
||||
return getRequest("/member/evaluation", params);
|
||||
};
|
||||
|
||||
// 根据id获取评价详情
|
||||
export const getMemberInfoReview = id => {
|
||||
return getRequest(`/memberEvaluation/get/${id}`);
|
||||
return getRequest(`/member/evaluation/get/${id}`);
|
||||
};
|
||||
|
||||
//回复评价信息
|
||||
export const replyMemberReview = (id, params) => {
|
||||
return putRequest(`/memberEvaluation/reply/${id}`, params);
|
||||
return putRequest(`/member/evaluation/reply/${id}`, params);
|
||||
};
|
||||
|
||||
// 获取会员注册统计列表
|
||||
@@ -72,7 +72,7 @@ export const deleteMemberListData = ids => {
|
||||
};
|
||||
// 获取充值记录列表数据
|
||||
export const getUserRecharge = params => {
|
||||
return getRequest("/recharge", params);
|
||||
return getRequest("/wallet/recharge", params);
|
||||
};
|
||||
|
||||
// 获取预存款明细列表数据
|
||||
|
||||
@@ -5,66 +5,66 @@ import { baseUrl } from "@/libs/axios.js";
|
||||
|
||||
// 下载待发货的订单列表
|
||||
export const verificationCode = verificationCode => {
|
||||
return getRequest(`/orders/getOrderByVerificationCode/${verificationCode}`);
|
||||
return getRequest(`/order/order/getOrderByVerificationCode/${verificationCode}`);
|
||||
};
|
||||
|
||||
// 下载待发货的订单列表
|
||||
export const downLoadDeliverExcel = params => {
|
||||
return getRequest(`/orders/downLoadDeliverExcel`, params, 'blob');
|
||||
return getRequest(`/order/order/downLoadDeliverExcel`, params, 'blob');
|
||||
};
|
||||
// 导出待发货订单
|
||||
export const queryExportOrder = params => {
|
||||
return getRequest(`/orders/queryExportOrder`, params);
|
||||
return getRequest(`/order/order/queryExportOrder`, params);
|
||||
};
|
||||
|
||||
|
||||
// 上传待发货的订单列表
|
||||
export const uploadDeliverExcel = params => {
|
||||
return postRequestWithNoForm(`/orders/batchDeliver`, params );
|
||||
return postRequestWithNoForm(`/order/order/batchDeliver`, params );
|
||||
};
|
||||
|
||||
// 获取普通订单列表
|
||||
export const getOrderList = params => {
|
||||
return getRequest(`/orders`, params);
|
||||
return getRequest(`/order/order`, params);
|
||||
};
|
||||
|
||||
// 获取普通订单详细信息
|
||||
export const getOrderDetail = sn => {
|
||||
return getRequest(`/orders/${sn}`);
|
||||
return getRequest(`/order/order/${sn}`);
|
||||
};
|
||||
|
||||
// 调整订单金额
|
||||
export const modifyOrderPrice = (sn, params) => {
|
||||
return putRequest(`/orders/update/${sn}/price`, params);
|
||||
return putRequest(`/order/order/update/${sn}/price`, params);
|
||||
};
|
||||
|
||||
// 取消订单
|
||||
export const cancelOrder = (sn, params) => {
|
||||
return postRequest(`/orders/${sn}/cancel`, params);
|
||||
return postRequest(`/order/order/${sn}/cancel`, params);
|
||||
};
|
||||
|
||||
// 修改收货地址
|
||||
export const editOrderConsignee = (sn, params) => {
|
||||
return postRequest(`/orders/update/${sn}/consignee`, params);
|
||||
return postRequest(`/order/order/update/${sn}/consignee`, params);
|
||||
};
|
||||
//获取投诉列表
|
||||
export const getComplainPage = params => {
|
||||
return getRequest(`/complain`, params);
|
||||
return getRequest(`/order/complain`, params);
|
||||
};
|
||||
|
||||
//获取投诉详情
|
||||
export const getComplainDetail = id => {
|
||||
return getRequest(`/complain/${id}`);
|
||||
return getRequest(`/order/complain/${id}`);
|
||||
};
|
||||
|
||||
//添加交易投诉对话
|
||||
export const addOrderComplaint = params => {
|
||||
return postRequest(`/complain/communication/`, params);
|
||||
return postRequest(`/order/complain/communication/`, params);
|
||||
};
|
||||
|
||||
//添加交易投诉对话
|
||||
export const appeal = params => {
|
||||
return putRequest(`/complain/appeal`, params);
|
||||
return putRequest(`/order/complain/appeal`, params);
|
||||
};
|
||||
|
||||
//获取订单日志
|
||||
@@ -74,61 +74,61 @@ export const getOrderLog = (sn, params) => {
|
||||
|
||||
// 订单发货
|
||||
export const orderDelivery = (sn, params) => {
|
||||
return postRequest(`/orders/${sn}/delivery`, params);
|
||||
return postRequest(`/order/order/${sn}/delivery`, params);
|
||||
};
|
||||
|
||||
// 获取商家选中的物流公司
|
||||
export const getLogisticsChecked = () => {
|
||||
return getRequest(`/logistics/getChecked`);
|
||||
return getRequest(`/other/logistics/getChecked`);
|
||||
};
|
||||
|
||||
// 订单核验
|
||||
export const orderTake = (sn, verificationCode) => {
|
||||
return putRequest(`/orders/take/${sn}/${verificationCode}`);
|
||||
return putRequest(`/order/order/take/${sn}/${verificationCode}`);
|
||||
};
|
||||
|
||||
// 售后服务单
|
||||
export const afterSaleOrderPage = params => {
|
||||
return getRequest(`/afterSale/page`, params);
|
||||
return getRequest(`/order/afterSale/page`, params);
|
||||
};
|
||||
|
||||
// 售后服务单详情
|
||||
export const afterSaleOrderDetail = sn => {
|
||||
return getRequest(`/afterSale/${sn}`);
|
||||
return getRequest(`/order/afterSale/${sn}`);
|
||||
};
|
||||
|
||||
// 商家审核
|
||||
export const afterSaleSellerReview = (sn, params) => {
|
||||
return putRequest(`/afterSale/review/${sn}`, params);
|
||||
return putRequest(`/order/afterSale/review/${sn}`, params);
|
||||
};
|
||||
|
||||
// 商家确认收货
|
||||
export const afterSaleSellerConfirm = (sn, params) => {
|
||||
return putRequest(`/afterSale/confirm/${sn}`, params);
|
||||
return putRequest(`/order/afterSale/confirm/${sn}`, params);
|
||||
};
|
||||
|
||||
// 商家换货业务发货
|
||||
export const afterSaleSellerDelivery = (sn, params) => {
|
||||
return postRequest(`/afterSale/${sn}/delivery`, params);
|
||||
return postRequest(`/order/afterSale/${sn}/delivery`, params);
|
||||
};
|
||||
//查询物流
|
||||
export const getTraces = (sn, params) => {
|
||||
return getRequest(`/orders/getTraces/${sn}`, params);
|
||||
return getRequest(`/order/order/getTraces/${sn}`, params);
|
||||
};
|
||||
//售后单查询物流
|
||||
export const getSellerDeliveryTraces = (sn, params) => {
|
||||
return getRequest(`/afterSale/getSellerDeliveryTraces/${sn}`, params);
|
||||
return getRequest(`/order/afterSale/getSellerDeliveryTraces/${sn}`, params);
|
||||
};
|
||||
//售后单查询物流
|
||||
export const getAfterSaleTraces = (sn, params) => {
|
||||
return getRequest(`/afterSale/getDeliveryTraces/${sn}`, params);
|
||||
return getRequest(`/order/afterSale/getDeliveryTraces/${sn}`, params);
|
||||
};
|
||||
//获取发票列表
|
||||
export const getReceiptPage = params => {
|
||||
return getRequest(`/receipt`, params);
|
||||
return getRequest(`/trade/receipt`, params);
|
||||
};
|
||||
|
||||
//获取发票列表
|
||||
export const invoicing = id => {
|
||||
return postRequest(`receipt/${id}/invoicing`);
|
||||
return postRequest(`/trade/receipt/${id}/invoicing`);
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
*/
|
||||
export const setHomeSetup = params => {
|
||||
|
||||
return postRequest("/pageData/add", params);
|
||||
return postRequest("/other/pageData/add", params);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -25,7 +25,7 @@ export const setHomeSetup = params => {
|
||||
*/
|
||||
export const getHomeData = params => {
|
||||
|
||||
return getRequest(`/pageData/${params}`);
|
||||
return getRequest(`/other/pageData/${params}`);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -80,19 +80,19 @@ export const updateArticleCategory = (params, id) => {
|
||||
}
|
||||
//文章添加
|
||||
export const saveArticle = (params) => {
|
||||
return postRequest('/article', params)
|
||||
return postRequest('/other/article', params)
|
||||
}
|
||||
//文章修改
|
||||
export const updateArticle = (params) => {
|
||||
return putRequest(`/article/update/${params.id}`, params)
|
||||
return putRequest(`/other/article/update/${params.id}`, params)
|
||||
}
|
||||
//查看文章
|
||||
export const seeArticle = (id) => {
|
||||
return getRequest(`/article/${id}`)
|
||||
return getRequest(`/other/article/${id}`)
|
||||
}
|
||||
//获取文章列表数据
|
||||
export const getArticle = (params) => {
|
||||
return getRequest('/article/getByPage', params)
|
||||
return getRequest('/other/article/getByPage', params)
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ export const getArticle = (params) => {
|
||||
|
||||
//删除文章数据
|
||||
export const delArticle = (ids) => {
|
||||
return deleteRequest(`/article/delByIds/${ids}`)
|
||||
return deleteRequest(`/other/article/delByIds/${ids}`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,107 +14,107 @@ export const getShopListData = (params) => {
|
||||
}
|
||||
// 获取结算单分页
|
||||
export const getBillPage = (params) => {
|
||||
return getRequest(`/bill/getByPage`, params)
|
||||
return getRequest(`/order/bill/getByPage`, params)
|
||||
}
|
||||
|
||||
// 获取商家结算单流水分页
|
||||
export const getSellerFlow = (id, params) => {
|
||||
return getRequest(`/bill/${id}/getStoreFlow`, params)
|
||||
return getRequest(`/order/bill/${id}/getStoreFlow`, params)
|
||||
}
|
||||
|
||||
// 商家核对结算单
|
||||
export const reconciliation = (id, params) => {
|
||||
return putRequest(`/bill/check/${id}/`, params)
|
||||
return putRequest(`/order/bill/check/${id}/`, params)
|
||||
}
|
||||
|
||||
// 获取商家分销订单流水分页
|
||||
export const getDistributionFlow = (id, params) => {
|
||||
return getRequest(`/bill/${id}/getDistributionFlow`, params)
|
||||
return getRequest(`/order/bill/${id}/getDistributionFlow`, params)
|
||||
}
|
||||
|
||||
// 获取商家结算单详细
|
||||
export const getBillDetail = (id, params) => {
|
||||
return getRequest(`/bill/get/${id}`, params)
|
||||
return getRequest(`/order/bill/get/${id}`, params)
|
||||
}
|
||||
|
||||
// 获取所有物流公司
|
||||
export const getLogistics = (id, params) => {
|
||||
return getRequest(`/logistics`, params)
|
||||
return getRequest(`/other/logistics`, params)
|
||||
}
|
||||
|
||||
// 开启物流公司
|
||||
export const logisticsChecked = (id, params) => {
|
||||
return postRequest(`/logistics/${id}`, params)
|
||||
return postRequest(`/other/logistics/${id}`, params)
|
||||
}
|
||||
|
||||
// 关闭开启物流公司
|
||||
export const logisticsUnChecked = (id, params) => {
|
||||
return deleteRequest(`/logistics/${id}`, params)
|
||||
return deleteRequest(`/other/logistics/${id}`, params)
|
||||
}
|
||||
// 获取商家自提点
|
||||
export const getShopAddress = (id, params) => {
|
||||
return getRequest(`/storeAddress/`, params)
|
||||
return getRequest(`/member/storeAddress/`, params)
|
||||
}
|
||||
|
||||
// 修改商家自提点
|
||||
export const editShopAddress = (id, params) => {
|
||||
return putRequest(`/storeAddress/${id}`, params)
|
||||
return putRequest(`/member/storeAddress/${id}`, params)
|
||||
}
|
||||
|
||||
// 添加商品自提点
|
||||
export const addShopAddress = (params) => {
|
||||
return postRequest(`/storeAddress/`, params)
|
||||
return postRequest(`/member/storeAddress/`, params)
|
||||
}
|
||||
|
||||
// 添加商品自提点
|
||||
export const deleteShopAddress = (id) => {
|
||||
return deleteRequest(`/storeAddress/${id}`)
|
||||
return deleteRequest(`/member/storeAddress/${id}`)
|
||||
}
|
||||
|
||||
// 获取商家详细信息
|
||||
export const getShopInfo = () => {
|
||||
return getRequest(`/settings`)
|
||||
return getRequest(`/settings/storeSettings`)
|
||||
}
|
||||
|
||||
// 保存商家详细信息
|
||||
export const saveShopInfo = (params) => {
|
||||
return putRequest(`/settings`, params)
|
||||
return putRequest(`/settings/storeSettings`, params)
|
||||
}
|
||||
|
||||
//获取商家退货地址
|
||||
export const getRefundGoodsAddress = () => {
|
||||
return getRequest(`/settings/storeAfterSaleAddress`)
|
||||
return getRequest(`/settings/storeSettings/storeAfterSaleAddress`)
|
||||
}
|
||||
//修改商家退货地址
|
||||
export const saveRefundGoodsAddress = (params) => {
|
||||
return putRequest(`/settings/storeAfterSaleAddress`, params)
|
||||
return putRequest(`/settings/storeSettings/storeAfterSaleAddress`, params)
|
||||
}
|
||||
//修改im商户id
|
||||
export const updatEmerchantId = (params) => {
|
||||
return putRequest(`/settings/merchantEuid`, params)
|
||||
return putRequest(`/settings/storeSettings/merchantEuid`, params)
|
||||
}
|
||||
|
||||
|
||||
//修改保存库存预警数
|
||||
export const updateStockWarning = (params) => {
|
||||
return putRequest(`/settings/updateStockWarning`, params)
|
||||
return putRequest(`/settings/storeSettings/updateStockWarning`, params)
|
||||
}
|
||||
//查询运费模板
|
||||
export const getShipTemplate = () => {
|
||||
return getRequest(`/freightTemplate`)
|
||||
return getRequest(`/setting/freightTemplate`)
|
||||
}
|
||||
//删除运费模板
|
||||
export const deleteShipTemplate = (id) => {
|
||||
return deleteRequest(`/freightTemplate/${id}`)
|
||||
return deleteRequest(`/setting/freightTemplate/${id}`)
|
||||
}
|
||||
//新增运费模板
|
||||
export const addShipTemplate = (params, headers) => {
|
||||
return postRequest(`/freightTemplate`, params, headers)
|
||||
return postRequest(`/setting/freightTemplate`, params, headers)
|
||||
}
|
||||
|
||||
//新增运费模板
|
||||
export const editShipTemplate = (id, params, headers) => {
|
||||
return putRequest(`/freightTemplate/${id}`, params, headers)
|
||||
return putRequest(`/setting/freightTemplate/${id}`, params, headers)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@ module.exports = {
|
||||
title: "lilishop", //配置显示在浏览器标签的title
|
||||
aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key
|
||||
website: "https://www.pickmall.cn", //官网地址
|
||||
enableCDN: true, //生产环境 是否启用cdn加载 vue等js
|
||||
port:10002, //端口
|
||||
enableCDN: false, //生产环境 是否启用cdn加载 vue等js
|
||||
port: 10002, //端口
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ export const commonUrl =
|
||||
? BASE.API_DEV.common
|
||||
: BASE.API_PROD.common;
|
||||
// 文件上传接口
|
||||
export const uploadFile = commonUrl + "/common/upload/file";
|
||||
export const uploadFile = commonUrl + "/common/common/upload/file";
|
||||
var isRefreshToken = 0;
|
||||
const refreshToken = getTokenDebounce();
|
||||
const service = axios.create({
|
||||
|
||||
@@ -2,24 +2,52 @@
|
||||
<div class="search">
|
||||
<Card>
|
||||
<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">
|
||||
<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 label="状态" prop="status">
|
||||
<Select v-model="searchForm.marketEnable" placeholder="请选择" clearable style="width: 200px">
|
||||
<Select
|
||||
v-model="searchForm.marketEnable"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option value="DOWN">下架</Option>
|
||||
<Option value="UPPER">上架</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="商品类型" prop="status">
|
||||
<Select v-model="searchForm.goodsType" placeholder="请选择" clearable style="width: 200px">
|
||||
<Select
|
||||
v-model="searchForm.goodsType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option value="PHYSICAL_GOODS">实物商品</Option>
|
||||
<Option value="VIRTUAL_GOODS">虚拟商品</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="商品编号" prop="sn">
|
||||
<Input type="text" v-model="searchForm.id" placeholder="商品编号" clearable style="width: 200px" />
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.id"
|
||||
placeholder="商品编号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
|
||||
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||
@@ -41,40 +69,82 @@
|
||||
</Dropdown>
|
||||
</Row>
|
||||
|
||||
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
|
||||
<Table
|
||||
class="mt_10"
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="goodsSlot" slot-scope="{row}">
|
||||
<div style="margin-top: 5px;height: 90px; display: flex;">
|
||||
<template slot="goodsSlot" slot-scope="{ row }">
|
||||
<div style="margin-top: 5px; height: 90px; display: flex">
|
||||
<div style="">
|
||||
<img :src="row.original" style="height: 80px;margin-top: 3px;width: 70px">
|
||||
<img
|
||||
:src="row.original"
|
||||
style="height: 80px; margin-top: 3px; width: 70px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style="margin-left: 13px;">
|
||||
<div style="margin-left: 13px">
|
||||
<div class="div-zoom">
|
||||
<a @click="linkTo(row.id,row.skuId)">{{ row.goodsName }}</a>
|
||||
<a @click="linkTo(row.id, row.skuId)">{{ row.goodsName }}</a>
|
||||
</div>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<!-- <vueQr>123</vueQr> -->
|
||||
<vue-qr :text="wapLinkTo(row.id,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
<vue-qr
|
||||
:text="wapLinkTo(row.id, row.skuId)"
|
||||
:margin="0"
|
||||
colorDark="#000"
|
||||
colorLight="#fff"
|
||||
:size="150"
|
||||
></vue-qr>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<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"
|
||||
show-total show-elevator show-sizer></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"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500">
|
||||
<Modal
|
||||
title="更新库存"
|
||||
v-model="updateStockModalVisible"
|
||||
:mask-closable="false"
|
||||
:width="500"
|
||||
>
|
||||
<Tabs value="updateStock">
|
||||
<TabPane label="手动规格更新" name="updateStock">
|
||||
<Table class="mt_10" :columns="updateStockColumns" :data="stockList" border ></Table>
|
||||
<Table
|
||||
class="mt_10"
|
||||
:columns="updateStockColumns"
|
||||
:data="stockList"
|
||||
border
|
||||
></Table>
|
||||
</TabPane>
|
||||
<TabPane label="批量规格更新" name="stockAll">
|
||||
<Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" />
|
||||
@@ -88,11 +158,17 @@
|
||||
</Modal>
|
||||
|
||||
<!-- 批量设置物流模板 -->
|
||||
<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">
|
||||
<FormItem class="form-item-view-el" label="物流模板" prop="templateId">
|
||||
<Select v-model="shipTemplateForm.templateId" style="width: 200px">
|
||||
<Option v-for="item in logisticsTemplate" :value="item.id" :key="item.id">{{ item.name }}
|
||||
<Option v-for="item in logisticsTemplate" :value="item.id" :key="item.id"
|
||||
>{{ item.name }}
|
||||
</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
@@ -113,12 +189,11 @@ import {
|
||||
upGoods,
|
||||
lowGoods,
|
||||
deleteGoods,
|
||||
batchShipTemplate
|
||||
batchShipTemplate,
|
||||
} from "@/api/goods";
|
||||
import * as API_Shop from "@/api/shops";
|
||||
|
||||
export default {
|
||||
|
||||
name: "goods",
|
||||
data() {
|
||||
return {
|
||||
@@ -160,11 +235,11 @@ export default {
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.authFlag == "TOBEAUDITED") {
|
||||
return h("Tag", {props: {color: "blue",},},"待审核");
|
||||
return h("Tag", { props: { color: "blue" } }, "待审核");
|
||||
} else if (params.row.authFlag == "PASS") {
|
||||
return h("Tag", {props: {color: "green",},},"通过");
|
||||
return h("Tag", { props: { color: "green" } }, "通过");
|
||||
} else if (params.row.authFlag == "REFUSE") {
|
||||
return h("Tag", {props: {color: "red",},},"审核拒绝");
|
||||
return h("Tag", { props: { color: "red" } }, "审核拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -216,12 +291,12 @@ export default {
|
||||
key: "goodsType",
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.goodsType === 'PHYSICAL_GOODS') {
|
||||
return h("Tag", {props: {color: "geekblue"}},"实物商品");
|
||||
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
|
||||
return h("Tag", {props: {color: "purple"}},"虚拟商品");
|
||||
if (params.row.goodsType === "PHYSICAL_GOODS") {
|
||||
return h("Tag", { props: { color: "geekblue" } }, "实物商品");
|
||||
} else if (params.row.goodsType === "VIRTUAL_GOODS") {
|
||||
return h("Tag", { props: { color: "purple" } }, "虚拟商品");
|
||||
} else {
|
||||
return h("Tag", {props: {color: "cyan"}},"电子卡券");
|
||||
return h("Tag", { props: { color: "cyan" } }, "电子卡券");
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -230,10 +305,7 @@ export default {
|
||||
key: "price",
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.price, "¥")
|
||||
);
|
||||
return h("div", this.$options.filters.unitPrice(params.row.price, "¥"));
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -254,11 +326,11 @@ export default {
|
||||
width: 120,
|
||||
render: (h, params) => {
|
||||
if (params.row.authFlag == "PASS") {
|
||||
return h("Tag", {props: {color: "green"}},"通过");
|
||||
return h("Tag", { props: { color: "green" } }, "通过");
|
||||
} else if (params.row.authFlag == "TOBEAUDITED") {
|
||||
return h("Tag", {props: {color: "volcano"}},"待审核");
|
||||
return h("Tag", { props: { color: "volcano" } }, "待审核");
|
||||
} else if (params.row.authFlag == "REFUSE") {
|
||||
return h("Tag", {props: {color: "red"}},"审核拒绝");
|
||||
return h("Tag", { props: { color: "red" } }, "审核拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -269,9 +341,9 @@ export default {
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.marketEnable == "DOWN") {
|
||||
return h("Tag", {props: {color: "red"}},"下架");
|
||||
return h("Tag", { props: { color: "red" } }, "下架");
|
||||
} else if (params.row.marketEnable == "UPPER") {
|
||||
return h("Tag", {props: {color: "green"}},"上架");
|
||||
return h("Tag", { props: { color: "green" } }, "上架");
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -371,7 +443,8 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() { // 初始化数据
|
||||
init() {
|
||||
// 初始化数据
|
||||
this.getDataList();
|
||||
},
|
||||
// 添加商品
|
||||
@@ -425,6 +498,7 @@ export default {
|
||||
if (res.success) {
|
||||
this.updateStockModalVisible = false;
|
||||
this.$Message.success("更新库存成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -466,8 +540,7 @@ export default {
|
||||
saveShipTemplate() {
|
||||
this.$Modal.confirm({
|
||||
title: "确认设置物流模板",
|
||||
content:
|
||||
"您确认要设置所选的 " + this.selectCount + " 个商品的物流模板?",
|
||||
content: "您确认要设置所选的 " + this.selectCount + " 个商品的物流模板?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = [];
|
||||
@@ -493,7 +566,7 @@ export default {
|
||||
this.$Message.warning("您还未选择要设置物流模板的商品");
|
||||
return;
|
||||
}
|
||||
this.getShipTempList()
|
||||
this.getShipTempList();
|
||||
let data = [];
|
||||
this.selectList.forEach(function (e) {
|
||||
data.push(e.id);
|
||||
@@ -514,12 +587,12 @@ export default {
|
||||
});
|
||||
},
|
||||
// 获取物流模板
|
||||
getShipTempList () {
|
||||
getShipTempList() {
|
||||
API_Shop.getShipTemplate().then((res) => {
|
||||
if (res.success) {
|
||||
this.logisticsTemplate = res.result;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//下架商品
|
||||
lower(v) {
|
||||
|
||||
@@ -3,9 +3,14 @@
|
||||
<!-- 选择商品类型 -->
|
||||
<Modal v-model="selectGoodsType" width="550" :closable="false">
|
||||
<div class="goods-type-list" v-if="!showGoodsTemplates">
|
||||
<div class="goods-type-item" :class="{'active-goods-type':item.check}" @click="handleClickGoodsType(item)"
|
||||
v-for="(item,index) in goodsTypeWay" :key="index">
|
||||
<img :src="item.img"/>
|
||||
<div
|
||||
class="goods-type-item"
|
||||
:class="{ 'active-goods-type': item.check }"
|
||||
@click="handleClickGoodsType(item)"
|
||||
v-for="(item, index) in goodsTypeWay"
|
||||
:key="index"
|
||||
>
|
||||
<img :src="item.img" />
|
||||
<div>
|
||||
<h2>{{ item.title }}</h2>
|
||||
<p>{{ item.desc }}</p>
|
||||
@@ -14,12 +19,16 @@
|
||||
</div>
|
||||
<div v-else class="goods-type-list">
|
||||
<h2 @click="showGoodsTemplates = !showGoodsTemplates">返回</h2>
|
||||
<div class="goods-type-item template-item" @click="handleClickGoodsTemplate(item)"
|
||||
v-for="(item,tempIndex) in goodsTemplates" :key="tempIndex">
|
||||
<div
|
||||
class="goods-type-item template-item"
|
||||
@click="handleClickGoodsTemplate(item)"
|
||||
v-for="(item, tempIndex) in goodsTemplates"
|
||||
:key="tempIndex"
|
||||
>
|
||||
<img :src="item.thumbnail" />
|
||||
<div>
|
||||
<h2>{{ item.goodsName }}</h2>
|
||||
<p>{{ item.sellingPoint || '' }}</p>
|
||||
<p>{{ item.sellingPoint || "" }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,22 +37,34 @@
|
||||
<div class="content-goods-publish">
|
||||
<div class="goods-category">
|
||||
<ul v-if="categoryListLevel1.length > 0">
|
||||
<li v-for="(item, index) in categoryListLevel1" :class="{ activeClass: category[0].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 1)" :key="index">
|
||||
<li
|
||||
v-for="(item, index) in categoryListLevel1"
|
||||
:class="{ activeClass: category[0].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 1)"
|
||||
:key="index"
|
||||
>
|
||||
<span>{{ item.name }}</span>
|
||||
<span>></span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="categoryListLevel2.length > 0">
|
||||
<li v-for="(item, index) in categoryListLevel2" :class="{ activeClass: category[1].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 2)" :key="index">
|
||||
<li
|
||||
v-for="(item, index) in categoryListLevel2"
|
||||
:class="{ activeClass: category[1].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 2)"
|
||||
:key="index"
|
||||
>
|
||||
<span>{{ item.name }}</span>
|
||||
<span>></span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="categoryListLevel3.length > 0">
|
||||
<li v-for="(item, index) in categoryListLevel3" :class="{ activeClass: category[2].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 3)" :key="index">
|
||||
<li
|
||||
v-for="(item, index) in categoryListLevel3"
|
||||
:class="{ activeClass: category[2].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 3)"
|
||||
:key="index"
|
||||
>
|
||||
<span>{{ item.name }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -55,7 +76,7 @@
|
||||
<span v-show="category[2].name">> {{ category[2].name }}</span>
|
||||
</p>
|
||||
<template v-if="selectedTemplate.goodsName">
|
||||
<Divider>已选商品模版:{{selectedTemplate.goodsName}}</Divider>
|
||||
<Divider>已选商品模版:{{ selectedTemplate.goodsName }}</Divider>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 底部按钮 -->
|
||||
@@ -100,19 +121,19 @@ export default {
|
||||
],
|
||||
// 商品分类选择数组
|
||||
category: [
|
||||
{name: '', id: ''},
|
||||
{name: '', id: ''},
|
||||
{name: '', id: ''}
|
||||
{ name: "", id: "" },
|
||||
{ name: "", id: "" },
|
||||
{ name: "", id: "" },
|
||||
],
|
||||
// 商品类型
|
||||
goodsType: '',
|
||||
goodsType: "",
|
||||
/** 1级分类列表*/
|
||||
categoryListLevel1: [],
|
||||
/** 2级分类列表*/
|
||||
categoryListLevel2: [],
|
||||
/** 3级分类列表*/
|
||||
categoryListLevel3: [],
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 点击商品类型
|
||||
@@ -123,26 +144,25 @@ export default {
|
||||
|
||||
val.check = !val.check;
|
||||
if (!val.type) {
|
||||
this.GET_GoodsTemplate()
|
||||
this.GET_GoodsTemplate();
|
||||
this.showGoodsTemplates = true;
|
||||
} else {
|
||||
this.goodsType = val.type;
|
||||
this.selectedTemplate = {}
|
||||
this.selectedTemplate = {};
|
||||
}
|
||||
},
|
||||
// 点击商品模板
|
||||
handleClickGoodsTemplate(val) {
|
||||
console.log(val);
|
||||
this.selectedTemplate = val;
|
||||
this.selectGoodsType = false;
|
||||
this.$emit('change', {tempId: val.id})
|
||||
this.$emit("change", { tempId: val.id });
|
||||
},
|
||||
// 获取商品模板
|
||||
GET_GoodsTemplate() {
|
||||
let searchParams = {
|
||||
saveType: "TEMPLATE",
|
||||
sort: "create_time",
|
||||
order: "desc"
|
||||
order: "desc",
|
||||
};
|
||||
API_GOODS.getDraftGoodsListData(searchParams).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -153,10 +173,9 @@ export default {
|
||||
/** 选择商城商品分类 */
|
||||
handleSelectCategory(row, index, level) {
|
||||
if (level === 1) {
|
||||
this.category.forEach(cate => {
|
||||
cate.name = '',
|
||||
cate.id = ''
|
||||
})
|
||||
this.category.forEach((cate) => {
|
||||
(cate.name = ""), (cate.id = "");
|
||||
});
|
||||
this.category[0].name = row.name;
|
||||
this.category[0].id = row.id;
|
||||
this.categoryListLevel2 = this.categoryListLevel1[index].children;
|
||||
@@ -164,12 +183,12 @@ export default {
|
||||
} else if (level === 2) {
|
||||
this.category[1].name = row.name;
|
||||
this.category[1].id = row.id;
|
||||
this.category[2].name = '';
|
||||
this.category[2].id = '';
|
||||
this.category[2].name = "";
|
||||
this.category[2].id = "";
|
||||
this.categoryListLevel3 = this.categoryListLevel2[index].children;
|
||||
} else {
|
||||
this.category[2].name = row.name
|
||||
this.category[2].id = row.id
|
||||
this.category[2].name = row.name;
|
||||
this.category[2].id = row.id;
|
||||
}
|
||||
},
|
||||
/** 查询下一级 商城商品分类*/
|
||||
@@ -185,8 +204,8 @@ export default {
|
||||
next() {
|
||||
window.scrollTo(0, 0);
|
||||
if (!this.goodsType && !this.selectedTemplate.goodsName) {
|
||||
this.$Message.error('请选择商品类型')
|
||||
return
|
||||
this.$Message.error("请选择商品类型");
|
||||
return;
|
||||
}
|
||||
if (!this.category[0].name) {
|
||||
this.$Message.error("请选择商品分类");
|
||||
@@ -196,19 +215,18 @@ export default {
|
||||
return;
|
||||
} else if (this.category[2].name) {
|
||||
if (this.selectedTemplate.id) {
|
||||
this.$emit('change',{tempId: this.selectedTemplate.id})
|
||||
this.$emit("change", { tempId: this.selectedTemplate.id });
|
||||
} else {
|
||||
this.$emit('change',{category: this.category,goodsType:this.goodsType})
|
||||
this.$emit("change", { category: this.category, goodsType: this.goodsType });
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.GET_NextLevelCategory()
|
||||
|
||||
}
|
||||
}
|
||||
mounted() {
|
||||
this.GET_NextLevelCategory();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./addGoods.scss";
|
||||
</style>
|
||||
@import "./addGoods.scss";
|
||||
</style>
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="商品品牌" prop="brandId">
|
||||
<Select v-model="baseInfoForm.brandId" filterable style="width: 200px">
|
||||
<Select
|
||||
v-model="baseInfoForm.brandId"
|
||||
filterable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option
|
||||
v-for="item in brandList"
|
||||
:value="item.id"
|
||||
@@ -57,14 +61,25 @@
|
||||
</div>
|
||||
<h4>商品交易信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem class="form-item-view-el" label="计量单位" prop="goodsUnit">
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="计量单位"
|
||||
prop="goodsUnit"
|
||||
>
|
||||
<Select v-model="baseInfoForm.goodsUnit" style="width: 100px">
|
||||
<Option v-for="(unit, i) in goodsUnitList" :key="i" :value="unit"
|
||||
<Option
|
||||
v-for="(unit, i) in goodsUnitList"
|
||||
:key="i"
|
||||
:value="unit"
|
||||
>{{ unit }}
|
||||
</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
<FormItem class="form-item-view-el" label="销售模式" prop="salesModel">
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="销售模式"
|
||||
prop="salesModel"
|
||||
>
|
||||
<RadioGroup
|
||||
type="button"
|
||||
v-if="baseInfoForm.goodsType != 'VIRTUAL_GOODS'"
|
||||
@@ -94,7 +109,10 @@
|
||||
prop="goodsGalleryFiles"
|
||||
>
|
||||
<div style="display: flex; flex-wrap: flex-start">
|
||||
<vuedraggable :list="baseInfoForm.goodsGalleryFiles" :animation="200">
|
||||
<vuedraggable
|
||||
:list="baseInfoForm.goodsGalleryFiles"
|
||||
:animation="200"
|
||||
>
|
||||
<div
|
||||
class="demo-upload-list"
|
||||
v-for="(item, __index) in baseInfoForm.goodsGalleryFiles"
|
||||
@@ -163,12 +181,15 @@
|
||||
<Button
|
||||
type="primary"
|
||||
slot="extra"
|
||||
@click="handleCloseSkuItem($index)"
|
||||
@click="handleCloseSkuItem(item, $index)"
|
||||
>
|
||||
删除规格
|
||||
</Button>
|
||||
<div>
|
||||
<FormItem label="规格名" class="sku-item-content-val flex">
|
||||
<Form :model="item" class="flex">
|
||||
<FormItem
|
||||
label="规格名"
|
||||
class="sku-item-content-val flex"
|
||||
>
|
||||
<AutoComplete
|
||||
style="width: 150px"
|
||||
v-model="item.name"
|
||||
@@ -176,11 +197,11 @@
|
||||
placeholder="请输入规格项名称"
|
||||
:filter-method="filterMethod"
|
||||
:data="skuData"
|
||||
@on-change="editSkuItem"
|
||||
@on-change="handleSkuTitle($event, $index)"
|
||||
>
|
||||
</AutoComplete>
|
||||
</FormItem>
|
||||
</div>
|
||||
</Form>
|
||||
<div class="flex sku-val">
|
||||
<Form :model="item" class="flex">
|
||||
<!--规格值文本列表-->
|
||||
@@ -200,7 +221,14 @@
|
||||
:filter-method="filterMethod"
|
||||
:data="skuVal"
|
||||
@on-focus="changeSkuVals(item.name)"
|
||||
@on-change="skuValueChange(val.value, $index, item)"
|
||||
@on-change="
|
||||
handleSkuValue(
|
||||
val.value,
|
||||
$index,
|
||||
val,
|
||||
index
|
||||
)
|
||||
"
|
||||
>
|
||||
</AutoComplete>
|
||||
<Button
|
||||
@@ -215,7 +243,9 @@
|
||||
</Form>
|
||||
</div>
|
||||
<div>
|
||||
<Button @click="addSpec($index, item)">添加规格值</Button>
|
||||
<Button @click="addSpec($index, item)"
|
||||
>添加规格值</Button
|
||||
>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
@@ -233,9 +263,97 @@
|
||||
规格详细
|
||||
<div slot="content">
|
||||
<div slot="content">
|
||||
<ul class="flex sku-ul">
|
||||
<li
|
||||
v-for="(item, index) in skuTableColumn"
|
||||
:key="index"
|
||||
>
|
||||
{{ item.title }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div
|
||||
class="mt_10 flex sku-editor"
|
||||
v-for="(item, index) in skuTableData"
|
||||
:key="index"
|
||||
>
|
||||
<div
|
||||
v-for="(spec, specIndex) in skuTableColumn.filter(
|
||||
(val) => {
|
||||
return val.key;
|
||||
}
|
||||
)"
|
||||
:key="specIndex"
|
||||
>
|
||||
{{
|
||||
skuTableData[index][
|
||||
spec.title || spec.key || spec.___key
|
||||
]
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
skuTableColumn.find((val) => {
|
||||
return val.slot == 'weight';
|
||||
})
|
||||
"
|
||||
>
|
||||
<Input
|
||||
clearable
|
||||
:min="0"
|
||||
v-model="item.weight"
|
||||
placeholder="请输入重量"
|
||||
@on-change="updateSkuTable(item, 'weight', index)"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Input
|
||||
clearable
|
||||
v-model="item.sn"
|
||||
placeholder="请输入货号"
|
||||
@on-change="updateSkuTable(item, 'sn', index)"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<InputNumber
|
||||
clearable
|
||||
class="input-number"
|
||||
:min="0"
|
||||
v-model="item.quantity"
|
||||
placeholder="请输入库存"
|
||||
@on-change="updateSkuTable(item, 'quantity', index)"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<InputNumber
|
||||
clearable
|
||||
class="input-number"
|
||||
:min="0"
|
||||
v-model="item.cost"
|
||||
placeholder="请输入成本价"
|
||||
@on-change="updateSkuTable(item, 'cost', index)"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<InputNumber
|
||||
class="input-number"
|
||||
clearable
|
||||
:min="0"
|
||||
v-model="item.price"
|
||||
placeholder="请输入价格"
|
||||
@on-change="updateSkuTable(item, 'price', index)"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Button @click="editSkuPicture(item)"
|
||||
>编辑图片</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- #TODO 此处有待优化 -->
|
||||
<Table
|
||||
class="mt_10"
|
||||
<!-- <Table
|
||||
:columns="skuTableColumn"
|
||||
:data="skuTableData"
|
||||
style="
|
||||
@@ -291,76 +409,82 @@
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="images">
|
||||
<Button @click="editSkuPicture(row)">编辑图片</Button>
|
||||
<Modal
|
||||
v-model="showSkuPicture"
|
||||
:styles="{ top: '30px' }"
|
||||
class-name="sku-preview-modal"
|
||||
title="编辑图片"
|
||||
ok-text="结束编辑"
|
||||
@on-ok="updateSkuPicture()"
|
||||
cancel-text="取消"
|
||||
>
|
||||
<div class="preview-picture">
|
||||
<img v-if="previewPicture !== ''" :src="previewPicture" />
|
||||
</div>
|
||||
<Divider />
|
||||
<vuedraggable
|
||||
:list="selectedSku.images"
|
||||
:animation="200"
|
||||
style="display: inline-block"
|
||||
>
|
||||
<div
|
||||
class="sku-upload-list"
|
||||
v-for="(img, __index) in selectedSku.images"
|
||||
:key="__index"
|
||||
>
|
||||
<template>
|
||||
<img :src="img.url" />
|
||||
<div class="sku-upload-list-cover">
|
||||
<Icon
|
||||
type="md-search"
|
||||
@click="handleView(img.url)"
|
||||
></Icon>
|
||||
<Icon
|
||||
type="md-trash"
|
||||
@click="handleRemove(img, __index)"
|
||||
></Icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</vuedraggable>
|
||||
<Upload
|
||||
ref="uploadSku"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:format="['jpg', 'jpeg', 'png']"
|
||||
:on-format-error="handleFormatError"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
:max-size="1024"
|
||||
:before-upload="handleBeforeUpload"
|
||||
multiple
|
||||
type="drag"
|
||||
:action="uploadFileUrl"
|
||||
:headers="{ ...accessToken }"
|
||||
style="display: inline-block; width: 58px"
|
||||
>
|
||||
<div>
|
||||
<Icon type="ios-camera" size="55"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
</Modal>
|
||||
|
||||
</template>
|
||||
</Table>
|
||||
</Table> -->
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
</Collapse>
|
||||
</div>
|
||||
|
||||
<Modal
|
||||
v-model="showSkuPicture"
|
||||
:styles="{ top: '30px' }"
|
||||
class-name="sku-preview-modal"
|
||||
title="编辑图片"
|
||||
ok-text="结束编辑"
|
||||
@on-ok="updateSkuPicture()"
|
||||
cancel-text="取消"
|
||||
>
|
||||
<div class="preview-picture">
|
||||
<img v-if="previewPicture !== ''" :src="previewPicture" />
|
||||
</div>
|
||||
<Divider />
|
||||
<vuedraggable
|
||||
:list="selectedSku.images"
|
||||
:animation="200"
|
||||
style="display: inline-block"
|
||||
>
|
||||
<div
|
||||
class="sku-upload-list"
|
||||
v-for="(img, __index) in selectedSku.images"
|
||||
:key="__index"
|
||||
>
|
||||
<template>
|
||||
<img :src="img.url" />
|
||||
<div class="sku-upload-list-cover">
|
||||
<Icon
|
||||
type="md-search"
|
||||
@click="handleView(img.url)"
|
||||
></Icon>
|
||||
<Icon
|
||||
type="md-trash"
|
||||
@click="handleRemove(img, __index)"
|
||||
></Icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</vuedraggable>
|
||||
<Upload
|
||||
ref="uploadSku"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:format="['jpg', 'jpeg', 'png']"
|
||||
:on-format-error="handleFormatError"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
:max-size="1024"
|
||||
:before-upload="handleBeforeUpload"
|
||||
multiple
|
||||
type="drag"
|
||||
:action="uploadFileUrl"
|
||||
:headers="{ ...accessToken }"
|
||||
style="display: inline-block; width: 58px"
|
||||
>
|
||||
<div>
|
||||
<Icon type="ios-camera" size="55"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
</Modal>
|
||||
</div>
|
||||
<h4>商品详情描述</h4>
|
||||
<div class="form-item-view">
|
||||
<div class="tree-bar">
|
||||
<FormItem class="form-item-view-el" label="店内分类" prop="shopCategory">
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="店内分类"
|
||||
prop="shopCategory"
|
||||
>
|
||||
<Tree
|
||||
ref="tree"
|
||||
style="text-align: left"
|
||||
@@ -375,14 +499,25 @@
|
||||
<FormItem class="form-item-view-el" label="商品描述" prop="intro">
|
||||
<editor eid="intro" v-model="baseInfoForm.intro"></editor>
|
||||
</FormItem>
|
||||
<FormItem class="form-item-view-el" label="移动端描述" prop="skuList">
|
||||
<editor eid="mobileIntro" v-model="baseInfoForm.mobileIntro"></editor>
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="移动端描述"
|
||||
prop="skuList"
|
||||
>
|
||||
<editor
|
||||
eid="mobileIntro"
|
||||
v-model="baseInfoForm.mobileIntro"
|
||||
></editor>
|
||||
</FormItem>
|
||||
</div>
|
||||
<div v-if="baseInfoForm.goodsType != 'VIRTUAL_GOODS'">
|
||||
<h4>商品物流信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem class="form-item-view-el" label="物流模板" prop="templateId">
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="物流模板"
|
||||
prop="templateId"
|
||||
>
|
||||
<Select v-model="baseInfoForm.templateId" style="width: 200px">
|
||||
<Option
|
||||
v-for="item in logisticsTemplate"
|
||||
@@ -395,7 +530,11 @@
|
||||
</div>
|
||||
<h4>其他信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem class="form-item-view-el" label="商品发布" prop="release">
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="商品发布"
|
||||
prop="release"
|
||||
>
|
||||
<RadioGroup
|
||||
type="button"
|
||||
button-style="solid"
|
||||
@@ -409,7 +548,11 @@
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem class="form-item-view-el" label="商品推荐" prop="skuList">
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="商品推荐"
|
||||
prop="skuList"
|
||||
>
|
||||
<RadioGroup
|
||||
type="button"
|
||||
button-style="solid"
|
||||
@@ -656,6 +799,7 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 选择参数
|
||||
@@ -674,14 +818,15 @@ export default {
|
||||
};
|
||||
}
|
||||
//赋予分组id、分组名称
|
||||
this.baseInfoForm.goodsParamsDTOList[groupIndex].groupId = paramsGroup.groupId;
|
||||
this.baseInfoForm.goodsParamsDTOList[groupIndex].groupName = paramsGroup.groupName;
|
||||
this.baseInfoForm.goodsParamsDTOList[groupIndex].groupId =
|
||||
paramsGroup.groupId;
|
||||
this.baseInfoForm.goodsParamsDTOList[groupIndex].groupName =
|
||||
paramsGroup.groupName;
|
||||
|
||||
//参数详细为空,则赋予
|
||||
if (
|
||||
!this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[
|
||||
paramsIndex
|
||||
]
|
||||
!this.baseInfoForm.goodsParamsDTOList[groupIndex]
|
||||
.goodsParamsItemDTOList[paramsIndex]
|
||||
) {
|
||||
this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[
|
||||
paramsIndex
|
||||
@@ -707,7 +852,8 @@ export default {
|
||||
},
|
||||
// 编辑sku图片
|
||||
editSkuPicture(row) {
|
||||
if (row.images && row.images.length > 0) {
|
||||
console.log(row);
|
||||
if (row.images && row.images.length) {
|
||||
this.previewPicture = row.images[0].url;
|
||||
}
|
||||
this.selectedSku = row;
|
||||
@@ -724,7 +870,9 @@ export default {
|
||||
},
|
||||
// 移除已选图片
|
||||
handleRemove(item, index) {
|
||||
this.selectedSku.images = this.selectedSku.images.filter((i) => i.url !== item.url);
|
||||
this.selectedSku.images = this.selectedSku.images.filter(
|
||||
(i) => i.url !== item.url
|
||||
);
|
||||
if (this.selectedSku.images.length > 0 && index === 0) {
|
||||
this.previewPicture = this.selectedSku.images[0].url;
|
||||
} else if (this.selectedSku.images.length < 0) {
|
||||
@@ -738,9 +886,8 @@ export default {
|
||||
},
|
||||
// 移除商品图片
|
||||
handleRemoveGoodsPicture(file) {
|
||||
this.baseInfoForm.goodsGalleryFiles = this.baseInfoForm.goodsGalleryFiles.filter(
|
||||
(i) => i.url !== file.url
|
||||
);
|
||||
this.baseInfoForm.goodsGalleryFiles =
|
||||
this.baseInfoForm.goodsGalleryFiles.filter((i) => i.url !== file.url);
|
||||
},
|
||||
// 更新sku图片
|
||||
updateSkuPicture() {
|
||||
@@ -762,7 +909,6 @@ export default {
|
||||
},
|
||||
// 商品图片上传成功
|
||||
handleSuccessGoodsPicture(res, file) {
|
||||
console.log(res);
|
||||
if (file.response) {
|
||||
file.url = file.response.result;
|
||||
this.baseInfoForm.goodsGalleryFiles.push(file);
|
||||
@@ -795,7 +941,8 @@ export default {
|
||||
// sku图片上传前钩子
|
||||
handleBeforeUpload(file) {
|
||||
const check =
|
||||
this.selectedSku.images !== undefined && this.selectedSku.images.length > 5;
|
||||
this.selectedSku.images !== undefined &&
|
||||
this.selectedSku.images.length > 5;
|
||||
if (check) {
|
||||
this.$Notice.warning({ title: "图片数量不能大于五张" });
|
||||
return false;
|
||||
@@ -804,9 +951,11 @@ export default {
|
||||
|
||||
/** 查询商品品牌列表 */
|
||||
getGoodsBrandList() {
|
||||
API_GOODS.getCategoryBrandListDataSeller(this.categoryId).then((response) => {
|
||||
this.brandList = response;
|
||||
});
|
||||
API_GOODS.getCategoryBrandListDataSeller(this.categoryId).then(
|
||||
(response) => {
|
||||
this.brandList = response;
|
||||
}
|
||||
);
|
||||
},
|
||||
// 获取商品单位
|
||||
GET_GoodsUnit() {
|
||||
@@ -860,12 +1009,11 @@ export default {
|
||||
response.result.goodsGalleryList &&
|
||||
response.result.goodsGalleryList.length > 0
|
||||
) {
|
||||
this.baseInfoForm.goodsGalleryFiles = response.result.goodsGalleryList.map(
|
||||
(i) => {
|
||||
this.baseInfoForm.goodsGalleryFiles =
|
||||
response.result.goodsGalleryList.map((i) => {
|
||||
let files = { url: i };
|
||||
return files;
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
this.Get_SkuInfoByCategory(this.categoryId);
|
||||
@@ -892,12 +1040,18 @@ export default {
|
||||
cost: e.cost,
|
||||
quantity: e.quantity,
|
||||
weight: e.weight,
|
||||
// ___keys: [],
|
||||
};
|
||||
e.specList.forEach((u) => {
|
||||
if (u.specName === "images") {
|
||||
sku.images = u.specImage;
|
||||
} else {
|
||||
sku[u.specName] = u.specValue;
|
||||
// 赋值keys标识符
|
||||
// sku.___keys.push({
|
||||
// key: u.specName,
|
||||
// value: u.specValue,
|
||||
// });
|
||||
if (
|
||||
!skusInfo.some((s) => s.name === u.specName) &&
|
||||
!this.ignoreColumn.includes(u.specName)
|
||||
@@ -910,6 +1064,7 @@ export default {
|
||||
id: u.specValueId,
|
||||
name: u.specName,
|
||||
value: u.specValue || "",
|
||||
___key: u.specValue || "",
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -923,6 +1078,7 @@ export default {
|
||||
id: u.specValueId,
|
||||
name: u.specName,
|
||||
value: u.specValue || "",
|
||||
___key: u.specValue || "",
|
||||
});
|
||||
}
|
||||
if (!sk.spec_id && u.specName === "specId") {
|
||||
@@ -937,44 +1093,47 @@ export default {
|
||||
});
|
||||
this.skuInfo = skusInfo;
|
||||
this.renderTableData();
|
||||
|
||||
this.skuTableData = skus;
|
||||
},
|
||||
|
||||
/** 根据当前分类id查询商品应包含的参数 */
|
||||
GET_GoodsParams() {
|
||||
API_GOODS.getCategoryParamsListDataSeller(this.categoryId).then((response) => {
|
||||
if (!response || response.length <= 0) {
|
||||
return;
|
||||
}
|
||||
this.goodsParams = response;
|
||||
API_GOODS.getCategoryParamsListDataSeller(this.categoryId).then(
|
||||
(response) => {
|
||||
if (!response || response.length <= 0) {
|
||||
return;
|
||||
}
|
||||
this.goodsParams = response;
|
||||
|
||||
//展开选项卡
|
||||
this.goodsParams.forEach((item) => {
|
||||
this.params_panel.push(item.groupName);
|
||||
});
|
||||
if (this.baseInfoForm.goodsParamsDTOList) {
|
||||
// 已选值集合
|
||||
const paramsArr = [];
|
||||
this.baseInfoForm.goodsParamsDTOList.forEach((group) => {
|
||||
group.goodsParamsItemDTOList.forEach((param) => {
|
||||
param.groupId = group.groupId;
|
||||
paramsArr.push(param);
|
||||
});
|
||||
//展开选项卡
|
||||
this.goodsParams.forEach((item) => {
|
||||
this.params_panel.push(item.groupName);
|
||||
});
|
||||
// 循环参数分组
|
||||
this.goodsParams.forEach((parmsGroup) => {
|
||||
parmsGroup.params.forEach((param) => {
|
||||
paramsArr.forEach((arr) => {
|
||||
if (param.paramName == arr.paramName) {
|
||||
param.paramValue = arr.paramValue;
|
||||
}
|
||||
if (this.baseInfoForm.goodsParamsDTOList) {
|
||||
// 已选值集合
|
||||
const paramsArr = [];
|
||||
this.baseInfoForm.goodsParamsDTOList.forEach((group) => {
|
||||
group.goodsParamsItemDTOList.forEach((param) => {
|
||||
param.groupId = group.groupId;
|
||||
paramsArr.push(param);
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.baseInfoForm.goodsParamsDTOList = [];
|
||||
// 循环参数分组
|
||||
this.goodsParams.forEach((parmsGroup) => {
|
||||
parmsGroup.params.forEach((param) => {
|
||||
paramsArr.forEach((arr) => {
|
||||
if (param.paramName == arr.paramName) {
|
||||
param.paramValue = arr.paramValue;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.baseInfoForm.goodsParamsDTOList = [];
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
},
|
||||
/** 添加规格项 */
|
||||
addSkuItem() {
|
||||
@@ -985,18 +1144,11 @@ export default {
|
||||
// 写入对象,下标,具体对象
|
||||
this.$set(this.skuInfo, this.skuInfo.length, {
|
||||
spec_values: [],
|
||||
name: "规格名",
|
||||
name: "规格名" + (this.skuInfo.length + 1),
|
||||
});
|
||||
this.renderTableData();
|
||||
},
|
||||
// 编辑规格名
|
||||
editSkuItem() {
|
||||
this.renderTableData();
|
||||
},
|
||||
// 编辑规格值
|
||||
async skuValueChange(val, index, item) {
|
||||
this.renderTableData();
|
||||
// this.renderTableData();
|
||||
},
|
||||
|
||||
// 获取焦点时,取得规格名对应的规格值
|
||||
changeSkuVals(name) {
|
||||
if (name) {
|
||||
@@ -1009,14 +1161,7 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 移除当前规格项 进行数据变化*/
|
||||
handleCloseSkuItem($index) {
|
||||
this.skuInfo.splice($index, 1);
|
||||
/**
|
||||
* 渲染规格详细表格
|
||||
*/
|
||||
this.renderTableData();
|
||||
},
|
||||
|
||||
// 添加规格值的验证
|
||||
validateEmpty(params) {
|
||||
let flag = true;
|
||||
@@ -1042,6 +1187,7 @@ export default {
|
||||
this.$set(item.spec_values, item.spec_values.length, {
|
||||
name: item.name,
|
||||
value: "",
|
||||
___key: "",
|
||||
});
|
||||
this.baseInfoForm.regeneratorSkuFlag = true;
|
||||
/**
|
||||
@@ -1051,27 +1197,99 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
/** 移除当前规格值 */
|
||||
handleCloseSkuValue(item, index) {
|
||||
item.spec_values.splice(index, 1);
|
||||
/** 移除当前规格项 进行数据变化*/
|
||||
handleCloseSkuItem(item, $index) {
|
||||
console.log(item);
|
||||
let oldsSkuTableData = cloneObj(this.skuTableData);
|
||||
oldsSkuTableData.forEach((sku, i) => {
|
||||
if (sku[item.name]) {
|
||||
delete sku[item.name];
|
||||
}
|
||||
});
|
||||
this.skuTableData = oldsSkuTableData;
|
||||
|
||||
this.skuTableColumn.forEach((column, i) => {
|
||||
if (column.key == item.name) {
|
||||
this.skuTableColumn.splice(i, 1);
|
||||
}
|
||||
});
|
||||
this.skuInfo.splice($index, 1);
|
||||
},
|
||||
|
||||
/**
|
||||
* 移除当前规格值
|
||||
* 找到一样规格的值进行移出
|
||||
*/
|
||||
handleCloseSkuValue(item, index) {
|
||||
let oldsSkuTableData = cloneObj(this.skuTableData);
|
||||
console.log("oldsSkuTableData", oldsSkuTableData);
|
||||
this.skuTableData = oldsSkuTableData.filter((sku, i) => {
|
||||
if (
|
||||
sku[item.spec_values[index].name] != item.spec_values[index].value
|
||||
) {
|
||||
return sku;
|
||||
}
|
||||
});
|
||||
item.spec_values.splice(index, 1);
|
||||
this.baseInfoForm.regeneratorSkuFlag = true;
|
||||
/**
|
||||
* 渲染规格详细表格
|
||||
*/
|
||||
this.renderTableData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 编辑规格值
|
||||
* 根据当前___keys的索引指定需修改的值
|
||||
* @param {*} change 返回input更改的值
|
||||
* @param {*} index 修改规格名的索引
|
||||
* @param {*} item 当前规格值
|
||||
*/
|
||||
async handleSkuValue(change, index, item) {
|
||||
this.skuTableData.map((sku, i) => {
|
||||
// 指定key
|
||||
if (sku[item.name] == item.___key) {
|
||||
sku[item.name] = change;
|
||||
console.log(1);
|
||||
} else if (!item.___key && !sku[item.name]) {
|
||||
// 如果为第一次没有值则进行赋值操作
|
||||
|
||||
sku[item.name] = change;
|
||||
console.log("赋值", sku);
|
||||
}
|
||||
});
|
||||
item.___key = change;
|
||||
},
|
||||
|
||||
/**
|
||||
* 编辑规格名
|
||||
* 根据修改的规格名,将skuTableData的key(规格名)进行修改
|
||||
* @param {*} change 返回input更改的值
|
||||
* @param {*} index 修改规格名的索引
|
||||
*/
|
||||
handleSkuTitle(change, index) {
|
||||
let oldSkuTableColumn = cloneObj(this.skuTableColumn);
|
||||
this.skuTableData.forEach((sku, i) => {
|
||||
Object.keys(sku).forEach((key) => {
|
||||
if (oldSkuTableColumn[index].key == key) {
|
||||
// 修改当前sku的规格名
|
||||
sku = {
|
||||
[change]: sku[key],
|
||||
...sku,
|
||||
};
|
||||
delete sku[key];
|
||||
|
||||
this.skuTableData[i] = sku;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.skuTableColumn[index].key = change;
|
||||
this.skuTableColumn[index].title = change;
|
||||
},
|
||||
|
||||
/**
|
||||
* 渲染table所需要的column 和 data
|
||||
*/
|
||||
renderTableData() {
|
||||
this.skuTableColumn = [];
|
||||
this.skuTableData = [];
|
||||
let pushData = [];
|
||||
//渲染头部
|
||||
this.skuInfo.forEach((sku) => {
|
||||
// !sku.name ? (sku.name = "规格名") : "";
|
||||
//列名称
|
||||
let columnName = sku.name;
|
||||
pushData.push({
|
||||
@@ -1112,14 +1330,20 @@ export default {
|
||||
this.skuTableColumn = pushData;
|
||||
//克隆所有渲染的数据
|
||||
let cloneTemp = cloneObj(this.skuInfo);
|
||||
if (cloneTemp.length) {
|
||||
cloneTemp.map((temp) => {
|
||||
return {
|
||||
[temp.name]: temp.value,
|
||||
images: this.baseInfoForm.goodsGalleryFiles || [],
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
//数据清空一次
|
||||
this.$set(this, "skuTableData", []);
|
||||
//判定 是否存在规格分组
|
||||
if (cloneTemp[0]) {
|
||||
//存放最终结果
|
||||
let result = [];
|
||||
//循环选中的 sku 数据
|
||||
// 循环出第一个规格名中的数据
|
||||
cloneTemp[0].spec_values.forEach((specItem) => {
|
||||
result.push({
|
||||
[cloneTemp[0].name]: specItem.value,
|
||||
@@ -1128,8 +1352,14 @@ export default {
|
||||
});
|
||||
cloneTemp.splice(0, 1);
|
||||
result = this.specIterator(result, cloneTemp);
|
||||
// 保存以前skuTable值
|
||||
let oldData = cloneObj(this.skuTableData);
|
||||
|
||||
this.skuTableData = result;
|
||||
console.log(this.skuTableData);
|
||||
// 赋值给最新的skuTable
|
||||
this.skuTableData = Object.assign(this.skuTableData, oldData);
|
||||
|
||||
console.log(result, this.skuTableData);
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -1141,16 +1371,25 @@ export default {
|
||||
//是否还可以循环
|
||||
if (cloneTemp.length > 0) {
|
||||
let table = [];
|
||||
result.forEach((resItem) => {
|
||||
let newVal = []; // 用于存储新对象 并重置到最后一位
|
||||
result.forEach((resItem, i) => {
|
||||
cloneTemp[0].spec_values.forEach((valItem) => {
|
||||
let obj = cloneObj(resItem);
|
||||
obj[cloneTemp[0].name] = valItem.value;
|
||||
|
||||
table.push(obj);
|
||||
if (valItem.value) {
|
||||
table.push(obj);
|
||||
} else {
|
||||
newVal.push(obj);
|
||||
}
|
||||
});
|
||||
});
|
||||
result = [];
|
||||
table.push(...newVal);
|
||||
|
||||
table.forEach((t) => {
|
||||
console.log("t", t);
|
||||
|
||||
result.push(t);
|
||||
});
|
||||
//清除当前循环的分组
|
||||
@@ -1160,6 +1399,7 @@ export default {
|
||||
}
|
||||
return this.specIterator(result, cloneTemp);
|
||||
},
|
||||
|
||||
/** 根据分类id获取系统设置规格信息*/
|
||||
Get_SkuInfoByCategory(categoryId) {
|
||||
if (categoryId) {
|
||||
@@ -1179,8 +1419,7 @@ export default {
|
||||
return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
|
||||
},
|
||||
/** 数据改变之后 抛出数据 */
|
||||
updateSkuTable(row, item, type = "deafult") {
|
||||
let index = row._index;
|
||||
updateSkuTable(row, item, index) {
|
||||
this.baseInfoForm.regeneratorSkuFlag = true;
|
||||
/** 进行自定义校验 判断是否是数字(小数也能通过)重量 */
|
||||
if (item === "weight") {
|
||||
@@ -1218,6 +1457,7 @@ export default {
|
||||
}
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
console.log(index, item);
|
||||
this.skuTableData[index][item] = row[item];
|
||||
});
|
||||
// this.$set(this.skuTableData,[index][item],row[item])
|
||||
@@ -1257,7 +1497,10 @@ export default {
|
||||
this.$refs["baseInfoForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
let submit = JSON.parse(JSON.stringify(this.baseInfoForm));
|
||||
if (submit.goodsGalleryFiles && submit.goodsGalleryFiles.length <= 0) {
|
||||
if (
|
||||
submit.goodsGalleryFiles &&
|
||||
submit.goodsGalleryFiles.length <= 0
|
||||
) {
|
||||
this.submitLoading = false;
|
||||
this.$Message.error("请上传商品图片");
|
||||
return;
|
||||
@@ -1279,15 +1522,22 @@ export default {
|
||||
delete sku.specValueId;
|
||||
return sku;
|
||||
});
|
||||
if (this.firstData.tempId) {
|
||||
delete submit.id;
|
||||
}
|
||||
|
||||
if (submit.goodsGalleryFiles.length > 0) {
|
||||
submit.goodsGalleryList = submit.goodsGalleryFiles.map((i) => i.url);
|
||||
submit.goodsGalleryList = submit.goodsGalleryFiles.map(
|
||||
(i) => i.url
|
||||
);
|
||||
}
|
||||
/** 参数校验 **/
|
||||
/* Object.keys(submit.goodsParamsList).forEach((item) => {
|
||||
});*/
|
||||
submit.release ? (submit.release = true) : (submit.release = false);
|
||||
submit.recommend ? (submit.recommend = true) : (submit.recommend = false);
|
||||
submit.recommend
|
||||
? (submit.recommend = true)
|
||||
: (submit.recommend = false);
|
||||
|
||||
if (this.goodsId) {
|
||||
API_GOODS.editGoods(this.goodsId, submit).then((res) => {
|
||||
@@ -1320,9 +1570,8 @@ export default {
|
||||
saveToDraft() {
|
||||
this.baseInfoForm.skuList = this.skuTableData;
|
||||
if (this.baseInfoForm.goodsGalleryFiles.length > 0) {
|
||||
this.baseInfoForm.goodsGalleryList = this.baseInfoForm.goodsGalleryFiles.map(
|
||||
(i) => i.url
|
||||
);
|
||||
this.baseInfoForm.goodsGalleryList =
|
||||
this.baseInfoForm.goodsGalleryFiles.map((i) => i.url);
|
||||
}
|
||||
this.baseInfoForm.categoryName = [];
|
||||
this.baseInfoForm.saveType = "TEMPLATE";
|
||||
@@ -1412,4 +1661,30 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./addGoods.scss";
|
||||
|
||||
.sku-ul {
|
||||
align-items: center;
|
||||
padding: 10px 0;
|
||||
border-radius: 0.4em;
|
||||
background: #f3f5f7;
|
||||
> li {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
.sku-editor {
|
||||
> div {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
.input-number {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,10 +4,10 @@ import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/a
|
||||
|
||||
// 获取拼图验证
|
||||
export const getVerifyImg = (verificationEnums) => {
|
||||
return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`);
|
||||
return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
|
||||
};
|
||||
|
||||
// 拼图验证
|
||||
export const postVerifyImg = (params) => {
|
||||
return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params);
|
||||
return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
file: "",
|
||||
action: baseUrl + "/orders/batchDeliver", // 上传接口
|
||||
action: baseUrl + "/order/order/batchDeliver", // 上传接口
|
||||
accessToken: {}, // 验证token
|
||||
// 步骤集合
|
||||
stepList: [
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
>
|
||||
<Button
|
||||
type="success"
|
||||
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
|
||||
v-if="row.promotionStatus === 'CLOSE'"
|
||||
style="margin-left: 5px"
|
||||
size="small"
|
||||
@click="openOrClose(row)"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<Card style="position:relative;">
|
||||
<Card style="position: relative">
|
||||
<Spin size="large" fix v-if="spinShow"></Spin>
|
||||
<Alert type="warning">
|
||||
|
||||
<template slot="desc">
|
||||
为了方便在创建直播间时从选择商品,请尽量提前提审直播商品
|
||||
</template>
|
||||
@@ -11,116 +10,229 @@
|
||||
|
||||
<Form :model="liveForm" ref="liveForm" :rules="liveRulesForm" :label-width="120">
|
||||
<FormItem label="直播标题" prop="name">
|
||||
<Input :disabled="liveStatus!='NEW'" v-model="liveForm.name" style="width:460px"></Input>
|
||||
<div class="tips">直播间名字,最短3个汉字,最长17个汉字,1个汉字相当于2个字符</div>
|
||||
<Input
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
v-model="liveForm.name"
|
||||
style="width: 460px"
|
||||
></Input>
|
||||
<div class="tips">
|
||||
直播间名字,最短3个汉字,最长17个汉字,1个汉字相当于2个字符
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="主播昵称" prop="anchorName">
|
||||
<Input :disabled="liveStatus!='NEW'" v-model="liveForm.anchorName" style="width:360px"></Input>
|
||||
<div class="tips">主播昵称,最短2个汉字,最长15个汉字,1个汉字相当于2个字符</div>
|
||||
<Input
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
v-model="liveForm.anchorName"
|
||||
style="width: 360px"
|
||||
></Input>
|
||||
<div class="tips">
|
||||
主播昵称,最短2个汉字,最长15个汉字,1个汉字相当于2个字符
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="直播时间" prop="startTime">
|
||||
|
||||
<DatePicker :disabled="liveStatus!='NEW'" format="yyyy-MM-dd HH:mm" type="datetimerange" v-model="times" @on-change="handleChangeTime" :options="optionsTime" placeholder="直播计划开始时间-直播计划结束时间"
|
||||
style="width: 300px">
|
||||
<DatePicker
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
type="datetimerange"
|
||||
v-model="times"
|
||||
@on-change="handleChangeTime"
|
||||
:options="optionsTime"
|
||||
placeholder="直播计划开始时间-直播计划结束时间"
|
||||
style="width: 300px"
|
||||
>
|
||||
</DatePicker>
|
||||
<div class="tips">直播开播时间需要在当前时间的10分钟后并且,开始时间不能在6个月后,直播计划结束时间(开播时间和结束时间间隔不得短于30分钟,不得超过24小时)</div>
|
||||
<div class="tips">
|
||||
直播开播时间需要在当前时间的10分钟后并且,开始时间不能在6个月后,直播计划结束时间(开播时间和结束时间间隔不得短于30分钟,不得超过24小时)
|
||||
</div>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="主播微信号" prop="anchorWechat">
|
||||
<Input :disabled="liveStatus!='NEW'" v-model="liveForm.anchorWechat" style="width:360px" placeholder="主播微信号"></Input>
|
||||
<div class="tips">主播微信号,如果未实名认证,需要先前往“小程序直播”小程序进行<a target="_black" href="https://res.wx.qq.com/op_res/9rSix1dhHfK4rR049JL0PHJ7TpOvkuZ3mE0z7Ou_Etvjf-w1J_jVX0rZqeStLfwh">实名验证</a></div>
|
||||
<Input
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
v-model="liveForm.anchorWechat"
|
||||
style="width: 360px"
|
||||
placeholder="主播微信号"
|
||||
></Input>
|
||||
<div class="tips">
|
||||
主播微信号,如果未实名认证,需要先前往“小程序直播”小程序进行<a
|
||||
target="_black"
|
||||
href="https://res.wx.qq.com/op_res/9rSix1dhHfK4rR049JL0PHJ7TpOvkuZ3mE0z7Ou_Etvjf-w1J_jVX0rZqeStLfwh"
|
||||
>实名验证</a
|
||||
>
|
||||
</div>
|
||||
</FormItem>
|
||||
|
||||
<!-- 分享卡片 -->
|
||||
<FormItem label="分享卡片封面" prop="feedsImg">
|
||||
<div class="upload-list" v-if="liveForm.feedsImg">
|
||||
<template>
|
||||
<img :src="liveForm.feedsImg">
|
||||
<img :src="liveForm.feedsImg" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="handleView(liveForm.feedsImg)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click.native="handleRemove('feedsImg')"></Icon>
|
||||
<Icon
|
||||
type="ios-eye-outline"
|
||||
@click.native="handleView(liveForm.feedsImg)"
|
||||
></Icon>
|
||||
<Icon
|
||||
type="ios-trash-outline"
|
||||
@click.native="handleRemove('feedsImg')"
|
||||
></Icon>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<Upload v-if="liveForm.feedsImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleFeedsImgSuccess" :format="['jpg','jpeg','png']" :on-format-error="handleFormatError"
|
||||
:max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Upload
|
||||
v-if="liveForm.feedsImg.length == 0"
|
||||
ref="upload"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleFeedsImgSuccess"
|
||||
:format="['jpg', 'jpeg', 'png']"
|
||||
:on-format-error="handleFormatError"
|
||||
:max-size="1024"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
type="drag"
|
||||
:action="action"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block; width: 58px"
|
||||
>
|
||||
<div style="width: 58px; height: 58px; line-height: 58px">
|
||||
<Icon type="ios-camera" size="20"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
<div class="tips">
|
||||
直播间分享图,图片规则:建议像素800*640,大小不超过1M;
|
||||
</div>
|
||||
<div class="tips">直播间分享图,图片规则:建议像素800*640,大小不超过1M;</div>
|
||||
</FormItem>
|
||||
|
||||
<!-- 直播间背景墙 -->
|
||||
<FormItem label="直播间背景墙" prop="coverImg">
|
||||
|
||||
<div class="upload-list" v-if="liveForm.coverImg">
|
||||
<template>
|
||||
<img :src="liveForm.coverImg">
|
||||
<img :src="liveForm.coverImg" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="handleView(liveForm.coverImg)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click.native="handleRemove('coverImg')"></Icon>
|
||||
<Icon
|
||||
type="ios-eye-outline"
|
||||
@click.native="handleView(liveForm.coverImg)"
|
||||
></Icon>
|
||||
<Icon
|
||||
type="ios-trash-outline"
|
||||
@click.native="handleRemove('coverImg')"
|
||||
></Icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<Upload v-if="liveForm.coverImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleCoverImgSuccess" :format="['jpg','jpeg','png']" :on-format-error="handleFormatError"
|
||||
:max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Upload
|
||||
v-if="liveForm.coverImg.length == 0"
|
||||
ref="upload"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleCoverImgSuccess"
|
||||
:format="['jpg', 'jpeg', 'png']"
|
||||
:on-format-error="handleFormatError"
|
||||
:max-size="1024"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
type="drag"
|
||||
:action="action"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block; width: 58px"
|
||||
>
|
||||
<div style="width: 58px; height: 58px; line-height: 58px">
|
||||
<Icon type="ios-camera" size="20"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
<div class="tips"> 直播间背景图,图片规则:建议像素1080*1920,大小不超过1M</div>
|
||||
<div class="tips">直播间背景图,图片规则:建议像素1080*1920,大小不超过1M</div>
|
||||
</FormItem>
|
||||
|
||||
<!-- 直播间背景墙 -->
|
||||
<FormItem label="直播间分享图" prop="shareImg">
|
||||
|
||||
<div class="upload-list" v-if="liveForm.shareImg">
|
||||
<template>
|
||||
<img :src="liveForm.shareImg">
|
||||
<img :src="liveForm.shareImg" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="handleView(liveForm.shareImg)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click.native="handleRemove('shareImg')"></Icon>
|
||||
<Icon
|
||||
type="ios-eye-outline"
|
||||
@click.native="handleView(liveForm.shareImg)"
|
||||
></Icon>
|
||||
<Icon
|
||||
type="ios-trash-outline"
|
||||
@click.native="handleRemove('shareImg')"
|
||||
></Icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<Upload v-if="liveForm.shareImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleShareImgSuccess" :format="['jpg','jpeg','png']" :on-format-error="handleFormatError"
|
||||
:max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Upload
|
||||
v-if="liveForm.shareImg.length == 0"
|
||||
ref="upload"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleShareImgSuccess"
|
||||
:format="['jpg', 'jpeg', 'png']"
|
||||
:on-format-error="handleFormatError"
|
||||
:max-size="1024"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
type="drag"
|
||||
:action="action"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block; width: 58px"
|
||||
>
|
||||
<div style="width: 58px; height: 58px; line-height: 58px">
|
||||
<Icon type="ios-camera" size="20"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
<div class="tips"> 直播间分享图,图片规则:建议像素800*640,大小不超过1M</div>
|
||||
<div class="tips">直播间分享图,图片规则:建议像素800*640,大小不超过1M</div>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="商品" v-if="$route.query.id">
|
||||
<Button type="primary" ghost @click="liveGoodsVisible=true" :disabled="liveStatus!='NEW'" icon="md-add">添加商品</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
ghost
|
||||
@click="liveGoodsVisible = true"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
icon="md-add"
|
||||
>添加商品</Button
|
||||
>
|
||||
<Table class="goods-table" :columns="liveColumns" :data="liveData">
|
||||
<template slot-scope="{ row,index }" slot="goodsName">
|
||||
<template slot-scope="{ row, index }" slot="goodsName">
|
||||
<div class="flex-goods">
|
||||
<Badge v-if="index == 0 || index ==1" color="volcano"></Badge>
|
||||
<img class="thumbnail" :src="row.thumbnail || row.goodsImage">
|
||||
<Badge v-if="index == 0 || index == 1" color="volcano"></Badge>
|
||||
<img class="thumbnail" :src="row.thumbnail || row.goodsImage" />
|
||||
{{ row.goodsName || row.name }}
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" class="price" slot="price">
|
||||
<div>
|
||||
<div v-if="row.priceType == 1">{{row.price | unitPrice('¥')}}</div>
|
||||
<div v-if="row.priceType == 2">{{row.price | unitPrice('¥')}}至{{row.price2 | unitPrice('¥')}}</div>
|
||||
<div v-if="row.priceType == 3">{{row.price | unitPrice('¥')}}<span class="original-price">{{row.price2 | unitPrice('¥')}}</span></div>
|
||||
<div v-if="row.priceType == 1">{{ row.price | unitPrice("¥") }}</div>
|
||||
<div v-if="row.priceType == 2">
|
||||
{{ row.price | unitPrice("¥") }}至{{ row.price2 | unitPrice("¥") }}
|
||||
</div>
|
||||
<div v-if="row.priceType == 3">
|
||||
{{ row.price | unitPrice("¥")
|
||||
}}<span class="original-price">{{ row.price2 | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="quantity">
|
||||
<div>{{row.quantity}}</div>
|
||||
<div>{{ row.quantity }}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<template slot-scope="{ row, index }" slot="action">
|
||||
<div class="action">
|
||||
<Button size="small" type="primary" :disabled="liveStatus!='NEW'" @click="deleteGoods(row,index)">删除</Button>
|
||||
<Button size="small" ghost type="primary" :disabled="liveStatus!='NEW'" @click="onMove(row.id,1)">上移</Button>
|
||||
<Button size="small" ghost type="primary" :disabled="liveStatus!='NEW'" @click="onMove(row.id,0)">下移</Button>
|
||||
<Button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
@click="deleteGoods(row, index)"
|
||||
>删除</Button
|
||||
>
|
||||
<Button
|
||||
size="small"
|
||||
ghost
|
||||
type="primary"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
@click="onMove(row.id, 1)"
|
||||
>上移</Button
|
||||
>
|
||||
<Button
|
||||
size="small"
|
||||
ghost
|
||||
type="primary"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
@click="onMove(row.id, 0)"
|
||||
>下移</Button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
@@ -130,13 +242,15 @@
|
||||
</FormItem>
|
||||
|
||||
<FormItem>
|
||||
<Button type="primary" v-if="liveStatus=='NEW'" @click="createLives()">保存</Button>
|
||||
<Button type="primary" v-if="liveStatus == 'NEW'" @click="createLives()"
|
||||
>保存</Button
|
||||
>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</Card>
|
||||
<!-- 浏览图片 -->
|
||||
<Modal title="查看图片" v-model="imageVisible">
|
||||
<img :src="imageSrc" v-if="imageVisible" style="width: 100%">
|
||||
<img :src="imageSrc" v-if="imageVisible" style="width: 100%" />
|
||||
</Modal>
|
||||
|
||||
<Modal width="800" v-model="liveGoodsVisible" footer-hide>
|
||||
@@ -184,24 +298,16 @@ export default {
|
||||
{ required: true, message: "请输入主播昵称", trigger: "blur" },
|
||||
{ max: 15, min: 2, message: "主播昵称最短2个汉字,最长15个汉字" },
|
||||
],
|
||||
anchorWechat: [
|
||||
{ required: true, message: "请输入主播微信号", trigger: "blur" },
|
||||
],
|
||||
anchorWechat: [{ required: true, message: "请输入主播微信号", trigger: "blur" }],
|
||||
startTime: [
|
||||
{
|
||||
required: true,
|
||||
message: "请正确输入开始时间以及结束时间",
|
||||
},
|
||||
],
|
||||
feedsImg: [
|
||||
{ required: true, message: "分享卡片封面不能为空", trigger: "blur" },
|
||||
],
|
||||
coverImg: [
|
||||
{ required: true, message: "直播间背景墙不能为空", trigger: "blur" },
|
||||
],
|
||||
shareImg: [
|
||||
{ required: true, message: "直播间分享图不能为空", trigger: "blur" },
|
||||
],
|
||||
feedsImg: [{ required: true, message: "分享卡片封面不能为空", trigger: "blur" }],
|
||||
coverImg: [{ required: true, message: "直播间背景墙不能为空", trigger: "blur" }],
|
||||
shareImg: [{ required: true, message: "直播间分享图不能为空", trigger: "blur" }],
|
||||
},
|
||||
liveForm: {
|
||||
name: "", //直播标题
|
||||
@@ -438,16 +544,8 @@ export default {
|
||||
this.times[1] = daterange[1];
|
||||
|
||||
// this.times = daterange;
|
||||
this.$set(
|
||||
this.liveForm,
|
||||
"startTime",
|
||||
new Date(daterange[0]).getTime() / 1000
|
||||
);
|
||||
this.$set(
|
||||
this.liveForm,
|
||||
"endTime",
|
||||
new Date(daterange[1]).getTime() / 1000
|
||||
);
|
||||
this.$set(this.liveForm, "startTime", new Date(daterange[0]).getTime() / 1000);
|
||||
this.$set(this.liveForm, "endTime", new Date(daterange[1]).getTime() / 1000);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -493,9 +591,7 @@ export default {
|
||||
// 需判断当前是否是添加商品
|
||||
if (this.$route.query.id) {
|
||||
this.spinShow = true;
|
||||
this.liveForm.commodityList = JSON.stringify(
|
||||
this.liveForm.commodityList
|
||||
);
|
||||
this.liveForm.commodityList = JSON.stringify(this.liveForm.commodityList);
|
||||
delete this.liveForm.updateTime;
|
||||
// 将当前直播间修改
|
||||
editLive(this.liveForm).then((res) => {
|
||||
|
||||
@@ -1,78 +1,177 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
|
||||
<Card style="margin-left: 10px">
|
||||
<Tabs v-model="type" @on-click="handleClickType">
|
||||
<TabPane label="基本信息" name="INFO">
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<Form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:label-width="100"
|
||||
:rules="formValidate"
|
||||
>
|
||||
<FormItem label="店铺名称">
|
||||
<Input v-model="storeName" disabled clearable style="width: 20%"/>
|
||||
<Input
|
||||
v-model="storeName"
|
||||
disabled
|
||||
clearable
|
||||
style="width: 20%"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="店铺地址" prop="address">
|
||||
<Input v-model="form.address" @on-focus="$refs.liliMap.showMap = true" clearable style="width: 20%"/>
|
||||
<Input
|
||||
v-model="form.address"
|
||||
@on-focus="$refs.liliMap.showMap = true"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="详细地址" prop="shopAddressDetail">
|
||||
<Input v-model="form.storeAddressDetail" clearable style="width: 20%" maxlength="50"/>
|
||||
<Input
|
||||
v-model="form.storeAddressDetail"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
maxlength="50"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="店铺LOGO:">
|
||||
<upload-pic-thumb v-model="form.storeLogo" :multiple="false"></upload-pic-thumb>
|
||||
<upload-pic-thumb
|
||||
v-model="form.storeLogo"
|
||||
:multiple="false"
|
||||
></upload-pic-thumb>
|
||||
</FormItem>
|
||||
<FormItem label="店铺简介" prop="content" class="wangEditor">
|
||||
<Input type="textarea" :rows="8" v-model="form.storeDesc" style="width: 30%"></Input>
|
||||
<Input
|
||||
type="textarea"
|
||||
:rows="8"
|
||||
v-model="form.storeDesc"
|
||||
style="width: 30%"
|
||||
></Input>
|
||||
</FormItem>
|
||||
<Form-item>
|
||||
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">修改
|
||||
<Button
|
||||
@click="handleSubmit"
|
||||
:loading="submitLoading"
|
||||
type="primary"
|
||||
style="margin-right: 5px"
|
||||
>修改
|
||||
</Button>
|
||||
</Form-item>
|
||||
</Form>
|
||||
</TabPane>
|
||||
<TabPane label="退货地址" name="REFUND_GOODS_ADDRESS">
|
||||
<Form ref="addressForm" :model="addressForm" :label-width="100" :rules="afterFormValidate">
|
||||
<Form
|
||||
ref="addressForm"
|
||||
:model="addressForm"
|
||||
:label-width="100"
|
||||
:rules="afterFormValidate"
|
||||
>
|
||||
<FormItem label="收货人" prop="salesConsigneeName">
|
||||
<Input v-model="addressForm.salesConsigneeName" maxlength="11" clearable style="width: 20%"/>
|
||||
<Input
|
||||
v-model="addressForm.salesConsigneeName"
|
||||
maxlength="11"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="收货人电话" prop="salesConsigneeMobile">
|
||||
<Input v-model="addressForm.salesConsigneeMobile" maxlength="11" style="width: 20%"/>
|
||||
<Input
|
||||
v-model="addressForm.salesConsigneeMobile"
|
||||
maxlength="11"
|
||||
style="width: 20%"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="售后地址">
|
||||
<Input v-model="region" disabled style="width: 20%" v-if="showRegion == false"/>
|
||||
<Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary"
|
||||
style="margin-left:8px">修改
|
||||
<Input
|
||||
v-model="region"
|
||||
disabled
|
||||
style="width: 20%"
|
||||
v-if="showRegion == false"
|
||||
/>
|
||||
<Button
|
||||
v-if="showRegion == false"
|
||||
@click="regionClick"
|
||||
:loading="submitLoading"
|
||||
type="primary"
|
||||
style="margin-left: 8px"
|
||||
>修改
|
||||
</Button>
|
||||
<regionMap style="width: 20%" @selected="selectedRegion" v-if="showRegion == true"/>
|
||||
<regionMap
|
||||
style="width: 20%"
|
||||
@selected="selectedRegion"
|
||||
v-if="showRegion == true"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
||||
<Input v-model="addressForm.salesConsigneeDetail" clearable style="width: 20%" maxlength="50"/>
|
||||
<Input
|
||||
v-model="addressForm.salesConsigneeDetail"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
maxlength="50"
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<Form-item>
|
||||
<Button @click="afterHandleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">修改
|
||||
<Button
|
||||
@click="afterHandleSubmit"
|
||||
:loading="submitLoading"
|
||||
type="primary"
|
||||
style="margin-right: 5px"
|
||||
>修改
|
||||
</Button>
|
||||
</Form-item>
|
||||
</Form>
|
||||
</TabPane>
|
||||
<TabPane label="库存预警" name="STOCK_WARNING">
|
||||
|
||||
<Form ref="stockWarningForm" :model="stockWarningForm" :label-width="100" :rules="stockWarningFormValidate">
|
||||
<Form
|
||||
ref="stockWarningForm"
|
||||
:model="stockWarningForm"
|
||||
:label-width="100"
|
||||
:rules="stockWarningFormValidate"
|
||||
>
|
||||
<FormItem label="预警数" prop="stockWarning">
|
||||
<Input v-model="stockWarningForm.stockWarning" type="number" maxlength="6" clearable style="width: 20%"/>
|
||||
<InputNumber
|
||||
:min="0"
|
||||
:max="99999"
|
||||
v-model="stockWarningForm.stockWarning"
|
||||
type="number"
|
||||
maxlength="6"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
/>
|
||||
</FormItem>
|
||||
<Form-item>
|
||||
<Button @click="stockWarningHandleSubmit" :loading="submitLoading" type="primary"
|
||||
style="margin-right:5px">修改
|
||||
<Button
|
||||
@click="stockWarningHandleSubmit"
|
||||
:loading="submitLoading"
|
||||
type="primary"
|
||||
style="margin-right: 5px"
|
||||
>修改
|
||||
</Button>
|
||||
</Form-item>
|
||||
</Form>
|
||||
</TabPane>
|
||||
<TabPane label="客服设置" name="UDESK">
|
||||
|
||||
<Form ref="udeskForm" :model="udeskForm" :label-width="100" :rules="udeskFormValidate">
|
||||
<Form
|
||||
ref="udeskForm"
|
||||
:model="udeskForm"
|
||||
:label-width="100"
|
||||
:rules="udeskFormValidate"
|
||||
>
|
||||
<FormItem label="坐席id" prop="merchantEuid">
|
||||
<Input v-model="udeskForm.merchantEuid" maxlength="30" clearable style="width: 20%"/>
|
||||
<Input
|
||||
v-model="udeskForm.merchantEuid"
|
||||
maxlength="30"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
/>
|
||||
</FormItem>
|
||||
<Form-item>
|
||||
<Button @click="merchantSubmit" :loading="submitLoading" type="primary"
|
||||
style="margin-right:5px">修改
|
||||
<Button
|
||||
@click="merchantSubmit"
|
||||
:loading="submitLoading"
|
||||
type="primary"
|
||||
style="margin-right: 5px"
|
||||
>修改
|
||||
</Button>
|
||||
</Form-item>
|
||||
</Form>
|
||||
@@ -86,7 +185,7 @@
|
||||
|
||||
<script>
|
||||
import * as API_Shop from "@/api/shops";
|
||||
import {validateMobile} from "@/libs/validate";
|
||||
import { validateMobile } from "@/libs/validate";
|
||||
import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb";
|
||||
import liliMap from "@/views/my-components/map/index";
|
||||
import regionMap from "@/views/lili-components/region";
|
||||
@@ -121,21 +220,21 @@ export default {
|
||||
},
|
||||
//im form
|
||||
udeskForm: {
|
||||
merchantEuid: ""
|
||||
merchantEuid: "",
|
||||
},
|
||||
stockWarningFormValidate: {
|
||||
stockWarning: [
|
||||
{required: true, message: "请输入库存预警数", trigger: "blur"},
|
||||
{ required: true, message: "请输入库存预警数", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
udeskFormValidate: {
|
||||
merchantEuid: [
|
||||
{required: true, message: "请输入店铺坐席ID", trigger: "blur"},
|
||||
{ required: true, message: "请输入店铺坐席ID", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
afterFormValidate: {
|
||||
salesConsigneeMobile: [
|
||||
{required: true, message: "手机号不能为空", trigger: "blur"},
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" },
|
||||
{
|
||||
pattern: RegExp.mobile,
|
||||
trigger: "blur",
|
||||
@@ -143,10 +242,10 @@ export default {
|
||||
},
|
||||
],
|
||||
salesConsigneeName: [
|
||||
{required: true, message: "请输入收货人", trigger: "blur"},
|
||||
{ required: true, message: "请输入收货人", trigger: "blur" },
|
||||
],
|
||||
salesConsigneeDetail: [
|
||||
{required: true, message: "请输入详细地址", trigger: "blur"},
|
||||
{ required: true, message: "请输入详细地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
form: {
|
||||
@@ -272,7 +371,6 @@ export default {
|
||||
});
|
||||
},
|
||||
merchantSubmit() {
|
||||
|
||||
this.$refs.udeskForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
@@ -339,7 +437,7 @@ export default {
|
||||
this.$set(this.form, "address", item.addr);
|
||||
this.form.storeAddressPath = item.addr;
|
||||
this.form.storeAddressIdPath = item.addrId;
|
||||
this.form.storeCenter = item.position.lng + "," + item.position.lat
|
||||
this.form.storeCenter = item.position.lng + "," + item.position.lat;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
Reference in New Issue
Block a user