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/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..98442a5 100644 --- a/src/views/contract/bidCost/index.vue +++ b/src/views/contract/bidCost/index.vue @@ -32,6 +32,15 @@ 导出excel + + 一键确定 + 确定 { } } }; -//修改单价 -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/limitPrice/index.vue b/src/views/contract/limitPrice/index.vue index 2c56ace..ac418f1 100644 --- a/src/views/contract/limitPrice/index.vue +++ b/src/views/contract/limitPrice/index.vue @@ -35,6 +35,15 @@ 导出excel + + 一键确定 + 审核 @@ -65,6 +74,7 @@ @change=" (val) => { scope.row.unitPrice = val; + changePrice(scope.row); } " :precision="2" @@ -87,7 +97,7 @@ type="primary" size="small" :disabled="reviewStatus != 'draft'" - @click="handleSave(scope.row)" + @click="handleSave(scope.row, 'single')" v-if="scope.row.quantity && scope.row.quantity != 0" v-hasPermi="['tender:billofquantitiesLimitList:edit']" >确定 { 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..918ce8d 100644 --- a/src/views/formalities/formalitiesAreConsolidated/index.vue +++ b/src/views/formalities/formalitiesAreConsolidated/index.vue @@ -67,7 +67,7 @@ - +