chenrui hace 4 años
padre
commit
38ce89de15

+ 31 - 0
src/api/salesReturn.js

@@ -110,3 +110,34 @@ export const salesQueryByReturn = (params) => {
     method: 'post'
   })
 }
+
+// 退货确认  列表  分页
+export const salesReturnFinancialList = (params) => {
+  const url = `/salesReturn/queryPageByFinancial/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 退货确认  详情  列表  分页
+export const salesReturnFinancialDetailList = (params) => {
+  const url = `/salesReturn/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 退货确认 退货确认
+export const salesReturnFinancial = (params) => {
+  return axios({
+    url: '/salesReturn/financial',
+    data: params,
+    method: 'post'
+  })
+}

+ 0 - 11
src/config/router.config.js

@@ -1419,17 +1419,6 @@ export const asyncRouterMap = [
                   hidden: true
                   // permission: 'M_goodsManage_list'
                 }
-              },
-              {
-                path: 'detail/:id',
-                name: 'returnConfirmationDetail',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/returnConfirmation/detail.vue'),
-                meta: {
-                  title: '退货确认详情',
-                  icon: 'pull-request',
-                  hidden: true
-                  // permission: 'B_goodsManage_edit'
-                }
               }
             ]
           },

+ 0 - 135
src/views/financialManagement/returnConfirmation/detail.vue

@@ -1,135 +0,0 @@
-<template>
-  <div class="warehousingAuditDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="warehousingAuditDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-button key="2" id="warehousingAuditDetail-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="warehousingAuditDetail-print-btn">快速打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 内容 -->
-    <a-page-header title="单号:CG2021010100001" ></a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="warehousingAuditDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="供应商">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="入库时间">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="采购单号">箭冠营销中心</a-descriptions-item>
-          </a-descriptions>
-          <a-descriptions :column="3" bordered>
-            <a-descriptions-item label="采购总款数">2</a-descriptions-item>
-            <a-descriptions-item label="采购总数量">20</a-descriptions-item>
-            <a-descriptions-item label="采购总成本">¥120.36</a-descriptions-item>
-            <a-descriptions-item label="入库总款数">3</a-descriptions-item>
-            <a-descriptions-item label="入库总数量">4</a-descriptions-item>
-            <a-descriptions-item label="入库总成本">¥11.2</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 入库明细 -->
-    <a-card size="small" :bordered="false" class="warehousingAuditDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="入库明细">
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
-            size="default"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :scroll="{ x: 1290 }"
-            bordered>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { getOperationalPrecision } from '@/libs/tools.js'
-import { STable, VSelect } from '@/components'
-export default {
-  components: { STable, VSelect },
-  data () {
-    return {
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 160, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center' },
-        { title: '采购数量', dataIndex: 'qty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库数量', dataIndex: 'qtsy', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center' },
-        { title: '入库小计', dataIndex: 'warehousingSubtotal', width: 100, align: 'center' },
-        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList(Object.assign(parameter, this.queryParam)).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //     const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
-        //     const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
-        //     const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
-        //     const productOrigUnit = (data.list[i].productEntity && data.list[i].productEntity.unit) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.unit)
-        //     data.list[i].productCode = productCode || '--'
-        //     data.list[i].productName = productName || '--'
-        //     data.list[i].productOrigCode = productOrigCode || '--'
-        //     data.list[i].productOrigUnit = productOrigUnit || '--'
-        //     data.list[i].warehouseName = data.list[i].warehouseEntity && data.list[i].warehouseEntity.name || '--'
-        //     data.list[i].warehouseLocationName = data.list[i].warehouseLocationEntity && data.list[i].warehouseLocationEntity.name || '--'
-        //     // 入库小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
-        //     data.list[i].warehousingSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      }
-    }
-  },
-  methods: {
-    //  返回列表
-    handleBack () {
-      this.$router.push({ path: '/financialManagement/warehousingAudit/list' })
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .warehousingAuditDetail-cont{
-    margin-bottom: 10px;
-  }
-</style>

+ 143 - 0
src/views/financialManagement/returnConfirmation/detailModal.vue

@@ -0,0 +1,143 @@
+<template>
+  <a-modal
+    centered
+    class="confirmationDetail-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="详情"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="1000">
+    <div>
+      <div style="padding: 0 12px;text-align: right;">
+        <a-button id="outboundOrderDetail-preview-btn" style="margin-right: 15px;">打印预览</a-button>
+        <a-button type="primary" id="outboundOrderDetail-print-btn">快速打印</a-button>
+      </div>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="outboundOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions size="small" :column="3" style="margin-bottom: 10px;">
+              <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="销退单号">{{ detailData&&detailData.salesReturnBillNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="创建时间">{{ detailData&&detailData.createDate || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货数量">{{ detailData&&detailData.totalQty || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="坏件数量">{{ detailData&&detailData.totalBadQty || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="返库数量">{{ detailData&&detailData.totalBackStockQty || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货金额">{{ detailData&&detailData.totalAmount || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="outboundOrderDetail-cont">
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1680 }"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+      </a-card>
+      <div class="btn-cont"><a-button id="confirmationDetail-modal-back" @click="isShow = false">返回列表</a-button></div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+import { salesReturnFinancialDetailList, salesReturnDetail } from '@/api/salesReturn'
+export default {
+  name: 'ConfirmationDetailModal',
+  components: { STable },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemSn: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      detailsData: null, //  详情数据
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '坏件数量', dataIndex: 'badQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '返库数量', dataIndex: 'backStockQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货金额小计', dataIndex: 'totalAmount', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货原因', dataIndex: 'remark', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return salesReturnFinancialDetailList(Object.assign(parameter, { sn: this.itemSn })).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.disabled = false
+          return data
+        })
+      },
+      detailData: null //  详情数据
+    }
+  },
+  methods: {
+    getDetail () {
+      salesReturnDetail({ sn: this.itemSn }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+        } else {
+          this.detailData = null
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    },
+    itemSn (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        const _this = this
+        _this.getDetail()
+        setTimeout(() => {
+          _this.$refs.table.refresh(true)
+        }, 200)
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .confirmationDetail-modal{
+    .ant-modal-body {
+      padding: 10px 10px 20px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 134 - 102
src/views/financialManagement/returnConfirmation/list.vue

@@ -1,54 +1,65 @@
 <template>
-  <a-card size="small" :bordered="false" class="warehousingAuditList-wrap">
+  <a-card size="small" :bordered="false" class="returnConfirmationList-wrap">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-item label="采购单号">
-              <a-input id="warehousingAuditList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入采购单号"/>
+            <a-form-item label="创建时间">
+              <a-range-picker
+                style="width:100%"
+                id="returnConfirmationList-createDate"
+                :disabledDate="disabledDate"
+                v-model="createDate"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="采购入库单号">
-              <a-input id="warehousingAuditList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入采购入库单号"/>
+            <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <custList id="returnConfirmationList-buyerName" v-model="queryParam.buyerName"></custList>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="入库时间">
-              <a-range-picker v-model="queryParam.creatDate" id="warehousingAuditList-creatDate"/>
+            <a-form-item label="销退单号">
+              <a-input id="returnConfirmationList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入销退单号"/>
             </a-form-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-item label="财务审核状态">
+              <a-form-item label="是否抓单">
+                <v-select
+                  v-model="queryParam.grabFlag"
+                  ref="grabFlag"
+                  id="returnConfirmationList-grabFlag"
+                  code="FLAG"
+                  placeholder="请选择"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
                 <v-select
                   v-model="queryParam.billStatus"
                   ref="billStatus"
-                  id="warehousingAuditList-billStatus"
-                  code="PAYMENT_TYPE"
-                  placeholder="请选择财务审核状态"
+                  id="returnConfirmationList-billStatus"
+                  code="SALES_RETURN_CONFIRM_STATUS"
+                  placeholder="请选择状态"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
           </template>
           <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehousingAuditList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="warehousingAuditList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </span>
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="returnConfirmationList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="returnConfirmationList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
           </a-col>
         </a-row>
       </a-form>
     </div>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>6</strong> 条记录,其中待审核 <strong>14</strong> 条 </div>
-    </a-alert>
     <!-- 列表 -->
     <s-table
       class="sTable"
@@ -57,130 +68,151 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1290 }"
+      :scroll="{ x: 1460, y: tableHeight }"
       bordered>
-      <!-- 采购单号 -->
-      <template slot="purchaseBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;">{{ record.purchaseBillNo }}</span>
-      </template>
-      <!-- 采购入库单号 -->
-      <template slot="purchaseNos" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;">{{ record.purchaseNo }}</span>
-      </template>
-      <!-- 状态 -->
-      <template slot="auditStatus" slot-scope="text, record">
-        <a-tag :color="record.auditStatus=='FINISH'?'green':'red'" >{{ record.auditStatus=='FINISH'? '待备货审核': '待单据审核' }}</a-tag>
+      <!-- 销退单号 -->
+      <template slot="salesReturnBillNo" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleExamine(record, 1)" id="warehousingAudit-adopt-btn">通过</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleExamine(record, 2)" id="warehousingAudit-unadopt-btn">不通过</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDetail(record)" id="warehousingAudit-detail-btn">详情</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.billStatus=='WAIT_FINANCIAL_AUDIT'"
+          class="button-warning"
+          @click="handleAudit(record)"
+          id="returnConfirmationList-audit-btn">退货确认</a-button>
+        <span v-else>--</span>
       </template>
     </s-table>
+    <!-- 查看 -->
+    <confirmation-detail-modal :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
   </a-card>
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
-// import { getRoleList, getServiceList } from '@/api/manage'
+import custList from '@/views/common/custList.vue'
+import confirmationDetailModal from './detailModal.vue'
+import { salesReturnFinancialList, salesReturnFinancial } from '@/api/salesReturn'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect, confirmationDetailModal, custList },
   data () {
     return {
-      advanced: false, //  高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        salesReturnBillNo: '', //  单号
+        buyerName: undefined,
+        grabFlag: undefined,
+        billStatus: undefined //  状态
+      },
+      tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
-      // 查询参数
-      queryParam: {},
-      // 表头
+      createDate: [], //  创建时间
+      dateFormat: 'YYYY-MM-DD',
+      advanced: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, align: 'center' },
-        { title: '采购入库单号', scopedSlots: { customRender: 'purchaseNos' }, align: 'center' },
-        { title: '总款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库总数量', dataIndex: 'totalQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库总成本', dataIndex: 'totalAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库时间', dataIndex: 'sauditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务审核状态', scopedSlots: { customRender: 'auditStatus' }, width: 120, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 190, align: 'center', fixed: 'right' }
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据来源', dataIndex: 'salesReturnBillSourceDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: 220, align: 'center' },
+        { title: '退货客户', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '退货数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '是否抓单', dataIndex: 'grabFlagDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '确认时间', dataIndex: 'confirmTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'billStatusDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 380
+        }
+        // 创建时间
+        if (this.createDate && this.createDate.length > 0) {
+          this.queryParam.beginDate = moment(this.createDate[0]).format(this.dateFormat)
+          this.queryParam.endDate = moment(this.createDate[1]).format(this.dateFormat)
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
+        return salesReturnFinancialList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          return data
         })
-      }
+      },
+      openModal: false,
+      itemSn: ''
     }
   },
   methods: {
-    //  详情
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.salesReturnBillNo = ''
+      this.queryParam.buyerName = undefined
+      this.queryParam.grabFlag = undefined
+      this.queryParam.billStatus = undefined
+      this.createDate = []
+      this.$refs.table.refresh(true)
+    },
+    // 详情
     handleDetail (row) {
-      this.$router.push({ path: `/financialManagement/warehousingAudit/detail/${row.id}` })
+      this.itemSn = row.salesReturnBillSn
+      this.openModal = true
     },
-    //  审核
-    handleExamine (row, type) {
+    closeModal () {
+      this.itemSn = ''
+      this.openModal = false
+    },
+    // 单个审核
+    handleAudit (row) {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: '操作后不可恢复,确定要进行' + (type == 1 ? ' 通过 ' : ' 不通过 ') + '操作吗?',
+        content: '请点击下方按钮确认操作',
         centered: true,
+        okText: '通过',
+        cancelText: '不通过',
         onOk () {
-          // delectRolePower({
-          //   id: row.id
-          // }).then(res => {
-          //   console.log(res, 'res1111')
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
+          _this.auditOrder(row.salesReturnBillSn, 'FINISH')
+        },
+        onCancel (e) {
+          if (!e.triggerCancel) {
+            _this.auditOrder(row.salesReturnBillSn, 'FINANCIAL_REJECT')
+          }
+          _this.$destroyAll()
         }
       })
     },
-    //  重置
-    resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
-      this.$refs.table.refresh(true)
+    auditOrder (sn, flag) {
+      const _this = this
+      salesReturnFinancial({ salesReturnBillSn: sn, billStatus: flag }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+        }
+      })
     }
   }
 }
 </script>
+
 <style lang="less">
-  .warehousingAuditList-wrap{
+  .returnConfirmationList-wrap{
     .sTable{
-      margin-top: 15px;
+      margin-top: 20px;
     }
   }
 </style>