Commit 131d906f authored by 沈翠玲's avatar 沈翠玲

生产工单

parent 32b121e5
......@@ -177,8 +177,14 @@ export default {
}
})
console.log(params)
await workorderProofMakeProduction(params)
this.$emit('close')
workorderProofMakeProduction(params).then(res => {
if (res.code === 200) {
this.$emit('close')
return true
} else {
this.$message.warning(res.msg)
}
})
}
})
},
......
......@@ -125,22 +125,22 @@
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple" @click="handleCombination"
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple || combinationDisable" @click="handleCombination"
v-hasPermi="['pro:combination:add']">订单组合
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleCombination('del')"
<el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleCombination('del')" :disabled="combinationDisable"
>取消组合
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple" @click="handleArrange"
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="multiple || combinationDisable" @click="handleArrange"
v-hasPermi="['mes:pro:workorder:dofinish']">生产编排
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleArrange('del')"
<el-button type="warning" plain icon="el-icon-edit" size="mini" @click="()=>handleArrange('del')" :disabled="combinationDisable"
>取消编排
</el-button>
</el-col>
......@@ -164,7 +164,7 @@
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-plus" size="mini" :disabled="single" @click="handleCommandClick"
v-hasPermi="['mes:pro:workorder:dofinish']">生产打样下达
v-hasPermi="['mes:pro:workorder:dofinish']">手工工单下达
</el-button>
</el-col>
<el-col :span="1.2">
......@@ -186,13 +186,13 @@
></right-toolbar> -->
</el-row>
<!-- 生产打样下达 -->
<!-- 手工工单下达 -->
<el-dialog title="打样下达填报" :visible.sync="commandVisible" width="1200px" append-to-body>
<CommandList v-if="commandVisible" ref="CommandListRef" :currentData="currentData" @close="commandVisible = false"
:workorderId="currentData.workorderId"></CommandList>
<div slot="footer" class="dialog-footer">
<el-button @click="commandVisible = false">取 消</el-button>
<el-button type="primary" @click="$refs.CommandListRef.submit(), getList()">确 定</el-button>
<el-button type="primary" @click="confirmCommand">确 定</el-button>
</div>
</el-dialog>
......@@ -653,6 +653,7 @@ export default {
console.log('clickMounted')
},
},
combinationDisable: false,
combinationCodes: [],
arrangeOpen: false,
enablePrint: false,
......@@ -797,11 +798,7 @@ export default {
},
handleCommandClick() {
this.currentData = this.selectedRows[0]
if (this.selectedRows[0].workorderType == 'prototype' && this.selectedRows[0].status === "PUBLISHED") {
this.commandVisible = true
} else {
this.$message.warning('请选择工单类型为打样工单、状态为已发布的数据')
}
this.commandVisible = true
},
handleViewRecord(row) {
this.currentData = row
......@@ -1140,6 +1137,13 @@ export default {
// });
},
handleSelectionChange(selection) {
this.dict.type.mes_workorder_type
this.combinationDisable = false
selection.forEach(item => {
if (['complements', 'prototype'].indexOf(item.workorderType) > -1) {
this.combinationDisable = true
}
})
// this.selectedRows = val;
this.selectedRows = selection;
this.ids = selection.map(item => item.workorderId)
......@@ -1291,6 +1295,11 @@ export default {
`workorder_${new Date().getTime()}.xlsx`
);
},
confirmCommand(){
if (this.$refs.CommandListRef.submit()) {
this.getList()
}
},
handleConfirm() {
let that = this;
this.$modal
......
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