| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div style="padding: 10px 5px 0 0"> |
| | | |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <div style="display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button type="primary" icon="el-icon-connection" @click="send('send')">派发</el-button> |
| | | </div> |
| | | |
| | | <el-button icon="el-icon-switch-button" @click="orderClose">关闭工单</el-button> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="80px" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="订单状态" style=" display: flex;"> |
| | | <el-form-item label-width="70px" label="订单状态" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.mesorderstus" |
| | | :popper-append-to-body="false" |
| | |
| | | <el-form-item label="订单编号" style=" display: flex;"> |
| | | <el-input v-model="form.mesordercode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码" style=" display: flex;"> |
| | | <!-- <el-select v-model="form.partcode" :popper-append-to-body="false" style="width: 200px" placeholder="请选择">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in OrgTypeArr"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <el-form-item label="源单单号" style="display: flex;"> |
| | | <el-input v-model="form.sourceorder" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="单据类型" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.ordertype" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <!-- @change="mesordertypeChange"--> |
| | | <el-option |
| | | v-for="item in ordertypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label-width="70px" label="产品编码" style=" display: flex;"> |
| | | <el-input v-model="form.partcode" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label="产品名称" style=" display: flex;"> |
| | | <el-input v-model="form.partname" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label="产品规格" style=" display: flex;"> |
| | | <el-input v-model="form.partspec" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="创建人员" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label="创建人员" style=" display: flex;"> |
| | | <el-input v-model="form.creatuser" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="创建时间" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label-width="70px" label="创建时间" style=" display: flex;"> |
| | | <!-- <el-date-picker--> |
| | | <!-- v-model="form.createdate"--> |
| | | <!-- type="daterange"--> |
| | |
| | | type="date" |
| | | size="mini" |
| | | :clearable="false" |
| | | style="width: 200px;" |
| | | class="dateMini" |
| | | format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="min-height: 100px"> |
| | | <div style="display: flex;align-items: start;justify-content:end;margin-top: 5px;z-index: 2"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | </div> |
| | | <!-- <div v-if="!isFullscreen" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">--> |
| | | <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>--> |
| | | <!-- <el-button type="primary" icon="el-icon-connection" @click="send('send')">派发</el-button>--> |
| | | <!-- <el-button type="primary" icon="el-icon-switch-button">订单关闭</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- <div v-if="isFullscreen" style="display: flex;flex-direction: column;align-items: end">--> |
| | | <!-- <div style="display: flex;margin: 10px 0">--> |
| | | <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>--> |
| | | <!-- <el-button type="primary" icon="el-icon-connection" @click="send('send')">派发</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- <el-button type="primary" icon="el-icon-switch-button">订单关闭</el-button>--> |
| | | <!-- </div>--> |
| | | |
| | | <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | </div> |
| | | |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | > |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseout'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'" |
| | | @mouseenter="mouseHoverType=$event.type" |
| | | /> |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseenter'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown':'doubleUp'" |
| | | @click="isExpandForm=!isExpandForm" |
| | | @mouseout="mouseHoverType=$event.type" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button type="primary" icon="el-icon-connection" @click="send('send')">派发</el-button> |
| | | <el-button type="primary" icon="el-icon-switch-button" @click="orderClose">工单关闭</el-button> |
| | | </div> |
| | | <el-divider /> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | :height="tableHeight+'px'" |
| | | :height="isExpandForm?tableHeight:(tableHeight+80)+'px'" |
| | | border |
| | | stripe |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | @row-click="rowClick" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | |
| | | <el-radio |
| | | v-model="radioSelected" |
| | | :label="row.wo_code" |
| | | style="color: #fff;padding-left: 10px; margin-right: -25px;" |
| | | @change.native="getCurrentRow(row.wo_code)" |
| | | style="color: transparent;padding-left: 10px;" |
| | | /> |
| | | <!-- @change.native="getCurrentRow(row.wo_code)"--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | min-width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="m_po" |
| | | label="源单单号" |
| | | sortable="custom" |
| | | min-width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="wotype" |
| | | label="单据类型" |
| | | sortable="custom" |
| | | min-width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.wotype==='PO'">标准工单</div> |
| | | <div v-else-if="row.wotype==='FO'">报废补单</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产品编码" |
| | | sortable="custom" |
| | |
| | | prop="partname" |
| | | min-width="150" |
| | | label="产品名称" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | label="产品规格" |
| | | sortable="custom" |
| | | width="110" |
| | | /> |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partspec">{{ row.partspec }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="工单数" |
| | |
| | | label="生产车间" |
| | | sortable="custom" |
| | | width="120" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="route_name" |
| | | label="工艺路线" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | min-width="130" |
| | | /> |
| | | |
| | | width="180" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.route_name">{{ row.route_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="route_name"--> |
| | | <!-- label="关联工艺路线"--> |
| | | <!-- min-width="110"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <i v-if="row.route_name" class="el-icon-share" @click="routeClick(row)" />--> |
| | | <!-- <i v-else style="color:rgb(180 ,181, 185)" class="el-icon-share" @click="routeClick(row)" />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | prop="plan_startdate" |
| | | label="计划开始时间" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.plan_startdate">{{ row.plan_startdate }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="plan_enddate" |
| | | label="计划结束时间" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.plan_enddate">{{ row.plan_enddate }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="piroque" |
| | | label="工单等级" |
| | |
| | | <div v-if="row.piroque==='1'">特级</div> |
| | | <div v-if="row.piroque==='2'">紧急</div> |
| | | <div v-if="row.piroque==='3'">正常</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="check(row)">工序任务</el-button> |
| | | <el-button type="text" @click="del(row)">删除</el-button> |
| | | <el-tooltip class="item" effect="dark" content="打印工单" placement="top"> |
| | | <!-- <i--> |
| | | <!-- class="el-icon-tickets"--> |
| | | <!-- style="cursor: pointer;color: #42b983;margin-right: 15px"--> |
| | | <!-- @click="check(row)"--> |
| | | <!-- />--> |
| | | <i |
| | | class="el-icon-tickets" |
| | | style="cursor: pointer;color: #42b983;margin-right: 15px" |
| | | @click="handlePrint(row.wo_code)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top"> |
| | | <i class="el-icon-delete" @click="del(row)" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </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="getMesOrderSearch" |
| | | /> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableDataDetail" |
| | | border |
| | | height="210px" |
| | | :row-class-name="tableRowClassName" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- width="50"--> |
| | | <!-- type="index"--> |
| | | <!-- prop="序号"--> |
| | | <!-- fixed--> |
| | | <!-- /> --> |
| | | <el-table-column |
| | | width="50" |
| | | prop="seq" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="工单编号" |
| | | width="160" |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产品编码" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | width="200" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="工序编码" |
| | | prop="stepcode" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | label="工序名称" |
| | | prop="stepname" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | label="任务数量" |
| | | prop="plan_qty" |
| | | /> |
| | | <el-table-column |
| | | label="合格数量" |
| | | prop="good_qty" |
| | | /> |
| | | <el-table-column |
| | | label="不良数量" |
| | | prop="ng_qty" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="打印工序" placement="top"> |
| | | <i |
| | | class="el-icon-tickets" |
| | | style="cursor: pointer;color: #42b983;margin-right: 15px" |
| | | @click="supplementSmallClick(row)" |
| | | /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <!--新增派发对话框--> |
| | | <el-dialog |
| | |
| | | <el-form-item label="工单编号" prop="mesordercode"> |
| | | <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <div style="display: flex"> |
| | | <el-form-item label="工单类型" prop="mesorderstus"> |
| | | <el-select |
| | | v-model="dialogForm.ordertype" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | :disabled="operation!=='add'" |
| | | placeholder="请选择" |
| | | @change="mesordertypeChange" |
| | | > |
| | | |
| | | <el-option |
| | | v-for="item in ordertypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div style="display: flex;flex-wrap: nowrap"> |
| | | <el-form-item label="源单单号"> |
| | | <el-input |
| | | v-model="dialogForm.sourceorder" |
| | | :disabled="dialogForm.ordertype==='PO'" |
| | | style="width: 172px" |
| | | /> |
| | | </el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | style="padding: 0 10px;margin-left: -8px;margin-top: 3px" |
| | | class="el-icon-search" |
| | | :disabled="operation!=='add'||dialogForm.ordertype==='PO'" |
| | | @click="mesordertsourcesearchclick" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <el-form-item label="工单数量" prop="mesqty"> |
| | | <el-input |
| | | v-model="dialogForm.mesqty" |
| | |
| | | <el-form-item v-if="operation!=='add'" label="产品名称" prop="partname"> |
| | | <el-input v-model="dialogForm.partname" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码" prop="partcode"> |
| | | <el-form-item label="产品编码"> |
| | | <el-input v-model="dialogForm.partcode" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格" prop="partspec"> |
| | |
| | | </el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | style="padding: 0 10px;margin-left: -8px;margin-top: 5px" |
| | | style="padding: 0 10px;margin-left: -8px;margin-top:3px" |
| | | class="el-icon-search" |
| | | @click="searchClick" |
| | | /> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item label="物料清单" prop="bomId"> |
| | | <el-select |
| | | v-model="dialogForm.bomId" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in bomIdArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="计划开始时间" prop="planstartdate"> |
| | | <el-date-picker |
| | | v-model="dialogForm.planstartdate" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="是否排程" prop="isAps"> |
| | | <el-radio-group v-model="dialogForm.isAps"> |
| | | <el-radio key="Y" label="Y" value="Y">是</el-radio> |
| | | <el-radio key="N" label="N" value="N">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <!-- 工艺路线放大镜对话框--> |
| | |
| | | <el-table |
| | | :data="searchTableData" |
| | | border |
| | | stripe |
| | | :row-class-name="tableRowClassName" |
| | | height="300" |
| | | style="width: 100%;" |
| | | highlight-current-row |
| | |
| | | prop="seq" |
| | | label="序号" |
| | | width="50" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="stepcode" |
| | |
| | | <el-table-column |
| | | prop="descr" |
| | | label="工序描述" |
| | | fixed="right" |
| | | /> |
| | | </el-table> |
| | | </el-dialog> |
| | |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <!-- <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">预览</el-button>--> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 工序任务对话框--> |
| | | <!-- 工序任务对话框--> |
| | | <el-dialog |
| | | title="工序任务" |
| | | :visible.sync="dialogVisibleTask" |
| | |
| | | style="margin-bottom: 15px" |
| | | type="primary" |
| | | @click="supplementClick" |
| | | >补打</el-button> |
| | | >补打 |
| | | </el-button> |
| | | <el-table |
| | | :data="taskTableData" |
| | | border |
| | | stripe |
| | | :row-class-name="tableRowClassName" |
| | | height="300" |
| | | style="width: 100%;" |
| | | highlight-current-row |
| | |
| | | prop="seq" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="wo_code" |
| | |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" style="padding: 0;" @click="supplementSmallClick(row)">补打</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 打印预览对话框--> |
| | | <!-- 源单单号对话框--> |
| | | <el-dialog |
| | | title="源单单号" |
| | | :visible.sync="dialogVisibleSource" |
| | | width="1200px" |
| | | top="10vh" |
| | | class="dialogVisibleSearch" |
| | | :close-on-click-modal="false" |
| | | @close="dialogVisibleSourceClose" |
| | | > |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="sourceForm" |
| | | :model="sourceForm" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm" style="justify-content: flex-start"> |
| | | <el-form-item |
| | | label="预计开工时间" |
| | | label-width="100px" |
| | | style=" display: flex;font-size: 14px;margin-top: 3px" |
| | | > |
| | | <el-date-picker |
| | | v-model="sourceForm.paystartdate" |
| | | type="daterange" |
| | | range-separator="~" |
| | | class="timeMini" |
| | | size="mini" |
| | | style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;" |
| | | :clearable="false" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | /> |
| | | <!-- :picker-options="expireTimeOption"--> |
| | | |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="预计完工时间" |
| | | label-width="100px" |
| | | style=" display: flex;font-size: 14px;margin-top: 3px" |
| | | > |
| | | <el-date-picker |
| | | v-model="sourceForm.payenddate" |
| | | type="daterange" |
| | | :clearable="false" |
| | | class="timeMini" |
| | | range-separator="~" |
| | | start-placeholder="开始日期" |
| | | style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;" |
| | | end-placeholder="结束日期" |
| | | size="mini" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="订单状态" style=" display: flex;"> |
| | | <el-select |
| | | v-model="sourceForm.erporderstus" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in erporderstusArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandDialog" label="订单编号" style=" display: flex;"> |
| | | <el-input v-model="sourceForm.erpordercode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandDialog" label="产品编码" style=" display: flex;"> |
| | | <el-input v-model="sourceForm.partcode" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-show="isExpandDialog" label="产品名称" style=" display: flex;"> |
| | | <el-input v-model="sourceForm.partname" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandDialog" label="产品规格" style=" display: flex;"> |
| | | <el-input v-model="sourceForm.partspec" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandDialog" label="创建人员" style=" display: flex;"> |
| | | <el-input v-model="sourceForm.creatuser" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | |
| | | </div> |
| | | |
| | | <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end"> |
| | | <el-button type="primary" icon="el-icon-search" @click="sourceSearch">查询</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="sourceReset">重置</el-button> |
| | | </div> |
| | | |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | > |
| | | <svg-icon |
| | | v-show="mouseHoverTypeDialog==='mouseout'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandDialog?'doubleDown3':'doubleUp3'" |
| | | @mouseenter="mouseHoverTypeDialog=$event.type" |
| | | /> |
| | | <svg-icon |
| | | v-show="mouseHoverTypeDialog==='mouseenter'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandDialog?'doubleDown':'doubleUp'" |
| | | @click="isExpandDialog=!isExpandDialog" |
| | | @mouseout="mouseHoverTypeDialog=$event.type" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="sourceTableData" |
| | | :height="isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px'" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sourceSortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | width="50" |
| | | fixed |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-radio |
| | | v-model="radioSelectedId" |
| | | :label="row.id" |
| | | style="color: transparent;padding-left: 10px;" |
| | | @change.native="getCurrentRowSource(row.id)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="status" |
| | | label="订单状态" |
| | | sortable="custom" |
| | | width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.status==='NEW'">新订单</div> |
| | | <div v-if="row.status==='CREATING'">部分下达</div> |
| | | <div v-if="row.status==='CREATED'">全部下达</div> |
| | | <div v-if="row.status==='CLOSED'">已关闭</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wo" |
| | | label="订单编号" |
| | | sortable="custom" |
| | | min-width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产品编码" |
| | | sortable="custom" |
| | | min-width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | sortable="custom" |
| | | min-width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="产品规格" |
| | | sortable="custom" |
| | | min-width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partspec">{{ row.partspec }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="qty" |
| | | label="订单数量" |
| | | width="150" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="relse_qty" |
| | | label="已下单数量" |
| | | width="150" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="wkshp_name" |
| | | label="生产车间" |
| | | sortable="custom" |
| | | width="150" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="planstartdate" |
| | | label="预计开工时间" |
| | | sortable="custom" |
| | | width="130" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.planstartdate">{{ row.planstartdate.substring(0, 11) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="planenddate" |
| | | label="预计完工时间" |
| | | sortable="custom" |
| | | width="130" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.planenddate">{{ row.planenddate.substring(0, 11) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="createuser" |
| | | label="创建人员" |
| | | sortable="custom" |
| | | width="150" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.createuser">{{ row.createuser }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="createdate" |
| | | label="创建时间" |
| | | width="130" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.createdate">{{ row.createdate.substring(0, 11) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- label="操作"--> |
| | | <!-- fixed="right"--> |
| | | <!-- width="80"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div class="operationClass">--> |
| | | <!-- <el-tooltip class="item" effect="dark" content="下达" placement="top">--> |
| | | <!-- <!– <el-button type="text" @click="edit('edit',row)">下达</el-button>–>--> |
| | | <!-- <i--> |
| | | <!-- class="el-icon-bottom"--> |
| | | <!-- style="color:#42b983;cursor: pointer;margin-left: 5px"--> |
| | | <!-- @click="edit('edit',row)"--> |
| | | <!-- />--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | </div> |
| | | <!--分页--> |
| | | <pagination |
| | | :total="sourceFormTotal" |
| | | :page.sync="sourceForm.page" |
| | | :limit.sync="sourceForm.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getErpOrderSearch" |
| | | /> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleSourceBack">返 回</el-button> |
| | | <el-button type="primary" @click="dialogVisibleSourceConfirm">确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--打印预览对话框 大标签--> |
| | | <el-dialog |
| | | title="" |
| | | :visible.sync="dialogVisibleApprove" |
| | |
| | | <el-form |
| | | ref="formApprove" |
| | | :model="formApprove" |
| | | label-width="100px" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="工单编号:" class="formContent"> |
| | | <el-form-item label="工单编号:" class="formContent"> |
| | | {{ formApprove.mesordercode }} |
| | | </el-form-item> |
| | | <el-form-item label="产品编码:" class="formContent"> |
| | | <el-form-item label="源单单号:" class="formContent"> |
| | | {{ formApprove.m_po }} |
| | | </el-form-item> |
| | | <el-form-item label="产品编码:" class="formContent"> |
| | | {{ formApprove.partcode }} |
| | | </el-form-item> |
| | | <el-form-item label="产品名称:" class="formContent"> |
| | | <el-form-item label="产品名称:" class="formContent"> |
| | | {{ formApprove.partname }} |
| | | </el-form-item> |
| | | <el-form-item label="产品规格:" class="formContent"> |
| | | <el-form-item label="产品规格:" class="formContent"> |
| | | {{ formApprove.partspec }} |
| | | </el-form-item> |
| | | <el-form-item label="工单数量:" class="formContent"> |
| | | <el-form-item label="工单数量:" class="formContent"> |
| | | {{ formApprove.plan_qty }} |
| | | </el-form-item> |
| | | <el-form-item label="工艺路线:" class="formContent"> |
| | | <el-form-item label="工艺路线:" class="formContent"> |
| | | {{ formApprove.routename }} |
| | | </el-form-item> |
| | | <el-form-item label="打印人员:" class="formContent"> |
| | | <el-form-item label="打印人员:" class="formContent"> |
| | | {{ username }} |
| | | </el-form-item> |
| | | <el-form-item label="打印时间:" class="formContent"> |
| | | <el-form-item label="打印时间:" class="formContent"> |
| | | {{ formApprove.lm_date }} |
| | | </el-form-item> |
| | | </div> |
| | |
| | | id="qrCode" |
| | | style="width: 22%;height:97px; |
| | | margin-top: 20px; |
| | | overflow-x: scroll;display: flex; |
| | | overflow-y: scroll;display: flex; |
| | | justify-content: center; |
| | | position: relative;" |
| | | > |
| | | <!-- <div id="qrCode0" ref="qrCodeDiv0" />--> |
| | | </div> |
| | | <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" /> |
| | | <div style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px" /> |
| | | <div |
| | | style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px" |
| | | /> |
| | | </div> |
| | | |
| | | <!-- <div style="width:100%;height: 30px;border-bottom: 1px solid #eee;margin-bottom: 20px" />--> |
| | |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--打印预览页面 小标签--> |
| | | <el-dialog |
| | | title="预览" |
| | | :visible.sync="dialogVisible2" |
| | | width="1140" |
| | | top="10vh" |
| | | :close-on-click-modal="false" |
| | | @close="dialogVisible2Close" |
| | | > |
| | | <div style="height: 300px"> |
| | | <!-- 下拉框选择打印尺寸--> |
| | | <div style="display: flex;align-items: center;margin: 0 0 20px 0"> |
| | | <div>选择打印尺寸:</div> |
| | | <el-select |
| | | v-model="printSize" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="printSizeChange" |
| | | > |
| | | |
| | | <el-option |
| | | v-for="item in printSizeSelectArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <!-- 要打印的区域 --> |
| | | <!-- <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">--> |
| | | <div id="printMe2" :style="printMe2StylePadding(printSize)"> |
| | | <div |
| | | v-if="printSize===0" |
| | | style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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 |
| | | v-if="printSize===1" |
| | | style="display: flex;width: 280px;height: 160px;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: 96px;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: 32px;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: 32px;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 |
| | | v-if="printSize===5" |
| | | style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | > |
| | | |
| | | <div v-if="false" style="width: 45px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 60px;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: 20px;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: 20px;justify-content: flex-start;align-items: center"> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ qrForm.operator }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width:100%;display: flex;flex-direction: column;"> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;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: center;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: center;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: center;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: center;align-items: center;text-align: left"> |
| | | <!-- <div style="width: 60px;margin-left: 5px;">处理时间:</div>--> |
| | | <div>{{ qrForm.operatorTime }}</div> |
| | | </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 |
| | | :close-on-click-modal="false" |
| | | title="关联工艺路线" |
| | | :visible.sync="dialogVisibleRoute" |
| | | width="800px" |
| | | top="10vh" |
| | | :fullscreen="isIpad" |
| | | class="dialogVisibleRoute" |
| | | @closed="handleCloseRoute" |
| | | @close="handleCloseRoute" |
| | | > |
| | | <div> |
| | | <i class="el-icon-s-comment" style="color:#42b983;" /> 产品名称:{{ dialogFormRoute.projectName }} |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-bottom: 10px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 工艺路线集合 |
| | | </div> |
| | | |
| | | <div class="myCheckboxGroup"> |
| | | <div |
| | | v-for="item in dialogFormRoute.routeOperationArr" |
| | | :key="item.code" |
| | | :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}" |
| | | class="myCheckbox" |
| | | @click="myCheckboxClick(item)" |
| | | > |
| | | <input |
| | | class="myCheckboxInput" |
| | | type="checkbox" |
| | | :value="item.code" |
| | | :name="item.name" |
| | | :style="{color:item.isSelected2?'#42b983':'#fff'}" |
| | | @click="myCheckboxInputClick(item)" |
| | | >{{ item.name }} |
| | | <!-- 父子点击事件不影响--> |
| | | <!-- onClick="event.cancelBubble = true"--> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-divider /> |
| | | <div> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 默认工艺路线 |
| | | </div> |
| | | <div style="margin-top: 20px"> |
| | | <el-select |
| | | v-model="defaultroute_code" |
| | | filterable |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | class="defaultroute_code" |
| | | > |
| | | <el-option |
| | | v-for="item in defaultroute_codeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-bottom: 10px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 工序列表 |
| | | </div> |
| | | <div style="overflow-y: scroll"> |
| | | <el-table |
| | | ref="projectTableData" |
| | | :data="projectTableData" |
| | | border |
| | | height="280" |
| | | :row-class-name="tableRowClassName" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | prop="seq" |
| | | width="100" |
| | | label="工序序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="stepcode" |
| | | label="工序编码" |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="工序名称" |
| | | /> |
| | | <el-table-column |
| | | prop="enable" |
| | | label="启用状态" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.enable==='Y'"> |
| | | <svg-icon icon-class="circleYes" style="margin-right: 2px" /> |
| | | 是 |
| | | </div> |
| | | <div v-if="row.enable==='N'"> |
| | | <svg-icon icon-class="circleNo" style="margin-right: 2px" /> |
| | | 否 |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="routeDialogVisibleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="routeDialogVisibleConfirm">确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | AddUpdateMesOrder, |
| | | ClosedMesOrder, |
| | | DeleteMesOrder, |
| | | DeleteMesOrder, ErpOrderSearch, |
| | | MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, |
| | | SelectRouteStep |
| | | } from '@/api/scgl' |
| | | import { PartSelect } from '@/api/zzmx' |
| | | import { handleDatetime } from '@/utils/global' |
| | | import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/zzmx' |
| | | import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { MesOrderPrintSearch1, PrintOrder } from '@/api/utils' |
| | | import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp' |
| | | import QRCode from 'qrcodejs2' |
| | | import $ from 'jquery' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'GD', |
| | | components: { |
| | | Pagination |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请输入编码')) |
| | | } else { |
| | | if (SER_HZ.test(value)) { |
| | | return callback(new Error('编码不能为中文')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | return { |
| | | isFullscreen: false, |
| | | mouseHoverType: 'mouseout', |
| | | mouseHoverTypeDialog: 'mouseout', |
| | | isExpandForm: false, |
| | | isIpad: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | username: '', |
| | |
| | | mesorderstus: '', // 工单状态码 |
| | | mesordercode: '', // 工单编号 |
| | | partcode: '', // 产品编码 |
| | | ordertype: '', // ordertype |
| | | sourceorder: '', // 源单单号 |
| | | partname: '', // 产品名称 |
| | | partspec: '', // 产品规格 |
| | | creatuser: '', // 创建人员 |
| | |
| | | mesorderstus: 'NEW', // 工单状态码 |
| | | mesordercode: '', // 工单编号 |
| | | partcode: '', // 产品编码 |
| | | |
| | | ordertype: 'PO', // 工单类型 |
| | | sourceorder: '', // 源单单号 |
| | | mesqty: '', // 工单数量 |
| | | |
| | | routecode: '', // 工艺路线编码 |
| | |
| | | planstartdate: '', // 计划开始时间 |
| | | planenddate: '', // 计划完成时间 |
| | | orderlev: '', // 工单等级 |
| | | |
| | | isAps: 'N', // 是否排程 |
| | | bomId: '', // 物料清单id |
| | | OperType: '' // 操作类型 |
| | | }, |
| | | bomIdArr: [// 物料清单下拉 因为接口还没写,暂时用写死的值 |
| | | { code: 15, name: 'V5' }, |
| | | { code: 14, name: 'V1' }, |
| | | { code: 17, name: 'V7' }, |
| | | { code: 16, name: 'V6' } |
| | | ], |
| | | ordertypeArr: [// 工单类型 |
| | | { code: 'PO', name: '标准工单' }, |
| | | { code: 'FO', name: '报废补单' } |
| | | ], |
| | | partArr: [], // 产品信息 |
| | | wkshopArr: [], // 生产车间数组 |
| | | routeArr: [], // 工艺路线数组 |
| | |
| | | { required: true, message: '请选择产品信息', trigger: ['blur', 'change'] } |
| | | ], |
| | | mesordercode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | { required: true, validator: validateCode, trigger: ['blur', 'change'] } |
| | | ], |
| | | mesqty: [ |
| | | { required: true, message: '请输入工单数量', trigger: ['blur', 'change'] } |
| | |
| | | ], |
| | | orderlev: [ |
| | | { required: true, message: '请选择工单等级', trigger: ['blur', 'change'] } |
| | | ], |
| | | isAps: [ |
| | | { required: true, message: '请选择是否排程', trigger: ['blur', 'change'] } |
| | | ], |
| | | bomId: [ |
| | | { required: true, message: '请选择物料清单', trigger: ['blur', 'change'] } |
| | | ] |
| | | |
| | | }, |
| | |
| | | }, |
| | | |
| | | formApprove: { |
| | | m_po: '', // 源单单号 |
| | | mesordercode: '', |
| | | partcode: '', |
| | | partname: '', |
| | |
| | | routename: '', |
| | | lm_date: '' |
| | | }, |
| | | number: '' |
| | | number: '', |
| | | 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: ''// 操作时间 |
| | | }, |
| | | dialogVisibleSource: false, |
| | | sourceTableData: [], |
| | | sourceForm: { |
| | | erporderstus: '', // 订单状态码 |
| | | erpordercode: '', // 订单编号 |
| | | partcode: '', // 产品编码 |
| | | partname: '', // 产品名称 |
| | | partspec: '', // 产品规格 |
| | | creatuser: '', // 创建人员 |
| | | // paystartdate: '', // 交付时间 |
| | | paystartdate: '', // 预计开工时间 |
| | | payenddate: '', // 预计完工时间 |
| | | createdate: '', // 创建时间 |
| | | prop: 'createdate', // 排序字段 |
| | | order: 'desc', // 排序字段 |
| | | page: 1, // 第几页 |
| | | rows: 20 // 每页多少条 |
| | | }, |
| | | sourceFormTotal: 10, |
| | | radioSelectedId: '', |
| | | isExpandDialog: false, // 对话框表单是否展开,默认不展开 |
| | | dialogVisibleRoute: false, |
| | | dialogFormRoute: { |
| | | projectName: '', // 产品名称 |
| | | projectCode: '', // 产品代码 |
| | | routeOperationArr: [] // 工艺路线集合 |
| | | }, |
| | | defaultroute_code: '', // 默认工艺路线选中值 |
| | | defaultroute_codeArr: '', // 默认工艺路线数组 |
| | | projectTableData: [], // 设备列表 |
| | | tableDataDetail: [], // 点击工单表的行 显示详细信息 |
| | | printSize: 1, |
| | | printSizeSelectArr: [// 宽*高 |
| | | { code: 0, name: '80*50' }, |
| | | { code: 1, name: '78*60' } |
| | | // { code: 2, name: '50*60' }, |
| | | // { code: 3, name: '50*40' }, |
| | | // { code: 4, name: '50*80' }, |
| | | // { code: 5, name: '40*30' } |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getMesOrderSearch() |
| | | this.getSelect() |
| | | this.handleRequest() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | |
| | | this.username = getCookie('username') |
| | | }, |
| | | methods: { |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | }, |
| | | handleRequest() { |
| | | this.getMesOrderSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getSelect() |
| | | } |
| | | }) |
| | | }, |
| | | async getMesOrderSearch() { |
| | | // let tempDate = this.form.createdate |
| | | // if (tempDate.length > 0) { |
| | |
| | | partname: this.form.partname, // 产品名称 |
| | | partspec: this.form.partspec, // 产品规格 |
| | | creatuser: this.form.creatuser, // 创建人员 |
| | | sourceorder: this.form.sourceorder, // 源单单号 |
| | | ordertype: this.form.ordertype, // 单据类型 |
| | | createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 创建时间 |
| | | prop: this.form.prop, // 排序字段 |
| | | order: this.form.order, // 排序字段 |
| | |
| | | this.total = res.count |
| | | |
| | | // this.form.createdate = tempDate |
| | | return { code: res.code } |
| | | }, |
| | | async getSelect() { |
| | | // 获取产品信息 |
| | |
| | | this.form.prop = prop |
| | | this.getMesOrderSearch() |
| | | }, |
| | | sourceSortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.sourceForm.order = order |
| | | this.sourceForm.prop = prop |
| | | this.getErpOrderSearch() |
| | | }, |
| | | // 查询 |
| | | search() { |
| | | this.getMesOrderSearch() |
| | |
| | | this.form.partspec = '' |
| | | this.form.paydate = '' |
| | | this.form.creatuser = '' |
| | | this.form.createdate = '' |
| | | this.form.sourceorder = '' |
| | | this.form.creatuser = '' |
| | | this.form.ordertype = '' |
| | | this.getMesOrderSearch() |
| | | }, |
| | | // 单选框选中获取当前行信息 |
| | |
| | | this.dialogForm.planstartdate = handleDatetime(new Date()) |
| | | this.dialogForm.planenddate = handleDatetime(new Date()) |
| | | this.dialogForm.orderlev = 3 |
| | | }, |
| | | |
| | | this.dialogForm.bomId = this.getMaxBomId() |
| | | }, |
| | | // 查找物料清单里面版本最大的值 |
| | | getMaxBomId() { |
| | | let max = 0// 最大值 |
| | | let code = ''// 最大值对应的code |
| | | this.bomIdArr.forEach(item => { |
| | | if (parseFloat(item.name.substring(1)) > max) { |
| | | max = parseFloat(item.name.substring(1)) |
| | | code = item.code |
| | | } |
| | | }) |
| | | return code |
| | | }, |
| | | // 产品信息值改变 |
| | | async partcodeChange(val) { |
| | | console.log(val, 22) |
| | |
| | | }, |
| | | // 工序任务 |
| | | async check(row) { |
| | | this.dialogVisibleTask = true |
| | | const { data: res } = await SearchWorkStep({ wo_code: row.wo_code }) |
| | | this.taskTableData = res |
| | | |
| | | if (this.taskTableData.length === 0) { |
| | | return this.$message.info('无生产任务数据!') |
| | | } |
| | | this.dialogForm.mesordercode = res[0].wo_code |
| | | this.dialogVisibleTask = true |
| | | }, |
| | | dialogVisibleBack() { |
| | | this.dialogVisibleTask = false |
| | |
| | | this.dialogForm.partname = row.partname |
| | | this.dialogForm.mesqty = row.plan_qty |
| | | this.dialogForm.partspec = row.partspec |
| | | this.dialogForm.sourceorder = row.m_po |
| | | this.dialogForm.ordertype = row.wotype |
| | | |
| | | // this.routecodeChange(this.dialogForm.routecode) |
| | | |
| | | this.dialogForm.planstartdate = row.plan_startdate !== null ? row.plan_startdate : handleDatetime(new Date()) |
| | | this.dialogForm.planenddate = row.plan_enddate !== null ? row.plan_enddate : handleDatetime(new Date()) |
| | | this.dialogForm.orderlev = row.piroque !== null ? row.piroque : 3 // 等级 |
| | | |
| | | this.dialogForm.bomId = this.getMaxBomId() // 暂时写死 |
| | | }) |
| | | }, |
| | | // 删除按钮 |
| | | async del(row) { |
| | | console.log(row.status) |
| | | if (row.status === 'START' || row.status === 'CLOSED') { |
| | | return this.$message.info('此工单不可删除!') |
| | | } |
| | |
| | | }).then(() => { |
| | | console.log(row, 1) |
| | | const data = { |
| | | souceid: row.sourceid, |
| | | wocode: row.wo_code, |
| | | m_po: row.m_po, |
| | | orderqty: row.plan_qty |
| | | } |
| | | console.log(data, 2) |
| | | DeleteMesOrder(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | | this.getMesOrderSearch() |
| | | } |
| | | }) |
| | |
| | | this.dialogForm.partcode = '' // 产品编码 |
| | | this.dialogForm.mesqty = '' // 工单数量 |
| | | |
| | | this.dialogForm.ordertype = 'PO' // 工单类型 |
| | | this.dialogForm.sourceorder = '' // 源单单号 |
| | | |
| | | this.dialogForm.routecode = '' // 工艺路线编码 |
| | | this.dialogForm.wkshopcode = '' // 生产车间编码 |
| | | this.dialogForm.planstartdate = '' // 计划开始时间 |
| | | this.dialogForm.planenddate = '' // 计划完成时间 |
| | | this.dialogForm.orderlev = '' // 工单等级 |
| | | |
| | | this.dialogForm.isAps = 'N' // 是否排程 |
| | | this.dialogForm.bomId = this.getMaxBomId() |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |
| | |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | if (this.dialogForm.ordertype === 'FO' && this.dialogForm.sourceorder.toString().trim().length <= 0) { |
| | | return this.$message.info('源单单号不能为空!') |
| | | } |
| | | |
| | | const data = { |
| | | // partname: this.dialogForm.partname, // 产品名称 |
| | | // partspec: this.dialogForm.partspec, // 产品规格 |
| | |
| | | mesordercode: this.dialogForm.mesordercode, // 工单编号 |
| | | partcode: this.dialogForm.partcode, // 产品编码 |
| | | mesqty: this.dialogForm.mesqty, // 工单数量 |
| | | |
| | | ordertype: this.dialogForm.ordertype, // 单据类型 |
| | | sourceorder: this.dialogForm.sourceorder, // 源单单号 |
| | | routecode: this.dialogForm.routecode, // 工艺路线编码 |
| | | wkshopcode: this.dialogForm.wkshopcode, // 生产车间编码 |
| | | planstartdate: this.dialogForm.planstartdate, // 计划开始时间 |
| | | planenddate: this.dialogForm.planenddate, // 计划完成时间 |
| | | orderlev: this.dialogForm.orderlev, // 工单等级 |
| | | is_aps: this.dialogForm.isAps, // 是否排程 |
| | | bom_id: this.dialogForm.bomId, // 是否排程 |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update' |
| | | } |
| | | |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | AddUpdateMesOrder(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.dialogVisible = false |
| | |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '派发成功!') |
| | | // this.dialogVisible = false |
| | | this.getMesOrderSearch() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '派发失败!') |
| | | } |
| | |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | // this.isFullscreen = window.innerHeight < 800 |
| | | if (this.isFullscreen) { |
| | | this.tableHeight = this.tableHeight - 50 |
| | | this.mainHeight = window.innerHeight - 85 |
| | | // this.tableHeight = this.mainHeight - 250 |
| | | this.tableHeight = this.mainHeight - 515 |
| | | if (window.innerHeight < 769) { |
| | | this.tableHeight = this.tableHeight - 20 |
| | | } |
| | | this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | }, |
| | | // 工艺路线放大镜点击 |
| | |
| | | this.dialogVisibleSearch = false |
| | | }, |
| | | // 处理打印 |
| | | handlePrint() { |
| | | handlePrint(wo_code) { |
| | | // const number = Math.random() * Math.random() |
| | | // this.number = number === 0 ? (10 + Math.random()) : number |
| | | // console.log(number) |
| | | this.dialogVisibleApprove = true |
| | | |
| | | const data2 = { |
| | | username: getCookie('admin'), |
| | | mesordercode: this.dialogForm.mesordercode |
| | | mesordercode: wo_code || this.dialogForm.mesordercode |
| | | } |
| | | MesOrderPrintSearch1(data2).then(res2 => { |
| | | if (res2.code === '200') { |
| | |
| | | |
| | | this.tableDataPrint = res3 |
| | | this.formApprove.mesordercode = res3[0].wo_code |
| | | this.formApprove.m_po = res3[0].m_po |
| | | this.formApprove.partcode = res3[0].partcode |
| | | this.formApprove.partname = res3[0].partname |
| | | this.formApprove.partspec = res3[0].partspec |
| | |
| | | }) |
| | | } |
| | | }) |
| | | this.dialogVisibleApprove = true |
| | | }, |
| | | dialogVisibleTaskClose() { |
| | | this.dialogForm.mesordercode = '' |
| | |
| | | // } |
| | | // }) |
| | | // }, |
| | | // 生成二维码 |
| | | // 生成二维码 工单报表二维码 |
| | | bindQRCode(seq, text, size) { |
| | | if (size === 'big') { |
| | | console.log(text, 1) |
| | |
| | | dialogVisibleConfirmClose() { |
| | | // this.dialogForm.mesordercode = '' |
| | | this.formApprove.mesordercode = '' |
| | | this.formApprove.m_po = '' |
| | | this.formApprove.partcode = '' |
| | | this.formApprove.partname = '' |
| | | this.formApprove.partspec = '' |
| | |
| | | |
| | | // this.$refs.qrCodeDiv0.title = '' |
| | | |
| | | // this.$refs.qrCodeDiv1 = '' |
| | | // this.$refs.qrCodeDiv2 = '' |
| | | // this.$refs.qrCodeDiv3 = '' |
| | | |
| | | // this.$ref['qrCodeDiv'].clearable() |
| | | // this.tableDataPrint.forEach((item, index) => { |
| | | // this.$refs['qrCodeDiv' + item.seq] = '' |
| | | // this.$refs[('qrCodeDiv' + index).toString()] = '' |
| | | // // this.bindQRCode(item.seq, '', 'small')//此方法没用 |
| | | // }) |
| | | // this.bindQRCode(this.tableDataPrint.length, '', 'big')//此方法没用 |
| | | // this.$refs[('qrCodeDiv' + this.tableDataPrint.length).toString()] = '' |
| | | |
| | | this.tableDataPrint = [] |
| | | }, |
| | | // 补打按钮 |
| | | supplementClick() { |
| | | this.dialogVisibleTask = false |
| | | this.handlePrint() |
| | | } |
| | | }, |
| | | // 补打小标签 |
| | | supplementSmallClick(row) { |
| | | // let obj = {} |
| | | console.log(row, 21) |
| | | // this.taskTableData.forEach((item, index) => { |
| | | this.tableDataDetail.forEach((item, index) => { |
| | | if (item.seq === row.seq) { |
| | | console.log(item) |
| | | this.qrForm = { |
| | | // qrvalue: item.seq === this.taskTableData.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.taskTableData[item.seq].stepcode, |
| | | qrvalue: item.seq === this.tableDataDetail.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.tableDataDetail[item.seq].stepcode, |
| | | // startqty: item.seq === this.taskTableData.length ? item.plan_qty : this.taskTableData[item.seq].plan_qty, |
| | | startqty: item.seq === this.tableDataDetail.length ? item.plan_qty : this.tableDataDetail[item.seq].plan_qty, |
| | | wo_code: item.wo_code, |
| | | partcode: item.partcode, |
| | | partname: item.partname, |
| | | // nextstepname: item.seq === this.taskTableData.length ? item.stepname : this.taskTableData[item.seq].stepname, |
| | | nextstepname: item.seq === this.tableDataDetail.length ? item.stepname : this.tableDataDetail[item.seq].stepname, |
| | | operator: getCookie('username'), |
| | | operatorTime: handleDatetime2(new Date()) |
| | | } |
| | | this.$nextTick(() => { |
| | | console.log(this.qrForm.qrvalue, 3333) |
| | | this.bindQRCode2(this.qrForm.qrvalue) |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | // this.dialogVisibleTask = false |
| | | this.dialogVisible2 = true |
| | | console.log(this.qrForm, 1111) |
| | | }, |
| | | 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 = '' |
| | | }, |
| | | // 生成二维码 工序标签二维码 |
| | | bindQRCode2(text) { |
| | | new QRCode(this.$refs.qrCodeDiv2, { |
| | | text: text, |
| | | width: 60, |
| | | height: 60, |
| | | colorDark: '#000', // 二维码颜色 |
| | | colorLight: '#ffffff', // 二维码背景色 |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | | }) |
| | | }, |
| | | // 报废补单情况下可点击选择 |
| | | mesordertsourcesearchclick() { |
| | | if (this.dialogForm.ordertype === 'PO') { |
| | | return this.$message.info('工单类型为报废补单情况下可选择!') |
| | | } |
| | | |
| | | this.getErpOrderSearch() |
| | | |
| | | this.dialogVisibleSource = true |
| | | }, |
| | | async getErpOrderSearch() { |
| | | let tempDate2 = this.sourceForm.paystartdate |
| | | if (tempDate2.length > 0) { |
| | | tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1]) |
| | | } |
| | | |
| | | let tempDate = this.sourceForm.payenddate |
| | | if (tempDate.length > 0) { |
| | | tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1]) |
| | | } |
| | | |
| | | const data = { |
| | | erporderstus: this.sourceForm.erporderstus, // 订单状态码 |
| | | erpordercode: this.sourceForm.erpordercode, // 订单编号 |
| | | partcode: this.sourceForm.partcode, // 产品编码 |
| | | partname: this.sourceForm.partname, // 产品名称 |
| | | partspec: this.sourceForm.partspec, // 产品规格 |
| | | paystartdate: tempDate2, // 交付时间 |
| | | payenddate: tempDate, // 交付时间 |
| | | creatuser: this.sourceForm.creatuser, // 创建人员 |
| | | |
| | | prop: this.sourceForm.prop, // 排序字段 |
| | | order: this.sourceForm.order, // 排序字段 |
| | | page: this.sourceForm.page, // 第几页 |
| | | rows: this.sourceForm.rows // 每页多少条 |
| | | |
| | | } |
| | | |
| | | const res = await ErpOrderSearch(data) |
| | | this.sourceTableData = res.data.filter(item => item.status !== 'NEW') |
| | | this.sourceFormTotal = res.count |
| | | }, |
| | | // 单选框选中获取当前行信息 |
| | | getCurrentRowSource(id) { |
| | | this.radioSelectedId = id |
| | | }, |
| | | sourceSearch() { |
| | | this.getErpOrderSearch() |
| | | }, |
| | | sourceReset() { |
| | | this.sourceForm.erporderstus = '' |
| | | this.sourceForm.erpordercode = '' |
| | | this.sourceForm.partcode = '' |
| | | this.sourceForm.partname = '' |
| | | this.sourceForm.partspec = '' |
| | | this.sourceForm.paystartdate = '' |
| | | this.sourceForm.payenddate = '' |
| | | this.sourceForm.creatuser = '' |
| | | this.sourceForm.createdate = '' |
| | | this.getErpOrderSearch() |
| | | }, |
| | | dialogVisibleSourceClose() { |
| | | this.radioSelectedId = '' |
| | | |
| | | this.sourceForm.erporderstus = '' |
| | | this.sourceForm.erpordercode = '' |
| | | this.sourceForm.partcode = '' |
| | | this.sourceForm.partname = '' |
| | | this.sourceForm.partspec = '' |
| | | this.sourceForm.paystartdate = '' |
| | | this.sourceForm.payenddate = '' |
| | | this.sourceForm.creatuser = '' |
| | | this.sourceForm.createdate = '' |
| | | |
| | | this.isExpandDialog = false |
| | | this.sourceTableData = [] |
| | | }, |
| | | dialogVisibleSourceBack() { |
| | | this.dialogVisibleSource = false |
| | | }, |
| | | dialogVisibleSourceConfirm() { |
| | | console.log(this.radioSelectedId) |
| | | this.sourceTableData.forEach(item => { |
| | | if (item.id === this.radioSelectedId) { |
| | | this.dialogForm.sourceorder = item.wo |
| | | this.dialogForm.partcode = item.partcode |
| | | this.dialogForm.partspec = item.partspec |
| | | } |
| | | }) |
| | | this.dialogVisibleSource = false |
| | | this.partcodeChange(this.dialogForm.partcode) |
| | | }, |
| | | mesordertypeChange(val) { |
| | | if (val === 'PO') { |
| | | this.dialogForm.sourceorder = '' |
| | | this.dialogForm.partcode = '' |
| | | this.dialogForm.partspec = '' |
| | | } |
| | | }, |
| | | /* 关联工艺路线模块*/ |
| | | // 关联工艺路线 |
| | | async routeClick(row) { |
| | | console.log(row) |
| | | // this.defaultroute_code = row.default_route |
| | | this.dialogFormRoute.projectCode = row.partcode |
| | | this.dialogFormRoute.projectName = row.partname |
| | | this.dialogVisibleRoute = true |
| | | const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode }) |
| | | this.dialogFormRoute.routeOperationArr = res |
| | | |
| | | this.dialogFormRoute.routeOperationArr.forEach((item, index) => { |
| | | item.isSelected1 = false |
| | | item.isSelected2 = false |
| | | if (index === 0) { |
| | | item.isSelected1 = true |
| | | this.projectTableData = item.Data |
| | | } |
| | | if (item.flag === 'Y') { |
| | | item.isSelected2 = true |
| | | this.$nextTick(() => { |
| | | $('input:checkbox').eq(index).prop('checked', true) |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y') |
| | | }, |
| | | // 对话框关闭 |
| | | handleCloseRoute() { |
| | | this.dialogFormRoute.routeOperationArr = [] |
| | | this.defaultroute_codeArr = [] |
| | | this.defaultroute_code = '' |
| | | this.projectTableData = [] |
| | | }, |
| | | // 取消 |
| | | routeDialogVisibleCancel() { |
| | | this.dialogVisibleRoute = false |
| | | }, |
| | | // 确定 |
| | | async routeDialogVisibleConfirm() { |
| | | const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2) |
| | | if (this.defaultroute_code === '' && temp.length > 0) { |
| | | return this.$message.info('默认工艺路线不能为空!') |
| | | } |
| | | |
| | | // 提交格式 |
| | | const data = [] |
| | | this.dialogFormRoute.routeOperationArr.forEach(item => { |
| | | if (item.isSelected2) { |
| | | data.push({ code: item.code, name: item.name }) |
| | | } |
| | | }) |
| | | |
| | | const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data) |
| | | if (res.code === '200') { |
| | | this.$message.success('保存成功!') |
| | | await this.getMesOrderSearch() |
| | | this.dialogVisibleRoute = false |
| | | } |
| | | }, |
| | | // 大盒子点击事件 |
| | | myCheckboxClick(val) { |
| | | console.log(val, 1) |
| | | this.dialogFormRoute.routeOperationArr.forEach(item => { |
| | | item.isSelected1 = val.code === item.code |
| | | }) |
| | | |
| | | this.projectTableData = val.Data |
| | | }, |
| | | // 小盒子点击事件 |
| | | myCheckboxInputClick(val) { |
| | | console.log(val, 2) |
| | | val.isSelected2 = !val.isSelected2 |
| | | |
| | | this.dialogFormRoute.routeOperationArr.forEach((item, index) => { |
| | | if (val.code === item.code) { |
| | | item.flag = !item.flag |
| | | } |
| | | }) |
| | | if (val.code === this.defaultroute_code) { |
| | | this.defaultroute_code = '' |
| | | } |
| | | this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2) |
| | | }, |
| | | // 行点击事件 |
| | | async rowClick(row, event, column) { |
| | | console.log(row, event, column) |
| | | console.log(row.wo_code, event, column) |
| | | this.radioSelected = row.wo_code |
| | | const { data: res } = await SearchWorkStep({ wo_code: row.wo_code }) |
| | | this.tableDataDetail = res |
| | | }, |
| | | // 打印工单 |
| | | printOrder() { |
| | | |
| | | }, |
| | | // 选择打印尺寸的大小值改变 |
| | | printSizeChange(val) { |
| | | this.$nextTick(() => { |
| | | this.bindQRCode2(this.qrForm.qrvalue) |
| | | }) |
| | | }, |
| | | printMe2StylePadding(val) { |
| | | if (val === 0) { |
| | | return { paddingLeft: '10px', paddingTop: '5px' } |
| | | } |
| | | if (val === 5) { |
| | | return { paddingLeft: '15px', paddingTop: '7px' } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--primary { |
| | | background-color: $main_color !important; |
| | | height: 30px; |
| | | .dialogVisibleRoute { |
| | | .myCheckboxGroup { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | |
| | | .myCheckbox { |
| | | //border: 1px solid $main_color; |
| | | border: 1px solid #eee; |
| | | display: flex; |
| | | min-width: 100px; |
| | | padding: 10px; |
| | | margin: 10px 30px 0 0; |
| | | border-radius: 5px; |
| | | cursor: default; |
| | | |
| | | .myCheckboxInput { |
| | | margin: 1px 5px 0 0; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | } |
| | | |
| | | //.myCheckbox{ |
| | | // border: 1px solid $main_color; |
| | | //} |
| | | |
| | | input[type=checkbox] { |
| | | cursor: pointer; |
| | | position: relative; |
| | | width: 14px; |
| | | height: 14px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | input[type=checkbox]::after { |
| | | position: absolute; |
| | | top: 0; |
| | | //color: rgb(130, 35, 35); |
| | | color: $main_color; |
| | | width: 14px; |
| | | height: 14px; |
| | | display: inline-block; |
| | | visibility: visible; |
| | | padding-left: 0px; |
| | | text-align: center; |
| | | content: ' '; |
| | | border-radius: 3px |
| | | } |
| | | |
| | | input[type=checkbox]:checked::after { |
| | | //content: "✓"; |
| | | content: "√"; |
| | | color: #fff; |
| | | font-size: 12px; |
| | | font-weight: bold; |
| | | background-color: $main_color; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .dialogVisibleRoute { |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | } |
| | | |
| | | .defaultroute_code ::v-deep .el-input__suffix-inner { |
| | | display: flex; |
| | | align-items: center; |
| | | //border: 1px solid $main_color; |
| | | border: none; |
| | | padding: 0 20px; |
| | | justify-content: center; |
| | | margin-top: -3px; |
| | | } |
| | | |
| | | ::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; |
| | | .el-date-editor { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | |
| | | padding: 20px 20px !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 { |
| | |
| | | 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; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered + .el-radio.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | .body ::v-deep .el-divider { |
| | | border: 1px solid #eee; |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | |
| | | .body ::v-deep .el-form-item { |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select-dropdown__item.selected { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__inner:hover { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-textarea__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | .elTableDiv { |
| | | ::v-deep .el-radio__label { |
| | | display: none; |
| | | } |
| | | ::v-deep .el-radio__label { |
| | | display: none; |
| | | } |
| | | |
| | | } |
| | | |
| | | .el-table::before { |
| | |
| | | // //outline: #000 solid 2px !important; |
| | | //} |
| | | |
| | | .tableDataPrint ::v-deep div.cell{ |
| | | .tableDataPrint ::v-deep div.cell { |
| | | display: flex !important; |
| | | align-items: center !important; |
| | | justify-content: center !important; |
| | | } |
| | | .formContent{ |
| | | |
| | | .formContent { |
| | | width: 240px; |
| | | } |
| | | |
| | |
| | | |
| | | </style> |
| | | <style> |
| | | .formContent .el-form-item__label{ |
| | | color: #000 !important; |
| | | .formContent .el-form-item__label { |
| | | color: #000 !important; |
| | | } |
| | | </style> |
| | | <!--公共页面样式--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | |
| | | ::v-deep .el-range-input { |
| | | font-size: 14px !important; |
| | | } |
| | | |
| | | ::v-deep .el-range__icon { |
| | | line-height: 28px !important; |
| | | } |
| | | |
| | | ::v-deep .el-range-separator { |
| | | line-height: 28px !important; |
| | | } |
| | | |
| | | ::v-deep .el-range-input { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | ::v-deep .el-range-separator { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .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 .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: 10px auto; |
| | | } |
| | | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .userDialogVisible ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .dateMini { |
| | | ::v-deep .el-input__inner { |
| | | line-height: 34px; |
| | | height: 34px; |
| | | width: 200px; |
| | | display: flex; |
| | | font-size: 14px !important; |
| | | align-items: center !important; |
| | | } |
| | | |
| | | ::v-deep .el-input__prefix { |
| | | margin-top: -3px; |
| | | } |
| | | |
| | | //::v-deep .el-range__icon{ |
| | | // line-height: 28px; |
| | | //} |
| | | } |
| | | |
| | | ::v-deep .el-select__caret{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .tableFixed{ |
| | | ::v-deep .el-table__fixed-right{ |
| | | height: 100% !important; |
| | | } |
| | | ::v-deep .el-table__fixed{ |
| | | height: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | |
| | | .el-table .custom-row { |
| | | background: #f8f8fa; |
| | | } |
| | | </style> |