Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
a64ca2ba
提交
a64ca2ba
编写于
8月 22, 2020
作者:
chendeli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品编辑
上级
e087cd4b
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
48 行增加
和
29 行删除
+48
-29
create-good.vue
src/views/goods/create-good.vue
+42
-26
goods-manage.vue
src/views/goods/goods-manage.vue
+6
-3
未找到文件。
src/views/goods/create-good.vue
浏览文件 @
a64ca2ba
...
@@ -351,11 +351,11 @@
...
@@ -351,11 +351,11 @@
<div
class=
"basic-item-icon"
>
<div
class=
"basic-item-icon"
>
<div
class=
"part-tit"
>
销售信息
</div>
<div
class=
"part-tit"
>
销售信息
</div>
<div
class=
"inline"
>
<div
class=
"inline"
>
<el-form-item
label=
"零售价"
prop=
"
cos
tPrice"
>
<el-form-item
label=
"零售价"
prop=
"
op
tPrice"
>
<el-col
:span=
"20"
>
<el-col
:span=
"20"
>
<el-input
<el-input
size=
"small"
size=
"small"
v-model=
"formData.
cos
tPrice"
v-model=
"formData.
op
tPrice"
placeholder=
"请输入零售价"
placeholder=
"请输入零售价"
></el-input>
></el-input>
...
@@ -407,23 +407,7 @@
...
@@ -407,23 +407,7 @@
</div>
</div>
</div>
</div>
</el-form>
</el-form>
<el-dialog
class=
"dialog-title-border-old"
title=
"图片裁剪"
:visible
.
sync=
"showCropper"
:width=
"currentOption.cropDialogWidth"
center
>
<div
slot=
"title"
style=
"text-align: left;"
>
<span
style=
"font-weight: 700;"
>
图片裁剪
</span>
</div>
<div
v-if=
"showCropper"
style=
"margin-bottom: 20px;"
>
<Cropper
:cropOption=
"currentOption"
@
getCropImg=
"getCropImg(arguments)"
:originImg=
"slide2.oriUrl"
/>
</div>
</el-dialog>
<el-dialog
<el-dialog
:title=
"stock.title"
:title=
"stock.title"
:visible
.
sync=
"stockDio"
:visible
.
sync=
"stockDio"
...
@@ -451,7 +435,7 @@
...
@@ -451,7 +435,7 @@
let
vm
=
null
;
let
vm
=
null
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
{
updateGoods
,
updateStock
,
dosageAll
,
getDeparts
}
from
'@/utils/goods'
;
import
{
updateGoods
,
updateStock
,
dosageAll
,
getDeparts
,
getGoodsList
}
from
'@/utils/goods'
;
import
Cropper
from
'@/components/common/cropper.vue'
import
Cropper
from
'@/components/common/cropper.vue'
import
{
mapGetters
}
from
"vuex"
;
import
{
mapGetters
}
from
"vuex"
;
export
default
{
export
default
{
...
@@ -515,6 +499,7 @@
...
@@ -515,6 +499,7 @@
value: '3',
value: '3',
}],
}],
formData: {
formData: {
optPrice:0,
id:'',
id:'',
categoryId:'',
categoryId:'',
categoryIdLevel2: '',
categoryIdLevel2: '',
...
@@ -531,7 +516,7 @@
...
@@ -531,7 +516,7 @@
dosageId:null,
dosageId:null,
usage:'',
usage:'',
otc:false,
otc:false,
otc1:'',
otc1:'
1
',
approvalNumber:'',
approvalNumber:'',
manufacturer:'',
manufacturer:'',
department:'',
department:'',
...
@@ -629,7 +614,7 @@
...
@@ -629,7 +614,7 @@
// barCode: [
// barCode: [
// { required: true, message: "
请输入条形码
", trigger: "
blur
" },
// { required: true, message: "
请输入条形码
", trigger: "
blur
" },
// ],
// ],
cos
tPrice: [
op
tPrice: [
{ required: true, message: "
请输入零售价
", trigger: "
blur
" },
{ required: true, message: "
请输入零售价
", trigger: "
blur
" },
],
],
dynamicFlag: [
dynamicFlag: [
...
@@ -657,13 +642,43 @@
...
@@ -657,13 +642,43 @@
this.allDeparts = res.data
this.allDeparts = res.data
})
})
if(id != 'add'){
if(id != 'add'){
let goods = Object.assign(this.goodsInfo,{})
// let goods = Object.assign(this.goodsInfo,{})
this.formData = {...goods}
// this.formData = {...goods}
console.log(goods)
// console.log(goods)
this.getDetailByEdit(id)
}
}
},
},
methods: {
methods: {
//eidt状态
getDetailByEdit(id){
let parm = {
goodsIdList:[id],
goodsName :'',
goodsType :'',
pageNo:1,
pageSize: 10,
}
getGoodsList(parm).then((res)=>{
if(res.code != '000000'){
return this.$message({
message: res.message,
type: 'error'
});
}
closeLoading(this);
if(res.data == null){
return this.$message({
message: '分页数据加载失败',
type: 'error'
});
}
const {goodsList} = res.data
this.formData = {...goodsList[0]}
//this.totalRows = res.data.totalCount
})
},
getGoodsTypes(id,type){
getGoodsTypes(id,type){
if(id == 5 ){
if(id == 5 ){
this.isMedic = true;
this.isMedic = true;
...
@@ -791,7 +806,8 @@
...
@@ -791,7 +806,8 @@
//更新商品
//更新商品
updateGoodsInfo(){
updateGoodsInfo(){
this.formData.incrStock = 1000
//this.formData.incrStock = 1000
this.formData.costPrice = this.formData.optPrice*100
updateGoods(this.formData).then((res)=>{
updateGoods(this.formData).then((res)=>{
if (res.code !== '000000') {
if (res.code !== '000000') {
return this.$message.error(res.message);
return this.$message.error(res.message);
...
...
src/views/goods/goods-manage.vue
浏览文件 @
a64ca2ba
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<el-input
v-model=
"searchForm.goodsName"
size=
"small"
placeholder=
"请输入商品名称"
></el-input>
<el-input
v-model=
"searchForm.goodsName"
size=
"small"
placeholder=
"请输入商品名称"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品ID"
>
<el-form-item
label=
"商品ID"
>
<el-input
v-model=
"
searchForm.
id"
size=
"small"
placeholder=
"请输入商品ID"
></el-input>
<el-input
v-model=
"id"
size=
"small"
placeholder=
"请输入商品ID"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品类型"
>
<el-form-item
label=
"商品类型"
>
<el-select
<el-select
...
@@ -189,6 +189,7 @@
...
@@ -189,6 +189,7 @@
showAllFlag
:
false
,
showAllFlag
:
false
,
showNewFlag
:
false
,
showNewFlag
:
false
,
batchDialog
:
false
,
batchDialog
:
false
,
id
:
''
,
searchForm
:
{
searchForm
:
{
goodsIdList
:[],
goodsIdList
:[],
goodsName
:
''
,
goodsName
:
''
,
...
@@ -317,7 +318,7 @@
...
@@ -317,7 +318,7 @@
if
(
row
==
'add'
){
if
(
row
==
'add'
){
url
=
`/create-good?id=add`
url
=
`/create-good?id=add`
}
else
{
}
else
{
url
=
`/create-good?id=
${
row
.
i
d
}
`
url
=
`/create-good?id=
${
row
.
goodsI
d
}
`
}
}
this
.
$store
.
dispatch
(
'goodsManage/changeGoodsInfo'
,
{...
row
});
this
.
$store
.
dispatch
(
'goodsManage/changeGoodsInfo'
,
{...
row
});
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -398,7 +399,9 @@
...
@@ -398,7 +399,9 @@
searchList
()
{
searchList
()
{
openLoading
(
this
);
openLoading
(
this
);
if
(
this
.
id
!=
''
){
this
.
searchForm
.
goodsIdList
=
[
this
.
id
]
}
this
.
searchForm
.
pageNo
=
1
this
.
searchForm
.
pageNo
=
1
this
.
getLists
()
this
.
getLists
()
},
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录