|
@@ -7,24 +7,18 @@
|
|
<a-row :gutter="36">
|
|
<a-row :gutter="36">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="创建时间">
|
|
<a-form-item label="创建时间">
|
|
- <a-range-picker
|
|
|
|
- :value="time"
|
|
|
|
- allowClear
|
|
|
|
- :disabledDate="disabledDate"
|
|
|
|
- format="YYYY-MM-DD"
|
|
|
|
- style="width: 100%;"
|
|
|
|
- @change="dateChange"/>
|
|
|
|
|
|
+ <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
</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-form-item label="调拨单号">
|
|
- <a-input allowClear placeholder="请输入调拨单号" v-model.tirm="queryParam.danhao"/>
|
|
|
|
|
|
+ <a-input allowClear placeholder="请输入调拨单号" v-model.tirm="queryParam.recallBillNo"/>
|
|
</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-form-item label="货架名称">
|
|
- <a-select placeholder="请搜索货架名称" allowClear style="width: 100%;">
|
|
|
|
- <a-select-option v-for="item in goodsShelveList">
|
|
|
|
|
|
+ <a-select placeholder="请搜索货架名称" allowClear style="width: 100%;" v-model="queryParam.shelfSn">
|
|
|
|
+ <a-select-option v-for="item in goodsShelveList" >
|
|
{{ }}
|
|
{{ }}
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
@@ -75,7 +69,7 @@
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
</a-tabs> -->
|
|
</a-tabs> -->
|
|
|
|
|
|
- <a-table
|
|
|
|
|
|
+ <s-table
|
|
class="sTable fixPagination"
|
|
class="sTable fixPagination"
|
|
ref="table"
|
|
ref="table"
|
|
:style="{ height: tableHeight+77+'px' }"
|
|
:style="{ height: tableHeight+77+'px' }"
|
|
@@ -84,10 +78,9 @@
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:scroll="{ y:tableHeight }"
|
|
:scroll="{ y:tableHeight }"
|
|
- :showPagination="false"
|
|
|
|
- :defaultLoadData="false"
|
|
|
|
- :expandIconColumnIndex="-1"
|
|
|
|
- :expandIconAsCell="false"
|
|
|
|
|
|
+ @expand="expand"
|
|
|
|
+ :defaultLoadData="true"
|
|
|
|
+ :expandRowByClick="true"
|
|
:defaultExpandAllRows="true"
|
|
:defaultExpandAllRows="true"
|
|
bordered>
|
|
bordered>
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -105,15 +98,17 @@
|
|
id="shelfMonitoringList-warehousing-btn">取消调回单</a-button>
|
|
id="shelfMonitoringList-warehousing-btn">取消调回单</a-button>
|
|
</template>
|
|
</template>
|
|
<a-table
|
|
<a-table
|
|
|
|
+ size="small"
|
|
class="inner-table"
|
|
class="inner-table"
|
|
slot="expandedRowRender"
|
|
slot="expandedRowRender"
|
|
- slot-scope="text"
|
|
|
|
|
|
+ slot-scope="record"
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
:columns="innerColumns"
|
|
:columns="innerColumns"
|
|
:data-source="innerData"
|
|
:data-source="innerData"
|
|
:pagination="false"
|
|
:pagination="false"
|
|
>
|
|
>
|
|
</a-table>
|
|
</a-table>
|
|
- </a-table>
|
|
|
|
|
|
+ </s-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
<!-- 申请提现 -->
|
|
<!-- 申请提现 -->
|
|
<confirmModal :isOpenModal="showModal" :currentData="currentData" @close="showModal=false" @refresh="$refs.table.refresh(true)"></confirmModal>
|
|
<confirmModal :isOpenModal="showModal" :currentData="currentData" @close="showModal=false" @refresh="$refs.table.refresh(true)"></confirmModal>
|
|
@@ -121,12 +116,15 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { commonMixin } from '@/utils/mixin'
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
|
|
+import rangeDate from '@/views/common/rangeDate.vue'
|
|
import { STable } from '@/components'
|
|
import { STable } from '@/components'
|
|
import confirmModal from './confirmModal.vue'
|
|
import confirmModal from './confirmModal.vue'
|
|
import getDate from '@/libs/getDate.js'
|
|
import getDate from '@/libs/getDate.js'
|
|
|
|
+import { shelfRecallList, shelfRecallDetailList, shelfRecallCancel } from '@/api/shelfRecall.js'
|
|
export default {
|
|
export default {
|
|
- components: { STable, confirmModal },
|
|
|
|
|
|
+ components: { STable, confirmModal, rangeDate, commonMixin },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -145,24 +143,23 @@ export default {
|
|
queryParam: {
|
|
queryParam: {
|
|
beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
- danhao: '',
|
|
|
|
- name: '',
|
|
|
|
- code: ''
|
|
|
|
|
|
+ recallBillNo: '',
|
|
|
|
+ shelfSn: '' // 数字货架sn
|
|
},
|
|
},
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center' },
|
|
- { title: '调回单号', dataIndex: 'name', width: '30%', align: 'center' },
|
|
|
|
- { title: '货架名称', dataIndex: 'remarks', width: '10%', align: 'center', scopedSlots: { customRender: 'remarks' } },
|
|
|
|
- { title: '状态', width: '10%', align: 'center' },
|
|
|
|
- { title: '调回总量', width: '10%', align: 'center' },
|
|
|
|
- { title: '实退总量', width: '10%', align: 'center' },
|
|
|
|
- { title: '操作', width: '10%', align: 'center', scopedSlots: { customRender: 'action' } }
|
|
|
|
|
|
+ { title: '调回单号', dataIndex: 'recallBillNo', width: '20%', align: 'center' },
|
|
|
|
+ { title: '货架名称', dataIndex: 'remarks', width: '20%', align: 'left', scopedSlots: { customRender: 'remarks' } },
|
|
|
|
+ { title: '状态', dataIndex: 'state', width: '7%', align: 'center' },
|
|
|
|
+ { title: '调回总量', dataIndex: 'totalQty', width: '9%', align: 'center' },
|
|
|
|
+ { title: '实退总量', dataIndex: 'totalConfirmQty', width: '9%', align: 'center' },
|
|
|
|
+ { title: '操作', width: '15%', align: 'left', scopedSlots: { customRender: 'action' } }
|
|
],
|
|
],
|
|
innerColumns: [
|
|
innerColumns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'createDate', width: '15%', align: 'center' },
|
|
|
|
- { title: '产品名称', dataIndex: 'createDate', width: '15%', align: 'center' },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'createDate', width: '20%', align: 'center' },
|
|
|
|
+ { title: '产品名称', dataIndex: 'createDate', width: '30%', align: 'left' },
|
|
{ title: '调回数量', dataIndex: 'createDate', width: '15%', align: 'center' },
|
|
{ title: '调回数量', dataIndex: 'createDate', width: '15%', align: 'center' },
|
|
{ title: '实退数量', dataIndex: 'createDate', width: '15%', align: 'center' },
|
|
{ title: '实退数量', dataIndex: 'createDate', width: '15%', align: 'center' },
|
|
{ title: '单位', dataIndex: 'createDate', width: '15%', align: 'center' }
|
|
{ title: '单位', dataIndex: 'createDate', width: '15%', align: 'center' }
|
|
@@ -170,32 +167,32 @@ export default {
|
|
innerData: [],
|
|
innerData: [],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
- // this.disabled = true
|
|
|
|
- // this.spinning = true
|
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
|
- const data = {
|
|
|
|
- list: [{ id: 1, createDate: '2020-08-09' }]
|
|
|
|
- }
|
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
|
- data.list[i].no = i + 1
|
|
|
|
- }
|
|
|
|
- // this.spinning = false
|
|
|
|
- // this.disabled = false
|
|
|
|
- resolve(data)
|
|
|
|
- })
|
|
|
|
- // return employeeList(Object.assign(parameter, 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
|
|
|
|
- // }
|
|
|
|
- // this.disabled = false
|
|
|
|
|
|
+ this.disabled = true
|
|
|
|
+ this.spinning = true
|
|
|
|
+ // return new Promise(function (resolve, reject) {
|
|
|
|
+ // const data = {
|
|
|
|
+ // list: [{ id: 1, createDate: '2020-08-09' }]
|
|
|
|
+ // }
|
|
|
|
+ // for (var i = 0; i < data.list.length; i++) {
|
|
|
|
+ // data.list[i].no = i + 1
|
|
// }
|
|
// }
|
|
- // this.spinning = false
|
|
|
|
- // return data
|
|
|
|
|
|
+ // // this.spinning = false
|
|
|
|
+ // // this.disabled = false
|
|
|
|
+ // resolve(data)
|
|
// })
|
|
// })
|
|
|
|
+ return shelfRecallList(Object.assign(parameter, 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
|
|
|
|
+ }
|
|
|
|
+ this.disabled = false
|
|
|
|
+ }
|
|
|
|
+ this.spinning = false
|
|
|
|
+ return data
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -213,10 +210,37 @@ export default {
|
|
callback (key) {
|
|
callback (key) {
|
|
console.log(key)
|
|
console.log(key)
|
|
this.activeKey = key
|
|
this.activeKey = key
|
|
|
|
+ this.queryParam.billState = key
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ },
|
|
|
|
+ // 点击行或图标触发接口
|
|
|
|
+ expand (expanded, record) {
|
|
|
|
+ if (expanded) {
|
|
|
|
+ console.log(expanded, 'expanded', record)
|
|
|
|
+ this.getinnerData(record) // 获取表格内部数据
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 获取子表格数据
|
|
|
|
+ getinnerData (record) {
|
|
|
|
+ this.spinning = true
|
|
|
|
+ shelfRecallDetailList({ shelfSn: record.shelfSn }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.innerData = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.innerData = []
|
|
|
|
+ }
|
|
|
|
+ this.spinning = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
- this.time = []
|
|
|
|
|
|
+ this.time = [getDate.getCurrMonthDays().starttime, getDate.getCurrMonthDays().endtime]
|
|
|
|
+ this.queryParam = {
|
|
|
|
+ beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
|
|
+ recallBillNo: '', // 调回单号
|
|
|
|
+ shelfSn: '' // 数字货架sn
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 申请提现
|
|
// 申请提现
|
|
handleTX () {
|
|
handleTX () {
|
|
@@ -229,12 +253,22 @@ export default {
|
|
},
|
|
},
|
|
// 取消掉回单
|
|
// 取消掉回单
|
|
handleCancel (row) {
|
|
handleCancel (row) {
|
|
|
|
+ const _this = this
|
|
|
|
+ _this.spinning = true
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '提示',
|
|
title: '提示',
|
|
content: '确定取消调回单吗?',
|
|
content: '确定取消调回单吗?',
|
|
centered: true,
|
|
centered: true,
|
|
onOk: () => {
|
|
onOk: () => {
|
|
- //
|
|
|
|
|
|
+ shelfRecallCancel({}).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ } else {
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -288,9 +322,9 @@ export default {
|
|
.accountManagementList-wrap{
|
|
.accountManagementList-wrap{
|
|
.inner-table{
|
|
.inner-table{
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
+ border-bottom: 1px solid #eee;
|
|
.ant-table{
|
|
.ant-table{
|
|
- margin: 10px 150px;
|
|
|
|
- border-left: 1px solid #eee;
|
|
|
|
|
|
+ margin: 10px 100px;
|
|
border-bottom: 1px solid #eee;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
}
|
|
}
|
|
}
|