Commit ef87c320 authored by Facius's avatar Facius

搜索页、物流信息页、配件单详情页

parent 2e13902c
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<text class="title-text" :style="{'color': titleColor}">{{title}}</text> <text class="title-text" :style="{'color': titleColor}">{{title}}</text>
<view> <view>
<text>工单编号:</text> <text>工单编号:</text>
<text>{{info.orderNumber}}</text> <text @longpress="handleLongpress">{{info.orderNumber}}</text>
</view> </view>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
...@@ -123,6 +123,14 @@ ...@@ -123,6 +123,14 @@
}, },
handleOperate() { handleOperate() {
this.$emit('operate', this.info) this.$emit('operate', this.info)
},
handleLongpress() { // 长按复制单号
uni.setClipboardData({
data: this.info.orderNumber,
success: function () {
console.log('success');
}
})
} }
} }
} }
......
...@@ -258,9 +258,26 @@ ...@@ -258,9 +258,26 @@
"path": "warehouse/index", "path": "warehouse/index",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": "我的仓库", "navigationBarTitleText": "我的配件",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "warehouse/searchParts",
"style": {
"navigationBarTitleText": " ", // 配件单搜索
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F5F7"
}
},
{
"path": "warehouse/express",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": " ", // 配件单物流
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F5F7"
}
}, },
{ {
"path": "warehouse/records", "path": "warehouse/records",
......
<template>
<view class="parts-detail">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="物流信息" titleColor="#333333" :border-bottom="false" title-bold>
</u-navbar>
<view class="content-view">
<view class="contacts-view">
<view :style="{'color': titleColor}">{{title}}</view>
<view><image class="image-view" :src="imageUrl"></image></view>
<view class="right-view">
<view class="title-view">{{title}}</view>
<view>{{'物流公司:' + info.express.com}}</view>
<view class="number-view">
<text>{{'物流单号:' + info.express.number}}</text>
<text class="copy-view" @click="$u.throttle(handleClick, 500)">复制</text>
</view>
</view>
</view>
<view class="record-view">
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {items:[], express: []},
logisticsRecords: [], // 物流
};
},
computed: {
// 待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20
title() {
return this.titles[String(this.info.status)]
},
titles() {
return {
'1': '待审核',
'10': '待发货',
'15': '代签收',
'20': '已签收',
'-1': '审核未通过',
'1': '已取消'
}
},
imageUrl() {
let item = this.info.items[0] || {}
return item.images ? item.images.split(',').shift() : this.placeholderImage
},
titleColor() {
switch (String(this.info.status)) {
case '-1': // 审核未通过
return '#FA5A49'
case '1': // 已取消
return '#666666'
default:
return '#2272FF'
}
},
total() { // 合计
var i = 0
for (var item of this.info.items) {
i += item.quantity
}
return i
},
placeholderImage() {
return process.uniEnv.qn_base_url + 'logo.png'
},
},
onLoad(e) {
getApp().trackPage('配件单物流信息')
var pages = getCurrentPages();
if (pages.length >= 2) {
var page = pages[pages.length - 2];
this.info = page.info
}
this.getLogistics()
},
methods: {
getLogistics() {
this.$u.api.getLogistics(this.info.id).then((res) => {
res = {
"code": 200,
"message": "",
"data": {
"orderId": 1883,
"status": 15,
"com": "sf",
"number": "SF1314164238675",
"name": "周明杨",
"phoneNumber": "17630408443",
"areaCode": 0,
"province": "44",
"city": "4401",
"district": "440106",
"street": "440106001",
"address": "广东省 广州市 天河区 长兴街道 芩村北街四巷16号菜鸟驿站",
"fullAddress": null,
"remark": "",
"createTime": 1624104976000,
"deliveryTime": 1624256100000,
"receiveTime": null,
"updateTime": 1624256100000,
"expressInfo": {
"state": "1",
"state_name": "transporting",
"state_orig": "0",
"records": [{
"datetime": "2021-06-22 04:09:08",
"context": "[杭州市]快件在【杭州萧山铁路站点】完成分拣,准备发往 【广州棠溪铁路站点】"
}, {
"datetime": "2021-06-22 04:09:08",
"context": "[杭州市]快件到达 【杭州萧山铁路站点】"
}, {
"datetime": "2021-06-21 23:46:32",
"context": "[金华市]快件已发车"
}, {
"datetime": "2021-06-21 23:46:26",
"context": "[金华市]快件在【金华金东中转场】完成分拣,准备发往 【杭州萧山铁路站点】"
}, {
"datetime": "2021-06-21 19:33:17",
"context": "[金华市]快件到达 【金华金东中转场】"
}, {
"datetime": "2021-06-21 18:41:02",
"context": "[金华市]快件已发车"
}, {
"datetime": "2021-06-21 18:40:53",
"context": "[金华市]快件在【金华永康滨江速运营业点】完成分拣,准备发往 【金华金东中转场】"
}, {
"datetime": "2021-06-21 17:17:54",
"context": "[金华市]顺丰速运 已收取快件"
}]
}
}
}
if (res.code == 200) {
if (res.data && res.data.records) {
this.logisticsRecords = res.data.records
}
} else {
console.log(res.message)
}
});
},
handleClick() {
uni.setClipboardData({
data: this.info.orderNumber,
success: function() {
console.log('success');
}
});
}
}
};
</script>
<style lang="scss" scoped>
.parts-detail {
background-color: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
background-color: #F4F5F7;
height: 100vh;
display: flex;
flex-direction: column;
.content-view {
padding: 30rpx;
height: 100%;
overflow: auto;
.contacts-view {
padding: 30rpx;
background-color: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
display: flex;
align-items: flex-start;
background-color: #FFFFFF;
border-radius: 12rpx;
.image-view {
width: 120rpx;
height: 120rpx;
border-radius: 12rpx;
}
.right-view {
font-size: 26rpx;
color: #333333;
padding-left: 30rpx;
width: 100%;
.title-view {
font-weight: bold;
font-size: 32rpx;
}
.number-view {
display: flex;
justify-content: space-between;
align-items: center;
.copy-view {
color: #2272FF;
width: 80rpx;
text-align: right;
}
}
}
}
.record-view {
background-color: #FFFFFF;
border-radius: 12rpx;
}
}
.bottom-view {
display: flex;
justify-content: space-between;
align-items: center;
margin: 10rpx 30rpx 44rpx 30rpx;
.total-view {
font-size: 32rpx;
font-weight: bold;
color: #333333;
.amount-view {
color: #2272FF;
}
}
}
}
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="ware-house"> <view class="ware-house">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="我的仓库" titleColor="#333333" <u-navbar back-icon-color="#333333" background="#FFFFFF" title="我的仓库" titleColor="#333333"
:border-bottom="false" title-bold></u-navbar> :border-bottom="false" title-bold></u-navbar>
<view class="tools-box"> <!-- <view class="tools-box">
<view class="search-sub"> <view class="search-sub">
<u-subsection :current="curNow" :list="subList" active-color="white" bg-color="white" <u-subsection :current="curNow" :list="subList" active-color="white" bg-color="white"
inactive-color="#666" button-color="#2272FF" bparts-radius="36" @change="sectionChange" height="72" inactive-color="#666" button-color="#2272FF" bparts-radius="36" @change="sectionChange" height="72"
...@@ -11,14 +11,17 @@ ...@@ -11,14 +11,17 @@
</view> </view>
<u-button class="right-btn" @click="handleClickRecords" :custom-style="buttonStyle" type="primary" <u-button class="right-btn" @click="handleClickRecords" :custom-style="buttonStyle" type="primary"
shape="circle">操作记录</u-button> shape="circle">操作记录</u-button>
</view> </view> -->
<view class="search-btn" @click="handleClickSearch"> <view class="search-view">
<image class="search-image" mode="widthFix" :src="sousuoImage"></image> <view class="search-btn" @click="handleClickSearch">
<image class="search-image" mode="widthFix" :src="sousuoImage"></image>
<text class="search-btn-placeholder">请输入关键字</text>
</view>
<text class="search-btn-text">搜索</text> <text class="search-btn-text">搜索</text>
</view> </view>
<view class="u-tabs-box"> <view class="u-tabs-box">
<u-tabs height="66" activeColor="#2272FF" bg-color="none" inactive-color="#999" bar-height="4" <u-tabs height="66" activeColor="#2272FF" bg-color="none" inactive-color="#999" bar-height="4"
bar-width="44" :offset="[0,0]" :list="list[curNow]" count="total" :current="current[curNow]" bar-width="44" :offset="[0,0]" :list="list" count="total" :current="currentIndex"
@change="change" :is-scroll="false" font-size="28" bold></u-tabs> @change="change" :is-scroll="false" font-size="28" bold></u-tabs>
</view> </view>
<view class="tab-view"> <view class="tab-view">
...@@ -41,7 +44,7 @@ ...@@ -41,7 +44,7 @@
</template> </template>
</scroll-view> </scroll-view>
</view> </view>
<view class="bottom-view" v-if="isReserve"> <!-- <view class="bottom-view" v-if="isReserve">
<view class="selected-all-view" @click="radioChange"> <view class="selected-all-view" @click="radioChange">
<u-icon class="selected-all-icon" name="checkbox-mark" :color="radioColor"></u-icon> <u-icon class="selected-all-icon" name="checkbox-mark" :color="radioColor"></u-icon>
<text>全选</text> <text>全选</text>
...@@ -51,7 +54,7 @@ ...@@ -51,7 +54,7 @@
shape="circle">{{buttonText}}</u-button> shape="circle">{{buttonText}}</u-button>
</view> </view>
</view> </view> -->
</view> </view>
</template> </template>
...@@ -66,24 +69,21 @@ ...@@ -66,24 +69,21 @@
}, },
data() { data() {
return { return {
curNow: 0,
pageNumber: 0, pageNumber: 0,
pageSize: 100, pageSize: 100,
partsList: [], partsList: [],
current: [0, 0], // [未入库index, 已入库index] currentIndex: 0,
loadStatus: 'loading', loadStatus: 'loading',
loaded: false, loaded: false,
triggered: false, triggered: false,
_freshing: false, _freshing: false,
scrollTop: 0,
selectedAll: false, selectedAll: false,
}; };
}, },
computed: { computed: {
// 不传值 全部;待签收 15;待发货 10;待审核 1;已驳回 -2;已签收 20;已取消 -1; // 不传值 全部;待签收 15;待发货 10;待审核 1;已驳回 -2;已签收 20;已取消 -1;
list() { list() {
return [ return [{
[{
'name': '全部', 'name': '全部',
'status': null 'status': null
}, },
...@@ -97,30 +97,16 @@ ...@@ -97,30 +97,16 @@
'status': 10 'status': 10
}, },
{ {
'name': '代签收', 'name': '代签收',
'status': 15 'status': 15
}, },
{ {
'name': '已签收', 'name': '已签收',
'status': 20 'status': 20
} }]
],
[{
'name': '备件仓',
'status': ''
},
{
'name': '已返件',
'status': ''
}
]
]
},
subList() {
return ['未入库', '已入库']
}, },
currentTab() { currentTab() {
return this.list[this.curNow][this.currentIndex] return this.list[this.currentIndex]
}, },
sousuoImage() { sousuoImage() {
return process.uniEnv.qn_base_url + 'sousuo.png' return process.uniEnv.qn_base_url + 'sousuo.png'
...@@ -129,8 +115,7 @@ ...@@ -129,8 +115,7 @@
return this.partsList.length == 0 && this.loaded return this.partsList.length == 0 && this.loaded
}, },
noPartsCustomStyle() { noPartsCustomStyle() {
return this.curNow == 0 ? 'margin-top: 100rpx;background-color: #F4F5F7' : return 'margin-top: 100rpx;background-color: #F4F5F7'
'margin-top: 200rpx;background-color: #F4F5F7'
}, },
buttonStyle() { buttonStyle() {
return { return {
...@@ -141,32 +126,29 @@ ...@@ -141,32 +126,29 @@
'width': '200rpx' 'width': '200rpx'
} }
}, },
radioColor() { // radioColor() {
return this.selectedAll ? '#2272FF' : 'transparent' // return this.selectedAll ? '#2272FF' : 'transparent'
}, // },
currentIndex() { // 当前tab的index // buttonTexts() {
return this.current[this.curNow] // return [['签收', '', '取消申请', '', ''], ['退件', '']]
}, // },
buttonTexts() { // buttonText() {
return [['签收', '', '取消申请', '', ''], ['退件', '']] // return this.buttonTexts[this.curNow][this.currentIndex]
}, // },
buttonText() { // isReserve() { // 选中备件仓
return this.buttonTexts[this.curNow][this.currentIndex] // return this.curNow == 1 && this.currentIndex == 0
}, // }
isReserve() { // 选中备件仓
return this.curNow == 1 && this.currentIndex == 0
}
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('我的仓库列表页') getApp().trackPage('我的配件页')
this.reloadPartsList() this.reloadPartsList()
this._freshing = false; this._freshing = false;
}, },
methods: { methods: {
sectionChange(index) { // sectionChange(index) {
this.curNow = index; // this.curNow = index;
this.reloadPartsList() // this.reloadPartsList()
}, // },
// tab栏切换 // tab栏切换
change(index) { change(index) {
this.current[this.curNow] = index; this.current[this.curNow] = index;
...@@ -194,64 +176,63 @@ ...@@ -194,64 +176,63 @@
this.partsList = [] this.partsList = []
} }
res.data = [{"id":9406509.806407556,"type":86614521.01432693,"orderNumber":"RQ9543573175802","uid":67994626.298127,"workerId":69452943.60857615,"siteId":270403.14672003686,"status":15,"totalPriceApply":96899360.2165232,"totalPriceOuter":35919580.812509984,"totalPriceWarranty":-83602139.37454514,"totalPriceActual":-71939604.96854639,"warehouseId":61923414.728333235,"applyRemark":"tempor esse adipisicing nulla","deliverRemark":"enim","createTime":"cupidatat in Excepteur esse anim","updateTime":"dolore cillum","items":[{"id":88259111.29600757,"orderId":48226509.228051245,"name":"空开盒","partId":-52087023.09823719,"status":15,"quantity":2,"priceApply":-74553732.16561832,"priceActual":-52938715.5216837,"returnType":71273082.1392237,"useCount":68961949.10468733,"createTime":"ut minim laboris ex ea","updateTime":"culpa ea nulla adipisicing","returnId":-73960153.99926767, "images": "/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg"},{"id":-3524944.017209992,"orderId":34533058.60869488,"name":"电缆","partId":78320657.17744848,"status":15,"quantity":6,"priceApply":72739542.49244872,"priceActual":5169889.19776167,"returnType":-92361482.60375243,"useCount":59522052.97427672,"createTime":"ut velit adipisicing incididunt","updateTime":"pariatur sed proident","returnId":-96764909.17950238,"images": "/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg"}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","workOrderId":-12573027.93228963,"workOrderNumber":"OR20150327000003","measures":"est","express":{"orderId":1804452.0561671257,"status":-1,"name":"机顶盒","phoneNumber":"minim Ut nisi","areaCode":42437809.509774685,"address":"magna","createTime":"mollit tempor cillum","deliveryTime":"consequat et labore dolore","updateTime":"nostrud","remark":"eiusmod mollit ea aute","com":"sint nisi anim elit dolor","number":"consectetur ex"},"productModel":"incididunt magna velit Excepteur laboris","productBarcode":"esse","supplierId":53499096.003008485,"brandName":"长虹(CHANGHONG)","productId":-68709997.40881962,"categoryName":"电冰箱"},{"id":21491164.69065389,"type":-99940494.04686938,"orderNumber":"RE9878766666","uid":-86210053.82862727,"workerId":47505594.97869697,"siteId":-3766937.9397049993,"status":-1,"totalPriceApply":78049843.31156719,"totalPriceOuter":-97305746.39303829,"totalPriceWarranty":-93872258.5442259,"totalPriceActual":54629844.58685568,"warehouseId":72893467.15425757,"applyRemark":"ullamco cillum commodo tempor","deliverRemark":"labore dolor Ut ex id","createTime":"laborum enim minim sint","updateTime":"tempor pariatur","items":[{"id":22876807.093349114,"orderId":-73328349.75448325,"name":"proident culpa","partId":-57956331.85626335,"status":-61540349.085944615,"quantity":88196350.70342317,"priceApply":-49775657.860448994,"priceActual":-25006069.17107247,"returnType":84771113.8737934,"useCount":86264998.81449816,"createTime":"pariatur commodo esse nisi Ut","updateTime":"officia laboris cupidatat","returnId":73065823.78881967},{"id":-51040560.904031195,"orderId":-28945683.292889908,"name":"cupidatat veniam reprehenderit velit ea","partId":38434800.50565642,"status":43614158.136024624,"quantity":9111630.336844191,"priceApply":38764169.330946624,"priceActual":-1931327.0985768437,"returnType":-93067293.47853354,"useCount":90333545.98417392,"createTime":"nisi","updateTime":"cillum dolore sint","returnId":91168418.0917764},{"id":45557257.39867419,"orderId":1407586.8636095077,"name":"ad labore tempor","partId":-99019059.82541245,"status":8199757.844844416,"quantity":49577898.758369386,"priceApply":78393740.80746442,"priceActual":-19161016.249845147,"returnType":-99616253.70173919,"useCount":-91155682.11473106,"createTime":"quis id sunt magna proident","updateTime":"consequat irure","returnId":69728822.52361763},{"id":52490483.55701485,"orderId":22205466.1845994,"name":"minim","partId":99353322.81353238,"status":74090404.86914167,"quantity":92588636.85998356,"priceApply":21638286.200525463,"priceActual":42168758.11864549,"returnType":2228380.1288566887,"useCount":-56271233.94790425,"createTime":"ullamco","updateTime":"sit Duis id proident","returnId":-48202137.79856801},{"id":-17082858.02511455,"orderId":-74415557.20143555,"name":"eu mollit","partId":-29774044.667875186,"status":73843352.9406685,"quantity":-12878510.704664588,"priceApply":47246503.69669163,"priceActual":-50399277.40573487,"returnType":80989912.69142082,"useCount":26525737.12704797,"createTime":"id","updateTime":"Duis","returnId":18003864.839698642}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","productId":23292895.61379446,"categoryName":"电冰箱","productModel":"pariatur est laborum Lorem velit","supplierId":5143732.578579828,"workOrderId":75720200.59443054,"measures":"pariatur nisi","productBarcode":"fugiat","brandName":"长虹(CHANGHONG)","workOrderNumber":"OR20150327000003","express":{"orderId":-45628847.934746996,"status":84421057.49708548,"name":"anim","phoneNumber":"laborum anim elit et ex","areaCode":-8920144.598569289,"address":"ut fugiat consequat pariatur incididunt","createTime":"incididunt in","deliveryTime":"enim consequat do incididunt adipisicing","updateTime":"voluptate magna Ut elit sint","number":"Excepteur sunt pariatur velit est","com":"ea sint irure eiusmod","remark":"aliqua quis tempor"}},{"id":78424322.41282636,"type":33783320.35653822,"orderNumber":"esse do amet nulla","uid":96825133.44702333,"workerId":-20514660.459787086,"siteId":-96725068.14741592,"status":1,"totalPriceApply":12907471.845122173,"totalPriceOuter":83153762.12794018,"totalPriceWarranty":-45816944.25450489,"totalPriceActual":46263733.25401527,"warehouseId":-80245498.07111172,"applyRemark":"irure laborum","deliverRemark":"non in nulla eiusmod consectetur","createTime":"enim laboris","updateTime":"non Excepteur incididunt magna aliquip","items":[{"id":43122261.98756099,"orderId":89891559.09495953,"name":"aute tempor sed","partId":-33112044.289685547,"status":-90355790.51323123,"quantity":99573793.60419351,"priceApply":-1347292.11380589,"priceActual":60305230.40028921,"returnType":-34640097.10314855,"useCount":79567567.223061,"createTime":"cillum eu deserunt","updateTime":"exercitation nisi in","returnId":-31561799.157562435}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","workOrderNumber":"OR20150327000003","express":{"orderId":-77965448.40290305,"status":-48505936.17972718,"name":"qui Duis","phoneNumber":"anim occaecat sit commodo","areaCode":-32566304.761578918,"address":"proident Excepteur","createTime":"non laboris dolor et","deliveryTime":"dolore veniam Duis","updateTime":"nulla esse","number":"sint ut et esse","com":"irure laboris","remark":"dolor Lorem laboris dolor"},"productBarcode":"cillum nulla Ut ipsum","productId":-47980724.91529095,"measures":"exercitation","brandName":"长虹(CHANGHONG)","supplierId":-21118419.445017934,"productModel":"incididunt irure","workOrderId":23532670.725171506,"categoryName":"电冰箱"},{"id":-27016749.524627715,"type":98311830.96038702,"orderNumber":"Excepteur exercitation voluptate","uid":-23955900.388702527,"workerId":12348320.263107345,"siteId":85445481.861619,"status":-85639031.40044658,"totalPriceApply":59578811.39297968,"totalPriceOuter":63020136.54167214,"totalPriceWarranty":43624244.99155545,"totalPriceActual":66909001.40717006,"warehouseId":61666308.50697875,"applyRemark":"reprehenderit dolor consectetur","deliverRemark":"voluptate aute elit Excepteur","createTime":"dolore veniam Duis","updateTime":"labore proident ut deserunt irure","items":[{"id":29537776.228774786,"orderId":67503467.09976402,"name":"minim nulla nisi ex eu","partId":-21949243.355626136,"status":93701973.31152403,"quantity":-5584003.629620329,"priceApply":7135128.281559229,"priceActual":85248204.81612098,"returnType":12998787.696959198,"useCount":-68055928.52868809,"createTime":"laboris voluptate in consequat dolor","updateTime":"culpa in","returnId":-20348547.63497989},{"id":39742322.49149105,"orderId":96562506.70698965,"name":"dolore eiusmod occaecat","partId":-26810768.572022334,"status":2796631.830863744,"quantity":-26922446.21481517,"priceApply":-55179205.75027007,"priceActual":5697379.518900096,"returnType":53261341.24092224,"useCount":74342986.36835992,"createTime":"ipsum laborum","updateTime":"dolore","returnId":-21860322.65894431},{"id":-17470619.832603917,"orderId":48112878.69515741,"name":"commodo","partId":27845586.202810198,"status":83884256.5329633,"quantity":69335236.06709576,"priceApply":-84246321.52978861,"priceActual":28965031.536926314,"returnType":-550131.0979412645,"useCount":99968478.51870897,"createTime":"pariatur qui cillum Duis","updateTime":"proident aliqua sunt","returnId":14952441.495038033},{"id":34995646.945470065,"orderId":-39293942.692088366,"name":"sunt","partId":57973905.82733452,"status":66859878.30531177,"quantity":-72406647.4199554,"priceApply":-10822358.045907527,"priceActual":26050607.973160654,"returnType":45059697.69330442,"useCount":41999647.11947328,"createTime":"proident in mollit in","updateTime":"reprehenderit magna amet","returnId":-86293781.49458757},{"id":96571724.33663553,"orderId":-16255981.89165847,"name":"minim ipsum ullamco culpa","partId":33297414.986852616,"status":35470971.70208612,"quantity":-47109346.81945864,"priceApply":-72173057.59690742,"priceActual":-94334669.98701036,"returnType":-47114863.55247505,"useCount":92358631.7287406,"createTime":"consectetur reprehenderit minim Excepteur","updateTime":"ut aute anim sed","returnId":92143490.11591995}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","productBarcode":"laborum cillum adipisicing ad velit","categoryName":"电冰箱","workOrderId":12532424.255793735,"workOrderNumber":"OR20150327000003","brandName":"长虹(CHANGHONG)","express":{"orderId":-47061242.5943119,"status":-71113301.69277315,"name":"sit in","phoneNumber":"voluptate dolor commodo","areaCode":3163523.565223247,"address":"sed consectetur aliqua","createTime":"occaecat fugiat in mollit","deliveryTime":"consectetur anim","updateTime":"velit non enim ut","com":"qui sint cillum","remark":"sed nostrud cillum","number":"veniam nulla"},"supplierId":659667.8267708272,"productId":87457975.53702831,"productModel":"ex","measures":"do in non"},{"id":79910321.25893903,"type":-92755715.85938272,"orderNumber":"dolore","uid":32045129.492245644,"workerId":-87225497.55755508,"siteId":929206.9191809446,"status":-49628754.46400306,"totalPriceApply":-86759265.47973964,"totalPriceOuter":77774648.6038025,"totalPriceWarranty":-43192184.70357793,"totalPriceActual":63259397.26451972,"warehouseId":-51540398.5483279,"applyRemark":"ut","deliverRemark":"est labore dolor","createTime":"consectetur","updateTime":"ut velit tempor irure mollit","items":[{"id":-59145028.86317692,"orderId":-11320686.899104223,"name":"enim","partId":49736274.59968069,"status":95250295.35558042,"quantity":-81208607.06551526,"priceApply":-8044619.175376594,"priceActual":-48277760.54597996,"returnType":64159297.29585245,"useCount":84371931.03454325,"createTime":"esse ea dolor anim nulla","updateTime":"laborum reprehenderit sit veniam","returnId":24299761.634605184}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","productModel":"ut sint dolor reprehenderit eu","brandName":"长虹(CHANGHONG)","productBarcode":"reprehenderit laboris Lorem tempor","measures":"irure elit pariatur","supplierId":-36938327.731029876,"workOrderId":78526155.84958395,"express":{"orderId":-49350095.5799381,"status":29255996.85214384,"name":"irure labore","phoneNumber":"dolor mollit pariatur consectetur","areaCode":43876681.307484895,"address":"ipsum enim dolor nostrud proident","createTime":"in pariatur eiusmod","deliveryTime":"ea","updateTime":"aute","remark":"ut id magna","number":"eu Ut","com":"dolor culpa non Ut"},"productId":-58537035.058075525,"workOrderNumber":"OR20150327000003","categoryName":"电冰箱"}] res.data = [{"id":9406509.806407556,"type":86614521.01432693,"orderNumber":"RQ9543573175802","uid":67994626.298127,"workerId":69452943.60857615,"siteId":270403.14672003686,"status":15,"totalPriceApply":96899360.2165232,"totalPriceOuter":35919580.812509984,"totalPriceWarranty":-83602139.37454514,"totalPriceActual":-71939604.96854639,"warehouseId":61923414.728333235,"applyRemark":"tempor esse adipisicing nulla","deliverRemark":"enim","createTime":"cupidatat in Excepteur esse anim","updateTime":"dolore cillum","items":[{"id":88259111.29600757,"orderId":48226509.228051245,"name":"空开盒","partId":-52087023.09823719,"status":15,"quantity":2,"priceApply":-74553732.16561832,"priceActual":-52938715.5216837,"returnType":71273082.1392237,"useCount":68961949.10468733,"createTime":"ut minim laboris ex ea","updateTime":"culpa ea nulla adipisicing","returnId":-73960153.99926767, "images": "/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg"},{"id":-3524944.017209992,"orderId":34533058.60869488,"name":"电缆","partId":78320657.17744848,"status":15,"quantity":6,"priceApply":72739542.49244872,"priceActual":5169889.19776167,"returnType":-92361482.60375243,"useCount":59522052.97427672,"createTime":"ut velit adipisicing incididunt","updateTime":"pariatur sed proident","returnId":-96764909.17950238,"images": "/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg"}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","workOrderId":-12573027.93228963,"workOrderNumber":"OR20150327000003","measures":"est","express":{"orderId":1804452.0561671257,"status":-1,"name":"机顶盒","phoneNumber":"minim Ut nisi","areaCode":42437809.509774685,"address":"magna","createTime":"mollit tempor cillum","deliveryTime":"consequat et labore dolore","updateTime":"nostrud","remark":"eiusmod mollit ea aute","com":"sint nisi anim elit dolor","number":"consectetur ex"},"productModel":"incididunt magna velit Excepteur laboris","productBarcode":"esse","supplierId":53499096.003008485,"brandName":"长虹(CHANGHONG)","productId":-68709997.40881962,"categoryName":"电冰箱"},{"id":21491164.69065389,"type":-99940494.04686938,"orderNumber":"RE9878766666","uid":-86210053.82862727,"workerId":47505594.97869697,"siteId":-3766937.9397049993,"status":-1,"totalPriceApply":78049843.31156719,"totalPriceOuter":-97305746.39303829,"totalPriceWarranty":-93872258.5442259,"totalPriceActual":54629844.58685568,"warehouseId":72893467.15425757,"applyRemark":"ullamco cillum commodo tempor","deliverRemark":"labore dolor Ut ex id","createTime":"laborum enim minim sint","updateTime":"tempor pariatur","items":[{"id":22876807.093349114,"orderId":-73328349.75448325,"name":"proident culpa","partId":-57956331.85626335,"status":-61540349.085944615,"quantity":88196350.70342317,"priceApply":-49775657.860448994,"priceActual":-25006069.17107247,"returnType":84771113.8737934,"useCount":86264998.81449816,"createTime":"pariatur commodo esse nisi Ut","updateTime":"officia laboris cupidatat","returnId":73065823.78881967},{"id":-51040560.904031195,"orderId":-28945683.292889908,"name":"cupidatat veniam reprehenderit velit ea","partId":38434800.50565642,"status":43614158.136024624,"quantity":9111630.336844191,"priceApply":38764169.330946624,"priceActual":-1931327.0985768437,"returnType":-93067293.47853354,"useCount":90333545.98417392,"createTime":"nisi","updateTime":"cillum dolore sint","returnId":91168418.0917764},{"id":45557257.39867419,"orderId":1407586.8636095077,"name":"ad labore tempor","partId":-99019059.82541245,"status":8199757.844844416,"quantity":49577898.758369386,"priceApply":78393740.80746442,"priceActual":-19161016.249845147,"returnType":-99616253.70173919,"useCount":-91155682.11473106,"createTime":"quis id sunt magna proident","updateTime":"consequat irure","returnId":69728822.52361763},{"id":52490483.55701485,"orderId":22205466.1845994,"name":"minim","partId":99353322.81353238,"status":74090404.86914167,"quantity":92588636.85998356,"priceApply":21638286.200525463,"priceActual":42168758.11864549,"returnType":2228380.1288566887,"useCount":-56271233.94790425,"createTime":"ullamco","updateTime":"sit Duis id proident","returnId":-48202137.79856801},{"id":-17082858.02511455,"orderId":-74415557.20143555,"name":"eu mollit","partId":-29774044.667875186,"status":73843352.9406685,"quantity":-12878510.704664588,"priceApply":47246503.69669163,"priceActual":-50399277.40573487,"returnType":80989912.69142082,"useCount":26525737.12704797,"createTime":"id","updateTime":"Duis","returnId":18003864.839698642}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","productId":23292895.61379446,"categoryName":"电冰箱","productModel":"pariatur est laborum Lorem velit","supplierId":5143732.578579828,"workOrderId":75720200.59443054,"measures":"pariatur nisi","productBarcode":"fugiat","brandName":"长虹(CHANGHONG)","workOrderNumber":"OR20150327000003","express":{"orderId":-45628847.934746996,"status":84421057.49708548,"name":"anim","phoneNumber":"laborum anim elit et ex","areaCode":-8920144.598569289,"address":"ut fugiat consequat pariatur incididunt","createTime":"incididunt in","deliveryTime":"enim consequat do incididunt adipisicing","updateTime":"voluptate magna Ut elit sint","number":"Excepteur sunt pariatur velit est","com":"ea sint irure eiusmod","remark":"aliqua quis tempor"}},{"id":78424322.41282636,"type":33783320.35653822,"orderNumber":"esse do amet nulla","uid":96825133.44702333,"workerId":-20514660.459787086,"siteId":-96725068.14741592,"status":1,"totalPriceApply":12907471.845122173,"totalPriceOuter":83153762.12794018,"totalPriceWarranty":-45816944.25450489,"totalPriceActual":46263733.25401527,"warehouseId":-80245498.07111172,"applyRemark":"irure laborum","deliverRemark":"non in nulla eiusmod consectetur","createTime":"enim laboris","updateTime":"non Excepteur incididunt magna aliquip","items":[{"id":43122261.98756099,"orderId":89891559.09495953,"name":"aute tempor sed","partId":-33112044.289685547,"status":-90355790.51323123,"quantity":99573793.60419351,"priceApply":-1347292.11380589,"priceActual":60305230.40028921,"returnType":-34640097.10314855,"useCount":79567567.223061,"createTime":"cillum eu deserunt","updateTime":"exercitation nisi in","returnId":-31561799.157562435}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","workOrderNumber":"OR20150327000003","express":{"orderId":-77965448.40290305,"status":-48505936.17972718,"name":"qui Duis","phoneNumber":"anim occaecat sit commodo","areaCode":-32566304.761578918,"address":"proident Excepteur","createTime":"non laboris dolor et","deliveryTime":"dolore veniam Duis","updateTime":"nulla esse","number":"sint ut et esse","com":"irure laboris","remark":"dolor Lorem laboris dolor"},"productBarcode":"cillum nulla Ut ipsum","productId":-47980724.91529095,"measures":"exercitation","brandName":"长虹(CHANGHONG)","supplierId":-21118419.445017934,"productModel":"incididunt irure","workOrderId":23532670.725171506,"categoryName":"电冰箱"},{"id":-27016749.524627715,"type":98311830.96038702,"orderNumber":"Excepteur exercitation voluptate","uid":-23955900.388702527,"workerId":12348320.263107345,"siteId":85445481.861619,"status":-85639031.40044658,"totalPriceApply":59578811.39297968,"totalPriceOuter":63020136.54167214,"totalPriceWarranty":43624244.99155545,"totalPriceActual":66909001.40717006,"warehouseId":61666308.50697875,"applyRemark":"reprehenderit dolor consectetur","deliverRemark":"voluptate aute elit Excepteur","createTime":"dolore veniam Duis","updateTime":"labore proident ut deserunt irure","items":[{"id":29537776.228774786,"orderId":67503467.09976402,"name":"minim nulla nisi ex eu","partId":-21949243.355626136,"status":93701973.31152403,"quantity":-5584003.629620329,"priceApply":7135128.281559229,"priceActual":85248204.81612098,"returnType":12998787.696959198,"useCount":-68055928.52868809,"createTime":"laboris voluptate in consequat dolor","updateTime":"culpa in","returnId":-20348547.63497989},{"id":39742322.49149105,"orderId":96562506.70698965,"name":"dolore eiusmod occaecat","partId":-26810768.572022334,"status":2796631.830863744,"quantity":-26922446.21481517,"priceApply":-55179205.75027007,"priceActual":5697379.518900096,"returnType":53261341.24092224,"useCount":74342986.36835992,"createTime":"ipsum laborum","updateTime":"dolore","returnId":-21860322.65894431},{"id":-17470619.832603917,"orderId":48112878.69515741,"name":"commodo","partId":27845586.202810198,"status":83884256.5329633,"quantity":69335236.06709576,"priceApply":-84246321.52978861,"priceActual":28965031.536926314,"returnType":-550131.0979412645,"useCount":99968478.51870897,"createTime":"pariatur qui cillum Duis","updateTime":"proident aliqua sunt","returnId":14952441.495038033},{"id":34995646.945470065,"orderId":-39293942.692088366,"name":"sunt","partId":57973905.82733452,"status":66859878.30531177,"quantity":-72406647.4199554,"priceApply":-10822358.045907527,"priceActual":26050607.973160654,"returnType":45059697.69330442,"useCount":41999647.11947328,"createTime":"proident in mollit in","updateTime":"reprehenderit magna amet","returnId":-86293781.49458757},{"id":96571724.33663553,"orderId":-16255981.89165847,"name":"minim ipsum ullamco culpa","partId":33297414.986852616,"status":35470971.70208612,"quantity":-47109346.81945864,"priceApply":-72173057.59690742,"priceActual":-94334669.98701036,"returnType":-47114863.55247505,"useCount":92358631.7287406,"createTime":"consectetur reprehenderit minim Excepteur","updateTime":"ut aute anim sed","returnId":92143490.11591995}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","productBarcode":"laborum cillum adipisicing ad velit","categoryName":"电冰箱","workOrderId":12532424.255793735,"workOrderNumber":"OR20150327000003","brandName":"长虹(CHANGHONG)","express":{"orderId":-47061242.5943119,"status":-71113301.69277315,"name":"sit in","phoneNumber":"voluptate dolor commodo","areaCode":3163523.565223247,"address":"sed consectetur aliqua","createTime":"occaecat fugiat in mollit","deliveryTime":"consectetur anim","updateTime":"velit non enim ut","com":"qui sint cillum","remark":"sed nostrud cillum","number":"veniam nulla"},"supplierId":659667.8267708272,"productId":87457975.53702831,"productModel":"ex","measures":"do in non"},{"id":79910321.25893903,"type":-92755715.85938272,"orderNumber":"dolore","uid":32045129.492245644,"workerId":-87225497.55755508,"siteId":929206.9191809446,"status":-49628754.46400306,"totalPriceApply":-86759265.47973964,"totalPriceOuter":77774648.6038025,"totalPriceWarranty":-43192184.70357793,"totalPriceActual":63259397.26451972,"warehouseId":-51540398.5483279,"applyRemark":"ut","deliverRemark":"est labore dolor","createTime":"consectetur","updateTime":"ut velit tempor irure mollit","items":[{"id":-59145028.86317692,"orderId":-11320686.899104223,"name":"enim","partId":49736274.59968069,"status":95250295.35558042,"quantity":-81208607.06551526,"priceApply":-8044619.175376594,"priceActual":-48277760.54597996,"returnType":64159297.29585245,"useCount":84371931.03454325,"createTime":"esse ea dolor anim nulla","updateTime":"laborum reprehenderit sit veniam","returnId":24299761.634605184}],"images":"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg","statusText":"待审核","productModel":"ut sint dolor reprehenderit eu","brandName":"长虹(CHANGHONG)","productBarcode":"reprehenderit laboris Lorem tempor","measures":"irure elit pariatur","supplierId":-36938327.731029876,"workOrderId":78526155.84958395,"express":{"orderId":-49350095.5799381,"status":29255996.85214384,"name":"irure labore","phoneNumber":"dolor mollit pariatur consectetur","areaCode":43876681.307484895,"address":"ipsum enim dolor nostrud proident","createTime":"in pariatur eiusmod","deliveryTime":"ea","updateTime":"aute","remark":"ut id magna","number":"eu Ut","com":"dolor culpa non Ut"},"productId":-58537035.058075525,"workOrderNumber":"OR20150327000003","categoryName":"电冰箱"}]
if (res.data) { let list = res.data || []
this.partsList.push(...res.data) this.partsList.push(...list)
this.loadStatus = res.data.length < this.pageSize ? 'nomore' : 'loadmore' this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore'
}
} else { } else {
console.log(res.message) console.log(res.message)
} }
this.loaded = true this.loaded = true
}); });
}, },
getReturnedParts(status) { // 返件列表 // getReturnedParts(status) { // 返件列表
this.pageNumber += 1 // this.pageNumber += 1
this.loaded = false // this.loaded = false
var param = { // var param = {
'pageSize': 20, // 'pageSize': 20,
'pageNumbr': 1, // 'pageNumbr': 1,
'items': true, // 'items': true,
'type': 'new' // 'type': 'new'
} // }
this.$u.api.returnedParts(param).then((res) => { // this.$u.api.returnedParts(param).then((res) => {
if (res.code == 200) { // if (res.code == 200) {
if (res.data.type != this.partsType) return // if (res.data.type != this.partsType) return
this.triggered = false; // this.triggered = false;
this._freshing = false; // this._freshing = false;
if (this.pageNumber == 1) { // if (this.pageNumber == 1) {
this.partsList = [] // this.partsList = []
} // }
if (res.data) { // if (res.data) {
this.partsList.push(...res.data) // this.partsList.push(...res.data)
this.loadStatus = res.data.length < this.pageSize ? 'nomore' : 'loadmore' // this.loadStatus = res.data.length < this.pageSize ? 'nomore' : 'loadmore'
} // }
} else { // } else {
console.log(res.message) // console.log(res.message)
} // }
this.loaded = true // this.loaded = true
}); // });
}, // },
getReserveList() { // 备件列表 // getReserveList() { // 备件列表
this.pageNumber += 1 // this.pageNumber += 1
this.loaded = false // this.loaded = false
this.$u.api.reserveList().then((res) => { // this.$u.api.reserveList().then((res) => {
if (res.code == 200) { // if (res.code == 200) {
if (res.data.type != this.partsType) return // if (res.data.type != this.partsType) return
this.triggered = false // this.triggered = false
this._freshing = false // this._freshing = false
this.partsList = res.data || [] // this.partsList = res.data || []
this.loadStatus = 'nomore' // this.loadStatus = 'nomore'
} else { // } else {
console.log(res.message); // console.log(res.message);
} // }
this.loaded = true // this.loaded = true
}); // });
}, // },
handleOperate(type) { handleOperate(info) {
// 调接口 // 调接口
// 修改info的status
// 刷新页面 // 刷新页面
}, },
handleClickCell(info) { handleClickCell(info) {
...@@ -264,14 +245,14 @@ ...@@ -264,14 +245,14 @@
url: 'pages/mine/warehouse/partsDetail' url: 'pages/mine/warehouse/partsDetail'
}) })
}, },
handleClickRecords() { // handleClickRecords() {
uni.navigateTo({ // uni.navigateTo({
url: 'pages/mine/warehouse/records' // url: 'pages/mine/warehouse/records'
}) // })
}, // },
handleClickSearch() { handleClickSearch() {
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/search' url: 'pages/mine/warehouse/searchParts'
}) })
}, },
radioChange(e) { radioChange(e) {
...@@ -288,28 +269,12 @@ ...@@ -288,28 +269,12 @@
reloadPartsList() { // 第一页数据 reloadPartsList() { // 第一页数据
this.pageNumber = 0 this.pageNumber = 0
this.loadStatus = 'loading' this.loadStatus = 'loading'
this.loadPartsList() this.getUnstockedList(this.currentTab.status)
},
loadPartsList() {
if (this.curNow == 0) { // 未入库
this.getUnstockedList(this.currentTab.status);
} else { // 已入库
if (this.currentIndex == 0) {
// 备件仓
this.getReserveList()
} else {
// 已返件
this.getReturnedParts()
}
}
}, },
reachBottom(e) { reachBottom(e) {
if (this.loadStatus != 'loadmore') return if (this.loadStatus != 'loadmore') return
this.loadStatus == 'loading' this.loadStatus == 'loading'
this.loadPartsList() this.getUnstockedList(this.currentTab.status)
},
scroll(e) {
this.old.scrollTop = e.detail.scrollTop
}, },
} }
}; };
...@@ -317,31 +282,44 @@ ...@@ -317,31 +282,44 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.ware-house { .ware-house {
padding: 0 30rpx 20rpx 30rpx; padding: 0 30rpx;
height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.search-btn { .search-view {
height: 72rpx;
width: 220rpx;
background-color: #ffffff;
border-radius: 36rpx;
color: #999999;
display: flex; display: flex;
justify-content: center; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 30rpx;
.search-image { .search-btn {
width: 36rpx; height: 72rpx;
height: 32rpx; background-color: #ffffff;
flex-shrink: 0; border-radius: 36rpx;
margin-right: 24rpx; color: #999999;
display: flex;
align-items: center;
width: 100%;
padding-left: 40rpx;
.search-image {
width: 36rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 24rpx;
}
.search-btn-placeholder {
line-height: 36rpx;
font-weight: 400;
font-size: 26rpx;
}
} }
.search-btn-text { .search-btn-text {
line-height: 36rpx; line-height: 36rpx;
font-weight: 400; font-weight: 400;
font-size: 26rpx; font-size: 32rpx;
color: #2272FF;
width: 110rpx;
text-align: right;
} }
} }
.u-tabs-box { .u-tabs-box {
...@@ -364,17 +342,17 @@ ...@@ -364,17 +342,17 @@
} }
} }
.tools-box { // .tools-box {
display: flex; // display: flex;
flex-direction: row; // flex-direction: row;
justify-content: space-between; // justify-content: space-between;
padding-bottom: 20rpx; // padding-bottom: 20rpx;
.search-sub { // .search-sub {
height: 72rpx; // height: 72rpx;
width: 320rpx; // width: 320rpx;
} // }
} // }
.bottom-view { .bottom-view {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
......
...@@ -2,35 +2,49 @@ ...@@ -2,35 +2,49 @@
<view class="parts-detail"> <view class="parts-detail">
<u-navbar back-icon-color="#333333" background="#F4F5F7" titleColor="#333333" :border-bottom="false" title-bold> <u-navbar back-icon-color="#333333" background="#F4F5F7" titleColor="#333333" :border-bottom="false" title-bold>
</u-navbar> </u-navbar>
<view class="title-text" :style="{'color': titleColor}">{{title}}</view> <view class="title-text" :style="{'color': titleColor}">
<text>{{title}}</text>
<view class="express-view" @click="$u.throttle(handleClickExpress, 500)">
<text>查看物流信息</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="content-view"> <view class="content-view">
<view class="title-view"> <view class="contacts-view">
<view> <view class="image-view"></view>
<text>工单编号:</text> <view class="right-view">
<text>{{info.orderNumber}}</text> <view class="contacts-top">
<text>{{info.express.name}}</text>
<text class="phone-view">{{info.express.phoneNumber}}</text>
</view>
<view class="adress-view">{{info.express.address}}</view>
</view> </view>
</view> </view>
<view class="line-view"></view> <view class="detail-view">
<view class="list-content"> <view class="list-content">
<view class="list-item" v-for="(item, index) in info.items" :key="index"> <view class="list-item" v-for="(item, index) in info.items" :key="index">
<view class="left-view"> <view class="left-view">
<image class="image-view" :src="imageUrl(item)"></image> <image class="image-view" :src="imageUrl(item)"></image>
<view class="info-view"> <view class="info-view">
<view class="name-text">{{item.name}}</view> <view class="name-text">{{item.name}}</view>
<view>{{noteText}}</view> <view>{{noteText}}</view>
</view>
</view> </view>
<view class="count-view">x{{item.quantity}}</view>
</view>
</view>
<view class="line-view"></view>
<view class="detail-info-view">
<view v-for="(value, key) in detailKey" :key="key" class="info-item">
<view class="detail-left-view">
<text>{{ value }}:</text>
<text @longpress="handleLongpress(key, detail[key] )">{{ detail[key] }}</text>
</view>
<view class="copy-view" v-if="key == 'orderNumber'" @click="$u.throttle(handleClickCopy, 500)">
复制</view>
</view> </view>
<view class="count-view">x{{item.quantity}}</view>
</view> </view>
</view> </view>
<view class="line-view"></view>
<view class="detail-info-view">
<view v-for="(value, key) in detailKey" :key="key" class="info-item">
<text>{{ value }}:</text>
<text>{{ detail[key] }}</text>
</view>
</view>
<view class="logistics-view"></view>
</view> </view>
<view class="bottom-view"> <view class="bottom-view">
<view class="total-view"> <view class="total-view">
...@@ -49,7 +63,10 @@ ...@@ -49,7 +63,10 @@
export default { export default {
data() { data() {
return { return {
info: {items:[], express: []}, info: {
items: [],
express: []
},
logisticsRecords: [], // 物流 logisticsRecords: [], // 物流
}; };
}, },
...@@ -96,11 +113,11 @@ ...@@ -96,11 +113,11 @@
} }
}, },
total() { // 合计 total() { // 合计
var i = 0 var i = 0
for (var item of this.info.items) { for (var item of this.info.items) {
i += item.quantity i += item.quantity
} }
return i return i
}, },
placeholderImage() { placeholderImage() {
...@@ -114,22 +131,20 @@ ...@@ -114,22 +131,20 @@
}, },
noteText() { noteText() {
return this.info.categoryName + '-' + this.info.brandName return this.info.categoryName + '-' + this.info.brandName
}, },
detail() { // 详情 detail() { // 详情
return { return {
'orderNumber': this.info.orderNumber, 'orderNumber': this.info.orderNumber,
'createTime': this.info.createTime, 'createTime': this.info.createTime,
'name': this.info.express.com, 'deliveryTime': this.info.express.deliveryTime,
'number': this.info.express.number }
} },
}, detailKey() { // 详情
detailKey() { // 详情 return {
return { 'orderNumber': '申请单号',
'orderNumber': '申请单号', 'createTime': '申请时间',
'createTime': '申请时间', 'deliveryTime': '发货时间',
'name': '物流公司', }
'number': '物流单号'
}
} }
}, },
onLoad() { onLoad() {
...@@ -138,82 +153,46 @@ ...@@ -138,82 +153,46 @@
if (pages.length >= 2) { if (pages.length >= 2) {
var page = pages[pages.length - 2]; var page = pages[pages.length - 2];
this.info = page.info this.info = page.info
} }
this.getLogistics()
}, },
methods: { methods: {
getLogistics() {
this.$u.api.getLogistics(this.info.id).then((res) => {
res = {
"code": 200,
"message": "",
"data": {
"orderId": 1883,
"status": 15,
"com": "sf",
"number": "SF1314164238675",
"name": "周明杨",
"phoneNumber": "17630408443",
"areaCode": 0,
"province": "44",
"city": "4401",
"district": "440106",
"street": "440106001",
"address": "广东省 广州市 天河区 长兴街道 芩村北街四巷16号菜鸟驿站",
"fullAddress": null,
"remark": "",
"createTime": 1624104976000,
"deliveryTime": 1624256100000,
"receiveTime": null,
"updateTime": 1624256100000,
"expressInfo": {
"state": "1",
"state_name": "transporting",
"state_orig": "0",
"records": [{
"datetime": "2021-06-22 04:09:08",
"context": "[杭州市]快件在【杭州萧山铁路站点】完成分拣,准备发往 【广州棠溪铁路站点】"
}, {
"datetime": "2021-06-22 04:09:08",
"context": "[杭州市]快件到达 【杭州萧山铁路站点】"
}, {
"datetime": "2021-06-21 23:46:32",
"context": "[金华市]快件已发车"
}, {
"datetime": "2021-06-21 23:46:26",
"context": "[金华市]快件在【金华金东中转场】完成分拣,准备发往 【杭州萧山铁路站点】"
}, {
"datetime": "2021-06-21 19:33:17",
"context": "[金华市]快件到达 【金华金东中转场】"
}, {
"datetime": "2021-06-21 18:41:02",
"context": "[金华市]快件已发车"
}, {
"datetime": "2021-06-21 18:40:53",
"context": "[金华市]快件在【金华永康滨江速运营业点】完成分拣,准备发往 【金华金东中转场】"
}, {
"datetime": "2021-06-21 17:17:54",
"context": "[金华市]顺丰速运 已收取快件"
}]
}
}
}
if (res.code == 200) {
if (res.data && res.data.records) {
this.logisticsRecords = res.data.records
}
} else {
console.log(res.message)
}
});
},
handleClick() { handleClick() {
// 调借口
// 修改info
// 后退
},
// 查看物流
handleClickExpress() {
var pages = getCurrentPages();
if (pages.length >= 1) {
var page = pages[pages.length - 1];
page.info = info
}
uni.navigateTo({
url: 'pages/mine/warehouse/express' + "?id=" + this.info.id
})
}, },
imageUrl(item) { imageUrl(item) {
return item.images ? item.images.split(',').shift() : this.placeholderImage return item.images ? item.images.split(',').shift() : this.placeholderImage
}, },
handleLongpress(key, text) { // 长按复制单号
if (key == 'orderNumber') {
uni.setClipboardData({
data: text,
success: function() {
console.log('success');
}
});
}
},
handleClickCopy() {
uni.setClipboardData({
data: this.info.orderNumber,
success: function() {
console.log('success');
}
});
}
} }
}; };
</script> </script>
...@@ -231,86 +210,133 @@ ...@@ -231,86 +210,133 @@
.title-text { .title-text {
font-size: 48rpx; font-size: 48rpx;
font-weight: bold; font-weight: bold;
padding: 0 30rpx 30rpx 30rpx; padding: 0 30rpx 24rpx 30rpx;
; display: flex;
align-items: flex-end;
justify-content: space-between;
.express-view {
color: #2272FF;
font-size: 26rpx;
}
} }
.content-view { .content-view {
margin: 0 30rpx 30rpx 30rpx; margin: 0 30rpx 30rpx 30rpx;
padding: 30rpx;
background-color: #FFFFFF;
border-radius: 12rpx;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
.title-view { .contacts-view {
padding: 30rpx;
background-color: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
display: flex; display: flex;
align-items: center; align-items: flex-start;
justify-content: space-between;
font-size: 26rpx; .image-view {
color: #333333; width: 72rpx;
} height: 72rpx;
background-color: #2272FF;
border-radius: 36rpx;
}
.right-view {
font-size: 26rpx;
color: #666666;
padding-left: 30rpx;
.line-view { .contacts-top {
background-color: #F4F5F7; color: #333333;
height: 2rpx; font-weight: bold;
width: 100%; margin-bottom: 4rpx;
margin-top: 20rpx;
.phone-view {
padding-left: 30rpx;
}
}
.address-view {
word-break: break-all;
}
}
} }
.list-content { .detail-view {
margin-top: 40rpx; padding: 30rpx;
margin-bottom: 40rpx; background-color: #FFFFFF;
border-radius: 12rpx;
.list-item { .line-view {
display: flex; background-color: #F4F5F7;
height: 2rpx;
width: 100%; width: 100%;
margin-right: 30rpx; margin-top: 20rpx;
justify-content: space-between; margin-bottom: 10rpx;
align-items: flex-end; }
.list-content {
margin-top: 40rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
.left-view { .list-item {
display: flex; display: flex;
align-items: center; width: 100%;
margin-right: 30rpx;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 40rpx;
.image-view { .left-view {
width: 120rpx; display: flex;
height: 120rpx; align-items: center;
margin-right: 20rpx;
flex-shrink: 0;
}
.info-view { .image-view {
font-size: 24rpx; width: 120rpx;
color: #333333; height: 120rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
.name-text { .info-view {
font-size: 32rpx; font-size: 24rpx;
font-weight: bold;
color: #333333; color: #333333;
margin-bottom: 30rpx;
.name-text {
font-size: 32rpx;
font-weight: bold;
color: #333333;
margin-bottom: 30rpx;
}
} }
} }
.count-view {
font-size: 28rpx;
color: #333333;
}
} }
}
.count-view { .detail-info-view {
font-size: 28rpx; .info-item {
margin-top: 20rpx;
color: #333333; color: #333333;
font-size: 26rpx;
display: flex;
justify-content: space-between;
align-items: center;
.detail-left-view {}
.copy-view {
color: #2272FF;
width: 80rpx;
text-align: right;
}
} }
} }
} }
.detail-info-view {
padding: 30rpx 0;
.info-item {
margin-bottom: 20rpx;
color: #333333;
font-size: 26rpx;
}
}
.ogistics-view {}
} }
.bottom-view { .bottom-view {
...@@ -326,6 +352,7 @@ ...@@ -326,6 +352,7 @@
.amount-view { .amount-view {
color: #2272FF; color: #2272FF;
padding-right: 14rpx;
} }
} }
......
<!-- 工单-搜索页 -->
<template>
<view class="search-parts">
<view class="top-item">
<u-search
v-model="search.keyword"
bg-color="#FFFFFF"
placeholder="请输入关键字"
search-icon-color="#999999"
color="#333333"
placeholder-color="#999999"
height="72"
margin="0 30rpx"
:animation="true"
:show-action="true"
:action-style="{
'font-size': '32rpx',
'font-weight': 500,
'color': '#2272FF'
}"
:focus="true"
@search="searchOrder"
@custom="searchOrder"
></u-search>
</view>
<view class="content-item">
<view v-if="partsList && partsList.length > 0" class="order-row">
<view v-for="(item, index) in partsList" :key="item.orderId">
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell"></AppliedCell>
</view>
<u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
</view>
<view v-else-if="loaded" class="empty-result">
<NoOrder imageName="SearchEmpty.png" text="当前暂无搜索结果" :customStyle="noPartsCustomStyle" />
</view>
</view>
</view>
</template>
<script>
import AppliedCell from "@/components/parts/appliedPartsCell.vue"
import NoOrder from "@/components/order/noOrder.vue"
export default {
components: {
AppliedCell,
NoOrder
},
data() {
return {
search: {
keyword: '',
pageSize: 20,
pageNumber: 0,
},
partsList: [],
loaded: false,
total: 10,
loadStaus: 'loadmore',
};
},
onLoad() {
getApp().trackPage('订单搜索页')
// this.searchOrder()
},
computed: {
noPartsCustomStyle() {
return 'margin-top: 100rpx;background-color: #F4F5F7'
},
},
methods: {
searchOrder(index) {
this.search.pageNumber = 1
this.loadStaus = 'loading';
this.getPartsList()
},
// 页面数据
getPartsList(event) {
if(!this.search.keyword) {
return false
}
this.loaded = false
this.$u.api.applyList(this.search).then((res) => {
if (res.code == 200) {
if (res.data) {
if (this.search.pageNumber == 1) {
this.partsList = []
}
let list = res.data || []
this.partsList.push(...list)
this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore'
}
} else {
console.log(res.message)
}
self.loaded = true
});
},
handleOperate(type) {
// 调接口
// 修改info的status
// 刷新页面
},
handleClickCell(info) {
var pages = getCurrentPages();
if (pages.length >= 1) {
var page = pages[pages.length - 1];
page.info = info
}
uni.navigateTo({
url: 'pages/mine/warehouse/partsDetail'
})
},
},
onReachBottom() {
let len = this.partsList && this.partsList.length || 0
if(!this.loaded || len >= this.total) return;
this.loadStaus = 'loading';
this.search.pageNumber += 1;
this.getPartsList('onReachBottom')
},
}
</script>
<style lang="scss"scoped>
.search-parts {
.top-item {
position: sticky;
padding: 20rpx 0;
top: 0rpx;
background-color: #F4F5F7;
z-index: 2;
/deep/ .u-search .u-content {
padding: 0 20rpx 0 40rpx;
}
/deep/ .u-search .u-input {
margin: 0 24rpx;
}
/deep/ .u-search .u-icon--right .u-iconfont {
font-size: 36rpx !important;
}
/deep/ .u-search .u-close-wrap .u-iconfont {
color: #CCCCCC;
}
}
.content-item {
padding: 10rpx 30rpx 20rpx 30rpx;
.empty-result {
padding-top: 354rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.empty-message {
padding-top: 28rpx;
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 28rpx;
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment