瀏覽代碼

动力,控制器,发电机的导入

JXDS18FUJT 2 年之前
父節點
當前提交
c62eb14d82

+ 318 - 202
src/views/price/controller/index.vue

@@ -1,218 +1,334 @@
 <template>
-    <div class="app-container">
+  <div class="app-container">
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          v-hasPermi="['controller:info:add']"
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          >新增</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          v-hasPermi="['controller:info:update']"
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          >修改</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          v-hasPermi="['controller:info:remove']"
+          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>
+      <el-col :span="1.5">
+        <el-upload
+          v-hasPermi="['controller:info:import']"
+          :show-file-list="false"
+          class="upload-demo"
+          with-credentials
+          :headers="{
+            Authorization: 'Bearer ' + token,
+          }"
+          action="http://xxgl.zzxcx.net/xxgl-admin/controller/info/import"
+          :on-success="handleSuccess"
+          multiple
+          accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+          :file-list="fileList"
+        >
+          <el-button
+            type="warning"
+            icon="el-icon-bottom"
+            size="mini"
+            v-hasPermi="['controller:info:import']"
+            >导入</el-button
+          >
+        </el-upload>
+      </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-row :gutter="10" class="mb8">
-            <el-col :span="1.5">
-                <el-button  v-hasPermi="['controller:info:add']" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
-            </el-col>
-            <el-col :span="1.5">
-                <el-button v-hasPermi="['controller:info:update']" type="success" icon="el-icon-edit" size="mini" :disabled="single"
-                    @click="handleUpdate">修改</el-button>
-            </el-col>
-            <el-col :span="1.5">
-                <el-button v-hasPermi="['controller:info:remove']" 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-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>
 
-        <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
-            <el-table-column type="selection" width="55" align="center" />
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
 
-            <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>
+    <!-- 添加或修改控制器报价对话框 -->
+    <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";
-
+import {
+  listInfo,
+  getInfo,
+  delInfo,
+  addInfo,
+  updateInfo,
+  exportInfo,
+} from "@/api/price/controller";
+import { getToken } from "@/utils/auth";
 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: {
-            }
-        };
+  name: "Info",
+  data() {
+    return {
+      token: getToken(),
+      // 遮罩层
+      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();
+  },
+  methods: {
+    handleSuccess() {
+      this.msgSuccess("上传成功");
+      this.getList();
+      // this.getList()
     },
-    created() {
-        this.getList();
+    /** 查询控制器报价列表 */
+    getList() {
+      this.loading = true;
+      listInfo(this.queryParams).then((response) => {
+        this.infoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
-    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 = "修改控制器报价";
+    // 取消按钮
+    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();
             });
-        },
-        /** 提交按钮 */
-        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();
-                        });
-                    }
-                }
+          } 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);
-            })
+          }
         }
-    }
+      });
+    },
+    /** 删除按钮操作 */
+    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>

+ 31 - 0
src/views/price/engine/index.vue

@@ -230,6 +230,30 @@ emissionStandard">
       <el-col :span="1.5">
         <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-upload
+          v-hasPermi="['engine:info:import']"
+          :show-file-list="false"
+          class="upload-demo"
+          with-credentials
+          :headers="{
+            Authorization: 'Bearer ' + token,
+          }"
+          action="http://xxgl.zzxcx.net/xxgl-admin/engine/info/import"
+          :on-success="handleSuccess"
+          multiple
+          accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+          :file-list="fileList"
+        >
+          <el-button
+            type="warning"
+            icon="el-icon-bottom"
+            size="mini"
+            v-hasPermi="['engine:info:import']"
+            >导入</el-button
+          >
+        </el-upload>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -376,10 +400,12 @@ emissionStandard">
 <script>
 import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, getFieldName } from "@/api/price/engine";
 import { mapGetters } from 'vuex'
+import { getToken } from "@/utils/auth";
 export default {
   name: "Info",
   data() {
     return {
+      token: getToken(),
       searchOption: [[], [], [], []],
       // 遮罩层
       loading: true,
@@ -451,6 +477,11 @@ export default {
 
 
     },
+    handleSuccess() {
+      this.msgSuccess("上传成功");
+      this.getSearchOption();
+      this.getList()
+    },
 
     /** 查询报价列表 */
     getList() {

+ 419 - 262
src/views/price/generator/hz50/index.vue

@@ -1,6 +1,6 @@
 <template>
-    <div class="app-container">
-        <!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+  <div class="app-container">
+    <!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="型号规格" prop="fdjModel">
         <el-input
           v-model="queryParams.fdjModel"
@@ -117,59 +117,169 @@
       </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"
-                    v-hasPermi="['price:generator:hz50:add']">新增</el-button>
-            </el-col>
-            <el-col :span="1.5">
-                <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
-                    v-hasPermi="['price:generator:hz50:update']">修改</el-button>
-            </el-col>
-            <el-col :span="1.5">
-                <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
-                    v-hasPermi="['price:generator:hz50:remove']">删除</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-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['price:generator:hz50:add']"
+          >新增</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['price:generator:hz50:update']"
+          >修改</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['price:generator:hz50:remove']"
+          >删除</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>
+      <el-col :span="1.5">
+        <el-upload
+          v-hasPermi="['price:generator:hz50:import']"
+          :show-file-list="false"
+          class="upload-demo"
+          with-credentials
+          :headers="{
+            Authorization: 'Bearer ' + token,
+          }"
+          action="http://xxgl.zzxcx.net/xxgl-admin/fdj50/info/import"
+          :on-success="handleSuccess"
+          multiple
+          accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+          :file-list="fileList"
+        >
+          <el-button
+            type="warning"
+            icon="el-icon-bottom"
+            size="mini"
+            v-hasPermi="['price:generator:hz50:import']"
+            >导入</el-button
+          >
+        </el-upload>
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
 
-        <el-table fit v-loading="loading" size="mini" :data="infoList" @selection-change="handleSelectionChange">
-            <el-table-column type="selection" width="55" align="center" />
-            <!-- <el-table-column label="主键" align="center" prop="id" /> -->
-            <el-table-column label="型号规格" align="center" prop="fdjModel" />
-            <el-table-column label="标准止口" align="center" prop="standardSeam" />
-            <el-table-column label="频率(Hz)" align="center" prop="rate" />
-            <el-table-column label="功率 3-ph/50Hz/380-440V(kw)" align="center" prop="fdjPowerKw" />
-            <el-table-column label="功率 3-ph/50Hz/380-440V(kva)" align="center" prop="fdjPowerKva" />
-            <el-table-column label="含税出厂价(单支点)" align="center" prop="singleFulcrumPrice" />
-            <el-table-column label="含税出厂价(双支点)" align="center" prop="doubleFulcrumPrice" />
-            <el-table-column label="含税出厂价(包装箱价格)" align="center" prop="packingBoxPrice" />
-            <el-table-column label="含税出厂价(仪表箱)" align="center" prop="instrumentBoxPrice" />
-            <el-table-column label="含税出厂价(空开)" align="center" prop="airSwitchPrice" />
-            <el-table-column label="包装尺寸" align="center" prop="openParms" />
-            <el-table-column label="净重/毛重" align="center" prop="weight" />
-            
-            <el-table-column width="180px" label="操作" align="center" class-name="small-padding fixed-width">
-                <template slot-scope="scope">
-                    <div style="display:inline-flex">
-                        <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-                            v-hasPermi="['price:generator:hz60:update']">修改</el-button>
-                        <el-button @click="() => {
-                            $router.push('/gallery?id=' + scope.row.id + '&type=4')
-                        
-                        }" 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:generator:hz60:remove']">删除</el-button>
-                    </div>
-                </template>
-            </el-table-column>
-        </el-table>
+    <el-table
+      fit
+      v-loading="loading"
+      size="mini"
+      :data="infoList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <!-- <el-table-column label="主键" align="center" prop="id" /> -->
+      <el-table-column label="型号规格" align="center" prop="fdjModel" />
+      <el-table-column label="标准止口" align="center" prop="standardSeam" />
+      <el-table-column label="频率(Hz)" align="center" prop="rate" />
+      <el-table-column
+        label="功率 3-ph/50Hz/380-440V(kw)"
+        align="center"
+        prop="fdjPowerKw"
+      />
+      <el-table-column
+        label="功率 3-ph/50Hz/380-440V(kva)"
+        align="center"
+        prop="fdjPowerKva"
+      />
+      <el-table-column
+        label="含税出厂价(单支点)"
+        align="center"
+        prop="singleFulcrumPrice"
+      />
+      <el-table-column
+        label="含税出厂价(双支点)"
+        align="center"
+        prop="doubleFulcrumPrice"
+      />
+      <el-table-column
+        label="含税出厂价(包装箱价格)"
+        align="center"
+        prop="packingBoxPrice"
+      />
+      <el-table-column
+        label="含税出厂价(仪表箱)"
+        align="center"
+        prop="instrumentBoxPrice"
+      />
+      <el-table-column
+        label="含税出厂价(空开)"
+        align="center"
+        prop="airSwitchPrice"
+      />
+      <el-table-column label="包装尺寸" align="center" prop="openParms" />
+      <el-table-column label="净重/毛重" align="center" prop="weight" />
 
-        <!-- <pagination
+      <el-table-column
+        width="180px"
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <div style="display: inline-flex">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['price:generator:hz60:update']"
+              >修改</el-button
+            >
+            <el-button
+              @click="
+                () => {
+                  $router.push('/gallery?id=' + scope.row.id + '&type=4');
+                }
+              "
+              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:generator:hz60:remove']"
+              >删除</el-button
+            >
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- <pagination
       v-show="total>0"
       :total="total"
       :page.sync="queryParams.pageNum"
@@ -177,223 +287,270 @@
       @pagination="getList"
     /> -->
 
-        <!-- 添加或修改发电机60hz报价对话框 -->
-        <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="fdjModel">
-                    <el-input v-model="form.fdjModel" placeholder="请输入型号规格" />
-                </el-form-item>
-                <el-form-item label="标准止口" prop="standardSeam">
-                    <el-input v-model="form.standardSeam" placeholder="请输入标准止口" />
-                </el-form-item>
-                <el-form-item label="频率(Hz)" prop="rate">
-                    <el-input v-model="form.rate" placeholder="请输入频率(Hz)" />
-                </el-form-item>
-                <el-form-item label="功率 3-ph/50Hz/380-440V(kw)" prop="fdjPowerKw">
-                    <el-input v-model="form.fdjPowerKw" placeholder="请输入功率 3-ph/50Hz/380-440V(kw)" />
-                </el-form-item>
-                <el-form-item label="功率 3-ph/50Hz/380-440V(kva)" prop="fdjPowerKva">
-                    <el-input v-model="form.fdjPowerKva" placeholder="请输入功率 3-ph/50Hz/380-440V(kva)" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="singleFulcrumPrice">
-                    <el-input v-model="form.singleFulcrumPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="doubleFulcrumPrice">
-                    <el-input v-model="form.doubleFulcrumPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="packingBoxPrice">
-                    <el-input v-model="form.packingBoxPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="instrumentBoxPrice">
-                    <el-input v-model="form.instrumentBoxPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="airSwitchPrice">
-                    <el-input v-model="form.airSwitchPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="包装尺寸
-" prop="openParms">
-                    <el-input v-model="form.openParms" placeholder="请输入包装尺寸
-" />
-                </el-form-item>
-                <el-form-item label="净重/毛重" prop="weight">
-                    <el-input v-model="form.weight" 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>
+    <!-- 添加或修改发电机60hz报价对话框 -->
+    <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="fdjModel">
+          <el-input v-model="form.fdjModel" placeholder="请输入型号规格" />
+        </el-form-item>
+        <el-form-item label="标准止口" prop="standardSeam">
+          <el-input v-model="form.standardSeam" placeholder="请输入标准止口" />
+        </el-form-item>
+        <el-form-item label="频率(Hz)" prop="rate">
+          <el-input v-model="form.rate" placeholder="请输入频率(Hz)" />
+        </el-form-item>
+        <el-form-item label="功率 3-ph/50Hz/380-440V(kw)" prop="fdjPowerKw">
+          <el-input
+            v-model="form.fdjPowerKw"
+            placeholder="请输入功率 3-ph/50Hz/380-440V(kw)"
+          />
+        </el-form-item>
+        <el-form-item label="功率 3-ph/50Hz/380-440V(kva)" prop="fdjPowerKva">
+          <el-input
+            v-model="form.fdjPowerKva"
+            placeholder="请输入功率 3-ph/50Hz/380-440V(kva)"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="singleFulcrumPrice">
+          <el-input
+            v-model="form.singleFulcrumPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="doubleFulcrumPrice">
+          <el-input
+            v-model="form.doubleFulcrumPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="packingBoxPrice">
+          <el-input
+            v-model="form.packingBoxPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="instrumentBoxPrice">
+          <el-input
+            v-model="form.instrumentBoxPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="airSwitchPrice">
+          <el-input
+            v-model="form.airSwitchPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item
+          label="包装尺寸
+"
+          prop="openParms"
+        >
+          <el-input
+            v-model="form.openParms"
+            placeholder="请输入包装尺寸
+"
+          />
+        </el-form-item>
+        <el-form-item label="净重/毛重" prop="weight">
+          <el-input v-model="form.weight" 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/hz50";
-
+import {
+  listInfo,
+  getInfo,
+  delInfo,
+  addInfo,
+  updateInfo,
+  exportInfo,
+} from "@/api/price/hz50";
+import { getToken } from "@/utils/auth";
 export default {
-    name: "Info",
-    data() {
-        return {
-            // 遮罩层
-            loading: true,
-            // 选中数组
-            ids: [],
-            // 非单个禁用
-            single: true,
-            // 非多个禁用
-            multiple: true,
-            // 显示搜索条件
-            showSearch: true,
-            // 总条数
-            total: 0,
-            // 发电机60hz报价表格数据
-            infoList: [],
-            // 弹出层标题
-            title: "",
-            // 是否显示弹出层
-            open: false,
-            // 查询参数
-            queryParams: {
-                pageNum: 1,
-                pageSize: 1000,
-                fdjModel: null,
-                standardSeam: null,
-                rate: null,
-                fdjPowerKw: null,
-                fdjPowerKva: null,
-                singleFulcrumPrice: null,
-                doubleFulcrumPrice: null,
-                packingBoxPrice: null,
-                instrumentBoxPrice: null,
-                airSwitchPrice: null,
-                openParms: null,
-                weight: null,
-            },
-            // 表单参数
-            form: {},
-            // 表单校验
-            rules: {
-            }
-        };
+  name: "Info",
+  data() {
+    return {
+      token: getToken(),
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 发电机60hz报价表格数据
+      infoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        fdjModel: null,
+        standardSeam: null,
+        rate: null,
+        fdjPowerKw: null,
+        fdjPowerKva: null,
+        singleFulcrumPrice: null,
+        doubleFulcrumPrice: null,
+        packingBoxPrice: null,
+        instrumentBoxPrice: null,
+        airSwitchPrice: null,
+        openParms: null,
+        weight: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    handleSuccess() {
+      this.msgSuccess("上传成功");
+      this.getList();
+      // this.getList()
     },
-    created() {
-        this.getList();
+    /** 查询发电机60hz报价列表 */
+    getList() {
+      this.loading = true;
+      listInfo(this.queryParams).then((response) => {
+        this.infoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
-    methods: {
-        /** 查询发电机60hz报价列表 */
-        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,
-                fdjModel: null,
-                standardSeam: null,
-                rate: null,
-                fdjPowerKw: null,
-                fdjPowerKva: null,
-                singleFulcrumPrice: null,
-                doubleFulcrumPrice: null,
-                packingBoxPrice: null,
-                instrumentBoxPrice: null,
-                airSwitchPrice: null,
-                openParms: null,
-                weight: 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 = "添加发电机60hz报价";
-        },
-        /** 修改按钮操作 */
-        handleUpdate(row) {
-            this.reset();
-            const id = row.id || this.ids
-            getInfo(id).then(response => {
-                this.form = response.data;
-                this.open = true;
-                this.title = "修改发电机60hz报价";
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        fdjModel: null,
+        standardSeam: null,
+        rate: null,
+        fdjPowerKw: null,
+        fdjPowerKva: null,
+        singleFulcrumPrice: null,
+        doubleFulcrumPrice: null,
+        packingBoxPrice: null,
+        instrumentBoxPrice: null,
+        airSwitchPrice: null,
+        openParms: null,
+        weight: 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 = "添加发电机60hz报价";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids;
+      getInfo(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改发电机60hz报价";
+      });
+    },
+    /** 提交按钮 */
+    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();
             });
-        },
-        /** 提交按钮 */
-        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();
-                        });
-                    }
-                }
+          } else {
+            addInfo(this.form).then((response) => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
             });
-        },
-        /** 删除按钮操作 */
-        handleDelete(row) {
-            const ids = row.id || this.ids;
-            this.$confirm('是否确认删除发电机60hz报价编号为"' + ids + '"的数据项?', "警告", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(function () {
-                return delInfo(ids);
-            }).then(() => {
-                this.getList();
-                this.msgSuccess("删除成功");
-            })
-        },
-        /** 导出按钮操作 */
-        handleExport() {
-            const queryParams = this.queryParams;
-            this.$confirm('是否确认导出所有发电机60hz报价数据项?', "警告", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(function () {
-                return exportInfo(queryParams);
-            }).then(response => {
-                this.download(response.data);
-            })
+          }
         }
-    }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(
+        '是否确认删除发电机60hz报价编号为"' + ids + '"的数据项?',
+        "警告",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(function () {
+          return delInfo(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有发电机60hz报价数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return exportInfo(queryParams);
+        })
+        .then((response) => {
+          this.download(response.data);
+        });
+    },
+  },
 };
 </script>

+ 418 - 261
src/views/price/generator/hz60/index.vue

@@ -1,6 +1,6 @@
 <template>
-    <div class="app-container">
-        <!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+  <div class="app-container">
+    <!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="型号规格" prop="fdjModel">
         <el-input
           v-model="queryParams.fdjModel"
@@ -117,58 +117,168 @@
       </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"
-                    v-hasPermi="['price:generator:hz60:add']">新增</el-button>
-            </el-col>
-            <el-col :span="1.5">
-                <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
-                    v-hasPermi="['price:generator:hz60:update']">修改</el-button>
-            </el-col>
-            <el-col :span="1.5">
-                <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
-                    v-hasPermi="['price:generator:hz60:remove']">删除</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-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['price:generator:hz60:add']"
+          >新增</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['price:generator:hz60:update']"
+          >修改</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['price:generator:hz60:remove']"
+          >删除</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>
+      <el-col :span="1.5">
+        <el-upload
+          v-hasPermi="['price:generator:hz60:import']"
+          :show-file-list="false"
+          class="upload-demo"
+          with-credentials
+          :headers="{
+            Authorization: 'Bearer ' + token,
+          }"
+          action="http://xxgl.zzxcx.net/xxgl-admin/fdj60/info/import"
+          :on-success="handleSuccess"
+          multiple
+          accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+          :file-list="fileList"
+        >
+          <el-button
+            type="warning"
+            icon="el-icon-bottom"
+            size="mini"
+            v-hasPermi="['price:generator:hz60:import']"
+            >导入</el-button
+          >
+        </el-upload>
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
 
-        <el-table fit size="mini" v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
-            <el-table-column type="selection" width="55" align="center" />
-            <!-- <el-table-column label="主键" align="center" prop="id" /> -->
-            <el-table-column label="型号规格" align="center" prop="fdjModel" />
-            <el-table-column label="标准止口" align="center" prop="standardSeam" />
-            <el-table-column label="频率(Hz)" align="center" prop="rate" />
-            <el-table-column label="功率 3-ph/50Hz/380-440V(kw)" align="center" prop="fdjPowerKw" />
-            <el-table-column label="功率 3-ph/50Hz/380-440V(kva)" align="center" prop="fdjPowerKva" />
-            <el-table-column label="含税出厂价(单支点)" align="center" prop="singleFulcrumPrice" />
-            <el-table-column label="含税出厂价(双支点)" align="center" prop="doubleFulcrumPrice" />
-            <el-table-column label="含税出厂价(包装箱价格)" align="center" prop="packingBoxPrice" />
-            <el-table-column label="含税出厂价(仪表箱)" align="center" prop="instrumentBoxPrice" />
-            <el-table-column label="含税出厂价(空开)" align="center" prop="airSwitchPrice" />
-            <el-table-column label="包装尺寸" align="center" prop="openParms" />
-            <el-table-column label="净重/毛重" align="center" prop="weight" />
-            <el-table-column width="180px" label="操作" align="center" class-name="small-padding fixed-width">
-                <template slot-scope="scope">
-                    <div style="display:inline-flex">
-                        <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-                            v-hasPermi="['price:generator:hz60:update']">修改</el-button>
-                        <el-button @click="() => {
-                            $router.push('/gallery?id=' + scope.row.id + '&type=5')
-                        
-                        }" 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:generator:hz60:remove']">删除</el-button>
-                    </div>
-                </template>
-            </el-table-column>
-        </el-table>
+    <el-table
+      fit
+      size="mini"
+      v-loading="loading"
+      :data="infoList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <!-- <el-table-column label="主键" align="center" prop="id" /> -->
+      <el-table-column label="型号规格" align="center" prop="fdjModel" />
+      <el-table-column label="标准止口" align="center" prop="standardSeam" />
+      <el-table-column label="频率(Hz)" align="center" prop="rate" />
+      <el-table-column
+        label="功率 3-ph/50Hz/380-440V(kw)"
+        align="center"
+        prop="fdjPowerKw"
+      />
+      <el-table-column
+        label="功率 3-ph/50Hz/380-440V(kva)"
+        align="center"
+        prop="fdjPowerKva"
+      />
+      <el-table-column
+        label="含税出厂价(单支点)"
+        align="center"
+        prop="singleFulcrumPrice"
+      />
+      <el-table-column
+        label="含税出厂价(双支点)"
+        align="center"
+        prop="doubleFulcrumPrice"
+      />
+      <el-table-column
+        label="含税出厂价(包装箱价格)"
+        align="center"
+        prop="packingBoxPrice"
+      />
+      <el-table-column
+        label="含税出厂价(仪表箱)"
+        align="center"
+        prop="instrumentBoxPrice"
+      />
+      <el-table-column
+        label="含税出厂价(空开)"
+        align="center"
+        prop="airSwitchPrice"
+      />
+      <el-table-column label="包装尺寸" align="center" prop="openParms" />
+      <el-table-column label="净重/毛重" align="center" prop="weight" />
+      <el-table-column
+        width="180px"
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <div style="display: inline-flex">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['price:generator:hz60:update']"
+              >修改</el-button
+            >
+            <el-button
+              @click="
+                () => {
+                  $router.push('/gallery?id=' + scope.row.id + '&type=5');
+                }
+              "
+              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:generator:hz60:remove']"
+              >删除</el-button
+            >
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
 
-        <!-- <pagination
+    <!-- <pagination
       v-show="total>0"
       :total="total"
       :page.sync="queryParams.pageNum"
@@ -176,223 +286,270 @@
       @pagination="getList"
     /> -->
 
-        <!-- 添加或修改发电机60hz报价对话框 -->
-        <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="fdjModel">
-                    <el-input v-model="form.fdjModel" placeholder="请输入型号规格" />
-                </el-form-item>
-                <el-form-item label="标准止口" prop="standardSeam">
-                    <el-input v-model="form.standardSeam" placeholder="请输入标准止口" />
-                </el-form-item>
-                <el-form-item label="频率(Hz)" prop="rate">
-                    <el-input v-model="form.rate" placeholder="请输入频率(Hz)" />
-                </el-form-item>
-                <el-form-item label="功率 3-ph/50Hz/380-440V(kw)" prop="fdjPowerKw">
-                    <el-input v-model="form.fdjPowerKw" placeholder="请输入功率 3-ph/50Hz/380-440V(kw)" />
-                </el-form-item>
-                <el-form-item label="功率 3-ph/50Hz/380-440V(kva)" prop="fdjPowerKva">
-                    <el-input v-model="form.fdjPowerKva" placeholder="请输入功率 3-ph/50Hz/380-440V(kva)" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="singleFulcrumPrice">
-                    <el-input v-model="form.singleFulcrumPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="doubleFulcrumPrice">
-                    <el-input v-model="form.doubleFulcrumPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="packingBoxPrice">
-                    <el-input v-model="form.packingBoxPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="instrumentBoxPrice">
-                    <el-input v-model="form.instrumentBoxPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="含税出厂价" prop="airSwitchPrice">
-                    <el-input v-model="form.airSwitchPrice" placeholder="请输入含税出厂价" />
-                </el-form-item>
-                <el-form-item label="包装尺寸
-" prop="openParms">
-                    <el-input v-model="form.openParms" placeholder="请输入包装尺寸
-" />
-                </el-form-item>
-                <el-form-item label="净重/毛重" prop="weight">
-                    <el-input v-model="form.weight" 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>
+    <!-- 添加或修改发电机60hz报价对话框 -->
+    <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="fdjModel">
+          <el-input v-model="form.fdjModel" placeholder="请输入型号规格" />
+        </el-form-item>
+        <el-form-item label="标准止口" prop="standardSeam">
+          <el-input v-model="form.standardSeam" placeholder="请输入标准止口" />
+        </el-form-item>
+        <el-form-item label="频率(Hz)" prop="rate">
+          <el-input v-model="form.rate" placeholder="请输入频率(Hz)" />
+        </el-form-item>
+        <el-form-item label="功率 3-ph/50Hz/380-440V(kw)" prop="fdjPowerKw">
+          <el-input
+            v-model="form.fdjPowerKw"
+            placeholder="请输入功率 3-ph/50Hz/380-440V(kw)"
+          />
+        </el-form-item>
+        <el-form-item label="功率 3-ph/50Hz/380-440V(kva)" prop="fdjPowerKva">
+          <el-input
+            v-model="form.fdjPowerKva"
+            placeholder="请输入功率 3-ph/50Hz/380-440V(kva)"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="singleFulcrumPrice">
+          <el-input
+            v-model="form.singleFulcrumPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="doubleFulcrumPrice">
+          <el-input
+            v-model="form.doubleFulcrumPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="packingBoxPrice">
+          <el-input
+            v-model="form.packingBoxPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="instrumentBoxPrice">
+          <el-input
+            v-model="form.instrumentBoxPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item label="含税出厂价" prop="airSwitchPrice">
+          <el-input
+            v-model="form.airSwitchPrice"
+            placeholder="请输入含税出厂价"
+          />
+        </el-form-item>
+        <el-form-item
+          label="包装尺寸
+"
+          prop="openParms"
+        >
+          <el-input
+            v-model="form.openParms"
+            placeholder="请输入包装尺寸
+"
+          />
+        </el-form-item>
+        <el-form-item label="净重/毛重" prop="weight">
+          <el-input v-model="form.weight" 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/hz60";
-
+import {
+  listInfo,
+  getInfo,
+  delInfo,
+  addInfo,
+  updateInfo,
+  exportInfo,
+} from "@/api/price/hz60";
+import { getToken } from "@/utils/auth";
 export default {
-    name: "Info",
-    data() {
-        return {
-            // 遮罩层
-            loading: true,
-            // 选中数组
-            ids: [],
-            // 非单个禁用
-            single: true,
-            // 非多个禁用
-            multiple: true,
-            // 显示搜索条件
-            showSearch: true,
-            // 总条数
-            total: 0,
-            // 发电机60hz报价表格数据
-            infoList: [],
-            // 弹出层标题
-            title: "",
-            // 是否显示弹出层
-            open: false,
-            // 查询参数
-            queryParams: {
-                pageNum: 1,
-                pageSize: 1000,
-                fdjModel: null,
-                standardSeam: null,
-                rate: null,
-                fdjPowerKw: null,
-                fdjPowerKva: null,
-                singleFulcrumPrice: null,
-                doubleFulcrumPrice: null,
-                packingBoxPrice: null,
-                instrumentBoxPrice: null,
-                airSwitchPrice: null,
-                openParms: null,
-                weight: null,
-            },
-            // 表单参数
-            form: {},
-            // 表单校验
-            rules: {
-            }
-        };
+  name: "Info",
+  data() {
+    return {
+      token: getToken(),
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 发电机60hz报价表格数据
+      infoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        fdjModel: null,
+        standardSeam: null,
+        rate: null,
+        fdjPowerKw: null,
+        fdjPowerKva: null,
+        singleFulcrumPrice: null,
+        doubleFulcrumPrice: null,
+        packingBoxPrice: null,
+        instrumentBoxPrice: null,
+        airSwitchPrice: null,
+        openParms: null,
+        weight: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    handleSuccess() {
+      this.msgSuccess("上传成功");
+      this.getList();
+      // this.getList()
     },
-    created() {
-        this.getList();
+    /** 查询发电机60hz报价列表 */
+    getList() {
+      this.loading = true;
+      listInfo(this.queryParams).then((response) => {
+        this.infoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
-    methods: {
-        /** 查询发电机60hz报价列表 */
-        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,
-                fdjModel: null,
-                standardSeam: null,
-                rate: null,
-                fdjPowerKw: null,
-                fdjPowerKva: null,
-                singleFulcrumPrice: null,
-                doubleFulcrumPrice: null,
-                packingBoxPrice: null,
-                instrumentBoxPrice: null,
-                airSwitchPrice: null,
-                openParms: null,
-                weight: 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 = "添加发电机60hz报价";
-        },
-        /** 修改按钮操作 */
-        handleUpdate(row) {
-            this.reset();
-            const id = row.id || this.ids
-            getInfo(id).then(response => {
-                this.form = response.data;
-                this.open = true;
-                this.title = "修改发电机60hz报价";
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        fdjModel: null,
+        standardSeam: null,
+        rate: null,
+        fdjPowerKw: null,
+        fdjPowerKva: null,
+        singleFulcrumPrice: null,
+        doubleFulcrumPrice: null,
+        packingBoxPrice: null,
+        instrumentBoxPrice: null,
+        airSwitchPrice: null,
+        openParms: null,
+        weight: 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 = "添加发电机60hz报价";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids;
+      getInfo(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改发电机60hz报价";
+      });
+    },
+    /** 提交按钮 */
+    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();
             });
-        },
-        /** 提交按钮 */
-        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();
-                        });
-                    }
-                }
+          } else {
+            addInfo(this.form).then((response) => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
             });
-        },
-        /** 删除按钮操作 */
-        handleDelete(row) {
-            const ids = row.id || this.ids;
-            this.$confirm('是否确认删除发电机60hz报价编号为"' + ids + '"的数据项?', "警告", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(function () {
-                return delInfo(ids);
-            }).then(() => {
-                this.getList();
-                this.msgSuccess("删除成功");
-            })
-        },
-        /** 导出按钮操作 */
-        handleExport() {
-            const queryParams = this.queryParams;
-            this.$confirm('是否确认导出所有发电机60hz报价数据项?', "警告", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(function () {
-                return exportInfo(queryParams);
-            }).then(response => {
-                this.download(response.data);
-            })
+          }
         }
-    }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(
+        '是否确认删除发电机60hz报价编号为"' + ids + '"的数据项?',
+        "警告",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(function () {
+          return delInfo(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有发电机60hz报价数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return exportInfo(queryParams);
+        })
+        .then((response) => {
+          this.download(response.data);
+        });
+    },
+  },
 };
 </script>