Commit 8e97548b authored by Morson's avatar Morson

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

parents d3d0d469 c612caba
...@@ -36,6 +36,10 @@ let partsApiFun = function (vm) { ...@@ -36,6 +36,10 @@ let partsApiFun = function (vm) {
* 查询自己的备件仓 * 查询自己的备件仓
*/ */
let getMyReserve = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/items/reserve', params); let getMyReserve = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/items/reserve', params);
/**
* 查询工单的配件明细
*/
let getWorkOrderParts = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/items/workOrder/', params);
const partsApi = { const partsApi = {
getSiteAddress, getSiteAddress,
...@@ -44,7 +48,8 @@ let partsApiFun = function (vm) { ...@@ -44,7 +48,8 @@ let partsApiFun = function (vm) {
getBrandList, getBrandList,
getPartsList, getPartsList,
applyParts, applyParts,
getMyReserve getMyReserve,
getWorkOrderParts
} }
return partsApi return partsApi
} }
......
<!-- ******************* 配件选择 ******************* --> <!-- ******************* 配件选择 ******************* -->
<template> <template>
<view class="complete-part"> <view>
<view v-if="status === 1"> <view class="list u-flex u-row-between">
<adjust-parts v-for="(item, index) in lists" :key="index" :info="item" @change="partsChange($event, index)" :disabled="disabled"></adjust-parts> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
</view> <view class="u-m-r-20">{{item.fieldsTitle}}</view>
<view class="u-flex select-part" v-else-if="status === 2"> <view class="u-flex-1 add-parts" @click="toParts">
<view class="img"> 添加配件<u-icon name="arrow-right" color="#2979ff" size="30"></u-icon>
<image src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" class="part-icon" /> </view>
</view> </view>
<view class="u-flex content"> <view class="complete-part">
<text class="title">暂无配件信息</text> <view v-if="status === 1">
<text class="desc">可选择备件仓配件</text> <adjust-parts v-for="(item, index) in lists" :key="index" :info="item" @change="partsChange($event, index)" :disabled="disabled"></adjust-parts>
</view> </view>
<view class="btn"> <view class="u-flex select-part" v-else-if="status === 2">
<u-button shape="circle" :custom-style="customStyle"> <view class="img">
去选择 <image :src="noPartsImage" class="part-icon" />
</u-button> </view>
<view class="u-flex content">
<text class="title">暂无配件信息</text>
<text class="desc">可选择备件仓配件</text>
</view>
<view class="btn">
<u-button shape="circle" :custom-style="customStyle" @click="toParts">
去选择
</u-button>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -31,9 +40,9 @@ ...@@ -31,9 +40,9 @@
}, },
mixins: [arrMixin], mixins: [arrMixin],
props: { props: {
status: { orderId: {
type: Number, type: String,
default: 1 default: ''
} }
}, },
data() { data() {
...@@ -42,18 +51,19 @@ ...@@ -42,18 +51,19 @@
{ {
id: 1, id: 1,
name: "正泰漏保", name: "正泰漏保",
num: 1, quantity: 1,
min: 1, min: 1,
max: 100, max: 100,
}, },
{ {
id: 1, id: 1,
name: "挚达广汽充电桩", name: "挚达广汽充电桩",
num: 3, quantity: 3,
min: 1, min: 1,
max: 5, max: 5,
}, },
] ],
status: 2
} }
}, },
computed: { computed: {
...@@ -64,31 +74,65 @@ ...@@ -64,31 +74,65 @@
'color': '#2272FF', 'color': '#2272FF',
'font-size': '32rpx', 'font-size': '32rpx',
} }
} },
mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png'
},
noPartsImage() {
return process.uniEnv.qn_base_url + 'no_parts.png'
},
},
created() {
this.getWorkOrderParts()
}, },
methods: { methods: {
getWorkOrderParts() {
const params = {
workOrderId: this.orderId
}
this.$u.getWorkOrderParts(params).then(res => {
if (res.code === 200) {
const data = res.data
this.status = data.receivedItems.length > 0 ? 1 : 2
this.lists = data.receivedItems || []
}
})
},
partsChange(val, index) { partsChange(val, index) {
console.log("val", val, index) console.log("val", val, index)
this.$set(this.lists[index], 'quantity', val)
}, },
toParts() { toParts() {
// uni.navigateTo({ uni.navigateTo({
// url: '/pages/' url: '/pages/order/parts'
// }) })
}, },
toHandle() { handle(val) {
console.log("val", val)
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.required {
padding-right: 10rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #fa3534;
}
.add-parts {
color: #2272FF;
text-align: right;
}
.complete-part { .complete-part {
.select-part { .select-part {
align-items: center; align-items: center;
height: 240rpx; height: 240rpx;
.img { .img {
margin-right: 20rpx; display: flex;
align-items: center;
margin-right: 30rpx;
.part-icon { .part-icon {
width: 110rpx; width: 110rpx;
height: 110rpx; height: 110rpx;
...@@ -113,7 +157,6 @@ ...@@ -113,7 +157,6 @@
text-align: left; text-align: left;
color: #999; color: #999;
font-size: 26rpx; font-size: 26rpx;
margin-top: 20rpx;
margin-right: auto; margin-right: auto;
} }
} }
......
<template> <template>
<view class="no-order-view" :style="customStyle"> <view class="no-order-view" :style="customStyle">
<image class="no-order-image" :src="wudingdanImage"></image> <image class="no-order-image" :src="wudingdanImage"></image>
<text>当前暂无订单</text> <text>{{text}}</text>
</view> </view>
</template> </template>
......
<template> <template>
<!-- 已申请配件cell --> <!-- 已申请配件cell -->
<view class="applied-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> <view>
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.applied-cell { .return-cell {
padding: 30rpx; padding: 30rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 12rpx; border-radius: 12rpx;
......
<template>
<!-- 已申请配件cell -->
<view class="applied-cell" @click="handleClick">
<view class="title-view">
<text class="title-text">{{title}}</text>
<view>
<text>返件时间:</text>
<text>{{info.createTime}}</text>
</view>
</view>
<view class="line-view"></view>
<view class="list-content">
<view class="list-item" v-for="(item, index) in info.items" :key="index">
<SpareCell :item="item"/>
</view>
</view>
<view class="line-view"></view>
<view class="info-item">
<view>
<text>返件编号:</text>
<text @longpress="handleLongpress">{{info.number}}</text>
</view>
<text class="copy-view" @click="$u.throttle(handleLongpress, 500)">复制</text>
</view>
<view class="line-view"></view>
<view class="bottom-view">
<view class="total-view">
<text>合计:</text>
<text class="amount-view">{{total}}</text>
<text>件</text>
</view>
</view>
</view>
</template>
<script>
import SpareCell from "@/components/parts/spareCell.vue"
export default {
components: {
SpareCell
},
props: {
info: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
}
},
computed: {
title() {
return this.info.finished ? '已返件' : '返件中'
},
total() { // 合计
var i = 0
for (var item of this.info.items) {
i += item.quantity
}
return i
},
},
methods: {
handleLongpress() { // 长按复制单号
uni.setClipboardData({
data: this.info.number,
success: function () {
console.log('success');
}
})
}
}
}
</script>
<style lang="scss" scoped>
.applied-cell {
padding: 30rpx;
background-color: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
.title-view{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 26rpx;
color: #333333;
.title-text {
font-size: 36rpx;
font-weight: bold;
}
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
margin-top: 20rpx;
}
.list-content {
margin-top: 40rpx;
margin-bottom: 40rpx;
.list-item {
margin-bottom: 30rpx;
}
}
.info-item {
margin-top: 24rpx;
margin-bottom: 24rpx;
color: #333333;
font-size: 26rpx;
display: flex;
justify-content: space-between;
align-items: center;
.detail-left-view {}
.copy-view {
color: #2272FF;
padding-left: 30rpx;
}
}
.bottom-view {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 24rpx;
margin-bottom: 4rpx;
.total-view {
font-size: 32rpx;
font-weight: bold;
color: #333333;
.amount-view {
color: #2272FF;
padding-right: 10rpx;
}
}
}
}
</style>
<template>
<view class="spare-item">
<view class="left-view">
<u-checkbox v-if="showChecked" icon-size="28" size="40" v-model="item.selected" @change="handleChange" shape="circle"/>
<image class="image-view" :src="imageUrl"></image>
<view class="info-view">
<view class="name-text">{{item.name}}</view>
<view>{{remarkText}}</view>
</view>
</view>
<view class="count-view">x{{item.quantity}}</view>
</view>
</template>
<script>
export default {
props: {
showChecked: { // 是否显示勾选
type: Boolean,
default() {
return false
}
},
item: {
type: Object,
default() {
return {}
}
},
noteText: {
type: String,
default: ''
}
},
data() {
return {
checked: false
}
},
computed: {
remarkText() {
return this.noteText || this.item.code
// return this.info.categoryName + '-' + this.info.brandName
},
imageUrl() {
return this.item.images ? process.uniEnv.systemUrl.apiUrl + this.item.images.split(',').shift() : this.placeholderImage
},
placeholderImage() {
return process.uniEnv.qn_base_url + 'logo.png'
},
},
methods: {
handleChange() {
this.$emit('change')
}
}
}
</script>
<style lang="scss" scoped>
.spare-item {
display: flex;
// width: 100%;
justify-content: space-between;
align-items: flex-end;
// padding: 30rpx;
// background-color: #FFFFFF;
// border-radius: 12rpx;
.left-view {
display: flex;
align-items: center;
.image-view {
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
.info-view {
font-size: 24rpx;
color: #333333;
.name-text {
font-size: 32rpx;
font-weight: bold;
color: #333333;
margin-bottom: 30rpx;
}
}
}
.count-view {
font-size: 28rpx;
color: #333333;
}
}
</style>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</view> </view>
<view class="num"> <view class="num">
<u-number-box v-if="!disabled" v-model="info.quantity" :min="info.min || 0" :max="info.max || info.quantity" @change="numChange"></u-number-box> <u-number-box v-if="!disabled" v-model="info.quantity" :min="info.min || 0" :max="info.max || info.quantity" @change="numChange"></u-number-box>
<text class="nums" v-else>x{{ info.num || 1 }}</text> <text class="nums" v-else>x{{ info.quantity || 1 }}</text>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="u-flex bottom" :style="customStyle"> <view class="u-flex bottom" :style="customStyle">
<view class="select-view"> <view class="select-view">
<view class="u-flex bottom-left" v-if="showChecked"> <view class="u-flex bottom-left" v-if="showChecked">
<view class="left-list"><u-checkbox icon-size="30" size="40" v-model="checked" @change="selectAll" shape="circle"/></view> <view class="left-list"><u-checkbox icon-size="28" size="40" v-model="checked" @change="selectAll" shape="circle"/></view>
<view class="left-list">全选</view> <view class="left-list">全选</view>
</view> </view>
<view class="u-flex bottom-center"> <view class="u-flex bottom-center">
......
...@@ -300,8 +300,9 @@ ...@@ -300,8 +300,9 @@
"path": "warehouse/records", "path": "warehouse/records",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": "操作记录", "navigationBarTitleText": "出入库记录",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"disableScroll": true
} }
}, },
{ {
......
...@@ -21,16 +21,9 @@ ...@@ -21,16 +21,9 @@
</view> </view>
</view> </view>
<view class="detail-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"> <SpareCell :item="item" :noteText="noteText"/>
<image class="image-view" :src="imageUrl(item)"></image>
<view class="info-view">
<view class="name-text">{{item.name}}</view>
<view>{{noteText}}</view>
</view>
</view>
<view class="count-view">x{{item.quantity}}</view>
</view> </view>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
...@@ -59,8 +52,12 @@ ...@@ -59,8 +52,12 @@
</view> </view>
</template> </template>
<script> <script>
export default { import SpareCell from "@/components/parts/spareCell.vue"
export default {
components: {
SpareCell
},
data() { data() {
return { return {
info: { info: {
...@@ -163,7 +160,7 @@ ...@@ -163,7 +160,7 @@
}) })
}, },
imageUrl(item) { imageUrl(item) {
return item.images ? item.images.split(',').shift() : this.placeholderImage return item.images ? process.uniEnv.systemUrl.apiUrl + item.images.split(',').shift() : this.placeholderImage
}, },
handleLongpress(key, text) { // 长按复制单号 handleLongpress(key, text) { // 长按复制单号
if (key == 'orderNumber') { if (key == 'orderNumber') {
...@@ -267,45 +264,11 @@ ...@@ -267,45 +264,11 @@
} }
.list-content { .list-content {
margin-top: 40rpx; margin-top: 10rpx;
margin-bottom: 40rpx; margin-bottom: 10rpx;
.list-item { .list-item {
display: flex; margin-bottom: 30rpx;
width: 100%;
margin-right: 30rpx;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 40rpx;
.left-view {
display: flex;
align-items: flex-start;
.image-view {
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
.info-view {
font-size: 24rpx;
color: #333333;
.name-text {
font-size: 32rpx;
font-weight: bold;
color: #333333;
margin-bottom: 30rpx;
}
}
}
.count-view {
font-size: 28rpx;
color: #333333;
}
} }
} }
......
<template> <template>
<view class="ware-wrap"> <view class="ware-wrap">
<w-navbar title="" :background="{backgroundColor: '#F4F5F7'}"></w-navbar> <u-navbar back-icon-color="#333333" background="#FFFFFF" title="出入库记录" titleColor="#333333"
:border-bottom="false" title-bold></u-navbar>
<!-- <view class="content"> <!-- <view class="content">
<view class="panel"> <view class="panel">
<view class="title">物料明细</view> <view class="title">物料明细</view>
...@@ -61,22 +62,22 @@ ...@@ -61,22 +62,22 @@
}, },
computed: {}, computed: {},
onLoad() { onLoad() {
getApp().trackPage('我的仓库-操作记录') getApp().trackPage('出入库记录')
this.getData(); this.getData();
}, },
methods: { methods: {
getData() { getData() {
let self = this let self = this
self.initDetails() // self.initDetails()
self.loadAccess() self.loadAccess()
}, },
async initDetails() { // async initDetails() {
let self = this // let self = this
let res = await self.$u.api.listBystock() // let res = await self.$u.api.listBystock()
if(res && res.code == 200) { // if(res && res.code == 200) {
self.details = res.data // self.details = res.data
} // }
}, // },
loadRecord() { loadRecord() {
if(this.status == 'nomore') return ; if(this.status == 'nomore') return ;
this.status = 'loading'; this.status = 'loading';
...@@ -109,13 +110,15 @@ ...@@ -109,13 +110,15 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.ware-wrap { .ware-wrap {
background-color: #F4F5F7; background-color: #FFFFFF;
.content { // .content {
padding: 34rpx 30rpx; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.panel { .panel {
padding: 0 30rpx 44rpx 30rpx;
height: 100%;
.title { .title {
margin-bottom: 30rpx; margin-bottom: 30rpx;
font-size: 32rpx; font-size: 32rpx;
...@@ -151,7 +154,7 @@ ...@@ -151,7 +154,7 @@
} }
} }
} }
} // }
} }
} }
.width-504 { .width-504 {
......
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
<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="search-view"> <view class="search-view">
<view class="search-btn" @click="handleClickSearch"> <u-search v-model="keyword" :action-text="searchButtonText" @search="handleClickSearch" @clear="handleClear"
<image class="search-image" mode="widthFix" :src="sousuoImage"></image> @custom="handleClickButton" placeholder="请输入关键字" :action-style="actionStyle" placeholder-color="#999999"
<text class="search-btn-placeholder">请输入关键字</text> color="#333333" bg-color="#FFFFFF" height="72">
</view> </u-search>
<text class="search-btn-text">搜索</text> </view>
</view> <NoOrder v-if="noParts" imageName="zwdd.png" text="当前暂无返件信息" :customStyle="noPartsCustomStyle" />
<view class="tab-view">
<view v-else class="tab-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring
refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
:scroll-top="scrollTop" refresher-background="#F4F5F7" @refresherpulling="triggered = true" :scroll-top="scrollTop" refresher-background="#F4F5F7" @refresherpulling="triggered = true"
...@@ -18,10 +19,9 @@ ...@@ -18,10 +19,9 @@
<view class="loading-view" v-if="!loaded"> <view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading> <u-loading mode="flower"></u-loading>
</view> </view>
<NoOrder v-else-if="noParts" imageName="zwdd.png" text="当前暂无配件信息" :customStyle="noPartsCustomStyle" />
<template v-else> <template v-else>
<view v-for="(item, index) in partsList" :key="item.id"> <view v-for="(item, index) in partsList" :key="item.id">
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell"></AppliedCell> <ReturnCell :info="item"></ReturnCell>
</view> </view>
<view class="load-more-view"> <view class="load-more-view">
<u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 2" :status="loadStatus" <u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 2" :status="loadStatus"
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
</template> </template>
<script> <script>
import AppliedCell from "@/components/parts/appliedPartsCell.vue" import ReturnCell from "@/components/parts/returnCell.vue"
import NoOrder from "@/components/order/noOrder.vue" import NoOrder from "@/components/order/noOrder.vue"
export default { export default {
components: { components: {
AppliedCell, ReturnCell,
NoOrder NoOrder
}, },
data() { data() {
...@@ -48,7 +48,9 @@ ...@@ -48,7 +48,9 @@
pageSize: 100, pageSize: 100,
partsList: [], partsList: [],
loadStatus: 'loading', loadStatus: 'loading',
loaded: false, loaded: false,
keyword: '',
searchedKeyword: ''
}; };
}, },
computed: { computed: {
...@@ -60,6 +62,16 @@ ...@@ -60,6 +62,16 @@
}, },
noPartsCustomStyle() { noPartsCustomStyle() {
return 'margin-top: 100rpx;background-color: #F4F5F7' return 'margin-top: 100rpx;background-color: #F4F5F7'
},
searchButtonText() {
return this.searchedKeyword == this.keyword && this.keyword ? '取消' : '搜索'
},
actionStyle() {
return {
'font-size': '32rpx',
'color': '#2272FF',
'margin-left': '20rpx'
}
}, },
}, },
onLoad(e) { onLoad(e) {
...@@ -75,14 +87,17 @@ ...@@ -75,14 +87,17 @@
'pageNumbr': 1, 'pageNumbr': 1,
'items': true, 'items': true,
'type': 'new' 'type': 'new'
} }
if (this.keyword) {
param.keyword = this.keyword
}
this.searchedKeyword = this.keyword
this.$u.api.returnedParts(param).then((res) => { this.$u.api.returnedParts(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (this.pageNumber == 1) { if (this.pageNumber == 1) {
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":-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'
...@@ -109,10 +124,20 @@ ...@@ -109,10 +124,20 @@
}) })
}, },
handleClickSearch() { handleClickSearch() { // 软键盘搜索
this.reloadPartsList()
}, },
handleClear() { // 清空搜索
if (this.searchedKeyword) {
this.reloadPartsList()
}
},
handleClickButton() { // 点了搜索按钮
if (this.searchedKeyword == this.keyword) {
this.keyword = ''
}
this.reloadPartsList()
},
onRestore() { onRestore() {
this.triggered = 'restore'; // 需要重置 this.triggered = 'restore'; // 需要重置
}, },
...@@ -137,40 +162,7 @@ ...@@ -137,40 +162,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.search-view { .search-view {
display: flex; margin-bottom: 30rpx;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.search-btn {
height: 72rpx;
background-color: #ffffff;
border-radius: 36rpx;
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 {
line-height: 36rpx;
font-weight: 400;
font-size: 32rpx;
color: #2272FF;
width: 110rpx;
text-align: right;
}
} }
.tab-view { .tab-view {
......
<template> <template>
<!-- 我的备件 --> <!-- 我的备件 -->
<view class="ware-house-spare"> <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> :border-bottom="false" title-bold></u-navbar>
<view class="search-view"> <view class="search-view">
<view class="search-btn" @click="handleClickSearch"> <u-search v-model="keyword" :action-text="searchButtonText" @search="handleClickSearch" @clear="handleClear"
<image class="search-image" mode="widthFix" :src="sousuoImage"></image> @custom="handleClickButton" placeholder="请输入关键字" :action-style="actionStyle" placeholder-color="#999999"
<text class="search-btn-placeholder">请输入关键字</text> color="#333333" bg-color="#FFFFFF" height="72">
</view> </u-search>
<text class="search-btn-text">搜索</text>
</view>
<view class="title-view">
<view>备件列表</view>
<view class="bounce-view" v-if="!showBounce" @click="showBounce = true">退件</view>
<u-button v-else :custom-style="buttonStyle" shape="circle" @click="handleClickBounce">退件</u-button>
</view> </view>
<view class="tab-view"> <NoOrder v-if="noParts" imageName="zwdd.png" text="当前暂无备件信息" :customStyle="noPartsCustomStyle" />
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring <template v-else>
refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" <view class="title-view">
:scroll-top="scrollTop" refresher-background="#F4F5F7" @refresherpulling="triggered = true" <view>备件列表</view>
@refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top> <view class="title-right-view">
<view class="loading-view" v-if="!loaded"> <view class="bounce-view" v-if="!showBounce" @click="showBounce = true">退件</view>
<u-loading mode="flower"></u-loading> <u-button v-else :custom-style="buttonStyle" shape="circle" @click="handleClickBounce">退件 ×
</u-button>
</view> </view>
<NoOrder v-else-if="noParts" imageName="zwdd.png" text="当前暂无配件信息" :customStyle="noPartsCustomStyle" /> </view>
<template v-else> <view class="tab-view">
<view v-for="(item, index) in partsList" :key="item.id"> <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring
<AppliedCell @operate="handleOperate" :info="item" @action="handleClickCell"></AppliedCell> refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
:scroll-top="scrollTop" refresher-background="#F4F5F7" @refresherpulling="triggered = true"
@refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
<view class="loading-view" v-if="!loaded">
<u-loading mode="flower"></u-loading>
</view> </view>
<view class="load-more-view"> <template v-else>
<u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 2" :status="loadStatus" <view class="list-item" v-for="(item, index) in partsList" :key="item.id">
bgColor="#F4F5F7"></u-loadmore> <SpareCell :item="item" :noteText="noteText" :showChecked="showBounce"
</view> @change="handleChange(index)" />
</template> </view>
</scroll-view> <view class="load-more-view">
</view> <u-loadmore v-show="partsList.length > 0" status="nomore" bgColor="#F4F5F7">
<view class="bar" v-if="showBounce"> </u-loadmore>
<SubmitBar </view>
:partNum="partNum" </template>
:num="total" </scroll-view>
:btnStatus="partNum > 0" </view>
submitTxt="退件" <view class="bar" v-if="showBounce">
:allChecked="allChecked" <SubmitBar :partNum="subBarInfo.partNum" :num="subBarInfo.num" :btnStatus="subBarInfo.btnStatus"
:background="background" submitTxt="退件" :allChecked="subBarInfo.allChecked" :customStyle="customStyle" @select="allSelect"
:customStyle="customStyle" @submit="handleSubmit" />
@select="allSelect" </view>
@submit="handleSubmit" </template>
/>
</view>
</view> </view>
</template> </template>
<script> <script>
import AppliedCell from "@/components/parts/appliedPartsCell.vue" // import AppliedCell from "@/components/parts/appliedPartsCell.vue"
import NoOrder from "@/components/order/noOrder.vue" import NoOrder from "@/components/order/noOrder.vue"
import SubmitBar from "@/components/submit-bar/index" import SubmitBar from "@/components/submit-bar/index"
import SpareCell from "@/components/parts/spareCell.vue"
export default { export default {
components: { components: {
AppliedCell, // AppliedCell,
NoOrder, NoOrder,
SubmitBar SubmitBar,
SpareCell
}, },
data() { data() {
return { return {
pageNumber: 0,
pageSize: 100,
partsList: [], partsList: [],
loadStatus: 'loading', loaded: false,
loaded: false, showBounce: false,
showBounce: false keyword: '',
searchedKeyword: ''
}; };
}, },
computed: { computed: {
...@@ -81,104 +79,138 @@ ...@@ -81,104 +79,138 @@
}, },
noPartsCustomStyle() { noPartsCustomStyle() {
return 'margin-top: 100rpx;background-color: #F4F5F7' return 'margin-top: 100rpx;background-color: #F4F5F7'
}, },
buttonStyle() { buttonStyle() {
return { return {
marginRight: '10rpx', width: '100rpx',
width: '100rpx', height: '48rpx',
height: '52rpx', background: '#FFFFFF',
background: '#FFFFFF', color: '#2272FF',
color: '#2272FF', fontSize: '26rpx',
fontSize: '24rpx', }
fontWeight: '400', },
lineHeight: '52rpx' actionStyle() {
} return {
}, 'font-size': '32rpx',
partNum() { 'color': '#2272FF',
return this.partsList.filter((item) => { 'margin-left': '20rpx'
return item.selected == true }
}).length },
}, subBarInfo() {
total() { // 合计 var i = 0
var i = 0 var j = 0
for (var item of this.partsList) { for (var item of this.partsList) {
i += item.quantity if (item.selected) {
} i += item.quantity
return i j += 1
}, }
customStyle() { }
return 'background-color: #F4F5F7;padding: 0;' return {
} partNum: j,
num: i,
btnStatus: j > 0,
allChecked: j > 0 && j == this.partsList.length
}
},
customStyle() {
return 'background-color: #F4F5F7;padding: 0;'
},
searchButtonText() {
return this.searchedKeyword == this.keyword && this.keyword ? '取消' : '搜索'
},
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('我的备件页') getApp().trackPage('我的备件页')
this.reloadPartsList() this.getReserveList()
}, },
methods: { methods: {
getReserveList() { // 备件列表 getReserveList() { // 备件列表
this.pageNumber += 1 this.loaded = false
this.loaded = false var param = {}
var param = { if (this.keyword) {
'pageSize': 20, param.keyword = this.keyword
'pageNumbr': 1, }
} this.searchedKeyword = this.keyword
this.$u.api.reserveList().then((res) => {
if (res.code == 200) { this.$u.api.reserveList(param).then((res) => {
if (this.pageNumber == 1) { if (res.code == 200) {
this.partsList = [] res.data = [{
} "name": "minim in dolor",
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":"电冰箱"}] "quantity": 15128407.808330506,
let list = res.data || [] "skuId": -31990898.14022602,
for (var item of list) { "images": "mollit nisi Duis",
item.selected = false "remark": "in elit",
this.partsList.push(item) "code": "esse commodo Ut ex cillum",
} "stock": "8"
}, {
this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore' "name": "Excepteur ullamco dolore",
} else { "quantity": -16408657.848651886,
console.log(res.message); "skuId": 99507283.4197697,
} "images": "dolore velit",
this.loaded = true "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) {
item.selected = false
this.partsList.push(item)
}
} else {
console.log(res.message);
}
this.loaded = true
});
}, },
handleOperate(info) { handleClickSearch() { // 软键盘搜索
// 调接口 this.getReserveList()
// 修改info的status
// 刷新页面
},
handleClickCell(info) {
}, },
// handleClickRecords() { handleClear() { // 清空搜索
// uni.navigateTo({ if (this.searchedKeyword) {
// url: 'pages/mine/warehouse/records' this.getReserveList()
// }) }
// },
handleClickSearch() {
}, },
handleClickButton() { // 点了搜索按钮
handleClickBounce() { if (this.searchedKeyword == this.keyword) {
this.showBounce = false this.keyword = ''
}, }
allSelect() { this.getReserveList()
},
handleSubmit() {
}, },
onRestore() { handleClickBounce() {
this.triggered = 'restore'; // 需要重置 this.showBounce = false
for (var item of this.partsList) {
item.selected = false
}
}, },
reloadPartsList() { // 第一页数据 allSelect(value) {
this.pageNumber = 0 console.log(value)
this.loadStatus = 'loading' for (var item of this.partsList) {
this.getReserveList() item.selected = value
}, }
reachBottom(e) { },
if (this.loadStatus != 'loadmore') return handleChange(index) {
this.loadStatus == 'loading' this.partsList[index].selected = !this.partsList[index].selected
this.getReserveList() },
handleSubmit() {
}, },
} }
}; };
...@@ -187,77 +219,61 @@ ...@@ -187,77 +219,61 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.ware-house-spare { .ware-house-spare {
padding: 0 30rpx; padding: 0 30rpx;
height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.search-view {
display: flex; .search-view {
justify-content: space-between; margin-bottom: 30rpx;
align-items: center; }
margin-bottom: 30rpx;
.search-btn { .title-view {
height: 72rpx; display: flex;
background-color: #ffffff; justify-content: space-between;
border-radius: 36rpx; align-items: center;
color: #999999; color: #333333;
display: flex; font-weight: bold;
align-items: center; font-size: 32rpx;
width: 100%; margin: 0 10rpx 20rpx 10rpx;
padding-left: 40rpx;
.search-image { .title-right-view {
width: 36rpx; text-align: right;
height: 32rpx;
flex-shrink: 0; .bounce-view {
margin-right: 24rpx; color: #666666;
} font-size: 26rpx;
.search-btn-placeholder { font-weight: 400;
line-height: 36rpx; width: 100rpx;
font-weight: 400; height: 48rpx;
font-size: 26rpx; margin-right: 30rpx;
} line-height: 48rpx;
}
} }
.search-btn-text {
line-height: 36rpx;
font-weight: 400;
font-size: 32rpx;
color: #2272FF;
width: 110rpx;
text-align: right;
}
}
.title-view {
display: flex;
justify-content: space-between;
align-items: center;
color: #333333;
font-weight: bold;
font-size: 32rpx;
margin: 0 10rpx 20rpx 10rpx;
.bounce-view {
padding-left: 20rpx;
padding-right: 20rpx;
color: #666666;
font-size: 26rpx;
font-weight: 400;
}
} }
.tab-view { .tab-view {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
.list-item {
padding: 30rpx;
margin-bottom: 20rpx;
background-color: #FFFFFF;
border-radius: 12rpx;
}
.load-more-view { .load-more-view {
margin-bottom: 20rpx; margin-bottom: 20rpx;
}
.loading-view {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 300rpx;
position: absolute;
} }
}
.loading-view {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 300rpx;
position: absolute;
}
}
} }
</style> </style>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="class-bd"> <view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" label-position="top" <u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" label-position="top"
:prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsName != 'actualPaid' || show200" :id="`item${item.fieldsId}`"> :prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsName != 'actualPaid' || show200" :id="`item${item.fieldsId}`">
<view class="label" v-if="item.formType!=='location'&&item.formType!=='form'&&item.formType!=='label'"> <view class="label" v-if="!hiddenTitle.includes(item.formType)">
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
{{item.fieldsTitle}} {{item.fieldsTitle}}
</view> </view>
...@@ -70,9 +70,10 @@ ...@@ -70,9 +70,10 @@
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :order-id="orderId" :value='form[item.fieldsName] || ""' :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :order-id="orderId" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-service-more> </xh-service-more>
<xh-label v-else-if="item.formType==='label'" <xh-label v-else-if="item.formType==='label'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'>
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'>
</xh-label> </xh-label>
<xh-parts v-else-if="item.formType==='parts'" :order-id="orderId" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'>
</xh-parts>
</template> </template>
</u-form-item> </u-form-item>
</view> </view>
...@@ -110,6 +111,7 @@ ...@@ -110,6 +111,7 @@
import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue' import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue'
import XhServiceMore from "@/components/createCom/XhServiceMore" import XhServiceMore from "@/components/createCom/XhServiceMore"
import XhLabel from "@/components/createCom/XhLabel" import XhLabel from "@/components/createCom/XhLabel"
import XhParts from "@/components/createCom/XhParts"
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
import baseFile from '@/components/upload/index' import baseFile from '@/components/upload/index'
...@@ -139,6 +141,7 @@ ...@@ -139,6 +141,7 @@
['date', ['time','text']], ['date', ['time','text']],
['form', ['form','text']], ['form', ['form','text']],
['label', ['label','text']], ['label', ['label','text']],
['parts', ['parts','text']],
]) ])
/** /**
...@@ -209,6 +212,7 @@ ...@@ -209,6 +212,7 @@
export default { export default {
data() { data() {
return { return {
hiddenTitle: ['location', 'form', 'label', 'parts'],
orderId:0, orderId:0,
categoryId:0, categoryId:0,
orderServiceType:'', orderServiceType:'',
...@@ -273,7 +277,8 @@ ...@@ -273,7 +277,8 @@
XhServiceMeasure, XhServiceMeasure,
XhServiceMore, XhServiceMore,
XhLabel, XhLabel,
'take-photo': takePhoto XhParts,
takePhoto
}, },
mixins: [baseFile], mixins: [baseFile],
created() { created() {
......
<template> <template>
<view class="u-flex det-wrap"> <view class="u-flex det-wrap">
<view class="search">
<u-search
:clearabled="true"
:action-style="searchStyle"
bg-color="#fff"
v-model="keyword"
@custom="searchParts"
@search="searchParts"
></u-search>
</view>
<view class="content" v-if="lists.length > 0"> <view class="content" v-if="lists.length > 0">
<scroll-view style="height: 100%;" scroll-y="true"> <scroll-view style="height: 100%;" scroll-y="true">
<select-parts <select-parts
...@@ -56,16 +45,10 @@ ...@@ -56,16 +45,10 @@
}, },
data() { data() {
return { return {
lists: [], lists: []
keyword: ''
} }
}, },
computed: { computed: {
searchStyle() {
return {
color: "#2272FF"
};
},
// 配件数 // 配件数
partNum() { partNum() {
return this.lists.reduce((counter, { checked }) => checked ? counter += 1 : counter, 0) return this.lists.reduce((counter, { checked }) => checked ? counter += 1 : counter, 0)
...@@ -85,10 +68,7 @@ ...@@ -85,10 +68,7 @@
}, },
methods: { methods: {
getReserve() { getReserve() {
const params = { this.$u.api.getMyReserve().then(res => {
keyword: this.keyword
}
this.$u.api.getMyReserve(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
const data = res.data || [] const data = res.data || []
this.lists = data.map(v => { this.lists = data.map(v => {
...@@ -101,11 +81,6 @@ ...@@ -101,11 +81,6 @@
} }
}) })
}, },
// 搜索配件
searchParts(val) {
this.keyword = val
this.getReserve()
},
numChange(val, index) { numChange(val, index) {
this.$set(this.lists[index], 'quantity', val) this.$set(this.lists[index], 'quantity', val)
}, },
...@@ -128,6 +103,8 @@ ...@@ -128,6 +103,8 @@
quantity: v.quantity quantity: v.quantity
} }
}) })
prevPage.$vm.handle(lists)
this.$u.route({ type: 'back' })
console.log(lists) console.log(lists)
}, },
qnFile(src) { qnFile(src) {
......
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