Commit d4c2786e authored by 张海景's avatar 张海景

update:修改生产工单组合单和编排单判断逻辑

parent f4c4e923
......@@ -39,7 +39,7 @@
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-row :gutter="10" class="mb8">
<el-row v-if="showBtn" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
......@@ -112,7 +112,7 @@
</template>
</el-table-column> -->
<el-table-column label="生产工单编号" align="center" prop="workorderCode"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column v-if="showBtn" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
......@@ -194,6 +194,10 @@ export default {
addBtn: {
type: Boolean,
default: true
},
showBtn: {
type: Boolean,
default: true
}
},
data() {
......
......@@ -31,7 +31,7 @@
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-row :gutter="10" class="mb8">
<el-row v-if="showBtn" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
......@@ -106,7 +106,7 @@
</el-table-column>
<el-table-column label="生产工单号" align="center" prop="workorderCode"/>
<!-- <el-table-column label="销售订单号" align="center" prop="salesOrderId"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" v-if="showBtn" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
......@@ -183,6 +183,10 @@ export default {
combinationCode: {
type: String,
default: null
},
showBtn: {
type: Boolean,
default: true
}
},
data() {
......@@ -230,6 +234,7 @@ export default {
watch: {
combinationCode: {
handler(newVal, oldVal) {
console.log(newVal, 'newVal')
this.$nextTick(() => {
if (this.combinationCode != '' && this.combinationCode != null) {
this.queryParams.combinationCode = this.combinationCode;
......
<template>
<div>
<el-tabs type="border-card">
<el-tab-pane v-for="item in combinationCodes">
<el-tab-pane v-for="(item,index) in combinationCodes" :key="index">
<div slot="label" @click="changeCombination(item)">{{ item }}
</div>
<CombinationInfo ref="combRef" :combinationCode="combinationCode"></CombinationInfo>
<CombinationInfo ref="combRef" :showBtn="$attrs.showBtn === undefined?true: $attrs.showBtn" :combinationCode="combinationCode"></CombinationInfo>
</el-tab-pane>
</el-tabs>
</div>
......
......@@ -335,7 +335,7 @@
<el-button
size="mini"
type="text"
@click="showCombDetail(scope.row.combinationCode)"
@click="showCombDetail(scope.row, scope.row.combinationCode)"
>{{ scope.row.combinationCode }}
</el-button
>
......@@ -352,7 +352,7 @@
<el-button
size="mini"
type="text"
@click="showArrangDetail(scope.row.arrangeCode)"
@click="showArrangDetail(scope.row, scope.row.arrangeCode)"
>{{ scope.row.arrangeCode }}
</el-button
>
......@@ -803,12 +803,12 @@
<el-dialog title="组合单明细" v-if="combOpen" :visible.sync="combOpen" width="1000px" append-to-body
@close="getList">
<CombinationInfos :combinationCodes="combinationCodes"></CombinationInfos>
<CombinationInfos :combinationCodes="combinationCodes" :showBtn="showCombinationBtn"></CombinationInfos>
</el-dialog>
<el-dialog title="编排单明细" v-if="arrangeOpen" :visible.sync="arrangeOpen" width="1000px" append-to-body
@close="getList">
<ArrangeInfo :arrange-code="arrangeCode" ></ArrangeInfo>
<ArrangeInfo :arrange-code="arrangeCode" :showBtn="showArrangBtn"></ArrangeInfo>
</el-dialog>
<el-dialog title="编排单明细" v-if="arrangeOpen2" :visible.sync="arrangeOpen2" width="1000px" append-to-body
......@@ -873,6 +873,8 @@ export default {
},
data() {
return {
showArrangBtn: false,
showCombinationBtn: false,
currentData: {},
//自动生成编码
autoGenFlag: false,
......@@ -984,12 +986,22 @@ export default {
this.currentData = row
this.$refs.WorkorderRecordSelectRef.showFlag = true
},
showCombDetail(combinationCode) {
showCombDetail(row, combinationCode) {
this.combOpen = true;
if (row.status === 'COMBINED') {
this.showCombinationBtn = true
} else {
this.showCombinationBtn = false
}
this.combinationCodes = [combinationCode];
},
showArrangDetail(arrangeCode) {
showArrangDetail(row, arrangeCode) {
this.arrangeOpen = true;
if (row.status === 'ORCHESTRATED') {
this.showArrangBtn = true
} else {
this.showArrangBtn = false
}
this.arrangeCode = arrangeCode;
},
async handleArrange() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment