|
|
@@ -26,6 +26,12 @@ import {
|
|
|
fetchPostObj,
|
|
|
} from '../../../utils/common/fetchRequest'
|
|
|
import BillModel, {
|
|
|
+ billGetDisplay,
|
|
|
+ billGetValue,
|
|
|
+ billIsCombo,
|
|
|
+ billIsMultiDbfind,
|
|
|
+ billIsShow,
|
|
|
+ billIsSingleDbfind, getItemViewType,
|
|
|
TYPE_ADD,
|
|
|
TYPE_TAB,
|
|
|
TYPE_TITLE,
|
|
|
@@ -56,7 +62,7 @@ let mStatusField//状态字段
|
|
|
let mDetailMainKeyField//从表
|
|
|
let mDefaultMap
|
|
|
|
|
|
-let mModalList = []
|
|
|
+let mModalList, mSearchList = []
|
|
|
|
|
|
let mShowBillModels, mFormBillModels, mUpdateBillModels, mAllBillModels
|
|
|
|
|
|
@@ -139,7 +145,7 @@ class CurrencyDetail extends Component {
|
|
|
|| <Button
|
|
|
type={'primary'}
|
|
|
style={{
|
|
|
- margin: '18px 26px',
|
|
|
+ margin: '14px 24px',
|
|
|
height: '36px',
|
|
|
lineHeight: '36px',
|
|
|
fontSize: '16px',
|
|
|
@@ -169,7 +175,7 @@ class CurrencyDetail extends Component {
|
|
|
for (let i = 0; i < showBillFields.length; i++) {
|
|
|
let billModel = showBillFields[i]
|
|
|
if (!isObjNull(billModel)) {
|
|
|
- let itemViewType = this.getItemViewType(billModel.type)
|
|
|
+ let itemViewType = getItemViewType(billModel.type)
|
|
|
if (billModel.renderer == 'detailAttach') {
|
|
|
itemViewType = 2
|
|
|
}
|
|
|
@@ -270,12 +276,9 @@ class CurrencyDetail extends Component {
|
|
|
maxLength={16}
|
|
|
onChange={value => {
|
|
|
if (isObjEmpty(value)) {
|
|
|
- this.setState({
|
|
|
- modalDataSource: modalDataSource.cloneWithRows(
|
|
|
- mModalList),
|
|
|
- })
|
|
|
+ mSearchList = mModalList
|
|
|
} else {
|
|
|
- let searchList = []
|
|
|
+ mSearchList = []
|
|
|
if (!isObjEmpty(mModalList)) {
|
|
|
mModalList.forEach(item => {
|
|
|
if (!isObjNull(item)
|
|
|
@@ -288,20 +291,21 @@ class CurrencyDetail extends Component {
|
|
|
|| strContain(item.EM_POSITION, value)
|
|
|
|| strContain(item.EM_DEFAULTORNAME, value)
|
|
|
)) {
|
|
|
- searchList.push(item)
|
|
|
+ mSearchList.push(item)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- this.setState({
|
|
|
- modalDataSource: modalDataSource.cloneWithRows(
|
|
|
- searchList),
|
|
|
- })
|
|
|
}
|
|
|
+ this.setState({
|
|
|
+ modalDataSource: modalDataSource.cloneWithRows(
|
|
|
+ mSearchList),
|
|
|
+ })
|
|
|
}}
|
|
|
onClear={value => {
|
|
|
+ mSearchList = mModalList
|
|
|
this.setState({
|
|
|
modalDataSource: modalDataSource.cloneWithRows(
|
|
|
- mModalList),
|
|
|
+ mSearchList),
|
|
|
})
|
|
|
}}
|
|
|
/*onCancel={() => {
|
|
|
@@ -315,33 +319,34 @@ class CurrencyDetail extends Component {
|
|
|
dataSource={modalDataSource}
|
|
|
initialListSize={30}
|
|
|
renderRow={(rowData, sectionID, rowID) => {
|
|
|
- switch (selectType) {
|
|
|
- case SELECT_APPROVAL:
|
|
|
- return <List.Item
|
|
|
- key={rowID}
|
|
|
- wrap
|
|
|
- onClick={this.onEmployeeSelect.bind(this,
|
|
|
- rowData)}>
|
|
|
- <EmployeeItem employee={rowData}/>
|
|
|
- </List.Item>
|
|
|
- /*case 'MF':
|
|
|
- return <CheckboxItem
|
|
|
- key={rowID}
|
|
|
- checked={rowData.isSelected == true}
|
|
|
- onChange={e => {
|
|
|
- let checked = e.target.checked
|
|
|
- rowData.isSelected = checked
|
|
|
- this.setState({
|
|
|
- modalDataSource,
|
|
|
- })
|
|
|
- }}>{rowData.value}</CheckboxItem>*/
|
|
|
- default:
|
|
|
- return <List.Item
|
|
|
- key={rowID}
|
|
|
- wrap
|
|
|
- onClick={this.onDbfindSelect.bind(this,
|
|
|
- selectModel,
|
|
|
- rowData)}>{rowData.value}</List.Item>
|
|
|
+ if (selectType === SELECT_APPROVAL) {
|
|
|
+ return <List.Item
|
|
|
+ key={rowID}
|
|
|
+ wrap
|
|
|
+ onClick={this.onEmployeeSelect.bind(this,
|
|
|
+ rowData)}>
|
|
|
+ <EmployeeItem employee={rowData}/>
|
|
|
+ </List.Item>
|
|
|
+ } else if (billIsMultiDbfind(selectModel)) {
|
|
|
+ return <CheckboxItem
|
|
|
+ key={rowID}
|
|
|
+ checked={rowData.isSelected}
|
|
|
+ onChange={e => {
|
|
|
+ let checked = e.target.checked
|
|
|
+ rowData.isSelected = checked
|
|
|
+ mModalList[rowData.index].isSelected = checked
|
|
|
+ mSearchList = JSON.parse(JSON.stringify(mSearchList))
|
|
|
+ this.setState({
|
|
|
+ modalDataSource: modalDataSource.cloneWithRows(mSearchList),
|
|
|
+ })
|
|
|
+ }}>{rowData.value}</CheckboxItem>
|
|
|
+ } else {
|
|
|
+ return <List.Item
|
|
|
+ key={rowID}
|
|
|
+ wrap
|
|
|
+ onClick={this.onDbfindSelect.bind(this,
|
|
|
+ selectModel,
|
|
|
+ rowData)}>{rowData.value}</List.Item>
|
|
|
}
|
|
|
}}
|
|
|
style={{
|
|
|
@@ -352,6 +357,16 @@ class CurrencyDetail extends Component {
|
|
|
// onScroll={() => {}}
|
|
|
// scrollRenderAheadDistance={800}
|
|
|
/>
|
|
|
+ {billIsMultiDbfind(selectModel) && <Button
|
|
|
+ type={'primary'}
|
|
|
+ style={{
|
|
|
+ margin: '14px 24px',
|
|
|
+ height: '36px',
|
|
|
+ lineHeight: '36px',
|
|
|
+ fontSize: '16px',
|
|
|
+ }}
|
|
|
+ onClick={this.onDbfindSubmit.bind(this, selectModel)}>确定</Button>}
|
|
|
+
|
|
|
</Modal>
|
|
|
}
|
|
|
|
|
|
@@ -368,6 +383,26 @@ class CurrencyDetail extends Component {
|
|
|
this.approvalTakeover(emcode, nodeId)
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 多选放大镜确认
|
|
|
+ */
|
|
|
+ onDbfindSubmit = (selectModel) => {
|
|
|
+ let selectMap = {}
|
|
|
+ mModalList.forEach(item => {
|
|
|
+ if (item.isSelected) {
|
|
|
+ const selectObj = item.obj
|
|
|
+ for (let key in selectObj) {
|
|
|
+ if (key in selectMap) {
|
|
|
+ selectMap[key] = selectMap[key] + '#' + selectObj[key]
|
|
|
+ } else {
|
|
|
+ selectMap[key] = selectObj[key]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.dbfindRefresh(selectModel, selectMap)
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 放大镜选项选中
|
|
|
*/
|
|
|
@@ -376,7 +411,7 @@ class CurrencyDetail extends Component {
|
|
|
let groupIndex = selectModel.groupIndex
|
|
|
let childIndex = selectModel.childIndex
|
|
|
let selectData = rowData
|
|
|
- if (selectModel.type === 'C') {
|
|
|
+ if (billIsCombo(selectModel)) {
|
|
|
if (!isObjEmpty(billGroupList) &&
|
|
|
!isObjNull(billGroupList[groupIndex])) {
|
|
|
let billGroup = billGroupList[groupIndex]
|
|
|
@@ -390,33 +425,24 @@ class CurrencyDetail extends Component {
|
|
|
})
|
|
|
} else {
|
|
|
let dataObj = selectData.obj
|
|
|
- let isForm = selectModel.isForm
|
|
|
- if (!isObjEmpty(billGroupList) &&
|
|
|
- !isObjNull(billGroupList[groupIndex])) {
|
|
|
- if (isForm == true) {
|
|
|
- billGroupList.forEach((billGroup, index) => {
|
|
|
- if (!isObjNull(billGroup) && billGroup.isForm) {
|
|
|
- let showBillFields = billGroup.showBillFields
|
|
|
- let hideBillFields = billGroup.hideBillFields
|
|
|
- if (!isObjEmpty(showBillFields)) {
|
|
|
- showBillFields.forEach((showModel, index) => {
|
|
|
- if (showModel.field in dataObj) {
|
|
|
- showModel.value = dataObj[showModel.field]
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (!isObjEmpty(hideBillFields)) {
|
|
|
- hideBillFields.forEach((showModel, index) => {
|
|
|
- if (showModel.field in dataObj) {
|
|
|
- showModel.value = dataObj[showModel.field]
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- let billGroup = billGroupList[groupIndex]
|
|
|
- if (!isObjNull(billGroup)) {
|
|
|
+ this.dbfindRefresh(selectModel, dataObj)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * dbfind字段选中后刷新页面数据
|
|
|
+ * @param selectModel
|
|
|
+ * @param dataObj
|
|
|
+ */
|
|
|
+ dbfindRefresh (selectModel, dataObj) {
|
|
|
+ const { billGroupList } = this.state
|
|
|
+ let groupIndex = selectModel.groupIndex
|
|
|
+ let isForm = selectModel.isForm
|
|
|
+ if (!isObjEmpty(billGroupList) &&
|
|
|
+ !isObjNull(billGroupList[groupIndex])) {
|
|
|
+ if (isForm == true) {
|
|
|
+ billGroupList.forEach((billGroup, index) => {
|
|
|
+ if (!isObjNull(billGroup) && billGroup.isForm) {
|
|
|
let showBillFields = billGroup.showBillFields
|
|
|
let hideBillFields = billGroup.hideBillFields
|
|
|
if (!isObjEmpty(showBillFields)) {
|
|
|
@@ -434,18 +460,37 @@ class CurrencyDetail extends Component {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ let billGroup = billGroupList[groupIndex]
|
|
|
+ if (!isObjNull(billGroup)) {
|
|
|
+ let showBillFields = billGroup.showBillFields
|
|
|
+ let hideBillFields = billGroup.hideBillFields
|
|
|
+ if (!isObjEmpty(showBillFields)) {
|
|
|
+ showBillFields.forEach((showModel, index) => {
|
|
|
+ if (showModel.field in dataObj) {
|
|
|
+ showModel.value = dataObj[showModel.field]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (!isObjEmpty(hideBillFields)) {
|
|
|
+ hideBillFields.forEach((showModel, index) => {
|
|
|
+ if (showModel.field in dataObj) {
|
|
|
+ showModel.value = dataObj[showModel.field]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- // console.log(billGroupList)
|
|
|
- this.setState({
|
|
|
- billGroupList,
|
|
|
- modalOpen: false,
|
|
|
- selectModel: {},
|
|
|
- })
|
|
|
}
|
|
|
+ this.setState({
|
|
|
+ billGroupList,
|
|
|
+ modalOpen: false,
|
|
|
+ selectModel: {},
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
- //接管单据
|
|
|
+//接管单据
|
|
|
approvalTakeover = (emcode, nodeId) => {
|
|
|
Toast.loading('正在指定审批人', 0)
|
|
|
fetchPostForm(_baseURL + '/common/takeOverTask.action', {
|
|
|
@@ -614,15 +659,15 @@ class CurrencyDetail extends Component {
|
|
|
})
|
|
|
Toast.loading('数据请求中', 0)
|
|
|
let type = billModel.type
|
|
|
- if (type === 'C') {
|
|
|
+ if (billIsCombo(billModel)) {
|
|
|
//单项选择
|
|
|
this.getComboValue(billModel)
|
|
|
- } else if (type === 'SF' || type === 'DF') {
|
|
|
+ } else if (billIsSingleDbfind(billModel)) {
|
|
|
//DBFind选择
|
|
|
this.getDbfindList(billModel, billGroup)
|
|
|
- } else if (type === 'MF') {
|
|
|
+ } else if (billIsMultiDbfind(billModel)) {
|
|
|
//多项选择
|
|
|
-
|
|
|
+ this.getDbfindList(billModel, billGroup)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -634,6 +679,7 @@ class CurrencyDetail extends Component {
|
|
|
* @param billGroup
|
|
|
*/
|
|
|
getDbfindList (billModel, billGroup) {
|
|
|
+ console.log(billModel)
|
|
|
let fieldKey = billModel.field
|
|
|
let isForm = billGroup.isForm
|
|
|
let gridCaller = ''
|
|
|
@@ -704,15 +750,26 @@ class CurrencyDetail extends Component {
|
|
|
}
|
|
|
localData.value = this.getShowValue(showJson)
|
|
|
localData.obj = jsonMap
|
|
|
+ localData.index = index
|
|
|
+ localData.isSelected = false
|
|
|
+ if (billIsMultiDbfind(billModel) && !isObjEmpty(billModel.value)) {
|
|
|
+ const billValue = billModel.value
|
|
|
+ let valueArray = billValue.split('#')
|
|
|
+ if (valueArray.indexOf(localData.name) > -1) {
|
|
|
+ localData.isSelected = true
|
|
|
+ }
|
|
|
+ }
|
|
|
dbList.push(localData)
|
|
|
})
|
|
|
mModalList = dbList
|
|
|
if (dbList.length === 0) {
|
|
|
message.error('选项数据为空')
|
|
|
} else {
|
|
|
+ mSearchList = mModalList
|
|
|
+ console.log(mSearchList)
|
|
|
this.setState({
|
|
|
modalDataSource: this.state.modalDataSource.cloneWithRows(
|
|
|
- mModalList),
|
|
|
+ mSearchList),
|
|
|
modalOpen: true,
|
|
|
})
|
|
|
}
|
|
|
@@ -763,15 +820,18 @@ class CurrencyDetail extends Component {
|
|
|
comb.value = combObj.DISPLAY
|
|
|
comb.display = combObj.DISPLAY
|
|
|
}
|
|
|
+ comb.index = i
|
|
|
+ comb.isSelected = false
|
|
|
combList.push(comb)
|
|
|
}
|
|
|
mModalList = combList
|
|
|
if (combList.length === 0) {
|
|
|
message.error('选项数据为空')
|
|
|
} else {
|
|
|
+ mSearchList = mModalList
|
|
|
this.setState({
|
|
|
modalDataSource: this.state.modalDataSource.cloneWithRows(
|
|
|
- mModalList),
|
|
|
+ mSearchList),
|
|
|
modalOpen: true,
|
|
|
})
|
|
|
}
|
|
|
@@ -914,18 +974,21 @@ class CurrencyDetail extends Component {
|
|
|
let candidates = assignObj ? (assignObj.JP_CANDIDATES || []) : []
|
|
|
if (!isObjEmpty(nodeid) && !isObjEmpty(candidates)) {
|
|
|
let candidateList = []
|
|
|
- candidates.forEach(item => {
|
|
|
+ candidates.forEach((item, index) => {
|
|
|
let candidate = item
|
|
|
candidate.id = keyvalue
|
|
|
candidate.formcode = formcode
|
|
|
candidate.nodeId = nodeid
|
|
|
+ candidate.index = index
|
|
|
+ candidate.isSelected = false
|
|
|
|
|
|
candidateList.push(candidate)
|
|
|
})
|
|
|
mModalList = candidateList
|
|
|
+ mSearchList = mModalList
|
|
|
this.setState({
|
|
|
modalDataSource: this.state.modalDataSource.cloneWithRows(
|
|
|
- candidateList),
|
|
|
+ mSearchList),
|
|
|
selectModel: {
|
|
|
caption: '选择审批人',
|
|
|
type: SELECT_APPROVAL,
|
|
|
@@ -963,14 +1026,14 @@ class CurrencyDetail extends Component {
|
|
|
if (isObjNull(billModel)) {
|
|
|
continue
|
|
|
}
|
|
|
- if (isObjEmpty(this.getValue(billModel)) &&
|
|
|
+ if (isObjEmpty(billGetValue(billModel)) &&
|
|
|
billModel.isdefault && !billModel.allowBlank) {
|
|
|
message.error(`${billModel.caption}为必填项`)
|
|
|
return null
|
|
|
}
|
|
|
//Todo 附件上传
|
|
|
|
|
|
- formStore[billModel.field] = this.getDisplay(billModel)
|
|
|
+ formStore[billModel.field] = billGetDisplay(billModel)
|
|
|
}
|
|
|
return formStore
|
|
|
} else {
|
|
|
@@ -987,14 +1050,14 @@ class CurrencyDetail extends Component {
|
|
|
let gridStore = {}
|
|
|
for (let j = 0; j < gridFields.length; j++) {
|
|
|
let billModel = gridFields[j]
|
|
|
- if (isObjEmpty(this.getValue(billModel))
|
|
|
+ if (isObjEmpty(billGetValue(billModel))
|
|
|
&& billModel.isdefault && !billModel.allowBlank) {
|
|
|
message.error(`${billModel.caption}为必填项`)
|
|
|
return null
|
|
|
}
|
|
|
//Todo 附件上传
|
|
|
|
|
|
- gridStore[billModel.field] = this.getDisplay(billModel)
|
|
|
+ gridStore[billModel.field] = billGetDisplay(billModel)
|
|
|
}
|
|
|
gridStoreList.push(gridStore)
|
|
|
}
|
|
|
@@ -1126,7 +1189,7 @@ class CurrencyDetail extends Component {
|
|
|
minDetno = billModel.detno
|
|
|
}
|
|
|
mapBillGroupModel.minDetno = minDetno
|
|
|
- if (this.isShow(billModel)) {
|
|
|
+ if (billIsShow(billModel)) {
|
|
|
mapBillGroupModel.addShow(billModel)
|
|
|
} else {
|
|
|
mapBillGroupModel.addHide(billModel)
|
|
|
@@ -1139,7 +1202,7 @@ class CurrencyDetail extends Component {
|
|
|
modelMap[group] = mapBillGroupModel
|
|
|
|
|
|
billModel.groupIndex = mapBillGroupModel.groupIndex
|
|
|
- if (this.isShow(billModel)) {
|
|
|
+ if (billIsShow(billModel)) {
|
|
|
mapBillGroupModel.addShow(billModel)
|
|
|
} else {
|
|
|
mapBillGroupModel.addHide(billModel)
|
|
|
@@ -1173,7 +1236,7 @@ class CurrencyDetail extends Component {
|
|
|
let billModel = this.getBillModelByObject(formdetail[i])
|
|
|
if (!isObjNull(billModel)) {
|
|
|
billModel.groupIndex = index
|
|
|
- if (this.isShow(billModel)) {
|
|
|
+ if (billIsShow(billModel)) {
|
|
|
showBillFields.push(billModel)
|
|
|
} else {
|
|
|
hideBillFields.push(billModel)
|
|
|
@@ -1216,7 +1279,7 @@ class CurrencyDetail extends Component {
|
|
|
}
|
|
|
|
|
|
billModel.groupIndex = billGroupModel.groupIndex
|
|
|
- if (this.isShow(billModel)) {
|
|
|
+ if (billIsShow(billModel)) {
|
|
|
billGroupModel.addShow(billModel)
|
|
|
} else {
|
|
|
billGroupModel.addHide(billModel)
|
|
|
@@ -1232,7 +1295,7 @@ class CurrencyDetail extends Component {
|
|
|
modelMap[`明细${group}`] = billGroupModel
|
|
|
|
|
|
billModel.groupIndex = billGroupModel.groupIndex
|
|
|
- if (this.isShow(billModel)) {
|
|
|
+ if (billIsShow(billModel)) {
|
|
|
billGroupModel.addShow(billModel)
|
|
|
} else {
|
|
|
billGroupModel.addHide(billModel)
|
|
|
@@ -1281,6 +1344,23 @@ class CurrencyDetail extends Component {
|
|
|
allowBlank = 'F'
|
|
|
}
|
|
|
|
|
|
+ billModel.findFunctionName = findFunctionName
|
|
|
+ billModel.detno = fd_detno
|
|
|
+ billModel.caption = caption
|
|
|
+ billModel.id = id
|
|
|
+ billModel.length = length
|
|
|
+ billModel.appwidth = appwidth
|
|
|
+ billModel.isdefault = isdefault
|
|
|
+ billModel.dbfind = dbfind
|
|
|
+ billModel.type = type
|
|
|
+ billModel.logicType = logicType
|
|
|
+ billModel.readOnly = readOnly
|
|
|
+ billModel.field = field
|
|
|
+ billModel.defValue = defValue
|
|
|
+ billModel.allowBlank = allowBlank
|
|
|
+ billModel.updatable = (updatable === 'T')
|
|
|
+ billModel.renderer = renderer
|
|
|
+
|
|
|
let display = ''
|
|
|
let combostore = object.COMBOSTORE
|
|
|
if (!isObjEmpty(combostore)) {
|
|
|
@@ -1294,7 +1374,7 @@ class CurrencyDetail extends Component {
|
|
|
localData.display = dlc_display
|
|
|
localData.value = dlc_value
|
|
|
|
|
|
- if (type === 'C'
|
|
|
+ if (billIsCombo(billModel)
|
|
|
&& !isObjEmpty(value)
|
|
|
&& (value == dlc_display || value == dlc_value)) {
|
|
|
value = dlc_value
|
|
|
@@ -1305,24 +1385,8 @@ class CurrencyDetail extends Component {
|
|
|
billModel.localDatas = localDatas
|
|
|
}
|
|
|
|
|
|
- billModel.findFunctionName = findFunctionName
|
|
|
- billModel.detno = fd_detno
|
|
|
- billModel.caption = caption
|
|
|
- billModel.id = id
|
|
|
billModel.value = value
|
|
|
billModel.display = display
|
|
|
- billModel.length = length
|
|
|
- billModel.appwidth = appwidth
|
|
|
- billModel.isdefault = isdefault
|
|
|
- billModel.dbfind = dbfind
|
|
|
- billModel.type = type
|
|
|
- billModel.logicType = logicType
|
|
|
- billModel.readOnly = readOnly
|
|
|
- billModel.field = field
|
|
|
- billModel.defValue = defValue
|
|
|
- billModel.allowBlank = allowBlank
|
|
|
- billModel.updatable = (updatable === 'T')
|
|
|
- billModel.renderer = renderer
|
|
|
|
|
|
return billModel
|
|
|
}
|
|
|
@@ -1403,10 +1467,6 @@ class CurrencyDetail extends Component {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- isShow = (billModel) => (
|
|
|
- billModel.isdefault && billModel.type !== 'H'
|
|
|
- )
|
|
|
-
|
|
|
getAddModel = index => {
|
|
|
let addBillModel = new BillModel()
|
|
|
addBillModel.groupIndex = index
|
|
|
@@ -1414,38 +1474,6 @@ class CurrencyDetail extends Component {
|
|
|
addBillModel.caption = '添加单据'
|
|
|
return addBillModel
|
|
|
}
|
|
|
-
|
|
|
- getItemViewType = dfType => {
|
|
|
- if (isObjEmpty(dfType)) {
|
|
|
- return -1
|
|
|
- }
|
|
|
- switch (dfType.toUpperCase()) {
|
|
|
- case TYPE_TITLE:
|
|
|
- return 0
|
|
|
- case TYPE_ADD:
|
|
|
- return 110
|
|
|
- case TYPE_TAB:
|
|
|
- return 111
|
|
|
- case 'C':
|
|
|
- case 'SF':
|
|
|
- case 'DF':
|
|
|
- case 'S':
|
|
|
- case 'SS':
|
|
|
- return 1
|
|
|
- case 'FF':
|
|
|
- return 2
|
|
|
- default:
|
|
|
- return 1
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- getValue = (billModel) => (
|
|
|
- billModel.value || billModel.defValue || ''
|
|
|
- )
|
|
|
-
|
|
|
- getDisplay = (billModel) => {
|
|
|
- return billModel.display || this.getValue(billModel)
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
let mapStateToProps = (state) => ({
|