Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
1dcea8ea
提交
1dcea8ea
编写于
10月 12, 2021
作者:
changdi.hao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化设置退款地址
上级
b2e8324c
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
61 行增加
和
8 行删除
+61
-8
baseApi.js
src/utils/base/baseApi.js
+9
-0
create-good.vue
src/views/goods/create-good.vue
+4
-3
create-shop.vue
src/views/shop/create-shop.vue
+48
-5
未找到文件。
src/utils/base/baseApi.js
浏览文件 @
1dcea8ea
...
@@ -32,3 +32,12 @@ export const getCounties = (params) => {
...
@@ -32,3 +32,12 @@ export const getCounties = (params) => {
params
:
params
,
params
:
params
,
});
});
};
};
// /*获取乡镇*/
export
const
getTowns
=
(
params
)
=>
{
return
fetch
({
url
:
getBaseUrl
(
`/basic-data/position/towns`
),
method
:
"get"
,
params
:
params
,
});
};
src/views/goods/create-good.vue
浏览文件 @
1dcea8ea
...
@@ -93,12 +93,12 @@
...
@@ -93,12 +93,12 @@
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否支持
退货退款
"
prop=
"expressLimitFlag"
v-if=
"storeType
<
3
"
>
<el-form-item
label=
"是否支持
售后
"
prop=
"expressLimitFlag"
v-if=
"storeType
<
3
"
>
<el-radio-group
v-model=
"formData.expressLimitFlag"
:disabled=
"!hasRepoFlag"
>
<el-radio-group
v-model=
"formData.expressLimitFlag"
:disabled=
"!hasRepoFlag"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
</el-radio-group>
</el-radio-group>
<p
class=
"backTip"
v-if=
"!hasRepoFlag"
@
click=
"goShopDeatil"
>
若需设置商品支持
退货退款
,需先至店铺页
<span
class=
"ad-back"
>
设置退款地址
</span></p>
<p
class=
"backTip"
v-if=
"!hasRepoFlag"
@
click=
"goShopDeatil"
>
若需设置商品支持
售后
,需先至店铺页
<span
class=
"ad-back"
>
设置退款地址
</span></p>
</el-form-item>
</el-form-item>
...
@@ -1094,12 +1094,13 @@
...
@@ -1094,12 +1094,13 @@
});
});
};
};
const
{
goodsInfo
,
medicalService
,
buyLimitDtoList
}
=
res
.
data
;
const
{
goodsInfo
,
medicalService
,
buyLimitDtoList
,
hasRepoFlag
}
=
res
.
data
;
this
.
formData
=
{...
this
.
formData
,
...
goodsInfo
};
this
.
formData
=
{...
this
.
formData
,
...
goodsInfo
};
this
.
formData2
=
medicalService
;
this
.
formData2
=
medicalService
;
this
.
formData
=
{
...
this
.
formData
,
...
this
.
formData2
};
this
.
formData
=
{
...
this
.
formData
,
...
this
.
formData2
};
this
.
buyLimitDtoList
=
buyLimitDtoList
;
this
.
buyLimitDtoList
=
buyLimitDtoList
;
this
.
hasRepoFlag
=
hasRepoFlag
;
this
.
$set
(
this
.
formData2
,
'suitableArr'
,
this
.
formData
.
suitable
.
split
(
','
));
this
.
$set
(
this
.
formData2
,
'suitableArr'
,
this
.
formData
.
suitable
.
split
(
','
));
this
.
$set
(
this
.
formData
,
'suitableArr'
,
this
.
formData
.
suitable
.
split
(
','
));
this
.
$set
(
this
.
formData
,
'suitableArr'
,
this
.
formData
.
suitable
.
split
(
','
));
this
.
formData
.
optPrice
=
this
.
formData
.
costPrice
/
100
;
this
.
formData
.
optPrice
=
this
.
formData
.
costPrice
/
100
;
...
...
src/views/shop/create-shop.vue
浏览文件 @
1dcea8ea
...
@@ -653,6 +653,24 @@
...
@@ -653,6 +653,24 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"townId"
label=
"乡/镇"
label-width=
"70px"
>
<el-select
v-model=
"warehouseAdressForm.townId"
class=
"warehouseAdress-input"
filterable
clearable
placeholder=
"乡/镇"
@
change=
"changeTown"
>
<el-option
v-for=
"item in townList"
:key=
"item.townId"
:label=
"item.townName"
:value=
"item.townId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"详细地址"
label-width=
"70px"
prop=
"addr"
>
<el-form-item
label=
"详细地址"
label-width=
"70px"
prop=
"addr"
>
<el-input
v-model=
"warehouseAdressForm.addr"
autocomplete=
"off"
clearable
class=
"warehouseAdress-input"
></el-input>
<el-input
v-model=
"warehouseAdressForm.addr"
autocomplete=
"off"
clearable
class=
"warehouseAdress-input"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -671,7 +689,7 @@ import { openLoading, closeLoading } from "../../utils/utils";
...
@@ -671,7 +689,7 @@ import { openLoading, closeLoading } from "../../utils/utils";
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
Cropper
from
"@/components/common/cropper.vue"
;
import
Cropper
from
"@/components/common/cropper.vue"
;
import
{
saveStore
,
queryStore
,
getLgCompanyList
,
getStoreAdressRepot
}
from
"@/utils/shop"
;
import
{
saveStore
,
queryStore
,
getLgCompanyList
,
getStoreAdressRepot
}
from
"@/utils/shop"
;
import
{
getProvinces
,
getCities
,
getCounties
}
from
'@/utils/base/baseApi'
;
import
{
getProvinces
,
getCities
,
getCounties
,
getTowns
}
from
'@/utils/base/baseApi'
;
import
{
checkMobile
}
from
"@/utils/patients/checkValid"
;
import
{
checkMobile
}
from
"@/utils/patients/checkValid"
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -765,9 +783,11 @@ export default {
...
@@ -765,9 +783,11 @@ export default {
provinceId: '',
provinceId: '',
cityId: '',
cityId: '',
countyId: '',
countyId: '',
townId: '',
provinceName: '',
provinceName: '',
cityName: '',
cityName: '',
countyName: '',
countyName: '',
townName: '',
addr: '',
addr: '',
key: ''
key: ''
},
},
...
@@ -776,6 +796,7 @@ export default {
...
@@ -776,6 +796,7 @@ export default {
provincesList: [],
provincesList: [],
cityList: [],
cityList: [],
countyList: [],
countyList: [],
townList: [],
warehouseAdressRules: {
warehouseAdressRules: {
receiver: [
receiver: [
{ required: true, message: "
请输入店铺名称
", trigger: "
blur
" },
{ required: true, message: "
请输入店铺名称
", trigger: "
blur
" },
...
@@ -792,6 +813,7 @@ export default {
...
@@ -792,6 +813,7 @@ export default {
provinceId: { required: true, message: "
请选择省
", trigger: ["
change
", "
blur
"] },
provinceId: { required: true, message: "
请选择省
", trigger: ["
change
", "
blur
"] },
cityId: { required: true, message: "
请选择市
", trigger: ["
change
", "
blur
"] },
cityId: { required: true, message: "
请选择市
", trigger: ["
change
", "
blur
"] },
countyId: { required: true, message: "
请选择区
/
县
", trigger: ["
change
", "
blur
"] },
countyId: { required: true, message: "
请选择区
/
县
", trigger: ["
change
", "
blur
"] },
townId: { required: true, message: "
请选择乡
/
镇
", trigger: ["
change
", "
blur
"] },
addr:[
addr:[
{ required: true, message: "
请输入详细收货地址
", trigger: "
blur
" }
{ required: true, message: "
请输入详细收货地址
", trigger: "
blur
" }
],
],
...
@@ -1030,9 +1052,6 @@ export default {
...
@@ -1030,9 +1052,6 @@ export default {
},
},
complete() {
complete() {
let flag = this.submitForm();
let flag = this.submitForm();
console.log('====== this.formData==============================');
console.log( this.formData);
console.log(flag);
if (flag) {
if (flag) {
// let para = {
// let para = {
// storeId: this.formData.storeId,
// storeId: this.formData.storeId,
...
@@ -1508,6 +1527,7 @@ export default {
...
@@ -1508,6 +1527,7 @@ export default {
Object.assign(this.warehouseAdressForm,this.formData.repotList[index]);
Object.assign(this.warehouseAdressForm,this.formData.repotList[index]);
this.getCitiesList();
this.getCitiesList();
this.getCountiesList();
this.getCountiesList();
this.getTownsList();
} else {
} else {
this.warehouseAdressForm = {
this.warehouseAdressForm = {
receiver: '',
receiver: '',
...
@@ -1515,9 +1535,11 @@ export default {
...
@@ -1515,9 +1535,11 @@ export default {
provinceId: '',
provinceId: '',
cityId: '',
cityId: '',
countyId: '',
countyId: '',
townId: '',
provinceName: '',
provinceName: '',
cityName: '',
cityName: '',
countyName: '',
countyName: '',
townName: '',
addr: '',
addr: '',
key: ''
key: ''
}
}
...
@@ -1549,6 +1571,7 @@ export default {
...
@@ -1549,6 +1571,7 @@ export default {
changeProvince() {
changeProvince() {
this.warehouseAdressForm.cityId = "";
this.warehouseAdressForm.cityId = "";
this.warehouseAdressForm.countyId = "";
this.warehouseAdressForm.countyId = "";
this.warehouseAdressForm.townId = "";
this.countyList = [];
this.countyList = [];
this.getCitiesList();
this.getCitiesList();
this.selectGet(this.warehouseAdressForm.provinceId, 'provinceId', 'provinceName',this.provincesList);
this.selectGet(this.warehouseAdressForm.provinceId, 'provinceId', 'provinceName',this.provincesList);
...
@@ -1556,13 +1579,20 @@ export default {
...
@@ -1556,13 +1579,20 @@ export default {
// 选择市
// 选择市
changeCity() {
changeCity() {
this.warehouseAdressForm.countyId = "";
this.warehouseAdressForm.countyId = "";
this.warehouseAdressForm.townId = "";
this.getCountiesList();
this.getCountiesList();
this.selectGet(this.warehouseAdressForm.cityId, 'cityId', 'cityName',this.cityList);
this.selectGet(this.warehouseAdressForm.cityId, 'cityId', 'cityName',this.cityList);
},
},
// 选择区
// 选择区
changeCounty() {
changeCounty() {
this.warehouseAdressForm.townId = "";
this.getTownsList();
this.selectGet(this.warehouseAdressForm.countyId, 'countyId', 'countyName',this.countyList);
this.selectGet(this.warehouseAdressForm.countyId, 'countyId', 'countyName',this.countyList);
},
},
// 选择乡镇
changeTown() {
this.selectGet(this.warehouseAdressForm.townId, 'townId', 'townName',this.townList);
},
//获取省列表
//获取省列表
getProvincesList() {
getProvincesList() {
getProvinces()
getProvinces()
...
@@ -1598,6 +1628,19 @@ export default {
...
@@ -1598,6 +1628,19 @@ export default {
}
}
})
})
.catch({});
.catch({});
},
//获取镇列表
getTownsList() {
let params = {
countyId: this.warehouseAdressForm.countyId
};
getTowns(params)
.then((res) => {
if (res.code == "
000000
") {
this.townList = res.data.townList;
}
})
.catch({});
},
},
/* slelect时,获取省市区对应的名称
/* slelect时,获取省市区对应的名称
* vId:省市区id
* vId:省市区id
...
@@ -1642,7 +1685,7 @@ export default {
...
@@ -1642,7 +1685,7 @@ export default {
},
},
// 格式化地址
// 格式化地址
setAddress(arg) {
setAddress(arg) {
return arg.provinceName + arg.cityName + arg.countyName + arg.addr;
return arg.provinceName + arg.cityName + arg.countyName + arg.
townName + arg.
addr;
},
},
// 获取退货物流
// 获取退货物流
getCompanyList() {
getCompanyList() {
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录