优化
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
<template>
|
||||
<div class="content-box">111</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@ -25,9 +25,6 @@
|
||||
<el-form-item label="保管单位" prop="storageUnit">
|
||||
<el-input v-model="queryParams.storageUnit" placeholder="请输入保管单位" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="缺陷情况" prop="defectDescription">
|
||||
<el-input v-model="queryParams.defectDescription" placeholder="请输入缺陷情况" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@ -277,42 +274,45 @@ const dialog = reactive<DialogOption>({
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: MaterialIssueForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
materialSource: '1',
|
||||
formCode: undefined,
|
||||
projectName: undefined,
|
||||
materialName: undefined,
|
||||
orderingUnit: undefined,
|
||||
supplierUnit: undefined,
|
||||
issueUnit: undefined,
|
||||
storageUnit: undefined,
|
||||
defectDescription: undefined,
|
||||
certCount: undefined,
|
||||
certCountFileId: undefined,
|
||||
reportCount: undefined,
|
||||
reportCountFileId: undefined,
|
||||
techDocCount: undefined,
|
||||
techDocCountFileId: undefined,
|
||||
licenseCount: undefined,
|
||||
licenseCountFileId: undefined,
|
||||
remark: undefined,
|
||||
itemList: [
|
||||
{
|
||||
id: undefined,
|
||||
specification: undefined,
|
||||
unit: undefined,
|
||||
stockQuantity: undefined,
|
||||
issuedQuantity: undefined,
|
||||
remainingQuantity: undefined,
|
||||
name: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
]
|
||||
// 定义一个函数来生成初始表单数据
|
||||
const getInitFormData = () => {
|
||||
return {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
materialSource: '1',
|
||||
formCode: undefined,
|
||||
projectName: undefined,
|
||||
materialName: undefined,
|
||||
orderingUnit: undefined,
|
||||
supplierUnit: undefined,
|
||||
issueUnit: undefined,
|
||||
storageUnit: undefined,
|
||||
defectDescription: undefined,
|
||||
certCount: undefined,
|
||||
certCountFileId: undefined,
|
||||
reportCount: undefined,
|
||||
reportCountFileId: undefined,
|
||||
techDocCount: undefined,
|
||||
techDocCountFileId: undefined,
|
||||
licenseCount: undefined,
|
||||
licenseCountFileId: undefined,
|
||||
remark: undefined,
|
||||
itemList: [
|
||||
{
|
||||
id: undefined,
|
||||
specification: undefined,
|
||||
unit: undefined,
|
||||
stockQuantity: undefined,
|
||||
issuedQuantity: undefined,
|
||||
remainingQuantity: undefined,
|
||||
name: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
const data = reactive<PageData<MaterialIssueForm, MaterialIssueQuery>>({
|
||||
form: { ...initFormData },
|
||||
form: getInitFormData(),
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@ -352,7 +352,7 @@ const cancel = () => {
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
form.value = getInitFormData();
|
||||
materialIssueFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ const onOpen = (path: string) => {
|
||||
};
|
||||
// 导出
|
||||
const onLoad = async () => {
|
||||
await downLoadOss({ id: formData.value.id }, '/design/designChange/export/word', '设计变更单.zip');
|
||||
await downLoadOss({ id: formData.value.id }, '/materials/materialIssue/export/word', '设计材料设备领料单.zip');
|
||||
};
|
||||
|
||||
// 关闭弹窗
|
||||
|
||||
@ -203,7 +203,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合格证文件" prop="certCountFileId">
|
||||
<file-upload :isShowTip="false" v-model="form.certCountFileId" />
|
||||
@ -225,7 +225,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<span style="color:#ff0000ab;margin-bottom: 10px;display: block;">注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span>
|
||||
<span style="color: #ff0000ab; margin-bottom: 10px; display: block">注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备材料入库/移交" prop="storageType">
|
||||
@ -288,42 +288,44 @@ const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: MaterialReceiveForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
materialSource: '1',
|
||||
formCode: undefined,
|
||||
projectName: undefined,
|
||||
materialName: undefined,
|
||||
contractName: undefined,
|
||||
orderingUnit: undefined,
|
||||
supplierUnit: undefined,
|
||||
defectDescription: undefined,
|
||||
certCount: undefined,
|
||||
certCountFileId: undefined,
|
||||
reportCount: undefined,
|
||||
reportCountFileId: undefined,
|
||||
techDocCount: undefined,
|
||||
techDocCountFileId: undefined,
|
||||
licenseCount: undefined,
|
||||
licenseCountFileId: undefined,
|
||||
storageType: [],
|
||||
remark: undefined,
|
||||
itemList: [
|
||||
{
|
||||
name: undefined,
|
||||
specification: undefined,
|
||||
unit: undefined,
|
||||
quantity: undefined,
|
||||
acceptedQuantity: undefined,
|
||||
shortageQuantity: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
]
|
||||
const getInitFormData = () => {
|
||||
return {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
materialSource: '1',
|
||||
formCode: undefined,
|
||||
projectName: undefined,
|
||||
materialName: undefined,
|
||||
contractName: undefined,
|
||||
orderingUnit: undefined,
|
||||
supplierUnit: undefined,
|
||||
defectDescription: undefined,
|
||||
certCount: undefined,
|
||||
certCountFileId: undefined,
|
||||
reportCount: undefined,
|
||||
reportCountFileId: undefined,
|
||||
techDocCount: undefined,
|
||||
techDocCountFileId: undefined,
|
||||
licenseCount: undefined,
|
||||
licenseCountFileId: undefined,
|
||||
storageType: [],
|
||||
remark: undefined,
|
||||
itemList: [
|
||||
{
|
||||
name: undefined,
|
||||
specification: undefined,
|
||||
unit: undefined,
|
||||
quantity: undefined,
|
||||
acceptedQuantity: undefined,
|
||||
shortageQuantity: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
const initFormData: MaterialReceiveForm = {};
|
||||
const data = reactive<PageData<MaterialReceiveForm, MaterialReceiveQuery>>({
|
||||
form: { ...initFormData },
|
||||
form: getInitFormData(),
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@ -359,7 +361,7 @@ const cancel = () => {
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
form.value = getInitFormData();
|
||||
materialReceiveFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
@ -395,10 +397,10 @@ const handleUpdate = async (row?: MaterialReceiveVO) => {
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getMaterialReceive(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
if(form.value.storageType.length){
|
||||
if (form.value.storageType.length) {
|
||||
form.value.storageType = form.value.storageType.split(',');
|
||||
}else{
|
||||
form.value.storageType=[]
|
||||
} else {
|
||||
form.value.storageType = [];
|
||||
}
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改物料接收单';
|
||||
|
||||
@ -172,7 +172,7 @@ const onOpen = (path: string) => {
|
||||
};
|
||||
// 导出
|
||||
const onLoad = async () => {
|
||||
await downLoadOss({ id: formData.value.id }, '/design/designChange/export/word', '设计变更单.zip');
|
||||
await downLoadOss({ id: formData.value.id }, '/materials/materialReceive/export/word', '材料设备验收单.zip');
|
||||
};
|
||||
|
||||
// 关闭弹窗
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
<template>
|
||||
<div class="content-box">22</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@ -25,9 +25,6 @@
|
||||
<el-form-item label="保管单位" prop="storageUnit">
|
||||
<el-input v-model="queryParams.storageUnit" placeholder="请输入保管单位" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="缺陷情况" prop="defectDescription">
|
||||
<el-input v-model="queryParams.defectDescription" placeholder="请输入缺陷情况" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@ -230,8 +227,10 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<span style="color:#ff0000ab;margin-bottom: 10px;display: block;">注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span>
|
||||
</el-col><el-col :span="24">
|
||||
<span style="color: #ff0000ab; margin-bottom: 10px; display: block"
|
||||
>注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span
|
||||
> </el-col
|
||||
><el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
@ -276,43 +275,45 @@ const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: MaterialIssueForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
materialSource: '2',
|
||||
formCode: undefined,
|
||||
projectName: undefined,
|
||||
materialName: undefined,
|
||||
orderingUnit: undefined,
|
||||
supplierUnit: undefined,
|
||||
issueUnit: undefined,
|
||||
storageUnit: undefined,
|
||||
defectDescription: undefined,
|
||||
certCount: undefined,
|
||||
certCountFileId: undefined,
|
||||
reportCount: undefined,
|
||||
reportCountFileId: undefined,
|
||||
techDocCount: undefined,
|
||||
techDocCountFileId: undefined,
|
||||
licenseCount: undefined,
|
||||
licenseCountFileId: undefined,
|
||||
remark: undefined,
|
||||
itemList: [
|
||||
{
|
||||
id: undefined,
|
||||
specification: undefined,
|
||||
unit: undefined,
|
||||
stockQuantity: undefined,
|
||||
issuedQuantity: undefined,
|
||||
remainingQuantity: undefined,
|
||||
name: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
]
|
||||
const getInitFormData = () => {
|
||||
return {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
materialSource: '2',
|
||||
formCode: undefined,
|
||||
projectName: undefined,
|
||||
materialName: undefined,
|
||||
orderingUnit: undefined,
|
||||
supplierUnit: undefined,
|
||||
issueUnit: undefined,
|
||||
storageUnit: undefined,
|
||||
defectDescription: undefined,
|
||||
certCount: undefined,
|
||||
certCountFileId: undefined,
|
||||
reportCount: undefined,
|
||||
reportCountFileId: undefined,
|
||||
techDocCount: undefined,
|
||||
techDocCountFileId: undefined,
|
||||
licenseCount: undefined,
|
||||
licenseCountFileId: undefined,
|
||||
remark: undefined,
|
||||
itemList: [
|
||||
{
|
||||
id: undefined,
|
||||
specification: undefined,
|
||||
unit: undefined,
|
||||
stockQuantity: undefined,
|
||||
issuedQuantity: undefined,
|
||||
remainingQuantity: undefined,
|
||||
name: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
const initFormData: MaterialIssueForm = {};
|
||||
const data = reactive<PageData<MaterialIssueForm, MaterialIssueQuery>>({
|
||||
form: { ...initFormData },
|
||||
form: getInitFormData(),
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@ -352,7 +353,7 @@ const cancel = () => {
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
form.value = getInitFormData();
|
||||
materialIssueFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ const onOpen = (path: string) => {
|
||||
};
|
||||
// 导出
|
||||
const onLoad = async () => {
|
||||
await downLoadOss({ id: formData.value.id }, '/design/designChange/export/word', '设计变更单.zip');
|
||||
await downLoadOss({ id: formData.value.id }, '/materials/materialIssue/export/word', '设计材料设备领料单.zip');
|
||||
};
|
||||
|
||||
// 关闭弹窗
|
||||
|
||||
@ -224,8 +224,10 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<span style="color:#ff0000ab;margin-bottom: 10px;display: block;">注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span>
|
||||
</el-col><el-col :span="24"
|
||||
<span style="color: #ff0000ab; margin-bottom: 10px; display: block"
|
||||
>注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span
|
||||
> </el-col
|
||||
><el-col :span="24"
|
||||
><el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
@ -278,42 +280,43 @@ const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: MaterialReceiveForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
materialSource: '2',
|
||||
formCode: undefined,
|
||||
projectName: undefined,
|
||||
materialName: undefined,
|
||||
contractName: undefined,
|
||||
orderingUnit: undefined,
|
||||
supplierUnit: undefined,
|
||||
defectDescription: undefined,
|
||||
certCount: undefined,
|
||||
certCountFileId: undefined,
|
||||
reportCount: undefined,
|
||||
reportCountFileId: undefined,
|
||||
techDocCount: undefined,
|
||||
techDocCountFileId: undefined,
|
||||
licenseCount: undefined,
|
||||
licenseCountFileId: undefined,
|
||||
storageType: [],
|
||||
remark: undefined,
|
||||
itemList: [
|
||||
{
|
||||
name: undefined,
|
||||
specification: undefined,
|
||||
unit: undefined,
|
||||
quantity: undefined,
|
||||
acceptedQuantity: undefined,
|
||||
shortageQuantity: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
]
|
||||
const getInitFormData = () => {
|
||||
return {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
materialSource: '2',
|
||||
formCode: undefined,
|
||||
projectName: undefined,
|
||||
materialName: undefined,
|
||||
contractName: undefined,
|
||||
orderingUnit: undefined,
|
||||
supplierUnit: undefined,
|
||||
defectDescription: undefined,
|
||||
certCount: undefined,
|
||||
certCountFileId: undefined,
|
||||
reportCount: undefined,
|
||||
reportCountFileId: undefined,
|
||||
techDocCount: undefined,
|
||||
techDocCountFileId: undefined,
|
||||
licenseCount: undefined,
|
||||
licenseCountFileId: undefined,
|
||||
storageType: [],
|
||||
remark: undefined,
|
||||
itemList: [
|
||||
{
|
||||
name: undefined,
|
||||
specification: undefined,
|
||||
unit: undefined,
|
||||
quantity: undefined,
|
||||
acceptedQuantity: undefined,
|
||||
shortageQuantity: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
const data = reactive<PageData<MaterialReceiveForm, MaterialReceiveQuery>>({
|
||||
form: { ...initFormData },
|
||||
form: getInitFormData(),
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@ -349,7 +352,7 @@ const cancel = () => {
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
form.value = getInitFormData();
|
||||
materialReceiveFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
@ -385,10 +388,10 @@ const handleUpdate = async (row?: MaterialReceiveVO) => {
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getMaterialReceive(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
if(form.value.storageType.length){
|
||||
if (form.value.storageType.length) {
|
||||
form.value.storageType = form.value.storageType.split(',');
|
||||
}else{
|
||||
form.value.storageType=[]
|
||||
} else {
|
||||
form.value.storageType = [];
|
||||
}
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改物料接收单';
|
||||
|
||||
@ -172,7 +172,7 @@ const onOpen = (path: string) => {
|
||||
};
|
||||
// 导出
|
||||
const onLoad = async () => {
|
||||
await downLoadOss({ id: formData.value.id }, '/design/designChange/export/word', '设计变更单.zip');
|
||||
await downLoadOss({ id: formData.value.id }, '/materials/materialReceive/export/word', '材料设备验收单.zip');
|
||||
};
|
||||
|
||||
// 关闭弹窗
|
||||
|
||||
Reference in New Issue
Block a user