|  |  |  | 
|---|
|  |  |  | that.object = object; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | that.no = 0; | 
|---|
|  |  |  | that.objectType = null; | 
|---|
|  |  |  | that.isDel = false; | 
|---|
|  |  |  | that.readyIn = false; | 
|---|
|  |  |  | that.run = false; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let item = getArrVal(conveyObjects.objects, "no", that.no+""); | 
|---|
|  |  |  | if (!that.position && item) { | 
|---|
|  |  |  | that.objectType = item.objectType; | 
|---|
|  |  |  | that.position = item.position; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!item) { | 
|---|
|  |  |  | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 添加 | 
|---|
|  |  |  | if (staData.loaded === 1 && staData.wrkNo && staData.wrkNo !== '0' && that.wrkNo !== staData.wrkNo) { | 
|---|
|  |  |  | if (that.outlet !== 1) { | 
|---|
|  |  |  | if (that.outlet !== 1) {     // 由堆垛机出库,不需要添加model | 
|---|
|  |  |  | if (that.loaded === 1) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | console.log("sta_" + that.no + " remove:" + that.wrkNo + "-Pallet; " + that.wrkNo + "-Goods"); | 
|---|
|  |  |  | that.object.removeObject(that.wrkNo + "-Pallet"); | 
|---|
|  |  |  | that.object.removeObject(that.wrkNo + "-Goods"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | InitPallet(that.object, [{wrkNo: staData.wrkNo}], {position: that.position}, 2); | 
|---|
|  |  |  | InitGoods(that.object, [{wrkNo: staData.wrkNo}], {position: that.position}, 2); | 
|---|
|  |  |  | InitPallet(that.object, [{wrkNo: staData.wrkNo}], {position: that.position, objectType: that.objectType}, 2); | 
|---|
|  |  |  | InitGoods(that.object, [{wrkNo: staData.wrkNo}], {position: that.position, objectType: that.objectType}, 2); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 移除 | 
|---|
|  |  |  | if (staData.loaded === 0) { | 
|---|
|  |  |  | if (that.loaded === 1 && that.wrkNo && that.wrkNo !== '0') { | 
|---|
|  |  |  | if (that.inlet !== 1) { | 
|---|
|  |  |  | if (that.inlet !== 1) {     // 堆垛机需要搬运,不能直接移除 | 
|---|
|  |  |  | that.object.removeObject(that.wrkNo + "-Pallet"); | 
|---|
|  |  |  | that.object.removeObject(that.wrkNo + "-Goods"); | 
|---|
|  |  |  | } | 
|---|