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
763ca4b6
Commit
763ca4b6
authored
Mar 18, 2021
by
xiejb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
高级搜索 商品 客户 切换erp接口
parent
b65ba724
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
116 deletions
+54
-116
src/api/common.js
src/api/common.js
+10
-1
src/components/SearchInClient.vue
src/components/SearchInClient.vue
+15
-51
src/components/SearchInConsignor.vue
src/components/SearchInConsignor.vue
+20
-55
src/views/myOrder/components/HighSearch.vue
src/views/myOrder/components/HighSearch.vue
+5
-5
src/views/myOrder/orderListItem.vue
src/views/myOrder/orderListItem.vue
+4
-4
No files found.
src/api/common.js
View file @
763ca4b6
...
...
@@ -8,7 +8,7 @@ export function getCustomerList(params) {
loading
:
true
})
}
// 获取商品列表
// 获取
采购
商品列表
export
function
getCgGoodsList
(
params
)
{
return
fetch
({
url
:
'
/purchaseCommon/queryAllGoods
'
,
...
...
@@ -17,6 +17,15 @@ export function getCgGoodsList(params) {
loading
:
true
})
}
// 获取商品列表
export
function
getGoodsList
(
params
)
{
return
fetch
({
url
:
'
/product/queryGoods_PS
'
,
method
:
'
post
'
,
data
:
params
,
loading
:
true
})
}
// 获取供应商列表
export
function
getCgSupplyList
(
params
)
{
return
fetch
({
...
...
src/components/SearchInClient.vue
View file @
763ca4b6
...
...
@@ -50,13 +50,13 @@
</template>
<
script
>
import
{
getC
gSupplyList
}
from
'
@
/api/common
'
import
{
getC
ustomerList
}
from
'
..
/api/common
'
import
{
getResListNum
}
from
'
../utils/common
'
import
SearchResult
from
'
./SearchResult
'
import
{
Dialog
}
from
'
vant
'
export
default
{
name
:
'
SearchIn
Supplier
'
,
name
:
'
SearchIn
Client
'
,
components
:
{
SearchResult
},
data
()
{
return
{
...
...
@@ -176,26 +176,23 @@ export default {
getPostData
()
{
let
_this
=
this
let
data
=
{
'
dbSource
'
:
this
.
linkInfo
.
sysDbSource
,
'
pageNum
'
:
_this
.
currentPage
,
'
pageSize
'
:
_this
.
pageSize
,
'
erpUserId
'
:
this
.
linkInfo
.
sysUserId
,
'
invOwner
'
:
this
.
linkInfo
.
sysOrgId
,
'
goodsId
'
:
_this
.
chinfo
.
goodsId
,
'
supply
'
:
_this
.
keywords
'
customer
'
:
_this
.
keywords
,
'
dbName
'
:
this
.
linkInfo
.
sysDbSource
+
'
-
'
+
this
.
linkInfo
.
appRealDb
+
'
-
'
+
this
.
linkInfo
.
sysOrgId
,
'
saler
'
:
this
.
linkInfo
.
sysUserId
,
'
start
'
:
_this
.
currentPage
,
'
length
'
:
_this
.
pageSize
}
getCgSupplyList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
'
00000
'
)
{
getCustomerList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
'
1
'
)
{
if
(
_this
.
currentPage
===
1
)
{
_this
.
searchNum
=
rt
.
entity
.
total
+
''
_this
.
searchNum
=
getResListNum
(
rt
.
msg
)
this
.
postDataList
=
[]
}
if
(
this
.
isRefreshing
)
{
this
.
postDataList
=
rt
.
entity
.
supplyList
this
.
postDataList
=
rt
.
data
}
else
if
(
!!
rt
.
entity
.
supplyList
||
rt
.
entity
.
supplyList
.
length
>
0
)
{
this
.
postDataList
=
this
.
postDataList
.
concat
(
rt
.
entity
.
supplyList
)
else
if
(
!!
rt
.
data
||
rt
.
data
.
length
>
0
)
{
this
.
postDataList
=
this
.
postDataList
.
concat
(
rt
.
data
)
}
// _this.postDataListSetAction(rt.data)
// 重置刷新提示
...
...
@@ -203,14 +200,14 @@ export default {
// 重置加载更多提示
_this
.
loading
=
false
// 若当前加载的页数没有满足每页的数量代表完全加载
if
(
rt
.
entity
.
supplyList
.
length
<
10
)
{
if
(
rt
.
data
.
length
<
10
)
{
_this
.
finished
=
true
}
else
{
// 加载成功后下一页自增1
_this
.
currentPage
++
}
}
else
{
_this
.
$toast
(
rt
.
m
essage
)
_this
.
$toast
(
rt
.
m
sg
)
// _this.$toast('列表获取失败')
_this
.
isRefreshing
=
false
_this
.
error
=
true
...
...
@@ -226,39 +223,6 @@ export default {
_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
)
{
if
(
val
!==
null
&&
val
!==
undefined
&&
val
!==
''
)
{
...
...
src/components/SearchInConsignor.vue
View file @
763ca4b6
...
...
@@ -43,7 +43,7 @@
<van-cell
:title=
"titleInitial(item)"
clickable
@
click=
"itemClick(item,index)"
v-for=
"(item,index) in postDataList"
:key=
"index"
>
<
template
#right-icon
>
<van-checkbox
:name=
"item.com
Party
Id"
/>
<van-checkbox
:name=
"item.com
Goods
Id"
/>
</
template
>
</van-cell>
</van-cell-group>
...
...
@@ -60,7 +60,7 @@
</template>
<
script
>
import
{
get
CgSupply
List
}
from
'
@/api/common
'
import
{
get
Goods
List
}
from
'
@/api/common
'
import
{
getResListNum
}
from
'
../utils/common
'
import
SearchResult
from
'
./SearchResult
'
import
{
Dialog
}
from
'
vant
'
...
...
@@ -119,7 +119,7 @@ export default {
// this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
// console.log(this.checked)
this
.
customer
.
forEach
((
res
)
=>
{
this
.
checkedList
.
push
(
res
.
com
Party
Id
)
this
.
checkedList
.
push
(
res
.
com
Goods
Id
)
})
this
.
currentPage
=
1
this
.
onRefresh
()
...
...
@@ -135,7 +135,7 @@ export default {
methods
:
{
/// 标题拼接
<!--
药厂码
/
(
SAP
码)名称
-->
titleInitial
(
model
)
{
let
titleStr
=
model
.
com
PartyId
+
'
/(
'
+
model
.
partyOpcode
+
'
)/
'
+
model
.
party
Name
let
titleStr
=
model
.
com
GoodsId
+
'
/(
'
+
model
.
goodsOpcode
+
'
)
'
+
model
.
goodsName
+
'
/
'
+
model
.
goodsDesc
+
'
/
'
+
model
.
partyName
+
'
/
'
+
model
.
packageNum
+
'
/
'
+
model
.
unit
Name
return
titleStr
},
onSearch
()
{
...
...
@@ -176,11 +176,11 @@ export default {
itemClick
(
item
,
index
)
{
// this.checked = item.comPartyId
// this.choosedPost = item
if
(
this
.
checkedList
.
indexOf
(
item
.
com
Party
Id
)
>
-
1
)
{
this
.
choosedPost
.
splice
(
this
.
checkedList
.
indexOf
(
item
.
com
Party
Id
),
1
)
this
.
checkedList
.
splice
(
this
.
checkedList
.
indexOf
(
item
.
com
Party
Id
),
1
)
if
(
this
.
checkedList
.
indexOf
(
item
.
com
Goods
Id
)
>
-
1
)
{
this
.
choosedPost
.
splice
(
this
.
checkedList
.
indexOf
(
item
.
com
Goods
Id
),
1
)
this
.
checkedList
.
splice
(
this
.
checkedList
.
indexOf
(
item
.
com
Goods
Id
),
1
)
}
else
{
this
.
checkedList
.
push
(
item
.
com
Party
Id
)
this
.
checkedList
.
push
(
item
.
com
Goods
Id
)
this
.
choosedPost
.
push
(
item
)
}
},
...
...
@@ -199,26 +199,24 @@ export default {
getPostData
()
{
let
_this
=
this
let
data
=
{
'
dbSource
'
:
this
.
linkInfo
.
sysDbSource
,
'
pageNum
'
:
_this
.
currentPage
,
'
pageSize
'
:
_this
.
pageSize
,
'
erpUserId
'
:
this
.
linkInfo
.
sysUserId
,
'
invOwner
'
:
this
.
linkInfo
.
sysOrgId
,
'
goodsId
'
:
_this
.
chinfo
.
goodsId
,
'
supply
'
:
_this
.
keywords
'
goods
'
:
_this
.
keywords
,
'
dbName
'
:
this
.
linkInfo
.
sysDbSource
+
'
-
'
+
this
.
linkInfo
.
appRealDb
+
'
-
'
+
this
.
linkInfo
.
sysOrgId
,
'
saler
'
:
this
.
linkInfo
.
sysUserId
,
'
start
'
:
_this
.
currentPage
,
'
length
'
:
_this
.
pageSize
}
get
CgSupply
List
(
data
).
then
(
rt
=>
{
get
Goods
List
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
'
00000
'
)
{
if
(
rt
.
code
===
'
1
'
)
{
if
(
_this
.
currentPage
===
1
)
{
_this
.
searchNum
=
rt
.
entity
.
total
+
''
_this
.
searchNum
=
getResListNum
(
rt
.
msg
)
this
.
postDataList
=
[]
}
if
(
this
.
isRefreshing
)
{
this
.
postDataList
=
rt
.
entity
.
supplyList
this
.
postDataList
=
rt
.
data
}
else
if
(
!!
rt
.
entity
.
supplyList
||
rt
.
entity
.
supplyList
.
length
>
0
)
{
this
.
postDataList
=
this
.
postDataList
.
concat
(
rt
.
entity
.
supplyList
)
else
if
(
!!
rt
.
data
||
rt
.
data
.
length
>
0
)
{
this
.
postDataList
=
this
.
postDataList
.
concat
(
rt
.
data
)
}
// _this.postDataListSetAction(rt.data)
// 重置刷新提示
...
...
@@ -226,7 +224,7 @@ export default {
// 重置加载更多提示
_this
.
loading
=
false
// 若当前加载的页数没有满足每页的数量代表完全加载
if
(
rt
.
entity
.
supplyList
.
length
<
10
)
{
if
(
rt
.
data
.
length
<
10
)
{
_this
.
finished
=
true
}
else
{
// 加载成功后下一页自增1
...
...
@@ -249,39 +247,6 @@ export default {
_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
)
{
if
(
val
!==
null
&&
val
!==
undefined
&&
val
!==
''
)
{
...
...
src/views/myOrder/components/HighSearch.vue
View file @
763ca4b6
...
...
@@ -85,12 +85,12 @@
@
cancleclick=
"showPost"
@
confirmclick=
"postConfirm"
></search-in-consignor>
<
cg-
search-goods
<search-goods
v-model=
"moreSearchDialog.goodsShow"
:customer=
"!moreSearchInfo.goods ? {}:moreSearchInfo.goods"
@
cancleclick=
"showPost"
@
confirmclick=
"postConfirm"
></
cg-
search-goods>
></search-goods>
<search-in-client
v-model=
"moreSearchDialog.clientShow"
:customer=
"!moreSearchInfo.client ? {}:moreSearchInfo.client"
...
...
@@ -109,7 +109,7 @@ import SearchInSupplier from "@/components/SearchInSupplier";
// 货主
import
SearchInConsignor
from
"
@/components/SearchInConsignor
"
;
// 商品
import
CgSearchGoods
from
"
@/components/Cg
SearchGoods
"
;
import
SearchGoods
from
"
@/components/
SearchGoods
"
;
// 客户
import
SearchInClient
from
"
@/components/SearchInClient
"
export
default
{
...
...
@@ -117,7 +117,7 @@ export default {
components
:
{
TimeChoose
,
SearchInSupplier
,
Cg
SearchGoods
,
SearchGoods
,
SearchInConsignor
,
SearchInClient
},
...
...
@@ -287,7 +287,7 @@ export default {
},
// 商品信息拼接
consignorInfoStitching
(
model
)
{
return
model
.
com
PartyId
+
'
/(
'
+
model
.
partyOpcode
+
'
)/
'
+
model
.
party
Name
return
model
.
com
GoodsId
+
'
/(
'
+
model
.
goodsOpcode
+
'
)
'
+
model
.
goodsName
+
'
/
'
+
model
.
goodsDesc
+
'
/
'
+
model
.
partyName
+
'
/
'
+
model
.
packageNum
+
'
/
'
+
model
.
unit
Name
}
}
}
...
...
src/views/myOrder/orderListItem.vue
View file @
763ca4b6
...
...
@@ -92,16 +92,16 @@ export default {
orderTypeColor
(
model
)
{
if
(
model
.
orderStatusCode
===
'
100
'
)
{
// 待发货
return
'
#
53BE00
'
return
'
#
06BF06
'
}
else
if
(
model
.
orderStatusCode
===
'
220
'
)
{
// 待收货
return
'
#
E6C500
'
return
'
#
FFC861
'
}
else
if
(
model
.
orderStatusCode
===
'
400
'
)
{
// 已签收
return
'
#
4b790
2
'
return
'
#
92929
2
'
}
else
if
(
model
.
orderStatusCode
===
'
110
'
)
{
// 已取消
return
'
#
D9001B
'
return
'
#
C17300
'
}
},
onRefresh
()
{
...
...
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