ソースを参照

Merge branch 'dev_v2' of https://gogs.zfire.top/zfire-front/supply-front into dev_v2

zh 2 年 前
コミット
8f8202ba5f

+ 0 - 1
src/components/Common/examine-dialog.vue

@@ -63,7 +63,6 @@ export default {
     submitForm() {
       this.$refs.examineForm.validate(valid => {
         if (valid) {
-          // this.$parent.submitExamineForm()
           this.$emit('submit')
           this.$refs.examineForm.resetFields()
         }

+ 5 - 6
src/views/finance/change_list.vue

@@ -8,12 +8,11 @@
     :tableAttributes="tableAttributes"
     :tableEvents="tableEvents"
     :columnParsing="columnParsing"
+    :replaceOrNotMap="false"
   >
     <Popu v-if="showPage !== 1">
       <ChangeListDetail v-if="showPage == 2" @refresh="refreshFn" :detailList="detailList" />
-
       <ChangeListExamine v-if="showPage == 3" @refresh="refreshFn" :detailList="detailList" />
-
       <ChangeListReview v-if="showPage == 4" @refresh="refreshFn" :detailList="detailList" />
     </Popu>
   </template-page>
@@ -77,7 +76,7 @@ export default {
       return (h, { row, index, column }) => {
         return (
           <div class="operation-btns">
-            {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus == '保存' ? (
+            {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus == 'SAVE' ? (
               <el-button
                 onClick={() => {
                   this.submitFn(row.id)
@@ -89,7 +88,7 @@ export default {
                 提审
               </el-button>
             ) : null}
-            {row.examineStatus == '待审核' &&
+            {row.examineStatus == 'WAIT' &&
             !this.isCustomer &&
             this.$checkBtnRole('examine', this.$route.meta.roles) ? (
               <el-button
@@ -103,7 +102,7 @@ export default {
                 审核
               </el-button>
             ) : null}
-            {(row.examineStatus == '初审不通过' || row.examineStatus == '保存') &&
+            {(row.examineStatus == 'FAIL_ONE' || row.examineStatus == 'SAVE') &&
             this.$checkBtnRole('edit', this.$route.meta.roles) ? (
               <el-button
                 type="text"
@@ -126,7 +125,7 @@ export default {
             >
               详情
             </el-button>
-            {row.examineStatus == '待审核' ? (
+            {row.examineStatus == 'WAIT' ? (
               <el-button
                 onClick={() => {
                   this.cancelFn(row.id)

+ 1 - 2
src/views/finance/components/rebate_list-apply.vue

@@ -375,12 +375,11 @@ export default {
   },
   methods: {
     goBack() {
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     },
     //获取详情数据
     async getDataList() {
       let res = await getRebateOrderDetail({ id: this.detailId })
-      console.log(res, 11111)
       this.searchForm.rebateOrderId = res.data.id
       this.searchForm.theTime = res.data.theTime
       this.searchForm.createBy = res.data.createBy

+ 52 - 19
src/views/finance/components/rebate_list-confirm.vue

@@ -38,15 +38,23 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="审批人" prop="">
-              <el-input v-if="this.searchForm.secondExamineBy != null" disabled v-model="searchForm.secondExamineBy"
-                placeholder=""></el-input>
+              <el-input
+                v-if="this.searchForm.secondExamineBy != null"
+                disabled
+                v-model="searchForm.secondExamineBy"
+                placeholder=""
+              ></el-input>
               <el-input v-else disabled v-model="searchForm.examineBy" placeholder=""></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="审批日期" prop="">
-              <el-input v-if="this.searchForm.secondExamineTime != null" disabled v-model="searchForm.secondExamineTime"
-                placeholder=""></el-input>
+              <el-input
+                v-if="this.searchForm.secondExamineTime != null"
+                disabled
+                v-model="searchForm.secondExamineTime"
+                placeholder=""
+              ></el-input>
               <el-input v-else disabled v-model="searchForm.examineTime" placeholder=""></el-input>
             </el-form-item>
           </el-col>
@@ -56,11 +64,23 @@
     <!-- 列表 -->
     <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
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
           <el-table-column label="序号" align="left" width="100" type="index" show-overflow-tooltip></el-table-column>
-          <el-table-column align="left" label="返利类型" prop="walletName" min-width="160"
-            show-overflow-tooltip></el-table-column>
+          <el-table-column
+            align="left"
+            label="返利类型"
+            prop="walletName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
           <el-table-column align="right" label="总返利金额" prop="amount" min-width="160" show-overflow-tooltip>
             <!-- <template slot-scope="scope">
 
@@ -68,8 +88,13 @@
           </el-table-column>
           <el-table-column align="right" label="返利金额" prop="" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-input style="width: 100%" class="mountclass" :disabled="show" type="number"
-                v-model="scope.row.rebateAmount"></el-input>
+              <el-input
+                style="width: 100%"
+                class="mountclass"
+                :disabled="show"
+                type="number"
+                v-model="scope.row.rebateAmount"
+              ></el-input>
             </template>
           </el-table-column>
           <!--          <el-table-column align="right" label="折让金额" prop="" min-width="160" show-overflow-tooltip>-->
@@ -90,10 +115,20 @@
           <!--            min-width="160"-->
           <!--            show-overflow-tooltip-->
           <!--          ></el-table-column>-->
-          <el-table-column align="left" label="备注1" prop="remark1" min-width="160"
-            show-overflow-tooltip></el-table-column>
-          <el-table-column align="left" label="备注2" prop="remark2" min-width="160"
-            show-overflow-tooltip></el-table-column>
+          <el-table-column
+            align="left"
+            label="备注1"
+            prop="remark1"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="left"
+            label="备注2"
+            prop="remark2"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
         </el-table>
       </div>
     </div>
@@ -135,13 +170,11 @@ export default {
     }
   },
   computed: {
-    
     isCustomer() {
       return this.$store.getters.customerId && this.$store.getters.customerNumber
     },
     show() {
       if (this.isShow && this.examineStatus == 'OK_ONE') {
-        
         this.state = 1
         if (this.isCustomer) {
           return true
@@ -149,7 +182,7 @@ export default {
         return false
       } else if (!this.isShow) {
         this.state = 2
-        console.log(33);
+        console.log(33)
         return false
       } else if (this.isShow && (this.examineStatus == 'OK' || this.examineStatus == 'FAIL')) {
         return true
@@ -229,7 +262,7 @@ export default {
       }
 
       this.$emit('updateList')
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     },
     //获取详情数据
     async getDataList() {
@@ -255,7 +288,7 @@ export default {
       }
     },
     goBack() {
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     }
   }
 }

+ 1 - 2
src/views/finance/components/rebate_list-detail.vue

@@ -228,12 +228,11 @@ export default {
   },
   methods: {
     goBack() {
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     },
     //获取详情数据
     async getDataList() {
       let res = await getRebateOrderDetail({ id: this.detailId })
-      console.log(res, 11111)
       this.searchForm.rebateOrderId = res.data.id
       this.searchForm.theTime = res.data.theTime
       this.searchForm.createBy = res.data.createBy

+ 8 - 8
src/views/finance/components/rebate_list-edit.vue

@@ -275,7 +275,7 @@ export default {
   },
   methods: {
     goBack() {
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     },
     //获取详情数据
     async getDataList() {
@@ -286,14 +286,14 @@ export default {
       //   this.searchForm.createTime = res.data.createTime;
       this.searchForm.remark = res.data.remark
       this.state = res.data.examineStatus
-      res.data.items.map(async(k)=>{
+      res.data.items.map(async k => {
         const wallet = await getWalletCustomerList({
-        customerId: k.customerId,
-        type: 'REBATE'
+          customerId: k.customerId,
+          type: 'REBATE'
+        })
+        this.$set(k, 'walletList', wallet.data)
       })
-      this.$set(k, 'walletList', wallet.data)
-    })
-        this.dataList = res.data.items
+      this.dataList = res.data.items
       // this.$set(this.dataList, 'walletList', wallet.data)
     },
     //保存
@@ -317,7 +317,7 @@ export default {
       this.$emit('updateList')
 
       this.$message.success('保存成功')
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     },
     //选择经销商名称事件
     async changeCustomerFn(v, index, value) {

+ 2 - 2
src/views/finance/components/rebate_list-examine.vue

@@ -240,7 +240,7 @@ export default {
       })
       this.$emit('updateList')
       this.$message.success('审核成功')
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     },
     //获取详情数据
     async getDataList() {
@@ -255,7 +255,7 @@ export default {
     },
 
     goBack() {
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     }
   }
 }

+ 2 - 2
src/views/finance/components/rebate_list-review.vue

@@ -414,7 +414,7 @@ export default {
       })
       this.$emit('updateList')
       this.$message.success('复核成功')
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     },
     //获取详情数据
     async getDataList() {
@@ -438,7 +438,7 @@ export default {
       this.dataList2 = this.trueOKList
     },
     goBack() {
-      this.$parent.showPage = 1
+      this.$emit('setShowPage', 1)
     }
   }
 }

+ 67 - 26
src/views/finance/rebate_list.vue

@@ -10,26 +10,75 @@
       :tableAttributes="tableAttributes"
       :tableEvents="tableEvents"
       :columnParsing="columnParsing"
-      :replaceOrNotMap="true"
+      :replaceOrNotMap="false"
     >
     </template-page>
     <div class="app-container" v-if="showPage == 2">
-      <RebateListApply :detailId="detailId" />
+      <RebateListApply
+        :detailId="detailId"
+        @setShowPage="
+          val => {
+            $refs.pageRef.refreshList()
+            showPage = val
+          }
+        "
+      />
     </div>
     <div class="app-container" v-if="showPage == 3">
-      <RebateListExamine @updateList="updateList" :detailId="detailId" />
+      <RebateListExamine
+        :detailId="detailId"
+        @setShowPage="
+          val => {
+            $refs.pageRef.refreshList()
+            showPage = val
+          }
+        "
+      />
     </div>
     <div class="app-container" v-if="showPage == 4">
-      <RebateListReview @updateList="updateList" :detailId="detailId" />
+      <RebateListReview
+        :detailId="detailId"
+        @setShowPage="
+          val => {
+            $refs.pageRef.refreshList()
+            showPage = val
+          }
+        "
+      />
     </div>
     <div class="app-container" v-if="showPage == 5">
-      <RebateListDetail :detailId="detailId" />
+      <RebateListDetail
+        :detailId="detailId"
+        @setShowPage="
+          val => {
+            $refs.pageRef.refreshList()
+            showPage = val
+          }
+        "
+      />
     </div>
     <div class="app-container" v-if="showPage == 6">
-      <RebateListConfirm @updateList="updateList" :detailId="detailId" :isShow="isShow" />
+      <RebateListConfirm
+        :detailId="detailId"
+        :isShow="isShow"
+        @setShowPage="
+          val => {
+            $refs.pageRef.refreshList()
+            showPage = val
+          }
+        "
+      />
     </div>
     <div class="app-container" v-if="showPage == 7">
-      <RebateListEdit @updateList="updateList" :detailId="detailId" />
+      <RebateListEdit
+        :detailId="detailId"
+        @setShowPage="
+          val => {
+            $refs.pageRef.refreshList()
+            showPage = val
+          }
+        "
+      />
     </div>
     <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
   </div>
@@ -248,7 +297,7 @@ export default {
           <div class="operation-btns">
             {!this.isCustomer &&
             this.$checkBtnRole('edit', this.$route.meta.roles) &&
-            row.examineStatus != '初审不通过' ? (
+            row.examineStatus != 'FAIL_ONE' ? (
               <el-button
                 type="text"
                 class="textColor"
@@ -259,7 +308,7 @@ export default {
                 编辑
               </el-button>
             ) : null}
-            {row.examineStatus == '保存' && !this.isCustomer && this.$checkBtnRole('apply', this.$route.meta.roles) ? (
+            {row.examineStatus == 'SAVE' && !this.isCustomer && this.$checkBtnRole('apply', this.$route.meta.roles) ? (
               <el-button
                 type="text"
                 class="textColor"
@@ -270,7 +319,7 @@ export default {
                 申请
               </el-button>
             ) : null}
-            {row.examineStatus == '待审核' &&
+            {row.examineStatus == 'WAIT' &&
             !this.isCustomer &&
             this.$checkBtnRole('examine', this.$route.meta.roles) ? (
               <el-button
@@ -283,9 +332,7 @@ export default {
                 审核
               </el-button>
             ) : null}
-            {(row.examineStatus == '初审通过' ||
-              row.examineStatus == '审核通过' ||
-              row.examineStatus == '审核不通过') &&
+            {(row.examineStatus == 'OK_ONE' || row.examineStatus == 'OK' || row.examineStatus == 'FAIL') &&
             !this.isCustomer &&
             this.$checkBtnRole('examine', this.$route.meta.roles) ? (
               <el-button
@@ -295,10 +342,10 @@ export default {
                   this.reviewFn(row.rebateOrderId)
                 }}
               >
-                {row.examineStatus == '审核通过' ? '取消复核' : '复核'}
+                {row.examineStatus == 'OK' ? '取消复核' : '复核'}
               </el-button>
             ) : null}
-            {(row.examineStatus == '待审核' || row.examineStatus == '保存') && !this.isCustomer ? (
+            {(row.examineStatus == 'WAIT' || row.examineStatus == 'SAVE') && !this.isCustomer ? (
               <el-button
                 type="text"
                 class="textColor"
@@ -309,10 +356,10 @@ export default {
                 详情
               </el-button>
             ) : null}
-            {(row.examineStatus == '初审通过' ||
-              row.examineStatus == '初审不通过' ||
-              row.examineStatus == '审核不通过' ||
-              row.examineStatus == '审核通过') &&
+            {(row.examineStatus == 'OK_ONE' ||
+              row.examineStatus == 'FAIL_ONE' ||
+              row.examineStatus == 'FAIL' ||
+              row.examineStatus == 'OK') &&
             !this.isCustomer ? (
               <el-button
                 type="text"
@@ -326,9 +373,7 @@ export default {
             ) : null}
             {this.isCustomer &&
             row.withholdAmount == 0 &&
-            (row.examineStatus == '初审通过' ||
-              row.examineStatus == '审核通过' ||
-              row.examineStatus == '审核不通过') ? (
+            (row.examineStatus == 'OK_ONE' || row.examineStatus == 'OK' || row.examineStatus == 'FAIL') ? (
               <el-button
                 type="text"
                 class="textColor"
@@ -393,10 +438,6 @@ export default {
       this.$message.success('删除成功')
       this.deleList = []
     },
-    //更新列表数据
-    updateList() {
-      this.$refs.pageRef.refreshList()
-    },
     //获取列表数据
     async getDataList() {
       this.$refs.pageRef.refreshList()

+ 1 - 9
src/views/supply/apply/apply_list.vue

@@ -67,6 +67,7 @@ export default {
   },
   data() {
     return {
+      isShow: false,
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
@@ -222,15 +223,6 @@ export default {
       this.toReturnForm()
     }
   },
-  //   activated() {
-  //       this.isShow = false
-  //   if (this.$route.query && this.$route.query.isShow) {
-  //     this.isShow = this.$route.query.isShow
-
-  //       this.toReturnForm()
-  //   }
-
-  // },
   methods: {
     // 列表请求函数
     getListf: invoiceListRetailV2,

+ 1 - 1
src/views/supply/apply/components/apply_examine.vue

@@ -371,7 +371,7 @@ export default {
           this.$successMsg('审批成功')
           this.$emit('shuaxinlb')
           this.goBack()
-          
+
         })
         .finally(res => {
           this.formLoading = false

+ 1 - 2
src/views/supply/apply/components/apply_form.vue

@@ -705,14 +705,13 @@ export default {
               this.$emit('shuaxinlb')
               this.$successMsg('编辑成功')
               this.goBack()
-              
             })
           } else {
             addApply(params).then(res => {
               this.$emit('shuaxinlb')
               this.$successMsg('添加成功')
               this.goBack()
-              
+
             })
           }
         }

+ 4 - 4
src/views/supply/apply/components/apply_return_form.vue

@@ -404,7 +404,7 @@ export default {
   },
   name: 'ApplyReturnForm',
   componentName: 'ApplyReturnForm',
-  props: ['listItem','isShow'],
+  props: ['listItem'],
   data() {
     return {
       mainForm: {
@@ -494,7 +494,7 @@ export default {
     // 返回列表
     goBack() {
       console.log(45454)
-      if (this.isShow == 'true') {
+      if (this.$parent.isShow == 'true') {
         this.$router.replace('/supply/implement/sum_list')
       } else {
         this.$emit('backListFormDetail')
@@ -755,14 +755,14 @@ export default {
               this.$emit('shuaxinlb')
               this.$successMsg('编辑成功')
               this.goBack()
-              
+              this.$parent?.getList()
             })
           } else {
             addApplyReturn(params).then(res => {
               this.$emit('shuaxinlb')
               this.$successMsg('添加成功')
               this.goBack()
-              
+              this.$parent?.getList()
             })
           }
         }

+ 2 - 2
src/views/supply/direct/direct_list.vue

@@ -46,7 +46,7 @@
                     <el-date-picker
                       v-model="screenForm.date"
                       type="datetimerange"
-:default-time="['00:00:00','23:59:59']"
+                      :default-time="['00:00:00', '23:59:59']"
                       range-separator="至"
                       style="width: 100%"
                       value-format="yyyy-MM-dd HH:mm:ss"
@@ -434,7 +434,7 @@ export default {
 
     // 重置筛选表单
     resetScreenForm() {
-        this.$refs.screenForm.resetFields()
+      this.$refs.screenForm.resetFields()
       this.currentPage = 1
       this.getList()
     },