Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
b1679d3f
Commit
b1679d3f
authored
Jun 05, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
acc4fd76
35ffcc5a
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1344 additions
and
121 deletions
+1344
-121
components.d.ts
+9
-1
src/api/externalAuth.ts
+44
-0
src/api/podUsOrder.ts
+24
-3
src/components/CustomizeForm.tsx
+2
-5
src/components/RenderColumn.vue
+2
-6
src/router/index.ts
+9
-1
src/router/menu.ts
+5
-0
src/types/api/externalAuth.ts
+19
-0
src/utils/index.ts
+16
-1
src/views/AccountStatementNote.vue
+1
-1
src/views/logistics/components/LogisticsWaySelect.tsx
+122
-32
src/views/logistics/declarationRule.vue
+77
-26
src/views/logistics/logisticsMethod.vue
+31
-31
src/views/logistics/types/declarationRule.ts
+2
-0
src/views/order/podUs/components/ResultInfo.vue
+144
-0
src/views/order/podUs/index.vue
+90
-11
src/views/podBillOrder/index.vue
+1
-1
src/views/system/UserPage.vue
+367
-0
src/views/system/externalAuthorisationPage.vue
+377
-0
src/views/warehouse/issueDoc.vue
+1
-1
src/views/warehouse/receiptDoc.vue
+1
-1
No files found.
components.d.ts
View file @
b1679d3f
...
@@ -13,12 +13,18 @@ declare module 'vue' {
...
@@ -13,12 +13,18 @@ declare module 'vue' {
DateRangePicker
:
typeof
import
(
'./src/components/Form.vue/DateRangePicker.vue'
)[
'default'
]
DateRangePicker
:
typeof
import
(
'./src/components/Form.vue/DateRangePicker.vue'
)[
'default'
]
ElButton
:
typeof
import
(
'element-plus/es'
)[
'ElButton'
]
ElButton
:
typeof
import
(
'element-plus/es'
)[
'ElButton'
]
ElCard
:
typeof
import
(
'element-plus/es'
)[
'ElCard'
]
ElCard
:
typeof
import
(
'element-plus/es'
)[
'ElCard'
]
ElCarousel
:
typeof
import
(
'element-plus/es'
)[
'ElCarousel'
]
ElCarouselItem
:
typeof
import
(
'element-plus/es'
)[
'ElCarouselItem'
]
ElCheckbox
:
typeof
import
(
'element-plus/es'
)[
'ElCheckbox'
]
ElCheckbox
:
typeof
import
(
'element-plus/es'
)[
'ElCheckbox'
]
ElCheckboxGroup
:
typeof
import
(
'element-plus/es'
)[
'ElCheckboxGroup'
]
ElCol
:
typeof
import
(
'element-plus/es'
)[
'ElCol'
]
ElCol
:
typeof
import
(
'element-plus/es'
)[
'ElCol'
]
ElConfigProvider
:
typeof
import
(
'element-plus/es'
)[
'ElConfigProvider'
]
ElConfigProvider
:
typeof
import
(
'element-plus/es'
)[
'ElConfigProvider'
]
ElDatePicker
:
typeof
import
(
'element-plus/es'
)[
'ElDatePicker'
]
ElDatePicker
:
typeof
import
(
'element-plus/es'
)[
'ElDatePicker'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDrawer
:
typeof
import
(
'element-plus/es'
)[
'ElDrawer'
]
ElDrawer
:
typeof
import
(
'element-plus/es'
)[
'ElDrawer'
]
ElDropdown
:
typeof
import
(
'element-plus/es'
)[
'ElDropdown'
]
ElDropdownItem
:
typeof
import
(
'element-plus/es'
)[
'ElDropdownItem'
]
ElDropdownMenu
:
typeof
import
(
'element-plus/es'
)[
'ElDropdownMenu'
]
ElEmpty
:
typeof
import
(
'element-plus/es'
)[
'ElEmpty'
]
ElEmpty
:
typeof
import
(
'element-plus/es'
)[
'ElEmpty'
]
ElForm
:
typeof
import
(
'element-plus/es'
)[
'ElForm'
]
ElForm
:
typeof
import
(
'element-plus/es'
)[
'ElForm'
]
ElFormItem
:
typeof
import
(
'element-plus/es'
)[
'ElFormItem'
]
ElFormItem
:
typeof
import
(
'element-plus/es'
)[
'ElFormItem'
]
...
@@ -27,6 +33,8 @@ declare module 'vue' {
...
@@ -27,6 +33,8 @@ declare module 'vue' {
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElInputNumber
:
typeof
import
(
'element-plus/es'
)[
'ElInputNumber'
]
ElInputNumber
:
typeof
import
(
'element-plus/es'
)[
'ElInputNumber'
]
ElLink
:
typeof
import
(
'element-plus/es'
)[
'ElLink'
]
ElLink
:
typeof
import
(
'element-plus/es'
)[
'ElLink'
]
ElMenu
:
typeof
import
(
'element-plus/es'
)[
'ElMenu'
]
ElMenuItem
:
typeof
import
(
'element-plus/es'
)[
'ElMenuItem'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
ElPagination
:
typeof
import
(
'element-plus/es'
)[
'ElPagination'
]
ElPagination
:
typeof
import
(
'element-plus/es'
)[
'ElPagination'
]
ElPopover
:
typeof
import
(
'element-plus/es'
)[
'ElPopover'
]
ElPopover
:
typeof
import
(
'element-plus/es'
)[
'ElPopover'
]
...
@@ -34,6 +42,7 @@ declare module 'vue' {
...
@@ -34,6 +42,7 @@ declare module 'vue' {
ElRadioGroup
:
typeof
import
(
'element-plus/es'
)[
'ElRadioGroup'
]
ElRadioGroup
:
typeof
import
(
'element-plus/es'
)[
'ElRadioGroup'
]
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
ElSelect
:
typeof
import
(
'element-plus/es'
)[
'ElSelect'
]
ElSelect
:
typeof
import
(
'element-plus/es'
)[
'ElSelect'
]
ElSubMenu
:
typeof
import
(
'element-plus/es'
)[
'ElSubMenu'
]
ElSwitch
:
typeof
import
(
'element-plus/es'
)[
'ElSwitch'
]
ElSwitch
:
typeof
import
(
'element-plus/es'
)[
'ElSwitch'
]
ElTable
:
typeof
import
(
'element-plus/es'
)[
'ElTable'
]
ElTable
:
typeof
import
(
'element-plus/es'
)[
'ElTable'
]
ElTableColumn
:
typeof
import
(
'element-plus/es'
)[
'ElTableColumn'
]
ElTableColumn
:
typeof
import
(
'element-plus/es'
)[
'ElTableColumn'
]
...
@@ -42,7 +51,6 @@ declare module 'vue' {
...
@@ -42,7 +51,6 @@ declare module 'vue' {
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElTree
:
typeof
import
(
'element-plus/es'
)[
'ElTree'
]
ElTree
:
typeof
import
(
'element-plus/es'
)[
'ElTree'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
Icon
:
typeof
import
(
'./src/components/Icon.vue'
)[
'default'
]
Icon
:
typeof
import
(
'./src/components/Icon.vue'
)[
'default'
]
ImageView
:
typeof
import
(
'./src/components/ImageView.vue'
)[
'default'
]
ImageView
:
typeof
import
(
'./src/components/ImageView.vue'
)[
'default'
]
LogList
:
typeof
import
(
'./src/components/LogList.vue'
)[
'default'
]
LogList
:
typeof
import
(
'./src/components/LogList.vue'
)[
'default'
]
...
...
src/api/externalAuth.ts
0 → 100644
View file @
b1679d3f
import
{
BasePaginationData
,
BaseRespData
}
from
'@/types/api'
import
axios
from
'./axios'
import
{
ExternalAuthListData
}
from
'@/types/api/externalAuth'
export
function
getExternalAuthorisationListApi
(
data
:
{
type
:
string
},
page
:
number
,
pageSize
:
number
,
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
ExternalAuthListData
>>
(
'factory/baseExternalAccount/list_page'
,
null
,
{
params
:
{
...
data
,
currentPage
:
page
,
pageSize
,
},
},
)
}
export
function
loadAccountTypesApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
string
[]
>>
(
'factory/baseExternalAccount/allCodelist'
,
)
}
export
function
getExternalAuthorisationByIdApi
(
id
?:
number
|
null
)
{
return
axios
.
get
<
never
,
BaseRespData
<
ExternalAuthListData
>>
(
`factory/baseExternalAccount/get?id=
${
id
}
`
,
)
}
export
function
deleteExternalAuthorisationApi
(
ids
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
`factory/baseExternalAccount/delete?ids=
${
ids
}
`
,
)
}
export
function
addExternalAuthorisationApi
(
url
:
string
,
data
:
ExternalAuthListData
,
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
url
,
data
)
}
src/api/podUsOrder.ts
View file @
b1679d3f
...
@@ -137,7 +137,7 @@ export function printPrintOrderApi(orderIds: number[]) {
...
@@ -137,7 +137,7 @@ export function printPrintOrderApi(orderIds: number[]) {
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderUs/printPickPdf'
,
'factory/podJomallOrderUs/printPickPdf'
,
{
{
ids
:
orderIds
.
join
(
','
)
ids
:
orderIds
.
join
(
','
)
,
},
},
)
)
}
}
...
@@ -154,9 +154,9 @@ export function stockOutCheckApi(orderIds: number[]) {
...
@@ -154,9 +154,9 @@ export function stockOutCheckApi(orderIds: number[]) {
`factory/podJomallOrderUs/replenishVerify?ids=
${
orderIds
.
join
(
','
)}
`
,
`factory/podJomallOrderUs/replenishVerify?ids=
${
orderIds
.
join
(
','
)}
`
,
)
)
}
}
export
function
toBe
Confirmed
Api
(
orderIds
:
number
[])
{
export
function
toBe
Picking
Api
(
orderIds
:
number
[])
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderUs/updateStockOutOrderTo
WaitConfirmed
?ids=
${
orderIds
.
join
(
`factory/podJomallOrderUs/updateStockOutOrderTo
Picking
?ids=
${
orderIds
.
join
(
','
,
','
,
)}
`
,
)}
`
,
)
)
...
@@ -249,3 +249,24 @@ export function refreshMaterialApi(orderIds: string) {
...
@@ -249,3 +249,24 @@ export function refreshMaterialApi(orderIds: string) {
{
orderIds
},
{
orderIds
},
)
)
}
}
// 获取跟踪号
export
function
getTrackingNumberApi
(
orderIds
:
(
string
|
number
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/getTrackingNumber'
,
orderIds
,
)
}
// 获取打印面单
export
function
getfaceSimplexFileApi
(
orderIds
:
(
string
|
number
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/getfaceSimplexFile'
,
orderIds
,
)
}
// 取消物流订单
export
function
cancelLogisticsOrderApi
(
orderIds
:
(
string
|
number
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/cancelLogisticsOrder'
,
orderIds
,
)
}
src/components/CustomizeForm.tsx
View file @
b1679d3f
...
@@ -127,14 +127,11 @@ export default defineComponent({
...
@@ -127,14 +127,11 @@ export default defineComponent({
return
await
formRef
.
value
.
validate
()
return
await
formRef
.
value
.
validate
()
}
}
// 表单验证方法
// 表单验证方法
const
clearValidate
=
async
(
clearFields
?:
string
[]
)
=>
{
const
clearValidate
=
async
()
=>
{
if
(
!
formRef
.
value
)
return
false
if
(
!
formRef
.
value
)
return
false
if
(
clearFields
)
{
return
await
formRef
.
value
?.
clearValidate
(
clearFields
)
}
else
{
return
await
formRef
.
value
?.
clearValidate
()
return
await
formRef
.
value
?.
clearValidate
()
}
}
}
// 重置表单
// 重置表单
const
resetFields
=
async
()
=>
{
const
resetFields
=
async
()
=>
{
...
...
src/components/RenderColumn.vue
View file @
b1679d3f
...
@@ -34,10 +34,8 @@
...
@@ -34,10 +34,8 @@
<ElTableColumn
v-else
header-align=
"center"
v-bind=
"col"
>
<ElTableColumn
v-else
header-align=
"center"
v-bind=
"col"
>
<
template
#
header=
"{ column, $index }"
>
<
template
#
header=
"{ column, $index }"
>
<component
<component
:is=
"
col.headerRender
"
:is=
"
() => col.headerRender(column, $index)
"
v-if=
"col.headerRender"
v-if=
"col.headerRender"
:column=
"column"
:index=
"$index"
/>
/>
<slot
<slot
v-else-if=
"col.headerSlot"
v-else-if=
"col.headerSlot"
...
@@ -54,10 +52,8 @@
...
@@ -54,10 +52,8 @@
<!-- 如果传递按钮数组,就展示按钮组 END-->
<!-- 如果传递按钮数组,就展示按钮组 END-->
<!-- render函数 (START) 使用内置的component组件可以支持h函数渲染和txs语法-->
<!-- render函数 (START) 使用内置的component组件可以支持h函数渲染和txs语法-->
<component
<component
:is=
"
col.render
"
:is=
"
() => col.render(row, $index)
"
v-if=
"col.render"
v-if=
"col.render"
:row=
"row"
:index=
"$index"
/>
/>
<slot
<slot
v-else-if=
"col.slot"
v-else-if=
"col.slot"
...
...
src/router/index.ts
View file @
b1679d3f
...
@@ -13,7 +13,7 @@ import Error from '@/views/error/404.vue'
...
@@ -13,7 +13,7 @@ import Error from '@/views/error/404.vue'
import
OrderList
from
'@/views/order/index.vue'
import
OrderList
from
'@/views/order/index.vue'
import
ProductionComplete
from
'@/views/production/complete.vue'
import
ProductionComplete
from
'@/views/production/complete.vue'
import
{
getToken
}
from
'@/api/axios'
import
{
getToken
}
from
'@/api/axios'
import
UserPage
from
'@/views/UserPage.vue'
import
UserPage
from
'@/views/
system/
UserPage.vue'
import
DeliveryNotePage
from
'@/views/DeliveryNotePage.vue'
import
DeliveryNotePage
from
'@/views/DeliveryNotePage.vue'
import
AccountStatementNote
from
'@/views/AccountStatementNote.vue'
import
AccountStatementNote
from
'@/views/AccountStatementNote.vue'
// import Product from '@/views/product/index.vue'
// import Product from '@/views/product/index.vue'
...
@@ -27,6 +27,7 @@ import WarehouseManage from '@/views/warehouse/manage.vue'
...
@@ -27,6 +27,7 @@ import WarehouseManage from '@/views/warehouse/manage.vue'
import
WarehouseWarning
from
'@/views/warehouse/warning.vue'
import
WarehouseWarning
from
'@/views/warehouse/warning.vue'
import
WarehousePosition
from
'@/views/warehouse/position.vue'
import
WarehousePosition
from
'@/views/warehouse/position.vue'
import
receiptDoc
from
'@/views/warehouse/receiptDoc.vue'
import
receiptDoc
from
'@/views/warehouse/receiptDoc.vue'
import
ExternalAuthorisationPage
from
'@/views/system/externalAuthorisationPage.vue'
// import issueDoc from '@/views/warehouse/issueDoc.vue'
// import issueDoc from '@/views/warehouse/issueDoc.vue'
const
router
=
createRouter
({
const
router
=
createRouter
({
history
:
createWebHistory
(),
history
:
createWebHistory
(),
...
@@ -93,6 +94,13 @@ const router = createRouter({
...
@@ -93,6 +94,13 @@ const router = createRouter({
component
:
UserPage
,
component
:
UserPage
,
},
},
{
{
path
:
'/system/external-authorisation'
,
meta
:
{
title
:
'外部授权'
},
component
:
ExternalAuthorisationPage
},
{
path
:
'/system/delivery-note'
,
path
:
'/system/delivery-note'
,
meta
:
{
meta
:
{
title
:
'定制发货单'
,
title
:
'定制发货单'
,
...
...
src/router/menu.ts
View file @
b1679d3f
...
@@ -165,6 +165,11 @@ const menu: MenuItem[] = [
...
@@ -165,6 +165,11 @@ const menu: MenuItem[] = [
id
:
4
,
id
:
4
,
label
:
'用户管理'
,
label
:
'用户管理'
,
},
},
{
index
:
'/system/external-authorisation'
,
id
:
5
,
label
:
'外部授权'
,
},
],
],
},
},
...
...
src/types/api/externalAuth.ts
0 → 100644
View file @
b1679d3f
export
interface
ExternalAuthListData
{
id
?:
number
account
?:
string
password
?:
string
supperMark
?:
number
factoryId
?:
number
factoryCode
?:
number
status
?:
number
createTime
?:
string
accountType
?:
string
accountDefault
?:
string
defaultType
?:
boolean
type
?:
string
appKey
?:
string
appSecret
?:
string
token
?:
string
refreshToken
?:
string
refreshTokenFailureTime
?:
string
}
src/utils/index.ts
View file @
b1679d3f
import
{
get
}
from
'lodash-es'
import
{
get
}
from
'lodash-es'
import
{
ElMessage
}
from
'element-plus'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export
function
val
<
T
>
(
data
:
T
,
key
:
string
|
((
data
:
T
)
=>
any
))
{
export
function
val
<
T
>
(
data
:
T
,
key
:
string
|
((
data
:
T
)
=>
any
))
{
if
(
typeof
key
===
'function'
)
return
key
(
data
)
if
(
typeof
key
===
'function'
)
return
key
(
data
)
return
get
(
data
,
key
)
return
get
(
data
,
key
)
}
}
/**
* @param {*} text
*/
export
function
copyText
(
text
:
string
)
{
const
oInput
=
document
.
createElement
(
'input'
)
oInput
.
value
=
text
document
.
body
.
appendChild
(
oInput
)
oInput
.
select
()
// 选择对象
document
.
execCommand
(
'Copy'
)
// 执行浏览器复制命令
oInput
.
className
=
'oInput'
oInput
.
style
.
display
=
'none'
document
.
body
.
removeChild
(
oInput
)
ElMessage
.
success
(
'复制成功'
)
}
src/views/AccountStatementNote.vue
View file @
b1679d3f
...
@@ -1039,7 +1039,7 @@ $border: solid 1px #ddd;
...
@@ -1039,7 +1039,7 @@ $border: solid 1px #ddd;
::
v
-
deep
(.
el
-
tabs
)
{
::
v
-
deep
(.
el
-
tabs
)
{
display
:
flex
;
display
:
flex
;
flex
-
direction
:
column
;
//
flex-direction: column;
height
:
100
%
;
height
:
100
%
;
.
el
-
tabs__content
{
.
el
-
tabs__content
{
...
...
src/views/logistics/components/LogisticsWaySelect.tsx
View file @
b1679d3f
...
@@ -6,24 +6,45 @@ import {
...
@@ -6,24 +6,45 @@ import {
ElCheckboxGroup
,
ElCheckboxGroup
,
ElInput
,
ElInput
,
}
from
'element-plus'
}
from
'element-plus'
import
{
usableAllList
}
from
'@/api/logistics'
const
styles
=
{
const
styles
=
{
searchForm
:
{
searchForm
:
{
position
:
'relative'
,
position
:
'relative'
,
},
},
titleBox
:
{
titleBox
:
{
display
:
'flex'
,
display
:
'flex'
,
padding
:
'10px'
,
padding
:
'10px
18px
'
,
justifyContent
:
'space-between'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
},
},
checkboxGroup
:
{
checkboxGroup
:
{
display
:
'flex'
,
display
:
'flex'
,
padding
:
'10px'
,
padding
:
'10px'
,
justifyContent
:
'
space-between
'
,
justifyContent
:
'
flex-start
'
,
backgroundColor
:
'#efefef'
,
backgroundColor
:
'#efefef'
,
},
},
}
as
const
}
as
const
interface
ICompanyList
{
warehouseName
:
string
wayList
:
IwayList
[]
}
interface
IwayList
{
name
:
string
id
:
string
}
interface
IAllList
{
factoryId
:
number
id
:
number
name
:
string
serviceCode
:
string
siteUrl
:
string
status
:
number
uinuinWarehouseId
:
number
|
null
updateTime
:
string
warehouseId
:
number
warehouseName
:
string
}
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'CustomizeForm'
,
name
:
'CustomizeForm'
,
props
:
{
props
:
{
...
@@ -31,40 +52,105 @@ export default defineComponent({
...
@@ -31,40 +52,105 @@ export default defineComponent({
type
:
Array
as
PropType
<
(
string
|
number
)[]
>
,
type
:
Array
as
PropType
<
(
string
|
number
)[]
>
,
default
:
()
=>
[],
default
:
()
=>
[],
},
},
companyList
:
{
type
:
Array
as
PropType
<
IAllList
[]
>
,
default
:
()
=>
[],
},
},
},
emits
:
[
'update:modelValue'
,
'validate'
],
emits
:
[
'update:modelValue'
],
setup
()
{
setup
(
props
,
{
emit
}
)
{
const
company
SelectStatus
=
ref
([])
const
company
List
=
ref
<
ICompanyList
[]
>
([])
const
companyList
=
ref
([{
name
:
'1'
,
items
:
[{
name
:
'1'
,
id
:
'1'
}]
}
])
const
allList
=
ref
<
IAllList
[]
>
([
])
const
selectedList
=
ref
<
(
string
|
number
)[]
>
([])
const
selectedList
=
ref
<
(
string
|
number
)[]
>
([])
const
logisticsWayId
=
ref
([])
function
setCheckAll
()
{}
const
waysName
=
ref
(
''
)
async
function
getAllList
()
{
try
{
watch
(
const
res
=
await
Promise
.
allSettled
([
usableAllList
()])
()
=>
props
.
modelValue
,
res
.
forEach
(
(
newVal
)
=>
{
(
selectedList
.
value
=
newVal
item
:
PromiseSettledResult
<
{
code
:
number
;
data
:
never
[]
}
>
,
},
index
,
{
)
=>
{
immediate
:
true
,
if
(
item
?.
status
===
'fulfilled'
)
{
deep
:
true
,
if
(
item
.
value
.
code
===
200
)
{
},
if
(
index
==
0
)
{
)
logisticsWayId
.
value
=
[...(
item
.
value
.
data
||
[])]
}
watch
(
[()
=>
selectedList
.
value
,
()
=>
props
.
companyList
],
(
newVal
)
=>
{
emit
(
'update:modelValue'
,
newVal
[
0
])
allList
.
value
=
newVal
[
1
]
companyList
.
value
=
transformData
(
newVal
[
1
])
if
(
newVal
[
1
]?.
length
)
{
waysName
.
value
=
newVal
[
1
]
.
filter
((
item
)
=>
{
if
(
newVal
[
0
].
includes
(
item
.
id
))
{
return
item
.
name
}
}
})
.
map
((
item
)
=>
item
.
name
)
.
join
(
','
)
// emit('waysName', res)
console
.
log
(
87
,
waysName
.
value
)
}
}
},
},
{
deep
:
true
,
immediate
:
true
},
)
function
setCheckAll
(
company
:
ICompanyList
,
event
:
boolean
)
{
if
(
event
)
{
selectedList
.
value
=
[
...
selectedList
.
value
,
...
company
.
wayList
.
map
((
item
)
=>
item
.
id
),
]
}
else
{
selectedList
.
value
=
selectedList
.
value
.
filter
(
(
item
)
=>
!
company
.
wayList
.
map
((
el
)
=>
el
.
id
).
includes
(
item
as
string
),
)
}
}
const
getCompanySelectedStatus
=
computed
(()
=>
{
const
statusMap
=
new
Map
()
companyList
.
value
.
forEach
((
company
:
ICompanyList
)
=>
{
const
allSelected
=
company
.
wayList
.
every
((
way
)
=>
selectedList
.
value
.
includes
(
way
.
id
),
)
)
console
.
log
(
59
,
logisticsWayId
.
value
)
statusMap
.
set
(
company
.
warehouseName
,
allSelected
)
}
catch
(
error
)
{
})
console
.
log
(
error
)
return
(
company
:
ICompanyList
)
=>
statusMap
.
get
(
company
.
warehouseName
)
})
function
transformData
(
data
:
IAllList
[])
{
const
warehouseMap
=
new
Map
()
for
(
const
item
of
data
)
{
const
warehouseName
=
item
.
warehouseName
??
'未命名仓库'
if
(
!
warehouseMap
.
has
(
warehouseName
))
{
warehouseMap
.
set
(
warehouseName
,
new
Set
())
}
}
warehouseMap
.
get
(
warehouseName
).
add
({
name
:
item
.
name
,
id
:
item
.
id
})
}
}
const
result
:
{
warehouseName
:
string
wayList
:
{
name
:
string
;
id
:
string
}[]
}[]
=
[]
onMounted
(()
=>
{
warehouseMap
.
forEach
((
children
,
parent
)
=>
{
getAllList
()
result
.
push
({
warehouseName
:
parent
,
wayList
:
Array
.
from
(
children
),
})
})
})
return
result
}
return
()
=>
(
return
()
=>
(
<
ElPopover
<
ElPopover
width=
"650px"
width=
"650px"
...
@@ -73,7 +159,11 @@ export default defineComponent({
...
@@ -73,7 +159,11 @@ export default defineComponent({
popper
-
style=
{
{
padding
:
0
}
}
popper
-
style=
{
{
padding
:
0
}
}
v
-
slots=
{
{
v
-
slots=
{
{
reference
:
()
=>
(
reference
:
()
=>
(
<
ElInput
style=
{
{
width
:
'100%'
}
}
placeholder=
"请选择物流方式"
/>
<
ElInput
modelValue=
{
waysName
.
value
}
style=
{
{
width
:
'100%'
}
}
placeholder=
"请选择物流方式"
/>
),
),
}
}
}
}
>
>
...
@@ -81,10 +171,10 @@ export default defineComponent({
...
@@ -81,10 +171,10 @@ export default defineComponent({
{
companyList
.
value
.
map
((
company
,
index
)
=>
(
{
companyList
.
value
.
map
((
company
,
index
)
=>
(
<
div
class=
"companyBox"
key=
{
index
}
>
<
div
class=
"companyBox"
key=
{
index
}
>
<
div
style=
{
styles
.
titleBox
}
>
<
div
style=
{
styles
.
titleBox
}
>
<
div
class=
"title"
>
{
company
.
n
ame
}
</
div
>
<
div
class=
"title"
>
{
company
.
warehouseN
ame
}
</
div
>
<
ElCheckbox
<
ElCheckbox
modelValue=
{
companySelectStatus
.
value
[
index
]
}
modelValue=
{
getCompanySelectedStatus
.
value
(
company
)
}
onChange=
{
(
)
=>
setCheckAll
(
)
}
onChange=
{
(
v
)
=>
setCheckAll
(
company
,
v
as
boolean
)
}
class=
"selectAll"
class=
"selectAll"
>
>
全选
全选
...
@@ -96,7 +186,7 @@ export default defineComponent({
...
@@ -96,7 +186,7 @@ export default defineComponent({
onUpdate
:
modelValue=
{
(
value
)
=>
(
selectedList
.
value
=
value
)
}
onUpdate
:
modelValue=
{
(
value
)
=>
(
selectedList
.
value
=
value
)
}
style=
{
styles
.
checkboxGroup
}
style=
{
styles
.
checkboxGroup
}
>
>
{
company
.
items
.
map
((
item
)
=>
(
{
company
.
wayList
.
map
((
item
)
=>
(
<
ElCheckbox
<
ElCheckbox
label=
{
item
.
name
}
label=
{
item
.
name
}
value=
{
item
.
id
}
value=
{
item
.
id
}
...
...
src/views/logistics/declarationRule.vue
View file @
b1679d3f
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
<CustomizeTable
<CustomizeTable
v-model=
"tableData"
v-model=
"tableData"
:config=
"tableConfig"
:config=
"tableConfig"
align=
"center"
@
getCheckboxRecords=
"handleCheckboxRecords"
@
getCheckboxRecords=
"handleCheckboxRecords"
></CustomizeTable>
></CustomizeTable>
</div>
</div>
...
@@ -76,6 +77,7 @@ import {
...
@@ -76,6 +77,7 @@ import {
updateLogisticsCustomsRule
,
updateLogisticsCustomsRule
,
deleteLogisticsCustomsRule
,
deleteLogisticsCustomsRule
,
getLogisticsLog
,
getLogisticsLog
,
usableAllList
,
}
from
'@/api/logistics'
}
from
'@/api/logistics'
import
SearchForm
from
'@/components/SearchForm.tsx'
import
SearchForm
from
'@/components/SearchForm.tsx'
...
@@ -91,6 +93,8 @@ import { AddDeclarationRuleObj } from './types/declarationRule'
...
@@ -91,6 +93,8 @@ import { AddDeclarationRuleObj } from './types/declarationRule'
import
{
Edit
,
Delete
,
List
}
from
'@element-plus/icons-vue'
import
{
Edit
,
Delete
,
List
}
from
'@element-plus/icons-vue'
import
{
ISeachFormConfig
}
from
'@/types/searchType'
import
{
ISeachFormConfig
}
from
'@/types/searchType'
import
LogisticsWaySelect
from
'./components/LogisticsWaySelect.tsx'
import
LogisticsWaySelect
from
'./components/LogisticsWaySelect.tsx'
import
{
TableColumn
}
from
'@/components/VxeTable'
const
[
searchForm
]
=
useValue
({})
const
[
searchForm
]
=
useValue
({})
const
[
editForm
,
resetEditForm
]
=
useValue
<
AddDeclarationRuleObj
>
({
const
[
editForm
,
resetEditForm
]
=
useValue
<
AddDeclarationRuleObj
>
({
type
:
1
,
type
:
1
,
...
@@ -172,11 +176,16 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -172,11 +176,16 @@ const formConfig = computed<IFormConfig[]>(() => [
],
],
},
},
{
{
prop
:
'logisticsWay'
,
prop
:
'logisticsWay
Id
'
,
type
:
'select'
,
type
:
'select'
,
label
:
'物流方式'
,
label
:
'物流方式'
,
render
:
()
=>
{
render
:
()
=>
{
return
<
LogisticsWaySelect
><
/LogisticsWaySelect
>
return
(
<
LogisticsWaySelect
v
-
model
=
{
editForm
.
value
.
logisticsWayId
}
companyList
=
{
logisticsWayId
.
value
}
><
/LogisticsWaySelect
>
)
},
},
rules
:
[
rules
:
[
...
@@ -202,15 +211,15 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -202,15 +211,15 @@ const formConfig = computed<IFormConfig[]>(() => [
if
(
value
===
2
)
{
if
(
value
===
2
)
{
editForm
.
value
.
fixedValue
=
''
editForm
.
value
.
fixedValue
=
''
editForm
.
value
.
fixedWeight
=
''
editForm
.
value
.
fixedWeight
=
''
editFormRef
.
value
?.
clearValidate
()
}
else
{
}
else
{
editForm
.
value
.
orderPercent
=
''
editForm
.
value
.
orderPercent
=
''
editForm
.
value
.
valueUp
=
''
editForm
.
value
.
valueUp
=
''
editForm
.
value
.
weightPercent
=
''
editForm
.
value
.
weightPercent
=
''
editForm
.
value
.
weightUp
=
''
editForm
.
value
.
weightUp
=
''
editFormRef
.
value
?.
clearValidate
()
}
}
editFormRef
.
value
?.
refashConfig
(
mapData
.
value
.
get
(
value
)
as
string
[])
editFormRef
.
value
?.
refashConfig
(
mapData
.
value
.
get
(
value
)
as
string
[])
editFormRef
.
value
?.
clearValidate
()
console
.
log
(
221
,
editForm
.
value
)
},
},
},
},
rules
:
[
rules
:
[
...
@@ -234,6 +243,7 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -234,6 +243,7 @@ const formConfig = computed<IFormConfig[]>(() => [
{
{
required
:
true
,
required
:
true
,
message
:
'请输入固定金额'
,
message
:
'请输入固定金额'
,
trigger
:
'blur'
,
},
},
],
],
},
},
...
@@ -251,6 +261,7 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -251,6 +261,7 @@ const formConfig = computed<IFormConfig[]>(() => [
{
{
required
:
true
,
required
:
true
,
message
:
'请输入固定重量'
,
message
:
'请输入固定重量'
,
trigger
:
'blur'
,
},
},
],
],
},
},
...
@@ -261,6 +272,7 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -261,6 +272,7 @@ const formConfig = computed<IFormConfig[]>(() => [
isIncludeProp
:
true
,
isIncludeProp
:
true
,
attrs
:
{
attrs
:
{
placeholder
:
'请输入金额百分比'
,
placeholder
:
'请输入金额百分比'
,
trigger
:
'blur'
,
hasSuffix
:
true
,
hasSuffix
:
true
,
suffix
:
'%'
,
suffix
:
'%'
,
},
},
...
@@ -268,6 +280,7 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -268,6 +280,7 @@ const formConfig = computed<IFormConfig[]>(() => [
{
{
required
:
true
,
required
:
true
,
message
:
'请输入金额百分比'
,
message
:
'请输入金额百分比'
,
trigger
:
'blur'
,
},
},
],
],
},
},
...
@@ -286,6 +299,7 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -286,6 +299,7 @@ const formConfig = computed<IFormConfig[]>(() => [
{
{
required
:
true
,
required
:
true
,
message
:
'请输入申报价值上限'
,
message
:
'请输入申报价值上限'
,
trigger
:
'blur'
,
},
},
],
],
},
},
...
@@ -303,6 +317,7 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -303,6 +317,7 @@ const formConfig = computed<IFormConfig[]>(() => [
{
{
required
:
true
,
required
:
true
,
message
:
'请输入重量百分比'
,
message
:
'请输入重量百分比'
,
trigger
:
'blur'
,
},
},
],
],
},
},
...
@@ -320,6 +335,7 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -320,6 +335,7 @@ const formConfig = computed<IFormConfig[]>(() => [
{
{
required
:
true
,
required
:
true
,
message
:
'请输入申报重量上限'
,
message
:
'请输入申报重量上限'
,
trigger
:
'blur'
,
},
},
],
],
},
},
...
@@ -336,7 +352,7 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -336,7 +352,7 @@ const formConfig = computed<IFormConfig[]>(() => [
},
},
])
])
const
tableConfig
=
ref
([
const
tableConfig
=
ref
<
TableColumn
[]
>
([
{
{
prop
:
'name'
,
prop
:
'name'
,
label
:
'规则名称'
,
label
:
'规则名称'
,
...
@@ -349,6 +365,35 @@ const tableConfig = ref([
...
@@ -349,6 +365,35 @@ const tableConfig = ref([
{
{
prop
:
'type'
,
prop
:
'type'
,
label
:
'申报类型'
,
label
:
'申报类型'
,
render
:
{
default
:
({
row
}:
{
row
:
AddDeclarationRuleObj
})
=>
(
<
span
>
{
row
.
type
===
1
?
'固定'
:
'比例'
}
<
/span
>
),
},
},
{
prop
:
'logisticsWayId'
,
label
:
'物流方式'
,
attrs
:
{
width
:
300
,
},
render
:
{
default
:
({
row
}:
{
row
:
AddDeclarationRuleObj
})
=>
row
.
logisticsWay
?
(
<
span
>
{
logisticsWayId
.
value
.
map
((
el
:
{
id
:
number
;
name
:
string
})
=>
{
if
(
row
.
logisticsWay
?.
split
(
','
)?.
includes
(
el
.
id
.
toString
()))
{
return
el
.
name
}
})
.
filter
((
el
)
=>
el
!==
undefined
)
.
join
(
','
)}
<
/span
>
)
:
(
<
span
>
{
''
}
<
/span
>
),
},
},
},
{
{
prop
:
'fixedValue'
,
prop
:
'fixedValue'
,
...
@@ -438,6 +483,12 @@ function cancelFn() {
...
@@ -438,6 +483,12 @@ function cancelFn() {
async
function
editRule
(
item
:
AddDeclarationRuleObj
)
{
async
function
editRule
(
item
:
AddDeclarationRuleObj
)
{
try
{
try
{
editForm
.
value
=
{
...
item
}
editForm
.
value
=
{
...
item
}
console
.
log
(
477
,
item
)
editForm
.
value
.
logisticsWayId
=
item
.
logisticsWay
?.
split
(
','
)
.
map
((
el
)
=>
Number
(
el
))
dialogVisible
.
value
=
true
dialogVisible
.
value
=
true
nextTick
(()
=>
{
nextTick
(()
=>
{
editFormRef
.
value
?.
refashConfig
(
editFormRef
.
value
?.
refashConfig
(
...
@@ -466,7 +517,7 @@ async function checkData() {
...
@@ -466,7 +517,7 @@ async function checkData() {
}),
}),
new
Promise
<
AddDeclarationRuleObj
>
((
resolve
)
=>
{
new
Promise
<
AddDeclarationRuleObj
>
((
resolve
)
=>
{
const
params
=
{
...
editForm
.
value
}
const
params
=
{
...
editForm
.
value
}
params
.
logisticsWay
=
params
.
logisticsWayId
?.
join
(
','
)
resolve
(
params
)
resolve
(
params
)
}),
}),
])
])
...
@@ -607,30 +658,30 @@ async function showLog(row: AddDeclarationRuleObj) {
...
@@ -607,30 +658,30 @@ async function showLog(row: AddDeclarationRuleObj) {
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
//
getAllList()
getAllList
()
})
})
/**
/**
* @description: 获取物流方式列表
* @description: 获取物流方式列表
*/
*/
//
const logisticsWayId = ref([])
const
logisticsWayId
=
ref
([])
//
async function getAllList() {
async
function
getAllList
()
{
//
try {
try
{
//
const res = await Promise.allSettled([usableAllList()])
const
res
=
await
Promise
.
allSettled
([
usableAllList
()])
//
res.forEach(
res
.
forEach
(
//
(item: PromiseSettledResult
<
{
code
:
number
;
data
:
never
[]
}
>
,
index
)
=>
{
(
item
:
PromiseSettledResult
<
{
code
:
number
;
data
:
never
[]
}
>
,
index
)
=>
{
//
if (item?.status === 'fulfilled') {
if
(
item
?.
status
===
'fulfilled'
)
{
//
if (item.value.code === 200) {
if
(
item
.
value
.
code
===
200
)
{
//
if (index == 0) {
if
(
index
==
0
)
{
//
logisticsWayId.value = [...(item.value.data || [])]
logisticsWayId
.
value
=
[...(
item
.
value
.
data
||
[])]
//
}
}
//
}
}
//
}
}
//
},
},
//
)
)
//
} catch (error) {
}
catch
(
error
)
{
//
console.log(error)
console
.
log
(
error
)
//
}
}
//
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/logistics/logisticsMethod.vue
View file @
b1679d3f
...
@@ -255,28 +255,28 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -255,28 +255,28 @@ const formConfig = computed<IFormConfig[]>(() => [
},
},
],
],
},
},
{
//
{
prop
:
'ruleId'
,
//
prop: 'ruleId',
type
:
'select'
,
//
type: 'select',
label
:
'申报规则'
,
//
label: '申报规则',
fixed
:
'last'
,
//
fixed: 'last',
attrs
:
{
//
attrs: {
placeholder
:
'请选择申报规则'
,
//
placeholder: '请选择申报规则',
label
:
'name'
,
//
label: 'name',
value
:
'id'
,
//
value: 'id',
options
:
[...(
ruleNameList
.
value
||
[])],
//
options: [...(ruleNameList.value || [])],
onChange
:
(
value
:
{
name
:
string
;
id
:
string
|
number
})
=>
{
//
onChange: (value: { name: string; id: string | number }) => {
editForm
.
value
.
ruleRef
.
ruleId
=
value
.
id
//
editForm.value.ruleRef.ruleId = value.id
editForm
.
value
.
ruleRef
.
ruleName
=
value
.
name
//
editForm.value.ruleRef.ruleName = value.name
},
//
},
},
//
},
rules
:
[
//
rules: [
{
//
{
required
:
true
,
//
required: true,
message
:
'请选择申报规则'
,
//
message: '请选择申报规则',
},
//
},
],
//
],
},
//
},
{
{
prop
:
'serviceCode'
,
prop
:
'serviceCode'
,
type
:
'input'
,
type
:
'input'
,
...
@@ -458,15 +458,15 @@ const tableConfig = ref<TableColumn[]>([
...
@@ -458,15 +458,15 @@ const tableConfig = ref<TableColumn[]>([
)),
)),
},
},
},
},
{
//
{
prop
:
'status2'
,
//
prop: 'status2',
label
:
'申报规则'
,
//
label: '申报规则',
render
:
{
//
render: {
default
:
({
row
})
=>
(
//
default: ({ row }) => (
<
div
>
{(
row
.
ruleList
as
{
ruleName
:
string
}[])?.[
0
]?.
ruleName
}
<
/div
>
//
<
div
>
{(
row
.
ruleList
as
{
ruleName
:
string
}[])?.[
0
]?.
ruleName
}
<
/div
>
),
//
),
},
//
},
},
//
},
{
{
prop
:
'siteUrl'
,
prop
:
'siteUrl'
,
label
:
'查询网址'
,
label
:
'查询网址'
,
...
...
src/views/logistics/types/declarationRule.ts
View file @
b1679d3f
...
@@ -35,4 +35,6 @@ export interface AddDeclarationRuleObj {
...
@@ -35,4 +35,6 @@ export interface AddDeclarationRuleObj {
valueUp
?:
number
|
string
|
null
valueUp
?:
number
|
string
|
null
weightPercent
?:
number
|
string
|
null
weightPercent
?:
number
|
string
|
null
weightUp
?:
number
|
string
|
null
weightUp
?:
number
|
string
|
null
logisticsWay
?:
string
logisticsWayId
?:
(
string
|
number
)[]
}
}
src/views/order/podUs/components/ResultInfo.vue
0 → 100644
View file @
b1679d3f
<
template
>
<el-dialog
title=
"处理结果"
v-model=
"resultDialog"
width=
"600px"
:close-on-click-modal=
"false"
>
<div
style=
"display: flex"
>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"checkAllChange"
>
{{
'全选'
}}
</el-checkbox>
<el-button
type=
"success"
style=
"margin-left: 20px"
@
click=
"resultfilter(true)"
>
{{
'选择正常'
}}
</el-button>
<el-button
type=
"danger"
@
click=
"resultfilter(false)"
>
{{
'选择异常'
}}
</el-button>
<el-button
type=
"success"
@
click=
"copyAllCode(list, 'shopNumber')"
>
{{
'复制店铺单号'
}}
</el-button>
</div>
<div
style=
"height: 50vh; overflow: auto"
>
<div
style=
"margin: 15px 0"
></div>
<el-checkbox-group
v-model=
"selectedList"
@
change=
"checkChange"
>
<div
style=
"display: block"
v-for=
"(item, index) in list"
:key=
"index"
>
<el-checkbox
:label=
"item.id"
>
{{
'店铺编号:'
+
item
.
shopNumber
+
' '
+
item
.
message
}}
</el-checkbox>
</div>
</el-checkbox-group>
</div>
<template
#
footer
>
<div
style=
"display: flex; justify-content: flex-end"
>
<!--
<el-button
@
click=
"resultDialog = false"
>
取 消
</el-button>
<div
style=
"width: 50px; display: inline-block"
></div>
-->
<el-button
type=
"primary"
@
click=
"confirm"
>
确 定
</el-button>
</div>
</
template
>
</el-dialog>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
watch
}
from
'vue'
import
{
copyText
}
from
'@/utils/index'
interface
IList
{
id
:
string
|
number
shopNumber
:
string
message
:
string
status
:
boolean
}
const
props
=
withDefaults
(
defineProps
<
{
list
:
IList
[]
}
>
(),
{
list
:
()
=>
[],
},
)
// 响应式数据
const
resultDialog
=
ref
(
false
)
const
isIndeterminate
=
ref
(
false
)
const
checkAll
=
ref
(
false
)
const
selectedList
=
ref
<
(
string
|
number
)[]
>
([])
// 显示弹窗
const
showDialog
=
(
type
:
string
)
=>
{
console
.
log
(
type
)
resultDialog
.
value
=
true
selectedList
.
value
=
[]
checkAll
.
value
=
false
}
// 全选状态改变
const
checkAllChange
=
(
value
:
boolean
)
=>
{
selectedList
.
value
=
value
?
props
.
list
.
map
((
v
)
=>
v
.
id
)
:
[]
isIndeterminate
.
value
=
false
}
// 单个选择改变
const
checkChange
=
()
=>
{
const
checkedCount
=
selectedList
.
value
.
length
checkAll
.
value
=
checkedCount
===
props
.
list
.
length
isIndeterminate
.
value
=
checkedCount
>
0
&&
checkedCount
<
props
.
list
.
length
}
// 确认选择
const
confirm
=
()
=>
{
resultDialog
.
value
=
false
emits
(
'confirm'
,
selectedList
.
value
)
}
// 结果过滤
const
resultfilter
=
(
bool
:
boolean
)
=>
{
const
arr
=
props
.
list
.
filter
((
item
)
=>
item
.
status
===
bool
)
.
map
((
item
)
=>
item
.
id
)
selectedList
.
value
=
arr
const
checkedCount
=
arr
.
length
checkAll
.
value
=
checkedCount
===
props
.
list
.
length
isIndeterminate
.
value
=
checkedCount
>
0
&&
checkedCount
<
props
.
list
.
length
}
// 复制店铺单号
const
copyAllCode
=
(
list
:
IList
[],
field
:
string
)
=>
{
const
str
=
list
.
map
((
el
)
=>
el
[
field
as
keyof
IList
]).
join
(
','
)
console
.
log
(
'复制店铺单号'
,
str
)
copyText
(
str
)
}
// 监听弹窗状态
watch
(
()
=>
resultDialog
.
value
,
(
v
)
=>
{
if
(
v
)
{
console
.
log
(
127
)
resultfilter
(
true
)
}
},
)
defineExpose
({
showDialog
,
})
const
emits
=
defineEmits
<
{
(
e
:
'confirm'
,
data
:
(
string
|
number
)[]):
void
}
>
()
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/views/order/podUs/index.vue
View file @
b1679d3f
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
<
ElButton
type
=
"success"
@
click
=
"confirmOrder"
>
确认
<
/ElButton
>
<
ElButton
type
=
"success"
@
click
=
"confirmOrder"
>
确认
<
/ElButton
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'EXCEPTION_ORDER'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'EXCEPTION_ORDER'"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"updateOrder"
>
更新
<
/ElButton
>
<
ElButton
type
=
"success"
@
click
=
"updateOrder"
>
转至待确认
<
/ElButton
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'PICKING'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'PICKING'"
class
=
"item"
>
<
ElButton
type
=
"primary"
@
click
=
"printProductionOrder"
>
<
ElButton
type
=
"primary"
@
click
=
"printProductionOrder"
>
...
@@ -171,13 +171,31 @@
...
@@ -171,13 +171,31 @@
<
span
v
-
if
=
"status === 'WAIT_SHIPMENT'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'WAIT_SHIPMENT'"
class
=
"item"
>
<
ElButton
type
=
"warning"
@
click
=
"printPodOrder"
>
POD
打单
<
/ElButton
>
<
ElButton
type
=
"warning"
@
click
=
"printPodOrder"
>
POD
打单
<
/ElButton
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'WAIT_SHIPMENT'"
class
=
"item"
>
<
ElDropdown
>
<
el
-
button
type
=
"success"
>
物流接口
<
el
-
icon
class
=
"el-icon--right"
><
ArrowDown
/><
/el-icon
>
<
/el-button
>
<
template
#
dropdown
>
<
ElDropdownMenu
>
<
ElDropdownItem
@
click
=
"getOrderByIdApi('getTrackingNumber')"
>
获取跟踪号
<
/ElDropdownIte
m
>
<
ElDropdownItem
@
click
=
"getOrderByIdApi('getPrintOrder')"
>
获取打印面单
<
/ElDropdownIte
m
>
<
ElDropdownItem
@
click
=
"getOrderByIdApi('cancelLogisticsOrder')"
>
取消物流订单
<
/ElDropdownIte
m
>
<
/ElDropdownMenu
>
<
/template
>
<
/ElDropdown
>
<
/span
>
<
span
v
-
if
=
"status === 'STOCK_OUT'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'STOCK_OUT'"
class
=
"item"
>
<
ElButton
type
=
"warning"
@
click
=
"stockOutCheck"
>
补货校验
<
/ElButton
>
<
ElButton
type
=
"warning"
@
click
=
"stockOutCheck"
>
补货校验
<
/ElButton
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'STOCK_OUT'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'STOCK_OUT'"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"toBeConfirmed"
>
<
ElButton
type
=
"success"
@
click
=
"toBePicking"
>
转至待拣胚
<
/ElButton
>
转至待确认
<
/ElButton
>
<
/span
>
<
/span
>
<
span
class
=
"item"
>
<
span
class
=
"item"
>
...
@@ -870,10 +888,17 @@
...
@@ -870,10 +888,17 @@
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
/ElDialog
>
<
/ElDialog
>
<
ResultInfo
ref
=
"resultRefs"
:
list
=
"resultInfo"
@
confirm
=
"resultConfim"
><
/ResultInfo
>
<
/template
>
<
/template
>
<
script
setup
lang
=
"ts"
>
<
script
setup
lang
=
"ts"
>
import
{
getUserMarkList
}
from
'@/api/common'
import
{
getUserMarkList
}
from
'@/api/common'
import
{
WarningFilled
}
from
'@element-plus/icons-vue'
import
{
ArrowDown
,
WarningFilled
}
from
'@element-plus/icons-vue'
import
{
import
{
getCardOrderList
,
getCardOrderList
,
getOrderList
,
getOrderList
,
...
@@ -891,11 +916,14 @@ import {
...
@@ -891,11 +916,14 @@ import {
printPickingOrderApi
,
printPickingOrderApi
,
printPrintOrderApi
,
printPrintOrderApi
,
stockOutCheckApi
,
stockOutCheckApi
,
toBe
Confirmed
Api
,
toBe
Picking
Api
,
loadWarehouseListApi
,
loadWarehouseListApi
,
getLogisticsCalculation
,
getLogisticsCalculation
,
refreshMaterialApi
,
refreshMaterialApi
,
LogisticsData
,
LogisticsData
,
getTrackingNumberApi
,
getfaceSimplexFileApi
,
cancelLogisticsOrderApi
,
}
from
'@/api/podUsOrder'
}
from
'@/api/podUsOrder'
import
TableView
from
'@/components/TableView.vue'
import
TableView
from
'@/components/TableView.vue'
import
{
import
{
...
@@ -921,7 +949,7 @@ import { OrderData } from '@/types/api/podMakeOrder'
...
@@ -921,7 +949,7 @@ import { OrderData } from '@/types/api/podMakeOrder'
import
useLodop
,
{
LODOPObject
}
from
'@/utils/hooks/useLodop'
import
useLodop
,
{
LODOPObject
}
from
'@/utils/hooks/useLodop'
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
import
rightMenu
from
'../pod/rightMenu.vue'
import
rightMenu
from
'../pod/rightMenu.vue'
import
ResultInfo
from
'./components/ResultInfo.vue'
declare
global
{
declare
global
{
interface
Window
{
interface
Window
{
ActiveXObject
:
{
ActiveXObject
:
{
...
@@ -937,6 +965,7 @@ declare global {
...
@@ -937,6 +965,7 @@ declare global {
}
}
}
}
const
tabsNav
=
ref
<
Tab
[]
>
()
const
tabsNav
=
ref
<
Tab
[]
>
()
const
resultRefs
=
ref
<
InstanceType
<
typeof
ResultInfo
>
|
null
>
(
null
)
const
confirmDialogShow
=
ref
(
false
)
const
confirmDialogShow
=
ref
(
false
)
const
confirmData
=
ref
([])
const
confirmData
=
ref
([])
const
confirmSelectionData
=
ref
<
LogisticsData
[]
>
([])
const
confirmSelectionData
=
ref
<
LogisticsData
[]
>
([])
...
@@ -1279,7 +1308,7 @@ const updateOrder = async () => {
...
@@ -1279,7 +1308,7 @@ const updateOrder = async () => {
return
ElMessage
.
warning
(
'请选择数据'
)
return
ElMessage
.
warning
(
'请选择数据'
)
}
}
try
{
try
{
await
showConfirm
(
'确定
更新
吗?'
,
{
await
showConfirm
(
'确定
转至待确认
吗?'
,
{
confirmButtonText
:
'确认'
,
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
...
@@ -1498,6 +1527,56 @@ const printPodOrder = async () => {
...
@@ -1498,6 +1527,56 @@ const printPodOrder = async () => {
sheetPrinter
.
value
=
lodop
.
GET_PRINTER_NAME
(
0
)
sheetPrinter
.
value
=
lodop
.
GET_PRINTER_NAME
(
0
)
podOrderVisible
.
value
=
true
podOrderVisible
.
value
=
true
}
}
/**
* @description: 获取跟踪号、获取打印面单、取消物流订单
*/
const
resultInfo
=
ref
([])
const
getOrderByIdApi
=
async
(
type
:
string
)
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
}
let
message
=
''
let
Fn
if
(
type
==
'getTrackingNumber'
)
{
message
=
'获取跟踪号'
Fn
=
getTrackingNumberApi
}
else
if
(
type
==
'getPrintOrder'
)
{
message
=
'获取打印面单'
Fn
=
getfaceSimplexFileApi
}
else
if
(
type
===
'cancelLogisticsOrder'
)
{
message
=
'取消物流订单'
Fn
=
cancelLogisticsOrderApi
}
try
{
await
showConfirm
(
`确定对该订单 ${message
}
?`
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
const
ids
=
selection
.
value
.
map
((
el
)
=>
el
.
id
)
if
(
Fn
)
{
const
res
=
await
Fn
(
ids
)
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
resultInfo
.
value
=
res
.
data
resultRefs
.
value
?.
showDialog
(
type
)
}
else
if
(
res
.
code
===
205
)
{
window
.
open
(
filePath
+
res
.
message
)
}
else
{
ElMessage
.
error
(
res
.
message
)
}
}
}
catch
{
return
}
}
const
resultConfim
=
()
=>
{
search
()
}
// 添加补货成功行的状态
// 添加补货成功行的状态
const
stockOutSuccessIds
=
ref
<
number
[]
>
([])
const
stockOutSuccessIds
=
ref
<
number
[]
>
([])
...
@@ -1550,12 +1629,12 @@ const stockOutCheck = async () => {
...
@@ -1550,12 +1629,12 @@ const stockOutCheck = async () => {
console
.
error
(
'补货校验失败:'
,
error
)
console
.
error
(
'补货校验失败:'
,
error
)
}
}
}
}
const
toBe
Confirmed
=
async
()
=>
{
const
toBe
Picking
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
return
ElMessage
.
warning
(
'请选择数据'
)
}
}
try
{
try
{
await
ElMessageBox
.
confirm
(
'确定转至待
确认
吗?'
,
'提示'
,
{
await
ElMessageBox
.
confirm
(
'确定转至待
拣胚
吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
...
@@ -1564,7 +1643,7 @@ const toBeConfirmed = async () => {
...
@@ -1564,7 +1643,7 @@ const toBeConfirmed = async () => {
return
return
}
}
try
{
try
{
const
res
=
await
toBe
Confirmed
Api
(
selection
.
value
.
map
((
item
)
=>
item
.
id
))
const
res
=
await
toBe
Picking
Api
(
selection
.
value
.
map
((
item
)
=>
item
.
id
))
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
ElMessage
.
success
(
'操作成功'
)
search
()
search
()
...
...
src/views/podBillOrder/index.vue
View file @
b1679d3f
...
@@ -1629,7 +1629,7 @@ $border: solid 1px #ddd;
...
@@ -1629,7 +1629,7 @@ $border: solid 1px #ddd;
::
v
-
deep
(.
el
-
tabs
)
{
::
v
-
deep
(.
el
-
tabs
)
{
display
:
flex
;
display
:
flex
;
flex
-
direction
:
column
;
//
flex-direction: column;
height
:
100
%
;
height
:
100
%
;
.
el
-
tabs__content
{
.
el
-
tabs__content
{
...
...
src/views/system/UserPage.vue
0 → 100644
View file @
b1679d3f
<
template
>
<div
class=
"user-page flex-column card h-100 overflow-hidden"
>
<div
class=
"header-filter-form"
>
<ElForm
:model=
"searchForm"
inline
>
<ElFormItem
label=
"用户名"
prop=
"account"
>
<ElInput
v-model=
"searchForm.account"
placeholder=
"请输入用户名"
clearable
style=
"width: 200px"
/>
</ElFormItem>
<ElFormItem
label=
"状态"
prop=
"status"
>
<ElSelect
v-model=
"searchForm.status"
clearable
style=
"width: 200px"
placeholder=
"请选择状态"
>
<ElOption
label=
"启用"
:value=
"1"
></ElOption>
<ElOption
label=
"禁用"
:value=
"0"
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem>
<ElButton
type=
"primary"
@
click=
"search"
>
查询
</ElButton>
</ElFormItem>
<ElFormItem>
<ElButton
@
click=
"resetSearchForm"
>
重置
</ElButton>
</ElFormItem>
<ElFormItem>
<ElButton
type=
"success"
@
click=
"addUser"
>
新增
</ElButton>
</ElFormItem>
<ElFormItem>
<ElButton
type=
"danger"
@
click=
"deleteUser"
>
删除
</ElButton>
</ElFormItem>
</ElForm>
</div>
<div
class=
"user-content flex-1 flex-column overflow-hidden"
>
<div
class=
"user-list flex-1 overflow-hidden"
>
<ElTable
:data=
"tableData"
default-expand-all
style=
"width: 100%; height: 100%"
@
selection-change=
"handleSelectionChange"
>
<ElTableColumn
type=
"selection"
header-align=
"center"
align=
"center"
width=
"55"
/>
<ElTableColumn
type=
"index"
header-align=
"center"
align=
"center"
label=
"序号"
width=
"55"
/>
<ElTableColumn
prop=
"account"
header-align=
"center"
label=
"用户名"
>
<template
#
default=
"scope"
>
<div>
<span
>
{{
scope
.
row
.
account
}}
<ElTooltip
v-if=
"scope.row.supperMark === 1"
content=
"超级管理员"
placement=
"top"
>
<Icon
v-if=
"scope.row.supperMark === 1"
name=
"zu54"
style=
"vertical-align: super; cursor: pointer"
>
</Icon>
</ElTooltip>
</span>
</div>
</
template
>
</ElTableColumn>
<ElTableColumn
prop=
"factoryCode"
header-align=
"center"
label=
"工厂"
align=
"center"
/>
<ElTableColumn
prop=
"status"
header-align=
"center"
align=
"center"
label=
"状态"
>
<
template
#
default=
"scope"
>
<el-tooltip
:content=
"scope.row.status ? '启用' : '禁用'"
placement=
"top"
>
<ElSwitch
v-model=
"scope.row.status"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"(e:number) => onChangeStatus(e, scope.row)"
></ElSwitch>
</el-tooltip>
</
template
>
</ElTableColumn>
<ElTableColumn
label=
"操作"
width=
"130"
header-align=
"center"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-icon
size=
"24"
title=
"编辑"
color=
"#EF6C00"
style=
"cursor: pointer; vertical-align: middle"
@
click=
"editUser(scope.row)"
>
<Edit
/>
</el-icon>
</
template
>
</ElTableColumn>
</ElTable>
</div>
<ElPagination
v-model:current-page=
"currentPage"
v-model:page-size=
"pageSize"
:page-sizes=
"[100, 200, 300, 400, 500]"
background
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
style=
"margin: 10px auto 0; text-align: right"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
></ElPagination>
</div>
</div>
<ElDialog
v-model=
"dialogVisible"
:title=
"editId ? '编辑用户' : '新增用户'"
width=
"600px"
:close-on-click-modal=
"false"
@
opened=
"onOpenedUserForm"
>
<div
class=
"dialog-form"
>
<ElForm
ref=
"editFormRef"
:model=
"editForm"
:rules=
"rules"
label-width=
"90px"
>
<ElFormItem
label=
"用户名"
prop=
"account"
>
<ElInput
v-model=
"editForm.account"
placeholder=
"请输入用户名"
clearable
/>
</ElFormItem>
<ElFormItem
v-if=
"!editId"
label=
"密码"
prop=
"password"
>
<ElInput
v-model=
"editForm.password"
placeholder=
"请输入密码"
clearable
type=
"password"
autocomplete=
"off"
:show-password=
"true"
/>
</ElFormItem>
<ElFormItem
label=
"状态"
prop=
"status"
>
<ElCheckbox
v-model=
"editForm.status"
label=
"启用"
true-value=
"1"
false-value=
"0"
></ElCheckbox>
</ElFormItem>
<ElFormItem
label=
"角色"
prop=
"supperMark"
>
<ElCheckbox
v-model=
"editForm.supperMark"
label=
"超级管理员"
true-value=
"1"
false-value=
"0"
></ElCheckbox>
</ElFormItem>
</ElForm>
</div>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<ElButton
@
click=
"dialogVisible = false"
>
取消
</ElButton>
<ElButton
type=
"primary"
@
click=
"save"
>
保存
</ElButton>
</div>
</
template
>
</ElDialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
getUserList
,
addUserApi
,
updateUserApi
,
deleteUserApi
,
getDetailsByIdApi
,
changeUserStatusApi
,
}
from
'@/api/auth'
import
Icon
from
'@/components/Icon.vue'
import
{
UserEditForm
,
userData
,
userSearchForm
}
from
'@/types/api/user'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
Edit
}
from
'@element-plus/icons-vue'
import
type
{
FormRules
}
from
'element-plus'
import
{
reactive
,
ref
}
from
'vue'
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
userSearchForm
>
({})
const
[
editForm
,
resetEditForm
]
=
useValue
<
UserEditForm
>
({
account
:
''
,
password
:
''
,
supperMark
:
'0'
,
status
:
'1'
,
})
const
{
currentPage
,
pageSize
,
total
,
data
:
tableData
,
refresh
:
search
,
onCurrentPageChange
:
handleCurrentChange
,
onPageSizeChange
:
handleSizeChange
,
}
=
usePageList
({
query
:
(
page
,
pageSize
)
=>
getUserList
(
searchForm
.
value
,
page
,
pageSize
).
then
((
res
)
=>
res
.
data
),
})
const
dialogVisible
=
ref
(
false
)
const
editFormRef
=
ref
()
const
selection
=
ref
<
userData
[]
>
([])
const
rules
=
reactive
<
FormRules
<
UserEditForm
>>
({
account
:
[
{
required
:
true
,
message
:
'请输入用户名'
,
},
],
password
:
[
{
required
:
true
,
message
:
'请输入密码'
,
},
],
})
const
editId
=
ref
<
number
|
undefined
>
(
undefined
)
const
addUser
=
()
=>
{
editId
.
value
=
undefined
dialogVisible
.
value
=
true
resetEditForm
()
}
const
deleteUser
=
async
()
=>
{
if
(
!
selection
.
value
.
length
)
{
return
ElMessage
({
message
:
'请选择用户'
,
type
:
'warning'
,
offset
:
window
.
innerHeight
/
2
,
})
}
try
{
await
showConfirm
(
'是否删除用户'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
}
catch
{
return
}
try
{
const
ids
=
selection
.
value
.
map
((
item
)
=>
item
.
id
).
join
(
','
)
await
deleteUserApi
(
ids
)
ElMessage
({
message
:
'删除成功'
,
type
:
'success'
,
offset
:
window
.
innerHeight
/
2
,
})
search
()
}
catch
(
e
)
{
search
()
// showError(e)
}
}
const
editUser
=
async
(
item
:
userData
)
=>
{
editId
.
value
=
item
.
id
try
{
const
res
=
await
getDetailsByIdApi
(
item
.
id
)
res
.
data
.
supperMark
=
res
.
data
.
supperMark
+
''
res
.
data
.
status
=
res
.
data
.
status
+
''
editForm
.
value
=
res
.
data
dialogVisible
.
value
=
true
}
catch
(
e
)
{
//showError(e)
}
}
const
save
=
async
()
=>
{
try
{
await
editFormRef
.
value
.
validate
()
}
catch
{
return
}
try
{
if
(
!
editId
.
value
)
{
await
addUserApi
({
...
editForm
.
value
,
supperMark
:
Number
(
editForm
.
value
.
supperMark
),
status
:
Number
(
editForm
.
value
.
status
),
})
}
else
{
await
updateUserApi
({
...
editForm
.
value
,
supperMark
:
Number
(
editForm
.
value
.
supperMark
),
status
:
Number
(
editForm
.
value
.
status
),
})
}
ElMessage
({
message
:
'保存成功'
,
type
:
'success'
,
offset
:
window
.
innerHeight
/
2
,
})
dialogVisible
.
value
=
false
search
()
}
catch
(
e
)
{
return
}
}
const
onOpenedUserForm
=
async
()
=>
{
editFormRef
.
value
?.
clearValidate
()
}
const
handleSelectionChange
=
(
s
:
userData
[])
=>
{
selection
.
value
=
s
}
const
onChangeStatus
=
async
(
value
:
number
,
item
:
userData
)
=>
{
try
{
const
res
=
await
changeUserStatusApi
(
value
,
item
.
id
)
ElMessage
({
message
:
res
.
message
,
type
:
'success'
,
offset
:
window
.
innerHeight
/
2
,
})
search
()
}
catch
(
e
)
{
//showError(e)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.header-filter-form
{
margin-bottom
:
20px
;
:deep(.el-form-item)
{
margin-right
:
14px
;
margin-bottom
:
10px
;
}
}
.user-operate-btn
{
margin-bottom
:
10px
;
}
.dialog-footer
{
text-align
:
center
;
}
</
style
>
src/views/system/externalAuthorisationPage.vue
0 → 100644
View file @
b1679d3f
<
template
>
<div
class=
"external-auth-page flex-column card h-100 overflow-hidden"
>
<div
class=
"header-filter-form"
>
<ElForm
v-enter-submit=
"search"
:inline=
"true"
>
<ElFormItem
label=
"账号类型"
>
<ElSelect
v-model=
"searchForm.type"
clearable
style=
"width: 180px"
placeholder=
"请选择"
>
<ElOption
v-for=
"(item, index) in accountTypes"
:key=
"index"
:label=
"item"
:value=
"item"
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
""
>
<ElButton
type=
"primary"
@
click=
"search"
>
查询
</ElButton>
</ElFormItem>
<ElFormItem>
<ElButton
type=
"success"
@
click=
"addDialog"
>
新增
</ElButton>
</ElFormItem>
<ElFormItem>
<ElButton
type=
"danger"
@
click=
"deleteSection(null)"
>
删除
</ElButton>
</ElFormItem>
</ElForm>
</div>
<div
class=
"external-auth-content flex-1 flex-column overflow-hidden"
>
<div
class=
"external-auth-list flex-1 overflow-hidden"
>
<tableView
:selectionable=
"true"
:paginated-data=
"tableData"
:columns=
"tableColumns"
@
selection-change=
"handleSelectionChange"
></tableView>
</div>
<ElPagination
v-model:current-page=
"currentPage"
v-model:page-size=
"pageSize"
:page-sizes=
"[100, 200, 300, 400, 500]"
background
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
style=
"margin: 10px auto 0; text-align: right"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
></ElPagination>
</div>
</div>
<ElDialog
v-model=
"dialogVisible"
:title=
"!!editId ? '新增' : '编辑'"
:close-on-click-modal=
"false"
width=
"600px"
@
opened=
"handleOpened"
>
<ElForm
ref=
"editFormRef"
label-position=
"right"
label-width=
"110px"
:model=
"editForm"
>
<ElFormItem
label=
"账号类型"
prop=
"type"
:rules=
"[
{ required: true, message: '请选择账号类型' }]"
>
<ElSelect
v-model=
"editForm.type"
style=
"width: 100%"
placeholder=
"请选择"
clearable
>
<ElOption
v-for=
"(item, index) in accountTypes"
:key=
"index"
:label=
"item"
:value=
"item"
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"账号"
prop=
"account"
:rules=
"[
{ required: true, message: '请输入账号' }]"
>
<ElInput
v-model=
"editForm.account"
clearable
placeholder=
"请输入"
></ElInput>
</ElFormItem>
<ElFormItem
label=
"是否默认"
prop=
"defaultType"
>
<ElRadioGroup
v-model=
"editForm.defaultType"
clearable
>
<ElRadio
:label=
"true"
>
是
</ElRadio>
<ElRadio
:label=
"false"
>
否
</ElRadio>
</ElRadioGroup>
</ElFormItem>
<ElFormItem
v-if=
"editForm.type === 'RIIN' && editForm.type"
label=
"授权操作指引"
>
<el-image
style=
"width: 100px; height: 100px"
src=
"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/riin-demo.png"
:zoom-rate=
"1.2"
:max-scale=
"7"
:min-scale=
"0.2"
:preview-src-list=
"[
'https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/riin-demo.png',
]"
show-progress
:initial-index=
"4"
/>
</ElFormItem>
<ElFormItem
v-if=
"editForm.type !== 'RIIN' && editForm.type"
label=
"appKey"
prop=
"appKey"
:rules=
"[
{ required: true, message: '请输入appKey' }]"
>
<ElInput
v-model=
"editForm.appKey"
clearable
placeholder=
"请输入"
></ElInput>
</ElFormItem>
<ElFormItem
v-if=
"editForm.type === 'RIIN' && editForm.type"
label=
"appSecret"
prop=
"appSecret"
:rules=
"[
{ required: true, message: '请输入appSecret' }]"
>
<ElInput
v-model=
"editForm.appSecret"
clearable
placeholder=
"请输入"
></ElInput>
</ElFormItem>
<ElFormItem
v-if=
"editForm.type !== 'RIIN' && editForm.type"
label=
"token"
prop=
"token"
:rules=
"[
{ required: true, message: '请输入token' }]"
>
<ElInput
v-model=
"editForm.token"
clearable
placeholder=
"请输入"
></ElInput>
</ElFormItem>
</ElForm>
<template
#
footer
>
<div
class=
"dialog-footer"
>
<ElButton
@
click=
"dialogVisible = false"
>
取消
</ElButton>
<ElButton
type=
"primary"
@
click=
"submit"
>
确认
</ElButton>
</div>
</
template
>
</ElDialog>
</template>
<
script
setup
lang=
"tsx"
>
import
{
computed
,
ref
,
onMounted
}
from
'vue'
import
TableView
from
'@/components/TableView.vue'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
getExternalAuthorisationListApi
,
loadAccountTypesApi
,
addExternalAuthorisationApi
,
getExternalAuthorisationByIdApi
,
deleteExternalAuthorisationApi
,
}
from
'@/api/externalAuth'
import
{
ExternalAuthListData
}
from
'@/types/api/externalAuth'
import
{
Delete
,
Edit
}
from
'@element-plus/icons-vue'
const
accountTypes
=
ref
<
string
[]
>
([])
const
searchForm
=
ref
({
type
:
''
,
})
const
dialogVisible
=
ref
(
false
)
const
editId
=
ref
<
null
|
number
>
(
null
)
const
[
editForm
,
resetEditForm
]
=
useValue
<
ExternalAuthListData
>
({
type
:
''
,
defaultType
:
false
,
appKey
:
''
,
appSecret
:
''
,
token
:
''
,
account
:
''
,
})
const
tableColumns
=
computed
(()
=>
{
return
[
{
label
:
'账号'
,
prop
:
'account'
,
align
:
'center'
,
},
{
label
:
'账号类型'
,
prop
:
'type'
,
align
:
'left'
,
},
{
label
:
'是否默认'
,
prop
:
'defaultType'
,
width
:
100
,
align
:
'center'
,
render
:
(
item
:
ExternalAuthListData
)
=>
(
<
el
-
checkbox
true
-
value
=
{
true
}
false
-
value
=
{
false
}
modelValue
=
{
item
.
defaultType
}
disabled
><
/el-checkbox
>
),
},
{
label
:
'appKey'
,
prop
:
'appKey'
,
align
:
'left'
,
},
{
label
:
'appSecret'
,
prop
:
'appSecret'
,
align
:
'left'
},
{
label
:
'token'
,
prop
:
'token'
,
align
:
'left'
},
{
label
:
'refreshToken'
,
prop
:
'refreshToken'
,
align
:
'left'
},
{
label
:
'refreshToken 过期时间'
,
prop
:
'refreshTokenFailureTime'
,
},
{
label
:
'相关操作'
,
width
:
100
,
fixed
:
'right'
,
align
:
'center'
,
render
:
(
item
:
ExternalAuthListData
)
=>
(
<
div
>
{
<
span
style
=
"margin-right: 10px"
title
=
"编辑"
>
<
el
-
icon
size
=
"24"
title
=
"编辑"
color
=
"#EF6C00"
style
=
"cursor: pointer"
onClick
=
{()
=>
editDialog
(
item
)}
>
<
Edit
/>
<
/el-icon
>
<
/span
>
}
{
<
span
title
=
"删除"
>
<
el
-
icon
size
=
"24"
title
=
"删除"
color
=
"#f56c6c"
style
=
"cursor: pointer"
onClick
=
{()
=>
deleteSection
(
item
)}
>
<
Delete
/>
<
/el-icon
>
<
/span
>
}
<
/div
>
),
},
]
})
const
{
currentPage
,
pageSize
,
total
,
data
:
tableData
,
refresh
:
search
,
onCurrentPageChange
:
handleCurrentChange
,
onPageSizeChange
:
handleSizeChange
,
}
=
usePageList
({
query
:
(
page
,
pageSize
)
=>
getExternalAuthorisationListApi
(
searchForm
.
value
,
page
,
pageSize
).
then
(
(
res
)
=>
res
.
data
,
),
})
const
loadAccountTypes
=
async
()
=>
{
try
{
const
res
=
await
loadAccountTypesApi
()
if
(
res
.
code
!==
200
)
return
accountTypes
.
value
=
res
.
data
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
const
addDialog
=
()
=>
{
editId
.
value
=
null
dialogVisible
.
value
=
true
resetEditForm
()
}
const
editDialog
=
async
(
item
:
ExternalAuthListData
)
=>
{
editId
.
value
=
item
.
id
||
null
try
{
const
res
=
await
getExternalAuthorisationByIdApi
(
item
.
id
||
null
)
if
(
res
.
code
!==
200
)
return
editForm
.
value
=
res
.
data
dialogVisible
.
value
=
true
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
const
editFormRef
=
ref
()
const
deleteSection
=
async
(
item
:
ExternalAuthListData
|
null
)
=>
{
if
(
!
item
)
{
if
(
selectedRows
.
value
.
length
===
0
)
{
ElMessage
.
warning
(
'请选择要删除的账号'
)
return
}
}
const
ids
=
item
?
[
item
.
id
]
:
selectedRows
.
value
.
map
((
item
)
=>
item
.
id
)
try
{
await
ElMessageBox
.
confirm
(
'确定删除所选账号吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
}
catch
{
return
}
try
{
const
res
=
await
deleteExternalAuthorisationApi
(
ids
.
join
(
','
))
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'删除成功'
)
search
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
const
submit
=
async
()
=>
{
try
{
await
editFormRef
.
value
.
validate
()
}
catch
{
return
}
const
url
=
editId
.
value
?
'factory/baseExternalAccount/update'
:
'factory/baseExternalAccount/add'
try
{
const
res
=
await
addExternalAuthorisationApi
(
url
,
editForm
.
value
)
if
(
res
.
code
!==
200
)
return
dialogVisible
.
value
=
false
search
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
const
handleOpened
=
()
=>
{
editFormRef
.
value
.
clearValidate
()
}
const
selectedRows
=
ref
<
ExternalAuthListData
[]
>
([])
const
handleSelectionChange
=
(
val
:
ExternalAuthListData
[])
=>
{
selectedRows
.
value
=
val
}
onMounted
(()
=>
{
loadAccountTypes
()
})
</
script
>
<
style
lang=
"scss"
scoped
>
.header-filter-form
{
margin-bottom
:
20px
;
:deep(.el-form-item)
{
margin-right
:
14px
;
margin-bottom
:
10px
;
}
}
.dialog-footer
{
text-align
:
center
;
}
</
style
>
src/views/warehouse/issueDoc.vue
View file @
b1679d3f
...
@@ -1710,7 +1710,7 @@ $border: solid 1px #ddd;
...
@@ -1710,7 +1710,7 @@ $border: solid 1px #ddd;
::
v
-
deep
(.
el
-
tabs
)
{
::
v
-
deep
(.
el
-
tabs
)
{
display
:
flex
;
display
:
flex
;
flex
-
direction
:
column
;
//
flex-direction: column;
height
:
100
%
;
height
:
100
%
;
.
el
-
tabs__content
{
.
el
-
tabs__content
{
...
...
src/views/warehouse/receiptDoc.vue
View file @
b1679d3f
...
@@ -1790,7 +1790,7 @@ $border: solid 1px #ddd;
...
@@ -1790,7 +1790,7 @@ $border: solid 1px #ddd;
::
v
-
deep
(.
el
-
tabs
)
{
::
v
-
deep
(.
el
-
tabs
)
{
display
:
flex
;
display
:
flex
;
flex
-
direction
:
column
;
//
flex-direction: column;
height
:
100
%
;
height
:
100
%
;
.
el
-
tabs__content
{
.
el
-
tabs__content
{
...
...
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