2023-1-6 简易付款

master
xy 3 years ago
parent e695659c8c
commit 9177ec41c2

@ -14,7 +14,27 @@
</div>
</div>
</template>
<template v-slot:type>
<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;font-size: 11px;">*是否为简易流程水电煤报刊订阅网络通讯车辆使用等费用付款</span>
</div>
<div class="xy-table-item-content">
<el-switch v-model="detail.is_simple" active-text="" inactive-text="" :active-value="1" :inactive-value="0"/>
</div>
</div>
</template>
<template v-slot:supply v-if="detail.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;font-size: 11px;">*</span>承包商/供货商
</div>
<div class="xy-table-item-content">
<el-input v-model="detail.supply" placeholder="请填写承包商/供货商" style="width: 300px;"/>
</div>
</div>
</template>
<template v-slot:type v-if="!detail.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>项目类型
@ -27,7 +47,7 @@
</div>
</div>
</template>
<template v-slot:methods>
<template v-slot:methods v-if="!detail.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购形式
@ -39,7 +59,7 @@
</div>
</div>
</template>
<template v-slot:modality>
<template v-slot:modality v-if="!detail.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购方式
@ -52,7 +72,7 @@
</div>
</template>
<template v-slot:price>
<template v-slot:price v-if="!detail.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同预算价
@ -229,6 +249,65 @@
callback()
}
}
var supplyPass = (rule,value,callback) => {
if(this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var typePass = (rule,value,callback) => {
if(!this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var methodsPass = (rule,value,callback) => {
if(!this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var modalityPass = (rule,value,callback) => {
if(!this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var pricePass = (rule,value,callback) => {
if(!this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
if(/^\d+(\.\d+)?$/.test(value)){
callback()
}else{
callback(new Error('必须为数字'))
}
}
}else{
callback()
}
}
return {
userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"],
user: null,
@ -254,33 +333,44 @@
required: true,
message: "必填"
}],
type: [{
required: true,
message: "必选"
}],
methods: [{
required: true,
message: "必选"
}],
modality: [{
required: true,
message: "必选"
}],
price: [{
required: true,
message: "必填"
},
supply:[
{
validator:supplyPass,
trigger: 'change'
}
],
type:[
{
validator: typePass,
trigger: 'change'
}
],
methods:[
{
validator:methodsPass,
trigger: 'change'
}
],
modality:[
{
validator:modalityPass,
trigger: 'change'
}
],
price:[
{
pattern: /^\d+(\.\d+)?$/,
message: '必须为数字'
validator:pricePass,
trigger: 'change'
}
],
fundingChannels: [{
required: true,
message: "必填"
}],
plan: [{
validator: planPass
validator: planPass,
trigger: 'change'
}]
},
plans: [],
@ -449,12 +539,14 @@
})
this.contrantId = res.id
this.detail = {
name: res.name,
is_simple:res?.is_simple,
date: res.date,
req_status: res.req_status,
purchase_status: res.purchase_status,
join_status: res.join_status,
invite_status: res.invite_status,
name: res.name,
supply:res?.supply,
type: res.type,
methods: res.purchase_type_id,
modality: res.purchase_way_id,
@ -487,6 +579,8 @@
id: this.contrantId,
type: this.detail.type,
is_plan: this.detail.isBudget ? 1 : 0,
is_simple:this.detail?.is_simple,
supply:this.detail?.supply,
purchase_type_id: this.detail.methods,
purchase_way_id: this.detail.modality,
money_way_id: this.detail.fundingChannels.toString(),
@ -550,7 +644,7 @@
}
.xy-table-item-label {
width: 140px;
width: 200px;
}
.xy-table-item-price {

@ -7,14 +7,14 @@
<div>
<span style="padding: 0 6px;word-break: keep-all;">关键字</span>
<span>
<Input v-model="select.keyword" clearable placeholder="关键字搜索" style="width: 200px" />
<Input v-model="select.keyword" clearable placeholder="关键字搜索" style="width: 200px"/>
</span>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">服务商/供应商</span>
<span>
<Input v-model="select.supply" clearable placeholder="请输入服务商/供应商" style="width: 200px" />
<Input v-model="select.supply" clearable placeholder="请输入服务商/供应商" style="width: 200px"/>
</span>
</div>
@ -23,13 +23,14 @@
<span>
<Input v-model="select.plan_name" clearable placeholder="请选择预算计划" @on-focus="showPlanForSearch"
style="width: 200px" @on-clear="clearSelectForSearch" />
style="width: 200px" @on-clear="clearSelectForSearch"/>
</span>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">签订年份</span>
<span>
<DatePicker :value="select.year" placeholder="选择年份" placement="bottom" style="width: 90px;" type="year"
<DatePicker :value="select.year" placeholder="选择年份" placement="bottom" style="width: 90px;"
type="year"
@on-change="(e)=>select.year = e"></DatePicker>
</span>
</div>
@ -54,7 +55,8 @@
<span style="padding: 0 6px;word-break: keep-all;">
业务科室
</span>
<el-select v-model="select.department_id" clearable placeholder="业务科室选择" size="small" style="width: 120px;">
<el-select v-model="select.department_id" clearable placeholder="业务科室选择" size="small"
style="width: 120px;">
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -82,9 +84,9 @@
<span style="padding: 0 6px;word-break: keep-all;">
预算金额
</span>
<InputNumber v-model="select.start_plan_price" :min="0" placeholder="最小金额" style="width: 100px;" />
<InputNumber v-model="select.start_plan_price" :min="0" placeholder="最小金额" style="width: 100px;"/>
<span style="padding: 0 5px;">-</span>
<InputNumber v-model="select.end_plan_price" :min="0" placeholder="最大金额" style="width: 100px;" />
<InputNumber v-model="select.end_plan_price" :min="0" placeholder="最大金额" style="width: 100px;"/>
</div>
<div>
@ -187,15 +189,18 @@
</template>
<!-- <Button class="slot-btns-item" type="primary" size="small">附件管理</Button>-->
<template v-if="scope.row.req_status === 1 && scope.row.is_plan === 0 && !scope.row.is_substitute">
<Button class="slot-btns-item" size="small" type="primary" @click="askProcess(scope.row)"></Button>
<Button class="slot-btns-item" size="small" type="primary" @click="askProcess(scope.row)">
</Button>
</template>
<template
v-if="(scope.row.join_status === 1 && ((scope.row.invite_status === 3)||(scope.row.purchase_way.remark === 'false' && scope.row.purchase_status === 3)) || ( scope.row.is_substitute && scope.row.join_status === 1) ) ">
<Button class="slot-btns-item" size="small" type="primary" @click="signProcess(scope.row)"></Button>
<Button class="slot-btns-item" size="small" type="primary" @click="signProcess(scope.row)">
</Button>
</template>
<template
v-if="scope.row.purchase_status === 1 && ((scope.row.req_status === 3 && scope.row.is_plan === 0)||scope.row.is_plan === 1)&& !scope.row.is_substitute ">
<Button class="slot-btns-item" size="small" type="primary" @click="buyProcess(scope.row)"></Button>
<Button class="slot-btns-item" size="small" type="primary" @click="buyProcess(scope.row)">
</Button>
</template>
<Poptip trigger="hover" placement="bottom" transfer>
@ -233,7 +238,7 @@
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total" show-elevator @on-change="pageChange" show-sizer @on-page-size-change="pageSizeChange" />
<Page :total="total" show-elevator @on-change="pageChange" show-sizer @on-page-size-change="pageSizeChange"/>
</div>
<!-- 新增合同 -->
@ -245,11 +250,31 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>项目名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" @change="checkName" placeholder="请填写项目名称" style="width: 300px;" />
<el-input v-model="form.name" @change="checkName" placeholder="请填写项目名称" style="width: 300px;"/>
</div>
</div>
</template>
<template v-slot:type>
<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;font-size: 11px;">*是否为简易流程水电煤报刊订阅网络通讯车辆使用等费用付款</span>
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.is_simple" active-text="" inactive-text="" :active-value="1" :inactive-value="0"/>
</div>
</div>
</template>
<template v-slot:supply v-if="form.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;font-size: 11px;">*</span>承包商/供货商
</div>
<div class="xy-table-item-content">
<el-input v-model="form.supply" placeholder="请填写承包商/供货商" style="width: 300px;"/>
</div>
</div>
</template>
<template v-slot:type v-if="!form.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>项目类型
@ -261,7 +286,7 @@
</div>
</div>
</template>
<template v-slot:methods>
<template v-slot:methods v-if="!form.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购形式
@ -273,7 +298,7 @@
</div>
</div>
</template>
<template v-slot:modality>
<template v-slot:modality v-if="!form.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购类型
@ -285,13 +310,13 @@
</div>
</div>
</template>
<template v-slot:price>
<template v-slot:price v-if="!form.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 xy-table-item-price">
<el-input v-model="form.price" placeholder="请填写合同预算价" style="width: 300px;" />
<el-input v-model="form.price" placeholder="请填写合同预算价" style="width: 300px;"/>
</div>
</div>
</template>
@ -313,7 +338,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否为预算内确定项目
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.isBudget" />
<el-switch v-model="form.isBudget"/>
</div>
</div>
</template>
@ -324,7 +349,7 @@
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.is_substitute" active-text="" inactive-text="" :active-value="1"
:inactive-value="0" />
:inactive-value="0"/>
</div>
</div>
</template>
@ -350,14 +375,14 @@
</xy-dialog>
<!-- 搜索使用 预算计划 -->
<xy-dialog :is-show.sync="isShowPlanForSearch" title="预算计划" :width="720" @on-ok="planSelectForSearch">
<template v-slot:normalContent>
<Input v-model="planSearch.name" search enter-button=" " placeholder="搜索预算计划.." @on-search="searchBudgets" />
<Input v-model="planSearch.name" search enter-button=" " placeholder="搜索预算计划.."
@on-search="searchBudgets"/>
<div style="margin: 10px 0;display: flex;justify-content: space-between;
align-items: center;">
<div>已选择<span style="margin-right:10px">{{select.plan_name}}</span> </div>
<div>已选择<span style="margin-right:10px">{{ select.plan_name }}</span></div>
<el-link type="success" @click="clearSelectForSearch"></el-link>
</div>
@ -368,7 +393,7 @@
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="planTotal" show-elevator @on-change="planPageChange" />
<Page :total="planTotal" show-elevator @on-change="planPageChange"/>
</div>
<el-tag type="warning">点击行进行选择</el-tag>
</template>
@ -388,21 +413,21 @@
</el-option>
</el-select>
<Input v-model="planSearch.name" enter-button=" " placeholder="搜索预算计划.." search
@on-search="searchBudgets" />
@on-search="searchBudgets"/>
</div>
<xy-table ref="planTable" :height="300" :list="plans" :show-index="false" :table-item="planTable"
style="margin-top: 10px;" @select="selectPlan">
<template v-slot:btns>
<el-table-column header-align="center" label="使用金额" fixed="right" width="140">
<template slot-scope="scope">
<Input :value="scope.row.useMoney" @input="planInput($event,scope.row)" />
<Input :value="scope.row.useMoney" @input="planInput($event,scope.row)"/>
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="planTotal" show-elevator @on-change="planPageChange" />
<Page :total="planTotal" show-elevator @on-change="planPageChange"/>
</div>
</template>
@ -430,43 +455,43 @@
</template>
<script>
import {
import {
getContract,
addContrant,
delContract,
checkContractName
} from "@/api/contract/contract"
import {
} from "@/api/contract/contract"
import {
getparameter
} from "@/api/system/dictionary"
import {
} from "@/api/system/dictionary"
import {
listdeptNoAuth
} from "@/api/system/department";
import {
} from "@/api/system/department";
import {
getBudget
} from "@/api/budget/budget"
import {
} from "@/api/budget/budget"
import {
getOatoken
} from "@/api/oatoken"
import {
} from "@/api/oatoken"
import {
parseTime
} from "@/utils"
import {
} from "@/utils"
import {
Message
} from "element-ui";
import {
} from "element-ui";
import {
getInfo
} from '@/api/user.js'
import {
} from '@/api/user.js'
import {
getToken
} from '@/utils/auth'
import editor from "./components/editorContract"
import detail from "./components/detailContract"
import paymentRegistration from "./components/paymentRegistration";
import contractSign from "@/views/contract/components/contractSign";
import contractPaymentRegistration from "@/views/contract/components/contractPaymentRegistration";
export default {
} from '@/utils/auth'
import editor from "./components/editorContract"
import detail from "./components/detailContract"
import paymentRegistration from "./components/paymentRegistration";
import contractSign from "@/views/contract/components/contractSign";
import contractPaymentRegistration from "@/views/contract/components/contractPaymentRegistration";
export default {
components: {
editor,
detail,
@ -478,7 +503,7 @@
var planPass = (rule, value, callback) => {
if (this.form.isBudget) {
if (this.form.plan.length === 0) {
return callback(new Error('必选'))
callback(new Error('必选'))
} else {
callback()
}
@ -486,6 +511,65 @@
callback()
}
}
var supplyPass = (rule,value,callback) => {
if(this.form.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}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 {
userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"],
window: {
@ -695,7 +779,7 @@
customFn: (row) => {
{
return row.money_way_detail.map(item => {
return ( < div > {
return (< div> {
item.value
} < /div>)
})
@ -710,7 +794,7 @@
customFn: (row) => {
{
return row.plans.map(item => {
return ( < div > [{
return (< div> [{
item.year
}] - {
item.name
@ -743,16 +827,15 @@
width: 140,
customFn: (row) => {
let per = ((((row.fund_log_total) / row.money) || 0) * 100)?.toFixed(2) || 0
return ( <
div style = {
return (<
div style={
{
'color': per > 110 ? 'red' : 'green'
}
} > {
}> {
per
} %
<
/div>
</div>
)
}
},
@ -952,6 +1035,8 @@
isShowAdd: false,
form: {
name: "",
is_simple:0,
supply: "",
type: "",
methods: "",
modality: "",
@ -967,27 +1052,37 @@
required: true,
message: "必填"
}],
type: [{
required: true,
message: "必选"
}],
methods: [{
required: true,
message: "必选"
}],
modality: [{
required: true,
message: "必选"
}],
price: [{
required: true,
message: "必填"
},
supply:[
{
validator:supplyPass,
trigger: 'change'
}
],
type:[
{
pattern: /^\d+(\.\d+)?$/,
message: '必须为数字'
validator: typePass,
trigger: 'change'
}
],
methods:[
{
validator:methodsPass,
trigger: 'change'
}
],
modality:[
{
validator:modalityPass,
trigger: 'change'
}
],
price:[
{
validator:pricePass,
trigger: 'change'
}
],
fundingChannels: [{
required: true,
message: "必填"
@ -1209,8 +1304,8 @@
}
},
//y
checkName(e){
checkContractName({name:e}).then(res=>{
checkName(e) {
checkContractName({name: e}).then(res => {
console.log(res);
})
},
@ -1433,8 +1528,6 @@
})
//
if (sel.filter(plan => {
return plan.id == row.id
@ -1536,7 +1629,9 @@
contract_plan_links: this.form.plan.map(item => {
return item.value
}),
is_substitute: this.form.is_substitute
is_substitute: this.form.is_substitute,
is_simple:this.form.is_simple,
supply:this.form.supply
}).then(res => {
this.isShowAdd = false
Message({
@ -1577,7 +1672,8 @@
that.hasEdit = true;
}
}).catch(error => {})
}).catch(error => {
})
this.getPurchaseType()
this.getContracts()
this.getDepartment()
@ -1591,24 +1687,24 @@
destroyed() {
window.onfocus = null
}
}
}
</script>
<style lang="scss" scoped>
.selects {
.selects {
display: flex;
flex-wrap: wrap;
&>div {
& > div {
margin-bottom: 6px;
}
}
}
.selectTop {
.selectTop {
margin-top: 10px;
}
}
.contract-add-plan {
.contract-add-plan {
min-height: 30px;
border: 1px solid #dcdee2;
border-radius: 4px;
@ -1624,10 +1720,10 @@
line-height: 30px;
color: #CDD0D5;
}
}
}
.slot-btns {
.slot-btns {
display: flex;
flex-wrap: wrap;
align-content: center;
@ -1636,13 +1732,13 @@
&-item {
margin: 0 6px 4px 0;
}
}
}
.xy-table-item-label {
width: 140px;
}
.xy-table-item-label {
width: 200px;
}
.xy-table-item-price {
.xy-table-item-price {
position: relative;
&::after {
@ -1651,5 +1747,5 @@
top: 0;
content: '(元)'
}
}
}
</style>

Loading…
Cancel
Save