Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
bb9ce402
提交
bb9ce402
编写于
3月 30, 2022
作者:
shuang.zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品分类修复
上级
47e82fc0
变更
2
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
44 行增加
和
33 行删除
+44
-33
create-good-new.scss
src/views/goods/create-good-new.scss
+1
-1
create-good-new.vue
src/views/goods/create-good-new.vue
+43
-32
未找到文件。
src/views/goods/create-good-new.scss
浏览文件 @
bb9ce402
...
...
@@ -45,7 +45,7 @@
color
:
#f56c6c
;
margin-right
:
4px
;
}
.project-req
{
.
goods-category
,
.
project-req
{
.
el-form-item__label
:
:
before
{
content
:
"*"
;
color
:
#f56c6c
;
...
...
src/views/goods/create-good-new.vue
浏览文件 @
bb9ce402
...
...
@@ -22,7 +22,7 @@
<div
class=
"basic-item-icon"
>
<div
class=
"part-tit"
>
基本信息
</div>
<el-form-item
label=
"商品分类"
prop=
"goodsCategoryIdList
"
>
<el-form-item
label=
"商品分类"
class=
"goods-category
"
>
<el-cascader
size=
"small"
ref=
"cascader"
...
...
@@ -30,9 +30,10 @@
:props=
"cascaderProps"
clearable
filterable
v-model=
"
formData3.
goodsCategoryIdList"
v-model=
"goodsCategoryIdList"
@
change=
"searchCategoryChange"
/>
<div
v-if=
"isgoodsCategory"
:style=
"
{color: '#f56c6c',fontSize: '12px'}">请选择商品分类
</div>
</el-form-item>
<el-form-item
label=
"项目-合同名称"
prop=
"cooperationProjectId"
class=
"project-req"
>
<el-select
...
...
@@ -56,7 +57,9 @@
placeholder=
"请选择"
size=
"small"
clearable
:disabled=
"isEdit && isContract"
>
:disabled=
"isEdit && isContract"
@
change=
"contractChange"
>
<el-option
v-for=
"(item,index) in contractList"
:key=
"item.contractName+'-'+index"
...
...
@@ -64,6 +67,7 @@
:value=
"item.contractId"
></el-option>
</el-select>
<div
v-if=
"isProjectId"
:style=
"
{color: '#f56c6c',fontSize: '12px'}">请关联项目名称
</div>
</el-form-item>
<el-form-item
label=
"选择基础药品"
prop=
"choiceGoods"
class=
"choice-goods"
>
<el-col
:span=
"16"
>
...
...
@@ -662,7 +666,9 @@
pageSize
:
10
,
totalRows
:
0
,
isAddServe
:
false
,
// 新增药品时 添加的是否为服务类 || 虚拟商品
goodsCategoryList
:
[]
goodsCategoryList
:
[],
isgoodsCategory
:
false
,
// 是否选择商品分类
isProjectId
:
false
}
},
computed
:
{
...
...
@@ -718,7 +724,6 @@
const
subArr
=
item
.
filter
(
i
=>
{
return
i
!==
-
1
;
})
console
.
log
()
newoodsList
.
push
(
subArr
)
})
return
newoodsList
;
...
...
@@ -794,11 +799,22 @@
}).
catch
(()
=>
{
});
},
contractChange
(
val
)
{
if
(
val
)
{
this
.
isProjectId
=
false
;
}
else
{
this
.
isProjectId
=
true
;
}
},
// 商品分类级联多选
searchCategoryChange
(
value
)
{
console
.
log
(
value
,
'商品分类级联多选'
)
this
.
formData3
.
goodsCategoryIdList
=
value
;
if
(
value
.
length
>
0
)
{
this
.
isgoodsCategory
=
false
;
}
else
{
this
.
isgoodsCategory
=
true
;
}
this
.
goodsCategoryIdList
=
value
;
this
.
$refs
.
cascader
.
toggleDropDownVisible
();
},
// 确认选择药品
...
...
@@ -835,7 +851,6 @@
this
.
isCheckServe
=
val
.
categoryName
==
5
?
true
:
false
;
let
current
=
[
this
.
currentRow
];
this
.
choiceMedData
=
current
;
console
.
log
(
val
.
categoryName
,
'categoryNamecategoryName'
)
}
},
// 新增药品
...
...
@@ -932,7 +947,6 @@
getContractList
(
projectId
||
0
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
this
.
contractList
=
res
.
data
;
console
.
log
(
this
.
contractList
,
'this.contractList'
);
}
})
},
...
...
@@ -1007,8 +1021,7 @@
this
.
formData3
=
{
goodsName
,
goodsDescription
,
goodsHeaderImages
,
goodsVideoList
,
goodsType
,
expressLimitFlag
,
contractId
,
cooperationProjectId
};
this
.
formData3
.
medicationId
=
medicationInfo
.
tradeMedicalLibId
;
this
.
formData3
.
medicationDetailId
=
medicationInfo
.
id
;
this
.
formData3
.
goodsCategoryIdList
=
this
.
getArr
(
goodsCategoryIdArr
);
console
.
log
(
this
.
formData3
.
goodsCategoryIdList
,
'this.formData3.goodsCategoryIdListthis.formData3.goodsCategoryIdList'
)
this
.
goodsCategoryIdList
=
this
.
getArr
(
goodsCategoryIdArr
);
this
.
hasRepoFlag
=
hasRepoFlag
;
this
.
buyLimitDtoList
=
this
.
formData
.
buyLimitDtoList
;
this
.
formData
.
optPrice
=
this
.
formData
.
costPrice
/
100
;
...
...
@@ -1156,30 +1169,38 @@
this
.
formData
.
goodsVideoList
=
this
.
videoList
;
this
.
formData
.
goodsDetailImages
=
this
.
fileIntrList
;
// 商品详情图
this
.
formData
.
buyLimitDtoList
=
this
.
buyLimitDtoList
;
this
.
formData
.
goodsCategoryIdList
=
this
.
goodsCategoryIdList
;
this
.
isgoodsImages
=
this
.
formData
.
goodsImages
.
length
==
0
?
false
:
true
;
this
.
isSpecification_url
=
this
.
formData
.
goodsDetailImages
.
length
==
0
?
false
:
true
;
// 判断是否只选择了项目-合同名称的其中一项
const
{
cooperationProjectId
,
contractId
}
=
this
.
formData3
;
if
(
!
cooperationProjectId
)
{
const
{
cooperationProjectId
,
contractId
,
goodsCategoryIdList
}
=
this
.
formData
;
if
(
!
goodsCategoryIdList
.
length
)
{
this
.
isgoodsCategory
=
true
;
return
this
.
$message
({
message
:
'请
关联项目名称
'
,
message
:
'请
选择商品分类
'
,
type
:
'error'
});
}
if
((
cooperationProjectId
&&
!
contractId
)
||
(
!
cooperationProjectId
&&
contractId
))
{
if
(
!
cooperationProjectId
||
!
contractId
)
{
this
.
isProjectId
=
true
;
return
this
.
$message
({
message
:
'请选择项目-合同名称'
,
type
:
'warning'
message
:
'请关联项目名称'
,
type
:
'error'
});
}
// 是否选择新增药品
if
(
this
.
choiceMedData
.
length
==
0
)
{
this
.
isShowGoodsMsg
=
true
;
this
.
$message
({
message
:
'请选择基础药品'
,
type
:
'error'
});
return
;
}
let
isTrue
=
false
;
console
.
log
(
formNameList
.
length
,
'formNameListformNameList'
)
let
item
=
""
;
for
(
let
i
=
0
;
i
<
formNameList
.
length
;
i
++
){
console
.
log
(
formNameList
[
i
],
'formNameList[i]'
)
item
=
formNameList
[
i
];
console
.
log
(
item
,
'itieuieutieutiu'
)
this
.
$refs
[
item
].
validate
((
valid
,
object
)
=>
{
isTrue
=
valid
;
if
(
!
valid
)
return
false
;
...
...
@@ -1188,17 +1209,9 @@
return
;
}
}
// 是否上传商品头图 || 是否上传商品详情图片 || 库存是否为0 || 单次购买上线是否符合要求
if
(
!
this
.
isgoodsImages
||
!
this
.
isSpecification_url
||!
this
.
isgoodStock
||
!
this
.
checkCount
())
return
;
// 是否选择新增药品
if
(
this
.
choiceMedData
.
length
==
0
)
{
this
.
isShowGoodsMsg
=
true
;
this
.
$message
({
message
:
'请选择基础药品'
,
type
:
'warning'
});
return
;
}
if
(
!
isTrue
){
return
false
;
...
...
@@ -1546,7 +1559,6 @@
},
// 视频
deleteVideo
(
videoList
)
{
console
.
log
(
videoList
,
'item,fileGoodsListitem,fileGoodsListv'
)
this
.
videoList
=
[];
this
.
videoModel
.
videoFullPath
=
''
;
},
...
...
@@ -1562,7 +1574,6 @@
}
},
handleRemoveVideo
(
file
,
videoList
)
{
//console.log(this.videoList);
for
(
let
i
=
0
;
i
<
this
.
videoList
.
length
;
i
++
)
{
if
(
this
.
videoList
[
i
].
name
==
file
.
name
)
{
this
.
videoList
.
splice
(
i
,
1
);
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录