|
@@ -1,88 +1,89 @@
|
|
|
-<template>
|
|
|
- <div class="app-container">
|
|
|
- <!-- 列表数据 -->
|
|
|
- <el-table
|
|
|
- :key="tableKey"
|
|
|
- ref="table"
|
|
|
- v-loading="loading"
|
|
|
- :data="tableData"
|
|
|
- border
|
|
|
- fit
|
|
|
- row-key="id"
|
|
|
- style="width: 100%;"
|
|
|
- >
|
|
|
- <!-- 零件名称 -->
|
|
|
- <el-table-column prop="name" :label='$t("order.form.craftCard.partName")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <!-- 零部件编号 -->
|
|
|
- <el-table-column prop="no" :label='$t("order.form.craftCard.partCode")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <!-- 零件交货日期 -->
|
|
|
- <el-table-column prop="deliveryTime" :label='$t("order.form.craftCard.deliveryTime")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <!-- 零件总数 -->
|
|
|
- <el-table-column prop="planBomNum" :label='$t("order.form.craftCard.partCount")'></el-table-column>
|
|
|
- <!-- 操作 -->
|
|
|
- <el-table-column
|
|
|
- :label="$t('table.operation')"
|
|
|
- fixed="right"
|
|
|
- align="center"
|
|
|
- column-key="operation"
|
|
|
- >
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <a @click="downloadCraftCards(row)" style="color: #2db7f5">导出工艺流程卡</a>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
- // 【完成订单计划】-API
|
|
|
- import planMgrApi from "@/api/runManageCenter/planMgr"
|
|
|
- import { downloadFile } from '@/utils/commons'
|
|
|
- export default {
|
|
|
- name: "craftCard",
|
|
|
- directives: {},
|
|
|
- components: {},
|
|
|
- props: {
|
|
|
- orderId: {
|
|
|
- type:String,
|
|
|
- default:''
|
|
|
- }
|
|
|
- },
|
|
|
- data () {
|
|
|
- return {
|
|
|
- tableKey: 0,
|
|
|
- loading: false,
|
|
|
- rowData: {},
|
|
|
- tableData:[]
|
|
|
- }
|
|
|
- },
|
|
|
- // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
|
- created() {
|
|
|
- // 加载列表数据
|
|
|
- this.fetch()
|
|
|
- },
|
|
|
- computed: {
|
|
|
- },
|
|
|
- mounted () {
|
|
|
- },
|
|
|
- methods: {
|
|
|
- fetch () {
|
|
|
- console.log("this.orderId="+this.orderId)
|
|
|
- this.loading = true
|
|
|
- planMgrApi.getFinishPlanList({ "orderId": this.orderId }).then(response => {
|
|
|
- const res = response.data
|
|
|
- if (res.isSuccess) {
|
|
|
- this.tableData = res.data
|
|
|
- }
|
|
|
- }).finally(() => this.loading = false)
|
|
|
- },
|
|
|
-
|
|
|
- downloadCraftCards(data){
|
|
|
- planMgrApi.downloadCraftCards(data).then(response => {
|
|
|
- downloadFile(response)
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-</script>
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <!-- 列表数据 -->
|
|
|
+ <el-table
|
|
|
+ :key="tableKey"
|
|
|
+ ref="table"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ row-key="id"
|
|
|
+ style="width: 100%;"
|
|
|
+ >
|
|
|
+ <!-- 零件名称 -->
|
|
|
+ <el-table-column prop="name" :label='$t("order.form.craftCard.partName")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <!-- 零部件编号 -->
|
|
|
+ <el-table-column prop="no" :label='$t("order.form.craftCard.partCode")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <!-- 零件交货日期 -->
|
|
|
+ <el-table-column prop="deliveryTime" :label='$t("order.form.craftCard.deliveryTime")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <!-- 零件总数 -->
|
|
|
+ <el-table-column prop="planBomNum" :label='$t("order.form.craftCard.partCount")'></el-table-column>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('table.operation')"
|
|
|
+ fixed="right"
|
|
|
+ align="center"
|
|
|
+ column-key="operation"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <a @click="downloadCraftCards(row)" style="color: #2db7f5">导出工艺流程卡</a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ // 【完成订单计划】-API
|
|
|
+ import planMgrApi from "@/api/runManageCenter/planMgr"
|
|
|
+ import { downloadFile } from '@/utils/commons'
|
|
|
+ export default {
|
|
|
+ name: "craftCard",
|
|
|
+ directives: {},
|
|
|
+ components: {},
|
|
|
+ props: {
|
|
|
+ planId: {
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ tableKey: 0,
|
|
|
+ loading: false,
|
|
|
+ rowData: {},
|
|
|
+ tableData:[]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
|
+ created() {
|
|
|
+ // 加载列表数据
|
|
|
+ this.fetch()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ fetch () {
|
|
|
+ console.log("this.planId="+this.planId)
|
|
|
+ this.loading = true
|
|
|
+ planMgrApi.getFinishPlanList({ "planId": this.planId }).then(response => {
|
|
|
+ const res = response.data
|
|
|
+ if (res.isSuccess) {
|
|
|
+ this.tableData = res.data
|
|
|
+ }
|
|
|
+ }).finally(() => this.loading = false)
|
|
|
+ },
|
|
|
+
|
|
|
+ downloadCraftCards(data){
|
|
|
+ console.log(data)
|
|
|
+ planMgrApi.downloadCraftCards(data).then(response => {
|
|
|
+ downloadFile(response)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped></style>
|