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
提交
5dc1b51c
提交
5dc1b51c
编写于
12月 01, 2021
作者:
张磊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
save
上级
b870a07e
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
153 行增加
和
74 行删除
+153
-74
create-shop.vue
src/views/shop/create-shop.vue
+151
-62
shop-list.vue
src/views/shop/shop-list.vue
+2
-12
未找到文件。
src/views/shop/create-shop.vue
浏览文件 @
5dc1b51c
...
...
@@ -11,7 +11,7 @@
<span>
{{
curmbSecond
}}
</span>
<span
class=
"verify-status"
style=
"margin-left: 20px"
>
{{
1
|
verifyStatus
}}
</span>
<span
v-if=
"certifyStatus > 1"
class=
"verify-status"
style=
"margin-left: 20px"
>
{{
certifyStatus
|
storeStatusFormat
}}
</span>
</p>
</el-col>
<el-col
:span=
"4"
style=
"text-align: right"
>
...
...
@@ -19,7 +19,7 @@
size=
"small"
type=
"primary"
:disabled=
"disabledFORM || storeData && storeData.tradeStore.storeType == 3"
@
click=
"complete"
@
click=
"complete
WholeForm
"
>
完成
</el-button
>
<el-button
size=
"small"
type=
"primary"
@
click=
"back"
>
返回
</el-button>
...
...
@@ -118,6 +118,7 @@
size=
"small"
clearable
:disabled=
"isDisabled"
@
change=
"storeTypeChange"
style=
"width: 35%"
>
<el-option
...
...
@@ -133,7 +134,7 @@
</el-form-item>
</el-tab-pane>
<el-tab-pane
v-if=
"formData.storeType != 3"
label=
"资质信息"
name=
"second"
>
<el-tab-pane
label=
"资质信息"
name=
"second"
>
<div>
<div
v-if=
"certifyValidDtoList(1)"
>
<el-form-item>
...
...
@@ -401,7 +402,7 @@
>
</el-cascader>
</el-form-item>
<el-form-item
class=
"required-label"
label=
"营业证明"
>
<el-form-item
v-if=
"formData.storeType != 3"
class=
"required-label"
label=
"营业证明"
>
<p
v-if=
"certifyValidDtoList(2)"
class=
"red"
>
{{
certifyValidDtoList
(
2
)
}}
</p>
<p
class=
"tips"
>
营业执照
</p>
<p
class=
"p-tips"
>
...
...
@@ -480,12 +481,12 @@
</div>
</div>
<el-form-item
v-if=
"formData.storeType == 1"
label=
"认证类型"
label-width=
"100px"
>
<el-radio-group
v-model=
"formData.
isLegal
"
>
<el-radio-group
v-model=
"formData.
certifyReq.certType
"
>
<el-radio
:label=
"1"
>
法人认证
</el-radio>
<el-radio
:label=
"2"
>
委托人认证
</el-radio>
</el-radio-group>
</el-form-item>
<div
v-if=
"formData.
isLegal
== 2"
>
<div
v-if=
"formData.
certifyReq.certType
== 2"
>
<p
v-if=
"certifyValidDtoList(4)"
class=
"red"
>
{{
certifyValidDtoList
(
4
)
}}
</p>
<div
v-if=
"formData.storeType == 1"
>
<div>
委托人身份证
</div>
...
...
@@ -587,7 +588,7 @@
</div>
</div>
</div>
<div
v-if=
"formData.
isLegal == 2
"
class=
"flex-upload"
>
<div
v-if=
"formData.
certifyReq.certType == 2|| formData.storeType == 2
"
class=
"flex-upload"
>
<p
v-if=
"certifyValidDtoList(5)"
class=
"red"
>
{{
certifyValidDtoList
(
5
)
}}
</p>
<div>
委托书
</div>
<el-upload
...
...
@@ -621,7 +622,7 @@
</el-upload>
</div>
<div
v-if=
"formData.storeType == 1 && formData.
isLegal
=== 1"
>
<div
v-if=
"formData.storeType == 1 && formData.
certifyReq.certType
=== 1"
>
<p
v-if=
"certifyValidDtoList(6)"
class=
"red"
>
{{
certifyValidDtoList
(
6
)
}}
</p>
<div>
法人身份证
</div>
<div
class=
"flex-wrap"
>
...
...
@@ -728,7 +729,7 @@
</el-form-item>
</div>
</div>
<div
v-if=
"formData.storeType == 1 && formData.
isLegal
=== 2"
>
<div
v-if=
"formData.storeType == 1 && formData.
certifyReq.certType
=== 2"
>
<p
v-if=
"certifyValidDtoList(6)"
class=
"red"
>
{{
certifyValidDtoList
(
6
)
}}
</p>
<div>
法人身份证
</div>
<div
class=
"flex-wrap"
>
...
...
@@ -1315,7 +1316,7 @@
<
script
>
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
dayjs
from
'dayjs'
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
openLoading
,
closeLoading
,
deepCopy
}
from
"../../utils/utils"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
Cropper
from
"@/components/common/cropper.vue"
;
import
{
saveStore
,
queryStore
,
getLgCompanyList
,
getStoreAdressRepot
,
OCRStore
,
idCardOcr
,
orgOptionList
,
orgScopeOptionList
}
from
"@/utils/shop"
;
...
...
@@ -1364,7 +1365,6 @@ export default {
licenseDate: '',
orgRegionValueFirst: '请选择地区',
formData: {
orgRegionValue: [],
storeId: null,
userId: null,
storeQualityUrl:"",
...
...
@@ -1400,6 +1400,7 @@ export default {
imgUrlC3: "", //证明图3
imgUrlC4: "",
imgUrlC5: "",
imgUrlP7Date: '',
imgUrlP6Date: '',
imgUrlP5Date: '',
imgUrlP4Date: '',
...
...
@@ -1415,19 +1416,20 @@ export default {
expressLimitFlag: 0, //是否限制物流公司
repotExpressList:[], //支持的物流公司
expressDesc: '', //退款说明
isLegal: 1,
certifyReq:{
areaStr: [],
orgType: '',
orgName:'',
licenseUrl:'',
licenseValidDateBegin:'',
licenseValidDateEnd:'',
licenseType: 1,
certType: 1,
creditCode:'',
assignor_letter_url:'',
bizScope:''
assignorLetterUrl:'',
bizScope:'',
certifyLicenseImgList: []
},
certifyLicenseImgList: []
},
cpmList: [], //所有的物流公司
warehouseAdressType: 0, // 0为新建地址,1为编辑地址
...
...
@@ -1592,6 +1594,7 @@ export default {
imgUrlP4:[{type: "
string
", required: true, message: '请上传图片', trigger: 'change'}],
imgUrlP5:[{type: "
string
", required: true, message: '请上传图片', trigger: 'change'}],
imgUrlP6:[{type: "
string
", required: true, message: '请上传图片', trigger: 'change'}],
imgUrlP7:[{type: "
string
", required: true, message: '请上传图片', trigger: 'change'}],
imgUrlC1:[{type: "
string
", required: true, message: '请上传图片', trigger: 'change'}],
imgUrlC2:[{type: "
string
", required: true, message: '请上传图片', trigger: 'change'}],
imgUrlC3:[{type: "
string
", required: true, message: '请上传图片', trigger: 'change'}],
...
...
@@ -1600,6 +1603,7 @@ export default {
imgUrlP4Date:[{type: "
array
", required: true, message: '请选择有效日期', trigger: 'change'}],
imgUrlP5Date:[{type: "
array
", required: true, message: '请选择有效日期', trigger: 'change'}],
imgUrlP6Date:[{type: "
array
", required: true, message: '请选择有效日期', trigger: 'change'}],
imgUrlP7Date:[{type: "
array
", required: true, message: '请选择有效日期', trigger: 'change'}],
},
imgMouseOver1: false,
uploadImgMessage1: false, //未上传图片,校验提示语
...
...
@@ -1649,6 +1653,7 @@ export default {
},
orgLIST: [],
orgScopeLIST:[],
certifyStatus: ''
};
},
computed: {
...
...
@@ -1673,6 +1678,7 @@ export default {
created() {
vm = this;
this.activeTabName = this.$route.query.currentTab || 'first';
this.certifyStatus = this.$route.query.certifyStatus || null;
this.disabledFORM = this.$route.query.disabled == 'false' ? false : true;
this.getCompanyList();
...
...
@@ -1685,22 +1691,33 @@ export default {
const e = await this.orgOptionList();
if(q && w && e){
const storeId = this.$route.query.storeId || null;
const s = storejs.get('store_info');
if(storeId){
// 编辑 详情
this.curmbSecond = "
编辑店铺
";
this.isDisabled = true;
if(s && s.storeId == storeId){
this.formData = s;
const {orgRegionValue} = s;
const v = orgRegionValue.map(i => {return i.label;}).join('/');
this.orgRegionValueFirst = v;
this.orgDateReverse();
}else{
if(this.disabledFORM){
this.formData.storeId = storeId;
storejs.remove('store_info');
this.initInfo();
this.getDetail();
}else{
if(s && s.storeId == storeId){
this.formData = s;
const {areaStr} = s.certifyReq;
const v = areaStr.map(i => {return i.label;}).join('/');
this.orgRegionValueFirst = v;
this.areaStr = v;
this.orgDateReverse();
this.resetImgUrl();
}else{
this.formData.storeId = storeId;
storejs.remove('store_info');
this.initInfo();
this.getDetail();
}
}
}else{
// 新建店铺
...
...
@@ -1709,8 +1726,8 @@ export default {
if(s){
// 存在数据 就反现
this.formData = s;
const {
orgRegionValue} = s
;
const v =
orgRegionValue
.map(i => {return i.label;}).join('/');
const {
areaStr} = s.certifyReq
;
const v =
areaStr
.map(i => {return i.label;}).join('/');
this.orgRegionValueFirst = v;
this.orgDateReverse();
}
...
...
@@ -1720,20 +1737,44 @@ export default {
//日期 设置
orgDateReverse () {
const {licenseValidDateBegin,licenseValidDateEnd,legalValidDateBegin, legalValidDateEnd, assignorValidDateBegin, assignorValidDateEnd} = this.formData.certifyReq;
const {certifyLicenseImgList} = this.formData;
const {certifyLicenseImgList} = this.formData
.certifyReq
;
this.formData.imgUrlC1Date = [licenseValidDateBegin, licenseValidDateEnd];
this.formData.imgUrlC5Date = [assignorValidDateBegin, assignorValidDateEnd];
this.formData.imgUrlC5Date = [legalValidDateBegin, legalValidDateEnd];
certifyLicenseImgList.map(i => {
const n = `imgUrlP${i.imageType}Date`;
const m = `imgUrlP${i.imageType}`;
this.formData[n] = [i.validDateBegin, i.validDateEnd];
this.formData[m] = i.url;
})
// imgUrlP5Date
},
resetImgUrl () {
// 营业执照 legalCertBackUrl legalCertFrontUrl
const s = this.formData.certifyReq;
this.formData.imgUrlC3 = s.legalCertBackUrl;
this.formData.imgUrlC2 = s.legalCertFrontUrl;
this.formData.imgUrlC1 = s.licenseUrl;
this.formData.imgUrlC5 = s.assignorCertBackUrl;
this.formData.imgUrlC4 = s.assignorCertFrontUrl;
this.formData.imgUrlP7 = s.assignorLetterUrl;
},
getDetail() {
getStoreAdressRepot(this.formData.storeId).then(res => {
if (res.code == "
000000
") {
Object.assign(this.formData,res.data);
const l = res.data;
const {areaStr, bizScope} = l.certifyReq;
l.certifyReq.areaStr = JSON.parse(areaStr);
l.certifyReq.bizScope = JSON.parse(bizScope);
Object.assign(this.formData, l);
const v = JSON.parse(areaStr).map(i => {return i.label;}).join('/');
this.orgRegionValueFirst = v;
this.areaStr = v;
this.orgDateReverse();
this.resetImgUrl();
} else {
this.$message.error(res.message);
}
...
...
@@ -1799,7 +1840,7 @@ export default {
} else if (storeType == 2) {
this.formData.drugstoreName = storeOwner;
this.formData.drugstorePhone = storePhone;
this.formData.
isLegal
= 2;
this.formData.
certifyReq.certType
= 2;
if (this.storeData.imageList && this.storeData.imageList.length) {
this.storeData.imageList.map((item) => {
if (item.imageSort == 1) {
...
...
@@ -1837,23 +1878,57 @@ export default {
}
});
},
complete() {
complete
WholeForm
() {
let flag = this.submitForm();
if (flag) {
this.formData.storeType = Number(this.formData.storeType);
this.formData.storeEntry = "
PCKAIDIAN
"; // 添加店铺渠道
console.log("
提交的数据
", this.formData);
saveStore(this.formData).then((res) => {
if (res.code == "
000000
") {
this.$message.success("
操作成功
");
this.$router.push({
path: "
/
shop
-
list
",
});
} else {
this.$message.error(res.message);
}
if (flag && this.certifyStatus == 3) {
this.$confirm('确定要删除这条地址信息么?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '',
type: 'error'
}).then(() => {
this.formData.storeType = Number(this.formData.storeType);
this.formData.storeEntry = "
PCKAIDIAN
"; // 添加店铺渠道
const {bizScope, areaStr} = this.formData.certifyReq;
const result = deepCopy(this.formData);
result.certifyReq.bizScope = JSON.stringify(bizScope);
result.certifyReq.areaStr = JSON.stringify(areaStr);
console.log("
提交的数据
", result);
saveStore(result).then((res) => {
if (res.code == "
000000
") {
storejs.remove('store_info');
this.$message.success("
操作成功
");
this.$router.push({
path: "
/
shop
-
list
",
});
} else {
this.$message.error(res.message);
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
}else if(flag) {
this.formData.storeType = Number(this.formData.storeType);
this.formData.storeEntry = "
PCKAIDIAN
"; // 添加店铺渠道
const {bizScope, areaStr} = this.formData.certifyReq;
const result = deepCopy(this.formData);
result.certifyReq.areaStr = JSON.stringify(areaStr);
result.certifyReq.bizScope = JSON.stringify(bizScope);
console.log("
提交的数据
", result);
saveStore(result).then((res) => {
if (res.code == "
000000
") {
storejs.remove('store_info');
this.$message.success("
操作成功
");
// this.$router.push({
// path: "
/
shop
-
list
",
// });
} else {
this.$message.error(res.message);
}
});
}
},
// 返回
...
...
@@ -2092,7 +2167,7 @@ export default {
orgDate (v, type) {
const b = dayjs(v[0]).format('YYYY-MM-DD');
const e = dayjs(v[1]).format('YYYY-MM-DD');
const l = this.formData.certifyLicenseImgList;
const l = this.formData.certify
Req.certify
LicenseImgList;
const t = type.charAt(type.length-1);
switch (type) {
case 'imgUrlC1':
...
...
@@ -2121,10 +2196,12 @@ export default {
case 'imgUrlP5':
// 二类医疗器械经营备案凭证
case 'imgUrlP6':
// 委托书
case 'imgUrlP7':
// 年度报告
const r = l.filter( i => {return i.imageType == t})[0] || {};
l.push(Object.assign(r, {validDateBegin: b, validDateEnd: e, imageType: t}));
this.formData.certifyLicenseImgList = this.clearRepeat(l, 'imageType');
this.formData.certify
Req.certify
LicenseImgList = this.clearRepeat(l, 'imageType');
console.log('--this.formData', this.formData);
break;
default:
...
...
@@ -2215,7 +2292,7 @@ export default {
return isJPG && isLt2M;
},
setImgUrl (path, fileLimit) {
const l = this.formData.certifyLicenseImgList;
const l = this.formData.certify
Req.certify
LicenseImgList;
const f = path.fullPath;
const imgName = fileLimit.key;
const u = this.formData[imgName];
...
...
@@ -2243,7 +2320,7 @@ export default {
break;
case 'imgUrlP7':
// 委托书
this.formData.certifyReq.assignor
_letter_u
rl = u;
this.formData.certifyReq.assignor
LetterU
rl = u;
break;
case 'imgUrlP1':
// 药品经营许可证
...
...
@@ -2256,10 +2333,11 @@ export default {
case 'imgUrlP5':
// 二类医疗器械经营备案凭证
case 'imgUrlP6':
// 委托书
// 年度报告
const r = l.filter( i => {return i.imageType == t})[0] || {};
l.push(Object.assign(r, {url: f, imageType: t}));
this.formData.certifyLicenseImgList = this.clearRepeat(l, 'imageType');
this.formData.certify
Req.certify
LicenseImgList = this.clearRepeat(l, 'imageType');
break;
default:
return false;
...
...
@@ -2277,6 +2355,7 @@ export default {
.set("
imgUrlP4
", "
imgMouseOverP4
")
.set("
imgUrlP5
", "
imgMouseOverP5
")
.set("
imgUrlP6
", "
imgMouseOverP6
")
.set("
imgUrlP7
", "
imgMouseOverP7
")
.set("
imgUrlC1
", "
imgMouseOverC1
")
.set("
imgUrlC2
", "
imgMouseOverC2
")
.set("
imgUrlC3
", "
imgMouseOverC3
")
...
...
@@ -2291,7 +2370,7 @@ export default {
this.deleteImgFormData(type);
},
deleteImgFormData (type) {
const l = this.formData.certifyLicenseImgList;
const l = this.formData.certify
Req.certify
LicenseImgList;
const t = type.charAt(type.length-1);
switch (type) {
case 'imgUrlC1':
...
...
@@ -2315,7 +2394,7 @@ export default {
this.formData.certifyReq.legalCertBackUrl = '';
break;
case 'imgUrlP7':
this.formData.certifyReq.assignor
_letter_u
rl = '';
this.formData.certifyReq.assignor
LetterU
rl = '';
// 委托书
break;
case 'imgUrlP1':
...
...
@@ -2331,7 +2410,7 @@ export default {
case 'imgUrlP6':
// 年度报告
const r = l.filter( i => {return i.imageType != t}) || [];
this.formData.certifyLicenseImgList = r;
this.formData.certify
Req.certify
LicenseImgList = r;
break;
default:
return false;
...
...
@@ -2665,7 +2744,7 @@ export default {
n.push({label: i.label, value: i.value});
});
// countyId provinceId townId cityId
this.formData.
orgRegionValue
= n;
this.formData.
certifyReq.areaStr
= n;
this.formData.certifyReq.provinceId = v[0] || '';
this.formData.certifyReq.cityId = v[1] || '';
this.formData.certifyReq.countyId = v[2] || '';
...
...
@@ -2739,19 +2818,29 @@ export default {
const l = vm.formData.certifyValidDtoList || [];
return l.filter(i => {return i.infoType == v;})[0] || '';
},
storeTypeChange () {
vm.formData.certifyValidDtoList = [];
console.log('--vm.formData', vm.formData);
}
},
filters: {
verifyStatus: function(value){
if (!value && value != 0) {
return "
-
";
} else {
let hash = {
1: "
审核通过
",
2: "
审核中
",
3: "
审核不通过
"
};
return hash[value];
storeStatusFormat(v) {
let s = '';
switch (v) {
case 2:
s = '待审核'
break;
case 3:
s = '审核成功'
break;
case 4:
s = '审核失败'
break;
default:
s =''
break;
}
return s;
}
},
};
...
...
src/views/shop/shop-list.vue
浏览文件 @
5dc1b51c
...
...
@@ -302,10 +302,7 @@
label
:
"固定分佣"
}],
storeTypeList
:
[
{
value
:
1
,
label
:
"未认证"
},
{
value
:
2
,
label
:
"认证提交中"
...
...
@@ -317,10 +314,6 @@
{
value
:
4
,
label
:
"审核失败"
},
{
value
:
5
,
label
:
"作废"
},
],
setPriceVisible
:
false
,
...
...
@@ -725,9 +718,6 @@
storeStatusFormat
(
v
)
{
let
s
=
''
;
switch
(
v
)
{
case
1
:
s
=
'未认证'
break
;
case
2
:
s
=
'待审核'
break
;
...
...
@@ -738,7 +728,7 @@
s
=
'审核失败'
break
;
default
:
s
=
'审核
通过
'
s
=
'审核
成功
'
break
;
}
return
s
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录