|
@@ -226,7 +226,7 @@
|
|
|
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
|
|
import { JDictSelectTag} from '/@/components/Form';
|
|
|
import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
|
|
|
- import { Form } from 'ant-design-vue';
|
|
|
+ import { Form, message } from 'ant-design-vue';
|
|
|
import moment from 'moment';
|
|
|
const useForm = Form.useForm;
|
|
|
export default defineComponent({
|
|
@@ -422,15 +422,19 @@
|
|
|
}
|
|
|
|
|
|
async function submitForm() {
|
|
|
- const mainData = await getFormData();
|
|
|
- const subData = await getSubFormAndTableData();
|
|
|
- const values = Object.assign({}, dbData, mainData, subData);
|
|
|
- console.log('表单提交数据', values)
|
|
|
- const isUpdate = values.id ? true : false
|
|
|
- const isRevise = values.submit=='1' ? true : false
|
|
|
- await saveOrUpdate(values, isUpdate,isRevise);
|
|
|
- //关闭弹窗
|
|
|
- emit('success');
|
|
|
+ if(formData.sourceCode==''&&formData.sourceCode2==''){
|
|
|
+ message.warning('请选择合同或报价单')
|
|
|
+ }else{
|
|
|
+ const mainData = await getFormData();
|
|
|
+ const subData = await getSubFormAndTableData();
|
|
|
+ const values = Object.assign({}, dbData, mainData, subData);
|
|
|
+ console.log('表单提交数据', values)
|
|
|
+ const isUpdate = values.id ? true : false
|
|
|
+ const isRevise = values.submit=='1' ? true : false
|
|
|
+ await saveOrUpdate(values, isUpdate,isRevise);
|
|
|
+ //关闭弹窗
|
|
|
+ emit('success');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function setFieldsValue(values) {
|