Commit 751af559 authored by hubaoshan's avatar hubaoshan

Merge remote-tracking branch 'origin/develop' into develop

parents d0518063 7d8a2c46
...@@ -24,9 +24,6 @@ ...@@ -24,9 +24,6 @@
{ {
label: '编辑', label: '编辑',
onClick: handleEdit.bind(null, record, 0), onClick: handleEdit.bind(null, record, 0),
ifShow: (_action) => {
return record.reviewStatus == '0' || record.reviewStatus == null;
},
}, },
{ {
label: '删除', label: '删除',
...@@ -36,9 +33,6 @@ ...@@ -36,9 +33,6 @@
placement: 'left', placement: 'left',
confirm: handleDelete.bind(null, record), confirm: handleDelete.bind(null, record),
}, },
ifShow: (_action) => {
return record.reviewStatus == '0' || record.reviewStatus == null;
},
}, },
{ {
label: '审核', label: '审核',
......
...@@ -273,6 +273,7 @@ ...@@ -273,6 +273,7 @@
contractId: info.id, contractId: info.id,
}); });
} }
break;
} }
} }
} }
...@@ -421,6 +422,7 @@ ...@@ -421,6 +422,7 @@
idList: idList.value, idList: idList.value,
contractIdList: contractIdList.value, contractIdList: contractIdList.value,
proClosingQuarter: formData.value.proClosingQuarter, proClosingQuarter: formData.value.proClosingQuarter,
isSubmit: isSubmit,
}; };
const management = []; const management = [];
loadingRef.value = true; loadingRef.value = true;
...@@ -461,6 +463,7 @@ ...@@ -461,6 +463,7 @@
management.push(contrantData); management.push(contrantData);
} }
data.management = management; data.management = management;
console.log('data', data)
//新增接口 //新增接口
if (routerId.value) { if (routerId.value) {
const res = updateItem(data); const res = updateItem(data);
...@@ -468,15 +471,24 @@ ...@@ -468,15 +471,24 @@
addItemData.businessId = routerId.value; addItemData.businessId = routerId.value;
addItemData.businessType = '变更签证管理'; addItemData.businessType = '变更签证管理';
const showDatem = await addItemApi(addItemData); const showDatem = await addItemApi(addItemData);
createMessage.success('提交成功!'); if (isSubmit === '0'){
createMessage.success('暂存成功!');
} else {
createMessage.success('提交成功!');
}
// router.go(-1); // router.go(-1);
} else { } else {
const res = await addItem(data); const res = await addItem(data);
console.log('res',res)
addItemData.operateType = operateType.add; addItemData.operateType = operateType.add;
addItemData.businessId = res; addItemData.businessId = res;
addItemData.businessType = '变更签证管理'; addItemData.businessType = '变更签证管理';
const showDatem = await addItemApi(addItemData); const showDatem = await addItemApi(addItemData);
createMessage.success('提交成功!'); if (isSubmit === '0'){
createMessage.success('暂存成功!');
} else {
createMessage.success('提交成功!');
}
// router.go(-1); // router.go(-1);
} }
//修改接口 //修改接口
......
...@@ -80,7 +80,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -80,7 +80,7 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'companyName', field: 'companyId',
label: '', label: '',
component: 'Select', component: 'Select',
required: false, required: false,
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
placement: 'left', placement: 'left',
confirm: examine.bind(null, record, true), confirm: examine.bind(null, record, true),
}, },
ifShow: (_action) => {
return deptId !== 100 && isExamine === true && record.isSubmit == 1;
},
}, },
{ {
label: '删除', label: '删除',
...@@ -70,20 +73,29 @@ ...@@ -70,20 +73,29 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {addItemApi, addItemData, operateType} from '@/api/operations/operations'; import { addItemApi, addItemData, operateType } from '@/api/operations/operations';
import {BasicTable, TableAction, useTable} from '@/components/Table'; import { BasicTable, TableAction, useTable } from '@/components/Table';
import {useModal} from '@/components/Modal'; import { useModal } from '@/components/Modal';
import {auditItem, checkQuarter, deleteList, getSettlementManageList,} from '@/api/changeSignatrue/changeSignatrue'; import {
import {columns, searchFormSchema} from '@/views/changeSignature/changeSignatrue.data'; auditItem,
import {Tag} from 'ant-design-vue'; checkQuarter,
import {useRouter} from 'vue-router'; deleteList,
import {onMounted} from 'vue'; getSettlementManageList,
import {getDepartmentList} from '@/api/project/settlementManage'; } from '@/api/changeSignatrue/changeSignatrue';
import {useMessage} from '@/hooks/web/useMessage'; import { columns, searchFormSchema } from '@/views/changeSignature/changeSignatrue.data';
import { Tag } from 'ant-design-vue';
import { useRouter } from 'vue-router';
import { onMounted, ref } from 'vue';
import { getDepartmentList } from '@/api/project/settlementManage';
import { useMessage } from '@/hooks/web/useMessage';
import yearModal from '@/components/yearModal/yearModal.vue';
import {useUserStore} from "@/store/modules/user";
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const { push } = useRouter(); const { push } = useRouter();
const [register, { openModal: openModal, closeModal: closeModal }] = useModal(); const [register, { openModal: openModal, closeModal: closeModal }] = useModal();
const isExamine = ref<boolean>(false);
const deptId = '' + useUserStore().userInfo.deptParentId;
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
api: getSettlementManageList, api: getSettlementManageList,
...@@ -107,11 +119,8 @@ const { createMessage } = useMessage(); ...@@ -107,11 +119,8 @@ const { createMessage } = useMessage();
onMounted(async () => { onMounted(async () => {
const data = await getDepartmentList(); const data = await getDepartmentList();
searchFormSchema[2].componentProps.options = data.map(item => ({ console.log('data',data)
key: item.value, searchFormSchema[2].componentProps.options = data;
value: item.label,
label: item.label
}));
}); });
async function handleDelete(record: Recordable) { async function handleDelete(record: Recordable) {
......
...@@ -269,6 +269,7 @@ ...@@ -269,6 +269,7 @@
const info = res[i]; const info = res[i];
info.time = [info.beginTime, info.endTime]; info.time = [info.beginTime, info.endTime];
const data = { const data = {
proId: info.proId,
id: info.id, id: info.id,
investmentId: info.investmentId, investmentId: info.investmentId,
}; };
...@@ -457,7 +458,8 @@ ...@@ -457,7 +458,8 @@
// } // }
} }
async function deleteItem(index: any) { async function deleteItem(index: any) {
tabsFormSchema[index].show = false; formData.value.subList.splice(index, 1);
tabsFormSchema.splice(index, 1);
} }
async function handleAdd() { async function handleAdd() {
openDrawer(true, { openDrawer(true, {
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
danger danger
v-if="!disabled" v-if="!disabled"
@click="deleteItem(index)" @click="deleteItem(index)"
>删除项目</a-button> >删除项目</a-button
>
</template> </template>
<BasicForm :loading="loading" @register="item.Form[0]" /> <BasicForm :loading="loading" @register="item.Form[0]" />
<div style="width: 500px"> <div style="width: 500px">
...@@ -131,9 +132,21 @@ ...@@ -131,9 +132,21 @@
} else { } else {
disabled.value = route.query.disabled == '0' ? false : true; disabled.value = route.query.disabled == '0' ? false : true;
if (disabled.value) { if (disabled.value) {
getTitle.value = '查看' + route.query.filingCycle + '年工程项目投资计划' + '(' + route.query.planType + ')'; getTitle.value =
'查看' +
route.query.filingCycle +
'年工程项目投资计划' +
'(' +
route.query.planType +
')';
} else { } else {
getTitle.value = '编辑' + route.query.filingCycle + '年工程项目投资计划' + '(' + route.query.planType + ')'; getTitle.value =
'编辑' +
route.query.filingCycle +
'年工程项目投资计划' +
'(' +
route.query.planType +
')';
} }
engineerId.value = id; engineerId.value = id;
isUpdate.value = true; isUpdate.value = true;
...@@ -301,9 +314,8 @@ ...@@ -301,9 +314,8 @@
}); });
} }
async function deleteItem(index: any) { async function deleteItem(index: any) {
console.log('点击删除时改变当前卡片的显示状态', tabsFormSchema);
tabsFormSchema.splice(index, 1);
formData.value.investmentPlan.splice(index, 1); formData.value.investmentPlan.splice(index, 1);
tabsFormSchema.splice(index, 1);
} }
async function handleAdd() { async function handleAdd() {
openDrawer(true, { openDrawer(true, {
...@@ -313,26 +325,19 @@ ...@@ -313,26 +325,19 @@
async function handleSuccess(params: any) { async function handleSuccess(params: any) {
handleNew(params); handleNew(params);
} }
async function getFormData(form: any) {
const { validate, getFieldsValue } = form;
await validate();
let res = getFieldsValue();
return res;
}
async function handleSubmit(isSubmit) { async function handleSubmit(isSubmit) {
console.log(tabsFormSchema); console.log(tabsFormSchema);
loading.value = true; loading.value = true;
try { try {
for (let i = 0; i < tabsFormSchema.length; i++) { for (let i = 0; i < tabsFormSchema.length; i++) {
let item = tabsFormSchema[i]; let item = tabsFormSchema[i];
let res = await getFormData(item.Form[1]);
console.log('1212', res );
if (item.show) { if (item.show) {
console.log('5656', formData.value); console.log('5656', item.table[1]);
const { validate, getFieldsValue } = item.Form[1]; const { validate, getFieldsValue } = item.Form[1];
const { getDataSource } = item.table[1]; const { getDataSource } = item.table[1];
await validate();
let res = getFieldsValue(); let res = getFieldsValue();
console.log('2323', res);
await validate();
let data = getDataSource(); let data = getDataSource();
data[0].amount = Number(data[0].amount); data[0].amount = Number(data[0].amount);
data[1].amount = Number(data[1].amount); data[1].amount = Number(data[1].amount);
......
...@@ -291,7 +291,6 @@ ...@@ -291,7 +291,6 @@
// const data = await getUserList() // const data = await getUserList()
// searchForm.value[1].componentProps.options = data // searchForm.value[1].componentProps.options = data
// const { deptId } = userStore.getUserInfo;、 // const { deptId } = userStore.getUserInfo;、
console.log(deptId,'12hdadg')
if (deptId === '100') { if (deptId === '100') {
columns.value = columns1; columns.value = columns1;
} else { } else {
...@@ -375,7 +374,6 @@ ...@@ -375,7 +374,6 @@
companyId: data.companyId, companyId: data.companyId,
}; };
} }
console.log(params.value,'111111111111111111111111111111111111111111111111')
getStatisticList(); getStatisticList();
} }
......
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