资金上会

master
lion 3 months ago
parent 98c9a3c7f7
commit 95b49b3728

@ -18,7 +18,7 @@
</el-form-item>
<el-form-item
prop="meeting_flow_id"
:label="'资金上会流程' + (isMeetingFlowRequired ? ' *' : '')"
label="资金上会流程"
>
<el-select
v-model="form.meeting_flow_id"
@ -1000,26 +1000,6 @@ export default {
},
trigger: 'change'
}
],
meeting_flow_id: [
{
validator: (rule, value, callback) => {
//
if (this.form.is_common_purchase) {
callback()
return
}
// 10
if (this.form.total_money && Number(this.form.total_money) >= 100000) {
if (!value) {
callback(new Error('资金上会流程为必选项'))
return
}
}
callback()
},
trigger: 'change'
}
]
},
contractTypes: [
@ -1229,31 +1209,46 @@ export default {
},
submit() {
this.$refs['elForm'].validate().then(_ => {
//
//
if (this.isMeetingFlowRequired && !this.form.meeting_flow_id) {
this.$message({
type: 'warning',
message: '资金上会流程为必选项'
this.$confirm(
'当前合同金额超出10万元请确认是否需要选择资金上会流程',
'提示',
{
confirmButtonText: '直接提交',
cancelButtonText: '关闭',
type: 'warning',
closeOnClickModal: false,
closeOnPressEscape: false
}
).then(() => {
this._proceedSubmit()
}).catch(() => {
// /
})
return
}
this.form.contract_to_contracts = this.selections.map(i => {
return {
contract_id: this.contrantId,
to_contract_id: i.id,
use_money: i.money
}
})
this.form.contract_flow_links = this.form.contract_flow_links.map(i => ({
...i,
tag: this.flowConfig.find(j => j.custom_model_id == i.custom_model_id)?.tag
}))
editorContract(this.form).then(_ => {
this.$message.success('修改成功')
this.$emit('update:isShow', false)
this.$emit('refresh')
})
//
this._proceedSubmit()
})
},
_proceedSubmit() {
this.form.contract_to_contracts = this.selections.map(i => {
return {
contract_id: this.contrantId,
to_contract_id: i.id,
use_money: i.money
}
})
this.form.contract_flow_links = this.form.contract_flow_links.map(i => ({
...i,
tag: this.flowConfig.find(j => j.custom_model_id == i.custom_model_id)?.tag
}))
editorContract(this.form).then(_ => {
this.$message.success('修改成功')
this.$emit('update:isShow', false)
this.$emit('refresh')
})
}
}

@ -323,20 +323,6 @@ export default {
type: [{
required: true,
message: '必选'
}],
meeting_flow_id: [{
required: true,
message: '资金上会流程为必选项',
validator: (rule, value, callback) => {
// 5
if (this.form.apply_money && Number(this.form.apply_money) >= 50000) {
if (!value) {
callback(new Error('资金上会流程为必选项'))
return
}
}
callback()
}
}]
},
// OA
@ -425,15 +411,30 @@ export default {
},
editor() {
//
//
if (this.isMeetingFlowRequired && !this.form.meeting_flow_id) {
Message({
type: 'warning',
message: '资金上会流程为必选项'
this.$confirm(
'当前申请付款金额超出5万元请确认是否需要选择资金上会流程',
'提示',
{
confirmButtonText: '直接提交',
cancelButtonText: '关闭',
type: 'warning',
closeOnClickModal: false,
closeOnPressEscape: false
}
).then(() => {
this._proceedSubmit()
}).catch(() => {
// /
})
return
}
//
this._proceedSubmit()
},
_proceedSubmit() {
editorFundLog(this.form).then(res => {
this.$emit('success')
this.isShow = false

@ -534,20 +534,6 @@ export default {
type: [{
required: true,
message: '必选'
}],
meeting_flow_id: [{
required: true,
message: '资金上会流程为必选项',
validator: (rule, value, callback) => {
// 5
if (this.paymentRegistrationForm.applyMoney && Number(this.paymentRegistrationForm.applyMoney) >= 50000) {
if (!value) {
callback(new Error('资金上会流程为必选项'))
return
}
}
callback()
}
}]
},
departments: [],
@ -913,15 +899,30 @@ export default {
})
},
submit() {
//
//
if (this.isMeetingFlowRequired && !this.paymentRegistrationForm.meeting_flow_id) {
Message({
type: 'warning',
message: '资金上会流程为必选项'
this.$confirm(
'当前申请付款金额超出5万元请确认是否需要选择资金上会流程',
'提示',
{
confirmButtonText: '直接提交',
cancelButtonText: '关闭',
type: 'warning',
closeOnClickModal: false,
closeOnPressEscape: false
}
).then(() => {
this._proceedSubmit()
}).catch(() => {
// /
})
return
}
//
this._proceedSubmit()
},
_proceedSubmit() {
const data = {
contract_id: this.contract.id,
apply_money: this.paymentRegistrationForm.applyMoney,

@ -194,7 +194,7 @@
</el-form-item>
<el-form-item
prop="meeting_flow_id"
:label="'资金上会流程' + (isMeetingFlowRequired ? ' *' : '')"
label="资金上会流程"
>
<!-- 调试信息 -->
@ -697,7 +697,7 @@
</el-form-item>
<el-form-item
prop="meeting_flow_id"
:label="'资金上会流程' + (isMeetingFlowRequired ? ' *' : '')"
label="资金上会流程"
>
<!-- 调试信息 -->
@ -1592,26 +1592,7 @@ export default {
trigger: "change",
},
],
meeting_flow_id: [
{
validator: (rule, value, callback) => {
//
if (this.form.is_common_purchase) {
callback()
return
}
// 10
if (this.form.total_money && Number(this.form.total_money) >= 100000) {
if (!value) {
callback(new Error('资金上会流程为必选项'))
return
}
}
callback()
},
trigger: "change",
},
],
// meeting_flow_id:
},
plans: [],
planSelect: {
@ -2044,68 +2025,27 @@ export default {
//submit
this.$refs["form"].validate((valid) => {
if (valid) {
//
//
if (this.isMeetingFlowRequired && !this.form.meeting_flow_id) {
this.$message({
type: 'warning',
message: '资金上会流程为必选项'
})
return
}
this.btnLoading = true;
if (!this.form.use_framework_buy) {
this.form.contract_to_contracts = [];
} else {
this.form.contract_plan_links = [];
}
this.form.is_purchase =
(this.flowIds?.find((i) => i.id == this.form.flow_mod_id)?.type ==
2
? 1
: 0) || this.form.is_common_purchase;
if (this.form.is_common_purchase) {
this.form.is_contract = 1;
}
if (this.form.is_contract) {
this.form.is_tender_audit = 1;
}
if (this.form.is_simple) {
this.form.is_contract = 0;
this.form.is_tender_audit = 0;
}
// this.form.is_contract = this.flowIds?.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 0 : 1;
if (!this.form.money) {
this.form.money = this.form.plan_price;
}
if (this.type === "add") {
addContrant(this.form, true)
.then((res) => {
this.btnLoading = false;
//this.step = 3;
this.$router.push({
path:
this.form.is_simple || !this.form.is_purchase
? "/contract/contractAll"
: "/contract/contractList",
query: {
keyword: this.form.name,
},
});
})
.catch((_) => (this.btnLoading = false));
}
if (this.type === "edit") {
editorContract({
id: this.contractId,
...this.form,
})
.then((res) => {
this.btnLoading = false;
this.step = 3;
})
.catch((_) => (this.btnLoading = false));
MessageBox.confirm(
'当前合同金额超出10万元请确认是否需要选择资金上会流程',
'提示',
{
confirmButtonText: '直接提交',
cancelButtonText: '关闭',
type: 'warning',
closeOnClickModal: false,
closeOnPressEscape: false
}
).then(() => {
this._proceedSubmit();
}).catch(() => {
// /
});
return;
}
//
this._proceedSubmit();
}
});
}
@ -2251,7 +2191,105 @@ export default {
contract_to_contracts: [],
};
},
_proceedSubmit() {
this.btnLoading = true;
if (!this.form.use_framework_buy) {
this.form.contract_to_contracts = [];
} else {
this.form.contract_plan_links = [];
}
this.form.is_purchase =
(this.flowIds?.find((i) => i.id == this.form.flow_mod_id)?.type == 2
? 1
: 0) || this.form.is_common_purchase;
if (this.form.is_common_purchase) {
this.form.is_contract = 1;
}
if (this.form.is_contract) {
this.form.is_tender_audit = 1;
}
if (this.form.is_simple) {
this.form.is_contract = 0;
this.form.is_tender_audit = 0;
}
if (!this.form.money) {
this.form.money = this.form.plan_price;
}
if (this.type === 'add') {
addContrant(this.form, true)
.then((res) => {
this.btnLoading = false;
this.$router.push({
path:
this.form.is_simple || !this.form.is_purchase
? '/contract/contractAll'
: '/contract/contractList',
query: {
keyword: this.form.name,
},
});
})
.catch((_) => (this.btnLoading = false));
}
if (this.type === 'edit') {
editorContract({ id: this.contractId, ...this.form })
.then((res) => {
this.btnLoading = false;
this.step = 3;
})
.catch((_) => (this.btnLoading = false));
}
},
},
_proceedSubmit() {
this.btnLoading = true;
if (!this.form.use_framework_buy) {
this.form.contract_to_contracts = [];
} else {
this.form.contract_plan_links = [];
}
this.form.is_purchase =
(this.flowIds?.find((i) => i.id == this.form.flow_mod_id)?.type == 2
? 1
: 0) || this.form.is_common_purchase;
if (this.form.is_common_purchase) {
this.form.is_contract = 1;
}
if (this.form.is_contract) {
this.form.is_tender_audit = 1;
}
if (this.form.is_simple) {
this.form.is_contract = 0;
this.form.is_tender_audit = 0;
}
if (!this.form.money) {
this.form.money = this.form.plan_price;
}
if (this.type === 'add') {
addContrant(this.form, true)
.then((res) => {
this.btnLoading = false;
this.$router.push({
path:
this.form.is_simple || !this.form.is_purchase
? '/contract/contractAll'
: '/contract/contractList',
query: {
keyword: this.form.name,
},
});
})
.catch((_) => (this.btnLoading = false));
}
if (this.type === 'edit') {
editorContract({ id: this.contractId, ...this.form })
.then((res) => {
this.btnLoading = false;
this.step = 3;
})
.catch((_) => (this.btnLoading = false));
}
},
computed: {
flowIdsFormat() {
let temp = this.form.is_trade;

Loading…
Cancel
Save