Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
上
上药订单生命周期升级
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sph
上药订单生命周期升级
Commits
a40793a2
Commit
a40793a2
authored
Jun 24, 2021
by
xiejb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的发票 复用订单高级搜搜
parent
56bdaccb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
295 additions
and
25 deletions
+295
-25
src/views/myInvoice/index.vue
src/views/myInvoice/index.vue
+138
-15
src/views/myInvoice/indexOld.vue
src/views/myInvoice/indexOld.vue
+132
-0
src/views/myInvoice/myInvoiceList.vue
src/views/myInvoice/myInvoiceList.vue
+22
-8
src/views/myOrder/components/HighSearchNewDelete.vue
src/views/myOrder/components/HighSearchNewDelete.vue
+1
-1
src/views/myOrder/index.vue
src/views/myOrder/index.vue
+1
-0
src/views/myOrder/myOrderList.vue
src/views/myOrder/myOrderList.vue
+1
-1
No files found.
src/views/myInvoice/index.vue
View file @
a40793a2
<
template
>
<div
id=
"myInvoice"
>
<my-invoice-list
ref=
"invoiceList"
@
gotoDetail=
"gotoDetail"
/>
<high-search
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
<my-invoice-list
v-show=
"invoiceListShow"
ref=
"invoiceList"
@
gotoDetail=
"gotoDetail"
/>
<!--
<high-search
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
-->
<high-search
:more-search-info=
"moreSearchInfo"
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
</div>
</
template
>
<
script
>
import
HighSearch
from
'
./components/HighSearch.vue
'
// import HighSearch from './components/HighSearch.vue'
import
HighSearch
from
'
@/views/myOrder/components/HighSearchNewDelete.vue
'
import
{
getFormateDate
}
from
'
@/utils/common
'
import
myInvoiceList
from
'
./myInvoiceList.vue
'
import
invoiecDetail
from
'
./invoiecDetail.vue
'
import
{
getEmployeeOrgQueryList
,
getConsignorSetList
}
from
'
@/api/common
'
import
{
bridge
}
from
"
@/utils
"
;
export
default
{
name
:
'
MyInvoice
'
,
...
...
@@ -23,17 +26,18 @@ export default {
moreSearchShow
:
false
,
activeTab
:
'
home
'
,
moreSearchInfo
:
{
//接收搜索更多回传的数据
supplier
:
{
comPartyId
:
""
},
//供应商ID
goods
:
{
comGoodsId
:
""
},
//商品ID
orderNo
:
""
,
//订单编号
supplier
:
[],
// 供应商
consignor
:
[],
// 货主
goods
:
''
,
// 商品
client
:
[],
// 客户
orderNo
:
''
,
time
:
{
//起始时间
start
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
end
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
},
start
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
),
end
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
)
}
},
invoiceList
:
[]
invoiceList
:
[],
invoiceListShow
:
false
}
},
computed
:
{
...
...
@@ -80,7 +84,123 @@ export default {
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window
.
removeEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
mounted
()
{
// this.moreSearchShow = true
this
.
getConsignorPostData
()
// this.tabsTitleData()
},
methods
:
{
// 查询是否货主为单个
getConsignorPostData
()
{
let
_this
=
this
let
data
=
{
'
attr
'
:
{
'
empid
'
:
this
.
linkInfo
.
userId
},
'
filters
'
:
[],
'
logic
'
:
'
or
'
,
'
sort
'
:
'
desc
'
,
'
orderby
'
:
'
createon
'
,
'
pageNum
'
:
1
,
'
pageSize
'
:
10
}
getConsignorSetList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
200
)
{
// this.postDataList = rt.data.list
if
(
rt
.
data
.
length
!==
1
)
{
this
.
moreSearchShow
=
true
}
else
if
(
rt
.
data
.
length
===
1
)
{
this
.
moreSearchInfo
.
consignor
.
push
(
this
.
postDataListAction
(
rt
.
data
[
0
]))
this
.
getEmployeeOrgPostData
(
rt
.
data
[
0
])
}
else
if
(
rt
.
data
.
length
===
0
)
{
_this
.
$toast
(
'
暂无货主!
'
)
}
}
else
{
_this
.
$toast
(
rt
.
message
)
}
}).
catch
(
e
=>
{
_this
.
$toast
(
'
列表获取失败
'
)
})
},
postDataListAction
(
item
)
{
const
removeItem
=
item
removeItem
.
cellId
=
item
.
id
+
item
.
erp_user
return
item
},
// 获取供应商
getEmployeeOrgPostData
(
item
)
{
let
_this
=
this
const
companyList
=
[]
const
removeItem
=
{
'
length
'
:
'
100
'
,
'
attr
'
:
{
'
empid
'
:
this
.
linkInfo
.
userId
+
'
,1
'
,
'
userid
'
:
item
.
erp_user
,
'
sysname
'
:
item
.
sysname
,
'
companyname
'
:
item
.
companyname
},
'
dbName
'
:
''
,
'
start
'
:
'
1
'
}
companyList
.
push
(
removeItem
)
let
data
=
{
list
:
companyList
}
getEmployeeOrgQueryList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
200
)
{
// this.postDataList = rt.data
if
(
rt
.
data
.
length
!==
0
&&
rt
.
data
.
length
>
1
)
{
this
.
moreSearchShow
=
true
}
else
if
(
rt
.
data
.
length
===
1
)
{
this
.
moreSearchInfo
.
supplier
=
rt
.
data
this
.
getClienPostData
(
item
,
rt
.
data
[
0
])
}
else
if
(
rt
.
data
.
length
===
0
)
{
this
.
moreSearchShow
=
true
}
}
else
{
_this
.
$toast
(
rt
.
message
)
}
}).
catch
(
e
=>
{
_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
this
.
moreSearchConfirm
(
this
.
moreSearchInfo
)
}
else
if
(
rt
.
data
.
length
===
0
)
{
this
.
moreSearchShow
=
true
}
}
else
{
_this
.
$toast
(
rt
.
msg
)
}
}).
catch
(
e
=>
{
_this
.
$toast
(
'
列表获取失败
'
)
})
},
// 跳转发票详情
gotoDetail
(
model
)
{
console
.
log
(
model
)
...
...
@@ -108,12 +228,15 @@ export default {
// 高级搜索查询
moreSearchConfirm
(
data
)
{
console
.
log
(
data
)
this
.
$refs
.
invoiceList
[
0
].
httpAction
(
this
.
moreSearchInfo
)
this
.
invoiceListShow
=
true
this
.
moreSearchInfo
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
console
.
log
(
this
.
$refs
.
invoiceList
)
this
.
$refs
.
invoiceList
.
httpAction
(
this
.
moreSearchInfo
)
},
// 高级搜索取消
moreSearchClean
(
data
)
{
this
.
moreSearchInfo
=
data
;
this
.
$refs
.
invoiceList
[
0
]
.
httpAction
(
this
.
moreSearchInfo
)
this
.
moreSearchInfo
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
this
.
$refs
.
invoiceList
.
httpAction
(
this
.
moreSearchInfo
)
},
closeAppPage
()
{
console
.
log
(
'
关闭页面
'
)
...
...
src/views/myInvoice/indexOld.vue
0 → 100644
View file @
a40793a2
<
template
>
<div
id=
"myInvoice"
>
<my-invoice-list
ref=
"invoiceList"
@
gotoDetail=
"gotoDetail"
/>
<!--
<high-search
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
-->
<high-search
:more-search-info=
"moreSearchInfo"
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
</div>
</
template
>
<
script
>
// import HighSearch from './components/HighSearch.vue'
import
HighSearch
from
'
@/views/myOrder/components/HighSearchNewDelete.vue
'
import
{
getFormateDate
}
from
'
@/utils/common
'
import
myInvoiceList
from
'
./myInvoiceList.vue
'
import
invoiecDetail
from
'
./invoiecDetail.vue
'
import
{
bridge
}
from
"
@/utils
"
;
export
default
{
name
:
'
MyInvoice
'
,
components
:
{
HighSearch
,
myInvoiceList
},
data
()
{
return
{
tabsTitle
:
[],
moreSearchShow
:
false
,
activeTab
:
'
home
'
,
moreSearchInfo
:
{
//接收搜索更多回传的数据
supplier
:
{
comPartyId
:
""
},
//供应商ID
goods
:
{
comGoodsId
:
""
},
//商品ID
orderNo
:
""
,
//订单编号
time
:
{
//起始时间
start
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
end
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
},
},
invoiceList
:
[]
}
},
computed
:
{
linkInfo
()
{
return
this
.
$store
.
state
.
linkInfo
},
routKey
()
{
return
this
.
$route
.
path
},
searchTime
()
{
let
time
=
this
.
time
.
start
+
'
/
'
+
this
.
time
.
end
return
time
}
},
activated
()
{
// 设置标题栏关闭返回按钮
this
.
$store
.
commit
(
'
setNavBar
'
,
{
show
:
true
,
leftArrow
:
true
,
rightIcon
:
true
,
title
:
'
发票
'
,
leftText
:
''
,
leftClick
:
this
.
closeAppPage
,
rightClick
:
this
.
onMoreSearch
})
// 给window添加一个popstate事件,拦截返回键,执行this.onBrowserBack事件,addEventListener需要指向一个方法
window
.
addEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
mounted
()
{
// 设置标题栏关闭返回按钮
// this.$store.commit('setNavBar', {
// show: true,
// leftArrow: true,
// rightIcon: true,
// title: '发票',
// leftText: '',
// leftClick: this.closeAppPage,
// rightClick: this.onMoreSearch
// })
// // 给window添加一个popstate事件,拦截返回键,执行this.onBrowserBack事件,addEventListener需要指向一个方法
// window.addEventListener('popstate', this.onBrowserBack, false)
},
destroyed
()
{
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window
.
removeEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
methods
:
{
// 跳转发票详情
gotoDetail
(
model
)
{
console
.
log
(
model
)
this
.
$router
.
push
({
path
:
'
/invoiecDetail
'
,
query
:
model
});
},
onBrowserBack
()
{
if
(
this
.
moreSearchShow
)
{
this
.
moreSearchShow
=
false
return
}
this
.
$router
.
go
(
-
1
)
},
onSearch
()
{
},
onMoreSearch
()
{
this
.
moreSearchShow
=
!
this
.
moreSearchShow
if
(
this
.
moreSearchShow
)
{
window
.
history
.
pushState
(
null
,
null
,
document
.
URL
)
}
},
// 高级搜索查询
moreSearchConfirm
(
data
)
{
console
.
log
(
data
)
this
.
$refs
.
invoiceList
[
0
].
httpAction
(
this
.
moreSearchInfo
)
},
// 高级搜索取消
moreSearchClean
(
data
)
{
this
.
moreSearchInfo
=
data
;
this
.
$refs
.
invoiceList
[
0
].
httpAction
(
this
.
moreSearchInfo
)
},
closeAppPage
()
{
console
.
log
(
'
关闭页面
'
)
bridge
.
closeWindow_c
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#myInvoice
{
height
:
100%
;
}
</
style
>
src/views/myInvoice/myInvoiceList.vue
View file @
a40793a2
...
...
@@ -41,16 +41,27 @@ export default {
logInfoShow
:
false
,
invoiceList
:
[],
invoiceItem
:
{},
// moreSearchInfo: {
// //接收搜索更多回传的数据
// supplier: { comPartyId: "" }, //供应商ID
// goods: { comGoodsId: "" }, //商品ID
// orderNo: "", //订单编号
// time: {
// //起始时间
// start: getFormateDate(new Date(), "yyyy-MM-dd"),
// end: getFormateDate(new Date(), "yyyy-MM-dd"),
// },
// },
moreSearchInfo
:
{
//接收搜索更多回传的数据
supplier
:
{
comPartyId
:
""
},
//供应商ID
goods
:
{
comGoodsId
:
""
},
//商品ID
orderNo
:
""
,
//订单编号
supplier
:
[],
// 供应商
consignor
:
[],
// 货主
goods
:
''
,
// 商品
client
:
[],
// 客户
orderNo
:
''
,
time
:
{
//起始时间
start
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
end
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
},
start
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
),
end
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
)
}
},
sphImage
:
require
(
'
@/assets/img/u48.png
'
),
}
...
...
@@ -167,6 +178,9 @@ export default {
overflow-y
:
auto
;
padding
:
10
PX
;
-webkit-overflow-scrolling
:
touch
;
.list
{
min-height
:
100%
;
}
.invoiceItem
{
// height: 145PX;
background-color
:
white
;
...
...
src/views/myOrder/components/HighSearchNewDelete.vue
View file @
a40793a2
...
...
@@ -455,7 +455,7 @@ export default {
// 供应商字段拼接
supplierStitching
()
{
let
str
=
''
console
.
log
(
this
.
moreSearchInfo
)
//
console.log(this.moreSearchInfo)
if
(
this
.
moreSearchInfo
.
supplier
.
length
===
1
)
{
str
=
this
.
supplierInfoStitching
(
this
.
moreSearchInfo
.
supplier
[
0
])
}
else
if
(
this
.
moreSearchInfo
.
supplier
.
length
>
1
)
{
...
...
src/views/myOrder/index.vue
View file @
a40793a2
...
...
@@ -143,6 +143,7 @@ export default {
removeItem
.
cellId
=
item
.
id
+
item
.
erp_user
return
item
},
// 获取供应商
getEmployeeOrgPostData
(
item
)
{
let
_this
=
this
const
companyList
=
[]
...
...
src/views/myOrder/myOrderList.vue
View file @
a40793a2
...
...
@@ -242,7 +242,7 @@ export default {
let
_this
=
this
const
sourceDbList
=
[]
const
dataList
=
[]
//
console.log(_this.moreSearchInfo)
console
.
log
(
_this
.
moreSearchInfo
)
_this
.
moreSearchInfo
.
consignor
.
forEach
(
item
=>
{
if
(
sourceDbList
.
indexOf
(
item
.
ownerid
)
>
-
1
)
{
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment