master
xy 12 months ago
parent 7b818fa2cc
commit 8569e2774a

@ -75,7 +75,7 @@
header-align="center"
width="144"
>
<template slot-scope="scope" v-if="scope.row.pid === 0">
<template slot-scope="scope" v-if="scope.row.pid === 0 && $route.query.isNeedMoney">
<InputNumber
style="width: 120px"
:min="0"
@ -242,22 +242,24 @@ export default {
return new Promise((resolve, reject) => {
const selections = this.$refs["editorPlanTable"].getSelection();
if (selections?.length > 0) {
for (let i of selections) {
if (i._inputMoney <= 0) {
this.$message({
type: "warning",
message: `${i.year}${i.name} 使用金额需要大于0`,
});
reject(`${i.year}${i.name} 使用金额需要大于0`)
return;
}
if (i._inputMoney > ((Number(i.money) || Number(i.update_money)) - Number(i.has_money_total))) {
this.$message({
type: "warning",
message: `${i.year}${i.name} 使用金额大于剩余预算!`,
});
reject(`${i.year}${i.name} 使用金额大于剩余预算!`)
return;
if (this.$route.query.isNeedMoney) {
for (let i of selections) {
if (i._inputMoney <= 0) {
this.$message({
type: "warning",
message: `${i.year}${i.name} 使用金额需要大于0`,
});
reject(`${i.year}${i.name} 使用金额需要大于0`)
return;
}
if (i._inputMoney > ((Number(i.money) || Number(i.update_money)) - Number(i.has_money_total))) {
this.$message({
type: "warning",
message: `${i.year}${i.name} 使用金额大于剩余预算!`,
});
reject(`${i.year}${i.name} 使用金额大于剩余预算!`)
return;
}
}
}
}

@ -8,7 +8,7 @@ export default {
},
width:{
type:Number,
default:55
default:62
},
isShow:{
type:Boolean,
@ -131,6 +131,7 @@ export default {
width={width}
title={title}
value={isShow}
fullscreen={this.$store.state.app.device === 'mobile'}
on={{['on-visible-change']:showChange,['on-ok']:okClick}}
scopedSlots={{
default(){
@ -157,26 +158,16 @@ export default {
{$scopedSlots.extraFormTop ? $scopedSlots.extraFormTop() : ''}
<div
style={
{
'display':'flex',
'align-items':'center',
'flex-wrap':'wrap',
'min-width':'380px'
}
}>
{
formItems.map(item=>{
return item
})
}
</div>
{
formItems.map(item=>{
return item
})
}
{$scopedSlots.extraFormBottom ? $scopedSlots.extraFormBottom() : ''}
</el-form>
)
}else{
} else {
return (
<div
style={title.length === 0 ? {'margin-top':'32px'} : {}}>
@ -290,7 +281,7 @@ export default {
padding-right: 80px;
&-label{
flex-shrink: 0;
padding: 0 20px;
}
&-content{

@ -1,7 +1,7 @@
import store from '@/store'
const { body } = document
const WIDTH = 992 // refer to Bootstrap's responsive design
const WIDTH = 768 // refer to Bootstrap's responsive design
export default {
watch: {

@ -233,6 +233,8 @@ import {deepCopy, parseTime} from "@/utils";
import {getOatoken} from "@/api/oatoken";
import {listdeptNoAuth} from "@/api/system/department";
import { save } from "@/api/away";
import axios from "axios";
import {getToken} from "@/utils/auth";
export default {
data() {
@ -516,7 +518,6 @@ export default {
let plans = this.paymentRegistrationForm.plan.map((item) => {
return item.id;
});
console.log(plans)
if (plans) {
this.plans
.filter((plan) => {
@ -538,6 +539,27 @@ export default {
});
},
async getOutAway() {
try {
let oaId = this.contract.flow_list.find(i => i.tag === 'chuchaibaoxiao')?.flow_id
const response = await axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/flow/view/${oaId}`,{
headers: {
Authorization: `Bearer ${getToken()}`
}
})
if (response.status === 200) {
if (response.data.code) {
this.$message.warning(response.data.msg)
return
}
const data = response.data.data.flow.data
if (data["totalAmt"]) this.paymentRegistrationForm.applyMoney = data["totalAmt"]
if (data["chuchaishiyou"]) this.paymentRegistrationForm.remark = data["chuchaishiyou"]
}
} catch (err) {
console.error(err)
}
},
async getDetail () {
const res = await detailFundLog({
id: this.contract.id
@ -555,6 +577,7 @@ export default {
remark: res.remark,
files: []
}
this.getOutContract()
}
},
computed: {
@ -582,6 +605,7 @@ export default {
isShowPaymentRegistration(newVal) {
if (newVal) {
this.getBudgets();
this.getOutAway()
if (this.type === "detail") {
this.getDetail()

@ -0,0 +1,51 @@
<template>
<div>
<Modal
:value="isShow"
:width="64"
:title="form.name||'编辑'"
:fullscreen="device === 'mobile'"
:mask-closable="false"
@input="e => $emit('update:isShow', e)"
@on-ok=""
@on-cancel="">
<p>Content of dialog</p>
</Modal>
</div>
</template>
<script>
import { detailContract } from '@/api/contract/contract'
export default {
props: {
isShow: {
type: Boolean,
default: false
}
},
data() {
return {
form: {}
}
},
methods: {
async getDetail(id) {
try {
const res = await detailContract({ id })
this.form = res
console.log(res)
} catch (err) {
console.error(err)
}
}
},
computed: {
device() {
return this.$store.state.app.device
}
},
}
</script>
<style scoped lang="scss">
</style>

@ -1,15 +1,6 @@
<template>
<div>
<xy-dialog :is-show.sync="isShow" title="合同签订" type="form" :form="form" :rules="rules" @submit="sign" ok-text="">
<template v-slot:extraFormTop>
<div class="base-info" style="margin-bottom: 20px;">
<div class="base-info-title">合同信息</div>
<div class="base-info-item">
<div class="base-info-item-title">合同名称</div>
<div class="base-info-item-content">{{contract.name}}</div>
</div>
</div>
</template>
<xy-dialog :is-show.sync="isShow" :title="contract.name || '合同签订'" type="form" :form="form" :rules="rules" @submit="sign" ok-text="">
<template #is_contract>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -85,33 +76,33 @@
<template v-slot:is_assurance>
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">是否收取履约保函
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.is_assurance" />
</div>
</div>
</template>
<template v-if="form.is_assurance" v-slot:assurance_money>
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">保函金额
</div>
<div class="xy-table-item-content xy-table-item-price">
<el-input-number v-model="form.assurance_money" :controls="false" :precision="2" placeholder="请输入保函金额" style="width: 300px;"></el-input-number>
</div>
</div>
</template>
<template v-if="form.is_assurance" v-slot:assurance_expire>
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">保函有效期
</div>
<div class="xy-table-item-content">
<el-date-picker value-format="yyyy-MM-dd" v-model="form.assurance_expire" placeholder="请输入保函有效期" style="width: 300px;"/>
</div>
</div>
</template>
<!-- <template v-slot:is_assurance>-->
<!-- <div class="xy-table-item">-->
<!-- <div class="xy-table-item-label" style="width: 200px">是否收取履约保函-->
<!-- </div>-->
<!-- <div class="xy-table-item-content">-->
<!-- <el-switch v-model="form.is_assurance" />-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-if="form.is_assurance" v-slot:assurance_money>-->
<!-- <div class="xy-table-item">-->
<!-- <div class="xy-table-item-label" style="width: 200px">保函金额-->
<!-- </div>-->
<!-- <div class="xy-table-item-content xy-table-item-price">-->
<!-- <el-input-number v-model="form.assurance_money" :controls="false" :precision="2" placeholder="请输入保函金额" style="width: 300px;"></el-input-number>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-if="form.is_assurance" v-slot:assurance_expire>-->
<!-- <div class="xy-table-item">-->
<!-- <div class="xy-table-item-label" style="width: 200px">保函有效期-->
<!-- </div>-->
<!-- <div class="xy-table-item-content">-->
<!-- <el-date-picker value-format="yyyy-MM-dd" v-model="form.assurance_expire" placeholder="请输入保函有效期" style="width: 300px;"/>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<template v-slot:guaranteeMoney>
<div class="xy-table-item">
@ -149,24 +140,31 @@
</div>
</template>
<template v-slot:extraFormBottom>
<div class="base-info add-plan" style="margin-top: 20px;margin-bottom: 20px">
<div class="base-info-title">合同关联方</div>
<Button type="primary" style="margin-left: 50px;" @click="form.contract_links.push({contract_id:contract.id,type_id:'',name:'',remark:''})"></Button>
<div class="base-info add-plan" style="margin-bottom: 20px;">
<div class="base-info-title">付款计划</div>
<p style="font-weight: 600;color: red;font-size: 12px;">如需分期付款请分条填报付款计划</p>
<Button type="primary" style="margin-left: auto;" icon="md-add" @click="isShowAddPlan = true">新增计划</Button>
</div>
<xy-table :list="form.contract_links instanceof Array ? form.contract_links : []" :table-item="linkTable">
<template v-slot:btns></template>
<xy-table :list="signList"
style="min-width: 500px;"
:table-item="signTable"
:show-index="false"
:height="240"
@delete="deleteContractSign"
@editor="(row)=>{$refs['detailContractSign'].planId = row.id;$refs['detailContractSign'].isShow = true}">
</xy-table>
<div class="base-info add-plan" style="margin-top: 20px;margin-bottom: 20px">
<div class="base-info-title">付款计划</div>
<Button type="primary" style="margin-left: 50px;" @click="isShowAddPlan = true">新增计划</Button>
<p style="font-weight: 600;zoom: .9;color: red;">如需分期付款请分条填报付款计划</p>
<div class="base-info-title">合同关联方</div>
<Button type="primary" style="margin-left: 50px;" @click="form.contract_links.push({contract_id:contract.id,type_id:'',name:'',remark:''})"></Button>
</div>
<xy-table :list="signList" :table-item="signTable" :show-index="false" :height="240"
@delete="deleteContractSign"
@editor="(row)=>{$refs['detailContractSign'].planId = row.id;$refs['detailContractSign'].isShow = true}">
<xy-table
style="min-width: 500px;"
:list="form.contract_links instanceof Array ? form.contract_links : []"
:table-item="linkTable">
<template v-slot:btns></template>
</xy-table>
</template>
</xy-dialog>
@ -255,13 +253,13 @@
is_contract: 1,
number: '',
content: "",
supply: '',
carryDepartment: '',
money: '',
time: [],
guaranteeMoney: '',
guaranteeYear: '',
date: "",
money: '',
time: [],
supply: '',
carryDepartment: '',
is_assurance: false,
assurance_money:'',
assurance_expire:'',
@ -555,27 +553,7 @@
} catch (err) {
console.error(err)
}
// if (res.flow[""]) this.form.number = "HT-"+res.flow[""]
// if (res.flow[""]) this.form.money = Number(res.flow[""])
// if (res.flow[""]) this.form.supply = res.flow[""]
// if (res.flow[""]) this.form.content = res.flow[""]
},
//oa
// async getOaContractInfo() {
// try {
// let res = await getOatoken()
// let url =
// `${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.contract.join_last_flow_id}?oatoken=${res.oatoken}&get_raw=1`
// const oaInfo = await axios.get(url)
// this.form.money = Number(oaInfo.data.flow[''])
// this.form.number = oaInfo.data.flow['']
// this.form.supply = oaInfo.data.flow['\\']
// this.form.carryDepartment = oaInfo.data.flow['']
// } catch {
//
// }
//
// }
},
watch: {
async isShow(val) {
@ -594,6 +572,9 @@
</script>
<style scoped lang="scss">
::v-deep .el-form-item {
margin-bottom: 16px;
}
.base-info {
&-title {

@ -14,11 +14,22 @@
</div>
</div>
</template>
<template v-slot:is_simple>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*是否为简易流程</span>
</div>
<div class="xy-table-item-content">
<div style="display:flex;width: 300px;align-items: center;">
<el-switch v-model="detail.is_simple" active-text="" inactive-text="" :active-value="1" :inactive-value="0"/>
<div style="flex: 1;text-align: right;">水电煤等费用付款</div>
</div>
</div>
</div>
</template>
<template #flow_mod_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>采购流程
</div>
<div class="xy-table-item-content">
@ -50,19 +61,6 @@
</div>
</div>
</template>
<template v-slot:is_simple>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*是否为简易流程</span>
</div>
<div class="xy-table-item-content">
<div style="display:flex;width: 300px;align-items: center;">
<el-switch v-model="detail.is_simple" active-text="" inactive-text="" :active-value="1" :inactive-value="0"/>
<div style="flex: 1;text-align: right;">水电煤等费用付款</div>
</div>
</div>
</div>
</template>
<template v-slot:supply v-if="detail.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">

@ -1790,6 +1790,7 @@ export default {
vm.step = 2
vm.myPurchaseType = 2
vm.form.is_common_purchase = 1
vm.form.flow_mod_id = 99
})
})
}

@ -424,6 +424,10 @@
>
查看
</Button>
<!--
($refs['editor'].isShowEditor = true,
$refs['editor'].getDetail(scope.row.id))
-->
<template v-if="scope.row.status != 2 || hasEdit">
<Button
class="slot-btns-item"
@ -432,8 +436,7 @@
@click="
(new RegExp(/contractLedger/g).test($route.path)) ?
($refs['addContractLedger'].setId(scope.row.id),$refs['addContractLedger'].setType('editor'),$refs['addContractLedger'].show()) :
($refs['editor'].isShowEditor = true,
$refs['editor'].getDetail(scope.row.id))
($refs['editContract'].getDetail(scope.row.id), isShowEdit = true)
"
>编辑
</Button>
@ -643,6 +646,7 @@
</Modal>
<!-- 编辑-->
<edit-contract ref="editContract" :is-show.sync="isShowEdit"></edit-contract>
<editor
ref="editor"
:is-show-editor.sync="isShowEditor"
@ -711,7 +715,6 @@ import { deepCopy, parseTime, resetSelect, moneyFormatter, throttle } from '@/ut
import { Message } from "element-ui";
import { getInfo } from "@/api/me.js";
import { getToken } from "@/utils/auth";
import { getOaToken, getOutDetail, httpCurl, updateFlow } from "@/api/out";
import editor from "./components/editorContract";
import detail from "./components/detailContract";
import paymentRegistration from "./components/paymentRegistration";
@ -720,7 +723,8 @@ import contractPaymentRegistration from "@/views/contract/components/contractPay
import biddingUpload from "./components/biddingUpload.vue";
import oaFiles from './components/oaFiles.vue';
import addContractLedger from '@/views/contract/components/addContractLedger.vue'
import {show} from "@/api/away";
import EditContract from './components/EditContract.vue'
import { show } from "@/api/away";
let iframe;
export default {
components: {
@ -731,96 +735,12 @@ export default {
contractSign,
contractPaymentRegistration,
biddingUpload,
oaFiles
oaFiles,
EditContract
},
data() {
var planPass = (rule, value, callback) => {
if (this.form.isBudget) {
if (this.form.plan.length === 0) {
callback(new Error("必选"));
} else {
callback();
}
} else {
callback();
}
};
var supplyPass = (rule, value, callback) => {
if (this.form.is_simple) {
if (value === "") {
callback(new Error("必填"));
} else {
callback();
}
} else {
callback();
}
};
var moneyPass = (rule, value, callback) => {
if (this.form.is_simple) {
if (value === "") {
callback(new Error("必填"));
} else {
if (/^\d+(\.\d+)?$/.test(value)) {
callback();
} else {
callback(new Error("必须为数字"));
}
}
} else {
callback();
}
};
var typePass = (rule, value, callback) => {
if (!this.form.is_simple) {
if (value === "") {
callback(new Error("必填"));
} else {
callback();
}
} else {
callback();
}
};
var methodsPass = (rule, value, callback) => {
if (!this.form.is_simple) {
if (value === "") {
callback(new Error("必填"));
} else {
callback();
}
} else {
callback();
}
};
var modalityPass = (rule, value, callback) => {
if (!this.form.is_simple) {
if (value === "") {
callback(new Error("必填"));
} else {
callback();
}
} else {
callback();
}
};
var pricePass = (rule, value, callback) => {
if (!this.form.is_simple) {
if (value === "") {
callback(new Error("必填"));
} else {
if (/^\d+(\.\d+)?$/.test(value)) {
callback();
} else {
callback(new Error("必须为数字"));
}
}
} else {
callback();
}
};
return {
isShowEdit: false,
isShowOaModal: false,
oaUrl: "",
//
@ -1577,63 +1497,6 @@ export default {
contract_to_contracts: [],
},
plan: [],
rules: {
name: [
{
required: true,
message: "必填",
},
],
supply: [
{
validator: supplyPass,
trigger: "change",
},
],
money: [
{
validator: moneyPass,
trigger: "change",
},
],
type: [
{
validator: typePass,
trigger: "change",
},
],
methods: [
{
validator: methodsPass,
trigger: "change",
},
],
modality: [
{
validator: modalityPass,
trigger: "change",
},
],
price: [
{
validator: pricePass,
trigger: "change",
},
],
fundingChannels: [
{
required: true,
message: "必填",
},
],
plan: [
{
validator: planPass,
trigger: "change",
},
],
},
isShowPlan: false, //
plans: [], //
planSearch: {
@ -1906,7 +1769,8 @@ export default {
"amt": Number(row?.money) || row?.plan_price,
out_contract_id: row.id,
"zhuyaoneirong": row.content,
"jiafang": row.supply
"jiafang": row.supply,
"xiangguanliucheng": [row.flow_list?.find(i => i.custom_model_id === (row.is_common_purchase ? 99 : row.flow_mod_id))?.flow_id]
};
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=72&out_contract_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;

@ -388,7 +388,8 @@ export default {
"cishu": payments.length,
"amt": row?.apply_money,
"liezhiqudao": contract?.plans.map(i => i.name)?.toString(),
"contractno": contract?.number
"contractno": contract?.number,
"guanlianliucheng": contract?.flow_list?.map(i => i.flow_id)
};
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=75&out_pay_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;

Loading…
Cancel
Save