|
@@ -275,8 +275,8 @@
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="btn">
|
|
|
- <el-button type="primary" size="mini" @click="onSubmit('0')">保存</el-button>
|
|
|
- <el-button type="success" size="mini" @click="onSubmit('1')">提交</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="onSreser('form')">保存</el-button>
|
|
|
+ <el-button type="success" size="mini" @click="onSubmit('form')">提交</el-button>
|
|
|
</el-col>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
@@ -304,9 +304,9 @@ export default {
|
|
|
name: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
|
|
pro_user: [{ required: true, message: '请输入项目负责人', trigger: 'blur' }],
|
|
|
pro_phone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
|
|
|
- techol_stage: [{ required: true, message: '请输入技术阶段', trigger: 'blur' }],
|
|
|
- techol_level: [{ required: true, message: '请输入技术水平', trigger: 'blur' }],
|
|
|
- field: [{ required: true, message: '请输入领域分类', trigger: 'blur' }],
|
|
|
+ techol_stage: [{ required: true, message: '请输入技术阶段', trigger: 'change' }],
|
|
|
+ techol_level: [{ required: true, message: '请输入技术水平', trigger: 'change' }],
|
|
|
+ field: [{ required: true, message: '请输入领域分类', trigger: 'change' }],
|
|
|
scale: [{ required: true, message: '请输入市场预估', trigger: 'blur' }],
|
|
|
proposal_company: [{ required: true, message: '请输入建议单位名称', trigger: 'blur' }],
|
|
|
proposal_user: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
|
|
@@ -336,58 +336,75 @@ export default {
|
|
|
methods: {
|
|
|
...question(['query']),
|
|
|
...projectsolic(['create']),
|
|
|
- async onSubmit(status) {
|
|
|
- let data = this.form;
|
|
|
- data.user_id = this.user.userid;
|
|
|
- data.question_id = this.questionInfo._id;
|
|
|
- data.status = status;
|
|
|
- if (status == '0') {
|
|
|
- this.$alert(
|
|
|
- '<strong><p>1:用户</p><p>当您进行项目征集时,系统会自动提取项目负责人和联系电话进行平台用户注册,您可用【联系电话】和【初始密码(111111)】进行登录。</p><p>2:保存按钮</p><p>保存按钮,是您填写的信息处于草稿状态,您可到个人中心查看并进行修改与提交。</p></strong>',
|
|
|
- '信息提示',
|
|
|
- {
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- showConfirmButton: true,
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- }
|
|
|
- )
|
|
|
- .then(async () => {
|
|
|
- let res = await this.create(data);
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$message({
|
|
|
- message: '数据添加成功',
|
|
|
- type: 'success',
|
|
|
- });
|
|
|
- this.$router.push({ path: '/technical/index' });
|
|
|
+ onSreser(formName) {
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ let data = this.form;
|
|
|
+ data.status = '0';
|
|
|
+ data.user_id = this.user.userid;
|
|
|
+ data.question_id = this.questionInfo._id;
|
|
|
+ this.$alert(
|
|
|
+ '<strong><p>1:用户</p><p>当您进行项目征集时,系统会自动提取项目负责人和联系电话进行平台用户注册,您可用【联系电话】和【初始密码(111111)】进行登录。</p><p>2:保存按钮</p><p>保存按钮,是您填写的信息处于草稿状态,您可到个人中心查看并进行修改与提交。</p></strong>',
|
|
|
+ '信息提示',
|
|
|
+ {
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ showConfirmButton: true,
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
}
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- } else {
|
|
|
- this.$alert(
|
|
|
- '<strong><p>1:用户</p><p>当您进行项目征集时,系统会自动提取项目负责人和联系电话进行平台用户注册,您可用【联系电话】和【初始密码(111111)】进行登录。</p><p>2:提交按钮</p><p>提交按钮,是您填写的信息处于已发布状态,已发布状态下的项目征集信息是不允许修改的,请您谨慎填写。您也可到个人中心查看提交记录。</p></strong>',
|
|
|
- '信息提示',
|
|
|
- {
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- showConfirmButton: true,
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- }
|
|
|
- )
|
|
|
- .then(async () => {
|
|
|
- let res = await this.create(data);
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$message({
|
|
|
- message: '数据添加成功',
|
|
|
- type: 'success',
|
|
|
- });
|
|
|
- this.$router.push({ path: '/technical/index' });
|
|
|
+ )
|
|
|
+ .then(async () => {
|
|
|
+ let res = await this.create(data);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$message({
|
|
|
+ message: '数据添加成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ this.$router.push({ path: '/technical/index' });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onSubmit(formName) {
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ let data = this.form;
|
|
|
+ data.status = '1';
|
|
|
+ data.user_id = this.user.userid;
|
|
|
+ data.question_id = this.questionInfo._id;
|
|
|
+ this.$alert(
|
|
|
+ '<strong><p>1:用户</p><p>当您进行项目征集时,系统会自动提取项目负责人和联系电话进行平台用户注册,您可用【联系电话】和【初始密码(111111)】进行登录。</p><p>2:保存按钮</p><p>保存按钮,是您填写的信息处于草稿状态,您可到个人中心查看并进行修改与提交。</p></strong>',
|
|
|
+ '信息提示',
|
|
|
+ {
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ showConfirmButton: true,
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
}
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- }
|
|
|
+ )
|
|
|
+ .then(async () => {
|
|
|
+ let res = await this.create(data);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$message({
|
|
|
+ message: '数据添加成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ this.$router.push({ path: '/technical/index' });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 查询通知
|
|
|
async searchOther() {
|