| | |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <div class="bodyTopFormGroup" style="margin-top: 10px;"> |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button v-waves type="warning" icon="el-icon-edit" @click="batchUpdate">批量修改工价</el-button> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | |
| | | <el-form-item v-show="isExpandForm" label="产品规格" style=" display: flex;"> |
| | | <el-input v-model="form.partspec" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-show="isExpandForm" label="工序名称" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.stepcode" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in stepCodeArr" |
| | | :key="item.stepcode" |
| | | :label="item.stepname" |
| | | :value="item.stepcode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="报工人员" style=" display: flex;"> |
| | | <el-input v-model="form.reportuser" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | |
| | | {{ row.steptype === 'Z' ? '自制' : '外协' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="step_price" |
| | | label="工序工价" |
| | | show-overflow-tooltip |
| | | sortable="custom" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="wx_name" |
| | | label="供应商" |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | title="批量工价调整" |
| | | :visible.sync="batchUpdateDialogVisible" |
| | | width="1080px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="batchUpdateHandleClose" |
| | | @close="batchUpdateHandleClose" |
| | | > |
| | | <div style="display: flex;align-items: center"> |
| | | <div> |
| | | 修改为: |
| | | </div> |
| | | <el-input-number |
| | | v-model="stepPriceEdit" |
| | | size="medium" |
| | | :precision="2" |
| | | :step="0.1" |
| | | :max="10" |
| | | :min="0" |
| | | style="margin: 0 10px 5px" |
| | | /> |
| | | <div> |
| | | 元 / 件 |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="batchUpdateDialogVisibleCancel">取 消</el-button> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="batchUpdateDialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { handleDatetime } from '@/utils/global' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import { DefectPermissions, PrentOrganizationNoCompany } from '@/api/GeneralBasicData' |
| | | import { MesOrderStepModelSearch, MesOrderStepUpdateSeave, MesOrderStepVerifySearch } from '@/api/WorkOrder' |
| | | import { DefectPermissions, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData' |
| | | import { |
| | | MesOrderStepModelSearch, MesOrderStepPriceBatchUpdateSeave, |
| | | MesOrderStepUpdateSeave, |
| | | MesOrderStepVerifySearch |
| | | } from '@/api/WorkOrder' |
| | | |
| | | export default { |
| | | name: 'ReportCorrect', |
| | |
| | | partspec: '', // 产品规格 |
| | | reportuser: '', // 报工人员 |
| | | reportdate: '', // 报工时间 |
| | | |
| | | stepcode: '', |
| | | prop: 'report_date', // 排序字段 |
| | | order: 'desc', // 排序字段 |
| | | page: 1, // 第几页 |
| | |
| | | report_qty: [ |
| | | { required: true, message: '请输入合格数量', trigger: ['blur', 'change'] } |
| | | ] |
| | | } |
| | | }, |
| | | stepCodeArr: [], // 下拉工序集合 |
| | | batchUpdateDialogVisible: false, |
| | | stepPriceEdit: 0 |
| | | |
| | | } |
| | | }, |
| | |
| | | this.getMesOrderStepVerifySearch() |
| | | this.getDefectPermissions() |
| | | this.getPrentOrganizationNoCompany() |
| | | this.getStepData() |
| | | }, |
| | | created() { |
| | | }, |
| | |
| | | this.getMesOrderStepVerifySearch() |
| | | this.getDefectPermissions() |
| | | this.getPrentOrganizationNoCompany() |
| | | this.getStepData() |
| | | }, |
| | | methods: { |
| | | // 批量修改工序 |
| | | batchUpdate() { |
| | | // this.$confirm('是否确认修改?', '提示', { |
| | | // confirmButtonText: '确定', |
| | | // cancelButtonText: '取消', |
| | | // type: 'warning' |
| | | // }).then(() => { |
| | | // |
| | | // }).catch(() => { |
| | | // this.$notify.info('已取消修改!') |
| | | // }) |
| | | this.batchUpdateDialogVisible = true |
| | | }, |
| | | batchUpdateDialogVisibleCancel() { |
| | | this.batchUpdateDialogVisible = false |
| | | }, |
| | | batchUpdateDialogVisibleConfirm() { |
| | | this.$confirm('是否确认修改?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const data = [] |
| | | // "id": "string", |
| | | // "price": "string", |
| | | // "type": "string" |
| | | // data = this.tableData.map(i => { id:i.id price:i.step_price, type:i.steptype}) |
| | | this.tableData.forEach(i => { |
| | | data.push({ |
| | | id: i.id, price: this.stepPriceEdit, type: i.style |
| | | }) |
| | | }) |
| | | MesOrderStepPriceBatchUpdateSeave(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.batchUpdateDialogVisible = false |
| | | this.$message.success('修改成功!') |
| | | this.getMesOrderStepVerifySearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$notify.info('已取消修改!') |
| | | }) |
| | | }, |
| | | batchUpdateHandleClose() { |
| | | this.stepPriceEdit = 0 |
| | | }, |
| | | // 获取工序基础资料 |
| | | async getStepData() { |
| | | const { data: res } = await StepData() |
| | | this.stepCodeArr = res |
| | | }, |
| | | async getPrentOrganizationNoCompany() { |
| | | const { data: res } = await PrentOrganizationNoCompany() |
| | | this.wkshopcodeArr = res |
| | |
| | | partname: this.form.partname, |
| | | partspec: this.form.partspec, |
| | | reportuser: this.form.reportuser, |
| | | stepcode: this.form.stepcode, |
| | | reportdate: tempDate, |
| | | |
| | | prop: this.form.prop, // 排序字段 |
| | |
| | | this.form.partspec = '' |
| | | this.form.reportuser = '' |
| | | this.form.reportdate = '' |
| | | this.form.stepcode = '' |
| | | this.getMesOrderStepVerifySearch() |
| | | }, |
| | | |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 205 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | } |
| | |
| | | align-items: center; |
| | | } |
| | | |
| | | ::v-deep .el-input--medium >input{ |
| | | height: 36px !important; |
| | | } |
| | | |
| | | </style> |