| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191 |
- <template>
- <div>
-
- <header>
- <el-button type="primary" @click="onBZ">班组维护</el-button>
- <el-button type="primary" @click="onDel">删除</el-button>
- <el-button type="primary" @click="onOver">完工</el-button>
- <el-button type="primary" @click="ondianjian">设备点检</el-button>
- <el-button type="primary" @click="onchanliang">日产量上报</el-button>
- </header>
-
-
- <el-container>
- <el-aside width="200px">
- <div class="JKWTree-tree">
- <h3 > 车间报工</h3>
- <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
- </div>
- </el-aside>
- <el-container>
- <!-- <el-header>dd</el-header>-->
- <el-main>
-
- <div class="gva-search-box" style="overflow: hidden; padding: 0; display: flex;">
- <div style="flex: 1; border: 1px magenta solid; margin: 0; padding: 0;">
-
- <el-row :gutter="20">
- <el-col :span="6">
- <el-form-item label="工单编号" prop="name">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-input v-model="formData.工单编号" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="12">
- <el-input v-model="formData.产品名称" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
-
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
- <el-col :span="4">
- <el-form-item label="印件编号" prop="id">
- <el-input v-model="formData.印件编号" :clearable="true" placeholder="2023.12.14" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="工序名称" prop="name">
- <el-input v-model="formData.工序名称" :clearable="true" placeholder="A班" />
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
- <el-col :span="4">
- <el-form-item label="班组成员" prop="id">
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="1">
-
- <el-col :span="3">
- <el-input v-model="formData.sczl_bh1" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="3">
- <el-input v-model="formData.sczl_bh2" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="3">
- <el-input v-model="formData.sczl_bh3" :clearable="true" placeholder="ZT01733" />
- </el-col>
-
- <el-col :span="3">
- <el-input v-model="formData.sczl_bh4" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="3">
- <el-input v-model="formData.sczl_bh5" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="3">
- <el-input v-model="formData.sczl_bh6" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <!-- <el-col :span="1">
- <el-input v-model="formData.sczl_bh7" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="1">
- <el-input v-model="formData.sczl_bh8" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="1">
- <el-input v-model="formData.sczl_bh9" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="1">
- <el-input v-model="formData.sczl_bh10" :clearable="true" placeholder="2023.12.14" />
- </el-col> -->
- </el-row>
-
- <el-row :gutter="1">
-
- <el-col :span="3">
- <el-input v-model="formData.sczl_name1" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="3">
- <el-input v-model="formData.sczl_name2" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="3">
- <el-input v-model="formData.sczl_name3" :clearable="true" placeholder="ZT01733" />
- </el-col>
-
- <!-- <el-col :span="3">
- <el-input v-model="formData.name4" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <!-- <el-col :span="1">
- <el-input v-model="formData.name5" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="1">
- <el-input v-model="formData.name6" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="1">
- <el-input v-model="formData.name7" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="1">
- <el-input v-model="formData.name8" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="1">
- <el-input v-model="formData.name9" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="1">
- <el-input v-model="formData.name10" :clearable="true" placeholder="2023.12.14" />
- </el-col> -->
- </el-row>
-
- </div>
-
- <div style="flex: 1; border: 1px lawngreen solid; margin: 0; padding: 0; overflow: hidden;">
- <el-table
- tooltip-effect="dark"
- :data="selectData"
- row-key="ID"
- highlight-current-row="true"
- border
- style="width:100%"
- @row-dblclick="handleSelectClick"
- >
- <el-table-column
- prop="Gd_cpmc"
- label="印件及工序"
- width="340"
- />
- <el-table-column
- prop="jyGx"
- label="已完成板数"
- width="150"
- />
- </el-table>
- </div>
-
- </div>
- <div class="gva-table-box">
- <div class="gva-btn-list">
- <el-button type="primary" icon="plus" @click="openDialog">新增</el-button>
- <el-popover v-model:visible="deleteVisible" :disabled="!multipleSelection.length" placement="top" width="160">
- <p>确定要删除吗?</p>
- <div style="text-align: right; margin-top: 8px;">
- <el-button type="primary" link @click="deleteVisible = false">取消</el-button>
- <el-button type="primary" @click="onDelete">确定</el-button>
- </div>
- <template #reference>
- <el-button icon="delete" style="margin-left: 10px;" :disabled="!multipleSelection.length" @click="deleteVisible = true">删除</el-button>
- </template>
- </el-popover>
- </div>
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-
- <el-tab-pane label="设备作业清单" @click="showTable('印件资料')" name="first">
- <el-table ref="multipleTable"
- :show-overflow-tooltip="true"
- highlight-current-row="true"
- :row-style="{ height: '20px' }"
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
- :header-cell-style="{ padding: '0px' }"
- @row-dblclick="yjupdateCompanyFunc"
- style="width: 100%;height: 330px" border tooltip-effect="dark" :data="sbzyData" row-key="ID" @selection-change="handleSelectionChange">
- <!-- <el-table-column type="selection" width="55" />-->
- <el-table-column align="left" label="选择" prop="yj_yjno" width="80"/>
- <el-table-column align="left" label="工单编号|质量信息" prop="工单编号|质量信息" width="180" />
- <el-table-column align="left" label="印件资料" prop="印件资料" width="240" />
- <el-table-column align="left" label="工序名称" prop="工序名称" width="100" />
- <el-table-column align="left" label="计划产量/已完成" prop="计划产量/已完成" width="180"/>
- <el-table-column align="left" label="装版时数" prop="装版时数" width="100"/>
- <el-table-column align="left" label="工序产能" prop="工序产能" width="100"/>
- <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="100" />
- <el-table-column align="left" label="产品名称" prop="产品名称" width="240" />
- </el-table>
- </el-tab-pane>
-
- <el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
- <el-table ref="multipleTable"
- highlight-current-row="true"
- :show-overflow-tooltip="true"
- :row-style="{ height: '20px' }"
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
- :header-cell-style="{ padding: '0px' }"
- @row-dblclick="gyupdateCompanyFunc"
- :row-class-name="rowClassStyle"
- style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
- @row-click="clickybupdate">
- <el-table-column type="selection" label="选择" width="55" />
-
- <el-table-column align="left" label="班组号" prop="班组号" width="80" />
- <el-table-column align="left" label="组员1" prop="0" width="240" />
- <el-table-column align="left" label="组员2" prop="1" width="240" />
- <el-table-column align="left" label="组员3" prop="2" width="240" />
- <el-table-column align="left" label="组员4" prop="3" width="240" />
- <el-table-column align="left" label="组员5" prop="4" width="100" />
- <el-table-column align="left" label="组员6" prop="5" width="100" />
- <el-table-column align="left" label="组员7" prop="6" width="100" />
- <el-table-column align="left" label="组员8" prop="7" width="100" />
- <el-table-column align="left" label="组员9" prop="8" width="100" />
- <el-table-column align="left" label="组员10" prop="9_正品版" width="120" />
- </el-table>
- </el-tab-pane>
-
- <el-tab-pane label="当班产量明细" @click="showTable('印版资料')" name="third">
- <el-table ref="multipleTable"
- highlight-current-row="true"
- :show-overflow-tooltip="true"
- :row-style="{ height: '20px' }"
- :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
- :header-cell-style="{ padding: '0px' }"
- @row-dblclick="ybupdateCompanyFunc"
- style="width: 100%;height: 400px" border tooltip-effect="dark" :data="CLMXData" row-key="ID" @selection-change="handleSelectionChange"
- >
- <!-- <el-table-column type="selection" width="55" />-->
- <el-table-column align="left" label="生产时段" prop="生产时间段" width="180"/>
- <el-table-column align="left" label="工单编号" prop="工单编号" width="120" />
- <el-table-column align="left" label="产品名称" prop="产品名称" width="240" />
- <el-table-column align="left" label="印件及工序" prop="印件及工序" width="320"/>
- <el-table-column align="left" label="标牌号" prop="标牌号" width="80"/>
- <el-table-column align="left" label="产量" prop="产量" width="100"/>
- <el-table-column align="left" label="制程废品" prop="制程废品" width="100" />
- <el-table-column align="left" label="制程次品" prop="制程次品" width="100" />
- <el-table-column align="left" label="前工序废" prop="前工序废" width="100" />
- <el-table-column align="left" label="来料异常" prop="来料异常" width="100"/>
- <el-table-column align="left" label="装版工时" prop="装版工时" width="100" />
- <el-table-column align="left" label="保养工时" prop="保养工时" width="100" />
- <el-table-column align="left" label="打样工时" prop="打样工时" width="100"/>
- <el-table-column align="left" label="异常停机工时" prop="异常停机工时" width="120"/>
- <el-table-column align="left" label="通电工时" prop="通电工时" width="100"/>
- <el-table-column align="left" label="码开始行" prop="码开始行" width="100" />
- <el-table-column align="left" label="码结束行" prop="码结束行" width="100" />
- <el-table-column align="left" label="码包" prop="码包" width="100" />
- <el-table-column align="left" label="主电表" prop="主电表" width="100"/>
- <el-table-column align="left" label="辅电表" prop="辅电表" width="100" />
- <el-table-column align="left" label="色度数" prop="色度数" width="100" />
- </el-table>
- </el-tab-pane>
-
- <el-tab-pane label="检验记录" @click="showTable('技术资料附件')" name="fourth">
- <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: 400px" border tooltip-effect="dark" :data="JYData" row-key="ID" @selection-change="handleSelectionChange">
- <!-- <el-table-column type="selection" width="55" />-->
- <el-table-column align="left" label="工单编号" prop="工单编号" width="120"/>
- <el-table-column align="left" label="印件号" prop="印件号" width="120" />
- <el-table-column align="left" label="工序名称" prop="工序名称" width="330" />
- <el-table-column align="left" label="检验项目" prop="检验项目" width="120"/>
- <el-table-column
- v-for="time in columnNames"
- :key="time"
- :label="time"
- :prop="time"
- align="center"
- width="120"
- ></el-table-column>
- </el-table>
- </el-tab-pane>
-
- </el-tabs>
- <!-- <div class="gva-pagination">
- <el-pagination
- layout="total, sizes, prev, pager, next, jumper"
- :current-page="page"
- :page-size="pageSize"
- :page-sizes="[10, 30, 50, 100]"
- :total="total"
- @current-change="handleCurrentChange"
- @size-change="handleSizeChange"
- />
- </div> -->
- </div>
- <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type==='create'?'添加':'修改'" destroy-on-close>
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
- <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: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="55" />
- <el-table-column align="left" label="选择" prop="工单编号" width="100"/>
- <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="100"/>
- <el-table-column align="left" label="产量" prop="小时产能" width="100"/>
- <el-table-column align="left" label="千件工价" prop="生产工时" width="100"/>
- <el-table-column align="left" label="日定额" prop="辅助工时" width="100"/>
- <el-table-column align="left" label="补产标准" prop="印刷方式" width="100"/>
- <el-table-column align="left" label="难度系数" prop="版距" width="100"/>
- <el-table-column align="left" label="印刷方式" prop="创建用户" width="120"/>
- <el-table-column align="left" label="组员1" prop="Gy0_gxh" width="240" />
- <el-table-column align="left" label="组员2" prop="gy0_gxmc" width="240" />
- <el-table-column align="left" label="组员3" prop="add_gxmc" width="240" />
- <el-table-column align="left" label="组员4" prop="Gy0_Ks" width="240" />
- <el-table-column align="left" label="组员5" prop="Gy0_ls" width="100" />
- <el-table-column align="left" label="组员6" prop="备注" width="100" />
- <el-table-column align="left" label="组员7" prop="工价系数" width="100" />
- <el-table-column align="left" label="组员8" prop="损耗系数" width="100" />
- <el-table-column align="left" label="组员9" prop="Gy0_Ms" width="100" />
- <el-table-column align="left" label="组员10" prop="人工检_正品版" width="120" />
- <el-table-column align="left" label="制程废品" prop="Sys_id" width="100" />
- <el-table-column align="left" label="制程次品" prop="建档日期" width="100" />
- <el-table-column align="left" label="前工序废" prop="更新日期" width="100" />
- <el-table-column align="left" label="来料异常" prop="YB_方案" width="100"/>
- <el-table-column align="left" label="装版工时" prop="YB_Yjno" width="100" />
- <el-table-column align="left" label="保养工时" prop="印版类别" width="100" />
- <el-table-column align="left" label="打样工时" prop="存货编码" width="100"/>
- <el-table-column align="left" label="异常停机工时" prop="印版名称" width="120"/>
- <el-table-column align="left" label="通电工时" prop="考核印数" width="100"/>
- <el-table-column align="left" label="码开始行" prop="Sys_id" width="100" />
- <el-table-column align="left" label="码结束行" prop="建档日期" width="100" />
- <el-table-column align="left" label="码包" prop="更新日期" width="100" />
- <el-table-column align="left" label="主电表" prop="YB_方案" width="100"/>
- <el-table-column align="left" label="辅电表" prop="YB_Yjno" width="100" />
- <el-table-column align="left" label="色度数" prop="印版类别" width="100" />
- <el-table-column align="left" label="用户" prop="YB_Yjno" width="100" />
- <el-table-column align="left" label="更新时间" prop="印版类别" width="100" />
- </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: 400px" border tooltip-effect="dark" :data="drzcData" row-key="ID" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="55" />
- <el-table-column align="left" label="工单编号" prop="工单编号" width="120"/>
- <el-table-column align="left" label="印件号" prop="印件号" width="120" />
- <el-table-column align="left" label="工序名称" prop="工序名称" width="330" />
- <el-table-column align="left" label="检验项目" prop="检验项目" width="120"/>
- <el-table-column
- v-for="time in columnNames"
- :key="time"
- :label="time"
- :prop="time"
- align="center"
- width="120"
- ></el-table-column>
- </el-table>
- </el-tab-pane>
- </el-tabs>
- </el-dialog>
- <el-dialog v-model="detailShow" style="width: 800px" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
- <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" @row-click="BZhandle"
- style="width: 100%;height: 250px" border tooltip-effect="dark"
- :data="bzData" row-key="ID" @selection-change="BZSelectionChange">
- <el-table-column type="selection" width="55" />
- <el-table-column align="left" label="机台" prop="JTMC" width="120"/>
- <el-table-column align="left" label="班组" prop="班组号" width="120"/>
- <el-table-column align="left" label="组员1" prop="0" width="120"/>
- <el-table-column align="left" label="组员2" prop="1" width="120"/>
- <el-table-column align="left" label="组员3" prop="2" width="120"/>
- <el-table-column align="left" label="组员4" prop="3" width="160"/>
- <el-table-column align="left" label="组员5" prop="4" width="160"/>
- <el-table-column align="left" label="组员6" prop="5" width="120"/>
- <el-table-column align="left" label="组员7" prop="6" width="120"/>
- <el-table-column align="left" label="组员8" prop="7" width="120"/>
- <el-table-column align="left" label="组员9" prop="8" width="120"/>
- <el-table-column align="left" label="特殊组员" prop="9" width="120"/>
- <el-table-column align="left" label="UNIQID" prop="ID" width="120"/>
- </el-table>
-
-
-
-
- <el-row :gutter="20">
- <el-col :span="10">
- <el-form-item label="机台编号" prop="id">
- <el-select v-model="selectedOption" placeholder="请选择">
- <el-option
- v-for="item in dropdownOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="10">
- <el-form-item label="班组编号" prop="id">
- <el-input v-model="BZMC" :clearable="true" placeholder="2023.12.14" />
- </el-form-item>
- </el-col>
- </el-row>
-
- <div class="groupbox">
- <span class="grouptitle">组员及分配比例</span>
- <el-row :gutter="10" style="margin-top: 10px;">
- <el-col :span="2">
- <span></span>
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
- <el-form-item label="特殊组员" prop="id">
-
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="10" style="margin-top: 10px;">
- <el-col :span="2">
- <span></span>
- </el-col>
-
-
-
-
-
-
-
- <el-col :span="4">
- <el-input v-model="formDatas.code1" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.code2" :clearable="true" placeholder="打包废纸" />
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.code3" :clearable="true" placeholder="是" />
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.code4" :clearable="true" placeholder="是" />
- </el-col>
-
- <!-- <el-col :span="2">
- <el-input v-model="formData.name" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="percentage" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="打包废纸" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
- </el-col> -->
- </el-row>
- <el-row :gutter="10" style="margin-top: 10px;">
- <el-col :span="2">
- <span></span>
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.name1" :clearable="true" placeholder="ZI00401" />
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.name2" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.name3" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.name4" :clearable="true" placeholder="打包废纸" />
- </el-col>
- <!-- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
- </el-col> -->
- </el-row>
- <el-row :gutter="10" style="margin-top: 10px;">
- <el-col :span="2">
- <span></span>
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.percentage1" :clearable="true" placeholder="ZI00401" />
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.percentage2" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.percentage3" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="4">
- <el-input v-model="formDatas.percentage4" :clearable="true" placeholder="打包废纸" />
- </el-col>
- <!-- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
- </el-col> -->
- </el-row>
- </div>
- </el-dialog>
- <el-dialog
- v-model="dianjianVisible"
- title="选择"
- destroy-on-close
- width="1300px"
- style="height: 110%;"
- >
- <el-row :gutter="0">
- <el-col :span="4">
- <el-form-item label="设备编号" prop="id">
- <el-input v-model="formData.sczl_gdbh" :clearable="true" placeholder="2023.12.14" />
- </el-form-item>
- </el-col>
- <el-col :span="20">
- <el-row :gutter="20">
- <el-col :span="5">
- <el-input v-model="formData.sczl_bzdh" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-col>
- </el-row>
-
- <div style="display: flex;">
- <div style="flex: 1;">
- <el-aside width="250px" style="margin: 0;">
- <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
- <el-tree :data="dianjiantreeData" :props="defaultProps" highlight-current="true"
- @node-click="dianjianNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
- </div>
- </el-aside>
- </div>
- <div style="flex: 1; margin: 0;">
- <el-table
- tooltip-effect="dark"
- :data="dianjianselectData"
- row-key="ID"
- highlight-current-row="true"
- border @row-click="dianjianhandle"
- style="width:100%; height:400px;"
- @row-dblclick="handleSelectClick"
- :row-class-name="rowClassName"
- >
- <el-table-column
- prop="检验项目"
- label="检验项目"
- width="180"
- />
- <el-table-column
- prop="点检方法"
- label="点检方法"
- width="180"
- />
- <el-table-column
- label="正常"
- width="80"
- >
-
- <el-checkbox v-model="checked1" :indeterminate="isIndeterminate" @change="handleCheckAllChange" ></el-checkbox>
-
- </el-table-column>
- <el-table-column
- label="异常"
- width="80"
- >
- <el-checkbox v-model="checked2" :indeterminate="isIndeterminate" @change="handleCheckAllChange"></el-checkbox>
- </el-table-column>
- <el-table-column
- label="备注说明"
- width="180"
- />
- <el-table-column
- label="不检测"
- width="80"
- >
- <el-checkbox v-model="checked3" :indeterminate="isIndeterminate" @change="handleCheckAllChange" ></el-checkbox>
- </el-table-column>
- </el-table>
- <el-row :gutter="20">
- <el-col :span="20">
- <el-input v-model="pandingfangfa" style="height: 50px;" :clearable="true" />
- </el-col>
- </el-row>
- </div>
- </div>
- </el-dialog>
-
-
- <el-dialog
- v-model="chanliangVisible"
- title="选择"
- destroy-on-close
- width="1400px"
- style="height: 170%;"
- >
- <el-row :gutter="20">
- <el-col :span="4">
- <el-form-item label="工单编号" prop="id">
- <el-input v-model="formData3.order" :clearable="true" placeholder="2023.12.14" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="产品名称" prop="name">
- <el-row :gutter="20">
- <el-col :span="40">
- <el-input v-model="formData3.product_name" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="工序名称" prop="name">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-input v-model="formData3.gxmc" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- </el-row>
-
-
- <el-row :gutter="20">
- <el-col :span="4">
- <el-form-item label="印件号" prop="id">
- <el-input v-model="formData3.yjno" :clearable="true" placeholder="2023.12.14" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="印件名称" prop="name">
- <el-row :gutter="20">
- <el-col :span="40">
- <el-input v-model="formData3.yj_name" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="工艺名称" prop="name">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-input v-model="formData3.gy_name" :clearable="true" placeholder="ZT01733" />
- </el-col>
- <el-col :span="12">
- <el-input v-model="formData3.gxh" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- </el-row>
-
-
- <el-row :gutter="20">
- <el-col :span="4">
- <el-form-item label="日期" prop="id">
- <el-input v-model="formData3.日期" :clearable="true" placeholder="2023.12.14" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="流程标牌" prop="name">
- <el-row :gutter="20">
- <el-col :span="40">
- <el-input v-model="formData3.流程标牌" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="上机时间" prop="name">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-input v-model="formData3.上机时间" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="下机时间" prop="name">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-input v-model="formData3.下机时间" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- </el-row>
-
-
- <el-row :gutter="20">
- <el-col :span="3">
- <el-form-item label="产量" prop="id">
- <el-input v-model="formData3.产量" :clearable="true" placeholder="2023.12.14" />
- </el-form-item>
- </el-col>
- <el-col :span="3">
- <el-form-item label="制程废品" prop="name">
- <el-row :gutter="20">
- <el-col :span="6">
- <el-input v-model="formData3.制程废品" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="3">
- <el-form-item label="制程次品" prop="name">
- <el-row :gutter="20">
- <el-col :span="6">
- <el-input v-model="formData3.制程次品" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="3">
- <el-form-item label="前工序废" prop="name">
- <el-row :gutter="20">
- <el-col :span="6">
- <el-input v-model="formData3.前工序废" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="3">
- <el-form-item label="来料异常" prop="name">
- <el-row :gutter="20">
- <el-col :span="6">
- <el-input v-model="formData3.来料异常" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="3">
- <el-form-item label="联数" prop="name">
- <el-row :gutter="20">
- <el-col :span="4">
- <el-input v-model="formData3.联数" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="墨色" prop="name">
- <el-row :gutter="20">
- <el-col :span="4">
- <el-input v-model="formData3.墨色" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- </el-row>
-
-
- <el-row :gutter="20">
- <el-col :span="4">
- <el-form-item label="装版总工时" prop="id">
- <el-input v-model="formData3.装版总工时" :clearable="true" placeholder="2023.12.14" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="打样总工时" prop="name">
- <el-row :gutter="20">
- <el-col :span="40">
- <el-input v-model="formData3.打样总工时" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="通电时间" prop="name">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-input v-model="formData3.通电时间" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- </el-row>
-
-
- <el-row :gutter="20">
- <el-col :span="4">
- <el-form-item label="定额代号" prop="id">
- <el-input v-model="formData3.定额代号" :clearable="true" placeholder="2023.12.14" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="码包" prop="name">
- <el-row :gutter="20">
- <el-col :span="40">
- <el-input v-model="formData3.码包" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="主电表" prop="name">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-input v-model="formData3.主电表" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="辅电表" prop="name">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-input v-model="formData3.辅电表" :clearable="true" placeholder="ZT01733" />
- </el-col>
- </el-row>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20" style="margin-top: 10px;">
-
- <el-col :span="2">
- <el-form-item label="组员分配比例" prop="id"></el-form-item>
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
- <el-form-item label="特殊人员" prop="id"></el-form-item>
- </el-col>
- <el-col :span="2">
- <el-form-item label="拉料人员" prop="id"></el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20" style="margin-top: 10px;">
-
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bzdh" :clearable="true" placeholder="ZI00401" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh1" @keyup.enter.native="getygsubmit($event, '1')" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh2" @keyup.enter.native="getygsubmit($event, '2')" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh3" @keyup.enter.native="getygsubmit($event, '3')" :clearable="true" placeholder="打包废纸" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh4" @keyup.enter.native="getygsubmit($event, '4')" :clearable="true" placeholder="是" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh5" @keyup.enter.native="getygsubmit($event, '5')" :clearable="true" placeholder="ZI00401" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh6" @keyup.enter.native="getygsubmit($event, '6')" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh7" @keyup.enter.native="getygsubmit($event, '7')" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh8" @keyup.enter.native="getygsubmit($event, '8')" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh9" @keyup.enter.native="getygsubmit($event, '9')" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_bh10" @keyup.enter.native="getygsubmit($event, '10')" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.llbh" :clearable="true" placeholder="11.0" />
- </el-col>
- </el-row>
-
-
- <el-row :gutter="20" style="margin-top: 10px;">
-
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name1" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name2" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name3" :clearable="true" placeholder="打包废纸" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name4" :clearable="true" placeholder="是" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name5" :clearable="true" placeholder="ZI00401" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name6" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name7" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name8" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name9" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_name10" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.llname" :clearable="true" placeholder="11.0" />
- </el-col>
- </el-row>
-
- <el-row :gutter="20" style="margin-top: 10px;">
-
- <el-col :span="2">
-
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate1" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate2" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate3" :clearable="true" placeholder="打包废纸" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate4" :clearable="true" placeholder="是" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate5" :clearable="true" placeholder="ZI00401" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate6" :clearable="true" placeholder="瞿春生" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate7" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate8" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate9" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
- <el-input v-model="formData3.sczl_rate10" :clearable="true" placeholder="11.0" />
- </el-col>
- <el-col :span="2">
-
- </el-col>
- </el-row>
-
-
-
- <div style="width:85% margin-top:0px;" >
- <el-table
- tooltip-effect="dark"
- :data="chanliangselectData"
- row-key="ID"
- highlight-current-row="true"
- border
- style="width:85% "
- height="300px"
- @selection-change="chanliangSelectionChange"
- @row-dblclick="handleSelectClick"
- >
- <!-- 添加一个自定义的列,用于显示单选框 -->
- <el-table-column type="selection" width="55" label="选择" align="center"></el-table-column>
-
- <el-table-column
- prop="batch"
- label="物料编号"
- width="340"
- />
- <el-table-column
- prop="BOM_物料名称"
- label="物料名称"
- width="340"
- />
- <el-table-column
- prop="采购单号"
- label="采购单号"
- width="150"
- />
- <el-table-column
- prop="st_wlbh"
- label="供方批次"
- width="150"
- />
- <el-table-column
- prop="卷号"
- label="卷号"
- width="150"
- />
- </el-table>
- </div>
-
-
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="closeDialog">取 消</el-button>
- <el-button type="primary" @click="chanliangenterDialog">确 定</el-button>
- </div>
- </template>
- </el-dialog>
-
- </el-main>
- </el-container>
- </el-container>
- </div>
- </template>
- <script setup>
- import {
- createCompany,
- deleteCompany,
- deleteCompanyByIds,
- updateCompany,
- findCompany,
- getCompanyList
- } from '@/api/company'
- import {
- facilityTab,
- facilitychanLiang,
- facilityInspect,
- facilityProduction,
- facilityTeam,
- facilityMachineList,
- facilitySpotCheckItem,
- facilityInspectionItem,
- reportProduceInfo,
- reportName,
- reportInfo,
- reportMachineMac,
- facilityWorklist,
- setProcessStatus,
- submitDailyProduction,
- facilityDetail,
- inspectionRecord,
- getYg
- } from '@/api/jixiaoguanli/jitairibaobiao'
- import {
- demoCustomer
- } from "@/api/demo";
- // 全量引入格式化工具 请按需保留
- import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
- import { ElMessage, ElMessageBox } from 'element-plus'
- import { ref, reactive } from 'vue'
- defineOptions({
- name: 'Company'
- })
- let checked1=ref(false)
- let checked2=ref(false)
- let checked3=ref(false)
- const detailData = reactive([])
- const treeData=ref([
- {
- label: '胶印车间',
- level: 1 ,
- children: [{
- label: 'JY01# 【海德堡对开八色平板胶印机】',
- level: 2,
- }]}
- ])
- let dianjiantreeData;
- let JTMC=ref()
- const sbzyData = reactive([])
- const FPData = reactive([])
- const CLMXData = reactive([])
- let JYData = reactive([])
- const handleNodeClick = (nodeData,node) => {
- //存放当前节点的nodeId
- if (nodeData.level === 1) {
- console.log(node.label); // 第一级节点
- } else if (nodeData.level === 2) {
- console.log(node.label); // 第二级节点
- JTMC=node.label.split("【")[0]
- FacilityProduction()
- FacilityWorklist()
- FacilityTeam(JTMC)
- // InspectionRecord()
- // FacilityDetail()
- // ReportProduceInfo()
- console.log(JTMC)
- } else if (nodeData.level === 3) {
- console.log(node.label); // 第三级节点
- }
- // console.log(node.label)
- }
- //当前生产订单
- const FacilityProduction = async () => {
- const response = await facilityProduction({machine:JTMC});
- if (response.code === 0) {
- console.log(response)
- // 填充formData对象的基本字段
- formData.value.工单编号 = response.data.工单编号;
- formData.value.印件编号 = response.data.印件编号;
- formData.value.工序名称 = response.data.工序名称;
- formData.value.产品名称 = response.data.产品名称;
- // console.log()
- formData.value.班组 = response.data.班组;
- // 填充sczl_bh和sczl_name字段
- for (let i = 1; i <= 10; i++) {
- const sczl_bh = `sczl_bh${i}`;
- const sczl_name = `sczl_name${i}`;
- if (response.data[sczl_bh] ) {
- formData.value[sczl_bh] = response.data[sczl_bh]['员工编号'];
- formData.value[sczl_name] = response.data[sczl_bh]['员工姓名'];
- console.log(response.data[sczl_bh]['员工姓名'])
- console.log(formData.value.sczl_bh)
- // console.log(sczl_name)
- } else {
- // 如果字段不存在,可以在这里进行处理
- // console.log('2');
- // formData.value[sczl_bh] = response.data[sczl_bh]['员工编号'];
- // formData.value[sczl_name] = response.data[sczl_bh]['员工姓名'];
- // console.log(formData.value.sczl_bh)
- // console.log(sczl_name)
- }
- }
- InspectionRecord()
- FacilityDetail()
- // 输出填充后的formData对象
- // console.log(formData.value);
- }
- // getTableData()
- }
- //设备工作清单
- const FacilityWorklist = async () => {
- const response = await facilityWorklist({machine:JTMC});
- if (response.code === 0) {
- console.log(response)
- sbzyData.splice(0, sbzyData.length, ...response.data);
- }
- }
- //检验记录
- const InspectionRecord = async () => {
- console.log(formData.value.班组)
- const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2312191',team:formData.value.班组});
- console.log(response)
- if(response.code==0){
- // 提取 inspectiontime 作为列名
- // Extract inspectiontime as columnNames
- columnNames = response.data.inspectiontime;
- // Populate drzcData with row data
- for (const key in response.data) {
- if (key !== 'inspectiontime') {
- const item = response.data[key];
- const rowData = {
- '工单编号': item['工单编号'],
- '印件号': item['印件号'],
- '工序名称': item['工序名称'],
- '检验项目': item['检验项目']
- };
- // Initialize time columns with '—'
- columnNames.forEach(time => {
- rowData[time] = '';
- });
- // Split inspectresult and fill the corresponding time columns
- const results = item['inspectresult'].split(',');
- results.forEach(result => {
- if (columnNames.includes(result)) {
- rowData[result] = '√';
- }else{rowData[result] = ''}
- });
- // Add the row data to drzcData
- JYData.push(rowData);
- }
- }
- console.log(JYData);
- }
- }
- //当班产量明细
- const FacilityDetail = async () => {
- const response = await facilityDetail({ machine: JTMC, Gd_gdbh: '2312191', team: formData.value.班组 });
- if (response.code === 0) {
- console.log(response);
- CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
- }
- };
- //员工编号回车事件
- const getygsubmit = (event, inputName) => {
- console.log(inputName)
-
- let combinedString = 'sczl_bh' + inputName;
- console.log(combinedString)
- // let variableName = 'sczl_gdbh'+inputName;
- let variableValue = eval('formData3.value.' + combinedString);
- console.log(variableValue)
- GetYg(variableValue,inputName)
- }
- //获取员工信息
- const GetYg = async (value,inputName) => {
- const response = await getYg({sczl_bh:value});
- console.log(response)
- if (response.code === 0) {
- console.log(response.data.ygxm)
- let Bname = 'sczl_name' + inputName;
- formData3.value[Bname]=response.data.ygxm
- // console.log(formData.value[Bname])
- }
- }
- // 验证规则
- const rule = reactive({
- })
- const searchRule = reactive({
- createdAt: [
- { validator: (rule, value, callback) => {
- if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
- callback(new Error('请填写结束日期'))
- } else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
- callback(new Error('请填写开始日期'))
- } else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value.endCreatedAt.getTime())) {
- callback(new Error('开始日期应当早于结束日期'))
- } else {
- callback()
- }
- }, trigger: 'change' }
- ],
- })
- const elFormRef = ref()
- const elSearchFormRef = ref()
- // =========== 表格控制部分 ===========
- const page = ref(1)
- const total = ref(0)
- const pageSize = ref(10)
- const tableData = ref([])
- const searchInfo = ref({})
- // 重置
- const onReset = () => {
- searchInfo.value = {}
- getTableData()
- }
- // 搜索
- const onSubmit = () => {
- elSearchFormRef.value?.validate(async(valid) => {
- if (!valid) return
- page.value = 1
- pageSize.value = 10
- getTableData()
- })
- }
- // 分页
- const handleSizeChange = (val) => {
- pageSize.value = val
- getTableData()
- }
- // 修改页面容量
- const handleCurrentChange = (val) => {
- page.value = val
- getTableData()
- }
- const getTableData = async () => {
- const response = await facilityTab();
- if (response.code === 0 && response.data) {
- const workshops = response.data; // 车间数据
- // 在推送新项之前将 treeData 重置为空数组
- treeData.value = []; // 使用 .value 访问响应式引用的值
- for (const workshopName in workshops) {
- const workshopNode = {
- label: workshopName,
- children: [],
- level: 1 // 添加层级属性
- };
- const machines = workshops[workshopName]; // 车间下的机器
- for (const machineName in machines) {
- const machineNode = {
- label: machineName,
- children: [],
- level: 2, // 添加层级属性
- parentNode: workshopNode
- };
-
- // Now that machineNode is initialized, you can refer to it
- const childrenNodes = machines[machineName].map(dateTime => {
- const dateOnly = dateTime.split(' ')[0];
- return {
- label: dateOnly,
- level: 3, // 添加层级属性
- parentNode: machineNode
- };
- });
-
- // Assign the childrenNodes to the machineNode's children property
- machineNode.children = childrenNodes;
-
- // Finally, push the machineNode to the workshopNode's children array
- workshopNode.children.push(machineNode);
- }
- // 将 workshopNode 推送到响应式 treeData 数组
- treeData.value.push(workshopNode);
- }
- }
- };
- // 查询
- const getTableList = async() => {
- const table = await getCompanyList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value })
- if (table.code === 0) {
- tableData.value = table.data.list
- total.value = table.data.total
- page.value = table.data.page
- pageSize.value = table.data.pageSize
- }
- }
- // getTableData()
- //删除
- function onDel() {
-
- }
- //完工
- function onOver() {
- SetProcessStatus()
- }
- //完工事件
- const SetProcessStatus = async () => {
- console.log(formData.value.工单编号)
- console.log(formData.value.印件编号)
- // console.log(formData.value.工单编号)
- const RESCODE={
- order:'2401714',
- yjno:'1',
- gxh:'1',
- }
- const response = await setProcessStatus(RESCODE);
- if (response.code === 0) {
-
- console.log(333)
- }
- console.log(response)
- }
- import { nextTick } from 'vue';
- //设备点检
- function ondianjian() {
- getSpotCheckItem(JTMC).then(treeData => {
- if (treeData) {
- // 如果获取成功,treeData 就是我们需要的树形结构数据
- dianjiantreeData = treeData;
- console.log('222');
- console.log(dianjiantreeData);
- // 使用 nextTick 来确保在更新 dianjianVisible 后立即刷新视图
- nextTick(() => {
- dianjianVisible.value = true;
- });
- // 这里可以处理treeData,例如将其赋值给某个状态管理变量或者用于渲染界面
- } else {
- // 如果获取失败,则treeData为null
- console.log('获取巡检项目树形结构数据失败');
- }
- });
-
- }
- const chanliangselectData = reactive([])
- const chanliangVisible = ref(false)
- //日产量上报
- function onchanliang() {
- console.log(JTMC.split("#")[0]); // 通过value属性获取ref对象的值,然后再调用split方法
- chanliangVisible.value=true
- ReportInfo()
- }
- //日产量详情获取
- const ReportInfo = async () => {
- const response = await reportInfo({ machine: JTMC.split("#")[0] });
- if (response.code === 0) {
- const { order_info, class: classInfo } = response.data;
- const newData = {
- order: order_info.order,
- yjno: order_info.yjno,
- gxh: order_info.gxh,
- gxmc: order_info.gxmc,
- product_name: order_info.product_name,
- yj_name: order_info.yj_name,
- gy_name: order_info.gy_name,
- sczl_jtbh: classInfo.sczl_jtbh,
- sczl_bzdh: classInfo.sczl_bzdh,
- sys_id: classInfo.sys_id,
- sys_rq: classInfo.sys_rq,
- mod_rq: classInfo.mod_rq,
- UniqId: classInfo.UniqId,
- sczl_bh1: classInfo.sczl_bh1,
- sczl_bh2: classInfo.sczl_bh2,
- sczl_bh3: classInfo.sczl_bh3,
- sczl_bh4: classInfo.sczl_bh4,
- sczl_bh5: classInfo.sczl_bh5,
- sczl_bh6: classInfo.sczl_bh6,
- sczl_bh7: classInfo.sczl_bh7,
- sczl_bh8: classInfo.sczl_bh8,
- sczl_bh9: classInfo.sczl_bh9,
- sczl_bh10: classInfo.sczl_bh10,
- sczl_name1: classInfo.sczl_name1,
- sczl_name2: classInfo.sczl_name2,
- sczl_name3: classInfo.sczl_name3,
- sczl_name4: classInfo.sczl_name4,
- sczl_name5: classInfo.sczl_name5,
- sczl_name6: classInfo.sczl_name6,
- sczl_name7: classInfo.sczl_name7,
- sczl_name8: classInfo.sczl_name8,
- sczl_name9: classInfo.sczl_name9,
- sczl_name10: classInfo.sczl_name10,
- sczl_rate1: classInfo.sczl_rate1,
- sczl_rate2: classInfo.sczl_rate2,
- sczl_rate3: classInfo.sczl_rate3,
- sczl_rate4: classInfo.sczl_rate4,
- sczl_rate5: classInfo.sczl_rate5,
- sczl_rate6: classInfo.sczl_rate6,
- sczl_rate7: classInfo.sczl_rate7,
- sczl_rate8: classInfo.sczl_rate8,
- sczl_rate9: classInfo.sczl_rate9,
- sczl_rate10: classInfo.sczl_rate10,
- };
- formData3.value = { ...formData3.value, ...newData };
- chanliangselectData.splice(0, chanliangselectData.length, ...response.data.bom)
- }
- // getTableData()
- }
- //日报表弹窗确定
- const chanliangenterDialog = async () => {
- SubmitDailyProduction()
- }
- //日报表上传
- const SubmitDailyProduction = async () => {
- const restoredData = {
- sczl_gdbh:formData3.value.order,
- sczl_yjno:formData3.value.yjno,
- sczl_gxh:formData3.value.gxh,
- sczl_gxmc: formData3.value.gxmc,
- sczl_bzdh: formData3.value.sczl_bzdh,
- sczl_bh1: formData3.value.sczl_bh1,
- sczl_bh2: formData3.value.sczl_bh2,
- sczl_bh3: formData3.value.sczl_bh3,
- sczl_bh4: formData3.value.sczl_bh4,
- sczl_bh5: formData3.value.sczl_bh5,
- sczl_bh6: formData3.value.sczl_bh6,
- sczl_bh7: formData3.value.sczl_bh7,
- sczl_bh8: formData3.value.sczl_bh8,
- sczl_bh9: formData3.value.sczl_bh9,
- sczl_bh10: formData3.value.sczl_bh10,
- sczl_rate1: formData3.value.sczl_rate1,
- sczl_rate2: formData3.value.sczl_rate2,
- sczl_rate3: formData3.value.sczl_rate3,
- sczl_rate4: formData3.value.sczl_rate4,
- sczl_rate5: formData3.value.sczl_rate5,
- sczl_rate6: formData3.value.sczl_rate6,
- sczl_rate7: formData3.value.sczl_rate7,
- sczl_rate8: formData3.value.sczl_rate8,
- sczl_rate9: formData3.value.sczl_rate9,
- sczl_rate10: formData3.value.sczl_rate10,
- sczl_jtbh: 'JY01',
- sczl_rq: formData3.value.日期,
- sczl_num: formData3.value.流程标牌,
- sczl_sj1: formData3.value.上机时间,
- sczl_sj2: formData3.value.下机时间,
- sczl_cl: formData3.value.产量,
- sczl_zcfp: formData3.value.制程废品,
- sczl_zccp: formData3.value.制程次品,
- last_fp: formData3.value.前工序废,
- less_sl: formData3.value.来料异常,
- sczl_ls: formData3.value.联数,
- sczl_ms: formData3.value.墨色,
- zb_time: formData3.value.装版总工时,
- dy_time: formData3.value.打样总工时,
- run_time: formData3.value.通电工时,
- sczl_dedh: formData3.value.定额代号,
- code: formData3.value.码包,
- main_meter: formData3.value.主电表,
- auxiliary_meter: formData3.value.辅电表,
- bom: formData3.value.formattedArray
- }
- console.log(restoredData)
- console.log(formData3.value.formattedArray)
- const response = await submitDailyProduction(restoredData);
- console.log(response)
- if (response.code === 0) {
-
- }
- }
- // let formattedArray
- // 产量单选
- const chanliangSelectionChange = (val) => {
- // if(val.length>0){
- // multipleSelection.value = val
- // const lenth=val.length
- // lastCellValue=val[lenth-1].UniqId
- // console.log(val)
- // val.splice(0, val.length); // 清空 val 数组
- // console.log(lastCellValue)
- // }
- const selectedItems =val
- // 存储batch和st_wlbh的数组
- formData3.value.formattedArray = selectedItems.map(item => `${item.batch}-${item.st_wlbh}`).join(',');
- console.log(formData3.value.formattedArray);
- // console.log(selectedItems)
- }
- //获取设备点检->检验项目
- const FacilityInspectionItem = async (value) => {
- try {
- // 调用接口获取巡检项目数据
- const response = await facilityInspectionItem({ unitName: value });
- // 检查接口返回的状态码
- if (response.code === 0) {
- console.log(response)
- dianjianselectData.splice(0, dianjianselectData.length, ...response.data)
- }
- } catch (error) {
- // 捕获并打印异常
- console.error("获取巡检项目数据出错:" + error);
- return null;
- }
- };
- //树形结构单机
- const dianjianselectData = reactive([])
- const dianjianNodeClick = (node, check, nodeData) => {
-
- console.log('111')
- if (node.children && node.children.length > 0) {
- // 点击的是父节点,且有子节点
- // 执行相应的父节点单击事件处理逻辑
- // 这里可以添加你想要的处理逻辑,比如展开/折叠节点等
- } else {
- // 点击的是子节点,或者没有子节点
- // 执行相应的子节点单击事件处理逻辑
- FacilityInspectionItem(node.label)
- }
- };
- let pandingfangfa=ref()
- //检验项目单击
- const dianjianhandle = async (val, row) => {
- try {
- console.log(val.判定标准);
- pandingfangfa.value = val.判定标准;
- } catch (error) {
- console.error('An error occurred:', error);
- }
- };
- const rowClassName = (row, column) => {
- try {
- if (row.unchecked) {
- return 'row-yellow';
- }
- return '';
- } catch (error) {
- console.error('An error occurred:', error);
- return '';
- }
- };
- // 异步函数,用于获取指定设备的巡检项目,并且将结果格式化为树形结构数据
- const getSpotCheckItem = async (machineName) => {
- try {
- // 调用接口获取巡检项目数据
- const response = await facilitySpotCheckItem({ machine: machineName });
- // 检查接口返回的状态码
- if (response.code === 0) {
- // 构建树形结构数据
- const childrenData = Object.entries(response.data).map(([id, label]) => {
- return {
- id, // 子节点的唯一标识
- label, // 子节点的标签
- children: [] // 初始化子节点数组
- };
- });
- // 创建包含父节点的树形结构数据
- const treeData = [{
- id: machineName, // 父节点的唯一标识
- label: machineName, // 父节点的标签
- children: childrenData // 子节点数据
- }];
- // 返回构建好的树形结构数据
- return treeData;
- } else {
- // 如果接口返回的状态码不是0,打印错误信息
- console.error("接口返回错误:" + response.msg);
- return null;
- }
- } catch (error) {
- // 捕获并打印异常
- console.error("获取巡检项目数据出错:" + error);
- return null;
- }
- };
- // 班组人员及分配比例
- const FacilityTeam = async (value) => {
- const response = await facilityTeam({ machine: value });
- if (response.code === 0) {
- console.log(response);
- // 清空 bzData 数组
- bzData.splice(0, bzData.length);
- // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
- const updatedData = response.data.map(item => {
- return { ...item, JTMC: value }; // 添加 JTMC 属性
- });
- // 将更新后的数据添加到 bzData 数组
- bzData.push(...updatedData);
- FPData.push(...updatedData)
- console.log(FPData)
- }
- };
- //班组维护
- function onBZ() {
- FacilityTeam(JTMC)
- fetchData()
- detailShow.value=true
- console.log('2222')
- }
- // 下拉框选项数据
- const dropdownOptions = ref([]);
- // 选中的选项
- const selectedOption = ref('');
- // 获取接口数据并转换为下拉框需要的格式
- const fetchData = async () => {
- try {
- // Simulate API call
- const response = await facilityMachineList();
- if (response.code === 0) {
- // Transform data format
- const options = response.data.map((item) => ({
- label: item,
- value: item
- }));
- dropdownOptions.value = options;
- // Default to selecting the first option
- const defaultOption = options.find(option => option.value === JTMC);
- if (defaultOption) {
- selectedOption.value = defaultOption.value;
- } else if (options.length > 0) {
- // 如果 myDefaultValue 不在选项中,选择第一个选项
- selectedOption.value = options[0].value;
- }
- }
- } catch (error) {
- console.error('Error fetching data:', error);
- // Handle the error appropriately
- }
- };
- // formData
- let BZMC=ref()
- let lastCellValue=ref()
- let parts =reactive([])
- const formData3= ref({
- order:'',
- yjno:'',
- gxh:'',
- gxmc:'',
- product_name:'',
- yj_name:'',
- gy_name:'',
- sczl_jtbh:'',
- sczl_bzdh:'',
- sys_id:'',
- sys_rq:'',
- mod_rq:'',
- UniqId:'',
- sczl_bh1:'',
- sczl_bh2:'',
- sczl_bh3:'',
- sczl_bh4:'',
- sczl_bh5:'',
- sczl_bh6:'',
- sczl_bh7:'',
- sczl_bh8:'',
- sczl_bh9:'',
- sczl_bh10:'',
- sczl_name1:'',
- sczl_name2:'',
- sczl_name3:'',
- sczl_name4:'',
- sczl_name5:'',
- sczl_name6:'',
- sczl_name7:'',
- sczl_name8:'',
- sczl_name9:'',
- sczl_name10:'',
- sczl_rate1:'',
- sczl_rate2:'',
- sczl_rate3:'',
- sczl_rate4:'',
- sczl_rate5:'',
- sczl_rate6:'',
- sczl_rate7:'',
- sczl_rate8:'',
- sczl_rate9:'',
- sczl_rate10:'',
- 日期:'',
- 流程标牌:'',
- 上机时间:'',
- 下机时间:'',
- 产量:'',
- 制程废品:'',
- 制程次品:'',
- 前工序废:'',
- 来料异常:'',
- 联数:'',
- 墨色:'',
- 装版总工时:'',
- 打样总工时:'',
- 通电工时:'',
- 定额代号:'',
- 码包:'',
- 主电表:'',
- 辅电表:'',
- formattedArray:'',
- })
- // 自动化生成的字典(可能为空)以及字段
- const formData= ref({
- 工单编号:'',
- 印件编号:'',
- 工序名称:'',
- 产品名称:'',
- sczl_bh1:'',
- sczl_bh2:'',
- sczl_bh3:'',
- sczl_bh4:'',
- sczl_bh5:'',
- sczl_bh6:'',
- sczl_bh7:'',
- sczl_bh8:'',
- sczl_bh9:'',
- sczl_bh10:'',
- sczl_name1:'',
- sczl_name2:'',
- sczl_name3:'',
- sczl_name4:'',
- sczl_name5:'',
- sczl_name6:'',
- sczl_name7:'',
- sczl_name8:'',
- sczl_name9:'',
- sczl_name10:'',
- 班组:'',
- })
- const formDatasData= reactive([])
- const formDatas = ref({
- code1:'',
- code2:'',
- code3:'',
- code4:'',
- code5:'',
- code6:'',
- code7:'',
- code8:'',
- code9:'',
- code10:'',
- name1:'',
- name2:'',
- name3:'',
- name4:'',
- name5L:'',
- name6:'',
- name7:'',
- name8:'',
- name9:'',
- name10:'',
- percentage1:'',
- percentage2:'',
- percentage3:'',
- percentage4:'',
- percentage5:'',
- percentage6:'',
- percentage7:'',
- percentage8:'',
- percentage9:'',
- percentage10:'',
- })
- //班组单击
- const BZhandle = (val, row) => {
- formDatas.value = {};
- for (const key in val) {
- if (val[key] === 0) {
- break;
- }
- const parts = val[key].split(/[\s()]+/);
- const code = parts[0];
- const name = parts[1];
- const percentage = parts[2];
- // 根据索引填充不同的字段
- const index = parseInt(key) + 1; // 索引从1开始
- formDatas.value['code' + index] = code;
- formDatas.value['name' + index] = name;
- formDatas.value['percentage' + index] = percentage;
- }
- };
-
- // ============== 表格控制部分结束 ===============
- // 获取需要的字典 可能为空 按需保留
- const setOptions = async () =>{
- }
- // 获取需要的字典 可能为空 按需保留
- setOptions()
- // 多选数据
- const multipleSelection = ref([])
- // 多选
- const handleSelectionChange = (val) => {
- multipleSelection.value = val
- }
- // 删除行
- const deleteRow = (row) => {
- ElMessageBox.confirm('确定要删除吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- deleteCompanyFunc(row)
- })
- }
- // 批量删除控制标记
- const deleteVisible = ref(false)
- // 多选删除
- const onDelete = async() => {
- const ids = []
- if (multipleSelection.value.length === 0) {
- ElMessage({
- type: 'warning',
- message: '请选择要删除的数据'
- })
- return
- }
- multipleSelection.value &&
- multipleSelection.value.map(item => {
- ids.push(item.ID)
- })
- const res = await deleteCompanyByIds({ ids })
- if (res.code === 0) {
- ElMessage({
- type: 'success',
- message: '删除成功'
- })
- if (tableData.value.length === ids.length && page.value > 1) {
- page.value--
- }
- deleteVisible.value = false
- getTableData()
- }
- }
- // 行为控制标记(弹窗内部需要增还是改)
- const type = ref('')
- // 更新行
- const updateCompanyFunc = async(row) => {
- const res = await findCompany({ ID: row.ID })
- type.value = 'update'
- if (res.code === 0) {
- formData.value = res.data.recompany
- dialogFormVisible.value = true
- }
- }
- // 删除行
- const deleteCompanyFunc = async (row) => {
- const res = await deleteCompany({ ID: row.ID })
- if (res.code === 0) {
- ElMessage({
- type: 'success',
- message: '删除成功'
- })
- if (tableData.value.length === 1 && page.value > 1) {
- page.value--
- }
- getTableData()
- }
- }
- // 弹窗控制标记
- const dialogFormVisible = ref(false)
- const dianjianVisible = ref(false)
- // 查看详情控制标记
- const detailShow = ref(false)
- const bzData = reactive([])
- // 打开详情弹窗
- const openDetailShow = () => {
- detailShow.value = true
- }
- // 打开详情
- const getDetails = async (row) => {
- // 打开弹窗
- const res = await findCompany({ ID: row.ID })
- if (res.code === 0) {
- formData.value = res.data.recompany
- openDetailShow()
- }
- }
- // 关闭详情弹窗
- const closeDetailShow = () => {
- detailShow.value = false
- // formData.value = {
- // address: '',
- // image: '',
- // name: '',
- // }
- }
- // 打开弹窗
- const openDialog = () => {
- // type.value = 'create'
-
- // console.log('222')
- // FacilityInspect()
- // dialogFormVisible.value = true
- }
- let drzcData=[]
- let columnNames=[]
- //当日制程检验记录
- const FacilityInspect = async () => {
- const response = await facilityInspect({machine:'JY01#',date:'2024-01-04'});
- console.log(response)
- if(response.code==0){
- // 提取 inspectiontime 作为列名
- // Extract inspectiontime as columnNames
- columnNames = response.data.inspectiontime;
- // Populate drzcData with row data
- for (const key in response.data) {
- if (key !== 'inspectiontime') {
- const item = response.data[key];
- const rowData = {
- '工单编号': item['工单编号'],
- '印件号': item['印件号'],
- '工序名称': item['工序名称'],
- '检验项目': item['检验项目']
- };
- // Initialize time columns with '—'
- columnNames.forEach(time => {
- rowData[time] = '';
- });
- // Split inspectresult and fill the corresponding time columns
- const results = item['inspectresult'].split(',');
- results.forEach(result => {
- if (columnNames.includes(result)) {
- rowData[result] = '√';
- }else{rowData[result] = ''}
- });
- // Add the row data to drzcData
- drzcData.push(rowData);
- }
- }
- console.log(drzcData);
- }
- }
- // 关闭弹窗
- const closeDialog = () => {
- dialogFormVisible.value = false
- formData.value = {
- address: '',
- image: '',
- name: '',
- }
- }
- // 弹窗确定
- const enterDialog = async () => {
- elFormRef.value?.validate( async (valid) => {
- if (!valid) return
- let res
- switch (type.value) {
- case 'create':
- res = await createCompany(formData.value)
- break
- case 'update':
- res = await updateCompany(formData.value)
- break
- default:
- res = await createCompany(formData.value)
- break
- }
- if (res.code === 0) {
- ElMessage({
- type: 'success',
- message: '创建/更改成功'
- })
- closeDialog()
- getTableData()
- }
- })
- }
- </script>
- <style>
- .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;
- }
- .groupbox
- {margin:10px;
- width:500px;
- height:500px;
- border:thin solid black;
- padding:10px}
- .grouptitle
- {display:block;
- margin-top:-24px;
- margin-left:20px;
- width:150px;
- text-align:center;
- background-color:white}
- </style>
|