Commit e86b0f0d authored by Morson's avatar Morson

Merge branch 'dev' of https://git.banshouhui.com/lijundan/self-support into dev

parents 96e4e5f6 4e216908
......@@ -26,37 +26,57 @@
buttons: {
type: Array,
default () {
return [{
label: '过程反馈',
type: 'image',
image: 'guochengfankui.png',
show: true,
disabled: false,
},
{
label: '异常签到',
type: 'image',
image: 'yichangqiandao.png',
show: false,
disabled: false
},
{
label: '现场拍照',
type: 'image',
image: 'xiancahngpaizhao.png',
show: true,
disabled: false,
},
{
label: '接单',
type: 'text',
show: true,
disabled: true,
customStyle: {
'background-color': '#2272FF'
}
}
]
// id: 0 主流程; 1 过程反馈;2 异常签到; 3 现场拍照; 4 配件申请
// label: 按钮文字,
// type: 'image' 上图片下文字;'text' 纯文字,
// image: 图片名,
// show: 是否显示,
// disabled: 是 禁用;否 正常,
// id: 区分各个按钮
return [{
label: '过程反馈',
type: 'image',
image: 'guochengfankui.png',
show: false,
disabled: false,
id: 1
},
{
label: '异常签到',
type: 'image',
image: 'yichangqiandao.png',
show: false, // 待签到显示
disabled: false,
id: 2
},
{
label: '现场拍照',
type: 'image',
image: 'xiancahngpaizhao.png',
show: false,
disabled: false,
id: 3
},
{
label: '配件申请',
type: 'image',
image: 'peijian.png',
show: false,
disabled: false,
count: 0,
id: 4
},
{
label: '去接单',
type: 'text',
image: '',
show: true,
disabled: false,
id: 0,
customStyle: {
'background-color': '#D1D4D4'
}
}]
}
}
},
......
......@@ -3,7 +3,7 @@
<view class="return-cell" @click="handleClick">
<view class="title-view">
<text class="title-text" :style="{'color': titleColor}">{{title}}</text>
<view class="express-view" @click.stop="$u.throttle(handleClickExpress, 500)">
<view class="express-view" @click.stop="$u.throttle(handleClickExpress, 500)" v-if="info.express.number">
<text>物流单号:</text>
<view class="order-file-right">
<text>{{info.express.number}}</text>
......@@ -16,8 +16,8 @@
<view class="image-list">
<image class="image-view" v-for="(item, index) in images" :key="index" :src="item"></image>
<view class="info-view" v-if="info.items.length == 1">
<view class="name-text">{{info.items[0].name}}</view>
<view>{{info.items[0].categoryName + '-' + info.items[0].brandName}}</view>
<view class="name-text">{{info.items[0] ? info.items[0].name : ''}}</view>
<view>{{noteText}}</view>
</view>
</view>
<view class="count-view">{{info.items.length}}</view>
......@@ -72,6 +72,9 @@
'10': '',
'15': '签收',
'20': '',
'-2': '',
'-1': '',
'100': ''
}
},
isHorizontal() {
......@@ -83,6 +86,9 @@
'10': '',
'15': 'receiveParts',
'20': '',
'-2': '',
'-1': '',
'100': ''
}
},
buttonOperateType() {
......@@ -91,15 +97,22 @@
buttonText() {
return this.texts[this.info.status]
},
noteText() {
if (this.info.items[0] && (this.info.items[0].categoryName || this.info.items[0].brandName)) {
return (this.info.items[0].categoryName || '通用') + '-' + (this.info.items[0].brandName || '通用')
} else {
return '通用'
}
},
buttonStyle() {
return {
'height': '104rpx',
'width': '100%',
}
},
// 待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20
// 待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20; 已完成 100
title() {
return this.titles[String(this.info.status)]
return this.titles[String(this.info.status)] || this.info.statusText
},
titles() {
// 待签收 15 待发货 10 待审核 1 已取消 -1 已驳回 -2 已签收 20
......@@ -109,7 +122,8 @@
'15': '代签收',
'20': '已签收',
'-2': '审核未通过',
'-1': '已取消'
'-1': '已取消',
'100': '已完成'
}
},
titleColor() {
......@@ -166,14 +180,12 @@
},
methods: {
handleClick() {
console.log('--handleClick----')
this.$emit('action', this.info)
},
handleOperate() {
this.$emit('operate', this.info.id, this.buttonOperateType, this.willStatus)
},
handleClickExpress() {
console.log('--handleClickExpress----')
this.$emit('express', this.info)
}
}
......
......@@ -8,8 +8,10 @@
<view class="list-content">
<swiper class="swiper" :indicator-dots="true" style="height: 100%;" :current="currentIndex">
<swiper-item v-for="(item, index) in list" :key="index">
<view class="cell-view">
<AppliedCell @operate="handleOperate" @express="handleClickExpress" @action="handleClickCell" :info="item" :type="vertical" class="applied-cell"></AppliedCell>
<view class="cell-view">
<view class="shadow-view">
<AppliedCell @operate="handleOperate" @express="handleClickExpress" @action="handleClickCell" :info="item" :type="vertical" class="applied-cell"></AppliedCell>
</view>
</view>
</swiper-item>
</swiper>
......@@ -147,9 +149,9 @@
.cell-view {
height: 100%;
padding-bottom: 100rpx;
display: flex;
flex-direction: column;
.applied-cell {
// display: flex;
// flex-direction: column;
.shadow-view{
border-radius: 12rpx;
margin:30rpx;
height: 100%;
......
......@@ -50,7 +50,11 @@
},
computed: {
remarkText() {
return this.item.categoryName + '-' + this.item.brandName
if (this.item.categoryName || this.item.brandName) {
return (this.item.categoryName || '通用') + '-' + (this.item.brandName || '通用')
} else {
return '通用'
}
},
imageUrl() {
return this.item.images ? process.uniEnv.systemUrl.apiUrl + this.item.images.split(',').shift() : this.placeholderImage
......
......@@ -88,7 +88,7 @@
font-size: 32rpx;
color: #333;
font-weight: bold;
height: 50rpx;
height: 48rpx;
overflow: hidden;
}
.right-content-desc {
......
......@@ -117,60 +117,6 @@
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.expressInfo && res.data.expressInfo.records) {
this.logisticsRecords = res.data.expressInfo.records
......
......@@ -124,7 +124,10 @@
},
},
onLoad(e) {
getApp().trackPage('备件订单页')
getApp().trackPage('备件订单页')
if (e && e.index) {
this.currentIndex = e.index
}
this.reloadPartsList()
this._freshing = false;
},
......
......@@ -64,7 +64,7 @@
return {
info: {
items: [],
express: [],
express: {},
status: '0'
},
logisticsRecords: [], // 物流
......@@ -76,7 +76,10 @@
'1': '取消申请',
'10': '',
'15': '签收',
'20': '',
'20': '',
'-2': '',
'-1': '',
'100': ''
}
},
buttonText() {
......@@ -94,9 +97,9 @@
'width': '100%',
}
},
// 待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20
// 待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20; 100 已完成
title() {
return this.titles[String(this.info.status)]
return this.titles[String(this.info.status)] || this.info.statusText
},
titles() {
return {
......@@ -105,7 +108,8 @@
'15': '代签收',
'20': '已签收',
'-2': '审核未通过',
'-1': '已取消'
'-1': '已取消',
'100': '已完成'
}
},
total() { // 合计
......@@ -153,6 +157,9 @@
'10': '',
'15': 'receiveParts',
'20': '',
'-2': '',
'-1': '',
'100': ''
}
},
buttonOperateType() {
......@@ -166,7 +173,8 @@
'15': '20',
'20': '',
'-2': '',
'-1': ''
'-1': '',
'100': ''
}
},
willStatus() {
......@@ -178,7 +186,8 @@
var pages = getCurrentPages();
if (pages.length >= 2) {
var page = pages[pages.length - 2];
this.info = page.info
this.info = page.info
this.info.express = this.info.express || {}
}
},
methods: {
......@@ -186,10 +195,9 @@
this.$u.api[this.operateType](this.info.id).then(res => {
var type = 'error'
var message = res.message
if (res.code === 200) {
if (res.data == true) {
this.info.status = this.willStatus
}
if (res.code == 200) {
type = 'success'
this.info.status = this.willStatus
} else {
console.log(res.message)
}
......
......@@ -50,7 +50,7 @@
total: 100,
search: {
pageNumber: 0,
pageSize: 10,
pageSize: 20,
},
};
},
......
......@@ -116,6 +116,7 @@
var type = 'error'
var message = res.message
if (res.code === 200) {
type = 'success'
for (var item of this.partsList) {
if (item.id == partsId) {
item.status = willStatus
......@@ -190,7 +191,8 @@
.content-item {
padding: 10rpx 30rpx 20rpx 30rpx;
height: 100%;
overflow: auto;
.empty-result {
display: flex;
flex-direction: column;
......
......@@ -567,21 +567,23 @@
},
// 提交配件信息
submitParts() {
const lists = this.form.orderAccessorys.filter(v => v.quantity > 0)
const params = {
workOrderId: this.orderId,
applyType: '10',
parts: JSON.stringify(lists)
}
this.$u.api.createParts(params).then(res => {
if (res.code !== 200) {
this.$refs.uToast.show({
title: res.data,
type: 'error',
})
if (this.form.orderAccessorys) {
const lists = this.form.orderAccessorys.filter(v => v.quantity > 0)
const params = {
workOrderId: this.orderId,
applyType: '10',
parts: JSON.stringify(lists)
}
})
this.$u.api.createParts(params).then(res => {
if (res.code !== 200) {
this.$refs.uToast.show({
title: res.data,
type: 'error',
})
}
})
}
},
// 提交订单
orderFinish(){
......
......@@ -168,6 +168,7 @@
showCountTime : false, // 从上个页面传入是否显示倒计时
showApplyList: false, // 显示已申请配件列表
partsList: [], // 已申请的配件列表
partsCount: 0
}
},
computed: {
......@@ -218,7 +219,7 @@
image: 'peijian.png',
show: this.allowFeedback,
disabled: false,
count: 0,
count: this.partsCount,
id: 4
},
{
......@@ -461,7 +462,7 @@
this.$u.api.getOrderPartsSum(this.orderId).then((res) => {
if (res.code == 200) {
if (res.data) {
this.buttons[3].count = res.data.totalPartCount
this.partsCount = res.data.totalPartCount
}
} else {
console.log(res.message)
......@@ -910,6 +911,7 @@
var type = 'error'
var message = res.message
if (res.code === 200) {
type = 'success'
for (var item of this.partsList) {
if (item.id == partsId) {
item.status = willStatus
......
......@@ -21,8 +21,8 @@
</view>
<view class="warp u-flex">
<view class="brand u-flex">
<view class="label-content u-flex" v-if="brand.length > 0">
<view class="brand u-flex" v-if="brand.length > 0">
<view class="label-content u-flex">
<scroll-view
style="width:100%;white-space: nowrap;"
scroll-x="true"
......
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