Commit f41179cb authored by Damon's avatar Damon

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

parents 687147c5 1c879360
...@@ -6,6 +6,7 @@ const UNI_APP = { ...@@ -6,6 +6,7 @@ const UNI_APP = {
}, },
systemUrl: { systemUrl: {
apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头 apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
}, },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/', qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'https://qn-static.banshouhui.com', qn_asset_url: 'https://qn-static.banshouhui.com',
......
...@@ -191,11 +191,11 @@ let orderApiFun = function(vm){ ...@@ -191,11 +191,11 @@ let orderApiFun = function(vm){
// 配件物流 // 配件物流
let getLogistics = async (orderId) => await vm.$u.get(prefix + 'parts/' + vm.vuex_token + '/orders/'+ orderId +'/express',{}, formType); let getLogistics = async (orderId) => await vm.$u.get(prefix + 'parts/' + vm.vuex_token + '/orders/'+ orderId +'/express',{}, formType);
// 配件申请单-数量统计 // 配件申请单-数量统计
let getOrderPartsSum = async (orderId) => await vm.$u.get(prefix + 'parts/' + vm.vuex_token + '/' + orderId +'/sum',{}, formType); let getOrderPartsSum = async (orderId) => await vm.$u.get(prefix + 'parts/' + vm.vuex_token + '/orders/' + orderId +'/sum',{}, formType);
// 配件申请单-签收 // 配件申请单-签收
let receiveParts = async (partOrderId) => await vm.$u.post(prefix + 'parts/' + vm.vuex_token + '/orders/' + partOrderId +'/receive',{}, formType); let receiveParts = async (partOrderId) => await vm.$u.put(prefix + 'parts/' + vm.vuex_token + '/orders/' + partOrderId +'/receive',{}, formType);
// 配件申请单-取消申请 // 配件申请单-取消申请
let cancelParts = async (partOrderId) => await vm.$u.post(prefix + 'parts/' + vm.vuex_token + '/orders/'+ partOrderId +'/cancel',{}, formType); let cancelParts = async (partOrderId) => await vm.$u.put(prefix + 'parts/' + vm.vuex_token + '/orders/'+ partOrderId +'/cancel',{}, formType);
const orderApi = { const orderApi = {
listByRecommendOrder, listByRecommendOrder,
......
@font-face { @font-face {
font-family: "wxh"; /* Project id 2600874 */ font-family: "wxh"; /* Project id 2600874 */
/* Color fonts */
src: src:
url('//at.alicdn.com/t/font_2600874_5qa57hzmhg6.woff2?t=1624432377798') format('woff2'); url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAQUAAsAAAAACBgAAAPFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDDAqEFINfATYCJAMQCwoABCAFhDEHOxsUBxHVm0PJfiTGMSnrzJJXUa4yEzzQe9abzLQL+2Cu08seiGTvi9AfoQbA5mYMV6MiFEtyHvwv35G2zPRCGD9wTn36LrAAwHh1W9LBblaR4hfGKwyvdRnHIAB3SlEDrV6DZtl49+4wuC/hKMxKAUmq6N2jWwdcBTmqIVXgisDedahCfMUG2gTtLDAt+L14QxnhCho2iblSq671O3P8uXgupek0cci7FE+Xg+YaYAMkkLkxpchv1rdBRv5MJO5VekUyra8Q8Fw6nc+FR9/2Xx5INAQIOybfE9RyAQnPhUNPBBp4BAIJ5oUvpQBwBVyAVcA7THHkNF0kIigsINw7IWTUxOyrFmDmXAMm5d0ArNzrkuETHcznWGlM0k7KuVajNbOvdumhu0/cKAqtTR4ekzZQ4FY114+auHHhopC83OzZIcdir7XpxJ60nA1Llqdmz06eGNx1rrVpUlCXOQvmr+8/MX3u0gh9Wc1u89at2ZDLCOw8OzA7b14Ir5m0YQk/w+Fy7WeP8J54/bqwWTdueHhNOjXG9DtQ5tWrsTK0X1FFvXwFR0XjfsWiCrpegSLvGxUdFcrryPsVjfIOR/lu9i8LuhspevKUKcl6inHRRv3IKZP1ZCP1IlBETp6crKcaF2FN0qdMqchO6bP7etC9IK26yxOOxG2Vd4WMe5Txy/OZfrjdxnnzLpyfO+99xr2M9wsXxHu98n34kGUX45Ma7/2D3ocEv0+/l+5/d6NxaPrbG1Flz8woVT5qTLxlLpi7Nr5njwnF1sGSmR8+ZH45aFnvM865vS+2/F5Gl29F+eXm7rT6Sam1Ux6nuGjYKO1YZJ1aX86NnxcdlJ2N/gA4xyrkOOd/p6U0WUyCpvwirR/ejDa3fxwr8qn2zdXjmV13///aFmDdKWMTcEUDnv57tSgaCP8LaU5Q6svgjULVPQ5FUyS8GuBumcFJzf7cn0IYpNJACIMSUMOFUFAiiSEqajxow4Mk0I6kFOhOBmVHexCAgUQoNyCdAYQrIFwEUMObFaDEzjaiou4BbQRziGu3hJcAupPLjSk9SBZZrqrLqAUdmD9MlnZv1xR1P/GF4Vw1Rxhq/ZCPiXZoqyYTGnFH7t7juEIn4sEzbTD0XA3XlSAxzWiliiKpr2tf9aDK0paprC6jFnRg/jBZ2r23qqhs2BNfGM5Vc5EB7Q9V/TF1Toa2aqqJI39vKrjErMcVOhEPnmmDcFhUi6vlJ0jV2TNaqSg+wJv6minnu/KrzQu3d8gFJZh7qFwTUihhw2ZXskuZcC8d2SwDAAAA') format('woff2');
} }
.wxh { .wxh {
...@@ -13,6 +12,10 @@ ...@@ -13,6 +12,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.wxh-clock:before {
content: "\e603";
}
.wxh-pen:before { .wxh-pen:before {
content: "\e602"; content: "\e602";
} }
......
...@@ -111,7 +111,16 @@ ...@@ -111,7 +111,16 @@
orderText() { // 按钮文字 orderText() { // 按钮文字
return this.typeTexts[this.orderType] return this.typeTexts[this.orderType]
}, },
buttonStyle() { // 按钮样式 buttonStyle() { // 按钮样式
/** orderType
0 待接单、
1 待预约、
2 待签到、
3 待完工、
4 审核中、
5 异常单、
6 已完工
*/
switch (this.orderType) { switch (this.orderType) {
case 0: case 0:
if (!this.isCompetition ) { if (!this.isCompetition ) {
...@@ -198,6 +207,12 @@ ...@@ -198,6 +207,12 @@
showDistance() { showDistance() {
return this.orderType == 0 && this.location.length >= 2 && (this.orderData.contactAddressLatitud || this.orderData.contactAddressLongitud) return this.orderType == 0 && this.location.length >= 2 && (this.orderData.contactAddressLatitud || this.orderData.contactAddressLongitud)
}, },
isWaitFinish() {
return this.orderType == 3
},
isException() {
return this.orderType == 5
},
types() { types() {
return { return {
'waitAccept': 0, // 待接单、 'waitAccept': 0, // 待接单、
...@@ -269,10 +284,17 @@ ...@@ -269,10 +284,17 @@
methods: { methods: {
// title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动 // title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
handleClick() { handleClick() {
// if (this.buttonDisabled) return var func = 'click'
if (this.isWaitFinish || this.isException) { // 不是待完工、不是异常单点按钮算点cell
func = 'action'
}
this.$emit('action', this.orderData, this.type, this.showCountTime ? 'show' : '') this.$emit('action', this.orderData, this.type, this.showCountTime ? 'show' : '')
}, },
handleClickCell() { handleClickCell() {
var func = 'click'
if (this.isException) { // 异常单点cell算点按钮
func = 'action'
}
this.$emit('click', this.orderData, this.type, this.showCountTime ? 'show' : '') this.$emit('click', this.orderData, this.type, this.showCountTime ? 'show' : '')
}, },
handleChange(timestamp) { handleChange(timestamp) {
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<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"> <view class="express-view" @click.stop="$u.throttle(handleClickExpress, 500)">
<text>物流单号:</text> <text>物流单号:</text>
<view class="order-file-right" @click="$u.throttle(handleClickExpress, 500)"> <view class="order-file-right">
<text>{{info.express.number}}</text> <text>{{info.express.number}}</text>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<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].name}}</view>
<view>{{info.categoryName + '-' + info.brandName}}</view> <view>{{info.items[0].categoryName + '-' + info.items[0].brandName}}</view>
</view> </view>
</view> </view>
<view class="count-view">共{{info.items.length}}种</view> <view class="count-view">共{{info.items.length}}种</view>
...@@ -166,13 +166,15 @@ ...@@ -166,13 +166,15 @@
}, },
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() {
this.$emit('express', this.info.id) console.log('--handleClickExpress----')
this.$emit('express', this.info)
} }
} }
} }
......
...@@ -32,6 +32,11 @@ ...@@ -32,6 +32,11 @@
'width': this.typeWidth[this.type], 'width': this.typeWidth[this.type],
} }
} }
},
created() {
setTimeout(()=> {
this.type = 'collapse'
}, 3000)
}, },
methods: { methods: {
handleClick() { handleClick() {
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
</view> </view>
<view class="count-view"> <view class="count-view">
<view v-if="showChecked"> <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> <u-number-box v-model="item.quantity" :min="item.min || 0" :max="item.max || item[type]" @change="numChange"></u-number-box>
</view> </view>
<text v-else>x{{item.quantity||0}}</text> <text v-else>x{{item[type]|| 0}}</text>
</view> </view>
</view> </view>
</template> </template>
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
return false return false
} }
}, },
type: { // 'stock' 仓库; 'quantity' 订单
type: String,
default: 'quantity'
},
item: { item: {
type: Object, type: Object,
default() { default() {
...@@ -44,7 +48,7 @@ ...@@ -44,7 +48,7 @@
}, },
computed: { computed: {
remarkText() { remarkText() {
return this.noteText || this.item.categoryName + '-' + this.item.brandName return this.item.categoryName + '-' + this.item.brandName
}, },
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
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<template v-else> <template v-else>
<view v-for="(item, index) in orderList" :key="item.orderId"> <view v-for="(item, index) in orderList" :key="item.orderId">
<OrderCell :orderData="item" :type="orderType" :location="dataValue" @click="handleClick" <OrderCell :orderData="item" :type="orderType" :location="dataValue" @click="handleClick"
@action="handleClick"> </OrderCell> @action="handleClickCellButton"> </OrderCell>
</view> </view>
<view class="load-more-view"> <view class="load-more-view">
<u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 2" :status="loadStatus" bgColor="#F4F5F7"></u-loadmore> <u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 2" :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
...@@ -231,6 +231,9 @@ ...@@ -231,6 +231,9 @@
} }
}); });
}, },
handleClickCellButton(item) {
this.filish(item)
},
handleClick(item, type, showCountTime) { // type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动 handleClick(item, type, showCountTime) { // type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
if(item.orderStatus===86 || item.orderStatus===88){ if(item.orderStatus===86 || item.orderStatus===88){
this.filish(item) this.filish(item)
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
</u-navbar> </u-navbar>
<view class="content-view"> <view class="content-view">
<view class="contacts-view"> <view class="contacts-view">
<view> <view class="contacts-left-view">
<image class="image-view" :src="imageUrl"></image> <image class="image-view" :src="imageUrl"></image>
<view class="total-view">共{{total}}件</view>
</view> </view>
<view class="right-view"> <view class="right-view">
<view class="title-view">{{title}}</view> <view class="title-view">{{title}}</view>
...@@ -73,6 +74,14 @@ ...@@ -73,6 +74,14 @@
imageUrl() { imageUrl() {
let item = this.info.items[0] || {} let item = this.info.items[0] || {}
return item.images ? item.images.split(',').shift() : this.placeholderImage return item.images ? item.images.split(',').shift() : this.placeholderImage
},
total() { // 合计
var i = 0
for (var item of this.info.items) {
i += item.quantity
}
return i
}, },
titleColor() { titleColor() {
switch (String(this.info.status)) { switch (String(this.info.status)) {
...@@ -93,7 +102,7 @@ ...@@ -93,7 +102,7 @@
return i return i
}, },
placeholderImage() { placeholderImage() {
return process.uniEnv.qn_base_url + 'logo.png' return process.uniEnv.qn_base_url + 'morentupian.png'
}, },
}, },
onLoad(e) { onLoad(e) {
...@@ -208,11 +217,27 @@ ...@@ -208,11 +217,27 @@
align-items: flex-start; align-items: flex-start;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 12rpx; border-radius: 12rpx;
.contacts-left-view {
.image-view { position: relative;
width: 120rpx; .image-view {
height: 120rpx; width: 120rpx;
border-radius: 12rpx; height: 120rpx;
border-radius: 12rpx;
position: relative;
}
.total-view {
position: absolute;
height: 32rpx;
border-radius: 16rpx;
font-size: 20rpx;
color: #FFFFFF;
background-color: rgba(0, 0, 0, 0.5);
bottom: 16rpx;
width: 100rpx;
text-align: center;
margin-left: 10rpx;
line-height: 32rpx;
}
} }
.right-view { .right-view {
......
...@@ -178,12 +178,10 @@ ...@@ -178,12 +178,10 @@
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'
type = 'success' message = '操作成功'
message = '操作成功' this.currentIndex = 0
this.currentIndex = 0 this.reloadPartsList()
this.reloadPartsList()
}
} else { } else {
console.log(res.message) console.log(res.message)
} }
...@@ -197,7 +195,7 @@ ...@@ -197,7 +195,7 @@
}, },
handleClickCell(info) { handleClickCell(info) {
this.setPageInfo(info) this.setPageInfo(info)
uni.navigateTo({ uni.navigateTo({
url: 'pages/mine/warehouse/partsDetail' url: 'pages/mine/warehouse/partsDetail'
}) })
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</view> </view>
<view class="content-view"> <view class="content-view">
<view class="contacts-view"> <view class="contacts-view">
<view class="image-view"></view> <image class="image-view" :src="shouhuodizhiImage"></image>
<view class="right-view"> <view class="right-view">
<view class="contacts-top"> <view class="contacts-top">
<text>{{info.express.name}}</text> <text>{{info.express.name}}</text>
...@@ -92,12 +92,12 @@ ...@@ -92,12 +92,12 @@
}, },
titles() { titles() {
return { return {
'1': '待审核', '1': '待审核',
'10': '待发货', '10': '待发货',
'15': '代签收', '15': '代签收',
'20': '已签收', '20': '已签收',
'-1': '审核未通过', '-2': '审核未通过',
'1': '已取消' '-1': '已取消'
} }
}, },
total() { // 合计 total() { // 合计
...@@ -109,7 +109,10 @@ ...@@ -109,7 +109,10 @@
return i return i
}, },
placeholderImage() { placeholderImage() {
return process.uniEnv.qn_base_url + 'logo.png' return process.uniEnv.qn_base_url + 'morentupian.png'
},
shouhuodizhiImage() {
return process.uniEnv.qn_base_url + 'shouhuodizhi.png'
}, },
customStyle() { customStyle() {
return { return {
...@@ -123,8 +126,9 @@ ...@@ -123,8 +126,9 @@
detail() { // 详情 detail() { // 详情
return { return {
'orderNumber': this.info.orderNumber, 'orderNumber': this.info.orderNumber,
'createTime': this.info.createTime, 'createTime': this.info.createTime ? this.$u.timeFormat(this.info.createTime, 'yyyy.mm.dd hh:MM:ss') : '',
'deliveryTime': this.info.express.deliveryTime, 'deliveryTime': this.info.express.deliveryTime ? this.$u.timeFormat(this.info.express.deliveryTime, 'yyyy.mm.dd hh:MM:ss') : '',
'applyRemark': this.info.applyRemark || '',
} }
}, },
detailKey() { // 详情 detailKey() { // 详情
...@@ -132,7 +136,7 @@ ...@@ -132,7 +136,7 @@
'orderNumber': '申请单号:', 'orderNumber': '申请单号:',
'createTime': '申请时间:', 'createTime': '申请时间:',
'deliveryTime': '发货时间:', 'deliveryTime': '发货时间:',
'applyRemark': '备注:' 'applyRemark': '备 注:'
} }
}, },
operateTypes() { operateTypes() {
...@@ -271,8 +275,6 @@ ...@@ -271,8 +275,6 @@
.image-view { .image-view {
width: 72rpx; width: 72rpx;
height: 72rpx; height: 72rpx;
background-color: #2272FF;
border-radius: 36rpx;
} }
.right-view { .right-view {
...@@ -327,7 +329,9 @@ ...@@ -327,7 +329,9 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.detail-left-view {} .detail-left-view {
white-space:pre;
}
.copy-view { .copy-view {
color: #2272FF; color: #2272FF;
......
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
if (this.pageNumber == 1) { if (this.pageNumber == 1) {
this.partsList = [] this.partsList = []
} }
res.data = [{"id":-75331425.22404352,"batchNumber":4160526.6761407256,"uid":"mollit officia","workerId":-53125520.5822402,"siteId":-78756903.47606051,"com":10662753.531188592,"number":-7491756.330408707,"itemCount":-35959233.33192683,"createTime":62314860.40961748,"updateTime":-67832582.08883524,"items":[],"finished":true,"newPart":true},{"id":-56142292.873831056,"batchNumber":-43270249.59499388,"uid":"nisi consectetur","workerId":68047695.6374416,"siteId":-31316397.997159883,"com":-82166514.86287847,"number":-92300686.0850902,"itemCount":1640565.5584086329,"createTime":-61483233.33441979,"updateTime":-22714735.289866492,"items":[],"finished":true,"newPart":true},{"id":98976798.95738453,"batchNumber":-45615089.660968564,"uid":"mollit labore aliqua","workerId":42283772.036942184,"siteId":55022668.20669302,"com":33103856.672201812,"number":48131937.87508476,"itemCount":59997279.2891705,"createTime":18223056.98237315,"updateTime":97654931.2675035,"items":[],"finished":true,"newPart":false},{"id":-69033119.3304789,"batchNumber":-77743793.52216494,"uid":"dolor dolor consectetur","workerId":13808611.34657599,"siteId":-76206317.07406753,"com":-48277783.1404658,"number":33895406.60927133,"itemCount":96960890.82518098,"createTime":-82456678.94093649,"updateTime":-64889178.61910926,"items":[],"finished":true,"newPart":false}]
let list = res.data || [] let list = res.data || []
this.partsList.push(...list) this.partsList.push(...list)
this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore' this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore'
...@@ -103,11 +102,6 @@ ...@@ -103,11 +102,6 @@
this.loaded = true this.loaded = true
}); });
},
handleOperate(info) {
// 调接口
// 修改info的status
// 刷新页面
}, },
handleClickCell(info) { handleClickCell(info) {
var pages = getCurrentPages(); var pages = getCurrentPages();
......
...@@ -116,11 +116,10 @@ ...@@ -116,11 +116,10 @@
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) { 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 break
}
} }
} }
} else { } else {
...@@ -170,7 +169,6 @@ ...@@ -170,7 +169,6 @@
flex-direction: column; flex-direction: column;
height: 100vh; height: 100vh;
.top-item { .top-item {
height: 100100%;
position: sticky; position: sticky;
padding: 10rpx 0; padding: 10rpx 0;
top: 0rpx; top: 0rpx;
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
</view> </view>
<template v-else> <template v-else>
<view class="list-item" v-for="(item, index) in partsList" :key="item.id"> <view class="list-item" v-for="(item, index) in partsList" :key="item.id">
<SpareCell :item="item" :noteText="noteText" :showChecked="showBounce" <SpareCell :item="item" :showChecked="showBounce" type="stock"
@change="handleChange(index)" /> @change="handleChange(index)"@numChange="handleNumChange($event, index)" />
</view> </view>
<view class="load-more-view"> <view class="load-more-view">
<u-loadmore v-show="partsList.length > 0" status="nomore" bgColor="#F4F5F7"> <u-loadmore v-show="partsList.length > 0" status="nomore" bgColor="#F4F5F7">
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
@submit="$u.throttle(handleSubmit, 500)" /> @submit="$u.throttle(handleSubmit, 500)" />
</view> </view>
</template> </template>
<view class="fixed-button" v-if="!showBounce"> <view class="fixed-button" v-show="!showBounce">
<ApplyButton :type="buttonType" @click="handleClickApply"/> <ApplyButton :type="buttonType" @click="handleClickApply"/>
</view> </view>
</view> </view>
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
} }
}, },
customStyle() { customStyle() {
return 'background-color: #F4F5F7;padding: 0;' return 'background-color: #F4F5F7;padding: 0rpx;'
}, },
searchButtonText() { searchButtonText() {
return this.searchedKeyword == this.keyword && this.keyword ? '取消' : '搜索' return this.searchedKeyword == this.keyword && this.keyword ? '取消' : '搜索'
...@@ -137,7 +137,10 @@ ...@@ -137,7 +137,10 @@
this.searchedKeyword = this.keyword this.searchedKeyword = this.keyword
this.$u.api.reserveList(param).then((res) => { this.$u.api.reserveList(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
for(var item of res.data) {
item.max = item.quantity
}
this.partsList = [] this.partsList = []
let list = res.data || [] let list = res.data || []
for (var item of list) { for (var item of list) {
...@@ -179,6 +182,9 @@ ...@@ -179,6 +182,9 @@
}, },
handleChange(index) { handleChange(index) {
this.partsList[index].selected = !this.partsList[index].selected this.partsList[index].selected = !this.partsList[index].selected
},
handleNumChange(value, index) {
this.partsList[index].quantity = value
}, },
handleSubmit() { handleSubmit() {
const getSelected = (element) => { const getSelected = (element) => {
......
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
<view class="card"> <view class="card">
<view class="header" v-if="showTimeView"> <view class="header" v-if="showTimeView">
<view class="header-left-view"> <view class="header-left-view">
<image class="bottom-tag-view" :src="tagImage"></image> <u-icon name="clock" margin-left="10" custom-prefix="wxh"
<view class="tip-text" :style="{'color': countColor}">{{tipText}}</view> :color="countColor" size="40" :label="tipText" label-size="32"
</view> :label-color="countColor" :custom-style="{'font-weight': 'bold'}" />
</view>
<!-- 倒计时 --> <!-- 倒计时 -->
<view class="title"> <view class="title">
<u-count-down :timestamp="timestamp" font-size="28" show-days separator="zh" separator-size="32" height="40" <u-count-down :timestamp="timestamp" font-size="28" show-days separator="zh" separator-size="32" height="40"
...@@ -217,7 +218,7 @@ ...@@ -217,7 +218,7 @@
image: 'peijian.png', image: 'peijian.png',
show: this.allowFeedback, show: this.allowFeedback,
disabled: false, disabled: false,
count: 3, count: 0,
id: 4 id: 4
}, },
{ {
...@@ -238,15 +239,6 @@ ...@@ -238,15 +239,6 @@
wenjianImage() { wenjianImage() {
return process.uniEnv.qn_base_url + 'wenjian.png' return process.uniEnv.qn_base_url + 'wenjian.png'
}, },
tagImage() {
return this.timeout ? this.chaoshiImage : this.shengyuImage
},
chaoshiImage() {
return process.uniEnv.qn_base_url + 'chaoshi-red.png'
},
shengyuImage() {
return process.uniEnv.qn_base_url + 'shenyu-blue.png'
},
types() { types() {
return { return {
'waitAccept': 0, // 待接单、待抢单 'waitAccept': 0, // 待接单、待抢单
...@@ -667,7 +659,7 @@ ...@@ -667,7 +659,7 @@
let res = await this.$u.api.applyList({ let res = await this.$u.api.applyList({
'pageSize': 1000, 'pageSize': 1000,
'pageNumbr': 1, 'pageNumbr': 1,
'status': -1, // -1 全部,0 新申请,15 待收件,30 待返件,31 返件中 // 'status': null, // -不传值 全部 待签收 15 待发货 10 待审核 1 已取消 -1 已驳回 -2 已签收 20
'workOrderId': this.order.orderId 'workOrderId': this.order.orderId
}) })
if(res && res.code == 200) { if(res && res.code == 200) {
...@@ -915,12 +907,10 @@ ...@@ -915,12 +907,10 @@
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) { 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 break
break
}
} }
} }
} else { } else {
...@@ -1031,17 +1021,7 @@ ...@@ -1031,17 +1021,7 @@
.header-left-view { .header-left-view {
display: flex; display: flex;
align-items: center; align-items: center;
.bottom-tag-view {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
.tip-text {
font-size: 32rpx;
font-weight: bold;
color: #2272FF;
}
} }
} }
} }
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<view class="file-row" v-for="(item, index) in list" :key="index"> <view class="file-row" v-for="(item, index) in list" :key="index">
<view class="file-left"> <view class="file-left">
<view class="file-name"> <view class="file-name">
<u-icon class="item-icon" name="doc" custom-prefix="wxh" size="52"></u-icon> <u-icon class="item-icon" name="doc" custom-prefix="wxh" size="52" color="#2272FF"></u-icon>
<!-- 文件后缀的首字母,大写 --> <!-- 文件后缀的首字母,大写 -->
<view class="file-format-text">{{formatText(item.name)}}</view> <view class="file-format-text">{{formatText(item.name)}}</view>
</view> </view>
......
...@@ -31,14 +31,6 @@ ...@@ -31,14 +31,6 @@
</view> </view>
<view class="card address"> <view class="card address">
<view class="title">收件信息</view> <view class="title">收件信息</view>
<view class="subsection">
<u-subsection
:list="siteTypes" :current="curType"
:bold="false" font-size="26" height="76"
active-color="#FFFFFF" inactive-color="#333333"
bg-color="#FFFFFF" button-color="#2272FF"
@change="typeChange" />
</view>
<view class="body"> <view class="body">
<w-address :info="addressInfo" @editSite="editSite" /> <w-address :info="addressInfo" @editSite="editSite" />
</view> </view>
...@@ -66,12 +58,8 @@ export default { ...@@ -66,12 +58,8 @@ export default {
parts: [], parts: [],
disabled: false, disabled: false,
remark: '', remark: '',
siteTypes: [{name: '我的地址'}, {name: '客户地址'}],
curType: 0, curType: 0,
mine: { addressInfo: {
name: '', mobile: '', address: '', region: []
},
customer: {
name: '', mobile: '', address: '', region: [] name: '', mobile: '', address: '', region: []
}, },
}; };
...@@ -90,9 +78,6 @@ export default { ...@@ -90,9 +78,6 @@ export default {
fontWeight: 600, fontWeight: 600,
} }
}, },
addressInfo() {
return this.curType ? this.customer : this.mine
},
}, },
onLoad(e) { onLoad(e) {
this.orderId = e && Number(e.orderId) || 0 this.orderId = e && Number(e.orderId) || 0
...@@ -101,20 +86,14 @@ export default { ...@@ -101,20 +86,14 @@ export default {
}, },
methods: { methods: {
initData() { initData() {
this.loadMineAddress() this.loadAddress()
this.loadOrderInfo() this.loadOrderInfo()
this.parts = [
{part_id: 15866, name: '挚达-沃尔沃-充电桩', quantity: 2},
{part_id: 15867, name: '直达充电桩', quantity: 1},
{part_id: 15868, name: '郭小清-物料配件', quantity: 0},
{part_id: 2010, name: '通用品牌配件测试', quantity: 100}
]
}, },
loadMineAddress() { loadAddress() {
this.$u.api.getSiteAddress().then((res) => { this.$u.api.getSiteAddress().then((res) => {
if(res.code == 200 && res.data) { if(res.code == 200 && res.data) {
this.mine.address = res.data.address this.addressInfo.address = res.data.address
this.mine.region = [ this.addressInfo.region = [
res.data.provinceName, res.data.provinceName,
res.data.cityName, res.data.cityName,
res.data.districtName res.data.districtName
...@@ -126,37 +105,24 @@ export default { ...@@ -126,37 +105,24 @@ export default {
this.$u.api.orderDetail({}, this.orderId).then((res) => { this.$u.api.orderDetail({}, this.orderId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.order = res.data this.order = res.data
this.initCustomer() this.initAddressInfo()
} else { } else {
console.log(res.message, "获取订单详情失败!"); console.log(res.message, "获取订单详情失败!");
} }
}); });
}, },
initCustomer() { initAddressInfo() {
if(this.$u.test.isEmpty(this.order)) { if(this.$u.test.isEmpty(this.order)) {
this.customer = {name: '', mobile: '', address: '', region: []} this.addressInfo.name = ''
this.addressInfo.mobile = ''
} else { } else {
this.mine.name = this.order.maintainWorkerName this.addressInfo.name = this.order.maintainWorkerName
this.mine.mobile = this.order.maintainWorkerPhone this.addressInfo.mobile = this.order.maintainWorkerPhone
// this.applyType = this.order.inGuaranteePeriod == 'Y' ||
this.customer = {
name: this.order.contactName,
mobile: this.order.contactPhone,
address: this.order.contactAddress,
region: [
this.order.contactProvinceText,
this.order.contactCityText,
this.order.contactCommunityText,
],
}
} }
}, },
qnFile(src) { qnFile(src) {
return process.uniEnv.qn_base_url + src return process.uniEnv.qn_base_url + src
}, },
typeChange(index) {
this.curType = index
},
editSite() { editSite() {
this.$u.route({ this.$u.route({
url: "pages/mine/address/addSite", url: "pages/mine/address/addSite",
...@@ -170,15 +136,14 @@ export default { ...@@ -170,15 +136,14 @@ export default {
}) })
}, },
updateSite(site) { updateSite(site) {
if(this.curType) { this.addressInfo = site
this.customer = site
} else {
this.mine = site
}
}, },
addParts() { addParts() {
this.$u.route({ this.$u.route({
url: "pages/parts/addParts" url: "pages/parts/addParts",
params: {
categaryId: this.order.categoryId
}
}) })
}, },
updateParts(parts) { updateParts(parts) {
...@@ -309,15 +274,6 @@ export default { ...@@ -309,15 +274,6 @@ export default {
.parts { .parts {
} }
.address { .address {
.subsection {
margin: -6rpx 0 34rpx 0;
padding: 0 129rpx;
/deep/ .u-subsection {
.u-item-bg {
border-radius: 32rpx !important;
}
}
}
.body { .body {
border-top: 2rpx solid #F4F5F7; border-top: 2rpx solid #F4F5F7;
padding-top: 10rpx; padding-top: 10rpx;
......
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