Browse Source

新页面

lilei 3 years ago
parent
commit
db245c63de

+ 9 - 13
src/config/router.config.js

@@ -555,7 +555,6 @@ export const asyncRouterMap = [
                    title: '编辑销售退货(抓单)',
                    icon: 'fund',
                    hidden: true
-                   // permission: 'M_salesReturnGrabEdit'
                  }
                },
                {
@@ -566,21 +565,18 @@ export const asyncRouterMap = [
                    title: '编辑销售退货(不抓单)',
                    icon: 'fund',
                    hidden: true
-                   // permission: 'M_salesReturnEdit'
                  }
                },
                {
-                 path: 'check/:sn',
-                 name: 'salesReturnCheck',
-                 component: () => import(/* webpackChunkName: "salesReturnManagement" */ '@/views/salesReturnManagement/salesReturn/salesReturnCheck.vue'),
+                 path: 'custConfirm/:sn',
+                 name: 'custConfirm',
+                 component: () => import(/* webpackChunkName: "salesReturnManagement" */ '@/views/salesReturnManagement/custConfirm/list.vue'),
                  meta: {
-                   title: '销售退货品检',
+                   title: '客服确认',
                    icon: 'fund',
-                   replaceTab: true,
                    hidden: true
-                   // permission: 'M_salesReturnCheck'
                  }
-               }
+               },
              ]
            },
            {
@@ -687,8 +683,8 @@ export const asyncRouterMap = [
                  }
                },
                {
-                 path: 'receiving',
-                 name: 'receiving',
+                 path: 'receiving/:sn',
+                 name: 'salesReturnReceiving',
                  component: () => import(/* webpackChunkName: "salesReturnManagement" */ '@/views/salesReturnManagement/receiveCheck/receiving.vue'),
                  meta: {
                    title: '收货',
@@ -697,8 +693,8 @@ export const asyncRouterMap = [
                  }
                },
                {
-                 path: 'checking',
-                 name: 'checking',
+                 path: 'checking/:sn',
+                 name: 'salesReturnCheck',
                  component: () => import(/* webpackChunkName: "salesReturnManagement" */ '@/views/salesReturnManagement/receiveCheck/checking.vue'),
                  meta: {
                    title: '品检',

+ 7 - 9
src/views/salesReturnManagement/billOfLading/detail.vue

@@ -1,14 +1,13 @@
 <template>
   <div class="billOfLadingEdit-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="billOfLadingEdit-cont" >
+      <a-page-header :ghost="false" :backIcon="false" class="billOfLadingEdit-header" >
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="billOfLadingEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
       </a-page-header>
       <a-form-model
-        id="billOfLadingEdit-form"
         ref="ruleForm"
         :model="form"
         :rules="rules"
@@ -226,14 +225,13 @@ export default {
   .billOfLadingEdit-wrap{
     position: relative;
     height: 100%;
-    padding-bottom: 51px;
-    box-sizing: border-box;
-    >.ant-spin-nested-loading{
-      overflow-y: scroll;
-      height: 100%;
-    }
+    background-color:#fff;
     .billOfLadingEdit-cont{
-      margin-bottom: 10px;
+      height:100%;
+      overflow: auto;
+    }
+    .billOfLadingEdit-header{
+      border-bottom: 5px solid #f8f8f8;
     }
     .affix{
       .ant-affix{

+ 70 - 23
src/views/salesReturnManagement/salesReturn/salesReturnCheck.vue → src/views/salesReturnManagement/custConfirm/list.vue

@@ -1,16 +1,30 @@
 <template>
-  <div class="salesReturnCheck-wrap">
+  <div class="custConfirm-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="salesReturnCheck-back" >
+      <a-page-header :ghost="false" :backIcon="false" class="custConfirm-back" >
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
-          <a id="salesReturnCheck-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a id="custConfirm-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
         </template>
       </a-page-header>
-      <a-card size="small" :bordered="false" class="salesReturnCheck-cont">
-        <div>
-          <a-button type="primary" :loading="loading" class="button-error" @click="backStock">批量返库</a-button>
+      <a-card size="small" :bordered="false" class="custConfirm-cont">
+        <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-form-item label="产品编码" prop="productCode">
+            <a-input id="custConfirm-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+          </a-form-item>
+          <a-form-item label="产品名称" prop="productName">
+            <a-input id="custConfirm-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+          </a-form-item>
+          <a-form-item>
+            <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="custConfirm-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="custConfirm-reset">重置</a-button>
+          </a-form-item>
+        </a-form>
+        <div style="border-top:1px solid #eee;padding-top:10px;">
+          <a-button type="primary" :loading="loading" class="button-info" @click="handleAdd">新增产品</a-button>
+          <a-button type="primary" :loading="loading" class="button-error" @click="handlePlss">批量设置退货单价</a-button>
+          <div style="float:right;color:#999;margin-top:8px;">说明:红色行表示收货时新增的产品;黄色表示客服确认时新增的产品</div>
         </div>
         <!-- 已选配件列表 -->
         <s-table
@@ -26,7 +40,7 @@
           :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
           bordered>
-          <!-- 返库数量 -->
+          <!-- 仓库实收数量 -->
           <template slot="backStockQty" slot-scope="text, record">
             <a-input-number
               id="salesReturn-backStockQty"
@@ -39,6 +53,25 @@
               @blur="e => onCellBlur(e.target.value, record)"
               style="width: 100%;" />
           </template>
+          <!-- 退货原因 -->
+          <template slot="returnYy" slot-scope="text, record">
+            <v-select
+              style="width:100%;"
+              v-model="queryParam.billStatus"
+              ref="billStatus"
+              code="SALES_RETURN_BILL_STATUS"
+              placeholder="请选择业退货原因"
+              allowClear></v-select>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="handleDel(record)"
+              id="salesReturn-eexamine-btn">删除</a-button>
+          </template>
         </s-table>
       </a-card>
     </a-spin>
@@ -50,7 +83,7 @@
         type="primary"
         class="button-primary"
         @click="handleSubmit()"
-        id="salesReturn-handleSubmit">提交</a-button>
+        id="salesReturn-handleSubmit">审核通过</a-button>
     </div>
   </div>
 </template>
@@ -107,7 +140,11 @@ export default {
           return data
         })
       },
-      rowSelectionInfo: null
+      rowSelectionInfo: null,
+      queryParam: {
+        productCode: '',
+        productName: ''
+      }
     }
   },
   computed: {
@@ -116,15 +153,18 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', width: '23%', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '退货数量', dataIndex: 'qty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '坏件数量', dataIndex: 'badQty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '返库数量', dataIndex: 'backStockQty', width: '10%', align: 'center', scopedSlots: { customRender: 'backStockQty' } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
-        // { title: '售价', dataIndex: 'price', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '申请退货数量', dataIndex: 'qty', align: 'center', width: '10%', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '仓库实收数量', dataIndex: 'qty', align: 'center', width: '10%', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '坏件数量', dataIndex: 'qty', align: 'center', width: '10%', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '良品数量', dataIndex: 'qty', align: 'center', width: '10%', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '返库数量', dataIndex: 'qty', align: 'center', width: '10%', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '实际退货单价', dataIndex: 'badQty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '实际退货金额', dataIndex: 'badQty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货单价说明', dataIndex: 'backStockQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '退货原因', dataIndex: 'backStockQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
-      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(7, 0, { title: '售价', dataIndex: 'price', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-      }
       return arr
     }
   },
@@ -135,10 +175,18 @@ export default {
     },
     //  返回
     handleBack () {
-      this.$router.push({ path: '/salesManagement/salesReturn/list', query: { closeLastOldTab: true } })
+      this.$router.push({ name: 'receiveCheckList' })
+    },
+    // 添加
+    handleAdd (row) {
+
+    },
+    // 删除
+    handleDel (row) {
+
     },
     // 批量返库
-    backStock () {
+    handlePlss () {
       const _this = this
       if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请先选择产品!')
@@ -146,7 +194,7 @@ export default {
       }
       this.$confirm({
         title: '提示',
-        content: '确认要批量返库吗?',
+        content: '确认要批量实收吗?',
         centered: true,
         onOk () {
           const obj = []
@@ -156,7 +204,6 @@ export default {
               backStockQty: item.qty
             })
           })
-          console.log(obj)
           _this.submitCheck(obj)
         }
       })
@@ -243,7 +290,7 @@ export default {
 </script>
 
 <style lang="less">
-  .salesReturnCheck-wrap{
+  .custConfirm-wrap{
     position: relative;
     height: 100%;
     padding-bottom: 51px;
@@ -252,7 +299,7 @@ export default {
       overflow-y: scroll;
       height: 100%;
     }
-    .salesReturnCheck-cont{
+    .custConfirm-cont{
       margin-top: 10px;
       .sTable{
         margin-top: 10px;

+ 9 - 0
src/views/salesReturnManagement/custConfirm/setPriceModal.vue

@@ -0,0 +1,9 @@
+<template>
+
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 243 - 3
src/views/salesReturnManagement/pickUp/list.vue

@@ -1,8 +1,248 @@
 <template>
+  <a-card size="small" :bordered="false" class="pickUp-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <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 ref="rangeExamineDate" @change="dateExamineChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="提货单号">
+                <a-input id="pickUp-billNo" v-model.trim="queryParam.purchaseReturnBillNo" allowClear placeholder="请输入客户采退申请单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="关联销退单号">
+                <a-input id="pickUp-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="申请人">
+                  <employee style="width: 100%;" id="pickUp-Employee" v-model="queryParam.applyPersonSn"></employee>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="物流点">
+                  <employee style="width: 100%;" id="pickUp-Employee2" v-model="queryParam.applyPersonSn"></employee>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="发货方">
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="pickUp-buyerSn" @change="custChange" />
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 8px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+64.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 单号 -->
+        <template slot="salesReturnBillNo" slot-scope="text, record">
+          <div v-if="$hasPermissions('B_salesReturnDetail')">
+            <span class="link-bule" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
+          </div>
+          <div v-else>{{ record.salesReturnBillNo }}</div>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleDetail(record)"
+            id="pickUp-detail-btn">详情</a-button>
+        </template>
+      </s-table>
+    </a-spin>
+  </a-card>
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import employee from '../../expenseManagement/expenseReimbursement/employee.js'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { salesReturnList } from '@/api/salesReturn'
+export default {
+  name: 'BillOfLadingList',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    dealerSubareaScopeList,
+    employee,
+    rangeDate
+  },
+  data () {
+    return {
+      spinning: false,
+      // 高级搜索 展开/关闭
+      advanced: false,
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      createDate: [], //  创建时间
+      // 查询参数
+      queryParam: {
+        beginAuditDate: '',
+        endAuditDate: '',
+        buyerSn: undefined, //  客户名称
+        salesReturnBillNo: undefined, //  总部销退单号
+        purchaseReturnBillNo: '',
+        billStatus: undefined, // 业务状态
+        shippingAddrProvinceSn: undefined,
+        salesReturnBillSource: undefined
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return salesReturnList(Object.assign(parameter, this.queryParam)).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.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      visibleAudit: false,
+      auditInfo: null,
+      spinningAudit: false
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '编号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提货单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '10%', align: 'center' },
+        { title: '关联销退单', dataIndex: 'salesReturnBillSourceDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '申请人', dataIndex: 'purchaseReturnBillNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '主题', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '物流公司', dataIndex: 'buyerName2', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '物流点', dataIndex: 'buyerName1', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '发货方', dataIndex: 'purchaseReturnBillNo1', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收货人', dataIndex: 'purchaseReturnBillNo2', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  审核时间  change
+    dateExamineChange (date) {
+      this.queryParam.beginAuditDate = date[0]
+      this.queryParam.endAuditDate = date[1]
+    },
+    custChange (val) {
+      this.queryParam.buyerSn = val.key
+    },
+    // 详情
+    handleDetail (row) {
+      this.$router.push({ name: 'billOfLadingDetail', params: { sn: row.salesReturnBillSn } })
+    },
+    resetSearchForm () {
+      this.$refs.rangeExamineDate.resetDate()
+      if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+      }
+      this.queryParam.beginAuditDate = ''
+      this.queryParam.endAuditDate = ''
+      this.queryParam.buyerSn = undefined
+      this.queryParam.salesReturnBillNo = ''
+      this.queryParam.purchaseReturnBillNo = ''
+      this.queryParam.billStatus = undefined
+      this.queryParam.salesReturnBillSource = undefined
+      this.queryParam.shippingAddrProvinceSn = 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 - 175
+    }
+  },
+  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">
+  .pickUp-wrap{
+    .sTable{
+      .badge-con-t{
+        .ant-badge-count{
+          transform: scale(0.8);
+          font-size: 13px;
+        }
+      }
+    }
+  }
+</style>

+ 288 - 2
src/views/salesReturnManagement/receiveCheck/checking.vue

@@ -1,8 +1,294 @@
 <template>
+  <div class="salesReturnCheck-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnCheck-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesReturnCheck-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="salesReturnCheck-cont">
+        <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-form-item label="产品编码" prop="productCode">
+            <a-input id="salesReturnCheck-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+          </a-form-item>
+          <a-form-item label="产品名称" prop="productName">
+            <a-input id="salesReturnCheck-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+          </a-form-item>
+          <a-form-item>
+            <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturnCheck-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnCheck-reset">重置</a-button>
+          </a-form-item>
+        </a-form>
+        <div style="border-top:1px solid #eee;padding-top:10px;">
+          <a-button type="primary" :loading="loading" class="button-info" @click="backStock">批量设置良品数量</a-button>
+          <a-button type="primary" :loading="loading" class="button-error" @click="backStock">批量设置返库数量</a-button>
+          <div style="float:right;color:#999;margin-top:8px;">说明:红色行表示收货时新增的产品</div>
+        </div>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :row-selection="{ columnWidth: 40 }"
+          @rowSelection="rowSelectionFun"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 返库数量 -->
+          <template slot="backStockQty" slot-scope="text, record">
+            <a-input-number
+              id="salesReturn-backStockQty"
+              size="small"
+              v-model="record.backStockQty"
+              :precision="0"
+              :min="0"
+              :max="record.qty"
+              placeholder="请输入"
+              @blur="e => onCellBlur(e.target.value, record)"
+              style="width: 100%;" />
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
+    <div class="affix-cont">
+      <a-button
+        size="large"
+        style="padding: 0 60px;"
+        :disabled="spinning"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        id="salesReturn-handleSubmit">提交</a-button>
+    </div>
+  </div>
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import { salesReturnDetail, salesReturnCheck } from '@/api/salesReturn'
+import {
+  salesReturnDetailList,
+  updateBackStockQty
+} from '@/api/salesReturnDetail'
+export default {
+  name: 'SalesReturnCheck',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect
+  },
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0, // 表格高度
+      orderId: null,
+      orderSn: null,
+      buyerSn: null,
+      disabled: false,
+      isInster: false, // 是否正在添加产品
+      ordeDetail: { discountAmount: 0 },
+      loading: false,
+      // 已选产品
+      dataSource: [],
+      productForm: {
+        salesReturnBillSn: ''
+      },
+      chooseLoadData: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // 查询总计
+        this.productForm.salesReturnBillSn = this.$route.params.sn
+        return salesReturnDetailList(Object.assign(parameter, this.productForm)).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
+              data.list[i].backStockQtyBackups = data.list[i].backStockQty
+            }
+            this.disabled = false
+            this.chooseLoadData = data.list
+          }
+          return data
+        })
+      },
+      rowSelectionInfo: null,
+      queryParam: {
+        productCode: '',
+        productName: ''
+      }
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', width: '23%', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '申请退货数量', dataIndex: 'qty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库实收数量', dataIndex: 'qty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '坏件数量', dataIndex: 'badQty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '良品数量', dataIndex: 'backStockQty', width: '10%', align: 'center', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '返库数量', dataIndex: 'backStockQty', width: '10%', align: 'center', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '退货原因', dataIndex: 'productEntity.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    //  返回
+    handleBack () {
+      this.$router.push({ name: 'receiveCheckList' })
+    },
+    // 批量返库
+    backStock () {
+      const _this = this
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请先选择产品!')
+        return
+      }
+      this.$confirm({
+        title: '提示',
+        content: '确认要批量返库吗?',
+        centered: true,
+        onOk () {
+          const obj = []
+          _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
+            obj.push({
+              salesReturnDetailSn: item.salesReturnDetailSn,
+              backStockQty: item.qty
+            })
+          })
+          console.log(obj)
+          _this.submitCheck(obj)
+        }
+      })
+    },
+    // 已选产品  blur
+    onCellBlur (val, record) {
+      //  光标移出,值发生改变再调用编辑接口
+      if (val && val != record.backStockQtyBackups) {
+        this.submitCheck([{
+          salesReturnDetailSn: record.salesReturnDetailSn,
+          backStockQty: record.backStockQty
+        }])
+      } else {
+        record.backStockQty = record.backStockQtyBackups
+      }
+    },
+    // 品检
+    submitCheck (data) {
+      this.loading = true
+      this.spinning = true
+      updateBackStockQty(data).then(res => {
+        if (res.status == 200) {
+          this.resetSearchForm(true)
+          this.$message.success(res.message)
+        }
+        this.loading = false
+        this.spinning = false
+      })
+    },
+    // 获取单据详细
+    getOrderDetail () {
+      this.rowSelectionInfo = null
+      salesReturnDetail({ sn: this.orderSn }).then(res => {
+        this.ordeDetail = res.data || null
+      })
+    },
+    //  重置
+    resetSearchForm (flag) {
+      this.$refs.table.refresh(!!flag)
+      this.getOrderDetail()
+    },
+    // 提交销售单
+    handleSubmit () {
+      this.spinning = true
+      salesReturnCheck({ salesReturnBillSn: this.orderSn }).then(res => {
+        if (res.status == 200) {
+          this.handleBack()
+          this.$message.success(res.message)
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.orderSn = this.$route.params.sn
+      this.buyerSn = this.$route.params.buyerSn
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
+      this.getOrderDetail()
+    },
+    setTableH () {
+      this.tableHeight = window.innerHeight - 340
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.pageInit()
+    }
+  },
+  activated () {
+    this.$refs.table.refresh(true)
+    this.pageInit()
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
 </script>
 
-<style>
-</style>
+<style lang="less">
+  .salesReturnCheck-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+    .salesReturnCheck-cont{
+      margin-top: 10px;
+      .sTable{
+        margin-top: 10px;
+      }
+      .total-bar{
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        > div{
+          &:last-child{
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            > div{
+              padding: 0 10px;
+            }
+          }
+        }
+      }
+    }
+  }
+</style>

+ 250 - 3
src/views/salesReturnManagement/receiveCheck/list.vue

@@ -1,8 +1,255 @@
 <template>
+  <a-card size="small" :bordered="false" class="receiveCheck-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <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 ref="rangeExamineDate" @change="dateExamineChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="总部销退单号">
+                <a-input id="receiveCheck-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入总部销退单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="receiveCheck-buyerSn" @change="custChange" />
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-form-item label="业务状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="receiveCheck-billStatus"
+                  code="SALES_RETURN_BILL_STATUS"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item></template>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 8px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+64.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 单号 -->
+        <template slot="salesReturnBillNo" slot-scope="text, record">
+          <div v-if="$hasPermissions('B_salesReturnDetail')">
+            <span class="link-bule" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
+          </div>
+          <div v-else>{{ record.salesReturnBillNo }}</div>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleReceiving(record)"
+            id="receiveCheck-detail-btn">收货</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            v-if="record.billStatus == 'WAIT_CHECK'&&$hasPermissions('B_salesReturnCheck')"
+            @click="handleCheck(record)"
+            id="salesReturn-eexamine-btn">品检</a-button>
+        </template>
+      </s-table>
+    </a-spin>
+  </a-card>
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import employee from '../../expenseManagement/expenseReimbursement/employee.js'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { salesReturnList } from '@/api/salesReturn'
+export default {
+  name: 'BillOfLadingList',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    dealerSubareaScopeList,
+    employee,
+    rangeDate
+  },
+  data () {
+    return {
+      spinning: false,
+      // 高级搜索 展开/关闭
+      advanced: false,
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      createDate: [], //  创建时间
+      // 查询参数
+      queryParam: {
+        beginAuditDate: '',
+        endAuditDate: '',
+        buyerSn: undefined, //  客户名称
+        salesReturnBillNo: undefined, //  总部销退单号
+        purchaseReturnBillNo: '',
+        billStatus: undefined, // 业务状态
+        shippingAddrProvinceSn: undefined,
+        salesReturnBillSource: undefined
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return salesReturnList(Object.assign(parameter, this.queryParam)).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.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      visibleAudit: false,
+      auditInfo: null,
+      spinningAudit: false
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '编号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '10%', align: 'center' },
+        { title: '客户名称', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '申请退货数量', dataIndex: 'totalQty', 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: 'totalBadQty', 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: 'totalBackStockQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  审核时间  change
+    dateExamineChange (date) {
+      this.queryParam.beginAuditDate = date[0]
+      this.queryParam.endAuditDate = date[1]
+    },
+    custChange (val) {
+      this.queryParam.buyerSn = val.key
+    },
+    // 详情
+    handleDetail (row) {
+      this.$router.push({ name: 'billOfLadingDetail', params: { sn: row.salesReturnBillSn } })
+    },
+    // 收货
+    handleReceiving (row) {
+      this.$router.push({ name: 'salesReturnReceiving', params: { sn: row.salesReturnBillSn } })
+    },
+    // 品检
+    handleCheck (row) {
+      this.$router.push({ name: 'salesReturnCheck', params: { sn: row.salesReturnBillSn } })
+    },
+    resetSearchForm () {
+      this.$refs.rangeExamineDate.resetDate()
+      if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+      }
+      this.queryParam.beginAuditDate = ''
+      this.queryParam.endAuditDate = ''
+      this.queryParam.buyerSn = undefined
+      this.queryParam.salesReturnBillNo = ''
+      this.queryParam.purchaseReturnBillNo = ''
+      this.queryParam.billStatus = undefined
+      this.queryParam.salesReturnBillSource = undefined
+      this.queryParam.shippingAddrProvinceSn = 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 - 175
+    }
+  },
+  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">
+  .receiveCheck-wrap{
+    .sTable{
+      .badge-con-t{
+        .ant-badge-count{
+          transform: scale(0.8);
+          font-size: 13px;
+        }
+      }
+    }
+  }
+</style>

+ 313 - 2
src/views/salesReturnManagement/receiveCheck/receiving.vue

@@ -1,8 +1,319 @@
 <template>
+  <div class="salesReturnReceive-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnReceive-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesReturnReceive-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="salesReturnReceive-cont">
+        <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-form-item label="产品编码" prop="productCode">
+            <a-input id="salesReturnReceive-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+          </a-form-item>
+          <a-form-item label="产品名称" prop="productName">
+            <a-input id="salesReturnReceive-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+          </a-form-item>
+          <a-form-item>
+            <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturnReceive-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnReceive-reset">重置</a-button>
+          </a-form-item>
+        </a-form>
+        <div style="border-top:1px solid #eee;padding-top:10px;">
+          <a-button type="primary" :loading="loading" class="button-info" @click="handleAdd">新增产品</a-button>
+          <a-button type="primary" :loading="loading" class="button-error" @click="handlePlss">批量实收</a-button>
+          <div style="float:right;color:#999;margin-top:8px;">说明:红色行表示收货时新增的产品</div>
+        </div>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :row-selection="{ columnWidth: 40 }"
+          @rowSelection="rowSelectionFun"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 仓库实收数量 -->
+          <template slot="backStockQty" slot-scope="text, record">
+            <a-input-number
+              id="salesReturn-backStockQty"
+              size="small"
+              v-model="record.backStockQty"
+              :precision="0"
+              :min="0"
+              :max="record.qty"
+              placeholder="请输入"
+              @blur="e => onCellBlur(e.target.value, record)"
+              style="width: 100%;" />
+          </template>
+          <!-- 退货原因 -->
+          <template slot="returnYy" slot-scope="text, record">
+            <v-select
+              style="width:100%;"
+              v-model="queryParam.billStatus"
+              ref="billStatus"
+              code="SALES_RETURN_BILL_STATUS"
+              placeholder="请选择业退货原因"
+              allowClear></v-select>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="handleDel(record)"
+              id="salesReturn-eexamine-btn">删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
+    <div class="affix-cont">
+      <a-button
+        size="large"
+        style="padding: 0 60px;"
+        :disabled="spinning"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        id="salesReturn-handleSubmit">提交</a-button>
+    </div>
+  </div>
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import { salesReturnDetail, salesReturnCheck } from '@/api/salesReturn'
+import {
+  salesReturnDetailList,
+  updateBackStockQty
+} from '@/api/salesReturnDetail'
+export default {
+  name: 'SalesReturnCheck',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect
+  },
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0, // 表格高度
+      orderId: null,
+      orderSn: null,
+      buyerSn: null,
+      disabled: false,
+      isInster: false, // 是否正在添加产品
+      ordeDetail: { discountAmount: 0 },
+      loading: false,
+      // 已选产品
+      dataSource: [],
+      productForm: {
+        salesReturnBillSn: ''
+      },
+      chooseLoadData: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // 查询总计
+        this.productForm.salesReturnBillSn = this.$route.params.sn
+        return salesReturnDetailList(Object.assign(parameter, this.productForm)).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
+              data.list[i].backStockQtyBackups = data.list[i].backStockQty
+            }
+            this.disabled = false
+            this.chooseLoadData = data.list
+          }
+          return data
+        })
+      },
+      rowSelectionInfo: null,
+      queryParam: {
+        productCode: '',
+        productName: ''
+      }
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', width: '23%', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '申请退货数量', dataIndex: 'qty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库实收数量', dataIndex: 'qty', align: 'center', width: '10%', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货单价', dataIndex: 'badQty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货原因', dataIndex: 'backStockQty', width: '10%', align: 'center', scopedSlots: { customRender: 'returnYy' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    //  返回
+    handleBack () {
+      this.$router.push({ name: 'receiveCheckList' })
+    },
+    // 添加
+    handleAdd (row) {
+
+    },
+    // 删除
+    handleDel (row) {
+
+    },
+    // 批量返库
+    handlePlss () {
+      const _this = this
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请先选择产品!')
+        return
+      }
+      this.$confirm({
+        title: '提示',
+        content: '确认要批量实收吗?',
+        centered: true,
+        onOk () {
+          const obj = []
+          _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
+            obj.push({
+              salesReturnDetailSn: item.salesReturnDetailSn,
+              backStockQty: item.qty
+            })
+          })
+          _this.submitCheck(obj)
+        }
+      })
+    },
+    // 已选产品  blur
+    onCellBlur (val, record) {
+      //  光标移出,值发生改变再调用编辑接口
+      if (val && val != record.backStockQtyBackups) {
+        this.submitCheck([{
+          salesReturnDetailSn: record.salesReturnDetailSn,
+          backStockQty: record.backStockQty
+        }])
+      } else {
+        record.backStockQty = record.backStockQtyBackups
+      }
+    },
+    // 品检
+    submitCheck (data) {
+      this.loading = true
+      this.spinning = true
+      updateBackStockQty(data).then(res => {
+        if (res.status == 200) {
+          this.resetSearchForm(true)
+          this.$message.success(res.message)
+        }
+        this.loading = false
+        this.spinning = false
+      })
+    },
+    // 获取单据详细
+    getOrderDetail () {
+      this.rowSelectionInfo = null
+      salesReturnDetail({ sn: this.orderSn }).then(res => {
+        this.ordeDetail = res.data || null
+      })
+    },
+    //  重置
+    resetSearchForm (flag) {
+      this.$refs.table.refresh(!!flag)
+      this.getOrderDetail()
+    },
+    // 提交销售单
+    handleSubmit () {
+      this.spinning = true
+      salesReturnCheck({ salesReturnBillSn: this.orderSn }).then(res => {
+        if (res.status == 200) {
+          this.handleBack()
+          this.$message.success(res.message)
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.orderSn = this.$route.params.sn
+      this.buyerSn = this.$route.params.buyerSn
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
+      this.getOrderDetail()
+    },
+    setTableH () {
+      this.tableHeight = window.innerHeight - 340
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.pageInit()
+    }
+  },
+  activated () {
+    this.$refs.table.refresh(true)
+    this.pageInit()
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
 </script>
 
-<style>
-</style>
+<style lang="less">
+  .salesReturnReceive-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+    .salesReturnReceive-cont{
+      margin-top: 10px;
+      .sTable{
+        margin-top: 10px;
+      }
+      .total-bar{
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        > div{
+          &:last-child{
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            > div{
+              padding: 0 10px;
+            }
+          }
+        }
+      }
+    }
+  }
+</style>

+ 24 - 17
src/views/salesReturnManagement/salesReturn/list.vue

@@ -126,14 +126,7 @@
             class="button-warning"
             v-if="(record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'FINANCIAL_REJECT')&&$hasPermissions('B_salesReturnAudit')"
             @click="handleEexamine(record)"
-            id="salesReturn-eexamine-btn">审核</a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-warning"
-            v-if="record.billStatus == 'WAIT_CHECK'&&$hasPermissions('B_salesReturnCheck')"
-            @click="handleCheck(record)"
-            id="salesReturn-eexamine-btn">品检</a-button>
+            id="salesReturn-eexamine-btn">审核进度</a-button>
           <a-button
             size="small"
             v-if="record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT')&&$hasPermissions('B_salesReturnEdit')"
@@ -162,11 +155,25 @@
             class="button-error"
             @click="handleDel(record)"
             id="salesReturn-del-btn">取消</a-button>
-          <span
-            v-if="!((record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'FINANCIAL_REJECT')&&$hasPermissions('B_salesReturnAudit')) &&
-              !(record.billStatus == 'WAIT_CHECK'&&$hasPermissions('B_salesReturnCheck')) &&
-              !(record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT')&&($hasPermissions('B_salesReturnEdit') || $hasPermissions('B_salesReturnDel'))) &&
-              !(record.salesReturnBillSource != 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT')&&($hasPermissions('B_salesReturnEdit') || $hasPermissions('B_salesReturnDel')))">--</span>
+
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="salesReturn-edit-btn">再次编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="salesReturn-edit-btn">申请提货</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleConfirm(record)"
+            id="salesReturn-edit-btn">客服确认</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -287,6 +294,10 @@ export default {
     custChange (val) {
       this.queryParam.buyerSn = val.key
     },
+    // 客服确认
+    handleConfirm (row) {
+      this.$router.push({ name: 'custConfirm', params: { sn: row.salesReturnBillSn } })
+    },
     // 编辑
     handleEdit (row) {
       this.$router.push({ name: row.grabFlag == 1 ? 'salesReturnGrabEdit' : 'salesReturnEdit', params: { sn: row.salesReturnBillSn, buyerSn: row.buyerSn } })
@@ -338,10 +349,6 @@ export default {
         }
       })
     },
-    // 品检
-    handleCheck (row) {
-      this.$router.push({ name: 'salesReturnCheck', params: { sn: row.salesReturnBillSn } })
-    },
     resetSearchForm () {
       this.$refs.rangeCreateDate.resetDate()
       this.$refs.rangeExamineDate.resetDate()