|
|
|
@ -1,9 +1,9 @@
|
|
|
|
|
<template> |
|
|
|
|
|
|
|
|
|
<a-spin :spinning="confirmLoading"> |
|
|
|
|
<j-form-container :disabled="formDisabled"> |
|
|
|
|
<j-form-container :disabled="formDisabled"> |
|
|
|
|
<!-- 主表单区域 --> |
|
|
|
|
<a-form :form="form" slot="detail"> |
|
|
|
|
<a-form :form="form" :rules="rules" slot="detail" > |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="8" v-show="false"> |
|
|
|
|
<a-form-item label="ID" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
@ -32,9 +32,10 @@
|
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-dict-select-tag type="list" v-decorator="['materialType']" :trigger-change="true" dictCode="material_type" |
|
|
|
|
placeholder="请选择物资类型"/> |
|
|
|
|
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol" > |
|
|
|
|
<j-dict-select-tag type="list" v-decorator="['materialType']" :trigger-change="true" dictCode="material_type" |
|
|
|
|
placeholder="请选择物资类型" /> |
|
|
|
|
|
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
@ -44,15 +45,15 @@
|
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="需求时间" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-date placeholder="请选择需求时间" v-decorator="['needTime']" :trigger-change="true" style="width: 100%"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="顺序号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-input-number v-decorator="['orderNumber']" placeholder="请输入顺序号" style="width: 100%"/> |
|
|
|
|
<a-form-item label="需求时间" :labelCol="labelCol" :wrapperCol="wrapperCol" > |
|
|
|
|
<j-date placeholder="请选择需求时间" v-decorator="['needTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<!-- <a-col :span="8">--> |
|
|
|
|
<!-- <a-form-item label="顺序号" :labelCol="labelCol" :wrapperCol="wrapperCol">--> |
|
|
|
|
<!-- <a-input-number v-decorator="['orderNumber']" placeholder="请输入顺序号" style="width: 100%"/>--> |
|
|
|
|
<!-- </a-form-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<a-col :span="8"> |
|
|
|
|
<a-form-item label="文件" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-upload v-decorator="['fileId']" :trigger-change="true"></j-upload> |
|
|
|
@ -326,7 +327,14 @@
|
|
|
|
|
list: '/hy/processUdgetPlan/queryProcessUdgetPlanMaterialByMainId' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
btndisabled: false |
|
|
|
|
btndisabled: false, |
|
|
|
|
// 表单校验 |
|
|
|
|
rules: { |
|
|
|
|
// 'blur'是鼠标失去焦点的时候会触发验证 |
|
|
|
|
materialType: [ { required: true, message: '请输入标题名称' ,trigger: 'blur'}], |
|
|
|
|
needTime: [ { required: true, message: '请输入内容' ,trigger: 'blur'}], |
|
|
|
|
processPlan: [ { required: true, message: '请选择协议类型', trigger: 'blur' }] |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
props: { |
|
|
|
@ -556,6 +564,22 @@
|
|
|
|
|
} |
|
|
|
|
let formData = this.classifyIntoFormData(allValues) |
|
|
|
|
|
|
|
|
|
if (new Date(formData.createTime).getTime()/100>new Date(formData.needTime).getTime()/100){ |
|
|
|
|
this.$message.error("需求时间不能小于当前流程发起时间") |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (formData.needTime === null || formData.needTime ==='' || formData.needTime === undefined){ |
|
|
|
|
this.$message.error("需求时间不能为空") |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (formData.processPlan === null || formData.processPlan ==='' || formData.processPlan === undefined){ |
|
|
|
|
this.$message.error("流程计划不能为空") |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (formData.materialType === null || formData.materialType ==='' || formData.materialType === undefined){ |
|
|
|
|
this.$message.error("物资类型不能为空") |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.form.validateFields((err, values) => { |
|
|
|
|
if (!err) { |
|
|
|
|
formData.procDefId = this.processData.id; |
|
|
|
|