|
|
@@ -2758,32 +2758,52 @@ $('#property_ok').click(function () {
|
|
|
|
|
|
if(hasMixData()){
|
|
|
CommonAjax.post('/pm/api/updateMixDatas', {user_id: userID, mixDataArr: mixDatas}, function (rstData) {
|
|
|
- //需要重载页面
|
|
|
- if(needToReload(mixDatas)){
|
|
|
- window.location.href = '/main?project=' + projectID;
|
|
|
- }
|
|
|
- else{
|
|
|
- if(mixDatas.properties.hasOwnProperty('property.maxPriceRate')){
|
|
|
- projectObj.project.property.maxPriceRate = maxPriceRate;
|
|
|
- }
|
|
|
- if(mixDatas.properties.hasOwnProperty('property.minPriceRate')){
|
|
|
- projectObj.project.property.minPriceRate = minPriceRate;
|
|
|
- }
|
|
|
- if(mixDatas.properties.hasOwnProperty('property.basicInformation')){
|
|
|
- basicInfoView.orgDatas = basicInfoView.toViewDatas(mixDatas.properties['property.basicInformation']);
|
|
|
+ const doAferSuccess = () => {
|
|
|
+ $.bootstrapLoading.end();
|
|
|
+ //需要重载页面
|
|
|
+ if(needToReload(mixDatas)){
|
|
|
+ window.location.href = '/main?project=' + projectID;
|
|
|
}
|
|
|
- if(mixDatas.properties.hasOwnProperty('property.projectFeature')){
|
|
|
- projFeatureView.orgDatas = projFeatureView.toViewDatas(mixDatas.properties['property.projectFeature']);
|
|
|
+ else{
|
|
|
+ if(mixDatas.properties.hasOwnProperty('property.maxPriceRate')){
|
|
|
+ projectObj.project.property.maxPriceRate = maxPriceRate;
|
|
|
+ }
|
|
|
+ if(mixDatas.properties.hasOwnProperty('property.minPriceRate')){
|
|
|
+ projectObj.project.property.minPriceRate = minPriceRate;
|
|
|
+ }
|
|
|
+ if(mixDatas.properties.hasOwnProperty('property.basicInformation')){
|
|
|
+ basicInfoView.orgDatas = basicInfoView.toViewDatas(mixDatas.properties['property.basicInformation']);
|
|
|
+ }
|
|
|
+ if(mixDatas.properties.hasOwnProperty('property.projectFeature')){
|
|
|
+ projFeatureView.orgDatas = projFeatureView.toViewDatas(mixDatas.properties['property.projectFeature']);
|
|
|
+ }
|
|
|
+ if(mixDatas.options && mixDatas.options.updateData){
|
|
|
+ let v1 = mixDatas.options.updateData['rationQuanACToBillsQuan'],
|
|
|
+ v2 = mixDatas.options.updateData['rationQuanACToRationUnit'],
|
|
|
+ progressiveType = mixDatas.options.updateData['progressiveType'] ;
|
|
|
+ optionsOprObj.updateOptions(optionsOprObj.options, {type: optionsOprObj.optionsTypes.GENERALOPTS, opt: 'rationQuanACToBillsQuan', value: v1});
|
|
|
+ optionsOprObj.updateOptions(optionsOprObj.options, {type: option-sOprObj.optionsTypes.GENERALOPTS, opt: 'rationQuanACToRationUnit', value: v2});
|
|
|
+ optionsOprObj.updateOptions(optionsOprObj.options, {type: optionsOprObj.optionsTypes.GENERALOPTS, opt: 'progressiveType', value: progressiveType});
|
|
|
+ }
|
|
|
}
|
|
|
- if(mixDatas.options && mixDatas.options.updateData){
|
|
|
- let v1 = mixDatas.options.updateData['rationQuanACToBillsQuan'],
|
|
|
- v2 = mixDatas.options.updateData['rationQuanACToRationUnit'],
|
|
|
- progressiveType = mixDatas.options.updateData['progressiveType'] ;
|
|
|
- optionsOprObj.updateOptions(optionsOprObj.options, {type: optionsOprObj.optionsTypes.GENERALOPTS, opt: 'rationQuanACToBillsQuan', value: v1});
|
|
|
- optionsOprObj.updateOptions(optionsOprObj.options, {type: optionsOprObj.optionsTypes.GENERALOPTS, opt: 'rationQuanACToRationUnit', value: v2});
|
|
|
- optionsOprObj.updateOptions(optionsOprObj.options, {type: optionsOprObj.optionsTypes.GENERALOPTS, opt: 'progressiveType', value: progressiveType});
|
|
|
+ }
|
|
|
+ // 改变清单库
|
|
|
+ if (rstData && rstData.billLibs) {
|
|
|
+ projectObj.project.projectInfo.engineeringInfo.bill_lib = rstData.billLibs;
|
|
|
+ $('#stdBillsGuidanceLibSelect').empty();
|
|
|
+ if ($('#zy').is(':visible')) {
|
|
|
+ billsGuidance.initLibs(rstData.billLibs);
|
|
|
}
|
|
|
}
|
|
|
+ // 需要改变费率
|
|
|
+ if (rstData && rstData.newFeeLibID) {
|
|
|
+ $.bootstrapLoading.start();
|
|
|
+ feeRateObject.feeRateSTDLoaded = false;
|
|
|
+ feeRateObject.feeRateSTDList = [];
|
|
|
+ projectObj.project.FeeRate.changeFeeRateStandard(rstData.newFeeLibID,doAferSuccess);
|
|
|
+ } else {
|
|
|
+ doAferSuccess();
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
});
|