Bläddra i källkod

财务退货确认

lilei 3 år sedan
förälder
incheckning
bc405cf835
1 ändrade filer med 34 tillägg och 36 borttagningar
  1. 34 36
      src/views/financialManagement/allocateReturnConfirmation/list.vue

+ 34 - 36
src/views/financialManagement/allocateReturnConfirmation/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-card size="small" :bordered="false" class="returnConfirmationList-wrap">
+  <a-card size="small" :bordered="false" class="transferReturnConfirmation-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
@@ -11,13 +11,13 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="returnConfirmationList-buyerSn" @change="custChange" />
+              <a-form-item label="调拨退货单号">
+                <a-input id="transferReturnConfirmation-allocateReturnNo" v-model.trim="queryParam.allocateReturnNo" allowClear placeholder="请输入调拨退货单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="调拨退货单号">
-                <a-input id="returnConfirmationList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入销退单号"/>
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <a-input id="transferReturnConfirmation-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入客户名称"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -26,7 +26,7 @@
                   <v-select
                     v-model="queryParam.grabFlag"
                     ref="grabFlag"
-                    id="returnConfirmationList-grabFlag"
+                    id="transferReturnConfirmation-grabFlag"
                     code="FLAG"
                     placeholder="请选择"
                     allowClear></v-select>
@@ -37,16 +37,16 @@
                   <v-select
                     v-model="queryParam.billStatus"
                     ref="billStatus"
-                    id="returnConfirmationList-billStatus"
-                    code="SALES_RETURN_CONFIRM_STATUS"
+                    id="transferReturnConfirmation-billStatus"
+                    code="ALLOCATE_RETURN_STATE"
                     placeholder="请选择状态"
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="returnConfirmationList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnConfirmationList-reset">重置</a-button>
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="transferReturnConfirmation-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="transferReturnConfirmation-reset">重置</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -68,9 +68,9 @@
         :defaultLoadData="false"
         bordered>
         <!-- 销退单号 -->
-        <template slot="salesReturnBillNo" slot-scope="text, record">
-          <a-button v-if="$hasPermissions('B_returnConfirmation_detail')" size="small" type="link" class="button-info" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</a-button>
-          <span v-else>{{ record.salesReturnBillNo }}</span>
+        <template slot="allocateReturnNo" slot-scope="text, record">
+          <a-button v-if="$hasPermissions('B_returnConfirmation_detail')" size="small" type="link" class="button-info" @click="handleDetail(record)">{{ record.allocateReturnNo }}</a-button>
+          <span v-else>{{ record.allocateReturnNo }}</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -80,7 +80,7 @@
             v-if="record.billStatus=='WAIT_FINANCIAL_AUDIT' && $hasPermissions('B_returnConfirmation_return')"
             class="button-warning"
             @click="handleAudit(record)"
-            id="returnConfirmationList-audit-btn">退货确认</a-button>
+            id="transferReturnConfirmation-audit-btn">退货确认</a-button>
           <span v-else>--</span>
         </template>
       </s-table>
@@ -94,13 +94,12 @@
 import { commonMixin } from '@/utils/mixin'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import AllocateReturnDetailModal from './detailModal.vue'
-import { salesReturnFinancialList, salesReturnFinancial } from '@/api/salesReturn'
+import { allocateReturnQueryPage, allocateReturnFinanceAudit } from '@/api/allocateReturn'
 export default {
   name: 'AllocateReturnConfirmationList',
   mixins: [commonMixin],
-  components: { STable, VSelect, AllocateReturnDetailModal, dealerSubareaScopeList, rangeDate },
+  components: { STable, VSelect, AllocateReturnDetailModal, rangeDate },
   data () {
     return {
       spinning: false,
@@ -108,8 +107,8 @@ export default {
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
-        salesReturnBillNo: '', //  单号
-        buyerSn: undefined,
+        allocateReturnNo: '', //  单号
+        targetName: '',
         grabFlag: undefined,
         billStatus: undefined //  状态
       },
@@ -119,7 +118,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return salesReturnFinancialList(Object.assign(parameter, this.queryParam)).then(res => {
+        return allocateReturnQueryPage(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -142,20 +141,20 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间1', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '16%', align: 'center' },
-        { title: '调拨退货客户', dataIndex: 'buyerName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货单号', scopedSlots: { customRender: 'allocateReturnNo' }, width: '16%', align: 'center' },
+        { title: '调拨退货客户', dataIndex: 'targetName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '是否抓单', dataIndex: 'grabFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货总数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '坏件数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '返库数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '退货总金额', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '确认时间', dataIndex: 'confirmTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '坏件数量', dataIndex: 'totalBadQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '返库数量', dataIndex: 'totalBackStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '退货总金额', dataIndex: 'totalReturnPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '确认时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(8, 0, { title: '退货总金额', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(8, 0, { title: '退货总金额', dataIndex: 'totalReturnPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }
@@ -174,17 +173,16 @@ export default {
       this.$refs.rangeDate.resetDate()
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.salesReturnBillNo = ''
-      this.queryParam.buyerSn = undefined
+      this.queryParam.allocateReturnNo = ''
+      this.queryParam.targetName = ''
       this.queryParam.grabFlag = undefined
       this.queryParam.billStatus = undefined
-      this.$refs.dealerSubareaScopeList.resetForm()
       this.$refs.table.refresh(true)
     },
     // 详情
     handleDetail (row) {
       if (!this.$hasPermissions('B_returnConfirmation_detail')) { return }
-      this.itemSn = row.salesReturnBillSn
+      this.itemSn = row.allocateReturnSn
       this.openModal = true
     },
     closeModal () {
@@ -202,11 +200,11 @@ export default {
         okText: '通过',
         cancelText: '不通过',
         onOk () {
-          _this.auditOrder(row.salesReturnBillSn, 'FINISH')
+          _this.auditOrder(row.allocateReturnSn, 'FINISH')
         },
         onCancel (e) {
           if (!e.triggerCancel) {
-            _this.auditOrder(row.salesReturnBillSn, 'FINANCIAL_REJECT')
+            _this.auditOrder(row.allocateReturnSn, 'FINANCIAL_REJECT')
           }
           _this.$destroyAll()
         }
@@ -215,7 +213,7 @@ export default {
     auditOrder (sn, flag) {
       const _this = this
       _this.spinning = true
-      salesReturnFinancial({ salesReturnBillSn: sn, billStatus: flag }).then(res => {
+      allocateReturnFinanceAudit({ allocateReturnSn: sn, billStatus: flag }).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$refs.table.refresh()
@@ -272,7 +270,7 @@ export default {
 </script>
 
 <style lang="less">
-  .returnConfirmationList-wrap{
+  .transferReturnConfirmation-wrap{
     .active{
       color: #ed1c24;
       cursor: pointer;