|
@@ -3,356 +3,16 @@
|
|
|
<layout>
|
|
<layout>
|
|
|
<layout-header>
|
|
<layout-header>
|
|
|
<div class="">
|
|
<div class="">
|
|
|
- <!-- 按钮部分-->
|
|
|
|
|
<el-form ref="elSearchFormRef" :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
|
|
<el-form ref="elSearchFormRef" :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
- <!--按钮-->
|
|
|
|
|
- <!-- <el-input v-model="searchInfo" placeholder="搜索" clearable style="width: 180px;"></el-input>
|
|
|
|
|
- <el-button type="primary" icon="search" @click="onSubmit" >查询</el-button> -->
|
|
|
|
|
- <!-- <el-button type="primary" title="设置工单的状态--【计划中】 【生产中】 【已完成】" icon="edit" @click="onStatusClick" class="bt">工单状态设置</el-button> -->
|
|
|
|
|
- <div v-if="(currentNode == '计划中') && treeType === 'customTree'">
|
|
|
|
|
- <!-- <el-button type="primary" title="排产" icon="edit" @click="ongxztgzClick" class="bt">排产</el-button> -->
|
|
|
|
|
- <!-- <el-button type="primary" title="修改" icon="edit" @click="pd_yysjcsonClick" class="bt">修改</el-button> -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-if="(currentNode == '制程中') && treeType === 'customTree'">
|
|
|
|
|
- <el-button type="primary" title="修改" icon="edit" @click="pd_yysjcsonClick" class="bt">修改</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-if="(currentNode == '已完工') && treeType === 'customTree'">
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div v-else>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- <el-button type="primary" title="打印生产工单" icon="edit" @click="pd_gdprintonClick" class="bt">订单打印</el-button> -->
|
|
|
|
|
- <!-- <el-button type="primary" icon="edit" @click="del_ddzlClick" v-if="table_del=== true" :disabled="table_Selection === ''" class="bt" title="删除" >删除</el-button> -->
|
|
|
|
|
|
|
+ <el-input v-model="searchInfo" placeholder="查询当前订单总数据与数量" style="width: 200px;" @keyup.enter="onSubmit()"></el-input>
|
|
|
|
|
+ <el-button type="primary" icon="search" @click="onSubmit" title="搜索">查询</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="cp_gdprintonClick" >工单打印</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="exportToExcel">导出Excel</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
-
|
|
|
|
|
- <!-- 状态设置【弹窗】-->
|
|
|
|
|
- <el-dialog v-model="onstatuslist" title="工单状态设置" width="30%" style="top: 15%">
|
|
|
|
|
- <div style="width: 100%;height: 100%;">
|
|
|
|
|
- <div style="width: 100%; display: flex; align-items: center;">
|
|
|
|
|
- <el-form-item label="工单编号 :" prop="currentProcess">
|
|
|
|
|
- <el-input v-model="statusformData['gdbh']" placeholder="" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="width: 100%; display: flex; align-items: center; margin-top: 30px;">
|
|
|
|
|
- <span>状态设置:</span>
|
|
|
|
|
- <el-radio-group v-model="status" style="margin-left: 10px;">
|
|
|
|
|
- <el-radio label="计划中">计划中</el-radio>
|
|
|
|
|
- <el-radio label="生产中">生产中</el-radio>
|
|
|
|
|
- <el-radio label="已完工">已完工</el-radio>
|
|
|
|
|
- </el-radio-group>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="dialog-footer" style="text-align: right; margin-top: 40px;">
|
|
|
|
|
- <el-button @click="handleCancel">取消</el-button>
|
|
|
|
|
- <el-button type="primary" @click="handleConfirm">确认</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <!-- 工序状态更正【弹窗】-->
|
|
|
|
|
- <el-dialog v-model="gxztgzzlist" title="工序状态更正" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
|
|
|
|
|
- <el-button type="primary" @click="edit_gxztgzzCancel">更新时间</el-button>
|
|
|
|
|
- <el-button type="" @click="gxztgzzCancel">退出</el-button>
|
|
|
|
|
- <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
|
|
|
|
|
- <el-form-item label="工单编号 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
|
|
|
|
|
- <el-input v-model="gxztgzzformData['gdbh']" @keyup.enter="gxztgzzgetProductValue" placeholder="" style="width: 200px;"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-table ref="paichengRef"
|
|
|
|
|
- :show-overflow-tooltip="true"
|
|
|
|
|
- :row-style="{ height: '0px' }"
|
|
|
|
|
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
|
|
- :header-cell-style="{ padding: '0px' }"
|
|
|
|
|
- style="width: 100%;height: 74vh" border tooltip-effect="dark"
|
|
|
|
|
- :data="gxztgzztableData" row-key="ID"
|
|
|
|
|
- :cell-class-name="gxztgzzCellClass">
|
|
|
|
|
- <template v-for="(item, idx) in gxztgzztableColumns">
|
|
|
|
|
- <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
|
|
|
|
|
- <!-- <div v-if="['完工时间'].includes(item.prop)">-->
|
|
|
|
|
- <!-- <el-input v-model="row[item.prop]"-->
|
|
|
|
|
- <!-- :id="`input${idx}${$index}`" @keyup="gxztgzz_handleKeyDown($event, idx, $index, item.prop)"/>-->
|
|
|
|
|
- <!-- </div>-->
|
|
|
|
|
- <div v-if="['完工时间'].includes(item.prop)">
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="row[item.prop]"
|
|
|
|
|
- type="datetime"
|
|
|
|
|
- :id="`datepicker${idx}${$index}`"
|
|
|
|
|
- placeholder="选择日期和时间">
|
|
|
|
|
- </el-date-picker>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-else>{{ row[item.prop] }}</div>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <!--机组调整【弹窗】-->
|
|
|
|
|
- <el-dialog v-model="jizuDisplay" title="机组调整" style="width: 600px;">
|
|
|
|
|
- <el-row class="">
|
|
|
|
|
- <el-col :span="18">
|
|
|
|
|
- <el-tree :data="jizuList"
|
|
|
|
|
- :props="{label:'label', value: 'value', chidlren: 'children'}"
|
|
|
|
|
- node-key="value"
|
|
|
|
|
- show-checkbox
|
|
|
|
|
- :default-expanded-keys="jizuList[0].value"
|
|
|
|
|
- @check="checkTreeHandle"
|
|
|
|
|
- style="margin-right: 10px; padding: 10px; border:-1px solid #ececec"></el-tree>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <div><el-button type="primary" @click="saveJizuTiaozheng">确定</el-button></div>
|
|
|
|
|
- <div style="margin-top: 20px"><el-button @click="()=>jizuDisplay = false">取消</el-button> </div>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <!--车间设备排程【弹窗】-->
|
|
|
|
|
- <el-dialog v-model="cjsbpclist" title="车间设备制程排序" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
|
|
|
|
|
- <el-button type="" @click="cjsbpcCancel">退出</el-button>
|
|
|
|
|
- <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; ">
|
|
|
|
|
- <div style="width: 100%; height: 60px; padding: 0px; display: flex; align-items: center;">
|
|
|
|
|
- <el-form-item label="设备代号 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
|
|
|
|
|
- <el-input v-model="cjsbpcformData['sbdh']" disabled placeholder="" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="班次选择:" prop="originalName" style="margin-left: 20px;">
|
|
|
|
|
- <el-select v-model="cjsbpcformData.banci" placeholder="请选择" style="width: 230px;" allow-create filterable @change="setBanci">
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="(option, index) in cjsbpcformData.bancis"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- :label="option.value"
|
|
|
|
|
- :value="option.value"
|
|
|
|
|
- >
|
|
|
|
|
- {{option.label}}
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="" prop="isBanciSelected" style="margin-left: 20px;">
|
|
|
|
|
- <el-checkbox v-model="cjsbpcformData.isBanciSelected">所有班次</el-checkbox>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-form-item label="" prop="" style="margin-left: 25px;">
|
|
|
|
|
- <el-button type="" icon="edit" @click="oneditpcClick">更新排程</el-button>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <el-table ref="paichengRef"
|
|
|
|
|
- :show-overflow-tooltip="true"
|
|
|
|
|
- :row-style="{ height: '0px' }"
|
|
|
|
|
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
|
|
- :header-cell-style="{ padding: '0px' }"
|
|
|
|
|
- style="width: 100%;height: 74vh" border tooltip-effect="dark"
|
|
|
|
|
- @row-click="cjpc_tableRowClick"
|
|
|
|
|
- :data="paichengData" row-key="ID"
|
|
|
|
|
- :cell-class-name="cjzcCellClass"
|
|
|
|
|
- >
|
|
|
|
|
- <!-- highlight-current-row="true"-->
|
|
|
|
|
- <template v-for="(item, idx) in paichengColumns">
|
|
|
|
|
- <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
|
|
|
|
|
- <div v-if="['优先次序', '小时产能', '生产工时', '辅助工时', '班次安排', '排单备注','最早开工时间', '计划开工时间'].includes(item.prop)">
|
|
|
|
|
- <el-input v-model="row[item.prop]"
|
|
|
|
|
- :id="`input${idx}${$index}`"
|
|
|
|
|
- @blur="handleBlur(item['label'], item)"
|
|
|
|
|
- @keyup="handleKeyDown($event, idx, $index, item.prop)"
|
|
|
|
|
- />
|
|
|
|
|
- <!-- <el-date-picker v-model="row[item.prop]" v-if="['最早开工时间', '计划开工时间'].includes(item.prop)" type="datetime" :clearable="false"-->
|
|
|
|
|
- <!-- :id="`input${idx}${$index}`"-->
|
|
|
|
|
- <!-- @keyup="handleKeyDown($event, idx, $index , item.prop)"-->
|
|
|
|
|
- <!-- />-->
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-else>
|
|
|
|
|
- {{ row[item.prop] }}
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <!--工序产量核查【弹窗】-->
|
|
|
|
|
- <el-dialog v-model="pd_gxclhclist" title="工序产量核查" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
|
|
|
|
|
- <el-button type="" @click="gxclhcCancel">退出</el-button>
|
|
|
|
|
-
|
|
|
|
|
- <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
|
|
|
|
|
- <div style="width: 100%; height: 60px; padding: 0px; display: flex; align-items: center;">
|
|
|
|
|
- <el-form-item label="工单编号" prop="currentProcess" style="margin-right: 20px; padding: 20px 0 0 0">
|
|
|
|
|
- <el-input v-model="gxclhcformData['gdbh']" @keyup.enter="gxclhcProductValue" placeholder="" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- 印件选择:
|
|
|
|
|
- <el-select v-model="gdwhformData.yjno" placeholder="请选择" allow-create filterable style="width: 100px; margin-right: 10px;">
|
|
|
|
|
- <el-option v-for="option in gdwhformData.yinjian" @click="ongdwhfanclick" :key="option" :label="option" :value="option" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- <el-input v-model="inputCpmc" readonly style="width: 50vw; margin-right: 10px;" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-table ref="paichengRef"
|
|
|
|
|
- :show-overflow-tooltip="true"
|
|
|
|
|
- :row-style="{ height: '0px' }"
|
|
|
|
|
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
|
|
- :header-cell-style="{ padding: '0px' }"
|
|
|
|
|
- style="width: 100%;height: 70vh" border tooltip-effect="dark"
|
|
|
|
|
- highlight-current-row="true"
|
|
|
|
|
- @row-click="gxclhc_tableRowClick"
|
|
|
|
|
- :data="gxclhc_Data" row-key="ID"
|
|
|
|
|
- :cell-class-name="gxclhcCellClass"
|
|
|
|
|
- >
|
|
|
|
|
- <template v-for="(item, idx) in gxclhc_Columns">
|
|
|
|
|
- <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
|
|
|
|
|
- {{row[item.prop]}}
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <!--流程单查询【弹窗】-->
|
|
|
|
|
- <el-dialog v-model="pd_lcdlist" title="工单工序生产进程" style="width: 100%;height: 100%;margin: 0px;padding: 0px;">
|
|
|
|
|
- <div style="width: 100%;height: 100%;">
|
|
|
|
|
- <el-button type="" @click="pd_lcdCancel">退出</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="width: 100%; height: 100%; display: flex; align-items: center;">
|
|
|
|
|
- <el-form-item label="工单编号" style="margin-right: 20px; padding: 0;">
|
|
|
|
|
- <el-input v-model="pd_lcdformData['gdbh']" @keyup.enter="pd_lcdProductValue"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="印件号" style="margin-right: 5px; padding: 0;">
|
|
|
|
|
- <el-input v-model="pd_lcdformData['yjno']" @keyup.enter="pd_lcdProductValue"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="" style="margin-right: 5px; padding: 0;">
|
|
|
|
|
- <el-input v-model="pd_lcdformData['code']" disabled/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="" style="margin-right: 5px; padding: 0;">
|
|
|
|
|
- <el-input v-model="pd_lcdformData['name']" disabled style="width: 500px"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="width: 100%; height: 70vh; display: flex;">
|
|
|
|
|
- <layout>
|
|
|
|
|
- <layout-sider :resize-directions="['right']" :width="240" style="margin-right: 10px;height: 70vh;">
|
|
|
|
|
- <div class="JKWTree-tree">
|
|
|
|
|
- <el-tree :data="pd_lcd_treeData" @node-click="pd_lcd_handleNodeClick" default-expand-all></el-tree>
|
|
|
|
|
- </div>
|
|
|
|
|
- </layout-sider>
|
|
|
|
|
- <layout-main>
|
|
|
|
|
- <!-- 这里放右侧的内容 -->
|
|
|
|
|
- <el-space wrap>
|
|
|
|
|
- <!-- 右侧内容 -->
|
|
|
|
|
- <template v-for="item in processList.total_process">
|
|
|
|
|
- <el-button disabled :type="! processList.process.includes(item) ? 'danger' : 'info'" plain style="width: 50px">{{ item }}</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-space>
|
|
|
|
|
- </layout-main>
|
|
|
|
|
- </layout>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- <!-- 排产-->
|
|
|
|
|
- <el-dialog v-model="add_gdyjdialogFormVisible" :before-close="add_gdyjcloseDialog" style="width: 50%;" :title="'车缝小烫排产'" destroy-on-close>
|
|
|
|
|
- <el-form label-width="100px" :model="add_yjzlformdata">
|
|
|
|
|
- <div style="display: flex; gap: 0px;">
|
|
|
|
|
- <el-form-item label="订单子编号:" class="mab" prop="keyOrder">
|
|
|
|
|
- <el-input v-model="add_yjzlformdata.ddzbh" style="width: 100px;margin-bottom: 12px; " id="ddzbh" @keydown="add_gdzlent($event, 'zzmc4', 'ddzbh', 'ys')"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="颜色:" class="mab" prop="keyOrder">
|
|
|
|
|
- <el-input v-model="add_yjzlformdata.ys" style="width: 100px;margin-bottom: 12px;" id="ys" @keydown="add_gdzlent($event, 'ddzbh', 'ys', '尺码规格')"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="display: flex; gap: 0px;">
|
|
|
|
|
- <el-form-item label="尺码规格:" prop="joinDate" >
|
|
|
|
|
- <el-select v-model="add_yjzlformdata.cmgg" style="width: 150px;" id="尺码规格" @keydown="add_gdzlent($event, 'ys', '尺码规格', '工作中心')">
|
|
|
|
|
- <el-option label="32~46" value="32~46"></el-option>
|
|
|
|
|
- <el-option label="S~XXL" value="47~52"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="工作中心:" prop="joinDate" >
|
|
|
|
|
- <el-select v-model="add_yjzlformdata.gzzx" style="width: 150px;" id="工作中心" @keydown="add_gdzlent($event, '尺码规格', '工作中心', 'zdsl')">
|
|
|
|
|
- <el-option label="二分厂" value="32~46"></el-option>
|
|
|
|
|
- <el-option label="大分厂" value="47~52"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div style="display: flex; gap: 0px;">
|
|
|
|
|
- <el-form-item label="尺码:" class="mab" prop="keyOrder">
|
|
|
|
|
- <el-input v-model="cmformdata.cm1" readonly style="width: 80px;"/>
|
|
|
|
|
- <el-input v-model="cmformdata.cm2" readonly style="width: 80px;"/>
|
|
|
|
|
- <el-input v-model="cmformdata.cm3" readonly style="width: 80px;"/>
|
|
|
|
|
- <el-input v-model="cmformdata.cm4" readonly style="width: 80px;"/>
|
|
|
|
|
- <el-input v-model="cmformdata.cm5" readonly style="width: 80px;"/>
|
|
|
|
|
- <el-input v-model="cmformdata.cm6" readonly style="width: 80px;"/>
|
|
|
|
|
- <el-input v-model="cmformdata.cm7" readonly style="width: 80px;"/>
|
|
|
|
|
- <el-input v-model="cmformdata.cm8" readonly style="width: 80px;"/>
|
|
|
|
|
- <el-input v-model="cmformdata.cm9" readonly style="width: 80px;"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="display: flex; gap: 0px;">
|
|
|
|
|
- <el-form-item label="制单数:" class="mab" prop="keyOrder">
|
|
|
|
|
- <el-input v-model="zdsformdata.zds1" style="width: 80px;" id="zdsl" @keydown="add_gdzlent($event, '工作中心', 'zdsl', 'zds2')"/>
|
|
|
|
|
- <el-input v-model="zdsformdata.zds2" style="width: 80px;" id="zds2" @keydown="add_gdzlent($event, 'zdsl', 'zds2', 'zds3')"/>
|
|
|
|
|
- <el-input v-model="zdsformdata.zds3" style="width: 80px;" id="zds3" @keydown="add_gdzlent($event, 'zds2', 'zds3', 'zds4')"/>
|
|
|
|
|
- <el-input v-model="zdsformdata.zds4" style="width: 80px;" id="zds4" @keydown="add_gdzlent($event, 'zds3', 'zds4', 'zds5')"/>
|
|
|
|
|
- <el-input v-model="zdsformdata.zds5" style="width: 80px;" id="zds5" @keydown="add_gdzlent($event, 'zds4', 'zds5', 'zds6')"/>
|
|
|
|
|
- <el-input v-model="zdsformdata.zds6" style="width: 80px;" id="zds6" @keydown="add_gdzlent($event, 'zds5', 'zds6', 'zds7')"/>
|
|
|
|
|
- <el-input v-model="zdsformdata.zds7" style="width: 80px;" id="zds7" @keydown="add_gdzlent($event, 'zds6', 'zds7', 'zds8')"/>
|
|
|
|
|
- <el-input v-model="zdsformdata.zds8" style="width: 80px;" id="zds8" @keydown="add_gdzlent($event, 'zds7', 'zds8', 'zds9')"/>
|
|
|
|
|
- <el-input v-model="zdsformdata.zds9" style="width: 80px;" id="zds9" @keydown="add_gdzlent($event, 'zds8', 'zds9', '车缝小烫小组1')"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- 图片 -->
|
|
|
|
|
- <div style="display: flex; gap: 0px;">
|
|
|
|
|
- <el-form-item label="上传图片:" prop="image" class="mab" label-width="100px">
|
|
|
|
|
- <el-upload ref="upload" class="avatar-uploader" :show-file-list="false" :before-upload="handlePreview" accept="image/*" >
|
|
|
|
|
- <img v-if="imageUrl" :src="imageUrl" class="avatar" />
|
|
|
|
|
- <div v-else class="upload-placeholder">
|
|
|
|
|
- <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
|
- <div class="upload-text">点击上传图片</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-upload>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div style="display: flex; gap: 0px;margin-left:30px ;">
|
|
|
|
|
- <el-form-item label="车缝小烫小组:" prop="joinDate" ><br><br><br>
|
|
|
|
|
- <div style="margin-left:-105px;margin-top: 25px;">
|
|
|
|
|
- <el-select v-model="add_yjzlformdata.cfxtxz1" style="width: 120px;" id="车缝小烫小组1" @keydown="add_gdzlent($event, 'zds9', '车缝小烫小组1', '排产数量1')">
|
|
|
|
|
- <el-option label="服装厂1组" value="32~46"></el-option>
|
|
|
|
|
- <el-option label="服装厂11组" value="47~52" ></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- <div >
|
|
|
|
|
- <el-select v-model="add_yjzlformdata.cfxtxz2" style="width: 120px;margin-top: 20px;" id="车缝小烫小组2" @keydown="add_gdzlent($event, '排产数量1', '车缝小烫小组2', '排产数量2')" >
|
|
|
|
|
- <el-option label="服装厂11组" value="32~46"></el-option>
|
|
|
|
|
- <el-option label="服装厂1组" value="47~52" ></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-form-item label="排产数量:" prop="joinDate" ><br><br><br>
|
|
|
|
|
- <div style="margin-left:-75px;margin-top: 25px;">
|
|
|
|
|
- <el-select v-model="add_yjzlformdata.pcsl1" style="width: 120px;" id="排产数量1" @keydown="add_gdzlent($event, '车缝小烫小组1', '排产数量1', '车缝小烫小组2')">
|
|
|
|
|
- <el-option label="50" value="32~46"></el-option>
|
|
|
|
|
- <el-option label="40" value="47~52" ></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- <div >
|
|
|
|
|
- <el-select v-model="add_yjzlformdata.pcsl2" style="width: 120px;margin-top: 20px;" id="排产数量2" @keydown="add_gdzlent($event, '车缝小烫小组2', '排产数量2', 'ddzbh')">
|
|
|
|
|
- <el-option label="40" value="32~46"></el-option>
|
|
|
|
|
- <el-option label="50" value="47~52" ></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-form-item label="操作:" prop="joinDate" ><br><br><br>
|
|
|
|
|
- <div style="margin-left:-50px;margin-top: 25px;">
|
|
|
|
|
- <el-button type="primary" @click="aa" style="margin: 5px;width:40px" >+</el-button>
|
|
|
|
|
- <div >
|
|
|
|
|
- <el-button type="primary" @click="bb" style="margin: 5px;width:40px" >-</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <div class="dialog-footer" style="text-align: right;">
|
|
|
|
|
- <el-button @click="add_dyjcloseDialog">取消</el-button>
|
|
|
|
|
- <el-button type="primary" @click="add_gdyjenterDialog">保存</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</layout-header>
|
|
</layout-header>
|
|
|
-
|
|
|
|
|
- <!-- 左侧 -->
|
|
|
|
|
<layout>
|
|
<layout>
|
|
|
<layout-sider :resize-directions="['right']" :width="280" style="margin-right: 10px;">
|
|
<layout-sider :resize-directions="['right']" :width="280" style="margin-right: 10px;">
|
|
|
<div class="JKWTree-tree" style="height: 200px">
|
|
<div class="JKWTree-tree" style="height: 200px">
|
|
@@ -360,123 +20,58 @@
|
|
|
<el-tree :data="treeData" :props="defaultProps" class="treecolor" :current-node-key="currentNodeKey" @node-click="handleNodeClick"></el-tree>
|
|
<el-tree :data="treeData" :props="defaultProps" class="treecolor" :current-node-key="currentNodeKey" @node-click="handleNodeClick"></el-tree>
|
|
|
</div>
|
|
</div>
|
|
|
</layout-sider>
|
|
</layout-sider>
|
|
|
|
|
+
|
|
|
<layout-content>
|
|
<layout-content>
|
|
|
<el-main>
|
|
<el-main>
|
|
|
-<!-- customTree 排程 制程 dataTree // 计划中,排产中 ,dataTree 车间-->
|
|
|
|
|
- <div class="gva-table-box" v-if="treeType === 'customTree'">
|
|
|
|
|
- <el-table ref="multipleTable" style="width: 100%;height: 25vh"
|
|
|
|
|
- :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
|
|
- :header-cell-style="{ padding: '0px' }" border
|
|
|
|
|
- tooltip-effect="dark" :data="tableData" row-key="ID"
|
|
|
|
|
- :highlight-current-row="true" size="small" @row-click="gdtableRowClick"
|
|
|
|
|
- @selection-change="handleSelectionChange" :show-overflow-tooltip="true">
|
|
|
|
|
-
|
|
|
|
|
- <template v-for="item in tableFields[currentNode]">
|
|
|
|
|
- <el-table-column :align="item.align" :label="item.title" :fixed="item.fixed" :prop="item.prop" :width="item.width" :sortable="item.sortable" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- <!-- 分页 -->
|
|
|
|
|
-
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <el-tabs v-model="activeName" @tab-click="handleClick" v-if="(currentNode == '计划中' || currentNode == '已完工') && treeType === 'customTree'">
|
|
|
|
|
- <el-tab-pane label="工艺资料" @click="showTable('工艺资料')" name="first">
|
|
|
|
|
- <el-table ref="multipleTable" :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
|
|
|
|
|
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
|
|
- :header-cell-style="{ padding: '0px' }" highlight-current-row="true"
|
|
|
|
|
- style="width: 100%;height: 42vh" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
|
|
- <el-table-column align="left" sortable label="工单编号" prop="工单编号" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="重点工序" prop="重点工序" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="印件工序及名称" prop="印件工序及名称" width="500"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="工序备注" prop="工序备注" width="150"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="机组" prop="机组" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="小时产能" prop="小时产能" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="生产工时" prop="生产工时" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="辅助工时" prop="辅助工时" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="印刷方式" prop="印刷方式" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="版距" prop="版距" width="100"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="创建用户" prop="创建用户" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="创建时间" prop="创建时间" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="修改时间" prop="修改时间" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="UNIQID" prop="UNIQID" width="110"/>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
-
|
|
|
|
|
- <el-tab-pane label="印件资料" @click="showTable('印件资料')" name="second">
|
|
|
|
|
- <el-table ref="multipleTable" :row-style="{ height: '20px' }"
|
|
|
|
|
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
|
|
- :header-cell-style="{ padding: '0px' }" :show-overflow-tooltip="true"
|
|
|
|
|
- :highlight-current-row="true"
|
|
|
|
|
- style="width: 100%;height: 42vh" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
|
|
- <el-table-column align="left" sortable label="工单编号" prop="工单编号" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="印件号" prop="印件号" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="印件代号" prop="印件代号" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="印件名称" prop="印件名称" width="240"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="纸张名称" prop="纸张名称" width="230"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="投料规格" prop="投料规格" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="成品数量" prop="成品数量" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="实际投料" prop="实际投料" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="投料单位" prop="投料单位" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="平张投料" prop="平张投料" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="联数" prop="联数" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="开数" prop="开数" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="创建用户" prop="创建用户" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="创建时间" prop="创建时间" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="修改时间" prop="修改时间" width="110"/>
|
|
|
|
|
- <el-table-column align="left" sortable label="UNIQID" prop="UNIQID" width="110"/>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
- </el-tabs>
|
|
|
|
|
-
|
|
|
|
|
- <div v-if="treeType === 'customTree'">
|
|
|
|
|
- <el-table ref="multipleTable2"
|
|
|
|
|
- v-if="['排程中', '制程中'].includes(currentNode)"
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-table ref="chejianRef" id="finished"
|
|
|
:show-overflow-tooltip="true" :row-style="{ height: '20px' }"
|
|
:show-overflow-tooltip="true" :row-style="{ height: '20px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
- :header-cell-style="{ padding: '0px' }" :highlight-current-row="true"
|
|
|
|
|
- :cell-class-name="pczc_planUsageCellClass"
|
|
|
|
|
- style="width: 100%;height: 42vh" border tooltip-effect="dark" :data="bottomData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
|
|
- <template v-for="item in bottomTableF[currentNode]">
|
|
|
|
|
- <el-table-column :align="item.align" :label="item.title" :fixed="item.fixed" :prop="item.prop" :width="item.width" :sortable="item.sortable" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div v-if="treeType === 'dataTree'">
|
|
|
|
|
- <el-table ref="chejianRef"
|
|
|
|
|
- :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
|
|
|
|
|
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
|
|
- :header-cell-style="{ padding: '0px' }" :highlight-current-row="true" @row-click="chejianRowClick"
|
|
|
|
|
- style="width: 100%;height: 80vh" border tooltip-effect="dark" :data="chejianData" row-key="ID" @selection-change="PC_handleChange"
|
|
|
|
|
- >
|
|
|
|
|
- <!-- 车缝小烫车间列表-->
|
|
|
|
|
- <el-table-column type="selection" width="30" />
|
|
|
|
|
- <template v-for="item in [
|
|
|
|
|
- { align:'left', title:'订单编号', prop: '订单编号', width: 110, sortable: 'sortable', },
|
|
|
|
|
- { align:'left', title: '客户编号', prop: '客户编号', width: 110, sortable: 'sortable', },
|
|
|
|
|
- { align:'left', title: '款式', prop: '款式', width: 110, sortable: 'sortable', },
|
|
|
|
|
- { align:'left', title: '生产款号', prop: '生产款号', width: 160, sortable: 'sortable', },
|
|
|
|
|
- { align:'left', title: '制单数', prop: '制单数', width: 160, sortable: 'sortable', },
|
|
|
|
|
- { align:'left', title: '车缝完工数量', prop: '完工数量', width: 160, sortable: 'sortable', },
|
|
|
|
|
- { align:'left', title: '落货日期', prop: '落货日期', width: 120, sortable: 'sortable', },
|
|
|
|
|
- { align:'left', title: '生产时间', prop: '创建时间', width: 160, sortable: 'sortable', },
|
|
|
|
|
- ]">
|
|
|
|
|
- <el-table-column :align="item.align" :label="item.title" :fixed="item.fixed" :prop="item.prop" :width="item.width" :sortable="item.sortable" />
|
|
|
|
|
- </template>
|
|
|
|
|
- <div class="gva-pagination">
|
|
|
|
|
- <el-pagination layout="total" :current-page="page" :page-size="pageSize"
|
|
|
|
|
- :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ :header-cell-style="{ padding: '0px' }" :highlight-current-row="true" @row-click="tableRowClick"
|
|
|
|
|
+ style="width: 100%;height: 80vh" border tooltip-effect="dark" :data="chejianData" row-key="ID" @selection-change="PC_handleChange">
|
|
|
|
|
+ <!-- <el-table-column type="selection" width="30" /> -->
|
|
|
|
|
+ <el-table-column align="left" label="订单编号" prop="订单编号" width="110"/>
|
|
|
|
|
+ <el-table-column align="left" label="客户" prop="客户编号" width="100"/>
|
|
|
|
|
+ <el-table-column align="left" label="款式" prop="款式" width="200"/>
|
|
|
|
|
+ <el-table-column align="left" label="生产款号" prop="生产款号" width="120"/>
|
|
|
|
|
+ <el-table-column align="left" label="制单数" prop="制单数" width="75"/>
|
|
|
|
|
+ <el-table-column align="left" label="车缝完工数量" prop="完工数量" width="130"/>
|
|
|
|
|
+ <el-table-column align="left" label="落货日期" prop="落货日期" width="130"/>
|
|
|
|
|
+ <el-table-column align="left" label="生产时间" prop="创建时间" width="130"/>
|
|
|
|
|
+ <div class="gva-pagination">
|
|
|
|
|
+ <el-pagination layout="total" :current-page="page" :page-size="pageSize"
|
|
|
|
|
+ :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
|
|
|
|
|
+ </div>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
</el-main>
|
|
</el-main>
|
|
|
</layout-content>
|
|
</layout-content>
|
|
|
-
|
|
|
|
|
</layout>
|
|
</layout>
|
|
|
</layout>
|
|
</layout>
|
|
|
-
|
|
|
|
|
- <PrintPage ref="printPageRef" />
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="order_viewVisible"
|
|
|
|
|
+ title="选择打印格式"
|
|
|
|
|
+ width="30%"
|
|
|
|
|
+ top="10%"
|
|
|
|
|
+ :before-close="order_viewCloseDialog"
|
|
|
|
|
+ destroy-on-close>
|
|
|
|
|
+ <el-form>
|
|
|
|
|
+ <el-form-item label="打印方向" label-width="100px">
|
|
|
|
|
+ <el-radio-group v-model="printDirection">
|
|
|
|
|
+ <el-radio label="纵向">纵向</el-radio>
|
|
|
|
|
+ <el-radio label="横向">横向</el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <el-button @click="order_viewCloseDialog">关闭</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="confirmPrintDirection">确定打印</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <!-- 打印订单表预览 -->
|
|
|
|
|
+ <PrintPage ref="printPageRef" />
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
//点击按钮显示下方表格
|
|
//点击按钮显示下方表格
|
|
@@ -511,22 +106,17 @@ export default {
|
|
|
<script setup>
|
|
<script setup>
|
|
|
// 全量引入格式化工具 请按需保留
|
|
// 全量引入格式化工具 请按需保留
|
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
-import {createCompany, deleteCompany, deleteCompanyByIds, updateCompany, findCompany, getCompanyList} from '@/api/company'
|
|
|
|
|
-import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
|
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { ref, reactive,onMounted } from 'vue'
|
|
import { ref, reactive,onMounted } from 'vue'
|
|
|
|
|
+import * as XLSX from 'xlsx'
|
|
|
|
|
+import FileSaver from 'file-saver'
|
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
|
-import {MachineList,MachineDetail,CfmachineList,CfdataList,CfdataDel} from '@/api/mes/job'
|
|
|
|
|
-import {DataList,getProduct,ProductionSchedulingAdd,Project,
|
|
|
|
|
- StatusEdit,EquipmentScheduling,ScheduleSelection,MachineWorkOrderList,ProcessStatusCorrection,
|
|
|
|
|
- ProductionSchedulingPause,ProcessStatusCorrectionEdit,Schedule,complete,getOrderProcessCount,
|
|
|
|
|
- getOrderProcessLeft,EquipmentSchedulingEdit,MachineTeamEdit,PrintDetailList
|
|
|
|
|
-} from "@/api/yunyin/yunying";
|
|
|
|
|
-
|
|
|
|
|
-import PrintPage from './components/print.vue'
|
|
|
|
|
-
|
|
|
|
|
|
|
+import {MachineList,MachineDetail,CfmachineList,CfdataList,CfdataDel, WorkOrderList} from '@/api/mes/job'
|
|
|
import { useUserStore } from '@/pinia/modules/user';
|
|
import { useUserStore } from '@/pinia/modules/user';
|
|
|
|
|
+import PrintPage from './components/print.vue'
|
|
|
defineOptions({name: 'Company'})
|
|
defineOptions({name: 'Company'})
|
|
|
|
|
+//定义打印跳转页面
|
|
|
|
|
+const printPageRef = ref()
|
|
|
//获取登录用户信息
|
|
//获取登录用户信息
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
const _username = ref('')
|
|
const _username = ref('')
|
|
@@ -542,35 +132,72 @@ const minutes = String(today.getMinutes()).padStart(2, '0');
|
|
|
const seconds = String(today.getSeconds()).padStart(2, '0');
|
|
const seconds = String(today.getSeconds()).padStart(2, '0');
|
|
|
const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
const currentDates = `${year}-${month}-${day}`;
|
|
const currentDates = `${year}-${month}-${day}`;
|
|
|
-const printPageRef = ref()
|
|
|
|
|
-//上方表格
|
|
|
|
|
-const tableFields = ref({})
|
|
|
|
|
-//全局获取工单编号
|
|
|
|
|
-const _Gd_gdbh = ref(null)
|
|
|
|
|
-const _Gd_yjno = ref(null)
|
|
|
|
|
-const tableData = reactive([])
|
|
|
|
|
-const chejianData = reactive([])
|
|
|
|
|
-const _machine = ref(null);
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const _Machine_riqi = ref(null);
|
|
const _Machine_riqi = ref(null);
|
|
|
-const treeType = ref('dataTree') // customTree // 计划中,排产中 ,dataTree 车间
|
|
|
|
|
-const machine = ref('');//记录左侧车间机台编号
|
|
|
|
|
|
|
+// 车间数据相关变量
|
|
|
|
|
+const chejianData = reactive([]);
|
|
|
|
|
+const jhz_total = ref([]);
|
|
|
|
|
+const tableRowClick = async(row) => {
|
|
|
|
|
+ console.log('当前行数据:', row)
|
|
|
|
|
+ _Gd_gdbh.value = row.订单编号
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// =========== 订单打印 ===========
|
|
|
|
|
+const _Gd_gdbh = ref('')
|
|
|
|
|
+//弹窗
|
|
|
|
|
+const order_viewVisible = ref(false)
|
|
|
|
|
+// 默认选择竖向
|
|
|
|
|
+const printDirection = ref('纵向')
|
|
|
|
|
+const cp_gdprintonClick = () => {
|
|
|
|
|
+ order_viewVisible.value = true
|
|
|
|
|
+}
|
|
|
|
|
+//确定打印
|
|
|
|
|
+const confirmPrintDirection = () => {
|
|
|
|
|
+ console.log(_Gd_gdbh.value)
|
|
|
|
|
+ console.log(printDirection.value)
|
|
|
|
|
+
|
|
|
|
|
+ if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
|
|
|
|
|
+ ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ // if(hztableData.length >=1){
|
|
|
|
|
+ printPageRef.value.open(_Gd_gdbh.value,printDirection.value)
|
|
|
|
|
+ // }else{
|
|
|
|
|
+ // ElMessage({type: 'warning',message: '请新增颜色资料,再操作此功能'})
|
|
|
|
|
+ // return false;
|
|
|
|
|
+ // }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+const order_viewCloseDialog = () => {
|
|
|
|
|
+ order_viewVisible.value = false
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+//导出
|
|
|
|
|
+const exportToExcel = ()=>{
|
|
|
|
|
+ const el = document.getElementById('finished');
|
|
|
|
|
+ // 文件名
|
|
|
|
|
+ const filename = _Machine_riqi.value + '车缝APS进程.xlsx';
|
|
|
|
|
+ const wb = XLSX.utils.table_to_book(el, { raw: true });
|
|
|
|
|
+ const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
|
|
|
|
|
+ try {
|
|
|
|
|
+ FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ }
|
|
|
|
|
+ return wbout;
|
|
|
|
|
+}
|
|
|
// =========== 获取左侧树侧形结构 ===========
|
|
// =========== 获取左侧树侧形结构 ===========
|
|
|
const treeData = ref([]);
|
|
const treeData = ref([]);
|
|
|
-const _department_code = ref(null);
|
|
|
|
|
-
|
|
|
|
|
const getDepartmentdata = async () => {
|
|
const getDepartmentdata = async () => {
|
|
|
try {
|
|
try {
|
|
|
// 车缝派工菜单
|
|
// 车缝派工菜单
|
|
|
const CfmachineLists = await CfmachineList();
|
|
const CfmachineLists = await CfmachineList();
|
|
|
console.log(CfmachineLists);
|
|
console.log(CfmachineLists);
|
|
|
-
|
|
|
|
|
// 清空 treeData.value 以防止重复添加
|
|
// 清空 treeData.value 以防止重复添加
|
|
|
treeData.value = [];
|
|
treeData.value = [];
|
|
|
-
|
|
|
|
|
// 获取并排序年份月份,从大到小排列
|
|
// 获取并排序年份月份,从大到小排列
|
|
|
const sortedYearMonths = Object.keys(CfmachineLists.data).sort((a, b) => b - a);
|
|
const sortedYearMonths = Object.keys(CfmachineLists.data).sort((a, b) => b - a);
|
|
|
-
|
|
|
|
|
// 处理排序后的数据
|
|
// 处理排序后的数据
|
|
|
for (const yearMonth of sortedYearMonths) {
|
|
for (const yearMonth of sortedYearMonths) {
|
|
|
const machineList = CfmachineLists.data[yearMonth];
|
|
const machineList = CfmachineLists.data[yearMonth];
|
|
@@ -582,16 +209,13 @@ const getDepartmentdata = async () => {
|
|
|
}))
|
|
}))
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 设置 _Machine_riqi.value 为最新的年月
|
|
// 设置 _Machine_riqi.value 为最新的年月
|
|
|
_Machine_riqi.value = sortedYearMonths[0];
|
|
_Machine_riqi.value = sortedYearMonths[0];
|
|
|
-
|
|
|
|
|
console.log(treeData.value);
|
|
console.log(treeData.value);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('获取数据失败:', error);
|
|
console.error('获取数据失败:', error);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
getDepartmentdata();
|
|
getDepartmentdata();
|
|
|
|
|
|
|
|
// 点击左侧菜单栏
|
|
// 点击左侧菜单栏
|
|
@@ -601,13 +225,11 @@ const handleNodeClick = async (node) => {
|
|
|
console.log("点击的是日期节点,无需传递参数");
|
|
console.log("点击的是日期节点,无需传递参数");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 取消所有节点的颜色
|
|
// 取消所有节点的颜色
|
|
|
const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
|
|
const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
|
|
|
allNodes.forEach(node => {
|
|
allNodes.forEach(node => {
|
|
|
node.querySelector('.el-tree-node__label').style.color = '';
|
|
node.querySelector('.el-tree-node__label').style.color = '';
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
// 获取点击的节点
|
|
// 获取点击的节点
|
|
|
const clickedNodeId = node['$treeNodeId'];
|
|
const clickedNodeId = node['$treeNodeId'];
|
|
|
const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
|
|
const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
|
|
@@ -615,7 +237,6 @@ const handleNodeClick = async (node) => {
|
|
|
// 给当前点击的节点改变颜色
|
|
// 给当前点击的节点改变颜色
|
|
|
clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
|
|
clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 以 '【' 分隔,取第一部分
|
|
// 以 '【' 分隔,取第一部分
|
|
|
const machineCode = node.label.split('【')[0];
|
|
const machineCode = node.label.split('【')[0];
|
|
|
console.log(machineCode); // 输出: CF01
|
|
console.log(machineCode); // 输出: CF01
|
|
@@ -629,313 +250,8 @@ const handleNodeClick = async (node) => {
|
|
|
chejianData.splice(0, chejianData.length, ...CfdataListtable.data.table);
|
|
chejianData.splice(0, chejianData.length, ...CfdataListtable.data.table);
|
|
|
jhz_total.value = CfdataListtable.data.table;
|
|
jhz_total.value = CfdataListtable.data.table;
|
|
|
};
|
|
};
|
|
|
-//默认显示计划中表格
|
|
|
|
|
-const currentNode = ref("计划中")
|
|
|
|
|
-//计划中、已完工下方印件资料
|
|
|
|
|
-const yjtableData = ref([])
|
|
|
|
|
-//计划中、已完工下方工艺资料
|
|
|
|
|
-const gytableData = ref([])
|
|
|
|
|
-//排程中、制程中下方表格
|
|
|
|
|
-const bottomData = ref([])
|
|
|
|
|
-//车间机台制程列表
|
|
|
|
|
-const chejianfuData = ref([])
|
|
|
|
|
-//点击侧边栏获取参数
|
|
|
|
|
-const _cname = ref(null)
|
|
|
|
|
-//工单侧边栏 设备定额及分配参数设置
|
|
|
|
|
-const schandleNodeClick = async (node) => {
|
|
|
|
|
- currentNode.value = node.number
|
|
|
|
|
- bottomData.value = []
|
|
|
|
|
- yjtableData.value = []
|
|
|
|
|
- gytableData.value = []
|
|
|
|
|
- console.log(node.number)
|
|
|
|
|
|
|
|
|
|
- switch (node.number) {
|
|
|
|
|
- case "计划中":
|
|
|
|
|
- const jhz_Projectdata = [
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'1',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1622款',
|
|
|
|
|
- '订单子编号':'2408001-1',
|
|
|
|
|
- '颜色':'红色',
|
|
|
|
|
- '制单总数':'90',
|
|
|
|
|
- '工作中心':'--',
|
|
|
|
|
- '部门':'--',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'连衣裙',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'2',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1623款',
|
|
|
|
|
- '订单子编号':'2408001-2',
|
|
|
|
|
- '颜色':'蓝色',
|
|
|
|
|
- '制单总数':'80',
|
|
|
|
|
- '工作中心':'--',
|
|
|
|
|
- '部门':'--',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'长袖',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'3',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1623款',
|
|
|
|
|
- '订单子编号':'2408001-2',
|
|
|
|
|
- '颜色':'蓝色',
|
|
|
|
|
- '制单总数':'80',
|
|
|
|
|
- '工作中心':'--',
|
|
|
|
|
- '部门':'--',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'长袖',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'4',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1623款',
|
|
|
|
|
- '订单子编号':'2408001-2',
|
|
|
|
|
- '颜色':'蓝色',
|
|
|
|
|
- '制单总数':'80',
|
|
|
|
|
- '工作中心':'--',
|
|
|
|
|
- '部门':'--',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'长袖',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- ];
|
|
|
|
|
- console.log(jhz_Projectdata)
|
|
|
|
|
- tableData.splice(0,tableData.length,...jhz_Projectdata);//表格数据
|
|
|
|
|
|
|
|
|
|
- _cname.value = '计划中';
|
|
|
|
|
- // _jhz_Projectdata_page();
|
|
|
|
|
- break;
|
|
|
|
|
- // case "排程中":
|
|
|
|
|
- // const pc_Schedule = await Schedule({status:currentNode.value,search:''});
|
|
|
|
|
- // tableData.value = pc_Schedule.data;
|
|
|
|
|
- // break;
|
|
|
|
|
- case "制程中":
|
|
|
|
|
- // const zc_Schedule = await Schedule({status:currentNode.value,search:''});
|
|
|
|
|
- const zcz_Projectdata = [
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'1',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1622款',
|
|
|
|
|
- '订单子编号':'2408001-1',
|
|
|
|
|
- '颜色':'红色',
|
|
|
|
|
- '制单总数':'90',
|
|
|
|
|
- '排产数量':'50',
|
|
|
|
|
- '工作中心':'二分厂',
|
|
|
|
|
- '部门':'服装厂11组',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'连衣裙',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- '排产时间':'2024-8-14 12:00',
|
|
|
|
|
- '排产人':'车间主任xxx',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'2',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1622款',
|
|
|
|
|
- '订单子编号':'2408001-1',
|
|
|
|
|
- '颜色':'红色',
|
|
|
|
|
- '制单总数':'90',
|
|
|
|
|
- '排产数量':'40',
|
|
|
|
|
- '工作中心':'二分厂',
|
|
|
|
|
- '部门':'服装厂1组',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'连衣裙',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- '排产时间':'2024-8-14 12:00',
|
|
|
|
|
- '排产人':'车间主任xxx',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'3',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1623款',
|
|
|
|
|
- '订单子编号':'2408001-2',
|
|
|
|
|
- '颜色':'蓝色',
|
|
|
|
|
- '制单总数':'80',
|
|
|
|
|
- '排产数量':'80',
|
|
|
|
|
- '工作中心':'二分厂',
|
|
|
|
|
- '部门':'服装厂12组',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'连衣裙',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- '排产时间':'2024-8-14 12:00',
|
|
|
|
|
- '排产人':'车间主任xxx',
|
|
|
|
|
- },
|
|
|
|
|
- ];
|
|
|
|
|
-
|
|
|
|
|
- console.log(zcz_Projectdata)
|
|
|
|
|
- tableData.splice(0,tableData.length,...zcz_Projectdata);//表格数据
|
|
|
|
|
- _cname.value = '制程中';
|
|
|
|
|
- break;
|
|
|
|
|
- case "已完工":
|
|
|
|
|
- const ywg_Projectdata = [
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'1',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1622款',
|
|
|
|
|
- '订单子编号':'2408001-1',
|
|
|
|
|
- '颜色':'红色',
|
|
|
|
|
- '制单总数':'90',
|
|
|
|
|
- '排产数量':'50',
|
|
|
|
|
- '完工数量':'50',
|
|
|
|
|
- '工作中心':'二分厂',
|
|
|
|
|
- '部门':'服装厂11组',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'连衣裙',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- '排产时间':'2024-8-10 12:00',
|
|
|
|
|
- '排产人':'车间主任xxx',
|
|
|
|
|
- '完工时间':'2024-8-14 12:00',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'2',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1622款',
|
|
|
|
|
- '订单子编号':'2408001-1',
|
|
|
|
|
- '颜色':'红色',
|
|
|
|
|
- '制单总数':'90',
|
|
|
|
|
- '排产数量':'40',
|
|
|
|
|
- '完工数量':'40',
|
|
|
|
|
- '工作中心':'二分厂',
|
|
|
|
|
- '部门':'服装厂1组',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'连衣裙',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- '排产时间':'2024-8-10 12:00',
|
|
|
|
|
- '排产人':'车间主任xxx',
|
|
|
|
|
- '完工时间':'2024-8-14 12:00',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- '序号':'3',
|
|
|
|
|
- '订单号':'2408001',
|
|
|
|
|
- '生产款号':'2403-1622款',
|
|
|
|
|
- '订单子编号':'2408001-2',
|
|
|
|
|
- '颜色':'黑色',
|
|
|
|
|
- '制单总数':'80',
|
|
|
|
|
- '排产数量':'80',
|
|
|
|
|
- '完工数量':'80',
|
|
|
|
|
- '工作中心':'二分厂',
|
|
|
|
|
- '部门':'服装厂12组',
|
|
|
|
|
- '客户':'DC-7',
|
|
|
|
|
- '落货日期':'2024/7/20',
|
|
|
|
|
- '款式':'连衣裙',
|
|
|
|
|
- '箱唛要求':'折箱装修',
|
|
|
|
|
- '面料':'面布:乱麻复合布;拼布:AZ666雪纺…',
|
|
|
|
|
- '要求':'',
|
|
|
|
|
- '船样描述':'',
|
|
|
|
|
- '船样合计':'4',
|
|
|
|
|
- '粘衬':'',
|
|
|
|
|
- '订单数量':'174',
|
|
|
|
|
- '单位':'件',
|
|
|
|
|
- '审核':'裘志江',
|
|
|
|
|
- '审核日期':'2024/6/27',
|
|
|
|
|
- '排产时间':'2024-8-10 12:00',
|
|
|
|
|
- '排产人':'车间主任xxx',
|
|
|
|
|
- '完工时间':'2024-8-14 12:00',
|
|
|
|
|
- },
|
|
|
|
|
- ]
|
|
|
|
|
- console.log(ywg_Projectdata)
|
|
|
|
|
- tableData.splice(0,tableData.length,...ywg_Projectdata);//表格数据
|
|
|
|
|
- _cname.value = '已完工';
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
//分页
|
|
//分页
|
|
|
// 分页相关的响应式变量
|
|
// 分页相关的响应式变量
|
|
|
const page = ref(1)
|
|
const page = ref(1)
|
|
@@ -953,904 +269,17 @@ page.value = 10;//默认显示
|
|
|
pageSize.value = val;
|
|
pageSize.value = val;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-//左上角搜索计划中、已完工工单编号
|
|
|
|
|
const searchInfo = ref('');
|
|
const searchInfo = ref('');
|
|
|
//搜索按钮
|
|
//搜索按钮
|
|
|
-const onSubmit = () => {
|
|
|
|
|
- if(searchInfo.value === ''){
|
|
|
|
|
- ElMessage({type: 'warning',message: '请输入搜索的信息'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }else{
|
|
|
|
|
- console.log(searchInfo.value)
|
|
|
|
|
- console.log("点击了搜索按钮");
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-//搜索计划中、已完工一条工单接口
|
|
|
|
|
-const _Project = async () => {
|
|
|
|
|
- const status = currentNode.value;
|
|
|
|
|
- const search = searchInfo.value;
|
|
|
|
|
- const Project_search = await Project({status:status,search:search,page:1,limit:30});
|
|
|
|
|
- if(Project_search.msg === '成功'){
|
|
|
|
|
- tableData.value = Project_search.data.data;
|
|
|
|
|
- }else{
|
|
|
|
|
- ElMessage({type: 'warning',message: '查不到具体条件的工单'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-// 搜索排程、制程一条工单接口
|
|
|
|
|
-const _Schedule = async () => {
|
|
|
|
|
- const status = currentNode.value;
|
|
|
|
|
- const search = searchInfo.value;
|
|
|
|
|
- const Schedule_search = await Schedule({status:status,search:search});
|
|
|
|
|
- if(Schedule_search.msg === '成功'){
|
|
|
|
|
- tableData.value = Schedule_search.data;
|
|
|
|
|
- }else{
|
|
|
|
|
- ElMessage({type: 'warning',message: '查不到具体条件的工单'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-//机台搜索一条工单接口
|
|
|
|
|
-const _MachineWorkOrderList = async () => {
|
|
|
|
|
- let params = {}
|
|
|
|
|
- params.search = searchInfo.value;
|
|
|
|
|
- params.machine = _machine.value;
|
|
|
|
|
- const MachineWorkOrderList_search = await MachineWorkOrderList(params);
|
|
|
|
|
- if(MachineWorkOrderList_search.msg === ''){
|
|
|
|
|
- ElMessage({type: 'warning',message: '查不到具体条件的工单'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }else{
|
|
|
|
|
- console.log(searchInfo.value)
|
|
|
|
|
- chejianfuData.value = MachineWorkOrderList_search.data['制程'];
|
|
|
|
|
- chejianData.value = MachineWorkOrderList_search.data['排程'];
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-//加入排产按钮
|
|
|
|
|
-const onjrpcClick = async () => {
|
|
|
|
|
- searchInfo.value = '';
|
|
|
|
|
- if(_PC_gdbh.value == null || _PC_gdbh.value == ''){
|
|
|
|
|
- ElMessage({type: 'warning',message: '请勾选排程中工单'})
|
|
|
|
|
- }else{
|
|
|
|
|
- if (_PC_xscn.value === '' || _PC_xscn.value === null || _PC_xscn.value === '0') {
|
|
|
|
|
- ElMessage({type: 'warning',message: '选择中小时产量为 0'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }else{
|
|
|
|
|
- let params = {}
|
|
|
|
|
- params.workOrder = _PC_gdbh.value;
|
|
|
|
|
- params.machine = _machine.value;
|
|
|
|
|
- params.printCode = _PC_yjno.value;
|
|
|
|
|
- params.processCode = _PC_gxh.value;
|
|
|
|
|
- const ProductionSchedulingAdd_add = await ProductionSchedulingAdd(params);
|
|
|
|
|
- if (ProductionSchedulingAdd_add.code === 0) {
|
|
|
|
|
- const pc_zc_table = await MachineWorkOrderList({machine:_machine.value});
|
|
|
|
|
- chejianData.value = pc_zc_table.data['排程'];
|
|
|
|
|
- chejianfuData.value = pc_zc_table.data['制程'];
|
|
|
|
|
- ElMessage({type: 'success',message: '加入排产 更新成功'});
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({ type: 'error',message: '更新失败'})
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-//暂停排产按钮
|
|
|
|
|
-const onztwgClick = async () => {
|
|
|
|
|
- searchInfo.value = '';
|
|
|
|
|
- if(_ZC_gdbh.value == null || _ZC_gdbh.value == ''){
|
|
|
|
|
- ElMessage({type: 'warning', message: '请勾选制程中工单'})
|
|
|
|
|
- }else{
|
|
|
|
|
- let params = {}
|
|
|
|
|
- params.workOrder = _ZC_gdbh.value;
|
|
|
|
|
- params.machine = _machine.value;
|
|
|
|
|
- params.printCode = _ZC_yjno.value;
|
|
|
|
|
- params.processCode = _ZC_gxh.value;
|
|
|
|
|
- const ProductionSchedulingAdd_stop = await ProductionSchedulingPause(params);
|
|
|
|
|
- if (ProductionSchedulingAdd_stop.code === 0) {
|
|
|
|
|
- const pc_zc_table = await MachineWorkOrderList({machine:_machine.value});
|
|
|
|
|
- chejianData.value = pc_zc_table.data['排程'];
|
|
|
|
|
- chejianfuData.value = pc_zc_table.data['制程'];
|
|
|
|
|
- ElMessage({type: 'success',message: '暂停排产 更新成功'});
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({ type: 'error',message: '更新失败'})
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-//工序完工按钮
|
|
|
|
|
-const ongxwgClick = async () => {
|
|
|
|
|
- searchInfo.value = '';
|
|
|
|
|
- if(_ZC_gdbh.value == null || _ZC_gdbh.value == ''){
|
|
|
|
|
- onstatuslist.value = false;
|
|
|
|
|
- ElMessage({type: 'warning',message: '请勾选制程中工单'})
|
|
|
|
|
- }else{
|
|
|
|
|
- let params = {}
|
|
|
|
|
- params.workOrder = _ZC_gdbh.value;
|
|
|
|
|
- params.processCode = _ZC_gxh.value;
|
|
|
|
|
- const complete_get = await complete(params);
|
|
|
|
|
- if (complete_get.code === 0) {
|
|
|
|
|
- const pc_zc_table = await MachineWorkOrderList({ machine:_machine.value});
|
|
|
|
|
- // chejianData.value = pc_zc_table.data['排程'];
|
|
|
|
|
- chejianfuData.value = pc_zc_table.data['制程'];
|
|
|
|
|
- ElMessage({type: 'success',message: '工序完工 更新成功'})
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({ type: 'error',message: '更新失败'})
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+const onSubmit = async () => {
|
|
|
|
|
+ console.log(searchInfo.value)
|
|
|
|
|
+ console.log("点击了搜索按钮");
|
|
|
|
|
+ // 调用工单列表接口,传递search参数(可以为空)
|
|
|
|
|
+ const CfdataListtable = await CfdataList({ search: searchInfo.value, machine: '', date: '' });
|
|
|
|
|
+ chejianData.splice(0, chejianData.length, ...CfdataListtable.data.table);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const table_del = ref(true)
|
|
|
|
|
-//表格复选框
|
|
|
|
|
-const table_Selection = ref('')
|
|
|
|
|
-const PC_handleChange = (selection, type) => {
|
|
|
|
|
- console.log(selection)
|
|
|
|
|
- const ids = selection.map(item => {
|
|
|
|
|
- return item.UniqId
|
|
|
|
|
- })
|
|
|
|
|
- // console.log('获取复选框Uniqid:',ids)
|
|
|
|
|
- table_Selection.value = ids.join(',')
|
|
|
|
|
- console.log("获取复选框逗号间隔:",table_Selection.value)
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//删除按钮
|
|
|
|
|
-const del_ddzlClick = async () => {
|
|
|
|
|
- console.log(table_Selection._value)
|
|
|
|
|
-
|
|
|
|
|
- let params = {};
|
|
|
|
|
- params.UniqId = table_Selection._value;
|
|
|
|
|
- console.log(params)
|
|
|
|
|
-
|
|
|
|
|
- const res1 = await CfdataDel(params)
|
|
|
|
|
- res1.code === 0 && ElMessage.success('删除成功')
|
|
|
|
|
-
|
|
|
|
|
- const CfdataListtable = await CfdataList({machine:machine.value});
|
|
|
|
|
- console.log(99999,CfdataListtable)
|
|
|
|
|
- const cjData = CfdataListtable.data
|
|
|
|
|
- console.log(cjData)
|
|
|
|
|
- chejianData.splice(0,chejianData.length,...cjData);//表格数据
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//=========工序产量核查===========
|
|
|
|
|
-const pd_gxclhclist = ref(false);
|
|
|
|
|
-const gxclhc_Data = ref([]);
|
|
|
|
|
-const gxclhc_Columns = ref(
|
|
|
|
|
- [
|
|
|
|
|
- { label: '印件及工序名称', prop: 'concatenatedData', width: '380' },
|
|
|
|
|
- // { label: '印件', prop: 'Gy0_yjno', width: '130' },
|
|
|
|
|
- // { label: '工序', prop: 'Gy0_gxh', width: '130' },
|
|
|
|
|
- // { label: '名称', prop: 'Gy0_gxmc', width: '130' },
|
|
|
|
|
- { label: '工序计划产量', prop: 'Gy0_计划接货数', width: '120' },
|
|
|
|
|
- { label: '联数', prop: 'Gy0_ls', width: '70' },
|
|
|
|
|
- { label: '折算车头产量', prop: '折算车头产量', width: '120' },
|
|
|
|
|
- { label: '实际上报产量', prop: 'sczl_cl', width: '120' },
|
|
|
|
|
- { label: '制程废品', prop: 'sczl_zcfp', width: '120' },
|
|
|
|
|
- { label: '制程废品率', prop: '制程废品率', width: '120' },
|
|
|
|
|
- { label: '来料异常', prop: '来料异常', width: '90' },
|
|
|
|
|
- { label: '流程单数', prop: 'process_num', width: '90' },
|
|
|
|
|
- { label: '当前设备', prop: 'Gy0_sbbh', width: '120' },
|
|
|
|
|
- { label: '工序状态', prop: 'PD_WG', width: '90'},
|
|
|
|
|
- { label: '首板生产日期', prop: 'sczl_rq', width: '160' },
|
|
|
|
|
- ]
|
|
|
|
|
-)
|
|
|
|
|
-const gxclhcformData = reactive({
|
|
|
|
|
- gdbh: '',
|
|
|
|
|
- gdmc: '',
|
|
|
|
|
- yjno: '',
|
|
|
|
|
-});
|
|
|
|
|
-const gdwhformData = reactive({
|
|
|
|
|
- // 下拉框选项数据
|
|
|
|
|
- yinjian: [],
|
|
|
|
|
- // 设置默认值
|
|
|
|
|
- yjno: '',
|
|
|
|
|
-});
|
|
|
|
|
-const inputCpmc = ref('')
|
|
|
|
|
-
|
|
|
|
|
-// 工序产量核查按钮
|
|
|
|
|
-const pd_gxclhconClick = async () => {
|
|
|
|
|
- if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
|
|
|
|
|
- ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- gxclhcformData['gdbh'] = _Gd_gdbh.value;
|
|
|
|
|
- pd_gxclhclist.value = true;
|
|
|
|
|
- const response = await PrintDetailList ({workOrder:_Gd_gdbh.value});
|
|
|
|
|
- console.log(response)
|
|
|
|
|
- gdwhformData.yjno = response.data[0].no
|
|
|
|
|
- inputCpmc.value = response.data[0].name
|
|
|
|
|
- if (response.code === 0) {
|
|
|
|
|
- const noFields = response.data.map(item => item.no);
|
|
|
|
|
- gdwhformData.yinjian = noFields
|
|
|
|
|
- } else {
|
|
|
|
|
- console.error('查询失败:', response.msg);
|
|
|
|
|
- }
|
|
|
|
|
- _getOrderProcessCount();
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-//点击印件下拉框
|
|
|
|
|
-const ongdwhfanclick = async() => {
|
|
|
|
|
- _PrintDetailList();
|
|
|
|
|
- _getOrderProcessCount();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//工序产量核查回车
|
|
|
|
|
-const gxclhcProductValue = async () => {
|
|
|
|
|
- _getOrderProcessCount();
|
|
|
|
|
- _PrintDetailList();
|
|
|
|
|
-}
|
|
|
|
|
-//工序产量核查退出
|
|
|
|
|
-const gxclhcCancel = async () => {
|
|
|
|
|
- pd_gxclhclist.value = false;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-//印件编号获取方法接口
|
|
|
|
|
-const _PrintDetailList = async () => {
|
|
|
|
|
- const order = gxclhcformData['gdbh'];
|
|
|
|
|
- const response = await PrintDetailList ({workOrder:order});
|
|
|
|
|
- const matchingItem = response.data.find(item => item.no === gdwhformData.yjno);
|
|
|
|
|
- if (matchingItem) {
|
|
|
|
|
- console.log(matchingItem.name)
|
|
|
|
|
- inputCpmc.value = matchingItem.name;
|
|
|
|
|
- } else {
|
|
|
|
|
- console.log(`No matching item found for no: ${gdwhformData.yjno}`);
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//工序产量核查方法接口
|
|
|
|
|
-const _getOrderProcessCount = async () => {
|
|
|
|
|
- const order = gxclhcformData['gdbh'];
|
|
|
|
|
- const yjno = gdwhformData.yjno;
|
|
|
|
|
- const getOrderProcessCount_list = await getOrderProcessCount({order:order,yjno:yjno});
|
|
|
|
|
- const concatenatedData = getOrderProcessCount_list.data.map(item => {
|
|
|
|
|
- // 优化后的代码,使用模板字符串连接字段值并在单个数字前添加零
|
|
|
|
|
- const formattedYjno = item.Gy0_yjno.length === 1 ? `0${item.Gy0_yjno}` : item.Gy0_yjno;
|
|
|
|
|
- const formattedGxh = item.Gy0_gxh.length === 1 ? `0${item.Gy0_gxh}` : item.Gy0_gxh;
|
|
|
|
|
- const concatenatedValue = `${formattedYjno}-${formattedGxh} ${item.Gy0_gxmc}`;
|
|
|
|
|
- return {
|
|
|
|
|
- ...item,
|
|
|
|
|
- concatenatedData: concatenatedValue, // 使用新属性名
|
|
|
|
|
- };
|
|
|
|
|
- });
|
|
|
|
|
- gxclhc_Data.value = concatenatedData;
|
|
|
|
|
-};
|
|
|
|
|
-//工序产量核查
|
|
|
|
|
-const gxclhcCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
|
|
- if (column.label === '实际上报产量' ||column.label === '制程废品' || column.label === '制程废品率' ||
|
|
|
|
|
- column.label === '来料异常' || column.label === '流程单数' || column.label === '当前设备') {
|
|
|
|
|
- return 'lan-plan-usage-lows';
|
|
|
|
|
- }
|
|
|
|
|
- if (column.label === '折算车头产量') {
|
|
|
|
|
- return 'gxclhc—color-column-red';
|
|
|
|
|
- }
|
|
|
|
|
- // 如果不是 'PD_WG' 列,返回空字符串或其他样式类
|
|
|
|
|
- if (column.label === '工序状态'){
|
|
|
|
|
- if(row['PD_WG'] === '完工'){
|
|
|
|
|
- return 'lan-plan-usage-lowshui';
|
|
|
|
|
- }else{
|
|
|
|
|
- return 'pczccolor-column-lan';
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
-//===========工单状态设置按钮=======
|
|
|
|
|
-const onstatuslist = ref(false);
|
|
|
|
|
-const statusformData = reactive({gdbh: '',});
|
|
|
|
|
-const status = ref('计划中'); // 默认选择
|
|
|
|
|
-const onStatusClick = () => {
|
|
|
|
|
- if(_Gd_gdbh.value === null || _Gd_gdbh.value === ''){
|
|
|
|
|
- onstatuslist.value = false;
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: '请选择树形后,再操作此功能'
|
|
|
|
|
- })
|
|
|
|
|
- }else{
|
|
|
|
|
- statusformData['gdbh'] = _Gd_gdbh.value;
|
|
|
|
|
- onstatuslist.value = true;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-//工单状态设置【放弃按钮】
|
|
|
|
|
-const handleCancel = () => {
|
|
|
|
|
- onstatuslist.value = false;
|
|
|
|
|
-};
|
|
|
|
|
-//工单状态设置【执行按钮】
|
|
|
|
|
-const handleConfirm = async () => {
|
|
|
|
|
- //工单编号
|
|
|
|
|
- let workOrder = statusformData['gdbh'];
|
|
|
|
|
- //状态
|
|
|
|
|
- let statusCode;
|
|
|
|
|
- if (status.value === '计划中') {
|
|
|
|
|
- statusCode = "3-计划中";
|
|
|
|
|
- } else if (status.value === '生产中') {
|
|
|
|
|
- statusCode = "2-生产中";
|
|
|
|
|
- }else if (status.value === '已完工') {
|
|
|
|
|
- statusCode = "1-已完工";
|
|
|
|
|
- }
|
|
|
|
|
- const StatusEditdata = await StatusEdit({workOrder:workOrder,status:statusCode});
|
|
|
|
|
- if (StatusEditdata.code === 0) {
|
|
|
|
|
- ElMessage({type: 'success',message: '更新成功'})
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({type: 'error',message: '更新失败'})
|
|
|
|
|
- }
|
|
|
|
|
- onstatuslist.value = false;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-// =========== 【工序状态更正】 ===========
|
|
|
|
|
-const gxztgzztableColumns = ref(
|
|
|
|
|
- [
|
|
|
|
|
- { label: '印件及工序', prop: '印件及工序', width: '600' },
|
|
|
|
|
- { label: '计划产量/已完成', prop:['计划产量/已完成'], width: '500' },
|
|
|
|
|
- { label: '完成率', prop: '完成率', width: '240' },
|
|
|
|
|
- { label: '完工时间', prop: '完工时间', width: '300' },
|
|
|
|
|
- { label: '设备代号', prop: '设备代号', width: '240' },
|
|
|
|
|
- ]
|
|
|
|
|
-)
|
|
|
|
|
-const gxztgzztableData = ref([]);
|
|
|
|
|
-const gxztgzzlist = ref(false);
|
|
|
|
|
-const gxztgzzformData = reactive({gdbh: '',});
|
|
|
|
|
-
|
|
|
|
|
-// =========== 排产 ===========
|
|
|
|
|
-//默认弹窗关闭
|
|
|
|
|
-const add_gdyjdialogFormVisible = ref(false)
|
|
|
|
|
-const add_yjzlformdata = reactive({
|
|
|
|
|
- ddzbh: '',
|
|
|
|
|
- ys: '',
|
|
|
|
|
- cmgg: '',
|
|
|
|
|
- sfcy: '',
|
|
|
|
|
- gzzx: '',
|
|
|
|
|
- cfxtxz1: '',
|
|
|
|
|
- cfxtxz2: '',
|
|
|
|
|
- pcsl1: '',
|
|
|
|
|
- pcsl2: '',
|
|
|
|
|
-});
|
|
|
|
|
-const cmformdata = reactive({
|
|
|
|
|
- cm1:'32',
|
|
|
|
|
- cm2:'34',
|
|
|
|
|
- cm3:'36',
|
|
|
|
|
- cm4:'38',
|
|
|
|
|
- cm5:'40',
|
|
|
|
|
- cm6:'42',
|
|
|
|
|
- cm7:'44',
|
|
|
|
|
- cm8:'46',
|
|
|
|
|
- cm9:'总计',
|
|
|
|
|
-});
|
|
|
|
|
-const zdsformdata = reactive({
|
|
|
|
|
- zds1:'10',
|
|
|
|
|
- zds2:'20',
|
|
|
|
|
- zds3:'30',
|
|
|
|
|
- zds4:'',
|
|
|
|
|
- zds5: '',
|
|
|
|
|
- zds6:'',
|
|
|
|
|
- zds7:'',
|
|
|
|
|
- zds8:'',
|
|
|
|
|
- zds9:'',
|
|
|
|
|
-});
|
|
|
|
|
-//清空对象的属性值
|
|
|
|
|
-const gdyj_clearFormData = () => {
|
|
|
|
|
- Object.keys(zdsformdata).forEach(key => {
|
|
|
|
|
- zdsformdata[key] = '';
|
|
|
|
|
- });
|
|
|
|
|
- add_yjzlformdata['ddzbh'] = '2408001-1';
|
|
|
|
|
- add_yjzlformdata['ys'] = '红色';
|
|
|
|
|
- add_yjzlformdata['cmgg'] = '32~46';
|
|
|
|
|
- add_yjzlformdata['sfcy'] = '是';
|
|
|
|
|
- add_yjzlformdata['gzzx'] = '二分厂';
|
|
|
|
|
- add_yjzlformdata['cfxtxz1'] = '服装厂11组';
|
|
|
|
|
- add_yjzlformdata['cfxtxz2'] = '服装厂1组';
|
|
|
|
|
- add_yjzlformdata['pcsl1'] = '50';
|
|
|
|
|
- add_yjzlformdata['pcsl2'] = '40';
|
|
|
|
|
-};
|
|
|
|
|
-//排产按钮
|
|
|
|
|
-const ongxztgzClick = () => {
|
|
|
|
|
- // add_yjzlformdata.ddzbh = _Gd_gdbh.value
|
|
|
|
|
- add_gdyjdialogFormVisible.value = true
|
|
|
|
|
- gdyj_clearFormData();
|
|
|
|
|
-}
|
|
|
|
|
-//增删小组
|
|
|
|
|
-
|
|
|
|
|
-//排产确定
|
|
|
|
|
-const add_gdyjenterDialog = async () => {
|
|
|
|
|
-
|
|
|
|
|
-}
|
|
|
|
|
-//排产取消
|
|
|
|
|
-const add_dyjcloseDialog = () => {
|
|
|
|
|
- add_gdyjdialogFormVisible.value = false
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//新增工单资料弹窗 键盘input框跳转
|
|
|
|
|
-const add_gdzlent = async (event,id1,id2,id3,idx) => {
|
|
|
|
|
- if(event.keyCode === 40){
|
|
|
|
|
- if(id3!=''){
|
|
|
|
|
- document.getElementById(id3).focus()
|
|
|
|
|
- }
|
|
|
|
|
- }else if (event.keyCode === 13) { // Enter 或向下箭头
|
|
|
|
|
- if(id3!=''){
|
|
|
|
|
- document.getElementById(id3).focus()
|
|
|
|
|
- }
|
|
|
|
|
- } else if (event.keyCode === 38) { // 向上箭头
|
|
|
|
|
- if(id1!=''){
|
|
|
|
|
- document.getElementById(id1).focus()
|
|
|
|
|
- }
|
|
|
|
|
- }else if (event.keyCode === 8) { // 删除箭头
|
|
|
|
|
- if(id1!='' && document.getElementById(id2).value==''){
|
|
|
|
|
- document.getElementById(id1).focus()
|
|
|
|
|
- }
|
|
|
|
|
- }else if (event.keyCode === 37) { // 向左箭头
|
|
|
|
|
- if(id1!='' && document.getElementById(id2).selectionStart==0){
|
|
|
|
|
- document.getElementById(id1).focus()
|
|
|
|
|
- }
|
|
|
|
|
- }else if (event.keyCode === 39) { // 向右箭头
|
|
|
|
|
- if(id3!='' && document.getElementById(id2).selectionStart == document.getElementById(id2).value.length){
|
|
|
|
|
- document.getElementById(id3).focus()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//工序状态更正按钮
|
|
|
|
|
-// const ongxztgzClick = () => {
|
|
|
|
|
-// if(_Gd_gdbh.value == null){
|
|
|
|
|
-// gxztgzzlist.value = false;
|
|
|
|
|
-// ElMessage({type: 'warning',message: '请选择树形后,再操作此功能'})
|
|
|
|
|
-// }else{
|
|
|
|
|
-// gxztgzzformData['gdbh'] = _Gd_gdbh.value;
|
|
|
|
|
-// _ProcessStatusCorrection();
|
|
|
|
|
-// gxztgzzlist.value = true;
|
|
|
|
|
-// }
|
|
|
|
|
-// };
|
|
|
|
|
-//工序状态更正回车
|
|
|
|
|
-const gxztgzzgetProductValue = () => {
|
|
|
|
|
- _ProcessStatusCorrection();
|
|
|
|
|
-};
|
|
|
|
|
-//工序状态更正接口获取
|
|
|
|
|
-const _ProcessStatusCorrection = async (row) => {
|
|
|
|
|
- const workOrder = gxztgzzformData['gdbh'];
|
|
|
|
|
- const ProcessStatusCorrectiondata = await ProcessStatusCorrection({workOrder:workOrder});
|
|
|
|
|
- gxztgzztableData.value = ProcessStatusCorrectiondata.data;
|
|
|
|
|
-};
|
|
|
|
|
-//工序状态更正更新
|
|
|
|
|
-const edit_gxztgzzCancel = async () => {
|
|
|
|
|
- const formatDate = (inputDateString) => {
|
|
|
|
|
- const timestamp = Date.parse(inputDateString);
|
|
|
|
|
- if (isNaN(timestamp)) {
|
|
|
|
|
- return ''; // 返回空字符串表示日期无效
|
|
|
|
|
- }
|
|
|
|
|
- const date = new Date(timestamp);
|
|
|
|
|
- const year = date.getFullYear();
|
|
|
|
|
- const month = ('0' + (date.getMonth() + 1)).slice(-2);
|
|
|
|
|
- const day = ('0' + date.getDate()).slice(-2);
|
|
|
|
|
- const hour = ('0' + date.getHours()).slice(-2);
|
|
|
|
|
- const minute = ('0' + date.getMinutes()).slice(-2);
|
|
|
|
|
- const second = ('0' + date.getSeconds()).slice(-2);
|
|
|
|
|
- return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
|
|
|
|
- };
|
|
|
|
|
- const formattedData = gxztgzztableData.value.map(item => {
|
|
|
|
|
- return {
|
|
|
|
|
- UniqId: item['UniqId'],
|
|
|
|
|
- PD_WG: formatDate(item['完工时间']),
|
|
|
|
|
- };
|
|
|
|
|
- });
|
|
|
|
|
- const ProcessStatusCorrectionEdit_status = await ProcessStatusCorrectionEdit(formattedData);
|
|
|
|
|
- if (ProcessStatusCorrectionEdit_status.code === 0) {
|
|
|
|
|
- ElMessage({ type: 'success',message: '更新成功' })
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({type: 'error',message: '更新失败'})
|
|
|
|
|
- }
|
|
|
|
|
- gxztgzzlist.value = false;
|
|
|
|
|
-};
|
|
|
|
|
-//工序状态更正退出
|
|
|
|
|
-const gxztgzzCancel = () => {
|
|
|
|
|
- gxztgzzlist.value = false;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-//机组调整按钮
|
|
|
|
|
-const jizuDisplay = ref(false)
|
|
|
|
|
-const jizuList = ref([])
|
|
|
|
|
-const jizuSelection = ref([])
|
|
|
|
|
-const onjztzClick = async () => {
|
|
|
|
|
- if (jitaiArr.value.length === 0) {
|
|
|
|
|
- ElMessage.warning('请选择数据')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- jizuList.value = [
|
|
|
|
|
- {
|
|
|
|
|
- label: jitaiArr.value[0].车间名称,
|
|
|
|
|
- value: jitaiArr.value[0].车间名称,
|
|
|
|
|
- disabled: true,
|
|
|
|
|
- children: []
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
- const res = await gdzl_MachineList({address:jitaiArr.value[0].车间名称})
|
|
|
|
|
- jizuList.value[0].children = res.data.map(item => {
|
|
|
|
|
- return { label: item, value: item.match(/^\w+#/)[0]}
|
|
|
|
|
- })
|
|
|
|
|
- jizuDisplay.value = true
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-const checkTreeHandle = (data, tree) => {
|
|
|
|
|
- jizuSelection.value = tree.checkedNodes
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const saveJizuTiaozheng = async () => {
|
|
|
|
|
- if (jizuSelection.value.length === 0) {
|
|
|
|
|
- ElMessage.warning('请先勾选机组')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- const uid = jitaiArr.value.map(item => item.GYUID).join(' ')
|
|
|
|
|
- const jizu = jizuSelection.value.map(item=>item.value).join(' ')
|
|
|
|
|
- try {
|
|
|
|
|
- const res = await MachineTeamEdit({UniqId: uid, machine: jizu})
|
|
|
|
|
- if (res.code == 0) ElMessage.success('调整成功')
|
|
|
|
|
- const pc_zc_table = await MachineWorkOrderList({machine:_machine.value});
|
|
|
|
|
- chejianData.value = pc_zc_table.data['排程'];
|
|
|
|
|
- chejianfuData.value = pc_zc_table.data['制程'];
|
|
|
|
|
- jizuDisplay.value = false
|
|
|
|
|
- } catch(e) {
|
|
|
|
|
- ElMessage.error(e)
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//=============引用实际参数================
|
|
|
|
|
-const pd_yysjcsonClick = () => {
|
|
|
|
|
- if(_Gd_gdbh.value == null){
|
|
|
|
|
- gxztgzzlist.value = false;
|
|
|
|
|
- ElMessage({type: 'warning',message: '请选择树形后,再操作此功能'})
|
|
|
|
|
- }else{
|
|
|
|
|
- console.log(_Gd_gdbh.value)
|
|
|
|
|
- ElMessage({type: 'warning',message: '没有找到该产品的入仓完工记录,不能继续进行'})
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-//=============车间设备排程================
|
|
|
|
|
-const paichengColumns = ref(
|
|
|
|
|
- [
|
|
|
|
|
- { label: '优先次序', prop: '优先次序', width: '105' },
|
|
|
|
|
- { label: '工单编号', prop: '工单编号', width: '100' },
|
|
|
|
|
- // { label: '印件名称', prop: '印件名称', width: '200' },
|
|
|
|
|
- { label: '接货数', prop: '计划接货数', width: '90' },
|
|
|
|
|
- { label: '已完成', prop: '已完成', width: '90' },
|
|
|
|
|
- { label: '小时产能', prop: '小时产能', width: '100' },
|
|
|
|
|
- { label: '生产工时', prop: '生产工时', width: '100' },
|
|
|
|
|
- { label: '辅助工时', prop: '辅助工时', width: '100' },
|
|
|
|
|
- { label: '班次安排', prop: '班次安排', width: '100' },
|
|
|
|
|
- { label: '排单备注', prop: '排单备注', width: '150' },
|
|
|
|
|
- { label: '最早开工时间', prop: '最早开工时间', width: '180' },
|
|
|
|
|
- { label: '计划开工时间', prop: '计划开工时间', width: '180' },
|
|
|
|
|
- { label: '计划完工时间', prop: '计划完工时间', width: '180' },
|
|
|
|
|
- { label: '销售订单号', prop: '销售订单号', width: '120' },
|
|
|
|
|
- { label: '印件/工序', prop: '印件/工序', width: '110' },
|
|
|
|
|
- ])
|
|
|
|
|
-
|
|
|
|
|
-const handleDataSortAndSettingDate = () => {
|
|
|
|
|
- paichengData.value.sort((a, b) => {
|
|
|
|
|
- const priorityA = parseFloat(a['优先次序']);
|
|
|
|
|
- const priorityB = parseFloat(b['优先次序']);
|
|
|
|
|
- // 将空白值放在最后
|
|
|
|
|
- if (isNaN(priorityA)) return 1;
|
|
|
|
|
- if (isNaN(priorityB)) return -1;
|
|
|
|
|
- // 按优先次序升序排序
|
|
|
|
|
- return priorityA - priorityB;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- paichengData.value.map((item, index) => {
|
|
|
|
|
- console.log(Math.round(((item['计划接货数'] ?? 0) - Number(item['已完成'] ?? 0)) / item['小时产能']).toFixed(1))
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- if(item['小时产能'] !== '' && item['小时产能'] !== 0){
|
|
|
|
|
- item['生产工时'] = Math.round(((item['计划接货数'] ?? 0) - Number(item['已完成'] ?? 0)) / item['小时产能']).toFixed(1);
|
|
|
|
|
- }
|
|
|
|
|
- if(item['生产工时'] === 'Infinity' || item['生产工时'] === '-Infinity'){
|
|
|
|
|
- item['生产工时'] = 0;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- let hour = parseFloat(item['生产工时']) + parseFloat(item['辅助工时'])
|
|
|
|
|
- if ( ((Math.floor(hour) * 10) % 10) !== 5) {
|
|
|
|
|
- hour = Math.round(hour)
|
|
|
|
|
- }
|
|
|
|
|
- const sec = hour * 3600
|
|
|
|
|
- const startTime = dayjs(item['计划开工时间']).unix()
|
|
|
|
|
- item['计划完工时间'] = dayjs((startTime + sec) * 1000).format('YYYY-MM-DD HH:mm:ss')
|
|
|
|
|
- if (index > 0) {
|
|
|
|
|
- item['计划开工时间'] = paichengData.value[index-1]['计划完工时间']
|
|
|
|
|
- hour = parseFloat(item['生产工时']) + parseFloat(item['辅助工时'])
|
|
|
|
|
- if ( ((Math.floor(hour) * 10) % 10) !== 5) {
|
|
|
|
|
- hour = Math.round(hour)
|
|
|
|
|
- }
|
|
|
|
|
- const sec = hour * 3600
|
|
|
|
|
- const startTime = dayjs(item['计划开工时间']).unix()
|
|
|
|
|
- item['计划完工时间'] = dayjs((startTime + sec) * 1000).format('YYYY-MM-DD HH:mm:ss')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const handleBlur = (name, item) => {
|
|
|
|
|
- console.log(name)
|
|
|
|
|
- console.log(item)
|
|
|
|
|
- if (name === '优先次序' || name === '计划开工时间' || name === '生产工时' || name === '辅助工时' || name === '最早开工时间') {
|
|
|
|
|
- handleDataSortAndSettingDate()
|
|
|
|
|
- }
|
|
|
|
|
- if (name === '小时产能') {
|
|
|
|
|
- // console.log(item)
|
|
|
|
|
- // item['生产工时'] = Math.round( ( (item['计划接货数'] ?? 0) - Number(item['已完成'] ?? 0) ) / item['小时产能'] ).toFixed(1)
|
|
|
|
|
- // console.log(item['计划接货数'])
|
|
|
|
|
- // console.log(item['已完成'])
|
|
|
|
|
- // console.log(item['生产工时'])
|
|
|
|
|
- handleDataSortAndSettingDate()
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-const handleKeyDown = (event, x, y, prop) => {
|
|
|
|
|
- const currentElement = document.getElementById(`input${x}${y}`);
|
|
|
|
|
- if (currentElement === null && currentElement === undefined) return
|
|
|
|
|
- let move = 0
|
|
|
|
|
- switch (event.keyCode) {
|
|
|
|
|
- case 13: // Enter
|
|
|
|
|
- if (x === 0 && y === +y) {
|
|
|
|
|
- handleDataSortAndSettingDate()
|
|
|
|
|
- }
|
|
|
|
|
- const nextInputElement = document.getElementById(`input${x}${y + 1}`);
|
|
|
|
|
- if (nextInputElement) {
|
|
|
|
|
- nextInputElement.focus();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- case 40: // 向下箭头
|
|
|
|
|
- if (y < paichengData.value.length ){
|
|
|
|
|
- const nextInputElement = document.getElementById(`input${x}${y + 1}`);
|
|
|
|
|
- if (nextInputElement) {
|
|
|
|
|
- nextInputElement.focus();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- case 38: // 向上箭头
|
|
|
|
|
- if ( y > 0) {
|
|
|
|
|
- document.getElementById(`input${x}${y - 1}`).focus();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- case 39: // 向右箭头
|
|
|
|
|
- if ( x === 0) {
|
|
|
|
|
- move = x + 5
|
|
|
|
|
- } else if (x >= 5 && x <=10) {
|
|
|
|
|
- move = x + 1
|
|
|
|
|
- }
|
|
|
|
|
- const nextInputElements = document.getElementById(`input${move}${y}`);
|
|
|
|
|
- if (nextInputElements) {
|
|
|
|
|
- nextInputElements.focus();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- case 37: // 向左箭头
|
|
|
|
|
- if ( x === 5) {
|
|
|
|
|
- move = x - 5
|
|
|
|
|
- } else if (x >= 5 && x <=10) {
|
|
|
|
|
- move = x - 1
|
|
|
|
|
- }
|
|
|
|
|
- document.getElementById(`input${move}${y}`).focus();
|
|
|
|
|
- break;
|
|
|
|
|
- default:
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-const cjsbpclist = ref(false);
|
|
|
|
|
-const cjsbpcformData = reactive({
|
|
|
|
|
- //设备代号
|
|
|
|
|
- sbdh: '',
|
|
|
|
|
- // 下拉框选项数据
|
|
|
|
|
- bancis: [],
|
|
|
|
|
- // 设置默认值
|
|
|
|
|
- banci: '',
|
|
|
|
|
- isBanciSelected: false,
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-//订单打印
|
|
|
|
|
-const pd_gdprintonClick = () => {
|
|
|
|
|
- printPageRef.value.open(_Gd_gdbh.value)
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//车间设备排程【按钮】
|
|
|
|
|
-const oncjsbpcClick = async () => {
|
|
|
|
|
- cjsbpcformData['sbdh'] = _machine.value;
|
|
|
|
|
- paichengData.value = [];
|
|
|
|
|
- _EquipmentSchedulingdata();
|
|
|
|
|
- _ScheduleSelectiondata();
|
|
|
|
|
-
|
|
|
|
|
- cjsbpclist.value = true;
|
|
|
|
|
-};
|
|
|
|
|
-//调用班次选择列表接口
|
|
|
|
|
-const _ScheduleSelectiondata = async ()=>{
|
|
|
|
|
- try {
|
|
|
|
|
- const ScheduleSelectiondata = await ScheduleSelection();
|
|
|
|
|
- // 清空之前的数据
|
|
|
|
|
- cjsbpcformData.bancis = [];
|
|
|
|
|
- // 循环遍历数组并将每个班次的detail添加到bancis数组中
|
|
|
|
|
- for (const option of ScheduleSelectiondata.data) {
|
|
|
|
|
- cjsbpcformData.bancis.push({ label: option.detail, value: option.detail.split('||')[0], rename:option.detail});
|
|
|
|
|
- }
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error(error);
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-//车间设备排程->数据展示
|
|
|
|
|
-const paichengData = ref([])
|
|
|
|
|
-//点击车间排程行
|
|
|
|
|
-const _bcxz_val = ref(null)
|
|
|
|
|
-
|
|
|
|
|
-//点击表格行的时候触发的方法
|
|
|
|
|
-const cjpc_tableRowClick = (row) => {
|
|
|
|
|
- _bcxz_val.value = row; // 保存点击的行数据
|
|
|
|
|
-}
|
|
|
|
|
-//班次选择列表下拉框
|
|
|
|
|
-const setBanci = (v) => {
|
|
|
|
|
- if(cjsbpcformData['isBanciSelected'] === true){
|
|
|
|
|
- paichengData.value.map( item => item.班次安排 = v)
|
|
|
|
|
- }else{
|
|
|
|
|
- if (_bcxz_val.value) {
|
|
|
|
|
- _bcxz_val.value['班次安排'] = v;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-const _EquipmentSchedulingdata = async ()=>{
|
|
|
|
|
- // let machine = 'WY01#';
|
|
|
|
|
- let machine = _machine.value;
|
|
|
|
|
- try {
|
|
|
|
|
- const EquipmentSchedulingdata = await EquipmentScheduling({machine:machine});
|
|
|
|
|
- console.log(EquipmentSchedulingdata)
|
|
|
|
|
- if (EquipmentSchedulingdata.code === 0) {
|
|
|
|
|
- paichengData.value = EquipmentSchedulingdata.data
|
|
|
|
|
- paichengData.value.map((item, index) => {
|
|
|
|
|
- item['优先次序'] = 50 + index
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- handleDataSortAndSettingDate()
|
|
|
|
|
- }
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error(error);
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-//车间设备制程->数据编辑
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-//车间设备制程【更新排程】
|
|
|
|
|
-const oneditpcClick = async () => {
|
|
|
|
|
- const rawValueArray = paichengData._rawValue;
|
|
|
|
|
- const formattedData = rawValueArray.map(item => {
|
|
|
|
|
- return {
|
|
|
|
|
- capacity: item.小时产能,
|
|
|
|
|
- ProductionHours: item.生产工时,
|
|
|
|
|
- AuxiliaryHours: item.辅助工时,
|
|
|
|
|
- shift: item.班次安排,
|
|
|
|
|
- remark: item.排单备注,
|
|
|
|
|
- start: item.最早开工时间,
|
|
|
|
|
- projectTime: item.计划开工时间,
|
|
|
|
|
- endTime: item.计划完工时间,
|
|
|
|
|
- UniqId: item.UniqId
|
|
|
|
|
- };
|
|
|
|
|
- });
|
|
|
|
|
- console.log(formattedData);
|
|
|
|
|
- const EquipmentSchedulingEdit_edit = await EquipmentSchedulingEdit(formattedData);
|
|
|
|
|
- // console.log(EquipmentSchedulingEdit_edit)
|
|
|
|
|
- if (EquipmentSchedulingEdit_edit.code === 0) {
|
|
|
|
|
- ElMessage({ type: 'success', message: '更新成功' });
|
|
|
|
|
- console.log(_machine.value)
|
|
|
|
|
- const zhubiao = await MachineWorkOrderList({ machine:_machine.value})
|
|
|
|
|
- chejianData.value = zhubiao.data['排程'];
|
|
|
|
|
- chejianfuData.value = zhubiao.data['制程'];
|
|
|
|
|
- cjsbpclist.value = false;
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({ type: 'error', message: '更新失败' });
|
|
|
|
|
- }
|
|
|
|
|
- // cjsbpclist.value = true;
|
|
|
|
|
-};
|
|
|
|
|
-//车间设备制程【退出】
|
|
|
|
|
-const cjsbpcCancel = () => {
|
|
|
|
|
- cjsbpclist.value = false;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-// =========== 流程单查询 ===========
|
|
|
|
|
-
|
|
|
|
|
-const pd_lcdlist = ref(false);
|
|
|
|
|
-const pd_lcdformData = reactive({
|
|
|
|
|
- gdbh: '',
|
|
|
|
|
- code: '',
|
|
|
|
|
- name: '',
|
|
|
|
|
- yjno: '',
|
|
|
|
|
-});
|
|
|
|
|
-// 流程单查询按钮
|
|
|
|
|
-const processList = ref([]);
|
|
|
|
|
-const pd_lcdlistonClick = async () => {
|
|
|
|
|
- if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
|
|
|
|
|
- ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }else{
|
|
|
|
|
- pd_lcdformData['gdbh'] = _Gd_gdbh.value;
|
|
|
|
|
- pd_lcdformData['yjno'] = _Gd_yjno.value;
|
|
|
|
|
- pd_lcdlist.value = true;
|
|
|
|
|
- processList.value = []
|
|
|
|
|
- _getOrderProcessLeft_list();
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-const pd_lcdProductValue = async () => {
|
|
|
|
|
- _getOrderProcessLeft_list();
|
|
|
|
|
-}
|
|
|
|
|
-const pd_lcd_treeData = ref([]);
|
|
|
|
|
-const _getOrderProcessLeft_list = async () => {
|
|
|
|
|
- const order = pd_lcdformData['gdbh'];
|
|
|
|
|
- const yjno = pd_lcdformData['yjno']
|
|
|
|
|
- // console.log(order)
|
|
|
|
|
- try {
|
|
|
|
|
- //5.1流程单查询-工单工序生产进程菜单栏
|
|
|
|
|
- const getOrderProcessLeft_list = await getOrderProcessLeft({ order:order,yjno:yjno});
|
|
|
|
|
- console.log(getOrderProcessLeft_list)
|
|
|
|
|
- pd_lcdformData['code'] = getOrderProcessLeft_list.data.Gd_info['code'];
|
|
|
|
|
- pd_lcdformData['name'] = getOrderProcessLeft_list.data.Gd_info['name'];
|
|
|
|
|
- pd_lcd_treeData.value = [{
|
|
|
|
|
- label: order + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
|
|
|
|
|
- // label: order + '-' + getOrderProcessLeft_list.data.Gd_info['code'] + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
|
|
|
|
|
- value: undefined,
|
|
|
|
|
- children: []
|
|
|
|
|
- }]
|
|
|
|
|
- const newData = [];
|
|
|
|
|
- for (let key in getOrderProcessLeft_list.data.Gy_info) {
|
|
|
|
|
- let temp = getOrderProcessLeft_list.data.Gy_info[key];
|
|
|
|
|
- let concatenatedValue = `${temp.Gy0_yjno}-${temp.Gy0_gxh} ---> ${temp.Gy0_gxmc}`;
|
|
|
|
|
- newData.push({ label: concatenatedValue,value: temp.Gy0_gxh });
|
|
|
|
|
- }
|
|
|
|
|
- pd_lcd_treeData.value[0].children = newData;
|
|
|
|
|
- //5.2流程单查询-获取工单工序生产进程右侧【进入页面默认显示第一个】
|
|
|
|
|
- const getOrderProcessRight_list = await getOrderProcessRight({order:order, gxNo:newData[0].value,yjno:yjno});
|
|
|
|
|
- processList.value = getOrderProcessRight_list.data
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error(error);
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-const pd_lcd_handleNodeClick = async (node) => {
|
|
|
|
|
- if (node.value === undefined) return
|
|
|
|
|
- const order = pd_lcdformData['gdbh'];
|
|
|
|
|
- const yjno = pd_lcdformData['yjno'];
|
|
|
|
|
- ////5.2流程单查询-获取工单工序生产进程右侧
|
|
|
|
|
- const getOrderProcessRight_list = await getOrderProcessRight({order:order, gxNo:node.value,yjno:yjno});
|
|
|
|
|
- console.log(getOrderProcessRight_list)
|
|
|
|
|
- processList.value = getOrderProcessRight_list.data
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 流程单查询退出
|
|
|
|
|
-const pd_lcdCancel = async () => {
|
|
|
|
|
- pd_lcdlist.value = false;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-//颜色
|
|
|
|
|
-//工序状态更正颜色
|
|
|
|
|
-const gxztgzzCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
|
|
- if(row['完工时间'] === ''){
|
|
|
|
|
- return 'lan-plan-usage-low';
|
|
|
|
|
- }else{
|
|
|
|
|
- return 'hui-plan-usage-low';
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-//车间设备制程排序背景
|
|
|
|
|
-const cjzcCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
|
|
- if (column.label === '小时产能' || column.label === '优先次序' || column.label === '生产工时' || column.label === '辅助工时' || column.label === '班次安排' || column.label === '排单备注' || column.label === '最早开工时间' || column.label === '计划开工时间') {
|
|
|
|
|
- return 'background-color-column-fen';
|
|
|
|
|
- }
|
|
|
|
|
- if (row) {
|
|
|
|
|
- return 'color-column-lan';
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//排程中、制程中 下方表格文字变色
|
|
|
|
|
-const pczc_planUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
|
|
- if (row['工序完工'].substring(0, 2) === "20") {
|
|
|
|
|
- return 'pczccolor-column-hui';
|
|
|
|
|
- } else {
|
|
|
|
|
- return 'pczccolor-column-lan';
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-// 右键勾选
|
|
|
|
|
-const rowContextMenu = (row) => {
|
|
|
|
|
- // console.log(row)
|
|
|
|
|
-
|
|
|
|
|
- return false
|
|
|
|
|
-}
|
|
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
/* 选中某行背景粉色 */
|
|
/* 选中某行背景粉色 */
|