Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
前端-吴智勇
jinfa-platform
Commits
f5d88a28
Commit
f5d88a28
authored
Jun 05, 2022
by
前端-黄佳鑫
Committed by
前端-黄佳鑫
Jun 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 质检单新增完善
parent
47524281
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1145 additions
and
375 deletions
+1145
-375
qualityRoute.ts
config/routes/qualityRoute.ts
+35
-0
index.less
src/components/CardLayout/index.less
+1
-1
index.tsx
src/components/DetailLayout/components/listLayout/index.tsx
+36
-38
warehouseBillDetail.tsx
...geManage/exchangePrAddWarehousing/warehouseBillDetail.tsx
+68
-68
add.tsx
src/pages/quality/qualityManage/b2b/add.tsx
+187
-0
index.tsx
...quality/qualityManage/b2b/components/attachment/index.tsx
+40
-0
index.less
...quality/qualityManage/b2b/components/basicInfo/index.less
+23
-0
index.tsx
.../quality/qualityManage/b2b/components/basicInfo/index.tsx
+240
-0
index.less
...y/qualityManage/b2b/components/detectionDrawer/index.less
+79
-0
index.tsx
...ty/qualityManage/b2b/components/detectionDrawer/index.tsx
+0
-0
index.tsx
...ty/qualityManage/b2b/components/qualityMaterial/index.tsx
+0
-0
index.tsx
src/pages/quality/qualityManage/b2b/index.tsx
+47
-20
index.less
...ualityManage/detail/components/detectionDrawer/index.less
+8
-0
index.tsx
...qualityManage/detail/components/detectionDrawer/index.tsx
+129
-30
index.tsx
src/pages/quality/qualityManage/detail/index.tsx
+0
-0
index.tsx
src/pages/quality/qualityManage/seach/index.tsx
+3
-17
add.tsx
src/pages/quality/qualityManage/srm/add.tsx
+125
-11
index.tsx
...quality/qualityManage/srm/components/attachment/index.tsx
+2
-2
index.tsx
.../quality/qualityManage/srm/components/basicInfo/index.tsx
+11
-7
index.less
...y/qualityManage/srm/components/detectionDrawer/index.less
+3
-0
index.tsx
...ty/qualityManage/srm/components/detectionDrawer/index.tsx
+0
-0
index.tsx
...ty/qualityManage/srm/components/qualityMaterial/index.tsx
+0
-0
index.tsx
src/pages/quality/qualityManage/srm/index.tsx
+43
-19
index.tsx
...ualitySynergy/detail/components/detectionDrawer/index.tsx
+14
-0
index.tsx
src/pages/quality/qualitySynergy/detail/index.tsx
+47
-144
index.tsx
src/pages/quality/qualitySynergy/seach/index.tsx
+2
-16
index.less
src/pages/transaction/components/detailLayout/index.less
+2
-2
No files found.
config/routes/qualityRoute.ts
View file @
f5d88a28
...
...
@@ -18,6 +18,13 @@ const Routes = {
component
:
'@/pages/quality/qualityManage/srm'
,
},
{
path
:
'/memberCenter/quality/qualityManage/srm/preview'
,
name
:
'质检单管理(SRM)'
,
component
:
'@/pages/quality/qualityManage/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
path
:
'/memberCenter/quality/qualityManage/srm/add'
,
name
:
'新增质检单管理(SRM)'
,
component
:
'@/pages/quality/qualityManage/srm/add'
,
...
...
@@ -25,11 +32,39 @@ const Routes = {
noMargin
:
true
,
},
{
path
:
'/memberCenter/quality/qualityManage/srm/edit'
,
name
:
'编辑质检单管理(SRM)'
,
component
:
'@/pages/quality/qualityManage/srm/add'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
path
:
'/memberCenter/quality/qualityManage/b2b'
,
name
:
'新增质检单管理(B2B)'
,
component
:
'@/pages/quality/qualityManage/b2b'
,
},
{
path
:
'/memberCenter/quality/qualityManage/b2b/preview'
,
name
:
'质检单管理(SRM)'
,
component
:
'@/pages/quality/qualityManage/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
path
:
'/memberCenter/quality/qualityManage/b2b/add'
,
name
:
'新增质检单管理(SRM)'
,
component
:
'@/pages/quality/qualityManage/b2b/add'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
path
:
'/memberCenter/quality/qualityManage/b2b/edit'
,
name
:
'编辑质检单管理(SRM)'
,
component
:
'@/pages/quality/qualityManage/b2b/add'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
{
path
:
'/memberCenter/quality/qualityManage/seach'
,
name
:
'质检单查询'
,
component
:
'@/pages/quality/qualityManage/seach'
,
...
...
src/components/CardLayout/index.less
View file @
f5d88a28
.cardLayout {
margin-bottom:
24
px;
margin-bottom:
16
px;
border-radius: 8px;
background-color: #FFF;
.card_title {
...
...
src/components/DetailLayout/components/listLayout/index.tsx
View file @
f5d88a28
import
React
,
{
useEffect
,
useImperativeHandle
,
useRef
}
from
'react'
;
import
{
ColProps
,
Space
}
from
'antd'
;
import
{
Space
}
from
'antd'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
Card
from
'../card'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
IAntdSchemaFormProps
}
from
'@formily/antd
'
;
import
{
getIntl
}
from
'umi
'
;
export
interface
ListLayoutIProps
{
/** 锚点 */
anchor
?:
string
,
/** id */
id
?:
string
|
number
,
/** 标题 */
title
:
string
,
/** columns */
columns
:
ColumnType
<
any
>
[],
/** 接口 */
// fetch?: () => Promise<unknown>,
fetch
?:
any
,
/** 是否不发送请求 */
done
?:
boolean
,
/** 展示的数据 */
data
?:
any
[],
/** ids */
ids
?:
Object
,
/** 静态数据 */
dataSource
?:
any
,
/** 接口数据 */
fetchTableData
?:
any
,
/** 是否多选 */
selectedRow
?:
boolean
,
/** 刷新 */
reload
?:
any
,
/** rowKey */
rowKey
?:
string
,
/** 选择的keyId */
activeKey
?:
string
,
/** 禁用 */
...
...
@@ -38,15 +29,12 @@ export interface ListLayoutIProps {
fetchRowkeys
?(
e
:
any
),
/** 操作 */
controllerBtns
?:
React
.
ReactNode
,
formilyProps
?:
{
layouts
?:
ColProps
;
ctx
:
IAntdSchemaFormProps
;
}
}
const
ListLayout
:
React
.
FC
<
ListLayoutIProps
>
=
(
props
:
any
)
=>
{
const
{
anchor
,
id
,
title
,
columns
,
fetch
,
ids
,
selectedRow
,
reload
,
activeKey
,
getCheckboxProps
,
fetchRowkeys
,
controllerBtns
,
formilyProp
s
}
=
props
;
const
{
anchor
,
fetchTableData
,
dataSource
,
title
,
columns
,
selectedRow
,
reload
,
activeKey
,
getCheckboxProps
,
fetchRowkeys
,
controllerBtn
s
}
=
props
;
const
currentRef
=
useRef
<
any
>
({});
const
intl
=
getIntl
()
const
[
selectRow
,
selectRowFns
]
=
useRowSelectionTable
({
customKey
:
activeKey
||
'id'
,
...
...
@@ -55,22 +43,6 @@ const ListLayout: React.FC<ListLayoutIProps> = (props: any) => {
}
});
const
fetchTableData
=
(
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
if
(
fetch
&&
(
ids
||
id
))
{
fetch
({
id
,
...
ids
,
...
params
}).
then
((
res
:
any
)
=>
{
resolve
(
res
.
data
)
})
return
}
const
data
=
{
totalCount
:
fetch
?.
length
,
data
:
fetch
||
[]
}
resolve
(
data
)
})
}
useImperativeHandle
(
reload
,
()
=>
({
reload
:
()
=>
{
currentRef
.
current
.
reload
();
...
...
@@ -83,6 +55,28 @@ const ListLayout: React.FC<ListLayoutIProps> = (props: any) => {
fetchRowkeys
&&
fetchRowkeys
(
selectRowFns
.
selectedRowKeys
)
},
[
selectRowFns
])
const
tableData
=
!
dataSource
?
{
fetchTableData
:
(
params
:
any
)
=>
fetchTableData
(
params
),
tableProps
:
{
rowKey
:
'id'
,
scroll
:
{
x
:
'100%'
}
}
}
:
{
tableProps
:
{
dataSource
:
dataSource
,
rowKey
:
'id'
,
scroll
:
{
x
:
'100%'
},
pagination
:
{
showSizeChanger
:
true
,
showQuickJumper
:
true
,
size
:
'small'
,
pageSizeOptions
:
[
'10'
,
'20'
,
'50'
,
'100'
],
total
:
dataSource
.
length
,
showTotal
:
()
=>
intl
.
formatMessage
({
id
:
'componnets.standardTablePages'
},
{
totalPage
:
dataSource
.
length
}),
}
}
}
return
(
<
Card
id=
{
anchor
}
...
...
@@ -94,8 +88,12 @@ const ListLayout: React.FC<ListLayoutIProps> = (props: any) => {
currentRef=
{
currentRef
}
columns=
{
columns
}
rowSelection=
{
selectedRow
&&
selectRow
}
tableProps=
{
{
rowKey
:
'id'
,
scroll
:
{
x
:
'100%'
}
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchTableData
(
params
)
}
// tableProps={{
// rowKey: 'id',
// scroll: { x: '100%' }
// }}
// fetchTableData={(params: any) => fetchTableData(params)}
{
...
tableData
}
/>
</
Space
>
</
Card
>
...
...
src/pages/afterService/exchangeManage/exchangePrAddWarehousing/warehouseBillDetail.tsx
View file @
f5d88a28
/*
* @Author: XieZhiXiong
* @Date: 2021-08-20 14:20:14
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-17 19:49:26
* @Description: 换货退货入库单详情
*/
import
React
from
'react'
;
import
{
DOC_TYPE_EXCHANGE_RETURN_RECEIPT
}
from
'@/constants/commodity'
;
import
BillsFormPage
,
{
RelatedInfoDataType
}
from
'@/pages/transaction/stockSellStorage/bills/components/BillsFormPage'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
moment
from
'moment'
;
import
{
getAsReplaceGoodsGetReturnGoodsStorageDetail
}
from
'@/services/AfterServiceV2Api'
;
const
ExchangeWarehouseBillDetail
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
fetchRelatedInfo
=
():
Promise
<
RelatedInfoDataType
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getAsReplaceGoodsGetReturnGoodsStorageDetail
({
returnDeliveryId
:
id
,
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
resolve
({
relatedNo
:
res
.
data
.
applyNo
,
memberName
:
res
.
data
.
memberName
,
address
:
`
${
res
.
data
.
userName
||
''
}
/
${
res
.
data
.
tel
||
''
}
${
res
.
data
.
address
||
''
}
`
,
logisticsType
:
res
.
data
.
deliveryType
,
inventoryId
:
res
.
data
.
inventoryName
,
inventoryRole
:
res
.
data
.
inventoryRole
,
digest
:
res
.
data
.
orderAbstract
,
createTime
:
res
.
data
.
orderTime
?
moment
(
res
.
data
.
orderTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
billDetails
:
res
.
data
.
goodsDetailDeliveryList
.
map
((
item
)
=>
({
orderNo
:
item
.
orderNo
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
category
:
item
.
category
,
brand
:
item
.
brand
,
unit
:
item
.
unit
,
price
:
item
.
purchasePrice
,
relatedCount
:
item
.
replaceCount
,
billCount
:
item
.
replaceDeliveryCount
,
count
:
item
.
storageCount
,
})),
remark
:
res
.
data
.
remark
,
orderType
:
res
.
data
.
orderType
,
});
}
reject
();
}).
catch
((
err
)
=>
{
reject
(
err
);
});
});
};
return
(
<>
<
BillsFormPage
relatedType=
{
2
}
billType=
{
DOC_TYPE_EXCHANGE_RETURN_RECEIPT
}
fetchRelatedInfo=
{
fetchRelatedInfo
}
editable=
{
false
}
/>
</>
);
};
export
default
ExchangeWarehouseBillDetail
;
/*
* @Author: XieZhiXiong
* @Date: 2021-08-20 14:20:14
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-17 19:49:26
* @Description: 换货退货入库单详情
*/
import
React
from
'react'
;
import
{
DOC_TYPE_EXCHANGE_RETURN_RECEIPT
}
from
'@/constants/commodity'
;
import
BillsFormPage
,
{
RelatedInfoDataType
}
from
'@/pages/transaction/stockSellStorage/bills/components/BillsFormPage'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
moment
from
'moment'
;
import
{
getAsReplaceGoodsGetReturnGoodsStorageDetail
}
from
'@/services/AfterServiceV2Api'
;
const
ExchangeWarehouseBillDetail
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
fetchRelatedInfo
=
():
Promise
<
RelatedInfoDataType
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getAsReplaceGoodsGetReturnGoodsStorageDetail
({
returnDeliveryId
:
id
,
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
resolve
({
relatedNo
:
res
.
data
.
applyNo
,
memberName
:
res
.
data
.
memberName
,
address
:
`
${
res
.
data
.
userName
||
''
}
/
${
res
.
data
.
tel
||
''
}
${
res
.
data
.
address
||
''
}
`
,
logisticsType
:
res
.
data
.
deliveryType
,
inventoryId
:
res
.
data
.
inventoryName
,
inventoryRole
:
res
.
data
.
inventoryRole
,
digest
:
res
.
data
.
orderAbstract
,
createTime
:
res
.
data
.
orderTime
?
res
.
data
.
orderTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
billDetails
:
res
.
data
.
goodsDetailDeliveryList
.
map
((
item
)
=>
({
orderNo
:
item
.
orderNo
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
category
:
item
.
category
,
brand
:
item
.
brand
,
unit
:
item
.
unit
,
price
:
item
.
purchasePrice
,
relatedCount
:
item
.
replaceCount
,
billCount
:
item
.
replaceDeliveryCount
,
count
:
item
.
storageCount
,
})),
remark
:
res
.
data
.
remark
,
orderType
:
res
.
data
.
orderType
,
});
}
reject
();
}).
catch
((
err
)
=>
{
reject
(
err
);
});
});
};
return
(
<>
<
BillsFormPage
relatedType=
{
2
}
billType=
{
DOC_TYPE_EXCHANGE_RETURN_RECEIPT
}
fetchRelatedInfo=
{
fetchRelatedInfo
}
editable=
{
false
}
/>
</>
);
};
export
default
ExchangeWarehouseBillDetail
;
src/pages/quality/qualityManage/b2b/add.tsx
0 → 100644
View file @
f5d88a28
import
React
,
{
Fragment
,
useEffect
,
useState
}
from
'react'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
PeripheralLayout
from
'@/pages/transaction/components/detailLayout'
;
import
{
getColor
}
from
'@/components/FormProgress'
;
import
{
Button
,
Form
}
from
'antd'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
BasicInfo
from
'./components/basicInfo'
;
import
QualityMaterial
from
'./components/qualityMaterial'
;
import
Attachment
from
'./components/attachment'
;
import
{
AddedContext
}
from
'@/components/DetailLayout/components/context'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
{
getOrderQualityDetail
,
postOrderQualitySaveOrUpdate
}
from
'@/services/OrderNewV2Api'
;
import
moment
from
'moment'
;
export
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
"144px"
}
},
labelAlign
:
"left"
};
const
progress
=
{
display
:
'flex'
,
alignItems
:
'center'
,
width
:
'240px'
,
height
:
'16px'
,
marginLeft
:
'8px'
,
padding
:
'0 8px'
,
borderRadius
:
'8px'
,
fontSize
:
'12px'
,
fontWeight
:
'normal'
,
}
enum
TYPE
{
/** 生成B2B质检单 */
B2B
=
1
,
/** 生成SRM质检单 */
SRM
}
enum
ORDERRESOURCE
{
/** 新增生成 */
ADDED
=
1
,
/** 收货单生成 */
ORDER
}
const
QualityManageSrmAdded
=
(
props
:
any
)
=>
{
const
intl
=
getIntl
();
const
{
query
:
{
id
,
},
pathname
,
}
=
history
.
location
;
const
[
PATH
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
form
]
=
Form
.
useForm
();
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({});
const
[
percent
,
setPercent
]
=
useState
<
number
>
(
0
);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
/**计算输入框输入了百分之多少 */
const
onFieldsChange
=
()
=>
{
const
allValues
=
form
.
getFieldsValue
();
const
values
=
Object
.
values
(
allValues
);
let
num
=
0
;
values
.
forEach
(
_item
=>
{
if
(
_item
)
{
num
+=
1
}
})
setPercent
(
Number
(((
num
/
values
.
length
)
*
100
)))
}
const
handleSubmit
=
()
=>
{
form
.
validateFields
().
then
(
res
=>
{
const
{
qualityNo
,
qualityType
,
digest
,
vendorMemberId
,
vendorRoleId
,
vendorMemberName
,
startTime
,
endTime
,
qualityInspector
,
remark
,
qualityOrderProductVOS
,
urls
,
}
=
res
;
const
params
=
{
id
:
Number
(
id
),
type
:
TYPE
.
B2B
,
orderResource
:
PATH
===
'formed'
?
ORDERRESOURCE
.
ORDER
:
ORDERRESOURCE
.
ADDED
,
qualityNo
,
qualityType
,
digest
,
vendorMemberId
,
vendorRoleId
,
vendorMemberName
,
startTime
:
moment
(
startTime
).
format
(
'YYYY-MM-DD'
),
endTime
:
moment
(
endTime
).
format
(
'YYYY-MM-DD'
),
qualityInspector
,
remark
,
qualityOrderProductVOS
,
urls
,
memberId
:
getAuth
()?.
memberId
,
roleId
:
getAuth
()?.
memberRoleId
,
}
setLoading
(
true
)
postOrderQualitySaveOrUpdate
(
params
).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
history
.
goBack
();
})
setLoading
(
false
)
}).
catch
((
err
)
=>
{
if
(
err
)
setLoading
(
false
)
})
}
useEffect
(()
=>
{
if
(
id
)
{
getOrderQualityDetail
({
id
:
id
.
toString
()
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
const
{
data
}
=
res
;
setDataSource
(
data
)
form
.
setFieldsValue
({
qualityNo
:
data
?.
qualityNo
,
receiveNo
:
data
?.
receiveNo
,
qualityType
:
data
?.
qualityType
,
digest
:
data
?.
digest
,
vendorMemberId
:
data
?.
vendorMemberId
,
vendorRoleId
:
data
?.
vendorRoleId
,
vendorMemberName
:
data
?.
vendorMemberName
,
startTime
:
moment
(
data
?.
startTime
),
endTime
:
moment
(
data
?.
endTime
),
qualityInspector
:
data
?.
qualityInspector
,
remark
:
data
?.
remark
,
urls
:
data
?.
urls
,
qualityOrderProductVOS
:
data
?.
qualityOrderProductVOS
,
})
onFieldsChange
()
})
}
},
[
id
])
return
(
<
AddedContext
.
Provider
value=
{
{
form
,
dataSource
}
}
>
<
PeripheralLayout
hideBreak
detail=
{
props
?.
route
?.
name
}
no=
{
<
div
style=
{
{
...
progress
,
backgroundColor
:
getColor
(
percent
).
bg
,
color
:
getColor
(
percent
).
text
}
}
>
{
intl
.
formatMessage
({
id
:
'process.infointegrity'
,
defaultMessage
:
'信息完整度'
})
}
{
percent
.
toFixed
(
0
)
}
%
</
div
>
}
tabLink=
{
[
{
title
:
'基本信息'
,
id
:
'basicInfo'
},
{
title
:
'质检商品'
,
id
:
'qualityMaterial'
},
{
title
:
'附件'
,
id
:
'attachment'
},
]
}
effect=
{
<
Button
icon=
{
<
SaveOutlined
/>
}
type=
"primary"
onClick=
{
()
=>
handleSubmit
()
}
loading=
{
loading
}
>
保存
</
Button
>
}
components=
{
<
Form
form=
{
form
}
{
...
layout
}
onFieldsChange=
{
()
=>
onFieldsChange
()
}
>
<
BasicInfo
/>
<
QualityMaterial
/>
<
Attachment
/>
</
Form
>
}
/>
</
AddedContext
.
Provider
>
)
}
export
default
QualityManageSrmAdded
src/pages/quality/qualityManage/b2b/components/attachment/index.tsx
0 → 100644
View file @
f5d88a28
import
React
from
'react'
;
import
{
Col
,
Form
,
Row
}
from
'antd'
;
import
CardLayout
from
'@/components/CardLayout'
;
import
UploadFiles
from
'@/pages/transaction/components/uploadFiles'
;
interface
AttachmentLayoutProps
{
/** 附件列表 */
enclosureUrls
?:
any
[],
/** 获取上传 */
getEnclosureUrls
?:
(
e
?:
any
)
=>
void
,
/** 删除 */
removeEnclosureUrls
?:
(
e
?:
number
)
=>
void
,
}
const
AttachmentLayout
:
React
.
FC
<
AttachmentLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
enclosureUrls
,
getEnclosureUrls
,
removeEnclosureUrls
}
=
props
;
return
(
<
CardLayout
id=
'attachment'
title=
'附件'
weight
bodyStyle=
{
{
paddingBottom
:
'0px'
}
}
>
<
Row
gutter=
{
[
24
,
24
]
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
"urls"
>
<
UploadFiles
accept=
".doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx"
size=
{
20
}
fileList=
{
enclosureUrls
}
onChange=
{
(
e
:
any
)
=>
getEnclosureUrls
(
e
)
}
onRemove=
{
(
e
:
number
)
=>
removeEnclosureUrls
(
e
)
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
CardLayout
>
)
}
export
default
AttachmentLayout
src/pages/quality/qualityManage/b2b/components/basicInfo/index.less
0 → 100644
View file @
f5d88a28
@import '~@/global/styles/theme.less';
.basic-layout {
:global {
.ant-input-search-button {
background-color: @main-color !important;
height: 32.84px;
}
}
.digest {
display: flex;
gap: 8px;
width: 100%;
:global {
.ant-form-item {
width: 50% !important;
}
.ant-picker {
width: 100% !important;
}
}
}
}
src/pages/quality/qualityManage/b2b/components/basicInfo/index.tsx
0 → 100644
View file @
f5d88a28
import
React
,
{
useCallback
,
useContext
,
useEffect
,
useState
}
from
'react'
;
import
CardLayout
from
'@/components/CardLayout'
;
import
{
Col
,
DatePicker
,
Form
,
Input
,
message
,
Row
,
Select
}
from
'antd'
;
import
{
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnType
}
from
'antd/lib/table'
;
import
styles
from
'./index.less'
;
import
TableModal
from
'@/pages/transaction/components/tableModal'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
postMemberManageLowerProviderPage
}
from
'@/services/MemberV2Api'
;
import
{
AddedContext
}
from
'@/components/DetailLayout/components/context'
;
import
{
getOrderQualityGetQualityNo
}
from
'@/services/OrderNewV2Api'
;
interface
BasicInfoLaoutProps
{
}
const
index
=
0
;
const
BasicInfoLaout
:
React
.
FC
<
BasicInfoLaoutProps
>
=
(
props
:
any
)
=>
{
const
id
=
null
const
{
form
,
dataSource
}
=
useContext
(
AddedContext
);
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
menberValue
,
setMenberValue
]
=
useState
<
any
[]
>
([]);
const
[
qualityNo
,
setQualityNo
]
=
useState
<
string
>
(
''
);
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'会员ID'
,
key
:
'memberId'
,
dataIndex
:
'memberId'
,
},
{
title
:
'会员名称'
,
key
:
'name'
,
dataIndex
:
'name'
,
},
{
title
:
'会员类型'
,
key
:
'memberTypeName'
,
dataIndex
:
'memberTypeName'
,
},
{
title
:
'会员角色'
,
key
:
'roleName'
,
dataIndex
:
'roleName'
,
},
{
title
:
'会员等级'
,
key
:
'levelTag'
,
dataIndex
:
'levelTag'
,
},
]
const
handleFetchData
=
useCallback
((
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
postMemberManageLowerProviderPage
({
...
params
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
let
data
=
{
data
:
res
.
data
.
data
.
map
(
_item
=>
{
return
{
...
_item
,
mrId
:
`
${
_item
.
memberId
}
_
${
_item
.
roleId
}
`
}
}),
totalCount
:
res
.
data
.
totalCount
}
resolve
(
data
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
})
},
[])
const
toggle
=
(
flag
:
boolean
)
=>
{
setVisible
(
flag
)
}
const
handleSubmit
=
(
_selectRow
:
number
[]
|
string
[],
selectedRows
:
{
[
key
:
string
]:
any
}[])
=>
{
form
?.
setFieldsValue
({
vendorMemberName
:
selectedRows
[
index
]?.
name
,
vendorMemberId
:
selectedRows
[
index
]?.
memberId
,
vendorRoleId
:
selectedRows
[
index
]?.
roleId
,
})
setMenberValue
(
selectedRows
)
toggle
(
false
)
}
useEffect
(()
=>
{
if
(
!
id
)
{
getOrderQualityGetQualityNo
().
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
message
.
error
(
res
.
message
)
return
}
setQualityNo
(
res
.
data
)
form
.
setFieldsValue
({
'qualityNo'
:
res
.
data
})
})
}
},
[
id
])
useEffect
(()
=>
{
if
(
dataSource
)
{
setQualityNo
(
dataSource
?.
qualityNo
)
}
},
[
dataSource
])
return
(
<
CardLayout
id=
'basicInfo'
title=
'基本信息'
weight
bodyStyle=
{
{
paddingBottom
:
'0px'
}
}
classNames=
{
styles
[
'basic-layout'
]
}
>
<
Row
gutter=
{
[
16
,
36
]
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'质检单编号'
>
<
span
>
{
qualityNo
}
</
span
>
</
Form
.
Item
>
<
Form
.
Item
hidden
name=
'qualityNo'
label=
'质检单编号'
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'digest'
label=
'质检单摘要'
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
'请输入质检单摘要'
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'qualityType'
label=
'质检类型'
rules=
{
[{
required
:
true
}]
}
>
<
Select
>
<
Select
.
Option
value=
{
1
}
>
来料质检
</
Select
.
Option
>
<
Select
.
Option
value=
{
2
}
>
样品质检
</
Select
.
Option
>
<
Select
.
Option
value=
{
3
}
>
试制品质检
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
'vendorMemberName'
label=
'供应会员'
rules=
{
[{
required
:
true
}]
}
>
<
Input
.
Search
onSearch=
{
()
=>
toggle
(
true
)
}
readOnly
enterButton=
{
<
LinkOutlined
/>
}
/>
</
Form
.
Item
>
<
Form
.
Item
hidden
name=
'vendorMemberId'
label=
'供应商会员Id'
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
'供应商会员Id'
/>
</
Form
.
Item
>
<
Form
.
Item
hidden
name=
'vendorRoleId'
label=
'供应商会员角色Id'
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
'供应商会员角色Id'
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'digest'
label=
'质检日期'
required
>
<
div
className=
{
styles
[
'digest'
]
}
>
<
Form
.
Item
name=
'startTime'
validateFirst
rules=
{
[{
required
:
true
}]
}
>
<
DatePicker
showNow=
{
false
}
allowClear
style=
{
{}
}
/>
</
Form
.
Item
>
<
div
style=
{
{
height
:
'32.84px'
,
lineHeight
:
'2.3715'
}
}
>
-
</
div
>
<
Form
.
Item
name=
'endTime'
rules=
{
[{
required
:
true
}]
}
>
<
DatePicker
showNow=
{
false
}
allowClear
/>
</
Form
.
Item
>
</
div
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
'qualityInspector'
label=
'质检人'
>
<
Input
placeholder=
'最长20个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'remark'
label=
'备注'
>
<
Input
placeholder=
'最长150个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'收货单号'
>
<>
-
</>
</
Form
.
Item
>
<
Form
.
Item
hidden
name=
'receiveNo'
label=
'收货单号'
>
<
Input
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
{
/* 选择供应会员 */
}
<
TableModal
modalType=
"Drawer"
visible=
{
visible
}
tableProps=
{
{
rowKey
:
'mrId'
,
}
}
mode=
"radio"
customKey=
'mrId'
title=
'选择供应商'
schema=
{
{
type
:
"object"
,
properties
:
{
megalayout
:
{
type
:
"object"
,
"x-component"
:
"mega-layout"
,
properties
:
{
name
:
{
type
:
"string"
,
"x-component"
:
"Search"
,
"x-mega-props"
:
{},
"x-component-props"
:
{
placeholder
:
'会员名称'
,
advanced
:
false
,
align
:
"flex-left"
,
}
}
}
},
[
FORM_FILTER_PATH
]:
{
type
:
"object"
,
"x-component"
:
"flex-layout"
,
"x-component-props"
:
{
rowStyle
:
{
justifyContent
:
"flex-start"
,
flexWrap
:
"nowrap"
},
colStyle
:
{
//改变间隔
marginRight
:
20
}
},
}
}
}
}
effects=
{
(
$
,
actions
)
=>
{
actions
.
reset
()
useStateFilterSearchLinkageEffect
(
$
,
actions
,
"name"
,
FORM_FILTER_PATH
)
}
}
columns=
{
columns
}
fetchData=
{
handleFetchData
}
onClose=
{
()
=>
toggle
(
false
)
}
onOk=
{
handleSubmit
}
value=
{
menberValue
}
/>
</
CardLayout
>
)
}
export
default
BasicInfoLaout
src/pages/quality/qualityManage/b2b/components/detectionDrawer/index.less
0 → 100644
View file @
f5d88a28
.detection-drawer {
:global {
.ant-drawer-body {
padding: 16px !important;
}
.ant-space-vertical {
width: 100%;
}
.ant-form-item {
margin-bottom: 0px;
}
.ant-radio-wrapper {
padding: 6px 16px;
border-radius: 4px;
border: 1px solid #F5F6F7;
background-color: #F5F6F7;
margin-right: 16px;
}
.ant-radio-wrapper-checked {
border: 1px solid #00A98F;
background-color: rgba(0, 169, 143, 0.04);
span {
color: #00A98F;
}
}
.ant-table-wrapper {
.ant-form-item {
margin-bottom: 0px;
}
}
.ant-input-number {
width: 100%;
}
}
.info {
span {
display: inline-block;
&:first-child {
color: #91959B;
font-size: 12px;
width: 144px;
}
&:last-child {
color: #303133;
font-size: 12px;
font-weight: 400;
}
}
}
.vertical {
color: #252D37;
font-size: 14px;
position: relative;
padding-left: 8px;
&::after {
content: '';
height: 14px;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
border-left: 2px solid @main-color;
transform: scaleY(1);
opacity: 1;
transition: transform .15s cubic-bezier(.645, .045, .355, 1), opacity .15s cubic-bezier(.645, .045, .355, 1);
}
}
}
src/pages/quality/qualityManage/b2b/components/detectionDrawer/index.tsx
0 → 100644
View file @
f5d88a28
This diff is collapsed.
Click to expand it.
src/pages/quality/qualityManage/b2b/components/qualityMaterial/index.tsx
0 → 100644
View file @
f5d88a28
This diff is collapsed.
Click to expand it.
src/pages/quality/qualityManage/b2b/index.tsx
View file @
f5d88a28
import
React
from
'react'
;
import
React
,
{
useRef
}
from
'react'
;
import
TableLayout
from
'@/components/TableLayout'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
createTime
,
digest
,
endTime
,
operation
,
outerStatusName
,
qualityNo
,
receiveNo
,
startTime
,
qualityTypeName
,
vendorMemberName
}
from
'../columns'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
Button
,
Space
}
from
'antd'
;
import
{
Button
,
Popconfirm
,
Space
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
Link
,
history
}
from
'umi'
;
import
{
getOrderQualityGetB2BQualityOrderPage
}
from
'@/services/OrderNewV2Api'
;
import
{
postOrderQualitySubmit
}
from
'@/services/OrderNewV2Api'
;
import
{
postOrderQualityDeleteById
}
from
'@/services/OrderNewV2Api'
;
const
QualityManageB2BTable
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
/** 提交 */
const
handleSubmit
=
(
id
)
=>
{
postOrderQualitySubmit
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
ref
.
current
.
reload
();
})
}
/** 删除 */
const
handleDelete
=
(
id
)
=>
{
postOrderQualityDeleteById
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
ref
.
current
.
reload
();
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
qualityNo
,
render
:
(
_text
)
=>
<
Link
to=
{
''
}
>
{
_text
}
</
Link
>
render
:
(
_text
,
record
)
=>
<
Link
to=
{
`b2b/preview?id=${record?.id}`
}
>
{
_text
}
</
Link
>
},
{
...
digest
,
...
...
@@ -40,26 +62,31 @@ const QualityManageB2BTable: React.FC<{}> = () => {
},
{
...
operation
,
render
:
(
_text
,
record
)
=>
<>
<
Popconfirm
title=
'是否提交!'
okText=
'是'
cancelText=
'否'
onConfirm=
{
()
=>
handleSubmit
(
record
?.
id
)
}
>
<
Button
type=
'link'
>
提交
</
Button
>
</
Popconfirm
>
<
Button
type=
'link'
href=
{
`srm/edit?id=${record?.id}`
}
>
修改
</
Button
>
<
Popconfirm
title=
'是否删除!'
okText=
'是'
cancelText=
'否'
onConfirm=
{
()
=>
handleDelete
(
record
?.
id
)
}
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
</>
},
]
const
mockdata
=
[
{
id
:
1
,
qualityNo
:
'SPTY1233837739'
,
digest
:
'2014-07-01 进口头层黄牛皮荔枝纹质检单'
,
startTime
:
'2022-05-27'
,
endTime
:
'2022-05-27'
,
qualityTypeName
:
'收货质检'
,
receiveNo
:
'SH2014392853020'
,
vendorMemberName
:
'广州白马皮具交易中心'
,
createTime
:
'2022-05-27 14:41:41'
,
outerStatusName
:
'质检中'
}
]
return
(
<
TableLayout
reload=
{
ref
}
columns=
{
columns
}
effects=
"qualityNo"
schema=
{
{
...
...
@@ -142,13 +169,13 @@ const QualityManageB2BTable: React.FC<{}> = () => {
}
}
}
}
fetch=
{
mockdata
}
fetch=
{
getOrderQualityGetB2BQualityOrderPage
}
controllerBtns=
{
<
Space
direction=
"horizontal"
size=
{
16
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/quality/qualityManage/add'
)
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/quality/qualityManage/
b2b/
add'
)
}
>
新增
</
Button
>
...
...
src/pages/quality/qualityManage/detail/components/detectionDrawer/index.less
View file @
f5d88a28
...
...
@@ -7,6 +7,14 @@
.ant-space-vertical {
width: 100%;
}
.ant-form-item {
margin-bottom: 0;
}
.ant-input-number {
width: 100%;
}
}
.info {
...
...
src/pages/quality/qualityManage/detail/components/detectionDrawer/index.tsx
View file @
f5d88a28
import
React
,
{
useCallback
,
useMemo
}
from
'react'
;
import
{
Drawer
,
Space
,
Table
as
Badrecord
,
Table
as
Inspectionrecord
}
from
'antd'
;
import
React
,
{
useCallback
,
use
Effect
,
use
Memo
}
from
'react'
;
import
{
Col
,
Drawer
,
Form
,
InputNumber
,
Row
,
Select
,
Space
,
Table
as
Badrecord
,
Table
as
Inspectionrecord
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table'
;
import
styles
from
'./index.less'
;
...
...
@@ -8,6 +8,20 @@ export type DetectionType = {
qualityNo
:
string
,
/** 供应商 */
vendorMemberName
:
string
,
/** 检验方式 */
inspectionTypeName
:
string
,
/** 送检数量 */
submissionCount
:
number
,
/** 抽样数量 */
samplesCount
:
number
,
/** 让步接收数量 */
concessionToReceiveCount
:
number
,
/** 批次判定 */
batchJudgmentType
:
string
,
/** 允收数量 */
acceptanceCount
:
number
,
/** 拒收数量 */
rejectCount
:
number
,
/** 质检单物料信息不良记录 */
qualityOrderProductBadRecordDetailVOS
:
object
[],
/** 质检单物料信息检验记录 */
...
...
@@ -23,8 +37,15 @@ export interface DetectionDrawerProps {
onClose
(),
}
export
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
"144px"
}
},
labelAlign
:
"left"
};
const
DetectionDrawer
:
React
.
FC
<
DetectionDrawerProps
>
=
(
props
:
any
)
=>
{
const
{
detection
,
visible
,
onClose
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
/** 不良记录表头 */
const
badrecordColumns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -112,6 +133,17 @@ const DetectionDrawer: React.FC<DetectionDrawerProps> = (props: any) => {
return
detection
},
[
detection
])
useEffect
(()
=>
{
form
.
setFieldsValue
({
submissionCount
:
detection
?.
submissionCount
,
samplesCount
:
detection
?.
samplesCount
,
concessionToReceiveCount
:
detection
?.
concessionToReceiveCount
,
batchJudgmentType
:
detection
?.
batchJudgmentType
,
acceptanceCount
:
detection
?.
acceptanceCount
,
rejectCount
:
detection
?.
rejectCount
,
})
},
[
detection
])
return
(
<
Drawer
width=
{
1000
}
...
...
@@ -121,36 +153,103 @@ const DetectionDrawer: React.FC<DetectionDrawerProps> = (props: any) => {
onClose=
{
onClose
}
className=
{
styles
[
'detection-drawer'
]
}
>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
div
className=
{
styles
[
'info'
]
}
>
<
span
>
质检单编号
</
span
>
<
span
>
{
data
?.
qualityNo
}
</
span
>
</
div
>
<
div
className=
{
styles
[
'info'
]
}
>
<
span
>
供应商名称
</
span
>
<
span
>
{
data
?.
vendorMemberName
}
</
span
>
</
div
>
</
Space
>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
div
className=
{
styles
[
'vertical'
]
}
>
不良记录
</
div
>
<
Badrecord
rowKey=
'id'
pagination=
{
false
}
columns=
{
badrecordColumns
}
dataSource=
{
data
?.
qualityOrderProductBadRecordDetailVOS
}
/>
</
Space
>
<
Form
form=
{
form
}
{
...
layout
}
>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
div
className=
{
styles
[
'vertical'
]
}
>
检验记录
</
div
>
<
Inspectionrecord
rowKey=
'id'
pagination=
{
false
}
columns=
{
inspectionrecordColumns
}
dataSource=
{
data
?.
qualityOrderProductTestRecordDetailVOS
}
/>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
div
className=
{
styles
[
'info'
]
}
>
<
span
>
质检单编号
</
span
>
<
span
>
{
data
?.
qualityNo
}
</
span
>
</
div
>
<
div
className=
{
styles
[
'info'
]
}
>
<
span
>
供应商名称
</
span
>
<
span
>
{
data
?.
vendorMemberName
}
</
span
>
</
div
>
<
div
className=
{
styles
[
'info'
]
}
>
<
span
>
检验方式
</
span
>
<
span
>
{
data
?.
inspectionTypeName
}
</
span
>
</
div
>
</
Space
>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
Row
gutter=
{
[
16
,
36
]
}
>
<
Col
span=
{
12
}
>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
Form
.
Item
label=
'送检数量'
name=
'submissionCount'
>
<
InputNumber
disabled
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'抽样数量'
name=
'samplesCount'
dependencies=
{
[
'submissionCount'
]
}
>
<
InputNumber
disabled
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'让步接收数量'
name=
'concessionToReceiveCount'
>
<
InputNumber
disabled
/>
</
Form
.
Item
>
</
Space
>
</
Col
>
<
Col
span=
{
12
}
>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
Form
.
Item
label=
'批次判定'
name=
'batchJudgmentType'
>
<
Select
disabled
>
<
Select
.
Option
value=
{
1
}
>
合格
</
Select
.
Option
>
<
Select
.
Option
value=
{
2
}
>
部分合格
</
Select
.
Option
>
<
Select
.
Option
value=
{
3
}
>
让步接收
</
Select
.
Option
>
<
Select
.
Option
value=
{
4
}
>
拒收
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
'允收数量'
name=
'acceptanceCount'
>
<
InputNumber
disabled
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'拒收数量'
name=
'rejectCount'
>
<
InputNumber
disabled
/>
</
Form
.
Item
>
</
Space
>
</
Col
>
</
Row
>
</
Space
>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
div
className=
{
styles
[
'vertical'
]
}
>
不良记录
</
div
>
<
Badrecord
rowKey=
'id'
pagination=
{
false
}
columns=
{
badrecordColumns
}
dataSource=
{
data
?.
qualityOrderProductBadRecordDetailVOS
}
/>
</
Space
>
<
Space
direction=
'vertical'
size=
{
16
}
>
<
div
className=
{
styles
[
'vertical'
]
}
>
检验记录
</
div
>
<
Inspectionrecord
rowKey=
'id'
pagination=
{
false
}
columns=
{
inspectionrecordColumns
}
dataSource=
{
data
?.
qualityOrderProductTestRecordDetailVOS
}
/>
</
Space
>
</
Space
>
</
Space
>
</
Form
>
</
Drawer
>
)
}
...
...
src/pages/quality/qualityManage/detail/index.tsx
View file @
f5d88a28
This diff is collapsed.
Click to expand it.
src/pages/quality/qualityManage/seach/index.tsx
View file @
f5d88a28
...
...
@@ -4,13 +4,14 @@ import { ColumnType } from 'antd/lib/table/interface';
import
{
createTime
,
digest
,
endTime
,
operation
,
outerStatusName
,
qualityNo
,
receiveNo
,
startTime
,
qualityTypeName
,
vendorMemberName
}
from
'../columns'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
Link
,
history
}
from
'umi'
;
import
{
getOrderQualityGetB2BQualityOrderPage
}
from
'@/services/OrderNewV2Api'
;
const
QualityManageSearchTable
:
React
.
FC
<
{}
>
=
()
=>
{
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
qualityNo
,
render
:
(
_text
)
=>
<
Link
to=
{
'seach/preview'
}
>
{
_text
}
</
Link
>
render
:
(
_text
,
record
)
=>
<
Link
to=
{
`seach/preview?id=${record?.id}`
}
>
{
_text
}
</
Link
>
},
{
...
digest
,
...
...
@@ -42,21 +43,6 @@ const QualityManageSearchTable: React.FC<{}> = () => {
},
]
const
mockdata
=
[
{
id
:
1
,
qualityNo
:
'SPTY1233837739'
,
digest
:
'2014-07-01 进口头层黄牛皮荔枝纹质检单'
,
startTime
:
'2022-05-27'
,
endTime
:
'2022-05-27'
,
qualityTypeName
:
'收货质检'
,
receiveNo
:
'SH2014392853020'
,
vendorMemberName
:
'广州白马皮具交易中心'
,
createTime
:
'2022-05-27 14:41:41'
,
outerStatusName
:
'质检中'
}
]
return
(
<
TableLayout
columns=
{
columns
}
...
...
@@ -142,7 +128,7 @@ const QualityManageSearchTable: React.FC<{}> = () => {
}
}
}
}
fetch=
{
mockdata
}
fetch=
{
getOrderQualityGetB2BQualityOrderPage
}
/>
)
}
...
...
src/pages/quality/qualityManage/srm/add.tsx
View file @
f5d88a28
import
React
,
{
Fragment
,
useState
}
from
'react'
;
import
{
getIntl
}
from
'umi'
;
import
React
,
{
Fragment
,
use
Effect
,
use
State
}
from
'react'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
PeripheralLayout
from
'@/pages/transaction/components/detailLayout'
;
import
{
getColor
}
from
'@/components/FormProgress'
;
import
{
Button
,
Form
}
from
'antd'
;
...
...
@@ -8,6 +8,10 @@ import BasicInfo from './components/basicInfo';
import
QualityMaterial
from
'./components/qualityMaterial'
;
import
Attachment
from
'./components/attachment'
;
import
{
AddedContext
}
from
'@/components/DetailLayout/components/context'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
{
getOrderQualityDetail
,
postOrderQualitySaveOrUpdate
}
from
'@/services/OrderNewV2Api'
;
import
moment
from
'moment'
;
import
{
isEmpty
}
from
'lodash'
;
export
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -27,36 +31,142 @@ const progress = {
fontWeight
:
'normal'
,
}
enum
TYPE
{
/** 生成B2B质检单 */
B2B
=
1
,
/** 生成SRM质检单 */
SRM
}
enum
ORDERRESOURCE
{
/** 新增生成 */
ADDED
=
1
,
/** 收货单生成 */
ORDER
}
const
QualityManageSrmAdded
=
(
props
:
any
)
=>
{
const
intl
=
getIntl
();
const
{
query
:
{
id
,
},
pathname
,
}
=
history
.
location
;
const
[
PATH
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
form
]
=
Form
.
useForm
();
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({});
const
[
percent
,
setPercent
]
=
useState
<
number
>
(
0
);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
urls
,
setUrls
]
=
useState
<
any
[]
>
([]);
/**计算输入框输入了百分之多少 */
const
onFieldsChange
=
()
=>
{
const
allValues
=
form
.
getFieldsValue
();
const
values
=
Object
.
values
(
allValues
);
console
.
log
(
values
)
let
num
=
0
;
values
.
forEach
(
_item
=>
{
if
(
_item
)
{
if
(
_item
&&
!
isEmpty
(
_item
)
)
{
num
+=
1
}
})
setPercent
(
Number
(((
num
/
values
.
length
)
*
100
)))
}
const
handleSubmit
=
()
=>
{
form
.
validateFields
().
then
(
res
=>
{
console
.
log
(
res
)
const
{
qualityNo
,
qualityType
,
digest
,
vendorMemberId
,
vendorRoleId
,
vendorMemberName
,
startTime
,
endTime
,
qualityInspector
,
remark
,
qualityOrderProductVOS
,
urls
,
}
=
res
;
const
params
=
{
id
:
Number
(
id
),
type
:
TYPE
.
SRM
,
orderResource
:
PATH
===
'formed'
?
ORDERRESOURCE
.
ORDER
:
ORDERRESOURCE
.
ADDED
,
qualityNo
,
qualityType
,
digest
,
vendorMemberId
,
vendorRoleId
,
vendorMemberName
,
startTime
:
moment
(
startTime
).
format
(
'YYYY-MM-DD'
),
endTime
:
moment
(
endTime
).
format
(
'YYYY-MM-DD'
),
qualityInspector
,
remark
,
qualityOrderProductVOS
,
urls
,
memberId
:
getAuth
()?.
memberId
,
roleId
:
getAuth
()?.
memberRoleId
,
}
setLoading
(
true
)
postOrderQualitySaveOrUpdate
(
params
).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
history
.
goBack
();
})
setLoading
(
false
)
}).
catch
((
err
)
=>
{
if
(
err
)
setLoading
(
false
)
})
}
useEffect
(()
=>
{
if
(
id
)
{
getOrderQualityDetail
({
id
:
id
.
toString
()
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
const
{
data
}
=
res
;
setUrls
(
data
?.
urls
);
setDataSource
(
data
);
form
.
setFieldsValue
({
qualityNo
:
data
?.
qualityNo
,
receiveNo
:
data
?.
receiveNo
,
qualityType
:
data
?.
qualityType
,
digest
:
data
?.
digest
,
vendorMemberId
:
data
?.
vendorMemberId
,
vendorRoleId
:
data
?.
vendorRoleId
,
vendorMemberName
:
data
?.
vendorMemberName
,
startTime
:
moment
(
data
?.
startTime
),
endTime
:
moment
(
data
?.
endTime
),
qualityInspector
:
data
?.
qualityInspector
,
remark
:
data
?.
remark
,
urls
:
data
?.
urls
,
qualityOrderProductVOS
:
data
?.
qualityOrderProductVOS
,
})
onFieldsChange
()
})
}
},
[
id
])
const
getEnclosureUrls
=
(
data
)
=>
{
setUrls
(
data
)
form
.
setFieldsValue
({
"urls"
:
data
})
}
const
removeEnclosureUrls
=
(
index
)
=>
{
const
files
=
[...
urls
];
files
.
splice
(
index
,
1
);
setUrls
(
files
);
form
.
setFieldsValue
({
"urls"
:
files
})
}
return
(
<
AddedContext
.
Provider
value=
{
form
}
>
<
AddedContext
.
Provider
value=
{
{
form
,
dataSource
}
}
>
<
PeripheralLayout
hideBreak
detail=
{
props
?.
route
?.
name
}
...
...
@@ -69,8 +179,8 @@ const QualityManageSrmAdded = (props: any) => {
}
tabLink=
{
[
{
title
:
'基本信息'
,
id
:
'basicInfo'
},
{
title
:
'质检物料
(4)
'
,
id
:
'qualityMaterial'
},
{
title
:
'附件
(1)
'
,
id
:
'attachment'
},
{
title
:
'质检物料'
,
id
:
'qualityMaterial'
},
{
title
:
'附件'
,
id
:
'attachment'
},
]
}
effect=
{
<
Button
...
...
@@ -86,7 +196,11 @@ const QualityManageSrmAdded = (props: any) => {
<
Form
form=
{
form
}
{
...
layout
}
onFieldsChange=
{
()
=>
onFieldsChange
()
}
>
<
BasicInfo
/>
<
QualityMaterial
/>
<
Attachment
/>
<
Attachment
enclosureUrls=
{
urls
||
[]
}
getEnclosureUrls=
{
getEnclosureUrls
}
removeEnclosureUrls=
{
removeEnclosureUrls
}
/>
</
Form
>
}
/>
...
...
src/pages/quality/qualityManage/srm/components/attachment/index.tsx
View file @
f5d88a28
import
React
from
'react'
;
import
{
Col
,
Form
,
Row
}
from
'antd'
;
import
{
Col
,
Form
,
Input
,
Row
,
Space
}
from
'antd'
;
import
CardLayout
from
'@/components/CardLayout'
;
import
UploadFiles
from
'@/pages/transaction/components/uploadFiles'
;
...
...
@@ -23,7 +23,7 @@ const AttachmentLayout: React.FC<AttachmentLayoutProps> = (props: any) => {
>
<
Row
gutter=
{
[
24
,
24
]
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
name=
"
enclosureU
rls"
>
<
Form
.
Item
name=
"
u
rls"
>
<
UploadFiles
accept=
".doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx"
size=
{
20
}
...
...
src/pages/quality/qualityManage/srm/components/basicInfo/index.tsx
View file @
f5d88a28
import
React
,
{
useCallback
,
useContext
,
useEffect
,
useState
}
from
'react'
;
import
CardLayout
from
'@/components/CardLayout'
;
import
{
Col
,
DatePicker
,
Form
,
Input
,
message
,
Row
,
Select
,
Space
}
from
'antd'
;
import
{
Col
,
DatePicker
,
Form
,
Input
,
message
,
Row
,
Select
}
from
'antd'
;
import
{
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnType
}
from
'antd/lib/table'
;
import
styles
from
'./index.less'
;
...
...
@@ -9,14 +9,14 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
postMemberManageLowerProviderPage
}
from
'@/services/MemberV2Api'
;
import
{
AddedContext
}
from
'@/components/DetailLayout/components/context'
;
import
{
getOrderQualityGetQualityNo
}
from
'@/services/OrderNewV2Api
/id23791
'
;
import
{
getOrderQualityGetQualityNo
}
from
'@/services/OrderNewV2Api'
;
interface
BasicInfoLaoutProps
{
}
const
index
=
0
;
const
BasicInfoLaout
:
React
.
FC
<
BasicInfoLaoutProps
>
=
(
props
:
any
)
=>
{
const
id
=
null
const
form
=
useContext
(
AddedContext
);
const
{
form
,
dataSource
}
=
useContext
(
AddedContext
);
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
menberValue
,
setMenberValue
]
=
useState
<
any
[]
>
([]);
const
[
qualityNo
,
setQualityNo
]
=
useState
<
string
>
(
''
);
...
...
@@ -97,6 +97,12 @@ const BasicInfoLaout: React.FC<BasicInfoLaoutProps> = (props: any) => {
}
},
[
id
])
useEffect
(()
=>
{
if
(
dataSource
)
{
setQualityNo
(
dataSource
?.
qualityNo
)
}
},
[
dataSource
])
return
(
<
CardLayout
id=
'basicInfo'
...
...
@@ -105,7 +111,7 @@ const BasicInfoLaout: React.FC<BasicInfoLaoutProps> = (props: any) => {
bodyStyle=
{
{
paddingBottom
:
'0px'
}
}
classNames=
{
styles
[
'basic-layout'
]
}
>
<
Row
gutter=
{
[
16
,
1
6
]
}
>
<
Row
gutter=
{
[
16
,
3
6
]
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'质检单编号'
>
<
span
>
{
qualityNo
}
</
span
>
...
...
@@ -116,7 +122,7 @@ const BasicInfoLaout: React.FC<BasicInfoLaoutProps> = (props: any) => {
<
Form
.
Item
name=
'digest'
label=
'质检单摘要'
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
'请输入质检单摘要'
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'
t
ype'
label=
'质检类型'
rules=
{
[{
required
:
true
}]
}
>
<
Form
.
Item
name=
'
qualityT
ype'
label=
'质检类型'
rules=
{
[{
required
:
true
}]
}
>
<
Select
>
<
Select
.
Option
value=
{
1
}
>
来料质检
</
Select
.
Option
>
<
Select
.
Option
value=
{
2
}
>
样品质检
</
Select
.
Option
>
...
...
@@ -140,7 +146,6 @@ const BasicInfoLaout: React.FC<BasicInfoLaoutProps> = (props: any) => {
rules=
{
[{
required
:
true
}]
}
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
style=
{
{}
}
...
...
@@ -152,7 +157,6 @@ const BasicInfoLaout: React.FC<BasicInfoLaoutProps> = (props: any) => {
rules=
{
[{
required
:
true
}]
}
>
<
DatePicker
showTime
showNow=
{
false
}
allowClear
/>
...
...
src/pages/quality/qualityManage/srm/components/detectionDrawer/index.less
View file @
f5d88a28
...
...
@@ -32,6 +32,9 @@
margin-bottom: 0px;
}
}
.ant-input-number {
width: 100%;
}
}
.info {
...
...
src/pages/quality/qualityManage/srm/components/detectionDrawer/index.tsx
View file @
f5d88a28
This diff is collapsed.
Click to expand it.
src/pages/quality/qualityManage/srm/components/qualityMaterial/index.tsx
View file @
f5d88a28
This diff is collapsed.
Click to expand it.
src/pages/quality/qualityManage/srm/index.tsx
View file @
f5d88a28
import
React
from
'react'
;
import
React
,
{
useRef
}
from
'react'
;
import
TableLayout
from
'@/components/TableLayout'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
createTime
,
digest
,
endTime
,
operation
,
outerStatusName
,
qualityNo
,
receiveNo
,
startTime
,
qualityTypeName
,
vendorMemberName
}
from
'../columns'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
Button
,
Space
}
from
'antd'
;
import
{
Button
,
Popconfirm
,
Space
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
Link
,
history
}
from
'umi'
;
import
{
getOrderQualityGetSrmQualityOrderPage
}
from
'@/services/OrderNewV2Api'
import
{
getOrderQualityGetSrmQualityOrderPage
,
postOrderQualityDeleteById
,
postOrderQualitySubmit
}
from
'@/services/OrderNewV2Api'
const
QualityManageSrmTable
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
/** 提交 */
const
handleSubmit
=
(
id
)
=>
{
postOrderQualitySubmit
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
ref
.
current
.
reload
();
})
}
/** 删除 */
const
handleDelete
=
(
id
)
=>
{
postOrderQualityDeleteById
({
id
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
ref
.
current
.
reload
();
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
qualityNo
,
render
:
(
_text
)
=>
<
Link
to=
{
''
}
>
{
_text
}
</
Link
>
render
:
(
_text
,
record
)
=>
<
Link
to=
{
`srm/preview?id=${record?.id}`
}
>
{
_text
}
</
Link
>
},
{
...
digest
,
...
...
@@ -41,26 +60,31 @@ const QualityManageSrmTable: React.FC<{}> = () => {
},
{
...
operation
,
render
:
(
_text
,
record
)
=>
<>
<
Popconfirm
title=
'是否提交!'
okText=
'是'
cancelText=
'否'
onConfirm=
{
()
=>
handleSubmit
(
record
?.
id
)
}
>
<
Button
type=
'link'
>
提交
</
Button
>
</
Popconfirm
>
<
Button
type=
'link'
href=
{
`srm/edit?id=${record?.id}`
}
>
修改
</
Button
>
<
Popconfirm
title=
'是否删除!'
okText=
'是'
cancelText=
'否'
onConfirm=
{
()
=>
handleDelete
(
record
?.
id
)
}
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
</>
},
]
const
mockdata
=
[
{
id
:
1
,
qualityNo
:
'SPTY1233837739'
,
digest
:
'2014-07-01 进口头层黄牛皮荔枝纹质检单'
,
startTime
:
'2022-05-27'
,
endTime
:
'2022-05-27'
,
qualityTypeName
:
'收货质检'
,
receiveNo
:
'SH2014392853020'
,
vendorMemberName
:
'广州白马皮具交易中心'
,
createTime
:
'2022-05-27 14:41:41'
,
outerStatusName
:
'质检中'
}
]
return
(
<
TableLayout
reload=
{
ref
}
columns=
{
columns
}
effects=
"qualityNo"
schema=
{
{
...
...
src/pages/quality/qualitySynergy/detail/components/detectionDrawer/index.tsx
View file @
f5d88a28
...
...
@@ -8,6 +8,20 @@ export type DetectionType = {
qualityNo
:
string
,
/** 供应商 */
vendorMemberName
:
string
,
/** 检验方式 */
inspectionTypeName
:
string
,
/** 送检数量 */
submissionCount
:
number
,
/** 抽样数量 */
samplesCount
:
number
,
/** 让步接收数量 */
concessionToReceiveCount
:
number
,
/** 批次判定 */
batchJudgmentTypeName
:
string
,
/** 允收数量 */
acceptanceCount
:
number
,
/** 拒收数量 */
rejectCount
:
number
,
/** 质检单物料信息不良记录 */
qualityOrderProductBadRecordDetailVOS
:
object
[],
/** 质检单物料信息检验记录 */
...
...
src/pages/quality/qualitySynergy/detail/index.tsx
View file @
f5d88a28
...
...
@@ -10,6 +10,7 @@ import Attachment from '@/components/DetailLayout/components/generalLayout';
import
RecordLyout
from
'@/components/DetailLayout/components/listLayout'
;
import
DetectionDrawer
,
{
DetectionType
}
from
'./components/detectionDrawer'
;
import
SaleAfter
from
'./components/saleAfter'
;
import
{
getOrderQualityCollaborateDetail
,
getOrderQualityCollaborateGetInnerLog
}
from
'@/services/OrderNewV2Api'
;
type
saleInfoType
=
{
/**
...
...
@@ -22,6 +23,13 @@ type saleInfoType = {
orderType
?:
number
,
}
enum
TYPE
{
/** 生成B2B质检单 */
B2B
=
1
,
/** 生成SRM质检单 */
SRM
}
const
QualitySynergyDetail
=
(
props
)
=>
{
const
{
query
:
{
...
...
@@ -39,6 +47,7 @@ const QualitySynergyDetail = (props) => {
const
[
saleInfo
,
setSaleInfo
]
=
useState
<
saleInfoType
>
();
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
saleVisible
,
setSaleVisible
]
=
useState
<
boolean
>
(
false
);
const
[
type
,
setType
]
=
useState
<
number
>
(
TYPE
.
SRM
);
const
[
showDataSource
]
=
useState
([
{
id
:
1
,
name
:
intl
.
formatMessage
({
id
:
'purchaseOrder.showDataSourceName1'
})
},
{
id
:
2
,
name
:
intl
.
formatMessage
({
id
:
'purchaseOrder.showDataSourceName2'
})
},
...
...
@@ -74,6 +83,13 @@ const QualitySynergyDetail = (props) => {
const params: DetectionType = {
qualityNo: dataSource?.qualityNo,
vendorMemberName: dataSource?.vendorMemberName,
inspectionTypeName: record?.inspectionTypeName,
submissionCount: record?.submissionCount,
samplesCount: record?.samplesCount,
concessionToReceiveCount: record?.concessionToReceiveCount,
batchJudgmentTypeName: record?.batchJudgmentTypeName,
acceptanceCount: record?.acceptanceCount,
rejectCount: record?.rejectCount,
qualityOrderProductBadRecordDetailVOS: record?.qualityOrderProductBadRecordDetailVOS,
qualityOrderProductTestRecordDetailVOS: record?.qualityOrderProductTestRecordDetailVOS,
}
...
...
@@ -94,7 +110,7 @@ const QualitySynergyDetail = (props) => {
}
/** 质检物料/商品表头 */
const columns: ColumnType<any>[] = [
...((
path === 'preview'
) ? [
...((
type === TYPE.SRM
) ? [
{
title: '物料编号',
key: 'skuId',
...
...
@@ -199,12 +215,18 @@ const QualitySynergyDetail = (props) => {
dataIndex: 'rejectCount',
width: 96,
},
...((
path === 'detail'
) ? [
...((
type === TYPE.B2B
) ? [
{
title: '状态',
title: '
售后
状态',
key: 'afterSalesStatusName',
dataIndex: 'afterSalesStatusName',
width: 96,
},
{
title: '售后单号',
key: 'afterSalesNo',
dataIndex: 'afterSalesNo',
width: 96,
}
] : []),
{
...
...
@@ -212,13 +234,9 @@ const QualitySynergyDetail = (props) => {
key: 'operation',
dataIndex: 'operation',
fixed: 'right',
width:
path === 'detail' ? 180 :
160,
width: 160,
render: (_text, record) => <>
<Button type='link' onClick={() => handledetection(record)}>检验记录</Button>
{path === 'detail' && <>
{/* <Button type='link'>查看售后单</Button> */}
<Button type='link' onClick={() => handleGenerateSale(record)}>生成售后单</Button>
</>}
</>
},
...
...
@@ -286,142 +304,25 @@ const QualitySynergyDetail = (props) => {
])
}
useEffect(() => {
handleBasicEffect({
qualityNo: 'QC2014070100001',
digest: '2014-07-01进口头层黄牛皮荔枝纹质检单',
qualityTypeName: '收货质检',
vendorMemberName: '温州龙昌手袋有限公司',
startTime: '2014-07-01',
endTime: '2014-07-31',
qualityInspector: '张三',
remark: '质检如有退换,需要转售后处理',
receiveNo: 'SH2014070100001',
outerStatusName: '质检完成'
})
handleFileEffect([])
setDataSource({
qualityNo: 'QC2014070100001',
digest: '2014-07-01进口头层黄牛皮荔枝纹质检单',
qualityTypeName: '收货质检',
vendorMemberName: '温州龙昌手袋有限公司',
startTime: '2014-07-01',
endTime: '2014-07-31',
qualityInspector: '张三',
remark: '质检如有退换,需要转售后处理',
receiveNo: 'SH2014070100001',
outerStatusName: '质检完成',
urls: [],
qualityOrderProductVOS: [
{
id: '1',
orderProductId: '1',
skuId: 'Q89YTE1',
productName: '进口头层牛皮荔枝纹',
type: '红色/XL/厚1.5mm',
category: '头层牛皮',
brand: 'PELLE',
unit: '尺',
orderNo: 'DPTY12',
receiveCount: '10,000',
inspectionType: '',
inspectionTypeName: '全检',
submissionCount: '1,000',
samplesCount: '1,000',
batchJudgmentType: '',
batchJudgmentTypeName: '让步接收',
acceptanceCount: '1,000',
concessionToReceiveCount: '1,000',
rejectCount: '1,000',
afterSalesStatus: '',
afterSalesStatusName: '',
afterSalesNo: '',
qualityOrderProductBadRecordDetailVOS: [
{
id: '1',
badReasons: '外观破损缺陷',
badDescription: '破损情况',
measurements: '2',
badCount: '8',
receiptJudgmentType: '1',
receiptJudgmentTypeName: '拒收',
returnType: '1',
returnTypeName: '退扣',
handleType: '1',
handleTypeName: '维修',
remark: '唛头是否模糊不清',
},
{
id: '2',
badReasons: '外观破损缺陷',
badDescription: '包装唛头',
measurements: '2',
badCount: '8',
receiptJudgmentType: '1',
receiptJudgmentTypeName: '拒收',
returnType: '1',
returnTypeName: '退扣',
handleType: '1',
handleTypeName: '维修',
remark: '条码是否缺损,无法识别',
},
{
id: '3',
badReasons: '外观破损缺陷',
badDescription: '条码缺损',
measurements: '2',
badCount: '8',
receiptJudgmentType: '1',
receiptJudgmentTypeName: '让不接收',
returnType: '1',
returnTypeName: '退扣',
handleType: '1',
handleTypeName: '维修',
remark: '材料拉伸能力',
}
],
qualityOrderProductTestRecordDetailVOS: [
{
id: '1',
groupingId: '1',
grouping: '外观',
testItems: '包装唛头',
startValue: '2',
endValue: '8',
inspectionInstructions: '唛头是否模糊不清',
inspectionValue: '8',
remark: '唛头是否模糊不清',
inspectionJudgmentType: '',
inspectionJudgmentTypeName: '不合格',
},
{
id: '2',
groupingId: '1',
grouping: '外观',
testItems: '破损情况',
startValue: '2',
endValue: '8',
inspectionInstructions: '外观是否破损',
inspectionValue: '8',
remark: '外观破损',
inspectionJudgmentType: '',
inspectionJudgmentTypeName: '不合格',
},
{
id: '3',
groupingId: '1',
grouping: '性能',
testItems: '拉伸度',
startValue: '2',
endValue: '8',
inspectionInstructions: '材料拉伸能力',
inspectionValue: '8',
remark: '材料拉伸能力不足',
inspectionJudgmentType: '',
inspectionJudgmentTypeName: '不合格',
},
]
}
]
getOrderQualityCollaborateDetail({ id: id.toString() }).then(res => {
if (res.code !== 1000) {
return
}
const { data } = res;
handleBasicEffect({
qualityNo: data?.qualityNo,
digest: data?.digest,
qualityTypeName: data?.qualityTypeName,
vendorMemberName: data?.vendorMemberName,
startTime: data?.startTime,
endTime: data?.endTime,
qualityInspector: data?.qualityInspector,
remark: data?.remark,
receiveNo: data?.receiveNo,
outerStatusName: data?.outerStatusName,
})
setDataSource(data);
handleFileEffect(data?.urls || [])
})
}, [])
...
...
@@ -487,6 +388,8 @@ const QualitySynergyDetail = (props) => {
anchor="recordLyout"
title='流转记录'
columns={recordLyoutColumns}
id={Number(id)}
fetch={getOrderQualityCollaborateGetInnerLog}
/>
{/* 检验记录弹窗 */}
<DetectionDrawer
...
...
src/pages/quality/qualitySynergy/seach/index.tsx
View file @
f5d88a28
...
...
@@ -4,6 +4,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import
{
createTime
,
digest
,
endTime
,
outerStatusName
,
qualityNo
,
receiveNo
,
startTime
,
qualityTypeName
,
buyerMemberName
}
from
'../../qualityManage/columns'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
Link
,
history
}
from
'umi'
;
import
{
getOrderQualityCollaborateGetQualityOrderCollaboratePage
}
from
'@/services/OrderNewV2Api'
;
const
QualitySynergySearchTable
:
React
.
FC
<
{}
>
=
()
=>
{
...
...
@@ -38,21 +39,6 @@ const QualitySynergySearchTable: React.FC<{}> = () => {
},
]
const
mockdata
=
[
{
id
:
1
,
qualityNo
:
'SPTY1233837739'
,
digest
:
'2014-07-01 进口头层黄牛皮荔枝纹质检单'
,
startTime
:
'2022-05-27'
,
endTime
:
'2022-05-27'
,
qualityTypeName
:
'收货质检'
,
receiveNo
:
'SH2014392853020'
,
buyerMemberName
:
'广州白马皮具交易中心'
,
createTime
:
'2022-05-27 14:41:41'
,
outerStatusName
:
'质检中'
}
]
return
(
<
TableLayout
columns=
{
columns
}
...
...
@@ -138,7 +124,7 @@ const QualitySynergySearchTable: React.FC<{}> = () => {
}
}
}
}
fetch=
{
mockdata
}
fetch=
{
getOrderQualityCollaborateGetQualityOrderCollaboratePage
}
/>
)
}
...
...
src/pages/transaction/components/detailLayout/index.less
View file @
f5d88a28
...
...
@@ -31,11 +31,11 @@
}
.layout {
margin:
24
px;
margin:
16
px;
:global {
.ant-card {
margin-bottom:
24
px;
margin-bottom:
16
px;
.ant-card-head {
>.ant-card-head-wrapper {
...
...
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