|
@@ -6,24 +6,12 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="创建时间">
|
|
|
- <a-range-picker
|
|
|
- style="width:100%"
|
|
|
- id="salesReturn-creatDate"
|
|
|
- :disabledDate="disabledDate"
|
|
|
- v-model="createDate"
|
|
|
- :format="dateFormat"
|
|
|
- :placeholder="['开始时间', '结束时间']" />
|
|
|
+ <rangeDate ref="rangeCreateDate" :value="createDate" @change="dateCreateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="审核时间">
|
|
|
- <a-range-picker
|
|
|
- style="width:100%"
|
|
|
- id="salesReturn-examineTime"
|
|
|
- :disabledDate="disabledDate"
|
|
|
- v-model="examineTime"
|
|
|
- :format="dateFormat"
|
|
|
- :placeholder="['开始时间', '结束时间']" />
|
|
|
+ <rangeDate ref="rangeExamineDate" @change="dateExamineChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -164,6 +152,7 @@
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
|
import custList from '@/views/common/custList.vue'
|
|
|
+import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { salesReturnList, salesReturnQueryCount, salesReturnAudit, salesReturnDel } from '@/api/salesReturn'
|
|
|
import moment from 'moment'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
@@ -173,7 +162,8 @@ export default {
|
|
|
STable,
|
|
|
VSelect,
|
|
|
chooseCustomModal,
|
|
|
- custList
|
|
|
+ custList,
|
|
|
+ rangeDate
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -181,24 +171,22 @@ export default {
|
|
|
// 高级搜索 展开/关闭
|
|
|
advanced: false,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
- dateFormat: 'YYYY-MM-DD',
|
|
|
createDate: [
|
|
|
moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
], // 创建时间
|
|
|
- examineTime: [], // 审核时间
|
|
|
openModal: false, // 选择客户弹框是否显示
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
+ beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime,
|
|
|
+ beginAuditDate: '',
|
|
|
+ endAuditDate: '',
|
|
|
buyerSn: undefined, // 客户名称
|
|
|
salesReturnBillNo: undefined, // 总部销退单号
|
|
|
purchaseReturnBillNo: '',
|
|
|
billStatus: undefined, // 业务状态
|
|
|
// financialStatus: undefined, // 财务状态
|
|
|
- beginDate: undefined,
|
|
|
- endDate: undefined,
|
|
|
- beginAuditDate: undefined,
|
|
|
- endAuditDate: undefined
|
|
|
},
|
|
|
countData: null, // 统计数据
|
|
|
// 表头
|
|
@@ -225,22 +213,6 @@ export default {
|
|
|
if (this.tableHeight == 0) {
|
|
|
this.tableHeight = window.innerHeight - 440
|
|
|
}
|
|
|
- // 创建时间
|
|
|
- if (this.createDate && this.createDate.length > 0) {
|
|
|
- this.queryParam.beginDate = moment(this.createDate[0]).format(this.dateFormat)
|
|
|
- this.queryParam.endDate = moment(this.createDate[1]).format(this.dateFormat)
|
|
|
- } else {
|
|
|
- this.queryParam.beginDate = undefined
|
|
|
- this.queryParam.endDate = undefined
|
|
|
- }
|
|
|
- // 审核时间
|
|
|
- if (this.examineTime && this.examineTime.length > 0) {
|
|
|
- this.queryParam.beginAuditDate = moment(this.examineTime[0]).format(this.dateFormat)
|
|
|
- this.queryParam.endAuditDate = moment(this.examineTime[1]).format(this.dateFormat)
|
|
|
- } else {
|
|
|
- this.queryParam.beginAuditDate = undefined
|
|
|
- this.queryParam.endAuditDate = undefined
|
|
|
- }
|
|
|
// 查询总计
|
|
|
this.getQueryCount(Object.assign(parameter, this.queryParam))
|
|
|
return salesReturnList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
@@ -256,13 +228,19 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 创建时间 change
|
|
|
+ dateCreateChange (date) {
|
|
|
+ this.queryParam.beginDate = date[0]
|
|
|
+ this.queryParam.endDate = date[1]
|
|
|
+ },
|
|
|
+ // 审核时间 change
|
|
|
+ dateExamineChange (date) {
|
|
|
+ this.queryParam.beginAuditDate = date[0]
|
|
|
+ this.queryParam.endAuditDate = date[1]
|
|
|
+ },
|
|
|
custChange (val) {
|
|
|
this.queryParam.buyerSn = val.key
|
|
|
},
|
|
|
- // 不可选日期
|
|
|
- disabledDate (date, dateStrings) {
|
|
|
- return date && date.valueOf() > Date.now()
|
|
|
- },
|
|
|
// 列表统计
|
|
|
getQueryCount (params) {
|
|
|
salesReturnQueryCount(params).then(res => {
|
|
@@ -331,21 +309,18 @@ export default {
|
|
|
this.$router.push({ name: 'salesReturnCheck', params: { sn: row.salesReturnBillSn } })
|
|
|
},
|
|
|
resetSearchForm () {
|
|
|
+ this.$refs.rangeCreateDate.resetDate(this.createDate)
|
|
|
+ this.$refs.rangeExamineDate.resetDate()
|
|
|
+ this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
|
+ this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
+ this.queryParam.beginAuditDate = ''
|
|
|
+ this.queryParam.endAuditDate = ''
|
|
|
this.queryParam.buyerSn = undefined
|
|
|
this.$refs.custList.resetForm()
|
|
|
this.queryParam.salesReturnBillNo = ''
|
|
|
this.queryParam.purchaseReturnBillNo = ''
|
|
|
this.queryParam.billStatus = undefined
|
|
|
// this.queryParam.financialStatus = undefined
|
|
|
- this.queryParam.beginDate = undefined
|
|
|
- this.endDate = undefined
|
|
|
- this.beginAuditDate = undefined
|
|
|
- this.endAuditDate = undefined
|
|
|
- this.createDate = [
|
|
|
- moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
- moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
- ]
|
|
|
- this.examineTime = []
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
filterOption (input, option) {
|