update 工艺流程
This commit is contained in:
@@ -22,7 +22,9 @@
|
||||
:line="item.lineName"
|
||||
:desc="item.remark"
|
||||
:isActive="item.enabled"
|
||||
@edit="handleUpdate" />
|
||||
@edit="handleUpdate"
|
||||
@copy="handleCopy"
|
||||
@delete="handleDelete" />
|
||||
</section>
|
||||
|
||||
<base-dialog
|
||||
@@ -58,6 +60,12 @@ const ProcessItem = {
|
||||
handleEdit() {
|
||||
this.$emit('edit', this.id);
|
||||
},
|
||||
handleCopy() {
|
||||
this.$emit('copy', this.id);
|
||||
},
|
||||
handleDelete() {
|
||||
this.$emit('delete', this.id);
|
||||
},
|
||||
handleViewDetail(e) {
|
||||
this.$router.push({
|
||||
name: 'ProcessFlowView',
|
||||
@@ -117,12 +125,18 @@ const ProcessItem = {
|
||||
<el-col
|
||||
span={8}
|
||||
style="text-align: center; border-right: 1px solid #0001">
|
||||
<el-button type="text" style="color: #0007; line-height: 1.75">
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: #0007; line-height: 1.75"
|
||||
onClick={this.handleCopy}>
|
||||
复制
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col span={8} style="text-align: center;">
|
||||
<el-button type="text" style="color: #0007; line-height: 1.75">
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: #0007; line-height: 1.75"
|
||||
onClick={this.handleDelete}>
|
||||
删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
@@ -255,6 +269,43 @@ export default {
|
||||
this.open = true;
|
||||
this.title = '修改工艺';
|
||||
},
|
||||
async handleCopy(id) {
|
||||
this.$confirm('确认拷贝操作?', '提示', {
|
||||
confirmButtonText: '确 认',
|
||||
cancelButtonText: '取 消',
|
||||
})
|
||||
.then(async () => {
|
||||
const { code } = await this.http(
|
||||
'/extend/process-flow/copy',
|
||||
'post',
|
||||
{
|
||||
id,
|
||||
}
|
||||
);
|
||||
if (code == 0) {
|
||||
this.$modal.msgSuccess('复制成功');
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
.catch(() => console.info('操作取消'));
|
||||
},
|
||||
async handleDelete(id) {
|
||||
this.$confirm('确认删除这个工艺吗?', '提示', {
|
||||
confirmButtonText: '确 认',
|
||||
cancelButtonText: '取 消',
|
||||
})
|
||||
.then(async () => {
|
||||
const { code } = await this.http(
|
||||
'/extend/process-flow/delete?id=' + id,
|
||||
'delete'
|
||||
);
|
||||
if (code == 0) {
|
||||
this.$modal.msgSuccess('删除成功');
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
.catch(() => console.info('操作取消'));
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (!valid) {
|
||||
|
||||
Reference in New Issue
Block a user