Commit 986061de authored by Damon's avatar Damon

merge

parents bf79722a 69a373e1
......@@ -5,7 +5,7 @@ const UNI_APP = {
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl: {
apiUrl: 'http://192.168.0.62:37080', //java端域名请求头
apiUrl: 'http://192.168.1.22', //java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
......
(function () {
let NODE_ENV = 'prod'; // dev:开发环境 | test:测试环境 | prod:生产环境
let NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null;
let VERSION_NUMBER = '1.3.9';//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
......
......@@ -3,13 +3,16 @@
<view class="return-cell" @click="handleClick">
<view class="title-view">
<text class="title-text" :style="{'color': titleColor}">{{title}}</text>
<view>
<text>工单编号:</text>
<text @longpress="handleLongpress">{{info.orderNumber}}</text>
<view class="express-view">
<text>物流单号:</text>
<view class="order-file-right" @click="$u.throttle(handleClickExpress, 500)">
<text>{{info.express.number}}</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
<view class="line-view"></view>
<view class="list-content">
<view class="list-content" v-if="isHorizontal">
<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">
......@@ -19,6 +22,11 @@
</view>
<view class="count-view">共{{info.items.length}}种</view>
</view>
<view v-else class="list-vertical-content">
<view class="list-item" v-for="(item, index) in info.items" :key="index">
<SpareCell :item="item"/>
</view>
</view>
<view class="bottom-view">
<view class="total-view">
<text>合计:</text>
......@@ -31,15 +39,25 @@
</template>
<script>
import SpareCell from "@/components/parts/spareCell.vue"
export default {
components: {
SpareCell
},
props: {
info: { // 申请材料列表
type: Object,
default() {
return {
status: 0, // 待签收 15;待发货 10;待审核 1;已取消 -1;已驳回 -2;已签收 20
items: [],
express: {}
}
}
},
type: { // horizontal;vertical
type: String,
default: 'horizontal'
}
},
data() {
......@@ -56,6 +74,9 @@
'20': '',
}
},
isHorizontal() {
return this.type == 'horizontal'
},
operateTypes() {
return {
'1': 'cancelParts',
......@@ -93,16 +114,16 @@
},
titleColor() {
switch (String(this.info.status)) {
case '-1': // 审核未通过
case '-2': // 审核未通过
return '#FA5A49'
case '1': // 已取消
case '-1': // 已取消
return '#333333'
default:
return '#2272FF'
}
},
// 待签收 15 变 已签收 20; 10 待审核 1 变 已取消 -1
willStatus() {
// 待签收 15 -> 已签收 20; 待审核 1 -> 已取消 -1
willStatuses() {
return {
'1': '-1',
'10': '',
......@@ -112,6 +133,9 @@
'-1': ''
}
},
willStatus() {
return this.willStatuses[this.info.status]
},
total() { // 合计
var i = 0
for (var item of this.info.items) {
......@@ -142,18 +166,13 @@
},
methods: {
handleClick() {
this.$emit('action', this.info.id, this.buttonOperateType, this.willStatus)
this.$emit('action', this.info)
},
handleOperate() {
this.$emit('operate', this.info.id, this.buttonOperateType, this.willStatus)
},
handleLongpress() { // 长按复制单号
uni.setClipboardData({
data: this.info.orderNumber,
success: function () {
console.log('success');
}
})
handleClickExpress() {
this.$emit('express', this.info.id)
}
}
}
......@@ -165,6 +184,9 @@
background-color: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
display: flex;
flex-direction: column;
height: 100%;
.title-view{
display: flex;
align-items: center;
......@@ -175,6 +197,15 @@
font-size: 36rpx;
font-weight: bold;
}
.express-view {
display: flex;
justify-content: center;
.order-file-right {
font-weight: 400;
color: #2272FF;
font-size: 26rpx;
}
}
}
.line-view {
background-color: #F4F5F7;
......@@ -186,7 +217,7 @@
display: flex;
width: 100%;
margin-top: 40rpx;
margin-bottom: 40rpx;
margin-bottom: 30rpx;
.image-list {
overflow-x: auto;
display: flex;
......@@ -217,10 +248,19 @@
color: #666666;
}
}
.list-vertical-content {
height: 100%;
overflow: auto;
.list-item {
margin-bottom: 30rpx;
margin-top: 20rpx;
}
}
.bottom-view {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
.total-view {
font-size: 32rpx;
font-weight: bold;
......
<template>
<u-popup v-model="show" mode="center" safe-area-inset-bottom width="690rpx" :mask-close-able="flase" close-icon-color="#FFFFFF" height="80%">
<u-popup v-model="show" mode="center" safe-area-inset-bottom width="690rpx" :mask-close-able="flase"
close-icon-color="#FFFFFF" height="86%">
<!-- 申请列表 -->
<view class="apply-list-view">
<view class="colse-view">
<view class="right-view" @click.throttle="handleClose">
<u-icon name="close"></u-icon>
</view>
<view class="apply-list-view">
<view class="content-view">
<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>
</swiper-item>
</swiper>
</view>
<view class="bottom-view">
<view class="bottom-warehouse">
<view class="bottom-title">
<text>备件订单</text>
<view class="order-file-right" @click="$u.throttle(handleClick, 500)">
<text>点击查看</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="bottom-content">
<view v-for="(item, index) in bottomItems" :key="index" class="bottom-content-item"
@click="handleClick(item.index)">
<view class="bottom-image">
<image :src="item.icon" :style="item.imageStyle"></image>
</view>
<view>{{item.title}}</view>
</view>
</view>
</view>
<view class="line-view"></view>
<view class="apply-button" @click="$u.throttle(handleApply, 500)">
<text :custom-style="applyStyle" type="primary">继续申请</text>
</view>
</view>
</view>
<view class="list-content">
<view v-for="(item, index) in list" :key="index">
<AppliedCell @operate="handleOperate" :info="item"></AppliedCell>
</view>
</view>
<view class="bottom-view">
<u-button :custom-style="applyStyle" shape="circle" @click="handleApply" type="primary">申请配件</u-button>
<view class="colse-view">
<image class="image-view" :src="closeImage" @click.throttle="$u.throttle(handleClose, 500)"></image>
</view>
</view>
</u-popup>
......@@ -40,59 +66,175 @@
},
data() {
return {
currentIndex: 0
}
},
computed: {
closeImage() {
return process.uniEnv.qn_base_url + 'dianjiquxiao.png'
},
bottomItems() {
// index: 跳转到我的订单页面之后第几个tab,
return [{
index: 3,
title: '代签收',
icon: process.uniEnv.qn_base_url + 'daiqianshou.png',
imageStyle: 'width:48rpx;height:48rpx'
},
{
index: 2,
title: '待发货',
icon: process.uniEnv.qn_base_url + 'daifahuo.png',
imageStyle: 'width:48rpx;height:48rpx'
},
{
index: 1,
title: '待审核',
icon: process.uniEnv.qn_base_url + 'daishenhe.png',
imageStyle: 'width:44rpx;height:54rpx'
},
{
index: 4,
title: '已签收',
icon: process.uniEnv.qn_base_url + 'qianshou.png',
imageStyle: 'width:48rpx;height:48rpx'
},
]
}
},
computed: {
applyStyle() {
return {
'height': '104rpx',
'width': '100%',
}
}
},
methods: {
handleClose() {
this.$emit('update:show', false)
},
handleOperate(type) {
// 调接口
// 刷新页面
// 告诉父级做了操作
this.$emit('operate', type)
handleOperate(partsId, operateType, willStatus) {
this.$emit('operate', partsId, operateType, willStatus)
},
handleApply() {
this.$emit('apply')
handleClickCell(info) {
this.$emit('action', info)
},
handleClickExpress() {
this.$emit('express', info)
},
handleApply() {
this.$emit('apply')
},
handleClick(index = 0) {
uni.navigateTo({
url: 'pages/mine/warehouse/index?index=' + index
})
}
}
}
</script>
<style lang="scss" scoped>
.apply-list-view {
height: 100%;
display: flex;
flex-direction: column;
.colse-view {
height: 80rpx;
display: flex;
align-items: center;
justify-content: flex-end;
.right-view {
width: 80rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
color: #FF0000;
}
}
.list-content {
height: 100%;
overflow: auto;
}
.bottom-view {
}
.apply-list-view {
height: 100%;
display: flex;
flex-direction: column;
.content-view {
border-radius: 12rpx;
background-color: #FFFFFF;
height: 100%;
display: flex;
flex-direction: column;
.list-content {
height: 100%;
.swiper {
.cell-view {
height: 100%;
padding-bottom: 100rpx;
display: flex;
flex-direction: column;
.applied-cell {
border-radius: 12rpx;
margin:30rpx;
height: 100%;
box-shadow: 0px 6px 10px rgba(22,72,155,0.15);
}
}
}
}
.bottom-view {
.bottom-warehouse {
background-color: #FFFFFF;
border-radius: 12rpx;
.bottom-title {
color: #333333;
font-weight: bold;
font-size: 32rpx;
margin: 0rpx 30rpx 40rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.order-file-right {
font-weight: 400;
color: #2272FF;
font-size: 26rpx;
}
}
.bottom-content {
display: flex;
justify-content: space-around;
align-items: center;
.bottom-content-item {
color: #333333;
font-size: 26rpx;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
.bottom-image {
width: 60rpx;
height: 60rpx;
margin-bottom: 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
}
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
margin-top: 24rpx;
}
.apply-button {
width: 100%;
color: #2272FF;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
height: 112rpx;
}
}
}
.colse-view {
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
margin-top: 30rpx;
.image-view {
width: 60rpx;
height: 60rpx;
}
}
}
</style>
......@@ -4,7 +4,7 @@
<view class="title-view">
<text class="title-text">{{title}}</text>
<view>
<text>返件时间:</text>
<text>退件时间:</text>
<text>{{info.createTime}}</text>
</view>
</view>
......@@ -17,7 +17,7 @@
<view class="line-view"></view>
<view class="info-item">
<view>
<text>返件编号:</text>
<text>退件编号:</text>
<text @longpress="handleLongpress">{{info.number}}</text>
</view>
<text class="copy-view" @click="$u.throttle(handleLongpress, 500)">复制</text>
......@@ -53,7 +53,7 @@
},
computed: {
title() {
return this.info.finished ? '已返件' : '返件中'
return this.info.finished ? '退件完成' : '退件中'
},
total() { // 合计
var i = 0
......
......@@ -8,7 +8,12 @@
<view>{{remarkText}}</view>
</view>
</view>
<view class="count-view">x{{item.quantity}}</view>
<view class="count-view">
<view v-if="showChecked">
<u-number-box v-model="item.quantity" :min="item.min || 0" :max="item.max || item.quantity" @change="numChange"></u-number-box>
</view>
<text v-else>x{{item.quantity||0}}</text>
</view>
</view>
</template>
......@@ -51,7 +56,11 @@
methods: {
handleChange() {
this.$emit('change')
}
},
numChange(event) {
console.log(event.value)
this.$emit('numChange', event.value)
},
}
}
</script>
......
......@@ -61,12 +61,13 @@
default () {
return '确定'
}
}
},
customStyle: {
type: String,
default: 'background-color: #FFFFFF;padding: 0 30rpx;'
},
customStyle: {
type: String,
default: 'background-color: #FFFFFF;padding: 0 30rpx;'
},
},
data() {
return {
checked: false
......@@ -112,7 +113,7 @@
align-items: center;
}
.bottom-left {
margin-left: 30rpx;
// margin-left: 30rpx;
.left-list {
width: 100%;
&:nth-of-type(1) {
......@@ -165,7 +166,7 @@
}
.bottom-right {
width: 360rpx;
margin-right: 20rpx;
// margin-right: 20rpx;
.btn {
width: 100%;
padding: 30rpx;
......
......@@ -267,16 +267,18 @@
"path": "warehouse/index",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "我的配件",
"enablePullDownRefresh": false
"navigationBarTitleText": "配件订单",
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
"path": "warehouse/spare",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "我的备件",
"enablePullDownRefresh": false
"navigationBarTitleText": "备件库",
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
......@@ -284,7 +286,8 @@
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "返件信息",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
......@@ -311,7 +314,7 @@
"path": "warehouse/records",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "出入库记录",
"navigationBarTitleText": "出库记录",
"enablePullDownRefresh": false,
"disableScroll": true
}
......
......@@ -139,14 +139,14 @@
return [
{
pathName: 'warehouse/index',
title: '我的配件',
title: '备件订单',
value: '',
icon: process.uniEnv.qn_base_url + 'wodepeijian.png',
imageStyle: 'width:60rpx;height:54rpx'
},
{
pathName: 'warehouse/spare',
title: '我的备件',
title: '备件库',
value: '',
icon: process.uniEnv.qn_base_url + 'wodebeijian.png',
imageStyle: 'width:60rpx;height:54rpx'
......@@ -160,7 +160,7 @@
},
{
pathName: 'warehouse/records',
title: '出入记录',
title: '出库记录',
value: '',
icon: process.uniEnv.qn_base_url + 'churuku.png',
imageStyle: 'width:50rpx;height:54rpx'
......
This diff is collapsed.
......@@ -39,7 +39,7 @@
</view>
</view>
</view>
<view class="bottom-view">
<view class="bottom-view" v-if="buttonText">
<view class="total-view">
<text>合计:</text>
<text class="amount-view">{{total}}</text>
......@@ -62,7 +62,8 @@
return {
info: {
items: [],
express: []
express: [],
status: '0'
},
logisticsRecords: [], // 物流
};
......@@ -130,9 +131,35 @@
return {
'orderNumber': '申请单号:',
'createTime': '申请时间:',
'deliveryTime': '发货时间:',
'deliveryTime': '发货时间:',
'applyRemark': '备注:'
}
}
},
operateTypes() {
return {
'1': 'cancelParts',
'10': '',
'15': 'receiveParts',
'20': '',
}
},
buttonOperateType() {
return this.operateTypes[this.info.status]
},
// 待签收 15 变 已签收 20; 10 待审核 1 变 已取消 -1
willStatuses() {
return {
'1': '-1',
'10': '',
'15': '20',
'20': '',
'-2': '',
'-1': ''
}
},
willStatus() {
return this.willStatuses[this.info.status]
},
},
onLoad() {
getApp().trackPage('仓库配件详情')
......@@ -144,9 +171,28 @@
},
methods: {
handleClick() {
// 调借口
// 修改info
// 后退
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
}
} else {
console.log(res.message)
}
this.$refs.uToast.show({
title: message,
type: type,
duration: 1000,
callback: function() {}
})
var pages = getCurrentPages();
if (pages.length >= 2) {
var page = pages[pages.length - 2];
page.needApplyList = true
}
})
},
// 查看物流
handleClickExpress() {
......
<template>
<view class="ware-wrap">
<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>
<!-- <view class="content">
<view class="panel">
......
......@@ -28,7 +28,7 @@
<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>
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell" @express="handleClickExpress"></AppliedCell>
</view>
<u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
</view>
......@@ -37,6 +37,9 @@
</view>
</view>
<view>
<u-toast ref="uToast" />
</view>
</view>
</template>
......@@ -70,6 +73,14 @@
return 'margin-top: 100rpx;background-color: #F4F5F7'
},
},
onShow() {
// 从过程反馈回来,需要刷新数据
let pages = getCurrentPages()
let page = pages[pages.length - 1]
if (page.needApplyList) {
this.getPartsList()
}
},
methods: {
searchOrder(index) {
this.search.pageNumber = 1
......@@ -124,14 +135,23 @@
})
},
handleClickCell(info) {
this.setPageInfo(info)
uni.navigateTo({
url: 'pages/mine/warehouse/partsDetail'
})
},
handleClickExpress(info) {
this.setPageInfo(info)
uni.navigateTo({
url: 'pages/mine/warehouse/express'
})
},
setPageInfo(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() {
......
<template>
<!-- 我的备件 -->
<view class="ware-house-spare">
<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>
<view class="search-view">
<u-search v-model="keyword" :action-text="searchButtonText" @search="handleClickSearch" @clear="handleClear"
......@@ -42,7 +42,7 @@
@submit="$u.throttle(handleSubmit, 500)" />
</view>
</template>
<view class="fixed-button">
<view class="fixed-button" v-if="!showBounce">
<ApplyButton :type="buttonType" @click="handleClickApply"/>
</view>
</view>
......@@ -124,7 +124,7 @@
},
},
onLoad(e) {
getApp().trackPage('我的备件页')
getApp().trackPage('备件库页')
this.getReserveList()
},
methods: {
......@@ -138,39 +138,6 @@
this.$u.api.reserveList(param).then((res) => {
if (res.code == 200) {
res.data = [{
"name": "minim in dolor",
"quantity": 15128407.808330506,
"skuId": -31990898.14022602,
"images": "mollit nisi Duis",
"remark": "in elit",
"code": "esse commodo Ut ex cillum",
"stock": "8"
}, {
"name": "Excepteur ullamco dolore",
"quantity": -16408657.848651886,
"skuId": 99507283.4197697,
"images": "dolore velit",
"remark": "fugiat",
"code": "elit dolore",
"stock": "71"
}, {
"name": "consectetur tempor ut in eu",
"quantity": -16070458.813757822,
"skuId": 95208174.19993973,
"images": "do eiusmod",
"remark": "amet magna",
"code": "do",
"stock": "100"
}, {
"name": "deserunt",
"quantity": 12448683.358913198,
"skuId": -78230180.52803165,
"images": "irure ut commodo",
"remark": "dolore quis",
"code": "deserunt cillum incididunt proident",
"stock": "10"
}]
this.partsList = []
let list = res.data || []
for (var item of list) {
......
<template>
<view class="order-wrap">
<u-navbar :title="title" title-color="#FFFFFF" title-size="32" back-icon-color="#FFFFFF" :background="background" :border-bottom="false" title-bold></u-navbar>
<u-navbar title-color="#FFFFFF" title-size="32" back-icon-color="#FFFFFF" :background="background" :border-bottom="false" title-bold></u-navbar>
<view class="content">
<view class="header" v-if="showTimeView">
<image class="bottom-tag-view" :src="tagImage"></image>
<!-- 倒计时 -->
<view class="title">
<u-count-down :timestamp="timestamp" font-size="28" show-days separator="zh" separator-size="32" height="40"
:color="countColor" separator-color="#FFFFFF" @change="timeOutChange" ref="order-count-down" bg-color="#FFFFFF"></u-count-down>
<view class="header-content">
<!-- 抓紧时间提示 -->
<view class="tip-text">{{tipText}}</view>
<!-- 拒单 -->
<view v-show="allowRejection" class="reject-button" @click="$u.throttle(rejectOrder, 500)">拒单</view>
</view>
</view>
<view class="title-view">
<view class="title-text">{{title}}</view>
<!-- 拒单 -->
<view v-show="allowRejection" class="reject-button" @click="$u.throttle(rejectOrder, 500)">拒单</view>
</view>
<!-- 订单详情 -->
<view class="card">
<view class="header" v-if="showTimeView">
<view class="header-left-view">
<image class="bottom-tag-view" :src="tagImage"></image>
<view class="tip-text" :style="{'color': countColor}">{{tipText}}</view>
</view>
<!-- 倒计时 -->
<view class="title">
<u-count-down :timestamp="timestamp" font-size="28" show-days separator="zh" separator-size="32" height="40"
color="#FFFFFF" separator-color="#666666" @change="timeOutChange" ref="order-count-down" :bg-color="countColor"></u-count-down>
</view>
</view>
<Detail :order="order" :readMore.sync="readMore" :operate="isAllowDianhuaAndDaohang"></Detail>
</view>
<!-- 从我的页面进来显示结算信息 -->
......@@ -77,7 +79,7 @@
</view>
</u-popup>
<!-- 已申请配件列表 -->
<ApplyList :show.sync="showApplyList" :list="partsList" @operate="handleOperate" @apply="handleApply"></ApplyList>
<ApplyList :show.sync="showApplyList" :list="partsList" @action="handleClickCell" @operate="handleOperate" @apply="handleApply"></ApplyList>
</template>
</view>
</template>
......@@ -212,7 +214,7 @@
{
label: '配件申请',
type: 'image',
image: 'xiancahngpaizhao.png',
image: 'peijian.png',
show: this.allowFeedback,
disabled: false,
count: 3,
......@@ -240,10 +242,10 @@
return this.timeout ? this.chaoshiImage : this.shengyuImage
},
chaoshiImage() {
return process.uniEnv.qn_base_url + 'chaoshi.png'
return process.uniEnv.qn_base_url + 'chaoshi-red.png'
},
shengyuImage() {
return process.uniEnv.qn_base_url + 'shengyu.png'
return process.uniEnv.qn_base_url + 'shenyu-blue.png'
},
types() {
return {
......@@ -268,13 +270,7 @@
return [this.type0Text,'预约','签到','去完工','','','','','已被抢','']
},
tipText() { // 时间紧迫提示文字
return this.timeout ? '您的订单已超时,请及时' + this.tipTypeText : '请您注意剩余时间,及时' + this.tipTypeText
},
tipTexts() {
return ['接单','预约','签到','完工','','','','','','']
},
tipTypeText() {
return this.tipTexts[this.types[this.type]]
return this.timeout ? '订单超时' : '剩余时间'
},
title() { // 标题
return this.titles[this.types[this.type]]
......@@ -359,6 +355,9 @@
this.loadOrderDetail()
this.loadOrderRecord()
}
if (page.needApplyList) {
this.getApplyList()
}
},
onUnload() {
this.unloaded = true
......@@ -655,9 +654,16 @@
break
}
},
async handleApplyParts() { // 点击了配件申请按钮
handleApplyParts() { // 点击了配件申请按钮
if (this.buttons[3].count > 0) { // 已经有配件,弹出配件列表
this.showApplyList = true
this.getApplyList()
} else { // 没有配件,跳到配件申请
this.toApplyParts()
}
},
async getApplyList() {
let res = await this.$u.api.applyList({
'pageSize': 1000,
'pageNumbr': 1,
......@@ -665,11 +671,8 @@
'workOrderId': this.order.orderId
})
if(res && res.code == 200) {
this.partsList = res.data
this.partsList = res.data || []
}
} else { // 没有配件,跳到配件申请
this.toApplyParts()
}
},
handleBtn() {
console.log('click button')
......@@ -907,7 +910,47 @@
// 添加客服
},
handleOperate() { // 点了弹窗里的配件操作
this.$u.api[operateType](partsId).then(res => {
var type = 'error'
var message = res.message
if (res.code === 200) {
if (res.data == true) {
for (var item of this.partsList) {
if (item.id == partsId) {
item.status = willStatus
break
}
}
}
} else {
console.log(res.message)
}
this.$refs.uToast.show({
title: message,
type: type,
duration: 1000,
callback: function() {}
})
})
},
handleClickCell(info) {
this.setPageInfo(info)
uni.navigateTo({
url: 'pages/mine/warehouse/partsDetail'
})
},
handleClickExpress(info) {
this.setPageInfo(info)
uni.navigateTo({
url: 'pages/mine/warehouse/express'
})
},
setPageInfo(info) {
var pages = getCurrentPages();
if (pages.length >= 1) {
var page = pages[pages.length - 1];
page.info = info
}
},
handleApply() { // 点了弹窗的申请配件
this.toApplyParts()
......@@ -926,6 +969,10 @@
margin-left: 6rpx;
margin-right: 6rpx;
}
.u-mode-center-box {
background-color: transparent !important;
padding-top: 40rpx;
}
}
</style>
......@@ -941,55 +988,61 @@
display: flex;
flex-direction: column;
.header {
padding: 4rpx 2rpx 24rpx 2rpx;
display: flex;
align-items: center;
.bottom-tag-view {
width: 116rpx;
height: 116rpx;
flex-shrink: 0;
}
.title {
margin-left: 24rpx;
margin-top: 6rpx;
width: 100%;
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 24rpx;
min-height: 36rpx;
.tip-text {
font-size: 26rpx;
color: #EFEFEF;
}
.reject-button {
text-align: center;
width: 106rpx;
height: 52rpx;
border-radius: 40rpx;
font-size: 24rpx;
font-weight: 400;
line-height: 52rpx;
color: #DEDEDE;
text-align: right;
}
}
}
}
.content {
height: 100%;
border-radius: 12rpx;
overflow: auto;
margin: 0rpx 30rpx 30rpx 30rpx;
.title-view {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 20rpx;
.title-text {
font-weight: bold;
font-size: 48rpx;
color: #FFFFFF;
}
.reject-button {
width: 106rpx;
height: 52rpx;
font-size: 26rpx;
line-height: 52rpx;
color: #DEDEDE;
text-align: right;
margin-right: 4rpx;
}
}
.card {
background-color: #FFFFFF;
margin-bottom: 20rpx;
padding: 30rpx 30rpx 0 30rpx;
border-radius: 6px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx solid #F4F5F7;
padding-bottom: 26rpx;
margin-bottom: 30rpx;
.header-left-view {
display: flex;
align-items: center;
.bottom-tag-view {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
.tip-text {
font-size: 32rpx;
font-weight: bold;
color: #2272FF;
}
}
}
}
.record-item {
......
......@@ -75,10 +75,10 @@
}
if(this.isReturn){
var pages = getCurrentPages();
if(pages.length >= 3) {
var prevPage = pages[pages.length - 3];
prevPage.$vm.getReserveList()
this.$u.route({type:'back', delta: 2})
if(pages.length >= 4) {
var prevPage = pages[pages.length - 4];
this.$u.route({type:'back', delta: 3})
prevPage.$vm.$u.route({url: 'pages/mine/warehouse/return'})
} else {
this.$u.route({type:'back'})
}
......
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