| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup"> |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button v-waves type="primary" icon="el-icon-download" @click="download">导出</el-button> |
| | | |
| | | <div |
| | | style="color: red;margin: 10px 5px 0 0;" |
| | | >当前报表只统计自制件工序 |
| | | </div> |
| | | |
| | | <!-- <div class="topRight" style="display: flex;align-items: center">--> |
| | | <!-- <!– <div style="font-size: 14px;margin-right: 15px;color: #a7a7a7">剔除工序</div>–>--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="form.rejectstepcode"--> |
| | | <!-- style="width: 170px;"--> |
| | | <!-- multiple--> |
| | | <!-- placeholder="请选择剔除工序"--> |
| | | <!-- collapse-tags--> |
| | | <!-- filterable--> |
| | | <!-- clearable--> |
| | | <!-- @change="getPeopleSalaryReportSearch"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in StepSelectArr"--> |
| | | <!-- :key="item.stepcode"--> |
| | | <!-- :label="item.stepname"--> |
| | | <!-- :value="item.stepcode"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ratio" |
| | | label="工序单价" |
| | | label="分配比例" |
| | | width="110" |
| | | sortable="custom" |
| | | > |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="usermoney" |
| | | label="个人记件工资" |
| | | label="个人计件工资" |
| | | width="130" |
| | | sortable="custom" |
| | | > |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="usermoney" |
| | | label="个人记件工资" |
| | | label="个人计件工资" |
| | | width="130" |
| | | sortable="custom" |
| | | > |
| | |
| | | import { MesOrderStepReportSelectUserGroup } from '@/api/scgl' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import { StepSelect } from '@/api/zzmx' |
| | | |
| | | export default { |
| | | name: 'Zzjg', |
| | |
| | | isExpandForm: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | StepSelectArr: [], // 剔除工序数组 |
| | | form: { |
| | | wocode: '', // 工单编号 |
| | | partcode: '', // 产品编码 |
| | |
| | | groupcode: '', // 生产班组 |
| | | reportname: '', // 操作人员 |
| | | reportdate: '', // 操作时间 |
| | | rejectstepcode: [], // 剔除工序(固定薪资工序不参与计算 |
| | | compute: 'last', // 计件方式 |
| | | prop: 'partcode', // 排序字段 |
| | | order: 'desc', // 排序字段 |
| | |
| | | this.getPeopleSalaryReportSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getMesOrderStepReportSelectUserGroup() |
| | | this.getStepSelect() |
| | | } |
| | | }) |
| | | }, |
| | | // 获取工序下拉接口 |
| | | async getStepSelect() { |
| | | const { data: res } = await StepSelect() |
| | | this.StepSelectArr = res |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | |
| | | const i = this.form.compute === 'last' ? 11 : 10 |
| | | |
| | | columns.forEach((column, index) => { |
| | | if (index === 10) { |
| | | if (index === i) { |
| | | sums[index] = '总价' |
| | | return |
| | | } |
| | |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr) |
| | | if (!isNaN(value)) { |
| | | return prev + curr |
| | | // return prev + curr |
| | | return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100 |
| | | } else { |
| | | return prev |
| | | return Math.round(prev * 100) / 100 |
| | | } |
| | | }, 0) |
| | | |
| | |
| | | this.$refs.tableDataRef.doLayout() |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | // (Math.round(sums * 100) / 100).toS |
| | | |
| | | // console.log(typeof sums) |
| | | // console.log(sums[11].split(' ')) |
| | | return sums |
| | | }, |
| | | async getPeopleSalaryReportSearch() { |
| | |
| | | groupcode: this.form.groupcode, |
| | | compute: this.form.compute, |
| | | reportname: this.form.reportname, |
| | | rejectstepcode: this.form.rejectstepcode.join(','), |
| | | reportdate: tempDate, |
| | | prop: this.form.prop, |
| | | order: this.form.order, |
| | |
| | | height: 100% !important; |
| | | } |
| | | } |
| | | |
| | | .topRight ::v-deep { |
| | | input::-webkit-input-placeholder { |
| | | color: $main_color; |
| | | } |
| | | |
| | | //input::-moz-input-placeholder { |
| | | // color: rgba(0, 204, 254, 1); |
| | | //} |
| | | |
| | | input::-ms-input-placeholder { |
| | | color: $main_color; |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | |