调整项目框架
This commit is contained in:
@ -5,8 +5,8 @@
|
||||
<view class="top_left">
|
||||
工单号 <text class="padd_left12">{{form.order_sn}}</text>
|
||||
</view>
|
||||
<view class="top_right font13">
|
||||
{{form.review_status_label}}
|
||||
<view class="top_right font12">
|
||||
{{form.active_status_label}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_content">
|
||||
@ -21,7 +21,7 @@
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">工单耗时</text>
|
||||
<text class="data">10h</text>
|
||||
<text class="data">{{form.processing_time}}</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">加工规格</text>
|
||||
@ -29,11 +29,11 @@
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">规格料</text>
|
||||
<text class="data">13.01m³</text>
|
||||
<text class="data">{{form.cube}}m³</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">生产负责</text>
|
||||
<text class="data">张三</text>
|
||||
<text class="data">{{form.creator_name}}</text>
|
||||
</view>
|
||||
<view class="content_row">
|
||||
<text class="name">加工等级</text>
|
||||
@ -49,7 +49,22 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_right">
|
||||
|
||||
<progressBar :total="100" :val="form.progress_rate" title="" />
|
||||
</view>
|
||||
<view class="progressView">
|
||||
<view class="circle-progress">
|
||||
<view class="progressBg">
|
||||
<view class="progressBox">
|
||||
<view class="percentage font22">
|
||||
{{form.yield_rate}}%
|
||||
</view>
|
||||
<view class="title font12">
|
||||
出材率
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="circle-progress__bar" :style="'--progress:'+form.yield_rate+'%'"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -64,16 +79,17 @@
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
console.log(option)
|
||||
this.detailData(option.id)
|
||||
},
|
||||
onShow(){
|
||||
// this.detailData()
|
||||
|
||||
},
|
||||
onReady() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
detailData(id){
|
||||
this.$api.postFuncLoading('/order.info',{id:id}).then(res=>{
|
||||
console.log(res.data)
|
||||
this.form = res.data
|
||||
})
|
||||
},
|
||||
@ -83,11 +99,18 @@
|
||||
|
||||
<style lang="scss">
|
||||
.list_top{
|
||||
.top_right{background: #243168;border-radius: 4px 4px 4px 4px;width: 46px;height: 20px;text-align: center;}
|
||||
.top_right{background: #243168;border-radius: 4px;padding: 3px 10px; text-align: center;display: inline-block;}
|
||||
}
|
||||
.list_content{
|
||||
.list_content{
|
||||
.content_row{display: flex;padding:6px 0;
|
||||
.name{width: 90px;}
|
||||
.name{width: 90px;font-weight: bold;}
|
||||
}
|
||||
.content_right{padding: 6px 0;}
|
||||
.progressView{
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right:12px;
|
||||
z-index: 20;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,87 +1,162 @@
|
||||
<template>
|
||||
<!-- 生产工单 -->
|
||||
<view class="page_padding">
|
||||
<view v-for="(item,index) in list" :key="index" class="detail_list contentboxsty font13">
|
||||
<view @click="toDetail(item.id)">
|
||||
<view class="list_top">
|
||||
<view class="top_left">
|
||||
工单号:{{item.order_sn}}
|
||||
<view class="page_padding columnFlex">
|
||||
<view class="headerView" :class="headerFixed?'headerViewFixed':''">
|
||||
<searchView placeholder=" 搜索工单" />
|
||||
</view>
|
||||
<view class="flexBox">
|
||||
<!-- <scroll-view scroll-y="true" class="scrollView"> -->
|
||||
<view v-for="(item,index) in list" :key="index" class="detail_list contentboxsty font13">
|
||||
<view @click="toDetail(item.id)">
|
||||
<view class="list_top">
|
||||
<view class="top_left">
|
||||
工单号:{{item.order_sn}}
|
||||
</view>
|
||||
<view class="top_right">
|
||||
工单详情 <text class="arrow iconfont icon-gengduo"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top_right">
|
||||
工单详情 <text class="iconfont icon-gengduo"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_content font13">
|
||||
<view class="list_centre">
|
||||
<view class="centre_left">
|
||||
<view class="">
|
||||
算法出材率
|
||||
<view class="list_content font13">
|
||||
<view class="list_centre">
|
||||
<view class="centre_left">
|
||||
<view class="name font_bold">
|
||||
算法出材率
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.algorithm && item.algorithm!=''?item.algorithm+'':'0'}}%
|
||||
</view>
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.algorithm}}%
|
||||
<view class="centre_left">
|
||||
<view class="name font_bold">
|
||||
实际出材率
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.reality && item.reality!=''?item.reality:'0'}}%
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="centre_left">
|
||||
<view class="">
|
||||
实际出材率
|
||||
<view class="list_below">
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text class="name">状态</text>
|
||||
<text class="text status">{{item.active_status_label}}</text>
|
||||
</view>
|
||||
<view class="row_right">
|
||||
<text class="name">加工规格</text>
|
||||
<text class="text">{{item.order_spec}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="percentage font24">
|
||||
{{item.reality}}%
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text class="name">生产开始</text>
|
||||
<text class="text">{{item.plan_date}}</text>
|
||||
</view>
|
||||
<view class="row_right">
|
||||
<text class="name">工单耗时</text>
|
||||
<text class="text">{{item.progress_rate}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text class="name">工单数量</text>
|
||||
<text class="text">{{item.order_number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_below">
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text>状态:</text>
|
||||
<text>{{item.review_status_label}}</text>
|
||||
</view>
|
||||
<view class="row_right">
|
||||
<text>加工规格:</text>
|
||||
<text>{{item.order_spec}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text>生产开始:</text>
|
||||
<text>{{item.plan_date}}</text>
|
||||
</view>
|
||||
<view class="row_right">
|
||||
<text>工单耗时:</text>
|
||||
<text>{{item.timeConsuming}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row_left">
|
||||
<text>工单数量:</text>
|
||||
<text>{{item.order_number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<loadMore :noData="loadParams.noData" :loading="loadParams.loading" :loadEnd="loadParams.loadEnd" />
|
||||
<!-- </scroll-view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
<script>
|
||||
export default {
|
||||
components:{
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list:[]
|
||||
return {
|
||||
headerFixed:false,
|
||||
list:[],
|
||||
params:{
|
||||
page:1,
|
||||
pageSize:10,
|
||||
},
|
||||
loadParams:{
|
||||
noData:false,
|
||||
loading:false,
|
||||
loadEnd:false
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
this.listData();
|
||||
|
||||
},
|
||||
onReady() {
|
||||
this.listData();
|
||||
},
|
||||
onPageScroll(e){
|
||||
if(e.scrollTop>30){
|
||||
this.headerFixed = true;
|
||||
}else{
|
||||
this.headerFixed = false;
|
||||
}
|
||||
},
|
||||
// 上拉刷新
|
||||
onPullDownRefresh(){
|
||||
this.params.page = 1;
|
||||
this.listData(2);
|
||||
},
|
||||
// 加载下一页
|
||||
onReachBottom(){
|
||||
if(!(this.loadParams.loadEnd || this.loadParams.noData)){
|
||||
this.loadParams.loading = true;
|
||||
this.params.page ++;
|
||||
this.listData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
listData(){
|
||||
this.$api.postFuncLoading('/order.list',{page: 1,pageSize: 15}).then(res=>{
|
||||
this.list = res.data.rows
|
||||
listData(type=1){
|
||||
if(this.params.page == 1){
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
}
|
||||
this.$api.request('/order.list',this.params).then(res=>{
|
||||
console.log(res,566)
|
||||
if(type ==2){
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
setTimeout(function () {
|
||||
uni.hideLoading();
|
||||
}, 200);
|
||||
|
||||
this.loadParams.loading = false;
|
||||
if(res.data.rows.length ==0 && this.params.page == 1){
|
||||
this.loadParams.noData = true;
|
||||
}
|
||||
if(res.data.rows.length>0 && res.data.rows.length < this.params.pageSize){
|
||||
this.loadParams.loadEnd = true;
|
||||
}
|
||||
if(this.params.page == 1){
|
||||
this.list = res.data.rows;
|
||||
}else{
|
||||
this.list = this.list.concat(res.data.rows);
|
||||
}
|
||||
|
||||
}).catch(err=>{
|
||||
console.log('err',err)
|
||||
setTimeout(function () {
|
||||
uni.hideLoading();
|
||||
}, 200);
|
||||
})
|
||||
},
|
||||
//跳转工单详情
|
||||
toDetail(id){
|
||||
console.log(id)
|
||||
uni.navigateTo({
|
||||
url:'/pages/production/productionDetail?id='+id
|
||||
})
|
||||
@ -90,16 +165,34 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.detail_list{
|
||||
<style scoped lang="scss">
|
||||
.page_padding{
|
||||
padding-top: 0;
|
||||
}
|
||||
.detail_list{
|
||||
.list_centre{display: flex;text-align: center;padding-bottom: 10px;
|
||||
view{flex: 1;}
|
||||
.percentage{color: #00B68D;}
|
||||
.percentage{color: $uni-text-color-primary;margin: 10px 0 0 0;}
|
||||
}
|
||||
.list_below{padding-bottom: 12px;
|
||||
.row{display: flex;padding-top: 10px;
|
||||
.row_left{ white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
|
||||
view{flex: 1;}
|
||||
.row_left{
|
||||
white-space: nowrap;overflow: hidden;text-overflow: ellipsis;
|
||||
padding-right: 4px;
|
||||
}
|
||||
.row_right{
|
||||
white-space: nowrap;overflow: hidden;text-overflow: ellipsis;
|
||||
padding-left: 4px;
|
||||
}
|
||||
view{flex: 1;}
|
||||
.row_left .name,.row_right .name{
|
||||
display: inline-block;
|
||||
width: 65px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.status{
|
||||
color: $uni-text-color-warning;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user