Browse Source

散件入库

chenrui 4 years ago
parent
commit
a2db347471

+ 3 - 3
src/views/productManagement/productInfo/list.vue

@@ -69,21 +69,21 @@
     <div class="table-operator">
       <a-button id="productInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
       <a-button
-        id="productInfoList-import"
+        id="productInfoList-batchAudit"
         type="primary"
         class="button-warning"
         :loading="loading"
         @click="handleBatchAudit"
         style="margin: 0 15px;">批量审核</a-button>
       <a-button
-        id="productInfoList-import"
+        id="productInfoList-batchLaunch"
         type="primary"
         class="button-primary"
         :loading="loading"
         @click="handleBatchLaunch"
         style="margin: 0 15px;">批量上线</a-button>
       <a-button
-        id="productInfoList-import"
+        id="productInfoList-batchDownline"
         type="primary"
         class="button-grey"
         :loading="loading"

+ 12 - 4
src/views/purchasingManagement/bulkWarehousingOrder/basicInfoModal.vue

@@ -28,12 +28,20 @@
         </a-select>
         <a-button icon="plus" size="small" @click="openSupplierModal=true" id="bulkWarehousingOrder-basicInfo-add-btn" style="margin-left: 10px;"></a-button>
       </a-form-model-item>
-      <a-form-model-item label="散件入库类型" prop="sparePartsType">
-        <a-select id="bulkWarehousingOrder-basicInfo-sparePartsType" placeholder="请选择散件入库类型" allowClear v-model="form.sparePartsType">
+      <a-form-model-item label="入库类型" prop="sparePartsType">
+        <a-select id="bulkWarehousingOrder-basicInfo-sparePartsType" placeholder="请选择入库类型" allowClear v-model="form.sparePartsType">
           <a-select-option v-for="item in sparePartsPutTypeList" :key="item.sparePartsPutTypeSn" :value="item.sparePartsPutTypeSn">{{ item.name }}</a-select-option>
         </a-select>
       </a-form-model-item>
-      <a-form-model-item label="备注" prop="remarks">
+      <a-form-model-item label="关联单号" prop="remarks">
+        <a-input
+          id="bulkWarehousingOrder-no"
+          :maxLength="30"
+          v-model="form.remarks"
+          placeholder="请输入关联单号(最多30个字符)"
+          allowClear />
+      </a-form-model-item>
+      <a-form-model-item label="入库备注" prop="remarks">
         <a-textarea
           id="bulkWarehousingOrder-remarks"
           :maxLength="200"
@@ -83,7 +91,7 @@ export default {
           { required: true, message: '请选择供应商', trigger: 'change' }
         ],
         sparePartsType: [
-          { required: true, message: '请选择散件入库类型', trigger: 'change' }
+          { required: true, message: '请选择入库类型', trigger: 'change' }
         ]
       },
       supplierList: [], //  供应商  下拉数据

+ 40 - 190
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -5,7 +5,7 @@
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
         <a id="bulkWarehousingOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '' }}</p>
+        <!-- <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '' }}</p> -->
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -19,197 +19,49 @@
         <a-collapse-panel key="1">
           <template slot="header">
             基础信息
-            <!-- <a-button type="primary" shape="circle" size="small" icon="edit" class="edit-circle-btn" id="bulkWarehousingOrderEdit-edit-circle-btn" @click.stop="handleEditInfo" /> -->
           </template>
           <a-descriptions :column="3">
             <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="散件入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="入库单号">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
           </a-descriptions>
         </a-collapse-panel>
       </a-collapse>
     </a-card>
-    <!-- 选择产品 -->
     <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            选择产品<span class="sub-title">①输入查询条件--->②查找到需要入库的配件--->③录入成本价、数量、仓库、仓位--->④点击“添加”</span>
-          </template>
-          <!-- 选择产品 -->
-          <div>
-            <!-- 搜索条件 -->
-            <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-input id="bulkWarehousingOrderEdit-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="产品名称/产品编码/原厂编码"/>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品品牌">
-                      <a-select
-                        placeholder="请选择产品品牌"
-                        id="bulkWarehousingOrderEdit-productBrandSn"
-                        allowClear
-                        v-model="queryParam.productBrandSn"
-                        :showSearch="true"
-                        option-filter-prop="children"
-                        :filter-option="filterOption">
-                        <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品分类">
-                      <a-cascader
-                        @change="changeProductType"
-                        change-on-select
-                        v-model="productType"
-                        expand-trigger="hover"
-                        :options="productTypeList"
-                        :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                        id="productInfoList-productType"
-                        placeholder="请选择产品分类"
-                        allowClear />
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-button style="margin-bottom: 18px;" type="primary" @click="getDealerProductList(1)" :disabled="disabled" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
-                    <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
-                  </a-col>
-                </a-row>
-              </a-form>
-            </div>
-            <!-- 列表 -->
-            <a-table
-              class="sTable"
-              ref="table"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="columns"
-              :customRow="handleClickRow"
-              :dataSource="loadData"
-              :scroll="{ x: 1600, y: 300 }"
-              :pagination="paginationProps"
-              @change="onTableChange"
-              bordered>
-              <!-- 成本价 -->
-              <template slot="putCost" slot-scope="text, record">
-                <a-input-number
-                  id="bulkWarehousingOrderEdit-putCost"
-                  v-model="record.putCost"
-                  :precision="2"
-                  :min="1"
-                  :max="999999"
-                  placeholder="请输入"
-                  style="width: 100%;" />
-              </template>
-              <!-- 数量 -->
-              <template slot="putQty" slot-scope="text, record">
-                <a-input-number
-                  id="bulkWarehousingOrderEdit-putQty"
-                  v-model="record.putQty"
-                  :precision="0"
-                  :min="1"
-                  :max="999999"
-                  placeholder="请输入"
-                  style="width: 100%;" />
-              </template>
-              <!-- 仓库仓位 -->
-              <template slot="warehouse" slot-scope="text, record, index">
-                <a-cascader
-                  @change="e => changeWarehouseCascade(e, record, index, 'dealerProduct')"
-                  v-model="record.warehouseCascade"
-                  expand-trigger="hover"
-                  :allowClear="false"
-                  :options="warehouseCascadeData"
-                  :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-                  id="bulkWarehousingOrderEdit-warehouseCascade"
-                  placeholder="请选择仓库仓位"
-                  style="width: 100%;" />
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
-              </template>
-            </a-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            已选产品
-            <a-button size="small" class="import-btn" id="bulkWarehousingOrderEdit-import-btn" @click.stop="handleImport">导入明细</a-button>
-          </template>
-          <!-- 已选产品 -->
-          <div>
-            <!-- 总计 -->
-            <a-alert type="info" showIcon style="margin-bottom:15px">
-              <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
-            </a-alert>
-            <!-- 列表 -->
-            <a-table
-              class="sTable"
-              ref="chooseTable"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="chooseColumns"
-              :dataSource="chooseLoadData"
-              :scroll="{ x: 1700, y: 300 }"
-              :pagination="choosePaginationProps"
-              @change="onChooseTableChange"
-              bordered>
-              <!-- 成本价 -->
-              <template slot="putCost" slot-scope="text, record">
-                <a-input-number
-                  id="bulkWarehousingOrderEdit-choose-putCost"
-                  v-model="record.putCost"
-                  :precision="2"
-                  :min="1"
-                  :max="999999"
-                  placeholder="请输入"
-                  @blur="e => putCostBlur(e.target.value, record)"
-                  style="width: 100%;" />
-              </template>
-              <!-- 数量 -->
-              <template slot="putQty" slot-scope="text, record">
-                <a-input-number
-                  id="bulkWarehousingOrderEdit-choose-putQty"
-                  v-model="record.putQty"
-                  :precision="0"
-                  :min="1"
-                  :max="999999"
-                  placeholder="请输入"
-                  @blur="e => putQtyBlur(e.target.value, record)"
-                  style="width: 100%;" />
-              </template>
-              <!-- 仓库仓位 -->
-              <template slot="warehouse" slot-scope="text, record, index">
-                <a-cascader
-                  @change="e => changeWarehouseCascade(e, record, index, 'sparePartsPurDetail')"
-                  v-model="record.warehouseCascade"
-                  expand-trigger="hover"
-                  :allowClear="false"
-                  :options="warehouseCascadeData"
-                  :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-                  id="bulkWarehousingOrderEdit-choose-warehouseCascade"
-                  placeholder="请选择仓库仓位"
-                  style="width: 100%;" />
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="bulkWarehousingOrderEdit-del-btn">删除</a-button>
-              </template>
-            </a-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="bulkWarehousingOrderEdit-add" type="primary" class="button-error" @click="handleAdd">新增产品</a-button>
+      </div>
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">入库数量 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,入库金额 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong></div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            @click="handleEdit(record)"
+            class="button-info"
+            id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            @click="handleDel(record)"
+            class="button-error"
+            id="bulkWarehousingOrderList-del-btn">删除</a-button>
+        </template>
+      </s-table>
     </a-card>
     <a-affix :offset-bottom="0">
       <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
@@ -255,14 +107,12 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: 200, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', scopedSlots: { customRender: 'putCost' }, width: 140, align: 'center' },
-        { title: '数量', scopedSlots: { customRender: 'putQty' }, width: 140, align: 'center' },
-        { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: 200, align: 'center' },
+        { title: '入库数量', dataIndex: 'putQty', width: 140, align: 'center' },
+        { title: '入库单价', dataIndex: 'putCost', width: 140, align: 'center' },
+        { title: '小计', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       loadData: [],

+ 73 - 100
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -5,76 +5,19 @@
       <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="bulkWarehousingOrderList-createDate"
-                :disabledDate="disabledDate"
-                v-model="createDate"
-                :format="dateFormat"
-                :placeholder="['开始时间', '结束时间']" />
+            <a-form-item label="产品编号">
+              <a-input id="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入产品编号"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="散件单号">
-              <a-input id="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入散件单号"/>
+            <a-form-item label="关联单号">
+              <a-input id="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入关联单号"/>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <a-select
-                id="bulkWarehousingOrderList-supplierSn"
-                placeholder="请选择供应商"
-                allowClear
-                v-model="queryParam.supplierSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn">{{ item.supplierName }}</a-select-option>
-              </a-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="bulkWarehousingOrderList-state"
-                  code="SPARE_PARTS_PURCHASE"
-                  placeholder="请选择业务状态"
-                  allowClear
-                ></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="财务状态">
-                <v-select
-                  v-model="queryParam.settleState"
-                  ref="settleState"
-                  id="bulkWarehousingOrderList-settleState"
-                  code="FINANCIAL_PAY_STATUS"
-                  placeholder="请选择财务状态"
-                  allowClear
-                ></v-select>
-              </a-form-item>
-            </a-col>
-          </template>
           <a-col :md="6" :sm="24">
             <span class="table-page-search-submitButtons" style="margin-top: 3px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="bulkWarehousingOrderList-reset">重置</a-button>
-              <!-- <a-button
-                style="margin-left: 8px"
-                type="danger"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                id="bulkWarehousingOrderList-export">导出</a-button> -->
-              <a @click="advanced=!advanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
             </span>
           </a-col>
         </a-row>
@@ -83,22 +26,29 @@
     <!-- 操作按钮 -->
     <div class="table-operator">
       <a-button id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      <a-button
+        id="bulkWarehousingOrderList-batchAudit"
+        type="primary"
+        class="button-warning"
+        :loading="loading"
+        @click="handleBatchAudit"
+        style="margin: 0 15px;">批量审核</a-button>
+      <span style="margin-left: 8px">
+        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+      </span>
     </div>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>{{ dataTotalCount }}</strong> 条记录,总数量合计 <strong>{{ productTotal.productTotalQty }}</strong> ,总金额合计¥<strong>{{ productTotal.productTotalCost }}</strong> </div>
-    </a-alert>
     <!-- 列表 -->
     <s-table
       class="sTable"
       ref="table"
       size="default"
+      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
       :scroll="{ x: 1360, y: tableHeight }"
       bordered>
-      <!-- 散件单号 -->
+      <!-- 入库单号 -->
       <template slot="sparePartsPurchaseNo" slot-scope="text, record">
         <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
       </template>
@@ -115,13 +65,6 @@
           @click="handleEdit(record)"
           class="button-info"
           id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_PUT_WAREHOUSE'"
-          @click="handleWarehouse(record)"
-          class="button-primary"
-          id="bulkWarehousingOrderList-warehouse-btn">入库</a-button>
         <a-button
           size="small"
           type="link"
@@ -165,16 +108,21 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '散件单号', scopedSlots: { customRender: 'sparePartsPurchaseNo' }, width: 220, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
-        { title: '供应商', dataIndex: 'supplierName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { 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: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center' },
-        { title: '财务状态', scopedSlots: { customRender: 'settleState' }, width: 100, align: 'center' },
+        { title: '入库单号', scopedSlots: { customRender: 'sparePartsPurchaseNo' }, width: 220, align: 'center' },
+        { title: '商户名称', dataIndex: 'supplierName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { 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: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'stateDictValueNo', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金蝶单号', dataIndex: 'stateDictValuaseNo', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: 'remark', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
       ],
+      selectedRowKeys: [], // Check here to configure the default column
+      selectedRows: [],
+      loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -208,11 +156,20 @@ export default {
       dataTotalCount: '' //  列表数据总条数
     }
   },
+  computed: {
+    hasSelected () {
+      return this.selectedRowKeys.length > 0
+    }
+  },
   methods: {
     // 不可选日期
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()
     },
+    onSelectChange (selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
     // 合计
     getTotal (param) {
       sparePartsPurCount(param).then(res => {
@@ -233,32 +190,15 @@ export default {
     },
     //  基本信息  保存
     handleOk (row) {
-      this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/add/${row.id}/${row.sparePartsPurchaseSn}` })
+      this.$router.push({ path: `/purchasingManagement/bulkWarehousingOrder/add/${row.id}/${row.sparePartsPurchaseSn}` })
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/edit/${row.id}/${row.sparePartsPurchaseSn}` })
+      this.$router.push({ path: `/purchasingManagement/bulkWarehousingOrder/edit/${row.id}/${row.sparePartsPurchaseSn}` })
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/detail/${row.id}/${row.sparePartsPurchaseSn}` })
-    },
-    //  入库
-    handleWarehouse (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定要入库吗?',
-        centered: true,
-        onOk () {
-          sparePartsPurPut({ id: row.id }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-            }
-          })
-        }
-      })
+      this.$router.push({ path: `/purchasingManagement/bulkWarehousingOrder/detail/${row.id}/${row.sparePartsPurchaseSn}` })
     },
     //  删除
     handleDel (row) {
@@ -286,6 +226,39 @@ export default {
       this.createDate = undefined
       this.$refs.table.refresh(true)
     },
+    // 批量审核
+    handleBatchAudit () {
+      const _this = this
+      if (_this.selectedRowKeys.length < 1) {
+        _this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
+      let num = 0
+      const obj = []
+      _this.selectedRows.map(item => {
+        if (item.state == 'WAIT') {
+          num++
+          obj.push(item.productSn)
+        }
+      })
+      if (num < 1) {
+        _this.$message.warning('当前数据不可操作!')
+        return
+      }
+      this.$confirm({
+        title: '提示',
+        content: '已选有效数据' + num + '条,确认要批量审核吗?',
+        centered: true,
+        onOk () {
+          // productBatchAudit({ snList: obj }).then(res => {
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0