This commit is contained in:
parent
c21a8f7770
commit
09a5616d6a
|
|
@ -48,7 +48,7 @@ export function getActualCostManageListAPI(data) {
|
|||
// 新增实际成本管理
|
||||
export function addActualCostManageAPI(data) {
|
||||
return request({
|
||||
url: '/background/***',
|
||||
url: '/background/sj/manage/addData',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
|
|
@ -57,7 +57,7 @@ export function addActualCostManageAPI(data) {
|
|||
// 编辑实际成本管理
|
||||
export function editActualCostManageAPI(data) {
|
||||
return request({
|
||||
url: '/background/***',
|
||||
url: '/background/sj/manage/updateData',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
submitForm() {
|
||||
async submitForm() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$refs.addAndEditFormRef.validate(async (valid) => {
|
||||
if (valid) {
|
||||
|
|
@ -145,5 +145,3 @@ export default {
|
|||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="计划日期" prop="dateTime">
|
||||
<el-form-item label="日期" prop="dateTime">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
v-model="addAndEditForm.dateTime"
|
||||
placeholder="请选择计划日期"
|
||||
placeholder="请选择日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
|
|
@ -52,8 +52,8 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
addPlanCostManageAPI,
|
||||
editPlanCostManageAPI,
|
||||
addActualCostManageAPI,
|
||||
editActualCostManageAPI,
|
||||
} from '@/api/dataAnalysis/projectManage'
|
||||
export default {
|
||||
name: 'AddAndEditFormTwo',
|
||||
|
|
@ -79,7 +79,7 @@ export default {
|
|||
dateTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择计划日期',
|
||||
message: '请选择日期',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
|
|
@ -102,13 +102,13 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
submitForm() {
|
||||
async submitForm() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$refs.addAndEditFormRef.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const API = this.detailsId
|
||||
? editPlanCostManageAPI
|
||||
: addPlanCostManageAPI
|
||||
? editActualCostManageAPI
|
||||
: addActualCostManageAPI
|
||||
|
||||
const params = this.addAndEditForm
|
||||
if (this.detailsId) {
|
||||
|
|
|
|||
|
|
@ -327,6 +327,7 @@ export default {
|
|||
if (this.safetyType === '计划成本管理') {
|
||||
const res = await this.$refs.addAndEditFormOneRef.submitForm()
|
||||
if (res) {
|
||||
console.log(res)
|
||||
this.$message.success('提交成功')
|
||||
this.getPlanCostManageList()
|
||||
this.addAndEditDialogVisible = false
|
||||
|
|
@ -342,7 +343,6 @@ export default {
|
|||
} else {
|
||||
this.$message.error('提交失败')
|
||||
}
|
||||
this.$refs.addAndEditFormTwoRef.submitForm()
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue