diff --git a/.env.development b/.env.development index 4c056ae..c1b3fa0 100644 --- a/.env.development +++ b/.env.development @@ -8,11 +8,11 @@ VITE_APP_ENV = 'development' # 李陈杰 209 # VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 曾涛 -VITE_APP_BASE_API = 'http://192.168.110.180:8899' +# VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 罗成 # VITE_APP_BASE_API = 'http://192.168.110.213:8899' # 朱银 -# VITE_APP_BASE_API = 'http://192.168.110.149:8899' +VITE_APP_BASE_API = 'http://192.168.110.149:8899' #曾涛 # VITE_APP_BASE_API = 'http://192.168.110.171:8899' diff --git a/src/api/formalities/listOfFormalities/index.ts b/src/api/formalities/listOfFormalities/index.ts index 427f8d8..61fcba2 100644 --- a/src/api/formalities/listOfFormalities/index.ts +++ b/src/api/formalities/listOfFormalities/index.ts @@ -75,3 +75,12 @@ export const getWhetherItExists = (id: string | number): AxiosPromise => { + return request({ + url: '/formalities/formalitiesAreConsolidated/addFormalities', + method: 'post', + data + }); +}; diff --git a/src/views/biddingManagemen/biddingLimit/index.vue b/src/views/biddingManagemen/biddingLimit/index.vue index ce13de3..eca3c03 100644 --- a/src/views/biddingManagemen/biddingLimit/index.vue +++ b/src/views/biddingManagemen/biddingLimit/index.vue @@ -63,14 +63,7 @@ diff --git a/src/views/contract/bidCost/index.vue b/src/views/contract/bidCost/index.vue index 46e9499..660977c 100644 --- a/src/views/contract/bidCost/index.vue +++ b/src/views/contract/bidCost/index.vue @@ -32,6 +32,15 @@ 导出excel + + 一键确定 + 查看流程 @@ -66,7 +75,12 @@ 确定 { } } }; -//修改单价 -const handleSave = (row: any) => { +const modifyPrice = new Map(); + +const changePrice = (row: any) => { + modifyPrice.set(row.id, row); + // if (!row.unitPrice) { + // modifyPrice.delete(row.id); + // } +}; +//修改单价 biddingLimitListUpdate +const handleSave = (row?: any, type?: any) => { try { - if (!row.unitPrice) { - ElMessage({ - message: '请输入单价', - type: 'warning' + if (type == 'single') { + loading.value = true; + const list = [{ ...row }]; + biddingLimitListUpdate(list).then((res) => { + if (res.code == 200) { + ElMessage({ + message: '修改成功', + type: 'success' + }); + getTableData(); + } + }); + } + if (type == 'all') { + loading.value = true; + const list = []; + modifyPrice.forEach((item) => { + list.push({ ...item }); + }); + biddingLimitListUpdate(list).then((res) => { + if (res.code == 200) { + ElMessage({ + message: '修改成功', + type: 'success' + }); + getTableData(); + } }); - return; } - loading.value = true; - biddingLimitListUpdate(row).then((res) => { - if (res.code == 200) { - ElMessage({ - message: '修改成功', - type: 'success' - }); - getTableData(); - } - }); } catch (error) { ElMessage({ message: '修改失败', type: 'error' }); + } finally { + loading.value = false; } }; const tableRef = ref(); diff --git a/src/views/contract/division/index.vue b/src/views/contract/division/index.vue index f78dd09..afb7c94 100644 --- a/src/views/contract/division/index.vue +++ b/src/views/contract/division/index.vue @@ -26,20 +26,39 @@ - + + diff --git a/src/views/contract/limitPrice/index.vue b/src/views/contract/limitPrice/index.vue index 2c56ace..858f4ab 100644 --- a/src/views/contract/limitPrice/index.vue +++ b/src/views/contract/limitPrice/index.vue @@ -36,13 +36,22 @@ 导出excel - 审核 + 一键确定 + + + 审核 查看流程确定 { loading.value = false; } }; +const modifyPrice = new Map(); + +const changePrice = (row: any) => { + modifyPrice.set(row.id, row); +}; //修改单价 -const handleSave = (row: any) => { +const handleSave = (row?: any, type?: any) => { try { - if (!row.unitPrice) { - ElMessage({ - message: '请输入单价', - type: 'warning' + if (type == 'single') { + loading.value = true; + const list = [{ ...row, type: '1' }]; + updatePrice(list).then((res) => { + if (res.code == 200) { + ElMessage({ + message: '修改成功', + type: 'success' + }); + getTableData(); + } + }); + } + if (type == 'all') { + loading.value = true; + const list = []; + modifyPrice.forEach((item) => { + list.push({ ...item, type: '1' }); + }); + updatePrice(list).then((res) => { + if (res.code == 200) { + ElMessage({ + message: '修改成功', + type: 'success' + }); + getTableData(); + } }); - return; } - loading.value = true; - updatePrice({ ...row, type: '1' }).then((res) => { - if (res.code == 200) { - ElMessage({ - message: '修改成功', - type: 'success' - }); - getTableData(); - } - }); } catch (error) { ElMessage({ message: '修改失败', type: 'error' }); + } finally { + loading.value = false; } }; const tableRef = ref(); diff --git a/src/views/formalities/formalitiesAreConsolidated/index.vue b/src/views/formalities/formalitiesAreConsolidated/index.vue index f4918d9..b9eb7e2 100644 --- a/src/views/formalities/formalitiesAreConsolidated/index.vue +++ b/src/views/formalities/formalitiesAreConsolidated/index.vue @@ -49,6 +49,11 @@ 新增 + + 新增模版 + - + @@ -253,12 +284,15 @@ import { editStatus, getTemplateTreeList } from '@/api/formalities/formalitiesAreConsolidated'; +import { listListOfFormalities, addFormalities } from '@/api/formalities/listOfFormalities'; import { FormalitiesAreConsolidatedVO, FormalitiesAreConsolidatedQuery, FormalitiesAreConsolidatedForm } from '@/api/formalities/formalitiesAreConsolidated/types'; import { useUserStoreHook } from '@/store/modules/user'; +import { WarningFilled } from '@element-plus/icons-vue'; + const fileVisible = ref(false); const { proxy } = getCurrentInstance() as ComponentInternalInstance; // 获取用户 store @@ -287,6 +321,7 @@ const dialog = reactive({ visible: false, title: '' }); + const file = ref(null); const fileParams = reactive({ pageNum: 1, @@ -404,7 +439,39 @@ const handleAdd = async () => { tempTreeList.value = res.data; templateVisbile.value = true; }; - +const tempDialogVisible = ref(false); +const formTemplate: any = ref({ + formalitiesPid: '', + formalitiesName: '' +}); +const listOfFormalitiesList: any = ref([]); +//新增模版 +const addTemplate = async () => { + tempDialogVisible.value = true; + const res = await listListOfFormalities(); + listOfFormalitiesList.value = res.data; +}; +//确定信息 +const submitFormTemplate = async () => { + const params = { + projectId: currentProject.value.id, + addBusFormalitiesAreConsolidatedBo: { + ...formTemplate.value + } + }; + const res = await addFormalities(params); + if (res.code == 200) { + proxy?.$modal.msgSuccess('操作成功'); + templateCancel(); + getList(); + } +}; +//取消 +const templateCancel = () => { + tempDialogVisible.value = false; + formTemplate.value.formalitiesPid = ''; + formTemplate.value.formalitiesName = ''; +}; // 选择模板 const setTemp = async () => { // form.value.formalitiesPid = tempValue.value[tempValue.value.length - 1]; diff --git a/src/views/formalities/listOfFormalities/index.vue b/src/views/formalities/listOfFormalities/index.vue index 2a563a2..5bcd5b9 100644 --- a/src/views/formalities/listOfFormalities/index.vue +++ b/src/views/formalities/listOfFormalities/index.vue @@ -1,6 +1,5 @@