| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- /**
- * Created by CSL on 2019/09/11. 江西计算程序、基数 等覆盖。
- */
- let isZJ2005 = true;
- // 一般计税取不含税市场价、不含税定额价。简易计税取含税市场价、含税定额价。打开项目时,4个价格根据计税类型只载入其二,所以这里可不作区分。
- function overwriteRationCalcBases (taxType){
- if (typeof rationCalcBases == 'undefined') return;
- for (let key in rationCalcBases) delete rationCalcBases[key];
- // let isJY = taxType == '2';
- rationCalcBases['人工费'] = function (node, isTender) {
- return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender);
- };
- rationCalcBases['材料费'] = function (node, isTender) {
- return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender);
- };
- rationCalcBases['施工机械费使用费'] = function (node, isTender) {
- return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender);
- };
- };
- (function overwriteFeeTypes() {
- if (typeof cpFeeTypes == 'undefined') return;
- cpFeeTypes = [
- {type: 'directWork', name: '直接工程费'},
- {type: 'direct', name: '直接费'},
- {type: 'marketLabour', name: '人工费'},
- {type: 'marketMaterial', name: '材料费'},
- {type: 'marketMachine', name: '施工机械使用费'},
- {type: 'otherDirect', name: '其他直接费'},
- {type: 'local', name: '现场经费'},
- {type: 'indirect', name: '间接费'},
- {type: 'profit', name: '计划利润'},
- {type: 'tax', name: '税金'},
- {type: 'composite', name: '年度经费综合费'},
- {type: 'common', name: '养护工程费'}
- ];
- })();
- if(typeof gljUtil !== 'undefined'){
- gljUtil.getCodeSortMath = getCodeSortMath
- }
- if(typeof module !== 'undefined'){
- let _= require('lodash');
- module.exports = {
- sortRationGLJ: function(list){
- list = _.sortByAll(list, [function (item) {
- return getMainType(item.gljType?item.gljType:item.type);
- }, getCodeSortMath()]);
- return list;
- function getMainType(type) {
- let str = type + "";
- return parseInt(str.substr(0,1));
- }
- }
- };
- }
- function getCodeSortMath() {
- return function (item) {
- let arr = item.code.split('-');
- return parseInt(arr[0])
- }
- }
|