Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
d89d0796
Commit
d89d0796
authored
Jul 16, 2023
by
Marcus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.2品名上传影像需要实现上传后自动保存
https://zentao.test.jdshangmen.com/bug-view-3843.html
parent
4d182249
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
7 deletions
+62
-7
index.vue
src/components/ImageAndVideoUpload/index.vue
+30
-5
Warehouse.vue
src/views/ecw/order/warehousing/components/Warehouse.vue
+32
-2
No files found.
src/components/ImageAndVideoUpload/index.vue
View file @
d89d0796
...
...
@@ -46,6 +46,7 @@
<
script
>
import
{
getToken
}
from
"
@/utils/auth
"
;
import
{
warehousePictureCreate
}
from
"
@/api/ecw/order
"
;
export
default
{
props
:
{
...
...
@@ -65,6 +66,15 @@ export default {
type
:
Boolean
,
default
:
true
},
// 类型 1入仓 2 调拨出仓 3调拨到仓 4 订单转异
type
:
{
type
:
Number
,
default
:
undefined
},
id
:
{
type
:
Number
,
default
:
undefined
},
readonly
:
{
type
:
Boolean
,
default
:
false
...
...
@@ -121,9 +131,11 @@ export default {
methods
:
{
// 删除图片
handleRemove
(
index
)
{
this
.
fileList
.
splice
(
index
,
1
);
this
.
$emit
(
"
input
"
,
this
.
listToString
(
this
.
fileList
));
if
(
this
.
id
&&
this
.
type
)
{
this
.
$emit
(
"
delete
"
,
this
.
fileList
[
index
].
url
);
}
this
.
fileList
.
splice
(
index
,
1
);
this
.
$emit
(
"
input
"
,
this
.
listToString
(
this
.
fileList
));
},
// 上传成功回调
handleUploadSuccess
(
res
)
{
...
...
@@ -133,8 +145,21 @@ export default {
this
.
fileList
=
this
.
fileList
.
concat
(
this
.
uploadList
);
this
.
uploadList
=
[];
this
.
number
=
0
;
this
.
$emit
(
"
input
"
,
this
.
listToString
(
this
.
fileList
));
this
.
$modal
.
closeLoading
();
if
(
this
.
id
&&
this
.
type
)
{
warehousePictureCreate
({
"
bizId
"
:
this
.
id
,
"
type
"
:
this
.
type
,
"
url
"
:
res
.
data
}).
then
(()
=>
{
this
.
$emit
(
"
input
"
,
this
.
listToString
(
this
.
fileList
));
this
.
$emit
(
"
refresh
"
);
this
.
$modal
.
closeLoading
();
})
}
else
{
this
.
$emit
(
"
input
"
,
this
.
listToString
(
this
.
fileList
));
this
.
$emit
(
"
refresh
"
);
this
.
$modal
.
closeLoading
();
}
}
}
else
{
this
.
handleUploadError
();
...
...
src/views/ecw/order/warehousing/components/Warehouse.vue
View file @
d89d0796
...
...
@@ -209,7 +209,14 @@
<span
style=
"font-size: 18px"
>
{{$t('入仓影像')}}
</span>
</div>
<div>
<image-and-video-upload
:fileSize=
"50"
:isShowTip=
"true"
v-model=
"form.pictureUrls"
></image-and-video-upload>
<image-and-video-upload
:fileSize=
"50"
:isShowTip=
"true"
v-model=
"form.pictureUrls"
:id=
"orderItemId"
:type=
"5"
@
delete=
"handleImageDelete"
></image-and-video-upload>
</div>
</el-card>
</el-tab-pane>
...
...
@@ -489,7 +496,11 @@ import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBr
import
{
cancelProcessInstance
}
from
"
@/api/bpm/processInstance
"
import
WorkFlow
from
"
@/components/WorkFlow
"
import
{
DICT_TYPE
,
getDictDataLabel
,
getDictDatas
}
from
"
@/utils/dict
"
import
{
orderWarehouseIn
,
orderWarehouseInUpdateApply
}
from
"
@/api/ecw/order
"
import
{
orderWarehouseIn
,
orderWarehouseInUpdateApply
,
warehousePictureDelete
,
warehousePictureList
}
from
"
@/api/ecw/order
"
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
import
{
addProduct
}
from
"
@/api/ecw/product
"
...
...
@@ -560,6 +571,9 @@ export default {
orderId
(){
return
this
.
order
.
orderId
},
orderItemId
(){
return
this
.
warehousing
.
orderItemId
},
brandObject
(){
return
this
.
brandList
.
find
(
e
=>
e
.
id
===
this
.
form
.
brand
)
||
''
},
...
...
@@ -765,6 +779,22 @@ export default {
this
.
handleAdd
(
1
)
}
},
handleImageDelete
(
url
)
{
warehousePictureList
({
bizId
:
this
.
orderId
,
type
:
1
}).
then
(
r
=>
{
console
.
log
(
r
,
url
)
if
(
r
.
data
?.
length
>
0
)
{
const
id
=
r
.
data
.
find
(
e
=>
e
?.
url
===
url
)?.
id
if
(
id
)
{
warehousePictureDelete
(
id
).
then
(
r
=>
{
console
.
log
(
r
)
})
}
}
})
},
handleClose
()
{
this
.
visible
=
false
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment