| | |
| | | <template> |
| | | <div> |
| | | <div class="body" style="padding: 0;height: 100%" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <el-tabs type="border-card"> |
| | | <div class="body" style="padding-top: 10px;" :style="{height:mainHeight+'px'}"> |
| | | <el-tabs ref="elTabs" v-model="activeName" type="border-card" @tab-click="tabClick"> |
| | | <el-tab-pane label="生产列表"> |
| | | <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between"> |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="width: 70px">工序码:</div> |
| | | <div style="width: 90px">扫描条码:</div> |
| | | <!-- oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"--> |
| | | <el-input |
| | | v-model="produceCode" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | id="keyWords" |
| | | v-model="form.orderstepqrcode" |
| | | name="produceCode" |
| | | style="width: 500px" |
| | | style="width: 300px" |
| | | @keyup.enter.native="val=>enterNative(val,'produceCode')" |
| | | /> |
| | | <!-- @keyup.native="e=>judgeIsScanning(e,'produceCode')"--> |
| | | |
| | | </div> |
| | | <div style="display: flex;padding-right: 10px"> |
| | | <el-button><svg-icon icon-class="start_time" style="margin-right: 2px" />开始</el-button> |
| | | <el-button><svg-icon icon-class="report_work" style="margin-right: 2px" />报工</el-button> |
| | | <div v-if="false" style="display: flex;padding-right: 10px"> |
| | | <el-button @click="ZZstart"> |
| | | <svg-icon icon-class="start_time" style="margin-right: 2px" /> |
| | | 开始 |
| | | </el-button> |
| | | <el-button @click="ZZreport"> |
| | | <svg-icon icon-class="report_work" style="margin-right: 2px" /> |
| | | 报工 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | :height="tableHeight" |
| | | :height="isIpad? (tableHeight+50):tableHeight" |
| | | border |
| | | stripe |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | width="50" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-radio--> |
| | | <!-- v-model="radioSelected"--> |
| | | <!-- :label="row.wo"--> |
| | | <!-- style="color: #fff;padding-left: 10px; margin-right: -25px;"--> |
| | | <!-- @change.native="getCurrentRow(row.wo)"--> |
| | | <!-- />--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="org_code" |
| | | prop="status" |
| | | label="状态" |
| | | sortable="custom" |
| | | /> |
| | | width="80" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.status==='NEW'">新订单</div> |
| | | <div v-if="row.status==='ALLO'">已派发</div> |
| | | <div v-if="row.status==='START'">开工</div> |
| | | <div v-if="row.status==='CLOSED'">完工</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="org_name" |
| | | prop="wo_code" |
| | | label="工单号" |
| | | width="160" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="description" |
| | | prop="partcode" |
| | | label="产品编码" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | prop="partname" |
| | | width="160" |
| | | show-tooltip-when-overflow |
| | | label="产品名称" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | prop="stepname" |
| | | label="工序" |
| | | show-tooltip-when-overflow |
| | | width="120" |
| | | sortable="custom" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="descr"--> |
| | | <!-- label="工序描述"--> |
| | | <!-- min-width="150"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.descr">{{ row.descr }}</div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | label="工序描述" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | label="已报工数量" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="不良数量" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="计划开工日期" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | label="未报工数量" |
| | | width="120" |
| | | > |
| | | <!-- sortable="custom"--> |
| | | <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> |
| | | </div> |
| | | <div>{{ row.plan_qty - row.good_qty - row.ng_qty }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="已报工数量" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | width="150" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="bad_qty" |
| | | label="已报废数量" |
| | | width="120" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="plan_startdate" |
| | | label="计划开工日期" |
| | | width="150" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="plan_enddate" |
| | | label="计划完工日期" |
| | | width="150" |
| | | sortable="custom" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- label="操作"--> |
| | | <!-- width="150"--> |
| | | <!-- 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>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | </div> |
| | | <!--分页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getMesOrderStepSearch" |
| | | /> |
| | |
| | | <el-tab-pane label="外协列表"> |
| | | <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between"> |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="width: 70px">工序码:</div> |
| | | <div style="width: 90px;">外协类型:</div> |
| | | <el-select |
| | | v-model="WXSelected" |
| | | filterable |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in WXSelectArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | <div style="width: 90px;margin-left: 20px">扫描条码:</div> |
| | | <el-input |
| | | v-model="produceCode" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | name="produceCode" |
| | | style="width: 500px" |
| | | v-model="WXform.orderstepqrcode" |
| | | name="WXproduceCode" |
| | | style="width: 300px" |
| | | @keyup.enter.native="val=>enterNative(val,'WXproduceCode')" |
| | | /> |
| | | <!-- @keyup.native="e=>judgeIsScanning(e,'WXproduceCode')"--> |
| | | |
| | | </div> |
| | | <div style="display: flex;padding-right: 10px"> |
| | | <el-button><svg-icon icon-class="start_time" style="margin-right: 2px" />发料</el-button> |
| | | <el-button><svg-icon icon-class="report_work" style="margin-right: 2px" />收料</el-button> |
| | | <div v-if="false" style="display: flex;padding-right: 10px"> |
| | | <el-button @click="WXsend"> |
| | | <svg-icon icon-class="start_time" style="margin-right: 2px" /> |
| | | 发料 |
| | | </el-button> |
| | | <el-button @click="WXback"> |
| | | <svg-icon icon-class="report_work" style="margin-right: 2px" /> |
| | | 收料 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData" |
| | | :height="tableHeight" |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | | :data="WXtableData" |
| | | :height="isIpad? (tableHeight+50):tableHeight" |
| | | border |
| | | stripe |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | @sort-change="WXsortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | width="50" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-radio--> |
| | | <!-- v-model="radioSelected"--> |
| | | <!-- :label="row.wo"--> |
| | | <!-- style="color: #fff;padding-left: 10px; margin-right: -25px;"--> |
| | | <!-- @change.native="getCurrentRow(row.wo)"--> |
| | | <!-- />--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="org_code" |
| | | prop="status" |
| | | label="状态" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="org_name" |
| | | label="工单号" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="description" |
| | | label="产品编码" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | label="产品名称" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | label="工序" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | label="工序描述" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | label="任务数量" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | label="已报工数量" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="不良数量" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="计划开工日期" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="80" |
| | | > |
| | | <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> |
| | | </div> |
| | | <div v-if="row.status==='NEW'">新订单</div> |
| | | <div v-if="row.status==='ALLO'">已派发</div> |
| | | <div v-if="row.status==='START'">已发料</div> |
| | | <div v-if="row.status==='CLOSED'">已收料</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="工单号" |
| | | width="160" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产品编码" |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | width="160" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="工序" |
| | | width="120" |
| | | sortable="custom" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="descr"--> |
| | | <!-- label="工序描述"--> |
| | | <!-- min-width="150"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.descr">{{ row.descr }}</div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="未报工数量" |
| | | width="120" |
| | | > |
| | | <!-- sortable="custom"--> |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.plan_qty - row.good_qty - row.ng_qty }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="已收料数量" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | width="150" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="bad_qty" |
| | | label="已报废数量" |
| | | min-width="120" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="plan_startdate" |
| | | label="计划开工日期" |
| | | width="150" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="plan_enddate" |
| | | label="计划完工日期" |
| | | width="150" |
| | | sortable="custom" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- label="操作"--> |
| | | <!-- width="150"--> |
| | | <!-- 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>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | </div> |
| | | <!--分页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | :total="WXtotal" |
| | | :page.sync="WXform.page" |
| | | :limit.sync="WXform.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getMesOrderStepSearch" |
| | | /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="不良待处理列表"> |
| | | <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between"> |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="width: 90px">扫描条码:</div> |
| | | <!-- oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"--> |
| | | |
| | | <el-input |
| | | v-model="badForm.orderstepqrcode" |
| | | name="badProduceCode" |
| | | style="width: 300px" |
| | | @keyup.enter.native="val=>enterNative(val,'badProduceCode')" |
| | | /> |
| | | <!-- @keyup.native="e=>judgeIsScanning(e,'badProduceCode')"--> |
| | | |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | | :data="badTableData" |
| | | :height="isIpad? (tableHeight+50):tableHeight" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="badSortChange" |
| | | > |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="工单号" |
| | | min-width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产品编码" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | min-width="160" |
| | | label="产品名称" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="工序" |
| | | min-width="120" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="已报工数量" |
| | | sortable="custom" |
| | | min-width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | width="150" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="bad_qty" |
| | | label="已报废数量" |
| | | width="120" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="repairHandle(row)">维修处理</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | </div> |
| | | <!--分页--> |
| | | <pagination |
| | | :total="badTotal" |
| | | :page.sync="badForm.page" |
| | | :limit.sync="badForm.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getBadList" |
| | | /> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'新增':'编辑'" |
| | | :title="dialogTitle" |
| | | :visible.sync="dialogVisible" |
| | | width="60%" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | width="850px" |
| | | class="dialogVisible" |
| | | :top="dialogTitle==='自制报工'?'5vh':'15vh'" |
| | | :close-on-click-modal="false" |
| | | @close="handleClose" |
| | | @closed="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="组织类型" prop="OrgType" /> |
| | | <el-form-item label="组织编码" prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | <el-form |
| | | ref="dialogForm" |
| | | inline |
| | | :rules="dialogFormRules" |
| | | :model="dialogForm" |
| | | label-width="110px" |
| | | > |
| | | <el-form-item label="工单编号:"> |
| | | <div style="width: 200px">{{ dialogForm.wo_code }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="组织名称" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 200px" /> |
| | | <el-form-item label="产品编码:"> |
| | | <div style="width: 200px">{{ dialogForm.partcode }}</div> |
| | | </el-form-item> |
| | | <el-form-item prop="SupUnit" label="上级单位"> |
| | | <el-form-item label="产品名称:"> |
| | | <div style="width: 200px">{{ dialogForm.partname }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格:"> |
| | | <div style="width: 200px">{{ dialogForm.partspec }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="当前工序:"> |
| | | <div style="width: 200px">{{ dialogForm.stepname }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="false" label="工序描述:"> |
| | | <!-- <el-tooltip class="item" effect="dark" content="原材料切按材料切按材料切按时打卡数据的卡" placement="top-start">--> |
| | | <div style="width: 200px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"> |
| | | {{ dialogForm.stepdesc }} |
| | | </div> |
| | | <!-- </el-tooltip>--> |
| | | </el-form-item> |
| | | <el-form-item label="任务数量:"> |
| | | <div style="width: 200px">{{ dialogForm.planqty }}</div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="dialogTitle==='自制开始'" label="未开/已开:"> |
| | | <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="未报/已报:"> |
| | | <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协发料'" label="未发/已发:"> |
| | | <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协收料'" label="未收/已收:"> |
| | | <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div> |
| | | </el-form-item> |
| | | <!--自制开始--> |
| | | <el-form-item v-if="dialogTitle==='自制开始'" label="开工数量:"> |
| | | <div style="width: 200px">{{ dialogForm.startqty }}</div> |
| | | <!-- <div style="width: 200px">{{ dialogForm.noreportqty }}</div>--> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制开始'" prop="eqpcode" label="生产设备:"> |
| | | <el-select |
| | | v-model="dialogForm.SupUnit" |
| | | style="width: 200px" |
| | | v-model="dialogForm.eqpcode" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | | v-for="item in SupUnitArr" |
| | | v-for="item in ZZeqpArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 自制报工 --> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="下道工序:"> |
| | | <div style="width: 200px">{{ dialogForm.nextstepname }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" prop="usergroupcode" label="生产班组:"> |
| | | <el-select |
| | | v-model="dialogForm.usergroupcode" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | @change="usergroupChange" |
| | | > |
| | | <el-option |
| | | v-for="item in ZZtreams" |
| | | :key="item.group_code" |
| | | :label="item.group_name" |
| | | :value="item.group_code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="设备名称:" prop="eqpcode"> |
| | | <el-select |
| | | v-model="dialogForm.eqpcode" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in ZZeqpArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="报工数量:" prop="startqty"> |
| | | <el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | <!-- <el-input v-model="dialogForm.noreportqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />--> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="不良数量:"> |
| | | <el-input v-model="dialogForm.noputqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="不良原因:"> |
| | | <el-select |
| | | v-model="dialogForm.badcode" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | :disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''" |
| | | multiple |
| | | collapse-tags |
| | | > |
| | | <el-option |
| | | v-for="item in badArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </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>--> |
| | | <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> |
| | | <el-table |
| | | ref="userTableDataRef" |
| | | :data="userTableData" |
| | | border |
| | | class="tableFixed" |
| | | :row-class-name="tableRowClassName" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | height="180" |
| | | highlight-current-row |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | width="100" |
| | | label="序号" |
| | | type="index" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="username" |
| | | label="人员名称" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.username }}</div> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="row.username" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | @change="val=>usernameChange(val,row)" |
| | | > |
| | | <el-option |
| | | v-for="item in ZZuserArr" |
| | | :key="item.usercode" |
| | | :label="item.username" |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | label="操作" |
| | | fixed="right" |
| | | > |
| | | <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> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--分页--> |
| | | <pagination |
| | | :total="UserTotal" |
| | | :page.sync="Userform.page" |
| | | :limit.sync="Userform.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getMesOrderStepSearch" |
| | | /> |
| | | </div> |
| | | <!-- 外协发料--> |
| | | <el-form-item |
| | | v-if="dialogTitle==='外协发料'" |
| | | label="外协供方:" |
| | | prop="wxcode" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.wxcode" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in WXouterprovide" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="dialogTitle==='外协发料'" |
| | | label="发料人员:" |
| | | prop="outuser" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.outuser" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in WXoutuser" |
| | | :key="item.usercode" |
| | | :label="item.username" |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="dialogTitle==='外协发料'" |
| | | label="发料数量:" |
| | | prop="fqty" |
| | | > |
| | | <el-input v-model="dialogForm.fqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <!-- 外协收料--> |
| | | <el-form-item |
| | | v-if="dialogTitle==='外协收料'" |
| | | label="下道工序:" |
| | | > |
| | | <div style="width: 200px">{{ dialogForm.nextstepname }}</div> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="dialogTitle==='外协收料'" |
| | | label="外协供方:" |
| | | prop="wxcode" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.wxcode" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in WXouterprovide" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="dialogTitle==='外协收料'" |
| | | label="收料人员:" |
| | | prop="inuser" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.inuser" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in WXoutuser" |
| | | :key="item.usercode" |
| | | :label="item.username" |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="dialogTitle==='外协收料'" |
| | | label="收料数量:" |
| | | prop="sqty" |
| | | > |
| | | <el-input |
| | | v-model="dialogForm.sqty" |
| | | style="width: 200px" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="dialogTitle==='外协收料'" |
| | | label="不良数量:" |
| | | prop="noputqty" |
| | | > |
| | | <el-input |
| | | v-model="dialogForm.noputqty" |
| | | style="width: 200px" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="dialogTitle==='外协收料'" |
| | | label="不良原因:" |
| | | > |
| | | <!-- prop="badcode"--> |
| | | <el-select |
| | | v-model="dialogForm.badcode" |
| | | style="width: 200px;" |
| | | multiple |
| | | collapse-tags |
| | | :disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in badArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </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> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='自制开始'" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >开 工</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='自制报工'" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >提交/打印</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='外协发料'" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >发料</el-button> |
| | | <el-button |
| | | v-if="dialogTitle==='外协收料'" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >收料/打印</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--打印预览页面 小标签--> |
| | | <el-dialog |
| | | title="预览" |
| | | :visible.sync="dialogVisible2" |
| | | width="1140" |
| | | top="10vh" |
| | | :close-on-click-modal="false" |
| | | @close="dialogVisible2Close" |
| | | > |
| | | <!-- 要打印的区域 --> |
| | | <div id="printMe2" style="padding: 30px;"> |
| | | <div |
| | | style="display: flex;width: 280px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | > |
| | | |
| | | <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 90px;border-bottom:1px solid #000; |
| | | justify-content: center;align-items: center;position: relative" |
| | | > |
| | | <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" /> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center" |
| | | > |
| | | <div style="margin-left: 5px;width: 28px">数量:</div> |
| | | {{ qrForm.startqty }} |
| | | </div> |
| | | <div style="display: flex;height: 30px;justify-content: flex-start;align-items: center"> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ qrForm.operator }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width:190px;display: flex;flex-direction: column"> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width: 60px;margin-left: 5px;">工单编号:</div> |
| | | <div>{{ qrForm.wo_code }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left" |
| | | > |
| | | <div style="width: 60px;margin-left: 5px;">产品编码:</div> |
| | | <div>{{ qrForm.partcode }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width:60px;margin-left: 5px;">产品名称:</div> |
| | | <div>{{ qrForm.partname }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width:60px;margin-left: 5px;">下道工序:</div> |
| | | <div>{{ qrForm.nextstepname }}</div> |
| | | </div> |
| | | <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left"> |
| | | <div style="width: 60px;margin-left: 5px;">处理时间:</div> |
| | | <div>{{ qrForm.operatorTime }}</div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </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> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 不良处理列表对话框--> |
| | | <el-dialog |
| | | title="维修处理" |
| | | :visible.sync="badDialogVisible" |
| | | width="990px" |
| | | class="badDialogVisible" |
| | | top="10vh" |
| | | :close-on-click-modal="false" |
| | | @close="handleCloseBad" |
| | | @closed="handleCloseBad" |
| | | > |
| | | <el-form |
| | | inline |
| | | :model="badDialogForm" |
| | | label-width="110px" |
| | | > |
| | | <el-form-item label="工单编号:"> |
| | | <div style="width: 200px">{{ badDialogForm.wo_code }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码:"> |
| | | <div style="width: 200px">{{ badDialogForm.partcode }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称:"> |
| | | <div style="width: 200px">{{ badDialogForm.partname }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格:"> |
| | | <div style="width: 200px">{{ badDialogForm.partspec }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="当前工序:"> |
| | | <div style="width: 200px">{{ badDialogForm.stepname }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="下道工序:"> |
| | | <div style="width: 200px">{{ badDialogForm.nextstepname }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="任务数量:"> |
| | | <div style="width: 200px">{{ badDialogForm.plan_qty }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="报工数量:"> |
| | | <div style="width: 200px">{{ badDialogForm.good_qty }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="不良数量:"> |
| | | <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> |
| | | <div style="margin-bottom:20px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 不良信息明细: |
| | | </div> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="badTableDataDialog" |
| | | :height="isIpad? (tableHeight-350):(tableHeight-400)" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:(tableHeight-400)+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="step_code" |
| | | label="工序编码" |
| | | min-width="80" |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="工序名称" |
| | | min-width="80" |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | width="80" |
| | | /> |
| | | <el-table-column |
| | | label="报工数量" |
| | | width="80" |
| | | prop="report_qty" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | width="80" |
| | | /> |
| | | <el-table-column |
| | | prop="badqty" |
| | | label="已报废数量" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | prop="defect_name" |
| | | label="不良原因" |
| | | show-tooltip-when-overflow |
| | | width="80" |
| | | /> |
| | | <el-table-column |
| | | prop="repair_qty" |
| | | label="维修合格数量" |
| | | width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- {{ row.repair_qty }}--> |
| | | <div v-if="row.isVisible===0">{{ row.repair_qty }}</div> |
| | | <el-input v-if="row.isVisible===1" v-model="row.repair_qty" oninput="value=value.replace(/[^0-9]/g,'')" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="bad_qty" |
| | | label="报废数量" |
| | | width="90" |
| | | > |
| | | <!-- oninput="value=value.replace(/[0-9]/g,'')"--> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.bad_qty }}</div> |
| | | <el-input v-if="row.isVisible===1" v-model="row.bad_qty" oninput="value=value.replace(/[^0-9]/g,'')" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | width="100" |
| | | > |
| | | <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===1" type="text" @click="badSave(row)">确认</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="badCancel(row)">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="badDialogVisibleCancel">取 消</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="badDialogVisibleConfirm " |
| | | >保 存/打 印</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import $ from 'jquery' |
| | | import { MesOrderStepSearch } from '@/api/scgl' |
| | | import { |
| | | MesOrderGroupSelectUser, |
| | | MesOrderSelectUser, |
| | | MesOrderStepReportSelectUserGroup, |
| | | MesOrderStepSearch, |
| | | MesOrderStepStart, |
| | | MesOrderStepStartSelectEqp, |
| | | MesOrderWxStepSearch, |
| | | MesOrderStepSelectWX, |
| | | SavaMesOrderStepOut, |
| | | MesOrderStepSelectCause, |
| | | SavaMesOrderStepIn, |
| | | SavaMesOrderStepStart, |
| | | SavaMesOrderStepReport, MesOrderNgStepSearch, MesOrderNgSubStepSearch, EditOrderNgStepSeave |
| | | } from '@/api/scgl' |
| | | import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp' |
| | | import QRCode from 'qrcodejs2' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { handleDatetime2 } from '@/utils/global' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Zzjg', |
| | | name: 'SCKBG', |
| | | components: { |
| | | Pagination |
| | | }, |
| | |
| | | return { |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | produceCode: '', // 工序码 |
| | | isIpad: false, |
| | | // produceCode: '', // 工序码 |
| | | // WXproduceCode: '', // 外协工序码 |
| | | radioSelected: '', // 工序选中 |
| | | WXradioSelected: '', // 工序选中 |
| | | form: { |
| | | orderstepqrcode: '', // 扫描的二维码信息 |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc', // 排序字段 |
| | | prop: 'wo_code', // 排序字段 |
| | | order: 'asc', // 排序字段 |
| | | page: 1, // 第几页 |
| | | rows: 20 // 每页多少条 |
| | | }, |
| | | |
| | | total: 10, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// 上级单位 |
| | | WXform: { // 外协表单 |
| | | orderstepqrcode: '', // 扫描的二维码信息 |
| | | prop: 'wo_code', // 排序字段z |
| | | order: 'asc', // 排序字段 |
| | | page: 1, // 第几页 |
| | | rows: 20 // 每页多少条 |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请输入选择类型', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请输入名称', trigger: ['blur', 'change'] } |
| | | ], |
| | | SupUnit: [ |
| | | { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] } |
| | | ] |
| | | } |
| | | WXtotal: 10, // 外协表单总数 |
| | | WXtableData: [], // 外协表 |
| | | |
| | | WXSelectArr: [// 外协类型下拉列表 |
| | | { code: 'OUT', name: '发料' }, |
| | | { code: 'IN', name: '收料' } |
| | | ], |
| | | WXSelected: 'OUT', // 外协下拉列表选中值 |
| | | dialogVisible: false, |
| | | dialogTitle: '', // 自制开始、自制报工、外协发料、外协收料 |
| | | dialogForm: { |
| | | wo_code: '', // 工单编号 |
| | | partcode: '', // 产品编码 |
| | | partname: '', // 产品名称 |
| | | partspec: '', // 产品规格 |
| | | stepseq: '', // 工序序号 |
| | | stepcode: '', // 工序编码 |
| | | stepname: '', // 当前工序名 |
| | | nextstepname: '', // 下一道工序名 |
| | | stepdesc: '', // 工序描述 |
| | | planqty: '', // 任务数量 |
| | | reportqty: '', // 已报数量 |
| | | noreportqty: '', // 未报数量 |
| | | startqty: '', // 开(报)工数量 |
| | | |
| | | wxcode: '', // 外协供应商编码 |
| | | outuser: '', // 发料人员 |
| | | taskqty: '', // 任务数量 |
| | | fqty: '', // 发料数量 |
| | | |
| | | inuser: getCookie('navTabId'), // 收料人员 |
| | | sqty: '', // 收料数量 |
| | | ngqty: '', // 不良数量 |
| | | badcode: '', // 不良原因编码 |
| | | |
| | | noputqty: '', // 不良数量 |
| | | |
| | | eqpcode: '', // 生产设备编码 |
| | | |
| | | usergroupcode: '', // 班组编码 |
| | | reportuser: '', // 报工人员 |
| | | |
| | | startqtySum: '', // 不能超过的数值 |
| | | |
| | | operation: getCookie('navTabId'), // 报工人(收料人) |
| | | remarks: ''// 备注 |
| | | |
| | | }, |
| | | ZZuserArr: [], // 自制用户所有 |
| | | ZZtreams: [], // 自制生产班组数组 |
| | | ZZeqpArr: [], // 自制设备名称 |
| | | badArr: [], // 不良原因数组 |
| | | WXouterprovide: [], // 外协供方数组 |
| | | WXoutuser: [], // 发料人员数组 |
| | | userTableData: [], // 人员列表 |
| | | UserTotal: 0, |
| | | Userform: {}, |
| | | userIsSave: false, // 此人员是否可保持 |
| | | dialogFormRules: { |
| | | outuser: [ |
| | | { required: true, message: '请选择发料人员', trigger: ['blur', 'change'] } |
| | | ], |
| | | fqty: [ |
| | | { required: true, message: '请输入发料数量', trigger: ['blur', 'change'] } |
| | | ], |
| | | wxcode: [ |
| | | { required: true, message: '请选择外协供方', trigger: ['blur', 'change'] } |
| | | ], |
| | | inuser: [ |
| | | { required: true, message: '请选择收料人员', trigger: ['blur', 'change'] } |
| | | ], |
| | | sqty: [ |
| | | { required: true, message: '请输入收料数量', trigger: ['blur', 'change'] } |
| | | ], |
| | | // noputqty: [ |
| | | // { required: true, message: '请输入不良数量', trigger: ['blur', 'change'] } |
| | | // ], |
| | | // badcode: [ |
| | | // { required: true, message: '请选择不良原因', trigger: ['blur', 'change'] } |
| | | // ] |
| | | eqpcode: [ |
| | | { required: true, message: '请选择生产设备', trigger: ['blur', 'change'] } |
| | | ], |
| | | usergroupcode: [ |
| | | { required: true, message: '请选择生产班组', trigger: ['blur', 'change'] } |
| | | ], |
| | | startqty: [ |
| | | { required: true, message: '请输入报工数量', trigger: ['blur', 'change'] } |
| | | ] |
| | | }, |
| | | activeName: '', |
| | | dialogVisible2: false, |
| | | printObj2: { |
| | | id: 'printMe2', |
| | | popTitle: '打印模板', |
| | | preview: false, |
| | | extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>', |
| | | closeCallback(vue) { // 关闭打印的回调事件(无法确定点击的是确认还是取消) |
| | | console.log('11212', vue) |
| | | // vue.dialogVisible = false |
| | | vue.dialogVisible2 = false |
| | | vue.dialogVisible = false |
| | | }, |
| | | beforeOpenCallback(vue) { |
| | | vue.printLoading = true |
| | | console.log('打开之前') |
| | | console.log() |
| | | }, |
| | | openCallback(vue) { |
| | | vue.printLoading = false |
| | | console.log('执行了打印') |
| | | } |
| | | }, |
| | | qrForm: { // 打印内容 |
| | | qrvalue: '', |
| | | startqty: '', |
| | | wo_code: '', |
| | | partcode: '', |
| | | partname: '', |
| | | nextstepname: '', |
| | | operator: '', // 操作人 |
| | | operatorTime: ''// 操作时间 |
| | | }, |
| | | badForm: { |
| | | orderstepqrcode: '', // 扫描的二维码 |
| | | prop: 'wo_code', |
| | | order: 'asc', |
| | | page: 1, |
| | | rows: 20 |
| | | }, |
| | | badTableData: [], // 不良处理列表table数据 |
| | | badTotal: 0, |
| | | badDialogVisible: false, |
| | | badDialogForm: { |
| | | operation: getCookie('navTabId') |
| | | }, |
| | | badTableDataDialog: [], // 不良对话框table表格 |
| | | OperationArr: [], // 人员数组 |
| | | sendButtonIsDisabled: false, // 下达按钮是否可点击 |
| | | judgeIsScanningArr: [], // 判断是否扫码数组 |
| | | countJudgeIsScanningInput: 0 // 判断扫码框的个数 |
| | | } |
| | | }, |
| | | watch: { |
| | | // 'form.orderstepqrcode': { |
| | | // handler(newValue) { |
| | | // this.form.orderstepqrcode = newValue |
| | | // |
| | | // // 在这里调用,并执行this.fnThrottle(this.search, 500, 2000)(); |
| | | // this.fnThrottle(this.enterNative, 500, 2000, 'produceCode')() |
| | | // } |
| | | // }, |
| | | // 'WXform.orderstepqrcode': { |
| | | // handler(newValue) { |
| | | // this.form.orderstepqrcode = newValue |
| | | // |
| | | // // 在这里调用,并执行this.fnThrottle(this.search, 500, 2000)(); |
| | | // this.fnThrottle(this.enterNative, 500, 2000, 'WXproduceCode')() |
| | | // } |
| | | // }, |
| | | // 'badForm.orderstepqrcode': { |
| | | // handler(newValue) { |
| | | // this.form.orderstepqrcode = newValue |
| | | // |
| | | // // 在这里调用,并执行this.fnThrottle(this.search, 500, 2000)(); |
| | | // this.fnThrottle(this.enterNative, 500, 2000, 'badProduceCode')() |
| | | // } |
| | | // } |
| | | }, |
| | | |
| | | created() { |
| | | this.getMesOrderStepSearch() |
| | | this.tabClick() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | |
| | | this.$nextTick(() => { |
| | | $("input[name='produceCode']").focus() |
| | | $("input[name='produceCode']")[0].focus() |
| | | // this.bindQRCode('10001;001') |
| | | }) |
| | | // webapp_urlprotocol_startup() |
| | | // webapp_ws_autoupdate(true) |
| | | |
| | | this.getMesOrderSelectUserAll() // 获取所有人员 |
| | | }, |
| | | methods: { |
| | | |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | }, |
| | | async getMesOrderStepSearch() { |
| | | // const res = await MesOrderStepSearch(this.form) |
| | | // this.tableData = res.data |
| | | // this.total = res.count |
| | | const res = await MesOrderStepSearch(this.form) |
| | | if (res.code === '200') { |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | } |
| | | }, |
| | | async getMesOrderWxStepSearch() { |
| | | const res = await MesOrderWxStepSearch(this.WXform) |
| | | if (res.code === '200') { |
| | | this.WXtableData = res.data |
| | | } |
| | | }, |
| | | // 排序改变时 |
| | | sortChange({ column, prop, order }) { |
| | |
| | | this.form.prop = prop |
| | | this.getMesOrderStepSearch() |
| | | }, |
| | | getCurrentRow() { |
| | | // WX排序改变时 |
| | | WXsortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.WXform.order = order |
| | | this.WXform.prop = prop |
| | | this.getMesOrderWxStepSearch() |
| | | }, |
| | | badSortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.badForm.order = order |
| | | this.badForm.prop = prop |
| | | this.getBadList() |
| | | }, |
| | | // 自制页签原点点击 |
| | | getCurrentRow(val) { |
| | | |
| | | }, |
| | | // 外协页签原点点击 |
| | | getWXCurrentRow(val) { |
| | | console.log(val) |
| | | this.WXradioSelected = val |
| | | }, |
| | | // tab按钮切换鼠标自动聚焦 |
| | | tabClick(val, d) { |
| | | if (this.$refs.elTabs.currentName === '0') { |
| | | this.$nextTick(() => { |
| | | this.getMesOrderStepSearch() |
| | | $("input[name='produceCode']")[0].focus() |
| | | this.WXform.orderstepqrcode = '' |
| | | }) |
| | | } |
| | | if (this.$refs.elTabs.currentName === '1') { |
| | | this.$nextTick(() => { |
| | | this.getMesOrderWxStepSearch() |
| | | $("input[name='WXproduceCode']")[0].focus() |
| | | this.form.orderstepqrcode = '' |
| | | }) |
| | | } |
| | | if (this.$refs.elTabs.currentName === '2') { |
| | | this.$nextTick(() => { |
| | | this.getBadList() |
| | | $("input[name='badProduceCode']")[0].focus() |
| | | this.badForm.orderstepqrcode = '' |
| | | }) |
| | | } |
| | | }, |
| | | // 防抖 //扫码用的是防抖 |
| | | fnThrottle(method, delay, duration, belong) { |
| | | var that = this |
| | | var timer = this.timer |
| | | var begin = new Date().getTime() |
| | | return function() { |
| | | var current = new Date().getTime() |
| | | clearTimeout(timer) |
| | | if (current - begin >= duration) { |
| | | // method() |
| | | // that.VALUE() |
| | | begin = current |
| | | } else { |
| | | that.timer = setTimeout(function() { |
| | | // method() |
| | | if (belong === 'produceCode') { |
| | | that.enterNative(that.form.orderstepqrcode, belong) |
| | | } |
| | | if (belong === 'WXproduceCode') { |
| | | that.enterNative(that.WXform.orderstepqrcode, belong) |
| | | } |
| | | if (belong === 'badProduceCode') { |
| | | that.enterNative(that.badForm.orderstepqrcode, belong) |
| | | } |
| | | }, delay) |
| | | } |
| | | } |
| | | }, |
| | | // 判断是否是扫码枪扫码 |
| | | judgeIsScanning2(e, belong) { |
| | | if (belong === 'produceCode' && this.form.orderstepqrcode.toString().length === 0) { |
| | | this.judgeIsScanningArr = [] |
| | | this.countJudgeIsScanningInput = 0 |
| | | } |
| | | if (belong === 'WXproduceCode' && this.WXform.orderstepqrcode.toString().length === 0) { |
| | | this.judgeIsScanningArr = [] |
| | | this.countJudgeIsScanningInput = 0 |
| | | } |
| | | const timenow = e.timeStamp |
| | | // console.log(timenow, 1) |
| | | // let flag = true |
| | | let flag = false |
| | | this.judgeIsScanningArr.push(timenow) |
| | | let i |
| | | |
| | | for (i in this.judgeIsScanningArr) { |
| | | console.log(Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2])) |
| | | // flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1 |
| | | if (Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1) { |
| | | this.countJudgeIsScanningInput++ |
| | | } |
| | | if (this.countJudgeIsScanningInput >= 3) { |
| | | flag = true |
| | | } |
| | | if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) { |
| | | if (flag) { |
| | | console.log(flag, 1) |
| | | this.fnThrottle(this.enterNative, 500, 2000, belong)() |
| | | return |
| | | } |
| | | } |
| | | } |
| | | |
| | | // // for (i in this.judgeIsScanningArr) { |
| | | // // console.log(i) |
| | | // // console.log( this.judgeIsScanningArr) |
| | | // console.log(Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2])) |
| | | // if (Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 10) { |
| | | // this.countJudgeIsScanningInput++ |
| | | // } |
| | | // if (this.countJudgeIsScanningInput > this.judgeIsScanningArr.length / 2) { |
| | | // flag = true |
| | | // } |
| | | // // flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1 |
| | | // // if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) { |
| | | // if (flag) { |
| | | // console.log(flag, 2) |
| | | // this.fnThrottle(this.enterNative, 500, 2000, belong)() |
| | | // return |
| | | // } |
| | | // // } |
| | | // // } |
| | | }, |
| | | // 判断是否是扫码枪扫码 |
| | | judgeIsScanning(e, belong) { |
| | | const timenow = e.timeStamp |
| | | let flag = true |
| | | this.judgeIsScanningArr.push(timenow) |
| | | let i |
| | | for (i in this.judgeIsScanningArr) { |
| | | flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1 |
| | | if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) { |
| | | if (flag) { |
| | | this.fnThrottle(this.enterNative, 500, 2000, belong)() |
| | | return |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | // 扫码键盘回车事件 |
| | | async enterNative(val, belong) { |
| | | console.log(val, belong, 89898989) |
| | | // 开工:code="200" count=0 |
| | | // 报工:code="200" count=1 |
| | | // 发料:code="200" count=2 |
| | | // 收料:code="200" count=3 |
| | | // 走列表形式 code="200" count=4 |
| | | if (belong === 'produceCode') { |
| | | const orderstepqrcode = this.form.orderstepqrcode |
| | | const data = { |
| | | OperType: 'ZZ', |
| | | orderstepqrcode: orderstepqrcode, |
| | | SelectType: '' |
| | | } |
| | | const res = await MesOrderStepStart(data) |
| | | if (res.code === '200' && res.count === 0) { |
| | | await this.ZZstart(res.data) |
| | | } |
| | | if (res.code === '200' && res.count === 1) { |
| | | await this.ZZreport(res.data) |
| | | } |
| | | } |
| | | if (belong === 'WXproduceCode') { |
| | | const orderstepqrcode = this.WXform.orderstepqrcode |
| | | const data = { |
| | | OperType: 'WX', |
| | | orderstepqrcode: orderstepqrcode, |
| | | SelectType: this.WXSelected// OUT、IN |
| | | } |
| | | const res = await MesOrderStepStart(data) |
| | | if (res.code === '200' && res.count === 2) { |
| | | await this.WXsend(res.data) |
| | | } |
| | | if (res.code === '200' && res.count === 3) { |
| | | await this.WXback(res.data) |
| | | } |
| | | } |
| | | |
| | | if (belong === 'badProduceCode') { |
| | | // this.badForm.orderstepqrcode= |
| | | await this.getBadList() |
| | | await this.repairHandle(this.badForm.orderstepqrcode) |
| | | this.badDialogVisible = true |
| | | } |
| | | }, |
| | | // 查询 |
| | | search() { |
| | | this.getMesOrderStepSearch() |
| | | }, |
| | | upload() { |
| | | |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | | this.form.OrgCode = '' |
| | | this.form.OrgName = '' |
| | | this.form.OrgType = '' |
| | | this.form.UserName = '' |
| | | this.getMesOrderStepSearch() |
| | | }, |
| | | |
| | | // 新增按钮 |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // 修改按钮 |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | // 自制开始 |
| | | async ZZstart(obj) { |
| | | // if (!this.ZZisExecutable) { |
| | | // return this.$message.info('请先扫码工序二维码!') |
| | | // } |
| | | this.dialogTitle = '自制开始' |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | this.dialogForm.wo_code = obj.wo_code |
| | | this.dialogForm.partcode = obj.partnumber |
| | | this.dialogForm.partname = obj.partname |
| | | this.dialogForm.partspec = obj.partspec |
| | | this.dialogForm.stepseq = obj.seq |
| | | this.dialogForm.stepcode = obj.stepcode |
| | | this.dialogForm.stepname = obj.stepname |
| | | this.dialogForm.stepdesc = obj.stepdesc |
| | | this.dialogForm.planqty = obj.planqty |
| | | this.dialogForm.reportqty = obj.reportqty |
| | | this.dialogForm.noreportqty = obj.noreportqty |
| | | // this.dialogForm.startqty = obj.startqty |
| | | this.dialogForm.startqty = obj.noreportqty |
| | | }) |
| | | |
| | | await this.getMesOrderStepStartSelectEqp() |
| | | }, |
| | | // 自制报工 |
| | | async ZZreport(obj) { |
| | | // if (!this.ZZisExecutable) { |
| | | // return this.$message.info('请先扫码工序二维码!') |
| | | // } |
| | | this.dialogTitle = '自制报工' |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.wo_code = obj.wo_code |
| | | this.dialogForm.partcode = obj.partnumber |
| | | this.dialogForm.partname = obj.partname |
| | | this.dialogForm.partspec = obj.partspec |
| | | this.dialogForm.stepseq = obj.seq |
| | | this.dialogForm.stepcode = obj.stepcode |
| | | this.dialogForm.stepname = obj.stepname |
| | | this.dialogForm.stepdesc = obj.stepdesc |
| | | this.dialogForm.planqty = obj.planqty |
| | | this.dialogForm.reportqty = obj.reportqty |
| | | this.dialogForm.noputqty = obj.noputqty |
| | | this.dialogForm.noreportqty = obj.noreportqty |
| | | // this.dialogForm.startqty = obj.startqty |
| | | this.dialogForm.startqty = obj.noreportqty |
| | | |
| | | this.dialogForm.nextstepname = obj.nextstepname |
| | | this.dialogForm.nextstepcode = obj.nextstepcode |
| | | |
| | | this.dialogForm.startqtySum = obj.noreportqty |
| | | }) |
| | | |
| | | await this.getMesOrderStepStartSelectEqp() |
| | | await this.getMesOrderStepReportSelectUserGroup() |
| | | await this.getMesOrderStepSelectCause('ZZ') |
| | | await this.getMesOrderSelectUserZZ() |
| | | }, |
| | | // 外协发料 |
| | | async WXsend(obj) { |
| | | // if (this.WXradioSelected.length < 1 && obj.length < 1) { |
| | | // return this.$message.info('请先选择工序!') |
| | | // } |
| | | // console.log(this.WXform.orderstepqrcode === '', 6) |
| | | // if (this.WXform.orderstepqrcode === '') { |
| | | // return this.$message.info('请先输入工序!') |
| | | // } |
| | | this.dialogTitle = '外协发料' |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.wo_code = obj.wo_code |
| | | this.dialogForm.partcode = obj.partnumber |
| | | this.dialogForm.partname = obj.partname |
| | | this.dialogForm.partspec = obj.partspec |
| | | this.dialogForm.stepname = obj.stepname |
| | | this.dialogForm.stepdesc = obj.stepdesc |
| | | this.dialogForm.planqty = obj.planqty |
| | | this.dialogForm.reportqty = obj.reportqty |
| | | this.dialogForm.noreportqty = obj.noreportqty |
| | | this.dialogForm.fqty = obj.startqty |
| | | this.dialogForm.stepcode = obj.stepcode |
| | | this.dialogForm.stepseq = obj.seq |
| | | }) |
| | | |
| | | await this.getMesOrderStepSelectWX() |
| | | await this.getMesOrderSelectUser() |
| | | }, |
| | | // 外协收料 |
| | | async WXback(obj) { |
| | | // if (this.WXform.orderstepqrcode === '') { |
| | | // return this.$message.info('请先输入工序!') |
| | | // } |
| | | this.dialogTitle = '外协收料' |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.wo_code = obj.wo_code |
| | | this.dialogForm.partcode = obj.partnumber |
| | | this.dialogForm.partname = obj.partname |
| | | this.dialogForm.partspec = obj.partspec |
| | | this.dialogForm.stepname = obj.stepname |
| | | this.dialogForm.stepdesc = obj.stepdesc |
| | | this.dialogForm.planqty = obj.planqty |
| | | this.dialogForm.reportqty = obj.reportqty |
| | | this.dialogForm.noreportqty = obj.noreportqty |
| | | this.dialogForm.stepcode = obj.stepcode |
| | | |
| | | this.dialogForm.nextstepname = obj.nextstepname |
| | | this.dialogForm.nextstepcode = obj.nextstepcode |
| | | |
| | | this.dialogForm.noputqty = obj.noputqty |
| | | this.dialogForm.stepseq = obj.seq |
| | | this.dialogForm.sqty = obj.startqty |
| | | |
| | | this.dialogForm.startqtySum = obj.startqty |
| | | }) |
| | | await this.getMesOrderStepSelectWX() |
| | | await this.getMesOrderSelectUser() |
| | | await this.getMesOrderStepSelectCause('WX') |
| | | }, |
| | | // 生产班组下拉改变 |
| | | usergroupChange(val) { |
| | | this.dialogForm.usergroupcode = val |
| | | this.getMesOrderSelectUserZZ2() |
| | | }, |
| | | // 获取自制报工生产班组下拉列表 |
| | | async getMesOrderStepReportSelectUserGroup() { |
| | | const { data: res } = await MesOrderStepReportSelectUserGroup() |
| | | this.ZZtreams = res |
| | | }, |
| | | // 获取自制报工表格user所有 |
| | | async getMesOrderSelectUserZZ() { |
| | | const { data: res } = await MesOrderSelectUser({ usercode: this.dialogForm.usergroupcode }) |
| | | this.ZZuserArr = res |
| | | }, |
| | | async getMesOrderSelectUserZZ2() { |
| | | const { data: res } = await MesOrderSelectUser({ usercode: '' }) |
| | | this.ZZuserArr = res |
| | | await this.getUserTableData() |
| | | }, |
| | | // 获取自制生产设备下拉 |
| | | async getMesOrderStepStartSelectEqp() { |
| | | const { data: res } = await MesOrderStepStartSelectEqp({ orderstepqrcode: this.form.orderstepqrcode }) |
| | | this.ZZeqpArr = res |
| | | }, |
| | | // 获取WX供方接口 |
| | | async getMesOrderStepSelectWX() { |
| | | const { data: res } = await MesOrderStepSelectWX({ orderstepqrcode: this.WXform.orderstepqrcode }) |
| | | this.WXouterprovide = res |
| | | }, |
| | | // 获取收发料人员下拉接口 |
| | | async getMesOrderSelectUser() { |
| | | const { data: res } = await MesOrderSelectUser({ usercode: this.dialogForm.outuser }) |
| | | this.WXoutuser = res |
| | | }, |
| | | // 获取收料不良原因下拉 |
| | | async getMesOrderStepSelectCause(val) { |
| | | let orderstepqrcode = '' |
| | | if (val === 'WX') { |
| | | orderstepqrcode = this.WXform.orderstepqrcode |
| | | } |
| | | if (val === 'ZZ') { |
| | | orderstepqrcode = this.form.orderstepqrcode |
| | | } |
| | | const { data: res } = await MesOrderStepSelectCause({ orderstepqrcode: orderstepqrcode }) |
| | | this.badArr = res |
| | | }, |
| | | // 报工查询用户表 |
| | | async getUserTableData() { |
| | | const { data: res } = await MesOrderGroupSelectUser({ usergroupcode: this.dialogForm.usergroupcode }) |
| | | this.userTableData = res |
| | | this.userTableData.forEach(item => { |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | item.isVisible = 0 |
| | | item.number = number |
| | | }) |
| | | |
| | | this.ZZuserArr = [...this.ZZuserArr].filter(x => [...this.userTableData].every(y => y.usercode !== x.usercode)) |
| | | |
| | | this.$refs.tableDataRef.doLayout() |
| | | }, |
| | | // 用户添加 |
| | | 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 }) |
| | | }, |
| | | // 用户列表删除 |
| | | userDel(row) { |
| | | this.ZZuserArr.splice(0, 0, { |
| | | usercode: row.usercode, |
| | | username: row.username |
| | | }) |
| | | |
| | | this.userTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | this.userTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | // 删除按钮 |
| | | async del(row) { |
| | | this.$confirm('是否确认删除?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | this.getMesOrderStepSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消删除') |
| | | // 用户列表保存 |
| | | userSave(row) { |
| | | console.log(row, 123) |
| | | if (row.usercode === '') { |
| | | return this.$message.info('人员名称不能为空!') |
| | | } |
| | | |
| | | this.ZZuserArr.forEach((item, index) => { |
| | | if (item.usercode === row.usercode) { |
| | | this.ZZuserArr.splice(index, 1) |
| | | } |
| | | }) |
| | | |
| | | this.userTableData.forEach(item => { |
| | | if (item.number === row.number) { |
| | | item.isVisible = 0 |
| | | } |
| | | }) |
| | | }, |
| | | // 用户列表取消 |
| | | userCancel(row) { |
| | | this.userTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | this.userTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | // 用户列表人员名称值选中 |
| | | usernameChange(val, row) { |
| | | this.userTableData.forEach(item => { |
| | | if (item.usercode === val) { |
| | | this.userIsSave = true |
| | | return this.$message.info('此人员已在列中!') |
| | | } |
| | | if (item.number === row.number) { |
| | | this.userIsSave = false |
| | | item.usercode = val |
| | | item.username = this.ZZuserArr.find(item => item.usercode === val).username |
| | | } |
| | | }) |
| | | }, |
| | | // 对话框关闭事件 |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.judgeIsScanningArr = [] |
| | | this.form.orderstepqrcode = '' |
| | | this.WXform.orderstepqrcode = '' |
| | | this.badForm.orderstepqrcode = '' |
| | | |
| | | this.dialogForm.wo_code = '', // 工单编号 |
| | | this.dialogForm.partcode = '', // 产品编码 |
| | | this.dialogForm.partname = '', // 产品名称 |
| | | this.dialogForm.partspec = '', // 产品规格 |
| | | this.dialogForm.stepseq = '', // 工序序号 |
| | | this.dialogForm.stepcode = '', // 工序编码 |
| | | this.dialogForm.stepname = '', // 当前工序名 |
| | | this.dialogForm.nextstepname = '', // 下一道工序名 |
| | | this.dialogForm.stepdesc = '', // 工序描述 |
| | | this.dialogForm.planqty = '', // 任务数量 |
| | | this.dialogForm.reportqty = '', // 已报数量 |
| | | this.dialogForm.noreportqty = '', // 未报数量 |
| | | this.dialogForm.startqty = '', // 开(报)工数量 |
| | | |
| | | this.dialogForm.wxcode = '', // 外协供应商编码 |
| | | this.dialogForm.outuser = '', // 发料人员 |
| | | this.dialogForm.taskqty = '', // 任务数量 |
| | | this.dialogForm.fqty = '', // 发料数量 |
| | | |
| | | this.dialogForm.inuser = getCookie('navTabId'), // 收料人员 默认登录人员 |
| | | this.dialogForm.sqty = '', // 收料数量 |
| | | this.dialogForm.ngqty = '', // 不良数量 |
| | | this.dialogForm.badcode = '', // 不良原因编码 |
| | | |
| | | this.dialogForm.noputqty = '', // 不良数量 |
| | | |
| | | this.dialogForm.eqpcode = '', // 生产设备编码 |
| | | |
| | | this.dialogForm.usergroupcode = '', // 班组编码 |
| | | this.dialogForm.reportuser = '', // 报工人员 |
| | | |
| | | this.dialogForm.startqtySum = '' // 不能超过的数值 |
| | | |
| | | this.dialogForm.nextstepcode = '' // 下道工序编码 |
| | | |
| | | this.dialogForm.remarks = '' // 备注 |
| | | this.dialogForm.operation = getCookie('navTabId') // 报工人(收料人) |
| | | this.userTableData = [] // 人员列表 |
| | | |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | this.tabClick() |
| | | }, |
| | | // 对话框确认 |
| | | 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.getMesOrderStepSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | if (this.dialogTitle === '外协发料') { |
| | | if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) { |
| | | return this.$message.info('发料数量不能大于未发数量!') |
| | | } |
| | | const data = { |
| | | mesordercode: this.dialogForm.wo_code, // 工单编号 |
| | | partcode: this.dialogForm.partcode, // 产品编码 |
| | | stepseq: this.dialogForm.stepseq, // 工序序号 暂时缺 |
| | | stepcode: this.dialogForm.stepcode, // 工序编码 |
| | | wxcode: this.dialogForm.wxcode, // 外协供应商编码 |
| | | outuser: this.dialogForm.outuser, // 发料人员 |
| | | 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 |
| | | this.$message.success('发料成功!') |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error('发料失败!') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (this.dialogTitle === '外协收料') { |
| | | if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) { |
| | | return this.$message.info('收料数量加不良数量不能大于了未收数量!') |
| | | } |
| | | |
| | | if (parseFloat(this.dialogForm.noputqty) > 0) { |
| | | if (this.dialogForm.badcode.length < 1) { |
| | | return this.$message.info('请选择不良原因!') |
| | | } |
| | | } |
| | | |
| | | const data = { |
| | | mesordercode: this.dialogForm.wo_code, // 工单编号 |
| | | partcode: this.dialogForm.partcode, // 产品编码 |
| | | stepseq: this.dialogForm.stepseq, // 工序序号 |
| | | stepcode: this.dialogForm.stepcode, // 工序编码 |
| | | wxcode: this.dialogForm.wxcode, // 外协供应商编码 |
| | | inuser: this.dialogForm.inuser, // 发料人员 |
| | | taskqty: this.dialogForm.planqty, // 任务数量 |
| | | sqty: this.dialogForm.sqty, // 收料数量 |
| | | remarks: this.dialogForm.remarks, // 备注 |
| | | 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 |
| | | } |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error('收料失败!') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (this.dialogTitle === '自制开始') { |
| | | const data = { |
| | | mesordercode: this.dialogForm.wo_code, // 工单编号 |
| | | partcode: this.dialogForm.partcode, // 产品编码 |
| | | stepseq: this.dialogForm.stepseq, // 工序序号 暂时缺 |
| | | stepcode: this.dialogForm.stepcode, // 工序编码 |
| | | eqpcode: this.dialogForm.eqpcode, // 生产设备 |
| | | 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 |
| | | this.$message.success('开工成功!') |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error('开工失败!') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (this.dialogTitle === '自制报工') { |
| | | if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.startqty) + parseFloat(this.dialogForm.noputqty)) { |
| | | return this.$message.info('报工数量加不良数量不能大于了未报数量!') |
| | | } |
| | | if (this.userTableData.length < 1) { |
| | | 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 |
| | | }) |
| | | // console.log(this.userTableData, 1) |
| | | const reportuser = this.userTableData.map(item => item.usercode).join(';') |
| | | const data = { |
| | | mesordercode: this.dialogForm.wo_code, // 工单编号 |
| | | partcode: this.dialogForm.partcode, // 产品编码 |
| | | stepseq: this.dialogForm.stepseq, // 工序序号 |
| | | stepcode: this.dialogForm.stepcode, // 工序编码 |
| | | eqpcode: this.dialogForm.eqpcode, // 设备编码 |
| | | usergroupcode: this.dialogForm.usergroupcode, // 班组编码 |
| | | reportuser: reportuser, // 报工人员 |
| | | taskqty: this.dialogForm.planqty, // 任务数量 |
| | | // startqty: this.dialogForm.startqty, // 开工数量 |
| | | startqty: this.dialogForm.reportqty, // 开工数量 |
| | | // reportqty: this.dialogForm.reportqty, // 报工数量 |
| | | reportqty: this.dialogForm.startqty, // 报工数量 |
| | | remarks: this.dialogForm.remarks, // 备注 |
| | | ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 不良数量 |
| | | badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 不良原因 |
| | | } |
| | | 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 |
| | | } |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error('报工失败!') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 生成二维码 |
| | | bindQRCode(text) { |
| | | new QRCode(this.$refs.qrCodeDiv2, { |
| | | text: text, |
| | | // width: 50, |
| | | width: 60, |
| | | // height: 50, |
| | | height: 60, |
| | | colorDark: '#000', // 二维码颜色 |
| | | colorLight: '#ffffff', // 二维码背景色 |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | | }) |
| | | }, |
| | | ZZprint2(username) { |
| | | this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode |
| | | this.qrForm.startqty = this.dialogForm.startqty |
| | | this.qrForm.wo_code = this.dialogForm.wo_code |
| | | this.qrForm.partcode = this.dialogForm.partcode |
| | | this.qrForm.partname = this.dialogForm.partname |
| | | this.qrForm.nextstepname = this.dialogForm.nextstepname |
| | | this.qrForm.operator = username |
| | | this.qrForm.operatorTime = handleDatetime2(new Date()) |
| | | this.$nextTick(() => { |
| | | this.bindQRCode(this.qrForm.qrvalue) |
| | | }) |
| | | }, |
| | | WXprint2(username) { |
| | | this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode |
| | | this.qrForm.startqty = this.dialogForm.sqty |
| | | this.qrForm.wo_code = this.dialogForm.wo_code |
| | | this.qrForm.partcode = this.dialogForm.partcode |
| | | this.qrForm.partname = this.dialogForm.partname |
| | | this.qrForm.nextstepname = this.dialogForm.nextstepname |
| | | this.qrForm.operator = username |
| | | this.qrForm.operatorTime = handleDatetime2(new Date()) |
| | | this.$nextTick(() => { |
| | | this.bindQRCode(this.qrForm.qrvalue) |
| | | }) |
| | | }, |
| | | dialogVisible2Close() { |
| | | this.qrForm.qrvalue = '' |
| | | this.qrForm.startqty = '' |
| | | this.qrForm.wo_code = '' |
| | | this.qrForm.partcode = '' |
| | | this.qrForm.partname = '' |
| | | this.qrForm.nextstepname = '' |
| | | this.qrForm.operator = '' |
| | | this.qrForm.operatorTime = '' |
| | | // this.$refs.qrCodeDiv2 = '' |
| | | }, |
| | | |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 220 |
| | | this.isIpad = window.innerHeight < 769 |
| | | if (window.innerHeight < 769) { |
| | | this.tableHeight = this.tableHeight - 50 |
| | | } |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | }, |
| | | |
| | | // 获取不良处理列表 |
| | | async getBadList() { |
| | | const res = await MesOrderNgStepSearch(this.badForm) |
| | | this.badTableData = res.data |
| | | this.badTotal = res.count |
| | | }, |
| | | badDialogVisibleCancel() { |
| | | this.badDialogVisible = false |
| | | }, |
| | | badDialogVisibleConfirm() { |
| | | const data = { |
| | | Data: this.badTableDataDialog |
| | | } |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | EditOrderNgStepSeave(data, this.badDialogForm.operation).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.dialogVisible2 = true |
| | | this.$message.success('保存成功!') |
| | | |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } |
| | | }) |
| | | }, |
| | | badPrint(username) { |
| | | this.qrForm.qrvalue = this.badDialogForm.wo_code + ';' + this.badDialogForm.nextstepcode |
| | | this.qrForm.startqty = this.badDialogForm.plan_qty |
| | | this.qrForm.wo_code = this.badDialogForm.wo_code |
| | | this.qrForm.partcode = this.badDialogForm.partcode |
| | | this.qrForm.partname = this.badDialogForm.partname |
| | | this.qrForm.nextstepname = this.badDialogForm.nextstepname |
| | | this.qrForm.operator = username |
| | | this.qrForm.operatorTime = handleDatetime2(new Date()) |
| | | |
| | | this.$nextTick(() => { |
| | | this.bindQRCode(this.qrForm.qrvalue) |
| | | }) |
| | | }, |
| | | |
| | | handleCloseBad() { |
| | | this.badDialogForm = {} |
| | | this.badDialogForm.operation = getCookie('navTabId') |
| | | this.badTableDataDialog = [] |
| | | this.judgeIsScanningArr = [] |
| | | }, |
| | | async getMesOrderSelectUserAll() { |
| | | const { data: res } = await MesOrderSelectUser({ usercode: '' }) |
| | | this.OperationArr = res |
| | | }, |
| | | // 点击维修处理按钮 或 扫描条码的扫描回车事件 |
| | | async repairHandle(row) { |
| | | let data |
| | | if (row.wo_code) { |
| | | data = { |
| | | orderstepqrcode: row.wo_code + ';' + row.stepcode |
| | | } |
| | | } else { |
| | | data = { |
| | | orderstepqrcode: row |
| | | } |
| | | } |
| | | |
| | | const { data: res } = await MesOrderNgSubStepSearch(data) |
| | | |
| | | this.$nextTick(() => { |
| | | this.badDialogForm.wo_code = res.data1.wo_code |
| | | this.badDialogForm.partcode = res.data1.partnumber |
| | | this.badDialogForm.partname = res.data1.partname |
| | | this.badDialogForm.partspec = res.data1.partspec |
| | | this.badDialogForm.stepname = res.data1.stepname |
| | | this.badDialogForm.nextstepcode = res.data1.nextstepcode |
| | | this.badDialogForm.nextstepname = res.data1.nextstepname |
| | | this.badDialogForm.plan_qty = res.data1.planqty |
| | | this.badDialogForm.good_qty = res.data1.noreportqty // 报工数量 |
| | | this.badDialogForm.ng_qty = res.data1.noputqty // 不良数量 |
| | | |
| | | this.badTableDataDialog = res.data2 |
| | | |
| | | this.badTableDataDialog.forEach(item => { |
| | | item.repair_qty = 0 |
| | | item.bad_qty = 0 |
| | | item.isVisible = 0 |
| | | // item.defect_code = [...new Set(item.defect_code.split(','))].join(',') |
| | | // item.defect_name = [...new Set(item.defect_name.split(','))].join(',') |
| | | }) |
| | | console.log(this.badTableDataDialog, 321) |
| | | this.badDialogVisible = true |
| | | }) |
| | | }, |
| | | badEdit(row) { |
| | | console.log(row) |
| | | this.badTableDataDialog.forEach((item, index) => { |
| | | if (item.id === row.id && item.m_id === row.m_id) { |
| | | this.badTableDataDialog.splice(index, 1, { |
| | | bad_qty: row.bad_qty, |
| | | repair_qty: row.repair_qty, |
| | | isVisible: 1, |
| | | defect_code: row.defect_code, |
| | | defect_name: row.defect_name, |
| | | badqty: row.badqty, |
| | | id: row.id, |
| | | m_id: row.m_id, |
| | | materiel_code: row.materiel_code, |
| | | ng_qty: row.ng_qty, |
| | | plan_qty: row.plan_qty, |
| | | report_qty: row.report_qty, |
| | | seq: row.seq, |
| | | step_code: row.step_code, |
| | | stepname: row.stepname, |
| | | style: row.style, |
| | | wo_code: row.wo_code |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | badSave(row) { |
| | | if (parseFloat(row.bad_qty) + parseFloat(row.repair_qty) > parseFloat(row.ng_qty)) { |
| | | this.badCancel(row) |
| | | return this.$message.info('维修数量与报废数量之和不能大于不良数量!') |
| | | } |
| | | this.badTableDataDialog.forEach((item, index) => { |
| | | if (item.id === row.id && item.m_id === row.m_id) { |
| | | this.badTableDataDialog.splice(index, 1, { |
| | | bad_qty: parseFloat(row.bad_qty), |
| | | repair_qty: parseFloat(row.repair_qty), |
| | | isVisible: 0, |
| | | defect_code: row.defect_code, |
| | | defect_name: row.defect_name, |
| | | id: row.id, |
| | | m_id: row.m_id, |
| | | badqty: row.badqty, |
| | | materiel_code: row.materiel_code, |
| | | ng_qty: row.ng_qty, |
| | | plan_qty: row.plan_qty, |
| | | report_qty: row.report_qty, |
| | | seq: row.seq, |
| | | step_code: row.step_code, |
| | | stepname: row.stepname, |
| | | style: row.style, |
| | | wo_code: row.wo_code |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | badCancel(row) { |
| | | this.badTableDataDialog.forEach((item, index) => { |
| | | if (item.id === row.id && item.m_id === row.m_id) { |
| | | this.badTableDataDialog.splice(index, 1, { |
| | | // bad_qty: row.bad_qty, |
| | | // repair_qty: row.repair_qty, |
| | | bad_qty: 0, |
| | | repair_qty: 0, |
| | | isVisible: 0, |
| | | defect_code: row.defect_code, |
| | | defect_name: row.defect_name, |
| | | id: row.id, |
| | | m_id: row.m_id, |
| | | badqty: row.badqty, |
| | | materiel_code: row.materiel_code, |
| | | ng_qty: row.ng_qty, |
| | | plan_qty: row.plan_qty, |
| | | report_qty: row.report_qty, |
| | | seq: row.seq, |
| | | step_code: row.step_code, |
| | | stepname: row.stepname, |
| | | style: row.style, |
| | | wo_code: row.wo_code |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | badDel(row) { |
| | | this.badTableDataDialog.forEach((item, index) => { |
| | | if (item.id === row.id && item.m_id === row.m_id) { |
| | | this.badTableDataDialog.splice(index, 1) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--primary { |
| | | background-color: $main_color !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | //border: 1px solid $main_color; |
| | | border: none; |
| | | padding: 0 20px; |
| | | } |
| | | ::v-deep .el-button--primary:hover { |
| | | border: none; |
| | | } |
| | | ::v-deep .el-button--info { |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active { |
| | | background-color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .footerButton { |
| | | display: flex; |
| | | justify-content: end; |
| | | } |
| | | |
| | | ::v-deep .el-button--default { |
| | | background-color: #ffffff !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-button--default:hover { |
| | | color: #606266; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |
| | | transform: scale(0.8); |
| | | } |
| | | |
| | | ::v-deep .cell { |
| | | display: flex !important; |
| | | align-items: center !important; |
| | | justify-content: space-between !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--text { |
| | | color: $main_color; |
| | | .el-button--text { |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .el-icon-share { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-checkbox.is-bordered.is-checked { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked + .el-checkbox__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered { |
| | |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | //.dialogVisible{ |
| | | ::v-deep .el-select .el-input .el-select__caret { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | //} |
| | | .elTableDiv { |
| | | ::v-deep .el-radio__label { |
| | | display: none; |
| | | } |
| | | } |
| | | </style> |
| | | <style media="print"> |
| | | /*@media print {*/ |
| | | @page { |
| | | size: auto; |
| | | margin: 3mm; |
| | | font-size: 10px; |
| | | } |
| | | |
| | | </style> |
| | | <!--公共页面样式--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--text { |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-icon-share, .el-icon-delete, .el-icon-edit-outline { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-icon-edit-outline { |
| | | margin-right: 15px; |
| | | } |
| | | |
| | | ::v-deep .el-button--primary, .el-button--default, .el-button--info { |
| | | height: 34px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 15px; |
| | | } |
| | | |
| | | ::v-deep .el-button--primary { |
| | | //background-color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--default { |
| | | background-color: #f8f8fa; |
| | | border: none; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | height: 34px; |
| | | line-height: 34px; |
| | | //color: #a7a7a7; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | ::v-deep .dialogVisibleRoles .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | ::v-deep .importPickerClass .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | ::v-deep .badDialogVisible .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |
| | | transform: scale(0.8); |
| | | } |
| | | |
| | | ::v-deep .cell { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | ::v-deep .el-table::before { |
| | | height: 0; |
| | | } |
| | | |
| | | ::v-deep .el-table__body-wrapper { |
| | | background-color: #f8f8fa; |
| | | } |
| | | |
| | | ::v-deep .el-table__body .el-table__row.hover-row td { |
| | | background-color: #eaecef; |
| | | } |
| | | |
| | | ::v-deep .el-form--inline .el-form-item__label { |
| | | color: #a7a7a7; |
| | | } |
| | | |
| | | .body ::v-deep .el-divider { |
| | | border: 1px solid #eee; |
| | | width: 99%; |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | .tableFixed { |
| | | ::v-deep .el-table__fixed-right { |
| | | height: 100% !important; |
| | | } |
| | | |
| | | ::v-deep .el-select .el-input__inner:focus{ |
| | | border-color: $main_color; |
| | | ::v-deep .el-table__fixed { |
| | | height: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | |
| | | ::v-deep .el-select-dropdown__item.selected{ |
| | | color: $main_color; |
| | | .el-table .custom-row { |
| | | background: #f8f8fa; |
| | | } |
| | | ::v-deep .el-checkbox__inner:hover{ |
| | | border-color: $main_color; |
| | | } |
| | | ::v-deep .el-textarea__inner:focus{ |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | </style> |