xy 2 years ago
parent 07772d540d
commit c2faa80f90

@ -242,7 +242,9 @@ export default {
purchase_status: 3, purchase_status: 3,
//join_status: 3, //join_status: 3,
invite_status: 3, invite_status: 3,
files: [] files: [],
outcome_type: 1,
is_substitute: 1
}, },
fileLists: [], fileLists: [],
rules: { rules: {

@ -108,7 +108,7 @@
<template v-slot:fundingChannels> <template v-slot:fundingChannels>
<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">
<el-select multiple clearable placeholder="请选择资金渠道" v-model="detail.fundingChannels" style="width: 300px;"> <el-select multiple clearable placeholder="请选择资金渠道" v-model="detail.fundingChannels" style="width: 300px;">
@ -330,7 +330,7 @@ import { resetSelect } from '@/utils'
}, },
data() { data() {
var planPass = (rule, value, callback) => { var planPass = (rule, value, callback) => {
if (this.detail.isBudget) { if (this.detail.isBudget && !this.detail.is_substitute) {
if (this.detail.plan.length === 0) { if (this.detail.plan.length === 0) {
return callback(new Error('必选')) return callback(new Error('必选'))
} else { } else {
@ -455,10 +455,10 @@ import { resetSelect } from '@/utils'
} }
], ],
fundingChannels: [{ // fundingChannels: [{
required: true, // required: true,
message: "必填" // message: ""
}], // }],
plan: [{ plan: [{
validator: planPass, validator: planPass,
trigger: 'change' trigger: 'change'
@ -733,6 +733,7 @@ import { resetSelect } from '@/utils'
is_framework:res.is_framework, is_framework:res.is_framework,
use_framework_buy: res.use_framework_buy, use_framework_buy: res.use_framework_buy,
contract_to_contracts: res.contract_to_contracts, contract_to_contracts: res.contract_to_contracts,
is_substitute: res.is_substitute,
plan: res.plans.map(item => { plan: res.plans.map(item => {
return { return {
label: item.name, label: item.name,

@ -26,6 +26,7 @@
size="small" size="small"
v-model="planSelect.plan_department_id" v-model="planSelect.plan_department_id"
style="width: 180px;margin-right: 10px;" style="width: 180px;margin-right: 10px;"
@change="getBudgets"
> >
<el-option <el-option
v-for="item in departments" v-for="item in departments"
@ -36,6 +37,7 @@
</el-option> </el-option>
</el-select> </el-select>
<el-cascader <el-cascader
placeholder="资金类型选择"
:options="planTypes" :options="planTypes"
:props="{ :props="{
checkStrictly: false, checkStrictly: false,
@ -45,8 +47,11 @@
:value="planSelect.type" :value="planSelect.type"
clearable clearable
size="small" size="small"
style="width: 180px;margin-right: 10px;" style="width: 220px;margin-right: 10px;"
@change="(e) => (planSelect.type = e[e.length - 1] || '')" @change="(e) => {
planSelect.type = e[e.length - 1] || '';
getBudgets();
}"
/> />
<Input <Input
v-model="planSelect.name" v-model="planSelect.name"
@ -179,7 +184,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item prop="is_simple" label="是否为简易流程"> <el-form-item prop="is_simple" label="是否为直接支付">
<el-switch <el-switch
v-model="form.is_simple" v-model="form.is_simple"
active-text="是" active-text="是"
@ -187,7 +192,7 @@
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
/> />
<span style="flex: 1; text-align: right">水电煤等费用付款</span> <span style="flex: 1; text-align: right">无需采购流程如水电邮寄费等</span>
</el-form-item> </el-form-item>
<template v-if="form.is_simple"> <template v-if="form.is_simple">
@ -861,6 +866,7 @@ export default {
use_framework_buy: 0, use_framework_buy: 0,
content: "", content: "",
contract_to_contracts: [], contract_to_contracts: [],
outcome_type: 1
}, },
planTypes: [], planTypes: [],
departments: [], departments: [],
@ -1314,8 +1320,13 @@ export default {
if (this.type === 'add') { if (this.type === 'add') {
addContrant(this.form,true).then(res => { addContrant(this.form,true).then(res => {
this.btnLoading = false this.btnLoading = false
this.step = 3; //this.step = 3;
this.$router.push({
path: this.form.is_simple ? '/contract/contractAll' : '/contract/contract/contractList',
query: {
keyword: this.form.name,
},
})
getContract({ getContract({
page: 1, page: 1,
page_size: 1, page_size: 1,
@ -1400,28 +1411,7 @@ export default {
}, },
resetForm() { resetForm() {
this.form = this.isLedger ? { this.form = {
name: "",
contract_type: 1,
number: "",
supply: "",
money: 0,
start_date: "",
end_date: "",
guarantee_money: "",
guarantee_year: "",
date: this.$moment().format('YYYY-MM-DD'),
is_contract: 1,
is_framework: "",
purchase_status: 3,
invite_status: 3,
files: [],
contract_plan_links: this.planSelections.map((i) => ({
plan_id: i.id,
use_money: i._inputMoney,
new_money: i.money,
})),
} : {
type: "", type: "",
is_plan: 1, is_plan: 1,
purchase_type_id: "", purchase_type_id: "",
@ -1443,6 +1433,7 @@ export default {
use_framework_buy: 0, use_framework_buy: 0,
content: "", content: "",
contract_to_contracts: [], contract_to_contracts: [],
outcome_type: 1
}; };
this.$refs["form"].clearValidate(); this.$refs["form"].clearValidate();

@ -19,6 +19,14 @@
/> />
</span> </span>
</div> </div>
<div v-if="/contractAll/g.test($route.path)">
<span style="padding: 0 6px; word-break: keep-all">是否为直接支付</span>
<i-switch v-model="select.is_simple" :true-value="1" :false-value="0" @on-change="getContracts">
<span slot="open"></span>
</i-switch>
</div>
<xy-selectors style="margin-left: 10px;" @search="getContracts" @reset="reset"> <xy-selectors style="margin-left: 10px;" @search="getContracts" @reset="reset">
<div class="select-content"> <div class="select-content">
<div> <div>
@ -78,7 +86,7 @@
</div> </div>
<div> <div>
<span style="padding: 0 6px; word-break: keep-all">是否简易流程</span> <span style="padding: 0 6px; word-break: keep-all">是否为直接支付</span>
<i-switch v-model="select.is_simple" :true-value="1" :false-value="0" /> <i-switch v-model="select.is_simple" :true-value="1" :false-value="0" />
</div> </div>
@ -1927,7 +1935,7 @@ export default {
fundingChannels: [], fundingChannels: [],
isBudget: true, isBudget: true,
plan: [], plan: [],
//is_substitute: 0, //is_substitute: 0,//
is_framework: 0, is_framework: 0,
use_framework_buy: 0, use_framework_buy: 0,
contract_to_contracts: [], contract_to_contracts: [],
@ -2416,11 +2424,6 @@ export default {
}, },
// //
async getContracts(is_export,noloading=false,isopenOa=false) { async getContracts(is_export,noloading=false,isopenOa=false) {
if (/contractLedger/g.test(this.$route.path)) {
this.select.is_contract = 1
} else {
this.select.is_contract = ""
}
let tokens = getToken(); let tokens = getToken();
if (is_export && this.select.is_export == 1) { if (is_export && this.select.is_export == 1) {
var url = "/api/admin/contract/index?is_auth=1&token=" + tokens; var url = "/api/admin/contract/index?is_auth=1&token=" + tokens;
@ -2714,7 +2717,7 @@ export default {
"zhifu": new Flow() "zhifu": new Flow()
} }
if (item.is_simple !== 1 && !item.is_substitute) { if (item.is_simple !== 1 && !item.is_substitute) {
// //
flowStatus["caigou"].setStatus(item.purchase_status) flowStatus["caigou"].setStatus(item.purchase_status)
if (item.purchase_status === 1) { if (item.purchase_status === 1) {
@ -2725,8 +2728,8 @@ export default {
} }
} }
} }
if (item.purchase_way?.value !== '网上商城' && item.is_contract && !item.is_substitute && item.purchase_way?.remark === 'true') { if (item.purchase_way?.value !== '网上商城' && item.is_contract && item.purchase_way?.remark === 'true' && !item.is_substitute) {
// // \
flowStatus["zhaobiao"].setStatus(item.invite_status) flowStatus["zhaobiao"].setStatus(item.invite_status)
if (item.invite_status === 1 && item.purchase_status === 3) { if (item.invite_status === 1 && item.purchase_status === 3) {
// //
@ -2737,9 +2740,8 @@ export default {
// //
flowStatus["shenpi"].setStatus(item.join_status) flowStatus["shenpi"].setStatus(item.join_status)
if (item.join_status === 1 && (item.invite_status === 3 || if (item.join_status === 1 && (item.invite_status === 3 ||
(item.purchase_way?.remark === 'false' && item.purchase_status === 3) || (item.purchase_way?.remark === 'false' && item.purchase_status === 3))) {
item.is_substitute)) { //
//
flowStatus["shenpi"].setExecutable(true) flowStatus["shenpi"].setExecutable(true)
} }
} }
@ -2821,6 +2823,17 @@ export default {
created() { created() {
this.getBudgets(); this.getBudgets();
this.select.keyword = this.$route.query.keyword || ""; this.select.keyword = this.$route.query.keyword || "";
//this.select.is_contract = /All|all/g.test(this.$route.path) ? "" : 0;
if (/contractLedger/g.test(this.$route.path)) {
this.select.is_contract = 1;
this.select.purchase_status = 3;
}
if (/mycontract/g.test(this.$route.path)) {
this.select.is_contract = 1;
}
if (/contractAll/g.test(this.$route.path)) {
this.select.is_simple = "";
}
}, },
destroyed() { destroyed() {
window.onfocus = null; window.onfocus = null;

@ -174,22 +174,37 @@
</div> </div>
</template> </template>
<template v-slot:extraFormBottom> <template v-slot:extraFormBottom>
<el-select <div style="display: flex;align-items: center;">
placeholder="科室选择" <el-select
clearable placeholder="科室选择"
size="small" clearable
v-model="plansSelect.plan_department_id" size="small"
style="width: 160px" v-model="plansSelect.plan_department_id"
> style="width: 160px"
<el-option
v-for="item in departments"
:label="item.name"
:value="item.id"
:key="item.id"
> >
</el-option> <el-option
</el-select> v-for="item in departments"
<Input search enter-button=" " placeholder="搜索预算计划.." v-model="plansSelect.name" @on-search="getBudgets" /> :label="item.name"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
<el-cascader
:options="planTypes"
:props="{
checkStrictly: false,
label: 'name',
value: 'id',
}"
:value="plansSelect.type"
clearable
size="small"
style="width: 160px;margin-left: 6px;"
@change="(e) => (plansSelect.type = e[e.length - 1] || '')"
/>
<Input style="margin-left: 6px;" search enter-button=" " placeholder="搜索预算计划.." v-model="plansSelect.name" @on-search="getBudgets" />
</div>
<div class="contract-add-plan" style="min-width: 300px;"> <div class="contract-add-plan" style="min-width: 300px;">
<template v-if="paymentRegistrationForm.plan.length > 0"> <template v-if="paymentRegistrationForm.plan.length > 0">
<template v-for="item in paymentRegistrationForm.plan"> <template v-for="item in paymentRegistrationForm.plan">
@ -238,6 +253,7 @@ import {
parseTime, parseTime,
moneyFormatter moneyFormatter
} from "@/utils"; } from "@/utils";
import { listdeptNoAuth } from '@/api/system/department'
export default { export default {
data() { data() {
@ -329,11 +345,12 @@ import {
page: 1, page: 1,
page_size: 10, page_size: 10,
name: '', name: '',
plan_department_id: "" plan_department_id: "",
type: ""
}, },
planTable: [{ planTable: [{
sortable: false, sortable: false,
width: 40, width: 44,
type: 'selection' type: 'selection'
}, },
{ {
@ -478,10 +495,10 @@ import {
// //
percentPay() { percentPay() {
let total = 0 let total = 0
this.payment.map(item => { this.payment.forEach(item => {
total += Number(item.act_money) total += Number(item.act_money??0)
}) })
return ((total / this.contract.money) * 100).toFixed(2) || 0 return ((((total / Number(this.contract?.money||0)) || 0) * 100)).toFixed(2) || 0
}, },
async getRegistration(id) { async getRegistration(id) {

Loading…
Cancel
Save