|
@@ -1,326 +1,685 @@
|
|
|
<template>
|
|
|
- <div class="selfDisk-wrap">
|
|
|
- <a-page-header :ghost="false" @back="handleBack" class="selfDisk-back">
|
|
|
- <!-- 自定义的二级文字标题 -->
|
|
|
- <template slot="subTitle">
|
|
|
- <a id="selfDisk-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
|
|
|
- </template>
|
|
|
- </a-page-header>
|
|
|
- <!-- 选择产品 -->
|
|
|
- <a-card size="small" :bordered="false" class="selfDisk-cont">
|
|
|
- <a-collapse :activeKey="['1']">
|
|
|
- <a-collapse-panel key="1">
|
|
|
- <template slot="header">选择产品</template>
|
|
|
- <!-- 选择产品 -->
|
|
|
- <div>
|
|
|
- <!-- 搜索条件 -->
|
|
|
- <div class="table-page-search-wrapper">
|
|
|
+ <div class="inventoryCheckSelfDiskList-wrap">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="inventoryCheckSelfDiskList-back" >
|
|
|
+ <!-- 自定义的二级文字标题 -->
|
|
|
+ <template slot="subTitle">
|
|
|
+ <a id="inventoryCheckSelfDiskList-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
+ <span class="billno">单号:{{ basicInfoData&&basicInfoData.checkWarehouseNo }}</span>
|
|
|
+ <a-tag color="blue">{{ basicInfoData&&basicInfoData.stateDictValue }}</a-tag>
|
|
|
+ </template>
|
|
|
+ </a-page-header>
|
|
|
+ <!-- 基础信息 -->
|
|
|
+ <a-card size="small" :bordered="false" class="inventoryCheckSelfDiskList-cont">
|
|
|
+ <a-collapse>
|
|
|
+ <a-collapse-panel key="1" header="基础信息">
|
|
|
+ <a-descriptions :column="3">
|
|
|
+ <a-descriptions-item label="盘点类型">{{ (basicInfoData&&basicInfoData.checkTypeDictValue) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="是否区分仓库">{{ (basicInfoData&&basicInfoData.warehouseFlagDictValue) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="盘点仓库" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">{{ (basicInfoData&&basicInfoData.warehouseNameList) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="创建人">{{ (basicInfoData&&basicInfoData.creatorName) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="创建时间">{{ (basicInfoData&&basicInfoData.createDate) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="审核时间">{{ (basicInfoData&&basicInfoData.checkSuperviseTime) || '--' }}</a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ </a-collapse-panel>
|
|
|
+ </a-collapse>
|
|
|
+ </a-card>
|
|
|
+ <a-card size="small" :bordered="false" class="inventoryCheckSelfDiskList-cont">
|
|
|
+ <!-- 筛选条件 -->
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-row>
|
|
|
+ <a-col :md="20" :sm="24">
|
|
|
<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="selfDisk-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="产品名称/产品编码/原厂编码"/>
|
|
|
+ <a-form-item label="产品编码/产品名称" prop="productCode">
|
|
|
+ <a-input id="inventoryCheckSelfDiskList-productCode" v-model="queryParam.productCode" placeholder="请输入" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品品牌">
|
|
|
- <a-select
|
|
|
- placeholder="请选择"
|
|
|
- id="selfDisk-state"
|
|
|
- allowClear
|
|
|
- v-model="queryParam.dataSourceNo"
|
|
|
- :showSearch="true"
|
|
|
- option-filter-prop="children"
|
|
|
- :filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
- </a-select>
|
|
|
+ <ProductBrand id="inventoryCheckSelfDiskList-productBrand" v-model="queryParam.brandSn"></ProductBrand>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品分类">
|
|
|
- <a-cascader :options="typeData" expand-trigger="hover" id="selfDisk-state" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
|
|
|
+ <ProductType id="inventoryCheckSelfDiskList-productType" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <template v-if="advanced">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="库存">
|
|
|
- <a-select
|
|
|
- placeholder="请选择"
|
|
|
- id="selfDisk-state"
|
|
|
- allowClear
|
|
|
- v-model="queryParam.dataSourceNo"
|
|
|
- :showSearch="true"
|
|
|
- option-filter-prop="children"
|
|
|
- :filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
+ <template v-if="advanced && basicInfoData&&basicInfoData.warehouseFlag=='1'">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="仓库">
|
|
|
- <a-select
|
|
|
- placeholder="请选择"
|
|
|
- id="selfDisk-state"
|
|
|
- allowClear
|
|
|
- v-model="queryParam.dataSourceNo"
|
|
|
- :showSearch="true"
|
|
|
- option-filter-prop="children"
|
|
|
- :filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ <a-select id="inventoryCheckSelfDiskList-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
|
|
|
+ <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ </template>
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckSelfDiskList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckSelfDiskList-reset">重置</a-button>
|
|
|
+ <a v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="4" :sm="24" style="text-align: right;">
|
|
|
+ <a-button size="small" type="primary" class="button-info" @click.stop="handleBatchAdd('batch')" id="chainTransferOutEdit-del-all-btn">批量添加</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ class="button-info"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ @click.stop="handleBatchAdd('all')"
|
|
|
+ id="chainTransferOutEdit-del-all-btn">全部添加</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <!-- <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="small"
|
|
|
+ :row-selection="$hasPermissions('B_inventoryWarningBatchSave') ? {
|
|
|
+ selectedRowKeys: selectedRowKeys,
|
|
|
+ onChange: onChange,
|
|
|
+ onSelect: onSelectChange,
|
|
|
+ onSelectAll: onSelectAllChange
|
|
|
+ } : null"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :customRow="handleClickRow"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ x: 1280, y: 300 }"
|
|
|
+ bordered> -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="small"
|
|
|
+ :row-selection="{
|
|
|
+ selectedRowKeys: selectedRowKeys,
|
|
|
+ onChange: onChange,
|
|
|
+ onSelect: onSelectChange,
|
|
|
+ onSelectAll: onSelectAllChange
|
|
|
+ }"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :customRow="handleClickRow"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ x: 1280, y: 300 }"
|
|
|
+ bordered>
|
|
|
+ <!-- 产品分类 -->
|
|
|
+ <template slot="productType" slot-scope="text, record">
|
|
|
+ <span v-if="record.dealerProduct.productTypeName2 || record.dealerProduct.productTypeName3">{{ record.dealerProduct.productTypeName2 }} {{ record.dealerProduct.productTypeName3 ? '>' : '' }} {{ record.dealerProduct.productTypeName3 }}</span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="inventoryCheckSelfDiskList-add-btn">添加</a-button>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-card>
|
|
|
+ <a-card size="small" :bordered="false" class="inventoryCheckSelfDiskList-cont">
|
|
|
+ <!-- 总计 -->
|
|
|
+ <a-alert type="info" style="margin-bottom:10px">
|
|
|
+ <div slot="message">
|
|
|
+ 总款数: <strong>{{ productTotal&&(productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong> ,
|
|
|
+ 总数量: <strong>{{ productTotal&&(productTotal.stockQty || productTotal.stockQty==0) ? productTotal.stockQty : '--' }}</strong> ,
|
|
|
+ 总成本: <strong>{{ productTotal&&(productTotal.checkCost || productTotal.checkCost==0) ? '¥'+productTotal.checkCost : '--' }}</strong>
|
|
|
+ </div>
|
|
|
+ </a-alert>
|
|
|
+ <!-- 筛选条件 -->
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-row>
|
|
|
+ <a-col :md="20" :sm="24">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="产品编码/产品名称" prop="productCode">
|
|
|
+ <a-input id="inventoryCheckSelfDiskList-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入" allowClear />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="产品品牌">
|
|
|
+ <ProductBrand id="inventoryCheckSelfDiskList-productBrand" v-model="chooseQueryParam.brandSn"></ProductBrand>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="产品分类">
|
|
|
+ <ProductType id="inventoryCheckSelfDiskList-productType" @change="changeChooseProductType" v-model="chooseProductType"></ProductType>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <template v-if="chooseAdvanced && basicInfoData&&basicInfoData.warehouseFlag=='1'">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="仓位">
|
|
|
- <a-select
|
|
|
- placeholder="请选择"
|
|
|
- id="selfDisk-state"
|
|
|
- allowClear
|
|
|
- v-model="queryParam.dataSourceNo"
|
|
|
- :showSearch="true"
|
|
|
- option-filter-prop="children"
|
|
|
- :filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ <a-form-item label="仓库">
|
|
|
+ <a-select id="inventoryCheckSelfDiskList-warehouseSn" allowClear placeholder="请选择仓库" v-model="chooseQueryParam.warehouseSn" >
|
|
|
+ <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="selfDisk-refresh">查询</a-button>
|
|
|
- <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="selfDisk-reset">重置</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
+ <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="inventoryCheckSelfDiskList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="inventoryCheckSelfDiskList-reset">重置</a-button>
|
|
|
+ <a v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" @click="chooseAdvanced=!chooseAdvanced" style="margin-left: 5px">
|
|
|
+ {{ chooseAdvanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="chooseAdvanced ? 'up' : 'down'"/>
|
|
|
</a>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
- </div>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable"
|
|
|
- ref="table"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ x: 1420 }"
|
|
|
- bordered>
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="link" @click="handleAdd(record)" id="selfDisk-add-btn">添加</a-button>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </div>
|
|
|
- </a-collapse-panel>
|
|
|
- </a-collapse>
|
|
|
- </a-card>
|
|
|
- <!-- 已选产品 -->
|
|
|
- <a-card size="small" :bordered="false" class="selfDisk-cont">
|
|
|
- <a-collapse :activeKey="['1']">
|
|
|
- <a-collapse-panel key="1">
|
|
|
- <template slot="header">
|
|
|
- 已选产品
|
|
|
- <!-- <a-button size="small" class="import-btn" id="selfDisk-import-btn" @click.stop="handleImport">导入明细</a-button> -->
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="4" :sm="24" style="text-align: right;">
|
|
|
+ <a-button size="small" type="primary" class="button-error" @click.stop="handleDel('', 'batch')" id="chainTransferOutEdit-del-all-btn">批量删除</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ class="button-error"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ @click.stop="handleDel('', 'all')"
|
|
|
+ id="chainTransferOutEdit-del-all-btn">整单删除</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <!-- <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="chooseTable"
|
|
|
+ size="small"
|
|
|
+ :row-selection="$hasPermissions('B_inventoryWarningBatchSave') ? {
|
|
|
+ selectedRowKeys: selectedRowKeys,
|
|
|
+ onChange: onChange,
|
|
|
+ onSelect: onSelectChange,
|
|
|
+ onSelectAll: onSelectAllChange
|
|
|
+ } : null"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ x: 1280, y: 300 }"
|
|
|
+ bordered> -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="chooseTable"
|
|
|
+ size="small"
|
|
|
+ :row-selection="{
|
|
|
+ selectedRowKeys: chooseSelectedRowKeys,
|
|
|
+ onChange: onChooseChange,
|
|
|
+ onSelect: onChooseSelectChange,
|
|
|
+ onSelectAll: onChooseSelectAllChange
|
|
|
+ }"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="chooseColumns"
|
|
|
+ :data="chooseLoadData"
|
|
|
+ :scroll="{ x: 1280, y: 300 }"
|
|
|
+ bordered>
|
|
|
+ <!-- 产品分类 -->
|
|
|
+ <template slot="productType" slot-scope="text, record">
|
|
|
+ <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
|
|
|
+ <span v-else>--</span>
|
|
|
</template>
|
|
|
- <!-- 已选产品 -->
|
|
|
- <div>
|
|
|
- <!-- 总计 -->
|
|
|
- <a-alert type="info" style="margin-bottom:10px">
|
|
|
- <div slot="message">产品款数 <strong>6</strong> ,采购数量合计 <strong>6</strong> ,采购金额合计¥<strong>6.33</strong></div>
|
|
|
- </a-alert>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable"
|
|
|
- ref="table"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- :columns="chooseColumns"
|
|
|
- :data="chooseLoadData"
|
|
|
- :scroll="{ x: 1420 }"
|
|
|
- bordered>
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="selfDisk-del-btn">删除</a-button>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </div>
|
|
|
- </a-collapse-panel>
|
|
|
- </a-collapse>
|
|
|
- </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;">
|
|
|
- <a-button type="primary" id="warehouseAllocationEdit-submit" size="large" class="button-primary" @click="handleSubmit" style="padding: 0 60px;">提交</a-button>
|
|
|
- </div>
|
|
|
- </a-affix>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="inventoryCheckSelfDiskList-del-btn">删除</a-button>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-card>
|
|
|
+ </a-spin>
|
|
|
+ <div class="affix-cont">
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ id="inventoryCheckSelfDiskList-submit"
|
|
|
+ size="large"
|
|
|
+ :disabled="spinning"
|
|
|
+ class="button-primary"
|
|
|
+ @click="handleSubmit"
|
|
|
+ style="padding: 0 60px;">提交</a-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
+import ProductType from '@/views/common/productType.js'
|
|
|
+import ProductBrand from '@/views/common/productBrand.js'
|
|
|
+import { checkWarehouseDetail, checkWarehouseDetailStockList, checkWarehouseDetailList, checkWarehouseDetailCount, checkWarehouseWarehouse, checkWarehouseDetailSave, checkWarehouseDetailSaveBatch, checkWarehouseDetailDel, checkWarehouseSubmit } from '@/api/checkWarehouse'
|
|
|
export default {
|
|
|
- components: { STable, VSelect },
|
|
|
+ components: { STable, VSelect, ProductType, ProductBrand },
|
|
|
+ props: {},
|
|
|
data () {
|
|
|
return {
|
|
|
+ spinning: false,
|
|
|
+ advanced: false, // 高级搜索 展开/关闭
|
|
|
+ chooseAdvanced: false, // 高级搜索 展开/关闭
|
|
|
+ disabled: false,
|
|
|
+ chooseDisabled: false,
|
|
|
queryParam: {
|
|
|
-
|
|
|
+ warehouseSn: undefined,
|
|
|
+ brandSn: undefined,
|
|
|
+ productTypeSn1: undefined,
|
|
|
+ productTypeSn2: undefined,
|
|
|
+ productTypeSn3: undefined
|
|
|
},
|
|
|
- brandData: [], // 产品品牌 下拉数据
|
|
|
- typeData: [], // 产品类别 下拉数据
|
|
|
- advanced: false, // 高级搜索 展开/关闭
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
- // 表头
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'creatDate', width: 140, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '原厂编码', dataIndex: 'totalP', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品品牌', dataIndex: 'custssName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品级别', dataIndex: 'custsdName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '仓库', dataIndex: 'totalNums', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '仓位', dataIndex: 'totalNsums', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '库存数量', dataIndex: 'storageQuantity', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '单位', scopedSlots: { customRender: 'outOfStockNum' }, width: 100, align: 'center' },
|
|
|
- { title: '最后入库时间', scopedSlots: { customRender: 'purchaseNum' }, width: 160, align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
- ],
|
|
|
+ basicInfoData: null, // 基础信息
|
|
|
+ productTotal: null,
|
|
|
// 加载数据方法 必须为 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', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
- ],
|
|
|
- count: 10
|
|
|
- }
|
|
|
+ this.spinning = true
|
|
|
+ return checkWarehouseDetailStockList(Object.assign(parameter, this.queryParam, { checkWarehouseId: this.$route.params.id })).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
|
|
|
- resolve(data)
|
|
|
+ this.listData = data.list || []
|
|
|
+ this.disabled = false
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
})
|
|
|
},
|
|
|
- // 表头
|
|
|
- chooseColumns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'creatDate', width: 140, align: 'center', sorter: true },
|
|
|
- { title: '产品名称', dataIndex: 'custName', align: 'center' },
|
|
|
- { title: '原厂编码', dataIndex: 'totalP', width: 140, align: 'center' },
|
|
|
- { title: '产品品牌', dataIndex: 'custsNasme', width: 100, align: 'center' },
|
|
|
- { title: '产品级别', dataIndex: 'custsNdme', width: 100, align: 'center' },
|
|
|
- { title: '仓库', dataIndex: 'totalNums', width: 100, align: 'center' },
|
|
|
- { title: '仓位', dataIndex: 'totalNsums', width: 100, align: 'center' },
|
|
|
- { title: '库存数量', dataIndex: 'storageQuantity', width: 100, align: 'center' },
|
|
|
- { title: '单位', scopedSlots: { customRender: 'outOfStockNum' }, width: 100, align: 'center' },
|
|
|
- { title: '最后入库时间', scopedSlots: { customRender: 'purchaseNum' }, width: 160, align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
- ],
|
|
|
+ chooseQueryParam: {
|
|
|
+ warehouseSn: undefined,
|
|
|
+ brandSn: undefined,
|
|
|
+ productTypeSn1: undefined,
|
|
|
+ productTypeSn2: undefined,
|
|
|
+ productTypeSn3: undefined
|
|
|
+ },
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
chooseLoadData: 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', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
|
|
|
- { id: '2', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
|
|
|
- { id: '3', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
- ],
|
|
|
- count: 10
|
|
|
- }
|
|
|
+ this.chooseDisabled = true
|
|
|
+ return checkWarehouseDetailList(Object.assign(parameter, this.chooseQueryParam, { checkWarehouseSn: this.$route.params.sn })).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
|
|
|
- resolve(data)
|
|
|
+ this.getDetailCount()
|
|
|
+ this.chooseDisabled = false
|
|
|
+ return data
|
|
|
})
|
|
|
},
|
|
|
- openModal: false // 选择基本信息弹框是否显示
|
|
|
+ productType: [],
|
|
|
+ chooseProductType: [],
|
|
|
+ warehouseList: [], // 仓库 下拉数据
|
|
|
+ selectedRowKeys: [],
|
|
|
+ selectedRows: [],
|
|
|
+ chooseSelectedRowKeys: [],
|
|
|
+ chooseSelectedRows: [],
|
|
|
+ listData: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const arr = [
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140 },
|
|
|
+ { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '库存数量', dataIndex: 'currentQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '最后入库时间', dataIndex: 'lastStockTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
+ ]
|
|
|
+ if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
|
|
|
+ arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
+ }
|
|
|
+ return arr
|
|
|
+ },
|
|
|
+ chooseColumns () {
|
|
|
+ const arr = [
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品品牌', dataIndex: 'brandName', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 180, align: 'center' },
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '库存数量', dataIndex: 'stockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '最后入库时间', dataIndex: 'lastStockTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
+ ]
|
|
|
+ if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
|
|
|
+ arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
+ }
|
|
|
+ return arr
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
- this.queryParam.orderBundleNo = ''
|
|
|
- this.queryParam.orderBundle.custMobile = ''
|
|
|
- this.queryParam.bundleName = ''
|
|
|
- this.queryParam.itemName = ''
|
|
|
- this.oldTime = undefined
|
|
|
- this.newTime = undefined
|
|
|
+ this.queryParam.productCode = ''
|
|
|
+ this.queryParam.productName = ''
|
|
|
+ this.queryParam.warehouseSn = undefined
|
|
|
+ this.queryParam.brandSn = undefined
|
|
|
+ this.queryParam.productTypeSn1 = undefined
|
|
|
+ this.queryParam.productTypeSn2 = undefined
|
|
|
+ this.queryParam.productTypeSn3 = undefined
|
|
|
+ this.productType = []
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- // 提交
|
|
|
- handleSubmit () {},
|
|
|
// 添加
|
|
|
- handleAdd (row) {},
|
|
|
- // 删除
|
|
|
- handleDel (row) {},
|
|
|
- // 编辑基本信息
|
|
|
- handleEditInfo () {
|
|
|
- this.openModal = true
|
|
|
+ handleAdd (row) {
|
|
|
+ const params = {
|
|
|
+ checkWarehouseSn: this.$route.params.sn,
|
|
|
+ checkCost: row.putCost,
|
|
|
+ productSn: row.productSn,
|
|
|
+ productCode: row.productCode,
|
|
|
+ productOrigCode: row.productOrigCode || undefined,
|
|
|
+ productTypeSn1: row.productTypeSn1,
|
|
|
+ productTypeSn2: row.productTypeSn2,
|
|
|
+ productTypeSn3: row.productTypeSn3,
|
|
|
+ brandSn: row.brandSn,
|
|
|
+ stockQty: row.currentQty,
|
|
|
+ lastStockTime: row.lastStockTime,
|
|
|
+ checkProfitLossCost: row.lastStockCost,
|
|
|
+ stockBatchNo: row.stockBatchNo || undefined,
|
|
|
+ productProduceDate: row.productProduceDate || undefined,
|
|
|
+ productExpiryDate: row.productExpiryDate || undefined,
|
|
|
+ warehouseSn: row.warehouseSn || undefined,
|
|
|
+ warehouseLocationSn: row.warehouseLocationSn || undefined
|
|
|
+ }
|
|
|
+ this.spinning = true
|
|
|
+ checkWarehouseDetailSave(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.$message.success(res.message)
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ this.$refs.chooseTable.refresh()
|
|
|
+ this.spinning = false
|
|
|
+ } else {
|
|
|
+ this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- // 基本信息 保存
|
|
|
- handleOk () {
|
|
|
-
|
|
|
+ // 批量添加/全部添加
|
|
|
+ handleBatchAdd (type) {
|
|
|
+ const _this = this
|
|
|
+ let params = {}
|
|
|
+ if (type == 'batch') { // 批量添加
|
|
|
+ if (this.selectedRows.length == 0) {
|
|
|
+ this.$message.warning('请选择需要批量添加的选项值后再操作!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ params.checkWarehouseSn = _this.$route.params.sn
|
|
|
+ params.checkWarehouseDetailEntityList = []
|
|
|
+ this.selectedRows.map(item => {
|
|
|
+ params.checkWarehouseDetailEntityList.push({
|
|
|
+ checkWarehouseSn: _this.$route.params.sn,
|
|
|
+ checkCost: item.putCost,
|
|
|
+ productSn: item.productSn,
|
|
|
+ productCode: item.productCode,
|
|
|
+ productOrigCode: item.productOrigCode || undefined,
|
|
|
+ productTypeSn1: item.productTypeSn1,
|
|
|
+ productTypeSn2: item.productTypeSn2,
|
|
|
+ productTypeSn3: item.productTypeSn3,
|
|
|
+ brandSn: item.brandSn,
|
|
|
+ stockQty: item.currentQty,
|
|
|
+ lastStockTime: item.lastStockTime,
|
|
|
+ checkProfitLossCost: item.lastStockCost,
|
|
|
+ stockBatchNo: item.stockBatchNo || undefined,
|
|
|
+ productProduceDate: item.productProduceDate || undefined,
|
|
|
+ productExpiryDate: item.productExpiryDate || undefined,
|
|
|
+ warehouseSn: item.warehouseSn || undefined,
|
|
|
+ warehouseLocationSn: item.warehouseLocationSn || undefined
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else if (type == 'all') { // 全部添加
|
|
|
+ if (this.listData.length == 0) {
|
|
|
+ this.$message.warning('暂时没有可添加的产品')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ params = {
|
|
|
+ checkWarehouseSn: _this.$route.params.sn,
|
|
|
+ allFlag: true,
|
|
|
+ stockDetailDTO: this.queryParam
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.spinning = true
|
|
|
+ checkWarehouseDetailSaveBatch(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ this.selectedRows = []
|
|
|
+ this.$message.success(res.message)
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ this.$refs.chooseTable.refresh()
|
|
|
+ this.spinning = false
|
|
|
+ } else {
|
|
|
+ this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- // 导入明细
|
|
|
- handleImport () {
|
|
|
- console.log(333)
|
|
|
+ // 删除
|
|
|
+ handleDel (row, isAll) {
|
|
|
+ const _this = this
|
|
|
+ let content
|
|
|
+ if (isAll == 'batch') { // 批量
|
|
|
+ if (this.chooseSelectedRowKeys.length == 0) {
|
|
|
+ this.$message.warning('请选择需要批量删除的选项值后再操作!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ content = '删除后不可恢复,确定要进行批量删除吗?'
|
|
|
+ } else if (isAll == 'all') { // 全部
|
|
|
+ content = '删除后不可恢复,确定要进行整单删除吗?'
|
|
|
+ } else { // 单个
|
|
|
+ content = '删除后不可恢复,确定要进行删除吗?'
|
|
|
+ }
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: content,
|
|
|
+ centered: true,
|
|
|
+ onOk () {
|
|
|
+ _this.spinning = true
|
|
|
+ const params = { checkWarehouseSn: _this.$route.params.sn }
|
|
|
+ if (isAll == 'batch') { // 批量
|
|
|
+ params.idList = _this.chooseSelectedRowKeys
|
|
|
+ } else if (isAll == 'all') { // 全部
|
|
|
+ params.allFlag = true
|
|
|
+ } else { // 单个
|
|
|
+ params.id = row.id
|
|
|
+ }
|
|
|
+ checkWarehouseDetailDel(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ _this.$refs.chooseTable.refresh()
|
|
|
+ if (isAll == 'batch') { // 批量
|
|
|
+ _this.chooseSelectedRowKeys = []
|
|
|
+ _this.chooseSelectedRows = []
|
|
|
+ }
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 返回列表
|
|
|
handleBack () {
|
|
|
this.$router.push({ path: '/inventoryManagement/inventoryChecking/list', query: { closeLastOldTab: true } })
|
|
|
},
|
|
|
- filterOption (input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
+ // 查询基础信息
|
|
|
+ getDetail () {
|
|
|
+ checkWarehouseDetail({ sn: this.$route.params.sn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.basicInfoData = res.data || null
|
|
|
+ } else {
|
|
|
+ this.basicInfoData = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 已选产品 重置
|
|
|
+ chooseResetSearchForm () {
|
|
|
+ this.chooseQueryParam.productCode = ''
|
|
|
+ this.chooseQueryParam.productName = ''
|
|
|
+ this.chooseQueryParam.warehouseSn = undefined
|
|
|
+ this.chooseQueryParam.brandSn = undefined
|
|
|
+ this.chooseQueryParam.productTypeSn1 = undefined
|
|
|
+ this.chooseQueryParam.productTypeSn2 = undefined
|
|
|
+ this.chooseQueryParam.productTypeSn3 = undefined
|
|
|
+ this.chooseProductType = []
|
|
|
+ this.$refs.chooseTable.refresh(true)
|
|
|
+ },
|
|
|
+ // 合计
|
|
|
+ getDetailCount (params) {
|
|
|
+ checkWarehouseDetailCount(Object.assign(this.chooseQueryParam, { checkWarehouseSn: this.$route.params.sn })).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.productTotal = res.data
|
|
|
+ } else {
|
|
|
+ this.productTotal = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 提交
|
|
|
+ handleSubmit () {
|
|
|
+ const _this = this
|
|
|
+ _this.spinning = true
|
|
|
+ checkWarehouseSubmit({ id: this.$route.params.id }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.$message.success(res.message)
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.handleBack()
|
|
|
+ _this.spinning = false
|
|
|
+ }, 1000)
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 产品分类 change
|
|
|
+ changeProductType (val, opt) {
|
|
|
+ this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
|
|
|
+ this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
+ this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
+ },
|
|
|
+ changeChooseProductType (val, opt) {
|
|
|
+ this.chooseQueryParam.productTypeSn1 = val[0] ? val[0] : ''
|
|
|
+ this.chooseQueryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
+ this.chooseQueryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
+ },
|
|
|
+ // 仓库下拉数据
|
|
|
+ getWarehouseList () {
|
|
|
+ checkWarehouseWarehouse({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.warehouseList = res.data
|
|
|
+ } else {
|
|
|
+ this.warehouseList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 双击快速添加
|
|
|
+ handleClickRow (record) {
|
|
|
+ return {
|
|
|
+ on: {
|
|
|
+ dblclick: (event) => {
|
|
|
+ this.handleAdd(record)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onChange (selectedRowKeys, selectedRows) {
|
|
|
+ this.selectedRowKeys = selectedRowKeys
|
|
|
+ },
|
|
|
+ onSelectChange (record, selected, selectedRows, nativeEvent) {
|
|
|
+ const _this = this
|
|
|
+ if (selected) { // 选择
|
|
|
+ this.selectedRows.push(record)
|
|
|
+ } else { // 取消
|
|
|
+ const arrId = []
|
|
|
+ this.selectedRows.map((item, index) => {
|
|
|
+ if (item.id == record.id) {
|
|
|
+ arrId.push(index)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ arrId.map((item, index) => {
|
|
|
+ _this.selectedRows = _this.selectedRows.slice(item, item + 1)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 本页全选/取消全选
|
|
|
+ onSelectAllChange (selected, selectedRows, changeRows) {
|
|
|
+ const _this = this
|
|
|
+ if (selected) { // 选择
|
|
|
+ this.selectedRows = [...this.selectedRows, ...changeRows]
|
|
|
+ } else { // 取消
|
|
|
+ const arrId = []
|
|
|
+ this.selectedRows.map((item, index) => {
|
|
|
+ this.selectedRows.map((subItem, ind) => {
|
|
|
+ if (item.id == subItem.id) {
|
|
|
+ arrId.push(index)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ arrId.map((item, index) => {
|
|
|
+ _this.selectedRows = _this.selectedRows.slice(item, item + 1)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onChooseChange (selectedRowKeys, selectedRows) {
|
|
|
+ this.chooseSelectedRowKeys = selectedRowKeys
|
|
|
+ },
|
|
|
+ onChooseSelectChange (record, selected, selectedRows, nativeEvent) {
|
|
|
+ const _this = this
|
|
|
+ if (selected) { // 选择
|
|
|
+ this.chooseSelectedRows.push(record)
|
|
|
+ } else { // 取消
|
|
|
+ const arrId = []
|
|
|
+ this.chooseSelectedRows.map((item, index) => {
|
|
|
+ if (item.id == record.id) {
|
|
|
+ arrId.push(index)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ arrId.map((item, index) => {
|
|
|
+ _this.chooseSelectedRows = _this.chooseSelectedRows.slice(item, item + 1)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 本页全选/取消全选
|
|
|
+ onChooseSelectAllChange (selected, selectedRows, changeRows) {
|
|
|
+ const _this = this
|
|
|
+ if (selected) { // 选择
|
|
|
+ this.chooseSelectedRows = [...this.chooseSelectedRows, ...changeRows]
|
|
|
+ } else { // 取消
|
|
|
+ const arrId = []
|
|
|
+ this.chooseSelectedRows.map((item, index) => {
|
|
|
+ this.chooseSelectedRows.map((subItem, ind) => {
|
|
|
+ if (item.id == subItem.id) {
|
|
|
+ arrId.push(index)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ arrId.map((item, index) => {
|
|
|
+ _this.chooseSelectedRows = _this.chooseSelectedRows.slice(item, item + 1)
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
- vm.openModal = false
|
|
|
+ vm.getDetail()
|
|
|
+ vm.getWarehouseList()
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
- .selfDisk-wrap{
|
|
|
- .selfDisk-back{
|
|
|
+ .inventoryCheckSelfDiskList-wrap{
|
|
|
+ position: relative;
|
|
|
+ height: 100%;
|
|
|
+ padding-bottom: 51px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .inventoryCheckSelfDiskList-cont, .inventoryCheckSelfDiskList-back{
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
- .selfDisk-cont{
|
|
|
- margin-bottom: 10px;
|
|
|
- .import-btn{
|
|
|
- margin-left: 15px;
|
|
|
- }
|
|
|
+ .billno{
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 0 15px;
|
|
|
+ }
|
|
|
+ >.ant-spin-nested-loading{
|
|
|
+ overflow-y: scroll;
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
}
|
|
|
</style>
|