Prechádzať zdrojové kódy

feat: 增加变更预算

vian 2 rokov pred
rodič
commit
2990c04b5e

+ 6 - 6
modules/all_models/compilation.js

@@ -10,7 +10,7 @@ import mongoose from "mongoose";
 let Schema = mongoose.Schema;
 let collectionName = 'compilation';
 let childrenSchema = new Schema({
-    id:String,
+    id: String,
     // 计价名称
     name: String,
     // 是否启用
@@ -22,8 +22,8 @@ let childrenSchema = new Schema({
     type: {
         type: Number
     },
-    fileTypes:[Number]//创建项目时可用文件类型 估算,概算,预算
-},{_id: false});
+    fileTypes: [Number]//创建项目时可用文件类型 估算,概算,预算 变更预算
+}, { _id: false });
 let modelSchema = {
     // 是否发布
     is_release: {
@@ -53,11 +53,11 @@ let modelSchema = {
     //描述
     description: String,
     //代码覆盖路径
-    overWriteUrl:String,
+    overWriteUrl: String,
     //例题建设项目ID
     example: Array,
     // 版本号
-    edition:String,
+    edition: String,
     // 发布时间
     release_time: {
         type: Number,
@@ -79,4 +79,4 @@ let modelSchema = {
         default: 12 // 总部id
     }
 };
-mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
+mongoose.model(collectionName, new Schema(modelSchema, { versionKey: false, collection: collectionName }));

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 248 - 247
web/users/js/compilation.js


+ 1 - 0
web/users/views/compilation/index.html

@@ -53,6 +53,7 @@
                            <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_gusuan" <% if (bill.fileTypes && bill.fileTypes.includes(15)) { %> checked <% } %> /> 估算  
                             <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_estimate"  <% if (bill.fileTypes && bill.fileTypes.includes(5)) { %> checked <% } %>  /> 概算    
                             <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_submission" <% if (bill.fileTypes && bill.fileTypes.includes(1)) { %> checked <% } %>  /> 预算      
+                            <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_changeBudget" <% if (bill.fileTypes && bill.fileTypes.includes(4)) { %> checked <% } %>  /> 变更预算      
                         </td>
                         <td>
                             <a class="copy-bill-valuation" data-id="<%= bill.id %>" href="javascript:void(0);" class="btn btn-sm">拷贝</a>