Sfoglia il codice sorgente

Merge tag 'Hotfix-11' into develop

Finish Hotfix-11
chen 3 anni fa
parent
commit
cdaed73513

+ 49 - 0
src/api/supply/commercial_list.js

@@ -0,0 +1,49 @@
+import request from "@/utils/request";
+
+// 删除
+export function getBusPriceDelete(params) {
+  return request({
+    url: "/bus/price/delete",
+    method: "post",
+    params,
+  });
+}
+// 详情
+export function getBusPriceDetail(params) {
+  return request({
+    url: "/bus/price/detail",
+    method: "get",
+    params,
+  });
+}
+// 下载商用工程产品价格模板
+export function getBusPriceDownload() {
+  return request({
+    url: "/bus/price/download",
+    method: "get",
+  });
+}
+// 商用工程产品价格-导出
+export function getBusPriceExport(params) {
+  return request({
+    url: "/bus/price/export",
+    method: "get",
+    params,
+  });
+}
+// 商用工程产品价格列表
+export function getBusPriceList(params) {
+  return request({
+    url: "/bus/price/list",
+    method: "get",
+    params,
+  });
+}
+// 修改
+export function getBusPriceUpdate(data) {
+  return request({
+    url: "/bus/price/update",
+    method: "post",
+    data,
+  });
+}

+ 5 - 5
src/views/engin_deposit/components/refund_list-detail.vue

@@ -75,7 +75,7 @@
           <div class="label">使用单位</div>
           <div class="value">{{ detailList.refUseUnit }}</div>
         </el-col>
-        <el-col :xs="24" :sm="24" :lg="8" class="item">
+        <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
           <div class="label">寄厂日期</div>
           <div class="value">
             <el-date-picker
@@ -90,7 +90,7 @@
             >
             </el-date-picker>
           </div>
-        </el-col>
+        </el-col> -->
         <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
           <div class="label">提货日期</div>
           <div class="value">{{detailList.}}</div>
@@ -324,9 +324,9 @@
             min-width="160"
             show-overflow-tooltip
           >
-          <template slot-scope="scope">
-            {{'资料_'+scope.row.fileName}}
-          </template>
+            <template slot-scope="scope">
+              {{ "资料_" + scope.row.fileName }}
+            </template>
           </el-table-column>
           <el-table-column
             align="center"

+ 341 - 0
src/views/sales/price/commercial_list.vue

@@ -0,0 +1,341 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="70px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品品类" prop="categoryId">
+              <el-input
+                v-model="searchForm.categoryId"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="物料名称" prop="materialName">
+              <el-input
+                v-model="searchForm.materialName"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="物料编码" prop="materialNumber">
+              <el-input
+                v-model="searchForm.materialNumber"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="销售类型" prop="saleTypeId">
+              <el-input
+                v-model="searchForm.saleTypeId"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="规格" prop="specification">
+              <el-input
+                v-model="searchForm.specification"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="18" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="clearFn">清空</el-button>
+              <el-button size="small" type="primary" @click="searchFormFn"
+                >搜索</el-button
+              >
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fr">
+        <el-button type="primary" size="small" @click="downLoadFn"
+          >模板</el-button
+        >
+        <ExportButton
+          class="import-btn"
+          :exUrl="'/bus/price/export'"
+          :exParams="exParams"
+        />
+        <el-upload
+          class="import-btn"
+          action=""
+          :http-request="handleImport"
+          :file-list="importFileList"
+          :show-file-list="false"
+        >
+          <el-button type="primary" size="small">批量导入</el-button>
+        </el-upload>
+      </div>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="厂产品编码"
+            prop="productCode"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="零售价格"
+            prop="retailPrice"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="批发价格"
+            prop="batchPrice"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="规格型号"
+            prop="specification"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="销售类型"
+            prop="saleTypeName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+
+          <el-table-column
+            align="center"
+            label="金蝶物料ID"
+            prop="materialId"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="金蝶物料编码"
+            prop="materialNumber"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="金蝶物料名称"
+            prop="materialName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="金蝶物料旧编码"
+            prop="materialOldNumber"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="是否促销价"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-tag type="success" v-if="scope.row.isPromote">是</el-tag>
+              <el-tag type="danger" v-else>否</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="是否促作废"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-tag type="success" v-if="scope.row.isRevoke">是</el-tag>
+              <el-tag type="danger" v-else>否</el-tag>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="center"
+            label="格力折扣价"
+            prop="discAmount"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop="remark"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+
+          <el-table-column
+            align="center"
+            label="操作"
+            prop="caozuo"
+            min-width="160"
+            show-overflow-tooltip
+            fixed="right"
+          >
+            <template slot-scope="scope"
+              ><el-button
+                type="text"
+                class="textColor"
+                @click="seeFn(scope.row)"
+                >查看</el-button
+              >
+              <el-popconfirm
+                @onConfirm="deleFn(scope.row.id)"
+                v-if="$checkBtnRole('del', $route.meta.roles)"
+                title="这是一段内容确定删除吗?"
+              >
+                <el-button type="text" class="textColor" slot="reference"
+                  >删除</el-button
+                >
+              </el-popconfirm>
+              <el-button
+                type="text"
+                class="textColor"
+                @click="stopFn(scope.row.id)"
+                >修改</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <!-- 分页 -->
+      <div class="fr">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal"
+        >
+        </el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getBusPriceList } from "@/api/supply/commercial_list";
+import { downloadFiles, handleImport } from "@/utils/util";
+export default {
+  data() {
+    return {
+      listLoading: false, // 列表加载loading
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [],
+      importFileList: [],
+      searchForm: {
+        categoryId: "",
+        materialName: "",
+        materialNumber: "",
+        saleTypeId: "",
+        specification: "",
+      },
+    };
+  },
+  computed: {
+    exParams() {
+      return {};
+    },
+  },
+  created() {
+    this.getDataList();
+  },
+  methods: {
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.getDataList();
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList();
+    },
+    //清除
+    clearFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFormFn() {
+      this.getDataList();
+    },
+    //导入
+    async handleImport(param) {
+      const file = param.file;
+      const formData = new FormData();
+      formData.append("file", file);
+      let result = await handleImport("/bus/price/import", formData);
+      //   console.log(result);
+      this.importFileList = [];
+      if (result.code == 200) {
+        this.$message.success("导入成功");
+      } else {
+        this.$message.error(result.message);
+      }
+    },
+    //下载模板
+    downLoadFn() {
+      downloadFiles("/bus/price/download");
+    },
+    //获取列表数据
+    async getDataList() {
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        categoryId: this.searchForm.categoryId,
+        materialName: this.searchForm.materialName,
+        materialNumber: this.searchForm.materialNumber,
+        saleTypeId: this.searchForm.saleTypeId,
+        specification: this.searchForm.specification,
+      };
+      let res = await getBusPriceList(params);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.import-btn {
+  display: inline-block;
+  margin-left: 10px;
+}
+</style>