|
@@ -26,7 +26,7 @@
|
|
|
:showSearch="true"
|
|
|
option-filter-prop="children"
|
|
|
:filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerName">{{ item.customerName }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -36,7 +36,7 @@
|
|
|
v-model="queryParam.outType"
|
|
|
ref="outType"
|
|
|
id="outboundOrderList-outType"
|
|
|
- code="PAYMENT_TYPE"
|
|
|
+ code="OUT_STOCK_TYPE"
|
|
|
placeholder="请选择出库类型"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
@@ -48,7 +48,7 @@
|
|
|
v-model="queryParam.billStatus"
|
|
|
ref="billStatus"
|
|
|
id="outboundOrderList-billStatus"
|
|
|
- code="PAYMENT_TYPE"
|
|
|
+ code="OUT_STATE"
|
|
|
placeholder="请选择单据状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
@@ -83,13 +83,15 @@
|
|
|
:showPagination="false"
|
|
|
:scroll="{ x: 1550 }"
|
|
|
bordered>
|
|
|
- <!-- 状态 -->
|
|
|
- <template slot="state" slot-scope="text, record">
|
|
|
- <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '已出库': '未出库' }}</a-tag>
|
|
|
- </template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="primary" class="button-warning" @click="handleOutbound(record)" id="outboundOrderList-out-btn">出库</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ v-if="record.state=='OUT_STATE'"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleOutbound(record)"
|
|
|
+ id="outboundOrderList-out-btn">出库</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
@@ -102,8 +104,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
+import { custAllList } from '@/api/customer'
|
|
|
+import { stockOutList } from '@/api/stockOut'
|
|
|
export default {
|
|
|
components: { STable, VSelect },
|
|
|
data () {
|
|
@@ -116,19 +119,19 @@ export default {
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
time: [], // 创建时间
|
|
|
- brandData: [], // 客户 下拉数据
|
|
|
+ custAllList: [], // 客户下拉数据
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
- { title: '创建时间', dataIndex: 'inventoryMoneys', width: 160, align: 'center' },
|
|
|
- { title: '关联单号', dataIndex: 'productName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '出库类型', dataIndex: 'prodsssuctName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户名称', dataIndex: 'productBrand', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '总款数', dataIndex: 'productType', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '总数量', dataIndex: 'inventoryNum', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '总售价', dataIndex: 'totalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
- { title: '审核时间', dataIndex: 'authTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
|
+ { title: '关联单号', dataIndex: 'outBizNo', 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: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '总数量', dataIndex: 'productTotalQty', 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: 'outTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '出库状态', scopedSlots: { customRender: 'state' }, width: 110, align: 'center' },
|
|
|
+ { title: '出库状态', dataIndex: 'stateDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
selectedRowKeys: [], // Check here to configure the default column
|
|
@@ -136,31 +139,14 @@ export default {
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
- // const 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
|
|
|
- // return data
|
|
|
- // })
|
|
|
- const _this = this
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- const data = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- list: [
|
|
|
- { id: '1', productNum: 'jgqp11111111111', isDisabled: true, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' },
|
|
|
- { id: '2', productNum: 'jgqp11111111111', isDisabled: false, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
|
|
|
- ]
|
|
|
- }
|
|
|
+ return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ const 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
|
|
|
- resolve(data)
|
|
|
+ this.disabled = false
|
|
|
+ return data
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -177,7 +163,7 @@ export default {
|
|
|
},
|
|
|
getCheckboxProps: record => ({
|
|
|
props: {
|
|
|
- disabled: record.isDisabled // Column configuration not to be checked
|
|
|
+ disabled: record.state == 'FINISH' // Column configuration not to be checked
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -189,9 +175,9 @@ export default {
|
|
|
return date && date.valueOf() > Date.now()
|
|
|
},
|
|
|
filterOption (input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ )
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
@@ -205,7 +191,27 @@ export default {
|
|
|
},
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
- this.$router.push({ name: 'outboundOrderDetail', params: { id: row.id } })
|
|
|
+ // 根据出库类型跳转对应页面
|
|
|
+ if (row.outBizType == 'PURCHASE_RETURN') { // 采购退货
|
|
|
+ this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
|
|
|
+ } else if (row.outBizType == 'SPARE_PARTS_RETURN') { // 散件退货
|
|
|
+ this.$message.warning('该出库类型对应页面未开发')
|
|
|
+ // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
|
|
|
+ } else if (row.outBizType == 'SALES') { // 出库
|
|
|
+ this.$router.push({ path: `/salesManagement/salesQuery/detail/${row.outBizSn}` })
|
|
|
+ } else if (row.outBizType == 'DISPATCH_DEDUCT') { // 急件冲减
|
|
|
+ this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.outBizSn}` })
|
|
|
+ } else if (row.outBizType == 'SHOP_CALL_OUT') { // 店内调出
|
|
|
+ this.$router.push({ path: `/allocationManagement/storeTransferOut/detail/${row.outBizSn}` })
|
|
|
+ } else if (row.outBizType == 'CHECK_ORDER_OUT') { // 库存盘点盘亏
|
|
|
+ this.$message.warning('该出库类型对应页面未开发')
|
|
|
+ // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
|
|
|
+ } else if (row.outBizType == 'LINKAGE_CALL_OUT') { // 连锁调出
|
|
|
+ this.$message.warning('该出库类型对应页面未开发')
|
|
|
+ // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
|
|
|
+ } else if (row.outBizType == 'WAREHOUSE_CALL_OUT') { // 仓库调出
|
|
|
+ this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.outBizSn}` })
|
|
|
+ }
|
|
|
},
|
|
|
// 单个出库
|
|
|
handleOutbound (row) {
|
|
@@ -233,21 +239,23 @@ export default {
|
|
|
onSelectChange (selectedRowKeys) {
|
|
|
console.log('selectedRowKeys changed: ', selectedRowKeys)
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
+ },
|
|
|
+ // 客户无分页列表数据
|
|
|
+ getCustAllList () {
|
|
|
+ const _this = this
|
|
|
+ custAllList().then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.custAllList = res.data || []
|
|
|
+ } else {
|
|
|
+ _this.custAllList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
+ },
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
+ next(vm => {
|
|
|
+ vm.getCustAllList()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
-<style lang="less">
|
|
|
- .outboundOrderList-wrap{
|
|
|
- .sTable{
|
|
|
- margin-top: 20px;
|
|
|
- }
|
|
|
- .red{
|
|
|
- color: #ed1c24;
|
|
|
- }
|
|
|
- .green{
|
|
|
- color: #19be6b;
|
|
|
- }
|
|
|
- }
|
|
|
-</style>
|