|
|
@@ -6,23 +6,32 @@
|
|
|
<!-- 按钮部分-->
|
|
|
<el-form ref="elSearchFormRef" :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
|
|
|
<el-form-item>
|
|
|
- <!--按钮-->
|
|
|
- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 180px;"></el-input>
|
|
|
+ <!--按钮 clearable-->
|
|
|
+ <el-input v-model="searchInfo" placeholder="搜索工单编号" style="width: 180px;"></el-input>
|
|
|
<el-button type="primary" icon="search" @click="onSubmit"></el-button>
|
|
|
+ <el-button type="primary" icon="edit" @click="onStatusClick" class="bt">工单状态设置</el-button>
|
|
|
+
|
|
|
<div v-if="treeType === 'customTree'">
|
|
|
- <el-button type="primary" icon="edit" @click="onStatusClick" class="bt">状态设置</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="ongxztgzClick" class="bt">工序状态更正</el-button>
|
|
|
+ <el-button type="primary" icon="edit" disabled @click="pd_yysjcsonClick" class="bt">引用实际参数</el-button>
|
|
|
+ <el-button type="primary" icon="edit" disabled @click="pd_pccswhonClick" class="bt">排程参数维护</el-button>
|
|
|
+ <el-button type="primary" icon="edit" disabled @click="pd_pdcsfzonClick" class="bt">排单参数复制</el-button>
|
|
|
+ <el-button type="primary" icon="edit" disabled @click="pd_editscjhonClick" class="bt">编辑生产计划</el-button>
|
|
|
</div>
|
|
|
+
|
|
|
<div v-else>
|
|
|
<el-button type="primary" icon="edit" @click="onjrpcClick" class="bt">加入排产</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="onztwgClick" class="bt">暂停排产</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="ongxwgClick" class="bt">工序完工</el-button>
|
|
|
- <!-- <el-button type="primary" icon="edit" disabled @click="onjztzClick" style="margin: 5px">机组调整</el-button>-->
|
|
|
- <!-- <el-button type="primary" icon="edit" disabled @click="oncjsbpcClick" style="margin: 5px">车间设备排程</el-button>-->
|
|
|
+ <el-button type="primary" icon="edit" @click="ongxztgzClick" class="bt">工序状态更正</el-button>
|
|
|
+ <el-button type="primary" icon="edit" disabled @click="onjztzClick" style="margin: 5px">机组调整</el-button>
|
|
|
+ <el-button type="primary" icon="edit" @click="oncjsbpcClick" style="margin: 5px">车间设备排程</el-button>
|
|
|
</div>
|
|
|
- <!-- <el-button type="primary" icon="edit" disabled @click="onprintClick" style="margin: 5px">工单打印</el-button>-->
|
|
|
- <!-- <el-button type="primary" icon="edit" disabled @click="ongxclhcClick" style="margin: 5px">工序产量核查</el-button>-->
|
|
|
- <!-- <el-button type="primary" icon="edit" disabled @click="onlcdlistClick" style="margin: 5px">流程单查询</el-button>-->
|
|
|
+
|
|
|
+ <el-button type="primary" icon="edit" disabled @click="pd_gdprintonClick" class="bt">工单打印</el-button>
|
|
|
+ <el-button type="primary" icon="edit" disabled @click="pd_gxclhconClick" class="bt">工序产量核查</el-button>
|
|
|
+ <el-button type="primary" icon="edit" disabled @click="pd_lcdlistonClick" class="bt">流程单查询</el-button>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -52,118 +61,100 @@
|
|
|
<el-dialog v-model="gxztgzzlist" title="工序状态更正" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
|
|
|
<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: 500px;"/>
|
|
|
+ <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="multipleTable"
|
|
|
+ <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: 710px" border tooltip-effect="dark"
|
|
|
- :data="gxztgzztableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column v-slot="scope" align="left" label=印件及工序 width="600" >
|
|
|
- <el-input disabled v-model="scope.row.印件及工序" :clearable="false"/>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column v-slot="scope" align="left" label=计划产量/已完成 width="590" >
|
|
|
- <el-input disabled v-model="scope.row['计划产量/已完成']" :clearable="false"/>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column v-slot="scope" align="left" label=完成率 width="240" >
|
|
|
- <el-input disabled v-model="scope.row.完成率" :clearable="false"/>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column v-slot="scope" align="left" label=完工时间 width="210" >
|
|
|
- <el-input disabled v-model="scope.row.完工时间" :clearable="false"/>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column v-slot="scope" align="left" label=设备代号 width="240" >
|
|
|
- <el-input disabled v-model="scope.row.设备代号" :clearable="false"/>
|
|
|
- </el-table-column>
|
|
|
+ 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="cjsbpclist" title="车间设备排程" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
|
|
|
- <el-button type="" icon="edit" @click="oneditpcClick">更新排程</el-button>
|
|
|
<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="请选择" allow-create filterable>
|
|
|
+ <el-select v-model="cjsbpcformData.banci" placeholder="请选择" allow-create filterable @change="setBanci">
|
|
|
<el-option
|
|
|
v-for="(option, index) in cjsbpcformData.bancis"
|
|
|
:key="index"
|
|
|
- :label="option.label"
|
|
|
+ :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-button type="" icon="edit" disabled @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"
|
|
|
- :data="paichengData" row-key="ID" >
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=优先次序 width="120" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.优先次序" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=工单编号 width="200" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.工单编号" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=印件名称 width="220" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.印件名称" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=接货数 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.接货数" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=小时产能 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.小时产能" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=产能系数 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.产能系数" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=生产工时 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.生产工时" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=生产工时 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.生产工时" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=辅助工时 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.辅助工时" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=班次安排 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.班次安排" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=排单备注 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.排单备注" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=最早开工时间 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.最早开工时间" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=计划开工时间 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.计划开工时间" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=计划完工时间 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.计划完工时间" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=销售订单号 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.销售订单号" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- <!-- <el-table-column v-slot="scope" align="left" label=印件/工序 width="110" >-->
|
|
|
- <!-- <el-input disabled v-model="scope.row.印件/工序" :clearable="false"/>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
+ :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"
|
|
|
+ highlight-current-row="true"
|
|
|
+ @row-click="cjpc_tableRowClick"
|
|
|
+ :data="paichengData" row-key="ID"
|
|
|
+ >
|
|
|
+ <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]" :clearable="false"
|
|
|
+ :id="`input${idx}${$index}`"
|
|
|
+ @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>
|
|
|
|
|
|
@@ -183,9 +174,9 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
</el-dialog>
|
|
|
|
|
|
+
|
|
|
</div>
|
|
|
</layout-header>
|
|
|
|
|
|
@@ -609,11 +600,14 @@ const workbenchdata = async () => {
|
|
|
workbenchdata();
|
|
|
//全局获取工单编号
|
|
|
const _Gd_gdbh = ref(null)
|
|
|
-//点击表格 通过【工单编号】获取下方表格数据
|
|
|
+//点击表格 通过上方表格【工单编号】获取下方表格数据
|
|
|
+const chejianRowClick = async (row) => {
|
|
|
+ _Gd_gdbh.value = row.工单编号;
|
|
|
+ console.log(_Gd_gdbh.value);
|
|
|
+}
|
|
|
const gdtableRowClick = async (row) => {
|
|
|
_Gd_gdbh.value = row.工单编号;
|
|
|
console.log(_Gd_gdbh.value);
|
|
|
-
|
|
|
if (currentNode.value == "计划中") {
|
|
|
if(row['statusColumn'] === "*"){
|
|
|
gytableData.value = [];
|
|
|
@@ -676,32 +670,56 @@ const handleNodeClick = async (node) => {
|
|
|
const searchInfo = ref('');
|
|
|
// 提交搜索
|
|
|
const onSubmit = () => {
|
|
|
- console.log(searchInfo.value)
|
|
|
- console.log(currentNode.value)
|
|
|
- console.log(_machine.value)
|
|
|
- if(searchInfo.value === '' || searchInfo.value === null ){
|
|
|
- ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
|
|
|
+ if (!searchInfo.value || !_machine.value) {
|
|
|
+ ElMessage({ type: 'warning', message: '请输入工单编号和具体条件' });
|
|
|
return false;
|
|
|
}
|
|
|
- if(currentNode.value === '计划中' || currentNode.value === '已完工'){
|
|
|
- _Project();
|
|
|
+ const isPureNumber = /^\d+$/.test(searchInfo.value);
|
|
|
+ if (!isPureNumber) {
|
|
|
+ ElMessage({ type: 'warning', message: '请输入正确的工单编号' });
|
|
|
return false;
|
|
|
}
|
|
|
- if(currentNode.value === '排程中' || currentNode.value === '制程中'){
|
|
|
+ if (currentNode.value === '计划中' || currentNode.value === '已完工') {
|
|
|
+ _Project();
|
|
|
+ } else if (currentNode.value === '排程中' || currentNode.value === '制程中') {
|
|
|
_Schedule();
|
|
|
- return false;
|
|
|
- }
|
|
|
- if(_machine.value){
|
|
|
- console.log(2131211111111111111111111111111)
|
|
|
- _MachineWorkOrderList();
|
|
|
+ } else {
|
|
|
+ ElMessage({ type: 'warning', message: '查询不到具体条件的工单' });
|
|
|
}
|
|
|
};
|
|
|
+// const onSubmit = () => {
|
|
|
+// const isPureNumber = /^[\d]+$/.test(searchInfo.value);
|
|
|
+// if (isPureNumber) {
|
|
|
+// if(_machine.value){
|
|
|
+// _MachineWorkOrderList();
|
|
|
+// }else if(_machine.value === '' || _machine.value === null){
|
|
|
+// ElMessage({type: 'warning',message: '查询不到具体条件的工单'})
|
|
|
+// return false;
|
|
|
+// }else{
|
|
|
+// {
|
|
|
+// if(searchInfo.value === '' || searchInfo.value === null ){
|
|
|
+// ElMessage({type: 'warning',message: '查询不到具体条件的工单'})
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// if(currentNode.value === '计划中' || currentNode.value === '已完工'){
|
|
|
+// _Project();
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// if(currentNode.value === '排程中' || currentNode.value === '制程中'){
|
|
|
+// _Schedule();
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// ElMessage({type: 'warning',message: '请输入正确的工单编号'})
|
|
|
+// }
|
|
|
+// };
|
|
|
// 搜索计划中、已完工一条工单
|
|
|
const _Project = async () => {
|
|
|
const status = currentNode.value;
|
|
|
const search = searchInfo.value;
|
|
|
const Project_search = await Project({status:status,search:search});
|
|
|
- console.log(Project_search);
|
|
|
if(Project_search.msg === '成功'){
|
|
|
tableData.value = Project_search.data;
|
|
|
}else{
|
|
|
@@ -713,10 +731,7 @@ const _Project = async () => {
|
|
|
const _Schedule = async () => {
|
|
|
const status = currentNode.value;
|
|
|
const search = searchInfo.value;
|
|
|
- console.log(status)
|
|
|
- console.log(search)
|
|
|
const Schedule_search = await Schedule({status:status,search:search});
|
|
|
- console.log(Schedule_search);
|
|
|
if(Schedule_search.msg === '成功'){
|
|
|
chejianData.value = Schedule_search.data;
|
|
|
}else{
|
|
|
@@ -726,36 +741,50 @@ const _Schedule = async () => {
|
|
|
};
|
|
|
//机台搜索一条工单
|
|
|
const _MachineWorkOrderList = async () => {
|
|
|
- console.log(123)
|
|
|
- const status = searchInfo.value;
|
|
|
- const search = _machine.value;
|
|
|
-
|
|
|
- const MachineWorkOrderList_search = await MachineWorkOrderList({status:status,search:search});
|
|
|
- console.log(MachineWorkOrderList_search);
|
|
|
- if(MachineWorkOrderList_search.code === 0){
|
|
|
- tableData.value = MachineWorkOrderList_search.data;
|
|
|
- }else{
|
|
|
+ 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{
|
|
|
+ chejianfuData.value = MachineWorkOrderList_search.data['制程'];
|
|
|
+ chejianData.value = MachineWorkOrderList_search.data['排程'];
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-// const paichengForm = ref([])
|
|
|
-// const paichengData = ref([
|
|
|
-// {
|
|
|
-// 优先次序: 1, 工单编号: 1000, 印件名称: 'test',接货数: 111,
|
|
|
-// 小时产能: 1, 产能系数: 1.5, 生产工时: 333, 辅助工时: 222,
|
|
|
-// 班次安排: '1111', 排单备注: '备注备注', 最早开工时间: '2023-01-01 08:08:08',
|
|
|
-// 计划开工时间: '2023-01-01 08:08:08', 计划完工时间: '2023-01-01 08:08:08',
|
|
|
-// 销售订单号: '3335555', '印件/工序': '321312',
|
|
|
-// }
|
|
|
-// ])
|
|
|
-
|
|
|
-
|
|
|
// =========== 【工序状态更正】 ===========
|
|
|
+const gxztgzztableColumns = ref(
|
|
|
+ [
|
|
|
+ { label: '印件及工序', prop: '印件及工序', width: '600' },
|
|
|
+ { label: '计划产量/已完成', prop:['计划产量/已完成'], width: '500' },
|
|
|
+ { label: '完成率', prop: '完成率', width: '240' },
|
|
|
+ { label: '完工时间', prop: '完工时间', width: '300' },
|
|
|
+ { label: '设备代号', prop: '设备代号', width: '240' },
|
|
|
+ ]
|
|
|
+)
|
|
|
+const gxztgzz_handleKeyDown = (event, x, y, prop) => {
|
|
|
+ const currentElement = document.getElementById(`input${x}${y}`);
|
|
|
+ if (currentElement === null && currentElement === undefined) return
|
|
|
+ switch (event.keyCode) {
|
|
|
+ case 13: // Enter
|
|
|
+ case 40: // 向下箭头
|
|
|
+ if (y < gxztgzztableData.value.length )
|
|
|
+ document.getElementById(`input${x}${y + 1}`).focus();
|
|
|
+ break;
|
|
|
+ case 38: // 向上箭头
|
|
|
+ if ( y > 0) {
|
|
|
+ document.getElementById(`input${x}${y - 1}`).focus();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+}
|
|
|
+const gxztgzztableData = ref([]);
|
|
|
const gxztgzzlist = ref(false);
|
|
|
const gxztgzzformData = reactive({gdbh: '',});
|
|
|
-const gxztgzztableData = ref([]);
|
|
|
//工序状态更正【按钮】
|
|
|
const ongxztgzClick = () => {
|
|
|
if(_Gd_gdbh.value == null){
|
|
|
@@ -785,51 +814,62 @@ const gxztgzzCancel = () => {
|
|
|
|
|
|
//加入排产【按钮】
|
|
|
const onjrpcClick = async () => {
|
|
|
+ searchInfo.value = '';
|
|
|
if(_PC_gdbh.value == null || _PC_gdbh.value == ''){
|
|
|
ElMessage({type: 'warning',message: '请选择排程中工单'})
|
|
|
}else{
|
|
|
- let params = {}
|
|
|
- params.workOrder = _PC_gdbh.value;
|
|
|
- params.machine = _machine.value;
|
|
|
- params.printCode = 1;
|
|
|
- params.processCode = 1;
|
|
|
- const ProductionSchedulingAdd_add = await ProductionSchedulingAdd(params);
|
|
|
- if (ProductionSchedulingAdd_add .code === 0) {
|
|
|
- const pc_zc_table = await MachineWorkOrderList({ machine:_machine.value});
|
|
|
- chejianfuData.value = pc_zc_table.data['制程'];
|
|
|
- chejianData.value = pc_zc_table.data['"排程"'];
|
|
|
- ElMessage({type: 'success',message: '加入排产 更新成功'});
|
|
|
- } else {
|
|
|
- ElMessage({ type: 'error',message: '更新失败'})
|
|
|
+ console.log(_PC_xscn.value)
|
|
|
+ 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;
|
|
|
+ console.log(params)
|
|
|
+ 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 = 1;
|
|
|
- params.processCode = 1;
|
|
|
- const ProductionSchedulingAdd_stop = await ProductionSchedulingPause(params);
|
|
|
- console.log(ProductionSchedulingAdd_stop)
|
|
|
- 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: '更新失败'})
|
|
|
- }
|
|
|
+ let params = {}
|
|
|
+ params.workOrder = _ZC_gdbh.value;
|
|
|
+ params.machine = _machine.value;
|
|
|
+ params.printCode = _ZC_yjno.value;
|
|
|
+ params.processCode = _ZC_gxh.value;
|
|
|
+ console.log(params)
|
|
|
+ const ProductionSchedulingAdd_stop = await ProductionSchedulingPause(params);
|
|
|
+ if (ProductionSchedulingAdd_stop.code === 0) {
|
|
|
+ const pc_zc_table = await MachineWorkOrderList({machine:_machine.value});
|
|
|
+ console.log(pc_zc_table)
|
|
|
+ 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({
|
|
|
@@ -839,11 +879,11 @@ const ongxwgClick = async () => {
|
|
|
}else{
|
|
|
let params = {}
|
|
|
params.workOrder = _ZC_gdbh.value;
|
|
|
- params.processCode = _gxh.value;
|
|
|
+ params.processCode = _ZC_gxh.value;
|
|
|
const complete_get = await complete(params);
|
|
|
- if (complete_get .code === 0) {
|
|
|
+ if (complete_get.code === 0) {
|
|
|
const pc_zc_table = await MachineWorkOrderList({ machine:_machine.value});
|
|
|
- chejianData.value = pc_zc_table.data['"排程"'];
|
|
|
+ // chejianData.value = pc_zc_table.data['排程'];
|
|
|
chejianfuData.value = pc_zc_table.data['制程'];
|
|
|
ElMessage({type: 'success',message: '工序完工 更新成功'})
|
|
|
} else {
|
|
|
@@ -852,20 +892,35 @@ const ongxwgClick = async () => {
|
|
|
}
|
|
|
};
|
|
|
//加入排程【上面到下面】
|
|
|
+const _PC_gxh = ref(null)
|
|
|
+const _PC_yjno = ref(null)
|
|
|
const _PC_gdbh = ref(null)
|
|
|
+const _PC_xscn = ref(null)
|
|
|
const PC_handleChange = (arr) => {
|
|
|
+ let gxh = arr.map((val) => val['gxh']).join(",");
|
|
|
+ let yjno = arr.map((val) => val['yjno']).join(",");
|
|
|
let str = arr.map((val) => val['工单编号']).join(",");
|
|
|
+ let xscn = arr.map((val) => val['小时产能']).join(",");
|
|
|
+ _PC_gxh.value = gxh;
|
|
|
+ _PC_yjno.value = yjno;
|
|
|
_PC_gdbh.value = str;
|
|
|
+ _PC_xscn.value = xscn;
|
|
|
}
|
|
|
//加入制程【下面到上面】
|
|
|
+const _ZC_gxh = ref(null)
|
|
|
+const _ZC_yjno = ref(null)
|
|
|
const _ZC_gdbh = ref(null)
|
|
|
-const _gxh = ref(null)
|
|
|
+const _ZC_xscn = ref(null)
|
|
|
const ZP_handleChange = (arr) => {
|
|
|
console.log(arr)
|
|
|
- let str = arr.map((val) => val['工单编号']).join(",");
|
|
|
let gxh = arr.map((val) => val['gxh']).join(",");
|
|
|
+ let yjno = arr.map((val) => val['yjno']).join(",");
|
|
|
+ let str = arr.map((val) => val['工单编号']).join(",");
|
|
|
+ let xscn = arr.map((val) => val['小时产能']).join(",");
|
|
|
+ _ZC_gxh.value = gxh;
|
|
|
+ _ZC_yjno.value = yjno;
|
|
|
_ZC_gdbh.value = str;
|
|
|
- _gxh.value = gxh;
|
|
|
+ _ZC_xscn.value = xscn;
|
|
|
}
|
|
|
|
|
|
//机组调整【按钮】
|
|
|
@@ -899,6 +954,61 @@ const gxclhcProductValue = () => {
|
|
|
_ongetProductclick();
|
|
|
}
|
|
|
|
|
|
+const paichengColumns = ref(
|
|
|
+ [
|
|
|
+ { label: '优先次序', prop: '优先次序', width: '120' },
|
|
|
+ { label: '工单编号', prop: '工单编号', width: '200' },
|
|
|
+ { label: '印件名称', prop: '印件名称', width: '220' },
|
|
|
+ { label: '接货数', prop: '接货数', width: '110' },
|
|
|
+ { label: '小时产能', prop: '小时产能', width: '110' },
|
|
|
+ { label: '生产工时', prop: '生产工时', width: '110' },
|
|
|
+ { label: '辅助工时', prop: '辅助工时', width: '110' },
|
|
|
+ { label: '班次安排', prop: '班次安排', width: '110' },
|
|
|
+ { label: '排单备注', prop: '排单备注', width: '110' },
|
|
|
+ { label: '最早开工时间', prop: '最早开工时间', width: '200' },
|
|
|
+ { label: '计划开工时间', prop: '计划开工时间', width: '200' },
|
|
|
+ { label: '计划完工时间', prop: '计划完工时间', width: '200' },
|
|
|
+ { label: '销售订单号', prop: '销售订单号', width: '120' },
|
|
|
+ { label: '印件/工序', prop: '印件/工序', width: '120' },
|
|
|
+ ]
|
|
|
+)
|
|
|
+
|
|
|
+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
|
|
|
+ case 40: // 向下箭头
|
|
|
+ if (y < paichengData.value.length ){
|
|
|
+ document.getElementById(`input${x}${y + 1}`).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
|
|
|
+ }
|
|
|
+ document.getElementById(`input${move}${y}`).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;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
|
|
|
//工序产量核查【退出】
|
|
|
@@ -917,9 +1027,9 @@ const onlcdlistClick = async () => {
|
|
|
//状态设置【按钮】
|
|
|
const onstatuslist = ref(false);
|
|
|
const statusformData = reactive({gdbh: '',});
|
|
|
-const status = ref('计划中'); // 默认选择在产
|
|
|
+const status = ref('计划中'); // 默认选择
|
|
|
const onStatusClick = () => {
|
|
|
- if(_Gd_gdbh.value == null){
|
|
|
+ if(_Gd_gdbh.value === null || _Gd_gdbh.value === ''){
|
|
|
onstatuslist.value = false;
|
|
|
ElMessage({
|
|
|
type: 'warning',
|
|
|
@@ -1000,6 +1110,7 @@ const multipleSelection = ref([])
|
|
|
// 多选
|
|
|
const handleSelectionChange = (val) => {
|
|
|
multipleSelection.value = val
|
|
|
+ console.log(multipleSelection.value)
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1024,6 +1135,9 @@ const enterDialog = async () => {
|
|
|
const closeDialog = () => {dialogFormVisible.value = false}
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+//=============车间设备排程================
|
|
|
const cjsbpclist = ref(false);
|
|
|
const cjsbpcformData = reactive({
|
|
|
//设备代号
|
|
|
@@ -1034,37 +1148,58 @@ const cjsbpcformData = reactive({
|
|
|
banci: '',
|
|
|
isBanciSelected: false,
|
|
|
});
|
|
|
-
|
|
|
-//=============车间设备排程================
|
|
|
//车间设备排程【按钮】
|
|
|
const oncjsbpcClick = () => {
|
|
|
- cjsbpcformData['sbdh'] = 'WY01#';
|
|
|
+ cjsbpcformData['sbdh'] = _machine.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});
|
|
|
}
|
|
|
- console.log("赋值后的数据:", cjsbpcformData.bancis);
|
|
|
+ //班次列表数据
|
|
|
+ // console.log("赋值后的数据:", cjsbpcformData.bancis);
|
|
|
} 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){
|
|
|
+ console.log("已选择所有班次")
|
|
|
+ paichengData.value.map( item => item.班次安排 = v)
|
|
|
+ }else{
|
|
|
+ console.log("未选择所有班次")
|
|
|
+ if (_bcxz_val.value) {
|
|
|
+ _bcxz_val.value['班次安排'] = v;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
const _EquipmentSchedulingdata = async ()=>{
|
|
|
- let machine = 'WY01#';
|
|
|
+ // 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
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
console.error(error);
|
|
|
}
|
|
|
@@ -1073,9 +1208,25 @@ const _EquipmentSchedulingdata = async ()=>{
|
|
|
|
|
|
|
|
|
//车间设备排程【更新排程】
|
|
|
-const oneditpcClick = () => {
|
|
|
- console.log("更新排程")
|
|
|
- cjsbpclist.value = true;
|
|
|
+const oneditpcClick = async () => {
|
|
|
+ // console.log(paichengData)
|
|
|
+ const rawValueArray = paichengData._rawValue;
|
|
|
+ const formattedData = rawValueArray.map(item => {
|
|
|
+ return {
|
|
|
+ capacity: item.小时产能,
|
|
|
+ ProductionHours: item.生产工时,
|
|
|
+ AuxiliaryHours: item.辅助工时,
|
|
|
+ shift: item.班次安排,
|
|
|
+ remark: item.排单备注,
|
|
|
+ start: item.计划开工时间,
|
|
|
+ projectTime: item.计划完工时间,
|
|
|
+ UniqId: item.UniqId
|
|
|
+ };
|
|
|
+ });
|
|
|
+ console.log(formattedData)
|
|
|
+ // const EquipmentSchedulingEdit_edit = await EquipmentSchedulingEdit(formattedData);
|
|
|
+ // console.log(EquipmentSchedulingEdit_edit)
|
|
|
+ // cjsbpclist.value = true;
|
|
|
};
|
|
|
//车间设备排程【退出】
|
|
|
const cjsbpcCancel = () => {
|
|
|
@@ -1083,9 +1234,37 @@ const cjsbpcCancel = () => {
|
|
|
};
|
|
|
|
|
|
|
|
|
+//工序状态更正颜色
|
|
|
+const gxztgzzCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
+ if(row['完工时间'] === ''){
|
|
|
+ return 'lan-plan-usage-low';
|
|
|
+ }else{
|
|
|
+ return 'hui-plan-usage-low';
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
+/*背景颜色*/
|
|
|
+/* 选中某行时的背景色 */
|
|
|
+:deep(.el-table__body tr.current-row) > td {
|
|
|
+ background: #ff80ff !important;
|
|
|
+}
|
|
|
+/*:deep(.el-table__body .current-row div div) {*/
|
|
|
+/* background: #ff80ff !important;*/
|
|
|
+/*}*/
|
|
|
+
|
|
|
+/*文字颜色*/
|
|
|
+/*工序状态更正颜色【灰色】*/
|
|
|
+:deep(.hui-plan-usage-low div) {
|
|
|
+ color: #8c939d !important;
|
|
|
+}
|
|
|
+/*工序状态更正颜色【蓝色】*/
|
|
|
+:deep(.lan-plan-usage-low div) {
|
|
|
+ color: blue !important;
|
|
|
+}
|
|
|
+
|
|
|
:deep(.el-tabs__header){
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
@@ -1110,10 +1289,6 @@ const cjsbpcCancel = () => {
|
|
|
.JKWTree-content {
|
|
|
flex: 1;
|
|
|
}
|
|
|
-/* 选中某行时的背景色 */
|
|
|
-:deep(.el-table__body tr.current-row) > td {
|
|
|
- background: #ff80ff !important;
|
|
|
-}
|
|
|
</style>
|
|
|
<style scoped>
|
|
|
|
|
|
@@ -1164,4 +1339,7 @@ const cjsbpcCancel = () => {
|
|
|
.mab{
|
|
|
margin-bottom: 5px;
|
|
|
}
|
|
|
+.focusdiv:focus {
|
|
|
+ border: 1px solid red;
|
|
|
+}
|
|
|
</style>
|