|
@@ -19,10 +19,10 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="客户名称">
|
|
<a-form-item label="客户名称">
|
|
<a-select
|
|
<a-select
|
|
- id="outboundOrderList-bundleName"
|
|
|
|
|
|
+ id="outboundOrderList-demanderName"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
allowClear
|
|
allowClear
|
|
- v-model="queryParam.dataSourceNo"
|
|
|
|
|
|
+ v-model="queryParam.demanderName"
|
|
:showSearch="true"
|
|
:showSearch="true"
|
|
option-filter-prop="children"
|
|
option-filter-prop="children"
|
|
:filter-option="filterOption">
|
|
:filter-option="filterOption">
|
|
@@ -33,9 +33,9 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="出库类型">
|
|
<a-form-item label="出库类型">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.outType"
|
|
|
|
- ref="outType"
|
|
|
|
- id="outboundOrderList-outType"
|
|
|
|
|
|
+ v-model="queryParam.outBizType"
|
|
|
|
+ ref="outBizType"
|
|
|
|
+ id="outboundOrderList-outBizType"
|
|
code="OUT_STOCK_TYPE"
|
|
code="OUT_STOCK_TYPE"
|
|
placeholder="请选择出库类型"
|
|
placeholder="请选择出库类型"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
@@ -45,9 +45,9 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="单据状态">
|
|
<a-form-item label="单据状态">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.billStatus"
|
|
|
|
- ref="billStatus"
|
|
|
|
- id="outboundOrderList-billStatus"
|
|
|
|
|
|
+ v-model="queryParam.state"
|
|
|
|
+ ref="state"
|
|
|
|
+ id="outboundOrderList-state"
|
|
code="OUT_STATE"
|
|
code="OUT_STATE"
|
|
placeholder="请选择单据状态"
|
|
placeholder="请选择单据状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
@@ -81,14 +81,14 @@
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:showPagination="false"
|
|
:showPagination="false"
|
|
- :scroll="{ x: 1550 }"
|
|
|
|
|
|
+ :scroll="{ x: 1700 }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="primary"
|
|
type="primary"
|
|
- v-if="record.state=='OUT_STATE'"
|
|
|
|
|
|
+ v-if="record.state=='WAIT'"
|
|
class="button-warning"
|
|
class="button-warning"
|
|
@click="handleOutbound(record)"
|
|
@click="handleOutbound(record)"
|
|
id="outboundOrderList-out-btn">出库</a-button>
|
|
id="outboundOrderList-out-btn">出库</a-button>
|
|
@@ -104,26 +104,28 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import moment from 'moment'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import { custAllList } from '@/api/customer'
|
|
import { custAllList } from '@/api/customer'
|
|
-import { stockOutList } from '@/api/stockOut'
|
|
|
|
|
|
+import { stockOutList, stockOutOut } from '@/api/stockOut'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect },
|
|
components: { STable, VSelect },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
- bundleName: '', // 供应商名称
|
|
|
|
|
|
+ demanderName: undefined, // 客户名称
|
|
|
|
+ outBizType: undefined, // 出库类型
|
|
state: undefined // 状态
|
|
state: undefined // 状态
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
dateFormat: 'YYYY-MM-DD',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
- time: [], // 创建时间
|
|
|
|
|
|
+ time: [], // 审核时间
|
|
custAllList: [], // 客户下拉数据
|
|
custAllList: [], // 客户下拉数据
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
- { title: '关联单号', dataIndex: 'outBizNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '关联单号', dataIndex: 'outBizNo', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '出库类型', dataIndex: 'outBizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '出库类型', dataIndex: 'outBizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '客户名称', dataIndex: 'demanderName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
{ title: '客户名称', dataIndex: 'demanderName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
{ title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -131,7 +133,7 @@ export default {
|
|
{ title: '总售价', dataIndex: 'productTotalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '总售价', dataIndex: 'productTotalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '出库时间', dataIndex: 'outTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '出库时间', dataIndex: 'outTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '出库状态', dataIndex: 'stateDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '出库状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
selectedRowKeys: [], // Check here to configure the default column
|
|
selectedRowKeys: [], // Check here to configure the default column
|
|
@@ -139,6 +141,14 @@ export default {
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
|
|
+ // 审核时间
|
|
|
|
+ if (this.time && this.time.length > 0) {
|
|
|
|
+ this.queryParam.beginDate = moment(this.time[0]).format(this.dateFormat)
|
|
|
|
+ this.queryParam.endDate = moment(this.time[1]).format(this.dateFormat)
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParam.beginDate = undefined
|
|
|
|
+ this.queryParam.endDate = undefined
|
|
|
|
+ }
|
|
return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
const data = res.data
|
|
const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
@@ -181,12 +191,10 @@ export default {
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
- this.queryParam.orderBundleNo = ''
|
|
|
|
- this.queryParam.orderBundle.custMobile = ''
|
|
|
|
- this.queryParam.bundleName = ''
|
|
|
|
- this.queryParam.itemName = ''
|
|
|
|
- this.oldTime = undefined
|
|
|
|
- this.newTime = undefined
|
|
|
|
|
|
+ this.queryParam.demanderName = undefined
|
|
|
|
+ this.queryParam.outBizType = undefined
|
|
|
|
+ this.queryParam.state = undefined
|
|
|
|
+ this.time = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
// 详情
|
|
// 详情
|
|
@@ -211,19 +219,24 @@ export default {
|
|
// this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
|
|
// this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
|
|
} else if (row.outBizType == 'WAREHOUSE_CALL_OUT') { // 仓库调出
|
|
} else if (row.outBizType == 'WAREHOUSE_CALL_OUT') { // 仓库调出
|
|
this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.outBizSn}` })
|
|
this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.outBizSn}` })
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.warning('出库类型未知')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 单个出库
|
|
// 单个出库
|
|
handleOutbound (row) {
|
|
handleOutbound (row) {
|
|
|
|
+ const _this = this
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '提示',
|
|
title: '提示',
|
|
content: '确认要出库吗?',
|
|
content: '确认要出库吗?',
|
|
centered: true,
|
|
centered: true,
|
|
onOk () {
|
|
onOk () {
|
|
- console.log('OK')
|
|
|
|
- },
|
|
|
|
- onCancel () {
|
|
|
|
- console.log('Cancel')
|
|
|
|
|
|
+ stockOutOut(Object.assign(row, { outStockEnum: row.outBizType })).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|