lilei 4 lat temu
rodzic
commit
28e1f93123

+ 73 - 0
src/api/customer.js

@@ -0,0 +1,73 @@
+import { axios } from '@/utils/request'
+
+//  客户列表  分页
+export const custList = (params) => {
+  const url = `/cust/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  客户列表  不分页
+export const custAllList = (params) => {
+  return axios({
+    url: `/cust/queryList`,
+    data: {},
+    method: 'post'
+  })
+}
+// 新增/编辑客户
+export const custSave = params => {
+  return axios({
+    url: '/cust/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 根据sn修改客户信息
+export const updateByCustomerSn = params => {
+  return axios({
+    url: '/cust/updateByCustomerSn',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 客户详情
+export const custFindById = params => {
+  return axios({
+    url: `/cust/findById/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 删除客户
+export const custDel = params => {
+  return axios({
+    url: `/cust/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+//  收款方式  下拉
+export const settleStyleFindAllList = (params) => {
+  return axios({
+    url: `/settleStyle/findAll`,
+    data: {},
+    method: 'post'
+  })
+}
+
+// 启用禁用
+export const updateEnableStatus = params => {
+  return axios({
+    url: `/cust/enable/${params.id}/${params.flag}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 21 - 0
src/api/stockOut.js

@@ -0,0 +1,21 @@
+import { axios } from '@/utils/request'
+
+//  出库 列表  有分页
+export const stockOutList = (params) => {
+  const url = `/stockOut/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  出库 出库
+export const stockOutOut = (params) => {
+  return axios({
+    url: '/stockOut/out',
+    data: params,
+    method: 'post'
+  })
+}

+ 68 - 33
src/config/router.config.js

@@ -118,77 +118,112 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/salesManagement/backorder',
-            redirect: '/salesManagement/backorder/list',
-            name: 'backorder',
+            path: '/salesManagement/examineVerify',
+            redirect: '/salesManagement/examineVerify/list',
+            name: 'examineVerify',
             component: RouteView,
             meta: {
-              title: '缺货单',
-              icon: 'exception'
-              // permission: 'M_goodsManage_list'
+              title: '备货审核',
+              icon: 'audit'
+              // permission: 'M_outboundOrder'
             },
             hideChildrenInMenu: true,
             children: [
               {
                 path: 'list',
-                name: 'backorderList',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/backorder/list.vue'),
+                name: 'examineVerifyList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/examineVerify/list.vue'),
                 meta: {
-                  title: '缺货单列表',
-                  icon: 'exception',
+                  title: '备货审核列表',
+                  icon: 'audit',
                   hidden: true
-                  // permission: 'M_goodsManage_list'
+                  // permission: 'M_outboundOrder_list'
                 }
               },
               {
                 path: 'detail/:id',
-                name: 'backorderDetail',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/backorder/detail.vue'),
+                name: 'examineVerifyDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/examineVerify/detail.vue'),
                 meta: {
-                  title: '缺货单详情',
-                  icon: 'exception',
+                  title: '备货审核详情',
+                  icon: 'audit',
                   hidden: true
-                  // permission: 'M_goodsManage_list'
+                  // permission: 'B_goodsManage_edit'
                 }
               }
             ]
           },
           {
-            path: '/salesManagement/examineVerify',
-            redirect: '/salesManagement/examineVerify/list',
-            name: 'examineVerify',
+            path: '/salesManagement/outboundOrder',
+            redirect: '/salesManagement/outboundOrder/list',
+            name: 'outboundOrder',
             component: RouteView,
             meta: {
-              title: '备货审核',
-              icon: 'audit'
-              // permission: 'M_outboundOrder'
+              title: '出库',
+              icon: 'export',
+              // permission: 'M_outboundList'
             },
             hideChildrenInMenu: true,
             children: [
               {
                 path: 'list',
-                name: 'examineVerifyList',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/examineVerify/list.vue'),
+                name: 'outboundOrderList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/outboundOrder/list.vue'),
                 meta: {
-                  title: '备货审核列表',
-                  icon: 'audit',
+                  title: '出库列表',
+                  icon: 'export',
+                  hidden: true,
+                  // permission: 'M_outboundList'
+                }
+              },
+              {
+                path: 'detail/:id',
+                name: 'outboundOrderDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/outboundOrder/detail.vue'),
+                meta: {
+                  title: '出库明细',
+                  icon: 'export',
                   hidden: true
-                  // permission: 'M_outboundOrder_list'
+                }
+              }
+            ]
+          },
+          {
+            path: '/salesManagement/backorder',
+            redirect: '/salesManagement/backorder/list',
+            name: 'backorder',
+            component: RouteView,
+            meta: {
+              title: '销售缺货列表',
+              icon: 'exception'
+              // permission: 'M_goodsManage_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'backorderList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/backorder/list.vue'),
+                meta: {
+                  title: '缺货单列表',
+                  icon: 'exception',
+                  hidden: true
+                  // permission: 'M_goodsManage_list'
                 }
               },
               {
                 path: 'detail/:id',
-                name: 'examineVerifyDetail',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/examineVerify/detail.vue'),
+                name: 'backorderDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/backorder/detail.vue'),
                 meta: {
-                  title: '备货审核详情',
-                  icon: 'audit',
+                  title: '缺货单详情',
+                  icon: 'exception',
                   hidden: true
-                  // permission: 'B_goodsManage_edit'
+                  // permission: 'M_goodsManage_list'
                 }
               }
             ]
-          }
+          },
         ]
       },
       // 产品管理

+ 156 - 0
src/views/salesManagement/outboundOrder/detail.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="outboundOrderDetail-wrap">
+    <a-page-header :ghost="false" @back="handleBack" class="outboundOrderDetail-cont">
+      <template slot="subTitle">
+        <a href="javascript:;" @click="handleBack">返回列表</a>
+        <a-button size="small" id="outboundOrderDetail-ts-btn" style="margin-left:30px" key="0">订单推送</a-button>
+        <a-button size="small" id="outboundOrderDetail-export-btn" type="danger" style="margin-left:20px" key="1">销售导出</a-button>
+      </template>
+      <template slot="extra">
+        <span>打印字段:</span>
+        <a-select key="2" style="width:150px" id="sales-pritKey" placeholder="请选择打印字段" allowClear>
+          <a-select-option v-for="item in pritKey" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+        </a-select>
+        <span><i style="color: red;">*</i>打印模板:</span>
+        <a-select key="3" style="width:150px" id="sales-pritKey" placeholder="请选择打印模板" allowClear>
+          <a-select-option v-for="item in pritModal" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+        </a-select>
+        <a-button key="4" id="outboundOrderDetail-preview-btn">打印预览</a-button>
+        <a-button key="5" type="primary" id="outboundOrderDetail-print-btn">快速打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 基础信息 -->
+    <a-card size="small" :bordered="false" class="outboundOrderDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions size="small" :column="3">
+            <a-descriptions-item label="客户名称">张三的</a-descriptions-item>
+            <a-descriptions-item label="客户地址">山西省太原市阿斯加德法律静安寺水电费</a-descriptions-item>
+            <a-descriptions-item label="支付方式">货到付款</a-descriptions-item>
+            <a-descriptions-item label="收款方式">现金</a-descriptions-item>
+            <a-descriptions-item label="联系手机">13709146191</a-descriptions-item>
+            <a-descriptions-item label="联系电话">13709146191</a-descriptions-item>
+            <a-descriptions-item label="备注">备注备注备注备注备注</a-descriptions-item>
+            <a-descriptions-item label="销售单号">34242sdf234234</a-descriptions-item>
+            <a-descriptions-item label="制单人">王明</a-descriptions-item>
+            <a-descriptions-item label="业务员">李四</a-descriptions-item>
+            <a-descriptions-item label="审核状态">未审核</a-descriptions-item>
+            <a-descriptions-item label="完结状态">未完结</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <a-card size="small" :bordered="false" class="outboundOrderDetail-cont">
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom: 15px;">
+        <div slot="message">
+          总款数:<strong>12</strong>;总数量:<strong>12</strong>;总赠品数量:<strong>12</strong>;急件总款数:<strong>12</strong>;急件总数量:<strong>12</strong>;<br/>
+          总售价:<strong>12</strong>;总成本:<strong>12</strong>;总毛利:<strong>12</strong>;折后总售价:<strong>12</strong>;折扣:<strong>12%</strong>;折扣金额:<strong>12</strong>;
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1660 }"
+        bordered>
+        <!-- 状态 -->
+        <template slot="state" slot-scope="text, record">
+          <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '已出库': '未出库' }}</a-tag>
+        </template>
+      </s-table>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+export default {
+  name: 'SalesDetail',
+  components: {
+    STable,
+    VSelect
+  },
+  data () {
+    return {
+      disabled: false,
+      pritKey: [
+        { id: 0, name: '打印促销' },
+        { id: 1, name: '打印支付方式' },
+        { id: 2, name: '打印收款方式' }
+      ],
+      pritModal: [
+        { id: 0, name: '普通模板一' },
+        { id: 1, name: '普通模板二' },
+        { id: 2, name: '仓库模板一' }
+      ],
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'salerNo', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'storeNo', align: 'center' },
+        { title: '原厂编码', dataIndex: 'custName', width: 140, align: 'center' },
+        { title: '成本价', dataIndex: 'totalP', width: 100, align: 'center' },
+        { title: '售价', dataIndex: 'totalNums', width: 100, align: 'center' },
+        { title: '折后售价', dataIndex: 'totalPrice', width: 100, align: 'center' },
+        { title: '销售数量', dataIndex: 'payType', width: 100, align: 'center' },
+        { title: '单位', dataIndex: 'mementPay', width: 100, align: 'center' },
+        { title: '辅助数量', dataIndex: 'shDate', width: 100, align: 'center' },
+        { title: '售价小计', dataIndex: 'isJj', width: 100, align: 'center' },
+        { title: '折后小计', dataIndex: 'status', width: 100, align: 'center' },
+        { title: '仓库', dataIndex: 'status', width: 100, align: 'center' },
+        { title: '仓位', dataIndex: 'status', width: 100, align: 'center' },
+        { title: '销售类型', dataIndex: 'status', width: 100, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
+        //   const data = res.data
+        //   const no = (data.pageNo - 1) * data.pageSize
+        //   for (var i = 0; i < data.list.length; i++) {
+        //     data.list[i].no = no + i + 1
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+            ],
+            count: 10
+          }
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          _this.disabled = false
+          resolve(data)
+        })
+      }
+    }
+  },
+  methods: {
+    //  返回
+    handleBack () {
+      this.$router.push({ path: '/salesManagement/outboundOrder/list' })
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .outboundOrderDetail-wrap{
+    .outboundOrderDetail-cont{
+      margin-bottom: 15px;
+    }
+  }
+</style>

+ 292 - 0
src/views/salesManagement/outboundOrder/list.vue

@@ -0,0 +1,292 @@
+<template>
+  <a-card size="small" :bordered="false" class="outboundOrderList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="审核时间">
+              <a-range-picker
+                style="width:100%"
+                id="outboundOrderList-creatTime"
+                :disabledDate="disabledDate"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户名称">
+              <a-select
+                id="outboundOrderList-demanderName"
+                placeholder="请选择"
+                allowClear
+                v-model="queryParam.demanderName"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerName">{{ item.customerName }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="出库类型">
+              <v-select
+                v-model="queryParam.outBizType"
+                ref="outBizType"
+                id="outboundOrderList-outBizType"
+                code="OUT_STOCK_TYPE"
+                placeholder="请选择出库类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单据状态">
+                <v-select
+                  v-model="queryParam.state"
+                  ref="state"
+                  id="outboundOrderList-state"
+                  code="OUT_STATE"
+                  placeholder="请选择单据状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" style="margin-bottom: 15px;">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 列表 -->
+    <!-- 暂不做 -->
+    <!-- <div style="margin-bottom: 15px">
+      <a-button type="primary" id="outboundOrder-export" :disabled="!hasSelected" :loading="loading" @click="handleOutbounds">批量出库</a-button>
+      <span style="margin-left: 8px">
+        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+      </span>
+    </div> -->
+    <!-- <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :row-selection="rowSelection"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :showPagination="false"
+      :scroll="{ x: 1710 }"
+      bordered> -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1720, y: tableHeight }"
+      bordered>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state=='WAIT'"
+          class="button-primary"
+          @click="handleOutbound(record)"
+          id="outboundOrderList-out-btn">出库</a-button>
+        <a-button
+          size="small"
+          type="link"
+          class="button-success"
+          @click="handleDetail(record)"
+          id="outboundOrderList-detail-btn">详情</a-button>
+      </template>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import moment from 'moment'
+import { STable, VSelect } from '@/components'
+import { custAllList } from '@/api/customer'
+import { stockOutList, stockOutOut } from '@/api/stockOut'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      queryParam: { //  查询条件
+        demanderName: undefined, //  客户名称
+        outBizType: undefined, //  出库类型
+        state: undefined //  状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      time: [], //  审核时间
+      custAllList: [], //  客户下拉数据
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '关联单号', dataIndex: 'outBizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'demanderName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'productTotalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库时间', dataIndex: 'outTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
+      ],
+      selectedRowKeys: [], // Check here to configure the default column
+      loading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 260
+        }
+        // 审核时间
+        if (this.time && this.time.length > 0) {
+          this.queryParam.beginDate = moment(this.time[0]).format(this.dateFormat)
+          this.queryParam.endDate = moment(this.time[1]).format(this.dateFormat)
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
+        return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.disabled = false
+          return data
+        })
+      }
+    }
+  },
+  computed: {
+    hasSelected () {
+      return this.selectedRowKeys.length > 0
+    },
+    rowSelection () {
+      return {
+        selectedRowKeys: this.selectedRowKeys,
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.onSelectChange(selectedRowKeys)
+        },
+        getCheckboxProps: record => ({
+          props: {
+            disabled: record.state == 'FINISH' // Column configuration not to be checked
+          }
+        })
+      }
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.demanderName = undefined
+      this.queryParam.outBizType = undefined
+      this.queryParam.state = undefined
+      this.time = []
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    handleDetail (row) {
+      //  根据出库类型跳转对应页面
+      if (row.outBizType == 'PURCHASE_RETURN') { // 采购退货
+        this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'SPARE_PARTS_RETURN') { // 散件退货
+        this.$message.warning('该出库类型对应页面未开发')
+        // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'SALES') { // 出库
+        this.$router.push({ path: `/salesManagement/salesQuery/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'DISPATCH_DEDUCT') { // 急件冲减
+        this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'SHOP_CALL_OUT') { // 店内调出
+        this.$router.push({ path: `/allocationManagement/storeTransferOut/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'CHECK_ORDER_OUT') { // 库存盘点盘亏
+        this.$message.warning('该出库类型对应页面未开发')
+        // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'LINKAGE_CALL_OUT') { // 连锁调出
+        this.$message.warning('该出库类型对应页面未开发')
+        // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'WAREHOUSE_CALL_OUT') { // 仓库调出
+        this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.outBizSn}` })
+      } else {
+        this.$message.warning('出库类型未知')
+      }
+    },
+    // 单个出库
+    handleOutbound (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要出库吗?',
+        centered: true,
+        onOk () {
+          stockOutOut(Object.assign(row, { outStockEnum: row.outBizType })).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    // 批量出库
+    handleOutbounds () {
+      if (this.selectedRowKeys.length < 1) {
+        this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
+      this.loading = true
+      // ajax request after empty completing
+      setTimeout(() => {
+        this.loading = false
+        this.selectedRowKeys = []
+      }, 1000)
+    },
+    onSelectChange (selectedRowKeys) {
+      console.log('selectedRowKeys changed: ', selectedRowKeys)
+      this.selectedRowKeys = selectedRowKeys
+    },
+    // 客户无分页列表数据
+    getCustAllList () {
+      const _this = this
+      custAllList().then(res => {
+        if (res.status == 200) {
+          _this.custAllList = res.data || []
+        } else {
+          _this.custAllList = []
+        }
+      })
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getCustAllList()
+    })
+  }
+}
+</script>