|
@@ -1,107 +1,107 @@
|
|
|
-<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("runCenter.table.checkCuttingTool.partName")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <!-- 刀具齐套性 -->
|
|
|
- <el-table-column
|
|
|
- :label="$t('runCenter.table.checkCuttingTool.hasCuttingTools')"
|
|
|
- fixed="right"
|
|
|
- align="center"
|
|
|
- column-key="operation"
|
|
|
- >
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <a @click="showCheckDetails(row)" style="color: #2db7f5">{{row.hasCuttingToolsFlag}} </a>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <!-- 刀具校验详情对话框-->
|
|
|
- <el-dialog
|
|
|
- :visible.sync="checkDetailCuttingToolsVisible"
|
|
|
- :title='$t("runCenter.common.checkDetailCuttingToolsDialogName")'
|
|
|
- append-to-body
|
|
|
- width="80%"
|
|
|
- custom-class="dialogNoTop"
|
|
|
- @close="checkDetailCuttingToolsClose"
|
|
|
- >
|
|
|
- <!--【 刀具校验对话框】 -->
|
|
|
- <checkDetailCuttingTools
|
|
|
- :detail-plan-id="detailPlanId"
|
|
|
- @close="checkDetailCuttingToolsClose"
|
|
|
- />
|
|
|
- </el-dialog>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
- // 【订单计划】-API
|
|
|
- import planMgrApi from "@/api/runManageCenter/planMgr"
|
|
|
- import checkDetailCuttingTools from "@/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/checkCuttingTools/checkDetailCuttingTools"
|
|
|
- export default {
|
|
|
- name: "checkCuttingTool",
|
|
|
- directives: {},
|
|
|
- components: {checkDetailCuttingTools},
|
|
|
- props: {
|
|
|
- planId: {
|
|
|
- type:String,
|
|
|
- default:''
|
|
|
- }
|
|
|
- },
|
|
|
- data () {
|
|
|
- return {
|
|
|
- tableKey: 0,
|
|
|
- loading: false,
|
|
|
- checkDetailCuttingToolsVisible: false,
|
|
|
- detailPlanId: '',
|
|
|
- tableData: []
|
|
|
- }
|
|
|
- },
|
|
|
- // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
|
- created() {
|
|
|
- // 加载列表数据
|
|
|
- this.fetch()
|
|
|
- },
|
|
|
- computed: {
|
|
|
- },
|
|
|
- mounted () {
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // 查询计划刀具可用性
|
|
|
- fetch () {
|
|
|
- this.loading = true
|
|
|
- // TOTO 临时写死一个测试,后面订单页面调整完成后直接用选中的计划id
|
|
|
- this.planId = '1483374961870503936'
|
|
|
- planMgrApi.checkPlanCuttingTools({ "planId": this.planId }).then(response => {
|
|
|
- const res = response.data
|
|
|
- if (res.isSuccess) {
|
|
|
- this.tableData = res.data
|
|
|
- }
|
|
|
- }).finally(() => this.loading = false)
|
|
|
- },
|
|
|
-
|
|
|
- showCheckDetails(data){
|
|
|
- if(data.hasCuttingToolsFlag === '是'){
|
|
|
- return
|
|
|
- }
|
|
|
- this.detailPlanId = data.planId
|
|
|
- this.checkDetailCuttingToolsVisible = true
|
|
|
- },
|
|
|
-
|
|
|
- checkDetailCuttingToolsClose(){
|
|
|
- this.checkDetailCuttingToolsVisible = false
|
|
|
- },
|
|
|
- }
|
|
|
- }
|
|
|
-</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("runCenter.table.checkCuttingTool.partName")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <!-- 刀具齐套性 -->
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('runCenter.table.checkCuttingTool.hasCuttingTools')"
|
|
|
+ fixed="right"
|
|
|
+ align="center"
|
|
|
+ column-key="operation"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <a @click="showCheckDetails(row)" style="color: #2db7f5">{{row.hasCuttingToolsFlag}} </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <!-- 刀具校验详情对话框-->
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="checkDetailCuttingToolsVisible"
|
|
|
+ :title='$t("runCenter.common.checkDetailCuttingToolsDialogName")'
|
|
|
+ append-to-body
|
|
|
+ width="80%"
|
|
|
+ custom-class="dialogNoTop"
|
|
|
+ @close="checkDetailCuttingToolsClose"
|
|
|
+ >
|
|
|
+ <!--【 刀具校验对话框】 -->
|
|
|
+ <checkDetailCuttingTools
|
|
|
+ :detail-plan-id="detailPlanId"
|
|
|
+ @close="checkDetailCuttingToolsClose"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ // 【订单计划】-API
|
|
|
+ import planMgrApi from "@/api/runManageCenter/planMgr"
|
|
|
+ import checkDetailCuttingTools from "@/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/checkCuttingTools/checkDetailCuttingTools"
|
|
|
+ export default {
|
|
|
+ name: "checkCuttingTool",
|
|
|
+ directives: {},
|
|
|
+ components: {checkDetailCuttingTools},
|
|
|
+ props: {
|
|
|
+ planId: {
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ tableKey: 0,
|
|
|
+ loading: false,
|
|
|
+ checkDetailCuttingToolsVisible: false,
|
|
|
+ detailPlanId: '',
|
|
|
+ tableData: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
|
+ created() {
|
|
|
+ // 加载列表数据
|
|
|
+ this.fetch()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 查询计划刀具可用性
|
|
|
+ fetch () {
|
|
|
+ console.log("this.planId=" + this.planId)
|
|
|
+ this.loading = true
|
|
|
+ // TOTO 临时写死一个测试,后面订单页面调整完成后直接用选中的计划id
|
|
|
+ planMgrApi.checkPlanCuttingTools({ "planId": this.planId }).then(response => {
|
|
|
+ const res = response.data
|
|
|
+ if (res.isSuccess) {
|
|
|
+ this.tableData = res.data
|
|
|
+ }
|
|
|
+ }).finally(() => this.loading = false)
|
|
|
+ },
|
|
|
+
|
|
|
+ showCheckDetails(data){
|
|
|
+ if(data.hasCuttingToolsFlag === '是'){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.detailPlanId = data.planId
|
|
|
+ this.checkDetailCuttingToolsVisible = true
|
|
|
+ },
|
|
|
+
|
|
|
+ checkDetailCuttingToolsClose(){
|
|
|
+ this.checkDetailCuttingToolsVisible = false
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped></style>
|