update:图纸管理界面更新
This commit is contained in:
@@ -10,18 +10,21 @@
|
|||||||
<div class="tool-bar">
|
<div class="tool-bar">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button>重新加盖二维码</a-button>
|
<a-button>重新加盖二维码</a-button>
|
||||||
<a-button>修改合格状态</a-button>
|
|
||||||
<a-button>合格图纸盖章</a-button>
|
<a-button>合格图纸盖章</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
<a-table :dataSource="drawingPapers" :columns="columns" size="small">
|
<a-table :dataSource="drawingPapers" :columns="columns" size="small">
|
||||||
<template #DrawPaper="{ record }">
|
<template #DrawPaper="{ record }">
|
||||||
<a-checkbox
|
<a-checkbox
|
||||||
v-if="record.checkBox"
|
v-if="selecting && record.checkBox"
|
||||||
v-model:checked="selectIds[record.id]"
|
v-model:checked="selectIds[record.id]"
|
||||||
@change="e => onChange(record, e)"
|
@change="e => onChange(record, e)"
|
||||||
></a-checkbox>
|
>
|
||||||
{{ record.DrawPaper }}
|
{{ record.DrawPaper }}
|
||||||
|
</a-checkbox>
|
||||||
|
<div v-else>
|
||||||
|
{{ record.DrawPaper }}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #tags="{ record }">
|
<template #tags="{ record }">
|
||||||
<span v-for="tag in record.tags" :key="tag">
|
<span v-for="tag in record.tags" :key="tag">
|
||||||
@@ -44,12 +47,24 @@
|
|||||||
</a-tag>
|
</a-tag>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #action="{ record }">
|
||||||
|
<a-radio-group
|
||||||
|
@change="e => changeQualified([record.id], e.target.value)"
|
||||||
|
v-if="record.id"
|
||||||
|
v-model:value="record.IsQualified"
|
||||||
|
button-style="solid"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
<a-radio-button :value="true">合格</a-radio-button>
|
||||||
|
<a-radio-button :value="false">不合格</a-radio-button>
|
||||||
|
</a-radio-group>
|
||||||
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</template>
|
</template>
|
||||||
<style></style>
|
<style></style>
|
||||||
<script>
|
<script>
|
||||||
import { ref } from "@vue/runtime-core";
|
import { ref } from "@vue/runtime-core";
|
||||||
import { get } from "@/services/http";
|
import { get, post } from "@/services/http";
|
||||||
import {
|
import {
|
||||||
CheckCircleOutlined,
|
CheckCircleOutlined,
|
||||||
CloseCircleOutlined,
|
CloseCircleOutlined,
|
||||||
@@ -63,6 +78,7 @@ export default {
|
|||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
let rawResult;
|
let rawResult;
|
||||||
|
const selecting = ref(false);
|
||||||
const selectIds = ref({});
|
const selectIds = ref({});
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
@@ -92,7 +108,8 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action"
|
key: "action",
|
||||||
|
slots: { customRender: "action" }
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
const drawingPapers = ref([]);
|
const drawingPapers = ref([]);
|
||||||
@@ -153,10 +170,6 @@ export default {
|
|||||||
};
|
};
|
||||||
var tags = [
|
var tags = [
|
||||||
{ text: "二维码", value: dp.IsQRCoded },
|
{ text: "二维码", value: dp.IsQRCoded },
|
||||||
{
|
|
||||||
text: "合格",
|
|
||||||
value: dp.IsQualified
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
text: "盖章",
|
text: "盖章",
|
||||||
value: dp.IsSignature
|
value: dp.IsSignature
|
||||||
@@ -180,6 +193,7 @@ export default {
|
|||||||
DrawPaper: `${dp.DrawNum}-${dp.DrawName}`,
|
DrawPaper: `${dp.DrawNum}-${dp.DrawName}`,
|
||||||
checkBox: true,
|
checkBox: true,
|
||||||
WebFileName: dp.WebFileName,
|
WebFileName: dp.WebFileName,
|
||||||
|
IsQualified: dp.IsQualified,
|
||||||
tags //展示标签 合格,不合格, 二维码 相关专业,盖章未盖章
|
tags //展示标签 合格,不合格, 二维码 相关专业,盖章未盖章
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -205,13 +219,23 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function changeQualified(ids, isQualified) {
|
||||||
|
var res = await post("/api2/repair/ModifyDrawingPaperQualified", {
|
||||||
|
ids,
|
||||||
|
isQualified
|
||||||
|
});
|
||||||
|
console.log(res);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
selecting,
|
||||||
drawingPapers,
|
drawingPapers,
|
||||||
getDrawingPapers,
|
getDrawingPapers,
|
||||||
columns,
|
columns,
|
||||||
form,
|
form,
|
||||||
selectIds,
|
selectIds,
|
||||||
onChange
|
onChange,
|
||||||
|
changeQualified
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user