Procházet zdrojové kódy

增加查询选择控制器的功能

JXDS18FUJT před 2 roky
rodič
revize
35424b7ff6

+ 221 - 271
src/views/price/controller/index.vue

@@ -1,285 +1,235 @@
 <template>
     <div class="app-container">
-      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-        <el-form-item label="品牌" prop="brand">
-          <el-input
-            v-model="queryParams.brand"
-            placeholder="请输入品牌"
-            clearable
-            size="small"
-            @keyup.enter.native="handleQuery"
-          />
-        </el-form-item>
-        <el-form-item label="控制器型号" prop="controllerModel">
-          <el-input
-            v-model="queryParams.controllerModel"
-            placeholder="请输入控制器型号"
-            clearable
-            size="small"
-            @keyup.enter.native="handleQuery"
-          />
-        </el-form-item>
-        <el-form-item label="控制器价格" prop="controllerPrice">
-          <el-input
-            v-model="queryParams.controllerPrice"
-            placeholder="请输入控制器价格"
-            clearable
-            size="small"
-            @keyup.enter.native="handleQuery"
-          />
-        </el-form-item>
-        <el-form-item>
-          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-        </el-form-item>
-      </el-form>
-  
-      <el-row :gutter="10" class="mb8">
-        <el-col :span="1.5">
-          <el-button
-            type="primary"
-            icon="el-icon-plus"
-            size="mini"
-            @click="handleAdd"
+        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+            <el-form-item label="品牌" prop="brand">
+                <el-input v-model="queryParams.brand" placeholder="请输入品牌" clearable size="small"
+                    @keyup.enter.native="handleQuery" />
+            </el-form-item>
+            <el-form-item label="控制器型号" prop="controllerModel">
+                <el-input v-model="queryParams.controllerModel" placeholder="请输入控制器型号" clearable size="small"
+                    @keyup.enter.native="handleQuery" />
+            </el-form-item>
+            <el-form-item label="控制器价格" prop="controllerPrice">
+                <el-input v-model="queryParams.controllerPrice" placeholder="请输入控制器价格" clearable size="small"
+                    @keyup.enter.native="handleQuery" />
+            </el-form-item>
+            <el-form-item>
+                <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            </el-form-item>
+        </el-form>
 
-          >新增</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button
-            type="success"
-            icon="el-icon-edit"
-            size="mini"
-            :disabled="single"
-            @click="handleUpdate"
+        <el-row :gutter="10" class="mb8">
+            <el-col :span="1.5">
+                <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
+            </el-col>
+            <el-col :span="1.5">
+                <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single"
+                    @click="handleUpdate">修改</el-button>
+            </el-col>
+            <el-col :span="1.5">
+                <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple"
+                    @click="handleDelete">删除</el-button>
+            </el-col>
+            <el-col :span="1.5">
+                <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
+            </el-col>
+            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
 
-          >修改</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button
-            type="danger"
-            icon="el-icon-delete"
-            size="mini"
-            :disabled="multiple"
-            @click="handleDelete"
-       
-          >删除</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button
-            type="warning"
-            icon="el-icon-download"
-            size="mini"
-            @click="handleExport"
-      
-          >导出</el-button>
-        </el-col>
-        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-      </el-row>
-  
-      <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
-        <el-table-column type="selection" width="55" align="center" />
+        <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
+            <el-table-column type="selection" width="55" align="center" />
 
-        <el-table-column label="品牌" align="center" prop="brand" />
-        <el-table-column label="控制器型号" align="center" prop="controllerModel" />
-        <el-table-column label="控制器价格" align="center" prop="controllerPrice" />
-        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-edit"
-              @click="handleUpdate(scope.row)"
-         
-            >修改</el-button>
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-delete"
-              @click="handleDelete(scope.row)"
-         
-            >删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-  
-      <pagination
-        v-show="total>0"
-        :total="total"
-        :page.sync="queryParams.pageNum"
-        :limit.sync="queryParams.pageSize"
-        @pagination="getList"
-      />
-  
-      <!-- 添加或修改控制器报价对话框 -->
-      <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-          <el-form-item label="品牌" prop="brand">
-            <el-input v-model="form.brand" placeholder="请输入品牌" />
-          </el-form-item>
-          <el-form-item label="控制器型号" prop="controllerModel">
-            <el-input v-model="form.controllerModel" placeholder="请输入控制器型号" />
-          </el-form-item>
-          <el-form-item label="控制器价格" prop="controllerPrice">
-            <el-input v-model="form.controllerPrice" placeholder="请输入控制器价格" />
-          </el-form-item>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
-          <el-button @click="cancel">取 消</el-button>
-        </div>
-      </el-dialog>
+            <el-table-column label="品牌" align="center" prop="brand" />
+            <el-table-column label="控制器型号" align="center" prop="controllerModel" />
+            <el-table-column label="控制器价格" align="center" prop="controllerPrice" />
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                    <el-button size="mini" type="text" icon="el-icon-edit"
+                        @click="handleUpdate(scope.row)">修改</el-button>
+                    <el-button @click="() => {
+                        $router.push('/gallery?id=' + scope.row.id + '&type=3')
+                    
+                    }" size="mini" type="text" icon="el-icon-picture-outline">图片</el-button>
+                    <el-button size="mini" type="text" icon="el-icon-delete"
+                        @click="handleDelete(scope.row)">删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+
+        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+            @pagination="getList" />
+
+        <!-- 添加或修改控制器报价对话框 -->
+        <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+            <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+                <el-form-item label="品牌" prop="brand">
+                    <el-input v-model="form.brand" placeholder="请输入品牌" />
+                </el-form-item>
+                <el-form-item label="控制器型号" prop="controllerModel">
+                    <el-input v-model="form.controllerModel" placeholder="请输入控制器型号" />
+                </el-form-item>
+                <el-form-item label="控制器价格" prop="controllerPrice">
+                    <el-input v-model="form.controllerPrice" placeholder="请输入控制器价格" />
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="submitForm">确 定</el-button>
+                <el-button @click="cancel">取 消</el-button>
+            </div>
+        </el-dialog>
     </div>
-  </template>
-  
-  <script>
-  import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from "@/api/price/controller";
-  
-  export default {
+</template>
+
+<script>
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from "@/api/price/controller";
+
+export default {
     name: "Info",
     data() {
-      return {
-        // 遮罩层
-        loading: true,
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        // 控制器报价表格数据
-        infoList: [],
-        // 弹出层标题
-        title: "",
-        // 是否显示弹出层
-        open: false,
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          brand: null,
-          controllerModel: null,
-          controllerPrice: null,
-        },
-        // 表单参数
-        form: {},
-        // 表单校验
-        rules: {
-        }
-      };
+        return {
+            // 遮罩层
+            loading: true,
+            // 选中数组
+            ids: [],
+            // 非单个禁用
+            single: true,
+            // 非多个禁用
+            multiple: true,
+            // 显示搜索条件
+            showSearch: true,
+            // 总条数
+            total: 0,
+            // 控制器报价表格数据
+            infoList: [],
+            // 弹出层标题
+            title: "",
+            // 是否显示弹出层
+            open: false,
+            // 查询参数
+            queryParams: {
+                pageNum: 1,
+                pageSize: 10,
+                brand: null,
+                controllerModel: null,
+                controllerPrice: null,
+            },
+            // 表单参数
+            form: {},
+            // 表单校验
+            rules: {
+            }
+        };
     },
     created() {
-      this.getList();
+        this.getList();
     },
     methods: {
-      /** 查询控制器报价列表 */
-      getList() {
-        this.loading = true;
-        listInfo(this.queryParams).then(response => {
-          this.infoList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      },
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          id: null,
-          brand: null,
-          controllerModel: null,
-          controllerPrice: null,
-          updateTime: null,
-          createTime: null
-        };
-        this.resetForm("form");
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.resetForm("queryForm");
-        this.handleQuery();
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length!==1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
-        this.open = true;
-        this.title = "添加控制器报价";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        const id = row.id || this.ids
-        getInfo(id).then(response => {
-          this.form = response.data;
-          this.open = true;
-          this.title = "修改控制器报价";
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            if (this.form.id != null) {
-              updateInfo(this.form).then(response => {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addInfo(this.form).then(response => {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
-          }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids;
-        this.$confirm('是否确认删除控制器报价编号为"' + ids + '"的数据项?', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-            return delInfo(ids);
-          }).then(() => {
+        /** 查询控制器报价列表 */
+        getList() {
+            this.loading = true;
+            listInfo(this.queryParams).then(response => {
+                this.infoList = response.rows;
+                this.total = response.total;
+                this.loading = false;
+            });
+        },
+        // 取消按钮
+        cancel() {
+            this.open = false;
+            this.reset();
+        },
+        // 表单重置
+        reset() {
+            this.form = {
+                id: null,
+                brand: null,
+                controllerModel: null,
+                controllerPrice: null,
+                updateTime: null,
+                createTime: null
+            };
+            this.resetForm("form");
+        },
+        /** 搜索按钮操作 */
+        handleQuery() {
+            this.queryParams.pageNum = 1;
             this.getList();
-            this.msgSuccess("删除成功");
-          })
-      },
-      /** 导出按钮操作 */
-      handleExport() {
-        const queryParams = this.queryParams;
-        this.$confirm('是否确认导出所有控制器报价数据项?', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-            return exportInfo(queryParams);
-          }).then(response => {
-            this.download(response.data);
-          })
-      }
+        },
+        /** 重置按钮操作 */
+        resetQuery() {
+            this.resetForm("queryForm");
+            this.handleQuery();
+        },
+        // 多选框选中数据
+        handleSelectionChange(selection) {
+            this.ids = selection.map(item => item.id)
+            this.single = selection.length !== 1
+            this.multiple = !selection.length
+        },
+        /** 新增按钮操作 */
+        handleAdd() {
+            this.reset();
+            this.open = true;
+            this.title = "添加控制器报价";
+        },
+        /** 修改按钮操作 */
+        handleUpdate(row) {
+            this.reset();
+            const id = row.id || this.ids
+            getInfo(id).then(response => {
+                this.form = response.data;
+                this.open = true;
+                this.title = "修改控制器报价";
+            });
+        },
+        /** 提交按钮 */
+        submitForm() {
+            this.$refs["form"].validate(valid => {
+                if (valid) {
+                    if (this.form.id != null) {
+                        updateInfo(this.form).then(response => {
+                            this.msgSuccess("修改成功");
+                            this.open = false;
+                            this.getList();
+                        });
+                    } else {
+                        addInfo(this.form).then(response => {
+                            this.msgSuccess("新增成功");
+                            this.open = false;
+                            this.getList();
+                        });
+                    }
+                }
+            });
+        },
+        /** 删除按钮操作 */
+        handleDelete(row) {
+            const ids = row.id || this.ids;
+            this.$confirm('是否确认删除控制器报价编号为"' + ids + '"的数据项?', "警告", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(function () {
+                return delInfo(ids);
+            }).then(() => {
+                this.getList();
+                this.msgSuccess("删除成功");
+            })
+        },
+        /** 导出按钮操作 */
+        handleExport() {
+            const queryParams = this.queryParams;
+            this.$confirm('是否确认导出所有控制器报价数据项?', "警告", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(function () {
+                return exportInfo(queryParams);
+            }).then(response => {
+                this.download(response.data);
+            })
+        }
     }
-  };
-  </script>
+};
+</script>

+ 1 - 1
src/views/price/engine/index.vue

@@ -292,7 +292,7 @@
              
             >删除</el-button>
             <el-button @click="() => {
-            $router.push('/gallery?id=' + scope.row.id)
+            $router.push('/gallery?id=' + scope.row.id+'&type=2')
           
           }" size="mini" type="text" icon="el-icon-picture-outline">图片</el-button>
           </template>

+ 8 - 5
src/views/price/gallery/index.vue

@@ -3,10 +3,11 @@
     <div class="app-container">
         <el-row :gutter="10" class="mb8">
             <el-col :span="1.5">
-                <el-upload  :show-file-list="false" class="upload-demo" with-credentials :headers="{
+                <el-upload :show-file-list="false" class="upload-demo" with-credentials :headers="{
                     'Authorization': 'Bearer ' + token
                 }" action="http://xxgl.zzxcx.net/xxgl-admin/file/info" :data="{
-    priceId: priceId
+    id: priceId,
+    type:type
 
 }" :on-preview="handlePreview" :on-success="handleSuccess" :on-remove="handleRemove" :before-remove="beforeRemove"
                     multiple :on-exceed="handleExceed" :file-list="fileList">
@@ -15,8 +16,8 @@
                 </el-upload>
             </el-col>
             <el-col :span="1.5">
-                <el-button type="danger"  v-hasPermi="['price:gallery:remove']" icon="el-icon-delete" size="mini" :disabled="multiple"
-                    @click="handleDelete">删除</el-button>
+                <el-button type="danger" v-hasPermi="['price:gallery:remove']" icon="el-icon-delete" size="mini"
+                    :disabled="multiple" @click="handleDelete">删除</el-button>
             </el-col>
 
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getFileList"></right-toolbar>
@@ -32,7 +33,7 @@
 
                         <el-image v-if="getFileType(scope.row) == 'image'" :src="scope.row.fileUrl"
                             :preview-src-list="[scope.row.fileUrl]"></el-image>
-                        <video  preload="metadata" style="object-fit:contain;width: 100%;"
+                        <video preload="metadata" style="object-fit:contain;width: 100%;"
                             v-else-if="getFileType(scope.row) == 'video'" controls :src="scope.row.fileUrl"></video>
                         <span v-else>不支持预览的文件格式</span>
                     </div>
@@ -66,6 +67,7 @@ export default {
             fileList: [],
             token: getToken(),
             priceId: 0,
+            type:0,
             // 选中数组
             ids: [],
             // 非单个禁用
@@ -245,6 +247,7 @@ export default {
     },
     created() {
         this.priceId = this.$route.query.id
+        this.type  = this.$route.query.type
         this.getFileList()
 
     },

+ 136 - 28
src/views/price/manage/index.vue

@@ -1,34 +1,35 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :rules="queryRules" :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"
+      label-width="68px">
       <el-form-item label="品牌" prop="brand">
         <el-select v-model="queryParams.brand" placeholder="请选择品牌" clearable size="small"
           @keyup.enter.native="handleQuery">
-        
+
         </el-select>
       </el-form-item>
       <el-form-item label-width="auto" label="机组功率(kw)区间" prop="unitPowerKwMin">
-        <el-input v-model="queryParams.unitPowerKwMin" placeholder="请选择机组功率(kw)" clearable size="small"
+        <el-input v-model.number="queryParams.unitPowerKwMin" placeholder="请选择机组功率(kw)" clearable size="small"
           @keyup.enter.native="handleQuery">
-        
+
         </el-input>
       </el-form-item>
       <el-form-item label-width="auto" label="到" prop="unitPowerKwMax">
-        <el-input v-model="queryParams.unitPowerKwMax" placeholder="请选择机组功率(kw)" clearable size="small"
+        <el-input v-model.number="queryParams.unitPowerKwMax" placeholder="请选择机组功率(kw)" clearable size="small"
           @keyup.enter.native="handleQuery">
-         
+
         </el-input>
       </el-form-item>
       <el-form-item label-width="auto" label="机组功率(kva)区间" prop="unitPowerKvaMin">
-        <el-input v-model="queryParams.unitPowerKvaMin" placeholder="请选择机组功率(kva)" clearable size="small"
+        <el-input v-model.number="queryParams.unitPowerKvaMin" placeholder="请选择机组功率(kva)" clearable size="small"
           @keyup.enter.native="handleQuery">
-        
+
         </el-input>
       </el-form-item>
       <el-form-item label-width="auto" label="到" prop="unitPowerKvaMax">
-        <el-input v-model="queryParams.unitPowerKvaMax" placeholder="请选择机组功率(kva)" clearable size="small"
+        <el-input v-model.number="queryParams.unitPowerKvaMax" placeholder="请选择机组功率(kva)" clearable size="small"
           @keyup.enter.native="handleQuery">
-        
+
         </el-input>
       </el-form-item>
 
@@ -38,6 +39,16 @@
           <el-option v-for="(item, index) in searchOption[3]" :value="item" :key="index">{{ item }}</el-option>
         </el-select>
       </el-form-item>
+
+      <el-form-item label="控制器" prop="controllerPrice">
+        <el-select @clear="() => {
+          controllerPrice = 0
+        }" v-model="queryParams.controllerPrice" placeholder="请选择控制器" clearable size="small">
+          <el-option v-for="(item, index) in controllerList" @click.native="() => {
+            queryParams.controllerModel = item.controllerModel
+          }" :label="item.controllerModel" :value="item.controllerPrice" :key="index"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -105,20 +116,71 @@
       <el-table-column label="ATS价格" align="center" prop="atsPrice" />
       <el-table-column label="电瓶型号" align="center" prop="batteryModel" />
       <el-table-column label="电瓶价格" align="center" prop="batteryPrice" />
-      <!-- <el-table-column label="控制器铭贝" align="center" prop="controllerMinbei" />
-      <el-table-column label="控制器价格" align="center" prop="controllerPrice" /> -->
+      <el-table-column v-if="controllerModel" label="控制器型号" align="center" prop="controllerModel">
+        <template>
+          {{ controllerModel }}
+
+        </template>
+      </el-table-column>
+      <el-table-column v-if="controllerPrice" label="控制器价格" align="center" prop="controllerPrice">
+        <template>
+          {{ controllerPrice }}
+
+        </template>
+      </el-table-column>
+
 
-      <el-table-column label="合计含税成本(静音配仿斯坦福)" align="center" prop="totalCostMuteFstf" />
-      <el-table-column label="合计含税成本(静音配利来森马)" align="center" prop="totalCostMuteLlsm" />
-      <el-table-column label="合计含税成本(静音配美迪奥)" align="center" prop="totalCostMuteMda" />
-      <el-table-column label="合计含税成本(静音配马拉松)" align="center" prop="totalCostMuteMls" />
-      <el-table-column label="合计含税成本(静音配斯坦福)" align="center" prop="totalCostMuteStf" />
+      <el-table-column label="合计含税成本(静音配仿斯坦福)" align="center" prop="totalCostMuteFstf">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(静音配利来森马)" align="center" prop="totalCostMuteLlsm">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(静音配美迪奥)" align="center" prop="totalCostMuteMda">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(静音配马拉松)" align="center" prop="totalCostMuteMls">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(静音配斯坦福)" align="center" prop="totalCostMuteStf">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
 
-      <el-table-column label="合计含税成本(开架配仿斯坦福)" align="center" prop="totalCostOpenFstf" />
-      <el-table-column label="合计含税成本(开架配利来森马)" align="center" prop="totalCostOpenLlsm" />
-      <el-table-column label="合计含税成本(开架配美迪奥)" align="center" prop="totalCostOpenMda" />
-      <el-table-column label="合计含税成本(开架配马拉松)" align="center" prop="totalCostOpenMls" />
-      <el-table-column label="合计含税成本(开架配斯坦福)" align="center" prop="totalCostOpenStf" />
+      <el-table-column label="合计含税成本(开架配仿斯坦福)" align="center" prop="totalCostOpenFstf">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(开架配利来森马)" align="center" prop="totalCostOpenLlsm">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(开架配美迪奥)" align="center" prop="totalCostOpenMda">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(开架配马拉松)" align="center" prop="totalCostOpenMls">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(开架配斯坦福)" align="center" prop="totalCostOpenStf">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
 
       <!-- <el-table-column label="静音尺寸" align="center" prop="muteLong" />
       <el-table-column label="静音尺寸" align="center" prop="muteWidth" />
@@ -135,7 +197,7 @@
             v-hasPermi="['price:info:edit']">修改</el-button>
 
           <el-button @click="() => {
-            $router.push('/gallery?id=' + scope.row.id)
+            $router.push('/gallery?id=' + scope.row.id + '&type=1')
           
           }" size="mini" type="text" icon="el-icon-picture-outline">图片</el-button>
 
@@ -277,17 +339,20 @@
 
 <script>
 import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, getFieldName } from "@/api/price/manage";
+import { listInfo as controllerListInfo } from "@/api/price/controller";
 import { getToken } from '@/utils/auth'
 export default {
   name: "Info",
   data() {
     return {
+      controllerModel: "",
+      controllerPrice: 0,
       token: getToken(),
       fileList: [],
       //搜索下拉选项
       searchOption: [[], [], [], []],
       // 遮罩层
-      loading: true,
+      loading: false,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -300,19 +365,40 @@ export default {
       total: 0,
       // 报价表格数据
       infoList: [],
+      // 控制器列表
+      controllerList: [],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
       open: false,
+      //查询参数规则
+      queryRules: {
+        controllerPrice: [{ required: true, message: '请选择控制器', trigger: 'change', type: 'number' }],
+        unitPowerKwMin: [
+          { required: false, message: '请输入数字', trigger: 'change', type: 'number' }
+        ],
+        unitPowerKwMax: [
+          { required: false, message: '请输入数字', trigger: 'change', type: 'number' }
+        ],
+        unitPowerKvaMax: [
+          { required: false, message: '请输入数字', trigger: 'change', type: 'number' }
+        ],
+        unitPowerKvaMin: [
+          { required: false, message: '请输入数字', trigger: 'change', type: 'number' }
+        ],
+
+      },
       // 查询参数
       queryParams: {
+
         pageNum: 1,
         pageSize: 10,
         brand: null,
         unitModel: null,
         unitPowerKwMax: null,
         unitPowerKwMin: null,
-
+        controllerPrice: 0,
+        controllerModel: "",
 
         unitPowerKvaMax: null,
         unitPowerKvaMin: null,
@@ -351,10 +437,18 @@ export default {
     };
   },
   created() {
-    this.getList();
+    this.getControllerList()
+   
     this.getSearchOption()
   },
   methods: {
+    getControllerList() {
+      controllerListInfo().then(response => {
+        this.controllerList = response.rows;
+
+      })
+
+    },
     handleSuccess() {
       this.msgSuccess("上传成功");
       this.getList()
@@ -435,13 +529,27 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.$refs['queryForm'].validate((valid) => {
+        if (valid) {
+          this.controllerModel = this.queryParams.controllerModel||''
+          this.controllerPrice = this.queryParams.controllerPrice || 0
+          this.queryParams.pageNum = 1;
+          this.getList();
+        } else {
+
+          return false;
+        }
+      });
+
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.controllerPrice = 0
+      this.controllerModel = ''
+      
       this.resetForm("queryForm");
       this.handleQuery();
+     
     },
     // 多选框选中数据
     handleSelectionChange(selection) {

+ 145 - 44
src/views/price/query/index.vue

@@ -1,43 +1,54 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :rules="queryRules" :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"
+      label-width="68px">
       <el-form-item label="品牌" prop="brand">
         <el-select v-model="queryParams.brand" placeholder="请选择品牌" clearable size="small"
           @keyup.enter.native="handleQuery">
-          <el-option v-for="(item, index) in searchOption[0]" :value="item" :key="index">{{ item }}</el-option>
+
         </el-select>
       </el-form-item>
       <el-form-item label-width="auto" label="机组功率(kw)区间" prop="unitPowerKwMin">
-        <el-select v-model="queryParams.unitPowerKwMin" placeholder="请选择机组功率(kw)" clearable size="small"
+        <el-input v-model.number="queryParams.unitPowerKwMin" placeholder="请选择机组功率(kw)" clearable size="small"
           @keyup.enter.native="handleQuery">
-          <el-option v-for="(item, index) in searchOption[1]" :value="item" :key="index">{{ item }}</el-option>
-        </el-select>
+
+        </el-input>
       </el-form-item>
       <el-form-item label-width="auto" label="到" prop="unitPowerKwMax">
-        <el-select v-model="queryParams.unitPowerKwMax" placeholder="请选择机组功率(kw)" clearable size="small"
+        <el-input v-model.number="queryParams.unitPowerKwMax" placeholder="请选择机组功率(kw)" clearable size="small"
           @keyup.enter.native="handleQuery">
-          <el-option v-for="(item, index) in searchOption[1]" :value="item" :key="index">{{ item }}</el-option>
-        </el-select>
+
+        </el-input>
       </el-form-item>
-      <el-form-item label-width="auto"  label="机组功率(kva)区间" prop="unitPowerKvaMin">
-        <el-select v-model="queryParams.unitPowerKvaMin" placeholder="请选择机组功率(kva)" clearable size="small"
+      <el-form-item label-width="auto" label="机组功率(kva)区间" prop="unitPowerKvaMin">
+        <el-input v-model.number="queryParams.unitPowerKvaMin" placeholder="请选择机组功率(kva)" clearable size="small"
           @keyup.enter.native="handleQuery">
-          <el-option v-for="(item, index) in searchOption[2]" :value="item" :key="index">{{ item }}</el-option>
-        </el-select>
+
+        </el-input>
       </el-form-item>
       <el-form-item label-width="auto" label="到" prop="unitPowerKvaMax">
-        <el-select v-model="queryParams.unitPowerKvaMax" placeholder="请选择机组功率(kva)" clearable size="small"
+        <el-input v-model.number="queryParams.unitPowerKvaMax" placeholder="请选择机组功率(kva)" clearable size="small"
           @keyup.enter.native="handleQuery">
-          <el-option v-for="(item, index) in searchOption[2]" :value="item" :key="index">{{ item }}</el-option>
-        </el-select>
+
+        </el-input>
       </el-form-item>
- 
+
       <el-form-item label="频率" prop="rate">
         <el-select v-model="queryParams.rate" placeholder="请选择频率" clearable size="small"
           @keyup.enter.native="handleQuery">
           <el-option v-for="(item, index) in searchOption[3]" :value="item" :key="index">{{ item }}</el-option>
         </el-select>
       </el-form-item>
+
+      <el-form-item label="控制器" prop="controllerPrice">
+        <el-select @clear="() => {
+          controllerPrice = 0
+        }" v-model="queryParams.controllerPrice" placeholder="请选择控制器" clearable size="small">
+          <el-option v-for="(item, index) in controllerList" @click.native="() => {
+            queryParams.controllerModel = item.controllerModel
+          }" :label="item.controllerModel" :value="item.controllerPrice" :key="index"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -64,7 +75,8 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table fit :row-style="{ height: '35px' }" v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
+    <el-table fit :row-style="{ height: '35px' }" v-loading="loading" :data="infoList"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="品牌" align="center" prop="brand" />
       <el-table-column width="180px" label="机组型号" align="center" prop="unitModel" />
@@ -85,45 +97,91 @@
       <!-- <el-table-column width="180px" label="发电机价格(马拉松)" align="center" prop="generatorPriceMls" /> -->
       <el-table-column width="180px" label="发电机型号(斯坦福)" align="center" prop="generatorModelStf" />
       <!-- <el-table-column width="180px" label="发电机价格(斯坦福)" align="center" prop="generatorPriceStf" /> -->
-    
 
 
 
 
-  
+
+
       <!-- <el-table-column label="静音机壳价格" align="center" prop="mutePrice" /> -->
       <!-- <el-table-column label="开架价格" align="center" prop="openPrice" /> -->
       <el-table-column label="ATS型号" align="center" prop="atsModel" />
       <!-- <el-table-column label="ATS价格" align="center" prop="atsPrice" /> -->
       <el-table-column label="电瓶型号" align="center" prop="batteryModel" />
       <!-- <el-table-column label="电瓶价格" align="center" prop="batteryPrice" /> -->
+      <el-table-column v-if="controllerModel" label="控制器型号" align="center" prop="controllerModel">
+        <template>
+          {{ controllerModel }}
 
+        </template>
+      </el-table-column>
+
+
+
+      <el-table-column label="合计含税成本(静音配仿斯坦福)" align="center" prop="totalCostMuteFstf">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(静音配利来森马)" align="center" prop="totalCostMuteLlsm">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(静音配美迪奥)" align="center" prop="totalCostMuteMda">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(静音配马拉松)" align="center" prop="totalCostMuteMls">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(静音配斯坦福)" align="center" prop="totalCostMuteStf">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
 
-      <el-table-column label="合计含税成本(静音配仿斯坦福)" align="center" prop="totalCostMuteFstf" />
-      <el-table-column label="合计含税成本(静音配利来森马)" align="center" prop="totalCostMuteLlsm" />
-      <el-table-column label="合计含税成本(静音配美迪奥)" align="center" prop="totalCostMuteMda" />
-      <el-table-column label="合计含税成本(静音配马拉松)" align="center" prop="totalCostMuteMls" />
-      <el-table-column label="合计含税成本(静音配斯坦福)" align="center" prop="totalCostMuteStf" />
+      <el-table-column label="合计含税成本(开架配仿斯坦福)" align="center" prop="totalCostOpenFstf">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(开架配利来森马)" align="center" prop="totalCostOpenLlsm">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(开架配美迪奥)" align="center" prop="totalCostOpenMda">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(开架配马拉松)" align="center" prop="totalCostOpenMls">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
+      <el-table-column label="合计含税成本(开架配斯坦福)" align="center" prop="totalCostOpenStf">
+        <template slot-scope="scope">
+          {{ scope.row.totalCostMuteFstf + controllerPrice }}
+        </template>
+      </el-table-column>
 
-      <el-table-column label="合计含税成本(开架配仿斯坦福)" align="center" prop="totalCostOpenFstf" />
-      <el-table-column label="合计含税成本(开架配利来森马)" align="center" prop="totalCostOpenLlsm" />
-      <el-table-column label="合计含税成本(开架配美迪奥)" align="center" prop="totalCostOpenMda" />
-      <el-table-column label="合计含税成本(开架配马拉松)" align="center" prop="totalCostOpenMls" />
-      <el-table-column label="合计含税成本(开架配斯坦福)" align="center" prop="totalCostOpenStf" />
-    
       <el-table-column width="180px" fixed="right" label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
             v-hasPermi="['price:info:edit']">修改</el-button> -->
-         
-            <el-button @click="()=>{
-              $router.push('/gallery?id='+scope.row.id)
 
-            }" size="mini" type="text" icon="el-icon-picture-outline"
-             >图片</el-button>
-      
+          <el-button @click="() => {
+            $router.push('/gallery?id=' + scope.row.id)
+          
+          }" size="mini" type="text" icon="el-icon-picture-outline">图片</el-button>
+
 
-<!-- 
+          <!-- 
 
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
             v-hasPermi="['price:info:remove']">删除</el-button> -->
@@ -235,15 +293,17 @@
 
 <script>
 import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, getFieldName } from "@/api/price/manage";
-
+import { listInfo as controllerListInfo } from "@/api/price/controller";
 export default {
   name: "Info",
   data() {
     return {
+      controllerModel: '',
+      controllerPrice: 0,
       //搜索下拉选项
-      searchOption: [[], [], [],[]],
+      searchOption: [[], [], [], []],
       // 遮罩层
-      loading: true,
+      loading: false,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -256,10 +316,28 @@ export default {
       total: 0,
       // 报价表格数据
       infoList: [],
+      // 控制器列表
+      controllerList: [],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
       open: false,
+      //查询参数规则
+      queryRules: {
+        controllerPrice: [{ required: true, message: '请选择控制器', trigger: 'change', type: 'number' }],
+        unitPowerKwMin: [
+          { required: false, message: '请输入数字', trigger: 'change', type: 'number' }
+        ],
+        unitPowerKwMax: [
+          { required: false, message: '请输入数字', trigger: 'change', type: 'number' }
+        ],
+        unitPowerKvaMax: [
+          { required: false, message: '请输入数字', trigger: 'change', type: 'number' }
+        ],
+        unitPowerKvaMin: [
+          { required: false, message: '请输入数字', trigger: 'change', type: 'number' }
+        ],
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -268,7 +346,8 @@ export default {
         unitModel: null,
         unitPowerKwMax: null,
         unitPowerKwMin: null,
-
+        controllerModel: '',
+        controllerPrice: 0,
 
         unitPowerKvaMax: null,
         unitPowerKvaMin: null,
@@ -307,11 +386,19 @@ export default {
     };
   },
   created() {
-    this.getList();
+    this.getControllerList()
+  
     this.getSearchOption()
   },
   methods: {
-    push(url){
+    getControllerList() {
+      controllerListInfo().then(response => {
+        this.controllerList = response.rows;
+
+      })
+
+    },
+    push(url) {
       this.router.push(url)
     },
     getSearchOption() {
@@ -387,11 +474,25 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      this.controllerPrice = 0
+      this.controllerModel = ''
       this.queryParams.pageNum = 1;
-      this.getList();
+      this.$refs['queryForm'].validate((valid) => {
+        if (valid) {
+          this.controllerModel = this.queryParams.controllerModel||''
+          this.controllerPrice = this.queryParams.controllerPrice || 0
+          this.queryParams.pageNum = 1;
+          this.getList();
+        } else {
+
+          return false;
+        }
+      });
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.controllerPrice = 0
+      this.controllerModel = ''
       this.resetForm("queryForm");
       this.handleQuery();
     },