zhangweicheng 5 gadi atpakaļ
vecāks
revīzija
853f9e46d0

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 665 - 604
public/web/gljUtil.js


+ 278 - 268
web/building_saas/css/custom.css

@@ -1,36 +1,36 @@
 .text-green {
-    color: #172a30
+  color: #172a30
 }
 
 label.title {
-    display: inline-block;
-    width: 100px;
+  display: inline-block;
+  width: 100px;
 }
 
 .modal-feeRate {
-    max-width: 550px
+  max-width: 550px
 }
 
 div.resize {
-    height: 10px;
-    background: #efefef;
-    width: 100%;
-    cursor: s-resize;
+  height: 10px;
+  background: #efefef;
+  width: 100%;
+  cursor: s-resize;
 }
 
 div.resize-y {
-    height: 5px;
-    background: #efefef;
-    width: 100%;
-    cursor: s-resize;
+  height: 5px;
+  background: #efefef;
+  width: 100%;
+  cursor: s-resize;
 }
 
 div.resize-x {
-    width: 4px;
-    height: 100%;
-    background: #efefef;
-    cursor: w-resize;
-    float: left;
+  width: 4px;
+  height: 100%;
+  background: #efefef;
+  cursor: w-resize;
+  float: left;
 }
 
 /*.zlfb-check{
@@ -38,130 +38,131 @@ div.resize-x {
 }*/
 
 legend.legend {
-    display: block;
-    width: auto;
-    font-size: 0.9rem;
-    top: -15px;
-    background: white;
+  display: block;
+  width: auto;
+  font-size: 0.9rem;
+  top: -15px;
+  background: white;
 }
 
 .toolsbar_feeRate {
-    border-bottom: 1px solid #ccc
+  border-bottom: 1px solid #ccc
 }
 
 .li_sub {
-    margin-left: 14px;
+  margin-left: 14px;
 }
 
 .filterType {
-    width: 98px;
-    float: left;
+  width: 98px;
+  float: left;
 }
 
 .left {
-    float: left
+  float: left
 }
 
 .full-h {
-    height: 100%;
+  height: 100%;
 }
 
 .half-h {
-    height: 50%;
+  height: 50%;
 }
 
 .a_color {
-    color: #007bff;
+  color: #007bff;
 }
 
 .filterType a {
-    padding: 1px;
-    padding-top: 7px;
-    padding-bottom: 7px;
+  padding: 1px;
+  padding-top: 7px;
+  padding-bottom: 7px;
 }
 
-#gljPriceTenderCoe::-webkit-outer-spin-button, #gljPriceTenderCoe::-webkit-inner-spin-button {
-    -webkit-appearance: none;
+#gljPriceTenderCoe::-webkit-outer-spin-button,
+#gljPriceTenderCoe::-webkit-inner-spin-button {
+  -webkit-appearance: none;
 }
 
 #gljPriceTenderCoe {
-    -moz-appearance: textfield;
+  -moz-appearance: textfield;
 }
 
 .modal-quantity-edit-height {
-    height: 200px;
-    overflow-y: auto;
+  height: 200px;
+  overflow-y: auto;
 }
 
 .message-box {
-    position: absolute;
-    background: #000;
-    padding: 8px 10px;
-    line-height: 18px;
-    border-radius: 4px;
-    text-align: left;
-    font: 0.9rem Calibri;
-    box-shadow: 2px 2px 6px #ccc;
-    color: #fff;
+  position: absolute;
+  background: #000;
+  padding: 8px 10px;
+  line-height: 18px;
+  border-radius: 4px;
+  text-align: left;
+  font: 0.9rem Calibri;
+  box-shadow: 2px 2px 6px #ccc;
+  color: #fff;
 }
 
 .triangle-border {
-    position: absolute;
-    left: 10px;
-    overflow: hidden;
-    width: 0;
-    height: 0;
-    border-width: 6px;
-    border-style: solid dashed dashed dashed;
+  position: absolute;
+  left: 10px;
+  overflow: hidden;
+  width: 0;
+  height: 0;
+  border-width: 6px;
+  border-style: solid dashed dashed dashed;
 }
 
 .triangle-border_dropdown {
-    position: absolute;
-    left: 0px;
-    overflow: hidden;
-    width: 0;
-    height: 0;
-    border-width: 4px;
-    z-index: 10;
-    border-style: solid dashed dashed dashed;
+  position: absolute;
+  left: 0px;
+  overflow: hidden;
+  width: 0;
+  height: 0;
+  border-width: 4px;
+  z-index: 10;
+  border-style: solid dashed dashed dashed;
 }
 
 .tb-border_dropdown {
-    top: 7px;
-    border-color: #000 transparent transparent transparent;
+  top: 7px;
+  border-color: #000 transparent transparent transparent;
 }
 
 .tb-background_dropdown {
-    bottom: -11px;
-    border-color: #000 transparent transparent transparent;
+  bottom: -11px;
+  border-color: #000 transparent transparent transparent;
 }
 
 .tb-border {
-    bottom: -12px;
-    border-color: #000 transparent transparent transparent;
+  bottom: -12px;
+  border-color: #000 transparent transparent transparent;
 }
 
 .tb-background {
-    bottom: -11px;
-    border-color: #000 transparent transparent transparent;
+  bottom: -11px;
+  border-color: #000 transparent transparent transparent;
 }
 
 .tb-border_up {
-    top: -12px;
-    border-color: transparent transparent #000 transparent;
+  top: -12px;
+  border-color: transparent transparent #000 transparent;
 }
 
 .tb-background_up {
-    top: -11px;
-    border-color: transparent transparent #000 transparent;
+  top: -11px;
+  border-color: transparent transparent #000 transparent;
 }
 
 .elf-options:hover {
-    background-color: #CCCCCC;
+  background-color: #CCCCCC;
 }
 
 .inline-div {
-    display: inline;
+  display: inline;
 }
 
 /*快捷切换单位工程*/
@@ -172,95 +173,98 @@ legend.legend {
 }*/
 
 .menu ul ul {
-    visibility: hidden;
-    position: absolute;
-    top: -1px;
-    left: 100px;
+  visibility: hidden;
+  position: absolute;
+  top: -1px;
+  left: 100px;
 }
 
-.menu ul li:hover ul, .menu ul a:hover ul {
-    visibility: visible;
+.menu ul li:hover ul,
+.menu ul a:hover ul {
+  visibility: visible;
 }
 
 .menu ul :hover ul ul {
-    visibility: hidden;
+  visibility: hidden;
 }
 
 .menu ul :hover ul :hover ul {
-    visibility: visible;
+  visibility: visible;
 }
 
-.ui-datepicker-next, .ui-datepicker-next:hover {
-    background-image: url("/lib/jquery-ui/images/ui-icons_444444_256x240.png");
-    background-repeat: no-repeat;
-    background-position: -28px -12px;
+.ui-datepicker-next,
+.ui-datepicker-next:hover {
+  background-image: url("/lib/jquery-ui/images/ui-icons_444444_256x240.png");
+  background-repeat: no-repeat;
+  background-position: -28px -12px;
 }
 
-.ui-datepicker-prev, .ui-datepicker-prev:hover {
-    background-image: url("/lib/jquery-ui/images/ui-icons_444444_256x240.png");
-    background-repeat: no-repeat;
-    background-position: -90px -12px;
+.ui-datepicker-prev,
+.ui-datepicker-prev:hover {
+  background-image: url("/lib/jquery-ui/images/ui-icons_444444_256x240.png");
+  background-repeat: no-repeat;
+  background-position: -90px -12px;
 }
 
 .feerateInput {
-    padding: 0;
+  padding: 0;
 }
 
 #toolToastWrap {
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-pack: center;
-    -ms-flex-pack: center;
-    justify-content: center;
-    pointer-events: none;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-pack: center;
+  -ms-flex-pack: center;
+  justify-content: center;
+  pointer-events: none;
 }
 
 #toolToast {
-    padding: 11px 20px;
-    line-height: 18px;
-    font-size: 14px;
-    position: relative;
-    word-wrap: break-word;
-    color: #fff;
-    text-align: center;
-    background: rgba(0, 0, 0, .75);
-    background-size: cover;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-align: center;
-    -ms-flex-align: center;
-    align-items: center;
-    max-width: 686px;
-    box-sizing: border-box;
-    box-shadow: 0 0 0 0 rgba(0, 0, 0, .15), 0 2px 5px 0 rgba(0, 0, 0, .25);
-    pointer-events: auto;
-    border-radius: 2px
+  padding: 11px 20px;
+  line-height: 18px;
+  font-size: 14px;
+  position: relative;
+  word-wrap: break-word;
+  color: #fff;
+  text-align: center;
+  background: rgba(0, 0, 0, .75);
+  background-size: cover;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -ms-flex-align: center;
+  align-items: center;
+  max-width: 686px;
+  box-sizing: border-box;
+  box-shadow: 0 0 0 0 rgba(0, 0, 0, .15), 0 2px 5px 0 rgba(0, 0, 0, .25);
+  pointer-events: auto;
+  border-radius: 2px
 }
 
 #toolToastBtn {
-    color: #0188fb;
-    margin: 0 2px;
-    white-space: nowrap;
-    cursor: pointer;
-    font-weight: 700
+  color: #0188fb;
+  margin: 0 2px;
+  white-space: nowrap;
+  cursor: pointer;
+  font-weight: 700
 }
 
 #toolToastBtn:hover {
-    color: #4060c9
+  color: #4060c9
 }
 
 #toolToastBtn:active {
-    color: #354ea1
+  color: #354ea1
 }
 
 .select_input {
-    border: none;
+  border: none;
 }
 
 /*.es-list>li:hover{
@@ -268,15 +272,15 @@ legend.legend {
 }*/
 
 .es-list-selected {
-    background: lightgrey;
+  background: lightgrey;
 }
 
 .es-list>li {
-    font-size: 13px;
+  font-size: 13px;
 }
 
 .es-list {
-    white-space: nowrap;
+  white-space: nowrap;
 }
 
 /*.dropdown-toggle::after{
@@ -284,245 +288,247 @@ legend.legend {
 }*/
 
 #esInput {
-    font-size: 13px;
-    color: black;
-    height: 100%;
+  font-size: 13px;
+  color: black;
+  height: 100%;
 }
 
 .ration_glj_spread {
-    width: 83%;
-    float: left;
+  width: 83%;
+  float: left;
 }
 
 .item_spread {
-    width: 29.8%;
-    float: left;
-    background: #F1F1F1;
-    word-wrap: break-word
+  width: 29.8%;
+  float: left;
+  background: #F1F1F1;
+  word-wrap: break-word
 }
 
 input.text-right {
-    text-align: right;
+  text-align: right;
 }
 
 .cus-width {
-    width: 100px;
-    margin-left: 10px;
+  width: 100px;
+  margin-left: 10px;
 }
 
 .more {
-    padding-left: .25rem!important
+  padding-left: .25rem !important
 }
 
 .bottom-tznrTools {
-    height: 30px;
-    line-height: 30px;
-    background: #efefef;
-    bottom: 30px;
-    left: 0px;
-    z-index: 999
+  height: 30px;
+  line-height: 30px;
+  background: #efefef;
+  bottom: 30px;
+  left: 0px;
+  z-index: 999
 }
 
 .zmhs-link {
-    padding: 0.4em 0.4em !important;
+  padding: 0.4em 0.4em !important;
 }
 
 /*修改tooltip默认最大宽度 */
 
 .tooltip-inner {
-    max-width: 400px !important;
+  max-width: 400px !important;
 }
 
 .applySuccess {
-    display: none;
-    color: #43CD80;
-    margin-left: 8px
+  display: none;
+  color: #43CD80;
+  margin-left: 8px
 }
 
 /*占位底色*/
 
 .occupied {
-    background: #f1f1f1;
+  background: #f1f1f1;
 }
 
 .material-ration-left {
-    float: left;
-    width: 90%;
+  float: left;
+  width: 90%;
 }
 
 .material-ass {
-    width: 10%;
-    background: #f7f7f9
+  width: 10%;
+  background: #f7f7f9
 }
 
 /*书签批注*/
 
 .annotate-color-1::before {
-    color: #E2F2C5 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #E2F2C5 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-2::before {
-    color: #F9E2CF !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #F9E2CF !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-3::before {
-    color: #F2EFD9 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #F2EFD9 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-4::before {
-    color: #F5D1DA !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #F5D1DA !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-5::before {
-    color: #E3E3E3 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #E3E3E3 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-6::before {
-    color: #B6F3F2 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #B6F3F2 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-7::before {
-    color: #ECE0F5 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #ECE0F5 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 /*书签批注*/
 
 .annotate-color-1::before {
-    color: #E2F2C5 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #E2F2C5 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-2::before {
-    color: #F9E2CF !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #F9E2CF !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-3::before {
-    color: #F2EFD9 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #F2EFD9 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-4::before {
-    color: #F5D1DA !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #F5D1DA !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-5::before {
-    color: #E3E3E3 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #E3E3E3 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-6::before {
-    color: #B6F3F2 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #B6F3F2 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .annotate-color-7::before {
-    color: #ECE0F5 !important;
-    -webkit-text-stroke: .5px #ced4da;
+  color: #ECE0F5 !important;
+  -webkit-text-stroke: .5px #ced4da;
 }
 
 .z-index-3000 {
-    z-index: 3000;
+  z-index: 3000;
 }
 
 .text-ellipsis {
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
 }
 
 .border-radius {
-    border-radius: .2rem !important;
+  border-radius: .2rem !important;
 }
 
 .pm-i {
-    width: 18px;
+  width: 18px;
 }
 
 .calcbase-btn {
-    width: 24px;
-    padding-left: 0;
-    padding-right: 0;
+  width: 24px;
+  padding-left: 0;
+  padding-right: 0;
 }
 
 .hide-area {
-    display: none;
+  display: none;
 }
 
 .middle-modal-width {
-    max-width: 650px;
+  max-width: 650px;
 }
 
 .middle-modal-height {
-    height: 500px;
+  height: 500px;
 }
 
-@media screen and (max-width: 1366px), (max-height: 768px) {
-    .middle-modal-width {
-        max-width: 500px;
-    }
-    .middle-modal-height {
-        height: 350px;
-    }
+@media screen and (max-width: 1366px),
+(max-height: 768px) {
+  .middle-modal-width {
+    max-width: 500px;
+  }
+
+  .middle-modal-height {
+    height: 350px;
+  }
 }
 
 /* 初始样式,防止projspread初始化完后背景从白突然变灰 */
 
 .poj-list {
-    height: 1000px;
-    background: #f7f7f9;
+  height: 1000px;
+  background: #f7f7f9;
 }
 
 .form-control-inline {
-    display: inline-block !important;
-    width: 80% !important;
+  display: inline-block !important;
+  width: 80% !important;
 }
 
 .unit_price_header {
-    padding-top: 6px;
-    margin-left: 50px;
-    margin-right: 100px !important;
+  padding-top: 6px;
+  margin-left: 50px;
+  margin-right: 100px !important;
 }
 
 .default-cursor {
-    cursor: default !important;
+  cursor: default !important;
 }
 
 .material_link.active {
-    border: 2px solid #ff6501 !important;
-    border-right: 1px solid #fff !important;
+  border: 2px solid #ff6501 !important;
+  border-right: 1px solid #fff !important;
 }
 
 .table-sc th {
-    font-weight: normal;
+  font-weight: normal;
 }
 
 .compilation-content {
-    left: 50% !important;
-    transform: translateX(-50%) !important;
-    width: 123% !important;
+  left: 50% !important;
+  transform: translateX(-50%) !important;
+  width: 123% !important;
 }
 
 /* 右键菜单input */
 
 .menu-input {
-    width: 2.5rem;
-    border: 1px solid rgb(221, 221, 221);
-    border-radius: 2px;
-    height: 1.3rem;
-    text-align: center;
+  width: 2.5rem;
+  border: 1px solid rgb(221, 221, 221);
+  border-radius: 2px;
+  height: 1.3rem;
+  text-align: center;
 }
 
 .menu-input:focus {
-    outline: none;
+  outline: none;
 }
 
 /* .menu-input::selection {
@@ -532,56 +538,60 @@ input.text-right {
 /* 进度条动画 */
 
 .progress-bar {
-    position: relative;
-    width: 100%;
+  position: relative;
+  width: 100%;
 }
 
 .progress-move {
-    position: absolute;
-    left: 0;
-    top: 0;
-    z-index: 999;
-    width: 200%;
-    height: 100%;
-    border-radius: .25rem;
-    animation: progressMove 20s linear infinite;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 999;
+  width: 200%;
+  height: 100%;
+  border-radius: .25rem;
+  animation: progressMove 20s linear infinite;
 }
 
 @keyframes progressMove {
-    from {
-        transform: translateX(0);
-    }
-    to {
-        transform: translateX(-280px);
-    }
+  from {
+    transform: translateX(0);
+  }
+
+  to {
+    transform: translateX(-280px);
+  }
 }
 
 .progress-cover {
-    position: absolute;
-    left: 0;
-    top: 0;
-    z-index: 1000;
-    width: 100%;
-    height: 100%;
-    background-color: #e9ecef;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 1000;
+  width: 100%;
+  height: 100%;
+  background-color: #e9ecef;
 }
 
 .progress-cover-move {
-    animation: progressCoverMove 40s linear;
-    animation-fill-mode: forwards;
+  animation: progressCoverMove 40s linear;
+  animation-fill-mode: forwards;
 }
 
 @keyframes progressCoverMove {
-    0% {
-        transform: translateX(0);
-    }
-    20% {
-        transform: translateX(330px);
-    }
-    40% {
-        transform: translateX(380px);
-    }
-    100% {
-        transform: translateX(420px);
-    }
+  0% {
+    transform: translateX(0);
+  }
+
+  20% {
+    transform: translateX(330px);
+  }
+
+  40% {
+    transform: translateX(380px);
+  }
+
+  100% {
+    transform: translateX(420px);
+  }
 }

+ 14 - 14
web/building_saas/main/js/views/config_material_view.js

@@ -1218,20 +1218,20 @@ let pgljSelObj = {
         dataType: "String",
         cellType: 'checkBox'
       },
-      {
-        headerName: "产地",
-        headerWidth: 80,
-        dataCode: "originPlace",
-        hAlign: "left",
-        dataType: "String"
-      },
-      {
-        headerName: "厂家",
-        headerWidth: 80,
-        dataCode: "vender",
-        hAlign: "left",
-        dataType: "String"
-      },
+      /*  {
+         headerName: "产地",
+         headerWidth: 80,
+         dataCode: "originPlace",
+         hAlign: "left",
+         dataType: "String"
+       },
+       {
+         headerName: "厂家",
+         headerWidth: 80,
+         dataCode: "vender",
+         hAlign: "left",
+         dataType: "String"
+       }, */
       {
         headerName: "备注",
         headerWidth: 100,

+ 401 - 262
web/building_saas/main/js/views/electrovalence_view.js

@@ -2,297 +2,436 @@
  * Created by zhang on 2019/12/12.
  */
 let electrovalenceObj = {
-    setting:{
-        header:[
-            {headerName: "代号", headerWidth: 70, dataCode: "code", dataType: "String"},
-            {headerName: "名称", headerWidth: 150, dataCode: "displayName",dataType: "String"},
-            {headerName: "规格", headerWidth: 70, dataCode: "specs", dataType: "Number",validator:"number"},
-            {headerName: "预算价", headerWidth: 75, dataCode: "electPrice", hAlign: "right", dataType: "Number",validator:"number"},
-            {headerName: "加权系数", headerWidth: 80, dataCode: "coe", hAlign: "right", dataType: "Number",validator:"number"}
-        ],
-        view: {
-            lockColumns: ["code","specs"],
-            rowHeaderWidth:25,
-            colHeaderHeight:36
-        }
-    },
-    spread:null,
-    sheet:null,
-    datas:[],
-    total:0,
-    options:[
-        {code:"3005003",name:"电网电",specs:"",unit:"kW·h",type:"201"},
-        {code:"8017001",name:"5kW以内柴油发电机组",specs:"5GF1",unit:"台班",type:"301"},
-        {code:"8017002",name:"15kW以内柴油发电机组",specs:"12GF1",unit:"台班",type:"301"},
-        {code:"8017003",name:"30kW以内柴油发电机组",specs:"30GFY-2",unit:"台班",type:"301"},
-        {code:"8017004",name:"50kW以内柴油发电机组",specs:"50GFY-2",unit:"台班",type:"301"},
-        {code:"8017005",name:"75kW以内柴油发电机组",specs:"75GFY-4",unit:"台班",type:"301"},
-        {code:"8017006",name:"100kW以内柴油发电机组",specs:"90GFZ",unit:"台班",type:"301"},
-        {code:"8017007",name:"120kW以内柴油发电机组",specs:"120GFY-4",unit:"台班",type:"301"},
-        {code:"8017008",name:"160kW以内柴油发电机组",specs:"160GF",unit:"台班",type:"301"},
-        {code:"8017009",name:"200kW以内柴油发电机组",specs:"200GF",unit:"台班",type:"301"},
-        {code:"8017010",name:"250kW以内柴油发电机组",specs:"250GF4-4",unit:"台班",type:"301"},
-        {code:"8017011",name:"320kW以内柴油发电机组",specs:"320GF-2",unit:"台班",type:"301"}
+  setting: {
+    header: [{
+        headerName: "代号",
+        headerWidth: 70,
+        dataCode: "code",
+        dataType: "String"
+      },
+      {
+        headerName: "名称",
+        headerWidth: 150,
+        dataCode: "displayName",
+        dataType: "String"
+      },
+      {
+        headerName: "规格",
+        headerWidth: 70,
+        dataCode: "specs",
+        dataType: "Number",
+        validator: "number"
+      },
+      {
+        headerName: "预算价",
+        headerWidth: 75,
+        dataCode: "electPrice",
+        hAlign: "right",
+        dataType: "Number",
+        validator: "number"
+      },
+      {
+        headerName: "加权系数",
+        headerWidth: 80,
+        dataCode: "coe",
+        hAlign: "right",
+        dataType: "Number",
+        validator: "number"
+      }
     ],
-    initSpread:function () {
-        if(this.spread) return this.spread.refresh();
-        this.spread = SheetDataHelper.createNewSpread($("#electrovalence_sheet")[0]);
-        sheetCommonObj.spreadDefaultStyle(this.spread);
-        this.sheet = this.spread.getSheet(0);
-        sheetCommonObj.initSheet(this.sheet, this.setting, 30);
-        this.sheet.bind(GC.Spread.Sheets.Events.SelectionChanged,this.onElectrovalenceSelectionChange);
-        this.sheet.bind(GC.Spread.Sheets.Events.ValueChanged, this.onElectrovalenceValueChange);
-        this.sheet.bind(GC.Spread.Sheets.Events.EditStarting,this.onElectrovalenceEditStarting);
-        this.sheet.name('electrovalence_sheet');
-        if(projectReadOnly){
-            disableSpread(this.spread);
-        }
+    view: {
+      lockColumns: ["code", "specs"],
+      rowHeaderWidth: 25,
+      colHeaderHeight: 36
+    }
+  },
+  spread: null,
+  sheet: null,
+  datas: [],
+  total: 0,
+  options: [{
+      code: "3005003",
+      name: "电网电",
+      specs: "",
+      unit: "kW·h",
+      type: "201"
     },
-    showDatas:function (datas) {
-        let sel = this.sheet.getSelections()[0];
-        let oldData = sel.row<this.datas.length?this.datas[sel.row]:"";
-        this.sheet.setRowCount(0);
-        this.datas = datas?datas:this.getElectrovalenceDatas();
-        this.calcPertElectrovalenceMarketPrice(this.datas);
-        sheetCommonObj.showData(this.sheet, this.setting,this.datas);
-        this.sheet.setRowCount(this.datas.length+1);
-        let nameCol = _.findIndex(this.setting.header,{'dataCode':'displayName'});
-        let nameOptions = this.getElectrovalenceOptions();
-        sheetCommonObj.setComboBox(-1,nameCol,this.sheet,nameOptions,false,false,5);
-        sel.row =  oldData?_.findIndex(this.datas,{'ID':oldData.ID}):sel.row ;
-        this.sheet.setSelection(sel.row==-1?0:sel.row,sel.col,sel.rowCount,sel.colCount);
+    {
+      code: "8017001",
+      name: "5kW以内柴油发电机组",
+      specs: "5GF1",
+      unit: "台班",
+      type: "301"
     },
-    getElectrovalenceDatas:function (ext) {
-        let datas = [];
-        let pgljMap = {};
-        let com_electrovalence = projectObj.project.projectGLJ.datas.com_electrovalence;
-        for(let pg of projectObj.project.projectGLJ.datas.gljList){
-            pgljMap[gljUtil.getIndex(pg)] = pg;
-        }
-        if(com_electrovalence && com_electrovalence.gljList){
-            for (let g of com_electrovalence.gljList){
-                let t = this.createNewElectrovalenceData(g);
-                let tg = pgljMap[gljUtil.getIndex(g)];
-                if(tg) gljOprObj.setGLJPrice(t,tg,false,ext);
-                datas.push(t);
-            }
-        }
-        return datas;
+    {
+      code: "8017002",
+      name: "15kW以内柴油发电机组",
+      specs: "12GF1",
+      unit: "台班",
+      type: "301"
     },
-    createNewElectrovalenceData:function (g) {//只是拷贝一份
-        let t = {
-            ID:g.ID,
-            GLJID:g.GLJID,
-            projectGLJID:g.projectGLJID,
-            name:g.name,
-            displayName:g.displayName,
-            code:g.code,
-            specs:g.specs,
-            unit:g.unit,
-            type:g.type,
-            coe: g.coe,
-            from:g.from
-        };
-        return t;
+    {
+      code: "8017003",
+      name: "30kW以内柴油发电机组",
+      specs: "30GFY-2",
+      unit: "台班",
+      type: "301"
     },
-
-    calcPertElectrovalenceMarketPrice:function (datas,ext) {
-        let total = 0;
-        for(let d of datas){
-            if(ext && ext[d.projectGLJID] && gljUtil.isDef(ext[d.projectGLJID].marketPrice)) d.marketPrice = ext[d.projectGLJID].marketPrice;
-            if(d.name == "电网电"){
-                d.electPrice = d.marketPrice;
-            }else {
-                let w = parseInt(d.name);
-                if(!w) continue;
-                let t = scMathUtil.roundForObj(d.marketPrice/w,getDecimal("process"));
-                d.electPrice = scMathUtil.roundForObj(t * gljUtil.getElecCoe(),getDecimal("glj.unitPriceHasMix"));
-            }
-            let et = scMathUtil.roundForObj(d.electPrice * d.coe,getDecimal("process"));
-            total = scMathUtil.roundForObj(et + total,getDecimal("process"));
-        }
-        this.total = scMathUtil.roundForObj(total,getDecimal("glj.unitPriceHasMix"));
-        $("#electrovalenceLabel").text(`综合电价:${this.total}`);
-        return this.total;
+    {
+      code: "8017004",
+      name: "50kW以内柴油发电机组",
+      specs: "50GFY-2",
+      unit: "台班",
+      type: "301"
     },
-    clacNewElecPrice:function (ext) {
-        for(let g of projectObj.project.projectGLJ.datas.gljList){
-            if(g.code == gljUtil.getElecCode() && g.name == "电" && g.unit == "kW·h"){//更新电价
-                let datas  = this.getElectrovalenceDatas(ext);
-                if(datas.length > 0){
-                    let marketPrice = this.calcPertElectrovalenceMarketPrice(datas,ext);
-                    if(marketPrice && g.unit_price.market_price != marketPrice+'') return {projectGLJID:g.id,id:g.unit_price.id,'unit_price_file_id':g.unit_price.unit_price_file_id,doc:{'market_price':marketPrice+''}}
-                }
-            }
-        }
-        return null;
+    {
+      code: "8017005",
+      name: "75kW以内柴油发电机组",
+      specs: "75GFY-4",
+      unit: "台班",
+      type: "301"
     },
-    getElectrovalenceOptions:function () {
-        return _.map(this.options,"name")
+    {
+      code: "8017006",
+      name: "100kW以内柴油发电机组",
+      specs: "90GFZ",
+      unit: "台班",
+      type: "301"
     },
-    onElectrovalenceSelectionChange:function (sender,args) {
-        args.sheet.repaint();
+    {
+      code: "8017007",
+      name: "120kW以内柴油发电机组",
+      specs: "120GFY-4",
+      unit: "台班",
+      type: "301"
     },
-    onElectrovalenceEditStarting:function (sender,args) {
-        let me = electrovalenceObj;
-        let dataCode = me.setting.header[args.col].dataCode;
-        if(dataCode == "electPrice" ){//除电网电外,不可修改
-            let cancel = true;
-            if(me.datas[args.row] && me.datas[args.row].name == "电网电") cancel  = false;
-            args.cancel = cancel;
-        }
+    {
+      code: "8017008",
+      name: "160kW以内柴油发电机组",
+      specs: "160GF",
+      unit: "台班",
+      type: "301"
     },
-
-
-    onElectrovalenceValueChange:function (sender,args) {
-        let me = electrovalenceObj;
-        let dataCode = me.setting.header[args.col].dataCode;
-        let value = args.newValue;
-        if(dataCode == "displayName" && args.row >= me.datas.length) {//新增
-             me.addElectrovalence(value);
-        }else { //修改
-            let tem = me.datas[args.row];
-            if (value&&!sheetCommonObj.checkData(args.col,me.setting,value)) {
-                alert('输入的数据类型不对,请重新输入!');
-                return  me.showDatas(me.datas);
-            }
-            if(dataCode == 'coe' || dataCode == 'electPrice'){
-                let dec = dataCode == 'coe' ?getDecimal("process"):getDecimal("glj.unitPrice");
-                if(value){
-                    value = scMathUtil.roundForObj(value,dec);
-                }
-                tem[dataCode] = value;
-                if(dataCode == 'electPrice') tem.marketPrice = value;
-            }else if(dataCode == 'displayName'){//下拉替换
-                me.editElectrovalence(value,args.row,"replace");
-            }
-            me.showDatas(me.datas);
-        }
+    {
+      code: "8017009",
+      name: "200kW以内柴油发电机组",
+      specs: "200GF",
+      unit: "台班",
+      type: "301"
     },
-    addElectrovalence:async function (name) {
-        this.editElectrovalence(name);
+    {
+      code: "8017010",
+      name: "250kW以内柴油发电机组",
+      specs: "250GF4-4",
+      unit: "台班",
+      type: "301"
     },
-    editElectrovalence:async function (name,row,type="add") {
-        //新建项目的时候,电已经默认生成了,所以不用考考虑电没有的情况
-        try {
-            let glj = _.find(this.options,{name:name});
-            if(glj){
-                let tem = {displayName:glj.name,code:glj.code,specs:glj.specs,unit:glj.unit,type:glj.type,projectID : projectObj.project.ID()};
-                tem.ID = uuid.v1();
-                $.bootstrapLoading.start();
-                let result =  await ajaxPost('/glj/insertElectrovalence',tem);
-                //插入项目工料机列表
-                if(type == "add" && (!result.projetcGLJData || result.projetcGLJData.length == 0)){
-                   alert("没有找到该工料机,请检查工料机库");
-                   return  this.showDatas(this.datas);
-                }
-                let newProjectPGJ = projectObj.project.projectGLJ.loadNewProjectGLJToCache(result.projetcGLJData);
-                //加入综合电价显示列表缓存
-                tem.GLJID = result.projetcGLJData.glj_id;
-                tem.projectGLJID = result.projetcGLJData.id;
-                tem.name =  result.projetcGLJData.name;
-                tem.coe = 0;
-                tem.from = "std";
-                gljOprObj.setGLJPrice(tem,newProjectPGJ);
+    {
+      code: "8017011",
+      name: "320kW以内柴油发电机组",
+      specs: "320GF-2",
+      unit: "台班",
+      type: "301"
+    }
+  ],
+  initSpread: function () {
+    if (this.spread) return this.spread.refresh();
+    this.spread = SheetDataHelper.createNewSpread($("#electrovalence_sheet")[0]);
+    sheetCommonObj.spreadDefaultStyle(this.spread);
+    this.sheet = this.spread.getSheet(0);
+    sheetCommonObj.initSheet(this.sheet, this.setting, 30);
+    this.sheet.bind(GC.Spread.Sheets.Events.SelectionChanged, this.onElectrovalenceSelectionChange);
+    this.sheet.bind(GC.Spread.Sheets.Events.ValueChanged, this.onElectrovalenceValueChange);
+    this.sheet.bind(GC.Spread.Sheets.Events.EditStarting, this.onElectrovalenceEditStarting);
+    this.sheet.name('electrovalence_sheet');
+    if (projectReadOnly) {
+      disableSpread(this.spread);
+    }
+  },
+  showDatas: function (datas) {
+    let sel = this.sheet.getSelections()[0];
+    let oldData = sel.row < this.datas.length ? this.datas[sel.row] : "";
+    this.sheet.setRowCount(0);
+    this.datas = datas ? datas : this.getElectrovalenceDatas();
+    this.calcPertElectrovalenceMarketPrice(this.datas);
+    sheetCommonObj.showData(this.sheet, this.setting, this.datas);
+    this.sheet.setRowCount(this.datas.length + 1);
+    let nameCol = _.findIndex(this.setting.header, {
+      'dataCode': 'displayName'
+    });
+    let nameOptions = this.getElectrovalenceOptions();
+    sheetCommonObj.setComboBox(-1, nameCol, this.sheet, nameOptions, false, false, 5);
+    sel.row = oldData ? _.findIndex(this.datas, {
+      'ID': oldData.ID
+    }) : sel.row;
+    this.sheet.setSelection(sel.row == -1 ? 0 : sel.row, sel.col, sel.rowCount, sel.colCount);
+  },
+  getElectrovalenceDatas: function (ext, tcom_electrovalence, tgljList) {
+    let datas = [];
+    let pgljMap = {};
+    let com_electrovalence = tcom_electrovalence ? tcom_electrovalence : projectObj.project.projectGLJ.datas.com_electrovalence;
+    let gljList = tgljList ? tgljList : projectObj.project.projectGLJ.datas.gljList;
+    for (let pg of gljList) {
+      pgljMap[gljUtil.getIndex(pg)] = pg;
+    }
+    if (com_electrovalence && com_electrovalence.gljList) {
+      for (let g of com_electrovalence.gljList) {
+        let t = this.createNewElectrovalenceData(g);
+        let tg = pgljMap[gljUtil.getIndex(g)];
+        if (tg) gljOprObj.setGLJPrice(t, tg, false, ext);
+        datas.push(t);
+      }
+    }
+    return datas;
+  },
+  createNewElectrovalenceData: function (g) { //只是拷贝一份
+    let t = {
+      ID: g.ID,
+      GLJID: g.GLJID,
+      projectGLJID: g.projectGLJID,
+      name: g.name,
+      displayName: g.displayName,
+      code: g.code,
+      specs: g.specs,
+      unit: g.unit,
+      type: g.type,
+      coe: g.coe,
+      from: g.from
+    };
+    return t;
+  },
 
-                if(type == "add"){
-                    this.datas.push(tem);
-                }else { //除了添加的就是替换
-                    if(this.datas[row])this.datas[row]=tem;
-                }
-                this.showDatas(this.datas);
+  calcPertElectrovalenceMarketPrice: function (datas, ext) {
+    let total = 0;
+    for (let d of datas) {
+      if (ext && ext[d.projectGLJID] && gljUtil.isDef(ext[d.projectGLJID].marketPrice)) d.marketPrice = ext[d.projectGLJID].marketPrice;
+      if (d.name == "电网电") {
+        d.electPrice = d.marketPrice;
+      } else {
+        let w = parseInt(d.name);
+        if (!w) continue;
+        let t = scMathUtil.roundForObj(d.marketPrice / w, getDecimal("process"));
+        d.electPrice = scMathUtil.roundForObj(t * gljUtil.getElecCoe(), getDecimal("glj.unitPriceHasMix"));
+      }
+      let et = scMathUtil.roundForObj(d.electPrice * d.coe, getDecimal("process"));
+      total = scMathUtil.roundForObj(et + total, getDecimal("process"));
+    }
+    this.total = scMathUtil.roundForObj(total, getDecimal("glj.unitPriceHasMix"));
+    $("#electrovalenceLabel").text(`综合电价:${this.total}`);
+    return this.total;
+  },
+  clacNewElecPrice: function (ext) {
+    for (let g of projectObj.project.projectGLJ.datas.gljList) {
+      if (g.code == gljUtil.getElecCode() && g.name == "电" && g.unit == "kW·h") { //更新电价
+        let datas = this.getElectrovalenceDatas(ext);
+        if (datas.length > 0) {
+          let marketPrice = this.calcPertElectrovalenceMarketPrice(datas, ext);
+          if (marketPrice && g.unit_price.market_price != marketPrice + '') return {
+            projectGLJID: g.id,
+            id: g.unit_price.id,
+            'unit_price_file_id': g.unit_price.unit_price_file_id,
+            doc: {
+              'market_price': marketPrice + ''
             }
-        }catch (e){
-            console.log(e)
-        }finally {
-            //materialCalcObj.showDatas();
-            $.bootstrapLoading.end();
+          }
         }
-    },
-    getGljListFromDatas:function (datas) {
-        let gljList = [];
-        for(let d of datas){
-            gljList.push(this.createNewElectrovalenceData(d));
+      }
+    }
+    return null;
+  },
+  getElectrovalenceOptions: function () {
+    return _.map(this.options, "name")
+  },
+  onElectrovalenceSelectionChange: function (sender, args) {
+    args.sheet.repaint();
+  },
+  onElectrovalenceEditStarting: function (sender, args) {
+    let me = electrovalenceObj;
+    let dataCode = me.setting.header[args.col].dataCode;
+    if (dataCode == "electPrice") { //除电网电外,不可修改
+      let cancel = true;
+      if (me.datas[args.row] && me.datas[args.row].name == "电网电") cancel = false;
+      args.cancel = cancel;
+    }
+  },
+
+
+  onElectrovalenceValueChange: function (sender, args) {
+    let me = electrovalenceObj;
+    let dataCode = me.setting.header[args.col].dataCode;
+    let value = args.newValue;
+    if (dataCode == "displayName" && args.row >= me.datas.length) { //新增
+      me.addElectrovalence(value);
+    } else { //修改
+      let tem = me.datas[args.row];
+      if (value && !sheetCommonObj.checkData(args.col, me.setting, value)) {
+        alert('输入的数据类型不对,请重新输入!');
+        return me.showDatas(me.datas);
+      }
+      if (dataCode == 'coe' || dataCode == 'electPrice') {
+        let dec = dataCode == 'coe' ? getDecimal("process") : getDecimal("glj.unitPrice");
+        if (value) {
+          value = scMathUtil.roundForObj(value, dec);
         }
-        return gljList;
-    },
-    updateElectrovalence:function () {
-        let updateMap = {};
-        let dwd = null;//电网电
-        let com_electrovalence = projectObj.project.projectGLJ.datas.com_electrovalence;
-        if(com_electrovalence){//存在则是更新
-            updateMap['electrovalence'] = {
-                actionType:'update',
-                ID:com_electrovalence.ID,
-                doc:{gljList:this.getGljListFromDatas(this.datas)}
-            };
-        }else { //不存在则是新增
-            updateMap['electrovalence'] = {
-                actionType:'add',
-                doc:{
-                    unit_price_file_id:projectObj.project.property.unitPriceFile.id,
-                    gljList:this.getGljListFromDatas(this.datas)
-                }
-            };
-            updateMap['electrovalence']['doc'].ID = uuid.v1();
+        tem[dataCode] = value;
+        if (dataCode == 'electPrice') tem.marketPrice = value;
+      } else if (dataCode == 'displayName') { //下拉替换
+        me.editElectrovalence(value, args.row, "replace");
+      }
+      me.showDatas(me.datas);
+    }
+  },
+  addElectrovalence: async function (name) {
+    this.editElectrovalence(name);
+  },
+  editElectrovalence: async function (name, row, type = "add") {
+    //新建项目的时候,电已经默认生成了,所以不用考考虑电没有的情况
+    try {
+      let glj = _.find(this.options, {
+        name: name
+      });
+      if (glj) {
+        let tem = {
+          displayName: glj.name,
+          code: glj.code,
+          specs: glj.specs,
+          unit: glj.unit,
+          type: glj.type,
+          projectID: projectObj.project.ID()
+        };
+        tem.ID = uuid.v1();
+        $.bootstrapLoading.start();
+        let result = await ajaxPost('/glj/insertElectrovalence', tem);
+        //插入项目工料机列表
+        if (type == "add" && (!result.projetcGLJData || result.projetcGLJData.length == 0)) {
+          alert("没有找到该工料机,请检查工料机库");
+          return this.showDatas(this.datas);
         }
-        for(let t of this.datas){
-            if(t.name == '电网电'){
-                dwd = t;
-            }
+        let newProjectPGJ = projectObj.project.projectGLJ.loadNewProjectGLJToCache(result.projetcGLJData);
+        //加入综合电价显示列表缓存
+        tem.GLJID = result.projetcGLJData.glj_id;
+        tem.projectGLJID = result.projetcGLJData.id;
+        tem.name = result.projetcGLJData.name;
+        tem.coe = 0;
+        tem.from = "std";
+        gljOprObj.setGLJPrice(tem, newProjectPGJ);
+
+        if (type == "add") {
+          this.datas.push(tem);
+        } else { //除了添加的就是替换
+          if (this.datas[row]) this.datas[row] = tem;
         }
-        let unitPrices = [];
-        for(let g of projectObj.project.projectGLJ.datas.gljList){
-            if(dwd && g.id == dwd.projectGLJID){
-                if(g.unit_price.market_price != dwd.electPrice+''){
-                  let  t_unitPrice = {projectGLJID:g.id,id:g.unit_price.id,'unit_price_file_id':g.unit_price.unit_price_file_id,doc:{'market_price':dwd.electPrice+""}};
-                    unitPrices.push(t_unitPrice);
-                }
-            }
-            if(g.code == gljUtil.getElecCode() && g.name == "电" && g.unit == "kW·h"){//更新电价
-                if(g.unit_price.market_price != this.total+''){
-                    let  d_unitPrice = {projectGLJID:g.id,id:g.unit_price.id,'unit_price_file_id':g.unit_price.unit_price_file_id,doc:{'market_price':this.total+''}};
-                    unitPrices.push(d_unitPrice);
-                }
+        this.showDatas(this.datas);
+      }
+    } catch (e) {
+      console.log(e)
+    } finally {
+      //materialCalcObj.showDatas();
+      $.bootstrapLoading.end();
+    }
+  },
+  getGljListFromDatas: function (datas) {
+    let gljList = [];
+    for (let d of datas) {
+      gljList.push(this.createNewElectrovalenceData(d));
+    }
+    return gljList;
+  },
+  updateElectrovalence: function () {
+    let updateMap = {};
+    let dwd = null; //电网电
+    let com_electrovalence = projectObj.project.projectGLJ.datas.com_electrovalence;
+    if (com_electrovalence) { //存在则是更新
+      updateMap['electrovalence'] = {
+        actionType: 'update',
+        ID: com_electrovalence.ID,
+        doc: {
+          gljList: this.getGljListFromDatas(this.datas)
+        }
+      };
+    } else { //不存在则是新增
+      updateMap['electrovalence'] = {
+        actionType: 'add',
+        doc: {
+          unit_price_file_id: projectObj.project.property.unitPriceFile.id,
+          gljList: this.getGljListFromDatas(this.datas)
+        }
+      };
+      updateMap['electrovalence']['doc'].ID = uuid.v1();
+    }
+    for (let t of this.datas) {
+      if (t.name == '电网电') {
+        dwd = t;
+      }
+    }
+    let unitPrices = [];
+    for (let g of projectObj.project.projectGLJ.datas.gljList) {
+      if (dwd && g.id == dwd.projectGLJID) {
+        if (g.unit_price.market_price != dwd.electPrice + '') {
+          let t_unitPrice = {
+            projectGLJID: g.id,
+            id: g.unit_price.id,
+            'unit_price_file_id': g.unit_price.unit_price_file_id,
+            doc: {
+              'market_price': dwd.electPrice + ""
             }
+          };
+          unitPrices.push(t_unitPrice);
         }
-        if(unitPrices.length > 0)updateMap["unitPrice"] =  unitPrices;
-        this.submitElectrovalenceChange(updateMap)
-    },
-    submitElectrovalenceChange:async function (updateMap) {
-        try {
-            if(!_.isEmpty(updateMap)){
-                $.bootstrapLoading.start();
-                let result =  await ajaxPost('/glj/updateElectrovalence',updateMap);
-                projectObj.project.projectGLJ.refreshEctrovalenceCache(updateMap);
+      }
+      if (g.code == gljUtil.getElecCode() && g.name == "电" && g.unit == "kW·h") { //更新电价
+        if (g.unit_price.market_price != this.total + '') {
+          let d_unitPrice = {
+            projectGLJID: g.id,
+            id: g.unit_price.id,
+            'unit_price_file_id': g.unit_price.unit_price_file_id,
+            doc: {
+              'market_price': this.total + ''
             }
-        }catch (e){
-            console.log(e)
-        }finally {
-            $.bootstrapLoading.end();
+          };
+          unitPrices.push(d_unitPrice);
         }
-
+      }
     }
+    if (unitPrices.length > 0) updateMap["unitPrice"] = unitPrices;
+    this.submitElectrovalenceChange(updateMap)
+  },
+  submitElectrovalenceChange: async function (updateMap) {
+    try {
+      if (!_.isEmpty(updateMap)) {
+        $.bootstrapLoading.start();
+        let result = await ajaxPost('/glj/updateElectrovalence', updateMap);
+        projectObj.project.projectGLJ.refreshEctrovalenceCache(updateMap);
+      }
+    } catch (e) {
+      console.log(e)
+    } finally {
+      $.bootstrapLoading.end();
+    }
+
+  }
 
 
 };
 
 $(function () {
 
-    $("#electrovalenceDiv").on('shown.bs.modal', function () {
-        electrovalenceObj.initSpread();
-        electrovalenceObj.showDatas();
-    });
+  $("#electrovalenceDiv").on('shown.bs.modal', function () {
+    electrovalenceObj.initSpread();
+    electrovalenceObj.showDatas();
+  });
 
-    $("#removeElectrovalencec").click(function(){
-        let record = sheetCommonObj.getSelectedRecode(electrovalenceObj.sheet,electrovalenceObj.datas);
-        if(record){
-            _.remove(electrovalenceObj.datas,{'ID':record.ID});
-            electrovalenceObj.showDatas(electrovalenceObj.datas);
-        }
-    });
+  $("#removeElectrovalencec").click(function () {
+    let record = sheetCommonObj.getSelectedRecode(electrovalenceObj.sheet, electrovalenceObj.datas);
+    if (record) {
+      _.remove(electrovalenceObj.datas, {
+        'ID': record.ID
+      });
+      electrovalenceObj.showDatas(electrovalenceObj.datas);
+    }
+  });
 
-    $("#electrovalencecConfirm").click(function () {
-        electrovalenceObj.updateElectrovalence();
-    })
+  $("#electrovalencecConfirm").click(function () {
+    electrovalenceObj.updateElectrovalence();
+  })
 });

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 836 - 783
web/building_saas/standard_interface/export/base.js


+ 439 - 23
web/building_saas/standard_interface/export/guangdong_zhongshan.js

@@ -3,24 +3,42 @@ INTERFACE_EXPORT = (() => {
   'use strict';
   const feeRateMap = {
     '冬季施工增加费': 'DJSGZJFFL',
+    '冬季施工': 'DJSGZJFFL',
     '雨季施工增加费': 'YUJSGZJFFL',
+    '雨季施工': 'YUJSGZJFFL',
     '夜间施工增加费': 'YEJSGZJFFL',
+    '夜间施工': 'YEJSGZJFFL',
     '高原地区施工增加费': 'GYDQSGZJFFL',
+    '高原施工': 'GYDQSGZJFFL',
     '风沙地区施工增加费': 'FSDQSGZJFFL',
+    '风沙施工': 'FSDQSGZJFFL',
     '沿海地区施工增加费': 'YHDQSGZJFFL',
+    '沿海施工': 'YHDQSGZJFFL',
     '行车干扰施工增加费': 'XCGRGCSGZJFFL',
+    '行车干扰': 'XCGRGCSGZJFFL',
     '工地转移费': 'GDZYFFL',
+    '工地转移': 'GDZYFFL',
     '施工辅助费': 'SGFZFFL',
+    '施工辅助': 'SGFZFFL',
     '基本费用': 'JBFYFL',
     '主副食运费补贴': 'ZFSYFBTFL',
-    '职工探亲费': 'ZGTQLFFL',
-    '职工取暖费': 'ZGQNBTFL',
+    '职工探亲路费': 'ZGTQLFFL',
+    '职工探亲': 'ZGTQLFFL',
+    '职工取暖补贴': 'ZGQNBTFL',
+    '职工取暖': 'ZGQNBTFL',
     '财务费用': 'CWFYFL',
     '养老保险费': 'YANGLBXFFL',
     '失业保险费': 'SYBXFFL',
     '医疗保险费': 'YILBXFFL',
     '工伤保险费': 'GSBXFL',
+    '养老保险': 'YANGLBXFFL',
+    '失业保险': 'SYBXFFL',
+    '医疗保险': 'YILBXFFL',
+    '工伤保险': 'GSBXFL',
     '住房公积金': 'ZFGJJFL',
+    '规费': 'GFZHFL',
+    '利润': 'LRL',
+    '税金': 'SL',
     '土方': 'TF',
     '石方': 'SF',
     '运输': 'YS',
@@ -71,6 +89,12 @@ INTERFACE_EXPORT = (() => {
     const isBidSubmission = exportKind === BID_SUBMISSION; // 是否是投标
     const isControl = exportKind === CONTROL; // 是否是控制价
 
+    function emptyElement(name) {
+      this.name = name;
+      this.attrs = [];
+      this.children = [];
+    }
+
     // 建设项目根节点信息
     function CprjInfo(projectName) {
       const attrs = [{
@@ -98,13 +122,13 @@ INTERFACE_EXPORT = (() => {
         },
         {
           name: 'SoftwareVer',
-          value: VERSION
+          value: 'V' + VERSION
         }, {
           name: 'SoftwareCompany',
           value: '珠海纵横创新软件有限公司'
         }, {
           name: 'MakeDate',
-          value: ''
+          value: UTIL.getNowFormatTime()
         }, {
           name: 'Key1',
           value: window.btoa(VERSION)
@@ -118,7 +142,7 @@ INTERFACE_EXPORT = (() => {
       ];
       if (isBidSubmission) attrs.splice(6, 0, {
         name: 'BidderVer',
-        value: ''
+        value: UTIL.getNowFormatTime()
       })
       Element.call(this, 'SystemInfo', attrs);
     }
@@ -170,22 +194,42 @@ INTERFACE_EXPORT = (() => {
       }];
       Element.call(this, 'Rate', attrs);
 
-      let RateParams = {
-        name: 'RateParams',
-        attrs: [],
-        children: []
+      let RateParams = new emptyElement('RateParams');
+      let subRates = projectObj.project.FeeRate.getAllSubRates(feeRateInfo.rates);
+      for (let s of subRates) {
+        let sname = s.name.replace("(%)", "");
+        sname = sname.replace("(%)", "");
+        if (feeRateMap[sname]) {
+          let value = "";
+          if (s.editable) {
+            let sel = _.find(s.optionList, {
+              selected: true
+            })
+            if (sel) {
+              value = sel.name;
+            } else if (gljUtil.isDef(s.value)) {
+              value = s.value
+            }
+          } else {
+            value = _.findIndex(s.optionList, {
+              selected: true
+            })
+            if (value == -1) value = 0
+          }
+          RateParams.children.push(new RateParam(feeRateMap[sname], value));
+        }
       }
-      RateParams.children.push(new RateParam());
+
       this.children.push(RateParams);
 
-      function RateParam() {
+      function RateParam(RateTypeNo, RateParamNo) {
         //<RateParam RateTypeNo="DJSGZJFFL" RateParamNo="0" Ratio="100"/>
         const attrs = [{
           name: 'RateTypeNo',
-          value: 'DJSGZJFFL'
+          value: RateTypeNo
         }, {
           name: 'RateParamNo',
-          value: '0'
+          value: RateParamNo
         }, {
           name: 'Ratio',
           value: '100'
@@ -193,14 +237,9 @@ INTERFACE_EXPORT = (() => {
         Element.call(this, 'RateParam', attrs);
       }
 
-      let RateValues = {
-        name: 'RateValues',
-        attrs: [],
-        children: []
-      }
+      let RateValues = new emptyElement('RateValues')
 
       function RateValue(CostTypeNo, RateTypeNo) {
-        //<RateParam RateTypeNo="DJSGZJFFL" RateParamNo="0" Ratio="100"/>
         const attrs = [{
           name: 'CostTypeNo',
           value: CostTypeNo
@@ -227,19 +266,394 @@ INTERFACE_EXPORT = (() => {
 
     }
 
-    function Pract(fileName) {
-      //<RateParam RateTypeNo="DJSGZJFFL" RateParamNo="0" Ratio="100"/>
+    function Pract(tpdata) {
+      let pgljData = tpdata.projectGLJ.datas;
       const attrs = [{
         name: 'PractNo',
-        value: 1
+        value: pgljData.constData.usedUnitPriceInfo.id
       }, {
         name: 'Name',
-        value: fileName
+        value: pgljData.constData.usedUnitPriceInfo.name
       }];
       Element.call(this, 'Pract', attrs);
 
+      let Param = {
+        name: "Param",
+        attrs: [{
+          name: "TaxLibNo",
+          value: "CCSBZ-440000-2019-544"
+        }, {
+          name: "AuxRate",
+          value: pgljData.constData.assistProductionFeeRate
+        }],
+        children: []
+      }
+      let elecDatas = electrovalenceObj.getElectrovalenceDatas(null, pgljData.com_electrovalence, pgljData.gljList);
+      electrovalenceObj.calcPertElectrovalenceMarketPrice(elecDatas);
+      for (let e of elecDatas) {
+        let Electro = {
+          name: "Electro",
+          attrs: [{
+            name: "Code",
+            value: e.code
+          }, {
+            name: "Price",
+            value: e.electPrice
+          }, {
+            name: "Ratio",
+            value: e.coe
+          }],
+          children: []
+        }
+        Param.children.push(Electro);
+      }
+
+      this.children.push(Param);
+
+      function MP(g) {
+        const attrs = [{
+          name: 'Code',
+          value: g.code
+        }, {
+          name: 'PractName',
+          value: g.name
+        }, {
+          name: 'Spec',
+          value: g.specs
+        }, {
+          name: 'Unit',
+          value: g.unit
+        }, {
+          name: 'BugetPrice',
+          value: g.priceInfo.marketPrice
+        }, {
+          name: 'NormPrice',
+          value: g.priceInfo.basePrice
+        }, {
+          name: 'IsAdd',
+          value: g.unit_price.is_add
+        }];
+        Element.call(this, 'MP', attrs);
+      }
+
+      function Material(g) {
+        const attrs = [{
+          name: 'Code',
+          value: g.code
+        }, {
+          name: 'PractName',
+          value: g.name
+        }, {
+          name: 'Spec',
+          value: g.specs
+        }, {
+          name: 'Unit',
+          value: g.unit
+        }, {
+          name: 'BugetPrice',
+          value: g.priceInfo.marketPrice
+        }, {
+          name: 'NormPrice',
+          value: g.priceInfo.basePrice
+        }, {
+          name: 'IsAdd',
+          value: g.unit_price.is_add
+        }, {
+          name: 'OrgPrice',
+          value: g.unit_price.originalPrice ? g.unit_price.originalPrice : 0,
+        }, {
+          name: 'TransFee',
+          value: g.unit_price.unitFreight ? g.unit_price.unitFreight : 0,
+        }, {
+          name: 'GwRate',
+          value: g.unit_price.grossWeightCoe_n ? g.unit_price.grossWeightCoe_n : 0,
+        }, {
+          name: 'OffSiteLf',
+          value: g.unit_price.offSiteTransportLossRate_n ? g.unit_price.offSiteTransportLossRate_n : 0,
+        }, {
+          name: 'OnSiteLf',
+          value: 0,
+        }, {
+          name: 'LoadLf',
+          value: g.unit_price.handlingLossRate_n ? g.unit_price.handlingLossRate_n : 0,
+        }, {
+          name: 'StoreRate',
+          value: g.unit_price.purchaseStorageRate_n ? g.unit_price.purchaseStorageRate_n : 0,
+        }, {
+          name: 'PackageRecycleFee',
+          value: g.unit_price.packageRecoverValue ? g.unit_price.packageRecoverValue : 0,
+        }];
+        Element.call(this, 'Material', attrs);
+        if (g.unit_price.calcMaterial == 1) { //有材料计算
+          let index = gljUtil.getIndex(g);
+          let orList = [];
+          for (let o of pgljData.originalList) {
+            if (o.connect_key == index) orList.push(new OrgPrices(o));
+          }
+          if (orList.length > 0) this.children = orList;
+        }
+
+        function CostStructure(r) { //待获取
+          this.name = 'CostStructure';
+          this.attrs = [];
+          this.children = [];
+        }
+
+        function Consume(r, o) {
+          this.name = 'Consume';
+          this.attrs = [];
+          this.children = [];
+          for (let g of o.ration_gljs) {
+            if (g.rationID == r.ID) {
+              let r_quantity = scMathUtil.roundForObj(r.quantity, tpdata.property.decimal.ration.quantity);
+              this.children.push(new ConsumeItem(g, r_quantity));
+            }
+          }
+        }
+
+        function ConsumeItem(g, ration_quantity) {
+          const attrs = [{
+            name: 'Code', //待获取
+            value: g.code
+          }, {
+            name: 'Consumption',
+            value: scMathUtil.roundForObj(ration_quantity * parseFloat(g.quantity), tpdata.property.decimal.glj.quantity)
+          }]
+          Element.call(this, 'ConsumeItem', attrs);
+        }
+
+
+        function Norm(r, o) {
+          const attrs = [{
+            name: 'NormLibNo', //待获取
+            value: ''
+          }, {
+            name: 'DisplayCode',
+            value: r.code
+          }, {
+            name: 'Name',
+            value: r.name
+          }, {
+            name: 'Unit',
+            value: r.unit
+          }, {
+            name: 'Num',
+            value: r.quantity
+          }, {
+            name: 'CostTypeNo',
+            value: '' //待获取
+          }, {
+            name: 'FabricationCost', //待获取
+            value: ''
+          }, {
+            name: 'AdjustStatus',
+            value: ''
+          }];
+          Element.call(this, 'Norm', attrs);
+          this.children.push(new CostStructure(r));
+          this.children.push(new Consume(r, o));
+        }
+
+        function SelfCollect(o) {
+          const attrs = [{
+            name: 'OtherCost',
+            value: 0
+          }];
+          Element.call(this, 'SelfCollect', attrs);
+          for (let r of o.rations) {
+            this.children.push(new Norm(r, o));
+          }
+
+
+
+        }
+
+
+        function OrgPrices(o) {
+          const attrs = [{
+            name: 'OrgPricevalue',
+            value: o.supplyPrice
+          }, {
+            name: 'Ratio',
+            value: o.coe
+          }];
+
+          Element.call(this, 'OrgPrices', attrs);
+          if (!o.rations) return;
+          this.children.push(new SelfCollect(o))
+        }
+      }
+
+      function Mech(g) {
+        const attrs = [{
+          name: 'Code',
+          value: g.code
+        }, {
+          name: 'PractName',
+          value: g.name
+        }, {
+          name: 'Spec',
+          value: g.specs
+        }, {
+          name: 'Unit',
+          value: g.unit
+        }, {
+          name: 'BugetPrice',
+          value: g.priceInfo.marketPrice
+        }, {
+          name: 'NormPrice',
+          value: g.priceInfo.basePrice
+        }, {
+          name: 'IsAdd',
+          value: g.unit_price.is_add
+        }];
+        Element.call(this, 'Mech', attrs);
+      }
+
+
+      let Mps = new emptyElement("Mps");
+      let Materials = new emptyElement("Materials");
+      let Mechs = new emptyElement("Mechs");
+      for (let g of pgljData.gljList) {
+        let type = g.type + "";
+        type = type.charAt(0);
+        if (type == '1') {
+          Mps.children.push(new MP(g));
+        } else if (type == '2' || type == 5) {
+          Materials.children.push(new Material(g));
+        } else if (type == '3') {
+          Mechs.children.push(new Mech(g));
+        }
+      }
+
+      this.children.push(Mps);
+      this.children.push(Materials);
+      this.children.push(Mechs);
+
+    }
+
+    function EprjInfo(tenderProject) {
+
+      let bills = tenderProject.Bills.datas;
+      let totalItem = null;
+      let proItem = null; //暂列金额项
+      for (let b of bills) {
+        if (b.flagsIndex.fixed.flag == fixedFlag.TOTAL_COST) totalItem = b;
+        if (b.flagsIndex.fixed.flag == fixedFlag.PROVISIONAL) proItem = b;
+      }
+
+      const attrs = [{
+        name: 'Name',
+        value: tenderProject.projectInfo.name
+      }, {
+        name: 'Sums',
+        value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0
+      }]
+      Element.call(this, 'EprjInfo', attrs);
+      this.children.push(new SummaryOfCost(totalItem, proItem));
+      this.children.push(new MakeInfo(tenderProject));
+
+
+
+    }
+
+
+    function SummaryOfCost(totalItem, proItem) {
+      const attrs = [{
+        name: 'TenderSumLimit',
+        value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0
+      }, {
+        name: 'BidTotal',
+        value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0
+      }, {
+        name: 'BillTotal',
+        value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0
+      }, {
+        name: 'CostForHSE',
+        value: 0
+      }, {
+        name: 'ProvisionalSums',
+        value: proItem.feesIndex && proItem.feesIndex.common && proItem.feesIndex.common.tenderTotalFee ? proItem.feesIndex.common.tenderTotalFee : 0
+      }, {
+        name: 'Appraisal',
+        value: totalItem.feesIndex && totalItem.feesIndex.estimate && totalItem.feesIndex.estimate.tenderTotalFee ? totalItem.feesIndex.estimate.tenderTotalFee : 0
+      }]
+      if (isBidInvitation || isControl) attrs.splice(1, 1) //招标 - 控制价
+      if (isBidSubmission) attrs.splice(0, 1) //投标
+
+      Element.call(this, 'SummaryOfCost', attrs);
+    }
+
+    function MakeInfo(property) {
+      let baseMap = {};
+      let baseInfo = _.find(property.basicInformation, {
+        'dispName': "基本信息"
+      })
+      for (let i of baseInfo.items) {
+        let key = i.dispName;
+        if (i.dispName == "编制日期") key = '编制时间';
+        baseMap[key] = i;
+      }
+
+
+      const attrs = [{
+        name: 'ValuationModel',
+        value: property.taxType
+      }, {
+        name: 'Manage',
+        value: baseMap['建设单位'] ? baseMap['建设单位'].value : ''
+      }, {
+        name: 'Designer',
+        value: baseMap['设计单位'] ? baseMap['设计单位'].value : ''
+      }, {
+        name: 'Compile',
+        value: baseMap['编制单位'] ? baseMap['编制单位'].value : ''
+      }, {
+        name: 'CompileApprover',
+        value: baseMap['编制人'] ? baseMap['编制人'].value : ''
+      }, {
+        name: 'CompileCertNo',
+        value: baseMap['编制人证书号'] ? baseMap['编制人证书号'].value : ''
+      }, {
+        name: 'CompileDate',
+        value: baseMap['编制时间'] ? baseMap['编制时间'].value : ''
+      }, {
+        name: 'Review',
+        value: baseMap['复核单位'] ? baseMap['复核单位'].value : ''
+      }, {
+        name: 'ReviewApprover',
+        value: baseMap['复核人'] ? baseMap['复核人'].value : ''
+      }, {
+        name: 'ReviewCertNo',
+        value: baseMap['复核人证书'] ? baseMap['复核人证书'].value : ''
+      }, {
+        name: 'ReviewDate',
+        value: baseMap['复核日期'] ? baseMap['复核日期'].value : ''
+      }, {
+        name: 'Examine',
+        value: baseMap['审核单位'] ? baseMap['审核单位'].value : ''
+      }, {
+        name: 'ExamineApprover',
+        value: baseMap['审核人'] ? baseMap['审核人'].value : ''
+      }, {
+        name: 'ExamineCertNo',
+        value: baseMap['审核人证书'] ? baseMap['审核人证书'].value : ''
+      }, {
+        name: 'ExamineDate',
+        value: baseMap['审核日期'] ? baseMap['审核日期'].value : ''
+      }, {
+        name: 'CompileExplain',
+        value: baseMap['编制说明'] ? baseMap['编制说明'].value : ''
+      }, {
+        name: 'ExamineExplain',
+        value: baseMap['审核说明'] ? baseMap['审核说明'].value : ''
+      }, {
+        name: 'ProjectExplain',
+        value: baseMap['工程说明'] ? baseMap['工程说明'].value : ''
+      }]
 
 
+      Element.call(this, 'MakeInfo', attrs);
     }
 
     let data = new CprjInfo(projectData.name);
@@ -248,6 +662,8 @@ INTERFACE_EXPORT = (() => {
     let tenderProject = tenderDetailMap[projectObj.project.ID()];
     let feeRataDatas = tenderProject.FeeRate.datas;
     data.children.push(new Rate(feeRataDatas));
+    data.children.push(new Pract(tenderProject))
+    data.children.push(new EprjInfo(tenderProject))
     let property = tenderProject
 
 

+ 132 - 132
web/over_write/js/quanguo_2018.js

@@ -1,158 +1,158 @@
 const progression = [];
 const deficiency = {};
 if (typeof module !== 'undefined' && !module.nodeType) {
-  module.exports = {
-    progression,
-    deficiency
-  };
+	module.exports = {
+		progression,
+		deficiency
+	};
 }
 
 
 let isQG2018 = true;
 
 function overwriteRationCalcBases() {
-  if (typeof rationCalcBases == 'undefined') return;
-  for (let key in rationCalcBases) delete rationCalcBases[key];
+	if (typeof rationCalcBases == 'undefined') return;
+	for (let key in rationCalcBases) delete rationCalcBases[key];
 
-  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);
-  };
-  rationCalcBases['施工机械人工费'] = function (node, isTender) {
-    return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.MACHINE_LABOUR, isTender);
-  };
-  rationCalcBases['设备购置费'] = function (node, isTender) {
-    return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender);
-  };
+	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);
+	};
+	rationCalcBases['施工机械人工费'] = function (node, isTender) {
+		return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.MACHINE_LABOUR, isTender);
+	};
+	rationCalcBases['设备购置费'] = function (node, isTender) {
+		return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender);
+	};
 
-  rationCalcBases['定额人工费'] = function (node, isTender) {
-    return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptBasePrice, isTender);
-  };
-  rationCalcBases['定额材料费'] = function (node, isTender) {
-    return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptBasePrice, isTender);
-  };
-  rationCalcBases['定额施工机械使用费'] = function (node, isTender) {
-    return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptBasePrice, isTender);
-  };
-  rationCalcBases['定额商品砼费'] = function (node, isTender) {
-    return calcTools.rationBaseFee(node, [gljType.COMMERCIAL_CONCRETE, gljType.COMMERCIAL_MORTAR], priceTypes.ptBasePrice, isTender);
-  };
-  rationCalcBases['定额设备费'] = function (node, isTender) {
-    return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptBasePrice, isTender);
-  };
-  rationCalcBases['定额外购砼构件费'] = function (node, isTender) {
-    return calcTools.rationBaseFee(node, [gljType.PURCHASE_COMPONENT], priceTypes.ptBasePrice, isTender);
-  };
-  rationCalcBases['定额绿化苗木费'] = function (node, isTender) {
-    return calcTools.rationBaseFee(node, [gljType.GREEN_SEEDLING], priceTypes.ptBasePrice, isTender);
-  };
+	rationCalcBases['定额人工费'] = function (node, isTender) {
+		return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptBasePrice, isTender);
+	};
+	rationCalcBases['定额材料费'] = function (node, isTender) {
+		return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptBasePrice, isTender);
+	};
+	rationCalcBases['定额施工机械使用费'] = function (node, isTender) {
+		return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptBasePrice, isTender);
+	};
+	rationCalcBases['定额商品砼费'] = function (node, isTender) {
+		return calcTools.rationBaseFee(node, [gljType.COMMERCIAL_CONCRETE, gljType.COMMERCIAL_MORTAR], priceTypes.ptBasePrice, isTender);
+	};
+	rationCalcBases['定额设备费'] = function (node, isTender) {
+		return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptBasePrice, isTender);
+	};
+	rationCalcBases['定额外购砼构件费'] = function (node, isTender) {
+		return calcTools.rationBaseFee(node, [gljType.PURCHASE_COMPONENT], priceTypes.ptBasePrice, isTender);
+	};
+	rationCalcBases['定额绿化苗木费'] = function (node, isTender) {
+		return calcTools.rationBaseFee(node, [gljType.GREEN_SEEDLING], priceTypes.ptBasePrice, isTender);
+	};
 };
 
 (function overwriteFeeTypes() {
-  if (typeof cpFeeTypes == 'undefined') return;
-  cpFeeTypes = [{
-      type: 'marketLabour',
-      name: '人工费'
-    },
-    {
-      type: 'marketMaterial',
-      name: '材料费'
-    },
-    {
-      type: 'marketMachine',
-      name: '施工机械使用费'
-    },
-    {
-      type: 'marketMachineLabour',
-      name: '施工机械人工费'
-    },
-    {
-      type: 'marketEquipment',
-      name: '设备购置费'
-    },
-    {
-      type: 'marketDirect',
-      name: '直接费'
-    },
+	if (typeof cpFeeTypes == 'undefined') return;
+	cpFeeTypes = [{
+			type: 'marketLabour',
+			name: '人工费'
+		},
+		{
+			type: 'marketMaterial',
+			name: '材料费'
+		},
+		{
+			type: 'marketMachine',
+			name: '施工机械使用费'
+		},
+		{
+			type: 'marketMachineLabour',
+			name: '施工机械人工费'
+		},
+		{
+			type: 'marketEquipment',
+			name: '设备购置费'
+		},
+		{
+			type: 'marketDirect',
+			name: '直接费'
+		},
 
-    {
-      type: 'labour',
-      name: '定额人工费'
-    },
-    {
-      type: 'material',
-      name: '定额材料费'
-    },
-    {
-      type: 'machine',
-      name: '定额施工机械使用费'
-    },
-    {
-      type: 'equipment',
-      name: '定额设备费'
-    },
-    {
-      type: 'direct',
-      name: '定额直接费'
-    },
+		{
+			type: 'labour',
+			name: '定额人工费'
+		},
+		{
+			type: 'material',
+			name: '定额材料费'
+		},
+		{
+			type: 'machine',
+			name: '定额施工机械使用费'
+		},
+		{
+			type: 'equipment',
+			name: '定额设备费'
+		},
+		{
+			type: 'direct',
+			name: '定额直接费'
+		},
 
-    {
-      type: 'measure',
-      name: '措施费'
-    },
-    {
-      type: 'manage',
-      name: '企业管理费'
-    },
-    {
-      type: 'force',
-      name: '规费'
-    },
-    {
-      type: 'profit',
-      name: '利润'
-    },
-    {
-      type: 'tax',
-      name: '税金'
-    },
-    {
-      type: 'common',
-      name: '建安费'
-    },
-    {
-      type: 'rationCommon',
-      name: '定额建安费'
-    }
-  ];
+		{
+			type: 'measure',
+			name: '措施费'
+		},
+		{
+			type: 'manage',
+			name: '企业管理费'
+		},
+		{
+			type: 'force',
+			name: '规费'
+		},
+		{
+			type: 'profit',
+			name: '利润'
+		},
+		{
+			type: 'tax',
+			name: '税金'
+		},
+		{
+			type: 'common',
+			name: '建安费'
+		},
+		{
+			type: 'rationCommon',
+			name: '定额建安费'
+		}
+	];
 })();
 
 // 在新建分段的时候需要隐藏养护类别和费用标准
 if (typeof $ !== 'undefined') { // 后端也有引用这个文件,后端引用时$没有定义会报错
-  $(document).ready(function () {
-    $('#tender-engineering-group').hide();
-    $('#tender-feeStandard-group').hide();
-  });
+	$(document).ready(function () {
+		$('#tender-engineering-group').hide();
+		$('#tender-feeStandard-group').hide();
+	});
 }
 
 
 //全国工地转移、综合里程费率值修改特殊处理
 if (typeof feeRateObject !== 'undefined') {
-  feeRateObject.feeRateSpecialHandle = function (subRate, value) {
-    let result = {};
-    if (subRate.name == "工地转移(km)" && value && value < 50) { //工地转移50km以内按50km算
-      result.valueKey = "50";
-      result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
-    }
-    if (subRate.name == "综合里程(km)" && value && value < 3) { //综合里程3km以内按3km算
-      result.valueKey = "3";
-      result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
-    }
-    return result;
-  }
+	feeRateObject.feeRateSpecialHandle = function (subRate, value) {
+		let result = {};
+		if (subRate.name == "工地转移(km)" && value && value < 50) { //工地转移50km以内按50km算
+			result.valueKey = "50";
+			result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
+		}
+		if (subRate.name == "综合里程(km)" && value && value < 3) { //综合里程3km以内按3km算
+			result.valueKey = "3";
+			result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
+		}
+		return result;
+	}
 }

+ 115 - 123
web/over_write/js/shandong_2016.js

@@ -1,141 +1,141 @@
 let isSD2016 = true;
 
 function overwriteRationCalcBases() {
-  if (typeof rationCalcBases == 'undefined') return;
+  if (typeof rationCalcBases == "undefined") return;
   for (let key in rationCalcBases) delete rationCalcBases[key];
 
-  rationCalcBases['人工费'] = function (node, isTender) {
+  rationCalcBases["人工费"] = function (node, isTender) {
     return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender);
   };
-  rationCalcBases['材料费'] = function (node, isTender) {
+  rationCalcBases["材料费"] = function (node, isTender) {
     return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender);
   };
-  rationCalcBases['施工机械使用费'] = function (node, isTender) {
+  rationCalcBases["施工机械使用费"] = function (node, isTender) {
     return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender);
   };
-  rationCalcBases['商品砼费'] = function (node, isTender) {
+  rationCalcBases["商品砼费"] = function (node, isTender) {
     return calcTools.rationBaseFee(node, [gljType.COMMERCIAL_CONCRETE, gljType.COMMERCIAL_MORTAR], priceTypes.ptMarketPrice, isTender);
   };
-  rationCalcBases['外购砼构件费'] = function (node, isTender) {
+  rationCalcBases["外购砼构件费"] = function (node, isTender) {
     return calcTools.rationBaseFee(node, [gljType.PURCHASE_COMPONENT], priceTypes.ptMarketPrice, isTender);
   };
-};
+}
 
 (function overwriteFeeTypes() {
-  if (typeof cpFeeTypes == 'undefined') return;
-  cpFeeTypes = [{
-      type: 'marketDirect',
-      name: '直接费'
+  if (typeof cpFeeTypes == "undefined") return;
+  cpFeeTypes = [
+    {
+      type: "marketDirect",
+      name: "直接费",
     },
     {
-      type: 'marketDirectWork',
-      name: '直接工程费'
-    }, {
-      type: 'marketLabour',
-      name: '人工费'
+      type: "marketDirectWork",
+      name: "直接工程费",
     },
     {
-      type: 'marketMaterial',
-      name: '材料费'
+      type: "marketLabour",
+      name: "人工费",
     },
     {
-      type: 'marketMachine',
-      name: '施工机械使用费'
+      type: "marketMaterial",
+      name: "材料费",
     },
     {
-      type: 'otherFee',
-      name: '其他工程费'
+      type: "marketMachine",
+      name: "施工机械使用费",
     },
     {
-      type: 'otherFee1',
-      name: '其他工程费I'
+      type: "otherFee",
+      name: "其他工程费",
     },
     {
-      type: 'otherFee2',
-      name: '其他工程费II'
+      type: "otherFee1",
+      name: "其他工程费I",
     },
     {
-      type: 'indirectFee',
-      name: '间接费'
+      type: "otherFee2",
+      name: "其他工程费II",
     },
     {
-      type: 'manage',
-      name: '企业管理费'
+      type: "indirectFee",
+      name: "间接费",
     },
     {
-      type: 'force',
-      name: '规费'
+      type: "manage",
+      name: "企业管理费",
     },
     {
-      type: 'profit',
-      name: '利润'
+      type: "force",
+      name: "规费",
     },
     {
-      type: 'tax',
-      name: '税金'
+      type: "profit",
+      name: "利润",
     },
     {
-      type: 'common',
-      name: '建安费'
-    }
-  ]
+      type: "tax",
+      name: "税金",
+    },
+    {
+      type: "common",
+      name: "建安费",
+    },
+  ];
 })();
 
 // 清单基数
-const progression = ['养护工程管理费', '养护工程设计费'];
+const progression = ["养护工程管理费", "养护工程设计费"];
 const deficiency = {};
-if (typeof baseFigureMap !== 'undefined') {
-  const {
-    fixedFlag
-  } = commonConstants;
+if (typeof baseFigureMap !== "undefined") {
+  const { fixedFlag } = commonConstants;
   const budgetMap = {
     // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示。
-    '建筑安装工程费': {
-      base: 'JZAZGCF',
+    建筑安装工程费: {
+      base: "JZAZGCF",
       fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
       filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
       pick: false,
     },
     // 显示:仅清单固定类别是“安全生产费”的可显示。
-    '建筑安装工程费(不含设备费)': {
-      base: 'JZAZGCFBHSB',
+    "建筑安装工程费(不含设备费)": {
+      base: "JZAZGCFBHSB",
       fixedFlag: null,
       filter: [fixedFlag.SAFE_COST],
-      pick: true
+      pick: true,
     },
     // 显示:除清单固定类别是“建筑安装工程费”、“土地使用及拆迁补偿费”的以外部分可显示。
-    '土地使用及拆迁补偿费': {
-      base: 'TDSYJCQBCF',
+    土地使用及拆迁补偿费: {
+      base: "TDSYJCQBCF",
       fixedFlag: fixedFlag.LAND_USED_DEMOLITION,
       filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE, fixedFlag.LAND_USED_DEMOLITION],
       pick: false,
     },
     // 显示:除清单固定类别是“建筑安装工程费”、“土地使用及拆迁补偿费”、“工程建设其他费用”的以外部分可显示。
-    '工程建设其他费用': {
-      base: 'GCJSQTFY',
+    工程建设其他费用: {
+      base: "GCJSQTFY",
       fixedFlag: fixedFlag.MAINTENANCE_EXPENSES,
       filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE, fixedFlag.LAND_USED_DEMOLITION, fixedFlag.MAINTENANCE_EXPENSES],
       pick: false,
     },
     // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
-    '养护工程管理费': {
+    养护工程管理费: {
       isProgressive: true,
-      base: 'YHGCGLF',
+      base: "YHGCGLF",
       fixedFlag: null,
       filter: [fixedFlag.MAINTENANCE_EXPENSES],
       pick: true,
     },
     // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
-    '养护工程设计费': {
+    养护工程设计费: {
       isProgressive: true,
-      base: 'YHGCSJF',
+      base: "YHGCSJF",
       fixedFlag: null,
       filter: [fixedFlag.MAINTENANCE_EXPENSES],
       pick: true,
     },
     // 显示:仅“价差预备费”可显示
-    '价差预备费': {
-      base: 'JCYBF',
+    价差预备费: {
+      base: "JCYBF",
       fixedFlag: null,
       filter: [fixedFlag.SPREAD_BUDGET_FEE],
       pick: true,
@@ -143,68 +143,66 @@ if (typeof baseFigureMap !== 'undefined') {
   };
   const boqMap = {
     //仅允许用于固定类别是“第100章至700章清单”以外的清单
-    '各章清单合计': {
-      base: 'GZQDHJ',
+    各章清单合计: {
+      base: "GZQDHJ",
       fixedFlag: fixedFlag.ONE_SEVEN_BILLS,
       filter: [fixedFlag.ONE_SEVEN_BILLS],
-      pick: false
+      pick: false,
     },
     //仅允许用于固定类别是“第100章至700章清单”以外的清单
-    '专项暂定合计': {
-      base: 'ZXZDHJ',
+    专项暂定合计: {
+      base: "ZXZDHJ",
       fixedFlag: null,
       filter: [fixedFlag.ONE_SEVEN_BILLS],
-      pick: false
+      pick: false,
     },
     /*
      *  清单固定行[第100章至700章清单]下的[第100章清单]需要允许清单可使用基数{100章以外合计}
      *  因此{100章以外合计}不设置关联的清单固定行
      * */
     //仅允许用于固定类别为“100章清单”引用
-    '100章以外清单合计': {
-      base: 'YBZYHQDHJ',
+    "100章以外清单合计": {
+      base: "YBZYHQDHJ",
       fixedFlag: null,
       filter: [fixedFlag.ONE_HUNDRED_BILLS],
-      pick: true
-    }
+      pick: true,
+    },
   };
   baseFigureMap.budget = budgetMap;
   baseFigureMap.boq = boqMap;
 }
 
-if (typeof baseFigureTemplate !== 'undefined') {
-  const {
-    fixedFlag
-  } = commonConstants;
+if (typeof baseFigureTemplate !== "undefined") {
+  const { fixedFlag } = commonConstants;
   baseFigureTemplate.budget = {
     // 建筑安装工程费 算法:取清单固定类别是“建筑安装工程费”的金额。
     JZAZGCF(tender) {
-      return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, 'common');
+      return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, "common");
     },
     // 土地使用及拆迁补偿费 算法:取清单固定类别是“土地使用及拆迁补偿费”的金额。
     TDSYJCQBCF(tender) {
-      return cbTools.getBaseFee(fixedFlag.LAND_USED_DEMOLITION, tender, 'common');
+      return cbTools.getBaseFee(fixedFlag.LAND_USED_DEMOLITION, tender, "common");
     },
     // 工程建设其他费用 算法:取清单固定类别是“养护工程其他费用”的金额。
     GCJSQTFY(tender) {
-      return cbTools.getBaseFee(fixedFlag.MAINTENANCE_EXPENSES, tender, 'common');
+      return cbTools.getBaseFee(fixedFlag.MAINTENANCE_EXPENSES, tender, "common");
     },
     // 养护工程管理费 算法:以{建筑安装工程费}为基数,采用累进办法计算
     YHGCGLF(tender) {
-      const baseFee = this['JZAZGCF'](tender);
+      const baseFee = this["JZAZGCF"](tender);
       if (!tender) {
         calcBase.baseProgressiveFee = baseFee;
       }
-      return calculateUtil.getProgressiveFee(baseFee, '养护工程管理费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+      return calculateUtil.getProgressiveFee(baseFee, "养护工程管理费", projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
     },
 
     // 养护工程设计费 算法:以{建筑安装工程费}为基数,采用累进办法计算。
     YHGCSJF(tender) {
-      const baseFee = this['JZAZGCF'](tender);
+      const baseFee = this["JZAZGCF"](tender);
       if (!tender) {
         calcBase.baseProgressiveFee = baseFee;
       }
-      return calculateUtil.getProgressiveFee(baseFee, '养护工程设计费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
+      return calculateUtil.getProgressiveFee(baseFee, "养护工程设计费", projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
     },
     /*  价差预备费 算法:以建筑安装工程费为基数,按设计文件编制年始至养护项目工程竣工年终的年数和年工程造价增涨率计算。
         价差预备费 P * [(1+i)^(n-1) -1]
@@ -214,40 +212,34 @@ if (typeof baseFigureTemplate !== 'undefined') {
     */
     JCYBF(tender) {
       //建筑安装工程费作为基数
-      const installFee = this['JZAZGCF'](tender);
+      const installFee = this["JZAZGCF"](tender);
       //年造价增涨
-      const costGrowthRate = calcBase.project.property.costGrowthRate ?
-        calcBase.project.property.costGrowthRate :
-        0;
+      const costGrowthRate = calcBase.project.property.costGrowthRate ? calcBase.project.property.costGrowthRate : 0;
       //增涨计费年限
-      const growthPeriod = projectObj.project.property.growthPeriod ?
-        calcBase.project.property.growthPeriod :
-        0;
+      const growthPeriod = projectObj.project.property.growthPeriod ? calcBase.project.property.growthPeriod : 0;
       //= P * [(1+i)^(n-1) -1]
       return (installFee * (Math.pow(1 + costGrowthRate, growthPeriod - 1) - 1)).toDecimal(decimalObj.bills.totalPrice);
-    }
-
+    },
   };
 
   baseFigureTemplate.boq = {
     //{各章清单合计}
     // 取清单固定类别是“第100章至700章清单”的金额
-    'GZQDHJ': function (tender) {
-      return cbTools.getBaseFee(calcBase.fixedFlag.ONE_SEVEN_BILLS, tender, 'common');
+    GZQDHJ: function (tender) {
+      return cbTools.getBaseFee(calcBase.fixedFlag.ONE_SEVEN_BILLS, tender, "common");
     },
     //{专项暂定合计}
     // 汇总专项暂定列有值的清单的金额
-    'ZXZDHJ': function (tender) {
+    ZXZDHJ: function (tender) {
       let rst = 0,
-        feeField = 'common',
-        subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
+        feeField = "common",
+        subFeeField = tender ? "tenderTotalFee" : "totalFee";
       let billsData = calcBase.project.Bills.datas,
         filterData = billsData.filter(function (data) {
           return data.specialProvisional;
         });
       for (let data of filterData) {
-        if (cbTools.isUnDef(data.feesIndex) || _.isEmpty(data.feesIndex) ||
-          cbTools.isUnDef(data.feesIndex[feeField]) || cbTools.isUnDef(data.feesIndex[feeField][subFeeField])) {
+        if (cbTools.isUnDef(data.feesIndex) || _.isEmpty(data.feesIndex) || cbTools.isUnDef(data.feesIndex[feeField]) || cbTools.isUnDef(data.feesIndex[feeField][subFeeField])) {
           continue;
         }
         rst += data.feesIndex[feeField][subFeeField];
@@ -257,7 +249,7 @@ if (typeof baseFigureTemplate !== 'undefined') {
     //{100章以外清单合计}
     // 取清单固定清单[第100章至700章清单]的金额,但扣除清单100章下的金额。
     // 如果是固定清单[第100章至700章清单]下100章以外清单引用此基数,要排除自身(目前只允许100章的清单使用,所以暂时不需要此判断)
-    'YBZYHQDHJ': function (tender) {
+    YBZYHQDHJ: function (tender) {
       let oneToSeven = cbTools.findNodeByFlag(fixedFlag.ONE_SEVEN_BILLS);
       if (!oneToSeven) {
         return 0;
@@ -277,17 +269,17 @@ if (typeof baseFigureTemplate !== 'undefined') {
       //扣除的节点:100章的节点[100-200)
       let deductNodes = allChildren.filter(cbTools.withingOneHundred);
       //计算金额
-      let fullFeeField = tender ? 'common.tenderTotalFee' : 'common.totalFee';
+      let fullFeeField = tender ? "common.tenderTotalFee" : "common.totalFee";
       return projectObj.project.calcProgram.getTotalFee([oneToSeven], deductNodes, fullFeeField).toDecimal(decimalObj.bills.totalPrice);
-    }
+    },
   };
 }
 
 //工料机类型排序:人工、机上人工、混凝土、砂浆、配合比、普通材料、商品混凝土、商品砂浆、外购砼构件、绿化苗木、机械台班、机械组成物、设备。
 
 function o_sortRationGLJ(list, std, tm) {
-  let lo_sh = typeof _ !== 'undefined' ? _ : require('lodash');
-  const field = std ? 'gljType' : 'type';
+  let lo_sh = typeof _ !== "undefined" ? _ : require("lodash");
+  const field = std ? "gljType" : "type";
   const TypeMap = {
     1: 1,
     303: 2,
@@ -304,17 +296,20 @@ function o_sortRationGLJ(list, std, tm) {
     5: 13,
   };
   if (tm) TypeMap = tm;
-  list = lo_sh.sortByAll(list, [function (item) {
-    return TypeMap[item[field]];
-  }, function (item) {
-    let arr = item.code.split('-')
-    return arr[0];
-  }, 'code']);
+  list = lo_sh.sortByAll(list, [
+    function (item) {
+      return TypeMap[item[field]];
+    },
+    function (item) {
+      let arr = item.code.split("-");
+      return arr[0];
+    },
+    "code",
+  ]);
   return list;
 }
 
-
-if (typeof gljUtil !== 'undefined') {
+if (typeof gljUtil !== "undefined") {
   gljUtil.sortRationGLJ = o_sortRationGLJ;
 
   gljUtil.sortProjectGLJ = function (list) {
@@ -334,33 +329,30 @@ if (typeof gljUtil !== 'undefined') {
       203: 12,
       204: 13,
     };
-    return o_sortRationGLJ(list, false, TypeMap)
-  }
+    return o_sortRationGLJ(list, false, TypeMap);
+  };
 }
 
-
-
-
-
 //山东工地转移费率值修改特殊处理
-if (typeof feeRateObject !== 'undefined') {
+if (typeof feeRateObject !== "undefined") {
   feeRateObject.feeRateSpecialHandle = function (subRate, value) {
     let result = {};
-    if (subRate.name == "工地转移(km)" && value && value < 50) { //工地转移50km以内按50km算
+    if (subRate.name == "工地转移(km)" && value && value < 50) {
+      //工地转移50km以内按50km算
       result.valueKey = "50";
       result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
     }
     return result;
-  }
+  };
 }
 
-if (typeof module !== 'undefined' && !module.nodeType) {
+if (typeof module !== "undefined" && !module.nodeType) {
   module.exports = {
     progression,
     deficiency,
     sortRationGLJ: o_sortRationGLJ,
     getDefalutAssistProductionFeeRate: function () {
-      return 5
-    }
+      return 5;
+    },
   };
-}
+}