Merge branch 'master' of https://git.evo-techina.com/sgc/mes-vue
This commit is contained in:
commit
6b42d63062
@ -301,7 +301,6 @@ const columns: DataTableColumns<BasicProcessPlan> = [
|
||||
{ type: 'selection' },
|
||||
{ title: '工序名称', key: 'name' },
|
||||
{ title: '工序编码', key: 'code' },
|
||||
{ title: '工序顺序', key: 'sort' },
|
||||
{ title: '是否采购', key: 'procurement',
|
||||
render(row) {
|
||||
var opt = row.procurement
|
||||
@ -540,6 +539,8 @@ async function loadDictOptions() {
|
||||
|
||||
//开启关联质检项抽屉
|
||||
function handleOpenRelateModel(row) {
|
||||
relatePagination.page = 1
|
||||
relatePagination.pageSize = 10
|
||||
relateLoading.value = true
|
||||
qualityItemModel.value = true
|
||||
qualityItemRelate.processId = row.id
|
||||
@ -583,6 +584,7 @@ const isAllCheck = computed({
|
||||
}else{
|
||||
selectQualityItemIds.value = []
|
||||
}
|
||||
loadQualityItemCreateApi()
|
||||
}
|
||||
})
|
||||
|
||||
@ -592,19 +594,24 @@ const handleAllCheck = (val:boolean) => {
|
||||
|
||||
const onCheckedChange = async (keys:number[]) =>{
|
||||
selectQualityItemIds.value = keys
|
||||
qualityItemRelate.qualityItemIds = selectQualityItemIds.value
|
||||
try{
|
||||
await qcitemProcessApi.qualityItemcreate(qualityItemRelate);
|
||||
message.success("关联成功")
|
||||
getQualityList(qualityItemRelate.processId)
|
||||
|
||||
}catch(error) {
|
||||
message.error("关联失败")
|
||||
}
|
||||
|
||||
loadQualityItemCreateApi()
|
||||
}
|
||||
|
||||
|
||||
|
||||
const loadQualityItemCreateApi = async()=> {
|
||||
qualityItemRelate.qualityItemIds = selectQualityItemIds.value
|
||||
qualityItemRelate.page = relatePagination.page
|
||||
qualityItemRelate.pageSize = relatePagination.pageSize
|
||||
try{
|
||||
await qcitemProcessApi.qualityItemcreate(qualityItemRelate);
|
||||
message.success("关联成功")
|
||||
getQualityList(qualityItemRelate.processId)
|
||||
|
||||
}catch(error) {
|
||||
message.error("关联失败")
|
||||
}
|
||||
}
|
||||
|
||||
const getRowKey = (row: any) => row.id
|
||||
const qualityItemColums: DataTableColumns<QcItem> = [
|
||||
|
||||
@ -503,7 +503,7 @@ async function loadDictOptions() {
|
||||
|
||||
//加载工段
|
||||
async function loadSection() {
|
||||
const data = await sectionApi.list()
|
||||
const data = await sectionApi.listNoParam()
|
||||
sectionList = data.map((d:any)=> ({ label: d.sectionName, value: (Number(d.id) || d.id) }))
|
||||
}
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ const qcProcessRelate =ref<QcitemProcess> ({
|
||||
const relateLoading = ref<boolean>(false)
|
||||
const relatePagination = reactive({
|
||||
page: 1,
|
||||
pageSize: 2,
|
||||
pageSize: 10,
|
||||
itemCount: 0,
|
||||
showSizePicker: true,
|
||||
pageSizes: [10, 20, 50]
|
||||
@ -690,6 +690,8 @@ async function downloadPlans(row: any) {
|
||||
|
||||
//关联工序抽屉
|
||||
function handleProccess(row) {
|
||||
relatePagination.page = 1
|
||||
relatePagination.pageSize = 10
|
||||
relateLoading.value = true
|
||||
processModel.value = true
|
||||
qcProcessRelate.qualityItemId = row.id
|
||||
@ -730,6 +732,7 @@ const isAllCheck = computed({
|
||||
}else{
|
||||
selectedProcessIds.value = []
|
||||
}
|
||||
loadCreateApi()
|
||||
}
|
||||
})
|
||||
|
||||
@ -742,17 +745,24 @@ function rowKey(row: RowData) {
|
||||
|
||||
const handleUpateCheck = async (keys: Array<string | number>,) =>{
|
||||
selectedProcessIds.value = keys
|
||||
|
||||
qcProcessRelate.processIds = selectedProcessIds.value
|
||||
qcProcessRelate.page = relatePagination.page
|
||||
qcProcessRelate.pageSize = relateLoading.pageSize
|
||||
try{
|
||||
await qcitemProcessApi.create(qcProcessRelate);
|
||||
message.success("关联成功")
|
||||
getProcessList(qcProcessRelate.qualityItemId)
|
||||
}catch(error) {
|
||||
message.error("关联失败")
|
||||
}
|
||||
|
||||
loadCreateApi()
|
||||
}
|
||||
|
||||
|
||||
const loadCreateApi = async ()=>{
|
||||
qcProcessRelate.processIds = selectedProcessIds.value
|
||||
qcProcessRelate.page = relatePagination.page
|
||||
qcProcessRelate.pageSize = relatePagination.pageSize
|
||||
console.log(qcProcessRelate);
|
||||
|
||||
try{
|
||||
await qcitemProcessApi.create(qcProcessRelate);
|
||||
message.success("关联成功")
|
||||
getProcessList(qcProcessRelate.qualityItemId)
|
||||
}catch(error) {
|
||||
message.error("关联失败")
|
||||
}
|
||||
}
|
||||
|
||||
const processColumns: DataTableColumns<BasicProcessPlan> = [
|
||||
|
||||
@ -47,18 +47,6 @@
|
||||
<template #icon><n-icon><AddOutline /></n-icon></template>
|
||||
新增
|
||||
</n-button>
|
||||
<n-button @click="importModalVisible = true">
|
||||
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
|
||||
导入
|
||||
</n-button>
|
||||
<n-button @click="handleExport">
|
||||
<template #icon><n-icon><DownloadOutline /></n-icon></template>
|
||||
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
|
||||
</n-button>
|
||||
<n-button type="error" :disabled="selectedIds.length === 0" @click="handleBatchDelete">
|
||||
<template #icon><n-icon><TrashOutline /></n-icon></template>
|
||||
删除
|
||||
</n-button>
|
||||
</n-space>
|
||||
</div>
|
||||
|
||||
@ -88,28 +76,17 @@
|
||||
:options="deviceList"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="交接人" path="handoverPerson">
|
||||
<n-select
|
||||
v-model:value="formData.handoverPersonId"
|
||||
placeholder="请选择交接人"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
:options="userList"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="接收人" path="receiverPerson">
|
||||
<n-select
|
||||
v-model:value="formData.receiverPersonId"
|
||||
placeholder="请选择交接人"
|
||||
placeholder="请选择接收人"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
:options="userList"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="交接时间" path="handoverTime">
|
||||
<n-date-picker v-model:value="formData.handoverTime" type="datetime" clearable style="width: 100%" />
|
||||
</n-form-item>
|
||||
<n-form-item label="备注" path="remark">
|
||||
|
||||
<n-form-item label="备注" path="remark">
|
||||
<n-input v-model:value="formData.remark" type="textarea" placeholder="请输入备注" />
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
@ -230,9 +207,6 @@ const columns: DataTableColumns<StationHandover> = [
|
||||
return h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'nowrap' } }, [
|
||||
h(NButton, { size: 'small', quaternary: true, onClick: () => handleEdit(row) }, {
|
||||
default: () => [h(NIcon, null, { default: () => h(CreateOutline) }), ' 编辑']
|
||||
}),
|
||||
h(NButton, { size: 'small', quaternary: true, type: 'error', onClick: () => handleDelete(row) }, {
|
||||
default: () => [h(NIcon, null, { default: () => h(TrashOutline) }), ' 删除']
|
||||
})
|
||||
])
|
||||
}
|
||||
@ -432,7 +406,7 @@ async function loadDictOptions() {
|
||||
|
||||
//加载工段
|
||||
async function loadSection() {
|
||||
const res = await sectionApi.list();
|
||||
const res = await sectionApi.listNoParam();
|
||||
sectionList.value = res.map((n:any) =>{
|
||||
return {
|
||||
label:n.sectionName,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user