|
@@ -16,13 +16,18 @@
|
|
|
<a-form layout="inline">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="销退单号">
|
|
|
- <a-input v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入销退单号"/>
|
|
|
+ <a-form-item label="业务单号">
|
|
|
+ <a-input v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入业务单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="客户名称">
|
|
|
- <dealerSubareaScopeList ref="dealerSubareaScopeList" id="billOfLadingEdit-buyerSn" @change="custChange" />
|
|
|
+ <a-input v-model.trim="queryParam.demanderName" allowClear placeholder="请输入客户名称"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="收货客户名称">
|
|
|
+ <dealerSubareaScopeList ref="dealerSubareaScopeList" defValKey="buyerSn" @change="custChange" v-model="queryParam.receiverSn" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -45,13 +50,9 @@
|
|
|
:scroll="{ y: 400 }"
|
|
|
:pageSize="10"
|
|
|
bordered>
|
|
|
- <!-- 收款单号 -->
|
|
|
- <template slot="salesReturnBillNo" slot-scope="text, record">
|
|
|
- {{ record.salesReturnBillNo }}
|
|
|
- </template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <div v-if="record.billStatus == 'WAIT_RECEIVE'">
|
|
|
+ <div v-if="!(record.outBizType == 'SALES'&&record.financialStatus=='WAIT')&&record.sendFlag==0">
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
@@ -71,7 +72,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import { salesReturnList } from '@/api/salesReturn'
|
|
|
+import { stockOutList } from '@/api/stockOut'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
export default {
|
|
|
name: 'SelectGlOrderModal',
|
|
@@ -99,31 +100,39 @@ export default {
|
|
|
spinning: false,
|
|
|
handlePlData: [],
|
|
|
queryParam: {
|
|
|
- salesReturnBillNo: '',
|
|
|
- buyerSn: undefined
|
|
|
+ outBizNo: '',
|
|
|
+ demanderName: '',
|
|
|
+ receiverSn: undefined,
|
|
|
+ outBizTypeList: ['SALES', 'ALLOCATE']
|
|
|
},
|
|
|
columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '15%', align: 'center' },
|
|
|
- { title: '客户名称', dataIndex: 'buyerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '申请退货数量', dataIndex: 'totalQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '审核时间', dataIndex: 'auditTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '业务状态', dataIndex: 'billStatusDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
|
|
|
+ { title: '序号', dataIndex: 'no', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '出库单号', dataIndex: 'stockOutNo', width: '10%', align: 'center' },
|
|
|
+ { title: '业务单号', dataIndex: 'outBizSubNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '客户名称', dataIndex: 'demanderName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品款数', dataIndex: 'productTotalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '产品数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单据审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '收款状态', dataIndex: 'financialStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '发货状态', dataIndex: 'sendFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
|
|
|
],
|
|
|
orginData: [],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return salesReturnList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return stockOutList(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
|
|
|
- const index = this.chooseData.findIndex(item => data.list[i].salesReturnBillNo == item.salesReturnBillNo)
|
|
|
+ const index = this.chooseData.findIndex(item => data.list[i].stockOutSn == item.stockOutSn)
|
|
|
data.list[i].checked = index >= 0
|
|
|
}
|
|
|
this.disabled = false
|
|
@@ -147,13 +156,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
custChange (val) {
|
|
|
- this.queryParam.buyerSn = val.key
|
|
|
+ this.queryParam.receiverSn = val.key || ''
|
|
|
},
|
|
|
// 删除
|
|
|
handleDel (row) {
|
|
|
- const i = this.chooseData.findIndex(item => row.salesReturnBillNo == item.salesReturnBillNo)
|
|
|
+ const i = this.chooseData.findIndex(item => row.stockOutSn == item.stockOutSn)
|
|
|
this.chooseData.splice(i, 1)
|
|
|
- const oi = this.orginData.findIndex(item => row.salesReturnBillNo == item.salesReturnBillNo)
|
|
|
+ const oi = this.orginData.findIndex(item => row.stockOutSn == item.stockOutSn)
|
|
|
if (oi >= 0) {
|
|
|
this.orginData[oi].checked = false
|
|
|
}
|
|
@@ -162,6 +171,7 @@ export default {
|
|
|
handleChoose (row) {
|
|
|
row.checked = true
|
|
|
this.chooseData.push(row)
|
|
|
+ this.$emit('choose')
|
|
|
},
|
|
|
// 取消
|
|
|
handleCommonCancel () {
|
|
@@ -170,11 +180,15 @@ export default {
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.queryParam = {
|
|
|
- salesReturnBillNo: '',
|
|
|
- buyerSn: undefined
|
|
|
+ outBizNo: '',
|
|
|
+ demanderName: '',
|
|
|
+ receiverSn: undefined,
|
|
|
+ outBizTypeList: ['SALES', 'ALLOCATE']
|
|
|
}
|
|
|
this.orginData = []
|
|
|
- this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
+ })
|
|
|
if (this.$refs.table) {
|
|
|
this.$refs.table.refresh(true)
|
|
|
}
|