Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
wly-APP
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
刘川
wly-APP
Commits
d1fab0db
Commit
d1fab0db
authored
Sep 29, 2022
by
xiangzj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
要货和市场秩序
parent
499ee3b5
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1403 additions
and
277 deletions
+1403
-277
pages.json
pages.json
+74
-4
breakwords-clue-detail.vue
pages/breakwords-clue-detail/breakwords-clue-detail.vue
+6
-6
breakwords-clue.vue
pages/breakwords-clue/breakwords-clue.vue
+21
-5
breakwords-mission-detail.nvue
.../breakwords-mission-detail/breakwords-mission-detail.nvue
+5
-5
logistics.nvue
pages/logistics/logistics.nvue
+47
-29
my-purchase.nvue
pages/my-purchase/my-purchase.nvue
+29
-6
order-item.nvue
pages/my-purchase/order-item.nvue
+58
-51
order-page.nvue
pages/my-purchase/order-page.nvue
+31
-55
purchase-main.nvue
pages/purchase-main/purchase-main.nvue
+74
-75
purchase-receive.nvue
pages/purchase-receive/purchase-receive.nvue
+69
-31
purchase-apply.nvue
pages/purchase/purchase-apply.nvue
+15
-6
purchase.nvue
pages/purchase/purchase.nvue
+24
-1
select-customer.nvue
pages/select-customer/select-customer.nvue
+449
-0
select-sale-place.nvue
pages/select-sale-place/select-sale-place.nvue
+433
-0
api.helper.js
servers/api.helper.js
+1
-1
breakwords.js
servers/breakwords.js
+1
-1
http.interceptor.js
servers/http.interceptor.js
+1
-1
purchaseList.js
servers/purchaseList.js
+65
-0
No files found.
pages.json
View file @
d1fab0db
...
@@ -304,14 +304,84 @@
...
@@ -304,14 +304,84 @@
"titleColor"
:
"#333"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"
要货
"
,
"titleText"
:
"
未发货产品
"
,
"autoBackButton"
:
false
,
"autoBackButton"
:
false
,
"splitLine"
:
true
"splitLine"
:
true
}
}
}
}
}
}
//
},
{
//
"path"
:
"pages/purchase-main/purchase-main"
,
//
"style"
:
{
//
"app-plus"
:
{
//
"titleNView"
:
{
//
"titleAlign"
:
"left"
,
//
"titleColor"
:
"#333"
,
//
"titleSize"
:
"17px"
,
//
"backgroundColor"
:
"#fff"
,
//
"titleText"
:
"要货"
,
//
"autoBackButton"
:
true
//
}
//
}
//
}
},
{
"path"
:
"pages/purchase/purchase-apply"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"要货"
,
"autoBackButton"
:
true
}
}
}
},
{
"path"
:
"pages/select-customer/select-customer"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"客户选择"
,
"autoBackButton"
:
true
}
}
}
},
{
"path"
:
"pages/select-shunt-list/select-shunt-list"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"分流经销商"
,
"autoBackButton"
:
true
}
}
}
},
{
"path"
:
"pages/select-shunt-adress/select-shunt-adress"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"分流收货单位"
,
"autoBackButton"
:
true
}
}
}
},
{
},
{
"path"
:
"pages/
purchase-receive/purchase-receiv
e"
,
"path"
:
"pages/
select-sale-place/select-sale-plac
e"
,
"style"
:
{
"style"
:
{
"app-plus"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleNView"
:
{
...
@@ -319,7 +389,7 @@
...
@@ -319,7 +389,7 @@
"titleColor"
:
"#333"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"
收货信息
"
,
"titleText"
:
"
KA卖场
"
,
"autoBackButton"
:
true
"autoBackButton"
:
true
}
}
}
}
...
@@ -965,4 +1035,4 @@
...
@@ -965,4 +1035,4 @@
}
}
]
]
}
}
}
}
pages/breakwords-clue-detail/breakwords-clue-detail.vue
View file @
d1fab0db
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
<view
class=
"middle-date-des uni-list picker-year"
>
<view
class=
"middle-date-des uni-list picker-year"
>
<view
class=
"uni-list-cell"
>
<view
class=
"uni-list-cell"
>
<view
class=
"uni-list-cell-db"
>
<view
class=
"uni-list-cell-db"
>
<text
class=
"uni-input"
>
{{
clueDetail
.
salesAreaAccount
Pk
}}
</text>
<text
class=
"uni-input"
>
{{
clueDetail
.
salesAreaAccount
Info
.
accountNumber
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -179,10 +179,10 @@
...
@@ -179,10 +179,10 @@
</view>
</view>
<view
class=
"middle view"
>
<
!--
<
view
class=
"middle view"
>
<view
class=
"text-block"
>
<view
class=
"text-block"
>
<text
class=
"middle-date"
>
物流码行项目
</text>
<text
class=
"middle-date"
>
物流码行项目
</text>
<
!--
<
view
class=
"middle-date-des middle-date-buttons"
>
<view
class=
"middle-date-des middle-date-buttons"
>
<button
class=
"diy-entry"
type=
"default"
@
click=
"handleScan"
>
<button
class=
"diy-entry"
type=
"default"
@
click=
"handleScan"
>
<image
class=
"diy-icon"
src=
"@/static/image/scan@3x.png"
mode=
""
>
<image
class=
"diy-icon"
src=
"@/static/image/scan@3x.png"
mode=
""
>
</image>
</image>
...
@@ -198,9 +198,9 @@
...
@@ -198,9 +198,9 @@
</image>
</image>
<text
class=
"diy-entry-text"
>
删除
</text>
<text
class=
"diy-entry-text"
>
删除
</text>
</button>
</button>
</view>
-->
</view>
</view>
</view>
</view>
</view>
-->
<view
class=
"middle view planout-block-item"
v-for=
"(productByBarcode,index2) in clueDetail.entries"
<view
class=
"middle view planout-block-item"
v-for=
"(productByBarcode,index2) in clueDetail.entries"
:key=
"index2"
>
:key=
"index2"
>
...
@@ -531,4 +531,4 @@
...
@@ -531,4 +531,4 @@
height
:
140rpx
;
height
:
140rpx
;
margin-top
:
12rpx
;
margin-top
:
12rpx
;
}
}
</
style
>
</
style
>
pages/breakwords-clue/breakwords-clue.vue
View file @
d1fab0db
...
@@ -193,7 +193,7 @@
...
@@ -193,7 +193,7 @@
<view
class=
"middle-date-des uni-list picker-year"
@
click=
"selectSalesAreaAccountInfo"
>
<view
class=
"middle-date-des uni-list picker-year"
@
click=
"selectSalesAreaAccountInfo"
>
<view
class=
"uni-list-cell"
>
<view
class=
"uni-list-cell"
>
<view
class=
"uni-list-cell-db"
>
<view
class=
"uni-list-cell-db"
>
<input
class=
"middle-date-des"
type=
"text"
v-model=
"condition.salesAreaAccount
Pk
"
<input
class=
"middle-date-des"
type=
"text"
v-model=
"condition.salesAreaAccount
Info.accountNumber
"
placeholder=
"请填写"
/>
placeholder=
"请填写"
/>
</view>
</view>
</view>
</view>
...
@@ -391,7 +391,7 @@
...
@@ -391,7 +391,7 @@
storeName
:
''
,
storeName
:
''
,
storeAddress
:
''
,
storeAddress
:
''
,
marketName
:
''
,
marketName
:
''
,
salesAreaAccount
Pk
:
''
,
salesAreaAccount
Info
:
{}
,
auditTime
:
''
,
auditTime
:
''
,
auditNotes
:
''
,
auditNotes
:
''
,
barcode
:
''
,
barcode
:
''
,
...
@@ -462,7 +462,13 @@
...
@@ -462,7 +462,13 @@
uni
.
$on
(
'selectSalesAreaAccountInfo'
,
function
(
data
)
{
uni
.
$on
(
'selectSalesAreaAccountInfo'
,
function
(
data
)
{
console
.
log
(
'监听到事件来自 selectSalesAreaAccountInfo ,携带参数 msg 为:'
,
data
);
console
.
log
(
'监听到事件来自 selectSalesAreaAccountInfo ,携带参数 msg 为:'
,
data
);
_this
.
condition
.
salesAreaAccountPk
=
data
.
selectedSalesAreaAccountInfo
.
pk
_this
.
condition
.
salesAreaAccountInfo
=
{
"bankName"
:
data
.
selectedSalesAreaAccountInfo
.
bankName
,
"accountName"
:
data
.
selectedSalesAreaAccountInfo
.
accountName
,
"accountNumber"
:
data
.
selectedSalesAreaAccountInfo
.
accountNumber
,
"contact"
:
data
.
selectedSalesAreaAccountInfo
.
contact
,
"contactPhone"
:
data
.
selectedSalesAreaAccountInfo
.
contactPhone
}
})
})
},
},
onUnload
()
{
onUnload
()
{
...
@@ -601,7 +607,7 @@
...
@@ -601,7 +607,7 @@
'provinceName'
:
this
.
condition
.
provinceName
,
'provinceName'
:
this
.
condition
.
provinceName
,
'pwdInfo'
:
this
.
condition
.
pwdInfo
,
'pwdInfo'
:
this
.
condition
.
pwdInfo
,
'receiptPicUrl'
:
this
.
condition
.
receiptPicUrl
,
'receiptPicUrl'
:
this
.
condition
.
receiptPicUrl
,
'receiveAmount'
:
this
.
condition
.
receiveAmount
,
'receiveAmount'
:
this
.
condition
.
receiveAmount
-
0
,
'submitMethod'
:
this
.
condition
.
submitMethod
,
'submitMethod'
:
this
.
condition
.
submitMethod
,
'submitSource'
:
'DISTRIBUTER'
,
'submitSource'
:
'DISTRIBUTER'
,
'submitUserId'
:
this
.
userInfo
.
code
,
'submitUserId'
:
this
.
userInfo
.
code
,
...
@@ -614,9 +620,19 @@
...
@@ -614,9 +620,19 @@
'storeName'
:
this
.
condition
.
storeName
,
'storeName'
:
this
.
condition
.
storeName
,
'marketName'
:
this
.
condition
.
marketName
,
'marketName'
:
this
.
condition
.
marketName
,
'storeAddress'
:
this
.
condition
.
storeAddress
,
'storeAddress'
:
this
.
condition
.
storeAddress
,
'salesAreaAccount
Pk'
:
this
.
condition
.
salesAreaAccountPk
,
'salesAreaAccount
Info'
:
this
.
condition
.
salesAreaAccountInfo
,
}
}
const
res
=
await
apiClueSubmit
(
params
)
const
res
=
await
apiClueSubmit
(
params
)
if
(
res
.
result
===
'S'
){
uni
.
showToast
({
title
:
'提报成功'
,
duration
:
2000
,
icon
:
'none'
});
uni
.
navigateBack
({
delta
:
1
});
}
},
},
handleScan
()
{
handleScan
()
{
uni
.
scanCode
({
uni
.
scanCode
({
...
...
pages/breakwords-mission-detail/breakwords-mission-detail.nvue
View file @
d1fab0db
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<view class="middle-date-des uni-list picker-year">
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<text class="uni-input-text">{{ contactLetterDetail.contact
User
}}</text>
<text class="uni-input-text">{{ contactLetterDetail.contact}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
<view class="middle-date-des uni-list picker-year">
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<text class="uni-input-text">{{ contactLetterDetail.
receiveC
ontactPhone}}</text>
<text class="uni-input-text">{{ contactLetterDetail.
c
ontactPhone}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -192,7 +192,7 @@
...
@@ -192,7 +192,7 @@
taskAssignmentId: '',
taskAssignmentId: '',
bundledProducts: 'false',
bundledProducts: 'false',
receiveAddress: '',
receiveAddress: '',
contact
User
: '',
contact: '',
receiveContactPhone: '',
receiveContactPhone: '',
expectInsuredValue: '',
expectInsuredValue: '',
expectLogistics: '',
expectLogistics: '',
...
@@ -245,7 +245,7 @@
...
@@ -245,7 +245,7 @@
// "contact": "联系人",
// "contact": "联系人",
// "contactPhone": "联系电话",
// "contactPhone": "联系电话",
// "receiveAddress": "收货地址",
// "receiveAddress": "收货地址",
// "contact
User
": "收获联系人",
// "contact": "收获联系人",
// "receiveContactPhone": "联系人电话",
// "receiveContactPhone": "联系人电话",
// "expectInsuredValue": "期望保价",
// "expectInsuredValue": "期望保价",
// "expectLogistics": "期望物流公司",
// "expectLogistics": "期望物流公司",
...
@@ -505,4 +505,4 @@
...
@@ -505,4 +505,4 @@
color: #fff;
color: #fff;
font-size: 34rpx;
font-size: 34rpx;
}
}
</style>
</style>
pages/logistics/logistics.nvue
View file @
d1fab0db
...
@@ -7,43 +7,38 @@
...
@@ -7,43 +7,38 @@
<view class="steps">
<view class="steps">
<view class="steps__row-container">
<view class="steps__row-container">
<view class="steps__row-line-item">
<view class="steps__row-line-item">
<!-- <view class="steps__row-line steps__row-line--before steps__row-line--hide"></view> -->
<view class="steps__row-check">
<view class="steps__row-check">
<i class="icon-dot icon-dot-active"></i>
<i class="icon-dot icon-dot-active"></i>
</view>
</view>
<view class="steps__row-line steps__row-line--after steps__row-line--active"></view>
<view class="steps__row-line steps__row-line--after steps__row-line--active"></view>
</view>
</view>
<view class="steps__row-line-item">
<uni-cell class="step-style" v-for="(item,index) in dataList" key="index" >
<view class="steps__row-line steps__row-line--before"
<view class="steps__row-line-item" v-if="index - 0 !== 0 && index - 0 !== dataList.length - 1">
:class="{'steps__row-line--active':deliveryListBeforeLineShow}"></view>
<view class="steps__row-line steps__row-line--before"
<view class="steps__row-check steps__row-circle">
:class="{'steps__row-line--active':deliveryListBeforeLineShow}"></view>
<i class="icon-dot" :class="{'icon-dot-active':deliveryListBeforeLineShow}"></i>
<view class="steps__row-check steps__row-circle">
<i class="icon-dot" :class="{'icon-dot-active':deliveryListBeforeLineShow}"></i>
</view>
<view class="steps__row-line steps__row-line--after"
:class="{'steps__row-line--active':deliveryListBeforeLineShow}"></view>
</view>
</view>
<view class="steps__row-line steps__row-line--after"
<view class="steps__row-line-item" v-if="index - 0 !== 0 && index - 0 === dataList.length - 1">
:class="{'steps__row-line--active':deliveryListBeforeLineShow}"></view>
<view class="steps__row-line steps__row-line--before"
</view>
:class="{'steps__row-line--active':deliveryListBeforeLineShow}"></view>
<view class="steps__row-line-item">
<view class="steps__row-check steps__row-circle">
<view class="steps__row-line steps__row-line--before"
<i class="icon-dot " :class="{'icon-dot-active':deliveryListBeforeLineShow}"></i>
:class="{'steps__row-line--active':deliveryCheckLineShow}"></view>
</view>
<view class="steps__row-check steps__row-circle">
<view class="steps__row-line steps__row-line--after steps__row-line--hide"></view>
<i class="icon-dot " :class="{'icon-dot-active':deliveryCheckLineShow}"></i>
</view>
</view>
<view class="steps__row-line steps__row-line--after steps__row-line--hide"></view>
</uni-cell>
</view>
</view>
</view>
<view class="steps__row-text-container">
<view class="steps__row-text-container">
<view class="steps__row-text">
<uni-cell class="step-style" v-for="(item,index) in dataList" key="index" >
<text class="steps__row-title steps__row-title--active">装车</text>
<view class="steps__row-text">
<text class="steps__row-desc">2021.7.21 9:00</text>
<text class="steps__row-title" :class="{'steps__row-title--active':deliveryListAfterLineShow}">{{item.nodeStatus}}</text>
</view>
<text class="steps__row-desc">{{item.nodeTime}}</text>
<view class="steps__row-text">
</view>
<text class="steps__row-title" :class="{'steps__row-title--active':deliveryListAfterLineShow}">起运</text>
</uni-cell>
<text class="steps__row-desc">预计 2021.7.21 9:00</text>
</view>
<view class="steps__row-text">
<text class="steps__row-title" :class="{'steps__row-title--active':deliveryCheckLineShow}">到达宣化中转仓</text>
<text class="steps__row-desc">预计 2021.7.21 9:00</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -54,10 +49,14 @@
...
@@ -54,10 +49,14 @@
import {
import {
mapState
mapState
} from 'vuex'
} from 'vuex'
import { queryLogistics } from '@/servers/purchaseList.js'
export default {
export default {
data() {
data() {
return {
return {
deliveryStatus: 'doing'
deliveryStatus: 'doing',
dataList: [],
logisticno: ''
}
}
},
},
computed: {
computed: {
...
@@ -78,6 +77,19 @@
...
@@ -78,6 +77,19 @@
},
},
onBackPress() {
onBackPress() {
},
created() {
this.getLogistics()
},
onLoad(option) {
this.logisticno = option.logisticno
},
methods: {
async getLogistics(){
const formdata = {"wantGoodsId": this.logisticno}
const res = await queryLogistics(formdata)
this.dataList = res.data[0].nodes.reverse()
}
}
}
}
}
</script>
</script>
...
@@ -191,4 +203,10 @@
...
@@ -191,4 +203,10 @@
.steps__row-line--hide {
.steps__row-line--hide {
background-color: transparent;
background-color: transparent;
}
}
.steps__row-text{
flex-direction: column;
}
.step-style{
flex-direction: column;
}
</style>
</style>
pages/my-purchase/my-purchase.nvue
View file @
d1fab0db
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<swiper ref="swiper1" class="tab-box" :current="tabIndex" :duration="300" @change="onswiperchange"
<swiper ref="swiper1" class="tab-box" :current="tabIndex" :duration="300" @change="onswiperchange"
@transition="onswiperscroll" @animationfinish="animationfinish" @onAnimationEnd="animationfinish">
@transition="onswiperscroll" @animationfinish="animationfinish" @onAnimationEnd="animationfinish">
<swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index">
<swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index">
<orderPage :ref="'page' + index" class="page-item" :nid="page.newsid"></orderPage>
<orderPage :ref="'page' + index" class="page-item" :nid="page.newsid"
:condition='condition'
></orderPage>
</swiper-item>
</swiper-item>
</swiper>
</swiper>
</view>
</view>
...
@@ -72,7 +72,11 @@
...
@@ -72,7 +72,11 @@
import {
import {
mapState
mapState
} from 'vuex'
} from 'vuex'
import {
timeRangeFormat
} from '@/utils/date.js'
// #ifdef APP-PLUS
// #ifdef APP-PLUS
const dom = weex.requireModule('dom');
const dom = weex.requireModule('dom');
// #endif
// #endif
...
@@ -94,15 +98,15 @@
...
@@ -94,15 +98,15 @@
tabList: [{
tabList: [{
id: "tab01",
id: "tab01",
name: '全部',
name: '全部',
newsid:
0
newsid:
1
}, {
}, {
id: "tab02",
id: "tab02",
name: '待审批',
name: '待审批',
newsid: 2
3
newsid: 2
}, {
}, {
id: "tab03",
id: "tab03",
name: '已审批',
name: '已审批',
newsid:
22
3
newsid: 3
}],
}],
tabIndex: 0,
tabIndex: 0,
cacheTab: [],
cacheTab: [],
...
@@ -119,6 +123,13 @@
...
@@ -119,6 +123,13 @@
_touchTabIndex: 0,
_touchTabIndex: 0,
ishowDetail: false,
ishowDetail: false,
filterActiveIndex: 0,
filterActiveIndex: 0,
condition: {
"endDate": "",
"page": 1,
"pagesize": 20,
"startDate": "",
"status": "0"
}
}
}
},
},
computed: {
computed: {
...
@@ -156,6 +167,8 @@
...
@@ -156,6 +167,8 @@
this.pageList.push(item)
this.pageList.push(item)
}
}
}
}
// this.condition.endDate = this.handleDate(timeRangeFormat('week'))
// this.condition.startDate = this.handleDate(timeRangeFormat('now'))
this.switchTab(this.tabIndex);
this.switchTab(this.tabIndex);
this.selectorQuery();
this.selectorQuery();
...
@@ -163,6 +176,7 @@
...
@@ -163,6 +176,7 @@
methods: {
methods: {
ontabtap(e) {
ontabtap(e) {
let index = e.target.dataset.current || e.currentTarget.dataset.current;
let index = e.target.dataset.current || e.currentTarget.dataset.current;
this.condition.status = index
//let offsetIndex = this._touchTabIndex = Math.abs(index - this._lastTabIndex) > 1;
//let offsetIndex = this._touchTabIndex = Math.abs(index - this._lastTabIndex) > 1;
// #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-QQ
// #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-QQ
...
@@ -325,11 +339,20 @@
...
@@ -325,11 +339,20 @@
handleFilter(item) {
handleFilter(item) {
if (item === 'week') {
if (item === 'week') {
this.filterActiveIndex = 0
this.filterActiveIndex = 0
this.condition.startDate = this.handleDate(timeRangeFormat('week'))
} else {
} else {
this.filterActiveIndex = item
this.filterActiveIndex = item
this.condition.startDate = this.handleDate(timeRangeFormat(item))
}
}
this.condition.endDate = this.handleDate(timeRangeFormat('now'))
this.pageList[this.tabIndex].refreshData()
this.pageList[this.tabIndex].refreshData()
}
},
handleDate(date){
const str1 = date.slice(0,4)
const str2 = date.slice(4,6)
const str3 = date.slice(6,8)
return str1+'-'+str2+'-'+str3
},
}
}
}
}
</script>
</script>
...
...
pages/my-purchase/order-item.nvue
View file @
d1fab0db
<template>
<template>
<view class="order view">
<view class="order view">
<view class="top">
<view class="top">
<text class="title-no">要货单号:
TP10000021
</text>
<text class="title-no">要货单号:
{{newsItem.wantCode}}
</text>
<view class="title-info">
<view class="title-info">
<button class="title-info__status" type="default"><text class="item-block-btn__text">
待审批
</text></button>
<button class="title-info__status" type="default"><text class="item-block-btn__text">
{{newsItem.billStatusTextView}}
</text></button>
</view>
</view>
</view>
</view>
<view class="middle view">
<view class="middle view">
<view class="middle-title">
<view class="middle-title">
<text class="middle-title__text">发货单号:
FH200333222
</text>
<text class="middle-title__text">发货单号:
{{newsItem.logisticno}}
</text>
<image @click="checkLogistics" class="icon-car" src="@/static/image/order_car@3x.png" mode="aspectFit">
<image @click="checkLogistics
(newsItem.logisticno)
" class="icon-car" src="@/static/image/order_car@3x.png" mode="aspectFit">
</image>
</image>
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">
苏州新川商贸公司
</text>
<text class="middle-date">
{{newsItem.customerName}}
</text>
<text class="middle-date-des">客户名称</text>
<text class="middle-date-des">客户名称</text>
</view>
</view>
<view class="text-block-box">
<view class="text-block-box">
<view class="text-block text-block-last">
<view class="text-block text-block-last">
<text class="middle-date">
2021-08-06 05:14
</text>
<text class="middle-date">
{{newsItem.createdDate}}
</text>
<text class="middle-date-des">申请时间</text>
<text class="middle-date-des">申请时间</text>
</view>
</view>
<view class="text-block text-block-last">
<view class="text-block text-block-last">
<view class="middle-date-right">
<view class="middle-date-right">
<text class="dot"></text>
<text class="dot"></text>
<text class="middle-date">
一般
</text>
<text class="middle-date">
{{newsItem.significanceTextView}}
</text>
</view>
</view>
<text class="middle-date-des middle-date-right">重要程度</text>
<text class="middle-date-des middle-date-right">重要程度</text>
</view>
</view>
...
@@ -39,75 +39,77 @@
...
@@ -39,75 +39,77 @@
</view>
</view>
</view>
</view>
<view v-if="ishowDetail" class="bottom-content">
<view v-if="ishowDetail" class="bottom-content">
<view class="block-detal">
<uni-cell class="cell-list" v-for="(ele, index) in newsItem.list" :key="ele.id">
<view class="block-detal-item">
<view class="block-detal">
<text class="detal-item-label">品牌</text>
<view class="block-detal-item">
<text class="detal-item-value">尖庄2101</text>
<text class="detal-item-label">品牌</text>
<text class="detal-item-value">{{ele.brandBqTextView}}</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">产品</text>
<text class="detal-item-value">{{ele.productDesc}}</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">未发货件数</text>
<text class="detal-item-value">{{ele.undeliveredQuantity}}</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">传统当月计划量</text>
<text class="detal-item-value">{{ele.applyNum}}</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">传统当月剩余量</text>
<text class="detal-item-value">{{ele.monthLeftQty}}</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">传统当年剩余量</text>
<text class="detal-item-value">{{ele.annualLeftQty}}</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">本次要货件数</text>
<text class="detal-item-value">{{ele.wantQuantity}}</text>
</view>
</view>
</view>
<view class="block-detal-item">
</uni-cell>
<text class="detal-item-label">产品</text>
<text class="detal-item-value">1618五粮液 500ml*6</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">未发货件数</text>
<text class="detal-item-value">220</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">传统当月计划量</text>
<text class="detal-item-value">7</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">传统当月剩余量</text>
<text class="detal-item-value">100</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">传统当年剩余量</text>
<text class="detal-item-value">100</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">本次要货件数</text>
<text class="detal-item-value">200</text>
</view>
</view>
</view>
</view>
<view class="receive-info" ref='receiveInfo' :style="
receiveInfoHeightComputed
"
<view class="receive-info" ref='receiveInfo' :style=""
:class="{'receive-info-auto':ishowReceiveDetail}">
:class="{'receive-info-auto':ishowReceiveDetail}">
<view class="block-detal-item">
<view class="block-detal-item">
<text class="detal-item-label detal-item-title">收货信息</text>
<text class="detal-item-label detal-item-title">收货信息</text>
</view>
</view>
<view class="block-detal-item">
<view class="block-detal-item">
<text class="detal-item-label">是否分流</text>
<text class="detal-item-label">是否分流</text>
<text class="detal-item-value detal-item-value2">
否
</text>
<text class="detal-item-value detal-item-value2">
{{newsItem.isShuntTextView}}
</text>
</view>
</view>
<view class="block-detal-item">
<view class="block-detal-item">
<text class="detal-item-label">分流经销商</text>
<text class="detal-item-label">分流经销商</text>
<text class="detal-item-value detal-item-value2"></text>
<text class="detal-item-value detal-item-value2">
{{newsItem.shuntDealer}}
</text>
</view>
</view>
<view class="block-detal-item">
<view class="block-detal-item">
<text class="detal-item-label">收货单位</text>
<text class="detal-item-label">收货单位</text>
<text class="detal-item-value detal-item-value2">
步步高
</text>
<text class="detal-item-value detal-item-value2">
{{newsItem.receiveUnitName}}
</text>
</view>
</view>
<view class="block-detal-item">
<view class="block-detal-item">
<text class="detal-item-label">喷码单位</text>
<text class="detal-item-label">喷码单位</text>
<text class="detal-item-value detal-item-value2">
步步高
</text>
<text class="detal-item-value detal-item-value2">
{{newsItem.spurtCodeUnitName}}
</text>
</view>
</view>
<view class="block-detal-item">
<view class="block-detal-item">
<text class="detal-item-label">联系人电话</text>
<text class="detal-item-label">联系人电话</text>
<text class="detal-item-value detal-item-value2">
738-14581240
</text>
<text class="detal-item-value detal-item-value2">
{{newsItem.contactNumber}}
</text>
</view>
</view>
<view class="block-detal-item">
<view class="block-detal-item">
<text class="detal-item-label">收货地址</text>
<text class="detal-item-label">收货地址</text>
<text class="detal-item-value detal-item-value2">
黑龙江省黑河市嫩江县芒涌大道775号
</text>
<text class="detal-item-value detal-item-value2">
{{newsItem.receiveAddress}}
</text>
</view>
</view>
<view class="block-detal-item">
<view class="block-detal-item">
<text class="detal-item-label">备注</text>
<text class="detal-item-label">备注</text>
<text class="detal-item-value detal-item-value2">
快点发货
</text>
<text class="detal-item-value detal-item-value2">
{{newsItem.remark}}
</text>
</view>
</view>
<view class="block-detal-item attach-block">
<
!-- <
view class="block-detal-item attach-block">
<text class="detal-item-label">附件</text>
<text class="detal-item-label">附件</text>
<image class="attach-file" src="@/static/image/avatar@3x.png" mode="aspectFit"></image>
<image class="attach-file" src="@/static/image/avatar@3x.png" mode="aspectFit"></image>
</view>
</view>
-->
<view class="float-btn-block">
<view class="float-btn-block">
<view class="float-btn" @click="handleShowReceiveDetail">
<view class="float-btn" @click="handleShowReceiveDetail">
<text class="float-btn__text">{{ishowReceiveDetail?'收起':'展示完整信息'}}</text>
<text class="float-btn__text">{{ishowReceiveDetail?'收起':'展示完整信息'}}</text>
...
@@ -117,7 +119,6 @@
...
@@ -117,7 +119,6 @@
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
@@ -189,8 +190,9 @@
...
@@ -189,8 +190,9 @@
}
}
},
},
checkLogistics() {
checkLogistics() {
const num = 'dfb0ebae8103034ccb863d3702e22eb6'
uni.navigateTo({
uni.navigateTo({
url:
"/pages/logistics/logistics"
url:
`/pages/logistics/logistics?logisticno=${num}`
})
})
}
}
}
}
...
@@ -230,7 +232,7 @@
...
@@ -230,7 +232,7 @@
}
}
.title-info__status {
.title-info__status {
width: 1
2
0rpx;
width: 1
3
0rpx;
height: 48rpx;
height: 48rpx;
line-height: 48rpx;
line-height: 48rpx;
background: #f61d30;
background: #f61d30;
...
@@ -246,7 +248,7 @@
...
@@ -246,7 +248,7 @@
}
}
.middle {
.middle {
position: relative;
//
position: relative;
padding: 26rpx 32rpx;
padding: 26rpx 32rpx;
}
}
...
@@ -292,6 +294,7 @@
...
@@ -292,6 +294,7 @@
.text-block-box {
.text-block-box {
display: flex;
display: flex;
height: 120rpx;
justify-content: space-between;
justify-content: space-between;
}
}
...
@@ -299,6 +302,7 @@
...
@@ -299,6 +302,7 @@
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: flex-end;
justify-content: flex-end;
text-align: right;
}
}
.dot {
.dot {
...
@@ -392,7 +396,7 @@
...
@@ -392,7 +396,7 @@
margin-top: 40rpx;
margin-top: 40rpx;
height: 240rpx;
height: 240rpx;
overflow: hidden;
overflow: hidden;
padding-bottom:
60
rpx;
padding-bottom:
96
rpx;
}
}
.receive-info-auto {
.receive-info-auto {
...
@@ -441,4 +445,7 @@
...
@@ -441,4 +445,7 @@
.float-btn__text {
.float-btn__text {
font-size: 24rpx;
font-size: 24rpx;
}
}
.cell-list {
flex-direction: column;
}
</style>
</style>
pages/my-purchase/order-page.nvue
View file @
d1fab0db
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
import uniLoadMore from '@/components/uni-load-more.vue';
import uniLoadMore from '@/components/uni-load-more.vue';
import noData from '@/components/nodata.nvue';
import noData from '@/components/nodata.nvue';
import orderItem from './order-item.nvue';
import orderItem from './order-item.nvue';
import { findAppGoodsSingle } from '@/servers/purchaseList.js'
export default {
export default {
components: {
components: {
uniList,
uniList,
...
@@ -45,6 +45,10 @@
...
@@ -45,6 +45,10 @@
nid: {
nid: {
type: [Number, String],
type: [Number, String],
default: ''
default: ''
},
condition: {
type: Object,
default: () => {}
}
}
},
},
data() {
data() {
...
@@ -88,7 +92,7 @@
...
@@ -88,7 +92,7 @@
// #endif
// #endif
},
},
methods: {
methods: {
loadData(refresh) {
async
loadData(refresh) {
if (this.isLoading) {
if (this.isLoading) {
return;
return;
}
}
...
@@ -98,61 +102,33 @@
...
@@ -98,61 +102,33 @@
this.requestParams.time = new Date().getTime() + '';
this.requestParams.time = new Date().getTime() + '';
var startTime = new Date();
var startTime = new Date();
uni.request({
const res = await findAppGoodsSingle(this.condition)
// url: this.$host + 'api/news',
if(res.status - 1 === 0){
url: 'https://unidemo.dcloud.net.cn/api/news',
this.isLoading = false;
data: this.requestParams,
if (refresh) {
success: (result) => {
this.refreshing = false;
var endTime = new Date();
this.refreshFlag = false;
const data = result.data;
this.refreshText = "已刷新";
this.isNoData = (data.length <= 0);
if (this.pullTimer) {
clearTimeout(this.pullTimer);
const data_list = data.map((news) => {
return {
id: this.newGuid() + news.id,
newsid: news.id,
article_type: 1,
datetime: (new Date(news.published_at.replace(/\-/g, '/')).getTime()),
title: news.title,
image_url: news.cover,
source: news.author_name,
comment_count: news.comments_count,
post_id: news.post_id
};
});
if (refresh) {
this.dataList = data_list;
this.requestParams.minId = 0;
} else {
this.dataList = this.dataList.concat(data_list);
this.requestParams.minId = data[data.length - 1].id;
}
if (this.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
this.goDetail(this.dataList[0]);
}
},
fail: (err) => {
if (this.dataList.length == 0) {
this.isNoData = true;
}
},
complete: (e) => {
this.isLoading = false;
if (refresh) {
this.refreshing = false;
this.refreshFlag = false;
this.refreshText = "已刷新";
if (this.pullTimer) {
clearTimeout(this.pullTimer);
}
this.pullTimer = setTimeout(() => {
this.pulling = false;
}, 1000);
}
}
this.pullTimer = setTimeout(() => {
this.pulling = false;
}, 1000);
}
}
});
}else{
this.isNoData = true;
}
if (refresh) {
this.dataList = res.data.Rows;
this.requestParams.minId = 0;
} else {
this.dataList = this.dataList.concat(res.data.Rows);
}
if (this.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
this.goDetail(this.dataList[0]);
}
},
},
loadMore(e) {
loadMore(e) {
this.loadData();
this.loadData();
...
...
pages/purchase-main/purchase-main.nvue
View file @
d1fab0db
...
@@ -7,17 +7,18 @@
...
@@ -7,17 +7,18 @@
<view class="middle view">
<view class="middle view">
<view class="text-block">
<view class="text-block">
<text class="middle-date">发货计划类型</text>
<text class="middle-date">发货计划类型</text>
<view class="middle-date-des uni-list picker-year">
<text class="middle-date-des">{{orderItem.planTypeTextView}}</text>
<!-- <view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerChange($event,'deliveryPlan')" :value="index"
<picker class="picker-block" @change="bindPickerChange($event,'deliveryPlan')" :value="index"
range-key='name' mode="selector" :range="deliveryPlanArr">
range-key='name' mode="selector" :range="deliveryPlanArr">
<text class="uni-input">{{orderItem.
deliveryPlanNam
e}}</text>
<text class="uni-input">{{orderItem.
planTyp
e}}</text>
</picker>
</picker>
</view>
</view>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
</view>
</view>
-->
</view>
</view>
<view class="text-block">
<view class="text-block">
...
@@ -26,18 +27,18 @@
...
@@ -26,18 +27,18 @@
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">开票客户</text>
<text class="middle-date">开票客户</text>
<text class="middle-date-des">{{orderItem.
custName
}}</text>
<text class="middle-date-des">{{orderItem.
billCustomer
}}</text>
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date" @tap="selectClient">订单客户</text>
<text class="middle-date" @tap="selectClient">订单客户</text>
<text class="middle-date-des">{{orderItem.
orderCust
Name}}</text>
<text class="middle-date-des">{{orderItem.
customer
Name}}</text>
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">渠道类型</text>
<text class="middle-date">渠道类型</text>
<view class="middle-date-des uni-list picker-year">
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerChange($event,'channelType')" :value="orderItem.channel
TypeNam
e"
<picker class="picker-block" @change="bindPickerChange($event,'channelType')" :value="orderItem.channel
sTyp
e"
range-key='name' mode="selector" :range="channelTypeArr">
range-key='name' mode="selector" :range="channelTypeArr">
<text class="uni-input">{{orderItem.channelTypeName}}</text>
<text class="uni-input">{{orderItem.channelTypeName}}</text>
</picker>
</picker>
...
@@ -48,65 +49,57 @@
...
@@ -48,65 +49,57 @@
</view>
</view>
<view class="text-block text-block-last">
<view class="text-block text-block-last">
<text class="middle-date">配额年度</text>
<text class="middle-date">配额年度</text>
<text class="middle-date-des">{{orderItem.
annual
}}</text>
<text class="middle-date-des">{{orderItem.
quotasYear
}}</text>
</view>
</view>
</view>
</view>
<uni-cell class="cell-list" v-for="(ele, index) in orderItem.wantGoodsDetailList" :key="ele.id">
<view class="middle view">
<view class="middle view">
<
!-- <
view class="text-block">
<view class="text-block">
<text class="middle-date">品牌</text>
<text class="middle-date">品牌</text>
<text class="middle-date-des">
品牌XX
</text>
<text class="middle-date-des">
{{ele.brandBqTextView}}
</text>
</view>
-->
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">产品</text>
<text class="middle-date">产品</text>
<text class="middle-date-des">{{
orderItem
.productDesc}}</text>
<text class="middle-date-des">{{
ele
.productDesc}}</text>
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">未发货件数</text>
<text class="middle-date">未发货件数</text>
<text class="middle-date-des">{{
orderItem.availableQ
ty}}</text>
<text class="middle-date-des">{{
ele.undeliveredQuanti
ty}}</text>
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">传统当月计划量</text>
<text class="middle-date">传统当月计划量</text>
<text class="middle-date-des">
500,000.00
</text>
<text class="middle-date-des">
{{ele.planQuantity}}
</text>
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">传统当月剩余量</text>
<text class="middle-date">传统当月剩余量</text>
<text class="middle-date-des">
500,000.00
</text>
<text class="middle-date-des">
{{ele.monthLeftQty}}
</text>
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">传统当年剩余量</text>
<text class="middle-date">传统当年剩余量</text>
<text class="middle-date-des">
8510050100067259284
</text>
<text class="middle-date-des">
{{ele.annualLeftQty}}
</text>
</view>
</view>
<view class="text-block text-block-last">
<view class="text-block text-block-last">
<text class="middle-date">本次要货件数</text>
<text class="middle-date">本次要货件数</text>
<input class="middle-date-des" type="text" v-model="
orderItem.q
uantity" placeholder="请输入" />
<input class="middle-date-des" type="text" v-model="
ele.wantQ
uantity" placeholder="请输入" />
</view>
</view>
</view>
</view>
</uni-cell>
<
!-- <view class="middle view
">
<
view class="middle view" v-if="orderItem.channelsType === 'K'
">
<view class="text-block">
<view class="text-block"
@click="handleSalePlace"
>
<text class="middle-date">卖场
简
称</text>
<text class="middle-date">卖场
全
称</text>
<input class="middle-date-des" type="text" v-model="
quantity
" placeholder="请输入" />
<input class="middle-date-des" type="text" v-model="
orderItem.kaStoreFullname
" placeholder="请输入" />
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">卖场
全
称</text>
<text class="middle-date">卖场
简
称</text>
<input class="middle-date-des" type="text" v-model="
quantity
" placeholder="请输入" />
<input class="middle-date-des" type="text" v-model="
orderItem.kaStoreShortname
" placeholder="请输入" />
</view>
</view>
<view class="text-block text-block-last">
<view class="text-block text-block-last">
<text class="middle-date">卖场区域</text>
<text class="middle-date">卖场区域</text>
<view class="middle-date-des uni-list picker-year">
<input class="middle-date-des" type="text" v-model="orderItem.kaStoreArea" placeholder="请输入" />
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerChange($event,'marketPlace')" :value="orderItem.marketPlaceName"
range-key='name' mode="selector" :range="marketPlaceArr">
<text class="uni-input">{{orderItem.marketPlaceName}}</text>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
</view>
</view>
</view>
</view>
-->
</view>
<view class="bottom">
<view class="bottom">
<button class="btn" type="default" @tap="nextStep">
<button class="btn" type="default" @tap="nextStep">
<text class="btn-text">下一步</text>
<text class="btn-text">下一步</text>
...
@@ -124,7 +117,8 @@
...
@@ -124,7 +117,8 @@
import {
import {
querySysDictionaryDetailsByCode,
querySysDictionaryDetailsByCode,
getProdDeliveryPlan
getProdDeliveryPlan,
getChannelType
} from '@/servers/purchaseList.js'
} from '@/servers/purchaseList.js'
export default {
export default {
...
@@ -133,13 +127,14 @@
...
@@ -133,13 +127,14 @@
// orderItem: {
// orderItem: {
// ticketTypeVal: '',
// ticketTypeVal: '',
// deliveryPlanCode: '',
// deliveryPlanCode: '',
//
deliveryPlanNam
e: ' ',
//
planTyp
e: ' ',
// channelTypeCode: '',
// channelTypeCode: '',
// channelTypeName: ' ',
// channelTypeName: ' ',
// marketPlaceCode: '',
// marketPlaceCode: '',
//
marketPlaceName
: ' ',
//
kaStoreArea
: ' ',
// quantity: ''
// quantity: ''
// },
// },
marketPlaceVal: '',
index: 0,
index: 0,
scrollTop: 0,
scrollTop: 0,
deliveryPlanArr : [],
deliveryPlanArr : [],
...
@@ -164,31 +159,22 @@
...
@@ -164,31 +159,22 @@
},
},
...mapState(['sysinfo'])
...mapState(['sysinfo'])
},
},
onShow() {
mounted() {
// uni.showToast({customer
console.log('监听到事件来自 update');
// title: '要货功能开发中...',
let _this = this
// icon: 'none',
uni.$on('selectSalePlaceAccountInfo', function(data) {
// duration: 1200,
console.log('监听到事件来自 selectSalePlaceAccountInfo ,携带参数 msg 为:', data);
// mask: true,
_this.orderItem.kaStoreFullname = data.selectSalePlaceAccountInfo.fullName
// complete: () => {
_this.orderItem.kaStoreShortname = data.selectSalePlaceAccountInfo.shortName
// uni.switchTab({
_this.orderItem.kaStoreArea = data.selectSalePlaceAccountInfo.area
// url: '/pages/usercenter/usercenter'
})
// })
},
// }
onUnload() {
// });
uni.$off('selectSalePlaceAccountInfo')
},
beforeDestroy() {
uni.$off('selectSalePlaceAccountInfo')
},
},
// onLoad(option) {
// this.orderItem = {
// ...this.orderItem,
// ...JSON.parse(option.order)
// }
// },
// onBackPress(event) {
// uni.switchTab({
// url: "pages/puchase/puchase"
// })
// },
created() {
created() {
// 发货计划类型:A0002
// 发货计划类型:A0002
// 制票类型:A0022
// 制票类型:A0022
...
@@ -196,9 +182,10 @@
...
@@ -196,9 +182,10 @@
// 卖场区域:A0052
// 卖场区域:A0052
this.getSelectDictDataOrigin('A0002')
this.getSelectDictDataOrigin('A0002')
this.getSelectDictDataOrigin('A0022')
this.getSelectDictDataOrigin('A0022')
this.getSelectDictDataOrigin('A0054')
//
this.getSelectDictDataOrigin('A0054')
this.getSelectDictDataOrigin('A0052')
this.getSelectDictDataOrigin('A0052')
// this.getProdDeliveryPlan()
// this.getProdDeliveryPlan()
this.getChannelType()
},
},
methods: {
methods: {
async getProdDeliveryPlan(){
async getProdDeliveryPlan(){
...
@@ -212,6 +199,11 @@
...
@@ -212,6 +199,11 @@
const res = await getProdDeliveryPlan(params)
const res = await getProdDeliveryPlan(params)
console.log(res,'res')
console.log(res,'res')
},
},
handleSalePlace() {
uni.navigateTo({
url: `/pages/select-sale-place/select-sale-place`
});
},
selectClient() {
selectClient() {
uni.navigateTo({
uni.navigateTo({
url: `/pages/select-client/select-client`
url: `/pages/select-client/select-client`
...
@@ -223,16 +215,16 @@
...
@@ -223,16 +215,16 @@
switch (type) {
switch (type) {
case 'deliveryPlan':
case 'deliveryPlan':
this.orderItem.deliveryPlanCode = this.deliveryPlanArr[index].value
this.orderItem.deliveryPlanCode = this.deliveryPlanArr[index].value
this.orderItem.
deliveryPlanNam
e = this.deliveryPlanArr[index].name
this.orderItem.
planTyp
e = this.deliveryPlanArr[index].name
break;
break;
case 'channelType':
case 'channelType':
this.orderItem.channel
TypeCod
e = this.channelTypeArr[index].value
this.orderItem.channel
sTyp
e = this.channelTypeArr[index].value
this.orderItem.channelTypeName = this.channelTypeArr[index].name
this.orderItem.channelTypeName = this.channelTypeArr[index].name
break;
break;
case 'marketPlace':
//
case 'marketPlace':
this.orderItem.marketPlaceCode
= this.marketPlaceArr[index].value
// this.marketPlaceVal
= this.marketPlaceArr[index].value
this.orderItem.marketPlaceName
= this.marketPlaceArr[index].name
// this.orderItem.kaStoreArea
= this.marketPlaceArr[index].name
break;
//
break;
}
}
},
},
nextStep() {
nextStep() {
...
@@ -241,6 +233,10 @@
...
@@ -241,6 +233,10 @@
// url: `/pages/purchase-receive/purchase-receive?order=${JSON.stringify(this.orderItem)}`
// url: `/pages/purchase-receive/purchase-receive?order=${JSON.stringify(this.orderItem)}`
// })
// })
},
},
async getChannelType(){
const res = await getChannelType({'salePlan': this.orderItem.planType})
this.channelTypeArr = res.data
},
getSelectDictDataOrigin(dictcode) {
getSelectDictDataOrigin(dictcode) {
querySysDictionaryDetailsByCode({'code': dictcode})
querySysDictionaryDetailsByCode({'code': dictcode})
.then(res => {
.then(res => {
...
@@ -253,12 +249,12 @@
...
@@ -253,12 +249,12 @@
this.ticketTypeArr = res.data.Rows
this.ticketTypeArr = res.data.Rows
this.getTicketType(this.ticketTypeArr)
this.getTicketType(this.ticketTypeArr)
break;
break;
case 'A0054':
//
case 'A0054':
this.channelTypeArr = res.data.Rows
//
this.channelTypeArr = res.data.Rows
break;
//
break;
case 'A0052':
//
case 'A0052':
this.marketPlaceArr = res.data.Rows
//
this.marketPlaceArr = res.data.Rows
break;
//
break;
default:
default:
break;
break;
}
}
...
@@ -406,4 +402,7 @@
...
@@ -406,4 +402,7 @@
.btn-text-l {
.btn-text-l {
color: $wly-primary-color;
color: $wly-primary-color;
}
}
.cell-list {
flex-direction: column;
}
</style>
</style>
pages/purchase-receive/purchase-receive.nvue
View file @
d1fab0db
...
@@ -24,14 +24,14 @@
...
@@ -24,14 +24,14 @@
<view class="middle-date-des uni-list picker-year" >
<view class="middle-date-des uni-list picker-year" >
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<text class="uni-input">{{orderItem.shunt
ingCustomer
}}</text>
<text class="uni-input">{{orderItem.shunt
DealerName
}}</text>
</view>
</view>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
</view>
</view>
</view>
</view>
<view class="text-block text-block-last" v-if="orderItem.
shuntCode
- 1 === 0">
<view class="text-block text-block-last" v-if="orderItem.
isShunt
- 1 === 0">
<text class="middle-date">分流渠道</text>
<text class="middle-date">分流渠道</text>
<view class="middle-date-des uni-list picker-year">
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell">
...
@@ -48,12 +48,12 @@
...
@@ -48,12 +48,12 @@
</view>
</view>
<view class="middle view">
<view class="middle view">
<view class="text-block" v-if="orderItem.
shuntCode
- 1 === 0" @click="handleShuntAdress">
<view class="text-block" v-if="orderItem.
isShunt
- 1 === 0" @click="handleShuntAdress">
<text class="middle-date">分流收货单位</text>
<text class="middle-date">分流收货单位</text>
<view class="middle-date-des uni-list picker-year" >
<view class="middle-date-des uni-list picker-year" >
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<text class="uni-input">{{orderItem.
shuntingCustomerAdress
}}</text>
<text class="uni-input">{{orderItem.
receiveUnitName
}}</text>
</view>
</view>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
...
@@ -78,13 +78,10 @@
...
@@ -78,13 +78,10 @@
<view class="middle-date-des uni-list picker-year">
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerChange" :value="index"
<text class="uni-input">{{orderItem.spurtCodeUnitName}}</text>
:range="array">
<text class="uni-input">{{array[index]}}</text>
</picker>
</view>
</view>
</view>
</view>
<
image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image
>
<
!-- <image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image> --
>
</view>
</view>
</view>
</view>
<view class="text-block text-block-last">
<view class="text-block text-block-last">
...
@@ -105,10 +102,10 @@
...
@@ -105,10 +102,10 @@
<text class="middle-date">备注</text>
<text class="middle-date">备注</text>
</view>
</view>
<view class="remark">
<view class="remark">
<textarea class="remark-text" v-model="remark" />
<textarea class="remark-text" v-model="
orderItem.
remark" />
</view>
</view>
<view class="text-block title-first">
<
!-- <
view class="text-block title-first">
<text class="middle-date title-first__text">上传文件</text>
<text class="middle-date title-first__text">上传文件</text>
</view>
</view>
<view class="upload-block">
<view class="upload-block">
...
@@ -117,7 +114,7 @@
...
@@ -117,7 +114,7 @@
@fail='fail'>
@fail='fail'>
<text>+</text>
<text>+</text>
</uni-file-picker>
</uni-file-picker>
</view>
</view>
-->
</view>
</view>
<!-- <text class="receive-record">历史收货信息</text>
<!-- <text class="receive-record">历史收货信息</text>
...
@@ -149,7 +146,9 @@
...
@@ -149,7 +146,9 @@
import {
import {
querySysDictionaryDetailsByCode,
querySysDictionaryDetailsByCode,
getReceipt,
getReceipt,
findByCustomer
findByCustomer,
startProcessInstanceByKey,
advance
} from '@/servers/purchaseList.js'
} from '@/servers/purchaseList.js'
export default {
export default {
...
@@ -158,14 +157,14 @@
...
@@ -158,14 +157,14 @@
// orderItem: {
// orderItem: {
// shuntTypeCode: '',
// shuntTypeCode: '',
// shuntTypeName: ' ',
// shuntTypeName: ' ',
//
shuntCode
: '',
//
isShunt
: '',
// shuntName: ' ',
// shuntName: ' ',
// receiveUnitName: ' ',
// receiveUnitName: ' ',
// contactNumber: '',
// contactNumber: '',
// contacPerson: '',
// contacPerson: '',
// receiveAddress: '',
// receiveAddress: '',
// shunt
ingCustomer
: '',
// shunt
DealerName
: '',
//
shuntingCustomerAdress
: ''
//
receiveUnitName
: ''
// },
// },
receiveUnitArr: [],
receiveUnitArr: [],
shuntArr: [],
shuntArr: [],
...
@@ -188,11 +187,12 @@
...
@@ -188,11 +187,12 @@
},
},
},
},
watch: {
watch: {
'orderItem.
shuntCode
' :function (newName,oldName){
'orderItem.
isShunt
' :function (newName,oldName){
console.log(newName,'newName')
console.log(newName,'newName')
if(newName - 0 === 0){
if(newName - 0 === 0){
this.orderItem.shuntTypeName = ''
this.orderItem.shuntTypeName = ''
this.orderItem.shuntingCustomerAdress = ''
this.orderItem.shuntChannelsType = ''
this.orderItem.receiveUnitName = ''
}
}
}
}
},
},
...
@@ -230,11 +230,17 @@
...
@@ -230,11 +230,17 @@
let _this = this
let _this = this
uni.$on('selectShuntAccountInfo', function(data) {
uni.$on('selectShuntAccountInfo', function(data) {
console.log('监听到事件来自 selectShuntAccountInfo ,携带参数 msg 为:', data);
console.log('监听到事件来自 selectShuntAccountInfo ,携带参数 msg 为:', data);
_this.orderItem.shuntingCustomer = data.selectShuntAccountInfo.shuntingCustomer
_this.orderItem.shuntDealerName = data.selectShuntAccountInfo.shuntingCustomer
_this.orderItem.shuntDealer = data.selectShuntAccountInfo.shuntingCustomer
})
})
uni.$on('selectShuntAdressAccountInfo', function(data) {
uni.$on('selectShuntAdressAccountInfo', function(data) {
console.log('监听到事件来自 selectShuntAdressAccountInfo ,携带参数 msg 为:', data);
console.log('监听到事件来自 selectShuntAdressAccountInfo ,携带参数 msg 为:', data);
_this.orderItem.shuntingCustomerAdress = data.selectShuntAdressAccountInfo.partner_name
_this.orderItem.receiveUnitName = data.selectShuntAdressAccountInfo.partner_name
_this.orderItem.receiveUnitCode = data.selectShuntAdressAccountInfo.partner
_this.orderItem.receiveCityCode = data.selectShuntAdressAccountInfo.city_code
_this.orderItem.receiveCityName = data.selectShuntAdressAccountInfo.city_name
})
})
},
},
...
@@ -255,13 +261,18 @@
...
@@ -255,13 +261,18 @@
// this.queryData()
// this.queryData()
},
},
methods: {
methods: {
handleCustomer() {
uni.navigateTo({
url: `/pages/select-customer/select-customer?order=${JSON.stringify(this.orderItem)}`
})
},
handleShunt() {
handleShunt() {
uni.navigateTo({
uni.navigateTo({
url: `/pages/select-shunt-list/select-shunt-list?order=${JSON.stringify(this.orderItem)}`
url: `/pages/select-shunt-list/select-shunt-list?order=${JSON.stringify(this.orderItem)}`
})
})
},
},
handleShuntAdress() {
handleShuntAdress() {
if(this.orderItem.shunt
ingCustomer
){
if(this.orderItem.shunt
DealerName
){
uni.navigateTo({
uni.navigateTo({
url: `/pages/select-shunt-adress/select-shunt-adress?order=${JSON.stringify(this.orderItem)}`
url: `/pages/select-shunt-adress/select-shunt-adress?order=${JSON.stringify(this.orderItem)}`
})
})
...
@@ -276,23 +287,24 @@
...
@@ -276,23 +287,24 @@
// 查询
// 查询
async queryData() {
async queryData() {
const params = {
const params = {
'customerCode': this.orderItem.
orderCust
,
'customerCode': this.orderItem.
customerCode
,
'type': '2',
'type': '2',
}
}
const { data } = await findByCustomer(params)
const { data } = await findByCustomer(params)
},
},
async getReceipt(){
async getReceipt(){
const params = {
const params = {
'partner': this.orderItem.
orderCust
,
'partner': this.orderItem.
customerCode
,
'role': "WLY001"
'role': "WLY001"
}
}
const res = await getReceipt(params)
const res = await getReceipt(params)
this.receiveUnitArr = res.data
this.receiveUnitArr = res.data
this.orderItem.receiveUnitName = this.receiveUnitArr[0].partner_name
if(this.orderItem.receiveUnitName == ' '){
this.orderItem.contactNumber = this.receiveUnitArr[0].tel_number
this.orderItem.receiveUnitName = this.receiveUnitArr[0].partner_name
this.orderItem.contacPerson = this.receiveUnitArr[0].c_o_name
this.orderItem.contactNumber = this.receiveUnitArr[0].tel_number
this.orderItem.receiveAddress = this.receiveUnitArr[0].street
this.orderItem.contacPerson = this.receiveUnitArr[0].c_o_name
this.orderItem.receiveAddress = this.receiveUnitArr[0].street
}
},
},
getSelectDictDataOrigin(dictcode) {
getSelectDictDataOrigin(dictcode) {
querySysDictionaryDetailsByCode({'code': dictcode})
querySysDictionaryDetailsByCode({'code': dictcode})
...
@@ -318,11 +330,11 @@
...
@@ -318,11 +330,11 @@
const index = e.detail.value || 0
const index = e.detail.value || 0
switch (type) {
switch (type) {
case 'shunt':
case 'shunt':
this.orderItem.
shuntCode
= this.shuntArr[index].value
this.orderItem.
isShunt
= this.shuntArr[index].value
this.orderItem.shuntName = this.shuntArr[index].name
this.orderItem.shuntName = this.shuntArr[index].name
break;
break;
case 'shuntType':
case 'shuntType':
this.orderItem.shunt
TypeCod
e = this.shuntTypeArr[index].id
this.orderItem.shunt
ChannelsTyp
e = this.shuntTypeArr[index].id
this.orderItem.shuntTypeName = this.shuntTypeArr[index].name
this.orderItem.shuntTypeName = this.shuntTypeArr[index].name
break;
break;
case 'receive':
case 'receive':
...
@@ -376,6 +388,32 @@
...
@@ -376,6 +388,32 @@
// url: '/pages/purchase-main/purchase-main'
// url: '/pages/purchase-main/purchase-main'
// })
// })
this.$emit('click', 'purchaseMain')
this.$emit('click', 'purchaseMain')
},
async nextStep() {
try {
const params = JSON.parse(JSON.stringify(this.orderItem))
params.wantGoodsDetailList = JSON.stringify(params.wantGoodsDetailList)
const { data, status } = await startProcessInstanceByKey(params)
if (status == 1) {
Object.assign(params, data.bizData)
params.bizId = data.bizId
params.procInstId = data.procInstId
params.taskId = data.taskId
// 提交
const res = await advance(params)
if (res.status == 1) {
uni.showToast({
title: '要货成功',
duration: 2000,
icon: 'none'
});
uni.switchTab({
url: '/pages/purchase/purchase'
})
}
}
} catch (e) {
}
}
}
}
}
}
}
...
@@ -594,4 +632,4 @@
...
@@ -594,4 +632,4 @@
.btn-text-l {
.btn-text-l {
color: $wly-primary-color;
color: $wly-primary-color;
}
}
</style>
</style>
pages/purchase/purchase-apply.nvue
View file @
d1fab0db
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view class="apply-history view" :style="winHeight">
<view class="apply-history view" :style="winHeight">
<view class="status_bar" :style="navHeight"></view>
<view class="status_bar" :style="navHeight"></view>
<view class="apply-history-wrapper view">
<view class="apply-history-wrapper view">
<component :style="componentHeight" :orderItem='
orderItem
' :is="currentTabComponent" @click="changeComponent" @submit="submit"></component>
<component :style="componentHeight" :orderItem='
detail
' :is="currentTabComponent" @click="changeComponent" @submit="submit"></component>
</view>
</view>
</view>
</view>
</template>
</template>
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
import {
import {
mapState
mapState
} from 'vuex'
} from 'vuex'
import { initAppWantGoods } from '@/servers/purchaseList.js'
import purchaseMain from '../purchase-main/purchase-main'
import purchaseMain from '../purchase-main/purchase-main'
import purchaseReceive from '../purchase-receive/purchase-receive'
import purchaseReceive from '../purchase-receive/purchase-receive'
...
@@ -27,6 +28,7 @@
...
@@ -27,6 +28,7 @@
return {
return {
currentTabComponent: 'purchaseMain',
currentTabComponent: 'purchaseMain',
topHeight: '',
topHeight: '',
detail: {},
orderItem: {
orderItem: {
ticketTypeVal: '',
ticketTypeVal: '',
deliveryPlanCode: '',
deliveryPlanCode: '',
...
@@ -73,7 +75,7 @@
...
@@ -73,7 +75,7 @@
// this.navHeight = `height:${this.sysinfo.safeArea.top + 44}px`;
// this.navHeight = `height:${this.sysinfo.safeArea.top + 44}px`;
// #ifdef APP-NVUE
// #ifdef APP-NVUE
let queryTabSize = uni.createSelectorQuery().in(this);
let queryTabSize = uni.createSelectorQuery().in(this);
queryTabSize.select('#top').boundingClientRect();
//
queryTabSize.select('#top').boundingClientRect();
queryTabSize.exec(rects => {
queryTabSize.exec(rects => {
console.log('rects',rects);
console.log('rects',rects);
rects.forEach((rect) => {
rects.forEach((rect) => {
...
@@ -83,9 +85,9 @@
...
@@ -83,9 +85,9 @@
// #endif
// #endif
// #ifdef H5
// #ifdef H5
uni.createSelectorQuery().in(this).select('#top').boundingClientRect( (res) => {
//
uni.createSelectorQuery().in(this).select('#top').boundingClientRect( (res) => {
this.topHeight = res.height;
//
this.topHeight = res.height;
}).exec();
//
}).exec();
// #endif
// #endif
},
},
onBackPress(event) {
onBackPress(event) {
...
@@ -108,11 +110,18 @@
...
@@ -108,11 +110,18 @@
},
},
onLoad(option) {
onLoad(option) {
this.orderItem = {
this.orderItem = {
...this.orderItem,
//
...this.orderItem,
...JSON.parse(option.order)
...JSON.parse(option.order)
}
}
},
},
created() {
this.getDetail()
},
methods: {
methods: {
async getDetail(){
const res = await initAppWantGoods(this.orderItem)
this.detail = {'shuntTypeName': ' ','shuntName': ' ','channelTypeName': '',...res.data}
},
changeComponent(com) {
changeComponent(com) {
this.currentTabComponent = com;
this.currentTabComponent = com;
},
},
...
...
pages/purchase/purchase.nvue
View file @
d1fab0db
...
@@ -50,6 +50,12 @@
...
@@ -50,6 +50,12 @@
<text class="loading-more-text">{{loadingText}}</text>
<text class="loading-more-text">{{loadingText}}</text>
</view>
</view>
</cell>
</cell>
<cell>
<view class="empty-block" v-if='lists.length===0'>
<image class="icon-empty" src="@/static/image/no_data@3x.png" mode=""></image>
<text class="empty-text">暂无数据</text>
</view>
</cell>
<view class="planout-block-item__last"> </view>
<view class="planout-block-item__last"> </view>
</list>
</list>
...
@@ -151,7 +157,7 @@
...
@@ -151,7 +157,7 @@
const dataMap = data && data.Rows.length>0 && data.Rows.map((item) => {
const dataMap = data && data.Rows.length>0 && data.Rows.map((item) => {
item.checked = false
item.checked = false
return item
return item
})
})
|| []
if (isRefresh) {
if (isRefresh) {
this.lists = dataMap
this.lists = dataMap
...
@@ -426,5 +432,22 @@
...
@@ -426,5 +432,22 @@
color: #fff;
color: #fff;
font-size: 34rpx;
font-size: 34rpx;
}
}
.empty-block {
width: 750rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.icon-empty {
width: 150rpx;
height: 150rpx;
margin-top: 300rpx;
}
.empty-text {
color: #999;
margin-top: 56rpx;
font-size: 28rpx;
}
</style>
</style>
pages/select-customer/select-customer.nvue
0 → 100644
View file @
d1fab0db
<template>
<view class="lists">
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg">
<image class="header-bg-img" src="@/static/image/nav_bg@3x.png" mode="scaleToFill"></image>
</view>
<view class="main" :style="mainHeight">
<view class="middle view planout-block-item">
<view class="text-block text-block-last">
<text class="middle-date">客户编码</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<input class="middle-date-des" type="text" v-model="searchCode" placeholder="请填写" />
</view>
</view>
</view>
</view>
<view class="text-block text-block-last">
<text class="middle-date">客户名称</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<input class="middle-date-des" type="text" v-model="searchName" placeholder="请填写" />
</view>
</view>
</view>
</view>
</view>
<view class="planout-block">
<button class="btn" type="default" @tap="search">
<text class="btn-text">查询</text>
</button>
</view>
<list ref="list" class="scroll-area view" loadmoreoffset='100' @loadmore="scrolltolower"
:show-scrollbar='false'>
<refresh @refresh="refresh" :display="refreshing ? 'show' : 'hide'">
</refresh>
<cell v-for="(item,index) in lists" :key="item.guid" @click="handleChecked(item)">
<view class="scroll-item">
<view class="item-block item-block-code">
<text class="item-block-label">客户编号:{{item.partner}}</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">客户名称:{{item.partner_name}}</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">客户类型:{{item.partner_name}}</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">旧编码:{{item.c_o_name}}</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">法人姓名:{{item.tel_number}}</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">电话:{{item.street}}</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">统一社会信用代码:{{item.street}}</text>
</view>
</view>
</cell>
<cell>
<view class="loading-more" v-if='lists.length>2'>
<text class="loading-more-text">{{loadingText}}</text>
</view>
</cell>
<view class="planout-block-item__last"> </view>
</list>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex'
import {
getCustomerList
} from '@/servers/purchaseList.js'
import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
export default {
data() {
return {
scrollTop: 0,
isOpened: 'none',
loadingText: '加载中...',
refreshing: false,
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
typesIndex: 0,
lists: [],
searchName: '',
orderItem: {},
selectShuntAdressAccountInfo: {}
}
},
computed: {
...mapState(['sysinfo', 'userInfo']),
navHeight() {
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
mainHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 44 }px`,
}
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 44 - 156 }px`
}
},
},
onLoad(option) {
console.log('select-saleplan', option)
this.orderItem = {
...JSON.parse(option.order)
}
},
created() {
this.reset()
this.getSalesPlanTypes(true);
},
methods: {
handleChecked(item) {
this.selectShuntAdressAccountInfo = item
uni.$emit('selectShuntAdressAccountInfo', {
selectShuntAdressAccountInfo: item
})
uni.navigateBack()
},
search() {
this.reset()
this.getSalesPlan(true, this.searchName);
},
async getSalesPlan(isRefresh, customerCode = this.orderItem.shuntingCustomer) {
if (this.loadParams.isDone) {
return
}
const params = {
'partner': customerCode,
'role': "WLY001"
}
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
}, 2000);
const res = await getCustomerList(params)
uni.hideLoading();
if (isRefresh) {
this.lists = res.data
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(res.data)
}
setTimeout(() => {
this.refreshing = false;
}, 300)
},
refresh(e) {
this.refreshing = true;
this.reset()
this.getSalesPlan(true)
// #ifdef APP-NVUE
try {
// console.log('-------', this.$refs.list)
this.$refs.list.resetLoadmore();
} catch (e) {
console.log('onrefresh', e)
}
// #endif
},
scrolltolower() {
console.log('onReachBottom');
if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.getSalesPlan()
} else {
this.loadParams.isDone = true
this.loadingText = '-- 到底了 --'
}
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
this.loadingText = '加载中'
},
async getSalesPlanTypes() {
this.getSalesPlan()
},
bindPickerTypesChange(e) {
console.log('bindPickerTypesChange', e.detail.value)
this.typesIndex = e.detail.value
this.getSalesPlan()
},
bindPickerYearChange(e) {
console.log('bindPickerYearChange', e.detail.value)
this.getSalesPlan()
},
handleClick(e, content, index) {
console.log('click当前索引:', e, content, index);
},
nextStep() {
this.$emit('click', 'orderUpload')
},
preStep() {
uni.switchTab({
url: `/pages/go-order/go-order`
})
},
}
}
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
}
.header-bg {
height: 284rpx;
opacity: 0.72;
margin-top: -88rpx;
}
.header-bg-img {
width: 750rpx;
}
.lists {
position: relative;
flex-direction: column;
background: #f0f4f5;
flex: 1;
}
.main {
position: relative;
flex-direction: column;
margin-top: -164rpx;
padding: 0 16rpx;
}
.scroll-area {
overflow-y: scroll;
}
.middle {
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx 64rpx 40rpx 48rpx;
}
.planout-block {
display: flex;
justify-content: space-between;
margin-bottom: 48rpx;
padding: 0 24rpx;
}
.text-block {
overflow: hidden;
height: 96rpx;
margin-bottom: 14rpx;
border-bottom: 1px solid #f4f5f6;
}
.text-block-last {
margin-bottom: 0;
border-bottom: 0;
}
.middle-date {
flex: 2;
font-size: 28rpx;
line-height: 96rpx;
color: #333;
margin-bottom: 8rpx;
}
.middle-date-des {
flex: 3;
font-size: 28rpx;
line-height: 96rpx;
height: 96rpx;
overflow: hidden;
text-overflow: ellipsis;
color: #888;
}
.picker-year {
position: relative;
border-radius: 4px;
align-items: center;
line-height: normal;
}
.uni-list-cell {
flex: 1;
}
.uni-list-cell-db {
flex: 1;
}
.picker-block {
flex: 1;
}
.uni-input-text {
font-size: 14px;
color: #888;
}
.icon-arrow {
position: absolute;
right: 0;
top: 16px;
width: 12rpx;
height: 20rpx;
z-index: 10;
}
.planout-block-lists {
display: flex;
flex-direction: column;
}
.planout-block-item {
margin-bottom: 32rpx;
}
.scroll-item {
flex: 1;
display: flex;
flex-direction: column;
margin-bottom: 32rpx;
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx 64rpx 40rpx 48rpx;
}
.planout-block-item__last {
height: 40px;
}
.item-block {
overflow: hidden;
}
.item-block-label {
font-size: 24rpx;
color: #333;
}
.item-block__label {
flex: 1;
text-align: left;
font-size: 32rpx;
color: #333;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
}
.item-block-code {
padding-bottom: 16rpx;
}
.item-block-name {
padding-top: 24rpx;
padding-bottom: 32rpx;
}
.item-block-label-des {
flex: 1;
text-align: left;
font-size: 28rpx;
color: #333;
}
.detal-item-label {
color: #999;
font-size: 24rpx;
}
.detal-item-value {
color: #333;
font-size: 28rpx;
}
.btn {
flex: 1;
height: 92rpx;
background: $wly-primary-color;
border-radius: 46rpx;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
.loading-more {
flex: 1;
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
}
.loading-more-text {
font-size: 12px;
color: #999;
}
</style>
pages/select-sale-place/select-sale-place.nvue
0 → 100644
View file @
d1fab0db
<template>
<view class="lists">
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg">
<image class="header-bg-img" src="@/static/image/nav_bg@3x.png" mode="scaleToFill"></image>
</view>
<view class="main" :style="mainHeight">
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date">卖场简称</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<input class="middle-date-des" type="text" v-model="searchShortName" placeholder="请填写" />
</view>
</view>
</view>
</view>
<view class="text-block text-block-last">
<text class="middle-date">卖场全称</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<input class="middle-date-des" type="text" v-model="searchFullName" placeholder="请填写" />
</view>
</view>
</view>
</view>
</view>
<view class="planout-block">
<button class="btn" type="default" @tap="search">
<text class="btn-text">查询</text>
</button>
</view>
<list ref="list" class="scroll-area view" loadmoreoffset='100' @loadmore="scrolltolower"
:show-scrollbar='false'>
<refresh @refresh="refresh" :display="refreshing ? 'show' : 'hide'">
</refresh>
<cell v-for="(item,index) in lists" :key="item.guid" @click="handleChecked(item)">
<view class="scroll-item">
<view class="item-block item-block-code">
<text class="item-block-label">KA卖场简称:{{item.shortName}}</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">KA卖场全称:{{item.fullName}}</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">所属品牌:{{item.brand}}</text>
</view>
</view>
</cell>
<cell>
<view class="loading-more" v-if='lists.length>2'>
<text class="loading-more-text">{{loadingText}}</text>
</view>
</cell>
<view class="planout-block-item__last"> </view>
</list>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex'
import {
listKAStore
} from '@/servers/purchaseList.js'
import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
export default {
data() {
return {
scrollTop: 0,
isOpened: 'none',
loadingText: '加载中...',
refreshing: false,
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
typesIndex: 0,
lists: [],
searchShortName: '',
searchFullName: '',
orderItem: {},
selectSalePlaceAccountInfo: {}
}
},
computed: {
...mapState(['sysinfo', 'userInfo']),
navHeight() {
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
mainHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 44 }px`,
}
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 44 - 156 }px`
}
},
},
onLoad(option) {
console.log('select-saleplan', option)
this.orderItem = {
...JSON.parse(option.order)
}
},
created() {
this.reset()
this.getSalesPlanTypes(true);
},
methods: {
handleChecked(item) {
this.selectSalePlaceAccountInfo = item
uni.$emit('selectSalePlaceAccountInfo', {
selectSalePlaceAccountInfo: item
})
uni.navigateBack()
},
search() {
this.reset()
this.getSalesPlan(true, this.searchName);
},
async getSalesPlan(isRefresh, customerCode = this.orderItem.shuntingCustomer) {
if (this.loadParams.isDone) {
return
}
const params = {
'fullName': this.searchFullName,
'page': 1,
'pagesize': 50,
'shortName': this.searchShortName,
'totalCount': 0
}
uni.showLoading({
title: '加载中'
});
setTimeout(function() {
uni.hideLoading();
}, 2000);
const res = await listKAStore(params)
uni.hideLoading();
if (isRefresh) {
this.lists = res.data.Rows
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(res.data.Rows)
}
setTimeout(() => {
this.refreshing = false;
}, 300)
},
refresh(e) {
this.refreshing = true;
this.reset()
this.getSalesPlan(true)
// #ifdef APP-NVUE
try {
// console.log('-------', this.$refs.list)
this.$refs.list.resetLoadmore();
} catch (e) {
console.log('onrefresh', e)
}
// #endif
},
scrolltolower() {
console.log('onReachBottom');
if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.getSalesPlan()
} else {
this.loadParams.isDone = true
this.loadingText = '-- 到底了 --'
}
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
this.loadingText = '加载中'
},
async getSalesPlanTypes() {
this.getSalesPlan()
},
bindPickerTypesChange(e) {
console.log('bindPickerTypesChange', e.detail.value)
this.typesIndex = e.detail.value
this.getSalesPlan()
},
bindPickerYearChange(e) {
console.log('bindPickerYearChange', e.detail.value)
this.getSalesPlan()
},
handleClick(e, content, index) {
console.log('click当前索引:', e, content, index);
},
}
}
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
}
.header-bg {
height: 284rpx;
opacity: 0.72;
margin-top: -88rpx;
}
.header-bg-img {
width: 750rpx;
}
.lists {
position: relative;
flex-direction: column;
background: #f0f4f5;
flex: 1;
}
.main {
position: relative;
flex-direction: column;
margin-top: -164rpx;
padding: 0 16rpx;
}
.scroll-area {
overflow-y: scroll;
}
.middle {
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx 64rpx 40rpx 48rpx;
}
.planout-block {
display: flex;
justify-content: space-between;
margin-bottom: 48rpx;
padding: 0 24rpx;
}
.text-block {
overflow: hidden;
height: 96rpx;
margin-bottom: 14rpx;
border-bottom: 1px solid #f4f5f6;
}
.text-block-last {
margin-bottom: 0;
border-bottom: 0;
}
.middle-date {
flex: 2;
font-size: 28rpx;
line-height: 96rpx;
color: #333;
margin-bottom: 8rpx;
}
.middle-date-des {
flex: 3;
font-size: 28rpx;
line-height: 96rpx;
height: 96rpx;
overflow: hidden;
text-overflow: ellipsis;
color: #888;
}
.picker-year {
position: relative;
border-radius: 4px;
align-items: center;
line-height: normal;
}
.uni-list-cell {
flex: 1;
}
.uni-list-cell-db {
flex: 1;
}
.picker-block {
flex: 1;
}
.uni-input-text {
font-size: 14px;
color: #888;
}
.icon-arrow {
position: absolute;
right: 0;
top: 16px;
width: 12rpx;
height: 20rpx;
z-index: 10;
}
.planout-block-lists {
display: flex;
flex-direction: column;
}
.planout-block-item {
margin-bottom: 32rpx;
}
.scroll-item {
flex: 1;
display: flex;
flex-direction: column;
margin-bottom: 32rpx;
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx 64rpx 40rpx 48rpx;
}
.planout-block-item__last {
height: 40px;
}
.item-block {
overflow: hidden;
}
.item-block-label {
font-size: 24rpx;
color: #333;
}
.item-block__label {
flex: 1;
text-align: left;
font-size: 32rpx;
color: #333;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
}
.item-block-code {
padding-bottom: 16rpx;
}
.item-block-name {
padding-top: 24rpx;
padding-bottom: 32rpx;
}
.item-block-label-des {
flex: 1;
text-align: left;
font-size: 28rpx;
color: #333;
}
.detal-item-label {
color: #999;
font-size: 24rpx;
}
.detal-item-value {
color: #333;
font-size: 28rpx;
}
.btn {
flex: 1;
height: 92rpx;
background: $wly-primary-color;
border-radius: 46rpx;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
.loading-more {
flex: 1;
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
}
.loading-more-text {
font-size: 12px;
color: #999;
}
</style>
servers/api.helper.js
View file @
d1fab0db
...
@@ -204,7 +204,7 @@ class Request {
...
@@ -204,7 +204,7 @@ class Request {
// 请求后的拦截
// 请求后的拦截
response
:
(
res
)
=>
{
response
:
(
res
)
=>
{
console
.
log
(
'helper--iinterceptor---response-----'
,
res
)
console
.
log
(
'helper--iinterceptor---response-----'
,
res
)
if
(
res
.
MSGTYPE
===
'S'
||
res
.
msgtype
===
'S'
||
res
.
status
===
1
||
res
.
result
===
"S"
||
if
(
res
.
MSGTYPE
===
'S'
||
res
.
msgtype
===
'S'
||
res
.
status
===
1
||
res
.
status
===
0
||
res
.
result
===
"S"
||
res
.
Status
===
res
.
Status
===
'Success'
)
{
'Success'
)
{
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
...
...
servers/breakwords.js
View file @
d1fab0db
...
@@ -168,4 +168,4 @@ export async function apiGetProcessOrderDetail(params) {
...
@@ -168,4 +168,4 @@ export async function apiGetProcessOrderDetail(params) {
export
async
function
apiGetProcessOrderAppeal
(
params
)
{
export
async
function
apiGetProcessOrderAppeal
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/wmdpwebservices/processOrder/trigger/appeal'
,
params
)
const
res
=
await
apiHelper
.
post
(
'/wmdpwebservices/processOrder/trigger/appeal'
,
params
)
return
res
return
res
}
}
servers/http.interceptor.js
View file @
d1fab0db
...
@@ -67,7 +67,7 @@ const install = (Vue, vm) => {
...
@@ -67,7 +67,7 @@ const install = (Vue, vm) => {
// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
console
.
log
(
'http.interceptor---response-----'
,
res
)
console
.
log
(
'http.interceptor---response-----'
,
res
)
if
(
res
.
MSGTYPE
===
'S'
||
res
.
msgtype
===
'S'
||
res
.
status
===
1
||
res
.
result
===
'S'
||
res
if
(
res
.
MSGTYPE
===
'S'
||
res
.
msgtype
===
'S'
||
res
.
status
===
1
||
res
.
status
===
0
||
res
.
result
===
'S'
||
res
.
Status
===
.
Status
===
'Success'
)
{
'Success'
)
{
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
...
...
servers/purchaseList.js
0 → 100644
View file @
d1fab0db
import
apiHelper
from
'./api.helper.js'
/**
*
* @param name
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiPurchaseList
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/Invinfo/getUnFinishedInv'
,
params
)
return
res
}
export
async
function
querySysDictionaryDetailsByCode
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/dictionary/querySysDictionaryDetailsByCode'
,
params
,
{
'Content-Type'
:
"application/x-www-form-urlencoded"
})
return
res
}
export
async
function
getProdDeliveryPlan
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/wantgoods/getProdDeliveryPlan'
,
params
)
return
res
}
export
async
function
getReceipt
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/get_bp_sh_addr'
,
params
)
return
res
}
export
async
function
findByCustomer
(
params
)
{
const
res
=
await
apiHelper
.
get
(
'/crm-app/setShunting/findByCustomer'
,
params
,
{
'Content-Type'
:
'application/json'
})
return
res
}
export
async
function
findAppGoodsSingle
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/wantgoods/findAppGoodsSingle'
,
params
)
return
res
}
export
async
function
queryLogistics
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/logistics/queryLogistics'
,
params
,
{
'Content-Type'
:
'application/x-www-form-urlencoded'
})
return
res
}
export
async
function
initAppWantGoods
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/wantgoods/initAppWantGoods'
,
params
)
return
res
}
export
async
function
getCustomerList
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/bp_search'
,
params
)
return
res
}
export
async
function
getChannelType
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/wantgoods/getChannelType'
,
params
)
return
res
}
export
async
function
listKAStore
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/kastore/listKAStore'
,
params
)
return
res
}
export
async
function
startProcessInstanceByKey
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/workflow/startProcessInstanceByKey'
,
params
,
{
'Content-Type'
:
'application/x-www-form-urlencoded'
})
return
res
}
export
async
function
advance
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/workflow/advance'
,
params
,
{
'Content-Type'
:
'application/x-www-form-urlencoded'
})
return
res
}
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