| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123 |
- <template>
- <div class="ele-body">
- <div class="page-title">
- <el-page-header @back="$router.go(-1)">
- <div slot="content" class="pageContent">
- <div>详情</div>
- </div>
- </el-page-header>
- </div>
- <progressBox v-if="tabList.length" :list="tabList" :total="infoData.formingNum"/>
- <el-card>
- <el-descriptions title="" direction="vertical" :column="7" border>
- <el-descriptions-item label="工单号">{{infoData.code}}</el-descriptions-item>
- <el-descriptions-item label="生产版本" >{{infoData.produceVersionName}}</el-descriptions-item >
- <!-- <el-descriptions-item label="工单类型">苏州市</el-descriptions-item> -->
- <el-descriptions-item label="产线">{{infoData.productLine}}</el-descriptions-item>
- <el-descriptions-item label="工艺路线版本">{{infoData.routingVersion}}</el-descriptions-item>
- <el-descriptions-item label="计划编号">{{infoData.productionPlanCode}}</el-descriptions-item>
- <el-descriptions-item label="计划类型">{{typeList[infoData.planType]}}</el-descriptions-item>
- <el-descriptions-item label="产品编码">{{infoData.productCode}}</el-descriptions-item>
- <el-descriptions-item label="产品名称">{{infoData.productName}}</el-descriptions-item>
- <el-descriptions-item label="牌号 | 型号">{{infoData.brandNo}} | {{infoData.model}}</el-descriptions-item>
- <el-descriptions-item label="要求成型数量(PCS)">{{infoData.formingNum}}</el-descriptions-item>
- <el-descriptions-item label="要求成型重量(KG)">{{infoData.formingWeight}}</el-descriptions-item>
- <el-descriptions-item label="计划开始时间">{{infoData.planStartTime}}</el-descriptions-item>
- <el-descriptions-item label="实际开始时间">{{infoData.startTime}}</el-descriptions-item>
- <el-descriptions-item label="已成型数量(PCS)">{{infoData.formedNum}}</el-descriptions-item>
- <el-descriptions-item label="已成型重量(KG)">{{infoData.formedWeight}}</el-descriptions-item>
- <el-descriptions-item label="已交付数量(PCS)">{{infoData.deliveredQuantity}}</el-descriptions-item>
- <el-descriptions-item label="已交付重量(KG)">{{infoData.deliveredWeight}}</el-descriptions-item>
- <el-descriptions-item label="工单状态">{{statusList[infoData.status]}}</el-descriptions-item>
- <el-descriptions-item label="完成时间">{{infoData.completionTime}}</el-descriptions-item>
- <el-descriptions-item label="生产周期">{{infoData.productionCycle}}</el-descriptions-item>
- </el-descriptions>
- </el-card>
- <el-card v-if="tabList.length">
- <el-tabs v-model="activeName" type="card"
- @tab-click="handleTabClick"
- >
- <el-tab-pane
- :label="item.taskTypeName"
- :name=" JSON.stringify(index) "
- v-for="(item,index) in tabList"
- :key="item.taskCode"
- ></el-tab-pane>
- <!-- <el-tab-pane label="挤压成型" name="1"> </el-tab-pane>
- <el-tab-pane label="自然干燥" name="2"></el-tab-pane>
- <el-tab-pane label="升温干燥" name="3"></el-tab-pane>
- <el-tab-pane label="半加定长" name="4"></el-tab-pane>
- <el-tab-pane label="备炉" name="5"></el-tab-pane>
- <el-tab-pane label="烧结" name="6"></el-tab-pane>
- <el-tab-pane label="深加工" name="7"></el-tab-pane>
- <el-tab-pane label="包装" name="8"></el-tab-pane>
- <el-tab-pane label="入库" name="9"></el-tab-pane> -->
- </el-tabs>
- <ele-pro-table
- :columns="columnOpt[ tabList[activeName].taskTypeName ] || columnOpt['深加工'] "
- :datasource="datasource"
- :key="activeName"
- :cache-key="`produceDetal${activeName}`"
- :initLoad="false"
- ref="table"
- >
- <template v-slot:toolbar>
- <div class="tips-box">
- <ul v-if="chooseItem == '挤压成型'">
- <li>
- <span class="label">累计合格品数量</span>
- {{countMsg.standardTotalNum}}PCS
- </li>
- <li>
- <span class="label">累计合格品重量</span>
- {{countMsg.standardTotalWeight}}PCS
- </li>
- <li>
- <span class="label">累计投料重量</span>
- {{countMsg.feedMaterielWeight}}PCS
- </li>
- </ul>
- <ul v-else-if="['自然干燥', '升温干燥', '半加定长'].includes(chooseItem)">
- <li>
- <span class="label">累计合格品数量</span>
- {{countMsg.standardTotalNum}}PCS
- </li>
- <li>
- <span class="label">累计合格品重量</span>
- {{countMsg.standardTotalWeight}}PCS
- </li>
- <li>
- <span class="label">累计投料产品重量</span>
- {{countMsg.feedProductWeight}}PCS
- </li>
- </ul>
- <ul v-else-if="['备炉'].includes(chooseItem)">
- <li>
- <span class="label">累计交接数量</span>
- {{countMsg.joinTotalNum}}PCS
- </li>
- <li>
- <span class="label">累计实际数量</span>
- {{countMsg.joinTotalNum}}PCS
- </li>
- </ul>
- <ul v-else-if="['烧结', '质检', '深加工'].includes(chooseItem)">
- <li>
- <span class="label">累计合格品数量</span>
- {{countMsg.standardTotalNum}}PCS
- </li>
- <li>
- <span class="label">累计合格品重量</span>
- {{countMsg.standardTotalWeight}}PCS
- </li>
- <li>
- <span class="label">累计投料数量</span>
- {{countMsg.joinTotalNum}}PCS
- </li>
- </ul>
- <ul v-else-if="['包装'].includes(chooseItem)">
- <li>
- <span class="label">累计交接数量</span>
- {{countMsg.joinTotalNum}}PCS
- </li>
- <li>
- <span class="label">累计实际数量</span>
- {{countMsg.joinTotalNum}}PCS
- </li>
- <li>
- <span class="label">累计包装数量</span>
- {{countMsg.packTotalNum}}PCS
- </li>
- <li>
- <span class="label">累计包装产品数量</span>
- {{countMsg.packProductTotalNum}}PCS
- </li>
- </ul>
- <ul v-else-if="['缴库'].includes(chooseItem)">
- <li>
- <span class="label">累计交接数量</span>
- {{countMsg.joinTotalNum}}PCS
- </li>
- <li>
- <span class="label">累计批次数量</span>
- {{countMsg.inStoreBatchNum}}PCS
- </li>
- <li>
- <span class="label">累计产品数量</span>
- {{countMsg.joinTotalNum}}PCS
- </li>
- </ul>
- <!-- <el-link type="primary" v-if="activeName == 1" @click="openOther"
- >其他任务记录</el-link
- > -->
- </div>
- </template>
- <template v-slot:bom="{ row }">
- <el-link type="primary" @click="check(row)">查看</el-link>
- </template>
- <template v-slot:action="{ row }">
- <el-link type="primary" @click="writeOff(row)">冲销</el-link>
- </template>
- </ele-pro-table>
- </el-card>
- <otherMission ref="otherMissionRef" />
- <bomList ref="bomListRef" />
- </div>
- </template>
- <script>
- import progressBox from './components/progressBox';
- import otherMission from './components/otherMission';
- import bomList from './components/bomList';
- import { getTaskListById } from '@/api/mainData/index.js';
- import { reportPage , getInfoById , reportCount , writeOffWork } from '@/api/produceOrder/index.js';
- export default {
- components: {
- otherMission,
- progressBox,
- bomList
- },
- data () {
- return {
- infoData:{},
- descriptionsShow: true,
- activeName: '1',
- tabList:[],
- columnOpt: {
- 挤压成型: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '投料时间',
- prop: 'feedingTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '投料重量',
- prop: 'feedingWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '投料执行人',
- prop: 'feedingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '设备编码',
- prop: 'deviceCode',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '设备名称',
- prop: 'deviceName',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工时间',
- prop: 'reportWorkTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工执行人',
- prop: 'reportingOperator',
- minWidth: 100,
- align: 'center'
- },
- // {
- // label: '周转车编码',
- // prop: 'transferCarCode'
- // },
- {
- label: '合格品数量',
- prop: 'standardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品重量',
- prop: 'standardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品数量',
- prop: 'noStandardNum',
- minWidth: 120,
- align: 'center'
- },
- {
- label: '不合格品重量',
- prop: 'noStandardWeight',
- minWidth: 120,
- align: 'center'
- },
- {
- label: '副产品重量',
- prop: 'secondaryProductWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ],
- 自然干燥: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '投料时间',
- prop: 'feedingTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '投料执行人',
- prop: 'feedingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '产品数量',
- prop: 'productNum',
- minWidth: 100,
- align: 'center'
- },
- // {
- // label: '周转车编码',
- // prop: 'transferCarCode'
- // },
- {
- label: '区域编码',
- prop: 'areaCode',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '干燥时长',
- prop: 'dryingDuration',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工时间',
- prop: 'reportWorkTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工执行人',
- prop: 'reportingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品数量',
- prop: 'standardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品重量',
- prop: 'standardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品数量',
- prop: 'noStandardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品重量',
- prop: 'noStandardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '副产品重量',
- prop: 'secondaryProductWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ],
- 升温干燥: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '投料时间',
- prop: 'feedingTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '投料执行人',
- prop: 'feedingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '产品数量',
- prop: 'productNum',
- minWidth: 100,
- align: 'center'
- },
- // {
- // label: '周转车编码',
- // prop: 'transferCarCode'
- // },
- {
- label: '设备编码',
- prop: 'deviceCode',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '设备名称',
- prop: 'deviceName',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '升温曲线',
- prop: 'temperatureRamp',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工时间',
- prop: 'reportWorkTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工执行人',
- prop: 'reportingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品数量',
- prop: 'standardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品重量',
- prop: 'standardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品数量',
- prop: 'noStandardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品重量',
- prop: 'noStandardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '副产品重量',
- prop: 'secondaryProductWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ],
- 半加定长: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '投料时间',
- prop: 'feedingTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '投料执行人',
- prop: 'feedingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '产品数量',
- prop: 'productNum',
- minWidth: 100,
- align: 'center'
- },
- // {
- // label: '周转车编码',
- // prop: 'transferCarCode'
- // },
- {
- label: '设备编码',
- prop: 'deviceCode',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '设备名称',
- prop: 'deviceName',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工时间',
- prop: 'reportWorkTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工执行人',
- prop: 'reportingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品数量',
- prop: 'standardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品重量',
- prop: 'standardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品数量',
- prop: 'noStandardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品重量',
- prop: 'noStandardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '副产品重量',
- prop: 'secondaryProductWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ],
- 备炉: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '交接时间',
- prop: 'handoverTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '交接执行人',
- prop: 'handoverOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '交接数量',
- prop: 'handoverQuantity',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '实际数量',
- prop: 'actualQuantity',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '执行时间',
- prop: 'executionTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '执行人',
- prop: 'executor',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '设备编码',
- prop: 'deviceCode',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '设备名称',
- prop: 'deviceName',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '烧结曲线',
- prop: 'sinteringCurve',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ],
- 烧结: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '报工时间',
- prop: 'reportWorkTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工执行人',
- prop: 'reportingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品数量',
- prop: 'standardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品重量',
- prop: 'standardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品数量',
- prop: 'noStandardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品重量',
- prop: 'noStandardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '副产品重量',
- prop: 'secondaryProductWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ],
- 质检: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '报工时间',
- prop: 'reportWorkTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工执行人',
- prop: 'reportingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品数量',
- prop: 'standardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品重量',
- prop: 'standardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品数量',
- prop: 'noStandardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品重量',
- prop: 'noStandardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '副产品重量',
- prop: 'secondaryProductWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ],
- 深加工: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '交接时间',
- prop: 'handoverTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '交接执行人',
- prop: 'handoverOperator',
- minWidth: 120,
- align: 'center'
- },
- {
- label: '交接数量',
- prop: 'handoverQuantity'
- },
- {
- label: '实际数量',
- prop: 'actualQuantity'
- },
- {
- label: '投料时间',
- prop: 'feedingTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '投料执行人',
- prop: 'feedingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '设备编码',
- prop: 'deviceCode',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '设备名称',
- prop: 'deviceName',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工时间',
- prop: 'reportWorkTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工执行人',
- prop: 'reportingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品数量',
- prop: 'standardNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '合格品重量',
- prop: 'standardWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '不合格品数量',
- prop: 'noStandardNum',
- minWidth: 120,
- align: 'center'
- },
- {
- label: '不合格品重量',
- prop: 'noStandardWeight',
- minWidth: 120,
- align: 'center'
- },
- {
- label: '副产品重量',
- prop: 'secondaryProductWeight',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ],
- 包装: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '交接时间',
- prop: 'handoverTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '交接执行人',
- prop: 'handoverOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '交接数量',
- prop: 'handoverQuantity',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '实际数量',
- prop: 'actualQuantity',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工时间',
- prop: 'reportWorkTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工执行人',
- prop: 'reportingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '包装数量',
- prop: 'packNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '包装产品数量',
- prop: 'packagedProductQuantity',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '尾料数量',
- prop: 'surplusNum',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '物料清单',
- prop: 'materialList',
- minWidth: 100,
- align: 'center',
- slot: 'bom'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ],
- 缴库: [
- {
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center'
- },
- {
- label: '交接时间',
- prop: 'handoverTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '交接执行人',
- prop: 'handoverOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '交接数量',
- prop: 'handoverQuantity',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '实际数量',
- prop: 'actualQuantity',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工时间',
- prop: 'reportWorkTime',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '报工执行人',
- prop: 'reportingOperator',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '批次数量',
- prop: 'batchQuantity',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '入库数量',
- prop: 'inboundQuantity',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '交货仓库',
- prop: 'deliveryWarehouse',
- minWidth: 100,
- align: 'center'
- },
- {
- label: '操作',
- slot: 'action'
- }
- ]
- },
- workOrderId:'',
- taskCode:'',
- typeList:{
- 1:'内销订单',
- 2:'外销订单',
- 3:'预制订单'
- },
- statusList:{
- 4:'待生产',
- 5:'生产中',
- 6:'已完成',
- 7:'已延期'
- },
- countMsg: {},
- chooseIndex:0,
- chooseItem:'',
- request:{
- isLast:0,
- nextCompleteNum:0,
- completeNum:0
- }
- };
- },
- created () {
- this.workOrderId = this.$route.query.id
- this.getInfo(this.workOrderId)
- },
- methods: {
- handleTabClick(tab){
- if(this.chooseIndex != tab.index ){
- this.chooseIndex = Number(tab.index)
- const chooseItem = this.tabList[this.chooseIndex]
- this.chooseItem = this.tabList[this.chooseIndex].taskTypeName
- this.activeName = tab.index
- this.taskCode = chooseItem.taskCode || ''
- this.reload({workOrderId:this.workOrderId, taskCode:this.taskCode})
- this.getReportCount()
- this.setData()
- }
- },
- setData(){
- this.request.completeNum = this.tabList[this.chooseIndex].number
- if(this.chooseIndex==this.tabList.length-1){
- this.request.isLast = 1
- }else{
- this.request.isLast = 0
- this.request.nextCompleteNum = this.tabList[this.chooseIndex+1].number
- }
- },
- async datasource({ page, limit,where }) {
- const res = await reportPage({ ...where, pageNum:page, size:limit })
- if(typeof res.list == 'string'){
- res.list = []
- }
- return res
- },
- /* 刷新表格 */
- reload (where) {
- this.$nextTick(() =>
- this.$refs.table.reload({ page: 1, limit: 10, where })
- );
- },
- async getInfo(id){
- const res = await getInfoById(id)
- this.infoData = res
- if(typeof res.taskTypeProcessDiagrams == 'string' ){
- this.tabList = []
- }else{
- this.tabList = res.taskTypeProcessDiagrams
- }
- // this.activeName = this.tabList[0]?.taskTypeName || ''
- this.chooseItem = this.tabList[0]?.taskTypeName
- this.activeName = 0
- this.taskCode = this.tabList[0]?.taskCode || ''
- this.chooseIndex = 0
- this.reload({workOrderId:this.workOrderId, taskCode:this.taskCode})
- this.getReportCount()
- this.setData()
- },
- async getReportCount () {
- const res = await reportCount({
- taskCode: this.taskCode,
- workOrderId: this.workOrderId
- });
- this.countMsg = res;
- },
- openOther () {
- this.$refs.otherMissionRef.open();
- },
-
- // 冲销
- writeOff(row){
- const h = this.$createElement
- this.$confirm('', {
- message:h('div',null, [
- h('i',{ class:'el-icon-question',style:'color:#f90;font-size:30px;' }),
- h('span',{ style:'margin-left:10px;font-size:16px;line-height:30px;font-weight:600;vertical-align:top;'}, '提示'),
- h('p',{ style:'margin:10px 0 0 40px;color:red' },'是否要撤销本次报工?')
- ]),
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- })
- .then(() => {
- console.log('row',row)
- const data = {
- taskCode:this.taskCode,
- taskName:this.chooseItem,
- reportId:row.id,
- writeOffNum:row.standardNum,
- ...this.request
- }
- writeOffWork(data).then(res=>{
- if(res==1){
- this.$message.success('冲销成功');
- this.reload({workOrderId:this.workOrderId, taskCode:this.taskCode})
- }else if(res==0){
- this.$confirm('', {
- message:h('div',null, [
- h('i',{ class:'el-icon-question',style:'color:#f90;font-size:30px;' }),
- h('span',{ style:'margin-left:10px;font-size:16px;line-height:30px;font-weight:600;vertical-align:top;color:red'}, '冲销失败'),
- h('p',{ style:'margin:10px 0 0 40px' },'冲销后的总数不可小于下道工序的总数')
- ]),
- confirmButtonText: '确定',
- showCancelButton: false
- })
- .then(() => {
- })
- .catch(() => {});
- }else{
- this.$message.error('接口异常');
- }
- })
- })
- .catch(() => {});
- },
-
- check(row){
- this.$refs.bomListRef.open(row);
- }
-
-
- }
- };
- </script>
- <style lang="scss" scoped>
- .el-tabs {
- margin-top: 20px;
- }
- .tips-box {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-right: 20px;
- ul {
- list-style: none;
- display: flex;
- justify-content: flex-start;
- li {
- margin-right: 40px;
- }
- }
- }
- </style>
|