|
@@ -64,25 +64,8 @@ ProjectGLJ.prototype.loadToCache = function (data) {
|
|
|
* @param {String} code
|
|
|
* @return {Object}
|
|
|
*/
|
|
|
-ProjectGLJ.prototype.getDataByCode = function (code) {
|
|
|
- let result = {};
|
|
|
- if (this.datas === null) {
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- let gljList = this.datas.gljList;
|
|
|
- if (gljList === undefined) {
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- for (let tmp of gljList) {
|
|
|
- if (tmp.code === code) {
|
|
|
- result = tmp;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return result;
|
|
|
+ProjectGLJ.prototype.getDataByID = function (ID) {//根据项目工料机ID取工料机信息
|
|
|
+ return _.find(this.datas.gljList, {'id': ID});
|
|
|
};
|
|
|
|
|
|
/**
|