|
@@ -1,96 +1,98 @@
|
|
<template>
|
|
<template>
|
|
<div class="inventoryQueryWarehouseDetail-wrap">
|
|
<div class="inventoryQueryWarehouseDetail-wrap">
|
|
- <a-page-header :ghost="false" :backIcon="false" class="inventoryQueryWarehouseDetail-back">
|
|
|
|
- <!-- 自定义的二级文字标题 -->
|
|
|
|
- <template slot="subTitle">
|
|
|
|
- <a id="inventoryQueryWarehouseDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
|
- </template>
|
|
|
|
- </a-page-header>
|
|
|
|
- <a-card size="small" :bordered="false" class="inventoryQueryWarehouseDetail-cont">
|
|
|
|
- <!-- 搜索条件 -->
|
|
|
|
- <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
- <a-row :gutter="15">
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="变动类型">
|
|
|
|
- <v-select
|
|
|
|
- v-model="queryParam.flowType"
|
|
|
|
- ref="flowType"
|
|
|
|
- id="warehousingAuditList-flowType"
|
|
|
|
- code="STOCK_FLOW_TYPE"
|
|
|
|
- placeholder="请选择变动类型"
|
|
|
|
- allowClear></v-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="单据类型">
|
|
|
|
- <v-select
|
|
|
|
- v-model="queryParam.bizType"
|
|
|
|
- ref="bizType"
|
|
|
|
- id="inventoryQueryWarehouseDetail-bizType"
|
|
|
|
- code="STOCK_FLOW_BIZ_TYPE"
|
|
|
|
- placeholder="请选择单据类型"
|
|
|
|
- allowClear></v-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="仓库">
|
|
|
|
- <a-select id="inventoryQueryWarehouseDetail-warehouseSn" placeholder="请选择仓库" allowClear 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 v-if="advanced">
|
|
|
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="inventoryQueryWarehouseDetail-back">
|
|
|
|
+ <!-- 自定义的二级文字标题 -->
|
|
|
|
+ <template slot="subTitle">
|
|
|
|
+ <a id="inventoryQueryWarehouseDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
|
+ </template>
|
|
|
|
+ </a-page-header>
|
|
|
|
+ <a-card size="small" :bordered="false" class="inventoryQueryWarehouseDetail-cont">
|
|
|
|
+ <!-- 搜索条件 -->
|
|
|
|
+ <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
+ <a-row :gutter="15">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="变动类型">
|
|
|
|
+ <v-select
|
|
|
|
+ v-model="queryParam.flowType"
|
|
|
|
+ ref="flowType"
|
|
|
|
+ id="warehousingAuditList-flowType"
|
|
|
|
+ code="STOCK_FLOW_TYPE"
|
|
|
|
+ placeholder="请选择变动类型"
|
|
|
|
+ allowClear></v-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="单据审核时间">
|
|
|
|
- <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
|
|
|
+ <a-form-item label="单据类型">
|
|
|
|
+ <v-select
|
|
|
|
+ v-model="queryParam.bizType"
|
|
|
|
+ ref="bizType"
|
|
|
|
+ id="inventoryQueryWarehouseDetail-bizType"
|
|
|
|
+ code="STOCK_FLOW_BIZ_TYPE"
|
|
|
|
+ placeholder="请选择单据类型"
|
|
|
|
+ allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="单位名称">
|
|
|
|
- <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitName" allowClear placeholder="请输入单位名称"/>
|
|
|
|
|
|
+ <a-form-item label="仓库">
|
|
|
|
+ <a-select id="inventoryQueryWarehouseDetail-warehouseSn" placeholder="请选择仓库" allowClear 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-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- </template>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-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>
|
|
|
|
- <!-- 合计 -->
|
|
|
|
- <a-alert type="info" style="margin-bottom:10px">
|
|
|
|
- <div class="ftext" slot="message">
|
|
|
|
- 当前库存总数量(个):<strong>{{ (productTotal&&(productTotal.currentStockQty || productTotal.currentStockQty==0)) ? productTotal.currentStockQty : '--' }}</strong>;
|
|
|
|
- 当前库存总成本(¥):<strong>{{ (productTotal&&(productTotal.currentStockCost || productTotal.currentStockCost==0)) ? productTotal.currentStockCost : '--' }}</strong>。
|
|
|
|
|
|
+ <template v-if="advanced">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="单据审核时间">
|
|
|
|
+ <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="单位名称">
|
|
|
|
+ <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitName" allowClear placeholder="请输入单位名称"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ </template>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-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>
|
|
- </a-alert>
|
|
|
|
- <!-- 列表 -->
|
|
|
|
- <s-table
|
|
|
|
- class="sTable fixPagination"
|
|
|
|
- ref="table"
|
|
|
|
- :style="{ height: tableHeight+84.5+'px' }"
|
|
|
|
- size="small"
|
|
|
|
- :rowKey="(record) => record.id"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="loadData"
|
|
|
|
- :scroll="{ y: tableHeight }"
|
|
|
|
- :defaultLoadData="false"
|
|
|
|
- bordered>
|
|
|
|
- <!-- 数量 -->
|
|
|
|
- <template slot="qty" slot-scope="text, record">
|
|
|
|
- <p :class="record.flowType=='PUT' ? 'green':'red'" style="margin: 0;">
|
|
|
|
- <span v-if="record.qty!=0">{{ record.flowType=='PUT' ? '+':'-' }}</span>
|
|
|
|
- {{ record.qty }}
|
|
|
|
- </p>
|
|
|
|
- </template>
|
|
|
|
- </s-table>
|
|
|
|
- </a-card>
|
|
|
|
|
|
+ <!-- 合计 -->
|
|
|
|
+ <a-alert type="info" style="margin-bottom:10px">
|
|
|
|
+ <div class="ftext" slot="message">
|
|
|
|
+ 当前库存总数量(个):<strong>{{ (productTotal&&(productTotal.currentStockQty || productTotal.currentStockQty==0)) ? productTotal.currentStockQty : '--' }}</strong>;
|
|
|
|
+ 当前库存总成本(¥):<strong>{{ (productTotal&&(productTotal.currentStockCost || productTotal.currentStockCost==0)) ? productTotal.currentStockCost : '--' }}</strong>。
|
|
|
|
+ </div>
|
|
|
|
+ </a-alert>
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <s-table
|
|
|
|
+ class="sTable fixPagination"
|
|
|
|
+ ref="table"
|
|
|
|
+ :style="{ height: tableHeight+84.5+'px' }"
|
|
|
|
+ size="small"
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ :scroll="{ y: tableHeight }"
|
|
|
|
+ :defaultLoadData="false"
|
|
|
|
+ bordered>
|
|
|
|
+ <!-- 数量 -->
|
|
|
|
+ <template slot="qty" slot-scope="text, record">
|
|
|
|
+ <p :class="record.flowType=='PUT' ? 'green':'red'" style="margin: 0;">
|
|
|
|
+ <span v-if="record.qty!=0">{{ record.flowType=='PUT' ? '+':'-' }}</span>
|
|
|
|
+ {{ record.qty }}
|
|
|
|
+ </p>
|
|
|
|
+ </template>
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-card>
|
|
|
|
+ </a-spin>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -104,6 +106,7 @@ export default {
|
|
components: { STable, VSelect, rangeDate },
|
|
components: { STable, VSelect, rangeDate },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
|
|
+ spinning: false,
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
@@ -133,20 +136,25 @@ export default {
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
|
|
+ this.spinning = true
|
|
const params = Object.assign(parameter, this.queryParam, { productSn: this.$route.params.sn })
|
|
const params = Object.assign(parameter, this.queryParam, { productSn: this.$route.params.sn })
|
|
return stockFlowList(params).then(res => {
|
|
return stockFlowList(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
|
|
|
|
- if (data.list[i].flowType == 'PUT') {
|
|
|
|
- data.list[i].qty = data.list[i].putQty
|
|
|
|
- } else if (data.list[i].flowType == 'OUT') {
|
|
|
|
- data.list[i].qty = data.list[i].outQty
|
|
|
|
|
|
+ let data
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ data = res.data
|
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
|
+ if (data.list[i].flowType == 'PUT') {
|
|
|
|
+ data.list[i].qty = data.list[i].putQty
|
|
|
|
+ } else if (data.list[i].flowType == 'OUT') {
|
|
|
|
+ data.list[i].qty = data.list[i].outQty
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ this.disabled = false
|
|
|
|
+ this.getTotal(params)
|
|
}
|
|
}
|
|
- this.disabled = false
|
|
|
|
- this.getTotal(params)
|
|
|
|
|
|
+ this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|