Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
c73d1deb
提交
c73d1deb
编写于
3月 22, 2022
作者:
shuang.zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更换条形码接口
上级
92fa618f
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
34 行增加
和
295 行删除
+34
-295
index.js
src/utils/goods/index.js
+10
-1
forms.js
src/views/goods/common/forms.js
+2
-2
mock.js
src/views/goods/common/mock.js
+0
-234
rules.js
src/views/goods/common/rules.js
+2
-2
create-good-new.vue
src/views/goods/create-good-new.vue
+20
-56
未找到文件。
src/utils/goods/index.js
浏览文件 @
c73d1deb
...
@@ -211,4 +211,13 @@ export const getGoodsListAll = (params) => {
...
@@ -211,4 +211,13 @@ export const getGoodsListAll = (params) => {
params
,
params
,
description
:
"查询商品类别"
,
description
:
"查询商品类别"
,
});
});
};
};
\ No newline at end of file
// 条形码获取信息
export
const
getBarcodeData
=
(
barCode
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`store/admin/medical/queryByBarcode/
${
barCode
}
`
),
method
:
"get"
,
description
:
"条形码获取信息"
,
});
}
\ No newline at end of file
src/views/goods/common/forms.js
浏览文件 @
c73d1deb
...
@@ -3,8 +3,8 @@ const form1 = {
...
@@ -3,8 +3,8 @@ const form1 = {
medicCommonName
:
""
,
// 产品通用名称
medicCommonName
:
""
,
// 产品通用名称
barCode
:
""
,
// 条形码
barCode
:
""
,
// 条形码
medicGoodsName
:
""
,
// 商品名称
medicGoodsName
:
""
,
// 商品名称
s
ize
:
""
,
// 规格
s
pecifications
:
""
,
// 规格
manufacturer
:
""
,
// 生产企业
productionCompany
:
""
,
// 生产企业
medicalCategoryId
:
""
,
// 药品分类
medicalCategoryId
:
""
,
// 药品分类
};
};
...
...
src/views/goods/common/mock.js
已删除
100644 → 0
浏览文件 @
92fa618f
export
const
kk
=
{
data
:
{
smallStoreList
:
[
{
id
:
14913
,
certifyId
:
null
,
tradeMedicalLibId
:
7561
,
productName
:
null
,
goodsName
:
null
,
barCode
:
"TMP7561"
,
usedFlag
:
1
,
categoryName
:
1
,
categoryIdLevel2
:
null
,
categoryIdLevel3
:
null
,
categoryIdLevel4
:
null
,
category
:
"药品"
,
status
:
3
,
refuseContent
:
null
,
modifiedTime
:
"2022-03-01 13:43:01"
,
lastModifiedPerson
:
null
,
createTime
:
"2022-03-01 13:43:01"
,
},
{
id
:
14912
,
certifyId
:
null
,
tradeMedicalLibId
:
0
,
productName
:
"ahhah"
,
goodsName
:
"jaksdh"
,
barCode
:
"TMP1646104308791"
,
usedFlag
:
null
,
categoryName
:
5
,
categoryIdLevel2
:
504
,
categoryIdLevel3
:
-
1
,
categoryIdLevel4
:
-
1
,
category
:
"服务/系统服务"
,
status
:
2
,
refuseContent
:
null
,
modifiedTime
:
"2022-03-01 11:11:49"
,
lastModifiedPerson
:
"周爽"
,
createTime
:
"2022-03-01 11:11:49"
,
},
{
id
:
14911
,
certifyId
:
null
,
tradeMedicalLibId
:
7560
,
productName
:
null
,
goodsName
:
null
,
barCode
:
"TMP7560"
,
usedFlag
:
1
,
categoryName
:
1
,
categoryIdLevel2
:
null
,
categoryIdLevel3
:
null
,
categoryIdLevel4
:
null
,
category
:
"药品"
,
status
:
3
,
refuseContent
:
null
,
modifiedTime
:
"2022-02-28 17:17:35"
,
lastModifiedPerson
:
null
,
createTime
:
"2022-02-28 17:17:35"
,
},
{
id
:
14910
,
certifyId
:
77
,
tradeMedicalLibId
:
7559
,
productName
:
"1"
,
goodsName
:
"1"
,
barCode
:
"11111"
,
usedFlag
:
1
,
categoryName
:
1
,
categoryIdLevel2
:
100
,
categoryIdLevel3
:
10001
,
categoryIdLevel4
:
100011
,
category
:
"药品/西药/抗微生物药/青霉素类"
,
status
:
3
,
refuseContent
:
null
,
modifiedTime
:
"2022-02-27 15:32:25"
,
lastModifiedPerson
:
"金涛"
,
createTime
:
"2022-02-27 13:37:05"
,
},
{
id
:
14908
,
certifyId
:
76
,
tradeMedicalLibId
:
7548
,
productName
:
"红霉素1"
,
goodsName
:
"红霉素1"
,
barCode
:
"HMS0001"
,
usedFlag
:
1
,
categoryName
:
1
,
categoryIdLevel2
:
100
,
categoryIdLevel3
:
10001
,
categoryIdLevel4
:
100011
,
category
:
"药品/西药/抗微生物药/青霉素类"
,
status
:
3
,
refuseContent
:
null
,
modifiedTime
:
"2022-02-27 13:28:59"
,
lastModifiedPerson
:
"金涛"
,
createTime
:
"2022-02-27 11:43:12"
,
},
{
id
:
14909
,
certifyId
:
null
,
tradeMedicalLibId
:
7558
,
productName
:
""
,
goodsName
:
""
,
barCode
:
"TMP7558"
,
usedFlag
:
1
,
categoryName
:
0
,
categoryIdLevel2
:
-
1
,
categoryIdLevel3
:
-
1
,
categoryIdLevel4
:
-
1
,
category
:
""
,
status
:
2
,
refuseContent
:
null
,
modifiedTime
:
"2022-02-27 13:27:32"
,
lastModifiedPerson
:
"金涛"
,
createTime
:
"2022-02-27 13:27:32"
,
},
{
id
:
14906
,
certifyId
:
null
,
tradeMedicalLibId
:
7557
,
productName
:
""
,
goodsName
:
""
,
barCode
:
"TMP7557"
,
usedFlag
:
1
,
categoryName
:
null
,
categoryIdLevel2
:
null
,
categoryIdLevel3
:
null
,
categoryIdLevel4
:
null
,
category
:
""
,
status
:
3
,
refuseContent
:
null
,
modifiedTime
:
"2022-02-24 14:55:41"
,
lastModifiedPerson
:
null
,
createTime
:
"2022-02-24 14:55:41"
,
},
{
id
:
14905
,
certifyId
:
null
,
tradeMedicalLibId
:
7556
,
productName
:
""
,
goodsName
:
""
,
barCode
:
"232332"
,
usedFlag
:
1
,
categoryName
:
1
,
categoryIdLevel2
:
null
,
categoryIdLevel3
:
null
,
categoryIdLevel4
:
null
,
category
:
"药品"
,
status
:
3
,
refuseContent
:
null
,
modifiedTime
:
"2022-02-24 14:40:50"
,
lastModifiedPerson
:
null
,
createTime
:
"2022-02-24 14:40:50"
,
},
{
id
:
14904
,
certifyId
:
null
,
tradeMedicalLibId
:
7555
,
productName
:
""
,
goodsName
:
""
,
barCode
:
"32423"
,
usedFlag
:
1
,
categoryName
:
1
,
categoryIdLevel2
:
null
,
categoryIdLevel3
:
null
,
categoryIdLevel4
:
null
,
category
:
"药品"
,
status
:
3
,
refuseContent
:
null
,
modifiedTime
:
"2022-02-24 14:18:15"
,
lastModifiedPerson
:
null
,
createTime
:
"2022-02-24 14:18:15"
,
},
{
id
:
14903
,
certifyId
:
null
,
tradeMedicalLibId
:
7554
,
productName
:
""
,
goodsName
:
""
,
barCode
:
"TMP7554"
,
usedFlag
:
1
,
categoryName
:
null
,
categoryIdLevel2
:
null
,
categoryIdLevel3
:
null
,
categoryIdLevel4
:
null
,
category
:
""
,
status
:
3
,
refuseContent
:
null
,
modifiedTime
:
"2022-02-23 18:57:14"
,
lastModifiedPerson
:
null
,
createTime
:
"2022-02-23 18:57:13"
,
},
],
pageNo
:
1
,
pageSize
:
10
,
totalPage
:
1490
,
totalNum
:
14893
,
},
code
:
"000000"
,
message
:
"成功"
,
requestId
:
"8ac3d50b-82ab-4c33-a460-36b9fa52d724"
,
};
export
const
params
=
{
productName
:
""
,
letterPinyin
:
""
,
goodsName
:
""
,
categoryName
:
""
,
categoryIdLevel2
:
""
,
categoryIdLevel3
:
""
,
categoryIdLevel4
:
""
,
barCode
:
""
,
status
:
""
,
goodsFlag
:
1
,
pageSize
:
10
,
pageNo
:
1
,
};
export
const
hh
=
{
filterName
:
"博尔诚"
,
applySource
:
"2"
,
letterPinyin
:
""
,
goodsName
:
""
,
categoryName
:
""
,
categoryIdLevel2
:
""
,
categoryIdLevel3
:
""
,
categoryIdLevel4
:
""
,
barCode
:
""
,
status
:
""
,
goodsFlag
:
1
,
pageSize
:
10
,
pageNo
:
1
,
};
\ No newline at end of file
src/views/goods/common/rules.js
浏览文件 @
c73d1deb
...
@@ -37,8 +37,8 @@ const rules1 = {
...
@@ -37,8 +37,8 @@ const rules1 = {
trigger: "
blur
",
trigger: "
blur
",
},
},
],
],
s
ize
: [{ required: true, message: "
请输入规格
", trigger: "
blur
" }],
s
pecifications
: [{ required: true, message: "
请输入规格
", trigger: "
blur
" }],
manufacturer
: [
productionCompany
: [
{ required: true, message: "
请输入生产企业
", trigger: "
blur
" },
{ required: true, message: "
请输入生产企业
", trigger: "
blur
" },
],
],
medicalCategoryId: [
medicalCategoryId: [
...
...
src/views/goods/create-good-new.vue
浏览文件 @
c73d1deb
...
@@ -496,11 +496,11 @@
...
@@ -496,11 +496,11 @@
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<!-- 规格 -->
<!-- 规格 -->
<el-form-item
label=
"规格"
prop=
"s
ize
"
v-if=
"![4,5].includes(formData1.medicalCategoryId)"
>
<el-form-item
label=
"规格"
prop=
"s
pecifications
"
v-if=
"![4,5].includes(formData1.medicalCategoryId)"
>
<el-col
:span=
"18"
>
<el-col
:span=
"18"
>
<el-input
<el-input
size=
"small"
size=
"small"
v-model=
"formData1.s
ize
"
v-model=
"formData1.s
pecifications
"
placeholder=
"请输入规格"
placeholder=
"请输入规格"
style=
"width:70%;"
style=
"width:70%;"
></el-input>
></el-input>
...
@@ -509,11 +509,11 @@
...
@@ -509,11 +509,11 @@
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<!-- 生产企业 -->
<!-- 生产企业 -->
<el-form-item
label=
"生产企业"
prop=
"
manufacturer
"
v-if=
"![4,5].includes(formData1.medicalCategoryId)"
>
<el-form-item
label=
"生产企业"
prop=
"
productionCompany
"
v-if=
"![4,5].includes(formData1.medicalCategoryId)"
>
<el-col
:span=
"16"
>
<el-col
:span=
"16"
>
<el-input
<el-input
size=
"small"
size=
"small"
v-model=
"formData1.
manufacturer
"
v-model=
"formData1.
productionCompany
"
placeholder=
"请输入生产企业"
placeholder=
"请输入生产企业"
style=
"width:70%;"
style=
"width:70%;"
></el-input>
></el-input>
...
@@ -536,7 +536,7 @@
...
@@ -536,7 +536,7 @@
import
{
openLoading
,
closeLoading
,
signFigures
}
from
"@/utils/utils"
;
import
{
openLoading
,
closeLoading
,
signFigures
}
from
"@/utils/utils"
;
import
{
isEmptyUtils
}
from
"@/utils/index"
;
import
{
isEmptyUtils
}
from
"@/utils/index"
;
import
{
doUpload
,
getFilePath
,
createFilePath
}
from
"@/utils/qiniu-util"
;
import
{
doUpload
,
getFilePath
,
createFilePath
}
from
"@/utils/qiniu-util"
;
import
{
updateGoods
,
updateStock
,
getGoodsList
,
getGoodDetails
,
updateGoodsV2
,
getContractList
,
getCooperationProjectList
,
getMedList
,
getCategorysList
,
saveMedList
,
getGoodsListAll
}
from
'@/utils/goods'
;
import
{
updateGoods
,
updateStock
,
getGoodsList
,
getGoodDetails
,
updateGoodsV2
,
getContractList
,
getCooperationProjectList
,
getMedList
,
getCategorysList
,
saveMedList
,
getGoodsListAll
,
getBarcodeData
}
from
'@/utils/goods'
;
import
{
getStoreAdressRepot
}
from
"@/utils/shop"
;
import
{
getStoreAdressRepot
}
from
"@/utils/shop"
;
import
Cropper
from
'@/components/common/cropper.vue'
import
Cropper
from
'@/components/common/cropper.vue'
import
{
originRules1
,
originRules
,
originRules3
}
from
'./common/rules'
;
import
{
originRules1
,
originRules
,
originRules3
}
from
'./common/rules'
;
...
@@ -751,7 +751,7 @@
...
@@ -751,7 +751,7 @@
this
.
isAddServe
=
true
;
this
.
isAddServe
=
true
;
}
}
this
.
$refs
.
formData1
.
clearValidate
();
this
.
$refs
.
formData1
.
clearValidate
();
const
formData1Arr
=
[
'medicCommonName'
,
'barCode'
,
'medicGoodsName'
,
'approvalNumber'
,
's
ize'
,
'manufacturer
'
];
const
formData1Arr
=
[
'medicCommonName'
,
'barCode'
,
'medicGoodsName'
,
'approvalNumber'
,
's
pecifications'
,
'productionCompany
'
];
formData1Arr
.
map
(
item
=>
{
formData1Arr
.
map
(
item
=>
{
this
.
formData1
[
item
]
=
''
;
this
.
formData1
[
item
]
=
''
;
})
})
...
@@ -1051,69 +1051,33 @@
...
@@ -1051,69 +1051,33 @@
},
},
//快速录入
//快速录入
fastInput
(
type
){
fastInput
(
type
){
///medications/query/{approvalnumber}
const
code
=
this
.
formData1
.
barCode
.
trim
();
if
(
this
.
formData1
.
barCode
==
''
){
if
(
code
==
''
){
this
.
$refs
.
formData1
.
validateField
(
"barCode"
)
// this.$refs.formData1.validateField("barCode")
this
.
$message
({
message
:
'请输入条形码'
,
type
:
'error'
});
return
;
return
;
}
}
// this.GET("store/medications/query/"+this.formData.approvalNumber).then(res => {
getBarcodeData
(
code
).
then
((
res
)
=>
{
this
.
GET
(
`store/medications/query/barcode/
${
this
.
formData1
.
barCode
}
`
).
then
(
res
=>
{
if
(
res
.
code
!=
'000000'
){
console
.
log
(
res
)
if
(
res
.
code
!=
'000000'
){
return
this
.
$message
({
return
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
type
:
'error'
type
:
'error'
});
});
}
}
if
(
res
.
data
==
null
){
if
(
res
.
data
==
null
){
return
this
.
$message
({
return
this
.
$message
({
message
:
'未查询到数据,请手动输入'
,
message
:
'未查询到数据,请手动输入'
,
type
:
'warning'
type
:
'warning'
});
});
}
}
const
{
imageList
,
medicationInfo
}
=
res
.
data
const
{
medicCommonName
,
medicGoodsName
,
medicalDetailFieldMap
,
approvalNumber
}
=
res
.
data
;
// this.formData1.medicationId = medicationInfo.id;
const
{
productionCompany
,
specifications
}
=
medicalDetailFieldMap
;
this
.
formData1
.
approvalNumber
=
medicationInfo
.
approvalNumber
;
let
fastParm
=
{
medicCommonName
,
medicGoodsName
,
specifications
,
productionCompany
,
approvalNumber
}
// const {medicCommonName,
// medicGoodsName,
// dosageId,
// size,
// otc,
// usage,
// categoryIdLevel2,
// categoryIdLevel3,
// categoryIdLevel4,
// categoryIdLevel5,
// manufacturer,
// department,
// treatDisease,
// expiredTime} = medicationInfo
// let fastParm = {
// medicCommonName,
// medicGoodsName,
// dosageId,
// size,
// otc,
// usage,
// categoryIdLevel2,
// categoryIdLevel3,
// categoryIdLevel4,
// categoryIdLevel5,
// manufacturer,
// department,
// treatDisease,
// expiredTime,
// }
// this.formData1.otc1 = this.formData1.otc ? '1' : '0'
const
{
medicCommonName
,
medicGoodsName
,
size
,
manufacturer
}
=
medicationInfo
let
fastParm
=
{
medicCommonName
,
medicGoodsName
,
size
,
manufacturer
}
this
.
formData1
=
Object
.
assign
(
this
.
formData1
,
fastParm
)
this
.
formData1
=
Object
.
assign
(
this
.
formData1
,
fastParm
)
})
// this.goodDisabled = medicationInfo.medicalCategoryId ? true : false
// this.fileIntrList = this.getImges(imageList,2)
});
},
},
updateStock
(){
updateStock
(){
let
r
=
/^
\+?[
1-9
][
0-9
]
*$/
;
let
r
=
/^
\+?[
1-9
][
0-9
]
*$/
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录