|
@@ -17,16 +17,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
- <a-select
|
|
|
- id="salesManagementList-buyerName"
|
|
|
- placeholder="请选择客户"
|
|
|
- allowClear
|
|
|
- v-model="queryParam.buyerName"
|
|
|
- :showSearch="true"
|
|
|
- option-filter-prop="children"
|
|
|
- :filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerName">{{ item.customerName }}</a-select-option>
|
|
|
- </a-select>
|
|
|
+ <custList id="salesManagementList-buyerName" v-model="queryParam.buyerName"></custList>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -184,12 +175,12 @@
|
|
|
import moment from 'moment'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
|
-import { custAllList } from '@/api/customer'
|
|
|
+import custList from '@/views/common/custList.js'
|
|
|
import { salesList, salesDel, salesWriteAudit, salesWriteStockOut, salesCount } from '@/api/sales'
|
|
|
import { settleStyleQueryAll } from '@/api/settleStyle'
|
|
|
export default {
|
|
|
name: 'TableList',
|
|
|
- components: { STable, VSelect, chooseCustomModal },
|
|
|
+ components: { STable, VSelect, chooseCustomModal, custList },
|
|
|
data () {
|
|
|
return {
|
|
|
tableHeight: 0,
|
|
@@ -198,7 +189,6 @@ export default {
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
time: [], // 创建时间
|
|
|
openModal: false, // 选择客户弹框是否显示
|
|
|
- custAllList: [], // 客户 下拉数据
|
|
|
settleStyleList: [], // 收款方式
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
@@ -356,17 +346,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 客户无分页列表数据
|
|
|
- getCustAllList () {
|
|
|
- const _this = this
|
|
|
- custAllList().then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- _this.custAllList = res.data || []
|
|
|
- } else {
|
|
|
- _this.custAllList = []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.queryParam.buyerName = undefined
|
|
@@ -379,11 +358,6 @@ export default {
|
|
|
this.time = []
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- filterOption (input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
- },
|
|
|
// 获取收款方式
|
|
|
getSettleStyle () {
|
|
|
settleStyleQueryAll().then(res => {
|
|
@@ -395,7 +369,6 @@ export default {
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
- vm.getCustAllList()
|
|
|
vm.getSettleStyle()
|
|
|
})
|
|
|
}
|