|
@@ -28,16 +28,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
- <a-select
|
|
|
- id="salesReturn-buyerSn"
|
|
|
- placeholder="请选择客户"
|
|
|
- allowClear
|
|
|
- v-model="queryParam.buyerSn"
|
|
|
- :showSearch="true"
|
|
|
- option-filter-prop="children"
|
|
|
- :filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerSn">{{ item.customerName }}</a-select-option>
|
|
|
- </a-select>
|
|
|
+ <custList id="salesReturn-buyerSn" defValKey="customerSn" v-model="queryParam.buyerSn"></custList>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
@@ -136,7 +127,7 @@
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
|
-import { custAllList } from '@/api/customer'
|
|
|
+import custList from '@/views/common/custList.js'
|
|
|
import { salesReturnList, salesReturnQueryCount, salesReturnAudit, salesReturnDel } from '@/api/salesReturn'
|
|
|
import moment from 'moment'
|
|
|
export default {
|
|
@@ -144,7 +135,8 @@ export default {
|
|
|
components: {
|
|
|
STable,
|
|
|
VSelect,
|
|
|
- chooseCustomModal
|
|
|
+ chooseCustomModal,
|
|
|
+ custList
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -156,7 +148,6 @@ export default {
|
|
|
createDate: [], // 创建时间
|
|
|
examineTime: [], // 审核时间
|
|
|
openModal: false, // 选择客户弹框是否显示
|
|
|
- custAllList: [], // 客户下拉数据
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
buyerSn: undefined, // 客户名称
|
|
@@ -287,17 +278,6 @@ export default {
|
|
|
this.examineTime = []
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- // 客户无分页列表数据
|
|
|
- getCustAllList () {
|
|
|
- const _this = this
|
|
|
- custAllList().then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- _this.custAllList = res.data || []
|
|
|
- } else {
|
|
|
- _this.custAllList = []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
filterOption (input, option) {
|
|
|
return (
|
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
@@ -306,7 +286,6 @@ export default {
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
- vm.getCustAllList()
|
|
|
})
|
|
|
}
|
|
|
}
|