合同 新增采购

master
lion 7 months ago
parent b37c6f2735
commit 469c8877ad

@ -1,6 +1,6 @@
<template>
<div class="v-header">
<div class="v-left-text">
<div class="v-left-text" v-if="isOpt">
<item :icon="iconImg" />
<span style="margin-left: 3px;">{{title}}</span>
</div>
@ -22,6 +22,10 @@
Item
},
props: {
isOpt:{
type: Boolean,
default: true
},
icon: {
type: String,
default: ""

@ -916,12 +916,34 @@
:before-close="()=>{
step = 2,myPurchaseType = 2,form.is_common_purchase = 1,form.flow_mod_id = 99,showTypes = false,showEdit=true
}">
<span>请选择类型</span>
<div class="typeFlex">
<div class="typeFlex-list">
<div class="typeFlex-title">从已有的支出列表中选择</div>
<div>
<listAll ref="listAll" :isOpt="true"></listAll>
</div>
</div>
<div class="typeFlex-types">
<div class="typeFlex-title">新增预算支出</div>
<div>
<div>
<el-button @click="step = 2,myPurchaseType = 2,isWeixiu=false,form.is_common_purchase = 1,form.flow_mod_id = 99,showTypes = false,showEdit=true">一般采购</el-button>
</div>
<div>
<el-button @click="showTypes = false,myPurchaseType = 1,isWeixiu=true,form.is_common_purchase = 0,step=2,showEdit=true">维修相关</el-button>
</div>
<div>
<el-button type="primary" @click="showTypes = false,isWeixiu=false,myPurchaseType = 1,form.is_common_purchase = 0,showEdit=true,toggleBudgetByFlowModId()">预算计划支出</el-button>
</div>
</div>
</div>
</div>
<!-- <span>请选择类型</span>
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: flex-end;">
<el-button @click="step = 2,myPurchaseType = 2,isWeixiu=false,form.is_common_purchase = 1,form.flow_mod_id = 99,showTypes = false,showEdit=true">一般采购</el-button>
<el-button @click="showTypes = false,myPurchaseType = 1,isWeixiu=true,form.is_common_purchase = 0,step=2,showEdit=true">维修相关</el-button>
<el-button type="primary" @click="showTypes = false,isWeixiu=false,myPurchaseType = 1,form.is_common_purchase = 0,showEdit=true,toggleBudgetByFlowModId()">预算计划支出</el-button>
</span>
</span> -->
</el-dialog>
</div>
@ -942,10 +964,15 @@ import { getBudget } from "@/api/budget/budget";
import { getInfo } from "@/api/me.js";
import { listdeptNoAuth } from '@/api/system/department'
import { deepCopy } from "@/utils";
import listAll from "@/views/contract/contractList.vue"
import {
listCommonuser
} from "@/api/common.js";
export default {
components:{
listAll
},
data() {
return {
showTypes:true,
@ -1854,6 +1881,23 @@ export default {
</script>
<style scoped lang="scss">
.typeFlex{
display: flex;
justify-content: space-between;
&-title{
font-size: 16px;
margin-bottom:10px;
}
&-list{
width:70%;
}
&-types{
width:30%;
.el-button{
margin-bottom:10px;
}
}
}
.select-container {
display: flex;
justify-content: space-between;

@ -3,7 +3,7 @@
<lx-header
icon="md-apps"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
text="合同列表"
:isOpt="!isOpt"
>
<div slot="content"></div>
<slot>
@ -295,6 +295,7 @@
</xy-selectors>
<Button
v-if="!isOpt"
style="margin-left: 10px"
type="primary"
@click="new RegExp(/contractLedger/g).test($route.path) ? ($refs['addContractLedger'].setType('add'),$refs['addContractLedger'].show()) : $router.push('/contract/contractEdit')"
@ -303,7 +304,7 @@
<Button style="margin-left: 10px" type="primary" @click="select.page=1,getContracts()"
>查询</Button
>
<Button type="primary" @click="toExport()" style="margin-left: 10px"
<Button v-if="!isOpt" type="primary" @click="toExport()" style="margin-left: 10px"
>导出</Button
>
<!-- <Button type="primary" style="margin-left: 10px">导出</Button>-->
@ -327,8 +328,8 @@
width="240"
>
<template slot-scope="scope">
<div style="text-align: center;">
<el-popover title="选择申购人" placement="bottom-start" width="250">
<div style="text-align: center;" v-if="!isOpt">
<el-popover title="选择申购人" placement="bottom-start" width="250" >
<el-select style="width:100%" v-model="scope.row.apply_user_id" placeholder="请选择">
<el-option
v-for="item in commonPurchasePeople"
@ -346,6 +347,9 @@
</el-popover>
</div>
<div v-else>
{{scope.row.apply_user?scope.row.apply_user.name:''}}
</div>
</template>
</el-table-column>
</template>
@ -356,7 +360,7 @@
width="240"
>
<template slot-scope="scope">
<div style="text-align: center;">
<div style="text-align: center;" v-if="!isOpt">
<el-popover title="选择承办人" placement="bottom-start" width="250">
<el-select style="width:100%" v-model="scope.row.undertake_user_id" placeholder="请选择">
<el-option
@ -375,6 +379,9 @@
</el-popover>
</div>
<div v-else>
{{scope.row.undertake_user?scope.row.undertake_user.name:''}}
</div>
</template>
</el-table-column>
</template>
@ -407,10 +414,21 @@
:fixed="$store.getters.device === 'mobile'?false:'right'"
header-align="center"
label="操作"
width="200"
width="180"
>
<template slot-scope="scope">
<div class="slot-btns">
<div v-if="isOpt">
<template v-if="scope.row.FLOWSTATUS['caigou'].isEnabled()">
<Button
class="slot-btns-item"
size="small"
type="primary"
@click="buyProcess(scope.row)"
>采购流程
</Button>
</template>
</div>
<div v-else class="slot-btns">
<Button
v-if="scope.row.plans.length>0 && scope.row.borrows.length==0"
class="slot-btns-item"
@ -777,6 +795,15 @@ import {flowStatusConfig,listCommonuser} from "@/api/common";
import {getFundLog} from "@/api/paymentRegistration/fundLog";
let iframe;
export default {
props:{
//
isOpt:{
type:Boolean,
default:false
}
},
components: {
addContractLedger,
editor,
@ -847,7 +874,8 @@ export default {
// end_plan_price: undefined,
is_myself: 0,
is_purchase: 1,
flow_link: []
flow_link: [],
can_purchase:this.isOpt?1:0, //
},
selectCopy: {
keyword: "",
@ -866,7 +894,8 @@ export default {
// end_plan_price: undefined,
is_myself: 0,
is_purchase: 1,
flow_link: []
flow_link: [],
can_purchase:this.isOpt?1:'', //
},
type: [
{
@ -1075,14 +1104,15 @@ export default {
type: 'selection',
align: 'center',
width: 58,
fixed: 'left'
fixed: !this.isOpt?'left':false,
hidden:!this.isOpt?false:true,
},
{
label: "项目名称",
width: 300,
prop: "name",
fixed: this.$store.getters.device === 'mobile'?false:'left',
align: "left",
fixed: this.$store.getters.device === 'mobile' || this.isOpt?false:'left',
align: 'left',
customFn:row => {
if (row.type === 1 && row.end_date && (this.$moment().valueOf() - this.$moment(row.end_date).valueOf()) > 0) {
return (<span style="color: red;"><span>已到期</span><span>{row.name}</span></span>)
@ -1093,7 +1123,18 @@ export default {
}
}
},
{
label: "业务科室",
width: 140,
prop: "department.name",
fixed: this.$store.getters.device === 'mobile' || this.isOpt?false:'left'
},
{
label: "经办人",
width: 140,
prop: "admin.name",
fixed: this.$store.getters.device === 'mobile' || this.isOpt?false:'left'
},
{
label: "采购流程",
multiHd: [
@ -1406,18 +1447,7 @@ export default {
prop: "supply",
align: "left",
},
{
label: "业务科室",
width: 140,
prop: "department.name",
fixed: this.$store.getters.device === 'mobile'?false:'left'
},
{
label: "经办人",
width: 140,
prop: "admin.name",
fixed: this.$store.getters.device === 'mobile'?false:'left'
},
{
label: "合同服务日期",
width: 200,
@ -2320,14 +2350,16 @@ export default {
const caigou = item.contract_flow_links.find(i => i.custom_model_id === item.flow_mod_id)
const shenpi = item.contract_flow_links.find(i => i.tag === 'contract')
const other = item.contract_flow_links.find(i => i.custom_model_id === item.flow_mod_id)
// is_purchase
if (item.is_purchase) {
//
// is_common_purchase
//is_simple is_substitute
if (!item.is_common_purchase) {
if (item.is_simple !== 1 && !item.is_substitute) {
//
// flow_status 0 -1 1
flowStatus["caigou"].setStatus(caigou?.flow_status ?? 2)
if (!caigou) {
//
// is_plan
if (item.is_plan === 1) {
flowStatus["caigou"].setExecutable(true)
}
@ -2370,6 +2402,7 @@ export default {
}
}
}
if (item.is_end === 0) {
flowStatus["zhifu"].setStatus(2)
//

Loading…
Cancel
Save