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

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

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