|
@@ -5,42 +5,42 @@
|
|
|
<div ref="tableSearch" style="width:100%;overflow: hidden;" class="table-page-search-wrapper">
|
|
|
<a-tabs type="card" v-model="queryParam.bizType" @change="tabChange" class="replenishmentManagementList-tabs">
|
|
|
<a-tab-pane v-for="item in tabsList" :key="item.code">
|
|
|
- <p slot="tab">{{ item.name }}<span v-if="item.countNum&&item.code=='WAIT_CONFIRM'" style="color:red">({{ item.countNum }})</span></p>
|
|
|
+ <p slot="tab" :id="'tabs-'+item.code">{{ item.name }}<span v-if="item.countNum&&item.code=='WAIT_CONFIRM'" style="color:red">({{ item.countNum }})</span></p>
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
<a-row :gutter="10">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="创建时间">
|
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
+ <rangeDate id="recall-creatDate" ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="调回单号">
|
|
|
- <a-input allowClear placeholder="请输入调回单号" v-model.tirm="queryParam.recallBillNo"/>
|
|
|
+ <a-input id="recall-recallBillNo" allowClear placeholder="请输入调回单号" v-model.tirm="queryParam.recallBillNo"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="货架名称">
|
|
|
- <shelfList style="width: 100%;" :showAll="true" v-model="queryParam.shelfSn"></shelfList>
|
|
|
+ <shelfList id="recall-shelfSn" style="width: 100%;" :showAll="true" v-model="queryParam.shelfSn"></shelfList>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品编码">
|
|
|
- <a-input allowClear placeholder="请输入产品编码" v-model.tirm="queryParam.productCode"/>
|
|
|
+ <a-input id="recall-productCode" allowClear placeholder="请输入产品编码" v-model.tirm="queryParam.productCode"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品名称">
|
|
|
- <a-input allowClear placeholder="请输入产品名称" v-model.tirm="queryParam.productName"/>
|
|
|
+ <a-input id="recall-productName" allowClear placeholder="请输入产品名称" v-model.tirm="queryParam.productName"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-button type="primary" @click="getSumByType" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 5px" v-if="activeKey==0">
|
|
|
+ <a-button type="primary" @click="getSumByType" :disabled="disabled" id="recall-refresh" >查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="recall-reset">重置</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px" v-if="activeKey==0" id="recall-advanced">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
</a>
|
|
@@ -48,7 +48,7 @@
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <div class="btnStyle"><a-button type="primary" @click="openInfoModal = true">新增调回单</a-button></div>
|
|
|
+ <div class="btnStyle"><a-button id="recall-newAdd" type="primary" @click="openInfoModal = true">新增调回单</a-button></div>
|
|
|
<s-table
|
|
|
class="sTable fixPagination"
|
|
|
ref="table"
|
|
@@ -70,13 +70,14 @@
|
|
|
</template>
|
|
|
<!-- 货架名称 -->
|
|
|
<template slot="shelfName" slot-scope="text, record">
|
|
|
- {{text}}
|
|
|
+ {{ text }}
|
|
|
<a-badge count="已注销" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='WRITE_OFF'"></a-badge>
|
|
|
<a-badge count="已暂停" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='SUSPEND'"></a-badge>
|
|
|
<a-badge count="已停用" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='DISABLED'"></a-badge>
|
|
|
</template>
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button
|
|
|
+ :id="'recall-tuiku-'+record.id"
|
|
|
size="small"
|
|
|
type="link"
|
|
|
v-if="record.billState=='WAIT_CONFIRM'"
|
|
@@ -84,6 +85,7 @@
|
|
|
@click.stop="handleRecall(record)"
|
|
|
>退库</a-button>
|
|
|
<a-button
|
|
|
+ :id="'recall-cancel-'+record.id"
|
|
|
size="small"
|
|
|
v-if="record.billState=='WAIT_CONFIRM'"
|
|
|
type="link"
|
|
@@ -91,6 +93,7 @@
|
|
|
@click.stop="handleCancel(record)"
|
|
|
>取消调回单</a-button>
|
|
|
<a-button
|
|
|
+ :id="'recall-del-'+record.id"
|
|
|
size="small"
|
|
|
v-if="record.billState=='CANCEL'"
|
|
|
type="link"
|
|
@@ -124,12 +127,11 @@
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
+import getDate from '@/libs/getDate.js'
|
|
|
import moment from 'moment'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { STable } from '@/components'
|
|
|
import recallModal from './recallModal.vue'
|
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
-import { toThousands } from '@/libs/tools.js'
|
|
|
import shelfList from '@/views/common/shelfList'
|
|
|
import basicInfoModal from './basicInfoModal.vue'
|
|
|
import detailModal from './detailModal'
|
|
@@ -141,35 +143,36 @@ export default {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
disabled: false,
|
|
|
- tableHeight: 0,
|
|
|
- showModal: false,
|
|
|
- advanced: false,
|
|
|
- currentData: null,
|
|
|
+ tableHeight: 0, // 表格高度
|
|
|
+ showModal: false, // 退库弹框
|
|
|
+ advanced: false, // 高级搜索 展开/关闭
|
|
|
+ currentData: null, // 当前操作的数据
|
|
|
activeKey: 0, // 默认的tab
|
|
|
- tabsList: [],
|
|
|
- expandedRowKeys: [],
|
|
|
- time: [
|
|
|
+ tabsList: [], // tabs列表数据
|
|
|
+ expandedRowKeys: [], // 默认展开的行
|
|
|
+ time: [ // 默认的时间
|
|
|
getDate.getCurrMonthDays().starttime,
|
|
|
getDate.getCurrMonthDays().endtime
|
|
|
],
|
|
|
queryParam: {
|
|
|
beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
|
endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
|
- recallBillNo: '',
|
|
|
+ recallBillNo: '', // 调回单号
|
|
|
shelfSn: undefined, // 数字货架sn
|
|
|
- bizType: 'ALL'
|
|
|
+ bizType: 'ALL' // 状态,默认全部
|
|
|
},
|
|
|
- openInfoModal: false,
|
|
|
+ openInfoModal: false, // 新增调回单弹框
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '调回单号', scopedSlots: { customRender: 'recallBillNo' }, width: '20%', align: 'center' },
|
|
|
- { title: '货架名称', dataIndex: 'shelfInfo.shelfName',scopedSlots: { customRender: 'shelfName' }, width: '25%', align: 'left', ellipsis: true },
|
|
|
+ { title: '货架名称', dataIndex: 'shelfInfo.shelfName', scopedSlots: { customRender: 'shelfName' }, width: '25%', align: 'left', ellipsis: true },
|
|
|
{ title: '状态', dataIndex: 'billStateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '调回总量', dataIndex: 'totalQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
{ title: '实退总量', dataIndex: 'totalConfirmQty', width: '9%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
{ title: '操作', width: '10%', align: 'left', scopedSlots: { customRender: 'action' } }
|
|
|
],
|
|
|
+ // 子表格列
|
|
|
innerColumns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
{ title: '产品编码', dataIndex: 'product.code', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -178,9 +181,9 @@ export default {
|
|
|
{ title: '实退数量', dataIndex: 'confirmQty', width: '15%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
{ title: '单位', dataIndex: 'product.unit', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
- innerData: [],
|
|
|
- showDetail: false,
|
|
|
- detailContent: null,
|
|
|
+ innerData: [], // 子表格数据
|
|
|
+ showDetail: false, // 调回单详情弹框
|
|
|
+ detailContent: null, // 调回单详情数据
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -200,7 +203,7 @@ export default {
|
|
|
data.list[i].no = no + i + 1
|
|
|
data.list[i].innerData = []
|
|
|
}
|
|
|
- this.innerData = data.list || []
|
|
|
+ this.innerData = data.list || [] // 子表格数据
|
|
|
this.disabled = false
|
|
|
}
|
|
|
this.spinning = false
|
|
@@ -221,14 +224,13 @@ export default {
|
|
|
},
|
|
|
// 切换tab
|
|
|
tabChange (key) {
|
|
|
- console.log(key)
|
|
|
this.expandedRowKeys = []
|
|
|
setTimeout(() => {
|
|
|
this.queryParam.bizType = key
|
|
|
this.$refs.table.refresh(true)
|
|
|
}, 100)
|
|
|
},
|
|
|
- // 获取各类型下的数量
|
|
|
+ // 获取各状态下的数量
|
|
|
getSumByType () {
|
|
|
const params = JSON.parse(JSON.stringify(this.queryParam))
|
|
|
params.billState = ''
|
|
@@ -278,6 +280,7 @@ export default {
|
|
|
this.resetData()
|
|
|
this.getSumByType()
|
|
|
},
|
|
|
+ // 重置列表
|
|
|
resetData () {
|
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
|
this.queryParam = {
|
|
@@ -288,7 +291,7 @@ export default {
|
|
|
bizType: 'ALL'
|
|
|
}
|
|
|
},
|
|
|
- // 退库
|
|
|
+ // 退库弹框
|
|
|
handleRecall (row) {
|
|
|
this.showModal = true
|
|
|
this.currentData = row
|
|
@@ -314,7 +317,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 删除
|
|
|
+ // 删除调回单
|
|
|
handleDelete (row) {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
@@ -335,10 +338,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 计算表格高度
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - tableSearchH - 250
|
|
|
},
|
|
|
+ // 页面初始化
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
@@ -359,6 +364,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 新增回调单成功,刷新列表
|
|
|
handleInfoOk (e) {
|
|
|
this.$refs.table.refresh()
|
|
|
}
|