|
@@ -0,0 +1,117 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <!-- 列表数据 -->
|
|
|
+ <el-table
|
|
|
+ :key="tableKey"
|
|
|
+ ref="table"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="tableData.records"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ row-key="id"
|
|
|
+ style="width: 100%;"
|
|
|
+ >
|
|
|
+ <!-- 零件名称 -->
|
|
|
+ <el-table-column prop="bomName" :label='$t("order.form.craftCard.partName")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <!-- 零部件编号 -->
|
|
|
+ <el-table-column prop="uniqueCode" :label='$t("order.form.craftCard.partCode")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+
|
|
|
+ <!-- 操作 -->
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('table.operation')"
|
|
|
+ fixed="right"
|
|
|
+ align="center"
|
|
|
+ column-key="operation"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <a @click="partsTracedBackPage(row)" style="color: #2db7f5">生产追溯</a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ :limit.sync="queryParams.size"
|
|
|
+ :page.sync="queryParams.current"
|
|
|
+ :total="Number(tableData.total)"
|
|
|
+ @pagination="fetch"
|
|
|
+ v-show="tableData.total > 0"
|
|
|
+ />
|
|
|
+
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="prodTracedBackCardVisible"
|
|
|
+ :title='$t("order.common.partsTracedBackDialogName")'
|
|
|
+ width="80%"
|
|
|
+ custom-class="dialogNoTop"
|
|
|
+ @close="prodTracedBackCardClose"
|
|
|
+ >
|
|
|
+ <!--【零件追溯卡片】 -->
|
|
|
+ <partsTracedBackCards
|
|
|
+ :row-data="rowData"
|
|
|
+ :order-id="orderId"
|
|
|
+ @close="prodTracedBackCardClose"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ // 【完成订单计划】-API
|
|
|
+ import planMgrApi from "@/api/runManageCenter/planMgr"
|
|
|
+ import Pagination from "@/components/Pagination"
|
|
|
+ import prodTracedBackCards from "@/views/zuihou/runManageCenter/orderMgr/components/finishedOrder/components/prodTracedBack/index"
|
|
|
+ import { initQueryParams } from '@/utils/commons'
|
|
|
+ export default {
|
|
|
+ name: "partsTracedBackCard",
|
|
|
+ directives: {},
|
|
|
+ components: {Pagination },
|
|
|
+ props: {
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ tableKey: 0,
|
|
|
+ loading: false,
|
|
|
+ prodTracedBackCardVisible: false,
|
|
|
+ orderId:"",
|
|
|
+ queryParams: initQueryParams({}),
|
|
|
+ rowData: {},
|
|
|
+ tableData: {
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
|
+ created() {
|
|
|
+ // 加载列表数据
|
|
|
+ this.fetch()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ fetch (params = {}) {
|
|
|
+ this.loading = true
|
|
|
+ this.queryParams.current = params.current ? params.current : this.queryParams.current;
|
|
|
+ this.queryParams.size = params.size ? params.size : this.queryParams.size;
|
|
|
+ this.queryParams.model.planNo = this.planIds ? this.planIds :this.queryParams.planId
|
|
|
+ planMgrApi.partsTracedBackPage(this.queryParams ).then(response => {
|
|
|
+ const res = response.data
|
|
|
+ if (res.isSuccess) {
|
|
|
+ this.tableData = res.data
|
|
|
+ // 给列表设置条数
|
|
|
+ this.$emit('setTabNums', res.data.total, 'tab6')
|
|
|
+ }
|
|
|
+ }).finally(() => this.loading = false)
|
|
|
+ },
|
|
|
+ prodTracedBackCardClose(){
|
|
|
+ this.prodTracedBackCardVisible = false
|
|
|
+ },
|
|
|
+ prodTracedBackPage(row){
|
|
|
+ this.planIds = row.planIds
|
|
|
+ this.rowData = row
|
|
|
+ this.prodTracedBackCardVisible = true
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped></style>
|