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