| | |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="生产车间" style=" display: flex;"> |
| | | <el-select v-model="form.wkshopcode" style="width: 200px" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in WorkShopArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="销售单号" style="display: flex;"> |
| | | <el-input v-model="form.saleordercode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工单编号" style="display: flex;"> |
| | | <el-input v-model="form.wocode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码" style=" display: flex;"> |
| | | <el-input v-model="form.partcode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label="产品名称" style=" display: flex;"> |
| | | <el-input v-model="form.partname" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号" style=" display: flex;"> |
| | | <el-input v-model="form.partspec" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="规格型号" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.partspec" style="width: 200px" placeholder="请输入" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item v-show="isExpandForm" label="工序名称" style="display: flex;"> |
| | | <el-input v-model="form.stepname" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="操作人员" style=" display: flex;"> |
| | | <el-input v-model="form.username" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item v-show="isExpandForm" label="操作人员" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.username" style="width: 200px" placeholder="请输入" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item v-show="isExpandForm" label="报工时间" style="display: flex;align-items: center"> |
| | | <el-date-picker |
| | | v-model="form.operdate" |
| | |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="saleOrderCode" |
| | | label="销售单号" |
| | | width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="工单编号" |
| | | width="160" |
| | |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="wkshp_name" |
| | | label="生产车间" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="group_name" |
| | | label="生产班组" |
| | |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="saleOrderCode" |
| | | label="销售单号" |
| | | width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="工单编号" |
| | | width="160" |
| | |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="wkshp_name" |
| | | label="生产车间" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="group_name" |
| | | label="生产班组" |
| | |
| | | width="800px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <div style="height: 300px;width: 100%;background-color: aliceblue;padding:20px"> |
| | | <el-tag |
| | |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import { StepSelect } from '@/api/makeModel' |
| | | import { WorkShopSelect } from '@/api/deviceManager' |
| | | |
| | | export default { |
| | | name: 'Zzjg', |
| | | name: 'GroupSalaryList', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | }, |
| | |
| | | tableHeight: 0, |
| | | StepSelectArr: [], // 剔除工序数组 |
| | | form: { |
| | | saleordercode: '', |
| | | wocode: '', // 工单编号 |
| | | partcode: '', // 产品编码 |
| | | partname: '', // 产品名称 |
| | |
| | | stepname: '', // 工序名称 |
| | | groupcode: '', // 生产班组 |
| | | username: '', // 操作人员 |
| | | operdate: '', // 操作时间 |
| | | wkshopcode: this.$store.state.settings.orgType === 'W' ? getCookie('stu_torgcode') : '', // 所属车间 |
| | | operdate: [new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart( |
| | | 2, '0') + '-01', new Date().toISOString().slice(0, 10)], // 操作时间 |
| | | rejectstepcode: [], // 剔除工序(固定薪资工序不参与计算 |
| | | compute: 'last', // 计件方式 逐道工序:contin 末道工序:last |
| | | prop: 'lm_date', // 排序字段 |
| | |
| | | |
| | | }, |
| | | |
| | | WorkShopArr: [], // 所属车间数组 |
| | | |
| | | title_value: '数据导入 / 点检部位', |
| | | code: '4', |
| | | shows: false |
| | |
| | | this.getGroupSalaryReportSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getMesOrderStepReportSelectUserGroup() |
| | | this.getStepSelect() |
| | | this.getWorkShopSelect() |
| | | // this.getStepSelect() |
| | | } |
| | | }) |
| | | }, |
| | | // 获取所属车间下拉 |
| | | async getWorkShopSelect() { |
| | | const { data: res } = await WorkShopSelect() |
| | | this.WorkShopArr = res |
| | | }, |
| | | // 获取工序下拉接口 |
| | | async getStepSelect() { |
| | |
| | | const sums = [] |
| | | |
| | | columns.forEach((column, index) => { |
| | | if (index === 10) { |
| | | if (index === 12) { |
| | | sums[index] = '总价' |
| | | return |
| | | } |
| | |
| | | tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1]) |
| | | } |
| | | const data = { |
| | | saleordercode: this.form.saleordercode, |
| | | wocode: this.form.wocode, |
| | | partcode: this.form.partcode, |
| | | partname: this.form.partname, |
| | |
| | | stepname: this.form.stepname, |
| | | groupcode: this.form.groupcode, |
| | | username: this.form.username, |
| | | wkshopcode: this.form.wkshopcode, |
| | | operdate: tempDate, |
| | | rejectstepcode: this.form.rejectstepcode.join(','), |
| | | compute: this.form.compute, |
| | |
| | | }, |
| | | |
| | | async getMesOrderStepReportSelectUserGroup() { |
| | | const { data: res } = await MesOrderStepReportSelectUserGroup() |
| | | const { data: res } = await MesOrderStepReportSelectUserGroup({ wkshopcode: this.form.wkshopcode }) |
| | | this.groupArr = res |
| | | }, |
| | | tabClick(val) { |
| | |
| | | } |
| | | |
| | | const data = { |
| | | saleordercode: this.form.saleordercode, |
| | | wocode: this.form.wocode, |
| | | partcode: this.form.partcode, |
| | | partname: this.form.partname, |
| | |
| | | stepname: this.form.stepname, |
| | | groupcode: this.form.groupcode, |
| | | username: this.form.username, |
| | | wkshopcode: this.form.wkshopcode, |
| | | operdate: tempDate, |
| | | compute: this.form.compute |
| | | } |
| | |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | | this.form.saleordercode = '' |
| | | this.form.wocode = '' |
| | | this.form.partcode = '' |
| | | this.form.partname = '' |
| | |
| | | this.form.stepname = '' |
| | | this.form.groupcode = '' |
| | | this.form.username = '' |
| | | this.form.operdate = '' |
| | | this.form.operdate = [new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart( |
| | | 2, '0') + '-01', new Date().toISOString().slice(0, 10)] |
| | | this.form.wkshopcode = this.$store.state.settings.orgType === 'W' ? getCookie('stu_torgcode') : '' // 所属车间 |
| | | this.getGroupSalaryReportSearch() |
| | | }, |
| | | |
| | | // 新增按钮 |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | this.$refs.tableDataRef.doLayout() |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | }, |
| | | // 修改按钮 |
| | | async edit(operation, row) { |
| | |
| | | // this.dialogForm.OrgName = row.org_name |
| | | // this.dialogForm.SupUnit = row.parent_id |
| | | // }) |
| | | }, |
| | | // 删除按钮 |
| | | async del(row) { |
| | | // this.$confirm('是否确认删除?', '提示', { |
| | | // confirmButtonText: '确定', |
| | | // cancelButtonText: '取消', |
| | | // type: 'warning' |
| | | // }).then(() => { |
| | | // DeleteOrganization({ orgid: row.code }).then(res => { |
| | | // if (res.code === '200') { |
| | | // this.$message.success('删除成功!') |
| | | // if (this.form.page > 1 && this.tableData.length === 1) { |
| | | // this.form.page-- |
| | | // } |
| | | // this.getGroupSalaryReportSearch() |
| | | // } |
| | | // }) |
| | | // }).catch(() => { |
| | | // this.$message.info('已取消删除') |
| | | // }) |
| | | }, |
| | | // 对话框关闭事件 |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | }, |
| | | // 对话框确认 |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | } |
| | | // AddUpdateOrganization(data).then(res => { |
| | | // if (res.code === '200') { |
| | | // this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | // this.dialogVisible = false |
| | | // this.getGroupSalaryReportSearch() |
| | | // } else { |
| | | // this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | // } |
| | | // }) |
| | | } |
| | | }) |
| | | }, |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | this.$refs.tableDataRef.doLayout() |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |