|
@@ -44,6 +44,16 @@
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="业务单号">
|
|
|
+ <a-input id="outboundOrderList-outBizNo" v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入业务单号"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="出库单号">
|
|
|
+ <a-input id="outboundOrderList-stockOutNo" v-model.trim="queryParam.stockOutNo" allowClear placeholder="请输入出库单号"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" style="margin-bottom: 15px;">查询</a-button>
|
|
@@ -69,7 +79,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 +101,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, // 高级搜索 展开/关闭
|
|
@@ -112,6 +117,8 @@ export default {
|
|
|
queryParam: { // 查询条件
|
|
|
demanderName: '', // 客户名称
|
|
|
outBizType: undefined, // 出库类型
|
|
|
+ stockOutNo: '',
|
|
|
+ outBizNo: '',
|
|
|
state: undefined // 状态
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
@@ -130,6 +137,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 +162,7 @@ export default {
|
|
|
this.disabled = false
|
|
|
return data
|
|
|
})
|
|
|
- },
|
|
|
- itemSn: '',
|
|
|
- openDetailModal: false
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -167,7 +173,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,21 +194,13 @@ 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 = ''
|
|
|
this.queryParam.outBizType = undefined
|
|
|
this.queryParam.state = undefined
|
|
|
+ this.queryParam.stockOutNo = ''
|
|
|
+ this.queryParam.outBizNo = ''
|
|
|
this.time = []
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
@@ -204,7 +208,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}` })
|
|
@@ -217,14 +220,27 @@ export default {
|
|
|
let params = []
|
|
|
if (row) { // 单个出库
|
|
|
content = '确认要出库吗?'
|
|
|
- params = [row.stockOutSn]
|
|
|
+ params = [{
|
|
|
+ stockOutSn: row.stockOutSn,
|
|
|
+ outBizSn: row.outBizSn,
|
|
|
+ outBizSubSn: row.outBizSubSn,
|
|
|
+ outBizType: row.outBizType
|
|
|
+ }]
|
|
|
} else { // 批量出库
|
|
|
content = '确认要批量出库吗?'
|
|
|
if (this.selectedRowKeys.length < 1) {
|
|
|
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 +255,7 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
if (!row) { // 批量出库
|
|
|
_this.selectedRowKeys = []
|
|
|
+ _this.selectedRows = []
|
|
|
}
|
|
|
_this.$message.success(res.message)
|
|
|
_this.$refs.table.refresh()
|
|
@@ -247,9 +264,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)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|