Explorar el Código

退押审批更改,返利单导入更改提示,押金比例增加状态

chen hace 3 años
padre
commit
d2663170f7

+ 19 - 0
src/views/basic_data/dealer/components/dealer_deposit_history.vue

@@ -52,6 +52,25 @@
           />
           <el-table-column
             align="center"
+            label="状态"
+            prop="currentStatus"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-tag type="info" v-if="scope.row.currentStatus == '未开始'"
+                >未开始</el-tag
+              >
+              <el-tag type="success" v-if="scope.row.currentStatus == '生效中'"
+                >生效中</el-tag
+              >
+              <el-tag type="danger" v-if="scope.row.currentStatus == '已结束'"
+                >已结束</el-tag
+              >
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
             label="开始时间"
             prop="startTime"
             min-width="160"

+ 73 - 3
src/views/basic_data/dealer/dealer_deposit.vue

@@ -31,8 +31,25 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="状态" prop="currentStatus">
+                <el-select
+                  class="selectStyle"
+                  v-model="searchForm.currentStatus"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in statusList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
 
-            <el-col :xs="24" :sm="12" :lg="18">
+            <el-col :xs="24" :sm="12" :lg="12">
               <el-form-item label="" class="fr">
                 <el-button size="small" @click="clearFn">清空</el-button>
                 <el-button size="small" type="primary" @click="searchFn"
@@ -54,6 +71,9 @@
             >新增</el-button
           >
         </div>
+        <div class="fr">
+          <el-button type="primary" size="small" @click="addFn">新增</el-button>
+        </div>
       </div>
 
       <div class="mymain-container">
@@ -98,6 +118,27 @@
             />
             <el-table-column
               align="center"
+              label="状态"
+              prop="currentStatus"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <el-tag type="info" v-if="scope.row.currentStatus == '未开始'"
+                  >未开始</el-tag
+                >
+                <el-tag
+                  type="success"
+                  v-if="scope.row.currentStatus == '生效中'"
+                  >生效中</el-tag
+                >
+                <el-tag type="danger" v-if="scope.row.currentStatus == '已结束'"
+                  >已结束</el-tag
+                >
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
               label="开始时间"
               prop="startTime"
               min-width="160"
@@ -397,6 +438,21 @@ export default {
       showDialog: false,
       dataList: [],
       dealerList: [],
+      statusList: [
+        {
+          value: "1",
+          label: "未开始",
+        },
+        {
+          value: "2",
+          label: "生效中",
+        },
+        {
+          value: "3",
+          label: "已结束",
+        },
+      ],
+      currentStatus: "",
     };
   },
   async created() {
@@ -474,18 +530,29 @@ export default {
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = 1;
-      this.getList({ pageNum: 1, pageSize: this.pageSize });
+      this.getList({
+        pageNum: 1,
+        pageSize: this.pageSize,
+        keyword: this.searchForm.customerName,
+        currentStatus: this.searchForm.currentStatus,
+      });
     },
     // 更改当前页
     handleCurrentChange(val) {
       this.currentPage = val;
-      this.getList({ pageNum: val, pageSize: 10 });
+      this.getList({
+        pageNum: val,
+        pageSize: 10,
+        keyword: this.searchForm.customerName,
+        currentStatus: this.searchForm.currentStatus,
+      });
     },
     //搜索功能
     async searchFn() {
       console.log(this.searchForm);
       await this.getList({
         keyword: this.searchForm.customerName,
+        currentStatus: this.searchForm.currentStatus,
         pageNum: 1,
         pageSize: 10,
       });
@@ -560,6 +627,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.selectStyle {
+  width: 100%;
+}
 ::v-deep .el-textarea__inner {
   resize: none;
 }

+ 28 - 24
src/views/engin_deposit/components/refund_list-detail.vue

@@ -50,6 +50,7 @@
           <div class="value">
             <el-input
               :disabled="title == '详情'"
+              placeholder="请输入"
               v-model="detailList.refFactoryNo"
             ></el-input>
           </div>
@@ -82,7 +83,8 @@
               class="selectStyle"
               v-model="detailList.sendFactoryDate"
               type="datetime"
-              placeholder=""
+              prefix-icon="''"
+              placeholder="请选择寄厂日期"
               default-time="00:00:00"
               value-format="yyyy-MM-dd HH:mm:ss"
             >
@@ -97,11 +99,12 @@
           <div class="label">安装时间</div>
           <div class="value">
             <el-date-picker
+              prefix-icon="''"
+              placeholder="请选择安装时间"
               :disabled="title == '详情'"
               class="selectStyle"
               v-model="detailList.installDate"
               type="datetime"
-              placeholder=""
               default-time="00:00:00"
               value-format="yyyy-MM-dd HH:mm:ss"
             >
@@ -378,14 +381,15 @@
           <div class="label">验收人</div>
           <div class="value">{{ this.checkBy }}</div>
         </el-col>
-        <el-col :xs="12" :sm="12" :lg="12" class="item">
+        <el-col :xs="12" :sm="12" :lg="12" class="item dateS">
           <div class="label">验收日期</div>
           <div class="value">
             <el-date-picker
+              disabled
+              prefix-icon="''"
               class="selectStyle"
-              v-model="checkDate"
               type="datetime"
-              placeholder=""
+              placeholder="系统自动生成"
               default-time="00:00:00"
               value-format="yyyy-MM-dd HH:mm:ss"
             >
@@ -421,7 +425,7 @@
           <div class="label">验收人</div>
           <div class="value">{{ detailList.checkBy }}</div>
         </el-col>
-        <el-col :xs="12" :sm="12" :lg="12" class="item">
+        <el-col :xs="12" :sm="12" :lg="12" class="item dateS">
           <div class="label">验收日期</div>
           <div class="value">
             <el-date-picker
@@ -446,7 +450,7 @@
             </el-radio-group>
           </div>
         </el-col>
-        <el-col :xs="12" :sm="24" :lg="24" class="item">
+        <el-col :xs="12" :sm="24" :lg="24" class="item dateS">
           <div class="label">验收说明</div>
           <div class="value">
             <el-input
@@ -503,11 +507,12 @@ export default {
       dataList: [], // 列表数据
       detailList: {},
       checkBy: "",
-      checkDate: null,
+      checkDate: "",
       isRefundDeposit: true,
       checkNote: "",
     };
   },
+
   created() {
     console.log(this.$imageUrl, 8888);
     this.checkBy = this.name;
@@ -516,25 +521,11 @@ export default {
   methods: {
     //批量下载
     async batchDownloadFn() {
-      // let res = await getDepositManageDownZip({ parentId: this.detailId });
-      // console.log(res, 888999);
-      // // window.open(this.imageURL + "/deposit-manage/downZip");
-      // // console.log(res, 9999);
-      // if (res.data) {
-      //   window.open(this.imageURL + res.data);
-      // }
       downloadFiles("/deposit-manage/downZip", { parentId: this.detailId });
     },
     //下载
     downLoadFn(v) {
       window.open(this.imageURL + v);
-      // const url = this.imageURL + v;
-      // const link = document.createElement("a");
-      // link.style.display = "none";
-      // link.href = url;
-      // link.setAttribute("download", "导入学生账号模板");
-      // document.body.appendChild(link);
-      // link.click();
     },
     // 检查文件类型
     checkFileType(url) {
@@ -559,10 +550,14 @@ export default {
     },
     //审批驳回
     async rejectFn() {
+      if (!this.detailList.installDate) {
+        this.$message.error("请选择安装时间");
+        return;
+      }
       let data = {
         ...this.detailList,
         checkBy: this.checkBy,
-        checkDate: this.checkDate,
+        // checkDate: this.checkDate,
         isRefundDeposit: this.isRefundDeposit,
         checkNote: this.checkNote,
         examineResult: 0,
@@ -574,10 +569,14 @@ export default {
     },
     //审批通过
     async adoptFn() {
+      if (!this.detailList.installDate) {
+        this.$message.error("请选择安装时间");
+        return;
+      }
       let data = {
         ...this.detailList,
         checkBy: this.checkBy,
-        checkDate: this.checkDate,
+        // checkDate: this.checkDate,
         isRefundDeposit: this.isRefundDeposit,
         checkNote: this.checkNote,
         examineResult: 1,
@@ -612,6 +611,11 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.dateS {
+  .value {
+    padding: 0;
+  }
+}
 .batchDownload {
   float: right;
   margin-top: 9px;

+ 2 - 2
src/views/finance/rebate_form.vue

@@ -384,9 +384,9 @@ export default {
       console.log(result);
       this.importFileList = [];
       if (result.code == 200) {
-        this.$message.success("导入成功");
+        this.$message.success(result.message);
       } else {
-        this.$message.error("导入失败");
+        this.$message.error(result.message);
       }
     },
     //下载模板

+ 81 - 34
src/views/finance/standbook_list.vue

@@ -357,7 +357,11 @@
               prop="billType"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.billType == 3 ? "付款单" : scope.row.billType }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="单据号"
@@ -480,47 +484,90 @@ export default {
       isDisabled: false,
     };
   },
+  beforeRouteEnter(to, from, next) {
+    // console.log(to, from, next, 898);
+    next((vm) => {
+      // 这个时候组件还没有创建,所以要通过vm来访问
+      console.log(vm);
+      if (
+        from.path == "/finance/details/balance_sum" &&
+        to.path == "/finance/details/standbook_list"
+      ) {
+        //只有是从A进到B页面才执行
+        // 将要执行的逻辑
+
+        vm.isDisabled = true;
+        vm.searchForm.customerId = vm.$route.query.customerName;
+        vm.changeFn(vm.$route.query.customerId);
+        vm.getDataList({
+          pageSize: vm.pageSize,
+          pageNum: vm.currentPage,
+          type: vm.bill,
+          customerName: vm.$route.query.customerName,
+          customerNumber: vm.$route.query.customerNumber,
+        });
+      } else if (vm.isCustomer) {
+        vm.isDisabled = true;
+        vm.searchForm.customerId = vm.$store.state.user.customerName;
+        vm.changeFn(vm.$store.state.user.customerId);
+        vm.getDataList({
+          pageSize: vm.pageSize,
+          pageNum: vm.currentPage,
+          type: vm.bill,
+          customerName: vm.$store.state.user.customerName,
+          customerNumber: vm.$store.state.user.customerNumber,
+        });
+      } else {
+        vm.searchForm.customerId = "";
+        vm.isDisabled = false;
+        vm.getDataList({
+          pageSize: vm.pageSize,
+          pageNum: vm.currentPage,
+          type: vm.bill,
+        });
+        vm.getCustomerDataList();
+      }
+    });
+  },
 
   created() {
     // console.log(
     //   this.customerId,
     //   this.$store.state.user.customerName,
     //   this.$store.state.user.customerNumber,
-
     //   777777
     // );
-
-    if (this.$route.query.customerName && this.$route.query.customerNumber) {
-      this.isDisabled = true;
-      this.searchForm.customerId = this.$route.query.customerName;
-      this.changeFn(this.$route.query.customerId);
-      this.getDataList({
-        pageSize: this.pageSize,
-        pageNum: this.currentPage,
-        type: this.bill,
-        customerName: this.$route.query.customerName,
-        customerNumber: this.$route.query.customerNumber,
-      });
-    } else if (this.isCustomer) {
-      this.isDisabled = true;
-      this.searchForm.customerId = this.$store.state.user.customerName;
-      this.changeFn(this.$store.state.user.customerId);
-      this.getDataList({
-        pageSize: this.pageSize,
-        pageNum: this.currentPage,
-        type: this.bill,
-        customerName: this.$store.state.user.customerName,
-        customerNumber: this.$store.state.user.customerNumber,
-      });
-    } else {
-      this.getDataList({
-        pageSize: this.pageSize,
-        pageNum: this.currentPage,
-        type: this.bill,
-      });
-      this.getCustomerDataList();
-    }
-
+    // if (this.$route.query.customerName && this.$route.query.customerNumber) {
+    //   this.isDisabled = true;
+    //   this.searchForm.customerId = this.$route.query.customerName;
+    //   this.changeFn(this.$route.query.customerId);
+    //   this.getDataList({
+    //     pageSize: this.pageSize,
+    //     pageNum: this.currentPage,
+    //     type: this.bill,
+    //     customerName: this.$route.query.customerName,
+    //     customerNumber: this.$route.query.customerNumber,
+    //   });
+    // } else
+    // if (this.isCustomer) {
+    //   this.isDisabled = true;
+    //   this.searchForm.customerId = this.$store.state.user.customerName;
+    //   this.changeFn(this.$store.state.user.customerId);
+    //   this.getDataList({
+    //     pageSize: this.pageSize,
+    //     pageNum: this.currentPage,
+    //     type: this.bill,
+    //     customerName: this.$store.state.user.customerName,
+    //     customerNumber: this.$store.state.user.customerNumber,
+    //   });
+    // } else {
+    //   this.getDataList({
+    //     pageSize: this.pageSize,
+    //     pageNum: this.currentPage,
+    //     type: this.bill,
+    //   });
+    //   this.getCustomerDataList();
+    // }
     // this.getCustomerDataList();
     // this.getWalletList();
     // this.getDataDict();