Przeglądaj źródła

调拨退货新增编辑

lilei 3 lat temu
rodzic
commit
15fe3e4ce6

+ 11 - 0
src/api/allocateBill.js

@@ -11,6 +11,17 @@ export const allocateBillList = (params) => {
     method: 'post'
   })
 }
+// 调拨退货抓单-选产品列表
+export const allocDetailQueryPageForReturn = (params) => {
+  const url = `/allocateBill/detail/queryPageForReturn/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
 // 调拨管理  新增
 export const allocateBillSave = params => {
   return axios({

+ 119 - 0
src/api/allocateReturn.js

@@ -0,0 +1,119 @@
+import { axios } from '@/utils/request'
+// 审核调拨退货
+export const allocateReturnAudit = params => {
+  return axios({
+    url: '/allocateReturn/audit',
+    data: params,
+    method: 'post'
+  })
+}
+// 删除调拨退货
+export const allocateReturnDelete = params => {
+  return axios({
+    url: `/allocateReturn/delete/${params.allocateReturnSn}`,
+    data: params,
+    method: 'post'
+  })
+}
+// 财务审核调拨退货
+export const allocateReturnFinanceAudit = params => {
+  return axios({
+    url: '/allocateReturn/financeAudit',
+    data: params,
+    method: 'post'
+  })
+}
+// 导出excel
+export const allocateReturnExcel = params => {
+  return axios({
+    url: `/allocateReturn/excel/${params.allocateReturnSn}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}
+// 打印
+export const allocateReturnPrint = params => {
+  return axios({
+    url: `/allocateReturn/print/${params.allocateReturnSn}`,
+    method: 'get'
+  })
+}
+// 查询调拨退货详情
+export const allocateReturnQueryBySn = params => {
+  return axios({
+    url: `/allocateReturn/queryBySn/${params.allocateReturnSn}`,
+    method: 'get'
+  })
+}
+// 分页查询调拨退货列表
+export const allocateReturnQueryPage = (params) => {
+  const url = `/allocateReturn/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 保存调拨退货
+export const allocateReturnSave = params => {
+  return axios({
+    url: '/allocateReturn/save',
+    data: params,
+    method: 'post'
+  })
+}
+// 提交调拨退货
+export const allocateReturnSubmit = params => {
+  return axios({
+    url: '/allocateReturn/submit',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 调拨退货品检
+export const allocateReturnCheck = params => {
+  return axios({
+    url: '/allocateReturn/check',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除调拨退货明细
+export const allocReturnDetailDelete = params => {
+  return axios({
+    url: '/allocReturnDetail/delete',
+    data: params,
+    method: 'post'
+  })
+}
+// 新增调拨退货明细
+export const allocReturnDetailInsert = params => {
+  return axios({
+    url: '/allocReturnDetail/insert',
+    data: params,
+    method: 'post'
+  })
+}
+// 分页查询调拨退货明细列表
+export const allocReturnDetailQueryPage = (params) => {
+  const url = `/allocReturnDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 更新调拨退货明细
+export const allocReturnDetailUpdate = params => {
+  return axios({
+    url: '/allocReturnDetail/update',
+    data: params,
+    method: 'post'
+  })
+}

+ 2 - 2
src/config/router.config.js

@@ -1059,7 +1059,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'editGrap/:sn/:dealerLevel',
+                path: 'editGrap/:sn/:targetType',
                 name: 'transferReturnGrpEdit',
                 component: () => import(/* webpackChunkName: "allocationManagement" */ '@/views/allocationManagement/transferReturn/editGrp.vue'),
                 meta: {
@@ -1070,7 +1070,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:sn/:dealerLevel',
+                path: 'edit/:sn/:targetType',
                 name: 'transferReturnEdit',
                 component: () => import(/* webpackChunkName: "allocationManagement" */ '@/views/allocationManagement/transferReturn/edit.vue'),
                 meta: {

+ 8 - 8
src/views/allocationManagement/transferReturn/basicInfoModal.vue

@@ -33,7 +33,7 @@
             show-search
             id="allocateBill-basicInfo-dealerName"
             v-model="form.targetSn"
-            placeholder="请选择经销商"
+            placeholder="请输入名称搜索经销商"
             :filter-option="false"
             :not-found-content="fetching ? undefined : null"
             @search="fetchUser"
@@ -44,8 +44,8 @@
           </a-select>
           <a-input v-if="!isDealer" v-model.trim="form.targetName" placeholder="请输入调拨退货对象名称(最多30个字符)" allowClear :maxLength="30" />
         </a-form-model-item>
-        <a-form-model-item label="调拨退货类型" prop="allocateTypeSn">
-          <a-select id="allocateBill-basicInfo-allocateTypeSn" v-model="form.allocateTypeSn" placeholder="请选择调拨退货类型" allowClear >
+        <a-form-model-item label="调拨退货类型" prop="allocateReturnTypeSn">
+          <a-select id="allocateBill-basicInfo-allocateReturnTypeSn" v-model="form.allocateReturnTypeSn" placeholder="请选择调拨退货类型" allowClear >
             <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
           </a-select>
         </a-form-model-item>
@@ -60,7 +60,7 @@
             placeholder="请选择"></v-select>
         </a-form-model-item>
         <a-form-model-item label="备注" prop="remark">
-          <a-textarea id="allocateBill-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
+          <a-textarea id="allocateBill-basicInfo-remark" :maxLength="120" v-model="form.remarks" placeholder="请输入备注(最多120个字符)" allowClear />
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
@@ -74,7 +74,7 @@
 <script>
 import debounce from 'lodash/debounce'
 import { VSelect } from '@/components'
-import { allocateBillSave } from '@/api/allocateBill'
+import { allocateReturnSave } from '@/api/allocateReturn'
 import { dealerSubareaScopeList } from '@/api/dealer'
 import { allocateTypeAllList } from '@/api/allocateType'
 export default {
@@ -100,7 +100,7 @@ export default {
         targetType: 'DEALER',
         targetSn: undefined,
         targetName: '',
-        allocateTypeSn: undefined,
+        allocateReturnTypeSn: undefined,
         grabFlag: '1',
         remark: ''
       },
@@ -108,7 +108,7 @@ export default {
         targetType: [{ required: true, message: '请选择调往对象', trigger: 'change' }],
         targetSn: [{ required: true, message: '请选择调往对象名称', trigger: 'change' }],
         targetName: [{ required: true, message: '请输入调往对象名称', trigger: 'blur' }],
-        allocateTypeSn: [{ required: true, message: '请选择调拨类型', trigger: 'change' }],
+        allocateReturnTypeSn: [{ required: true, message: '请选择调拨类型', trigger: 'change' }],
         grabFlag: [{ required: true, message: '请选择是否抓单', trigger: 'change' }]
       },
       fetching: false,
@@ -149,7 +149,7 @@ export default {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
           _this.spinning = true
-          allocateBillSave(form).then(res => {
+          allocateReturnSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {

+ 16 - 28
src/views/allocationManagement/transferReturn/detail.vue

@@ -15,18 +15,18 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="!outBizSn">
-          <print :params="{allocateSn: $route.params.sn || outBizSn}" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
+          <print :params="{allocateReturnSn: $route.params.sn || outBizSn}" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="3">
-              <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调拨退货类型">{{ (basicInfoData&&basicInfoData.allocateTypeName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="是否抓单">{{ basicInfoData&&basicInfoData.grabFlag ? '是' : '否' }}</a-descriptions-item>
-              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨退货类型">{{ (basicInfoData&&basicInfoData.allocateReturnTypeName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="是否抓单">{{ basicInfoData&&basicInfoData.grabFlagDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
@@ -35,10 +35,10 @@
         <!-- 总计 -->
         <a-alert type="info" style="margin-bottom:10px">
           <div slot="message">
-            退货总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
-            坏件总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
-            返库总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
-            <span >退货总金额(¥):<strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong></span>;
+            退货总数量:<strong>{{ (basicInfoData&&(basicInfoData.totalQty || basicInfoData.totalQty==0)) ? basicInfoData.totalQty : '--' }}</strong> ,
+            坏件总数量:<strong>{{ (basicInfoData&&(basicInfoData.totalBadQty || basicInfoData.totalBadQty==0)) ? basicInfoData.totalBadQty : '--' }}</strong> ,
+            返库总数量:<strong>{{ (basicInfoData&&(basicInfoData.totalBackStockQty || basicInfoData.totalBackStockQty==0)) ? basicInfoData.totalBackStockQty : '--' }}</strong> ,
+            <span>退货总金额(¥):<strong>{{ (basicInfoData&&(basicInfoData.totalPrice || basicInfoData.totalPrice==0)) ? basicInfoData.totalPrice : '--' }}</strong></span>;
           </div>
         </a-alert>
         <!-- 列表 -->
@@ -60,7 +60,7 @@
 <script>
 import { STable, VSelect } from '@/components'
 import print from './print.vue'
-import { allocateBillDetailList, allocateBillDetail, allocateBillDetailCount, allocateBillDetailPrint, allocateBillDetailExcel } from '@/api/allocateBill'
+import { allocReturnDetailQueryPage, allocateReturnQueryBySn } from '@/api/allocateReturn'
 export default {
   components: { STable, VSelect, print },
   props: {
@@ -75,7 +75,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
-        return allocateBillDetailList(Object.assign(parameter, { allocateSn: this.outBizSn || this.$route.params.sn })).then(res => {
+        return allocReturnDetailQueryPage(Object.assign(parameter, { allocateReturnSn: this.outBizSn || this.$route.params.sn })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -90,7 +90,6 @@ export default {
         })
       },
       basicInfoData: null, //  基本信息
-      productTotal: null, //  合计
       localDataSource: [],
       openModal: false,
       nowType: null
@@ -98,7 +97,7 @@ export default {
   },
   computed: {
     isEdit () {
-      return this.basicInfoData && ((this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData.state == 'WAIT_AUDIT') || (this.basicInfoData.state == 'AUDIT_REJECT')) && this.$hasPermissions('M_transferOut_edit')
+      return this.basicInfoData && ((this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData.state == 'FINANCIAL_REJECT') || (this.basicInfoData.state == 'AUDIT_REJECT')) && this.$hasPermissions('M_transferOut_edit')
     },
     columns () {
       const arr = [
@@ -113,7 +112,7 @@ export default {
         { title: '退货金额(¥)', dataIndex: 'totalPrice', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
 
-      if (this.basicInfoData && this.basicInfoData.grapFlag == '1') {
+      if (this.basicInfoData && this.basicInfoData.grabFlag == '1') {
         arr.splice(1, 0, { title: '调拨单号', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       return arr
@@ -126,7 +125,7 @@ export default {
     },
     // 基本信息
     getDetail () {
-      allocateBillDetail({ sn: this.outBizSn || this.$route.params.sn }).then(res => {
+      allocateReturnQueryBySn({ allocateReturnSn: this.outBizSn || this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
         } else {
@@ -134,24 +133,13 @@ export default {
         }
       })
     },
-    // 合计
-    getDetailCount () {
-      allocateBillDetailCount({ allocateSn: this.outBizSn || this.$route.params.sn }).then(res => {
-        if (res.status == 200) {
-          this.productTotal = res.data
-        } else {
-          this.productTotal = null
-        }
-      })
-    },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ name: row.grapFlag == 1 ? 'transferReturnGrpEdit' : 'transferReturnEdit', params: { sn: row.allocateSn, dealerLevel: row.dealerLevel } })
+      this.$router.push({ name: row.grapFlag == 1 ? 'transferReturnGrpEdit' : 'transferReturnEdit', params: { sn: row.allocateReturnSn, targetType: row.targetType } })
     },
     pageInit () {
       this.$refs.table.refresh(true)
       this.getDetail()
-      this.getDetailCount()
     }
   },
   mounted () {

+ 78 - 87
src/views/allocationManagement/transferReturn/editGrp.vue

@@ -9,21 +9,21 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
-          <print :params="{allocateSn: $route.params.sn}" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
+          <print :params="{allocateReturnSn: $route.params.sn}" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" v-if="basicInfoData" class="editGrap-cont">
         <a-collapse :activeKey="['0']">
           <a-collapse-panel key="0" header="基础信息">
             <a-descriptions :column="3">
-              <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.allocateReturnTypeName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨退货类型">
-                <AllocateType id="allocateEdit-allocateTypeSn" style="width: 200px;" @change="changeAllocateType" v-model="basicInfoData.allocateTypeSn"></AllocateType>
+                <AllocateType id="allocateEdit-allocateReturnTypeSn" style="width: 200px;" @change="changeAllocateType" v-model="basicInfoData.allocateReturnTypeSn"></AllocateType>
               </a-descriptions-item>
-              <a-descriptions-item label="是否抓单">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="是否抓单">{{ (basicInfoData&&basicInfoData.grabFlagDictValue) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="备注">
-                {{ (basicInfoData&&basicInfoData.remark) }}
+                {{ (basicInfoData&&basicInfoData.remarks) }}
                 <a-icon type="form" title="编辑备注" @click="editRemark = true" style="color: dodgerblue;font-size: 14px;" />
               </a-descriptions-item>
             </a-descriptions>
@@ -39,8 +39,8 @@
               <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="调拨单号" prop="productOrigCode">
-                      <a-input id="editGrap-productOrigCode" v-model.trim="queryParam.productOrigCode" placeholder="请输入调拨单号" allowClear />
+                    <a-form-item label="调拨单号" prop="allocateNo">
+                      <a-input id="editGrap-allocateNo" v-model.trim="queryParam.allocateNo" placeholder="请输入调拨单号" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
@@ -89,7 +89,14 @@
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="editGrap-add-btn">添加</a-button>
+                <a-button
+                  size="small"
+                  v-if="record.refundableQty"
+                  type="link"
+                  class="button-primary"
+                  @click="handleAdd(record)"
+                  id="editGrap-add-btn">添加</a-button>
+                <span v-else>--</span>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -102,8 +109,8 @@
             <!-- 总计 -->
             <a-alert type="info" style="margin-bottom:10px">
               <div slot="message">
-                退货总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
-                <span v-if="$hasPermissions('B_isShowPrice')">退货总金额(¥):<strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong></span>
+                退货总数量:<strong>{{ (basicInfoData&&(basicInfoData.totalQty || basicInfoData.totalQty==0)) ? basicInfoData.totalQty : '--' }}</strong> ,
+                <span v-if="$hasPermissions('B_isShowPrice')">退货总金额(¥):<strong>{{ (basicInfoData&&(basicInfoData.totalPrice || basicInfoData.totalPrice==0)) ? basicInfoData.totalPrice : '--' }}</strong></span>
               </div>
             </a-alert>
             <!-- 筛选条件 -->
@@ -152,7 +159,7 @@
               <template slot="returnPrice" slot-scope="text, record">
                 <a-input-number
                   size="small"
-                  v-model="record.returnPrice"
+                  v-model="record.price"
                   @blur="e => priceChange(e.target.value, record)"
                   :precision="2"
                   :min="0"
@@ -162,7 +169,7 @@
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="editGrap-del-btn">删除</a-button>
+                <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="editGrap-del-btn">删除</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -181,7 +188,7 @@
         style="padding: 0 60px;">提交</a-button>
     </div>
     <!-- 导入产品 -->
-    <!-- <importGuideModal :openModal="openGuideModal" :params="{allocateSn: $route.params.sn}" @close="openGuideModal=false" @ok="handleGuideOk" /> -->
+    <!-- <importGuideModal :openModal="openGuideModal" :params="{allocateReturnSn: $route.params.sn}" @close="openGuideModal=false" @ok="handleGuideOk" /> -->
     <!-- 修改基础信息 -->
     <a-modal
       centered
@@ -194,7 +201,7 @@
       @cancle="editRemark = false"
       :width="600">
       <a-textarea
-        v-model="basicInfoData.remark"
+        v-model="basicInfoData.remarks"
         placeholder="请输入备注(最多120个字符)"
         :maxLength="120"
         :auto-size="{ minRows: 3, maxRows: 5 }"
@@ -211,9 +218,18 @@
 import { STable, VSelect } from '@/components'
 // import ImportGuideModal from './importGuideModal.vue'
 import print from './print.vue'
-import { queryStockProductPage } from '@/api/stock'
+import { allocDetailQueryPageForReturn } from '@/api/allocateBill'
 import AllocateType from '@/views/common/allocateType.js'
-import { allocateBillSave, allocateBillDetailList, allocateBillDetailCount, allocateBillDetail, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillBatchInsert } from '@/api/allocateBill'
+import {
+  allocateReturnSave,
+  allocReturnDetailQueryPage,
+  allocateReturnQueryBySn,
+  allocReturnDetailInsert,
+  allocReturnDetailUpdate,
+  allocateReturnSubmit,
+  allocReturnDetailDelete
+  // allocateBillBatchInsert
+} from '@/api/allocateReturn'
 
 export default {
   components: { STable, VSelect, AllocateType, print },
@@ -223,7 +239,7 @@ export default {
       queryParam: {
         productCode: '',
         productName: '',
-        productOrigCode: ''
+        allocateNo: ''
       },
       chooseQueryParam: {
         productCode: '',
@@ -241,12 +257,13 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        const dealerLevel = this.$route.params.dealerLevel == 'OTHER' ? undefined : this.$route.params.dealerLevel
-        return queryStockProductPage(Object.assign(parameter, this.queryParam, { zeroQtyFlag: '0', dealerLevel: dealerLevel })).then(res => {
+        const otherParams = { allocateBill: { targetType: this.$route.params.targetType, targetSn: this.basicInfoData.targetSn } }
+        return allocDetailQueryPageForReturn(Object.assign(parameter, this.queryParam, otherParams)).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
+            data.list[i].returnPrice = data.list[i].price
           }
           this.loadDataSource = data.list || []
           this.disabled = false
@@ -258,14 +275,12 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       chooseLoadData: parameter => {
         this.chooseDisabled = true
-        const params = Object.assign(parameter, this.chooseQueryParam, { allocateSn: this.$route.params.sn })
-        return allocateBillDetailList(params).then(res => {
-          this.getDetailCount()
+        const params = Object.assign(parameter, this.chooseQueryParam, { allocateReturnSn: this.$route.params.sn })
+        return allocReturnDetailQueryPage(params).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
-            data.list[i].qtyBackups = data.list[i].qty
             data.list[i].priceBackups = data.list[i].price
           }
           this.localDataSource = data.list || []
@@ -273,7 +288,6 @@ export default {
           return data
         })
       },
-      productTotal: null, //  合计
       basicInfoData: null, // 基本信息
       openGuideModal: false //  导入产品引导
     }
@@ -282,13 +296,13 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '调拨单号', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨单号', dataIndex: 'allocateNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'productUnit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨单价', dataIndex: 'lastStockCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调拨数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '剩余可退数量', dataIndex: 'productPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调拨单价', dataIndex: 'price', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调拨数量', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '剩余可退数量', dataIndex: 'refundableQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退货单价', scopedSlots: { customRender: 'returnPrice' }, width: '10%', align: 'center' },
         { title: '退货数量', dataIndex: 'returnQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
@@ -298,16 +312,13 @@ export default {
     chooseColumns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '调拨单号', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨单价', dataIndex: 'lastStockCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调拨数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '剩余可退数量', dataIndex: 'productPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调拨单号', dataIndex: 'allocateNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货单价', scopedSlots: { customRender: 'returnPrice' }, width: '10%', align: 'center' },
         { title: '退货数量', dataIndex: 'returnQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货金额', dataIndex: 'returnAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货金额', dataIndex: 'totalReturnPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       return arr
@@ -318,14 +329,7 @@ export default {
     handleEditRemark () {
       const _this = this
       const params = _this.basicInfoData
-      allocateBillSave({
-        allocateSn: params.allocateSn,
-        targetType: params.targetType,
-        targetSn: params.targetSn,
-        targetName: params.targetName,
-        allocateTypeSn: params.allocateTypeSn,
-        remark: params.remark
-      }).then(res => {
+      allocateReturnSave(params).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.getDetail()
@@ -351,7 +355,7 @@ export default {
     resetSearchForm () {
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
-      this.queryParam.productOrigCode = ''
+      this.queryParam.allocateNo = ''
       this.$refs.table.refresh(true)
     },
     // 双击快速添加
@@ -364,14 +368,14 @@ export default {
         }
       }
     },
-    // 导入产品
-    handleGuideOk (obj) {
-      allocateBillBatchInsert(obj).then(res => {
-        if (res.status == 200) {
-          this.$refs.chooseTable.refresh(true)
-        }
-      })
-    },
+    // // 导入产品
+    // handleGuideOk (obj) {
+    //   allocateBillBatchInsert(obj).then(res => {
+    //     if (res.status == 200) {
+    //       this.$refs.chooseTable.refresh(true)
+    //     }
+    //   })
+    // },
     // 已选产品  重置
     chooseResetSearchForm () {
       this.chooseQueryParam.productCode = ''
@@ -381,26 +385,22 @@ export default {
     //  添加/编辑
     handleAdd (row, isEdit, isRefresh) {
       const params = {
-        id: isEdit ? row.id : undefined,
-        allocateSn: this.$route.params.sn,
-        cost: isEdit ? row.cost : row.lastStockCost,
-        price: isEdit ? row.price : row.productPrice,
-        qty: isEdit ? row.qty : 1, //  添加时调出数量默认为1
-        productSn: row.productSn
+        allocateReturnSn: this.$route.params.sn,
+        productSn: row.productSn,
+        price: isEdit ? row.price : row.returnPrice,
+        allocateNo: row.allocateNo,
+        allocateSn: row.allocateSn
       }
+      const fun = isEdit ? allocReturnDetailUpdate : allocReturnDetailInsert
       if (isEdit) { // 编辑
-        // 清空数量时,值应保持未清空前的值,因数量不可为空
-        if (!row.qty) {
-          row.qty = row.qtyBackups
-          return
-        }
         if (!row.price) {
           row.price = row.priceBackups
           return
         }
       }
+      console.log(isEdit)
       this.spinning = true
-      allocateBillDetailSave(params).then(res => {
+      fun(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           if (isRefresh != 'noRefresh') {
@@ -410,6 +410,7 @@ export default {
           this.spinning = false
         } else {
           this.spinning = false
+          row.price = row.priceBackups
         }
       })
     },
@@ -423,14 +424,14 @@ export default {
         centered: true,
         onOk () {
           if (isAll) { //  整单删除
-            allocateBillDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
-              if (res.status == 200) {
-                _this.$message.success(res.message)
-                _this.refashPage()
-              }
-            })
+            // allocReturnDetailDeleteAll({ sn: _this.$route.params.sn }).then(res => {
+            //   if (res.status == 200) {
+            //     _this.$message.success(res.message)
+            //     _this.refashPage()
+            //   }
+            // })
           } else { //  单个删除
-            allocateBillDetailDel({ id: row.id }).then(res => {
+            allocReturnDetailDelete({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
                 _this.refashPage()
@@ -444,7 +445,7 @@ export default {
     handleSubmit () {
       const _this = this
       _this.spinning = true
-      allocateBillSubmit({ sn: this.$route.params.sn }).then(res => {
+      allocateReturnSubmit({ allocateReturnSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           setTimeout(() => {
@@ -459,25 +460,16 @@ export default {
     // 基本信息
     getDetail () {
       this.spinning = true
-      allocateBillDetail({ sn: this.$route.params.sn }).then(res => {
+      allocateReturnQueryBySn({ allocateReturnSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
+          this.resetSearchForm()
         } else {
           this.basicInfoData = null
         }
         this.spinning = false
       })
     },
-    // 合计
-    getDetailCount () {
-      allocateBillDetailCount({ allocateSn: this.$route.params.sn }).then(res => {
-        if (res.status == 200) {
-          this.productTotal = res.data
-        } else {
-          this.productTotal = null
-        }
-      })
-    },
     //  返回列表
     handleBack () {
       this.$router.push({ name: 'transferReturnList', query: { closeLastOldTab: true } })
@@ -485,8 +477,8 @@ export default {
     // 已选产品 退货单价  change
     priceChange (val, record) {
       //  光标移出,值发生改变再调用编辑接口
-      if (val != record.priceBackups) {
-        this.handleAdd(record, 'edit', 'noRefresh')
+      if (Number(val) != Number(record.priceBackups)) {
+        this.handleAdd(record, true, 'noRefresh')
       }
     },
     // 刷新当前页面
@@ -496,7 +488,6 @@ export default {
     },
     pageInit () {
       this.getDetail()
-      this.resetSearchForm()
       this.chooseResetSearchForm()
     }
   },

+ 46 - 40
src/views/allocationManagement/transferReturn/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="调拨退货单号">
-                <a-input id="transferReturn-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨退货单号"/>
+                <a-input id="transferReturn-allocateReturnNo" v-model.trim="queryParam.allocateReturnNo" allowClear placeholder="请输入调拨退货单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -21,8 +21,8 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="调拨退货对象类型">
-                <AllocateType id="transferReturn-allocateTypeSn" v-model="queryParam.allocateTypeSn"></AllocateType>
+              <a-form-item label="调拨退货类型">
+                <AllocateType id="transferReturn-allocateReturnTypeSn" v-model="queryParam.allocateReturnTypeSn"></AllocateType>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -32,7 +32,7 @@
                     v-model="queryParam.state"
                     ref="state"
                     id="transferReturn-state"
-                    code="ALLOCATE_STATUS"
+                    code="ALLOCATE_RETURN_STATE"
                     placeholder="请选择业务状态"
                     allowClear
                   ></v-select>
@@ -42,7 +42,7 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="transferReturn-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="transferReturn-reset">重置</a-button>
-              <a-button
+              <!-- <a-button
                 style="margin-left: 5px"
                 type="primary"
                 class="button-warning"
@@ -50,7 +50,7 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="transferReturn-export">导出</a-button>
+                id="transferReturn-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -76,8 +76,8 @@
         :scroll="{ y: tableHeight }"
         bordered>
         <!-- 单号 -->
-        <template slot="allocateNo" slot-scope="text, record">
-          <span :class="$hasPermissions('M_transferOut_detail')?'active':'common'" @click="handleDetail(record)">{{ record.allocateNo }}</span>
+        <template slot="allocateReturnNo" slot-scope="text, record">
+          <span :class="$hasPermissions('M_transferOut_detail')?'active':'common'" @click="handleDetail(record)">{{ record.allocateReturnNo }}</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -92,41 +92,43 @@
             size="small"
             type="link"
             class="button-warning"
+            v-if="record.state=='WAIT_CHECK'"
             @click="handleCheck(record)"
             id="transferReturn-examine-btn">品检</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')) && $hasPermissions('M_transferOut_edit')"
+            v-if="((record.state == 'WAIT_SUBMIT') || (record.state == 'FINANCIAL_REJECT') || (record.state == 'AUDIT_REJECT')) && $hasPermissions('M_transferOut_edit')"
             class="button-info"
             @click="handleEdit(record)"
             id="transferReturn-edit-btn">编辑</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')) && $hasPermissions('B_transferOut_del')"
+            v-if="((record.state == 'WAIT_SUBMIT') || (record.state == 'FINANCIAL_REJECT') || (record.state == 'AUDIT_REJECT')) && $hasPermissions('B_transferOut_del')"
             class="button-error"
             @click="handleDel(record)"
             id="transferReturn-del-btn">删除</a-button>
-          <span v-if="((record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT') && (record.state != 'AUDIT_REJECT'))||(!$hasPermissions('B_transferOut_audit') && !$hasPermissions('M_transferOut_edit') && !$hasPermissions('B_transferOut_del'))">--</span>
+          <!-- 带财务确认或已完结 -->
+          <span v-if="record.state == 'WAIT_FINANCIAL_AUDIT'||record.state == 'FINISH'">--</span>
         </template>
       </s-table>
     </a-spin>
     <!-- 新增 -->
     <basic-info-modal :openModal="openModal" @ok="handleEdit" @close="openModal=false" />
     <!-- 审核 -->
-    <auditModal :openModal="visibleAudit" :spinning="spinningAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_OUT_WAREHOUSE')" @fail="auditOrder('AUDIT_REJECT')" />
+    <auditModal :openModal="visibleAudit" :spinning="spinningAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_CHECK')" @fail="auditOrder('AUDIT_REJECT')" />
   </a-card>
 </template>
 
 <script>
-import moment from 'moment'
-import getDate from '@/libs/getDate.js'
+// import moment from 'moment'
+// import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import auditModal from '@/views/common/auditModal.vue'
-import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
+import { allocateReturnQueryPage, allocateReturnAudit, allocateReturnDelete, allocateReturnExport } from '@/api/allocateReturn'
 import AllocateType from '@/views/common/allocateType.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 export default {
@@ -137,16 +139,18 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       time: [
-        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+        // moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        // moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
       ],
       queryParam: { //  查询条件
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        // beginDate: getDate.getThreeMonthDays().starttime,
+        // endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: '',
+        endDate: '',
         targetName: '', //  调往对象
-        allocateTypeSn: undefined, //  调拨类型
+        allocateReturnTypeSn: undefined, //  调拨退货类型
         state: undefined, //  业务状态
-        allocateNo: '' //  调拨单号
+        allocateReturnNo: '' //  调拨单号
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -154,7 +158,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return allocateBillList(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
@@ -180,15 +184,15 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨退货单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '13.5%' },
-        { title: '调拨退货对象类型', dataIndex: 'allocateTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨退货对象名称', dataIndex: 'targetName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '调拨退货类型', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '是否抓单', dataIndex: 'grapFlagDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨退货单号', scopedSlots: { customRender: 'allocateReturnNo' }, align: 'center', width: '8%' },
+        { title: '调拨退货对象类型', dataIndex: 'targetTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨退货对象名称', dataIndex: 'targetName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨退货类型', dataIndex: 'allocateReturnTypeName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '是否抓单', dataIndex: 'grabFlagDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '坏件数量', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '坏件数量', dataIndex: 'totalBadQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '返库数量', dataIndex: 'printCount1', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货总金额', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货总金额', dataIndex: 'totalBackStockQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
@@ -204,13 +208,15 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.$refs.rangeDate.resetDate('')
+      // this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      // this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
       this.queryParam.targetName = ''
-      this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined
-      this.queryParam.allocateNo = ''
+      this.queryParam.allocateReturnNo = ''
+      this.queryParam.allocateReturnTypeSn = undefined
       this.$refs.table.refresh(true)
     },
     //  删除
@@ -222,7 +228,7 @@ export default {
         centered: true,
         onOk () {
           _this.spinning = true
-          allocateBillDel({ sn: row.allocateSn }).then(res => {
+          allocateReturnDelete({ allocateReturnSn: row.allocateReturnSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
@@ -243,7 +249,7 @@ export default {
     auditOrder (state) {
       const _this = this
       _this.spinningAudit = true
-      allocateBillAudit({ sn: this.auditInfo.allocateSn, state: state }).then(res => {
+      allocateReturnAudit({ allocateReturnSn: this.auditInfo.allocateReturnSn, state: state }).then(res => {
         if (res.status == 200) {
           _this.visibleAudit = false
           _this.$message.success(res.message)
@@ -258,16 +264,16 @@ export default {
     //  详情
     handleDetail (row) {
       if (this.$hasPermissions('M_transferOut_detail')) {
-        this.$router.push({ name: 'transferReturnDetail', params: { sn: row.allocateSn } })
+        this.$router.push({ name: 'transferReturnDetail', params: { sn: row.allocateReturnSn } })
       }
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ name: row.grapFlag == 1 ? 'transferReturnGrpEdit' : 'transferReturnEdit', params: { sn: row.allocateSn, dealerLevel: row.dealerLevel } })
+      this.$router.push({ name: row.grabFlag == 1 ? 'transferReturnGrpEdit' : 'transferReturnEdit', params: { sn: row.allocateReturnSn, targetType: row.targetType, targetTypeSn: row.targetTypeSn } })
     },
     // 品检
     handleCheck (row) {
-      this.$router.push({ name: 'transferReturnCheck', params: { sn: row.allocateSn, grapFlag: row.grapFlag } })
+      this.$router.push({ name: 'transferReturnCheck', params: { sn: row.allocateReturnSn, grapFlag: row.grabFlag } })
     },
     //  导出
     handleExport () {
@@ -275,7 +281,7 @@ export default {
       const params = this.queryParam
       this.exportLoading = true
       this.spinning = true
-      hdExportExcel(allocateBillExport, params, '调拨列表', function () {
+      hdExportExcel(allocateReturnExport, params, '调拨退货列表', function () {
         _this.exportLoading = false
         _this.spinning = false
       })

+ 5 - 4
src/views/allocationManagement/transferReturn/print.vue

@@ -15,6 +15,7 @@
       id="editGrap-dbfl-print-btn"
       :disabled="disabled"
       @click="handlePrint('print')">快捷打印</a-button>
+    <a-divider type="vertical" />
     <a-button
       key="3"
       type="primary"
@@ -30,7 +31,7 @@
 
 <script>
 import { hdExportExcel } from '@/libs/exportExcel'
-import { allocateBillDetailExcel, allocateBillDetailPrint } from '@/api/allocateBill'
+import { allocateReturnExcel, allocateReturnPrint } from '@/api/allocateReturn'
 export default {
   props: {
     params: {
@@ -48,11 +49,11 @@ export default {
     handlePrint (type) {
       const _this = this
       const params = {
-        allocateSn: this.params.allocateSn || '',
+        allocateReturnSn: this.params.allocateReturnSn || '',
         printType: 'ALLOCATE_BILL'
       }
       this.$emit('loading')
-      allocateBillDetailPrint(params).then(res => {
+      allocateReturnPrint(params).then(res => {
         _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
@@ -87,7 +88,7 @@ export default {
     handleExcel () {
       const _this = this
       this.$emit('loading')
-      hdExportExcel(allocateBillDetailExcel, { allocateSn: this.params.allocateSn || '' }, '调拨退货单明细', function () {
+      hdExportExcel(allocateReturnExcel, { allocateReturnSn: this.params.allocateReturnSn || '' }, '调拨退货单明细', function () {
         _this.$emit('unloading')
       })
     }