浏览代码

feat: 前台信息价地区项按照后台地区排序字段进行排序

vian 4 年之前
父节点
当前提交
8794d94497
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1 0
      modules/all_models/std_price_info_areas.js
  2. 1 0
      web/building_saas/main/js/views/project_glj_view.js

+ 1 - 0
modules/all_models/std_price_info_areas.js

@@ -3,6 +3,7 @@ const mongoose = require('mongoose');
 
 const Schema = mongoose.Schema;
 const priceInfoArea = new Schema({
+    serialNo: Number,
     ID: String,
     compilationID: String,
     name: String

+ 1 - 0
web/building_saas/main/js/views/project_glj_view.js

@@ -1633,6 +1633,7 @@ let projectGljObject = {
   createSelectOptions: function (ele, opts, isArea) {
     ele.empty();
     let str = `<option value=""></option>`;
+    opts.sort((a, b) => a.serialNo - b.serialNo);
     for (let o of opts) {
       if (isArea == true) {
         str += `<option value="${o.ID}">${o.name}</option>`