| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181 |
- <template>
- <div>
- <layout>
- <layout-header>
- <div class="">
- <!-- 按钮部分-->
- <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>
- <el-button type="primary" icon="search" @click="onSubmit"></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>
- </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>-->
- </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-form-item>
- </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="" @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>
- </div>
- <el-table ref="multipleTable"
- :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>
- </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-option
- v-for="(option, index) in cjsbpcformData.bancis"
- :key="index"
- :label="option.label"
- :value="option.value"
- />
- </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>
- </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>-->
- </el-table>
- </div>
- </el-dialog>
- <!--工单打印【弹窗】-->
- <!--工序产量核查【弹窗】-->
- <el-dialog v-model="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: 0px">
- <el-input v-model="gxclhcformData['gdbh']" @keyup.enter="gxclhcProductValue" placeholder="" />
- </el-form-item>
- <el-form-item label="" prop="currentProcess" style="margin-right: 20px; padding: 0px">
- <el-input v-model="gxclhcformData['gdmc']" disabled placeholder="" style="width: 340px;"/>
- </el-form-item>
- </div>
- </div>
- </el-dialog>
- </div>
- </layout-header>
- <layout>
- <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
- <div class="JKWTree-tree" style="height: 200px">
- <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
- </div>
- </layout-sider>
- <layout-content>
- <el-main>
- <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" :prop="item.prop" :width="item.width" />
- </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: 40vh" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
- <el-table-column align="left" label="工单编号" prop="工单编号" width="90"/>
- <el-table-column align="left" label="重点工序" prop="重点工序" width="90"/>
- <el-table-column align="left" label="印件工序及名称" prop="印件工序及名称" width="500"/>
- <el-table-column align="left" label="工序备注" prop="工序备注" width="150"/>
- <el-table-column align="left" label="机组" prop="机组" width="80"/>
- <el-table-column align="left" label="小时产能" prop="小时产能" width="90"/>
- <el-table-column align="left" label="生产工时" prop="生产工时" width="90"/>
- <el-table-column align="left" label="辅助工时" prop="辅助工时" width="90"/>
- <el-table-column align="left" label="印刷方式" prop="印刷方式" width="90"/>
- <el-table-column align="left" label="版距" prop="版距" width="70"/>
- <el-table-column align="left" label="创建用户" prop="创建用户" width="100"/>
- <el-table-column align="left" label="创建时间" prop="创建时间" width="110"/>
- <el-table-column align="left" label="修改时间" prop="修改时间" width="110"/>
- <el-table-column align="left" label="UNIQID" prop="UNIQID" width="90"/>
- </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: 40vh" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
- <el-table-column align="left" label="工单编号" prop="工单编号" width="90"/>
- <el-table-column align="left" label="印件号" prop="印件号" width="70"/>
- <el-table-column align="left" label="印件代号" prop="印件代号" width="100"/>
- <el-table-column align="left" label="印件名称" prop="印件名称" width="240"/>
- <el-table-column align="left" label="纸张名称" prop="纸张名称" width="230"/>
- <el-table-column align="left" label="投料规格" prop="投料规格" width="100"/>
- <el-table-column align="left" label="成品数量" prop="成品数量" width="90"/>
- <el-table-column align="left" label="实际投料" prop="实际投料" width="90"/>
- <el-table-column align="left" label="投料单位" prop="投料单位" width="85"/>
- <el-table-column align="left" label="平张投料" prop="平张投料" width="90"/>
- <el-table-column align="left" label="联数" prop="联数" width="70"/>
- <el-table-column align="left" label="开数" prop="开数" width="70"/>
- <el-table-column align="left" label="创建用户" prop="创建用户" width="110"/>
- <el-table-column align="left" label="创建时间" prop="创建时间" width="110"/>
- <el-table-column align="left" label="修改时间" prop="修改时间" width="110"/>
- <el-table-column align="left" label="UNIQID" prop="UNIQID" width="90"/>
- </el-table>
- </el-tab-pane>
- </el-tabs>
- <div v-if="treeType === 'customTree'">
- <el-table ref="multipleTable2"
- v-if="['排程中', '制程中'].includes(currentNode)"
- :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: 40vh" 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" :prop="item.prop" :width="item.width" />
- </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: 40vh" border tooltip-effect="dark" :data="chejianData" row-key="ID" @selection-change="PC_handleChange">
- <el-table-column type="selection" width="55" />
- <template v-for="item in [
- { align:'center', title: '工单编号', prop: '工单编号', width: 160 },
- { align:'center', title: '销售订单号', prop: '销售订单号', width: 200 },
- { align:'center', title: '印件名称', prop: '印件名称', width: 320 },
- { align:'center', title: '印件工序及名称', prop: '印件工序及名称', width: 200 },
- { align:'center', title: '工序产量', prop: '工序产量', width: 120 },
- { align:'center', title: '已完成产量', prop: '已完成产量', width: 160 },
- { align:'center', title: '产品名称', prop: '产品名称', width: 320 },
- { align:'center', title: '订单数量', prop: '订单数量', width: 120 },
- { align:'center', title: '计量单位', prop: '计量单位', width: 120 },
- { align:'center', title: '交货日期', prop: '交货日期', width: 140 },
- { align:'center', title: '产品代号', prop: '产品代号', width: 140 },
- { align:'center', title: '工序名称', prop: '工序名称', width: 120 },
- { align:'center', title: '机组', prop: '机组', width: 120 },
- { align:'center', title: '设备编号', prop: '设备编号', width: 120 },
- { align:'center', title: 'UNIQID', prop: 'UNIQID', width: 140 },
- { align:'center', title: '印件号', prop: '印件号', width: 100 },
- { align:'center', title: '工序号', prop: '工序号', width: 100 },
- ]">
- <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
- </template>
- </el-table>
- <el-table ref="chejianfuRef"
- :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="chejianfuRowClick"
- style="width: 100%;height: 40vh;margin-top: 10px" border tooltip-effect="dark" :data="chejianfuData" row-key="ID" @selection-change="ZP_handleChange">
- <el-table-column type="selection" width="55" />
- <template v-for="item in [
- { align:'center', title: '工单编号', prop: '工单编号', width: 160 },
- { align:'center', title: '销售订单号', prop: '销售订单号', width: 200 },
- { align:'center', title: '印件名称', prop: '印件名称', width: 320 },
- { align:'center', title: '印件工序及名称', prop: '印件工序及名称', width: 200 },
- { align:'center', title: '工序产量', prop: '工序产量', width: 120 },
- { align:'center', title: '已完成产量', prop: '已完成产量', width: 160 },
- { align:'center', title: '小时产能', prop: '小时产能', width: 120 },
- { align:'center', title: '产能系数', prop: '产能系数', width: 120 },
- { align:'center', title: '生产工时', prop: '生产工时', width: 120 },
- { align:'center', title: '辅助工时', prop: '辅助工时', width: 140 },
- { align:'center', title: '最早开工时间', prop: '最早开工时间', width: 160 },
- { align:'center', title: '计划开工时间', prop: '计划开工时间', width: 160 },
- { align:'center', title: '计划完工时间', prop: '计划完工时间', width: 160 },
- { align:'center', title: '班次安排', prop: '班次安排', width: 120 },
- { align:'center', title: '排单备注', prop: '排单备注', width: 120 },
- { align:'center', title: '产品名称', prop: '产品名称', width: 180 },
- { align:'center', title: '订单数量', prop: '订单数量', width: 120 },
- { align:'center', title: '计量单位', prop: '计量单位', width: 120 },
- { align:'center', title: '交货日期', prop: '交货日期', width: 140 },
- { align:'center', title: '优先次序', prop: '优先次序', width: 140 },
- { align:'center', title: '产品代号', prop: '产品代号', width: 140 },
- { align:'center', title: '工序名称', prop: '工序名称', width: 120 },
- { align:'center', title: '设备编号', prop: '设备编号', width: 120 },
- { align:'center', title: '车间名称', prop: '车间名称', width: 120 },
- { align:'center', title: 'GYUID', prop: 'GYUID', width: 140 },
- { align:'center', title: '印件号', prop: '印件号', width: 100 },
- { align:'center', title: '工序号', prop: '工序号', width: 100 },
- ]">
- <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
- </template>
- </el-table>
- </div>
- </el-main>
- </layout-content>
- </layout>
- </layout>
- </div>
- </template>
- <script>
- //点击按钮显示下方表格
- export default {
- data() {
- return {
- currentTable: '',
- activeName: 'first',
- // 其他表格数据...
- };
- },
- methods: {
- showTable(tableName) {
- // console.log("点击了".tableName)
- // 根据点击的按钮设置当前展示的表格
- this.currentTable = tableName;
- },
- showTableChange() {
- // 处理表格选中事件
- },
- // 其他方法...
- }
- };
- </script>
- <script setup>
- // 全量引入格式化工具 请按需保留
- 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 { ref, reactive } from 'vue'
- import {
- DataList, getProduct, getProductData,scheduleProcess,ProductionSchedulingAdd,
- Project, StatusEdit, EquipmentScheduling, ScheduleSelection,MachineWorkOrderList,
- projectCraft, ProcessStatusCorrection,ProductionSchedulingPause,
- projectPrint, setProductStatus, workbench, ProcessFlow, Schedule,complete
- } from "@/api/yunyin/yunying";
- defineOptions({name: 'Company'})
- const chejianData = ref([])
- const chejianfuData = ref([])
- // =========== 左侧树侧形结构 ===========
- const sctreeData = ref([
- {
- label: '排产进程及参数设置',
- children:[
- {label: '1.计划中工单', number: "计划中", type: '__customer'},
- {label: '2.排程中工单', number: "排程中",type: '__customer'},
- {label: '3.制程中工单', number: "制程中", type: '__customer'},
- {label: '4.已完工工单', number: "已完工", type: '__customer'}
- ],
- }
- ]);
- //上方表格
- const tableFields = ref(
- {
- "计划中": [
- { title:'获取状态', prop: 'statusColumn', width: 80, align:'center'},
- { title:'生产分类', prop: '生产分类', width: 80, align:'left', },
- { title: '工单编号', prop: '工单编号', width: 80, align:'center', },
- { title: '产品代号', prop: '产品代号', width: 90, align:'center', },
- { title: '产品名称', prop: '产品名称', width: 280, align:'left', },
- { title: '接单日期', prop: '接单日期', width: 110, align:'left', },
- { title: '交货日期', prop: '交货日期', width: 110, align:'left', },
- { title: '订单数量', prop: '订单数量', width: 90, align:'left', },
- { title: '计量单位', prop: '计量单位', width: 120, align:'center', },
- { title: '客户名称', prop: '客户名称', width: 200, align:'left', },
- { title: '客户编号', prop: '客户编号', width: 80, align:'center', },
- { title: '备注', prop: '备注', width: 230, align:'left', },
- { title: '客户料号', prop: '客户料号', width: 120, align:'left', },
- { title: '创建用户', prop: '创建用户', width: 110, align:'left', },
- { title: '创建时间', prop: '创建时间', width: 110, align:'left', },
- { title: '修改时间', prop: '修改时间', width: 110, align:'left', },
- { title: 'UNIQID', prop: 'UNIQID', width: 80 , align:'left', },
- { title: '投料率', prop: '投料率', width: 100, align:'left', },
- { title: '销售订单号', prop: '销售订单号', width: 120, align:'left', },
- ],
- "排程中": [
- // { title: '最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
- { title: '工单编号', prop: '工单编号', width: 80, align:'left', },
- { title: '产品代号', prop: '产品代号', width: 90, align:'left', },
- { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
- { title: '接单日期', prop: '接单日期', width: 110, align:'left', },
- { title: '交货日期', prop: '交货日期', width: 110, align:'left', },
- { title: '订单数量', prop: '订单数量', width: 120, align:'left', },
- { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
- { title: '销售订单号', prop: '销售订单号', width: 200, align:'left', },
- // { title: '排程类型', prop: '排程类型', width: 120, align:'left', },
- { title: '客户编号', prop: '客户编号', width: 120, align:'left', },
- { title: '客户名称', prop: '客户名称', width: 230, align:'left', },
- { title: '创建用户', prop: '创建用户', width: 120, align:'left', },
- // { title: 'GDUID', prop: 'GDUID', width: 120, align:'left', },
- { title: 'GYUID', prop: 'GYUID', width: 100, align:'left', },
- ],
- "制程中": [
- // { title: '最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
- { title: '工单编号', prop: '工单编号', width: 80, align:'left', },
- { title: '产品代号', prop: '产品代号', width: 90, align:'left', },
- { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
- { title: '接单日期', prop: '接单日期', width: 110, align:'left', },
- { title: '交货日期', prop: '交货日期', width: 110, align:'left', },
- { title: '订单数量', prop: '订单数量', width: 120, align:'left', },
- { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
- { title: '销售订单号', prop: '销售订单号', width: 200, align:'left', },
- // { title: '排程类型', prop: '排程类型', width: 120, align:'left', },
- { title: '客户编号', prop: '客户编号', width: 120, align:'left', },
- { title: '客户名称', prop: '客户名称', width: 120, align:'left', },
- { title: '客户料号', prop: '客户料号', width: 160, align:'left', },
- // { title: 'GDUID', prop: 'GDUID', width: 120, align:'left', },
- { title: 'GYUID', prop: 'GYUID', width: 100, align:'left', },
- ],
- "已完工": [
- { title: '工单编号', prop: '工单编号', width: 80, align:'left', },
- { title: '产品代号', prop: '产品代号', width: 110, align:'left', },
- { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
- { title: '接单日期', prop: '接单日期', width: 110, align:'left', },
- { title: '交货日期', prop: '交货日期', width: 110, align:'left', },
- { title: '订单数量', prop: '订单数量', width: 90, align:'left', },
- { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
- { title: '销售订单号', prop: '销售订单号', width: 120, align:'left', },
- { title: '客户编号', prop: '客户编号', width: 80, align:'left', },
- { title: '客户名称', prop: '客户名称', width: 120, align:'left', },
- { title: '客户料号', prop: '客户料号', width: 120, align:'left', },
- // { title: '排程类型', prop: '排程类型', width: 120, align:'left', },
- { title: 'GDUID', prop: 'GDUID', width: 80, align:'left', },
- ]
- }
- )
- //下方表格
- const bottomTableF = ref({
- "排程中": [
- { title:'工单编号', prop: '工单编号', width: 90, align:'left', },
- { title:'印件工序及名称', prop: '印件工序及名称', width: 160, align:'left', },
- { title:'机组', prop: '机组', width: 120, align:'left', },
- { title:'设备编号', prop: '设备编号', width: 120, align:'left', },
- { title:'工序产量', prop: '工序产量', width: 120, align:'left', },
- { title:'已完成产量', prop: '已完成产量', width: 120, align:'left', },
- { title:'剩余产量', prop: '剩余产量', width: 120, align:'left', },
- { title:'小时产能', prop: '小时产能', width: 120, align:'left', },
- { title:'产能系数', prop: '产能系数', width: 120, align:'left', },
- { title:'生产工时', prop: '生产工时', width: 120, align:'left', },
- { title:'辅助工时', prop: '辅助工时', width: 120, align:'left', },
- { title:'最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
- { title:'计划开工时间', prop: '计划开工时间', width: 120, align:'left', },
- { title:'计划完工时间', prop: '计划完工时间', width: 120, align:'left', },
- { title:'班次安排', prop: '班次安排', width: 120, align:'left', },
- { title:'设备名称', prop: '设备名称', width: 120, align:'left', },
- { title:'排单备注', prop: '排单备注', width: 120, align:'left', },
- { title:'工序完工', prop: '工序完工', width: 120, align:'left', },
- { title:'UNIQID', prop: 'UNIQID', width: 120, align:'left', },
- ],
- "制程中": [
- { title:'工单编号', prop: '工单编号', width: 90, align:'left', },
- { title:'印件工序及名称', prop: '印件工序及名称', width: 160, align:'left', },
- { title:'机组', prop: '机组', width: 120, align:'left', },
- { title:'设备编号', prop: '设备编号', width: 120, align:'left', },
- { title:'工序产量', prop: '工序产量', width: 120, align:'left', },
- { title:'已完成产量', prop: '已完成产量', width: 120, align:'left', },
- { title:'剩余产量', prop: '剩余产量', width: 120, align:'left', },
- { title:'小时产能', prop: '小时产能', width: 120, align:'left', },
- { title:'产能系数', prop: '产能系数', width: 120, align:'left', },
- { title:'生产工时', prop: '生产工时', width: 120, align:'left', },
- { title:'辅助工时', prop: '辅助工时', width: 120, align:'left', },
- { title:'最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
- { title:'计划开工时间', prop: '计划开工时间', width: 120, align:'left', },
- { title:'计划完工时间', prop: '计划完工时间', width: 120, align:'left', },
- { title:'班次安排', prop: '班次安排', width: 120, align:'left', },
- { title:'设备名称', prop: '设备名称', width: 120, align:'left', },
- { title:'排单备注', prop: '排单备注', width: 120, align:'left', },
- { title:'工序完工', prop: '工序完工', width: 120, align:'left', },
- { title:'UNIQID', prop: 'UNIQID', width: 120, align:'left', },
- ],
- })
- //左侧左边栏
- const treeData = ref([]);
- //默认显示计划中表格
- const currentNode = ref("计划中")
- //计划中、已完工下方印件资料
- const yjtableData = ref([])
- //计划中、已完工下方工艺资料
- const gytableData = ref([])
- //排程中、制程中下方表格
- const bottomData = ref([])
- //工单侧边栏 设备定额及分配参数设置
- const schandleNodeClick = async (node) => {
- currentNode.value = node.number
- bottomData.value = []
- yjtableData.value = []
- gytableData.value = []
- switch (node.number) {
- case "计划中":
- console.log(currentNode.value)
- const jhz_Projectdata = await Project({status:currentNode.value});
- console.log(jhz_Projectdata)
- for (let i = 0; i < jhz_Projectdata.data.length; i++) {
- const item = jhz_Projectdata.data[i];
- if (item.status === 0) {
- item.statusColumn = "*";
- }
- // 如果 status 为 1,可以在相应列中添加其他内容
- else if (item.status === 1) {
- item.statusColumn = "";
- }
- }
- tableData.value = jhz_Projectdata.data;
- break;
- case "排程中":
- console.log(currentNode.value)
- // /Manufacture/Schedule
- const pc_Schedule = await Schedule({status:currentNode.value,search:''});
- console.log(pc_Schedule)
- tableData.value = pc_Schedule.data;
- break;
- case "制程中":
- console.log(currentNode.value)
- const zc_Schedule = await Schedule({status:currentNode.value,search:''});
- console.log(zc_Schedule)
- tableData.value = zc_Schedule.data;
- break;
- case "已完工":
- console.log(currentNode.value)
- const ywg_Project = await Project({status:currentNode.value});
- for (let i = 0; i < ywg_Project.data.length; i++) {
- const item = ywg_Project.data[i];
- // 如果 status 为 0,在某一列(比如 statusColumn)中添加 "*"
- if (item.status === 0) {
- item.statusColumn = "*";
- }
- else if (item.status === 1) {
- item.statusColumn = "";
- }
- }
- tableData.value = ywg_Projectdata.data;
- break;
- }
- };
- //车间侧边栏 进入页面自动加载【车间】数据
- const workbenchdata = async () => {
- try {
- const data = await workbench();
- const rawData = data.data;
- const dataArray =Object.keys(rawData).map(key => ({
- label: key,
- children: Object.keys(rawData[key]).map(subKey => ({
- label: subKey,
- children: rawData[key][subKey].map(item => ({
- label: item
- }))
- }))
- }));
- treeData.value = dataArray;
- treeData.value.unshift(sctreeData.value[0])
- } catch (error) {
- console.error(error);
- }
- };
- workbenchdata();
- //全局获取工单编号
- const _Gd_gdbh = ref(null)
- //点击表格 通过【工单编号】获取下方表格数据
- const gdtableRowClick = async (row) => {
- _Gd_gdbh.value = row.工单编号;
- console.log(_Gd_gdbh.value);
- if (currentNode.value == "计划中") {
- if(row['statusColumn'] === "*"){
- gytableData.value = [];
- yjtableData.value = [];
- return false;
- }else{
- //计划中工单->工艺资料接口
- const gyres = await projectCraft({Gd_gdbh: _Gd_gdbh.value});
- //工艺资料表格
- gytableData.value.splice(0, gytableData.value.length, ...gyres.data);
- //计划中工单->印件资料接口
- const yjres = await projectPrint({Gd_gdbh: _Gd_gdbh.value});
- //印件资料表格
- yjtableData.value.splice(0, yjtableData.value.length, ...(yjres?.data ?? []));
- }
- }
- if (currentNode.value == "排程中") {
- const pc_scheduleProcess = await scheduleProcess({Gd_gdbh: _Gd_gdbh.value});
- bottomData.value = pc_scheduleProcess.data;
- }
- if (currentNode.value == "制程中") {
- const zc_scheduleProcess = await scheduleProcess({Gd_gdbh: _Gd_gdbh.value});
- bottomData.value = zc_scheduleProcess.data;
- }
- if (currentNode.value == "已完工") {
- //工艺资料
- const ywg_gyres = await projectCraft({Gd_gdbh: _Gd_gdbh.value});
- gytableData.value.splice(0, gytableData.value.length, ...ywg_gyres.data);
- //印件资料
- const ywg_yjres = await projectPrint({Gd_gdbh: _Gd_gdbh.value});
- yjtableData.value.splice(0, yjtableData.value.length, ...ywg_yjres.data);
- }
- };
- //点击左侧树形获取表格列表
- const tableData = ref([]);
- const _machine = ref(null);
- const treeType = ref('customTree') // dataTree // 计划中,排产中 ,dataTree 车间
- const handleNodeClick = async (node) => {
- if (node.type && node.type === '__customer') {
- treeType.value = 'customTree'
- schandleNodeClick(node)
- } else if (!node.children) {
- treeType.value = 'dataTree'
- const custom_code = node.label;
- // 使用字符串分割获取#前面的数据
- const dataBeforeHash = custom_code.split('#')[0].trim();
- const machine = dataBeforeHash + '#';
- console.log(machine)
- _machine.value = machine;
- const zhubiao = await MachineWorkOrderList({ machine, status: '排程' })
- const fubiao = await MachineWorkOrderList({ machine, status: '制程' })
- // console.log(zhubiao, fubiao)
- chejianData.value = zhubiao.data;
- chejianfuData.value = fubiao.data;
- }
- };
- //计划中已完工搜索
- const searchInfo = ref('');
- // 提交搜索
- const onSubmit = () => {
- if(searchInfo.value === '' || searchInfo.value.length < 6 ){
- tableData.value = [];
- }else{
- if(currentNode.value === '计划中' || currentNode.value === '已完工'){
- _Project();
- }else if(currentNode.value === '排程中' || currentNode.value === '制程中'){
- _Schedule();
- }else{
- ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
- }
- }
- };
- // 搜索计划中、已完工一条工单
- const _Project = async () => {
- const status = currentNode.value;
- const search = searchInfo.value;
- console.log(status)
- console.log(search)
- const Project_search = await Project({status:status,search:search});
- console.log(Project_search);
- if(Project_search.code === 0){
- tableData.value = Project_search.data;
- }else{
- tableData.value = [];
- return false;
- }
- };
- // 搜索排程、制程一条工单
- 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.code === 0){
- tableData.value = Schedule_search.data;
- }else{
- tableData.value = [];
- return false;
- }
- };
- // 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 gxztgzzlist = ref(false);
- const gxztgzzformData = reactive({gdbh: '',});
- const gxztgzztableData = ref([]);
- //工序状态更正【按钮】
- 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'];
- console.log(workOrder)
- const ProcessStatusCorrectiondata = await ProcessStatusCorrection({workOrder:workOrder});
- gxztgzztableData.value = ProcessStatusCorrectiondata.data;
- };
- //工序状态更正【退出】
- const gxztgzzCancel = () => {
- gxztgzzlist.value = false;
- };
- //点击车间表格【获取车间工单编号】
- // const _PC_gdbh = ref(null)
- // const chejianRowClick = (row) => {
- // // console.log(row['工单编号'])
- // _PC_gdbh.value = row['工单编号'];
- // };
- //加入排产【按钮】
- const onjrpcClick = async () => {
- if(_PC_gdbh.value == null || _PC_gdbh.value == ''){
- ElMessage({type: 'warning',message: '请选择排程中工单'})
- }else{
- let params = {}
- // params.workOrder = '2311116';
- // params.machine = 'JY01#';
- params.workOrder = _PC_gdbh.value;
- params.machine = _machine.value;
- params.printCode = 1;
- params.processCode = 1;
- console.log(params)
- const ProductionSchedulingAdd_add = await ProductionSchedulingAdd(params);
- console.log(ProductionSchedulingAdd_add)
- if (ProductionSchedulingAdd_add .code === 0) {
- const fubiao = await MachineWorkOrderList({ machine:_machine.value, status: '制程' });
- chejianfuData.value = fubiao.data;
- ElMessage({type: 'success',message: '加入排产 更新成功'});
- } else {
- ElMessage({ type: 'error',message: '更新失败'})
- }
- }
- };
- // const _ZC_gdbh = ref(null)
- // const chejianfuRowClick = (row) => {
- // // console.log(row['工单编号'])
- // _ZC_gdbh.value = row['工单编号'];
- // };
- //暂停排产【按钮】
- const onztwgClick = async () => {
- if(_ZC_gdbh.value == null || _ZC_gdbh.value == ''){
- ElMessage({type: 'warning', message: '请选择制程中工单'})
- }else{
- let params = {}
- // params.workOrder = '2311116';
- // params.machine = 'JY01#';
- params.workOrder = _ZC_gdbh.value;
- params.machine = _machine.value;
- params.printCode = 1;
- params.processCode = 1;
- console.log(params)
- const ProductionSchedulingAdd_stop = await ProductionSchedulingPause(params);
- console.log(ProductionSchedulingAdd_stop)
- if (ProductionSchedulingAdd_stop .code === 0) {
- const zhubiao = await MachineWorkOrderList({ machine:_machine.value, status: '排程' });
- chejianData.value = zhubiao.data;
- ElMessage({type: 'success',message: '暂停排产 更新成功'});
- } else {
- console.log(ygjbzledit_eddt);
- ElMessage({ type: 'error',message: '更新失败'})
- }
- }
- };
- //工序完工【按钮】
- const ongxwgClick = async () => {
- if(_ZC_gdbh.value == null || _ZC_gdbh.value == ''){
- onstatuslist.value = false;
- ElMessage({
- type: 'warning',
- message: '请选择制程中工单'
- })
- }else{
- // let combinedValue = `${_ZC_gdbh.value},${_PC_gdbh.value}`;
- // console.log(combinedValue);
- let params = {}
- params.workOrder = _ZC_gdbh.value;
- params.processCode = _gxh.value;
- console.log(params)
- const complete_get = await complete(params);
- console.log(complete_get)
- if (complete_get .code === 0) {
- const fubiao = await MachineWorkOrderList({ machine:_machine.value, status: '制程' });
- chejianfuData.value = fubiao.data;
- ElMessage({type: 'success',message: '工序完工 更新成功'})
- } else {
- ElMessage({ type: 'error',message: '更新失败'})
- }
- }
- };
- //加入排程【上面到下面】
- const _PC_gdbh = ref(null)
- const PC_handleChange = (arr) => {
- let str = arr.map((val) => val['工单编号']).join(",");
- console.log(str);
- _PC_gdbh.value = str;
- }
- //加入制程【下面到上面】
- const _ZC_gdbh = ref(null)
- const _gxh = ref(null)
- const ZP_handleChange = (arr) => {
- console.log(arr)
- let str = arr.map((val) => val['工单编号']).join(",");
- let gxh = arr.map((val) => val['gxh']).join(",");
- console.log(str);
- console.log(gxh);
- _ZC_gdbh.value = str;
- _gxh.value = gxh;
- }
- //机组调整【按钮】
- const onjztzClick = async () => {
- };
- //工序产量核查【按钮】
- const onprintClick = async () => {
- };
- //=========工序产量核查===========
- const gxclhclist = ref(false);
- const gxclhcformData = reactive({
- gdbh: '',
- gdmc: '',
- });
- //工序产量核查【按钮】
- const ongxclhcClick = async () => {
- gxclhclist.value = true;
- };
- //工序产量核查【回车】
- const _gxclhcgdbh = ref(null)
- const gxclhcProductValue = () => {
- if(fjformData['dqprocessName'] === ''){
- fjformData['dqprocessName'] = '';
- }
- _gxclhcgdbh.value = gxclhcformData['gdbh'];
- _ongetProductclick();
- }
- //工序产量核查【退出】
- const gxclhcCancel = async () => {
- gxclhclist.value = false;
- };
- //流程单查询【按钮】
- const onlcdlistClick = async () => {
- };
- //状态设置【按钮】
- const onstatuslist = ref(false);
- const statusformData = reactive({gdbh: '',});
- const status = ref('计划中'); // 默认选择在产
- const onStatusClick = () => {
- if(_Gd_gdbh.value == null){
- 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 = "1-计划中";
- } else if (status.value === '生产中') {
- statusCode = "2-生产中";
- }else if (status.value === '已完工') {
- statusCode = "3-已完工";
- }
- const StatusEditdata = await StatusEdit({workOrder:workOrder,status:statusCode});
- if (StatusEditdata.code === 0) {
- ElMessage({
- type: 'success',
- message: '更新成功'
- })
- } else {
- ElMessage({
- type: 'error',
- message: '更新成功'
- })
- }
- onstatuslist.value = false;
- };
- // handleCancel(_stacode);
- const page = ref(1)
- const total = ref(0)
- const pageSize = ref(10)
- // 分页
- const handleSizeChange = (val) => {
- pageSize.value = val
- getTableData()
- }
- // 修改页面容量
- const handleCurrentChange = (val) => {
- page.value = val
- getTableData()
- }
- // 查询
- const getTableData = async() => {
- }
- getTableData()
- // ============== 表格控制部分结束 ===============
- // 获取需要的字典 可能为空 按需保留
- const setOptions = async () =>{
- }
- // 获取需要的字典 可能为空 按需保留
- setOptions()
- // 多选数据
- const multipleSelection = ref([])
- // 多选
- const handleSelectionChange = (val) => {
- multipleSelection.value = val
- }
- // 行为控制标记(弹窗内部需要增还是改)
- const type = ref('')
- //修改
- const updateCompanyFunc = async (row) => {
- console.log(row);
- dialogFormVisible.value = true;
- };
- // 打开弹窗
- const openDialog = () => {
- dialogFormVisible.value = true
- }
- // 弹窗确定
- const enterDialog = async () => {
- console.log("弹窗确定")
- }
- // 关闭弹窗
- const closeDialog = () => {dialogFormVisible.value = false}
- const cjsbpclist = ref(false);
- const cjsbpcformData = reactive({
- //设备代号
- sbdh: '',
- // 下拉框选项数据
- bancis: [],
- // 设置默认值
- banci: '',
- isBanciSelected: false,
- });
- //=============车间设备排程================
- //车间设备排程【按钮】
- const oncjsbpcClick = () => {
- cjsbpcformData['sbdh'] = 'WY01#';
- _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);
- } catch (error) {
- console.error(error);
- }
- }
- //车间设备排程->数据展示
- const _EquipmentSchedulingdata = async ()=>{
- let machine = 'WY01#';
- try {
- const EquipmentSchedulingdata = await EquipmentScheduling({machine:machine});
- console.log(EquipmentSchedulingdata)
- } catch (error) {
- console.error(error);
- }
- }
- //车间设备排程->数据编辑
- //车间设备排程【更新排程】
- const oneditpcClick = () => {
- console.log("更新排程")
- cjsbpclist.value = true;
- };
- //车间设备排程【退出】
- const cjsbpcCancel = () => {
- cjsbpclist.value = false;
- };
- </script>
- <style scoped>
- :deep(.el-tabs__header){
- margin-bottom: 0;
- }
- :deep(.el-table td .cell) {
- line-height: 30px !important;
- }
- .JKWTree-container {
- display: flex;
- }
- .JKWTree-tree {
- width: 300px;
- background-color: #fff;
- padding: 10px;
- margin-right: 20px;
- }
- .JKWTree-tree h3 {
- font-size: 15px;
- font-weight: 700;
- margin: 10px 0;
- }
- .JKWTree-content {
- flex: 1;
- }
- /* 选中某行时的背景色 */
- :deep(.el-table__body tr.current-row) > td {
- background: #ff80ff !important;
- }
- </style>
- <style scoped>
- :deep(.el-tabs__header){
- margin-bottom: 0;
- }
- .search{
- margin-left: 0px !important;
- margin-right: 10px !important;
- }
- .bt{
- margin-left: 2px !important;
- padding: 3px !important;
- font-size: 12px;
- }
- .el-tabs__header{
- margin: 0px !important;
- }
- .gva-table-box{
- padding: 0px !important;
- }
- .mab{
- margin-bottom: 5px;
- }
- </style>
- <style scoped>
- :deep(.el-table td .cell) {
- line-height: 20px !important;
- }
- :deep(.el-tabs__header){
- margin-bottom: 0;
- }
- .search{
- margin-left: 0px !important;
- margin-right: 10px !important;
- }
- .bt{
- margin-left: 2px !important;
- padding: 3px !important;
- font-size: 12px;
- }
- .el-tabs__header{
- margin: 0px !important;
- }
- .gva-table-box{
- padding: 0px !important;
- }
- .mab{
- margin-bottom: 5px;
- }
- </style>
|