master
xy 2 years ago
parent 7b818fa2cc
commit 8569e2774a

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

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

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

@ -233,6 +233,8 @@ import {deepCopy, parseTime} from "@/utils";
import {getOatoken} from "@/api/oatoken"; import {getOatoken} from "@/api/oatoken";
import {listdeptNoAuth} from "@/api/system/department"; import {listdeptNoAuth} from "@/api/system/department";
import { save } from "@/api/away"; import { save } from "@/api/away";
import axios from "axios";
import {getToken} from "@/utils/auth";
export default { export default {
data() { data() {
@ -516,7 +518,6 @@ export default {
let plans = this.paymentRegistrationForm.plan.map((item) => { let plans = this.paymentRegistrationForm.plan.map((item) => {
return item.id; return item.id;
}); });
console.log(plans)
if (plans) { if (plans) {
this.plans this.plans
.filter((plan) => { .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 () { async getDetail () {
const res = await detailFundLog({ const res = await detailFundLog({
id: this.contract.id id: this.contract.id
@ -555,6 +577,7 @@ export default {
remark: res.remark, remark: res.remark,
files: [] files: []
} }
this.getOutContract()
} }
}, },
computed: { computed: {
@ -582,6 +605,7 @@ export default {
isShowPaymentRegistration(newVal) { isShowPaymentRegistration(newVal) {
if (newVal) { if (newVal) {
this.getBudgets(); this.getBudgets();
this.getOutAway()
if (this.type === "detail") { if (this.type === "detail") {
this.getDetail() 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> <template>
<div> <div>
<xy-dialog :is-show.sync="isShow" title="合同签订" type="form" :form="form" :rules="rules" @submit="sign" ok-text=""> <xy-dialog :is-show.sync="isShow" :title="contract.name || '合同签订'" 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>
<template #is_contract> <template #is_contract>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -85,33 +76,33 @@
<template v-slot:is_assurance> <!-- <template v-slot:is_assurance>-->
<div class="xy-table-item"> <!-- <div class="xy-table-item">-->
<div class="xy-table-item-label" style="width: 200px">是否收取履约保函 <!-- <div class="xy-table-item-label" style="width: 200px">是否收取履约保函-->
</div> <!-- </div>-->
<div class="xy-table-item-content"> <!-- <div class="xy-table-item-content">-->
<el-switch v-model="form.is_assurance" /> <!-- <el-switch v-model="form.is_assurance" />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
<template v-if="form.is_assurance" v-slot:assurance_money> <!-- <template v-if="form.is_assurance" v-slot:assurance_money>-->
<div class="xy-table-item"> <!-- <div class="xy-table-item">-->
<div class="xy-table-item-label" style="width: 200px">保函金额 <!-- <div class="xy-table-item-label" style="width: 200px">保函金额-->
</div> <!-- </div>-->
<div class="xy-table-item-content xy-table-item-price"> <!-- <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> <!-- <el-input-number v-model="form.assurance_money" :controls="false" :precision="2" placeholder="请输入保函金额" style="width: 300px;"></el-input-number>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
<template v-if="form.is_assurance" v-slot:assurance_expire> <!-- <template v-if="form.is_assurance" v-slot:assurance_expire>-->
<div class="xy-table-item"> <!-- <div class="xy-table-item">-->
<div class="xy-table-item-label" style="width: 200px">保函有效期 <!-- <div class="xy-table-item-label" style="width: 200px">保函有效期-->
</div> <!-- </div>-->
<div class="xy-table-item-content"> <!-- <div class="xy-table-item-content">-->
<el-date-picker value-format="yyyy-MM-dd" v-model="form.assurance_expire" placeholder="请输入保函有效期" style="width: 300px;"/> <!-- <el-date-picker value-format="yyyy-MM-dd" v-model="form.assurance_expire" placeholder="请输入保函有效期" style="width: 300px;"/>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
<template v-slot:guaranteeMoney> <template v-slot:guaranteeMoney>
<div class="xy-table-item"> <div class="xy-table-item">
@ -149,24 +140,31 @@
</div> </div>
</template> </template>
<template v-slot:extraFormBottom> <template v-slot:extraFormBottom>
<div class="base-info add-plan" style="margin-top: 20px;margin-bottom: 20px"> <div class="base-info add-plan" style="margin-bottom: 20px;">
<div class="base-info-title">合同关联方</div> <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> <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> </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> </xy-table>
<div class="base-info add-plan" style="margin-top: 20px;margin-bottom: 20px"> <div class="base-info add-plan" style="margin-top: 20px;margin-bottom: 20px">
<div class="base-info-title">付款计划</div> <div class="base-info-title">合同关联方</div>
<Button type="primary" style="margin-left: 50px;" @click="isShowAddPlan = true">新增计划</Button> <Button type="primary" style="margin-left: 50px;" @click="form.contract_links.push({contract_id:contract.id,type_id:'',name:'',remark:''})"></Button>
<p style="font-weight: 600;zoom: .9;color: red;">如需分期付款请分条填报付款计划</p>
</div> </div>
<xy-table
<xy-table :list="signList" :table-item="signTable" :show-index="false" :height="240" style="min-width: 500px;"
@delete="deleteContractSign" :list="form.contract_links instanceof Array ? form.contract_links : []"
@editor="(row)=>{$refs['detailContractSign'].planId = row.id;$refs['detailContractSign'].isShow = true}"> :table-item="linkTable">
<template v-slot:btns></template>
</xy-table> </xy-table>
</template> </template>
</xy-dialog> </xy-dialog>
@ -255,13 +253,13 @@
is_contract: 1, is_contract: 1,
number: '', number: '',
content: "", content: "",
supply: '',
carryDepartment: '',
money: '',
time: [],
guaranteeMoney: '', guaranteeMoney: '',
guaranteeYear: '', guaranteeYear: '',
date: "", date: "",
money: '',
time: [],
supply: '',
carryDepartment: '',
is_assurance: false, is_assurance: false,
assurance_money:'', assurance_money:'',
assurance_expire:'', assurance_expire:'',
@ -555,27 +553,7 @@
} catch (err) { } catch (err) {
console.error(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: { watch: {
async isShow(val) { async isShow(val) {
@ -594,6 +572,9 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .el-form-item {
margin-bottom: 16px;
}
.base-info { .base-info {
&-title { &-title {

@ -14,11 +14,22 @@
</div> </div>
</div> </div>
</template> </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> <template #flow_mod_id>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>采购流程 >采购流程
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -50,19 +61,6 @@
</div> </div>
</div> </div>
</template> </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"> <template v-slot:supply v-if="detail.is_simple">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">

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

@ -424,6 +424,10 @@
> >
查看 查看
</Button> </Button>
<!--
($refs['editor'].isShowEditor = true,
$refs['editor'].getDetail(scope.row.id))
-->
<template v-if="scope.row.status != 2 || hasEdit"> <template v-if="scope.row.status != 2 || hasEdit">
<Button <Button
class="slot-btns-item" class="slot-btns-item"
@ -432,8 +436,7 @@
@click=" @click="
(new RegExp(/contractLedger/g).test($route.path)) ? (new RegExp(/contractLedger/g).test($route.path)) ?
($refs['addContractLedger'].setId(scope.row.id),$refs['addContractLedger'].setType('editor'),$refs['addContractLedger'].show()) : ($refs['addContractLedger'].setId(scope.row.id),$refs['addContractLedger'].setType('editor'),$refs['addContractLedger'].show()) :
($refs['editor'].isShowEditor = true, ($refs['editContract'].getDetail(scope.row.id), isShowEdit = true)
$refs['editor'].getDetail(scope.row.id))
" "
>编辑 >编辑
</Button> </Button>
@ -643,6 +646,7 @@
</Modal> </Modal>
<!-- 编辑--> <!-- 编辑-->
<edit-contract ref="editContract" :is-show.sync="isShowEdit"></edit-contract>
<editor <editor
ref="editor" ref="editor"
:is-show-editor.sync="isShowEditor" :is-show-editor.sync="isShowEditor"
@ -711,7 +715,6 @@ import { deepCopy, parseTime, resetSelect, moneyFormatter, throttle } from '@/ut
import { Message } from "element-ui"; import { Message } from "element-ui";
import { getInfo } from "@/api/me.js"; import { getInfo } from "@/api/me.js";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { getOaToken, getOutDetail, httpCurl, updateFlow } from "@/api/out";
import editor from "./components/editorContract"; import editor from "./components/editorContract";
import detail from "./components/detailContract"; import detail from "./components/detailContract";
import paymentRegistration from "./components/paymentRegistration"; import paymentRegistration from "./components/paymentRegistration";
@ -720,7 +723,8 @@ import contractPaymentRegistration from "@/views/contract/components/contractPay
import biddingUpload from "./components/biddingUpload.vue"; import biddingUpload from "./components/biddingUpload.vue";
import oaFiles from './components/oaFiles.vue'; import oaFiles from './components/oaFiles.vue';
import addContractLedger from '@/views/contract/components/addContractLedger.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; let iframe;
export default { export default {
components: { components: {
@ -731,96 +735,12 @@ export default {
contractSign, contractSign,
contractPaymentRegistration, contractPaymentRegistration,
biddingUpload, biddingUpload,
oaFiles oaFiles,
EditContract
}, },
data() { 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 { return {
isShowEdit: false,
isShowOaModal: false, isShowOaModal: false,
oaUrl: "", oaUrl: "",
// //
@ -1577,63 +1497,6 @@ export default {
contract_to_contracts: [], contract_to_contracts: [],
}, },
plan: [], 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, // isShowPlan: false, //
plans: [], // plans: [], //
planSearch: { planSearch: {
@ -1906,7 +1769,8 @@ export default {
"amt": Number(row?.money) || row?.plan_price, "amt": Number(row?.money) || row?.plan_price,
out_contract_id: row.id, out_contract_id: row.id,
"zhuyaoneirong": row.content, "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)}`; 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, "cishu": payments.length,
"amt": row?.apply_money, "amt": row?.apply_money,
"liezhiqudao": contract?.plans.map(i => i.name)?.toString(), "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)}`; 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