<template>
|
<a-modal
|
:title="title"
|
:width="1200"
|
:visible="visible"
|
:confirmLoading="confirmLoading"
|
@ok="handleOk"
|
@cancel="handleCancel"
|
>
|
<a-spin :spinning="confirmLoading">
|
<a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :model="model" :rules="validatorRules">
|
<!-- 主表单区域 -->
|
<a-row class="form-row" :gutter="16">
|
<a-col :lg="24">
|
<a-form-model-item label="概述" prop="gs">
|
<a-textarea v-model="model.gs" :auto-size="{ minRows: 3, maxRows: 10 }" placeholder="请输入概述内容" />
|
</a-form-model-item>
|
</a-col>
|
<a-col :lg="24">
|
<a-form-model-item label="预测" prop="yc">
|
<a-textarea v-model="model.yc" :auto-size="{ minRows: 3, maxRows: 10 }" placeholder="请输入预测内容" />
|
</a-form-model-item>
|
</a-col>
|
|
<a-col :lg="24">
|
<a-form-model-item label="进度是否正常">
|
<a-textarea v-model="model.jdsfzc" :auto-size="{ minRows: 3, maxRows: 10 }" placeholder="请输入进度是否正常" />
|
</a-form-model-item>
|
</a-col>
|
|
<a-col :lg="24">
|
<a-form-model-item label="是否需要组织支持">
|
<a-textarea v-model="model.sfxyzc" :auto-size="{ minRows: 3, maxRows: 10 }" placeholder="请输入是否需要组织支持" />
|
</a-form-model-item>
|
</a-col>
|
|
<a-col :lg="24">
|
<a-form-model-item label="是否影响销售和订单">
|
<a-textarea v-model="model.sfyxdd" :auto-size="{ minRows: 3, maxRows: 10 }" placeholder="请输入是否影响销售和订单" />
|
</a-form-model-item>
|
</a-col>
|
|
<a-col :lg="24">
|
<a-form-model-item label="风险预测和估计">
|
<a-textarea v-model="model.fxyc" :auto-size="{ minRows: 3, maxRows: 10 }" placeholder="请输入风险预测和估计" />
|
</a-form-model-item>
|
</a-col>
|
|
</a-row>
|
</a-form-model>
|
</a-spin>
|
|
<!-- 选择用户 -->
|
</a-modal>
|
</template>
|
|
<script>
|
import { postAction, putAction } from '@/api/manage'
|
|
export default {
|
name: 'ProjectModal4',
|
data() {
|
return {
|
title: '修改概述与预测',
|
visible: false,
|
form: this.$form.createForm(this),
|
userIds: 'admin',
|
model: {},
|
labelCol: {
|
xs: { span: 24 },
|
sm: { span: 5 },
|
},
|
wrapperCol: {
|
xs: { span: 24 },
|
sm: { span: 16 },
|
},
|
confirmLoading: false,
|
validatorRules: {
|
gs: [{ required: true, message: '概述不能为空', trigger: 'blur' }],
|
yc: [{ required: true, message: '预测不能为空', trigger: 'blur' }],
|
},
|
url: {
|
add: '/pro/summary/add',
|
},
|
}
|
},
|
created() {},
|
watch: {
|
/* model(newName, oldName) {
|
if(newName.projectManager_dictText){
|
let that = this;
|
setTimeout(() => {
|
that.userIds = newName.projectManager_dictText;
|
|
}, 1000)
|
|
}
|
|
}*/
|
},
|
methods: {
|
edit(record) {
|
this.form.resetFields()
|
this.visible = true
|
//数据类型为预测
|
record.type = 3
|
this.model = Object.assign({}, record)
|
},
|
|
handleCancel() {
|
this.close()
|
},
|
handleOk() {
|
let that = this
|
this.$refs.form.validate((valid) => {
|
if (valid) {
|
that.confirmLoading = true
|
//add
|
//每次修改都新增一条记录,清除多余字段
|
that.model.id = null
|
that.model.createBy = null
|
that.model.createTime = null
|
that.model.updateBy = null
|
that.model.updateTime = null
|
|
postAction(this.url.add, that.model)
|
.then((res) => {
|
that.confirmLoading = false
|
if (res.success) {
|
that.close()
|
that.$message.success(res.message)
|
that.$emit('ok', res.result)
|
that.close()
|
} else {
|
that.$message.warning(res.message)
|
}
|
})
|
.finally(() => {
|
that.confirmLoading = false
|
})
|
}
|
})
|
},
|
close() {
|
this.$emit('close')
|
this.visible = false
|
},
|
handleAddUser() {},
|
handleChangeUserCommon(v) {},
|
},
|
}
|
</script>
|
|
<style scoped>
|
</style>
|