|
@@ -155,12 +155,12 @@ const GCsheet: React.FC<iTableContentPorps> = ({ modalHandler, row, setRow }) =>
|
|
|
width: '15%',
|
|
|
// eslint-disable-next-line react/display-name
|
|
|
render: (text: string, row: iIncomeTree) => {
|
|
|
- // if (row.isEdit) {
|
|
|
- // return <Input value={row.serial} addonBefore={row.attribution} size="small"></Input>
|
|
|
- // } else {
|
|
|
- // return <span>{row.code}</span>
|
|
|
- // }
|
|
|
- return <span>{row.code}</span>
|
|
|
+ if (row.isEdit) {
|
|
|
+ return <Input value={row.serial} addonBefore={row.attribution} size="small" style={{ width: 30 }}></Input>
|
|
|
+ } else {
|
|
|
+ return <span>{row.code}</span>
|
|
|
+ }
|
|
|
+ // return <span>{row.code}</span>
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -168,7 +168,7 @@ const GCsheet: React.FC<iTableContentPorps> = ({ modalHandler, row, setRow }) =>
|
|
|
dataIndex: 'name',
|
|
|
render: (text:any, record: iIncomeTree) => {
|
|
|
if (record.isEdit) {
|
|
|
- return <Input value={record.name} size="small" type="text" ref={inputEl} onPressEnter={() => newLabelHandler('name', { id: record.parentId, bidsectionId: record.bidsectionId })} onBlur={() => newLabelHandler('name', { id: record.parentId, bidsectionId: record.bidsectionId })}></Input>
|
|
|
+ return <Input defaultValue={record.name} size="small" type="text" ref={inputEl} onPressEnter={() => newLabelHandler('name', { id: record.parentId, bidsectionId: record.bidsectionId })} onBlur={() => newLabelHandler('name', { id: record.parentId, bidsectionId: record.bidsectionId })}></Input>
|
|
|
} else {
|
|
|
return <span>{text}</span>
|
|
|
}
|
|
@@ -211,7 +211,13 @@ const GCsheet: React.FC<iTableContentPorps> = ({ modalHandler, row, setRow }) =>
|
|
|
...sectionTemplate,
|
|
|
loading: true
|
|
|
})
|
|
|
- if (!sectionTemplate.template) return message.error('请选择项目节模板!')
|
|
|
+ if (!sectionTemplate.template) {
|
|
|
+ setSectionTemplate({
|
|
|
+ ...sectionTemplate,
|
|
|
+ loading: false
|
|
|
+ })
|
|
|
+ return message.error('请选择项目节模板!')
|
|
|
+ }
|
|
|
const { code = -1 } = await apiSetTemplate(sectionTemplate.template, tenderStore.bidsectionId)
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
await initHandler()
|
|
@@ -235,8 +241,9 @@ const GCsheet: React.FC<iTableContentPorps> = ({ modalHandler, row, setRow }) =>
|
|
|
const onClickRow = (record: iIncomeTree) => {
|
|
|
return {
|
|
|
onClick() {
|
|
|
- console.log(record.id)
|
|
|
-
|
|
|
+ setRow(record)
|
|
|
+ },
|
|
|
+ onDoubleClick() {
|
|
|
rowClickHandler(record.id, record.bidsectionId, record.isEdit)
|
|
|
}
|
|
|
}
|