| | |
| | | <template> |
| | | <view class="content"> |
| | | <view> |
| | | <workOrderInfo :orederMessage="info" /> |
| | | <view class="bg_cate"> |
| | | <!-- <view class="bg_cate"> |
| | | <view @click="clickIten(index)" :class="typeView == index ? 'bg_cate_item active' : 'bg_cate_item'" |
| | | v-for="(item, index) in cate" :key="index">{{ item.name }}</view> |
| | | </view> |
| | | <div v-if="typeView==0" class="bg_list"> |
| | | </view> --> |
| | | <div class="bg_list"> |
| | | <div class="bg_list_item"> |
| | | <div class="bg_list_item_top"> |
| | | <div class="bg_list_item_top_left"> |
| | |
| | | </div> |
| | | |
| | | <template v-if="feedingData && feedingData.length > 0"> |
| | | <view class="plr30 bg_w"> |
| | | <view > |
| | | <div v-for="(item, index) in feedingData" :key="index" class="bg_list_item_h"> |
| | | <view> |
| | | <view v-for="(item, index) in feedingData" :key="index"> |
| | | <div class="bg_list_item_h"> |
| | | <div class="bg_list_item_num"> |
| | | <div class="bg_list_item_num_item"> |
| | | <div class="bg_list_item_num_item_wl"> |
| | | <span> {{ item.materialName || '墙体砖' }}{{ item.procedureName ? ` | ${item.procedureName}` : '' |
| | | }}</span> |
| | | <div class="bg_list_item_num_item_wl_lx"> |
| | | <span class="green" v-if="item.qualityType == 0">合格<text class="c6" decode>{{ split }}</text></span> |
| | | <span class="orange" v-if="item.qualityType == 1">不良<text class="c6" decode>{{ split }}</text></span> |
| | | <span class="red" v-if="item.qualityType == 2">报废<text class="c6" decode>{{ split }}</text></span> |
| | | <span class="green" v-if="item.qualityType == 0">合格 / </span> |
| | | <span class="orange" v-if="item.qualityType == 1">不良 / </span> |
| | | <span class="red" v-if="item.qualityType == 2">报废 / </span> |
| | | <span>{{ item.locationName }}</span> |
| | | <span v-if="item.batch"><text class="c6" decode>{{ split }}</text>{{ item.batch }}</span> |
| | | <span>{{ item.batch ? ` / ${item.batch}` : '' }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="bg_list_item_num_item_sr"> |
| | | <view class="cY"> |
| | | <view class="mr10">{{ item.num }}</view> |
| | | <span>{{ item.unitName }}</span> |
| | | <span v-if="info.umodel">{{ info.umodel.name }}</span> |
| | | </view> |
| | | |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="bg_list_item_h"> |
| | | <div class="bg_list_item_num plr30"> |
| | | <div class="bg_list_item_num"> |
| | | <div class="bg_list_item_num_item"> |
| | | <span>良品数{{ info.umodel ? `(${info.umodel.name})` : '' }}</span> |
| | | <div class="bg_list_item_num_item_sr"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="bg_list_item_h"> |
| | | <div class="bg_list_item_num plr30"> |
| | | <div class="bg_list_item_num"> |
| | | <div class="bg_list_item_num_item"> |
| | | <span>不良数{{ info.umodel ? `(${info.umodel.name})` : '' }}</span> |
| | | <div class="bg_list_item_num_item_sr"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="bg_list_item_h"> |
| | | <div class="bg_list_item_num plr30"> |
| | | <div class="bg_list_item_num_item"> |
| | | <span>不良数{{ info.umodel ? `(${info.umodel.name})` : '' }}</span> |
| | | <div class="bg_list_item_num_item_sr"> |
| | | <view class="mr10">{{ produceFrom.undesirable }}</view> |
| | | <span v-if="info.umodel">{{ info.umodel.name }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="bg_list_item"> |
| | | <div class="bg_list_item_top"> |
| | | <div class="bg_list_item_top_left"> |
| | | <div class="bg_list_item_top_left_x bg_m"></div> |
| | | <span>工资绩效</span> |
| | | <span>生产点检</span> |
| | | </div> |
| | | </div> |
| | | <div class="bg_list_item_h mb40 "> |
| | | <div class="bg_list_item_num plr30" style="display: block;"> |
| | | <div class="bX ptb15"> |
| | | <div class="f30 c2">预计工资</div> |
| | | <div class="f28" style="color:#4275FC">{{ (performance.salary / 10 / 10).toFixed(2) }}元</div> |
| | | </div> |
| | | <div class="f24 c6"> |
| | | {{ performance.salaryType == 0 ? '计件' : '计时' }} | |
| | | {{ (performance.salaryPrice / 10 / 10).toFixed(2) }}元/{{ performance.salaryType == |
| | | 0 ? '件' : '时' }} | |
| | | 达标率:{{ complianceRate }}% |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-else class="bg_list"> |
| | | <template v-if="djData && djData.length > 0"> |
| | | <div class="details_dj"> |
| | | |
| | | <div class="details_dj_list"> |
| | | <view v-for="(item, index) in djData" :key="index"> |
| | | <div class="details_dj_list_item"> |
| | | <span>{{ item.attrName }}:{{ item.val }}</span> |
| | | <span>{{ item.userName }} {{ item.createTime }}</span> |
| | | </div> |
| | | </view> |
| | | <!-- <scroll-view scroll-y="true" refresher-enabled="true" @scrolltolower="getLists"> |
| | | |
| | | </scroll-view> --> |
| | | <scroll-view scroll-y="true" refresher-enabled="true" @scrolltolower="getLists"> |
| | | <view v-for="(item, index) in djData" :key="index"> |
| | | <div class="details_dj_list_item"> |
| | | <span>{{ item.attrName }}:{{ item.val }}</span> |
| | | <span>{{ item.userName }} {{ item.createTime }}</span> |
| | | </div> |
| | | </view> |
| | | </scroll-view> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | workorderId: '', |
| | | cate: [{ |
| | | name: '生产' |
| | | }, |
| | |
| | | name: '点检' |
| | | } |
| | | ], |
| | | split: ' / ', |
| | | workorderId: '', |
| | | form: { |
| | | time: '', |
| | | efective: [], |
| | |
| | | undesirableId: '', |
| | | undesirable: 5 // 不良 |
| | | }, |
| | | pages: { |
| | | capacity: 10, |
| | | page: 1, |
| | | total: 0 |
| | | }, |
| | | djData: [], |
| | | cateList: [], |
| | | finished: true, |
| | | performance: {} |
| | | }; |
| | | }, |
| | | onLoad(obj) { |
| | |
| | | this.queryByIds() |
| | | this.getOrocessRecords() |
| | | this.getData() |
| | | this.pageDJs() |
| | | this.getOrocessRecordCC() |
| | | uni.$on('spotAdd', () => { |
| | | if (this.typeView == 1) { |
| | |
| | | }) |
| | | }, |
| | | computed: { |
| | | complianceRate() { |
| | | if (!this.performance) return 0; |
| | | let {duration, salaryNum, salaryTimes, qualifiedNum, unqualifiedNum, salaryUnqualified} = this.performance |
| | | // 报工时长 |
| | | if (!duration) return 0; |
| | | debugger |
| | | // 报工数量 |
| | | if (!qualifiedNum && !unqualifiedNum) return 0; |
| | | // 标准数量、时长 |
| | | if (!salaryNum || !salaryTimes) return 0 |
| | | |
| | | if (salaryUnqualified == 1) { // 是否计入不良品 |
| | | let a = ((Number(qualifiedNum) + Number(unqualifiedNum)) / (duration / 3600)).toFixed(2) |
| | | let b = (salaryNum / (salaryTimes / 3600)).toFixed(2) |
| | | return ((Number(a) / Number(b)) * 100).toFixed(2) |
| | | expectedSalary() { |
| | | if (this.arrType.length === 0) return 0; |
| | | // 按件计算 |
| | | if (this.arrType[this.form.index].type == 0) { |
| | | if (!this.produceFrom.qualified) return 0 |
| | | if (this.arrType[this.form.index].unqualified == 1) { // 是否计入不良品 |
| | | let total = Number(this.produceFrom.qualified) + Number(this.produceFrom.undesirable) |
| | | return (total * (this.arrType[this.form.index].salary / 100)).toFixed(2) || 0 |
| | | } else { |
| | | return (Number(this.produceFrom.qualified) * (this.arrType[this.form.index].salary / 100)).toFixed( |
| | | 2) || 0 |
| | | } |
| | | } else { |
| | | let a = (qualifiedNum / (duration / 3600)).toFixed(2) |
| | | let b = (salaryNum / (salaryTimes / 3600)).toFixed(2) |
| | | if (!this.form.duration) return 0; |
| | | let h = (this.form.duration / 60 / 60).toFixed(2) |
| | | return (Number(h) * (this.arrType[this.form.index].salary / 10 / 10)).toFixed(2) || 0 |
| | | } |
| | | }, |
| | | complianceRate() { |
| | | if (this.arrType.length === 0) return 0; |
| | | if (!this.produceFrom.qualified && !this.produceFrom.undesirable) return 0; |
| | | if (!this.form.duration) return 0; |
| | | if (!this.arrType[this.form.index].num) return 0; |
| | | // 按件计算 |
| | | // if (infoBox.value.type == 0) { |
| | | if (this.arrType[this.form.index].unqualified == 1) { // 是否计入不良品 |
| | | let a = ((Number(this.produceFrom.qualified) + Number(this.produceFrom.undesirable)) / (this.form |
| | | .duration / 3600)).toFixed(2) |
| | | let b = (this.arrType[this.form.index].num / (this.arrType[form.index].times / 3600)).toFixed(2) |
| | | return ((Number(a) / Number(b)) * 100).toFixed(2) |
| | | // let total = (Number(from.qualified) + Number(from.undesirable)) / ((from.duration * 60 * 60) * infoBox.value.num / ) |
| | | // return total * infoBox.value.salary; |
| | | } else { |
| | | let a = (this.produceFrom.qualified / (this.form.duration / 3600)).toFixed(2) |
| | | let b = (this.arrType[this.form.index].num / (this.arrType[this.form.index].times / 3600)).toFixed(2) |
| | | return ((Number(a) / Number(b)) * 100).toFixed(2) |
| | | // return Number(from.qualified) * infoBox.value.salary; |
| | | } |
| | | } |
| | | }, |
| | |
| | | getWorkorderRecordListStandard({ |
| | | workorderId: this.workorderId |
| | | }).then(res => { |
| | | // console.log(res.data[0]); |
| | | if (res.data.length > 0) { |
| | | this.produceFrom.qualified = res.data[0].qualifiedNum |
| | | this.produceFrom.undesirable = res.data[0].unqualifiedNum |
| | | this.performance = res.data[0] |
| | | } |
| | | }) |
| | | }, |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | height: 100vh; |
| | | background-color: #f7f7f7; |
| | | } |
| | | .bg_cate { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | background: #FFFFFF; |
| | | display: flex; |
| | | align-items: center; |
| | | // border-top: 20rpx solid #f7f7f7; |
| | | |
| | | .active { |
| | | box-sizing: border-box; |
| | | color: #305ED5 !important; |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | // margin-top: 30rpx; |
| | | margin-top: 30rpx; |
| | | |
| | | .bg_list_item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | // margin-bottom: 40rpx; |
| | | // border-bottom: 40rpx #f7f7f7 solid; |
| | | border-bottom: 40rpx #f7f7f7 solid; |
| | | |
| | | |
| | | .kong { |
| | | text-align: center; |
| | | padding: 30rpx 0; |
| | | background: #ffffff; |
| | | font-size: 25rpx; |
| | | |
| | | span { |
| | | color: #474747; |
| | | } |
| | | } |
| | | |
| | | .bg_list_item_top { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 30rpx; |
| | | background-color: #f7f7f7; |
| | | padding-left: 30rpx; |
| | | padding-right: 30rpx; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .bg_list_item_top_left { |
| | | display: flex; |
| | |
| | | |
| | | .bg_list_item_h { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background: white; |
| | | border-bottom: 1rpx solid #E5E5E5; |
| | | padding: 15rpx 0; |
| | | &:last-child { |
| | | border: none !important; |
| | | } |
| | | |
| | | .bg_list_item_num { |
| | | width: 100%; |
| | | min-height: 98rpx; |
| | | background: white; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #E5E5E5; |
| | | |
| | | &:last-child { |
| | | border: none !important; |
| | | } |
| | | |
| | | .kong { |
| | | text-align: center; |
| | | font-size: 25rpx; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | // height: 118rpx; |
| | | // padding: 15rpx 0; |
| | | padding: 15rpx 0; |
| | | box-sizing: border-box; |
| | | justify-content: space-between; |
| | | // border-bottom: 3rpx solid #111; |
| | | border-bottom: 1rpx solid #E5E5E5; |
| | | |
| | | &:last-child { |
| | | border: none; |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .kong { |
| | | text-align: center; |
| | | padding: 30rpx 0; |
| | | // background: #ffffff; |
| | | font-size: 25rpx; |
| | | |
| | | span { |
| | | color: #474747; |
| | | } |
| | | } |
| | | </style> |