瀏覽代碼

Merge remote-tracking branch 'origin/master'

lizhenhao 2 年之前
父節點
當前提交
a64dfa935e

+ 7 - 0
src/api/materialManagement/WareHouseService.js

@@ -36,6 +36,13 @@ export default class WareHouseService {
       params: param
     })
   }
+  wareHouseSummaryList2 (param) {
+    return request({
+      url: '/material/management/wareHouse/wareHouseSummaryList2',
+      method: 'get',
+      params: param
+    })
+  }
   save (param) {
     return request({
       url: '/material/management/wareHouse/save',

+ 1 - 1
src/views/modules/cw/invoice/InvoiceList.vue

@@ -227,7 +227,7 @@
           <vxe-column min-width="120" title="收款日期"align="center" field="receivablesDate"></vxe-column>
           <vxe-column min-width="110" fixed="right"align="center" title="是否收款" field="receivablesStatus">
             <template slot-scope="scope">
-              {{$dictUtils.getDictLabel('collect_not', scope.row.type, '-')}}
+              {{$dictUtils.getDictLabel('collect_not', scope.row.receivablesStatus, '-')}}
             </template>
           </vxe-column>
           <vxe-column min-width="110" fixed="right"align="center" title="是否作废" field="invalidStatus">

+ 22 - 4
src/views/modules/finance/invoice/InvoiceList.vue

@@ -68,8 +68,12 @@
         </el-form-item>
         <el-form-item v-if="showHideItem" prop="receivablesStatus" label="是否收款">
           <el-select v-model="searchForm.receivablesStatus" placeholder="请选择是否收款" clearable>
-            <el-option label="是" value="1"></el-option>
-            <el-option label="否" value="0"></el-option>
+            <el-option
+              v-for="item in this.$dictUtils.getDictList('collect_not')"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item v-if="showHideItem" prop="type" label="发票类型">
@@ -223,7 +227,7 @@
           <vxe-column min-width="120" title="收款日期"align="center" field="receivablesDate"></vxe-column>
           <vxe-column min-width="110" fixed="right"align="center" title="是否收款" field="receivablesStatus">
             <template slot-scope="scope">
-              {{scope.row.receivablesStatus === '1'?'已收款':'未收款'}}
+              {{$dictUtils.getDictLabel('collect_not', scope.row.receivablesStatus, '-')}}
             </template>
           </vxe-column>
           <vxe-column min-width="110" fixed="right"align="center" title="是否作废" field="invalidStatus">
@@ -243,6 +247,7 @@
               <el-button v-if="hasPermission('finance:invoice:edit:detail')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"  size="small" @click="editDetail(scope.row.id)">修改发票明细</el-button>
               <el-button v-if="hasPermission('finance:invoice:edit:receivables')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"   size="small" @click="view(true, scope.row.id)">收款</el-button>
               <el-button v-if="hasPermission('finance:invoice:edit:is_receivables')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"   size="small" @click="isReceivables(scope.row)">确认收款</el-button>
+              <el-button v-if="hasPermission('cw_finance:invoice:edit:is_receivables')&&scope.row.status === '5'&&scope.row.receivablesStatus === '1'" type="text"   size="small" @click="recallReceivables(scope.row)">撤回收款</el-button>
               <el-button v-if="hasPermission('finance:invoice:edit:invalid')&&scope.row.status === '5'||scope.row.status === '7'" type="text"  size="small" @click="invoiceInvalidPush(scope.row)">作废</el-button>
               <el-button v-if="hasPermission('finance:invoice:edit:invalid')&&scope.row.status === '6'" type="text"  size="small" @click="invoiceInvalidReBack(scope.row)">作废撤回</el-button>
               <el-button v-if="hasPermission('finance:invoice:edit')&&scope.row.status === '1'||scope.row.status === '3'" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
@@ -746,7 +751,20 @@
             console.log(err.response)
           }
         })
-      }
+      },
+      recallReceivables (row) {
+        this.$confirm(`确定要撤回收款吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let param = {id: row.id, receivablesStatus: '0', receivablesDate: this.moment(new Date()).format('YYYY-MM-DD')}
+          this.financeInvoiceService.isReceivables(param).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+          })
+        })
+      },
     }
   }
 </script>

+ 1 - 1
src/views/modules/materialManagement/wareHouseSummary/WareHouseHistoryPopup.vue

@@ -147,7 +147,7 @@
       // 获取数据列表
       refreshList () {
         this.loading = true
-        this.wareHouseService.wareHouseSummaryList({
+        this.wareHouseService.wareHouseSummaryList2({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,
           'orders': this.tablePage.orders,