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:[
{
pattern: /^\d+(\.\d+)?$/,
message: '必须为数字'
validator:methodsPass,
trigger: 'change'
}
],
modality:[
{
validator:modalityPass,
trigger: 'change'
}
],
price:[
{
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 {

@ -29,7 +29,8 @@
<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>
@ -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>
@ -249,7 +254,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="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,7 +310,7 @@
</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>合同预算价
@ -350,11 +375,11 @@
</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>
@ -478,10 +503,69 @@
var planPass = (rule, value, callback) => {
if (this.form.isBudget) {
if (this.form.plan.length === 0) {
return callback(new Error('必选'))
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 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()
}
@ -751,8 +835,7 @@
}> {
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:[
{
validator: typePass,
trigger: 'change'
}
],
methods:[
{
validator:methodsPass,
trigger: 'change'
}
],
modality:[
{
pattern: /^\d+(\.\d+)?$/,
message: '必须为数字'
validator:modalityPass,
trigger: 'change'
}
],
price:[
{
validator:pricePass,
trigger: 'change'
}
],
fundingChannels: [{
required: true,
message: "必填"
@ -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()
@ -1639,7 +1735,7 @@
}
.xy-table-item-label {
width: 140px;
width: 200px;
}
.xy-table-item-price {

Loading…
Cancel
Save