借料入库大调整
This commit is contained in:
		
							parent
							
								
									687aa7765c
								
							
						
					
					
						commit
						8139749fe1
					
				|  | @ -2,10 +2,10 @@ import {ajax, base, toast} from 'nc-lightapp-front'; | |||
| import {AREA, DIALOGCODE, FIELD, URL} from '../../constance'; | ||||
| import {showWarningInfo} from '../../../../../mmpub/mmpub/pub/tool/messageUtil'; | ||||
| import PickmBorrowDlg from "../../pickmborrow/list"; | ||||
| import {borrowOkBtnClick} from "./index"; | ||||
| 
 | ||||
| let {NCModal, NCButton, NCTooltip, NCHotKeys} = base; | ||||
| 
 | ||||
| const TABLE_HEAD = 'borrow_list'; | ||||
| export default function borrowBtnClick(props, record) { | ||||
|     let _this = this; | ||||
|     this.props = {}; | ||||
|  | @ -40,7 +40,7 @@ export default function borrowBtnClick(props, record) { | |||
|         success: res => { | ||||
|             if (res.success && res.data) { | ||||
|                 let showData = res.data.data; | ||||
|                 props.modal.show('BorrowDlg', { | ||||
|                 props.modal.show(AREA.BORROW_DLG, { | ||||
|                     size: 'max', | ||||
|                     title: '借料入库明细', | ||||
|                     content: <PickmBorrowDlg showdata={showData} | ||||
|  | @ -48,53 +48,12 @@ export default function borrowBtnClick(props, record) { | |||
|                     userControl: true, | ||||
|                     // leftBtnName: '',
 | ||||
|                     // rightBtnName: getLangByResId(this, '5008Pickm-000013'),/* 国际化处理: 取消*/
 | ||||
|                     beSureBtnClick: oKBtnClicks.bind(this, props, true), | ||||
|                     beSureBtnClick: borrowOkBtnClick.bind(this, props, true), | ||||
|                     cancelBtnClick: () => { | ||||
|                         props.modal.close('BorrowDlg'); | ||||
|                         props.modal.close(AREA.BORROW_DLG); | ||||
|                     } | ||||
|                 }); | ||||
|             } | ||||
|         } | ||||
|     }); | ||||
| } | ||||
| 
 | ||||
| function oKBtnClicks(props) { | ||||
|     let rowids = []; | ||||
|     let hids = []; | ||||
|     let hid; | ||||
|     let rows = props.table.getCheckedRows(TABLE_HEAD); | ||||
|     hid = props.form.getFormItemsValue(AREA.formArea, FIELD.hid).value; | ||||
|     hids.push(hid); | ||||
|     // 如果没有选中行,则提示并返回,不进行任何操作
 | ||||
|     if (!rows || rows.length <= 0) { | ||||
|         showWarningInfo('请选择行'); | ||||
|         return; | ||||
|     } | ||||
|     for (let i = 0; i < rows.length; i++) { | ||||
|         rowids.push(rows[i].data.values.cpickm_bid.value); | ||||
|     } | ||||
|     let data = { | ||||
|         cpickmids: hids, | ||||
|         cpickmbids: rowids, | ||||
|         rows: rows | ||||
|     } | ||||
|     console.log('data = ', data); | ||||
|     ajax({ | ||||
|         url: URL.convertOtherIn, | ||||
|         data: data, | ||||
|         success: res => { | ||||
|             if (res.success && res.data) { | ||||
|                 if (res.success) { | ||||
|                     toast({color: 'success', title: "操作成功"}); | ||||
|                     this.props.modal.close(TABLE_HEAD); | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
|         error: (error) => { | ||||
|             toast({ | ||||
|                 color: 'warning', | ||||
|                 content: error.message | ||||
|             }); | ||||
|         } | ||||
|     }); | ||||
| } | ||||
|  |  | |||
|  | @ -0,0 +1,62 @@ | |||
| import {ajax, base, toast} from 'nc-lightapp-front'; | ||||
| import {AREA, FIELD, URL} from '../../constance'; | ||||
| import {showWarningInfo} from '../../../../../mmpub/mmpub/pub/tool/messageUtil'; | ||||
| 
 | ||||
| let {NCModal, NCButton, NCTooltip, NCHotKeys} = base; | ||||
| 
 | ||||
| export default function borrowOkBtnClick(props) { | ||||
|     let rowids = []; | ||||
|     let hids = []; | ||||
|     let hid; | ||||
|     let rows = this.props.editTable.getCheckedRows(AREA.borrowList); | ||||
|     hid = props.form.getFormItemsValue(AREA.formArea, FIELD.hid).value; | ||||
|     hids.push(hid); | ||||
|     // 如果没有选中行,则提示并返回,不进行任何操作
 | ||||
|     if (!rows || rows.length <= 0) { | ||||
|         showWarningInfo('请选择行'); | ||||
|         return; | ||||
|     } | ||||
|     for (let i = 0; i < rows.length; i++) { | ||||
|         rowids.push(rows[i].data.values.cpickm_bid.value); | ||||
|     } | ||||
|     let newRows = rows.map((item) => { | ||||
|         return { | ||||
|             cpickm_bid: item.data.values.cpickm_bid.value || '', | ||||
|             pk_batchcode: item.data.values.pk_batchcode.value || '', | ||||
|             vbatchcode: item.data.values.vbatchcode.value || '', | ||||
|             cprojectid: item.data.values.cprojectid.value || '', | ||||
|             cproductorid: item.data.values.cproductorid.value || '' | ||||
|         }; | ||||
|     }); | ||||
|     let data = { | ||||
|         cpickmids: hids, | ||||
|         cpickmbids: rowids, | ||||
|         rows: newRows | ||||
|     } | ||||
|     // console.log('data = ', data);
 | ||||
|     ajax({ | ||||
|         url: URL.convertOtherIn, | ||||
|         data: data, | ||||
|         success: res => { | ||||
|             if (res.success && res.data) { | ||||
|                 // console.log('res.data = ', res.data);
 | ||||
|                 let msg = ',单号:'; | ||||
|                 if (res.data.data) { | ||||
|                     msg = msg + res.data.data.map((item) => { | ||||
|                         return item.parent.valueIndex.vbillcode; | ||||
|                     }).join(','); | ||||
|                 } else { | ||||
|                     msg = ''; | ||||
|                 } | ||||
|                 toast({color: 'success', title: "操作成功" + msg}); | ||||
|                 props.modal.close(AREA.BORROW_DLG); | ||||
|             } | ||||
|         }, | ||||
|         error: (error) => { | ||||
|             toast({ | ||||
|                 color: 'warning', | ||||
|                 content: error.message | ||||
|             }); | ||||
|         } | ||||
|     }); | ||||
| } | ||||
|  | @ -24,10 +24,12 @@ import reserveBtnClick from './reserveBtnClick'; | |||
| import reserveQueryBtnClick from './reserveQueryBtnClick'; | ||||
| import detailqueryBtnClick from './detailqueryBtnClick'; | ||||
| import pushrzmsBtnClick from './pushrzmsBtnClick.js'; //推送锐制
 | ||||
| import borrowBtnClick from './borrowBtnClick.js'; | ||||
| import borrowOkBtnClick from "./borrowOkBtnClick.js"; | ||||
| export { | ||||
|     pageInfoClick, getParentURlParme, setBtnShow, backBtnClick, addBtnClick, delBtnClick, | ||||
|     editBtnClick, cancelBtnClick, saveBtnClick, saveCommitBtnClick, copyBtnClick, | ||||
|     commitBtnClick, unCommitBtnClick, printBtnClick, outputBtnClick, subItemsBtnClick, | ||||
|     finishBtnClick, unfinishBtnClick, clqueryBtnClick, replaceBtnClick,reserveBtnClick,reserveQueryBtnClick,detailqueryBtnClick, | ||||
|     pageInfoClickPage,pushrzmsBtnClick | ||||
|     pageInfoClickPage,pushrzmsBtnClick, borrowBtnClick, borrowOkBtnClick | ||||
| }; | ||||
|  |  | |||
|  | @ -274,7 +274,7 @@ class PickmCard extends Component { | |||
|                 {createModal('ReplaceDlg', {zIndex: "300"})} | ||||
|                 {createModal('BorrowDlg', {zIndex: "300"})} | ||||
| 
 | ||||
|                 {createModal(AREA.borrowMaterialDialog, { | ||||
|                 {/*{createModal(AREA.borrowMaterialDialog, { | ||||
|                     title: '借料入库明细', | ||||
|                     content: ( | ||||
|                         <div class="flex-container" style={{height: '100%'}}> | ||||
|  | @ -317,7 +317,7 @@ class PickmCard extends Component { | |||
|                         this.props.modal.close(AREA.borrowMaterialDialog) | ||||
|                     }, | ||||
|                     userControl: true | ||||
|                 })} | ||||
|                 })}*/} | ||||
|                 <div> | ||||
|                     <ReserveQuery | ||||
|                         show={this.state.showReserveQuery} | ||||
|  |  | |||
|  | @ -11,7 +11,8 @@ const AREA = { | |||
|     cardBodyBtnArea: 'card_body', //卡片表体按钮区域
 | ||||
|     cardBodyInnerBtnArea: 'card_body_inner', //卡片表体操作按钮区域
 | ||||
|     borrowMaterialDialog: 'NCTable_83c3abf9', //借料弹窗
 | ||||
|     borrowList: 'borrow_list' //借料弹窗
 | ||||
|     borrowList: 'borrow_list', //借料弹窗页面编码
 | ||||
|     BORROW_DLG: 'BorrowDlg' //借料入库
 | ||||
| }; | ||||
| const MANUFACTURE = 'fa';//製造場景
 | ||||
| 
 | ||||
|  | @ -216,6 +217,7 @@ const URL = { | |||
|     queryByCondURL:'/nccloud/mmpac/pickm/queryByCond.do', | ||||
|     convertOtherIn:'/nccloud/mmpac/pickm/convertOtherIn.do', | ||||
|     pickmItemsQuery:'/nccloud/mmpac/pickm/pickmItemsQuery.do', | ||||
|     pickmIdsQuery:'/nccloud/mmpac/pickm/pickmByIdsQuery.do', | ||||
|     pushrzmsURL:'/nccloud/mmpac/pickm/pushrzmes.do' | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -337,7 +337,8 @@ class PickmList extends Component { | |||
| 				{createModal('BackDeliverDlg')} | ||||
| 				{createModal('BackSerialnoDlg')} | ||||
| 				{createModal('SetBackDeliverDlg')} | ||||
| 				{createModal('NCTable_3c81fe87', { | ||||
| 				{createModal('BorrowDlg')} | ||||
| 				{/*{createModal('NCTable_3c81fe87', { | ||||
|                     title: '借料入库明细', | ||||
|                     content: ( | ||||
|                         <div class="flex-container" style={{height: '100%'}}> | ||||
|  | @ -389,7 +390,7 @@ class PickmList extends Component { | |||
|                         this.props.modal.close('NCTable_3c81fe87') | ||||
|                     }, | ||||
|                     userControl: true | ||||
|                 })}        | ||||
|                 })}*/} | ||||
| 			</div> | ||||
| 		); | ||||
| 	} | ||||
|  |  | |||
|  | @ -1,22 +1,36 @@ | |||
| import { LIST_BTN, PAGECODE, AREA, FIELD, UISTATE, URL, ListTabCode, PickmCache, PAGECARDCODE, DIALOGCODE, appcode } from '../../constance'; | ||||
| import { | ||||
|     LIST_BTN, | ||||
|     PAGECODE, | ||||
|     AREA, | ||||
|     FIELD, | ||||
|     UISTATE, | ||||
|     URL, | ||||
|     ListTabCode, | ||||
|     PickmCache, | ||||
|     PAGECARDCODE, | ||||
|     DIALOGCODE, | ||||
|     appcode, FbillStatus | ||||
| } from '../../constance'; | ||||
| import { | ||||
|     commonSearch, searchBtnClick, deleteBtnClick, commitBtnClick, uncommitBtnClick, printBtnClick, outputBtnClick, | ||||
|     finishBtnClick, unfinishBtnClick, clqueryBtnClick | ||||
| } from '../btnClicks/index'; | ||||
| import { setDefData, getDefData } from '../../../../../mmpub/mmpub/pub/cache'; | ||||
| import { pickmSetDeliver } from '../../../pub/pickmdeliverwithset'; | ||||
| import { pickmBackDeliver } from '../../../pub/pickmbackdeliver'; | ||||
| import { pickmBackDeliverWithSet } from '../../../pub/pickmbackdeliverwithset'; | ||||
| import { clearTransferCache } from '../../../../../mmpub/mmpub/pub/cache'; | ||||
| import { getLangByResId } from '../../../../../mmpub/mmpub/pub/tool/multiLangUtil'; | ||||
| import { tableBeforeEdit } from '../../../../../mmpub/mmpub/pub/tool/listBeforeEditCardUtil'; | ||||
| import {setDefData, getDefData} from '../../../../../mmpub/mmpub/pub/cache'; | ||||
| import {pickmSetDeliver} from '../../../pub/pickmdeliverwithset'; | ||||
| import {pickmBackDeliver} from '../../../pub/pickmbackdeliver'; | ||||
| import {pickmBackDeliverWithSet} from '../../../pub/pickmbackdeliverwithset'; | ||||
| import {clearTransferCache} from '../../../../../mmpub/mmpub/pub/cache'; | ||||
| import {getLangByResId} from '../../../../../mmpub/mmpub/pub/tool/multiLangUtil'; | ||||
| import {tableBeforeEdit} from '../../../../../mmpub/mmpub/pub/tool/listBeforeEditCardUtil'; | ||||
| import { | ||||
|     showWarningInfo | ||||
| } from '../../../../../mmpub/mmpub/pub/tool/messageUtil'; | ||||
| 
 | ||||
| import listbuttonController from '../viewController/buttonController'; | ||||
| import { updateCacheDataForList } from '../../../../../mmpub/mmpub/pub/cache'; | ||||
| import { ajax, cacheTools,toast } from 'nc-lightapp-front'; | ||||
| import {updateCacheDataForList} from '../../../../../mmpub/mmpub/pub/cache'; | ||||
| import {ajax, cacheTools, toast} from 'nc-lightapp-front'; | ||||
| import PickmBorrowDlg from "../../pickmborrow/list"; | ||||
| import {borrowOkBtnClick} from "../../card/btnClicks"; | ||||
| 
 | ||||
| export default function (props, key, text, record, index) { | ||||
|     let pk = null; | ||||
|  | @ -40,7 +54,7 @@ export default function (props, key, text, record, index) { | |||
|             searchBtnClick.call(this); | ||||
|             break; | ||||
|         case LIST_BTN.Add: // 新增
 | ||||
|             props.pushTo(URL.cardURL, { status: UISTATE.add }); | ||||
|             props.pushTo(URL.cardURL, {status: UISTATE.add}); | ||||
|             break; | ||||
|         case LIST_BTN.Edit: // 修改
 | ||||
|             let canDoEdit = tableBeforeEdit.call( | ||||
|  | @ -55,13 +69,11 @@ export default function (props, key, text, record, index) { | |||
|             if (canDoEdit) { | ||||
|                 let data; | ||||
|                 if (record && record.cpickmid) { | ||||
|                     data = { cpickmid: record.cpickmid.value, pageid: PAGECARDCODE, appcode: props.getAppCode() }; | ||||
|                 } | ||||
|                 else { | ||||
|                     data = {cpickmid: record.cpickmid.value, pageid: PAGECARDCODE, appcode: props.getAppCode()}; | ||||
|                 } else { | ||||
|                     if (rows.length == 1) { | ||||
|                         data = { cpickmid: rowsdata[0].pks, pageid: PAGECARDCODE }; | ||||
|                     } | ||||
|                     else { | ||||
|                         data = {cpickmid: rowsdata[0].pks, pageid: PAGECARDCODE}; | ||||
|                     } else { | ||||
|                         showWarningInfo(getLangByResId(this, '5008Pickm-000083'));/* 国际化处理: 请选中一行进行操作!*/ | ||||
|                     } | ||||
|                 } | ||||
|  | @ -69,7 +81,7 @@ export default function (props, key, text, record, index) { | |||
|                     url: URL.editCardInfoURL, | ||||
|                     data: data, | ||||
|                     success: (res) => { | ||||
|                         props.pushTo(URL.cardURL, { status: UISTATE.edit, id: record.cpickmid.value }); | ||||
|                         props.pushTo(URL.cardURL, {status: UISTATE.edit, id: record.cpickmid.value}); | ||||
|                     } | ||||
|                 }); | ||||
|             } | ||||
|  | @ -77,12 +89,10 @@ export default function (props, key, text, record, index) { | |||
|         case LIST_BTN.Copy: // 复制
 | ||||
|             if (record && record.cpickmid) { | ||||
|                 pk = record && record.cpickmid && record.cpickmid.value; | ||||
|             } | ||||
|             else { | ||||
|             } else { | ||||
|                 if (rows.length == 1) { | ||||
|                     pk = rowsdata[0].pks; | ||||
|                 } | ||||
|                 else { | ||||
|                 } else { | ||||
|                     showWarningInfo(getLangByResId(this, '5008Pickm-000083'));/* 国际化处理: 请选中一行进行操作!*/ | ||||
|                 } | ||||
|             } | ||||
|  | @ -108,8 +118,7 @@ export default function (props, key, text, record, index) { | |||
|                     cpickmid: record.cpickmid.value, | ||||
|                     vtrantypecode: record.vbusitype.value | ||||
|                 }); | ||||
|             } | ||||
|             else { | ||||
|             } else { | ||||
|                 let rows = props.table.getCheckedRows(AREA.tableArea); | ||||
|                 // 如果没有选中行,则提示并返回,不进行任何操作
 | ||||
|                 if (rows.length <= 0) { | ||||
|  | @ -142,7 +151,7 @@ export default function (props, key, text, record, index) { | |||
|             break; | ||||
|         case LIST_BTN.LinkQuery: // 单据追溯
 | ||||
|             pk = this.props.table.getCheckedRows(AREA.tableArea)[0].data.values.cpickmid.value; | ||||
|             this.setState({ cpickmid: pk, showTrack: true }); | ||||
|             this.setState({cpickmid: pk, showTrack: true}); | ||||
|             break; | ||||
|         case LIST_BTN.Refresh: // 刷新
 | ||||
|             let tabCode = getDefData.call(this, PickmCache.PickmCacheKey, PickmCache.PickmListTabCode); | ||||
|  | @ -452,11 +461,11 @@ export default function (props, key, text, record, index) { | |||
|                 cpickmids: cpickmids | ||||
|             } | ||||
|             ajax({ | ||||
|                 url:'/nccloud/mmpac/pickm/buyingreq.do', | ||||
|                 url: '/nccloud/mmpac/pickm/buyingreq.do', | ||||
|                 data: data, | ||||
|                 success: (res) => { | ||||
|                     if(res.success){ | ||||
|                         toast({ content: "请购单推送成功", color: 'success' }); | ||||
|                     if (res.success) { | ||||
|                         toast({content: "请购单推送成功", color: 'success'}); | ||||
|                     } | ||||
|                 } | ||||
|             }); | ||||
|  | @ -473,6 +482,14 @@ export default function (props, key, text, record, index) { | |||
|                     ); | ||||
|                     return; | ||||
|                 } | ||||
|                 // 判断是否存在非审核通过状态的单据,存在则提示并返回
 | ||||
|                 for (let i = 0; i < rows.length; i++) { | ||||
|                     let row = rows[i]; | ||||
|                     if (row.data.values.fbillstatus.value != FbillStatus.approved) { | ||||
|                         showWarningInfo('存在非审核通过状态的单据,请检查'); | ||||
|                         return; | ||||
|                     } | ||||
|                 } | ||||
|                 rows.forEach((row) => { | ||||
|                     let pk = row.data.values.cpickmid.value; | ||||
|                     if (pk) { | ||||
|  | @ -483,14 +500,28 @@ export default function (props, key, text, record, index) { | |||
|             data = { | ||||
|                 pks: cpickmids | ||||
|             } | ||||
|             let setProps = (val) => { | ||||
|                 this.props = val; | ||||
|             } | ||||
|             ajax({ | ||||
|                 url: '/nccloud/mmpac/pickm/pickmByIdsQuery.do', | ||||
|                 url: URL.pickmIdsQuery, | ||||
|                 data: data, | ||||
|                 success: (res) => { | ||||
|                     if(res.success){ | ||||
|                         props.table.setAllTableData("NCTable_3c81fe87", res.data.data);//[0].card_body.rows
 | ||||
|                         props.modal.show("NCTable_3c81fe87"); | ||||
|                         toast({ content: "查询成功", color: 'success' }); | ||||
|                     if (res.success) { | ||||
|                         let showData = res.data.data; | ||||
|                         props.modal.show(AREA.BORROW_DLG, { | ||||
|                             size: 'max', | ||||
|                             title: '借料入库明细', | ||||
|                             content: <PickmBorrowDlg showdata={showData} | ||||
|                                                      setProps={setProps}/>, | ||||
|                             userControl: true, | ||||
|                             // leftBtnName: '',
 | ||||
|                             // rightBtnName: getLangByResId(this, '5008Pickm-000013'),/* 国际化处理: 取消*/
 | ||||
|                             beSureBtnClick: borrowOkBtnClick.bind(this, props, true), | ||||
|                             cancelBtnClick: () => { | ||||
|                                 props.modal.close(AREA.BORROW_DLG); | ||||
|                             } | ||||
|                         }); | ||||
|                     } | ||||
|                 } | ||||
|             }); | ||||
|  | @ -521,8 +552,8 @@ export default function (props, key, text, record, index) { | |||
|                 url: '/nccloud/mmpac/pickm/pom.do', | ||||
|                 data: data, | ||||
|                 success: (res) => { | ||||
|                     if(res.success){ | ||||
|                         toast({ content: "流程生产订单推送成功", color: 'success' }); | ||||
|                     if (res.success) { | ||||
|                         toast({content: "流程生产订单推送成功", color: 'success'}); | ||||
|                     } | ||||
|                 } | ||||
|             }); | ||||
|  |  | |||
|  | @ -1,4 +1,6 @@ | |||
| import {AREA} from "../../../constance"; | ||||
| 
 | ||||
| export default async function headAfterEvent(props, moduleId, key, value, changedrows, i) { | ||||
|     let headData = props.editTable.getAllData('replace_head', true); | ||||
|     this.props.setHeadDatas(headData); | ||||
|     // let headData = props.editTable.getAllData(AREA.borrowList, true);
 | ||||
|     // this.props.setHeadDatas(headData);
 | ||||
| } | ||||
|  |  | |||
|  | @ -1,15 +1,14 @@ | |||
| 
 | ||||
| export default function headBeforeEvent(props, moduleId, item, index, value, record) { | ||||
|     let key = item.attrcode; | ||||
|     let editFields = ['freplacetype']; | ||||
|     if (!editFields.includes(key)) { | ||||
|         return false; | ||||
|     } | ||||
|     else if (key == 'freplacetype') { | ||||
|     } else if (key == 'freplacetype') { | ||||
|         //以替代的备料计划表体不能修改替代类型
 | ||||
|         let replaceInfo = props.editTable.getValByKeyAndIndex(moduleId, index, 'freplaceinfo').value; | ||||
|         if (replaceInfo == 2) { | ||||
|             return false; | ||||
|         } | ||||
|     } return true; | ||||
|     } | ||||
|     return true; | ||||
| } | ||||
|  |  | |||
|  | @ -3,16 +3,15 @@ import {base, createPage, high} from 'nc-lightapp-front'; | |||
| import {initTemplate} from './init'; | ||||
| import {initLang} from '../../../../../mmpub/mmpub/pub/tool/multiLangUtil'; | ||||
| import {headAfterEvent} from './events'; | ||||
| import {DIALOGCODE} from "../../constance"; | ||||
| import {DIALOGCODE, AREA} from "../../constance"; | ||||
| 
 | ||||
| const {Refer} = high; | ||||
| const {NCModal} = base; | ||||
| const TABLE_HEAD = 'borrow_list'; | ||||
| 
 | ||||
| class PickmBorrowDlg extends Component { | ||||
|     constructor(props) { | ||||
|         super(props); | ||||
|         props.use.editTable(TABLE_HEAD); | ||||
|         props.use.editTable(AREA.borrowList); | ||||
|         this.state = { | ||||
|             totalRepNum: {} | ||||
|         }; | ||||
|  | @ -26,7 +25,7 @@ class PickmBorrowDlg extends Component { | |||
|     //请求列表数据
 | ||||
|     initData = () => { | ||||
|         let showdata = this.props.showdata; | ||||
|         this.props.editTable.setTableData(TABLE_HEAD, showdata.borrow_list); | ||||
|         this.props.editTable.setTableData(AREA.borrowList, showdata.borrow_list); | ||||
|         this.props.setProps(this.props); | ||||
|     }; | ||||
| 
 | ||||
|  | @ -35,15 +34,15 @@ class PickmBorrowDlg extends Component { | |||
|         let {createEditTable} = editTable; | ||||
|         return <div class="flex-container" style={{height: '100%'}}> | ||||
|             <div className='flex-container'> | ||||
|                 {createEditTable(TABLE_HEAD, { | ||||
|                     showIndex: true, | ||||
|                 {createEditTable(AREA.borrowList, { | ||||
|                     showIndex: false, | ||||
|                     // height: 100,
 | ||||
|                     // onRowClick: this.onRowClick.bind(this),
 | ||||
|                     // onRowDoubleClick: this.onRowDoubleClick.bind(this),
 | ||||
|                     // onBeforeEvent: headBeforeEvent.bind(this),
 | ||||
|                     onAfterEvent: headAfterEvent.bind(this), | ||||
|                     isAddRow: false, | ||||
|                     showCheck: false | ||||
|                     showCheck: true | ||||
|                 })} | ||||
|             </div> | ||||
|         </div>; | ||||
|  |  | |||
|  | @ -1,43 +1,25 @@ | |||
| import { DIALOGCODE } from '../../../constance'; | ||||
| import { getLangByResId } from '../../../../../../mmpub/mmpub/pub/tool/multiLangUtil'; | ||||
| const TABLE_HEAD = 'borrow_list'; | ||||
| import {DIALOGCODE, AREA} from '../../../constance'; | ||||
| 
 | ||||
| export default function (props) { | ||||
| 	let appcode = props.getAppCode(); | ||||
| 	if (props.getAppCode().startsWith('5009')) { | ||||
| 		appcode = '50090102'; | ||||
| 	} | ||||
| 	else if (props.getAppCode().startsWith('5008')) { | ||||
| 		appcode = '50080102'; | ||||
| 	} | ||||
| 	//请求模板数据
 | ||||
| 	props.createUIDom( | ||||
| 		{ | ||||
| 			appcode: appcode, | ||||
| 			pagecode: DIALOGCODE.BORROWDLG | ||||
| 		}, | ||||
| 		(templedata) => { | ||||
| 			if (templedata.template) { | ||||
| 				let meta = templedata.template; | ||||
| 				// modifierMeta.call(this, this.props, meta);
 | ||||
| 				props.meta.setMeta(meta); | ||||
| 				props.editTable.setStatus(TABLE_HEAD, 'edit'); | ||||
| 				// props.editTable.setStatus(TABLE_BODY, 'edit');
 | ||||
| 			} | ||||
| 		}); | ||||
| } | ||||
| function modifierMeta(props, meta) { | ||||
| 	meta[TABLE_HEAD].items.map((item) => { | ||||
| 		if (item.attrcode == 'freplacetype') { | ||||
| 			item.options = [{ | ||||
| 				display: getLangByResId(this, '5008Pickm-000096')/* 国际化处理: "全部替代"*/, | ||||
| 				value: "1" | ||||
| 			}, { | ||||
| 				display: getLangByResId(this, '5008Pickm-000097')/* 国际化处理: ""部分替代"*/, | ||||
| 				value: "2" | ||||
| 			} | ||||
| 			]; | ||||
| 		} | ||||
| 	}); | ||||
| 	return meta; | ||||
|     let appcode = props.getAppCode(); | ||||
|     if (props.getAppCode().startsWith('5009')) { | ||||
|         appcode = '50090102'; | ||||
|     } else if (props.getAppCode().startsWith('5008')) { | ||||
|         appcode = '50080102'; | ||||
|     } | ||||
|     //请求模板数据
 | ||||
|     props.createUIDom( | ||||
|         { | ||||
|             appcode: appcode, | ||||
|             pagecode: DIALOGCODE.BORROWDLG | ||||
|         }, | ||||
|         (templedata) => { | ||||
|             if (templedata.template) { | ||||
|                 let meta = templedata.template; | ||||
|                 // modifierMeta.call(this, this.props, meta);
 | ||||
|                 props.meta.setMeta(meta); | ||||
|                 props.editTable.setStatus(AREA.borrowList, 'edit'); | ||||
|                 // props.editTable.setStatus(TABLE_BODY, 'edit');
 | ||||
|             } | ||||
|         }); | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue