|  | @@ -3900,39 +3900,39 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |                              return !changeBills;
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                      },
 | 
	
		
			
				|  |  | -                    'autoUse': {
 | 
	
		
			
				|  |  | -                        name: '调用',
 | 
	
		
			
				|  |  | -                        icon: 'fa-play',
 | 
	
		
			
				|  |  | -                        callback: function (key, opt) {
 | 
	
		
			
				|  |  | -                            const curChange = SpreadJsObj.getSelectObject(self.changeSheet);
 | 
	
		
			
				|  |  | -                            const changeBills = SpreadJsObj.getSelectObject(self.changeBillsSheet);
 | 
	
		
			
				|  |  | -                            const billsPos = self.findBillsPos(curChange, changeBills);
 | 
	
		
			
				|  |  | -                            if (!billsPos) toastr.warning('无可调用的清单或计量单元');
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                            const data = { autoType: 'bills', bills: [{ ...billsPos, cid: changeBills.cid, cbid: changeBills.cbid }] };
 | 
	
		
			
				|  |  | -                            postData(window.location.pathname + '/auto-change', data, function(result) {
 | 
	
		
			
				|  |  | -                                if (result.pos) {
 | 
	
		
			
				|  |  | -                                    stagePos.loadCurStageData(result.pos.curStageData);
 | 
	
		
			
				|  |  | -                                }
 | 
	
		
			
				|  |  | -                                const nodes = stageTree.loadPostStageData(result.bills);
 | 
	
		
			
				|  |  | -                                stageTreeSpreadObj.refreshTreeNodes(slSpread.getActiveSheet(), nodes);
 | 
	
		
			
				|  |  | -                                stagePosSpreadObj.loadCurPosData();
 | 
	
		
			
				|  |  | -                                if (detail) {
 | 
	
		
			
				|  |  | -                                    detail.loadStageChangeUpdateData(result, nodes);
 | 
	
		
			
				|  |  | -                                } else {
 | 
	
		
			
				|  |  | -                                    stageIm.loadUpdateChangeData(result, nodes)
 | 
	
		
			
				|  |  | -                                }
 | 
	
		
			
				|  |  | -                            });
 | 
	
		
			
				|  |  | -                        },
 | 
	
		
			
				|  |  | -                        disable: function (key, opt) {
 | 
	
		
			
				|  |  | -                            const curChange = SpreadJsObj.getSelectObject(self.changeSheet);
 | 
	
		
			
				|  |  | -                            const changeBills = SpreadJsObj.getSelectObject(self.changeBillsSheet);
 | 
	
		
			
				|  |  | -                            return !changeBills || curChange.is_import;
 | 
	
		
			
				|  |  | -                        },
 | 
	
		
			
				|  |  | -                        visible: function (key, opt) {
 | 
	
		
			
				|  |  | -                            return is_debug && stage.status === 1;
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                    },
 | 
	
		
			
				|  |  | +                    // 'autoUse': {
 | 
	
		
			
				|  |  | +                    //     name: '调用',
 | 
	
		
			
				|  |  | +                    //     icon: 'fa-play',
 | 
	
		
			
				|  |  | +                    //     callback: function (key, opt) {
 | 
	
		
			
				|  |  | +                    //         const curChange = SpreadJsObj.getSelectObject(self.changeSheet);
 | 
	
		
			
				|  |  | +                    //         const changeBills = SpreadJsObj.getSelectObject(self.changeBillsSheet);
 | 
	
		
			
				|  |  | +                    //         const billsPos = self.findBillsPos(curChange, changeBills);
 | 
	
		
			
				|  |  | +                    //         if (!billsPos) toastr.warning('无可调用的清单或计量单元');
 | 
	
		
			
				|  |  | +                    //
 | 
	
		
			
				|  |  | +                    //         const data = { autoType: 'bills', bills: [{ ...billsPos, cid: changeBills.cid, cbid: changeBills.cbid }] };
 | 
	
		
			
				|  |  | +                    //         postData(window.location.pathname + '/auto-change', data, function(result) {
 | 
	
		
			
				|  |  | +                    //             if (result.pos) {
 | 
	
		
			
				|  |  | +                    //                 stagePos.loadCurStageData(result.pos.curStageData);
 | 
	
		
			
				|  |  | +                    //             }
 | 
	
		
			
				|  |  | +                    //             const nodes = stageTree.loadPostStageData(result.bills);
 | 
	
		
			
				|  |  | +                    //             stageTreeSpreadObj.refreshTreeNodes(slSpread.getActiveSheet(), nodes);
 | 
	
		
			
				|  |  | +                    //             stagePosSpreadObj.loadCurPosData();
 | 
	
		
			
				|  |  | +                    //             if (detail) {
 | 
	
		
			
				|  |  | +                    //                 detail.loadStageChangeUpdateData(result, nodes);
 | 
	
		
			
				|  |  | +                    //             } else {
 | 
	
		
			
				|  |  | +                    //                 stageIm.loadUpdateChangeData(result, nodes)
 | 
	
		
			
				|  |  | +                    //             }
 | 
	
		
			
				|  |  | +                    //         });
 | 
	
		
			
				|  |  | +                    //     },
 | 
	
		
			
				|  |  | +                    //     disable: function (key, opt) {
 | 
	
		
			
				|  |  | +                    //         const curChange = SpreadJsObj.getSelectObject(self.changeSheet);
 | 
	
		
			
				|  |  | +                    //         const changeBills = SpreadJsObj.getSelectObject(self.changeBillsSheet);
 | 
	
		
			
				|  |  | +                    //         return !changeBills || curChange.is_import;
 | 
	
		
			
				|  |  | +                    //     },
 | 
	
		
			
				|  |  | +                    //     visible: function (key, opt) {
 | 
	
		
			
				|  |  | +                    //         return is_debug && stage.status === 1;
 | 
	
		
			
				|  |  | +                    //     }
 | 
	
		
			
				|  |  | +                    // },
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -3943,40 +3943,40 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |                      return target.hitTestType === spreadNS.SheetArea.viewport || target.hitTestType === spreadNS.SheetArea.rowHeader;
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  items: {
 | 
	
		
			
				|  |  | -                    'autoUseCur': {
 | 
	
		
			
				|  |  | -                        name: '自动调用',
 | 
	
		
			
				|  |  | -                        icon: 'fa-play',
 | 
	
		
			
				|  |  | -                        callback: function (key, opt) {
 | 
	
		
			
				|  |  | -                            const curChange = SpreadJsObj.getSelectObject(self.changeSheet);
 | 
	
		
			
				|  |  | -                            const changeBills = SpreadJsObj.zh_data;
 | 
	
		
			
				|  |  | -                            const data = { bills: [], autoType: 'bills' };
 | 
	
		
			
				|  |  | -                            for (const cb of changeBills) {
 | 
	
		
			
				|  |  | -                                const billsPos = self.findBillsPos(curChange, cb);
 | 
	
		
			
				|  |  | -                                if (billsPos) data.push({ ...billsPos, cid: curChange.cid, cbid: cb.cbid })
 | 
	
		
			
				|  |  | -                            }
 | 
	
		
			
				|  |  | -                            postData(window.location.pathname + '/auto-use-change', data, function(result) {
 | 
	
		
			
				|  |  | -                                if (result.pos) {
 | 
	
		
			
				|  |  | -                                    stagePos.loadCurStageData(result.pos.curStageData);
 | 
	
		
			
				|  |  | -                                }
 | 
	
		
			
				|  |  | -                                const nodes = stageTree.loadPostStageData(result.bills);
 | 
	
		
			
				|  |  | -                                stageTreeSpreadObj.refreshTreeNodes(slSpread.getActiveSheet(), nodes);
 | 
	
		
			
				|  |  | -                                stagePosSpreadObj.loadCurPosData();
 | 
	
		
			
				|  |  | -                                if (detail) {
 | 
	
		
			
				|  |  | -                                    detail.loadStageChangeUpdateData(result, nodes);
 | 
	
		
			
				|  |  | -                                } else {
 | 
	
		
			
				|  |  | -                                    stageIm.loadUpdateChangeData(result, nodes)
 | 
	
		
			
				|  |  | -                                }
 | 
	
		
			
				|  |  | -                            });
 | 
	
		
			
				|  |  | -                        },
 | 
	
		
			
				|  |  | -                        disable: function (key, opt) {
 | 
	
		
			
				|  |  | -                            const curChange = SpreadJsObj.getSelectObject(self.changeSheet);
 | 
	
		
			
				|  |  | -                            const changeBills = SpreadJsObj.getSelectObject(self.changeBillsSheet);
 | 
	
		
			
				|  |  | -                            return !changeBills || curChange.is_import;
 | 
	
		
			
				|  |  | -                        },
 | 
	
		
			
				|  |  | -                        visible: function (key, opt) {
 | 
	
		
			
				|  |  | -                            return is_debug && stage.status === 1;
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                    },
 | 
	
		
			
				|  |  | +                    // 'autoUseCur': {
 | 
	
		
			
				|  |  | +                    //     name: '自动调用',
 | 
	
		
			
				|  |  | +                    //     icon: 'fa-play',
 | 
	
		
			
				|  |  | +                    //     callback: function (key, opt) {
 | 
	
		
			
				|  |  | +                    //         const curChange = SpreadJsObj.getSelectObject(self.changeSheet);
 | 
	
		
			
				|  |  | +                    //         const changeBills = SpreadJsObj.zh_data;
 | 
	
		
			
				|  |  | +                    //         const data = { bills: [], autoType: 'bills' };
 | 
	
		
			
				|  |  | +                    //         for (const cb of changeBills) {
 | 
	
		
			
				|  |  | +                    //             const billsPos = self.findBillsPos(curChange, cb);
 | 
	
		
			
				|  |  | +                    //             if (billsPos) data.push({ ...billsPos, cid: curChange.cid, cbid: cb.cbid })
 | 
	
		
			
				|  |  | +                    //         }
 | 
	
		
			
				|  |  | +                    //         postData(window.location.pathname + '/auto-use-change', data, function(result) {
 | 
	
		
			
				|  |  | +                    //             if (result.pos) {
 | 
	
		
			
				|  |  | +                    //                 stagePos.loadCurStageData(result.pos.curStageData);
 | 
	
		
			
				|  |  | +                    //             }
 | 
	
		
			
				|  |  | +                    //             const nodes = stageTree.loadPostStageData(result.bills);
 | 
	
		
			
				|  |  | +                    //             stageTreeSpreadObj.refreshTreeNodes(slSpread.getActiveSheet(), nodes);
 | 
	
		
			
				|  |  | +                    //             stagePosSpreadObj.loadCurPosData();
 | 
	
		
			
				|  |  | +                    //             if (detail) {
 | 
	
		
			
				|  |  | +                    //                 detail.loadStageChangeUpdateData(result, nodes);
 | 
	
		
			
				|  |  | +                    //             } else {
 | 
	
		
			
				|  |  | +                    //                 stageIm.loadUpdateChangeData(result, nodes)
 | 
	
		
			
				|  |  | +                    //             }
 | 
	
		
			
				|  |  | +                    //         });
 | 
	
		
			
				|  |  | +                    //     },
 | 
	
		
			
				|  |  | +                    //     disable: function (key, opt) {
 | 
	
		
			
				|  |  | +                    //         const curChange = SpreadJsObj.getSelectObject(self.changeSheet);
 | 
	
		
			
				|  |  | +                    //         const changeBills = SpreadJsObj.getSelectObject(self.changeBillsSheet);
 | 
	
		
			
				|  |  | +                    //         return !changeBills || curChange.is_import;
 | 
	
		
			
				|  |  | +                    //     },
 | 
	
		
			
				|  |  | +                    //     visible: function (key, opt) {
 | 
	
		
			
				|  |  | +                    //         return is_debug && stage.status === 1;
 | 
	
		
			
				|  |  | +                    //     }
 | 
	
		
			
				|  |  | +                    // },
 | 
	
		
			
				|  |  |                      'autoUseAll': {
 | 
	
		
			
				|  |  |                          name: '自动调用(全部变更令)',
 | 
	
		
			
				|  |  |                          icon: 'fa-play',
 |