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
968311d7
Commit
968311d7
authored
Nov 24, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
1b64ae16
ee9e16ad
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
289 additions
and
36 deletions
+289
-36
CustomRelevance.tsx
src/components/NiceForm/components/CustomRelevance.tsx
+1
-1
useBusinessEffects.ts
.../bills/components/BillsForm/effects/useBusinessEffects.ts
+0
-0
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+143
-27
index.ts
...ockSellStorage/bills/components/BillsForm/schema/index.ts
+144
-1
index.tsx
src/pages/transaction/stockSellStorage/inventory/index.tsx
+1
-7
No files found.
src/components/NiceForm/components/CustomRelevance.tsx
View file @
968311d7
...
...
@@ -42,7 +42,7 @@ const Relevance = props => {
fetchTableData
,
title
=
'选择'
,
tip
=
''
,
// 点击按钮前的提示,用于前提需要提示的场景
disabled
=
false
,
disabled
=
false
,
}
=
props
.
props
[
'x-component-props'
];
const
tableRowKey
=
tableProps
.
rowKey
||
'id'
;
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/useBusinessEffects.ts
View file @
968311d7
This diff is collapsed.
Click to expand it.
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
968311d7
...
...
@@ -274,7 +274,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
orderNo
,
id
:
+
relevanceInvoicesId
,
deliveryAddresId
:
+
deliveryAddresId
,
createMemberName
,
memberName
:
createMemberName
,
fullAddress
:
deliveryAddressInfo
.
fullAddress
||
''
,
receiverName
:
deliveryAddressInfo
.
receiverName
||
''
,
phone
:
deliveryAddressInfo
.
phone
||
''
,
...
...
@@ -292,7 +292,45 @@ const BillsForm: React.FC<BillsFormProps> = ({
// 加工入库单
case
DOC_TYPE_PROCESS_RECEIPT
:
{
setInfoLoading
(
true
);
PublicApi
.
getEnhanceSupplierToBeAddStorageDetails
({
id
:
relevanceInvoicesId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
const
{
processName
,
receiverAddressId
,
noticeNo
,
receiveAddress
,
receiveUserName
,
receiveUserTel
,
deliveryType
,
}
=
res
.
data
;
setBillInfo
({
invoicesTypeId
:
intInvoicesTypeId
,
relevanceInvoices
:
+
relevanceInvoices
,
orderNo
:
relevanceInvoicesId
?
[
{
orderNo
:
noticeNo
,
id
:
+
relevanceInvoicesId
,
deliveryAddresId
:
+
receiverAddressId
,
memberName
:
processName
,
fullAddress
:
receiveAddress
||
''
,
receiverName
:
receiveUserName
||
''
,
phone
:
receiveUserTel
||
''
,
}
]
:
[]
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
break
;
}
...
...
@@ -325,11 +363,10 @@ const BillsForm: React.FC<BillsFormProps> = ({
orderNo
:
noticeNo
,
id
:
+
relevanceInvoicesId
,
deliveryAddresId
:
+
receiverAddressId
,
supplierName
,
memberName
:
supplierName
,
fullAddress
:
receiveAddress
||
''
,
receiverName
:
receiveUserName
||
''
,
phone
:
receiveUserTel
||
''
,
// isDefault: deliveryAddressInfo.isDefault,
}
]
:
[]
...
...
@@ -399,6 +436,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
</
Button
>
)
:
null
;
// 提交
const
handleSubmit
=
value
=>
{
const
{
invoicesTypeId
,
...
...
@@ -421,14 +459,6 @@ const BillsForm: React.FC<BillsFormProps> = ({
}));
const
newTransactionTime
=
transactionTime
?
moment
(
transactionTime
).
valueOf
()
:
null
;
const
payload
=
{
orderNo
:
orderNo
[
0
].
orderNo
,
relevanceInvoicesId
:
orderNo
[
0
].
id
,
transactionTime
:
newTransactionTime
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
,
...
rest
,
};
setSubmitLoading
(
true
);
switch
(
invoicesTypeId
)
{
// 采购入库单
...
...
@@ -438,7 +468,14 @@ const BillsForm: React.FC<BillsFormProps> = ({
return
;
}
PublicApi
.
postOrderPurchaseReceiptAdd
({
...
payload
,
...
rest
,
orderNo
:
orderNo
[
0
].
orderNo
,
relevanceInvoicesId
:
orderNo
[
0
].
id
,
transactionTime
:
newTransactionTime
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
.
map
(
item
=>
({
...
item
,
itemNmae
:
item
.
itemName
,
})),
supplyMembersName
:
memberName
,
})
.
then
(
res
=>
{
...
...
@@ -459,11 +496,14 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
PublicApi
.
postWarehouseInvoicesUpdata
({
id
:
+
id
,
invoicesAbstract
:
payload
.
invoicesAbstract
,
inventoryId
:
payload
.
inventoryId
,
inventoryRole
:
payload
.
inventoryRole
,
transactionTime
:
payload
.
transactionTime
,
invoicesDetailsRequests
:
payload
.
invoicesDetailsRequests
,
invoicesAbstract
:
rest
.
invoicesAbstract
,
inventoryId
:
rest
.
inventoryId
,
inventoryRole
:
rest
.
inventoryRole
,
transactionTime
:
newTransactionTime
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
.
map
(
item
=>
({
...
item
,
itemNmae
:
item
.
itemName
,
})),
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
...
...
@@ -487,7 +527,14 @@ const BillsForm: React.FC<BillsFormProps> = ({
return
;
}
PublicApi
.
postOrderSalesInvoiceOrder
({
...
payload
,
...
rest
,
orderNo
:
orderNo
[
0
].
orderNo
,
relevanceInvoicesId
:
orderNo
[
0
].
id
,
transactionTime
:
newTransactionTime
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
.
map
(
item
=>
({
...
item
,
itemNmae
:
item
.
itemName
,
})),
createMemberName
:
memberName
,
})
.
then
(
res
=>
{
...
...
@@ -508,11 +555,14 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
PublicApi
.
postWarehouseInvoicesUpdata
({
id
:
+
id
,
invoicesAbstract
:
payload
.
invoicesAbstract
,
inventoryId
:
payload
.
inventoryId
,
inventoryRole
:
payload
.
inventoryRole
,
transactionTime
:
payload
.
transactionTime
,
invoicesDetailsRequests
:
payload
.
invoicesDetailsRequests
,
invoicesAbstract
:
rest
.
invoicesAbstract
,
inventoryId
:
rest
.
inventoryId
,
inventoryRole
:
rest
.
inventoryRole
,
transactionTime
:
newTransactionTime
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
.
map
(
item
=>
({
...
item
,
itemNmae
:
item
.
itemName
,
})),
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
...
...
@@ -531,13 +581,79 @@ const BillsForm: React.FC<BillsFormProps> = ({
// 加工入库单
case
DOC_TYPE_PROCESS_RECEIPT
:
{
if
(
!
id
)
{
if
(
isEdit
)
{
return
;
}
PublicApi
.
postEnhanceSupplierToBeAddStorageSubmit
({
produceNoticeOrderId
:
orderNo
[
0
].
id
,
warehouseId
:
rest
.
inventoryId
,
warehouseRole
:
rest
.
inventoryRole
,
storageSummary
:
rest
.
invoicesAbstract
,
storageTime
:
newTransactionTime
,
storageDetailsDTOList
:
newInvoicesDetailsRequests
.
map
(
item
=>
({
...
item
,
produceNoticeOrderDetailId
:
item
.
id
,
storageCount
:
item
.
productCount
,
})),
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setUnsaved
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
else
{
// update action
if
(
!
isEdit
)
{
return
;
}
}
break
;
}
// 加工发货单
case
DOC_TYPE_PROCESS_INVOICE
:
{
if
(
!
id
)
{
if
(
isEdit
)
{
return
;
}
PublicApi
.
postEnhanceProcessToBeAddDeliverySubmit
({
produceNoticeOrderId
:
orderNo
[
0
].
id
,
warehouseId
:
rest
.
inventoryId
,
warehouseRole
:
rest
.
inventoryRole
,
invoiceSummary
:
rest
.
invoicesAbstract
,
invoiceTime
:
newTransactionTime
,
invoiceDetailsDTOList
:
newInvoicesDetailsRequests
.
map
(
item
=>
({
...
item
,
produceNoticeOrderDetailId
:
item
.
id
,
shipmentQuantity
:
item
.
productCount
,
})),
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setUnsaved
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
else
{
// update action
if
(
!
isEdit
)
{
return
;
}
}
break
;
}
...
...
@@ -582,7 +698,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
const
atom
=
{
itemNo
:
item
.
code
,
goodsId
:
item
.
id
,
itemN
ma
e
:
item
.
name
,
itemN
am
e
:
item
.
name
,
specifications
:
item
.
type
,
category
:
item
.
customerCategory
?
item
.
customerCategory
.
name
:
''
,
brand
:
item
.
brand
?
item
.
brand
.
name
:
''
,
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/schema/index.ts
View file @
968311d7
...
...
@@ -419,7 +419,7 @@ export const addBillSchema: ISchema = {
title
:
'货号'
,
'x-component'
:
'Text'
,
},
itemN
ma
e
:
{
itemN
am
e
:
{
type
:
'string'
,
title
:
'货品名称'
,
'x-component'
:
'Text'
,
...
...
@@ -508,6 +508,16 @@ export const addBillSchema: ISchema = {
type
:
'string'
,
display
:
false
,
},
// 明细 商品记录id(加工发货单需要),不用于展示,只收集值
id
:
{
type
:
'string'
,
display
:
false
,
},
// 订单号(加工发货单需要),不用于展示,只收集值
orderNo
:
{
type
:
'string'
,
display
:
false
,
},
},
}
},
...
...
@@ -520,6 +530,7 @@ export const addBillSchema: ISchema = {
},
};
// 采购入库单、销售发货单订单 弹窗 search schema
export
const
purchaseOrderBillSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -608,6 +619,138 @@ export const purchaseOrderBillSchema: ISchema = {
},
};
// 加工入库单 弹窗 search schema
export
const
machiningWarehousingBillSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
properties
:
{
search
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-start'
,
tip
:
'输入 通知单号 进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
3
,
},
properties
:
{
summary
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'通知单摘要'
,
allowClear
:
true
,
},
},
processName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'加工企业'
,
allowClear
:
true
,
},
},
'[startTime, endTime]'
:
{
type
:
'string'
,
'x-component'
:
'DateSelect'
,
'x-component-props'
:
{
placeholder
:
'单据时间'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
}
}
},
},
},
},
},
};
// 加工发货单 弹窗 search schema
export
const
machiningDeliveryBillSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
properties
:
{
search
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-start'
,
tip
:
'输入 通知单号 进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
3
,
},
properties
:
{
summary
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'通知单摘要'
,
allowClear
:
true
,
},
},
supplierName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'供应会员'
,
allowClear
:
true
,
},
},
'[startTime, endTime]'
:
{
type
:
'string'
,
'x-component'
:
'DateSelect'
,
'x-component-props'
:
{
placeholder
:
'单据时间'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
}
}
},
},
},
},
},
};
export
const
goodsSearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
src/pages/transaction/stockSellStorage/inventory/index.tsx
View file @
968311d7
...
...
@@ -42,13 +42,7 @@ const Inventory: React.FC<{}> = () => {
title
:
'商品名称'
,
dataIndex
:
'goodsName'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/repositories/viewRepository?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
),
render
:
(
text
:
any
,
record
:
any
)
=>
text
,
},
{
title
:
'规格型号'
,
...
...
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