| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254 |
- <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>
- <el-button @click="handlePrint">打印工单</el-button>
- </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.completeTime
- }}</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>
- <ul v-else>
- <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>
- <!-- <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" />
- <OrderPrint
- ref="orderPrintRef"
- :workOrderId="workOrderId"
- :infoData="infoData"
- :processList="tabList"
- />
- </div>
- </template>
- <script>
- import progressBox from './components/progressBox';
- import otherMission from './components/otherMission';
- import OrderPrint from '@/components/print/OrderPrint';
- import bomList from './components/bomList';
- import { getTaskListById } from '@/api/mainData/index.js';
- import dictMixins from '@/mixins/dictMixins';
- import {
- reportPage,
- getInfoById,
- reportCount,
- writeOffWork
- } from '@/api/produceOrder/index.js';
- export default {
- mixins: [dictMixins],
- components: {
- OrderPrint,
- 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: 'billOfMaterials',
- 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: 'billOfMaterials'
- // },
- {
- 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: 'billOfMaterials',
- 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: 'billOfMaterials',
- 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: 'storageCode',
- minWidth: 100,
- align: 'center',
- formatter: (_row, _column, cellValue) => {
- return this.getDictValue('仓库', _row.storageCode);
- }
- },
- {
- 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.params.id;
- this.getInfo(this.workOrderId);
- this.requestDict('仓库');
- },
- methods: {
- handlePrint() {
- this.$refs.orderPrintRef.open();
- },
- 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(() => {
- const data = {
- taskCode: this.taskCode,
- taskName: this.chooseItem,
- reportId: row.id,
- writeOffNum: row.standardNum
- ? row.standardNum
- : row.actualQuantity,
- ...this.request
- };
- writeOffWork(data).then((res) => {
- if (res == 1) {
- this.$message.success('冲销成功');
- this.reload({
- workOrderId: this.workOrderId,
- taskCode: this.taskCode
- });
- this.refreshData();
- } 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);
- },
- async refreshData() {
- const res = await getInfoById(this.workOrderId);
- this.infoData = res;
- if (typeof res.taskTypeProcessDiagrams == 'string') {
- this.tabList = [];
- } else {
- this.tabList = res.taskTypeProcessDiagrams;
- }
- this.setData();
- }
- }
- };
- </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>
|