Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-purchase
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5999eb06
authored
Apr 06, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
395aa1e9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
478 additions
and
274 deletions
package-lock.json
package.json
src/api/modules/order.js
src/api/modules/product.js
src/api/modules/purchaseShopping.js
src/api/modules/sysBase.js
src/assets/css/public.scss
src/config/index.js
src/main.js
src/setup/qiankun.js
src/views/purchaseOrder/add.vue
src/views/purchaseOrder/components/goodsDetailCom.vue
src/views/purchaseOrder/components/shoppingCartCom.vue
src/views/purchaseOrder/index.vue
package-lock.json
View file @
5999eb0
...
...
@@ -6443,9 +6443,9 @@
}
},
"glsx-common"
:
{
"version"
:
"
1.4.9
"
,
"resolved"
:
"https://registry.npmjs.org/glsx-common/-/glsx-common-
1.4.9
.tgz"
,
"integrity"
:
"sha512-
RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg
=="
,
"version"
:
"
2.0.8
"
,
"resolved"
:
"https://registry.npmjs.org/glsx-common/-/glsx-common-
2.0.8
.tgz"
,
"integrity"
:
"sha512-
hKt/SNFu+NslOHWvDLxmRwUkINBrnATTYIkOj+jmcx5RqfXIbMgEipzFGbCICWMlYYoecwRiJ6341sstPCCHLQ
=="
,
"requires"
:
{
"axios"
:
"^0.21.3"
,
"md5"
:
"^2.3.0"
,
...
...
@@ -6465,6 +6465,19 @@
"vue"
:
"^2.6.11"
,
"vue-amap"
:
"^0.5.10"
,
"vuedraggable"
:
"^2.24.3"
},
"dependencies"
:
{
"glsx-common"
:
{
"version"
:
"1.4.9"
,
"resolved"
:
"https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz"
,
"integrity"
:
"sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg=="
,
"requires"
:
{
"axios"
:
"^0.21.3"
,
"md5"
:
"^2.3.0"
,
"qs"
:
"^6.10.1"
,
"sha1"
:
"^1.1.1"
}
}
}
},
"gopd"
:
{
...
...
package.json
View file @
5999eb0
...
...
@@ -13,7 +13,7 @@
"dayjs"
:
"^1.10.7"
,
"el-tree-transfer"
:
"^2.2.6"
,
"element-ui"
:
"^2.4.5"
,
"glsx-common"
:
"^
1.4.6
"
,
"glsx-common"
:
"^
2.0.8
"
,
"glsx-components"
:
"^1.2.5"
,
"vue"
:
"^2.6.10"
,
"vue-router"
:
"^3.1.3"
,
...
...
src/api/modules/order.js
deleted
100644 → 0
View file @
395aa1e
import
{
http
}
from
'@/main'
const
defaultPath
=
'scrm.api.shopmall.'
const
getListApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
orderGoodsComment.page`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
deleteZoneApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
zoneInfo.delete`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
getZoneInfoApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
zoneInfo.getById`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
insertZoneApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
zoneInfo.insertOrUpdate`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
default
{
getListApi
,
deleteZoneApi
,
getZoneInfoApi
,
insertZoneApi
}
src/api/modules/product.js
View file @
5999eb0
...
...
@@ -2,72 +2,40 @@ import { http } from '@/main'
const
path
=
'dj.api.'
const
path2
=
'dj.smartcarlife.api.'
export
function
getList
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.page`
return
http
(
data
)
}
export
function
getType
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.list`
return
http
(
data
)
}
// 添加产品
export
function
addGoods
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.add`
return
http
(
data
,
"post"
)
}
// 编辑产品
export
function
editGoods
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.update`
return
http
(
data
,
"post"
)
}
// 判断产品是否可删除
export
function
checkDeleteGoods
(
data
)
{
data
.
method
=
`
${
path2
}
goodsinfo.checkDeleteable`
return
http
(
data
,
"post"
)
}
// 删除产品
export
function
deleteGoods
(
data
)
{
data
.
method
=
`
${
path2
}
goodsinfo.delete`
return
http
(
data
,
"post"
)
}
// 导出产品
export
function
exportGoodsList
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.export`
return
http
(
data
,
"post"
)
// 获取素材详情
const
getProductInfo
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
goodsinfo.get.byId`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 获取场景下类目
export
function
getProductTypeBySceneId
(
data
)
{
data
.
method
=
`
${
path
}
goodsCategoryConfiguration.queryGoodsCategoryBySceneId`
return
http
(
data
,
"post"
)
}
// 获取品牌方/供应方
export
function
getBrandSupplyMerchant
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.queryGoodsRelatedParty`
return
http
(
data
,
"post"
)
}
// 新增供应方
export
function
addBrandSupplyMerchant
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.addGoodsRelatedParty`
return
http
(
data
,
"post"
)
}
// 编辑/删除供应方
export
function
editBrandSupplyMerchant
(
data
)
{
data
.
method
=
`
${
path
}
goods.type.editGoodsRelatedParty`
return
http
(
data
,
"post"
)
}
// 获取素材详情
export
function
getProductInfo
(
data
)
{
data
.
method
=
`
${
path
}
goodsinfo.get.byId`
return
http
(
data
,
"post"
)
}
const
getProductTypeBySceneId
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
goodsCategoryConfiguration.queryGoodsCategoryBySceneId`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 查询产品列表
const
getGoodsList
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
goodsinfo.list`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getGoodsList
,
getProductInfo
,
getProductTypeBySceneId
}
src/api/modules/purchaseShopping.js
View file @
5999eb0
...
...
@@ -5,9 +5,10 @@ const path2 = 'dj.api.goodsInfo.'
const
path3
=
'dj.api.smartcarlife.'
// 分页查询采购订单
const
getPurchaseOrderList
=
(
params
)
=>
{
params
.
method
=
`
${
path
}
purchaseOrder.page`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseOrder.page`
return
http
({
url
:
'rop-
dj-smartcarlife
/router'
,
url
:
'rop-
scrm-boutiquecoupon
/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
...
...
@@ -15,9 +16,10 @@ const getPurchaseOrderList = (params) => {
}
// 采购订单取消/审核
const
purchaseOrderCancelOrCheck
=
(
params
)
=>
{
params
.
method
=
`
${
path
}
purchaseOrder.cancelOrCheck`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseOrder.cancelOrCheck`
return
http
({
url
:
'rop-
dj-smartcarlife
/router'
,
url
:
'rop-
scrm-boutiquecoupon
/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
...
...
@@ -26,9 +28,10 @@ const purchaseOrderCancelOrCheck = (params) => {
}
// 查看采购订单
const
purchaseOrderDetail
=
(
params
)
=>
{
params
.
method
=
`
${
path
}
purchaseOrder.view`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseOrder.view`
return
http
({
url
:
'rop-
dj-smartcarlife
/router'
,
url
:
'rop-
scrm-boutiquecoupon
/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
...
...
@@ -36,9 +39,10 @@ const purchaseOrderDetail=(params)=> {
}
// 分页查询采购商城素材信息
const
listWithPagePurchaseInfo
=
(
params
)
=>
{
params
.
method
=
`
${
path2
}
listWithPage.purchaseInfo`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path2
}
listWithPage.purchaseInfo`
return
http
({
url
:
'rop-
dj-smartcarlife
/router'
,
url
:
'rop-
scrm-boutiquecoupon
/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
...
...
@@ -47,9 +51,10 @@ const listWithPagePurchaseInfo=(params)=> {
// 获取当前登录园区店商户收货地址
const
addressGet
=
(
params
=
{})
=>
{
params
.
method
=
`
${
path
}
yqMerchantDeliveryAddress.get`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
yqMerchantDeliveryAddress.get`
return
http
({
url
:
'rop-
dj-smartcarlife
/router'
,
url
:
'rop-
scrm-boutiquecoupon
/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
...
...
@@ -59,9 +64,10 @@ const addressGet=(params = {}) =>{
// 保存园区店商户收货地址
const
addressSave
=
(
params
)
=>
{
params
.
method
=
`
${
path
}
yqMerchantDeliveryAddress.save`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
yqMerchantDeliveryAddress.save`
return
http
({
url
:
'rop-
dj-smartcarlife
/router'
,
url
:
'rop-
scrm-boutiquecoupon
/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
...
...
@@ -69,33 +75,60 @@ const addressSave=(params)=> {
}
// 按商品类目分组获取购物车列表
export
function
listGroupByGoodsType
(
data
)
{
data
.
method
=
`
${
path
}
purchaseShoppingCar.listGroupByGoodsType`
return
http
(
data
)
const
listGroupByGoodsType
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseShoppingCar.listGroupByGoodsType`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 添加到购物车
export
function
shoppingCarAdd
(
data
)
{
data
.
method
=
`
${
path
}
purchaseShoppingCar.add`
return
http
(
data
)
}
// 更新购物车商品选中标识
const
updateSelectedFlag
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseShoppingCar.updateSelectedFlag`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 移除购物车商品
export
function
shoppingCarRemove
(
data
)
{
data
.
method
=
`
${
path
}
purchaseShoppingCar.remove`
return
http
(
data
)
const
shoppingCarRemove
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseShoppingCar.remove`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 修改购物车商品数量
export
function
shoppingCarUpdateNumber
(
data
)
{
data
.
method
=
`
${
path
}
purchaseShoppingCar.updateNumber`
return
http
(
data
)
// 添加到购物车
const
shoppingCarAdd
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseShoppingCar.add`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 更新购物车商品选中标识
export
function
updateSelectedFlag
(
data
)
{
data
.
method
=
`
${
path
}
purchaseShoppingCar.updateSelectedFlag`
return
http
(
data
)
// 修改购物车商品数量
export
function
shoppingCarUpdateNumber
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseShoppingCar.updateNumber`
return
http
(
params
)
}
...
...
@@ -103,33 +136,33 @@ export function updateSelectedFlag(data) {
// 添加采购订单
export
function
purchaseOrderAdd
(
data
)
{
data
.
method
=
`
${
path
}
purchaseOrder.add`
return
http
(
data
,
"post"
)
}
// export function purchaseOrderAdd(data) {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
// data.routerMethod = `${path}purchaseOrder.add`
// return http(data, "post")
// }
// 采购订单入库
export
function
purchaseOrderPutIn
(
data
)
{
data
.
method
=
`
${
path
}
purchaseOrder.putIn`
return
http
(
data
)
}
// 获取下单/入库门店
export
function
getMerchantList
(
data
)
{
data
.
method
=
`
${
path3
}
permission.yqMerchant.list`
return
http
(
data
,
"post"
)
}
// export function getMerchantList(data) {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
// data.routerMethod = `${path3}permission.yqMerchant.list`
// return http(data, "post")
// }
// 确认发货
export
function
purchaseOrderConfirmDelivery
(
data
)
{
data
.
method
=
`
${
path
}
purchaseOrder.confirmDelivery`
return
http
(
data
)
}
// export function purchaseOrderConfirmDelivery(data) {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
// data.routerMethod = `${path}purchaseOrder.confirmDelivery`
// return http(data)
// }
export
default
{
getPurchaseOrderList
,
purchaseOrderCancelOrCheck
,
purchaseOrderDetail
,
listWithPagePurchaseInfo
,
addressGet
,
addressSave
}
\ No newline at end of file
export
default
{
shoppingCarAdd
,
shoppingCarRemove
,
updateSelectedFlag
,
listGroupByGoodsType
,
getPurchaseOrderList
,
purchaseOrderCancelOrCheck
,
purchaseOrderDetail
,
listWithPagePurchaseInfo
,
addressGet
,
addressSave
}
\ No newline at end of file
src/api/modules/sysBase.js
View file @
5999eb0
/*
* @Author: limin
* @Date: 2019-08-26 18:02:55
* @Last Modified by: chenwq
* @Last Modified time: 2021-06-07 16:30:53
*/
import
{
http
}
from
'@/main'
// import RequestMethods from "./request.methods"
// export const BASE_DATA_URL = "fims.configuration.from.conftype"
import
{
http
,
http_common
}
from
'@/main'
const
path
=
"dj.api."
const
defaultPath
=
'scrm.api.carlife.'
// // 获取商品分类列表
// export function getProductType(data) {
// data.method = `${path}goods.type.list`
// return request(data)
// }
// 获取不同场景的商品分类
const
getGoodsCategoryConfiguration
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
currentPage
=
1
params
.
pageSize
=
999999
params
.
m
ethod
=
`
${
path
}
goodsCategoryConfiguration.page`
params
.
routerM
ethod
=
`
${
path
}
goodsCategoryConfiguration.page`
return
http
({
url
:
'rop-
dj-smartcarlife
/router'
,
url
:
'rop-
scrm-boutiquecoupon
/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// // 获取渠道列表
// export function getChannelType(data) {
// data.method = `${path}channel.type.list`
// return request(data)
// }
// // 图片上传
// export function uploadImg(data) {
// data.method = `${path}common.uploadImg`
// return request(data, RequestMethods.POST, ["file"])
// }
// // 图片识别
// export function imgRecognitionApi(data) {
// data.method = `${path}common.ocr.recognition`
// return request(data, RequestMethods.POST)
// }
// // 银行列表
// export function getBankListApi(data) {
// data.method = `${path}yseBankInfo.bankList`
// return request(data, RequestMethods.POST)
// }
// // 银行列表-支行
// export function getYseBankListApi(data) {
// data.method = `${path}yseBankInfo.listWithPage`
// return request(data, RequestMethods.POST)
// }
// // 给指定号码发送验证码
// export function sendToSmsCodeApi(data) {
// data.method = `${path}smartcarlife.sms.sendSmsCode`
// return request(data, RequestMethods.POST)
// }
// // 获取配置列表
// export function commonConfigApi(data) {
// data.method = `${path}common.config.list`
// return request(data, RequestMethods.POST)
// }
// // Excel异步导出
// export function asyncExportExcel(data) {
// data.method = `${path}common.async.exportExcel`
// return request(data, RequestMethods.POST)
// }
// // 获取Excel异步导出查询导出结果
// export function exportExcel(data) {
// data.method = `${path}common.query.async.exportExcel`
// return request(data, RequestMethods.POST)
// }
// // 视频上传
// export function uploadVideo(data) {
// data.method = `${path}smartcarlife.common.uploadVideo`
// return request(data, RequestMethods.POST, ["file"])
// }
// 视频上传
const
uploadVideo
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
common.uploadVideo`
return
http
({
url
:
'rop-scrm-carlife/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
noSignAttr
:
[
'file'
]
})
}
// // 类目列表获取
// export function queryFeeCategoryByType(data) {
// data.method = `${path}smartcarlife.feeCategory.queryFeeCategoryByType`
// return request(data, RequestMethods.POST)
// }
const
uploadImg
=
params
=>
{
params
.
method
=
'glsx.accounts.biz.common.pictureUpload'
return
http_common
({
url
:
'/router?method=glsx.accounts.biz.common.pictureUpload'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
noSignAttr
:
[
'file'
]
})
}
// // 2.0场景 素材可选的服务项目
// export function getProductServiceItems(data) {
// data.method = `dj.api.smartcarlife.vd.item.list.single`
// return request(data)
// }
export
default
{
getGoodsCategoryConfiguration
}
export
default
{
getGoodsCategoryConfiguration
,
uploadImg
,
uploadVideo
}
src/assets/css/public.scss
View file @
5999eb0
...
...
@@ -23,4 +23,12 @@ html {
}
.pointer
{
cursor
:
pointer
;
}
.carIcon
{
display
:
inline-block
;
width
:
22px
;
height
:
22px
;
background
:
url(../../images/shoppingCarIcon.webp)
no-repeat
;
background-size
:
100%
100%
;
margin-right
:
4px
;
}
\ No newline at end of file
src/config/index.js
View file @
5999eb0
...
...
@@ -9,22 +9,21 @@
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
let
cfg
=
require
(
'./conf.js'
)
import
{
Http
}
from
'glsx-common'
import
{
Http
,
utils
}
from
'glsx-common'
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
// console.log(1111111)
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
//
let { request } = cfg
//
Object.assign(request, { timeout })
//
return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }
)
return
new
Http
().
get
(
'http://192.168.3.171:7300/mock/6423df03079be3540abbb69e/purchase/config'
)
let
params
=
{
moduleName
:
'purchase'
,
mockUrl
:
'https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/purchase/config'
,
env
:
'test'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
return
utils
.
getConfig
(
params
)
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res
)
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
vue
.
prototype
.
$config
=
cfg
}
}
}
\ No newline at end of file
src/main.js
View file @
5999eb0
...
...
@@ -20,6 +20,7 @@ Vue.config.productionTip = false
Vue
.
prototype
.
$apis
=
apis
Vue
.
prototype
.
$$
=
optionalChaining
Vue
.
prototype
.
size
=
'small'
Vue
.
prototype
.
$EventBus
=
new
Vue
()
start
()
export
{
bootstrap
,
mount
,
unmount
}
from
'@/setup'
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
...
...
src/setup/qiankun.js
View file @
5999eb0
...
...
@@ -19,7 +19,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$messageBox
=
messageBox
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'b9f2cc80-19f7-4b55-bf90-3b32214aaff1'
}
})
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
"md5"
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue
.
use
(
GLButton
,
{
permissions
:
globalState
.
permissions
||
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
...
...
src/views/purchaseOrder/add.vue
View file @
5999eb0
...
...
@@ -56,23 +56,23 @@
</div>
</div>
<!-- 购物车组件 -->
<
!--
<shoppingCartCom
ref=
"shoppingCartCom"
:address-info=
"addressInfo"
@
editAddress=
"orderFrom"
/>
--
>
<
shoppingCartCom
ref=
"shoppingCartCom"
:address-info=
"addressInfo"
@
editAddress=
"orderFrom"
/
>
<addressCom
:visible
.
sync=
"addressComVisible"
@
handleConfirmAddress=
"addressGet"
:address-info=
"addressInfo"
/>
<
!--
<goodsDetailCom
:visible
.
sync=
"goodsDetailComVisible"
:goods-id=
"selectItem.id"
/>
--
>
<
goodsDetailCom
:visible
.
sync=
"goodsDetailComVisible"
:goods-id=
"selectItem.id"
/
>
</div>
</
template
>
<
script
>
//
import shoppingCartCom from './components/shoppingCartCom'
import
shoppingCartCom
from
'./components/shoppingCartCom'
import
addressCom
from
'./components/addressCom'
//
import goodsDetailCom from './components/goodsDetailCom'
import
goodsDetailCom
from
'./components/goodsDetailCom'
export
default
{
name
:
'PurchasingMall'
,
components
:
{
//
shoppingCartCom,
shoppingCartCom
,
addressCom
,
//
goodsDetailCom
goodsDetailCom
},
data
()
{
return
{
...
...
@@ -128,7 +128,6 @@ export default {
this
.
listWithPagePurchaseInfo
()
},
handleDetail
(
item
,
index
)
{
console
.
log
(
'index'
,
index
)
this
.
selectItem
=
item
this
.
goodsDetailComVisible
=
true
const
list
=
this
.
$common
.
utils
.
deepClone
(
this
.
purchaseList
)
...
...
@@ -192,11 +191,9 @@ export default {
updatedDate
:
1678093448000
,
deletedFlag
:
'N'
}
console
.
log
(
this
.
addressInfo
,
' this.addressInfo'
)
console
.
log
(
this
.
$$
(
this
.
addressInfo
,
'contactPhone'
))
if
(
this
.
showOrderCom
)
{
this
.
showOrderCom
=
false
//
this.$refs.shoppingCartCom.validateGoodsNumber()
this
.
$refs
.
shoppingCartCom
.
validateGoodsNumber
()
}
})
.
catch
(
err
=>
{
...
...
src/views/purchaseOrder/components/goodsDetailCom.vue
View file @
5999eb0
<
template
>
<!--
<div>
商品详情
</div>
-->
<GLDialog
:visible
.
sync=
"dialogShow"
title=
"产品详情"
:close-on-click-modal=
"false"
@
onOk=
"handleSubmit"
@
onCancel=
"handleDetailClose"
>
<div
class=
"detail-content"
>
<!-- 商品详情 -->
<div
class=
"goodsInfoCom"
>
<div
class=
"goodsInfoCom__left"
>
<img
:src=
"goodsInfo.thumbUrl"
alt=
""
/>
</div>
<div
class=
"goodsInfoCom__right"
>
<p
class=
"title two-line-ellipsis"
>
{{
goodsInfo
.
goodsName
}}
</p>
<div
class=
"priceCon"
>
<span
class=
"price"
>
价格:
<span
class=
"priceNum"
>
¥
{{
handleItemInfo
.
purchasePrice
}}
</span>
</span>
<span
class=
"turnover"
>
成交量:
<span
class=
"num"
>
{{
goodsInfo
.
purchaseOrderCount
||
0
}}
笔
</span>
</span>
</div>
<div
class=
"skuCon"
>
<div
class=
"label"
>
规格:
</div>
<div
class=
"itemCon"
>
<div
class=
"skuItem one-line-ellipsis pointer"
:class=
"
{ active: index === selectIndex }"
v-for="(item, index) in goodsInfo.upgradeGoodsList"
:key="index"
@click="
selectIndex = index
setHandleItemInfo(item)
"
>
{{
item
.
upgradeGoodsName
}}
</div>
</div>
</div>
<div
class=
"munCom"
>
<div
class=
"label"
>
数量:
</div>
<div
class=
"munItem"
>
<el-input-number
v-model=
"handleItemInfo.goodsNumber"
:min=
"1"
:max=
"9999"
></el-input-number>
</div>
<div
class=
"tips"
>
<!-- goodsItem.goodsType == 1 -->
{{
membraneTypeList
.
includes
(
goodsInfo
.
goodsType
)
?
`卷(1卷=${goodsInfo.convertedValue || 30
}
米)`
:
'件'
}}
<
/div
>
<
/div
>
<
el
-
button
class
=
"carBtn"
icon
=
"carIcon"
type
=
"primary"
@
click
=
"updateCarShopping"
>
加入购物车
<
/el-button
>
<
/div
>
<!--
<
i
class
=
"carIcon"
><
/i> --
>
<
/div
>
<
h3
>
产品详情
<
/h3
>
<
div
class
=
"goodsDescList"
>
<
div
class
=
"goodsDescItem"
v
-
for
=
"(item, index) in goodsInfo.goodsDescList"
:
key
=
"index"
>
<
img
:
src
=
"item.content"
v
-
if
=
"item.resType == 1"
class
=
"productDetailsImg"
alt
=
""
/>
<!--
<
div
class
=
"goodsDescItem__title"
>
{{
item
.
title
}}
<
/div> --
>
<
div
v
-
if
=
"item.resType == 2"
class
=
"goodsDescItem__content"
v
-
html
=
"item.content"
><
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/GLDialog
>
<
/template
>
<
script
>
import
{
membraneTypeList
}
from
'@/utils/constants.js'
export
default
{
name
:
'GoodsDetailCom'
,
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
}
,
selectItemInfo
:
{
type
:
Object
,
default
:
()
=>
{
}
}
,
goodsId
:
{
type
:
[
String
,
Number
]
// required: true
// default: '24'
}
}
,
data
()
{
return
{
// dialogShow: false,
membraneTypeList
,
goodsInfo
:
{
}
,
selectIndex
:
0
,
handleItemInfo
:
{
goodsNumber
:
1
,
upgradeGoodsId
:
''
,
purchasePrice
:
0
}
}
}
,
computed
:
{
dialogShow
:
{
get
()
{
return
this
.
visible
}
,
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
}
}
// selectItemInfo()
{
// // this.goodsInfo[]
// if (this.goodsInfo.upgradeGoodsList.length)
{
// let item = this.goodsInfo.upgradeGoodsList[this.selectIndex]
// return
{
// goodsNumber: this.goodsInfo.num,
// upgradeGoodsId: item.id
//
}
//
}
// // return this.selectItemInfo
//
}
}
,
watch
:
{
visible
(
val
)
{
if
(
val
)
{
this
.
getGoodsDetail
()
}
}
}
,
methods
:
{
getGoodsDetail
()
{
this
.
$apis
.
product
.
getProductInfo
({
id
:
this
.
goodsId
}
).
then
(
res
=>
{
this
.
goodsInfo
=
res
// 调试用
// for (let index = 0; index < 12; index++)
{
// this.goodsInfo.upgradeGoodsList[index] = this.goodsInfo.upgradeGoodsList[0]
//
}
// 默认选中第一个
const
item
=
this
.
goodsInfo
.
upgradeGoodsList
[
0
]
// console.log(item)
item
&&
this
.
setHandleItemInfo
(
item
)
}
)
}
,
setHandleItemInfo
(
item
)
{
console
.
log
(
item
)
const
{
id
,
purchasePrice
}
=
item
this
.
handleItemInfo
=
Object
.
assign
(
this
.
handleItemInfo
,
{
upgradeGoodsId
:
id
,
purchasePrice
}
)
}
,
handleDetailClose
()
{
this
.
dialogShow
=
false
}
,
updateCarShopping
()
{
const
params
=
{
goodsNumber
:
this
.
handleItemInfo
.
goodsNumber
,
upgradeGoodsId
:
this
.
handleItemInfo
.
upgradeGoodsId
}
// 判断是否有值
params
.
upgradeGoodsId
&&
this
.
$apis
.
purchaseShopping
.
shoppingCarAdd
(
params
).
then
(
res
=>
{
// console.log(res)
this
.
$message
.
success
(
'加入购物车成功'
)
this
.
$EventBus
.
$emit
(
'updateCarShopping'
)
this
.
dialogShow
=
false
}
)
// this.$message.success('加入购物车成功')
// this.$EventBus.$emit('updateCarShopping')
}
}
}
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
goodsInfoCom
{
display
:
flex
;
.
goodsInfoCom__left
{
width
:
400
px
;
height
:
400
px
;
img
{
width
:
100
%
;
height
:
100
%
;
}
}
.
goodsInfoCom__right
{
flex
:
1
;
margin
-
left
:
20
px
;
.
title
{
margin
:
0
;
font
-
weight
:
600
;
font
-
size
:
20
px
;
color
:
#
333333
;
}
.
priceCon
{
box
-
sizing
:
border
-
box
;
width
:
100
%
;
height
:
65
px
;
display
:
flex
;
align
-
items
:
center
;
justify
-
content
:
space
-
between
;
padding
:
0
10
px
;
margin
:
16
px
0
20
px
;
background
:
#
f2f5fb
;
border
-
radius
:
2
px
;
color
:
#
666666
;
.
price
{
display
:
flex
;
align
-
items
:
center
;
margin
-
left
:
8
px
;
}
.
num
{
margin
-
left
:
8
px
;
}
.
priceNum
{
font
-
weight
:
600
;
font
-
size
:
30
px
;
color
:
#
ee3040
;
}
}
.
skuCon
{
display
:
flex
;
// flex-wrap: wrap;
// align-items: center;
.
itemCon
{
flex
:
1
;
display
:
flex
;
flex
-
wrap
:
wrap
;
justify
-
content
:
space
-
between
;
}
.
skuItem
{
box
-
sizing
:
border
-
box
;
width
:
234
px
;
height
:
36
px
;
background
:
#
ffffff
;
border
:
1
px
solid
#
e7edf9
;
border
-
radius
:
2
px
;
color
:
#
333333
;
text
-
align
:
center
;
line
-
height
:
36
px
;
padding
:
0
10
px
;
margin
-
bottom
:
16
px
;
&
.
active
{
border
:
1
px
solid
#
185
efe
;
}
}
}
.
label
{
box
-
sizing
:
border
-
box
;
width
:
60
px
;
height
:
36
px
;
text
-
align
:
center
;
padding
-
left
:
18
px
;
line
-
height
:
36
px
;
color
:
#
666666
;
}
}
}
.
productDetailsImg
{
max
-
width
:
fit
-
content
;
}
.
munCom
{
display
:
flex
;
margin
-
bottom
:
20
px
;
.
tips
{
height
:
36
px
;
line
-
height
:
36
px
;
margin
-
left
:
8
px
;
font
-
size
:
12
px
;
color
:
#
666666
;
}
}
.
carBtn
{
display
:
flex
;
align
-
items
:
center
;
}
<
/style
>
src/views/purchaseOrder/components/shoppingCartCom.vue
View file @
5999eb0
This diff is collapsed.
Click to expand it.
src/views/purchaseOrder/index.vue
View file @
5999eb0
...
...
@@ -369,5 +369,6 @@ export default {
@include
dot;
background
:
$
color-gray
;
}
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment