| | |
| | | //å è½½æ¡ç ç±»åæ°æ® |
| | | set_HBarCodeType(); |
| | | |
| | | var rowdata = [{ |
| | | "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "", |
| | | "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0 |
| | | }]; |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | set_CountGrid(); |
| | |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | | } |
| | | //#endregion |
| | | |
| | | var rowdata = [{ |
| | | "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "", |
| | | "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0 |
| | | }]; |
| | | //#endregion |
| | | |
| | | //#region ç¹å»äºä»¶ï¼å
æ¬onåformäºä»¶ |
| | | //头工å
·æ |
| | |
| | | var AddRow = table.cache['mainTable']; |
| | | |
| | | var NewRow = { |
| | | "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "", |
| | | "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "", |
| | | "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0 |
| | | }; |
| | | //console.log(NewRow); |
| | |
| | | HMaterID = result.list[0].HMaterID; |
| | | HBatchNo = result.list[0].HBatchNo; |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | BatchNoArray = result.list; //è·åæ¹å·ï¼ç¨æ¥ç»æ¹æ¬¡æé®åè½ä¸çæ¹å·èµå¼ |
| | | |
| | | for (let i = 0; i < result.list.length; i++) { |
| | | result.list[i].HMinQty = '';//ç¹å»åå
æ ¼çæ¶åé»è®¤å¼0ä¸ä¼æ¸
é¤ï¼å®¢æ·çäºä¼è§å¾å¾æªï¼æä»¥å
ç¨ç©ºå符串å代; |
| | | result.list[i].HQty = result.list[i].HQty.toString().match(/^\d+(?:\.\d{0,2})?/)[0] //ä¿çå°æ°ç¹å两ä½å°æ° |
| | | } |
| | | |
| | | |
| | | BatchNoArray = result.list; //è·åæ¹å·ï¼ç¨æ¥ç»æ¹æ¬¡æé®åè½ä¸çæ¹å·èµå¼ |
| | | //for (let i = 0; i < result.list.length; i++) { |
| | | // result.list[i].HMinQty = '';//ç¹å»åå
æ ¼çæ¶åé»è®¤å¼0ä¸ä¼æ¸
é¤ï¼å®¢æ·çäºä¼è§å¾å¾æªï¼æä»¥å
ç¨ç©ºå符串å代; |
| | | //} |
| | | table.reload('mainTable', { |
| | | data: result.list // è°ç¨table.reload éæ°æ¸²ææ¾ç¤ºå 载追å äºæ°æ®çè¡¨æ ¼ |
| | | }); |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | var arr = [{ HBillNo: '', HMaterNumber: checkStatus.data[0].ç©æä»£ç , HMaterName: checkStatus.data[0].ç©æåç§°, HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: checkStatus.data[0].计éåä½ä»£ç , HUnitName: checkStatus.data[0].计éåä½, HBatchNo: '', HGiveAwayFlag: '0', HQty: checkStatus.data[0].æ°é, HMinQty: '0', HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '' }] |
| | | var arr = [{ HBillNo: '', HMaterNumber: checkStatus.data[0].ç©æä»£ç , HMaterName: checkStatus.data[0].ç©æåç§°, HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: checkStatus.data[0].计éåä½ä»£ç , HUnitName: checkStatus.data[0].计éåä½, HBatchNo: '', HGiveAwayFlag: '0', HQty: checkStatus.data[0].æ°é.toString("#0.00"), HMinQty: checkStatus.data[0].æå°å
è£
æ°, HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '' }] |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | table.reload('mainTable', { |
| | | data: arr // è°ç¨table.reload éæ°æ¸²ææ¾ç¤ºå 载追å äºæ°æ®çè¡¨æ ¼ |
| | |
| | | function set_InitGrid() { |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 100 } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 75 } |
| | | , { field: 'HMainID', title: 'æºå主å
ç ', width: 100, hide: true } |
| | | , { field: 'HSubID', title: 'æºååå
ç ', width: 100, hide: true } |
| | | , { field: 'HBillNo', title: 'æºååå·', width: 200 } |
| | |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', edit: 'text', event: 'HMaterNumber', width: 200 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 200 } |
| | | , { field: 'HBatchNo', title: 'æ¹å·', edit: 'text', width: 100 } |
| | | , { field: 'HQty', title: 'æ°é', edit: 'text', width: 100 } |
| | | , { field: 'HMinQty', title: 'æå°å
è£
æ°', edit: 'text', width: 100 } |
| | | , { field: 'HBQty', title: 'ç®±æ°', width: 100 } |
| | | , { field: 'HPackQty', title: 'å¤ç®±æ°', edit: 'text', width: 100 } |
| | | , { field: 'HCoilNO', title: 'é¢å·æå
å·', edit: 'text', width: 100 } |
| | | , { field: 'HFurnaceNO', title: 'çå·', edit: 'text', width: 100 } |
| | | , { field: 'HFactory', title: 'åå', edit: 'text', width: 100 } |
| | | , { field: 'HCusID', title: '客æ·ID', width: 100, hide: true } |
| | | , { field: 'HCusNumber', title: '客æ·ä»£ç ', edit: 'text', event: 'HCusNumber', width: 120 } |
| | | , { field: 'HCusName', title: '客æ·åç§°', width: 120 } |
| | | , { field: 'HSeOrderBillNo', title: 'éå®è®¢åå·', width: 200 } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text', width: 100 } |
| | | , { field: 'HProduceDate', title: 'çäº§æ¥æ', event: 'HProduceDate', width: 100 } |
| | | , { field: 'HExpiryDate', title: 'ä¿è´¨æè³', event: 'HExpiryDate', width: 100 } |
| | | , { field: 'HheatNO', title: 'çå¤ç', edit: 'text', width: 100 } |
| | | , { field: 'HAuxPropID', title: 'è¾
å©å±æ§ID', width: 100, hide: true } |
| | | , { field: 'HAuxPropNumber', title: 'è¾
å©å±æ§ä»£ç ', edit: 'text', event: 'HAuxPropNumber', width: 100 } |
| | | , { field: 'HAuxPropName', title: 'è¾
å©å±æ§åç§°', width: 100 } |
| | | , { field: 'HUnitID', title: '计éåä½ID', width: 100, hide: true } |
| | | , { field: 'HUnitNumber', title: '计éåä½ä»£ç ', edit: 'text', event: 'HUnitNumber', width: 100 } |
| | | , { field: 'HUnitName', title: '计éåä½',width: 100 } |
| | | , { field: 'HBatchNo', title: 'æ¹å·', edit: 'text', width: 100 } |
| | | |
| | | , { field: 'HCoilNO', title: 'é¢å·æå
å·', edit: 'text', width: 100 } |
| | | , { field: 'HFurnaceNO', title: 'çå·', edit: 'text', width: 100 } |
| | | , { field: 'HFactory', title: 'åå', edit: 'text', width: 100 } |
| | | , { field: 'HAuxQty', title: 'è¾
å使°é', edit: 'text', width: 100 } |
| | | , { field: 'HheatNO', title: 'çå¤ç', edit: 'text', width: 100 } |
| | | , { field: 'HProduceDate', title: 'çäº§æ¥æ', event: 'HProduceDate', width: 100 } |
| | | , { field: 'HExpiryDate', title: 'ä¿è´¨æè³', event: 'HExpiryDate', width: 100 } |
| | | , { field: 'HExpirationDateFlag', title: 'æ¯å¦å¯ç¨ä¿è´¨æ', width: 100, templet: '#switchTp3', unresize: false } |
| | | |
| | | , { field: 'HGiveAwayFlag', title: 'æ¯å¦èµ å', width: 100, templet: '#switchTpl', unresize: false } |
| | | , { field: 'HQty', title: 'æ°é', edit: 'text', width: 100 } |
| | | , { field: 'HMinQty', title: 'æå°å
è£
æ°', edit: 'text', width: 100 } |
| | | , { field: 'HBQty', title: 'ç®±æ°', width: 100 } |
| | | , { field: 'HPackQty', title: 'å¤ç®±æ°', edit: 'text', width: 100 } |
| | | , { field: 'HDate', title: 'è¿ææ¥æ', width: 100 } |
| | | , { field: 'HCusID', title: '客æ·ID', width: 100, hide: true } |
| | | , { field: 'HCusNumber', title: '客æ·ä»£ç ', edit: 'text', event: 'HCusNumber', width: 120 } |
| | | , { field: 'HCusName', title: '客æ·åç§°', width: 120 } |
| | | , { field: 'HSeOrderBillNo', title: 'éå®è®¢åå·', width: 200 } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text', width: 100 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]; |
| | | option = { |
| | |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , cellMinWidth: 120 |
| | | , cellMinWidth: 75 |
| | | , height: 'full-325' |
| | | , cols: [columns] |
| | | , limit: 500 //æ¯é¡µé»è®¤æ¾ç¤ºçæ°é |