Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
ops_2024_vue
Project overview
Project overview
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
Administrator
ops_2024_vue
Commits
23c4e7b5
Commit
23c4e7b5
authored
Apr 03, 2024
by
heduo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lmy' of
http://119.78.67.12/git/root/ops_2024_vue
into hd
parents
982e6854
c1da8356
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
23 deletions
+20
-23
src/api/regionalSpotManage/index.ts
src/api/regionalSpotManage/index.ts
+5
-5
src/views/regionalSpotManage/components/list.vue
src/views/regionalSpotManage/components/list.vue
+12
-15
src/views/regionalSpotManage/index.vue
src/views/regionalSpotManage/index.vue
+3
-3
No files found.
src/api/regionalSpotManage/index.ts
View file @
23c4e7b5
import
{
tmallabHttp
}
from
'
/@/utils/http/axios
'
;
import
{
ContentTypeEnum
}
from
'
/@/enums/httpEnum
'
;
enum
Api
{
GetStatus
=
'
/system/opsProduct/IsOpsSupplier
'
,
List
=
'
/system/opsProduct/getList
'
,
...
...
@@ -80,14 +79,15 @@ export const regionalSpotManageOpsEditProductApi = (data) =>
/**
* @description: 批量上传
*/
export
const
regionalSpotManageUploadOpsProductApi
=
(
data
)
=>
tmallabHttp
.
post
(
export
const
regionalSpotManageUploadOpsProductApi
=
(
data
,
file
)
=>
tmallabHttp
.
uploadFile
(
{
url
:
Api
.
UploadOpsProduct
,
method
:
'
POST
'
,
data
,
headers
:
{
'
Content-Type
'
:
ContentTypeEnum
.
FORM_DATA
}
,
baseURL
:
import
.
meta
.
env
.
VITE_GLOB_TMALLAB_URL
,
},
{
errorMessageMode
:
'
message
'
},
{
file
,
data
},
);
/**
...
...
src/views/regionalSpotManage/components/list.vue
View file @
23c4e7b5
<
script
lang=
"ts"
setup
>
import
{
ref
,
onMounted
}
from
'
vue
'
;
import
axios
from
'
axios
'
;
import
{
Form
,
FormItem
,
...
...
@@ -14,7 +13,7 @@
}
from
'
ant-design-vue
'
;
import
{
UploadOutlined
}
from
'
@ant-design/icons-vue
'
;
import
{
useRouter
}
from
'
vue-router
'
;
import
{
getAuthCache
,
getTmallabToken
}
from
'
/@/utils/auth
'
;
import
{
getAuthCache
}
from
'
/@/utils/auth
'
;
import
{
regionalSpotManageBrandListApi
,
regionalSpotManageGroupListApi
,
...
...
@@ -23,11 +22,11 @@
regionalSpotManageGetGhsAreaListApi
,
regionalSpotManageOpsDeleteProductApi
,
regionalSpotManageOpsEditProductApi
,
regionalSpotManageUploadOpsProductApi
,
}
from
'
/@/api/regionalSpotManage
'
;
import
addProductModal
from
'
./addProduct.vue
'
;
const
config
=
import
.
meta
.
env
;
const
userInfo
:
any
=
getAuthCache
(
'
USER__INFO__
'
);
const
Token
=
getTmallabToken
()
as
unknown
as
string
;
const
ghsCode
=
userInfo
.
supplier
.
ghsCode
;
const
ghsName
=
userInfo
.
supplier
.
ghsName
;
const
router
=
useRouter
();
...
...
@@ -394,22 +393,20 @@
const
confirmImport
=
async
()
=>
{
if
(
!
productExcelList
.
value
.
length
)
return
message
.
error
(
'
请上传文件
'
);
if
(
!
impotrCheckboxValue
.
value
.
length
)
return
message
.
error
(
'
请选择现货区域
'
);
const
data
:
FormData
=
new
FormData
();
data
.
append
(
'
ghsCode
'
,
ghsCode
);
data
.
append
(
'
ghsName
'
,
ghsName
);
data
.
append
(
'
file
'
,
productExcelList
.
value
[
0
]);
data
.
append
(
'
areaIds
'
,
impotrCheckboxValue
.
value
.
join
(
'
,
'
)
as
any
);
// const param
: FormData = new FormData();
// param
.append('ghsCode', ghsCode);
// param
.append('ghsName', ghsName);
// param
.append('file', productExcelList.value[0]);
// param
.append('areaIds', impotrCheckboxValue.value.join(',') as any);
importLoading
.
value
=
true
;
const
res
=
await
axios
.
post
(
config
.
VITE_GLOB_TMALLAB_URL
+
'
/excel/excelNew/uploadOpsProduct
'
,
data
,
const
res
:
any
=
await
regionalSpotManageUploadOpsProductApi
(
{
headers
:
{
Token
:
Token
,
}
,
ghsCode
:
ghsCode
,
ghsName
:
ghsName
,
areaIds
:
impotrCheckboxValue
.
value
,
},
productExcelList
.
value
[
0
],
);
// const res = await regionalSpotManageUploadOpsProductApi(param);
if
(
res
.
data
.
success
)
{
message
.
success
(
'
批量导入成功
'
);
importCancel
();
...
...
src/views/regionalSpotManage/index.vue
View file @
23c4e7b5
...
...
@@ -16,12 +16,12 @@
<
template
>
<div>
<
ManageList
/
>
<
!--
<
a-spin
v-if=
"loading"
style=
"height: 150px; width: 100%; line-height: 150px"
/>
<
!--
<ManageList
/>
--
>
<a-spin
v-if=
"loading"
style=
"height: 150px; width: 100%; line-height: 150px"
/>
<ManageList
v-if=
"show && !loading"
/>
<div
v-if=
"!show && !loading"
class=
"status"
>
<img
src=
"../../assets/images/logo.png"
alt=
""
srcset=
""
/>
</div>
-->
</div>
</div>
</
template
>
...
...
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