Commit a77087a0 authored by xiejb's avatar xiejb

高级搜索 时间选择问题

parent a779c304
...@@ -552,7 +552,7 @@ export default { ...@@ -552,7 +552,7 @@ export default {
}, },
// 获取当月的开始与结束日期 // 获取当月的开始与结束日期
getCurrentMonth () { getCurrentMonth () {
this.moreSearchInfo.time.start = this.getDay(getFormateDate(new Date(), 'yyyy-MM-dd'), -30) this.moreSearchInfo.time.start = this.getDay(getFormateDate(new Date(), 'yyyy-MM-dd'), -29)
this.moreSearchInfo.time.end = getFormateDate(new Date(), 'yyyy-MM-dd') this.moreSearchInfo.time.end = getFormateDate(new Date(), 'yyyy-MM-dd')
// 返回 // 返回
// return startStop // return startStop
...@@ -560,7 +560,7 @@ export default { ...@@ -560,7 +560,7 @@ export default {
// 获得当前星期的开始与结束日期 // 获得当前星期的开始与结束日期
getCurrentWeek () { getCurrentWeek () {
var sunday = new Date() var sunday = new Date()
this.moreSearchInfo.time.start = this.getDay(getFormateDate(sunday, 'yyyy-MM-dd'), -7) this.moreSearchInfo.time.start = this.getDay(getFormateDate(sunday, 'yyyy-MM-dd'), -6)
this.moreSearchInfo.time.end = getFormateDate(sunday, 'yyyy-MM-dd') this.moreSearchInfo.time.end = getFormateDate(sunday, 'yyyy-MM-dd')
}, },
// 获取当天的日期 // 获取当天的日期
......
...@@ -161,29 +161,14 @@ export default { ...@@ -161,29 +161,14 @@ export default {
let data = { let data = {
list: companyList list: companyList
} }
// let data = {
// 'list': [
// {
// 'length': '1',
// 'attr': {
// 'empid': '199476,1',
// 'userid': '23528',
// 'sysname': 'ERP',
// 'companyname': '上药控股有限公司'
// },
// 'dbName': '',
// 'start': '1'
// }
// ]
// }
getEmployeeOrgQueryList(data).then(rt => { getEmployeeOrgQueryList(data).then(rt => {
if (rt.code === 200) { if (rt.code === 200) {
this.postDataList = rt.data // this.postDataList = rt.data
if (rt.data.length !== 0 && rt.data.length > 1) { if (rt.data.length !== 0 && rt.data.length > 1) {
this.moreSearchShow = true this.moreSearchShow = true
} else if (rt.data.length === 1) { } else if (rt.data.length === 1) {
this.moreSearchInfo.supplier = rt.data[0] this.moreSearchInfo.supplier = rt.data
this.getClienPostData(item,rt.data[0])
} else if (rt.data.length === 0) { } else if (rt.data.length === 0) {
this.moreSearchShow = true this.moreSearchShow = true
} }
...@@ -194,6 +179,42 @@ export default { ...@@ -194,6 +179,42 @@ export default {
_this.$toast('列表获取失败') _this.$toast('列表获取失败')
}) })
}, },
// 判断客户是否为一个
getClienPostData(consignorModel,clienItem) {
let _this = this
const companyList = []
const removeItem = {
'beforeP': consignorModel.db_source,
'middleP': process.env.appRealDb,
'afterP': [clienItem.org],
'saler': consignorModel.erp_user,
'companyname': consignorModel.companyname,
'companynameId': consignorModel.id
}
companyList.push(removeItem)
let data = {
'customer': _this.keywords,
'list': companyList,
'start': _this.currentPage,
'length': _this.pageSize
}
_this.loading = true
getOrderCustomerSetList(data).then(rt => {
if (rt.code === '1') {
if (rt.data.length !== 0 && rt.data.length > 1) {
this.moreSearchShow = true
} else if (rt.data.length === 1) {
this.moreSearchInfo.client = rt.data
} else if (rt.data.length === 0) {
this.moreSearchShow = true
}
} else {
_this.$toast(rt.msg)
}
}).catch(e => {
_this.$toast('列表获取失败')
})
},
// 单个发票点击事件 // 单个发票点击事件
orderItemAction(model) { orderItemAction(model) {
console.log(model) console.log(model)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment