|
@@ -12,16 +12,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
<a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
- <a-select
|
|
+ <custList ref="custList" @change="custChange" v-model="queryParam.buyerSn"></custList>
|
|
- 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>
|
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -183,13 +174,13 @@
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
import auditModal from '@/views/common/auditModal.vue'
|
|
import auditModal from '@/views/common/auditModal.vue'
|
|
-import { custAllList } from '@/api/customer'
|
|
|
|
import { salesList, salesDel, salesWriteAudit, salesWriteStockOut, salesCount } from '@/api/sales'
|
|
import { salesList, salesDel, salesWriteAudit, salesWriteStockOut, salesCount } from '@/api/sales'
|
|
import { settleStyleQueryAll } from '@/api/settleStyle'
|
|
import { settleStyleQueryAll } from '@/api/settleStyle'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
|
+import custList from '@/views/common/custList.vue'
|
|
export default {
|
|
export default {
|
|
name: 'TableList',
|
|
name: 'TableList',
|
|
- components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal },
|
|
+ components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal, custList },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -197,13 +188,12 @@ export default {
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
openModal: false, // 选择客户弹框是否显示
|
|
openModal: false, // 选择客户弹框是否显示
|
|
- custAllList: [], // 客户 下拉数据
|
|
|
|
settleStyleList: [], // 收款方式
|
|
settleStyleList: [], // 收款方式
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
beginDate: '',
|
|
beginDate: '',
|
|
endDate: '',
|
|
endDate: '',
|
|
- buyerName: undefined, // 客户名称
|
|
+ buyerSn: undefined, // 客户名称
|
|
salesBillNo: '', // 销售单号
|
|
salesBillNo: '', // 销售单号
|
|
purchaseBillNo: '', // 采购单号
|
|
purchaseBillNo: '', // 采购单号
|
|
payType: undefined, // 支付方式
|
|
payType: undefined, // 支付方式
|
|
@@ -353,36 +343,25 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 客户无分页列表数据
|
|
+ // 客户 change
|
|
- getCustAllList () {
|
|
+ custChange (obj) {
|
|
- const _this = this
|
|
+ this.queryParam.buyerSn = obj.key || undefined
|
|
- custAllList().then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.custAllList = res.data || []
|
|
|
|
- } else {
|
|
|
|
- _this.custAllList = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.$refs.rangeDate.resetDate()
|
|
this.$refs.rangeDate.resetDate()
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.endDate = ''
|
|
this.queryParam.endDate = ''
|
|
- this.queryParam.buyerName = undefined
|
|
+ this.queryParam.buyerSn = undefined
|
|
this.queryParam.salesBillNo = ''
|
|
this.queryParam.salesBillNo = ''
|
|
this.queryParam.purchaseBillNo = ''
|
|
this.queryParam.purchaseBillNo = ''
|
|
this.queryParam.payType = undefined
|
|
this.queryParam.payType = undefined
|
|
this.queryParam.settleStyleSn = undefined
|
|
this.queryParam.settleStyleSn = undefined
|
|
this.queryParam.billStatus = undefined
|
|
this.queryParam.billStatus = undefined
|
|
this.queryParam.financialStatus = undefined
|
|
this.queryParam.financialStatus = undefined
|
|
|
|
+ this.$refs.custList.resetForm()
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
- filterOption (input, option) {
|
|
|
|
- return (
|
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
// 获取收款方式
|
|
// 获取收款方式
|
|
getSettleStyle () {
|
|
getSettleStyle () {
|
|
settleStyleQueryAll().then(res => {
|
|
settleStyleQueryAll().then(res => {
|
|
@@ -394,7 +373,6 @@ export default {
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {
|
|
next(vm => {
|
|
- vm.getCustAllList()
|
|
|
|
vm.getSettleStyle()
|
|
vm.getSettleStyle()
|
|
})
|
|
})
|
|
}
|
|
}
|