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
fcdea7fd
Commit
fcdea7fd
authored
Mar 24, 2021
by
xiejb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
高级搜索 供应商接口
parent
8daf1cdc
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
89 deletions
+113
-89
src/api/common.js
src/api/common.js
+10
-0
src/components/SearchGoods.vue
src/components/SearchGoods.vue
+13
-5
src/components/SearchInClient.vue
src/components/SearchInClient.vue
+14
-2
src/components/SearchInConsignor.vue
src/components/SearchInConsignor.vue
+9
-9
src/components/SearchInSupplier.vue
src/components/SearchInSupplier.vue
+46
-59
src/views/myOrder/components/HighSearch.vue
src/views/myOrder/components/HighSearch.vue
+20
-13
src/views/myOrder/index.vue
src/views/myOrder/index.vue
+1
-1
No files found.
src/api/common.js
View file @
fcdea7fd
...
@@ -74,6 +74,7 @@ export function getGoodsSetList(params) {
...
@@ -74,6 +74,7 @@ export function getGoodsSetList(params) {
loading
:
true
loading
:
true
})
})
}
}
// ====================高级搜索====================
// 获取货主列表
// 获取货主列表
export
function
getConsignorSetList
(
params
)
{
export
function
getConsignorSetList
(
params
)
{
return
fetch
({
return
fetch
({
...
@@ -83,3 +84,12 @@ export function getConsignorSetList(params) {
...
@@ -83,3 +84,12 @@ export function getConsignorSetList(params) {
loading
:
true
loading
:
true
})
})
}
}
// 获取供应商
export
function
getEmployeeOrgQueryList
(
params
)
{
return
fetch
({
url
:
'
/CompanyOrderLife/checkCompanyNum
'
,
method
:
'
post
'
,
data
:
params
,
loading
:
true
})
}
\ No newline at end of file
src/components/SearchGoods.vue
View file @
fcdea7fd
...
@@ -84,9 +84,10 @@ export default {
...
@@ -84,9 +84,10 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
},
customer
:
{
// 货主
type
:
Object
,
consignor
:
{
default
:
()
=>
{}
type
:
Array
,
default
:
()
=>
[]
}
}
},
},
watch
:
{
watch
:
{
...
@@ -166,10 +167,17 @@ export default {
...
@@ -166,10 +167,17 @@ export default {
},
},
getPostData
()
{
getPostData
()
{
let
_this
=
this
let
_this
=
this
// let data = {
// 'goods': _this.keywords,
// 'dbName': this.linkInfo.sysDbSource + '-' + this.linkInfo.appRealDb + '-' + this.linkInfo.sysOrgId,
// 'saler': this.linkInfo.sysUserId,
// 'start': _this.currentPage,
// 'length': _this.pageSize
// }
let
data
=
{
let
data
=
{
'
goods
'
:
_this
.
keywords
,
'
goods
'
:
_this
.
keywords
,
'
dbName
'
:
this
.
linkInfo
.
sysDbSource
+
'
-
'
+
this
.
linkInfo
.
appRealDb
+
'
-
'
+
this
.
linkInfo
.
sysOrgId
,
'
dbName
'
:
'
erp_test_shaphar-app_test_shaphar-200
'
,
'
saler
'
:
this
.
linkInfo
.
sysUserId
,
'
saler
'
:
'
22998
'
,
'
start
'
:
_this
.
currentPage
,
'
start
'
:
_this
.
currentPage
,
'
length
'
:
_this
.
pageSize
'
length
'
:
_this
.
pageSize
}
}
...
...
src/components/SearchInClient.vue
View file @
fcdea7fd
...
@@ -88,6 +88,11 @@ export default {
...
@@ -88,6 +88,11 @@ export default {
type
:
Object
,
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{}
},
},
// 货主
consignor
:
{
type
:
Array
,
default
:
()
=>
[]
},
chinfo
:
{
chinfo
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
default
:
()
=>
{
...
@@ -175,10 +180,17 @@ export default {
...
@@ -175,10 +180,17 @@ export default {
},
},
getPostData
()
{
getPostData
()
{
let
_this
=
this
let
_this
=
this
// let data = {
// 'customer':_this.keywords,
// 'dbName': this.linkInfo.sysDbSource + '-' + this.linkInfo.appRealDb + '-' + this.linkInfo.sysOrgId,
// 'saler': this.linkInfo.sysUserId,
// 'start': _this.currentPage,
// 'length': _this.pageSize
// }
let
data
=
{
let
data
=
{
'
customer
'
:
_this
.
keywords
,
'
customer
'
:
_this
.
keywords
,
'
dbName
'
:
this
.
linkInfo
.
sysDbSource
+
'
-
'
+
this
.
linkInfo
.
appRealDb
+
'
-
'
+
this
.
linkInfo
.
sysOrgId
,
'
dbName
'
:
'
erp_test_shaphar-app_test_shaphar-508
'
,
'
saler
'
:
this
.
linkInfo
.
sysUserId
,
'
saler
'
:
'
23528
'
,
'
start
'
:
_this
.
currentPage
,
'
start
'
:
_this
.
currentPage
,
'
length
'
:
_this
.
pageSize
'
length
'
:
_this
.
pageSize
}
}
...
...
src/components/SearchInConsignor.vue
View file @
fcdea7fd
...
@@ -200,7 +200,7 @@ export default {
...
@@ -200,7 +200,7 @@ export default {
let
_this
=
this
let
_this
=
this
let
data
=
{
let
data
=
{
'
attr
'
:
{
'
attr
'
:
{
'
empid
'
:
'
199476
'
'
empid
'
:
this
.
linkInfo
.
userId
},
},
'
filters
'
:
[],
'
filters
'
:
[],
'
logic
'
:
'
or
'
,
'
logic
'
:
'
or
'
,
...
...
src/components/SearchInSupplier.vue
View file @
fcdea7fd
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<van-cell
:title=
"titleInitial(item)"
clickable
@
click=
"itemClick(item,index)"
v-for=
"(item,index) in postDataList"
<van-cell
:title=
"titleInitial(item)"
clickable
@
click=
"itemClick(item,index)"
v-for=
"(item,index) in postDataList"
:key=
"index"
>
:key=
"index"
>
<template
#right-icon
>
<template
#right-icon
>
<van-radio
:name=
"item.
comPartyId
"
/>
<van-radio
:name=
"item.
org
"
/>
</
template
>
</
template
>
</van-cell>
</van-cell>
</van-cell-group>
</van-cell-group>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
get
CgSuppl
yList
}
from
'
@/api/common
'
import
{
get
EmployeeOrgQuer
yList
}
from
'
@/api/common
'
import
{
getResListNum
}
from
'
../utils/common
'
import
{
getResListNum
}
from
'
../utils/common
'
import
SearchResult
from
'
./SearchResult
'
import
SearchResult
from
'
./SearchResult
'
import
{
Dialog
}
from
'
vant
'
import
{
Dialog
}
from
'
vant
'
...
@@ -100,8 +100,9 @@ export default {
...
@@ -100,8 +100,9 @@ export default {
if
(
val
)
{
if
(
val
)
{
this
.
postDataList
=
[]
this
.
postDataList
=
[]
this
.
choosedPost
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
customer
))
this
.
choosedPost
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
customer
))
this
.
checked
=
!
this
.
customer
.
comPartyId
?
''
:
this
.
customer
.
comPartyId
this
.
checked
=
!
this
.
customer
.
org
?
''
:
this
.
customer
.
org
console
.
log
(
this
.
checked
)
console
.
log
(
this
.
checked
)
console
.
log
(
this
.
consignor
)
this
.
currentPage
=
1
this
.
currentPage
=
1
this
.
onLoad
()
this
.
onLoad
()
}
}
...
@@ -116,8 +117,8 @@ export default {
...
@@ -116,8 +117,8 @@ export default {
methods
:
{
methods
:
{
/// 标题拼接
<!--
药厂码
/
(
SAP
码)名称
-->
/// 标题拼接
<!--
药厂码
/
(
SAP
码)名称
-->
titleInitial
(
model
)
{
titleInitial
(
model
)
{
let
titleStr
=
model
.
comPartyId
+
'
/(
'
+
model
.
partyOpcode
+
'
)/
'
+
model
.
partyName
// let titleStr = model.org
+ '/(' + model.partyOpcode + ')/' + model.partyName
return
titleStr
return
model
.
partyName
},
},
onSearch
()
{
onSearch
()
{
// if (!this.isJudgeStrNull(this.keywords)) {
// if (!this.isJudgeStrNull(this.keywords)) {
...
@@ -139,7 +140,7 @@ export default {
...
@@ -139,7 +140,7 @@ export default {
this
.
$emit
(
'
cancleclick
'
)
this
.
$emit
(
'
cancleclick
'
)
},
},
onConfirmClick
()
{
onConfirmClick
()
{
if
(
!
this
.
choosedPost
.
comPartyId
)
{
if
(
!
this
.
choosedPost
.
org
)
{
Dialog
.
alert
({
Dialog
.
alert
({
title
:
'
温馨提示
'
,
title
:
'
温馨提示
'
,
message
:
'
请选择选项!
'
message
:
'
请选择选项!
'
...
@@ -154,7 +155,7 @@ export default {
...
@@ -154,7 +155,7 @@ export default {
})
})
},
},
itemClick
(
item
,
index
)
{
itemClick
(
item
,
index
)
{
this
.
checked
=
item
.
comPartyId
this
.
checked
=
item
.
org
this
.
choosedPost
=
item
this
.
choosedPost
=
item
},
},
onRefresh
()
{
onRefresh
()
{
...
@@ -171,29 +172,48 @@ export default {
...
@@ -171,29 +172,48 @@ export default {
},
},
getPostData
()
{
getPostData
()
{
let
_this
=
this
let
_this
=
this
const
companyList
=
[]
_this
.
consignor
.
forEach
(
item
=>
{
const
removeItem
=
{
'
length
'
:
'
100
'
,
'
attr
'
:
{
'
empid
'
:
this
.
linkInfo
.
userId
+
'
,1
'
,
'
userid
'
:
'
23528
'
,
'
sysname
'
:
item
.
sysname
,
'
companyname
'
:
item
.
companyname
},
'
dbName
'
:
''
,
'
start
'
:
'
1
'
}
companyList
.
push
(
removeItem
)
})
console
.
log
(
companyList
)
let
data
=
{
let
data
=
{
// 'dbSource':this.linkInfo.sysDbSource,
'
list
'
:
[
'
dbSource
'
:
'
erp_test_shaphar
'
,
{
'
pageNum
'
:
_this
.
currentPage
,
'
length
'
:
'
100
'
,
'
pageSize
'
:
_this
.
pageSize
,
'
attr
'
:
{
// 'erpUserId':this.linkInfo.sysUserId,
'
empid
'
:
'
199476,1
'
,
'
erpUserId
'
:
'
23528
'
,
'
userid
'
:
'
23528
'
,
'
invOwner
'
:
'
200
'
,
'
sysname
'
:
'
ERP
'
,
'
goodsId
'
:
''
,
'
companyname
'
:
'
上药控股有限公司
'
'
supply
'
:
_this
.
keywords
},
'
dbName
'
:
''
,
'
start
'
:
'
1
'
}
}
getCgSupplyList
(
data
).
then
(
rt
=>
{
]
}
if
(
rt
.
code
===
'
00000
'
)
{
getEmployeeOrgQueryList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
200
)
{
if
(
_this
.
currentPage
===
1
)
{
if
(
_this
.
currentPage
===
1
)
{
_this
.
searchNum
=
rt
.
entity
.
total
+
''
//
_this.searchNum = rt.entity.total + ''
this
.
postDataList
=
[]
this
.
postDataList
=
[]
}
}
if
(
this
.
isRefreshing
)
{
if
(
this
.
isRefreshing
)
{
this
.
postDataList
=
rt
.
entity
.
supplyList
this
.
postDataList
=
rt
.
data
}
}
else
if
(
!!
rt
.
entity
.
supplyList
||
rt
.
entity
.
supplyList
.
length
>
0
)
{
else
if
(
!!
rt
.
data
||
rt
.
data
.
length
>
0
)
{
this
.
postDataList
=
this
.
postDataList
.
concat
(
rt
.
entity
.
supplyList
)
this
.
postDataList
=
this
.
postDataList
.
concat
(
rt
.
data
)
}
}
// _this.postDataListSetAction(rt.data)
// _this.postDataListSetAction(rt.data)
// 重置刷新提示
// 重置刷新提示
...
@@ -201,12 +221,12 @@ export default {
...
@@ -201,12 +221,12 @@ export default {
// 重置加载更多提示
// 重置加载更多提示
_this
.
loading
=
false
_this
.
loading
=
false
// 若当前加载的页数没有满足每页的数量代表完全加载
// 若当前加载的页数没有满足每页的数量代表完全加载
if
(
rt
.
entity
.
supplyList
.
length
<
10
)
{
// if (rt.data
.length
<
10
)
{
_this
.
finished
=
true
_this
.
finished
=
true
}
else
{
//
} else {
// 加载成功后下一页自增1
// 加载成功后下一页自增1
_this
.
currentPage
++
_this
.
currentPage
++
}
//
}
}
else
{
}
else
{
_this
.
$toast
(
rt
.
message
)
_this
.
$toast
(
rt
.
message
)
// _this.$toast('列表获取失败')
// _this.$toast('列表获取失败')
...
@@ -224,39 +244,6 @@ export default {
...
@@ -224,39 +244,6 @@ export default {
_this
.
finished
=
true
_this
.
finished
=
true
})
})
},
},
// 数据处理
postDataListSetAction
(
array
)
{
array
.
forEach
((
res
)
=>
{
this
.
postDataList
.
push
({
assigneeFactoryId
:
res
.
assigneeFactoryId
,
catagory
:
res
.
catagory
,
comGoodsFormId
:
res
.
comGoodsFormId
,
comGoodsId
:
res
.
comGoodsId
,
comGoodsVarietyId
:
res
.
comGoodsVarietyId
,
comUnitId
:
res
.
comUnitId
,
defaultExpireDate
:
res
.
defaultExpireDate
,
factoryId
:
res
.
factoryId
,
goodsDesc
:
res
.
goodsDesc
,
goodsName
:
res
.
goodsName
,
goodsOpcode
:
res
.
goodsOpcode
,
goodsSpell
:
res
.
goodsSpell
,
goodsStatus
:
res
.
goodsStatus
,
midPacknum
:
res
.
midPacknum
,
packageNum
:
res
.
packageNum
,
partyName
:
res
.
partyName
,
partyName1
:
res
.
partyName1
,
partyOpcode
:
res
.
partyOpcode
,
productLocation
:
res
.
productLocation
,
unitName
:
res
.
unitName
,
goodsForm
:
res
.
goodsForm
,
partyOpcode1
:
res
.
partyOpcode1
,
priceCode
:
res
.
priceCode
,
retailPrice
:
res
.
retailPrice
,
taxRate
:
res
.
taxRate
,
varietyName
:
res
.
varietyName
,
})
})
},
/// 判断数值是否为空
/// 判断数值是否为空
isJudgeStrNull
(
val
)
{
isJudgeStrNull
(
val
)
{
if
(
val
!==
null
&&
val
!==
undefined
&&
val
!==
''
)
{
if
(
val
!==
null
&&
val
!==
undefined
&&
val
!==
''
)
{
...
...
src/views/myOrder/components/HighSearch.vue
View file @
fcdea7fd
...
@@ -96,6 +96,7 @@
...
@@ -96,6 +96,7 @@
<search-goods
<search-goods
v-model=
"moreSearchDialog.goodsShow"
v-model=
"moreSearchDialog.goodsShow"
:customer=
"!moreSearchInfo.goods ? {}:moreSearchInfo.goods"
:customer=
"!moreSearchInfo.goods ? {}:moreSearchInfo.goods"
:consignor=
"moreSearchInfo.consignor"
@
cancleclick=
"showPost"
@
cancleclick=
"showPost"
@
confirmclick=
"postConfirm"
@
confirmclick=
"postConfirm"
></search-goods>
></search-goods>
...
@@ -103,6 +104,7 @@
...
@@ -103,6 +104,7 @@
<search-in-client
<search-in-client
v-model=
"moreSearchDialog.clientShow"
v-model=
"moreSearchDialog.clientShow"
:customer=
"!moreSearchInfo.client ? {}:moreSearchInfo.client"
:customer=
"!moreSearchInfo.client ? {}:moreSearchInfo.client"
:consignor=
"moreSearchInfo.consignor"
:chinfo=
"chinfo"
:chinfo=
"chinfo"
@
cancleclick=
"showPost"
@
cancleclick=
"showPost"
@
confirmclick=
"postConfirm"
@
confirmclick=
"postConfirm"
...
@@ -140,17 +142,6 @@ export default {
...
@@ -140,17 +142,6 @@ export default {
goodsShow
:
false
,
goodsShow
:
false
,
clientShow
:
false
clientShow
:
false
},
},
moreSearchInfo
:
{
supplier
:
''
,
// 供应商
consignor
:
[],
// 货主
goods
:
''
,
// 商品
client
:
''
,
// 客户
orderNo
:
''
,
// 订单号
time
:
{
start
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
),
end
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
)
},
},
chinfo
:
{
chinfo
:
{
goodsId
:
''
,
goodsId
:
''
,
supplier
:
''
supplier
:
''
...
@@ -182,8 +173,8 @@ export default {
...
@@ -182,8 +173,8 @@ export default {
computed
:
{
computed
:
{
// 供应商
// 供应商
supplier
()
{
supplier
()
{
if
(
this
.
moreSearchInfo
.
supplier
.
comPartyId
)
{
if
(
this
.
moreSearchInfo
.
supplier
.
org
)
{
return
!
this
.
moreSearchInfo
.
supplier
?
''
:
(
this
.
moreSearchInfo
.
supplier
.
comPartyId
+
'
/(
'
+
this
.
moreSearchInfo
.
supplier
.
partyOpcode
+
'
)
'
+
this
.
moreSearchInfo
.
supplier
.
partyName
)
return
!
this
.
moreSearchInfo
.
supplier
?
''
:
this
.
moreSearchInfo
.
supplier
.
partyName
}
else
{
}
else
{
return
''
return
''
}
}
...
@@ -241,6 +232,22 @@ export default {
...
@@ -241,6 +232,22 @@ export default {
choosetime
:
{
choosetime
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{}
},
moreSearchInfo
:
{
type
:
Object
,
default
:
()
=>
{
return
{
supplier
:
''
,
// 供应商
consignor
:
[],
// 货主
goods
:
''
,
// 商品
client
:
''
,
// 客户
orderNo
:
''
,
// 订单号
time
:
{
start
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
),
end
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
)
}
}
}
}
}
},
},
watch
:
{
watch
:
{
...
...
src/views/myOrder/index.vue
View file @
fcdea7fd
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<my-order-list
:more-search-info=
"moreSearchInfo"
:ref=
"item.name"
:orderTypeCode=
"item.orderTypeCode"
:activeTab=
"activeTab"
@
orderItemAction=
"orderItemAction"
/>
<my-order-list
:more-search-info=
"moreSearchInfo"
:ref=
"item.name"
:orderTypeCode=
"item.orderTypeCode"
:activeTab=
"activeTab"
@
orderItemAction=
"orderItemAction"
/>
</van-tab>
</van-tab>
</van-tabs>
</van-tabs>
<high-search
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
<high-search
:more-search-info=
"moreSearchInfo"
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
</div>
</div>
</
template
>
</
template
>
...
...
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