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
da2a4784
Commit
da2a4784
authored
Apr 08, 2024
by
limengyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(lmy): bug修复及部分添加TS校验
parent
23c4e7b5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
40 deletions
+99
-40
src/api/regionalSpotManage/index.ts
src/api/regionalSpotManage/index.ts
+16
-3
src/views/regionalSpotManage/components/list.vue
src/views/regionalSpotManage/components/list.vue
+20
-31
src/views/regionalSpotManage/components/platformProBatch.vue
src/views/regionalSpotManage/components/platformProBatch.vue
+1
-4
src/views/regionalSpotManage/components/upLoadTask.vue
src/views/regionalSpotManage/components/upLoadTask.vue
+3
-2
src/views/regionalSpotManage/types.ts
src/views/regionalSpotManage/types.ts
+59
-0
No files found.
src/api/regionalSpotManage/index.ts
View file @
da2a4784
import
{
tmallabHttp
}
from
'
/@/utils/http/axios
'
;
import
{
SearchFormType
,
ListTpyes
,
UploadTaskType
}
from
'
/@/views/regionalSpotManage/types
'
;
enum
Api
{
GetStatus
=
'
/system/opsProduct/IsOpsSupplier
'
,
List
=
'
/system/opsProduct/getList
'
,
...
...
@@ -17,6 +18,14 @@ enum Api {
PlatformProBatchGetDetail
=
'
/system/logNegotiationProductOperate/getDetail
'
,
}
type
ResponseData
<
T
>
=
{
code
:
number
;
message
:
string
;
data
:
T
;
success
:
boolean
;
time
:
string
;
};
/**
* @description: 区域现货管理列表
*/
...
...
@@ -25,8 +34,11 @@ export const regionalSpotManageGetStatusApi = () => tmallabHttp.post({ url: Api.
/**
* @description: 区域现货管理列表
*/
export
const
regionalSpotManageListApi
=
(
data
)
=>
tmallabHttp
.
post
({
url
:
Api
.
List
,
data
},
{
errorMessageMode
:
'
message
'
});
export
const
regionalSpotManageListApi
=
(
data
:
SearchFormType
)
=>
tmallabHttp
.
post
<
ResponseData
<
ListTpyes
[]
>>
(
{
url
:
Api
.
List
,
data
},
{
errorMessageMode
:
'
message
'
},
);
/**
* @description: 获取品牌列表
...
...
@@ -93,7 +105,8 @@ export const regionalSpotManageUploadOpsProductApi = (data, file) =>
/**
* @description: 任务中心获取列表
*/
export
const
taskCenterQueryListApi
=
(
data
)
=>
tmallabHttp
.
post
({
url
:
Api
.
QueryList
,
data
});
export
const
taskCenterQueryListApi
=
(
data
:
{
type
:
number
})
=>
tmallabHttp
.
post
<
ResponseData
<
UploadTaskType
[]
>>
({
url
:
Api
.
QueryList
,
data
});
/**
* @description: 撤销
...
...
src/views/regionalSpotManage/components/list.vue
View file @
da2a4784
...
...
@@ -25,40 +25,32 @@
regionalSpotManageUploadOpsProductApi
,
}
from
'
/@/api/regionalSpotManage
'
;
import
addProductModal
from
'
./addProduct.vue
'
;
import
type
{
ListTpyes
,
AreaIds
,
BrandTypes
}
from
'
../types
'
;
const
config
=
import
.
meta
.
env
;
const
userInfo
:
any
=
getAuthCache
(
'
USER__INFO__
'
);
const
ghsCode
=
userInfo
.
supplier
.
ghsCode
;
const
ghsName
=
userInfo
.
supplier
.
ghsName
;
const
router
=
useRouter
();
const
list
=
ref
<
any
[]
>
([]);
const
list
=
ref
<
ListTpyes
[]
>
([]);
onMounted
(
async
()
=>
{
getList
();
getAllAreaList
();
getGroupOption
();
});
const
searchForm
=
ref
<
{
brands
:
any
;
goodsNo
:
any
;
areaIds
:
any
;
types
:
any
;
brands
:
string
[]
;
goodsNo
:
string
;
areaIds
:
number
[]
;
types
:
string
[]
;
}
>
({
brands
:
[],
goodsNo
:
''
,
areaIds
:
[],
types
:
[],
});
interface
AreaIds
{
city
?:
string
;
cityId
?:
number
;
creationTime
?:
string
;
creator
?:
string
;
id
?:
number
;
province
?:
string
;
provinceId
?:
number
;
}
const
areaIdsOption
=
ref
<
AreaIds
[]
>
([]);
const
typesOption
=
ref
([]);
const
searchBrandList
=
ref
<
any
[]
>
([]);
const
typesOption
=
ref
<
string
[]
>
([]);
const
searchBrandList
=
ref
<
BrandTypes
[]
>
([]);
const
handleSearch
=
async
(
value
)
=>
{
const
res
=
await
regionalSpotManageBrandListApi
({
brand
:
value
});
if
(
res
.
success
)
{
...
...
@@ -77,19 +69,16 @@
showQuickJumper
:
true
,
showSizeChanger
:
true
,
pageSizeOptions
:
[
'
10
'
,
'
20
'
,
'
30
'
,
'
50
'
,
'
100
'
],
onChange
:
(
current
)
=>
{
onChange
:
(
current
,
size
)
=>
{
pagination
.
value
.
current
=
current
;
getList
();
},
onShowSizeChange
:
(
size
)
=>
{
pagination
.
value
.
pageSize
=
size
;
getList
();
},
});
const
getList
=
async
()
=>
{
const
pager
=
ref
({
pageIndex
:
1
,
pageSize
:
10
,
pageIndex
:
pagination
.
value
.
current
,
pageSize
:
pagination
.
value
.
pageSize
,
});
const
param
=
ref
({
...
searchForm
.
value
,
...
...
@@ -101,7 +90,7 @@
const
res
=
await
regionalSpotManageListApi
(
param
.
value
);
if
(
res
.
success
)
{
list
.
value
=
res
.
data
;
pagination
.
value
.
total
=
res
.
data
[
0
].
total
;
pagination
.
value
.
total
=
res
.
data
[
0
].
total
as
number
;
}
else
{
list
.
value
=
[];
pagination
.
value
.
total
=
0
;
...
...
@@ -132,7 +121,7 @@
}
};
const
curItem
=
ref
<
{
[
key
:
string
]:
any
}
>
({});
const
curItem
=
ref
<
ListTpyes
>
({});
// =========查看区域现货 statr ===========
const
loading1
=
ref
(
false
);
...
...
@@ -167,7 +156,7 @@
// ==========查看区域现货 end =============
const
selectedRowKeys
=
ref
([]);
const
selectedRows
=
ref
<
any
[]
>
([]);
const
selectedRows
=
ref
<
ListTpyes
[]
>
([]);
const
onSelectChange
=
(
Keys
,
Rows
)
=>
{
selectedRowKeys
.
value
=
Keys
;
selectedRows
.
value
=
Rows
;
...
...
@@ -195,7 +184,7 @@
const
curArr
=
delAreaList
.
value
.
map
((
it
)
=>
it
.
cityCode
);
for
(
const
k
of
allAreaList
.
value
)
{
if
(
curArr
.
includes
(
k
.
cityId
))
{
addCheckboxValue
.
value
.
push
(
k
.
cityId
);
addCheckboxValue
.
value
.
push
(
k
.
cityId
as
number
);
k
.
disabled
=
true
;
}
}
...
...
@@ -235,7 +224,7 @@
const
delLoading
=
ref
(
false
);
const
deleteNum
=
ref
(
0
);
const
radioValue
=
ref
(
1
);
const
delAreaList
=
ref
<
any
[]
>
([]);
//已添加的区域
const
delAreaList
=
ref
<
AreaIds
[]
>
([]);
//已添加的区域
const
delCheckboxValue
=
ref
([]);
const
del
=
async
(
val
)
=>
{
curItem
.
value
=
val
;
...
...
@@ -336,7 +325,7 @@
};
// ================区域现货商品删除 end=====================
const
allAreaList
=
ref
<
any
[]
>
([]);
const
allAreaList
=
ref
<
AreaIds
[]
>
([]);
const
getAllAreaList
=
async
()
=>
{
const
res
=
await
regionalSpotManageGetAreaListApi
({});
if
(
res
.
success
)
{
...
...
@@ -357,7 +346,7 @@
// =====================批量导入 start=======================
const
productExcelList
=
ref
<
any
[]
>
([]);
const
importVisible
=
ref
(
false
);
const
impotrCheckboxValue
=
ref
<
any
[]
>
([]);
const
impotrCheckboxValue
=
ref
<
number
[]
>
([]);
const
batchImport
=
()
=>
{
importVisible
.
value
=
true
;
allAreaList
.
value
.
forEach
((
v
)
=>
{
...
...
@@ -445,12 +434,12 @@
v-model:value=
"searchForm.brands"
show-search
mode=
"multiple"
placeholder=
"请输入品牌名称"
placeholder=
"请输入
搜索
品牌名称"
style=
"width: 100%"
:default-active-first-option=
"false"
:show-arrow=
"false"
:filter-option=
"false"
:not-found-content=
"null
"
not-found-content=
"暂无数据
"
:maxTagCount=
"1"
@
search=
"handleSearch"
>
...
...
src/views/regionalSpotManage/components/platformProBatch.vue
View file @
da2a4784
...
...
@@ -19,11 +19,8 @@
showQuickJumper
:
true
,
showSizeChanger
:
true
,
pageSizeOptions
:
[
'
10
'
,
'
20
'
,
'
30
'
,
'
50
'
,
'
100
'
],
onChange
:
(
current
)
=>
{
onChange
:
(
current
,
size
)
=>
{
pagination
.
value
.
current
=
current
;
getList
();
},
onShowSizeChange
:
(
size
)
=>
{
pagination
.
value
.
pageSize
=
size
;
getList
();
},
...
...
src/views/regionalSpotManage/components/upLoadTask.vue
View file @
da2a4784
...
...
@@ -6,11 +6,12 @@
taskCenterQueryListApi
,
taskCenterRevokeExcelUploadApi
,
}
from
'
/@/api/regionalSpotManage
'
;
import
{
UploadTaskType
}
from
'
../types
'
;
onMounted
(
async
()
=>
{
getList
();
});
let
list
=
ref
<
any
[]
>
([]);
le
t
listLoading
=
ref
(
false
);
const
list
=
ref
<
UploadTaskType
[]
>
([]);
cons
t
listLoading
=
ref
(
false
);
const
downLoad
=
(
url
)
=>
{
window
.
open
(
config
.
VITE_GLOB_TMALLAB_URL
+
'
/system/excelFile/
'
+
url
,
'
_blank
'
);
};
...
...
src/views/regionalSpotManage/types.ts
0 → 100644
View file @
da2a4784
export
interface
SearchFormType
{
areaIds
?:
number
[];
brands
?:
string
[];
goodsNo
?:
string
;
pageIndex
?:
number
;
pageSize
?:
number
;
types
?:
string
[];
}
export
interface
ListTpyes
{
brand
?:
string
;
goodsNo
?:
string
;
productName
?:
string
;
productStatus
?:
boolean
;
spec
?:
string
;
total
?:
number
;
}
export
interface
AreaIds
{
city
?:
string
;
cityId
?:
number
;
creationTime
?:
string
;
creator
?:
string
;
id
?:
number
;
province
?:
string
;
provinceId
?:
number
;
cityCode
?:
number
;
provinceName
?:
string
;
cityName
?:
string
;
disabled
?:
boolean
;
}
export
interface
BrandTypes
{
agentLevel
:
string
;
applierName
:
string
;
brand
:
string
;
brandPass
:
boolean
;
brandQualification
:
string
;
count
:
number
|
null
;
createTime
:
string
;
expirationDate
:
string
;
salePlat
:
number
;
}
export
interface
UploadTaskType
{
createName
:
string
;
createTime
:
string
;
failNum
:
number
;
fileUrl
:
string
;
isRevoke
:
boolean
;
productNum
:
number
;
revokeTime
:
string
|
null
;
revokeUsername
:
string
|
null
;
status
:
number
;
successNum
:
number
;
supplierCode
:
string
;
supplierFileName
:
string
;
type
:
string
;
}
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