审批同意 变更优化
This commit is contained in:
@ -269,13 +269,13 @@
|
|||||||
async function getFormValue() {
|
async function getFormValue() {
|
||||||
return formState
|
return formState
|
||||||
}
|
}
|
||||||
async function handleSubmit(type) {
|
async function handleSubmit(type, updateType) {
|
||||||
try {
|
try {
|
||||||
await formRef.value.validateFields();
|
await formRef.value.validateFields();
|
||||||
let obj = {
|
let obj = {
|
||||||
...formState,
|
...formState,
|
||||||
lngFileUploadList: dataFile.value,
|
lngFileUploadList: dataFile.value,
|
||||||
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
|
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
let request = !formState.id ? addLngAppro :updateLngAppro
|
let request = !formState.id ? addLngAppro :updateLngAppro
|
||||||
|
|||||||
@ -551,7 +551,7 @@
|
|||||||
async function getFormValue() {
|
async function getFormValue() {
|
||||||
return formState
|
return formState
|
||||||
}
|
}
|
||||||
async function handleSubmit(type) {
|
async function handleSubmit(type, updateType) {
|
||||||
try {
|
try {
|
||||||
await formRef.value.validateFields();
|
await formRef.value.validateFields();
|
||||||
|
|
||||||
@ -567,7 +567,7 @@
|
|||||||
lngFileUploadList: dataFile.value,
|
lngFileUploadList: dataFile.value,
|
||||||
lngContractFactCpList: dataList.value,
|
lngContractFactCpList: dataList.value,
|
||||||
lngContractApproRelList: dataListAppro.value,
|
lngContractApproRelList: dataListAppro.value,
|
||||||
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
|
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
|
||||||
|
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
|
|||||||
@ -517,7 +517,7 @@
|
|||||||
async function getFormValue() {
|
async function getFormValue() {
|
||||||
return formState
|
return formState
|
||||||
}
|
}
|
||||||
async function handleSubmit(type) {
|
async function handleSubmit(type, updateType) {
|
||||||
try {
|
try {
|
||||||
await formRef.value.validateFields();
|
await formRef.value.validateFields();
|
||||||
let arr = contractQty.value.getQtyList()
|
let arr = contractQty.value.getQtyList()
|
||||||
@ -572,7 +572,7 @@
|
|||||||
"uomCode": formState.uomCode,
|
"uomCode": formState.uomCode,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
|
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
|
||||||
|
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
|
|||||||
@ -541,7 +541,7 @@
|
|||||||
async function getFormValue() {
|
async function getFormValue() {
|
||||||
return formState
|
return formState
|
||||||
}
|
}
|
||||||
async function handleSubmit(type) {
|
async function handleSubmit(type, updateType) {
|
||||||
try {
|
try {
|
||||||
await formRef.value.validateFields();
|
await formRef.value.validateFields();
|
||||||
let arr = contractQty.value.getQtyList()
|
let arr = contractQty.value.getQtyList()
|
||||||
@ -598,7 +598,7 @@
|
|||||||
"uomCode": formState.uomCode,
|
"uomCode": formState.uomCode,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
|
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
|
||||||
|
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
|
|||||||
@ -282,14 +282,14 @@
|
|||||||
async function getFormValue() {
|
async function getFormValue() {
|
||||||
return formState
|
return formState
|
||||||
}
|
}
|
||||||
async function handleSubmit(type) {
|
async function handleSubmit(type, updateType) {
|
||||||
try {
|
try {
|
||||||
await formRef.value.validateFields();
|
await formRef.value.validateFields();
|
||||||
let obj = {
|
let obj = {
|
||||||
...formState,
|
...formState,
|
||||||
lngScoreDtlList: dataList.value,
|
lngScoreDtlList: dataList.value,
|
||||||
lngFileUploadList: dataFile.value,
|
lngFileUploadList: dataFile.value,
|
||||||
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
|
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
let request = !formState.id ? addLngScore :updateLngScore
|
let request = !formState.id ? addLngScore :updateLngScore
|
||||||
|
|||||||
@ -419,7 +419,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// await formInformation.value.handleSubmit(true);
|
// await formInformation.value.handleSubmit(true);
|
||||||
// validateSuccess.value = true
|
validateSuccess.value = true
|
||||||
}
|
}
|
||||||
const params = await getApproveParams();
|
const params = await getApproveParams();
|
||||||
const nextNodes = await postGetNextTaskMaybeArrival(params);
|
const nextNodes = await postGetNextTaskMaybeArrival(params);
|
||||||
@ -457,7 +457,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await formInformation.value.handleSubmit(true);
|
// await formInformation.value.handleSubmit(true);
|
||||||
validateSuccess.value = true
|
validateSuccess.value = true
|
||||||
}
|
}
|
||||||
const params = await getApproveParams();
|
const params = await getApproveParams();
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
</slot>
|
</slot>
|
||||||
提交
|
提交
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button v-if="customFormConfig.codeList.includes(curPageCode)&&!disabled" @click="onSave">
|
<a-button v-if="customFormConfig.codeList.includes(curPageCode)&&!disabled" :disabled="disableSubmit||data.submitLoading" @click="onSave">
|
||||||
<slot name="icon"><save-outlined /></slot>保存
|
<slot name="icon"><save-outlined /></slot>保存
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button v-if="!customFormConfig.codeList.includes(curPageCode)&&!disabled" :disabled="data.submitLoading" @click="saveDraft">
|
<a-button v-if="!customFormConfig.codeList.includes(curPageCode)&&!disabled" :disabled="data.submitLoading" @click="saveDraft">
|
||||||
@ -351,12 +351,18 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
async function onSave() {
|
async function onSave() {
|
||||||
let value = await formInformation.value.handleSubmit();
|
try {
|
||||||
if (rQuery.type == 'update') {
|
disableSubmit.value = true
|
||||||
setTimeout(() => {
|
let value = await formInformation.value.handleSubmit();
|
||||||
bus.emit(CREATE_FLOW, {});
|
disableSubmit.value = false
|
||||||
close();
|
if (rQuery.type == 'update'&&value) {
|
||||||
}, 500);
|
setTimeout(() => {
|
||||||
|
bus.emit(CREATE_FLOW, {});
|
||||||
|
close();
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
disableSubmit.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function saveLaunchNew() {
|
async function saveLaunchNew() {
|
||||||
@ -383,8 +389,9 @@
|
|||||||
let system = {}
|
let system = {}
|
||||||
let obj = {}
|
let obj = {}
|
||||||
system[key] = false
|
system[key] = false
|
||||||
|
data.submitLoading = true;
|
||||||
let value = await formInformation.value.handleSubmit(true);
|
let value = await formInformation.value.handleSubmit(true, rQuery.type == 'update' ? 'update' : '');
|
||||||
|
data.submitLoading = false;
|
||||||
obj[key] = value
|
obj[key] = value
|
||||||
mainFormModels.value = obj
|
mainFormModels.value = obj
|
||||||
if (!value) return
|
if (!value) return
|
||||||
|
|||||||
@ -283,14 +283,14 @@
|
|||||||
async function getFormValue() {
|
async function getFormValue() {
|
||||||
return formState
|
return formState
|
||||||
}
|
}
|
||||||
async function handleSubmit(type) {
|
async function handleSubmit(type, updateType) {
|
||||||
try {
|
try {
|
||||||
await formRef.value.validateFields();
|
await formRef.value.validateFields();
|
||||||
let obj = {
|
let obj = {
|
||||||
...formState,
|
...formState,
|
||||||
lngScoreDtlList: dataList.value,
|
lngScoreDtlList: dataList.value,
|
||||||
lngFileUploadList: dataFile.value,
|
lngFileUploadList: dataFile.value,
|
||||||
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
|
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
|
||||||
|
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user