|
@@ -20,7 +20,7 @@
|
|
<a-collapse-panel key="1" header="选择产品">
|
|
<a-collapse-panel key="1" header="选择产品">
|
|
<!-- 筛选条件 -->
|
|
<!-- 筛选条件 -->
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
- <a-form layout="inline" @keyup.enter.native="getProductList(1)">
|
|
|
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
@@ -75,9 +75,9 @@
|
|
</a-col>
|
|
</a-col>
|
|
</template>
|
|
</template>
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
- <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="warehouseAllocationList-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationList-reset">重置</a-button>
|
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehouseAllocationList-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationList-reset">重置</a-button>
|
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
</a>
|
|
</a>
|
|
@@ -86,17 +86,16 @@
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <a-table
|
|
|
|
|
|
+ <s-table
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="table"
|
|
ref="table"
|
|
size="small"
|
|
size="small"
|
|
:rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
|
|
:rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:customRow="handleClickRow"
|
|
:customRow="handleClickRow"
|
|
- :dataSource="loadData"
|
|
|
|
- :scroll="{ x: 1880, y: 300 }"
|
|
|
|
- :loading="loading"
|
|
|
|
- :pagination="false"
|
|
|
|
|
|
+ :data="loadData"
|
|
|
|
+ :defaultLoadData="false"
|
|
|
|
+ :scroll="{ x: 1330, y: 300 }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 产品分类 -->
|
|
<!-- 产品分类 -->
|
|
<template slot="productType" slot-scope="text, record">
|
|
<template slot="productType" slot-scope="text, record">
|
|
@@ -125,16 +124,7 @@
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="warehouseAllocationEdit-add-btn">添加</a-button>
|
|
<a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="warehouseAllocationEdit-add-btn">添加</a-button>
|
|
</template>
|
|
</template>
|
|
- </s-table>
|
|
|
|
- </a-table>
|
|
|
|
- <!-- 分页 -->
|
|
|
|
- <tablePagination
|
|
|
|
- ref="tablePagination"
|
|
|
|
- :total="paginationProps.total"
|
|
|
|
- :current="paginationProps.current"
|
|
|
|
- :pageSize="paginationProps.pageSize"
|
|
|
|
- @changePageSize="changePageSize"
|
|
|
|
- @changePage="changePage" />
|
|
|
|
|
|
+ </s-table>
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
</a-collapse>
|
|
</a-collapse>
|
|
</a-card>
|
|
</a-card>
|
|
@@ -154,7 +144,7 @@
|
|
<a-row :gutter="15" justify="space-between">
|
|
<a-row :gutter="15" justify="space-between">
|
|
<a-col :span="17">
|
|
<a-col :span="17">
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
- <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
|
|
|
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="9" :sm="24">
|
|
<a-col :md="9" :sm="24">
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
@@ -167,7 +157,7 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
- <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="warehouseAllocationList-refresh">查询</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="warehouseAllocationList-refresh">查询</a-button>
|
|
<a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="warehouseAllocationList-reset">重置</a-button>
|
|
<a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="warehouseAllocationList-reset">重置</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -182,16 +172,14 @@
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <a-table
|
|
|
|
|
|
+ <s-table
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="chooseTable"
|
|
ref="chooseTable"
|
|
size="small"
|
|
size="small"
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="chooseColumns"
|
|
:columns="chooseColumns"
|
|
- :dataSource="chooseLoadData"
|
|
|
|
- :scroll="{ x: 1680, y: 300 }"
|
|
|
|
- :loading="chooseLoading"
|
|
|
|
- :pagination="false"
|
|
|
|
|
|
+ :data="chooseLoadData"
|
|
|
|
+ :scroll="{ x: 1130, y: 300 }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 产品分类 -->
|
|
<!-- 产品分类 -->
|
|
<template slot="productType" slot-scope="text, record">
|
|
<template slot="productType" slot-scope="text, record">
|
|
@@ -227,47 +215,34 @@
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="warehouseAllocationEdit-del-btn">删除</a-button>
|
|
<a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="warehouseAllocationEdit-del-btn">删除</a-button>
|
|
</template>
|
|
</template>
|
|
- </a-table>
|
|
|
|
- <!-- 分页 -->
|
|
|
|
- <tablePagination
|
|
|
|
- ref="chooseTablePagination"
|
|
|
|
- :total="choosePaginationProps.total"
|
|
|
|
- :current="choosePaginationProps.current"
|
|
|
|
- :pageSize="choosePaginationProps.pageSize"
|
|
|
|
- @changePageSize="changeChoosePageSize"
|
|
|
|
- @changePage="changeChoosePage" />
|
|
|
|
|
|
+ </s-table>
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
</a-collapse>
|
|
</a-collapse>
|
|
</a-card>
|
|
</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>
|
|
|
|
</a-spin>
|
|
</a-spin>
|
|
|
|
+ <div class="affix-cont">
|
|
|
|
+ <a-button
|
|
|
|
+ type="primary"
|
|
|
|
+ id="warehouseAllocationEdit-submit"
|
|
|
|
+ size="large"
|
|
|
|
+ class="button-primary"
|
|
|
|
+ @click="handleSubmit"
|
|
|
|
+ style="padding: 0 60px;">提交</a-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
-import tablePagination from '@/views/common/tablePagination.vue'
|
|
|
|
import { allocWarehouseDetailList, allocWarehouseDetail, productQuery, allocWarehouseDetailCount, allocWarehouseDetailSave, allocWarehouseDetailDel, allocWarehouseSubmit } from '@/api/allocWarehouse'
|
|
import { allocWarehouseDetailList, allocWarehouseDetail, productQuery, allocWarehouseDetailCount, allocWarehouseDetailSave, allocWarehouseDetailDel, allocWarehouseSubmit } from '@/api/allocWarehouse'
|
|
import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
|
|
import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
|
|
import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
import { warehouseLocAllList } from '@/api/warehouse'
|
|
import { warehouseLocAllList } from '@/api/warehouse'
|
|
-
|
|
|
|
export default {
|
|
export default {
|
|
- components: { STable, VSelect, tablePagination },
|
|
|
|
|
|
+ components: { STable, VSelect },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
- loading: false,
|
|
|
|
chooseLoading: false,
|
|
chooseLoading: false,
|
|
queryParam: {
|
|
queryParam: {
|
|
productCode: '',
|
|
productCode: '',
|
|
@@ -293,45 +268,66 @@ export default {
|
|
warehouseOutLocData: [], // 调出仓位 下拉数据
|
|
warehouseOutLocData: [], // 调出仓位 下拉数据
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center', ellipsis: true },
|
|
|
|
- { title: '调出仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: 140, align: 'center' },
|
|
|
|
- { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 140, align: 'center' },
|
|
|
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '分类', scopedSlots: { customRender: 'productType' }, width: 100, align: 'center', ellipsis: true },
|
|
|
|
+ { title: '调出仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: 100, align: 'center' },
|
|
|
|
+ { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 100, align: 'center' },
|
|
{ title: '可用库存数', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '可用库存数', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '冻结库存数', dataIndex: 'freezeQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '冻结库存数', dataIndex: 'freezeQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
|
|
|
+ { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
- loadData: [],
|
|
|
|
- paginationProps: {
|
|
|
|
- total: 0, // 分页总条数
|
|
|
|
- current: 1,
|
|
|
|
- pageSize: 20
|
|
|
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
|
+ loadData: parameter => {
|
|
|
|
+ this.disabled = true
|
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
|
+ params.enabledFlag = 1
|
|
|
|
+ params.warehouseSn = this.basicInfoData.outWarehouseSn
|
|
|
|
+ return productQuery(params).then(res => {
|
|
|
|
+ const data = res.data
|
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
|
+ }
|
|
|
|
+ this.disabled = false
|
|
|
|
+ return data
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 表头
|
|
// 表头
|
|
chooseColumns: [
|
|
chooseColumns: [
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center', ellipsis: true },
|
|
|
|
- { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: 140, align: 'center' },
|
|
|
|
- { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 140, align: 'center' },
|
|
|
|
- { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '分类', scopedSlots: { customRender: 'productType' }, width: 100, align: 'center' },
|
|
|
|
+ { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: 100, align: 'center' },
|
|
|
|
+ { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 100, align: 'center' },
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
- chooseLoadData: [],
|
|
|
|
- choosePaginationProps: {
|
|
|
|
- total: 0, // 分页总条数
|
|
|
|
- current: 1,
|
|
|
|
- pageSize: 20
|
|
|
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
|
+ chooseLoadData: parameter => {
|
|
|
|
+ this.chooseDisabled = true
|
|
|
|
+ const params = Object.assign(parameter, this.chooseQueryParam, { allocationWarehouseSn: this.$route.params.sn })
|
|
|
|
+ return allocWarehouseDetailList(params).then(res => {
|
|
|
|
+ this.getDetailCount(Object.assign(params, this.chooseQueryParam))
|
|
|
|
+ const data = res.data
|
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
|
+ data.list[i].outQty = data.list[i].allocationQty
|
|
|
|
+ data.list[i].outQtyBackups = data.list[i].allocationQty
|
|
|
|
+ }
|
|
|
|
+ this.chooseDisabled = false
|
|
|
|
+ return data
|
|
|
|
+ })
|
|
},
|
|
},
|
|
basicInfoData: null, // 基本信息
|
|
basicInfoData: null, // 基本信息
|
|
productTotal: null // 合计
|
|
productTotal: null // 合计
|
|
@@ -349,10 +345,7 @@ export default {
|
|
this.queryParam.productTypeSn3 = undefined
|
|
this.queryParam.productTypeSn3 = undefined
|
|
this.queryParam.warehouseLocationSn = undefined
|
|
this.queryParam.warehouseLocationSn = undefined
|
|
this.productType = []
|
|
this.productType = []
|
|
- this.paginationProps.total = 0
|
|
|
|
- this.paginationProps.current = 1
|
|
|
|
- this.paginationProps.pageSize = 20
|
|
|
|
- this.getProductList(1)
|
|
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
// 双击快速添加
|
|
// 双击快速添加
|
|
handleClickRow (record) {
|
|
handleClickRow (record) {
|
|
@@ -368,17 +361,14 @@ export default {
|
|
chooseResetSearchForm () {
|
|
chooseResetSearchForm () {
|
|
this.chooseQueryParam.productCode = ''
|
|
this.chooseQueryParam.productCode = ''
|
|
this.chooseQueryParam.productName = ''
|
|
this.chooseQueryParam.productName = ''
|
|
- this.choosePaginationProps.total = 0
|
|
|
|
- this.choosePaginationProps.current = 1
|
|
|
|
- this.choosePaginationProps.pageSize = 20
|
|
|
|
- this.getChooseProductList(1)
|
|
|
|
|
|
+ this.$refs.chooseTable.refresh(true)
|
|
},
|
|
},
|
|
// 基本信息
|
|
// 基本信息
|
|
getDetail () {
|
|
getDetail () {
|
|
allocWarehouseDetail({ id: this.$route.params.id }).then(res => {
|
|
allocWarehouseDetail({ id: this.$route.params.id }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.basicInfoData = res.data
|
|
this.basicInfoData = res.data
|
|
- this.getProductList(1)
|
|
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
this.getWarehouseLoc(res.data.putWarehouseSn, 'put')
|
|
this.getWarehouseLoc(res.data.putWarehouseSn, 'put')
|
|
this.getWarehouseLoc(res.data.outWarehouseSn, 'out')
|
|
this.getWarehouseLoc(res.data.outWarehouseSn, 'out')
|
|
} else {
|
|
} else {
|
|
@@ -422,8 +412,8 @@ export default {
|
|
allocWarehouseDetailSave(params).then(res => {
|
|
allocWarehouseDetailSave(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.$message.success(res.message)
|
|
this.$message.success(res.message)
|
|
- this.getProductList()
|
|
|
|
- this.getChooseProductList()
|
|
|
|
|
|
+ this.$refs.table.refresh()
|
|
|
|
+ this.$refs.chooseTable.refresh()
|
|
this.spinning = false
|
|
this.spinning = false
|
|
} else {
|
|
} else {
|
|
this.spinning = false
|
|
this.spinning = false
|
|
@@ -449,8 +439,8 @@ export default {
|
|
allocWarehouseDetailDel(params).then(res => {
|
|
allocWarehouseDetailDel(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
- _this.getProductList()
|
|
|
|
- _this.getChooseProductList()
|
|
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ _this.$refs.chooseTable.refresh()
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
} else {
|
|
} else {
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
@@ -493,90 +483,6 @@ export default {
|
|
handleBack () {
|
|
handleBack () {
|
|
this.$router.push({ path: '/allocationManagement/warehouseAllocation/list', query: { closeLastOldTab: true } })
|
|
this.$router.push({ path: '/allocationManagement/warehouseAllocation/list', query: { closeLastOldTab: true } })
|
|
},
|
|
},
|
|
- // 产品列表数据
|
|
|
|
- getProductList (pageNo) {
|
|
|
|
- this.disabled = true
|
|
|
|
- this.loading = true
|
|
|
|
- this.paginationProps.current = pageNo || this.paginationProps.current
|
|
|
|
- const params = Object.assign({ pageNo: this.paginationProps.current, pageSize: this.paginationProps.pageSize }, this.queryParam)
|
|
|
|
- params.enabledFlag = 1
|
|
|
|
- params.warehouseSn = this.basicInfoData.outWarehouseSn
|
|
|
|
- productQuery(params).then(res => {
|
|
|
|
- this.loading = false
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- const data = res.data
|
|
|
|
- this.paginationProps.total = Number(res.data.count) || 0
|
|
|
|
- this.paginationProps.current = data.pageNo
|
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
|
- data.list[i].no = no + i + 1
|
|
|
|
- }
|
|
|
|
- this.loadData = data.list
|
|
|
|
- this.disabled = false
|
|
|
|
- } else {
|
|
|
|
- this.paginationProps.total = 0
|
|
|
|
- this.paginationProps.current = 1
|
|
|
|
- this.paginationProps.pageSize = 20
|
|
|
|
- this.loadData = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 分页 一页多少条change
|
|
|
|
- changePageSize (current, pageSize) {
|
|
|
|
- this.paginationProps.current = current
|
|
|
|
- this.paginationProps.pageSize = pageSize
|
|
|
|
- this.getProductList()
|
|
|
|
- },
|
|
|
|
- // 分页 页码change
|
|
|
|
- changePage (current) {
|
|
|
|
- this.paginationProps.current = current
|
|
|
|
- this.getProductList()
|
|
|
|
- },
|
|
|
|
- // 已选产品 分页 一页多少条change
|
|
|
|
- changeChoosePageSize (current, pageSize) {
|
|
|
|
- this.choosePaginationProps.current = current
|
|
|
|
- this.choosePaginationProps.pageSize = pageSize
|
|
|
|
- this.getChooseProductList()
|
|
|
|
- },
|
|
|
|
- // 已选产品 分页 页码change
|
|
|
|
- changeChoosePage (current) {
|
|
|
|
- this.choosePaginationProps.current = current
|
|
|
|
- this.getChooseProductList()
|
|
|
|
- },
|
|
|
|
- // 已选产品列表数据
|
|
|
|
- getChooseProductList (pageNo) {
|
|
|
|
- this.choosePaginationProps.current = this.choosePaginationProps.current || pageNo
|
|
|
|
- this.chooseDisabled = true
|
|
|
|
- this.chooseLoading = true
|
|
|
|
- const params = {
|
|
|
|
- pageNo: this.choosePaginationProps.current,
|
|
|
|
- pageSize: this.choosePaginationProps.pageSize,
|
|
|
|
- allocationWarehouseSn: this.$route.params.sn
|
|
|
|
- }
|
|
|
|
- allocWarehouseDetailList(Object.assign(params, this.chooseQueryParam)).then(res => {
|
|
|
|
- this.chooseLoading = false
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- // 合计
|
|
|
|
- this.getDetailCount(Object.assign(params, this.chooseQueryParam))
|
|
|
|
- const data = res.data
|
|
|
|
- this.choosePaginationProps.total = Number(res.data.count) || 0
|
|
|
|
- this.choosePaginationProps.current = data.pageNo
|
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
|
- data.list[i].no = no + i + 1
|
|
|
|
- data.list[i].outQty = data.list[i].allocationQty
|
|
|
|
- data.list[i].outQtyBackups = data.list[i].allocationQty
|
|
|
|
- }
|
|
|
|
- this.chooseLoadData = data.list
|
|
|
|
- this.chooseDisabled = false
|
|
|
|
- } else {
|
|
|
|
- this.choosePaginationProps.total = 0
|
|
|
|
- this.choosePaginationProps.current = 1
|
|
|
|
- this.choosePaginationProps.pageSize = 20
|
|
|
|
- this.chooseLoadData = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 已选产品 调出数量 blur
|
|
// 已选产品 调出数量 blur
|
|
outQtyBlur (val, record) {
|
|
outQtyBlur (val, record) {
|
|
// 光标移出,值发生改变再调用编辑接口
|
|
// 光标移出,值发生改变再调用编辑接口
|
|
@@ -586,7 +492,6 @@ export default {
|
|
},
|
|
},
|
|
// 已选产品 仓位 change
|
|
// 已选产品 仓位 change
|
|
chooseWarehouseLocChange (record) {
|
|
chooseWarehouseLocChange (record) {
|
|
- console.log('调入仓位--------------')
|
|
|
|
this.handleAdd(record, 'edit')
|
|
this.handleAdd(record, 'edit')
|
|
},
|
|
},
|
|
// 产品分类 change
|
|
// 产品分类 change
|
|
@@ -635,7 +540,6 @@ export default {
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {
|
|
next(vm => {
|
|
vm.getDetail()
|
|
vm.getDetail()
|
|
- vm.getChooseProductList(1)
|
|
|
|
vm.getProductBrand()
|
|
vm.getProductBrand()
|
|
vm.getProductType()
|
|
vm.getProductType()
|
|
})
|
|
})
|
|
@@ -645,29 +549,16 @@ export default {
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
.warehouseAllocationEdit-wrap{
|
|
.warehouseAllocationEdit-wrap{
|
|
- .warehouseAllocationEdit-back{
|
|
|
|
|
|
+ position: relative;
|
|
|
|
+ height: 100%;
|
|
|
|
+ padding-bottom: 51px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ .warehouseAllocationEdit-back, .warehouseAllocationEdit-cont{
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
}
|
|
}
|
|
- .warehouseAllocationEdit-cont{
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
- .sub-title{
|
|
|
|
- font-size: 12px;
|
|
|
|
- color: #808695;
|
|
|
|
- margin-left: 10px;
|
|
|
|
- }
|
|
|
|
- .tag-txt{
|
|
|
|
- font-size: 12px;
|
|
|
|
- color: #ed1c24;
|
|
|
|
- }
|
|
|
|
- .edit-circle-btn{
|
|
|
|
- margin-left: 15px;
|
|
|
|
- i{
|
|
|
|
- vertical-align: text-bottom;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .import-btn{
|
|
|
|
- margin-left: 15px;
|
|
|
|
- }
|
|
|
|
|
|
+ >.ant-spin-nested-loading{
|
|
|
|
+ overflow-y: scroll;
|
|
|
|
+ height: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|