| | |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <div class="bodyTopButtonGroup"> |
| | | <el-button v-waves icon="el-icon-switch-button" type="success" @click="orderClose()">工单关闭</el-button> |
| | | <el-button v-waves icon="el-icon-switch-button" type="danger" @click="orderClose()">工单关闭</el-button> |
| | | <el-button v-waves icon="el-icon-thumb" type="success" @click="orderOpen()">工单启动</el-button> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | <el-select |
| | | v-model="form.wkshopcode" |
| | | filterable |
| | | multiple |
| | | collapse-tags |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | |
| | | <el-table-column |
| | | type="selection" |
| | | width="50" |
| | | :selectable="selected" |
| | | /> |
| | | <!-- :selectable="selected"--> |
| | | <el-table-column |
| | | prop="rowNum" |
| | | width="50" |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="saleOrderCode" |
| | | label="销售订单" |
| | | label="销售订单/预测单" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | min-width="160" |
| | |
| | | show-tooltip-when-overflow |
| | | width="100" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc1"--> |
| | | <!-- label="客户名称"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc6"--> |
| | | <!-- label="客户编码"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc2"--> |
| | | <!-- label="对内名称"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc3"--> |
| | | <!-- label="CTP日期"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc4"--> |
| | | <!-- label="钢刀编号"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc5"--> |
| | | <!-- label="盒型"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc1"--> |
| | | <!-- label="客户名称"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc6"--> |
| | | <!-- label="客户编码"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc2"--> |
| | | <!-- label="对内名称"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc3"--> |
| | | <!-- label="CTP日期"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc4"--> |
| | | <!-- label="钢刀编号"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc5"--> |
| | | <!-- label="盒型"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | prop="wkshp_name" |
| | | label="生产车间" |
| | |
| | | /> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip class="item" effect="dark" content="工单关闭" placement="top"> |
| | | <el-tooltip class="item" effect="dark" :content="row.status!=='CLOSED'?'工单关闭':'工单启动'" placement="top"> |
| | | <i |
| | | v-if="row.status!=='CLOSED'" |
| | | class="el-icon-switch-button" |
| | | style="cursor: pointer;margin-left: 15px" |
| | | :style="{color:$store.state.settings.theme}" |
| | | :style="{color:'red'}" |
| | | @click.stop="orderClose(row)" |
| | | /> |
| | | <i |
| | | v-if="row.status==='CLOSED'" |
| | | class="el-icon-thumb" |
| | | style="cursor: pointer;margin-left: 15px" |
| | | :style="{color:$store.state.settings.theme}" |
| | | @click.stop="orderOpen(row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | |
| | | AddUpdateMesOrder, DeleteMesOrder, |
| | | MesBadOrderSearch, MesOrderDistribution, |
| | | MesOrderClosedSearch, |
| | | UpdateMesOrderStepSearch, MesOrderBitchClosedSeave |
| | | UpdateMesOrderStepSearch, MesOrderBitchClosedSeave, MesOrderBitchReverseClosedSeave |
| | | } from '@/api/WorkOrder' |
| | | import { PartSelect } from '@/api/ProductModel' |
| | | import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData' |
| | |
| | | tableHeight: 0, |
| | | username: '', |
| | | form: { |
| | | wkshopcode: '', |
| | | wkshopcode: [], |
| | | mesorderstus: '', // 工单状态码 |
| | | mesordercode: '', // 工单编号 |
| | | partcode: '', // 产品编码 |
| | |
| | | // } |
| | | |
| | | const data = { |
| | | wkshopcode: this.form.wkshopcode, |
| | | wkshopcode: this.form.wkshopcode.join(','), |
| | | mesorderstus: this.form.mesorderstus, // 工单状态码 |
| | | mesordercode: this.form.mesordercode, // 工单编号 |
| | | partcode: this.form.partcode, // 产品编码 |
| | |
| | | |
| | | // 重置 |
| | | reset(val) { |
| | | this.form.wkshopcode = '' |
| | | this.form.wkshopcode = [] |
| | | this.form.mesorderstus = '' |
| | | this.form.mesordercode = '' |
| | | this.form.partcode = '' |
| | |
| | | this.dialogVisibleTask = false |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val.map(i => i.wo_code) |
| | | // this.multipleSelection = val.map(i => i.wo_code) |
| | | this.multipleSelection = val |
| | | }, |
| | | |
| | | selected(row, index) { |
| | |
| | | }, |
| | | // 工单关闭事件 |
| | | async orderClose(row) { |
| | | this.$confirm('是否确认删除?', '提示', { |
| | | this.$confirm('是否确认关闭?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if (row) { // 行关闭工单 |
| | | this.multipleSelection = [row.wo_code] |
| | | let data = null |
| | | if (row) { // 行启动工单 |
| | | data = [row.wo_code] |
| | | } else { |
| | | data = this.multipleSelection.filter(i => i.status === 'CLOSED').map(i => i.wo_code) |
| | | } |
| | | MesOrderBitchClosedSeave(this.multipleSelection).then(res => { |
| | | MesOrderBitchClosedSeave(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$notify.success('关闭成功!') |
| | | // if (this.form.page > 1 && this.tableData.length === 1) { |
| | |
| | | this.$notify.info('已取消删除!') |
| | | }) |
| | | }, |
| | | // 工单启动事件 |
| | | async orderOpen(row) { |
| | | this.$confirm('是否确认启动?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let data = null |
| | | if (row) { // 行启动工单 |
| | | data = [row.wo_code] |
| | | } else { |
| | | data = this.multipleSelection.filter(i => i.status === 'CLOSED').map(i => i.wo_code) |
| | | } |
| | | |
| | | MesOrderBitchReverseClosedSeave(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$notify.success('启动成功!') |
| | | // if (this.form.page > 1 && this.tableData.length === 1) { |
| | | // this.form.page-- |
| | | // } |
| | | this.getMesOrderClosedSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$notify.info('已取消删除!') |
| | | }) |
| | | }, |
| | | // 对话框产品信息值改变 |
| | | partcodeChangeDialog(val) { |
| | | console.log(val) |