|
@@ -69,7 +69,7 @@
|
|
|
ref="table"
|
|
|
size="default"
|
|
|
:row-selection="rowSelection"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
+ :rowKey="(record) => record.stockOutSn"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:scroll="{ x: 1710, y: tableHeight }"
|
|
@@ -91,20 +91,15 @@
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
- <!-- 详情 -->
|
|
|
- <!-- <outbound-order-detail-modal :openModal="openModal" :itemSn="itemSn" @close="closeModal" /> -->
|
|
|
- <!-- 调拨详情 -->
|
|
|
- <!-- <transfer-out-detail-modal :openModal="openDetailModal" :itemSn="itemSn" @close="closeDetailModal" /> -->
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import moment from 'moment'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import outboundOrderDetailModal from './detailModal.vue'
|
|
|
import { stockOutList, stockOutOut } from '@/api/stockOut'
|
|
|
export default {
|
|
|
- components: { STable, VSelect, outboundOrderDetailModal },
|
|
|
+ components: { STable, VSelect },
|
|
|
data () {
|
|
|
return {
|
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
@@ -130,6 +125,7 @@ export default {
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
selectedRowKeys: [], // Check here to configure the default column
|
|
|
+ selectedRows: [],
|
|
|
loading: false,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -154,9 +150,7 @@ export default {
|
|
|
this.disabled = false
|
|
|
return data
|
|
|
})
|
|
|
- },
|
|
|
- itemSn: '',
|
|
|
- openDetailModal: false
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -167,7 +161,13 @@ export default {
|
|
|
return {
|
|
|
selectedRowKeys: this.selectedRowKeys,
|
|
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
|
- this.onSelectChange(selectedRowKeys)
|
|
|
+ this.onChange(selectedRowKeys, selectedRows)
|
|
|
+ },
|
|
|
+ onSelect: (record, selected, selectedRows, nativeEvent) => {
|
|
|
+ this.onSelectChange(record, selected, selectedRows, nativeEvent)
|
|
|
+ },
|
|
|
+ onSelectAll: (selected, selectedRows, changeRows) => {
|
|
|
+ this.onSelectAllChange(selected, selectedRows, changeRows)
|
|
|
},
|
|
|
getCheckboxProps: record => ({
|
|
|
props: {
|
|
@@ -182,16 +182,6 @@ export default {
|
|
|
disabledDate (date, dateStrings) {
|
|
|
return date && date.valueOf() > Date.now()
|
|
|
},
|
|
|
- filterOption (input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
- },
|
|
|
- // 关闭 出库详情 弹框
|
|
|
- closeDetailModal () {
|
|
|
- this.itemSn = ''
|
|
|
- this.openDetailModal = false
|
|
|
- },
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.queryParam.demanderName = ''
|
|
@@ -204,7 +194,6 @@ export default {
|
|
|
handleDetail (row) {
|
|
|
// 根据出库类型跳转对应页面
|
|
|
if (row.outBizType == 'OUT_SALES') { // 销售出库
|
|
|
- // this.$router.push({ path: `/salesManagement/outboundOrder/detail/${row.stockOutSn}` })
|
|
|
this.$router.push({ path: `/salesManagement/pushOrderManagement/detail/${row.outBizSubSn}` })
|
|
|
} else if (row.outBizType == 'OUT_ALLOT') { // 调拨出库
|
|
|
this.$router.push({ path: `/allocationManagement/transferOut/detail/${row.outBizSn}` })
|
|
@@ -224,7 +213,15 @@ export default {
|
|
|
this.$message.warning('请在列表勾选后再进行批量操作!')
|
|
|
return
|
|
|
}
|
|
|
- params = this.selectedRowKeys
|
|
|
+ params = []
|
|
|
+ this.selectedRows.map(item => {
|
|
|
+ params.push({
|
|
|
+ stockOutSn: item.stockOutSn,
|
|
|
+ outBizSn: item.outBizSn,
|
|
|
+ outBizSubSn: item.outBizSubSn,
|
|
|
+ outBizType: item.outBizType
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
@@ -239,6 +236,7 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
if (!row) { // 批量出库
|
|
|
_this.selectedRowKeys = []
|
|
|
+ _this.selectedRows = []
|
|
|
}
|
|
|
_this.$message.success(res.message)
|
|
|
_this.$refs.table.refresh()
|
|
@@ -247,9 +245,35 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- onSelectChange (selectedRowKeys) {
|
|
|
- console.log('selectedRowKeys changed: ', selectedRowKeys)
|
|
|
+ onChange (selectedRowKeys, selectedRows) {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
+ },
|
|
|
+ onSelectChange (record, selected, selectedRows, nativeEvent) {
|
|
|
+ const _this = this
|
|
|
+ if (selected) { // 选择
|
|
|
+ this.selectedRows.push(record)
|
|
|
+ } else { // 取消
|
|
|
+ this.selectedRows.map((item, index) => {
|
|
|
+ if (item.stockOutSn == record.stockOutSn) {
|
|
|
+ _this.selectedRows.splice(index, 1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 本页全选/取消全选
|
|
|
+ onSelectAllChange (selected, selectedRows, changeRows) {
|
|
|
+ const _this = this
|
|
|
+ if (selected) { // 选择
|
|
|
+ this.selectedRows = [...this.selectedRows, ...changeRows]
|
|
|
+ } else { // 取消
|
|
|
+ this.selectedRows.map((item, index) => {
|
|
|
+ this.selectedRows.map((subItem, ind) => {
|
|
|
+ if (item.stockOutSn == subItem.stockOutSn) {
|
|
|
+ _this.selectedRows.splice(index, 1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|