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
提交
60d3d7c3
提交
60d3d7c3
编写于
11月 08, 2021
作者:
lyf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加业务类型
上级
b4b0fb05
变更
5
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
72 行增加
和
121 行删除
+72
-121
env-config.js
src/utils/env-config.js
+1
-1
index.js
src/utils/goods/index.js
+11
-0
create-good.vue
src/views/goods/create-good.vue
+57
-120
forms.js
src/views/goods/forms.js
+1
-0
rules.js
src/views/goods/rules.js
+2
-0
未找到文件。
src/utils/env-config.js
浏览文件 @
60d3d7c3
...
...
@@ -10,7 +10,7 @@ export const envConfig = {
// baseUrl: 'https://uat-sc.yunqueyi.com/',
// baseUrl: 'http://10.177.15.150:10401/',
// baseUrl: 'http://10.177.15.150:11905/',
baseUrl
:
'https://sc.yunqueyi.com/'
,
baseUrl
:
'https://
dev-
sc.yunqueyi.com/'
,
// baseUrl: 'https://test1-sc.yunqueyi.com/',
// baseUrl: 'https://sc.yunqueyi.com/',
// baseUrl: 'https://uat-sc.yunqueyi.com/',
...
...
src/utils/goods/index.js
浏览文件 @
60d3d7c3
...
...
@@ -133,3 +133,14 @@ export const getTypeCodeList = () => {
});
};
export
const
getBusinessCategory
=
()
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`store/category/businessCategory/0`
),
method
:
"get"
,
description
:
"查询业务类型"
,
});
};
src/views/goods/create-good.vue
浏览文件 @
60d3d7c3
...
...
@@ -46,7 +46,6 @@
show-word-limit
></el-input>
<span
class=
"word-tip"
>
此文案可摘取药品说明书【功能主治】or【适应症】
</span>
<!--
<span
class=
"word-num"
>
{{
(
formData
.
goodsDescription
).
replace
(
/
\s
+/g
,
""
).
length
}}
/1000
</span>
-->
</el-col>
</el-form-item>
...
...
@@ -112,7 +111,20 @@
</el-progress>
<el-button
class=
"dl-video"
icon=
"el-icon-delete"
circle
@
click=
"deleteVideo"
v-if=
"videoList.length == 1"
></el-button>
</el-form-item>
<el-form-item
label=
"业务类型"
prop=
"businessCategoryId"
>
<el-select
v-model=
"formData3.businessCategoryId"
placeholder=
"请选择业务类型"
size=
"small"
>
<el-option
v-for=
"item in businessCategoryList"
:key=
"item.id"
:label=
"item.categoryName"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"商品类型"
prop=
"goodsType"
>
<el-select
v-model=
"formData3.goodsType"
...
...
@@ -128,6 +140,8 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"是否支持售后"
prop=
"expressLimitFlag"
v-if=
"storeType
<
3
"
>
<el-radio-group
v-model=
"formData3.expressLimitFlag"
:disabled=
"!hasRepoFlag"
>
<el-radio
:label=
"1"
>
是
</el-radio>
...
...
@@ -628,18 +642,6 @@
format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<!--
<el-form-item
label=
"商品使用日期"
prop=
"endTime"
>
<el-col
:span=
"13"
>
<el-input
size=
"small"
v-model=
"formData2.endTime"
placeholder=
"请输入商品使用日期"
style=
"width:70%;"
></el-input>
<span
class=
"word-num"
></span>
</el-col>
</el-form-item>
-->
<el-form-item
label=
"检测说明"
>
<el-upload
:file-list=
"goodsCheckList"
...
...
@@ -707,44 +709,19 @@
<el-radio
:label=
"1"
>
零售
</el-radio>
<el-radio
:label=
"2"
:disabled=
"commissionFlag == 1"
>
批发
</el-radio>
</el-radio-group>
<!--
<el-select-->
<!-- v-model="formData.saleType"-->
<!-- placeholder="请选择销售方式"-->
<!-- size="small"-->
<!-- @change="getSaleType(formData.saleType,2)">-->
<!--
<el-option-->
<!-- v-for="item in saleTypeList"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"-->
<!-- >
</el-option>
-->
<!--
</el-select>
-->
</el-form-item>
</div>
<div
class=
"inline"
v-if=
"formData.saleType == 1"
>
<el-form-item
label=
"零售价"
prop=
"optPrice"
>
<el-col
:span=
"20"
>
<!--
<el-input-->
<!-- @input="$forceUpdate();"-->
<!-- size="small"-->
<!-- v-model="formData.optPrice"-->
<!-- placeholder="请输入零售价"-->
<!-- >
</el-input>
-->
<el-input-number
class=
"stock-com"
@
input=
"$forceUpdate();"
v-model=
"formData.optPrice"
size=
"small"
:precision=
"2"
:min=
"0.00"
:max=
"99999.99"
></el-input-number>
<!--
<span
class=
"word-num"
>
{{
(
formData
.
name
).
replace
(
/
\s
+/g
,
""
).
length
}}
/60
</span>
-->
</el-col>
</el-form-item>
</div>
<div
class=
"inline"
v-if=
"formData.saleType == 2"
>
<el-form-item
label=
"批发价"
prop=
"optPrice"
>
<el-col
:span=
"20"
>
<!--
<el-input-->
<!-- @input="$forceUpdate();"-->
<!-- size="small"-->
<!-- v-model="formData.optPrice"-->
<!-- placeholder="请输入批发价">
</el-input>
-->
<el-input-number
class=
"stock-com"
@
input=
"$forceUpdate();"
v-model=
"formData.optPrice"
size=
"small"
:precision=
"2"
:min=
"0"
:max=
"99999.99"
></el-input-number>
</el-col>
</el-form-item>
...
...
@@ -758,14 +735,6 @@
<span
class=
"sp sp-r"
@
click=
"changeStock(2)"
><i
class=
"el-icon-plus"
></i></span>
</div>
<p
class=
"error-message"
v-if=
"!isgoodStock"
>
库存不能为0
</p>
<!--
<el-input
size=
"small"
v-model=
"formData.name"
placeholder=
"请输入库存"
></el-input>
-->
<!--
<el-input-number
readonly
size=
"small"
v-model=
"formData.stock"
></el-input-number>
-->
<!--
<span
class=
"word-num"
>
{{
(
formData
.
name
).
replace
(
/
\s
+/g
,
""
).
length
}}
/60
</span>
-->
</el-col>
</el-form-item>
</div>
...
...
@@ -775,9 +744,6 @@
<el-col
:span=
"20"
>
<div
class=
"stock-com"
style=
"width: 500px;display:flex"
>
<el-input-number
class=
"stock-com"
@
input=
"$forceUpdate();"
v-model=
"formData.leastCount"
size=
"small"
:precision=
"0"
:min=
"0"
:max=
"9999"
></el-input-number>
<!--
<span
class=
"sp sp-l"
@
click=
"minusCount(1)"
><i
class=
"el-icon-minus"
></i></span>
<span
class=
"sp sp-c"
>
{{
formData
.
leastCount
}}
</span>
<span
class=
"sp sp-r"
@
click=
"plusCount(1)"
><i
class=
"el-icon-plus"
></i></span>
-->
<span
class=
"word-num"
style=
"margin-left: 10px;"
>
最高9999件哦
</span>
</div>
<p
class=
"error-message"
v-if=
"formData.leastCount
<
=
0
"
>
最小起购件数不能为0
</p>
...
...
@@ -799,18 +765,12 @@
<el-col
:span=
"20"
style=
"width: 300%;"
>
<div
class=
"stock-com"
style=
"width: 500px;display:flex"
>
<el-input-number
class=
"stock-com"
@
input=
"$forceUpdate();"
v-model=
"formData.mostCount"
size=
"small"
:precision=
"0"
:min=
"-1"
:max=
"9999"
></el-input-number>
<!--
<span
class=
"sp sp-l"
@
click=
"minusCount(2)"
><i
class=
"el-icon-minus"
></i></span>
<span
class=
"sp sp-c"
>
{{
formData
.
mostCount
}}
</span>
<span
class=
"sp sp-r"
@
click=
"plusCount(2)"
><i
class=
"el-icon-plus"
></i></span>
-->
<span
class=
"word-num"
style=
"margin-left: 10px;"
>
数值为-1时,代表单次购买上限已无限制(最高9999件哦)
</span>
</div>
<p
class=
"error-message"
v-if=
"formData.mostCount === 0"
>
单次购买上限不能为0
</p>
<!--
<p
class=
"error-message"
v-if=
"formData.mostCount
<
=
-1
"
>
单次购买上限已无限制
</p>
-->
</el-col>
</el-form-item>
</div>
<div
class=
"inline"
v-if=
"formData.saleType == 1"
>
<el-form-item
label=
"第三方商品编码"
>
<el-col
:span=
"20"
>
...
...
@@ -836,16 +796,6 @@
</div>
</div>
<!--
</el-form>
-->
<!--
<el-form-->
<!-- ref="formData"-->
<!-- :model="formData"-->
<!-- :rules="rules"-->
<!-- label-width="150px"-->
<!-- label-suffix=":"-->
<!-- class="basic-form"-->
<!-- >-->
<div
class=
"basic-item-icon"
v-if=
"formData.saleType == 1"
>
<div
class=
"part-tit"
>
限购条件
</div>
<div
v-for=
"(item, index) in buyLimitDtoList"
:key=
"index"
>
...
...
@@ -901,7 +851,6 @@
</div>
<span
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: right;"
>
<!--
<el-button
@
click=
"centerDialogVisible = false"
>
取 消
</el-button>
-->
<el-button
type=
"primary"
@
click=
"updateStock"
>
完成
</el-button>
</span>
</el-dialog>
...
...
@@ -914,7 +863,7 @@
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
isEmptyUtils
}
from
"@/utils/index"
;
import
{
doUpload
,
getFilePath
,
createFilePath
}
from
"../../utils/qiniu-util"
;
import
{
updateGoods
,
updateStock
,
dosageAll
,
getDeparts
,
getGoodsList
,
getGoodDetails
,
updateGoodsV2
,
getHospitalInfoByStoreId
,
getCheckPackageIdList
,
getTypeCodeList
}
from
'@/utils/goods'
;
import
{
updateGoods
,
updateStock
,
dosageAll
,
getDeparts
,
getGoodsList
,
getGoodDetails
,
updateGoodsV2
,
getHospitalInfoByStoreId
,
getCheckPackageIdList
,
getTypeCodeList
,
getBusinessCategory
}
from
'@/utils/goods'
;
import
{
getStoreAdressRepot
}
from
"@/utils/shop"
;
import
Cropper
from
'@/components/common/cropper.vue'
import
{
originRules1
,
originRules2
,
originRules
,
originRules3
}
from
'./rules'
;
...
...
@@ -1055,6 +1004,7 @@
videoModel
:{
videoFullPath
:
''
},
businessCategoryList
:[],
sumFile
:
0
,
uploadProgress
:
0
,
// 上传视频进度条
}
...
...
@@ -1088,6 +1038,7 @@
this
.
curmbThird
=
this
.
title
;
this
.
formData
.
storeId
=
Number
(
storeId
)
||
''
;
this
.
getTypeCodeList
();
this
.
getBusinessCategory
();
this
.
getLever
(
0
,
1
)
dosageAll
().
then
((
res
)
=>
{
this
.
doseAll
=
res
.
data
...
...
@@ -1120,6 +1071,14 @@
}
},
methods
:
{
// 获取业务类型
getBusinessCategory
(){
getBusinessCategory
().
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
this
.
businessCategoryList
=
res
.
data
}
}).
catch
((
err
)
=>
{})
},
// 判断imgurl是否有效
checkImgExists
(
imgurl
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
...
...
@@ -1169,12 +1128,12 @@
};
const
{
goodsInfo
,
medicalService
,
buyLimitDtoList
,
hasRepoFlag
}
=
res
.
data
;
const
{
goodsName
,
goodsDescription
,
goodsType
,
expressLimitFlag
,
goodsHeaderImages
=
[],
goodsVideoList
=
[]
}
=
goodsInfo
;
const
{
goodsName
,
goodsDescription
,
goodsType
,
businessCategoryId
,
expressLimitFlag
,
goodsHeaderImages
=
[],
goodsVideoList
=
[]
}
=
goodsInfo
;
this
.
formData
=
{...
this
.
formData
,
...
goodsInfo
};
this
.
formData2
=
medicalService
;
this
.
formData
=
{
...
this
.
formData
,
...
this
.
formData2
};
this
.
formData3
=
{
goodsName
,
goodsDescription
,
goodsHeaderImages
,
goodsVideoList
,
goodsType
,
expressLimitFlag
};
this
.
formData3
=
{
goodsName
,
goodsDescription
,
goodsHeaderImages
,
goodsVideoList
,
goodsType
,
businessCategoryId
,
expressLimitFlag
};
this
.
buyLimitDtoList
=
buyLimitDtoList
;
this
.
hasRepoFlag
=
hasRepoFlag
;
this
.
$set
(
this
.
formData2
,
'suitableArr'
,
this
.
formData
.
suitable
.
split
(
','
));
...
...
@@ -1225,10 +1184,10 @@
});
}
const
{
goodsList
,
hasRepoFlag
}
=
res
.
data
;
const
{
goodsName
,
goodsDescription
,
goodsType
,
expressLimitFlag
,
goodsHeaderImages
=
[],
goodsVideoList
=
[]
}
=
goodsList
[
0
];
const
{
goodsName
,
goodsDescription
,
goodsType
,
businessCategoryId
,
expressLimitFlag
,
goodsHeaderImages
=
[],
goodsVideoList
=
[]
}
=
goodsList
[
0
];
this
.
formData1
=
goodsList
[
0
];
this
.
formData
=
goodsList
[
0
];
this
.
formData3
=
{
goodsName
,
goodsDescription
,
goodsHeaderImages
,
goodsVideoList
,
goodsType
,
expressLimitFlag
};
this
.
formData3
=
{
goodsName
,
goodsDescription
,
goodsHeaderImages
,
goodsVideoList
,
goodsType
,
businessCategoryId
,
expressLimitFlag
};
this
.
hasRepoFlag
=
hasRepoFlag
;
this
.
buyLimitDtoList
=
this
.
formData
.
buyLimitDtoList
;
this
.
formData
.
optPrice
=
this
.
formData
.
costPrice
/
100
;
...
...
@@ -1370,31 +1329,9 @@
});
},
// 销售方式
getSaleType
(
saleType
,
type
){
},
getGoodsTypes
(
goodsType
,
type
){
this
.
goodsType
=
goodsType
;
// if(goodsType == 5){
// this.isMedic = true;
// this.isCheckServe = false;
// this.getLever(goodsType,type);
// } else if(goodsType == 337){
// this.isMedic = false;
// this.isCheckServe = true;
// getHospitalInfoByStoreId(this.storeId).then(({code,message,data})=>{
// this.formData2.hospitalName = data.hospital;
// })
// getCheckPackageIdList().then(res=>{
// console.log(`getCheckPackageIdList`, res);
// this.checkPackageIdList = res.data;
// })
// }else{
// this.isMedic = false;
// this.isCheckServe = false;
// };
if
(
goodsType
==
337
){
this
.
isMedic
=
false
;
this
.
isCheckServe
=
true
;
...
...
src/views/goods/forms.js
浏览文件 @
60d3d7c3
...
...
@@ -75,6 +75,7 @@ const form3 = {
goodsHeaderImages
:
[],
goodsVideoList
:
[],
goodsType
:
""
,
businessCategoryId
:
""
,
expressLimitFlag
:
0
,
//是否支持退货退款
};
...
...
src/views/goods/rules.js
浏览文件 @
60d3d7c3
...
...
@@ -124,6 +124,8 @@ const rules3 = {
goodsHeaderImages: [
{ required: true, message: "
请上传商品头图
", trigger: "
blur
" },
],
businessCategoryId: [{ required: true, message: "
请选择业务类型
", trigger: "
change
" }],
goodsType: [{ required: true, message: "
请选择商品类型
", trigger: "
change
" }],
};
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录