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