Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
b2e8324c
提交
b2e8324c
编写于
10月 11, 2021
作者:
changdi.hao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
联调设置售后地址
上级
e6052bf3
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
79 行增加
和
43 行删除
+79
-43
index.js
src/utils/shop/index.js
+10
-1
create-good.vue
src/views/goods/create-good.vue
+24
-9
forms.js
src/views/goods/forms.js
+1
-1
goods-manage.vue
src/views/goods/goods-manage.vue
+4
-3
create-shop.vue
src/views/shop/create-shop.vue
+37
-27
shop-list.vue
src/views/shop/shop-list.vue
+3
-2
未找到文件。
src/utils/shop/index.js
浏览文件 @
b2e8324c
...
...
@@ -145,4 +145,13 @@ export const getLgCompanyList = () => {
method
:
"get"
,
description
:
"获取物流公司"
,
});
};
\ No newline at end of file
};
export
const
getStoreAdressRepot
=
(
storeId
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`store/query/
${
storeId
}
/repot`
),
method
:
"get"
,
description
:
"获取店铺退货地址信息"
,
});
};
src/views/goods/create-good.vue
浏览文件 @
b2e8324c
...
...
@@ -93,12 +93,12 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"是否支持退货退款"
prop=
"
hcd
"
>
<el-radio-group
v-model=
"formData.
hcd"
disabled=
"hcd
"
>
<el-form-item
label=
"是否支持退货退款"
prop=
"
expressLimitFlag"
v-if=
"storeType
<
3
"
>
<el-radio-group
v-model=
"formData.
expressLimitFlag"
:disabled=
"!hasRepoFlag
"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
</el-radio-group>
<p
class=
"backTip"
>
若需设置商品支持退货退款,需先至店铺页
<span
class=
"ad-back"
>
设置退款地址
</span></p>
<p
class=
"backTip"
v-if=
"!hasRepoFlag"
@
click=
"goShopDeatil"
>
若需设置商品支持退货退款,需先至店铺页
<span
class=
"ad-back"
>
设置退款地址
</span></p>
</el-form-item>
...
...
@@ -1001,17 +1001,19 @@
limitVisibleFlag
:
false
,
limit
:{
title
:
"限购条件"
}
},
storeType
:
1
,
//1: "供货商",2: "小药房",3: "医生小店"
hasRepoFlag
:
0
//店铺是否有退货地址
}
},
created
()
{
vm
=
this
;
const
{
id
,
storeId
,
goodsType
,
inputType
,
commissionFlag
}
=
this
.
$route
.
query
;
const
{
id
,
storeId
,
goodsType
,
inputType
,
commissionFlag
,
storeType
}
=
this
.
$route
.
query
;
this
.
goodsType
=
goodsType
;
this
.
storeId
=
storeId
;
this
.
inputType
=
inputType
||
''
;
this
.
commissionFlag
=
commissionFlag
;
this
.
storeType
=
storeType
;
// this.formData = originForm;
// this.formData1 = originForm1;
// this.formData2 = originForm2;
...
...
@@ -1118,6 +1120,7 @@
goodsType
:
''
,
pageNo
:
1
,
pageSize
:
10
,
storeId
:
this
.
storeId
});
if
(
res
.
code
!=
'000000'
){
return
this
.
$message
({
...
...
@@ -1131,9 +1134,10 @@
type
:
'error'
});
}
const
{
goodsList
}
=
res
.
data
;
const
{
goodsList
,
hasRepoFlag
}
=
res
.
data
;
this
.
formData1
=
goodsList
[
0
];
this
.
formData
=
goodsList
[
0
];
this
.
hasRepoFlag
=
hasRepoFlag
;
this
.
buyLimitDtoList
=
this
.
formData
.
buyLimitDtoList
;
this
.
formData
.
optPrice
=
this
.
formData
.
costPrice
/
100
;
this
.
fileGoodsList
=
this
.
getImges
(
goodsList
[
0
].
goodsImgList
,
1
);
...
...
@@ -1515,7 +1519,8 @@
path
:
'/goods-manage'
,
query
:
{
storeId
:
this
.
formData
.
storeId
,
commissionFlag
:
this
.
commissionFlag
commissionFlag
:
this
.
commissionFlag
,
storeType
:
this
.
storeType
}
})
})
...
...
@@ -1794,8 +1799,17 @@
}
return
flag
;
}
}
,
goShopDeatil
()
{
this
.
$router
.
push
({
path
:
`/create-shop`
,
query
:{
storeId
:
this
.
storeId
,
// storeData: JSON.stringify(row),
}
})
}
},
}
</
script
>
...
...
@@ -1868,6 +1882,7 @@
.backTip
{
font-size
:
12px
;
color
:
red
;
cursor
:
pointer
;
}
.ad-back
{
color
:
#449284
;
...
...
src/views/goods/forms.js
浏览文件 @
b2e8324c
...
...
@@ -18,7 +18,7 @@ const form1 = {
barCode
:
""
,
modelNo
:
""
,
// 型号
standardNo
:
""
,
// 执行标准号
hcd
:
'1'
//是否支持退货退款
expressLimitFlag
:
"0"
,
//是否支持退货退款
};
const
form2
=
{
...
...
src/views/goods/goods-manage.vue
浏览文件 @
b2e8324c
...
...
@@ -486,9 +486,10 @@
vm
=
this
;
this
.
getLists
()
this
.
getLever
()
const
{
storeId
,
commissionFlag
}
=
this
.
$route
.
query
;
const
{
storeId
,
commissionFlag
,
storeType
}
=
this
.
$route
.
query
;
this
.
searchForm
.
storeId
=
Number
(
storeId
)
||
0
;
this
.
commissionFlag
=
commissionFlag
;
this
.
storeType
=
storeType
;
// if(storeId){
// this.searchForm.storeId = storeId
// }
...
...
@@ -694,9 +695,9 @@
const
{
goodsType
}
=
row
;
let
url
=
''
if
(
row
==
'add'
){
url
=
`/create-good?id=add&storeId=
${
this
.
searchForm
.
storeId
}
&inputType=1&commissionFlag=
${
this
.
commissionFlag
}
`
url
=
`/create-good?id=add&storeId=
${
this
.
searchForm
.
storeId
}
&inputType=1&commissionFlag=
${
this
.
commissionFlag
}
&storeType=
${
this
.
storeType
}
`
}
else
{
url
=
`/create-good?id=
${
row
.
goodsId
}
&storeId=
${
this
.
searchForm
.
storeId
}
&goodsType=
${
goodsType
}
&commissionFlag=
${
this
.
commissionFlag
}
`
url
=
`/create-good?id=
${
row
.
goodsId
}
&storeId=
${
this
.
searchForm
.
storeId
}
&goodsType=
${
goodsType
}
&commissionFlag=
${
this
.
commissionFlag
}
&storeType=
${
this
.
storeType
}
`
}
// this.$store.dispatch('goodsManage/changeGoodsInfo', {...row});
this
.
$router
.
push
({
...
...
src/views/shop/create-shop.vue
浏览文件 @
b2e8324c
...
...
@@ -534,11 +534,11 @@
</el-form-item>
<el-form-item
label=
"退货支持的物流公司"
class=
"required-label"
v-if=
"formData.storeType
<
3
"
>
<el-radio-group
v-model=
"formData.expressLimitFlag"
@
change=
"changeExpressLimitFlag"
>
<el-radio
:label=
"
1
"
>
无限制
</el-radio>
<el-radio
:label=
"
2
"
>
有限制
</el-radio>
<el-radio
:label=
"
0
"
>
无限制
</el-radio>
<el-radio
:label=
"
1
"
>
有限制
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"物流公司名称"
prop=
"repotExpressList"
class=
"required-label"
v-if=
"formData.expressLimitFlag
== 2
&& formData.storeType
<
3
"
>
<el-form-item
label=
"物流公司名称"
prop=
"repotExpressList"
class=
"required-label"
v-if=
"formData.expressLimitFlag && formData.storeType
<
3
"
>
<el-select
v-model=
"formData.repotExpressList"
filterable
...
...
@@ -670,7 +670,7 @@ let vm = null;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
Cropper
from
"@/components/common/cropper.vue"
;
import
{
saveStore
,
queryStore
,
getLgCompanyList
}
from
"@/utils/shop"
;
import
{
saveStore
,
queryStore
,
getLgCompanyList
,
getStoreAdressRepot
}
from
"@/utils/shop"
;
import
{
getProvinces
,
getCities
,
getCounties
}
from
'@/utils/base/baseApi'
;
import
{
checkMobile
}
from
"@/utils/patients/checkValid"
;
export
default
{
...
...
@@ -738,21 +738,21 @@ export default {
imgUrlC2: "", //证明图2
imgUrlC3: "", //证明图3
repotList:[//仓库地址
{
addr: "
asdasd
",
cityId: 130300000000,
cityName: "
秦皇岛市
",
countyId: 130306000000,
countyName: "
抚宁县
",
key: 0,
provinceId: 130,
provinceName: "
河北省
",
receiver: "
河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省
",
receiverMobile: "
13889873718
"
}
//
{
//
addr: "
asdasd
",
//
cityId: 130300000000,
//
cityName: "
秦皇岛市
",
//
countyId: 130306000000,
//
countyName: "
抚宁县
",
//
key: 0,
//
provinceId: 130,
//
provinceName: "
河北省
",
//
receiver: "
河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省
",
//
receiverMobile: "
13889873718
"
//
}
],
selectedKey: '', //默认收货地址
expressLimitFlag:
1
, //是否限制物流公司
expressLimitFlag:
0
, //是否限制物流公司
repotExpressList:[], //支持的物流公司
expressDesc: '' //退款说明
},
...
...
@@ -913,22 +913,29 @@ export default {
created() {
vm = this;
this.formData.storeId = this.$route.query.storeId || null;
this.storeData = this.$route.query.storeData || null;
// this.storeData = this.$route.query.storeData || null;
this.getProvincesList();
this.getCompanyList();
if (this.formData.storeId) {
this.curmbSecond = "
编辑店铺
";
this.storeData = JSON.parse(this.storeData);
this.isDisabled = true;
this.initInfo();
this.get
StoreInfo
();
this.get
Detail
();
} else {
this.curmbSecond = "
新建店铺
";
this.isDisabled = false;
}
this.getProvincesList();
this.getCompanyList();
},
methods: {
getDetail() {
getStoreAdressRepot(this.formData.storeId).then(res => {
if (res.code == "
000000
") {
Object.assign(this.formData,res.data)
} else {
this.$message.error(res.message);
}
})
},
//回显数据处理
getStoreInfo() {
if (!this.storeData || !this.storeData.tradeStore) return;
...
...
@@ -1009,9 +1016,13 @@ export default {
initInfo() {
let req = {
storeId: this.formData.storeId,
pageNo: 1,
pageSize: 10,
};
queryStore(req).then((res) => {
if (res.code == "
000000
") {
this.storeData = res.data.tradeStore[0];
this.getStoreInfo();
} else {
this.$message.error(res.message);
}
...
...
@@ -1021,8 +1032,7 @@ export default {
let flag = this.submitForm();
console.log('====== this.formData==============================');
console.log( this.formData);
console.log('====================================');
return
console.log(flag);
if (flag) {
// let para = {
// storeId: this.formData.storeId,
...
...
@@ -1620,13 +1630,13 @@ export default {
message: `${warehouseAdressFormTitle}成功!`
});
this.$refs['warehouseAdressForm'].resetFields();
//
this.warehouseAdressFormVisible = false;
this.warehouseAdressFormVisible = false;
}
});
},
// 切换退货支持的物流公司类型
changeExpressLimitFlag() {
if(
this.formData.expressLimitFlag == 1
) {
if(
!this.formData.expressLimitFlag
) {
this.formData.repotExpressList = [];
}
},
...
...
src/views/shop/shop-list.vue
浏览文件 @
b2e8324c
...
...
@@ -386,7 +386,8 @@
path
:
'/goods-manage'
,
query
:
{
storeId
:
row
.
tradeStore
.
id
,
commissionFlag
:
row
.
tradeStore
.
commissionFlag
commissionFlag
:
row
.
tradeStore
.
commissionFlag
,
storeType
:
row
.
tradeStore
.
storeType
// 1: "供货商",2: "小药房",3: "医生小店"
}
});
window
.
open
(
routeData
.
href
,
'_blank'
);
...
...
@@ -420,7 +421,7 @@
path
:
`/create-shop`
,
query
:{
storeId
:
row
.
tradeStore
.
id
,
storeData
:
JSON
.
stringify
(
row
),
//
storeData: JSON.stringify(row),
}
})
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录