Browse Source

对单页面

lilei 1 month ago
parent
commit
7b48173328

+ 1 - 1
src/views/financialManagement/accountStatement/confrontModal.vue

@@ -36,7 +36,7 @@
                 </a-form-item>
               </a-col>
               <a-col :md="4" :sm="24">
-                <a-form-item label="单据类型">
+                <a-form-item label="业务类型">
                   <v-select
                     v-model="queryParam.status"
                     ref="status"

+ 1 - 1
src/views/financialManagement/accountStatement/list.vue

@@ -17,7 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="对账单号">
-                <a-input id="accountStatement-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入收款单号"/>
+                <a-input id="accountStatement-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入对账单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">

+ 239 - 2
src/views/financialManagement/accountStatementBill/detail.vue

@@ -1,8 +1,245 @@
 <template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" 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="时间">
+                <rangeDate id="aaccountStateBillDetail-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务单号">
+                <a-input id="aaccountStateBillDetail-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入业务单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="对账单号">
+                <a-input id="aaccountStateBillDetail-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入对账单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="借贷类型">
+                <v-select
+                  v-model="queryParam.status"
+                  ref="status"
+                  id="aaccountStateBillDetail-status"
+                  code="FINANCE_BOOK_STATE"
+                  placeholder="请选择借贷类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务类型">
+                <v-select
+                  v-model="queryParam.status"
+                  ref="status"
+                  id="aaccountStateBillDetail-status"
+                  code="FINANCE_BOOK_STATE"
+                  placeholder="请选择业务类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="对单状态">
+                <v-select
+                  v-model="queryParam.status"
+                  ref="status"
+                  id="accountStatement-status"
+                  code="FINANCE_BOOK_STATE"
+                  placeholder="请选择对单状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="aaccountStateBillDetail-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="aaccountStateBillDetail-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                id="aaccountStateBillDetail-export"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+              >导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false" class="aaccountStateBillDetail-wrap">
+      <a-alert type="info" style="margin-bottom:10px" v-if="totalData">
+        <div slot="message">
+          余额:<strong>{{ totalData&&(totalData.totalCancelAmount || totalData.totalCancelAmount==0) ? toThousands(totalData.totalCancelAmount) : '--' }}</strong>;
+          借方:<strong>{{ totalData&&(totalData.totalUnpushedAmount || totalData.totalUnpushedAmount==0) ? toThousands(totalData.totalUnpushedAmount) : '--' }}</strong>;
+          贷方:<strong>{{ totalData&&(totalData.totalDispatchAmount || totalData.totalDispatchAmount==0) ? toThousands(totalData.totalDispatchAmount) : '--' }}</strong>;
+        </div>
+      </a-alert>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+80+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :pageSize="30"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { financeBookQueryPage, financeBookDeleteBySn } from '@/api/financeBook.js'
+export default {
+  name: 'AccountStatementBillDetail',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      spinning: false,
+      exportLoading: false,
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        bookNo: '',
+        dealerName: '',
+        status: undefined
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      creatDate: [], //  创建时间
+      advanced: true,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return financeBookQueryPage(params).then(res => {
+          let data
+          if (res.status == 200) {
+            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.total = data.count || 0
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      total: 0, // 合计
+      totalData: null
+    }
+  },
+  // 根据权限显示列表字段
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '年', dataIndex: 'sparePartsNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '月', dataIndex: 'sparePartsNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '日', dataIndex: 'sparePartsNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'sparePartsNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账单号', dataIndex: 'sparePartsNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务类型', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '费用/调拨类型', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '摘要', dataIndex: 'sparePartsBatchNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客诉索赔编码', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '借方', dataIndex: 'productCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
+        { title: '贷方', dataIndex: 'productCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
+        { title: '备注', dataIndex: 'remarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对单状态', dataIndex: 'remarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.creatDate = []
+      this.$refs.rangeDate.resetDate(this.creatDate)
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.dealerName = ''
+      this.queryParam.bookNo = ''
+      this.queryParam.status = undefined
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 210
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
 </script>
 
-<style>
-</style>
+<style lang="less">
+  .aaccountStateBillDetail-wrap{
+    .active{
+      color: #ed1c24;
+      cursor: pointer;
+    }
+    .common{
+      color: rgba(0, 0, 0);
+    }
+  }
+</style>

+ 16 - 61
src/views/financialManagement/accountStatementBill/list.vue

@@ -17,18 +17,12 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="商户级别">
-                <dealerType id="accountStatementBill-dealerType" changeOnSelect v-model="dealerType" @change="getDealerType" allowClear></dealertype>
+                <v-select code="DEALER_LEVEL" id="accountStatementBill-dealerLevel" v-model="queryParam.dealerLevel" allowClear placeholder="请选择商户级别"></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="商户类型">
-                <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStatementBill-status"
-                  code="FINANCE_BOOK_STATE"
-                  placeholder="请选择状态"
-                  allowClear></v-select>
+                <dealerType id="accountStatementBill-dealerType" changeOnSelect v-model="dealerType" @change="getDealerType" allowClear></dealertype>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -41,7 +35,7 @@
                 <a-input id="accountStatementBill-bookNo" v-model.trim="queryParam.kdMidCustomerFnumber" allowClear placeholder="请输入财务编码"/>
               </a-form-item>
             </a-col>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align: center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="accountStatementBill-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="accountStatementBill-reset">重置</a-button>
               <a-button
@@ -73,49 +67,9 @@
           :pageSize="30"
           :defaultLoadData="false"
           bordered>
-          <!-- 单号 -->
-          <template slot="bookNo" slot-scope="text, record">
-            <span v-if="$hasPermissions('B_fc_detail')" class="link-bule" @click="handleDetail(record)">{{ record.bookNo }}</span>
-            <span v-else>{{ record.bookNo }}</span>
-          </template>
-          <!-- 操作 -->
-          <template slot="action" slot-scope="text, record">
-            <a-button
-              v-if="record.status=='WAIT_SUBMIT'"
-              size="small"
-              type="link"
-              class="button-info"
-              @click="handleEdit(record)"
-            >
-              编辑
-            </a-button>
-            <a-button
-              v-if="record.status=='WAIT_SUBMIT'"
-              size="small"
-              type="link"
-              class="button-error"
-              @click="handleDel(record)"
-            >
-              删除
-            </a-button>
-            <a-button
-              v-if="record.status=='AUDIT_REJECT'"
-              size="small"
-              type="link"
-              class="button-info"
-              @click="confront(record)"
-            >
-              对单
-            </a-button>
-            <a-button
-              v-if="record.status=='AUDIT_PASS'"
-              size="small"
-              type="link"
-              class="button-info"
-              @click="checkAcount(record)"
-            >
-              对账
-            </a-button>
+          <template slot="orderTotalAmount" slot-scope="text, record">
+            <span v-if="$hasPermissions('B_fc_detail')" class="link-bule" @click="handleDetail(record)">{{ record.orderTotalAmount }}</span>
+            <span v-else>{{ record.orderTotalAmount }}</span>
           </template>
         </s-table>
       </a-spin>
@@ -131,7 +85,7 @@ import subarea from '@/views/common/subarea.js'
 import dealerType from '@/views/common/dealerType.js'
 import customerService from '@/views/common/customerService.vue'
 export default {
-  name: 'AccountStatementList',
+  name: 'AccountStatementBillList',
   mixins: [commonMixin],
   components: { STable, VSelect, subarea, dealerType, customerService },
   data () {
@@ -180,14 +134,15 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '对账单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
-        { title: '客户名称', dataIndex: 'payerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '余额', dataIndex: 'orderTotalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
-        { title: '对单时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '对账时间', dataIndex: 'updateDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+        { title: '财务编码', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '经销商名称', dataIndex: 'payerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '经销商别名', dataIndex: 'payerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '余额', scopedSlots: { customRender: 'orderTotalAmount' }, width: '8%', align: 'center' },
+        { title: '客服', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'updateDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'updateDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户类型', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       return arr
     }