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
linweijiong
jinfa-platform
Commits
18e6f80a
Commit
18e6f80a
authored
Nov 29, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 采购能力翻译
parent
1b89b454
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
417 additions
and
276 deletions
+417
-276
zh-CN.ts
src/locales/zh-CN.ts
+2
-0
menu.ts
src/locales/zh-CN/menu.ts
+124
-6
purchase.ts
src/locales/zh-CN/purchase.ts
+0
-0
index.tsx
...callForBids/addNewBid/components/publicBidModal/index.tsx
+9
-5
index.tsx
...orBids/addNewBid/components/relevanceGoodDrawer/index.tsx
+24
-21
index.tsx
...ages/procurement/callForBids/addNewBid/constant/index.tsx
+22
-19
index.tsx
src/pages/procurement/callForBids/addNewBid/index.tsx
+0
-0
useMaterialTable.tsx
...curement/callForBids/addNewBid/model/useMaterialTable.tsx
+5
-4
add.tsx
...action/purchaseAbility/demandPlan/demandPlanAdded/add.tsx
+7
-7
basicInfo.tsx
...ility/demandPlan/demandPlanAdded/components/basicInfo.tsx
+10
-9
material.tsx
...bility/demandPlan/demandPlanAdded/components/material.tsx
+26
-25
selectProduct.tsx
...y/demandPlan/demandPlanAdded/components/selectProduct.tsx
+11
-10
index.tsx
...tion/purchaseAbility/demandPlan/demandPlanAdded/index.tsx
+15
-14
index.tsx
...action/purchaseAbility/demandPlan/demandPlanOne/index.tsx
+10
-11
index.tsx
...ion/purchaseAbility/demandPlan/demandPlanSearch/index.tsx
+8
-8
index.tsx
...ion/purchaseAbility/demandPlan/demandPlanSubmit/index.tsx
+11
-10
index.tsx
...action/purchaseAbility/demandPlan/demandPlanTwo/index.tsx
+10
-10
index.tsx
...s/transaction/purchaseAbility/demandPlan/detail/index.tsx
+18
-16
add.tsx
...ages/transaction/purchaseAbility/offter/addOffter/add.tsx
+8
-8
basic.tsx
...ion/purchaseAbility/offter/addOffter/components/basic.tsx
+11
-10
explain.tsx
...n/purchaseAbility/offter/addOffter/components/explain.tsx
+2
-1
file.tsx
...tion/purchaseAbility/offter/addOffter/components/file.tsx
+2
-1
offer.tsx
...ion/purchaseAbility/offter/addOffter/components/offer.tsx
+2
-1
index.tsx
...es/transaction/purchaseAbility/offter/addOffter/index.tsx
+17
-17
crossSellProducts.tsx
...chaseAbility/offter/addOffter/modal/crossSellProducts.tsx
+23
-22
selectProduct.tsx
.../purchaseAbility/offter/addOffter/modal/selectProduct.tsx
+12
-11
index.ts
src/pages/transaction/purchaseAbility/schema/index.ts
+28
-30
No files found.
src/locales/zh-CN.ts
View file @
18e6f80a
...
...
@@ -6,6 +6,7 @@ import shop from './zh-CN/shop'
import
priceManage
from
'./zh-CN/priceManage'
import
classAndProperty
from
'./zh-CN/classAndProperty'
import
member
from
'./zh-CN/member'
import
purchase
from
'./zh-CN/purchase'
export
default
{
'global.siteName'
:
'瓴犀'
,
...
...
@@ -17,4 +18,5 @@ export default {
...
priceManage
,
...
classAndProperty
,
...
member
,
...
purchase
,
}
src/locales/zh-CN/menu.ts
View file @
18e6f80a
...
...
@@ -688,12 +688,6 @@ export default {
'menu.balance.accountsReceivable.invoice'
:
'开票管理'
,
'menu.balance.settleRules.memberSettleDetailEdit'
:
'编辑会员结算策略'
,
// 采购能力
'menu.procurementAbility'
:
'采购能力'
,
'menu.procurementAbility.callForBids'
:
'招标'
,
'menu.procurementAbility.callForBids.callForBidsSearch'
:
'招标查询'
,
'menu.procurementAbility.purchaseInquiry'
:
'采购询价'
,
// 营销能力
'menu.marketingAbility'
:
'营销能力'
,
'menu.marketingAbility.merchantCoupon'
:
'商家优惠劵管理'
,
...
...
@@ -714,4 +708,128 @@ export default {
'menu.marketingAbility.merchantCoupon.analysis'
:
'商家优惠劵执行'
,
'menu.marketingAbility.merchantCoupon.analysisDetail'
:
'查看商家优惠劵执行'
,
'menu.marketingAbility.merchantCoupon.analysisDeliver'
:
'商家优惠劵发券'
,
// 1.采购门户 -> menu
'menu.procurementAbility.purchasDoor'
:
'采购门户'
,
// 创建采购门户 -> page
'menu.procurementAbility.purchasDoor.purchasInfo'
:
'创建采购门户'
,
'purchasDoor.purchasInfo.save'
:
'保存'
,
'purchasDoor.purchasInfo.basicInfo'
:
'基本信息'
,
'purchasDoor.purchasInfo.swiper'
:
'首页轮播图'
,
'purchasDoor.purchasInfo.attributRegion'
:
'归属地市'
,
'purchasDoor.purchasInfo.logo'
:
'公司LOGO'
,
'purchasDoor.purchasInfo.profile'
:
'公司简介'
,
'purchasDoor.purchasInfo.photo'
:
'公司照片'
,
'purchasDoor.purchasInfo.glory'
:
'资质荣誉'
,
'purchasDoor.purchasInfo.adImage'
:
'采购门户广告图'
,
'purchasDoor.purchasInfo.album'
:
'宣传画册'
,
'purchasDoor.purchasInfo.links'
:
'门户链接'
,
// 采购门户SEO设置 -> page
'menu.procurementAbility.purchasDoor.purchasSeo'
:
'采购门户SEO设置'
,
'purchasDoor.purchasSeo.added'
:
'新建'
,
'purchasDoor.purchasSeo.name'
:
'页面名称'
,
'purchasDoor.purchasSeo.links'
:
'访问链接'
,
'purchasDoor.purchasSeo.status'
:
'状态'
,
'purchasDoor.purchasSeo.operate'
:
'操作'
,
'purchasDoor.purchasSeo.basicInfo'
:
'基本信息'
,
'purchasDoor.purchasSeo.title'
:
'标题'
,
'purchasDoor.purchasSeo.describe'
:
'描述'
,
'purchasDoor.purchasSeo.keyword'
:
'关键字'
,
// 2.采购计划管理 -> menu
'menu.procurementAbility.purchasePlan'
:
'采购计划管理'
,
'menu.procurementAbility.purchasePlan.demandPlanSummary'
:
'待汇总需求计划'
,
'menu.procurementAbility.purchasePlan.purchasePlanSearch'
:
'采购计划查询'
,
'menu.procurementAbility.purchasePlan.purchasePlanSubmit'
:
'待提交审核采购计划'
,
'menu.procurementAbility.purchasePlan.purchasePlanOne'
:
'待审核采购计划(一级)'
,
'menu.procurementAbility.purchasePlan.purchasePlanTwo'
:
'待审核采购计划(二级)'
,
'menu.procurementAbility.purchasePlan.purchasePlanPerform'
:
'待执行采购计划'
,
// 3.需求计划管理 -> menu
'menu.procurementAbility.demandPlan'
:
'需求计划管理'
,
'menu.procurementAbility.demandPlan.demandPlanSearch'
:
'需求计划查询'
,
'menu.procurementAbility.demandPlan.demandPlanAdded'
:
'待新增需求计划'
,
'menu.procurementAbility.demandPlan.demandPlanOne'
:
'待审核需求计划(一级)'
,
'menu.procurementAbility.demandPlan.demandPlanTwo'
:
'待审核需求计划(二级)'
,
'menu.procurementAbility.demandPlan.demandPlanSubmit'
:
'待提交需求计划'
,
// 4.投标 -> menu
'menu.procurementAbility.tender'
:
'投标'
,
'menu.procurementAbility.tender.callForBidsSearch'
:
'招标查询'
,
'menu.procurementAbility.tender.tenderSearch'
:
'投标查询'
,
'menu.procurementAbility.tender.readyBidRegister'
:
'待招标报名'
,
'menu.procurementAbility.tender.readyQualifityChecked'
:
'待提交资格预审'
,
'menu.procurementAbility.tender.readyAddTender'
:
'待新建投标'
,
'menu.procurementAbility.tender.firstCheckedTender'
:
'待审核投标(一级)'
,
'menu.procurementAbility.tender.secondCheckedTender'
:
'待审核投标(二级)'
,
'menu.procurementAbility.tender.readySubmitTender'
:
'待提交投标'
,
// 5.招标 -> menu
'menu.procurementAbility.callForBids'
:
'招标'
,
'menu.procurementAbility.callForBids.callForBidsSearch'
:
'招标查询'
,
'menu.procurementAbility.callForBids.tenderSearch'
:
'投标查询'
,
'menu.procurementAbility.callForBids.readyAddBid'
:
'待新增招标'
,
'menu.procurementAbility.callForBids.firstCheckedBid'
:
'待审核招标(一级)'
,
'menu.procurementAbility.callForBids.secondCheckedBid'
:
'待审核招标(二级)'
,
'menu.procurementAbility.callForBids.readySubmitBid'
:
'待提交招标'
,
'menu.procurementAbility.callForBids.readyCheckedRegister'
:
'待审核报名'
,
'menu.procurementAbility.callForBids.readyQualifityChecked'
:
'待资格预审'
,
'menu.procurementAbility.callForBids.readyExpertRemark'
:
'待专家评标'
,
'menu.procurementAbility.callForBids.readyConfirmBid'
:
'待定标'
,
'menu.procurementAbility.callForBids.readyCheckedConfirmFirst'
:
'待审核定标(一级)'
,
'menu.procurementAbility.callForBids.readyCheckedConfirmSecond'
:
'待审核定标(二级)'
,
'menu.procurementAbility.callForBids.readyPassBid'
:
'待确认定标'
,
'menu.procurementAbility.callForBids.readySendBidNotice'
:
'待发中标公示'
,
'menu.procurementAbility.callForBids.remarkBidTemplate'
:
'评标模板'
,
'menu.procurementAbility.callForBids.remarkBidExpert'
:
'评标专家库'
,
'menu.procurementAbility.callForBids.remarkBidCommittee'
:
'专家抽取管理'
,
'menu.procurementAbility.callForBids.extractNoticeManage'
:
'专家抽取通知管理'
,
'menu.procurementAbility.callForBids.readySubmitReport'
:
'待提交评标报告'
,
// 6.采购询价 -> menu
'menu.procurementAbility.purchaseInquiry'
:
'采购询价'
,
'menu.procurementAbility.purchaseInquiry.inquiry'
:
'采购需求单查询'
,
'menu.procurementAbility.purchaseInquiry.addInquiry'
:
'待新增采购需求单'
,
'menu.procurementAbility.purchaseInquiry.auditInquiryOne'
:
'待审核采购需求单(一级)'
,
'menu.procurementAbility.purchaseInquiry.auditInquiryTwo'
:
'待审核采购需求单(二级)'
,
'menu.procurementAbility.purchaseInquiry.submitInquiry'
:
'待提交采购需求单'
,
// 7.采购询价报价 -> menu
'menu.procurementAbility.offter'
:
'采购询价报价'
,
'menu.procurementAbility.offter.inquiry'
:
'采购需求单查询'
,
'menu.procurementAbility.offter.offter'
:
'报价单查询'
,
'menu.procurementAbility.offter.addOffter'
:
'待新增报价单'
,
'menu.procurementAbility.offter.auditOffterOne'
:
'待审核报价单(一级)'
,
'menu.procurementAbility.offter.auditOffterTwo'
:
'待审核报价单(二级)'
,
'menu.procurementAbility.offter.submitOffter'
:
'待提交报价单'
,
// 8.确认报价 -> menu
'menu.procurementAbility.confirmOffer'
:
'确认报价'
,
'menu.procurementAbility.confirmOffer.offerInquire'
:
'报价查询'
,
'menu.procurementAbility.confirmOffer.toComparePrices'
:
'待比价'
,
'menu.procurementAbility.confirmOffer.auditResultsOne'
:
'待审核授标结果(一级)'
,
'menu.procurementAbility.confirmOffer.auditResultsTwo'
:
'待审核授标结果(二级)'
,
'menu.procurementAbility.confirmOffer.confirmResults'
:
'待确认授标结果'
,
// 9. 采购竞价 -> menu
'menu.procurementAbility.purchaseBid'
:
'采购竞价'
,
'menu.procurementAbility.purchaseBid.search'
:
'采购竞价单查询'
,
'menu.procurementAbility.purchaseBid.readyAdd'
:
'待新增采购竞价单'
,
'menu.procurementAbility.purchaseBid.readyExamineOne'
:
'待审核采购竞价单一级'
,
'menu.procurementAbility.purchaseBid.readyExamineTwo'
:
'待审核采购竞价单(二级)'
,
'menu.procurementAbility.purchaseBid.readySubmit'
:
'待提交采购竞价单'
,
'menu.procurementAbility.purchaseBid.readyExamineSignUp'
:
'待审核竞价报名'
,
'menu.procurementAbility.purchaseBid.readyBid'
:
'待竞价'
,
'menu.procurementAbility.purchaseBid.readySubmitExamineResult'
:
'待提交审核竞价结果'
,
'menu.procurementAbility.purchaseBid.readyExamineResultOne'
:
'待审核竞价结果(一级)'
,
'menu.procurementAbility.purchaseBid.readyExamineResultTwo'
:
'待审核竞价结果(二级)'
,
'menu.procurementAbility.purchaseBid.readyConfirm'
:
'待确认竞价结果'
,
// 10.在线竞价 -> menu
'menu.procurementAbility.onlineBid'
:
'在线竞价'
,
'menu.procurementAbility.onlineBid.search'
:
'采购竞价单查询'
,
'menu.procurementAbility.onlineBid.readySignUp'
:
'待竞价报名'
,
'menu.procurementAbility.onlineBid.readyBid'
:
'待竞价'
,
// 11.采购请购单 -> menu
'menu.procurementAbility.purchaseRequisition'
:
'采购请购单'
,
'menu.procurementAbility.purchaseRequisition.purchaseRequisitionList'
:
'采购请购单查询'
,
'menu.procurementAbility.purchaseRequisition.readyAddBill'
:
'待新增请购单'
,
'menu.procurementAbility.purchaseRequisition.firstApprovedBill'
:
'待审核请购单 一级'
,
'menu.procurementAbility.purchaseRequisition.secondApprovedBill'
:
'待审核请购单 二级'
,
'menu.procurementAbility.purchaseRequisition.readySubmitBill'
:
'待提交请购单'
,
// 12.请购单转采购订单 -> menu
'menu.procurementAbility.requisitionOrder'
:
'请购单转采购订单'
,
'menu.procurementAbility.requisitionOrder.readyRequisitionOrder'
:
'待请购单转采购订单'
,
};
src/locales/zh-CN/purchase.ts
View file @
18e6f80a
This diff is collapsed.
Click to expand it.
src/pages/procurement/callForBids/addNewBid/components/publicBidModal/index.tsx
View file @
18e6f80a
...
...
@@ -10,6 +10,7 @@ import BASE_CONFIG from '../../../../../../../config/base.config.json'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
omit
}
from
'@/utils'
import
{
postContractContractSignSaleSignContractCreate
}
from
'@/services/ContractV2Api'
import
{
useIntl
}
from
'umi'
;
const
shopInfo
=
BASE_CONFIG
.
web
.
shopInfo
...
...
@@ -23,20 +24,23 @@ const schemaActions = createFormActions()
const
{
pageStatus
}
=
usePageStatus
()
// 公开招标方式 发布商城弹窗
const
PublicBidModal
:
React
.
FC
<
PublicBidModalProps
>
=
(
props
)
=>
{
const
PublicBidModal
:
React
.
FC
<
PublicBidModalProps
>
=
(
props
)
=>
{
const
intl
=
useIntl
();
const
{
currentRef
,
pageAction
,
...
restProps
}
=
props
const
{
data
}
=
useContext
(
BidDetailContext
)
const
{
run
,
loading
}
=
useHttpRequest
(
postContractContractSignSaleSignContractCreate
,
{
ctlType
:
'none'
})
const
{
run
,
loading
}
=
useHttpRequest
(
postContractContractSignSaleSignContractCreate
,
{
ctlType
:
'none'
})
const
handleSubmit
=
async
(
value
)
=>
{
const
{
publishShop
}
=
value
const
result
=
shopInfo
.
filter
(
item
=>
publishShop
.
includes
(
item
.
id
))
if
(
pageStatus
===
PageStatus
.
ADD
)
if
(
pageStatus
===
PageStatus
.
ADD
)
pageAction
.
setFieldValue
(
'inviteTenderShopList'
,
result
.
map
(
item
=>
{
item
.
shopId
=
item
[
'id'
]
return
omit
(
item
,
[
'id'
])
}))
else
if
(
pageStatus
===
PageStatus
.
EDIT
)
else
if
(
pageStatus
===
PageStatus
.
EDIT
)
pageAction
.
setFieldValue
(
'inviteTenderShopList'
,
result
)
currentRef
.
current
.
setVisible
(
false
)
}
...
...
@@ -54,7 +58,7 @@ const PublicBidModal:React.FC<PublicBidModalProps> = (props) => {
return
(
<
ModalForm
modalTitle=
'公开招标'
modalTitle=
{
intl
.
formatMessage
({
id
:
'detail.purchase.modalTitle'
})
}
previewPlaceholder=
' '
currentRef=
{
currentRef
}
schema=
{
publicBidModalSchema
}
...
...
src/pages/procurement/callForBids/addNewBid/components/relevanceGoodDrawer/index.tsx
View file @
18e6f80a
...
...
@@ -17,6 +17,7 @@ import { searchBrandOptionEffect, searchCustomerCategoryOptionEffect } from '../
import
{
treeReduction
}
from
'@/utils'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
getProductCustomerGetCustomerCategoryTree
,
getProductGoodsGetGoodsList
,
getProductSelectGetSelectBrand
,
getProductSelectGetSelectCnUnit
}
from
'@/services/ProductV2Api'
import
{
useIntl
}
from
'umi'
export
interface
RelevanceGoodDrawerProps
{
type
?:
'radio'
|
'checkbox'
,
...
...
@@ -30,7 +31,7 @@ export interface RelevanceGoodDrawerProps {
// const formActions = createFormActions();
export
const
RelevanceGoodDrawer
:
React
.
FC
<
RelevanceGoodDrawerProps
>
=
({
export
const
RelevanceGoodDrawer
:
React
.
FC
<
RelevanceGoodDrawerProps
>
=
({
type
=
'checkbox'
,
title
,
schemaAction
,
...
...
@@ -41,12 +42,14 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
...
restProps
})
=>
{
const
intl
=
useIntl
();
const
cacheRef
=
useRef
({
categorys
:
[],
units
:
[]
})
const
{
pageStatus
}
=
usePageStatus
()
const
{
visible
,
setVisible
}
=
useModalTable
({
type
,
customKey
:
'id'
})
const
{
visible
,
setVisible
}
=
useModalTable
({
type
,
customKey
:
'id'
})
const
[
childVisible
,
setChildVisible
]
=
useState
<
boolean
>
(
false
)
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 子级抽屉选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
...
...
@@ -82,32 +85,32 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
// 选择货品的列
const
columns
=
[
{
title
:
'货号'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.code'
})
,
dataIndex
:
'code'
,
key
:
'code'
,
},
{
title
:
'货品名称'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.productName'
})
,
dataIndex
:
'name'
,
key
:
'name'
,
},
{
title
:
'规格型号'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.type'
})
,
dataIndex
:
'type'
,
key
:
'type'
,
},
{
title
:
'品类'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.customerCategory'
})
,
dataIndex
:
[
'customerCategory'
,
'name'
],
key
:
'customerCategory'
,
},
{
title
:
'品牌'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.brand'
})
,
dataIndex
:
[
'brand'
,
'name'
],
key
:
'brand'
,
},
{
title
:
'单位'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.unitName'
})
,
dataIndex
:
'unitName'
,
key
:
'unit'
,
}
...
...
@@ -116,15 +119,15 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
// 父级抽屉提交 @通过code判断唯一性
const
confirmSubmit
=
()
=>
{
schemaAction
.
validate
().
then
((
res
)
=>
{
if
(
res
[
'errors'
][
'length'
]
===
0
)
{
if
(
res
[
'errors'
][
'length'
]
===
0
)
{
schemaAction
.
submit
(
v
=>
{
const
origin
=
pageAction
.
getFieldValue
(
'materielList'
)
||
[]
const
isEdit
=
pageAction
.
getFieldValue
(
'isEdit'
)
console
.
log
(
v
,
'vv'
,
origin
,
isEdit
)
if
(
isEdit
)
{
pageAction
.
setFieldValue
(
'materielList'
,
origin
.
map
(
item
=>
item
.
code
===
v
.
code
?
({
...
item
,
...
v
})
:
item
))
if
(
isEdit
)
{
pageAction
.
setFieldValue
(
'materielList'
,
origin
.
map
(
item
=>
item
.
code
===
v
.
code
?
({
...
item
,
...
v
})
:
item
))
}
else
{
pageAction
.
setFieldValue
(
'materielList'
,
origin
.
concat
([{
...
v
}]))
pageAction
.
setFieldValue
(
'materielList'
,
origin
.
concat
([{
...
v
}]))
}
}).
then
(()
=>
setVisible
(
false
))
}
...
...
@@ -142,11 +145,11 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
()
=>
setVisible
(
false
)
}
style=
{
{
marginRight
:
8
}
}
>
取消
<
Button
onClick=
{
()
=>
setVisible
(
false
)
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.cancel'
})
}
</
Button
>
<
Button
onClick=
{
confirmSubmit
}
type=
"primary"
>
确定
{
intl
.
formatMessage
({
id
:
'detail.purchase.confirm'
})
}
</
Button
>
</
div
>)
...
...
@@ -189,7 +192,7 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
}
// 选择货品
const
connectGood
=
<
div
className=
'connectBtn'
onClick=
{
selectGoods
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
const
connectGood
=
<
div
className=
'connectBtn'
onClick=
{
selectGoods
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
const
beforeUpload
=
file
=>
{
if
(
file
.
size
/
1024
/
1024
>
20
)
{
...
...
@@ -208,7 +211,7 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
dataIdList=
{
dataIdList
}
footer=
{
footer
}
onClose=
{
onClose
}
isForm
=
{
true
}
isForm
=
{
true
}
actions=
{
schemaAction
}
effects=
{
(
$
,
ctx
)
=>
{
ctx
.
reset
()
...
...
@@ -223,16 +226,16 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
})
$
(
'onFieldValueChange'
,
'unitId'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
if
(
value
&&
pageStatus
!==
PageStatus
.
EDIT
)
{
if
(
value
&&
pageStatus
!==
PageStatus
.
EDIT
)
{
let
_v
=
cacheRef
.
current
.
units
.
filter
(
item
=>
item
.
id
===
value
)[
0
][
'name'
]
ctx
.
setFieldValue
(
'unitName'
,
_v
)
}
})
$
(
'onFieldValueChange'
,
'categoryId'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
if
(
value
.
length
&&
pageStatus
!==
PageStatus
.
EDIT
)
{
if
(
value
.
length
&&
pageStatus
!==
PageStatus
.
EDIT
)
{
console
.
log
(
cacheRef
.
current
.
categorys
,
value
)
let
_v
=
treeReduction
(
cacheRef
.
current
.
categorys
)[
value
[
value
.
length
-
1
]][
'title'
]
let
_v
=
treeReduction
(
cacheRef
.
current
.
categorys
)[
value
[
value
.
length
-
1
]][
'title'
]
ctx
.
setFieldValue
(
'categoryName'
,
_v
)
}
})
...
...
@@ -253,7 +256,7 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
reloadFields=
{
[
'categoryId'
]
}
>
<
DrawerTable
drawerTitle=
'选择货品'
drawerTitle=
{
intl
.
formatMessage
({
id
:
'detail.purchase.modalTitle1'
})
}
confirm=
{
onConfirm
}
cancel=
{
()
=>
setChildVisible
(
false
)
}
visible=
{
childVisible
}
...
...
src/pages/procurement/callForBids/addNewBid/constant/index.tsx
View file @
18e6f80a
...
...
@@ -2,6 +2,9 @@ import React from 'react'
import
moment
from
'moment'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
BidInStateTexts
,
BidOutStateTexts
}
from
'@/constants/procurement'
import
{
useIntl
}
from
'umi'
;
const
intl
=
useIntl
();
/** 时间转时间戳 */
export
const
dataChangeUnix
=
(
t
)
=>
moment
(
t
).
valueOf
()
...
...
@@ -204,70 +207,70 @@ export const materialInfoColumns: any[] = [
className
:
'commonHide'
,
},
{
title
:
'物料编号'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.materialCode'
})
,
dataIndex
:
'code'
,
align
:
'center'
,
key
:
'code'
,
},
{
title
:
'物料名称'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.materialName'
})
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
},
{
title
:
'规格型号'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.type'
})
,
dataIndex
:
'type'
,
align
:
'center'
,
key
:
'type'
,
},
{
title
:
'品类'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.customerCategory'
})
,
dataIndex
:
'categoryName'
,
align
:
'center'
,
key
:
'categoryName'
,
},
{
title
:
'品类ID'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.categoryId'
})
,
dataIndex
:
'categoryId'
,
align
:
'center'
,
key
:
'categoryId'
,
className
:
'commonHide'
,
},
{
title
:
'品牌'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.brand'
})
,
dataIndex
:
'brandName'
,
align
:
'center'
,
key
:
'brandName'
,
},
{
title
:
'单位'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.unitName'
})
,
dataIndex
:
'unitName'
,
align
:
'center'
,
key
:
'unitName'
,
},
{
title
:
'单位ID'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.unitNameId'
})
,
dataIndex
:
'unitId'
,
align
:
'center'
,
key
:
'unitId'
,
className
:
'commonHide'
,
},
{
title
:
'是否货品列表数据'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.isList'
})
,
dataIndex
:
'has'
,
align
:
'center'
,
key
:
'has'
,
className
:
'commonHide'
,
},
{
title
:
'采购数量'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.purchaseCount'
})
,
dataIndex
:
'count'
,
align
:
'center'
,
key
:
'count'
,
},
{
title
:
'操作'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.option'
})
,
dataIndex
:
'ctl'
,
align
:
'center'
,
key
:
'ctl'
,
...
...
@@ -285,42 +288,42 @@ export const inviteMemberColumns: any[] = [
// },
{
dataIndex
:
'memberId'
,
title
:
'会员ID'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.memberId'
})
,
align
:
'center'
},
{
dataIndex
:
'name'
,
align
:
'center'
,
title
:
'会员名称'
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.memberName'
}),
},
{
dataIndex
:
'memberTypeName'
,
title
:
'会员类型'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.memberType'
})
,
align
:
'center'
},
{
dataIndex
:
'roleName'
,
title
:
'会员角色'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.role'
})
,
align
:
'center'
},
{
dataIndex
:
'levelTag'
,
title
:
'会员等级'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.leveTag'
})
,
align
:
'center'
},
{
dataIndex
:
'isSubMember'
,
title
:
'是否归属会员'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.isSubMember'
})
,
align
:
'center'
,
render
:
(
t
,
r
)
=>
t
?
'是'
:
'否'
,
},
{
dataIndex
:
'isSend'
,
title
:
'状态'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.isSend'
})
,
align
:
'isSend'
,
},
{
dataIndex
:
'ctl'
,
dataIndex
:
intl
.
formatMessage
({
id
:
'detail.purchase.option'
})
,
title
:
'操作'
,
align
:
'center'
,
}
...
...
src/pages/procurement/callForBids/addNewBid/index.tsx
View file @
18e6f80a
This diff is collapsed.
Click to expand it.
src/pages/procurement/callForBids/addNewBid/model/useMaterialTable.tsx
View file @
18e6f80a
...
...
@@ -6,6 +6,7 @@ import ProductTableCell, { ProductEditableRow } from '../components/productTable
import
{
useModalTable
}
from
'./useModalTable'
;
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EyeOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
useIntl
}
from
'umi'
;
const
{
pageStatus
}
=
usePageStatus
()
...
...
@@ -18,7 +19,7 @@ let orderModel = null;
*/
export
const
useMaterialTable
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
goodRef
:
any
,
drawerSchemaAction
:
ISchemaFormActions
|
ISchemaFormAsyncActions
)
=>
{
const
{
visible
,
setVisible
,
rowSelection
,
rowSelectionCtl
}
=
useModalTable
({
type
:
'checkbox'
})
const
intl
=
useIntl
();
orderModel
=
ctx
.
getFieldValue
(
'orderModel'
)
const
handleDelete
=
(
record
)
=>
{
...
...
@@ -78,8 +79,8 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
const
[
materialColumns
,
setMaterialColumns
]
=
useState
(()
=>
{
materialInfoColumns
[
materialInfoColumns
.
length
-
1
].
render
=
(
text
,
record
)
=>
<>
<
Button
type=
'link'
onClick=
{
()
=>
handleEdit
(
record
)
}
>
编辑
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
handleDelete
(
record
)
}
>
删除
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
handleEdit
(
record
)
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.edit'
})
}
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
handleDelete
(
record
)
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.detele'
})
}
</
Button
>
</>
// // 渲染查看
...
...
@@ -94,7 +95,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
goodRef
.
current
.
setVisible
(
true
)
}
const
materialAddButton
=
<
Button
onClick=
{
handleShowProduct
}
block
icon=
{
<
PlusOutlined
/>
}
type=
'dashed'
style=
{
{
marginBottom
:
16
}
}
>
添加
</
Button
>
const
materialAddButton
=
<
Button
onClick=
{
handleShowProduct
}
block
icon=
{
<
PlusOutlined
/>
}
type=
'dashed'
style=
{
{
marginBottom
:
16
}
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.added'
})
}
</
Button
>
const
materialComponents
=
{
body
:
{
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/add.tsx
View file @
18e6f80a
import
React
,
{
useRef
,
useState
,
useEffect
}
from
'react'
;
import
{
Card
,
Tabs
,
Button
,
Badge
,
message
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
BasicInfo
from
'./components/basicInfo'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
...
...
@@ -11,7 +11,7 @@ import UploadImport from '@/components/UploadImport';
import
{
getPurchaseNeedPlanDetails
,
postPurchaseNeedPlanAdd
,
postPurchaseNeedPlanUpdate
}
from
'@/services/PurchaseV2Api'
;
const
{
TabPane
}
=
Tabs
;
const
intl
=
getIntl
();
const
DemandPlanAddedForm
=
()
=>
{
const
{
id
}
=
history
.
location
.
query
;
/** 基本信息 */
...
...
@@ -54,7 +54,7 @@ const DemandPlanAddedForm = () => {
...
materialRef
.
data
,
}
if
(
isEmpty
(
materialRef
.
data
))
{
message
.
error
(
'请添加采购物物料'
)
message
.
error
(
intl
.
formatMessage
({
id
:
'detail.purchase.message10'
})
)
setLoading
(
false
);
return
}
...
...
@@ -104,21 +104,21 @@ const DemandPlanAddedForm = () => {
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'detail.purchase.back'
})
}
/>
}
extra=
{
<
Button
loading=
{
loading
}
type=
"primary"
onClick=
{
handleSubmit
}
>
保存
</
Button
>
<
Button
loading=
{
loading
}
type=
"primary"
onClick=
{
handleSubmit
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.save'
})
}
</
Button
>
}
>
<
Card
>
<
Tabs
type=
'card'
>
<
TabPane
tab=
{
<
TabFormErrors
dot=
{
badge
[
0
]
}
>
基本信息
</
TabFormErrors
>
}
key=
"1"
forceRender
>
<
TabPane
tab=
{
<
TabFormErrors
dot=
{
badge
[
0
]
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.basicLayout'
})
}
</
TabFormErrors
>
}
key=
"1"
forceRender
>
<
BasicInfo
currentRef=
{
currentBasic
}
fetchdata=
{
basic
}
onBadge=
{
getError
}
/>
</
TabPane
>
<
TabPane
tab=
{
<
TabFormErrors
dot=
{
badge
[
1
]
}
>
采购物料
</
TabFormErrors
>
}
key=
"2"
forceRender
>
<
TabPane
tab=
{
<
TabFormErrors
dot=
{
badge
[
1
]
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.materialLayout'
})
}
</
TabFormErrors
>
}
key=
"2"
forceRender
>
<
Material
currentRef=
{
currentMaterial
}
fetchdata=
{
material
}
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/basicInfo.tsx
View file @
18e6f80a
...
...
@@ -3,6 +3,7 @@ import { Form, Input, Typography } from 'antd';
import
DatePicker
from
'@/components/DatePicker'
;
import
moment
from
'moment'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
getIntl
}
from
'umi'
;
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -16,7 +17,7 @@ interface BasicInfoprops {
fetchdata
:
any
,
onBadge
?:
Function
}
const
intl
=
getIntl
();
const
BasicInfo
:
React
.
FC
<
BasicInfoprops
>
=
(
props
:
any
)
=>
{
const
{
currentRef
,
fetchdata
,
onBadge
}
=
props
;
const
format
=
(
text
,
fmt
?:
string
)
=>
{
...
...
@@ -65,11 +66,11 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
{
({
getFieldValue
})
=>
{
return
(
getFieldValue
(
'startTime'
)
&&
getFieldValue
(
'endTime'
))
&&
(
<
Form
.
Item
label=
"需求计划摘要"
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.demendSummary'
})
}
name=
"summary"
rules=
{
[{
required
:
true
,
message
:
'请输入需求计划摘要'
message
:
intl
.
formatMessage
({
id
:
'detail.purchase.message11'
})
}]
}
>
<
Input
/>
...
...
@@ -77,26 +78,26 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
)
}
}
</
Form
.
Item
>
<
Form
.
Item
required
label=
"需求计划周期"
style=
{
{
marginBottom
:
0
}
}
>
<
Form
.
Item
required
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.demandCycle'
})
}
style=
{
{
marginBottom
:
0
}
}
>
<
DatePicker
startTimeName=
'startTime'
endTimeName=
'endTime'
onPress=
{
handleSummary
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"需求计划编号"
name=
"needPlanNo"
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.needPlanNo'
})
}
name=
"needPlanNo"
>
<
Typography
.
Text
>
{
fetchdata
.
needPlanNo
}
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编制部门"
name=
"department"
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.operate'
})
}
name=
"department"
>
<
Typography
.
Text
>
{
fetchdata
.
department
}
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编制人"
name=
"userName"
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.department'
})
}
name=
"userName"
>
<
Typography
.
Text
>
{
fetchdata
.
userName
}
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编制时间"
name=
"createTime"
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.createTime'
})
}
name=
"createTime"
>
<
Typography
.
Text
>
{
fetchdata
.
createTime
&&
format
(
fetchdata
.
createTime
)
}
</
Typography
.
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
"内部状态"
name=
"innerStatus"
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.innerStatus'
})
}
name=
"innerStatus"
>
<
Typography
.
Text
>
{
fetchdata
.
innerStatusName
}
</
Typography
.
Text
>
</
Form
.
Item
>
</
Form
>
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/material.tsx
View file @
18e6f80a
...
...
@@ -5,6 +5,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import
SelectProduct
from
'./selectProduct'
;
import
{
isEmpty
}
from
'lodash'
;
import
moment
from
'moment'
;
import
{
getIntl
}
from
'umi'
;
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -18,13 +19,13 @@ interface Materialprops {
fetchdata
:
{
[
key
:
string
]:
any
},
onBadge
?:
Function
}
const
intl
=
getIntl
();
const
Material
:
React
.
FC
<
Materialprops
>
=
(
props
:
any
)
=>
{
const
{
currentRef
,
fetchdata
,
onBadge
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
columns
:
ColumnType
<
Object
>
[]
=
[
{
title
:
'物料编号/名称'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.type'
})
,
key
:
'number'
,
dataIndex
:
'number'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -35,27 +36,27 @@ const Material: React.FC<Materialprops> = (props: any) => {
)
},
{
title
:
'规格型号'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.nameCode'
})
,
key
:
'model'
,
dataIndex
:
'model'
},
{
title
:
'品类'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.customerCategory'
})
,
key
:
'category'
,
dataIndex
:
'category'
},
{
title
:
'品牌'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.brand'
})
,
key
:
'brand'
,
dataIndex
:
'brand'
},
{
title
:
'单位'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.unitName'
})
,
key
:
'unit'
,
dataIndex
:
'unit'
},
{
title
:
'需求数量'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.needCount'
})
,
key
:
'needCount'
,
dataIndex
:
'needCount'
,
render
:
(
text
:
any
,
_rcod
:
any
,
index
:
number
)
=>
(
...
...
@@ -65,11 +66,11 @@ const Material: React.FC<Materialprops> = (props: any) => {
rules=
{
[
{
required
:
true
,
message
:
'请正确输入需求数量'
,
message
:
intl
.
formatMessage
({
id
:
'detail.purchase.message13'
})
,
},
{
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
message
:
'需求数量为数字格式,最长保留3位小数'
,
message
:
intl
.
formatMessage
({
id
:
'detail.purchase.message14'
})
,
}
]
}
>
...
...
@@ -78,7 +79,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
)
},
{
title
:
'成本价'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.costPrice'
})
,
key
:
'costPrice'
,
dataIndex
:
'costPrice'
,
render
:
(
text
:
any
)
=>
(
...
...
@@ -86,7 +87,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
)
},
{
title
:
'需求金额'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.needPrice'
})
,
key
:
'needPrice'
,
dataIndex
:
'needPrice'
,
render
:
(
text
:
any
)
=>
(
...
...
@@ -94,18 +95,18 @@ const Material: React.FC<Materialprops> = (props: any) => {
)
},
{
title
:
'到货日期'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.arriveTime'
})
,
key
:
'arriveTime'
,
dataIndex
:
'arriveTime'
,
render
:
(
text
:
any
,
_rcod
:
any
,
index
:
number
)
=>
(
<
Form
.
Item
style=
{
{
marginBottom
:
0
}
}
name=
{
`arriveTime${index}`
}
rules=
{
[{
required
:
true
,
message
:
'请选择到货日期'
,
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'detail.purchase.message15'
})
,
}]
}
>
<
DatePicker
style=
{
{
width
:
'100%'
}
}
placeholder=
'选择开始日期'
placeholder=
{
intl
.
formatMessage
({
id
:
'detail.purchase.placeholder'
})
}
format=
"YYYY-MM-DD"
disabledDate=
{
disabledDate
}
onChange=
{
(
val
)
=>
handleArriveTime
(
val
,
index
)
}
...
...
@@ -114,17 +115,17 @@ const Material: React.FC<Materialprops> = (props: any) => {
)
},
{
title
:
'操作'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.option'
})
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
_text
:
any
,
_record
:
any
,
index
:
number
)
=>
(
<
Popconfirm
title=
"确定要执行这个操作?"
title=
{
intl
.
formatMessage
({
id
:
'detail.purchase.placeholder1'
})
}
onConfirm=
{
()
=>
handleRemove
(
index
)
}
okText=
"是"
cancelText=
"否"
okText=
{
intl
.
formatMessage
({
id
:
'detail.purchase.okText'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'detail.purchase.cancelText'
})
}
>
<
Button
type=
'link'
>
删除
</
Button
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.detele'
})
}
</
Button
>
</
Popconfirm
>
)
...
...
@@ -151,7 +152,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
const
handleConfirm
=
(
e
:
any
)
=>
{
if
(
isEmpty
(
e
.
selectRow
))
{
message
.
warning
(
'请选择货品'
)
message
.
warning
(
intl
.
formatMessage
({
id
:
'detail.purchase.message17'
})
)
return
}
console
.
log
(
e
,
10086
)
...
...
@@ -183,7 +184,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
const
handleRemove
=
(
index
:
number
)
=>
{
const
data
=
[...
dataSource
];
data
.
splice
(
index
,
1
);
message
.
success
(
'删除成功'
)
message
.
success
(
intl
.
formatMessage
({
id
:
'detail.purchase.message16'
})
)
form
.
resetFields
();
data
.
forEach
((
item
,
index
)
=>
{
console
.
log
(
moment
(
Number
(
item
.
arriveTime
)))
...
...
@@ -235,13 +236,13 @@ const Material: React.FC<Materialprops> = (props: any) => {
return
(
<
Form
{
...
layout
}
form=
{
form
}
>
<
Form
.
Item
label=
'添加方式'
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.modalTitle3'
})
}
name=
'addType'
rules=
{
[{
required
:
true
,
message
:
'请选择添加方式'
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'detail.purchase.message12'
})
}]
}
initialValue=
{
1
}
>
<
Radio
.
Group
>
<
Radio
value=
{
1
}
>
选择货品生成
</
Radio
>
<
Radio
value=
{
1
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.modalTitle4'
})
}
</
Radio
>
{
/* <Radio value={2}>导入计划采购物料</Radio> */
}
</
Radio
.
Group
>
</
Form
.
Item
>
...
...
@@ -254,7 +255,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
onClick=
{
()
=>
setVisible
(
true
)
}
>
<
PlusOutlined
/>
添加
{
intl
.
formatMessage
({
id
:
'detail.purchase.added'
})
}
</
Button
>
<
Table
rowKey=
"id"
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/selectProduct.tsx
View file @
18e6f80a
...
...
@@ -18,6 +18,7 @@ import {
}
from
'../../../schema'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
getProductGoodsGetGoodsList
}
from
'@/services/ProductV2Api'
;
import
{
getIntl
}
from
'umi'
;
const
formActions
=
createFormActions
();
...
...
@@ -31,41 +32,41 @@ interface Iprops {
/** 回显时选中的勾选 */
rowCtlData
?:
Array
<
any
>
[],
}
const
intl
=
getIntl
();
const
SelectProduct
:
React
.
FC
<
Iprops
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
<
any
>
({});
const
{
visible
,
onclose
,
confirm
,
rowCtlData
}
=
props
;
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
});
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'货号'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.code'
})
,
key
:
'code'
,
dataIndex
:
'code'
},
{
title
:
'货品名称'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.productName'
})
,
key
:
'name'
,
dataIndex
:
'name'
},
{
title
:
'规格型号'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.nameCode'
})
,
key
:
'type'
,
dataIndex
:
'type'
},
{
title
:
'品类'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.customerCategory'
})
,
key
:
'customerCategory'
,
dataIndex
:
'customerCategory'
,
render
:
(
text
:
any
)
=>
<
span
>
{
(
text
&&
Object
.
keys
(
text
).
length
>
0
)
&&
text
.
name
}
</
span
>
},
{
title
:
'品牌'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.brand'
})
,
key
:
'brand'
,
dataIndex
:
'brand'
,
render
:
(
text
:
any
)
=>
<
span
>
{
(
text
&&
Object
.
keys
(
text
).
length
>
0
)
&&
text
.
name
}
</
span
>
},
{
title
:
'单位'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.unitName'
})
,
key
:
'unitName'
,
dataIndex
:
'unitName'
},
...
...
@@ -110,7 +111,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
<
Drawer
visible=
{
visible
}
onClose=
{
onclose
}
title=
'选择货品'
title=
{
intl
.
formatMessage
({
id
:
'detail.purchase.modalTitle1'
})
}
width=
{
900
}
footer=
{
<
div
...
...
@@ -119,10 +120,10 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
}
}
>
<
Button
onClick=
{
onclose
}
style=
{
{
marginRight
:
8
}
}
>
取消
{
intl
.
formatMessage
({
id
:
'detail.purchase.cancel'
})
}
</
Button
>
<
Button
onClick=
{
()
=>
confirm
(
RowCtl
)
}
type=
"primary"
>
确定
{
intl
.
formatMessage
({
id
:
'detail.purchase.confirm'
})
}
</
Button
>
</
div
>
}
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/index.tsx
View file @
18e6f80a
import
React
,
{
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
Table
from
'../../components/table'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -14,12 +14,13 @@ import { getPurchaseNeedPlanToBeAddList, postPurchaseNeedPlanDelete, postPurchas
const
{
Text
}
=
Typography
;
const
DemandPlanAdded
=
()
=>
{
const
intl
=
getIntl
();
const
ref
=
useRef
<
any
>
({});
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'需求计划编号/摘要'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.purchasePlanNo'
})
,
key
:
'needPlanNo'
,
dataIndex
:
'needPlanNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -29,7 +30,7 @@ const DemandPlanAdded = () => {
</
Space
>
)
},
{
title
:
'计划开始/截止时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.startTime'
})
,
key
:
'startTime'
,
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -39,41 +40,41 @@ const DemandPlanAdded = () => {
</
Space
>
)
},
{
title
:
'编制部门'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.department'
})
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'编制人'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.userName'
})
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.createTime'
})
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
},
{
title
:
'内部状态'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
key
:
'innerStatus'
,
dataIndex
:
'innerStatus'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
innerStatusName
}
/>
},
{
title
:
'操作'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.operate'
})
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
{
record
.
innerStatus
===
DEMANDPLAN_INTERNALSTATE_TYPE
.
WAITESUBMITAUDIT_TYPE
&&
(
{
record
.
innerStatus
===
DEMANDPLAN_INTERNALSTATE_TYPE
.
WAITESUBMITAUDIT_TYPE
&&
(
<
Popconfirm
title=
"确定要提交吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Button
type=
'link'
>
提交
{
intl
.
formatMessage
({
id
:
'table.purchase.submit'
})
}
</
Button
>
</
Popconfirm
>
)
}
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/demandPlan/demandPlanAdded/edit?id=${record.id}`
)
}
>
修改
</
Button
>
{
record
.
innerStatus
===
DEMANDPLAN_INTERNALSTATE_TYPE
.
WAITESUBMITAUDIT_TYPE
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/demandPlan/demandPlanAdded/edit?id=${record.id}`
)
}
>
{
intl
.
formatMessage
({
id
:
'table.purchase.eidt'
})
}
</
Button
>
{
record
.
innerStatus
===
DEMANDPLAN_INTERNALSTATE_TYPE
.
WAITESUBMITAUDIT_TYPE
&&
(
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelect
(
record
.
id
)
}
>
<
Button
type=
'link'
>
删除
{
intl
.
formatMessage
({
id
:
'table.purchase.delete'
})
}
</
Button
>
</
Popconfirm
>
)
}
...
...
@@ -118,7 +119,7 @@ const DemandPlanAdded = () => {
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
>
新建
{
intl
.
formatMessage
({
id
:
'table.purchase.added'
})
}
</
Button
>
</
Col
>
</
Row
>
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanOne/index.tsx
View file @
18e6f80a
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
Table
from
'../../components/table'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -11,14 +11,13 @@ import {
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
import
{
getPurchaseNeedPlanToBeFirstExamList
}
from
'@/services/PurchaseV2Api'
;
const
{
Text
}
=
Typography
;
const
intl
=
getIntl
();
const
DemandPlanOne
=
()
=>
{
console
.
log
(
'待新增采购需求单'
);
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'需求计划编号/摘要'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.purchasePlanNo'
})
,
key
:
'needPlanNo'
,
dataIndex
:
'needPlanNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -28,7 +27,7 @@ const DemandPlanOne = () => {
</
Space
>
)
},
{
title
:
'计划开始/截止时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.startTime'
})
,
key
:
'startTime'
,
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -38,25 +37,25 @@ const DemandPlanOne = () => {
</
Space
>
)
},
{
title
:
'编制部门'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.department'
})
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'编制人'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.userName'
})
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.createTime'
})
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
key
:
'innerStatus'
,
dataIndex
:
'innerStatus'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
innerStatusName
}
/>
},
{
title
:
'操作'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.operate'
})
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -65,7 +64,7 @@ const DemandPlanOne = () => {
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/demandPlan/demandPlanOne/detail?id=${record.id}`
)
}
>
审核
{
intl
.
formatMessage
({
id
:
'table.purchase.audit'
})
}
</
Button
>
</>
)
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanSearch/index.tsx
View file @
18e6f80a
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
Table
from
'../../components/table'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -11,14 +11,14 @@ import {
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
import
{
getPurchaseNeedPlanAllList
,
getPurchaseNeedPlanInner
}
from
'@/services/PurchaseV2Api'
;
const
{
Text
}
=
Typography
;
const
intl
=
getIntl
();
const
DemandPlanSearch
=
()
=>
{
console
.
log
(
'待新增采购需求单'
);
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'需求计划编号/摘要'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.purchasePlanNo'
})
,
key
:
'needPlanNo'
,
dataIndex
:
'needPlanNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -28,7 +28,7 @@ const DemandPlanSearch = () => {
</
Space
>
)
},
{
title
:
'计划开始/截止时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.startTime'
})
,
key
:
'startTime'
,
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -38,20 +38,20 @@ const DemandPlanSearch = () => {
</
Space
>
)
},
{
title
:
'编制部门'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.operate'
})
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'编制人'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.userName'
})
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.createTime'
})
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
key
:
'innerStatus'
,
dataIndex
:
'innerStatus'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
innerStatusName
}
/>
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanSubmit/index.tsx
View file @
18e6f80a
...
...
@@ -9,15 +9,16 @@ import {
}
from
'../../constants'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
import
{
getPurchaseNeedPlanToBeSubmitList
,
postPurchaseNeedPlanSubmit
}
from
'@/services/PurchaseV2Api'
;
import
{
getIntl
}
from
'umi'
;
const
{
Text
}
=
Typography
;
const
intl
=
getIntl
();
const
DemandPlanSubmit
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'需求计划编号/摘要'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.purchasePlanNo'
})
,
key
:
'needPlanNo'
,
dataIndex
:
'needPlanNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -27,7 +28,7 @@ const DemandPlanSubmit = () => {
</
Space
>
)
},
{
title
:
'计划开始/截止时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.startTime'
})
,
key
:
'startTime'
,
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -37,32 +38,32 @@ const DemandPlanSubmit = () => {
</
Space
>
)
},
{
title
:
'编制部门'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.department'
})
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'编制人'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.userName'
})
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.createTime'
})
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
key
:
'innerStatus'
,
dataIndex
:
'innerStatus'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
innerStatusName
}
/>
},
{
title
:
'操作'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.operate'
})
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Popconfirm
title=
"确定要提交吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'table.purchase.popconfirm'
})
}
okText=
{
intl
.
formatMessage
({
id
:
'table.purchase.okText'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'table.purchase.cancelText'
})
}
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Button
type=
'link'
>
提交
{
intl
.
formatMessage
({
id
:
'table.purchase.submit'
})
}
</
Button
>
</
Popconfirm
>
</>
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanTwo/index.tsx
View file @
18e6f80a
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
Table
from
'../../components/table'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -11,14 +11,14 @@ import {
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
import
{
getPurchaseNeedPlanToBeSecondExamList
}
from
'@/services/PurchaseV2Api'
;
const
{
Text
}
=
Typography
;
const
intl
=
getIntl
();
const
DemanPlanTwo
=
()
=>
{
console
.
log
(
'待新增采购需求单'
);
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'需求计划编号/摘要'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.purchasePlanNo'
})
,
key
:
'needPlanNo'
,
dataIndex
:
'needPlanNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -28,7 +28,7 @@ const DemanPlanTwo = () => {
</
Space
>
)
},
{
title
:
'计划开始/截止时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.startTime'
})
,
key
:
'startTime'
,
dataIndex
:
'startTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -38,25 +38,25 @@ const DemanPlanTwo = () => {
</
Space
>
)
},
{
title
:
'编制部门'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.department'
})
,
key
:
'department'
,
dataIndex
:
'department'
,
},
{
title
:
'编制人'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.userName'
})
,
key
:
'userName'
,
dataIndex
:
'userName'
,
},
{
title
:
'编制时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.createTime'
})
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
format
(
text
)
}
</
Text
>
},
{
title
:
'内部状态'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
key
:
'innerStatus'
,
dataIndex
:
'innerStatus'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
innerStatusName
}
/>
},
{
title
:
'操作'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.operate'
})
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -65,7 +65,7 @@ const DemanPlanTwo = () => {
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/demandPlan/demandPlanTwo/detail?id=${record.id}`
)
}
>
审核
{
intl
.
formatMessage
({
id
:
'table.purchase.audit'
})
}
</
Button
>
</>
)
...
...
src/pages/transaction/purchaseAbility/demandPlan/detail/index.tsx
View file @
18e6f80a
import
React
,
{
Fragment
,
useEffect
,
useState
}
from
'react'
;
import
{
Badge
,
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
{
Context
}
from
'../../components/detail/components/context'
;
import
PeripheralLayout
from
'../../components/detail'
;
import
ProgressLayout
from
'../../components/detail/components/progressLayout'
;
...
...
@@ -15,12 +15,12 @@ import { CheckCircleOutlined } from '@ant-design/icons';
import
ModalOperate
from
'../../components/modalOperate'
;
import
DemandPlanMaterialLayout
from
'../../components/detail/components/demandPlanMaterialLayout'
;
import
{
getPurchaseNeedPlanDetails
,
getPurchaseNeedPlanNeedPlanDetail
,
postPurchaseNeedPlanFirstExam
,
postPurchaseNeedPlanSecondExam
}
from
'@/services/PurchaseV2Api'
;
const
intl
=
getIntl
();
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'materialLayout'
,
title
:
'采购物料'
},
{
id
:
'recordLyout'
,
title
:
'流转记录'
},
{
id
:
'progressLayout'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.progressLayout'
})
},
{
id
:
'basicLayout'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.basicLayout'
})
},
{
id
:
'materialLayout'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.materialLayout'
})
},
{
id
:
'recordLyout'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.recordLyout'
})
},
]
const
DemandDetailed
=
()
=>
{
...
...
@@ -43,22 +43,22 @@ const DemandDetailed = () => {
setBasicEffect
([
{
col
:
[
{
label
:
'需求计划编号'
,
extra
:
data
.
needPlanNo
},
{
label
:
'需求计划摘要'
,
extra
:
data
.
summary
},
{
label
:
'内部状态'
,
extra
:
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
data
.
innerStatus
]
}
text=
{
data
.
innerStatusName
}
/>
},
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.needPlanNo'
})
,
extra
:
data
.
needPlanNo
},
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendSummary'
})
,
extra
:
data
.
summary
},
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.innerStatus'
})
,
extra
:
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
data
.
innerStatus
]
}
text=
{
data
.
innerStatusName
}
/>
},
]
},
{
col
:
[
{
label
:
'需求计划开始'
,
extra
:
format
(
data
.
startTime
,
'YYYY-MM-DD'
)
},
{
label
:
'需求计划截止'
,
extra
:
format
(
data
.
endTime
,
'YYYY-MM-DD'
)
},
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendStartTime'
})
,
extra
:
format
(
data
.
startTime
,
'YYYY-MM-DD'
)
},
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendEndTime'
})
,
extra
:
format
(
data
.
endTime
,
'YYYY-MM-DD'
)
},
]
},
{
col
:
[
{
label
:
'编制部门'
,
extra
:
data
.
department
},
{
label
:
'编制人'
,
extra
:
data
.
userName
},
{
label
:
'编制时间'
,
extra
:
format
(
data
.
createTime
)
},
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.operate'
})
,
extra
:
data
.
department
},
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.department'
})
,
extra
:
data
.
userName
},
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.createTime'
})
,
extra
:
format
(
data
.
createTime
)
},
]
},
])
...
...
@@ -145,7 +145,7 @@ const DemandDetailed = () => {
type=
'primary'
>
<
CheckCircleOutlined
/>
单据审核
{
intl
.
formatMessage
({
id
:
'detail.purchase.modelTitle'
})
}
</
Button
>
)
}
</>
...
...
@@ -164,7 +164,7 @@ const DemandDetailed = () => {
/>
<
ModalOperate
id=
{
id
}
title=
"单据审核"
title=
{
intl
.
formatMessage
({
id
:
'detail.purchase.modelTitle'
})
}
modalType=
"planAudit"
visible=
{
visible
}
fetch=
{
fetchLink
()
}
...
...
@@ -175,3 +175,5 @@ const DemandDetailed = () => {
)
}
export
default
DemandDetailed
;
src/pages/transaction/purchaseAbility/offter/addOffter/add.tsx
View file @
18e6f80a
import
React
,
{
useEffect
,
useState
,
useRef
,
useCallback
}
from
'react'
;
import
{
Tabs
,
Button
,
Card
,
Badge
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
Basic
from
'./components/basic'
;
...
...
@@ -11,7 +11,7 @@ import { getAuth } from '@/utils/auth';
import
{
getPurchaseQuotedPriceDetails
,
getPurchaseQuotedPricePurchaseInquiryDetails
,
postPurchaseQuotedPriceAdd
,
postPurchaseQuotedPriceUpdate
}
from
'@/services/PurchaseV2Api'
;
const
{
TabPane
}
=
Tabs
;
const
intl
=
getIntl
();
const
AddForm
=
()
=>
{
const
{
query
:
{
id
,
number
,
turn
},
...
...
@@ -188,21 +188,21 @@ const AddForm = () => {
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'detail.purchase.back'
})
}
/>
}
extra=
{
<
Button
loading=
{
loading
}
type=
"primary"
onClick=
{
handleSubmit
}
>
保存
</
Button
>
<
Button
loading=
{
loading
}
type=
"primary"
onClick=
{
handleSubmit
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.save'
})
}
</
Button
>
}
>
<
Card
>
<
Tabs
type=
'card'
>
<
TabPane
key=
'1'
tab=
{
<
TabFormErrors
dot=
{
badge
[
0
]
}
>
基本信息
</
TabFormErrors
>
}
forceRender
>
<
TabPane
key=
'1'
tab=
{
<
TabFormErrors
dot=
{
badge
[
0
]
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.basicLayout'
})
}
</
TabFormErrors
>
}
forceRender
>
<
Basic
fetchdata=
{
basic
}
currentRef=
{
currentBasic
}
onBadge=
{
getError
}
/>
</
TabPane
>
<
TabPane
key=
'2'
tab=
{
<
TabFormErrors
dot=
{
badge
[
1
]
}
>
报价信息
</
TabFormErrors
>
}
forceRender
>
<
TabPane
key=
'2'
tab=
{
<
TabFormErrors
dot=
{
badge
[
1
]
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.offerLayout'
})
}
</
TabFormErrors
>
}
forceRender
>
<
Offer
getKey=
{
handleGetKey
}
fetchdata=
{
offer
}
...
...
@@ -211,7 +211,7 @@ const AddForm = () => {
onBadge=
{
getError
}
/>
</
TabPane
>
<
TabPane
key=
'3'
tab=
{
<
TabFormErrors
dot=
{
badge
[
2
]
}
>
报价说明
</
TabFormErrors
>
}
forceRender
>
<
TabPane
key=
'3'
tab=
{
<
TabFormErrors
dot=
{
badge
[
2
]
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.offerExplain'
})
}
</
TabFormErrors
>
}
forceRender
>
<
Explain
round=
{
round
}
checkRound=
{
checkRound
}
...
...
@@ -220,7 +220,7 @@ const AddForm = () => {
onBadge=
{
getError
}
/>
</
TabPane
>
<
TabPane
key=
'4'
tab=
'附件'
forceRender
>
<
TabPane
key=
'4'
tab=
{
intl
.
formatMessage
({
id
:
'detail.purchase.file'
})
}
forceRender
>
<
File
round=
{
round
}
checkRound=
{
checkRound
}
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/components/basic.tsx
View file @
18e6f80a
...
...
@@ -18,7 +18,8 @@ import {
OFFTER_INTERNALSTATE_COLOR
}
from
'../../../constants'
;
import
{
getManageCountryAreaGetTelCode
}
from
'@/services/ManageV2Api'
;
import
{
getIntl
}
from
'umi'
;
const
intl
=
getIntl
();
const
{
Option
}
=
Select
;
const
{
Text
,
Link
}
=
Typography
;
...
...
@@ -106,14 +107,14 @@ const BasicInfo: React.FC<IProps> = (props: any) => {
{
...
layout
}
>
<
Form
.
Item
label=
'报价单摘要'
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.quotedDetails'
})
}
name=
'quotedDetails'
rules=
{
[{
required
:
true
,
message
:
'请输入需求单摘要'
}]
}
>
<
Input
maxLength=
{
30
}
placeholder=
'最长60个字符,30个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'对应需求单号'
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.purchaseInquiryNo'
})
}
name=
'purchaseInquiryNo'
required
>
...
...
@@ -122,22 +123,22 @@ const BasicInfo: React.FC<IProps> = (props: any) => {
</
Link
>
</
Form
.
Item
>
<
Form
.
Item
label=
'需求会员'
label=
{
intl
.
formatMessage
({
id
:
'table.purchase.member'
})
}
name=
'memberName'
>
<
Text
>
{
fetchdata
&&
fetchdata
.
memberName
}
</
Text
>
</
Form
.
Item
>
<
Form
.
Item
label=
'联系人姓名'
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.contacts'
})
}
name=
'contacts'
rules=
{
[{
required
:
true
,
message
:
'请输入联系人姓名'
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'detail.purchase.contactsMessage'
})
}]
}
>
<
Input
maxLength=
{
6
}
placeholder=
'最长12个字符,6个汉字'
/>
<
Input
maxLength=
{
6
}
placeholder=
{
intl
.
formatMessage
({
id
:
'detail.purchase.placeholder3'
})
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'联系人手机'
colon=
{
false
}
required=
{
true
}
style=
{
{
marginBottom
:
'0'
}
}
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.telPhone'
})
}
colon=
{
false
}
required=
{
true
}
style=
{
{
marginBottom
:
'0'
}
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
7
}
>
<
Form
.
Item
name=
'telPrefix'
rules=
{
[{
required
:
true
,
message
:
'请选择区号'
}]
}
>
<
Form
.
Item
name=
'telPrefix'
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'detail.purchase.telPrefix'
})
}]
}
>
<
Select
placeholder=
"+86"
>
{
telCode
.
map
((
item
:
any
)
=>
(
<
Option
key=
{
item
}
value=
{
item
}
>
{
item
}
</
Option
>
...
...
@@ -147,7 +148,7 @@ const BasicInfo: React.FC<IProps> = (props: any) => {
</
Col
>
<
Col
span=
{
17
}
>
<
Form
.
Item
name=
'tel'
rules=
{
[{
required
:
true
,
validator
:
userPhoneRule
,
}]
}
>
<
Input
placeholder=
"请输入你的手机号码"
/>
<
Input
placeholder=
{
intl
.
formatMessage
({
id
:
'detail.purchase.tel'
})
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/components/explain.tsx
View file @
18e6f80a
import
React
,
{
useEffect
}
from
'react'
;
import
{
Form
,
Input
,
Typography
}
from
'antd'
;
import
{
getIntl
}
from
'umi'
;
const
{
TextArea
}
=
Input
;
...
...
@@ -19,7 +20,7 @@ export interface IProps {
checkRound
:
number
,
onBadge
?:
Function
}
const
intl
=
getIntl
();
const
OfferExplain
:
React
.
FC
<
IProps
>
=
(
props
:
any
)
=>
{
const
[
form
]
=
Form
.
useForm
();
const
{
fetchdata
,
currentRef
,
round
,
checkRound
,
onBadge
}
=
props
;
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/components/file.tsx
View file @
18e6f80a
...
...
@@ -4,6 +4,7 @@ import UploadProps from '@/pages/transaction/common/uploadProps';
import
styles
from
'./index.less'
;
import
{
UploadOutlined
,
DeleteOutlined
,
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
getIntl
}
from
'umi'
;
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -20,7 +21,7 @@ export interface IProps {
/** 点击报价信息切换的轮次 */
checkRound
:
number
,
}
const
intl
=
getIntl
();
const
File
:
React
.
FC
<
IProps
>
=
(
props
)
=>
{
const
{
fetchdata
,
currentRef
,
round
,
checkRound
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/components/offer.tsx
View file @
18e6f80a
...
...
@@ -14,6 +14,7 @@ import { CaretDownOutlined, CaretRightOutlined } from '@ant-design/icons';
import
style
from
'./index.less'
;
import
CrossSellProducts
from
'../modal/crossSellProducts'
;
import
{
getPurchasePurchaseInquiryGetMaterielsByPurchaseInquiryId
,
getPurchaseQuotedPriceMaterielDetailed
}
from
'@/services/PurchaseV2Api'
;
import
{
getIntl
}
from
'umi'
;
const
{
Text
}
=
Typography
;
const
{
Option
}
=
Select
;
...
...
@@ -26,7 +27,7 @@ export interface IProps {
getKey
?:
(
e
)
=>
void
,
onBadge
?:
Function
}
const
intl
=
getIntl
();
const
OfferInfo
:
React
.
FC
<
IProps
>
=
(
props
:
any
)
=>
{
const
[
form
]
=
Form
.
useForm
();
const
{
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/index.tsx
View file @
18e6f80a
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
Table
from
'../../components/table'
import
{
history
}
from
'umi'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
moment
from
'moment'
...
...
@@ -15,14 +15,14 @@ import {
import
{
Badge
,
Tag
}
from
'antd'
;
import
{
getPurchaseQuotedPriceAddList
,
postPurchaseQuotedPriceDelete
,
postPurchaseQuotedPriceDeleteBatch
,
postPurchaseQuotedPriceSubmit
,
postPurchaseQuotedPriceSubmitBatch
}
from
'@/services/PurchaseV2Api'
;
const
{
Text
}
=
Typography
;
const
intl
=
getIntl
();
const
AddOffter
=
()
=>
{
console
.
log
(
'待新增采购需求单'
);
const
format
=
(
text
,
fmt
?:
string
)
=>
{
return
<>
{
moment
(
text
).
format
(
fmt
||
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'报价单号/摘要'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.purchaseInquiryNoDtails'
})
,
key
:
'quotedPriceNo'
,
dataIndex
:
'quotedPriceNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -32,7 +32,7 @@ const AddOffter = () => {
</
Space
>
)
},
{
title
:
'需求单号/会员'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.purchaseInquiryNoMember'
})
,
key
:
'purchaseInquiryNo'
,
dataIndex
:
'purchaseInquiryNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -44,17 +44,17 @@ const AddOffter = () => {
</
Space
>
)
},
{
title
:
'报价截止时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.quotedPriceTime'
})
,
key
:
'offerEndTime'
,
dataIndex
:
'offerEndTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
},
{
title
:
'单据时间'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.dementCreateTime'
})
,
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
format
(
text
)
},
{
title
:
'报价轮次'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.turn'
})
,
key
:
'turn'
,
dataIndex
:
'turn'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -75,26 +75,26 @@ const AddOffter = () => {
</>
)
},
{
title
:
'外部状态'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.externalStatus'
})
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Tag
color=
{
OFFTER_EXTERNALSTATE_COLOR
[
text
]
}
>
{
record
.
externalStateName
}
</
Tag
>
},
{
title
:
'内部状态'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
key
:
'interiorState'
,
dataIndex
:
'interiorState'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
OFFTER_INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
interiorStateName
}
/>
},
{
title
:
'操作'
,
title
:
intl
.
formatMessage
({
id
:
'table.purchase.operate'
})
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<>
{
record
.
button
===
BUTTONAUTHORITY
.
ONE
&&
(
<
Popconfirm
title=
"确定要提交审核吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
fetchSubmitBatch
(
record
.
id
)
}
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'table.purchase.popconfirm1'
})
}
okText=
{
intl
.
formatMessage
({
id
:
'detail.purchase.okText'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'detail.purchase.cancelText'
})
}
onConfirm=
{
()
=>
fetchSubmitBatch
(
record
.
id
)
}
>
<
Button
type=
'link'
>
提交审核
{
intl
.
formatMessage
({
id
:
'detail.purchase.submit'
})
}
</
Button
>
</
Popconfirm
>
)
...
...
@@ -105,15 +105,15 @@ const AddOffter = () => {
<
Button
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/offter/edit?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`
)
}
type=
'link'
>
修改
</
Button
>
>
{
intl
.
formatMessage
({
id
:
'table.purchase.eidt'
})
}
</
Button
>
)
}
{
record
.
button
===
BUTTONAUTHORITY
.
ONE
&&
(
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
fetchDeleteBatch
(
record
.
id
)
}
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'table.purchase.popconfirm2'
})
}
okText=
{
intl
.
formatMessage
({
id
:
'detail.purchase.okText'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'detail.purchase.cancelText'
})
}
onConfirm=
{
()
=>
fetchDeleteBatch
(
record
.
id
)
}
>
<
Button
type=
'link'
>
删除
{
intl
.
formatMessage
({
id
:
'table.purchase.delete'
})
}
</
Button
>
</
Popconfirm
>
)
...
...
@@ -172,13 +172,13 @@ const AddOffter = () => {
onClick=
{
()
=>
fetchSubmitBatch
()
}
disabled=
{
rowkeys
.
length
===
0
}
>
批量提交审核
{
intl
.
formatMessage
({
id
:
'table.purchase.submitBatch'
})
}
</
Button
>
<
Button
onClick=
{
()
=>
fetchDeleteBatch
()
}
disabled=
{
rowkeys
.
length
===
0
}
>
批量删除
{
intl
.
formatMessage
({
id
:
'table.purchase.deleteBatch'
})
}
</
Button
>
</
Space
>
</
Col
>
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/modal/crossSellProducts.tsx
View file @
18e6f80a
...
...
@@ -6,6 +6,7 @@ import { DeleteOutlined, LinkOutlined, PlusSquareOutlined, UploadOutlined } from
import
SelectProduct
from
'./selectProduct'
;
import
UploadProps
from
'@/pages/transaction/common/uploadProps'
;
import
{
getProductCommodityGetCommodityAttributeByUnitPriceAndPicId
}
from
'@/services/ProductV2Api'
;
import
{
getIntl
}
from
'umi'
;
const
{
Text
}
=
Typography
;
export
interface
IProps
{
...
...
@@ -22,7 +23,7 @@ const layout: any = {
labelCol
:
{
style
:
{
width
:
'110px'
}
},
labelAlign
:
"left"
};
const
intl
=
getIntl
();
const
CrossSellProducts
:
React
.
FC
<
IProps
>
=
(
props
:
any
)
=>
{
const
{
rel
,
preview
,
visible
,
record
,
onClose
,
onClick
}
=
props
;
const
[
flag
,
setFlag
]
=
useState
<
boolean
>
(
false
);
...
...
@@ -83,7 +84,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
const
beforeDocUpload
=
(
file
:
any
)
=>
{
const
isLt20M
=
file
.
size
/
1024
/
1024
<
20
;
if
(
!
isLt20M
)
{
message
.
error
(
'上传文件大小不超过 20M!'
);
message
.
error
(
intl
.
formatMessage
({
id
:
'detail.purchase.message18'
})
);
}
return
isLt20M
;
}
...
...
@@ -161,7 +162,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
return
(
<>
<
Drawer
title=
'关联报价商品'
title=
{
intl
.
formatMessage
({
id
:
'detail.purchase.modalTitle5'
})
}
placement=
'right'
width=
{
800
}
className=
{
style
.
drawer
}
...
...
@@ -176,10 +177,10 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
}
}
>
<
Button
onClick=
{
handleClose
}
style=
{
{
marginRight
:
8
}
}
>
取消
{
intl
.
formatMessage
({
id
:
'detail.purchase.cancel'
})
}
</
Button
>
<
Button
onClick=
{
handleConfirm
}
type=
"primary"
>
确定
{
intl
.
formatMessage
({
id
:
'detail.purchase.confirm'
})
}
</
Button
>
</
div
>
)
:
null
...
...
@@ -188,7 +189,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
<
div
className=
{
style
.
container
}
>
<
div
className=
{
style
.
menu
}
>
<
div
className=
{
cx
(
style
.
menuItem
,
isSeleted
===
1
&&
style
.
active
)
}
onClick=
{
()
=>
handleClick
(
1
,
"menu1"
)
}
>
基本信息
{
intl
.
formatMessage
({
id
:
'detail.purchase.basicLayout'
})
}
</
div
>
{
attribute
.
length
>
0
&&
attribute
.
map
((
item
:
any
,
index
:
number
)
=>
(
<
div
key=
{
`attribute_${index + 1}`
}
className=
{
cx
(
style
.
menuItem
,
isSeleted
===
Number
(
index
+
2
)
&&
style
.
active
)
}
onClick=
{
()
=>
handleClick
(
Number
(
index
+
2
),
`menu${index + 2}`
)
}
>
...
...
@@ -196,37 +197,37 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
</
div
>
))
}
<
div
className=
{
cx
(
style
.
menuItem
,
isSeleted
===
99
&&
style
.
active
)
}
onClick=
{
()
=>
handleClick
(
99
,
"menu99"
)
}
>
附件
{
intl
.
formatMessage
({
id
:
'detail.purchase.file'
})
}
</
div
>
</
div
>
<
div
className=
{
style
.
content
}
>
<
Form
{
...
layout
}
>
<
div
id=
"menu1"
>
<
div
className=
{
style
.
anchor
}
>
基本信息
</
div
>
<
div
className=
{
style
.
anchor
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.basicLayout'
})
}
</
div
>
<
div
className=
{
style
.
formItem
}
>
{
record
&&
(
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
title
}
>
对应采购物料
</
div
>
<
div
className=
{
style
.
title
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.purchaseMaterial'
})
}
</
div
>
<
div
className=
{
style
.
content1
}
>
<
div
className=
{
style
.
row
}
>
<
span
className=
{
style
.
label
}
>
物料编号
:
</
span
>
<
span
className=
{
style
.
label
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.materialCode'
})
}
:
</
span
>
<
span
className=
{
style
.
col
}
>
{
record
.
number
}
</
span
>
</
div
>
<
div
className=
{
style
.
row
}
>
<
span
className=
{
style
.
label
}
>
品牌
:
</
span
>
<
span
className=
{
style
.
label
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.brand'
})
}
:
</
span
>
<
span
className=
{
style
.
col
}
>
{
record
.
brand
}
</
span
>
</
div
>
<
div
className=
{
style
.
row
}
>
<
span
className=
{
style
.
label
}
>
物料名称
:
</
span
>
<
span
className=
{
style
.
label
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.materialName'
})
}
:
</
span
>
<
span
className=
{
style
.
col
}
>
{
record
.
name
}
</
span
>
</
div
>
<
div
className=
{
style
.
row
}
>
<
span
className=
{
style
.
label
}
>
品类
:
</
span
>
<
span
className=
{
style
.
label
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.customerCategory'
})
}
:
</
span
>
<
span
className=
{
style
.
col
}
>
{
record
.
category
}
</
span
>
</
div
>
<
div
className=
{
style
.
row
}
>
<
span
className=
{
style
.
label
}
>
规格型号
:
</
span
>
<
span
className=
{
style
.
label
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.nameCode'
})
}
:
</
span
>
<
span
className=
{
style
.
col
}
>
{
record
.
model
}
</
span
>
</
div
>
</
div
>
...
...
@@ -242,15 +243,15 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
&&
(
<>
<
div
className=
{
style
.
row
}
>
<
span
className=
{
style
.
label
}
>
商品名称
:
</
span
>
<
span
className=
{
style
.
label
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.goodstName'
})
}
:
</
span
>
<
span
className=
{
style
.
col
}
>
{
product
.
name
}
</
span
>
</
div
>
<
div
className=
{
style
.
row
}
>
<
span
className=
{
style
.
label
}
>
品牌
:
</
span
>
<
span
className=
{
style
.
label
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.brand'
})
}
:
</
span
>
<
span
className=
{
style
.
col
}
>
{
product
.
brandName
}
</
span
>
</
div
>
<
div
className=
{
style
.
row
}
>
<
span
className=
{
style
.
label
}
>
品类
:
</
span
>
<
span
className=
{
style
.
label
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.customerCategory'
})
}
:
</
span
>
<
span
className=
{
style
.
col
}
>
{
product
.
customerCategoryName
}
</
span
>
</
div
>
</>
...
...
@@ -258,7 +259,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
{
!
preview
&&
(
<
Button
onClick=
{
()
=>
handleSelProduct
(
product
)
}
block
type=
"dashed"
style=
{
{
margin
:
'16px 0px'
}
}
>
<
PlusSquareOutlined
/>
选择商品
{
intl
.
formatMessage
({
id
:
'detail.purchase.selectGoods'
})
}
</
Button
>
)
}
</
div
>
...
...
@@ -282,10 +283,10 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
</
div
>
))
}
<
div
id=
"menu99"
>
<
div
className=
{
style
.
anchor
}
>
附件
</
div
>
<
div
className=
{
style
.
anchor
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.file'
})
}
</
div
>
<
div
className=
{
style
.
formItem
}
>
<
Form
.
Item
label=
'附件'
label=
{
intl
.
formatMessage
({
id
:
'detail.purchase.file'
})
}
name=
'upload'
>
<
div
className=
{
style
.
upload_data
}
>
...
...
@@ -318,8 +319,8 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
beforeUpload=
{
beforeDocUpload
}
onChange=
{
handleChange
}
>
<
Button
loading=
{
loading
}
icon=
{
<
UploadOutlined
/>
}
>
上传文件
</
Button
>
<
div
style=
{
{
marginTop
:
'8px'
}
}
>
一次上传一个文件,每个附件大小不能超过 20M
</
div
>
<
Button
loading=
{
loading
}
icon=
{
<
UploadOutlined
/>
}
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.uploadFile'
})
}
</
Button
>
<
div
style=
{
{
marginTop
:
'8px'
}
}
>
{
intl
.
formatMessage
({
id
:
'detail.placeholder2'
})
}
</
div
>
</
Upload
>
)
}
</
Form
.
Item
>
...
...
src/pages/transaction/purchaseAbility/offter/addOffter/modal/selectProduct.tsx
View file @
18e6f80a
...
...
@@ -16,6 +16,7 @@ import {
}
from
'../../../schema'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
{
getProductCommodityCommonGetCommodityListBySeller
,
getProductSelectGetSelectBrand
,
getProductSelectGetSelectCustomerCategory
}
from
'@/services/ProductV2Api'
;
import
{
getIntl
}
from
'umi'
;
const
formActions
=
createFormActions
();
...
...
@@ -25,7 +26,7 @@ interface Iprops {
onclose
?(),
confirm
?(
e
:
any
),
}
const
intl
=
getIntl
();
const
SelectProduct
:
React
.
FC
<
Iprops
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
<
any
>
({});
const
{
id
,
visible
,
onclose
,
confirm
}
=
props
;
...
...
@@ -37,17 +38,17 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
dataIndex
:
'id'
},
{
title
:
'商品名称'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.goodstName'
})
,
key
:
'name'
,
dataIndex
:
'name'
},
{
title
:
'品类'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.customerCategory'
})
,
key
:
'customerCategoryName'
,
dataIndex
:
'customerCategoryName'
},
{
title
:
'品牌'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.brand'
})
,
key
:
'brandName'
,
dataIndex
:
'brandName'
,
},
...
...
@@ -86,7 +87,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
},
"x-component-props"
:
{
placeholder
:
'商品名称'
,
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.goodstName'
})
,
align
:
'flex-left'
,
}
}
...
...
@@ -119,7 +120,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
'x-component-props'
:
{
placeholder
:
'品类'
,
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.customerCategory'
})
,
fetchSearch
:
getProductSelectGetSelectCustomerCategory
,
style
:
{
width
:
160
...
...
@@ -130,7 +131,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
'x-component-props'
:
{
placeholder
:
'品牌'
,
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.brand'
})
,
fetchSearch
:
getProductSelectGetSelectBrand
,
style
:
{
width
:
160
...
...
@@ -145,7 +146,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
span
:
1
},
"x-component-props"
:
{
children
:
'查询'
children
:
intl
.
formatMessage
({
id
:
'detail.purchase.search'
})
}
}
}
...
...
@@ -173,7 +174,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
<
Drawer
visible=
{
visible
}
onClose=
{
onclose
}
title=
'选择商品'
title=
{
intl
.
formatMessage
({
id
:
'detail.purchase.selectGoods'
})
}
width=
{
900
}
footer=
{
<
div
...
...
@@ -182,10 +183,10 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
取消
{
intl
.
formatMessage
({
id
:
'detail.purchase.cancel'
})
}
</
Button
>
<
Button
onClick=
{
()
=>
confirm
(
RowCtl
.
selectRow
[
0
])
}
type=
"primary"
>
确定
{
intl
.
formatMessage
({
id
:
'detail.purchase.confirm'
})
}
</
Button
>
</
div
>
}
...
...
src/pages/transaction/purchaseAbility/schema/index.ts
View file @
18e6f80a
import
{
ISchema
}
from
'@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
getProductSelectGetSelectBrand
,
getProductSelectGetSelectCustomerCategory
}
from
'@/services/ProductV2Api'
import
{
getIntl
}
from
'umi'
;
const
intl
=
getIntl
();
/** 采购询价 - 需求单查询 */
export
const
INQUIRYDEMANDORDER_SCHEMA
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -18,7 +19,7 @@ export const INQUIRYDEMANDORDER_SCHEMA: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'需求单号'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
,
align
:
'flex-left'
,
}
}
...
...
@@ -50,7 +51,7 @@ export const INQUIRYDEMANDORDER_SCHEMA: ISchema = {
details
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求摘要'
,
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendDetail'
})
}
},
"[startTime,endTime]"
:
{
...
...
@@ -63,7 +64,7 @@ export const INQUIRYDEMANDORDER_SCHEMA: ISchema = {
externalState
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'外部状态'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.externalStatus'
})
,
style
:
{
width
:
160
}
...
...
@@ -73,7 +74,7 @@ export const INQUIRYDEMANDORDER_SCHEMA: ISchema = {
interiorState
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'内部状态'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
style
:
{
width
:
160
}
...
...
@@ -118,7 +119,7 @@ export const INQUIRYWAITORDER_SCHEMA: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'需求单号'
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
}
}
}
...
...
@@ -148,8 +149,7 @@ export const INQUIRYWAITORDER_SCHEMA: ISchema = {
details
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求摘要'
}
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendDetail'
})
}
},
"[startTime,endTime]"
:
{
type
:
'string'
,
...
...
@@ -189,7 +189,7 @@ export const PurchaseDemandSchema: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'需求单号'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
,
align
:
'flex-left'
,
}
}
...
...
@@ -229,7 +229,7 @@ export const PurchaseDemandSchema: ISchema = {
type
:
'string'
,
"x-component"
:
'Select'
,
"x-component-props"
:
{
placeholder
:
'外部状态'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.externalStatus'
})
,
className
:
'fixed-ant-selected-down'
,
// 该类强制将显示的下拉框出现在s
style
:
{
width
:
160
...
...
@@ -240,7 +240,7 @@ export const PurchaseDemandSchema: ISchema = {
type
:
'string'
,
"x-component"
:
'Select'
,
"x-component-props"
:
{
placeholder
:
'内部状态'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
className
:
'fixed-ant-selected-down'
,
// 该类强制将显示的下拉框出现在s
style
:
{
width
:
160
...
...
@@ -284,7 +284,7 @@ export const PurchaseDemandPublicSchema: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'需求单号'
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
}
}
}
...
...
@@ -314,8 +314,7 @@ export const PurchaseDemandPublicSchema: ISchema = {
details
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求摘要'
}
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendDetail'
})
}
},
category
:
{
type
:
'string'
,
...
...
@@ -561,7 +560,7 @@ export const CONFIRMOFFERSERAH_SCHEMA: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'需求单号'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
,
align
:
'flex-left'
,
}
}
...
...
@@ -593,7 +592,7 @@ export const CONFIRMOFFERSERAH_SCHEMA: ISchema = {
details
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求摘要'
,
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendDetail'
})
}
},
"[startTime,endTime]"
:
{
...
...
@@ -606,7 +605,7 @@ export const CONFIRMOFFERSERAH_SCHEMA: ISchema = {
externalState
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'外部状态'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.externalStatus'
})
,
style
:
{
width
:
160
}
...
...
@@ -616,7 +615,7 @@ export const CONFIRMOFFERSERAH_SCHEMA: ISchema = {
interiorState
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'内部状态'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
style
:
{
width
:
160
}
...
...
@@ -653,7 +652,7 @@ export const CONFIRMOFFERSUBMITAPRICE_SCHEMA: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'需求单号'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
,
align
:
'flex-left'
,
}
}
...
...
@@ -685,7 +684,7 @@ export const CONFIRMOFFERSUBMITAPRICE_SCHEMA: ISchema = {
details
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求摘要'
,
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendDetail'
})
}
},
"[startTime,endTime]"
:
{
...
...
@@ -733,7 +732,7 @@ export const CONFIRMOFFERAUDIT_SCHEMA: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'需求单号'
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
}
}
}
...
...
@@ -763,8 +762,7 @@ export const CONFIRMOFFERAUDIT_SCHEMA: ISchema = {
details
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求摘要'
}
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendDetail'
})
}
},
"[startTime,endTime]"
:
{
...
...
@@ -805,7 +803,7 @@ export const OFFERDEMANDSERAH_SCHEMA: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'需求单号'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
,
align
:
'flex-left'
,
}
}
...
...
@@ -837,7 +835,7 @@ export const OFFERDEMANDSERAH_SCHEMA: ISchema = {
details
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求摘要'
,
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendDetail'
})
}
},
memberName
:
{
...
...
@@ -885,7 +883,7 @@ export const OFFERSERAH_SCHEMA: ISchema = {
},
"x-component-props"
:
{
placeholder
:
'需求单号'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
,
align
:
'flex-left'
,
}
}
...
...
@@ -923,7 +921,7 @@ export const OFFERSERAH_SCHEMA: ISchema = {
details
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求摘要'
,
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.demendDetail'
})
}
},
memberName
:
{
...
...
@@ -942,7 +940,7 @@ export const OFFERSERAH_SCHEMA: ISchema = {
externalState
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'外部状态'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.externalStatus'
})
,
style
:
{
width
:
160
}
...
...
@@ -952,7 +950,7 @@ export const OFFERSERAH_SCHEMA: ISchema = {
interiorState
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'内部状态'
,
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.innerStatus'
})
,
style
:
{
width
:
160
}
...
...
@@ -1027,7 +1025,7 @@ export const OFFERSERAHAUDIT_SCHEMA: ISchema = {
purchaseInquiryNo
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求单号'
placeholder
:
intl
.
formatMessage
({
id
:
'table.purchase.dementNo'
})
}
},
details
:
{
...
...
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