You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
3.9 KiB
152 lines
3.9 KiB
<template> |
|
<view> |
|
<view class="card" v-for="(item,index) in list" :key="index"> |
|
<view class="card-left"> |
|
<view class="card-up-list"> |
|
<view class="card-up-list-list"> |
|
<view>物料名称:</view><text>{{item.product_name}}</text> |
|
</view> |
|
<view class="card-right" @tap="open(item.plan_id)"> |
|
人员统计 |
|
</view> |
|
</view> |
|
<view class="card-up-list"> |
|
<view class="card-up-list-list"> |
|
<view>物料编号:</view><text>{{item.product_number}}</text> |
|
</view> |
|
</view> |
|
<view class="card-dow-list"> |
|
<view class="card-up-list-list"> |
|
<view>规格:</view><text>{{item.product_size}}</text> |
|
</view> |
|
<view class="card-up-list-list"> |
|
<view>产线:</view><text>{{item.line_title}}</text> |
|
</view> |
|
</view> |
|
</view> |
|
<view class="btn-grounp"> |
|
<view v-if="item.status==0||item.status==2" @tap="openLine(item.plan_id)">开线</view> |
|
<view v-if="item.status==1" class="btn-tx" @tap="stopLine(item)">停线</view> |
|
<view v-if="item.status==0" class="btn-xx" @tap="offLine()">下线</view> |
|
<view class="btn-blp" @tap="badProduct()">不良品统计</view> |
|
<view class="btn-back" @tap="rework()">返修</view> |
|
</view> |
|
</view> |
|
<uni-popup ref="popup" type="center"> |
|
<view class="card-pop"> |
|
<picker @change="bindline" :value="froms.frequency" :range="frequency"> |
|
<view class="pop-list"> |
|
<text>班次:</text> |
|
<view class="right-pic"> |
|
<text>{{frequency[froms.frequency]}}</text> |
|
<image src="../../static/next.png"></image> |
|
</view> |
|
</view> |
|
</picker> |
|
<view class="pop-list"> |
|
<text>上线人数:</text> |
|
<input type="number" v-model="froms.in_line" placeholder="请输入上线人数" /> |
|
</view> |
|
<view class="pop-list"> |
|
<text>工时投入:</text> |
|
<input type="number" v-model="froms.peoples" placeholder="请输入工时投入" /> |
|
</view> |
|
<picker @change="bindStatus" :value="froms.status" :range="status"> |
|
<view class="pop-list"> |
|
<text>状态:</text> |
|
<view class="right-pic"> |
|
<text>{{status[froms.frequency]}}</text> |
|
<image src="../../static/next.png"></image> |
|
</view> |
|
</view> |
|
</picker> |
|
<view class="submit" @tap="tjrsBtn()">提交</view> |
|
</view> |
|
</uni-popup> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
import { |
|
firstCheckLists, |
|
openLine, |
|
trtj |
|
} from "../../api/user.js"; |
|
export default { |
|
onLoad() { |
|
this.getData() |
|
}, |
|
data() { |
|
return { |
|
list:[], |
|
status:["冲压","喷涂"], |
|
frequency:["夜班", "白班"], |
|
froms:{ |
|
plan_id:'', |
|
in_line:'', |
|
peoples:'', |
|
status:'', |
|
frequency:'' |
|
} |
|
}; |
|
},methods:{ |
|
bindline: function(e) { |
|
this.froms.frequency = e.target.value |
|
}, |
|
bindStatus: function(e) { |
|
this.froms.status = e.target.value+1 |
|
}, |
|
openLine(plan_id){ |
|
openLine({id:plan_id}).then(res=>{ |
|
this.$functions.sucess("操作成功").then({ |
|
|
|
},this.getData()); |
|
|
|
}) |
|
}, |
|
getData(){ |
|
firstCheckLists({type:1}).then(res => { |
|
this.list = res; |
|
}) |
|
}, |
|
stopLine(item){ |
|
uni.navigateTo({ |
|
url: `../stopLine/stopLine?planInfo=${encodeURIComponent(JSON.stringify(item))}` |
|
}); |
|
}, |
|
offLine(){ |
|
uni.navigateTo({ |
|
url: '../offLine/offLine' |
|
}); |
|
}, |
|
badProduct(){ |
|
uni.navigateTo({ |
|
url: '../badProduct/badProduct' |
|
}); |
|
} |
|
, |
|
rework(){ |
|
uni.navigateTo({ |
|
url: '../rework/rework' |
|
}); |
|
}, |
|
open(e){ |
|
|
|
this.froms.plan_id=e; |
|
console.log("id",this.froms) |
|
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center'] |
|
this.$refs.popup.open('center') |
|
}, |
|
tjrsBtn(){ |
|
|
|
trtj(this.froms).then(res=>{ |
|
this.$refs.popup.close('center') |
|
}) |
|
} |
|
} |
|
} |
|
</script> |
|
|
|
<style lang="scss"> |
|
@import "./index.scss"; |
|
</style>
|
|
|