|
@@ -15,49 +15,33 @@
|
|
|
@keyup.enter.native="handleSearch" >
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="货架名称" prop="hjName">
|
|
|
- <!-- <a-select
|
|
|
- placeholder="请选择货架名称"
|
|
|
- allowClear
|
|
|
- id="shelfMonitoringList-hjName"
|
|
|
- v-model="queryParam.hjName"
|
|
|
- :showSearch="true"
|
|
|
- option-filter-prop="children"
|
|
|
- :filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in hjNameData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
|
|
|
- </a-select> -->
|
|
|
- <v-select
|
|
|
- v-model="queryParam.hjName"
|
|
|
- ref="settleState"
|
|
|
- id="shelfMonitoringList-settleState"
|
|
|
- code="FINANCIAL_PAY_STATUS"
|
|
|
- placeholder="请选择货位产品状态"
|
|
|
- allowClear></v-select>
|
|
|
+ <a-form-model-item label="货架名称" prop="shelfSn">
|
|
|
+ <shelfSList ref="shelfList" @change="shelfChange" :itemSn="queryParam.shelfSn"></shelfSList>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="货位号">
|
|
|
- <a-input id="shelfMonitoringList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入货位号"/>
|
|
|
+ <a-input id="shelfMonitoringList-shelfPlaceCode" v-model.trim="queryParam.shelfPlaceCode" allowClear placeholder="请输入货位号"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="产品编码">
|
|
|
- <a-input id="shelfMonitoringList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
|
+ <a-input id="shelfMonitoringList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="产品名称">
|
|
|
- <a-input id="shelfMonitoringList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
+ <a-input id="shelfMonitoringList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="货位产品状态">
|
|
|
<v-select
|
|
|
- v-model="queryParam.settleState"
|
|
|
- ref="settleState"
|
|
|
- id="shelfMonitoringList-settleState"
|
|
|
- code="FINANCIAL_PAY_STATUS"
|
|
|
+ v-model="queryParam.state"
|
|
|
+ ref="state"
|
|
|
+ id="shelfMonitoringList-state"
|
|
|
+ code="SHELF_PRODUCT_STATE"
|
|
|
placeholder="请选择货位产品状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-model-item>
|
|
@@ -68,8 +52,8 @@
|
|
|
<a-row>
|
|
|
<a-col :span="11">
|
|
|
<a-input-number
|
|
|
- id="shelfMonitoringList-beginDay"
|
|
|
- v-model="queryParam.beginDay"
|
|
|
+ id="shelfMonitoringList-beginDate"
|
|
|
+ v-model="queryParam.beginDate"
|
|
|
:precision="0"
|
|
|
:min="0"
|
|
|
:max="999999"
|
|
@@ -79,8 +63,8 @@
|
|
|
<a-col :span="2"><span style="display: block;text-align: center;line-height: 32px;">至</span></a-col>
|
|
|
<a-col :span="11">
|
|
|
<a-input-number
|
|
|
- id="shelfMonitoringList-endDay"
|
|
|
- v-model="queryParam.endDay"
|
|
|
+ id="shelfMonitoringList-endDate"
|
|
|
+ v-model="queryParam.endDate"
|
|
|
:precision="0"
|
|
|
:min="0"
|
|
|
:max="999999"
|
|
@@ -112,7 +96,7 @@
|
|
|
<div style="margin-bottom: 10px">
|
|
|
<div style="display: inline-block;margin-right: 15px;vertical-align: middle;">
|
|
|
<a-divider type="vertical" style="background: #FF7D0C;width: 3px;heigh: 16px;" />
|
|
|
- <span>西安车领主常青二路数字货架</span>
|
|
|
+ <span>{{ shelfName || '--' }}</span>
|
|
|
</div>
|
|
|
<a-button type="primary" class="button-error" id="shelfMonitoringList-export" @click="handleAddBack">新增调回单</a-button>
|
|
|
<span style="margin-left: 5px">
|
|
@@ -127,15 +111,26 @@
|
|
|
ref="table"
|
|
|
:style="{ height: tableHeight+84.5+'px' }"
|
|
|
size="small"
|
|
|
- :rowKey="(record) => record.storeCallOutSn"
|
|
|
+ :rowKey="(record) => record.shelfPlaceSn"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- rowKeyName="storeCallOutSn"
|
|
|
+ rowKeyName="shelfPlaceSn"
|
|
|
:row-selection="{ columnWidth: 40 }"
|
|
|
@rowSelection="rowSelectionFun"
|
|
|
:scroll="{ y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
+ :showPagination="false"
|
|
|
bordered>
|
|
|
+ <!-- 绑定产品状态 -->
|
|
|
+ <template slot="state" slot-scope="text, record">
|
|
|
+ <a-tooltip placement="top">
|
|
|
+ <template slot="title">
|
|
|
+ <span>{{ record.productTypeName }}</span>
|
|
|
+ </template>
|
|
|
+ {{ record.stateDictValue }}
|
|
|
+ <a-icon type="exclamation-circle" theme="filled" style="color: #39f;font-size: 16px;margin-left: 5px;vertical-align: middle;cursor: pointer;" />
|
|
|
+ </a-tooltip>
|
|
|
+ </template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button
|
|
@@ -149,7 +144,7 @@
|
|
|
</div>
|
|
|
</a-spin>
|
|
|
<!-- 新增调回单 -->
|
|
|
- <add-modal :openModal="openModal" :nowData="rowSelectionInfo&&rowSelectionInfo.selectedRows" @ok="handleOk" @close="handleCancel" />
|
|
|
+ <add-modal :openModal="openModal" :nowData="nowData" @ok="handleOk" @close="handleCancel" />
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -157,9 +152,10 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import addModal from './addModal.vue'
|
|
|
-import { storeCallOutList } from '@/api/storeCallOut'
|
|
|
+import shelfSList from '@/views/common/shelfList.vue'
|
|
|
+import { shelfControlList } from '@/api/shelf'
|
|
|
export default {
|
|
|
- components: { STable, VSelect, addModal },
|
|
|
+ components: { STable, VSelect, addModal, shelfSList },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
return {
|
|
@@ -169,25 +165,26 @@ export default {
|
|
|
wrapperCol: { span: 16 },
|
|
|
tableHeight: 0,
|
|
|
queryParam: { // 查询条件
|
|
|
- hjName: undefined, // 调出对象
|
|
|
- allocationType: undefined, // 调拨产品类型
|
|
|
- state: undefined, // 业务状态
|
|
|
- settleState: undefined,
|
|
|
- beginDay: undefined,
|
|
|
- endDay: undefined
|
|
|
+ shelfSn: undefined,
|
|
|
+ shelfPlaceCode: '',
|
|
|
+ productCode: '',
|
|
|
+ productName: '',
|
|
|
+ state: undefined,
|
|
|
+ beginDate: undefined,
|
|
|
+ endDate: undefined
|
|
|
},
|
|
|
rules: {
|
|
|
- 'hjName': [{ required: true, message: '请输入货架名称', trigger: 'change' }]
|
|
|
+ 'shelfSn': [{ required: true, message: '请选择货架', trigger: 'change' }]
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
columns: [
|
|
|
- { title: '货位号', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '绑定产品编码', dataIndex: 'allocationLinkagePutNo', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '绑定产品名称', dataIndex: 'outTenantName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '货位产品状态', dataIndex: 'allocationTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '当前库存', dataIndex: 'productTotalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '最大库容', dataIndex: 'productTotalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '滞销天数', dataIndex: 'productTotalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '货位号', dataIndex: 'shelfPlaceCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '绑定产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '绑定产品名称', dataIndex: 'productName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '货位产品状态', scopedSlots: { customRender: 'state' }, width: '15%', align: 'center' },
|
|
|
+ { title: '当前库存', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '最大库容', dataIndex: 'maxQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '滞销天数', dataIndex: 'unsalableDays', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -196,13 +193,12 @@ export default {
|
|
|
if (this.checkValueRange()) {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return storeCallOutList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return shelfControlList(this.queryParam).then(res => {
|
|
|
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
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ data[i].no = i + 1
|
|
|
}
|
|
|
this.disabled = false
|
|
|
}
|
|
@@ -214,55 +210,59 @@ export default {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
- const data = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- list: [],
|
|
|
- count: 0
|
|
|
- }
|
|
|
+ const data = []
|
|
|
_this.disabled = false
|
|
|
_this.spinning = false
|
|
|
resolve(data)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- hjNameData: [],
|
|
|
rowSelectionInfo: null,
|
|
|
isSearch: false,
|
|
|
- openModal: false // 新增编辑 弹框
|
|
|
+ openModal: false, // 新增编辑 弹框
|
|
|
+ shelfName: '', // 货架名称
|
|
|
+ nowData: {
|
|
|
+ list: [],
|
|
|
+ shelfInfo: {}
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
// 校验滞销天数数值范围
|
|
|
checkValueRange () {
|
|
|
- const isONull = this.queryParam.beginDay === null || this.queryParam.beginDay === undefined
|
|
|
- const isOEmpty = this.queryParam.beginDay === ''
|
|
|
- const isOZero = this.queryParam.beginDay === 0
|
|
|
- const isTNull = this.queryParam.endDay === null || this.queryParam.endDay === undefined
|
|
|
- const isTEmpty = this.queryParam.endDay === ''
|
|
|
- const isTZero = this.queryParam.endDay === 0
|
|
|
+ const isONull = this.queryParam.beginDate === null || this.queryParam.beginDate === undefined
|
|
|
+ const isOEmpty = this.queryParam.beginDate === ''
|
|
|
+ const isOZero = this.queryParam.beginDate === 0
|
|
|
+ const isTNull = this.queryParam.endDate === null || this.queryParam.endDate === undefined
|
|
|
+ const isTEmpty = this.queryParam.endDate === ''
|
|
|
+ const isTZero = this.queryParam.endDate === 0
|
|
|
// 第一个为空(可为null可为空字符)第二个不为空
|
|
|
// 第一个不为空第二个为空(可为null可为空字符)
|
|
|
// 第一个大于第二个
|
|
|
- if ((isONull || isOEmpty) && (this.queryParam.endDay || isTZero)) {
|
|
|
+ if ((isONull || isOEmpty) && (this.queryParam.endDate || isTZero)) {
|
|
|
this.$message.info('请输入正确的滞销天数查询范围!')
|
|
|
return false
|
|
|
}
|
|
|
- if ((this.queryParam.beginDay || isOZero) && (isTNull || isTEmpty)) {
|
|
|
+ if ((this.queryParam.beginDate || isOZero) && (isTNull || isTEmpty)) {
|
|
|
this.$message.info('请输入正确的滞销天数查询范围!')
|
|
|
return false
|
|
|
}
|
|
|
- if (this.queryParam.beginDay > this.queryParam.endDay) {
|
|
|
+ if (this.queryParam.beginDate > this.queryParam.endDate) {
|
|
|
this.$message.info('请输入正确的滞销天数查询范围!')
|
|
|
return false
|
|
|
}
|
|
|
- this.queryParam.beginDay = this.queryParam.beginDay > 999999999 ? 999999999 : this.queryParam.beginDay
|
|
|
- this.queryParam.endDay = this.queryParam.endDay > 999999999 ? 999999999 : this.queryParam.endDay
|
|
|
+ this.queryParam.beginDate = this.queryParam.beginDate > 999999999 ? 999999999 : this.queryParam.beginDate
|
|
|
+ this.queryParam.endDate = this.queryParam.endDate > 999999999 ? 999999999 : this.queryParam.endDate
|
|
|
return true
|
|
|
},
|
|
|
rowSelectionFun (obj) {
|
|
|
this.rowSelectionInfo = obj || null
|
|
|
},
|
|
|
+ // 货架 change
|
|
|
+ shelfChange (obj) {
|
|
|
+ this.queryParam.shelfSn = obj.key || undefined
|
|
|
+ this.shelfName = obj && obj.row && obj.row.shelfName || ''
|
|
|
+ },
|
|
|
// 查询
|
|
|
handleSearch () {
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
@@ -278,14 +278,14 @@ export default {
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.isSearch = false
|
|
|
- this.queryParam.beginDate = ''
|
|
|
- this.queryParam.endDate = ''
|
|
|
- this.queryParam.outTenantSn = undefined
|
|
|
- this.queryParam.allocationType = undefined
|
|
|
+ this.queryParam.shelfSn = undefined
|
|
|
+ this.$refs.shelfList.resetForm()
|
|
|
+ this.queryParam.shelfPlaceCode = ''
|
|
|
+ this.queryParam.productCode = ''
|
|
|
+ this.queryParam.productName = ''
|
|
|
this.queryParam.state = undefined
|
|
|
- this.queryParam.settleState = undefined
|
|
|
- this.queryParam.beginDay = undefined
|
|
|
- this.queryParam.endDay = undefined
|
|
|
+ this.queryParam.beginDate = undefined
|
|
|
+ this.queryParam.endDate = undefined
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
this.$refs.table.clearTable()
|
|
|
},
|
|
@@ -294,16 +294,21 @@ export default {
|
|
|
if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.length < 1)) {
|
|
|
this.$message.warning('请至少选择一个产品')
|
|
|
} else {
|
|
|
+ this.nowData.list = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
|
|
|
+ this.nowData.shelfInfo = {
|
|
|
+ shelfName: this.shelfName,
|
|
|
+ shelfSn: this.queryParam.shelfSn
|
|
|
+ }
|
|
|
this.openModal = true
|
|
|
}
|
|
|
},
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
- // this.$router.push({ path: `/numsGoodsShelves/shelfMonitoring/warehouseDetail/${row.allocationLinkagePutSn}` })
|
|
|
- this.$router.push({ path: `/numsGoodsShelves/shelfMonitoring/warehouseDetail/1` })
|
|
|
+ this.$router.push({ path: `/numsGoodsShelves/shelfMonitoring/warehouseDetail/${row.shelfPlaceSn}/${row.productSn}` })
|
|
|
},
|
|
|
handleOk () {
|
|
|
this.$refs.table.refresh()
|
|
|
+ this.$refs.table.clearSelected() // 清空表格选中项
|
|
|
this.isSearch = true
|
|
|
},
|
|
|
handleCancel () {
|