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
90b17694
Commit
90b17694
authored
Jul 05, 2024
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eslint 报错
parent
636d4b74
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
34 deletions
+59
-34
components.d.ts
+0
-1
src/api/order.ts
+1
-1
src/components/splitDiv/splitDiv.vue
+1
-1
src/types/api/deliveryNote.ts
+16
-5
src/utils/hooks/usePageList.ts
+2
-1
src/views/AccountStatementNote.vue
+39
-25
No files found.
components.d.ts
View file @
90b17694
...
...
@@ -37,7 +37,6 @@ declare module 'vue' {
ElTabs
:
typeof
import
(
'element-plus/es'
)[
'ElTabs'
]
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElTree
:
typeof
import
(
'element-plus/es'
)[
'ElTree'
]
Icon
:
typeof
import
(
'./src/components/Icon.vue'
)[
'default'
]
ImageView
:
typeof
import
(
'./src/components/ImageView.vue'
)[
'default'
]
LogList
:
typeof
import
(
'./src/components/LogList.vue'
)[
'default'
]
...
...
src/api/order.ts
View file @
90b17694
...
...
@@ -277,7 +277,7 @@ export function updateReconciliation(
)
}
export
function
getShipmentDetailsById
(
shipmentId
?:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
OrderData
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
any
>>
(
'factory/customJomallReconciliation/getShipmentDetailsById'
,
{
params
:
{
...
...
src/components/splitDiv/splitDiv.vue
View file @
90b17694
...
...
@@ -3,7 +3,7 @@ import { Splitpanes, Pane } from 'splitpanes'
import
'splitpanes/dist/splitpanes.css'
const
props
=
defineProps
({
defineProps
({
size
:
{
default
:
15
,
type
:
Number
...
...
src/types/api/deliveryNote.ts
View file @
90b17694
...
...
@@ -96,10 +96,20 @@ export interface ProductionOrder {
passNum
?:
number
}
export
interface
AccountStatementNote
{
billNumber
:
string
shipmentNum
:
string
lanshouName
:
string
lanshouPhone
:
string
totalAmount
:
string
billNumber
?:
string
shipmentNum
?:
string
dataVersion
?:
string
carriageName
?:
string
lanshouAddress
?:
string
totalPrice
?:
string
passNum
?:
string
lanshouPost
?:
string
notPassNum
?:
string
lanshouRegion
?:
string
orderNumber
?:
string
lanshouName
?:
string
lanshouPhone
?:
string
logisticsTracking
?:
string
totalAmount
?:
string
id
?:
number
}
\ No newline at end of file
src/utils/hooks/usePageList.ts
View file @
90b17694
...
...
@@ -10,6 +10,7 @@ export interface UsePageListOptions<T> {
statusCode
?:
number
,
)
=>
Promise
<
PaginationData
<
T
>>
initPageSize
?:
number
statistics
?:
boolean
initLoad
?:
boolean
}
...
...
@@ -31,7 +32,7 @@ export default function usePageList<T>(options: UsePageListOptions<T>) {
try
{
loading
.
value
=
true
// Promise 链式调用
let
res
=
await
query
(
currentPage
.
value
,
pageSize
.
value
)
let
res
:
any
=
await
query
(
currentPage
.
value
,
pageSize
.
value
)
if
(
statistics
.
value
)
{
totalData
.
sumNotPassNum
=
res
.
sumNotPassNum
totalData
.
sumPassNum
=
res
.
sumPassNum
...
...
src/views/AccountStatementNote.vue
View file @
90b17694
...
...
@@ -365,13 +365,15 @@ import splitDiv from '@/components/splitDiv/splitDiv.vue'
interface
Tree
{
label
:
string
id
:
number
count
?:
number
children
:
any
[],
id
:
number
|
string
}
import
{
AccountStatementNote
,
}
from
'@/types/api/deliveryNote'
import
{
OrderData
}
from
'@/types/api/order'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
...
...
@@ -379,12 +381,12 @@ import {
getCustomJomallReconciliationById
,
getReconciliationAmount
,
getShipmentDetailsById
,
updateReconciliation
,
}
from
'@/api/order'
import
{
ref
,
onMounted
,
watch
,
reactive
,
nextTick
}
from
'vue'
import
{
ref
,
onMounted
,
watch
,
nextTick
}
from
'vue'
import
{
showError
}
from
'@/utils/ui'
import
'element-plus/dist/index.css'
const
treeData
:
Tree
[]
=
ref
([
const
treeData
=
ref
<
Tree
[]
>
([
{
label
:
'全部'
,
id
:
'-1'
,
...
...
@@ -392,20 +394,25 @@ const treeData: Tree[] = ref([
{
label
:
'草稿箱'
,
id
:
0
,
children
:[]
},
{
label
:
'待确认'
,
id
:
1
,
children
:[]
},
{
label
:
'待付款'
,
id
:
2
,
children
:[]
},
{
label
:
'已付款'
,
id
:
3
,
children
:[]
},
{
label
:
'归档'
,
id
:
4
,
children
:[]
},
],
},
...
...
@@ -415,11 +422,11 @@ const [searchForm, resetSearchForm] = useValue<AccountStatementNote>({})
const
dateRange
=
ref
<
string
[]
>
([])
const
selections
=
ref
<
AccountStatementNote
[]
>
([])
const
detailList
=
ref
<
any
[]
>
([])
const
detailList
=
ref
<
AccountStatementNote
[]
>
([])
const
tabsValue
=
ref
<
string
>
(
'0'
)
const
singleTableRef
=
ref
<
any
>
(
null
)
const
currentRow
=
ref
<
AccountStatementNote
>
(
null
)
const
logList
=
ref
<
string
[]
>
([])
const
currentRow
=
ref
<
AccountStatementNote
|
null
>
(
null
)
const
logList
=
ref
<
any
[]
>
([])
const
nodeId
=
ref
<
number
|
string
>
(
'-1'
)
...
...
@@ -428,7 +435,11 @@ const treeRef = ref<InstanceType<typeof ElTree>>()
const
editForm
=
ref
<
AccountStatementNote
>
({
billNumber
:
''
,
lanshouAddress
:
''
,
totalPrice
:
''
,
shipmentNum
:
''
,
passNum
:
''
,
lanshouPost
:
''
,
lanshouName
:
''
,
lanshouPhone
:
''
,
totalAmount
:
''
,
...
...
@@ -457,15 +468,16 @@ const {
})
onMounted
(()
=>
{
(
treeRef
as
never
).
value
.
setCurrentKey
(
nodeId
.
value
,
true
)
(
treeRef
as
any
).
value
.
setCurrentKey
(
nodeId
.
value
,
true
)
})
const
dialogVisible
=
ref
<
boolean
>
(
false
)
const
orderDetailData
=
ref
<
OrderData
>
({}
as
OrderData
)
const
getTreeNum
=
async
()
=>
{
let
{
data
}
=
await
getReconciliationAmount
()
let
res
=
await
getReconciliationAmount
()
let
data
:
any
=
res
.
data
treeData
.
value
=
[{
label
:
'全部'
,
id
:
'-1'
,
...
...
@@ -491,17 +503,21 @@ const getTreeNum = async () => {
],
}]
nextTick
(()
=>
{
(
treeRef
as
never
).
value
.
setCurrentKey
(
nodeId
.
value
,
true
)
(
treeRef
as
any
).
value
.
setCurrentKey
(
nodeId
.
value
,
true
)
})
treeData
.
value
.
forEach
((
el
)
=>
{
if
(
!
el
.
children
){
el
.
children
=
[]
}
el
.
children
.
forEach
((
it
)
=>
{
it
.
count
=
0
})
})
treeData
.
value
.
forEach
((
el
,
index
)
=>
{
treeData
.
value
.
forEach
((
el
)
=>
{
el
.
children
.
forEach
((
it
)
=>
{
data
.
forEach
((
item
)
=>
{
data
.
forEach
((
item
:
any
)
=>
{
if
(
it
.
id
===
item
.
status
)
{
it
[
'count'
]
=
item
.
count
}
...
...
@@ -512,7 +528,7 @@ const getTreeNum = async () => {
})
})
treeData
.
value
[
0
].
label
=
''
treeData
.
value
[
0
].
label
=
'全部'
+
(
data
.
find
(
el
=>
el
.
totalSum
)
?
`(
${
data
.
find
(
el
=>
el
.
totalSum
).
totalSum
}
)`
:
'(0)'
)
treeData
.
value
[
0
].
label
=
'全部'
+
(
data
.
find
(
(
el
:
any
)
=>
el
.
totalSum
)
?
`(
${
data
.
find
((
el
:
any
)
=>
el
.
totalSum
).
totalSum
}
)`
:
'(0)'
)
console
.
log
(
treeData
.
value
)
}
const
onEditOrder
=
async
(
item
:
AccountStatementNote
)
=>
{
...
...
@@ -546,8 +562,7 @@ const submitData = async () => {
showError
(
e
)
}
}
const
rowClick
=
(
row
)
=>
{
console
.
log
(
row
)
const
rowClick
=
(
row
:
any
)
=>
{
currentRow
.
value
=
row
tabsValue
.
value
=
'0'
tabsClick
(
tabsValue
.
value
)
...
...
@@ -556,21 +571,21 @@ const rowClick = (row) => {
const
tabsClick
=
async
(
name
:
string
)
=>
{
if
(
!
currentRow
.
value
)
return
if
(
name
===
'0'
)
{
let
{
data
}
=
await
getShipmentDetailsById
(
currentRow
.
value
.
shipmentId
)
let
{
data
}
=
await
getShipmentDetailsById
(
(
currentRow
.
value
as
any
)
.
shipmentId
)
detailList
.
value
=
data
}
else
if
(
name
===
'1'
)
{
await
logOrder
(
currentRow
.
value
)
}
}
const
handleSelectionChange
=
(
v
)
=>
{
const
handleSelectionChange
=
(
v
:
any
)
=>
{
selections
.
value
=
v
}
const
getSummaries
=
(
{
columns
,
data
}
)
=>
{
console
.
log
(
data
)
console
.
log
(
totalData
)
let
sums
=
[]
columns
.
forEach
((
column
,
index
)
=>
{
const
getSummaries
=
(
data
:
any
)
=>
{
let
columns
=
data
.
columns
let
sums
:
any
[]
=
[]
columns
.
forEach
((
column
:
any
,
index
:
number
)
=>
{
console
.
log
(
column
)
if
(
index
===
0
)
{
sums
[
index
]
=
'统计'
}
...
...
@@ -587,7 +602,6 @@ const getSummaries = ({ columns, data }) => {
sums
[
index
]
=
totalData
[
'sumTotalPrice'
]
}
})
console
.
log
([
sums
],
' [sums]'
)
return
sums
}
...
...
@@ -595,7 +609,7 @@ const sureFactory = () => {
ElMessageBox
.
confirm
(
`确认对账单?`
,
'重要提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'warning'
,
}).
then
(
async
res
=>
{
}).
then
(
async
()
=>
{
await
factoryConfirm
(
selections
.
value
.
map
(
el
=>
{
return
{
id
:
el
.
id
,
...
...
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