yumeng hace 7 meses
padre
commit
fde82408f5

+ 41 - 0
src/api/goodsManagement/financeData.js

@@ -9,6 +9,47 @@ export function listInfo(query) {
   })
 }
 
+export function totalListInfo(query) {
+  return request({
+    url: '/finance/reward/totalListInfo',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function getItemName(query) {
+  return request({
+    url: '/finance/reward/getItemName',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getPromoterName(query) {
+  return request({
+    url: '/finance/reward/getPromoterName',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getTotalSettlementNum(query) {
+  return request({
+    url: '/finance/reward/getTotalSettlementNum',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getTotalAmount(query) {
+  return request({
+    url: '/finance/reward/getTotalAmount',
+    method: 'get',
+    params: query
+  })
+}
+
 export function getTotal(query) {
   return request({
     url: '/finance/reward/getTotal',

+ 228 - 0
src/views/goodsManagement/addFinanceData.vue

@@ -0,0 +1,228 @@
+<template>
+
+
+  <div style="width: 700px">
+    <br/>
+    <br/>
+    <el-form ref="form" :model="form" size="small" label-width="300px">
+      <el-form-item label="日期:" prop="statDate">
+        <el-date-picker
+          style="width: 400px"
+          v-model="uploadDate"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          range-separator="-"
+          placeholder="请输入日期"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="商品id:" prop="itemId">
+        <el-input v-model="form.itemId" placeholder="请输入商品id" @change="changeShowItemName"/>
+      </el-form-item>
+      <el-form-item label="商品名称:" prop="itemName">
+        <template>
+          <el-input v-model="itemName"/>
+        </template>
+      </el-form-item>
+      <el-form-item label="达人ID:" prop="promoterId">
+        <el-input v-model="form.promoterId" placeholder="请输入达人ID" @change="changeShowPromoterName"/>
+      </el-form-item>
+      <el-form-item label="达人名称:" prop="promoterId">
+        <template>
+          <el-input v-model="promoterName"/>
+        </template>
+      </el-form-item>
+
+      <el-form-item label="本次结算单量:" prop="currentSettlementNum">
+        <el-input v-model="form.currentSettlementNum" placeholder="请输入本次结算单量" @change="getTotalSettlementNum"/>
+      </el-form-item>
+      <el-form-item label="累计单量:" prop="totalSettlementNum">
+        <template>
+          <el-input v-model="totalSettlementNum"/>
+        </template>
+      </el-form-item>
+      <el-form-item label="结算单价:" prop="settlementPrice">
+        <el-input v-model="form.settlementPrice" placeholder="请输入结算单价"/>
+      </el-form-item>
+      <el-form-item label="主播金额:" prop="anchorAmount">
+        <el-input v-model="form.anchorAmount" placeholder="请输入主播奖励金额" @change="getTotalAmount"/>
+      </el-form-item>
+      <el-form-item label="推荐人金额:" prop="referenceAmount">
+        <el-input v-model="form.referenceAmount" placeholder="请输入推荐人奖励金额" @change="getTotalAmount"/>
+      </el-form-item>
+      <el-form-item label="累计结算金额:" prop="totalAmount">
+        <template>
+          <el-input v-model="totalAmount"/>
+        </template>
+      </el-form-item>
+
+      <el-form-item label="备注:" prop="remarks">
+        <template slot-scope="scope">
+          <el-input
+            type="textarea"
+            v-model="form.remarks"
+          >
+          </el-input>
+        </template>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" @click="submitForm" :loading="confirmLoading">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </el-form-item>
+
+    </el-form>
+  </div>
+
+</template>
+<script>
+import {
+  addInfo,
+  getItemName,
+  getPromoterName, getTotalAmount,
+  getTotalSettlementNum,
+  updateInfo
+} from "@/api/goodsManagement/financeData";
+
+export default {
+  name: "AddFinanceData",
+  data() {
+    return {
+      confirmLoading: false,
+      totalSettlementNum: null,
+      itemName: null,
+      promoterName: null,
+      totalAmount: null,
+      uploadDate: new Date(),
+      showSearch: true,
+      form: {},
+      // 表单校验
+      rules: {}
+    }
+  },
+  created() {
+
+    this.userId = this.$store.getters.userId;
+    let start = new Date();
+    start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+    let date = new Date(start);
+    let y = date.getFullYear();
+    let MM = date.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = date.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+    this.uploadDate = `${y}-${MM}-${dd}`;
+  },
+
+  methods: {
+    changeShowItemName() {
+      getItemName(
+        {itemId: this.form.itemId}
+      ).then(response => {
+        this.itemName = response;
+        console.log(this.itemName)
+      });
+
+
+    },
+    changeShowPromoterName() {
+      getPromoterName(
+        {promoterId: this.form.promoterId}
+      ).then(response => {
+        this.promoterName = response;
+        console.log(this.itemName)
+      });
+    },
+
+    getTotalSettlementNum() {
+      getTotalSettlementNum(
+        {
+          promoterId: this.form.promoterId,
+          itemId: this.form.itemId,
+          currentSettlementNum: this.form.currentSettlementNum
+        }
+      ).then(response => {
+        this.totalSettlementNum = response;
+      });
+    },
+
+    getTotalAmount() {
+      getTotalAmount(
+        {
+          promoterId: this.form.promoterId,
+          itemId: this.form.itemId,
+          currentSettlementNum: this.form.currentSettlementNum,
+          anchorAmount: this.form.anchorAmount,
+          referenceAmount: this.form.referenceAmount,
+        }
+      ).then(response => {
+        this.totalAmount = response;
+      });
+    },
+    submitForm() {
+      this.confirmLoading = true;
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.form.statDate = this.uploadDate;
+          this.form.itemName = this.itemName
+          this.form.promoterName = this.promoterName
+          this.form.totalAmount = this.totalAmount
+          this.form.totalSettlementNum = this.totalSettlementNum
+          addInfo(this.form).then(response => {
+            this.confirmLoading = false;
+            const obj = {
+              path: "/goodsManagement/FinanceData",
+            };
+            localStorage.removeItem("AddFinanceData");
+            this.$tab.closeOpenPage(obj);
+            this.$modal.msgSuccess("新增成功");
+          }).catch((err) => {
+            this.confirmLoading = false;
+          });
+
+        }
+      });
+    },
+    cancel() {
+      this.reset();
+      const obj = {
+        path: "/goodsManagement/FinanceData",
+      };
+      localStorage.removeItem("AddFinanceData");
+      this.$tab.closeOpenPage(obj);
+    },
+    reset() {
+      this.form = {
+        id: null,
+        itemId: null,
+        itemTitle: null,
+        promoterId: null,
+        promoterName: null,
+        itemCreateId: null,
+        itemCreateName: null,
+        promoterCreateId: null,
+        promoterCreateName: null,
+        statDate: null,
+        currentSettlementNum: null,
+        totalSettlementNum: null,
+        settlementPrice: null,
+        anchorAmount: null,
+        referenceAmount: null,
+        totalAmount: null,
+        remarks: null,
+        createTime: null,
+        updateTime: null
+      };
+      this.itemName = null;
+      this.promoterName = null;
+      this.totalSettlementNum = null;
+      this.totalAmount = null;
+      this.resetForm("form");
+    },
+
+  }
+};
+
+</script>
+
+
+

+ 118 - 101
src/views/goodsManagement/financeData.vue

@@ -36,7 +36,6 @@
 
 
       <el-form-item label="日期" prop="statDate">
-
         <el-date-picker
           style="width: 180px"
           v-model="queryParams.statDate"
@@ -61,32 +60,12 @@
           plain
           icon="el-icon-plus"
           size="mini"
-          @click="handleAdd"
+          @click="toAdd()"
+
         >新增
         </el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-        >修改
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-        >删除
-        </el-button>
-      </el-col>
+
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -98,16 +77,11 @@
         </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 v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
 
-    >
-      <el-table-column type="selection" width="55" align="center"/>
-
-      <el-table-column label="达人名称" align="center" prop="promoterName" width="120px">
+      <el-table-column label="达人名称" align="center" prop="promoterName" width="140px" v-if="showPromoter">
         <template slot-scope="scope">
           <div style="display: flex; width: 100%">
             <div style="width: 100%" class="item-name-calss">
@@ -127,9 +101,26 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="达人ID" align="center" prop="promoterId" width="100px"/>
-      <el-table-column label="渠道" align="center" prop="promoterCreateName"/>
-      <el-table-column label="商品名称" align="center" prop="itemTitle" width="280px">
+
+      <el-table-column label="达人ID" align="center" prop="promoterId" width="180px" v-if="showPromoter">
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 100%">
+              <a
+                style="color: #00afff"
+                :title="scope.row.promoterId"
+                @click="toDetails(scope.row)"
+              >
+                {{ scope.row.promoterId }}
+              </a>
+
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="渠道" align="center" prop="promoterCreateName" v-if="showPromoter"/>
+      <el-table-column label="商品名称" align="center" prop="itemTitle" width="280px" v-if="showItem">
         <template slot-scope="scope">
           <div style="display: flex; width: 100%">
             <div style="width: 100%" class="item-name-calss">
@@ -149,34 +140,33 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="商品id" align="center" prop="itemId" width="140px"/>
-      <el-table-column label="招商" align="center" prop="itemCreateName"/>
-      <el-table-column label="日期" align="center" prop="statDate" width="100px"/>
+
+      <el-table-column label="商品id" align="center" prop="promoterId" width="140px" v-if="showItem">
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 100%">
+              <a
+                style="color: #00afff"
+                :title="scope.row.itemId"
+                @click="toDetails(scope.row)"
+              >
+                {{ scope.row.itemId }}
+              </a>
+
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="招商" align="center" prop="itemCreateName" v-if="showItem"/>
+      <!--      <el-table-column label="日期" align="center" prop="statDate" width="100px"/>-->
 
       <el-table-column label="累计结算单量" align="center" prop="totalSettlementNum"/>
-      <el-table-column label="本次结算单量" align="center" prop="currentSettlementNum"/>
-      <el-table-column label="结算单价" align="center" prop="settlementPrice"/>
+      <!--      <el-table-column label="本次结算单量" align="center" prop="currentSettlementNum"/>-->
+      <!--      <el-table-column label="结算单价" align="center" prop="settlementPrice"/>-->
       <el-table-column label="主播奖励金额" align="center" prop="anchorAmount"/>
       <el-table-column label="推荐人奖励金额" align="center" prop="referenceAmount"/>
       <el-table-column label="合计金额" align="center" prop="totalAmount"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px">
-        <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
@@ -224,9 +214,6 @@
         <el-form-item label="推荐人金额:" prop="referenceAmount">
           <el-input v-model="form.referenceAmount" placeholder="请输入推荐人奖励金额"/>
         </el-form-item>
-        <el-form-item label="累计结算金额:" prop="totalAmount">
-          <el-input v-model="form.totalAmount" placeholder="请输入累计结算金额"/>
-        </el-form-item>
 
 
       </el-form>
@@ -275,14 +262,24 @@
 </template>
 
 <script>
-import {listInfo, getInfo, delInfo, addInfo, updateInfo, getTotal, importData} from "@/api/goodsManagement/financeData";
-
+import {
+  listInfo,
+  getInfo,
+  delInfo,
+  addInfo,
+  updateInfo,
+  getTotal,
+  importData,
+  totalListInfo
+} from "@/api/goodsManagement/financeData";
 
 
 export default {
   name: "FinanceData",
   data() {
     return {
+      showPromoter: true,
+      showItem: true,
       confirmLoading: false,
       dateFile: null,
       fileList: [],
@@ -338,10 +335,42 @@ export default {
     this.uploadDate = `${y}-${MM}-${dd}`;
 
     this.getList();
-    this.getListTotal();
   },
   methods: {
 
+    toDetails(item) {
+
+      let query = {};
+      if (this.queryParams.itemId && this.queryParams.promoterId) {
+        query.itemId = this.queryParams.itemId;
+        query.promoterId = this.queryParams.promoterId;
+      } else if (this.queryParams.itemId && !!!this.queryParams.promoterId) {
+        query.itemId = this.queryParams.itemId;
+        query.promoterId = null;
+      } else if (!!!this.queryParams.itemId && this.queryParams.promoterId) {
+        this.showItem = false;
+        this.showPromoter = true;
+        query.itemId = null;
+        query.promoterId = this.queryParams.promoterId;
+      } else {
+        query.itemId = item.itemId;
+        query.promoterId = item.promoterId;
+      }
+
+
+      this.$router.replace({
+        path: "/goodsManagement/FinanceDataDetail",
+        query: query
+      });
+    },
+
+    toAdd(item) {
+      this.$router.replace({
+        path: "/goodsManagement/addFinanceData",
+      });
+    },
+
+
     importData() {
       this.reset();
       this.importOpen = true;
@@ -373,19 +402,6 @@ export default {
             this.$message.error("请上传文件");
           }
 
-          // if (this.form.dictId != undefined) {
-          //   updateType(this.form).then((response) => {
-          //     this.$modal.msgSuccess("修改成功");
-          //     this.open = false;
-          //     this.getList();
-          //   });
-          // } else {
-          //   addType(this.form).then((response) => {
-          //     this.$modal.msgSuccess("新增成功");
-          //     this.open = false;
-          //     this.getList();
-          //   });
-          // }
         }
       });
     },
@@ -437,31 +453,16 @@ export default {
     /** 查询【请填写功能名称】列表 */
     getList() {
       this.loading = true;
-      listInfo(this.queryParams).then(response => {
-        // this.infoList = response.rows;
-        this.infoList = this.itemSummary.concat(response.rows);
+      totalListInfo(this.queryParams).then(response => {
+        this.infoList = response.rows;
         this.total = response.total;
+        this.loading = false;
+      }).catch((err) => {
+        this.loading = false;
+      })
 
-      });
-      this.loading = false;
     },
 
-
-    getListTotal() {
-      getTotal(
-        this.queryParams
-      ).then((res) => {
-        this.itemSummary = [res].map((item) => {
-          return {
-            ...item,
-            itemTitle: "总计",
-            userName: "总计"
-          };
-        });
-      });
-    },
-
-
     getUploadDate() {
       let start = new Date();
       start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
@@ -510,12 +511,31 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      if (this.queryParams.itemId && this.queryParams.promoterId) {
+        this.showItem = true;
+        this.showPromoter = true;
+
+      }
+
+      if (this.queryParams.itemId && !!!this.queryParams.promoterId) {
+        this.showItem = true;
+        this.showPromoter = false;
+
+      }
+
+      if (!!!this.queryParams.itemId && this.queryParams.promoterId) {
+        this.showItem = false;
+        this.showPromoter = true;
+
+      }
+
       this.queryParams.pageNum = 1;
       this.getList();
-      this.getListTotal();
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.showItem = true;
+      this.showPromoter = true;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -553,7 +573,6 @@ export default {
               this.open = false;
               this.getUploadDate();
               this.getList();
-              this.getListTotal();
             });
           } else {
             this.form.statDate = this.uploadDate;
@@ -562,7 +581,6 @@ export default {
               this.open = false;
               this.getUploadDate();
               this.getList();
-              this.getListTotal();
             });
           }
         }
@@ -574,7 +592,6 @@ export default {
       this.$modal.confirm('是否确认删除所选的数据项?').then(function () {
         return delInfo(ids);
       }).then(() => {
-        this.getListTotal()
         this.getList();
         this.getUploadDate();
         this.$modal.msgSuccess("删除成功");

+ 471 - 0
src/views/goodsManagement/financeDataDetail.vue

@@ -0,0 +1,471 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <!--            <el-form-item label="达人名称" prop="promoterName">
+                    <el-input
+                      style="width: 240px"
+                      v-model="queryParams.promoterName"
+                      placeholder="请输入达人名称"
+                      clearable
+                      @keyup.enter.native="handleQuery"
+                    />
+                  </el-form-item>-->
+      <el-form-item label="达人ID" prop="promoterId" v-if="showPromoterSech">
+        <el-input
+          style="width: 240px"
+          v-model="queryParams.promoterId"
+          placeholder="请输入达人ID"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <!--            <el-form-item label="商品名称" prop="itemTitle">
+                    <el-input
+                      style="width: 240px"
+                      v-model="queryParams.itemTitle"
+                      placeholder="请输入商品名称"
+                      clearable
+                      @keyup.enter.native="handleQuery"
+                    />
+                  </el-form-item>-->
+      <el-form-item label="商品id" prop="itemId" v-if="showItemSech">
+        <el-input
+          style="width: 240px"
+          v-model="queryParams.itemId"
+          placeholder="请输入商品id"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="requestUploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+
+
+      <el-form-item>
+        <el-button type="primary" 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-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="promoterName" width="120px">
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 100%" class="item-name-calss">
+              <a
+                style="
+                      text-overflow: ellipsis;
+                      white-space: nowrap;
+                      overflow: hidden;
+                      width: 100%;
+                    "
+                :title="scope.row.promoterName"
+              >
+                {{ scope.row.promoterName }}
+              </a>
+
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="达人ID" align="center" prop="promoterId" width="100px"/>
+      <el-table-column label="渠道" align="center" prop="promoterCreateName"/>
+      <el-table-column label="商品名称" align="center" prop="itemTitle" width="280px">
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 100%" class="item-name-calss">
+              <a
+                style="
+                      text-overflow: ellipsis;
+                      white-space: nowrap;
+                      overflow: hidden;
+                      width: 100%;
+                    "
+                :title="scope.row.itemTitle"
+              >
+                {{ scope.row.itemTitle }}
+              </a>
+
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品id" align="center" prop="itemId" width="140px"/>
+      <el-table-column label="招商" align="center" prop="itemCreateName"/>
+      <el-table-column
+        label="结算类型"
+        align="center"
+        prop="activityItemStatus"
+      >
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.promoterType">
+            {{ scope.row.promoterType | promoterTypeName }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="日期" align="center" prop="statDate" width="100px"/>
+      <el-table-column label="累计结算单量" align="center" prop="totalSettlementNum"/>
+      <el-table-column label="本次结算单量" align="center" prop="currentSettlementNum"/>
+      <el-table-column label="结算单价" align="center" prop="settlementPrice"/>
+      <el-table-column label="主播奖励金额" align="center" prop="anchorAmount"/>
+      <el-table-column label="推荐人奖励金额" align="center" prop="referenceAmount"/>
+      <el-table-column label="合计金额" align="center" prop="totalAmount"/>
+      <el-table-column width="200" label="备注" align="center" prop="remarks">
+        <template slot-scope="scope">
+          <el-input
+            type="textarea"
+            v-model="scope.row.remarks"
+          >
+          </el-input>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px">
+        <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="800px" append-to-body :close-on-click-modal="false">
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px" :inline="true">
+        <el-form-item label="日期:" prop="statDate" style="width: 100%">
+          <el-date-picker
+            style="width: 180px"
+            v-model="uploadDate"
+            value-format="yyyy-MM-dd"
+            format="yyyy-MM-dd"
+            range-separator="-"
+            placeholder="请输入日期">
+
+          </el-date-picker>
+        </el-form-item>
+
+
+        <el-form-item label="商品id:" prop="itemId">
+          <el-input v-model="form.itemId" placeholder="请输入商品id"/>
+        </el-form-item>
+        <el-form-item label="达人ID:" prop="promoterId">
+          <el-input v-model="form.promoterId" placeholder="请输入达人ID"/>
+        </el-form-item>
+        <el-form-item label="本次结算单量:" prop="currentSettlementNum">
+          <el-input v-model="form.currentSettlementNum" placeholder="请输入本次结算单量="/>
+        </el-form-item>
+        <el-form-item label="累计单量:" prop="totalSettlementNum">
+          <el-input v-model="form.totalSettlementNum" placeholder="请输入累计结算单量"/>
+        </el-form-item>
+        <el-form-item label="结算单价:" prop="settlementPrice">
+          <el-input v-model="form.settlementPrice" placeholder="请输入结算单价"/>
+        </el-form-item>
+        <el-form-item label="主播金额:" prop="anchorAmount">
+          <el-input v-model="form.anchorAmount" placeholder="请输入主播奖励金额"/>
+        </el-form-item>
+        <el-form-item label="推荐人金额:" prop="referenceAmount">
+          <el-input v-model="form.referenceAmount" placeholder="请输入推荐人奖励金额"/>
+        </el-form-item>
+        <el-form-item label="累计金额:" prop="referenceAmount">
+          <el-input v-model="form.totalAmount" 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, getTotal, importData} from "@/api/goodsManagement/financeData";
+import item from "@/layout/components/Sidebar/Item.vue";
+
+
+export default {
+  name: "FinanceDataDetail",
+  data() {
+    return {
+      showItemSech: true,
+      showPromoterSech: true,
+      confirmLoading: false,
+      dateFile: null,
+      fileList: [],
+      importOpen: false,
+      uploadDate: new Date(),
+      requestUploadDate: [],
+      userId: null,
+      // 遮罩层
+      loading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 【请填写功能名称】表格数据
+      infoList: [],
+      // 弹出层标题
+
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        itemId: null,
+        itemTitle: null,
+        promoterId: null,
+        promoterName: null,
+        statDate: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {}
+    };
+  },
+  created() {
+    this.userId = this.$store.getters.userId;
+    let start = new Date();
+    start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+    let date = new Date(start);
+    let y = date.getFullYear();
+    let MM = date.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = date.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+    this.uploadDate = `${y}-${MM}-${dd}`;
+    if (this.$route.query.itemId) {
+      this.showItemSech = false;
+    }
+    if (this.$route.query.promoterId) {
+      this.showPromoterSech = false;
+    }
+    this.getList();
+  },
+
+  filters: {
+    promoterTypeName(type) {
+      const statusMap = {
+        1: "常规",
+        2: "大佬"
+      };
+      return statusMap[type];
+    },
+
+  },
+  methods: {
+
+    toAdd(item) {
+      this.$router.replace({
+        path: "/goodsManagement/addFinanceData",
+      });
+    },
+
+
+    /** 查询【请填写功能名称】列表 */
+    getList() {
+      this.loading = true;
+      let query = {};
+      if (this.$route.query.itemId && this.$route.query.promoterId) {
+        query.itemId = this.$route.query.itemId;
+        query.promoterId = this.$route.query.promoterId;
+      } else if (this.$route.query.itemId && !!!this.$route.query.promoterId) {
+        query.itemId = this.$route.query.itemId;
+        if (this.queryParams.promoterId) {
+          query.promoterId = this.queryParams.promoterId;
+        }
+      } else if (!!!this.$route.query.itemId && this.$route.query.promoterId) {
+        query.promoterId = this.$route.query.promoterId;
+        if (this.queryParams.itemId) {
+          query.itemId = this.queryParams.itemId;
+        }
+      }
+
+
+      listInfo(
+        this.addDateRange(
+          {
+            ...query
+          },
+          this.requestUploadDate,
+          "startDate",
+          "endDate"
+        )).then(response => {
+        this.infoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      }).catch((err) => {
+        this.loading = false;
+      });
+
+    },
+
+    getUploadDate() {
+      let start = new Date();
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+      let date = new Date(start);
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let dd = date.getDate();
+      dd = dd < 10 ? "0" + dd : dd;
+      this.uploadDate = `${y}-${MM}-${dd}`;
+    },
+
+
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.importOpen = false;
+      this.reset();
+    },
+
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        itemId: null,
+        itemTitle: null,
+        promoterId: null,
+        promoterName: null,
+        itemCreateId: null,
+        itemCreateName: null,
+        promoterCreateId: null,
+        promoterCreateName: null,
+        statDate: null,
+        currentSettlementNum: null,
+        totalSettlementNum: null,
+        settlementPrice: null,
+        anchorAmount: null,
+        referenceAmount: null,
+        totalAmount: null,
+        remarks: null,
+        createTime: null,
+        updateTime: null
+      };
+      this.dateFile = null;
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.requestUploadDate = [];
+      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.uploadDate = response.data.statDate;
+        this.open = true;
+        this.title = "修改激励";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.form.statDate = this.uploadDate;
+            updateInfo(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getUploadDate();
+              this.getList();
+            });
+          } else {
+            this.form.statDate = this.uploadDate;
+            addInfo(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getUploadDate();
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除所选的数据项?').then(function () {
+        return delInfo(ids);
+      }).then(() => {
+        this.getList();
+        this.getUploadDate();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/info/export', {
+        ...this.queryParams
+      }, `info_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+
+</script>

+ 1 - 2
src/views/industry/industryItemList.vue

@@ -432,8 +432,7 @@ export default {
               this.getList();
             }).catch((err) => {
               this.addLoading = false;
-            });
-            ;
+            })
           } else {
             this.form.userId = this.userId
             addInfo(this.form).then(response => {

+ 1 - 2
src/views/supplyChain/indexDetails.vue

@@ -350,8 +350,7 @@ export default {
       this.$route &&
       this.$route.query.id &&
       this.$route.query.orderStartDate &&
-      this.$route.query.orderEndDate
-    ) {
+      this.$route.query.orderEndDate) {
       this.getOrderDetail();
       this.getOrderStatistics();
     }