|
@@ -57,7 +57,7 @@
|
|
|
<a-input id="frozenProductReportList-demanderName" v-model.trim="queryParam.demanderName" allowClear placeholder="请输入单位名称"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <!-- <a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="仓库仓位">
|
|
|
<a-cascader
|
|
|
v-model="queryParam.warehouseCascade"
|
|
@@ -70,6 +70,11 @@
|
|
|
allowClear
|
|
|
style="width: 100%;" />
|
|
|
</a-form-model-item>
|
|
|
+ </a-col> -->
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="仓库仓位">
|
|
|
+ <Warehouse id="frozenProductReportList-warehouseCascade" :showDefault="false" :changeOnSelect="true" ref="warehouse" v-model="queryParam.warehouseCascade"></Warehouse>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
|
|
@@ -123,11 +128,12 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
import ProductType from '../../common/productType.js'
|
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
|
+import Warehouse from '@/views/common/warehouse.js'
|
|
|
// 接口
|
|
|
import { warehouseCascadeList } from '@/api/warehouse'
|
|
|
import { freezeReportPageList, freezeReportExport, freezeReportCount } from '@/api/reportStock'
|
|
|
export default {
|
|
|
- components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
|
|
|
+ components: { STable, VSelect, rangeDate, ProductType, ProductBrand, Warehouse },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
return {
|
|
@@ -159,13 +165,19 @@ export default {
|
|
|
this.disabled = true
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
this.spinning = true
|
|
|
- delete params.warehouseCascade
|
|
|
- return freezeReportPageList(params).then(res => {
|
|
|
+ if (params.warehouseCascade && params.warehouseCascade.length > 0) {
|
|
|
+ // 仓库仓位
|
|
|
+ params.warehouseSn = params.warehouseCascade[0] || undefined
|
|
|
+ params.warehouseLocationSn = params.warehouseCascade[1] || undefined
|
|
|
+ }
|
|
|
+ const newParams = JSON.parse(JSON.stringify(params))
|
|
|
+ delete newParams.warehouseCascade
|
|
|
+ return freezeReportPageList(newParams).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
// 总计
|
|
|
- this.getCount(params)
|
|
|
+ this.getCount(newParams)
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
@@ -283,34 +295,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 仓库仓位 级联 列表
|
|
|
- getWarehouseCascade () {
|
|
|
- warehouseCascadeList({}).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- res.data.map(item => {
|
|
|
- item.sn = item.warehouseSn
|
|
|
- if (item.warehouseLocationList) {
|
|
|
- item.warehouseLocationList.map(subItem => {
|
|
|
- subItem.sn = subItem.warehouseLocationSn
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- this.warehouseCascadeData = res.data
|
|
|
- } else {
|
|
|
- this.warehouseCascadeData = []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 仓库仓位change
|
|
|
- warehouseCascadeChange (val) {
|
|
|
- if (val && val.length > 0) {
|
|
|
- this.queryParam.warehouseSn = val[0] || ''
|
|
|
- this.queryParam.warehouseLocationSn = val[1] || ''
|
|
|
- } else {
|
|
|
- this.queryParam.warehouseSn = ''
|
|
|
- this.queryParam.warehouseLocationSn = ''
|
|
|
- }
|
|
|
- },
|
|
|
// 表格高度
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
@@ -320,7 +304,6 @@ export default {
|
|
|
mounted () {
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
this.resetSearchForm()
|
|
|
- this.getWarehouseCascade()
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
this.setTableH()
|
|
|
})
|
|
@@ -330,7 +313,6 @@ export default {
|
|
|
// 如果是新页签打开,则重置当前页面
|
|
|
if (this.$store.state.app.isNewTab) {
|
|
|
this.resetSearchForm()
|
|
|
- this.getWarehouseCascade()
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
this.setTableH()
|
|
|
})
|