| | |
| | | |
| | | </div> |
| | | <div v-if="false" style="display: flex;padding-right: 10px"> |
| | | <el-button @click="ZZstart"> |
| | | <el-button v-waves @click="ZZstart"> |
| | | <svg-icon icon-class="start_time" style="margin-right: 2px" /> |
| | | 开始 |
| | | </el-button> |
| | | <el-button @click="ZZreport"> |
| | | <el-button v-waves @click="ZZreport"> |
| | | <svg-icon icon-class="report_work" style="margin-right: 2px" /> |
| | | 报工 |
| | | </el-button> |
| | |
| | | /> |
| | | <el-table-column |
| | | prop="status" |
| | | show-tooltip-when-overflow |
| | | label="状态" |
| | | sortable="custom" |
| | | width="80" |
| | |
| | | <div v-if="row.status==='ALLO'">已派发</div> |
| | | <div v-if="row.status==='START'">开工</div> |
| | | <div v-if="row.status==='CLOSED'">完工</div> |
| | | <div v-if="row.status==='NOSCHED'">待排程</div> |
| | | <div v-if="row.status==='SCHED'">已排程</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | label="产品编码" |
| | | min-width="110" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | |
| | | label="任务数量" |
| | | width="110" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | label="未报工数量" |
| | | width="120" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <!-- sortable="custom"--> |
| | | <template slot-scope="{row}"> |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | show-tooltip-when-overflow |
| | | label="已报工数量" |
| | | sortable="custom" |
| | | width="160" |
| | |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | show-tooltip-when-overflow |
| | | width="150" |
| | | sortable="custom" |
| | | /> |
| | |
| | | prop="bad_qty" |
| | | label="已报废数量" |
| | | width="120" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="plan_startdate" |
| | | label="计划开工日期" |
| | | show-tooltip-when-overflow |
| | | width="150" |
| | | sortable="custom" |
| | | > |
| | |
| | | label="计划完工日期" |
| | | width="150" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div class="operationClass">--> |
| | | <!-- <el-button type="text" @click="edit('edit',row)">编辑</el-button>--> |
| | | <!-- <el-button type="text" @click="del(row)">删除</el-button>--> |
| | | <!-- <el-button v-waves type="text" @click="edit('edit',row)">编辑</el-button>--> |
| | | <!-- <el-button v-waves type="text" @click="del(row)">删除</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | |
| | | |
| | | </div> |
| | | <div v-if="false" style="display: flex;padding-right: 10px"> |
| | | <el-button @click="WXsend"> |
| | | <el-button v-waves @click="WXsend"> |
| | | <svg-icon icon-class="start_time" style="margin-right: 2px" /> |
| | | 发料 |
| | | </el-button> |
| | | <el-button @click="WXback"> |
| | | <el-button v-waves @click="WXback"> |
| | | <svg-icon icon-class="report_work" style="margin-right: 2px" /> |
| | | 收料 |
| | | </el-button> |
| | |
| | | <el-table-column |
| | | prop="status" |
| | | label="状态" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | width="80" |
| | | > |
| | |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产品编码" |
| | | show-tooltip-when-overflow |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | |
| | | prop="stepname" |
| | | label="工序" |
| | | width="120" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <!-- <el-table-column--> |
| | |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | show-tooltip-when-overflow |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="未报工数量" |
| | | label="未收料数量" |
| | | width="120" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <!-- sortable="custom"--> |
| | | <template slot-scope="{row}"> |
| | |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="已收料数量" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | show-tooltip-when-overflow |
| | | width="150" |
| | | sortable="custom" |
| | | /> |
| | |
| | | label="已报废数量" |
| | | min-width="120" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | prop="plan_startdate" |
| | | label="计划开工日期" |
| | | show-tooltip-when-overflow |
| | | width="150" |
| | | sortable="custom" |
| | | > |
| | |
| | | <el-table-column |
| | | prop="plan_enddate" |
| | | label="计划完工日期" |
| | | show-tooltip-when-overflow |
| | | width="150" |
| | | sortable="custom" |
| | | fixed="right" |
| | |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div class="operationClass">--> |
| | | <!-- <el-button type="text" @click="edit('edit',row)">编辑</el-button>--> |
| | | <!-- <el-button type="text" @click="del(row)">删除</el-button>--> |
| | | <!-- <el-button v-waves type="text" @click="edit('edit',row)">编辑</el-button>--> |
| | | <!-- <el-button v-waves type="text" @click="del(row)">删除</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | show-tooltip-when-overflow |
| | | prop="wo_code" |
| | | label="工单号" |
| | | min-width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | show-tooltip-when-overflow |
| | | prop="partcode" |
| | | label="产品编码" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | show-tooltip-when-overflow |
| | | prop="partname" |
| | | min-width="160" |
| | | label="产品名称" |
| | |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="工序" |
| | | show-tooltip-when-overflow |
| | | min-width="120" |
| | | sortable="custom" |
| | | /> |
| | |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | label="已报工数量" |
| | | sortable="custom" |
| | | min-width="160" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | width="150" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | label="已报废数量" |
| | | width="120" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="repairHandle(row)">维修处理</el-button> |
| | | <el-button v-waves type="text" @click="repairHandle(row)">维修处理</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="dialogTitle" |
| | | :visible.sync="dialogVisible" |
| | | width="850px" |
| | |
| | | :model="dialogForm" |
| | | label-width="110px" |
| | | > |
| | | <el-form-item label="工单编号:"> |
| | | <el-form-item label="工单编号:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.wo_code }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码:"> |
| | | <el-form-item label="产品编码:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.partcode }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称:"> |
| | | <el-form-item label="产品名称:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.partname }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格:"> |
| | | <el-form-item label="产品规格:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.partspec }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="当前工序:"> |
| | | <el-form-item label="当前工序:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.stepname }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="false" label="工序描述:"> |
| | |
| | | </div> |
| | | <!-- </el-tooltip>--> |
| | | </el-form-item> |
| | | <el-form-item label="任务数量:"> |
| | | <el-form-item label="任务数量:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.planqty }}</div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="dialogTitle==='自制开始'" label="未开/已开:"> |
| | | <el-form-item v-if="dialogTitle==='自制开始'" label="未开/已开:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="未报/已报:"> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="未报/已报:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协发料'" label="未发/已发:"> |
| | | <el-form-item v-if="dialogTitle==='外协发料'" label="未发/已发:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协收料'" label="未收/已收:"> |
| | | <el-form-item v-if="dialogTitle==='外协收料'" label="未收/已收:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div> |
| | | </el-form-item> |
| | | <!--自制开始--> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 自制报工 --> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="下道工序:"> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="下道工序:" style="margin: 0 10px 0 0"> |
| | | <div style="width: 200px">{{ dialogForm.nextstepname }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" prop="usergroupcode" label="生产班组:"> |
| | | |
| | | <el-form-item v-if="dialogTitle==='自制报工'" prop="reckway" label="计件方式:"> |
| | | |
| | | <el-radio-group v-model="dialogForm.reckway" style="width: 200px;" @change="reckwayChange"> |
| | | <el-radio label="group">班组</el-radio> |
| | | <el-radio label="person">个人</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="dialogTitle==='自制报工'&&dialogForm.reckway==='group'" prop="usergroupcode" label="生产班组:"> |
| | | <el-select |
| | | v-model="dialogForm.usergroupcode" |
| | | style="width: 200px;" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="dialogTitle==='自制报工'&&dialogForm.reckway==='person'" prop="operation" label="报工人员:"> |
| | | <el-select |
| | | v-model="dialogForm.operation" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | @change="usergroupChange" |
| | | > |
| | | <el-option |
| | | v-for="item in OperationArr" |
| | | :key="item.usercode" |
| | | :label="item.username" |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="设备名称:" prop="eqpcode"> |
| | | <el-select |
| | | v-model="dialogForm.eqpcode" |
| | |
| | | <!-- <el-form-item v-if="dialogTitle==='自制报工'" label="报工人员:">--> |
| | | <!-- <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="报工人:"> |
| | | <el-select |
| | | v-model="dialogForm.operation" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in OperationArr" |
| | | :key="item.usercode" |
| | | :label="item.username" |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 注释--> |
| | | <!-- <el-form-item v-if="dialogTitle==='自制报工'" label="报工人:">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.operation"--> |
| | | <!-- style="width: 200px;"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in OperationArr"--> |
| | | <!-- :key="item.usercode"--> |
| | | <!-- :label="item.username"--> |
| | | <!-- :value="item.usercode"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="备注:"> |
| | | <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <div v-if="dialogTitle==='自制报工'"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 人员列表 |
| | | <el-button type="primary" style="margin: 10px 0" @click="userAdd">增行</el-button> |
| | | <div v-if="dialogTitle==='自制报工'&&dialogForm.reckway==='group'"> |
| | | <div style="display: flex;align-items:center;height: 40px;margin-bottom: 10px"> |
| | | <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> |
| | | <div style="margin: 0 15px 0 5px;">人员列表</div> |
| | | <el-button v-waves type="primary" style="margin: 10px 0" @click="userAdd">增行</el-button> |
| | | </div> |
| | | <el-table |
| | | ref="userTableDataRef" |
| | | :data="userTableData" |
| | |
| | | :row-class-name="tableRowClassName" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | height="180" |
| | | height="188" |
| | | highlight-current-row |
| | | style="width: 100%" |
| | | > |
| | |
| | | <el-table-column |
| | | prop="username" |
| | | label="人员名称" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.username }}</div> |
| | | |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="row.username" |
| | |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | <div v-else>{{ row.username }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ratio" |
| | | label="分配比例(%)" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input |
| | | v-if="row.isVisible===1||row.isVisible===2" |
| | | v-model="row.ratio" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | placeholder="请输入" |
| | | /> |
| | | <div v-else> {{ row.ratio }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="RowNum" |
| | | label="操作" |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="userDel(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===1&&!userIsSave" type="text" @click="userSave(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="userCancel(row)">取消</el-button> |
| | | <el-button |
| | | v-if="(row.isVisible===1&&!userIsSave)||row.isVisible===2" |
| | | v-waves |
| | | type="text" |
| | | @click="userSave(row)" |
| | | >保存 |
| | | </el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="userCancel(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="userDel(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="editRatio(row)">修改比例</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button v-waves @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='自制开始'" |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >开 工</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='自制报工'" |
| | | v-if="dialogTitle==='自制报工'&&dialogForm.nextstepname===''" |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >提交/打印</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='自制报工'&&dialogForm.nextstepname!==''" |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >提交</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='外协发料'" |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >发料</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='外协收料'" |
| | | v-if="dialogTitle==='外协收料'&&dialogForm.nextstepname===''" |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >收料/打印</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='外协收料'&&dialogForm.nextstepname!==''" |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >收料</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--打印预览页面 小标签--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | title="预览" |
| | | :visible.sync="dialogVisible2" |
| | | width="1140" |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisible2 = false">取 消</el-button> |
| | | <el-button v-print="printObj2" type="primary">确 定</el-button> |
| | | <el-button v-waves @click="dialogVisible2 = false">取 消</el-button> |
| | | <el-button v-waves v-print="printObj2" type="primary">确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 不良处理列表对话框--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | title="维修处理" |
| | | :visible.sync="badDialogVisible" |
| | | width="990px" |
| | |
| | | <div style="width: 200px">{{ badDialogForm.ng_qty }}</div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="维修人员:"> |
| | | <el-select |
| | | v-model="badDialogForm.operation" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in OperationArr" |
| | | :key="item.usercode" |
| | | :label="item.username" |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 注释--> |
| | | <!-- <el-form-item label="维修人员:">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="badDialogForm.operation"--> |
| | | <!-- style="width: 200px;"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in OperationArr"--> |
| | | <!-- :key="item.usercode"--> |
| | | <!-- :label="item.username"--> |
| | | <!-- :value="item.usercode"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | |
| | | </el-form> |
| | | <div style="margin-bottom:20px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 不良信息明细: |
| | | <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 不良信息明细: |
| | | </div> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="badEdit(row)">编辑</el-button> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="badDel(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="badEdit(row)">编辑</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="badDel(row)">删除</el-button> |
| | | |
| | | <el-button v-if="row.isVisible===1" type="text" @click="badSave(row)">确认</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="badCancel(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="badSave(row)">确认</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="badCancel(row)">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="badDialogVisibleCancel">取 消</el-button> |
| | | <el-button v-waves @click="badDialogVisibleCancel">取 消</el-button> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | |
| | | import QRCode from 'qrcodejs2' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { handleDatetime2 } from '@/utils/global' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | |
| | | components: { |
| | | Pagination |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | |
| | | |
| | | startqtySum: '', // 不能超过的数值 |
| | | |
| | | reckway: 'group', // 计件方式 |
| | | |
| | | operation: getCookie('navTabId'), // 报工人(收料人) |
| | | remarks: ''// 备注 |
| | | |
| | |
| | | ], |
| | | startqty: [ |
| | | { required: true, message: '请输入报工数量', trigger: ['blur', 'change'] } |
| | | ], |
| | | operation: [ |
| | | { required: true, message: '请选择报工人员', trigger: ['blur', 'change'] } |
| | | ] |
| | | }, |
| | | activeName: '', |
| | |
| | | this.getHeight() |
| | | |
| | | this.$nextTick(() => { |
| | | $("input[name='produceCode']")[0].focus() |
| | | $('input[name=\'produceCode\']')[0].focus() |
| | | // this.bindQRCode('10001;001') |
| | | }) |
| | | // webapp_urlprotocol_startup() |
| | |
| | | this.getMesOrderSelectUserAll() // 获取所有人员 |
| | | }, |
| | | methods: { |
| | | |
| | | // 计件方式值改变时 |
| | | reckwayChange() { |
| | | this.dialogForm.usergroupcode = '' |
| | | this.dialogForm.operation = '' |
| | | this.userTableData = [] |
| | | // console.log(this.$refs.dialogForm, 'log') |
| | | // this.$nextTick(() => { |
| | | // this.$refs.dialogForm.resetFields() |
| | | // }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | }, |
| | |
| | | if (this.$refs.elTabs.currentName === '0') { |
| | | this.$nextTick(() => { |
| | | this.getMesOrderStepSearch() |
| | | $("input[name='produceCode']")[0].focus() |
| | | $('input[name=\'produceCode\']')[0].focus() |
| | | this.WXform.orderstepqrcode = '' |
| | | }) |
| | | } |
| | | if (this.$refs.elTabs.currentName === '1') { |
| | | this.$nextTick(() => { |
| | | this.getMesOrderWxStepSearch() |
| | | $("input[name='WXproduceCode']")[0].focus() |
| | | $('input[name=\'WXproduceCode\']')[0].focus() |
| | | this.form.orderstepqrcode = '' |
| | | }) |
| | | } |
| | | if (this.$refs.elTabs.currentName === '2') { |
| | | this.$nextTick(() => { |
| | | this.getBadList() |
| | | $("input[name='badProduceCode']")[0].focus() |
| | | $('input[name=\'badProduceCode\']')[0].focus() |
| | | this.badForm.orderstepqrcode = '' |
| | | }) |
| | | } |
| | |
| | | this.dialogForm.startqty = obj.noreportqty |
| | | |
| | | this.dialogForm.nextstepname = obj.nextstepname |
| | | this.dialogForm.nextstepcode = obj.nextstepcode |
| | | this.dialogForm.nextstepcode = obj.nextstepcode ? obj.nextstepcode : obj.stepcode |
| | | |
| | | this.dialogForm.startqtySum = obj.noreportqty |
| | | |
| | | this.$refs.userTableDataRef.doLayout() |
| | | }) |
| | | |
| | | await this.getMesOrderStepStartSelectEqp() |
| | |
| | | this.dialogForm.stepcode = obj.stepcode |
| | | |
| | | this.dialogForm.nextstepname = obj.nextstepname |
| | | this.dialogForm.nextstepcode = obj.nextstepcode |
| | | this.dialogForm.nextstepcode = obj.nextstepcode ? obj.nextstepcode : obj.stepcode |
| | | |
| | | this.dialogForm.noputqty = obj.noputqty |
| | | this.dialogForm.stepseq = obj.seq |
| | |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | item.isVisible = 0 |
| | | item.number = number |
| | | // item.ratio = parseFloat((100 / this.userTableData.length).toFixed(2)) |
| | | }) |
| | | |
| | | this.ZZuserArr = [...this.ZZuserArr].filter(x => [...this.userTableData].every(y => y.usercode !== x.usercode)) |
| | | |
| | | this.$refs.tableDataRef.doLayout() |
| | | this.calculatedValue() |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef.doLayout() |
| | | this.$refs.userTableDataRef.doLayout() |
| | | }) |
| | | }, |
| | | calculatedValue() { |
| | | const total = 100 |
| | | let value = 0 |
| | | this.userTableData.forEach(item => { |
| | | item.ratio = parseFloat((100 / this.userTableData.length).toFixed(2)) |
| | | value += item.ratio |
| | | }) |
| | | console.log(value, 1) |
| | | if (value !== total) { |
| | | // let temp = this.userTableData |
| | | // temp[temp.length-1].ratio=temp[temp.length-1].ratio+(total-value) |
| | | this.userTableData[this.userTableData.length - 1].ratio = parseFloat((this.userTableData[this.userTableData.length - 1].ratio + (total - value)).toFixed(2)) |
| | | } |
| | | }, |
| | | // 修改分配比列 |
| | | editRatio(row) { |
| | | // console.log(row, 'row') |
| | | this.userTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | const number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | |
| | | this.userTableData.splice(index, 1, { |
| | | usercode: row.usercode, |
| | | username: row.username, |
| | | ratio: row.ratio, |
| | | isVisible: 2, |
| | | number: number === 0 ? (10 + Math.random()) : number |
| | | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 用户添加 |
| | | userAdd() { |
| | | if (this.userTableData.find(i => i.isVisible === 1)) { |
| | | return this.$message.info('请先保存当前行信息!') |
| | | } |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | console.log(this.userTableData, 6) |
| | | this.userTableData.unshift({ usercode: '', username: '', isVisible: 1, number: number }) |
| | | this.userTableData.unshift({ usercode: '', username: '', isVisible: 1, number: number, ratio: 0 }) |
| | | this.calculatedValue() |
| | | }, |
| | | // 用户列表删除 |
| | | userDel(row) { |
| | |
| | | this.userTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | |
| | | this.calculatedValue() |
| | | }, |
| | | // 用户列表保存 |
| | | userSave(row) { |
| | | console.log(row, 123) |
| | | if (row.usercode === '') { |
| | | return this.$message.info('人员名称不能为空!') |
| | | } |
| | | if (row.ratio === '') { |
| | | return this.$message.info('分配比列不能为空!') |
| | | } |
| | | |
| | | this.ZZuserArr.forEach((item, index) => { |
| | |
| | | |
| | | this.dialogForm.startqtySum = '' // 不能超过的数值 |
| | | |
| | | this.dialogForm.reckway = '' // 计件方式 |
| | | |
| | | this.dialogForm.nextstepcode = '' // 下道工序编码 |
| | | |
| | | this.dialogForm.reckway = 'group' |
| | | |
| | | this.dialogForm.remarks = '' // 备注 |
| | | this.dialogForm.operation = getCookie('navTabId') // 报工人(收料人) |
| | |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | if (this.dialogTitle === '外协发料') { |
| | | if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) { |
| | | return this.$message.info('发料数量不能大于未发数量!') |
| | |
| | | taskqty: this.dialogForm.planqty, // 任务数量 |
| | | fqty: this.dialogForm.fqty // 发料数量 |
| | | } |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | SavaMesOrderStepOut(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.dialogVisible = false |
| | |
| | | ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 不良数量 |
| | | badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 不良原因 |
| | | } |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | SavaMesOrderStepIn(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.dialogVisible = false |
| | | this.$message.success('收料成功!') |
| | | if (this.dialogForm.nextstepcode === '') { |
| | | this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username) |
| | | this.dialogVisible2 = true |
| | | } |
| | | // if (this.dialogForm.nextstepcode === '') { |
| | | // this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username) |
| | | this.WXprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username) |
| | | this.dialogVisible2 = true |
| | | // } |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | |
| | | taskqty: this.dialogForm.planqty, // 任务数量 |
| | | startqty: this.dialogForm.startqty// 开始数量 |
| | | } |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | SavaMesOrderStepStart(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.dialogVisible = false |
| | |
| | | if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.startqty) + parseFloat(this.dialogForm.noputqty)) { |
| | | return this.$message.info('报工数量加不良数量不能大于了未报数量!') |
| | | } |
| | | if (this.userTableData.length < 1) { |
| | | if (this.userTableData.length < 1 && this.dialogForm.reckway === 'group') { |
| | | return this.$message.info('人员列表不能为空!') |
| | | } |
| | | |
| | | if (parseFloat(this.dialogForm.noputqty) > 0) { |
| | | if (this.dialogForm.badcode.length < 1) { |
| | | return this.$message.info('请选择不良原因!') |
| | | } |
| | | } |
| | | // this.userTableData = [...new Set(this.userTableData)]// 数组去重 |
| | | this.userTableData = this.userTableData.filter(item => item.usercode !== '') |
| | |
| | | this.userTableData = this.userTableData.filter((currentValue, currentIndex, selfArr) => { |
| | | return selfArr.findIndex(item => item.usercode === currentValue.usercode) === currentIndex |
| | | }) |
| | | |
| | | if (this.dialogForm.reckway === 'group') { |
| | | let sum = 0 |
| | | this.userTableData.forEach(item => { |
| | | sum += parseFloat(item.ratio) |
| | | }) |
| | | if (Math.round(sum * 100) / 100 !== 100) { |
| | | return this.$message.info('分配比例总和必须为100!') |
| | | } |
| | | } |
| | | |
| | | if (parseFloat(this.dialogForm.noputqty) > 0) { |
| | | if (this.dialogForm.badcode.length < 1) { |
| | | return this.$message.info('请选择不良原因!') |
| | | } |
| | | } |
| | | |
| | | // console.log(this.userTableData, 1) |
| | | const reportuser = this.userTableData.map(item => item.usercode).join(';') |
| | | // const reportuser = this.userTableData.map(item => item.usercode).join(';')// 主要改的是这里的格式 |
| | | console.log(this.dialogForm.operation, 'dialogForm.operation') |
| | | const data = { |
| | | mesordercode: this.dialogForm.wo_code, // 工单编号 |
| | | partcode: this.dialogForm.partcode, // 产品编码 |
| | |
| | | stepcode: this.dialogForm.stepcode, // 工序编码 |
| | | eqpcode: this.dialogForm.eqpcode, // 设备编码 |
| | | usergroupcode: this.dialogForm.usergroupcode, // 班组编码 |
| | | reportuser: reportuser, // 报工人员 |
| | | // reportuser: reportuser, // 报工人员 |
| | | reportuser: this.dialogForm.reckway === 'group' ? this.userTableData : [{ |
| | | usercode: this.dialogForm.operation, |
| | | ratio: 100 |
| | | }], |
| | | taskqty: this.dialogForm.planqty, // 任务数量 |
| | | // startqty: this.dialogForm.startqty, // 开工数量 |
| | | startqty: this.dialogForm.reportqty, // 开工数量 |
| | | // reportqty: this.dialogForm.reportqty, // 报工数量 |
| | | reportqty: this.dialogForm.startqty, // 报工数量 |
| | | remarks: this.dialogForm.remarks, // 备注 |
| | | reckway: this.dialogForm.reckway, // 计件方式 |
| | | ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 不良数量 |
| | | badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 不良原因 |
| | | } |
| | | |
| | | // console.log(JSON.stringify(data), 'data') |
| | | console.log(data, 'data') |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | SavaMesOrderStepReport(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.dialogVisible = false |
| | | this.$message.success('报工成功!') |
| | | if (this.dialogForm.nextstepcode === '') { |
| | | this.ZZprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username) |
| | | this.dialogVisible2 = true |
| | | } |
| | | // if (this.dialogForm.nextstepcode === '') { |
| | | this.ZZprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username) |
| | | this.dialogVisible2 = true |
| | | // } |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | |
| | | Data: this.badTableDataDialog |
| | | } |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | EditOrderNgStepSeave(data, this.badDialogForm.operation).then(res => { |
| | | EditOrderNgStepSeave(data, getCookie('navTabId')).then(res => { |
| | | if (res.code === '200' || res.code === '301') { |
| | | this.getBadList() |
| | | this.badDialogVisible = false |
| | | this.badPrint(this.OperationArr.find(item => item.usercode === this.badDialogForm.operation).username) |
| | | this.badPrint(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username) |
| | | this.dialogVisible2 = true |
| | | this.$message.success('保存成功!') |
| | | |