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.

307 lines
8.6 KiB

<template>
<view>
<u-popup
v-model="isShow"
mode="left"
:border-radius="10"
:closeable="true"
@close="fnCancel"
width="100%"
height="100%"
>
<u-row gutter="12">
<u-col span="12">
<view
:style="{ textAlign: 'center', height: '60px', lineHeight: '60px' }"
>
<text
:style="{ fontSize: '40rpx', fontWeight: 500, color: '#1D2129' }"
>报工详情</text
>
</view>
</u-col>
<u-col span="3" :style="{ padding: '5px', textAlign: 'right' }">
<text>机采数量:</text>
</u-col>
<u-col span="9" :style="{ padding: '5px' }">
<text>{{ dataItem.isConfirmNums }}</text>
</u-col>
<u-col span="3" :style="{ padding: '5px', textAlign: 'right' }">
<text>合格数量:</text>
</u-col>
<u-col span="9" :style="{ padding: '5px' }">
<text>{{ dataItem.defectiveNum }}</text>
</u-col>
<u-col span="3" :style="{ padding: '5px', textAlign: 'right' }">
<text>次品数量:</text>
</u-col>
<u-col span="9" :style="{ padding: '5px' }">
<text>{{ dataItem.qualifiedNum }}</text>
</u-col>
<u-col span="3" :style="{ padding: '5px', textAlign: 'right' }">
<text>报工班组:</text>
</u-col>
<u-col span="9" :style="{ padding: '5px' }">
<text>{{ dataItem.groupName }}</text>
</u-col>
<u-col
v-if="dataItem.groupType == '1'"
span="12"
:style="{ padding: '5px' }"
>
<view
:style="{
color: '#0D0D26',
fontWeight: 'bloder',
textAlign: 'center',
padding: '10px',
}"
>
<text>报工成员(生成线报工)</text>
</view>
<view>
<u-table>
<u-tr class="u-tr">
<u-th>
<view class="u-th">
<text>姓名</text>
</view>
</u-th>
<u-th>
<view class="u-th">
<text>报工数量</text>
</view>
</u-th>
<u-th>
<view class="u-th">
<text>补偿工时</text>
</view>
</u-th>
</u-tr>
<u-tr
class="u-tr"
v-for="(
prodReportItem, prodReportIndex
) in dataItem.prodReportList"
:key="prodReportIndex"
>
<u-td>
<view class="u-td">
{{ fnReportMemberName(prodReportItem.reportMember) }}
</view>
</u-td>
<u-td>
<view class="u-td">
<text>{{ prodReportItem.defectiveNum }}</text>
</view>
</u-td>
<u-td>
<view class="u-td">
{{ prodReportItem.compensatoryHour }}
</view>
</u-td>
</u-tr>
</u-table>
</view>
</u-col>
<u-col
v-else-if="dataItem.groupType == '2'"
span="12"
:style="{ padding: '5px' }"
>
<view
:style="{
color: '#0D0D26',
fontWeight: 'bloder',
textAlign: 'center',
padding: '10px',
}"
>
<text>报工成员(包装线报工)</text>
</view>
<view>
<u-table>
<u-tr class="u-tr">
<u-th>
<view class="u-th">
<text>姓名</text>
</view>
</u-th>
<u-th>
<view class="u-th">
<text>报工数量</text>
</view>
</u-th>
<u-th>
<view class="u-th">
<text>补偿工时</text>
</view>
</u-th>
</u-tr>
<u-tr
class="u-tr"
v-for="(
packageReportItem, packageReportIndex
) in dataItem.packageReportList"
:key="packageReportIndex"
>
<u-td>
<view class="u-td">
{{ fnReportMemberName(packageReportItem.reportMember) }}
</view>
</u-td>
<u-td>
<view class="u-td">{{ packageReportItem.defectiveNum }}</view>
</u-td>
<u-td>
<view class="u-td">
{{ packageReportItem.compensatoryHour }}
</view>
</u-td>
</u-tr>
</u-table>
</view>
</u-col>
<u-col span="12" :style="{ padding: '5px' }">
<view
:style="{
color: '#0D0D26',
fontWeight: 'bloder',
textAlign: 'center',
padding: '10px',
}"
>
<text>领料上报</text>
</view>
<view>
<u-table>
<u-tr class="u-tr">
<u-th>
<view class="u-th">
<text>材料名称</text>
</view>
</u-th>
<u-th>
<view class="u-th">
<text>当班领用</text>
</view>
</u-th>
<u-th>
<view class="u-th">
<text>本班结存</text>
</view>
</u-th>
</u-tr>
<u-tr
class="u-tr"
v-for="(
requisitionReportItem, requisitionReportIndex
) in dataItem.requisitionReportList"
:key="requisitionReportIndex"
>
<u-td>
<view class="u-td">
{{ requisitionReportItem.materialName }}
</view>
</u-td>
<u-td>
<view class="u-td">
{{ requisitionReportItem.duty }}
</view>
</u-td>
<u-td>
<view class="u-td">
{{ requisitionReportItem.classBalance }}
</view>
</u-td>
</u-tr>
</u-table>
</view>
</u-col>
</u-row>
</u-popup>
<u-top-tips ref="uTips"></u-top-tips>
</view>
</template>
<script>
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
import { mapGetters } from "vuex";
import { userList } from "@/api/yys/dayWork.js";
import dayjs from "dayjs";
export default {
components: {},
mixins: [],
data() {
return {
isShow: false,
dataItem: {},
reportMemberList: [],
};
},
watch: {},
computed: {},
onLoad(params) {},
onUnload() {},
methods: {
init(dataItem) {
this.fnReportMemberList();
this.dataItem = dataItem;
switch (this.dataItem.groupType) {
case "1":
this.dataItem.defectiveNum = this.dataItem.prodReportList[0]['defectiveNum']
this.dataItem.qualifiedNum = this.dataItem.prodReportList[0]['qualifiedNum']
break;
case "2":
this.dataItem.defectiveNum = this.dataItem.packageReportList[0]['defectiveNum']
this.dataItem.qualifiedNum = this.dataItem.packageReportList[0]['qualifiedNum']
break;
default:
break;
}
this.isShow = true;
},
fnCancel() {
this.dataItem = {};
this.isShow = false;
},
fnOk() {
this.fnCancel();
},
fnReportMemberList() {
userList()
.then((res) => {
if (res.code == 200) {
this.reportMemberList = res.data;
}
})
.catch((err) => {
console.log(err);
});
},
fnReportMemberName(reportMember) {
let _list = [...this.reportMemberList];
let _one = _list.find((o1) => {
return o1.id == reportMember;
});
if (_one) {
return _one.realName;
} else {
return "";
}
},
},
};
</script>
<style lang="scss" scoped>
/deep/.u-th {
width: 100%;
height: 32px;
}
/deep/.u-td {
width: 100%;
height: 32px;
}
</style>