|
|
|
<template>
|
|
|
|
<view>
|
|
|
|
<view class="white-card">
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">物料编号</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<text>5651145dssdffd</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">填报日期</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<text>5651145dssdffd</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<picker @change="bindline" :value="lineIndex" :range="line">
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">线别</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<text>{{line[lineIndex]}}</text>
|
|
|
|
<image class="next" src="../../static/next.png"></image>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</picker>
|
|
|
|
<picker @change="bindfrequencyIds" :value="frequencyIds" :range="frequency">
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">班次</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<text>{{frequency[frequencyIds]}}</text>
|
|
|
|
<image class="next" src="../../static/next.png"></image>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</picker>
|
|
|
|
</view>
|
|
|
|
<!-- <view class="white-card" style="margin-top: 30upx;">
|
|
|
|
<picker @change="bindReason" :value="reasonIds" :range="reason">
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">停线原因</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<text>{{reason[reasonIds]}}</text>
|
|
|
|
<image class="next" src="../../static/next.png"></image>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</picker>
|
|
|
|
</view> -->
|
|
|
|
<view class="big-titlt">产出情况填报</view>
|
|
|
|
<view class="white-card">
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">生产数量</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<input v-model="from.product_number" placeholder="请输入生产数量" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">良品数量</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<input v-model="from.ok_number" placeholder="请输入良品数量" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">返修区返修</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<input v-model="from.rework" placeholder="请输入" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">在线返修数</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<input v-model="from.in_rework" placeholder="请输入" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="list-list">
|
|
|
|
<view class="list-title">报废数量</view>
|
|
|
|
<view class="list-right">
|
|
|
|
<input v-model="from.no_number" placeholder="请输入" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<view class="submit-btn">
|
|
|
|
<button type="primary" :disabled="buttonState==false?true:false" @tap="offLine()">提交</button>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import {offline} from "../../api/index.js"
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
line:["A线","B线"],
|
|
|
|
lineIndex:0,
|
|
|
|
frequency:["白班","夜班"],
|
|
|
|
frequencyIds:0,
|
|
|
|
reason:["模具维修","设备维修","品质待定","辅料短缺","偶发停电"],
|
|
|
|
reasonIds:0,
|
|
|
|
mould:["1","2","3"],
|
|
|
|
mouldIds:0,
|
|
|
|
buttonState:true,
|
|
|
|
from:{
|
|
|
|
product_number:"",
|
|
|
|
ok_number:"",
|
|
|
|
rework:"",
|
|
|
|
no_number:"",
|
|
|
|
in_rework:"",
|
|
|
|
frequency:0,
|
|
|
|
plan_id:''
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
onLoad(e) {
|
|
|
|
this.from.plan_id=e.plan_id;
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
bindline: function(e) {
|
|
|
|
console.log('picker发送选择改变,携带值为', e.target.value)
|
|
|
|
this.lineIndex = e.target.value
|
|
|
|
},
|
|
|
|
bindfrequencyIds(e){
|
|
|
|
this.frequencyIds = e.target.value
|
|
|
|
this.from.frequency=e.target.value
|
|
|
|
},
|
|
|
|
bindReason(e){
|
|
|
|
this.reasonIds = e.target.value
|
|
|
|
},
|
|
|
|
bindmouldIds(e){
|
|
|
|
this.mouldIds = e.target.value
|
|
|
|
},
|
|
|
|
offLine(){
|
|
|
|
console.log("表单",this.from);
|
|
|
|
|
|
|
|
this.buttonState = false;
|
|
|
|
offline(this.from).then(res => {
|
|
|
|
this.$functions.success('提交成功').then(() => {
|
|
|
|
uni.navigateBack();
|
|
|
|
}).catch(res => {
|
|
|
|
this.buttonState = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import "./index.scss"
|
|
|
|
</style>
|