| | |
| | | <div class="elForm"> |
| | | <el-form-item label="订单状态" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.erporderstus" |
| | | v-model="form.mesorderstus" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | filterable |
| | | @change="erporderstusChange" |
| | | > |
| | | <el-option |
| | | v-for="item in erporderstusArr" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="订单编号" style=" display: flex;"> |
| | | <el-input v-model="form.erpordercode" placeholder="请输入" style="width: 200px" /> |
| | | <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--> |
| | |
| | | <el-form-item 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-date-picker |
| | | v-model="form.paydate" |
| | | type="date" |
| | | style="width: 200px" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item 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-date-picker--> |
| | | <!-- v-model="form.createdate"--> |
| | | <!-- type="daterange"--> |
| | | <!-- :clearable="false"--> |
| | | <!-- range-separator="~"--> |
| | | <!-- start-placeholder="开始日期"--> |
| | | <!-- end-placeholder="结束日期"--> |
| | | <!-- size="mini"--> |
| | | <!-- />--> |
| | | <el-date-picker |
| | | v-model="form.createdate" |
| | | type="date" |
| | | style="width: 200px" |
| | | size="mini" |
| | | :clearable="false" |
| | | style="width: 200px;" |
| | | format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;align-items: start;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 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="!isIpad" 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="isIpad" 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> |
| | | </el-form> |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-refresh-right" |
| | | >同步ERP |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-switch-button" |
| | | >订单关闭 |
| | | </el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>--> |
| | | <!-- <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>--> |
| | | <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 |
| | | :data="tableData" |
| | | :height="tableHeight" |
| | | :height="tableHeight+'px'" |
| | | border |
| | | stripe |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | |
| | | <!-- />--> |
| | | <el-table-column |
| | | width="50" |
| | | fixed |
| | | > |
| | | <template scope="scope"> |
| | | <template slot-scope="{row}"> |
| | | <el-radio |
| | | v-model="radioSelected" |
| | | :label="scope.$index" |
| | | :label="row.wo_code" |
| | | style="color: #fff;padding-left: 10px; margin-right: -25px;" |
| | | @change.native="getCurrentRow(scope.row)" |
| | | @change.native="getCurrentRow(row.wo_code)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | prop="RowNum" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="status" |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.status==='NEW'">新工单</div> |
| | | <div v-if="row.status==='ALLOC'">已派发</div> |
| | | <!-- <div v-if="row.status==='CREATING'">执行中</div>--> |
| | | <!-- <div v-if="row.status==='CREATED'">已关闭</div>--> |
| | | <div v-if="row.status==='ALLO'">已派发</div> |
| | | <div v-if="row.status==='START'">开工</div> |
| | | <div v-if="row.status==='CLOSED'">完工</div> |
| | | </template> |
| | |
| | | prop="wo_code" |
| | | label="工单编号" |
| | | sortable="custom" |
| | | min-width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产品编码" |
| | | sortable="custom" |
| | | min-width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | min-width="150" |
| | | label="产品名称" |
| | | sortable="custom" |
| | | /> |
| | |
| | | /> |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="工数量" |
| | | label="工单数" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="生产车间" |
| | | sortable="custom" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | prop="wkshp_name" |
| | | label="工艺路线" |
| | | label="生产车间" |
| | | sortable="custom" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="route_name" |
| | | label="生产车间" |
| | | label="工艺路线" |
| | | sortable="custom" |
| | | min-width="130" |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="plan_startdate" |
| | | label="计划开始时间" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="paydate" |
| | | label="要求交付时间" |
| | | prop="plan_enddate" |
| | | label="计划结束时间" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="createuser" |
| | | prop="piroque" |
| | | label="工单等级" |
| | | sortable="custom" |
| | | width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.piroque==='1'">特级</div> |
| | | <div v-if="row.piroque==='2'">紧急</div> |
| | | <div v-if="row.piroque==='3'">正常</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="创建人员" |
| | | sortable="custom" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="createdate" |
| | | prop="lm_date" |
| | | label="创建时间" |
| | | width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="140" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="edit('edit',row)">编辑</el-button> |
| | | <!-- <el-button type="text" @click="del(row)">删除</el-button>--> |
| | | <el-button type="text" @click="check(row)">工序任务</el-button> |
| | | <el-button type="text" @click="del(row)">删除</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | @pagination="getMesOrderSearch" |
| | | /> |
| | | </div> |
| | | |
| | | <!--新增派发对话框--> |
| | | <el-dialog |
| | | :title="operation==='add'?'新增':'编辑'" |
| | | :title="operation==='add'?'新增':'派发'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | width="840px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="订单状态" prop="OrgCode"> |
| | | <el-form |
| | | ref="dialogForm" |
| | | inline |
| | | :rules="dialogFormRules" |
| | | :model="dialogForm" |
| | | label-width="110px" |
| | | > |
| | | <el-form-item |
| | | label="订单状态" |
| | | prop="mesorderstus" |
| | | > |
| | | <el-select |
| | | v-model="form.partcode" |
| | | v-model="dialogForm.mesorderstus" |
| | | disabled |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 220px" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in OrgTypeArr" |
| | | v-for="item in erporderstusArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="订单编号" prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" disabled style="width: 220px" /> |
| | | |
| | | <el-form-item label="工单编号" prop="mesordercode"> |
| | | <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" disabled style="width: 220px" /> |
| | | <el-form-item label="工单数量" prop="mesqty"> |
| | | <el-input |
| | | v-model="dialogForm.mesqty" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | :disabled="operation!=='add'" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" disabled style="width: 220px" /> |
| | | <el-form-item |
| | | v-if="operation==='add'" |
| | | label="产品名称" |
| | | prop="partcode" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.partcode" |
| | | filterable |
| | | :disabled="operation!=='add'" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="partcodeChangeDialog" |
| | | > |
| | | <el-option |
| | | v-for="item in partArr" |
| | | :key="item.partcode" |
| | | :label="item.partname" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="订单数量" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" disabled style="width: 220px" /> |
| | | <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="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" disabled style="width: 220px" /> |
| | | <el-form-item label="产品编码" prop="partcode"> |
| | | <el-input v-model="dialogForm.partcode" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="下达数量" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | <el-form-item label="产品规格" prop="partspec"> |
| | | <el-input v-model="dialogForm.partspec" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="下单数量" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item label="交付时间" prop="OrgName"> |
| | | <div style="display: flex"> |
| | | <div style="display: flex;flex-wrap: nowrap"> |
| | | <el-form-item label="工艺路线" prop="routecode"> |
| | | <el-select |
| | | v-model="dialogForm.routecode" |
| | | filterable |
| | | :disabled="dialogForm.partcode===''" |
| | | :popper-append-to-body="false" |
| | | style="width: 172px" |
| | | placeholder="请选择" |
| | | @change="routecodeChange" |
| | | > |
| | | <el-option |
| | | v-for="item in routeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | style="padding: 0 10px;margin-left: -8px;margin-top: 5px" |
| | | class="el-icon-search" |
| | | @click="searchClick" |
| | | /> |
| | | <!-- :disabled="dialogForm.routecode===''"--> |
| | | |
| | | </div> |
| | | <el-form-item label="生产车间" prop="wkshopcode"> |
| | | <el-select |
| | | v-model="dialogForm.wkshopcode" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | :disabled="dialogForm.routecode===''" |
| | | > |
| | | <el-option |
| | | v-for="item in wkshopArr" |
| | | :key="item.org_code" |
| | | :label="item.org_name" |
| | | :value="item.org_code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item label="计划开始时间" prop="planstartdate"> |
| | | <el-date-picker |
| | | v-model="dialogForm.OrgName" |
| | | v-model="dialogForm.planstartdate" |
| | | type="date" |
| | | style="width: 220px" |
| | | :clearable="false" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 200px" |
| | | placeholder="选择日期" |
| | | /> |
| | | <!-- <el-input v-model="dialogForm.OrgName" style="width: 220px" />--> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="计划完成时间" prop="planenddate"> |
| | | <el-date-picker |
| | | v-model="dialogForm.planenddate" |
| | | type="date" |
| | | :clearable="false" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 200px" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="工单等级" prop="orderlev"> |
| | | <el-select |
| | | v-model="dialogForm.orderlev" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in orderlevArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <!-- 工艺路线放大镜对话框--> |
| | | <el-dialog |
| | | title="工艺路线" |
| | | :visible.sync="dialogVisibleSearch" |
| | | width="840px" |
| | | top="20vh" |
| | | class="dialogVisibleSearch" |
| | | append-to-body |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-table |
| | | :data="searchTableData" |
| | | border |
| | | stripe |
| | | height="300" |
| | | style="width: 100%;" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | prop="seq" |
| | | label="序号" |
| | | width="50" |
| | | /> |
| | | <el-table-column |
| | | prop="stepcode" |
| | | label="工序编码" |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="工序名称" |
| | | /> |
| | | <el-table-column |
| | | prop="flwtype" |
| | | label="工序类型" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.flwtype==='W'">外协</div> |
| | | <div v-if="row.flwtype==='Z'">自制</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="descr" |
| | | label="工序描述" |
| | | /> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <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> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 工序任务对话框--> |
| | | <el-dialog |
| | | title="工序任务" |
| | | :visible.sync="dialogVisibleTask" |
| | | width="840px" |
| | | top="15vh" |
| | | class="dialogVisibleSearch" |
| | | :close-on-click-modal="false" |
| | | @close="dialogVisibleTaskClose" |
| | | > |
| | | <el-button |
| | | style="margin-bottom: 15px" |
| | | type="primary" |
| | | @click="supplementClick" |
| | | >补打</el-button> |
| | | <el-table |
| | | :data="taskTableData" |
| | | border |
| | | stripe |
| | | height="300" |
| | | style="width: 100%;" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | prop="seq" |
| | | width="50" |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="工单编号" |
| | | width="200" |
| | | /> |
| | | <el-table-column |
| | | prop="stepcode" |
| | | label="工序编码" |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="工序名称" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="flwtype"--> |
| | | <!-- label="工序类型"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.flwtype==='W'">外协</div>--> |
| | | <!-- <div v-if="row.flwtype==='Z'">自制</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="descr"--> |
| | | <!-- label="工序描述"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="任务数量" |
| | | /> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="合格数量" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | /> |
| | | </el-table> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleBack">返 回</el-button> |
| | | <!-- <el-button type="primary" @click="dialogVisibleConfirm">确 定</el-button>--> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 打印预览对话框--> |
| | | <el-dialog |
| | | title="" |
| | | :visible.sync="dialogVisibleApprove" |
| | | width="812px" |
| | | class="dialogVisibleConfirmClass" |
| | | append-to-body |
| | | :close-on-click-modal="false" |
| | | @close="dialogVisibleConfirmClose" |
| | | > |
| | | <!-- 要打印的区域 --> |
| | | <div id="printMe" style="padding: 30px"> |
| | | <div style="font-size: 26px; text-align: center">流程单</div> |
| | | |
| | | <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;"> |
| | | <div style="width: 78%"> |
| | | <el-form |
| | | ref="formApprove" |
| | | :model="formApprove" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="工单编号:" class="formContent"> |
| | | {{ formApprove.mesordercode }} |
| | | </el-form-item> |
| | | <el-form-item label="产品编码:" class="formContent"> |
| | | {{ formApprove.partcode }} |
| | | </el-form-item> |
| | | <el-form-item label="产品名称:" class="formContent"> |
| | | {{ formApprove.partname }} |
| | | </el-form-item> |
| | | <el-form-item label="产品规格:" class="formContent"> |
| | | {{ formApprove.partspec }} |
| | | </el-form-item> |
| | | <el-form-item label="工单数量:" class="formContent"> |
| | | {{ formApprove.plan_qty }} |
| | | </el-form-item> |
| | | <el-form-item label="工艺路线:" class="formContent"> |
| | | {{ formApprove.routename }} |
| | | </el-form-item> |
| | | <el-form-item label="打印人员:" class="formContent"> |
| | | {{ username }} |
| | | </el-form-item> |
| | | <el-form-item label="打印时间:" class="formContent"> |
| | | {{ formApprove.lm_date }} |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div |
| | | id="qrCode" |
| | | style="width: 22%;height:97px; |
| | | margin-top: 20px; |
| | | overflow-x: 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> |
| | | |
| | | <!-- <div style="width:100%;height: 30px;border-bottom: 1px solid #eee;margin-bottom: 20px" />--> |
| | | <el-table |
| | | id="table" |
| | | :data="tableDataPrint" |
| | | border |
| | | class="tableDataPrint" |
| | | :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}" |
| | | :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}" |
| | | style="width: 100%;margin-top: 20px;text-align: center;border-color: #000" |
| | | > |
| | | <el-table-column |
| | | id="column0" |
| | | prop="seq" |
| | | label="工序号" |
| | | width="70" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | id="column1" |
| | | prop="stepqrcode" |
| | | label="工序二维码" |
| | | width="100" |
| | | align="center" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" class="tableColumn" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | id="column2" |
| | | prop="stepname" |
| | | label="工序" |
| | | width="120" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | id="column3" |
| | | prop="plan_qty" |
| | | label="加工数量" |
| | | width="100" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | id="column4" |
| | | prop="good_qty" |
| | | width="100" |
| | | align="center" |
| | | label="合格数量" |
| | | /> |
| | | <el-table-column |
| | | id="column5" |
| | | width="100" |
| | | prop="ng_qty" |
| | | align="center" |
| | | label="不良数量" |
| | | /> |
| | | <el-table-column |
| | | id="column6" |
| | | prop="desc" |
| | | align="center" |
| | | width="120" |
| | | label="备注" |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleBackPreview">返 回</el-button> |
| | | <!-- <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">确 定</el-button>--> |
| | | <!-- <el-button type="primary" @click="dialogVisibleConfirm">确 定/打 印</el-button>--> |
| | | <el-button v-print="printObj" type="primary">打 印</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { |
| | | AddUpdateMesOrder, |
| | | ClosedMesOrder, |
| | | DeleteMesOrder, |
| | | MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, |
| | | SelectRouteStep |
| | | } from '@/api/scgl' |
| | | import { PartSelect } from '@/api/zzmx' |
| | | import { handleDatetime } from '@/utils/global' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { ErpOrderSearch, MesOrderSearch } from '@/api/scgl' |
| | | import { MesOrderPrintSearch1, PrintOrder } from '@/api/utils' |
| | | import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp' |
| | | import QRCode from 'qrcodejs2' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Zzjg', |
| | | name: 'GD', |
| | | components: { |
| | | Pagination |
| | | }, |
| | |
| | | } |
| | | } |
| | | return { |
| | | isIpad: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | username: '', |
| | | form: { |
| | | mesorderstus: '', // 工单状态码 |
| | | mesordercode: '', // 工单编号 |
| | |
| | | partspec: '', // 产品规格 |
| | | creatuser: '', // 创建人员 |
| | | createdate: '', // 创建时间 |
| | | prop: 'partcode', // 排序字段 |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc', // 排序字段 |
| | | page: 1, // 第几页 |
| | | rows: 20 // 每页多少条 |
| | | }, |
| | | erporderstusArr: [ |
| | | { code: 'NEW', name: '新工单' }, |
| | | { code: 'ALLOC', name: '已派发' }, |
| | | // { code: 'CREATING', name: '执行中' }, |
| | | // { code: 'CREATED', name: '已关闭' } |
| | | { code: 'ALLO', name: '已派发' }, |
| | | { code: 'START', name: '开工' }, |
| | | { code: 'CLOSED', name: '完工' } |
| | | ], |
| | |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// 上级单位 |
| | | partname: '', // 产品名称 |
| | | partspec: '', // 产品规格 |
| | | wkshopname: '', // 生产车间名称 |
| | | routename: '', // 工艺路线名称 |
| | | |
| | | mesorderstus: 'NEW', // 工单状态码 |
| | | mesordercode: '', // 工单编号 |
| | | partcode: '', // 产品编码 |
| | | mesqty: '', // 工单数量 |
| | | |
| | | routecode: '', // 工艺路线编码 |
| | | wkshopcode: '', // 生产车间编码 |
| | | planstartdate: '', // 计划开始时间 |
| | | planenddate: '', // 计划完成时间 |
| | | orderlev: '', // 工单等级 |
| | | |
| | | OperType: '' // 操作类型 |
| | | }, |
| | | partArr: [], // 产品信息 |
| | | wkshopArr: [], // 生产车间数组 |
| | | routeArr: [], // 工艺路线数组 |
| | | orderlevArr: [ |
| | | { code: 1, name: '特级' }, |
| | | { code: 2, name: '紧急' }, |
| | | { code: 3, name: '正常' } |
| | | ], // 工单等级数组 |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请输入选择类型', trigger: ['blur', 'change'] } |
| | | mesorderstus: [ |
| | | { required: true, message: '请选择订单状态', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | partcode: [ |
| | | { required: true, message: '请选择产品信息', trigger: ['blur', 'change'] } |
| | | ], |
| | | mesordercode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请输入名称', trigger: ['blur', 'change'] } |
| | | mesqty: [ |
| | | { required: true, message: '请输入工单数量', trigger: ['blur', 'change'] } |
| | | ], |
| | | wkshopcode: [ |
| | | { required: true, message: '请选择生产车间', trigger: ['blur', 'change'] } |
| | | ], |
| | | routecode: [ |
| | | { required: true, message: '请选择工艺路线', trigger: ['blur', 'change'] } |
| | | ], |
| | | planstartdate: [ |
| | | { required: true, message: '请选择开始时间', trigger: ['blur', 'change'] } |
| | | ], |
| | | planenddate: [ |
| | | { required: true, message: '请选择结束时间', trigger: ['blur', 'change'] } |
| | | ], |
| | | orderlev: [ |
| | | { required: true, message: '请选择工单等级', trigger: ['blur', 'change'] } |
| | | ] |
| | | |
| | | } |
| | | }, |
| | | dialogVisibleTask: false, |
| | | taskTableData: [], |
| | | |
| | | dialogVisibleSearch: false, |
| | | searchTableData: [], |
| | | dialogVisibleApprove: false, |
| | | tableDataPrint: [], // 打印页面内容 |
| | | printObj: { |
| | | id: 'printMe', |
| | | popTitle: '打印模板', |
| | | preview: false, |
| | | extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>', |
| | | closeCallback(vue) { // 关闭打印的回调事件(无法确定点击的是确认还是取消) |
| | | console.log('11212', vue) |
| | | // vue.dialogVisible = false |
| | | vue.dialogVisibleApprove = false |
| | | }, |
| | | beforeOpenCallback(vue) { |
| | | vue.printLoading = true |
| | | console.log('打开之前') |
| | | console.log() |
| | | }, |
| | | openCallback(vue) { |
| | | vue.printLoading = false |
| | | console.log('执行了打印') |
| | | } |
| | | }, |
| | | |
| | | formApprove: { |
| | | mesordercode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | plan_qty: '', |
| | | routename: '', |
| | | lm_date: '' |
| | | }, |
| | | number: '' |
| | | } |
| | | }, |
| | | created() { |
| | | this.getMesOrderSearch() |
| | | this.handleRequest() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | // webapp_urlprotocol_startup() |
| | | // webapp_ws_autoupdate(true) |
| | | this.username = getCookie('username') |
| | | }, |
| | | methods: { |
| | | handleRequest() { |
| | | this.getMesOrderSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getSelect() |
| | | } |
| | | }) |
| | | }, |
| | | async getMesOrderSearch() { |
| | | const res = await MesOrderSearch(this.form) |
| | | // let tempDate = this.form.createdate |
| | | // if (tempDate.length > 0) { |
| | | // tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1]) |
| | | // } |
| | | |
| | | const data = { |
| | | mesorderstus: this.form.mesorderstus, // 工单状态码 |
| | | mesordercode: this.form.mesordercode, // 工单编号 |
| | | partcode: this.form.partcode, // 产品编码 |
| | | partname: this.form.partname, // 产品名称 |
| | | partspec: this.form.partspec, // 产品规格 |
| | | creatuser: this.form.creatuser, // 创建人员 |
| | | createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 创建时间 |
| | | prop: this.form.prop, // 排序字段 |
| | | order: this.form.order, // 排序字段 |
| | | page: this.form.page, // 第几页 |
| | | rows: this.form.rows // 每页多少条 |
| | | } |
| | | const res = await MesOrderSearch(data) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | |
| | | // this.form.createdate = tempDate |
| | | return { code: res.code } |
| | | }, |
| | | async getSelect() { |
| | | // 获取产品信息 |
| | | const { data: res1 } = await PartSelect() |
| | | this.partArr = res1 |
| | | }, |
| | | // 订单状态改变时 |
| | | erporderstusChange(val) { |
| | | this.form.mesorderstus = val |
| | | }, |
| | | // 排序改变时 |
| | | sortChange({ column, prop, order }) { |
| | |
| | | search() { |
| | | this.getMesOrderSearch() |
| | | }, |
| | | upload() { |
| | | |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | | this.form.erporderstus = '' |
| | | this.form.erpordercode = '' |
| | | reset(val) { |
| | | this.form.mesorderstus = '' |
| | | this.form.mesordercode = '' |
| | | this.form.partcode = '' |
| | | this.form.partname = '' |
| | | this.form.partspec = '' |
| | |
| | | this.getMesOrderSearch() |
| | | }, |
| | | // 单选框选中获取当前行信息 |
| | | getCurrentRow(row) { |
| | | console.log(row, 1) |
| | | this.radioSelected = row |
| | | getCurrentRow(wo_code) { |
| | | this.radioSelected = wo_code |
| | | }, |
| | | // 新增按钮 |
| | | add(operation) { |
| | | async add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | this.dialogForm.planstartdate = handleDatetime(new Date()) |
| | | this.dialogForm.planenddate = handleDatetime(new Date()) |
| | | this.dialogForm.orderlev = 3 |
| | | }, |
| | | // 修改按钮 |
| | | edit(operation, row) { |
| | | |
| | | // 产品信息值改变 |
| | | async partcodeChange(val) { |
| | | console.log(val, 22) |
| | | const { data: res } = await PartSelectRoute({ partcode: val }) |
| | | this.routeArr = res |
| | | |
| | | let flag = false |
| | | this.routeArr.forEach(item => { |
| | | if (item.code === item.default_route) { |
| | | this.dialogForm.routecode = item.code |
| | | this.routecodeChange(this.dialogForm.routecode) |
| | | flag = true |
| | | } |
| | | }) |
| | | if (!flag) { |
| | | this.dialogForm.routecode = '' |
| | | } |
| | | |
| | | this.dialogForm.wkshopcode = '' |
| | | }, |
| | | // 工艺路线值改变 |
| | | async routecodeChange(val) { |
| | | const data = { |
| | | partcode: this.dialogForm.partcode, |
| | | routecode: this.dialogForm.routecode |
| | | } |
| | | // 获取生产车间数组 |
| | | const { data: res2 } = await RouteSelectWkshop(data) |
| | | this.wkshopArr = res2 |
| | | this.dialogForm.wkshopcode = '' |
| | | }, |
| | | // 工序任务 |
| | | async check(row) { |
| | | this.dialogVisibleTask = true |
| | | const { data: res } = await SearchWorkStep({ wo_code: row.wo_code }) |
| | | this.taskTableData = res |
| | | this.dialogForm.mesordercode = res[0].wo_code |
| | | }, |
| | | dialogVisibleBack() { |
| | | this.dialogVisibleTask = false |
| | | }, |
| | | // 派发 |
| | | send(operation) { |
| | | if (this.radioSelected.length < 1) { |
| | | return this.$message.info('请先选择工单!') |
| | | } |
| | | |
| | | const row = this.tableData.find(item => item.wo_code === this.radioSelected) |
| | | |
| | | if (row.status !== 'NEW') { |
| | | return this.$message.info('此工单为非新工单状态,不可派发!') |
| | | } |
| | | this.operation = operation |
| | | 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.mesorderstus = row.status |
| | | this.dialogForm.mesordercode = row.wo_code |
| | | this.dialogForm.partcode = row.partcode |
| | | this.partcodeChange(row.partcode) |
| | | this.dialogForm.partname = row.partname |
| | | this.dialogForm.mesqty = row.plan_qty |
| | | this.dialogForm.partspec = row.partspec |
| | | // 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 // 等级 |
| | | }) |
| | | }, |
| | | // 删除按钮 |
| | | async del(row) { |
| | | console.log(row.status) |
| | | if (row.status === 'START' || row.status === 'CLOSED') { |
| | | return this.$message.info('此工单不可删除!') |
| | | } |
| | | this.$confirm('是否确认删除?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: row.code }).then(res => { |
| | | console.log(row, 1) |
| | | const data = { |
| | | 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('删除成功!') |
| | | this.getMesOrderSearch() |
| | |
| | | this.$message.info('已取消删除') |
| | | }) |
| | | }, |
| | | // 工单关闭事件 |
| | | orderClose() { |
| | | if (this.radioSelected.length < 1) { |
| | | return this.$message.info('请先选择工单!') |
| | | } |
| | | console.log('工单关闭事件') |
| | | this.tableData.forEach(item => { |
| | | if (item.wo_code === this.radioSelected) { |
| | | if (item.status === 'START') { |
| | | return this.$message.info('当前工单未完工,无法关闭!') |
| | | } else if (item.status === 'CLOSED') { |
| | | return this.$message.info('工单已关闭,无需再关闭!') |
| | | } else { |
| | | this.$confirm('是否确认关闭工单?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const data = { |
| | | wocode: item.wo_code, |
| | | m_po: item.m_po |
| | | } |
| | | ClosedMesOrder(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('工单关闭成功!') |
| | | this.getMesOrderSearch() |
| | | // this.radioSelected = '' |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消关闭!') |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 对话框产品信息值改变 |
| | | partcodeChangeDialog(val) { |
| | | console.log(val) |
| | | this.dialogForm.partname = this.partArr.find(item => item.partcode === val).partname |
| | | this.dialogForm.partcode = this.partArr.find(item => item.partcode === val).partcode |
| | | this.dialogForm.partspec = this.partArr.find(item => item.partcode === val).partspec |
| | | // const { data: res } = await PartSelectRpute({ partcode: val }) |
| | | // this.routeArr = res |
| | | // this.dialogForm.routecode = '' |
| | | this.partcodeChange(val) |
| | | }, |
| | | // 对话框关闭事件 |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.dialogForm.partname = '' // 产品名称 |
| | | this.dialogForm.partspec = '' // 产品规格 |
| | | this.dialogForm.wkshopname = '' // 生产车间名称 |
| | | this.dialogForm.routename = '' // 工艺路线名称 |
| | | |
| | | this.dialogForm.mesorderstus = 'NEW' // 工单状态码 |
| | | this.dialogForm.mesordercode = '' // 工单编号 |
| | | this.dialogForm.partcode = '' // 产品编码 |
| | | this.dialogForm.mesqty = '' // 工单数量 |
| | | |
| | | this.dialogForm.routecode = '' // 工艺路线编码 |
| | | this.dialogForm.wkshopcode = '' // 生产车间编码 |
| | | this.dialogForm.planstartdate = '' // 计划开始时间 |
| | | this.dialogForm.planenddate = '' // 计划完成时间 |
| | | this.dialogForm.orderlev = '' // 工单等级 |
| | | |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |
| | |
| | | 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') |
| | | // partname: this.dialogForm.partname, // 产品名称 |
| | | // partspec: this.dialogForm.partspec, // 产品规格 |
| | | // wkshopname: this.dialogForm.wkshopname, // 生产车间名称 |
| | | // routename: this.dialogForm.routename, // 工艺路线名称 |
| | | |
| | | mesorderstus: this.dialogForm.mesorderstus, // 工单状态码 |
| | | mesordercode: this.dialogForm.mesordercode, // 工单编号 |
| | | partcode: this.dialogForm.partcode, // 产品编码 |
| | | mesqty: this.dialogForm.mesqty, // 工单数量 |
| | | |
| | | routecode: this.dialogForm.routecode, // 工艺路线编码 |
| | | wkshopcode: this.dialogForm.wkshopcode, // 生产车间编码 |
| | | planstartdate: this.dialogForm.planstartdate, // 计划开始时间 |
| | | planenddate: this.dialogForm.planenddate, // 计划完成时间 |
| | | orderlev: this.dialogForm.orderlev, // 工单等级 |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update' |
| | | } |
| | | AddUpdateOrganization(data).then(res => { |
| | | |
| | | AddUpdateMesOrder(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.dialogVisible = false |
| | | |
| | | this.handlePrint() |
| | | |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '派发成功!') |
| | | // this.dialogVisible = false |
| | | this.getMesOrderSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '派发失败!') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 派发打印 |
| | | async sendPrint() { |
| | | const data = { |
| | | username: getCookie('admin'), |
| | | // username: getCookie('username'), |
| | | mesordercode: this.dialogForm.mesordercode |
| | | } |
| | | const res = await MesOrderPrintSearch1(data) |
| | | // const res = await PrintOrder(data) |
| | | if (res.code === '200') { |
| | | // 参数具体说明请参考帮助文档中的“WEB报表(B/S报表)->WEB报表客户端->启动参数说明”部分 |
| | | var args = { |
| | | type: 'print', // preview print |
| | | showOptionDlg: false, // 如果不显示打印对话框而直接打印,将此行注释去掉即可 |
| | | report: urlAddRandomNo('./static/grf/产品流传单A4.grf'), |
| | | data: res.data |
| | | } |
| | | webapp_ws_ajax_run(args) |
| | | } |
| | | }, |
| | | |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | this.tableHeight = this.mainHeight - 110 |
| | | this.isIpad = window.innerHeight < 769 |
| | | if (this.isIpad) { |
| | | this.tableHeight = this.tableHeight - 30 |
| | | } |
| | | }) |
| | | }, |
| | | // 工艺路线放大镜点击 |
| | | async searchClick() { |
| | | if (this.dialogForm.routecode === '') { |
| | | return this.$message.info('请先选择工艺路线!') |
| | | } |
| | | this.dialogVisibleSearch = true |
| | | const { data: res } = await SelectRouteStep({ routecode: this.dialogForm.routecode }) |
| | | this.searchTableData = res |
| | | }, |
| | | dialogVisibleSearchBack() { |
| | | this.dialogVisibleSearch = false |
| | | }, |
| | | // 处理打印 |
| | | handlePrint() { |
| | | // 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 |
| | | } |
| | | MesOrderPrintSearch1(data2).then(res2 => { |
| | | if (res2.code === '200') { |
| | | const res3 = res2.data.recordset |
| | | |
| | | this.tableDataPrint = res3 |
| | | this.formApprove.mesordercode = res3[0].wo_code |
| | | this.formApprove.partcode = res3[0].partcode |
| | | this.formApprove.partname = res3[0].partname |
| | | this.formApprove.partspec = res3[0].partspec |
| | | this.formApprove.plan_qty = res3[0].plan_qty |
| | | this.formApprove.routename = res3[0].routename |
| | | this.formApprove.lm_date = res3[0].lm_date |
| | | |
| | | this.$nextTick(() => { |
| | | res3.forEach(i => { |
| | | this.bindQRCode(i.seq, i.stepqrcode, 'small') |
| | | }) |
| | | // this.bindQRCode('0', this.formApprove.mesordercode, 'big') |
| | | |
| | | const div = document.getElementById('qrCode') |
| | | // 这么多代码只需要这一句实现我们所需要的功能,定位div滚动条位置在底部,scrollHeight计算出div的高度,再scrollTop 设置滚动条的高度为多少 |
| | | // div.scrollTop = div.scrollHeight // 滚动条位于最底部 |
| | | div.scrollTop = 0 // 滚动条位于最顶部 |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | dialogVisibleTaskClose() { |
| | | this.dialogForm.mesordercode = '' |
| | | }, |
| | | /* |
| | | * 手动点击打印 |
| | | * */ |
| | | // 返回按钮 |
| | | dialogVisibleBackPreview() { |
| | | this.dialogVisibleApprove = false |
| | | }, |
| | | // dialogVisibleConfirmPreview(param) { |
| | | // this.$refs.dialogForm.validate(valid => { |
| | | // if (valid) { |
| | | // const data = { |
| | | // username: getCookie('admin'), |
| | | // mesordercode: this.dialogForm.mesordercode |
| | | // } |
| | | // MesOrderPrintSearch1(data).then(res => { |
| | | // if (res.code === '200') { |
| | | // this.dialogVisibleApprove = true |
| | | // console.log(res, 11) |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | // }, |
| | | // 生成二维码 |
| | | bindQRCode(seq, text, size) { |
| | | if (size === 'big') { |
| | | console.log(text, 1) |
| | | new QRCode(this.$refs.qrCodeDiv0, { |
| | | text: text, |
| | | width: size === 'big' ? 90 : 60, |
| | | height: size === 'big' ? 90 : 60, |
| | | // colorDark: '#333333', // 二维码颜色 |
| | | colorDark: '#000', // 二维码颜色 |
| | | colorLight: '#ffffff', // 二维码背景色 |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | | }) |
| | | } else { |
| | | new QRCode(this.$refs['qrCodeDiv' + seq], { |
| | | text: text, |
| | | width: size === 'big' ? 90 : 60, |
| | | height: size === 'big' ? 90 : 60, |
| | | // colorDark: '#333333', // 二维码颜色 |
| | | colorDark: '#000', // 二维码颜色 |
| | | colorLight: '#ffffff', // 二维码背景色 |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | dialogVisibleConfirmClose() { |
| | | // this.dialogForm.mesordercode = '' |
| | | this.formApprove.mesordercode = '' |
| | | this.formApprove.partcode = '' |
| | | this.formApprove.partname = '' |
| | | this.formApprove.partspec = '' |
| | | this.formApprove.plan_qty = '' |
| | | this.formApprove.routename = '' |
| | | this.formApprove.lm_date = '' |
| | | |
| | | // this.$refs.qrCodeDiv0.title = '' |
| | | |
| | | this.tableDataPrint = [] |
| | | }, |
| | | // 补打按钮 |
| | | supplementClick() { |
| | | this.dialogVisibleTask = false |
| | | this.handlePrint() |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | .dialogVisibleSearch ::v-deep .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | .dialogVisibleConfirmClass ::v-deep .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .elForm ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | .elTableDiv{ |
| | | ::v-deep .el-radio__label{ |
| | | .elTableDiv { |
| | | ::v-deep .el-radio__label { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | .el-table::before { |
| | | height: 0; |
| | | } |
| | | |
| | | //.dialogVisibleConfirmClass >>>.el-table--border, .el-table--fit { |
| | | // border-bottom: 2px solid #000 ; |
| | | // //outline: #000 solid 2px !important; |
| | | //} |
| | | |
| | | .tableDataPrint ::v-deep div.cell{ |
| | | display: flex !important; |
| | | align-items: center !important; |
| | | justify-content: center !important; |
| | | } |
| | | .formContent{ |
| | | width: 240px; |
| | | } |
| | | |
| | | </style> |
| | | |
| | | <style media="print"> |
| | | /*@media print {*/ |
| | | @page { |
| | | size: auto; |
| | | margin: 3mm; |
| | | } |
| | | |
| | | </style> |
| | | <style> |
| | | .formContent .el-form-item__label{ |
| | | color: #000 !important; |
| | | } |
| | | </style> |