ht事前流程关联维修选择资金 自动填充资金

master
lion 5 months ago
parent a1f4c7ebf1
commit 51b5c0a3df

@ -81,3 +81,22 @@ export function updateStatus(params,noloading = true){
noloading
})
}
export function oaSelect(params,noloading = true){
return request({
method:'get',
url:'api/oa/flow/no-link-list',
params,
noloading
})
}
export function oaSave(data){
return request({
method:'post',
url:'api/oa/flow/save-foreign',
data
})
}

@ -0,0 +1,378 @@
<template>
<Modal :width="70" class-name="oa-modal" title="预算计划" :mask-closable="false" v-model="isShowPlanModal"
>
<div class="page">
<div class="select-container">
<DatePicker
:value="planSelect.year"
placeholder="选择所属年份"
placement="bottom-start"
style="width: 180px;margin-right: 10px;"
type="year"
@on-change="(e) => {
planSelect.year = e
getBudgets()
}"
></DatePicker>
<el-select
placeholder="科室选择"
clearable
size="small"
v-model="planSelect.plan_department_id"
style="width: 180px;margin-right: 10px;"
@change="getBudgets"
>
<el-option
v-for="item in departments"
:label="item.name"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
<el-cascader
placeholder="资金类型选择"
:options="planTypes"
:props="{
checkStrictly: false,
label: 'name',
value: 'id',
}"
:value="planSelect.type"
clearable
size="small"
style="width: 220px;margin-right: 10px;"
@change="(e) => {
planSelect.type = e[e.length - 1] || '';
getBudgets();
}"
/>
<Input
v-model="planSelect.name"
search
enter-button="搜 索"
clearable
placeholder="搜索预算计划.."
@on-search="getBudgets"
/>
</div>
<xy-table
:header-cell-class-name="cellClassName"
:list="plans"
:show-index="false"
:table-item="planTable"
:height="300"
style="margin-top: 10px"
ref="editorPlanTable"
row-key="id"
border
default-expand-all
@select="planPick"
:tree-props="{ children: 'notChildren', hasChildren: 'hasChildren' }"
>
<template v-slot:btns>
<el-table-column
label="使用金额(元)"
:fixed="$store.getters.device === 'mobile'?false:'right'"
header-align="center"
width="144"
>
<template slot-scope="scope" v-if="scope.row.pid === 0">
<InputNumber
style="width: 120px"
:min="0"
:precision="2"
:active-change="false"
v-model="scope.row._inputMoney"
:formatter="
(value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
"
:parser="(value) => value.replace(/\$\s?|(,*)/g, '')"
></InputNumber>
</template>
</el-table-column>
</template>
</xy-table>
<!-- <div style="display: flex; justify-content: flex-end" class="pagination">
<Page
:total="planTotal"
show-elevator
@on-change="
(e) => {
planSelect.page = e;
getBudgets();
}
"
/>
</div> -->
</div>
<template v-slot:footer>
<div>
<el-button size="small" type="" style="margin-bottom:10px" @click="isShowPlanModal=false"></el-button>
<el-button size="small" type="primary" style="margin-bottom:10px" @click="getSelections"></el-button>
</div>
</template>
</Modal>
</template>
<script>
import { getBudget } from "@/api/budget/budget";
import { listdeptNoAuth } from "@/api/system/department";
import { getparameterTree } from "@/api/system/dictionary";
import { getQueryParam } from "@/utils";
export default {
props:{
// 使
isSelect:{
type:Boolean,
default:false
}
},
data() {
return {
isShowPlanModal:false,
myFlowModId: '',
boxHeight: 0,
planTypes: [],
departments: [],
plans: [],
planSelect: {
name: "",
page_size: 20,
page: 1,
is_tree: 1,
year: new Date().getFullYear().toString(),
plan_department_id: "",
type: ""
},
planTable: [
{
sortable: false,
width: 44,
type: "selection",
reserveSelection: true,
fixed: "left",
selectable: (row, index) => {
return row.pid === 0;
},
},
{
label: "科室",
prop: "plan_department.name",
width: 120,
align: "center",
},
{
label: "年份",
prop: "year",
width: 80,
align: "center",
},
{
label: "分类",
prop: "type_detail.value",
width: 120,
},
{
label: "名称",
prop: "name",
minWidth: 180,
align: "left",
},
{
label: "内容",
prop: "content",
minWidth: 240,
align: "left",
showOverflowTooltip: true
},
{
label: "计划金额",
prop: "money",
align: "right",
width: 120,
formatter: (v1, v2, value) => {
return `${(value && parseFloat(value) !== 0) ? value : v1.update_money }`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
},
{
label: "实付金额",
prop: "use_money_total",
width: 120,
align: "right",
formatter: (v1, v2, value) =>
value ? `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : "",
},
{
label: "已用金额",
prop: "has_money_total",
width: 120,
align: "right",
formatter: (v1, v2, value) =>
value ? `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : "",
},
],
planTotal: 0,
}
},
methods: {
planPick (selection, row) {
console.log("selection",selection)
if (row.year != new Date().getFullYear()) {
this.$confirm("您选择了非本年预算,是否继续?").catch(_ => {
if (selection.length > 1) {
//
this.$refs.editorPlanTable.clearSelection();
this.$refs.editorPlanTable.toggleRowSelection(selection[selection.length - 1]);
}
})
}else{
if (selection.length > 1) {
//
this.$refs.editorPlanTable.clearSelection();
this.$refs.editorPlanTable.toggleRowSelection(selection[selection.length - 1]);
}
}
},
//
async getBudgets() {
let res = await getBudget(this.planSelect);
// this.$refs.editorPlanTable.clearSelection();
res.list.forEach((item) => (item._inputMoney = 0));
this.plans = res.list;
this.planTotal = res.list.total || 0;
console.log("this.plans",this.plans)
// this.toggleBudgetByFlowModId()
},
getDepartment() {
listdeptNoAuth().then((res) => {
this.departments = res.data;
});
},
async getPlanTypes() {
const res = await getparameterTree({
id: 3
});
const dataHandler = (data) => {
data.forEach(i => {
if (i.hasOwnProperty('detail')) {
i.children = i.detail.map(j => {
j.name = j.value
return j;
})
} else {
dataHandler(i['children'])
}
})
return data;
}
this.planTypes = dataHandler(res?.children) || []
},
cellClassName({row,column,rowIndex,columnIndex}){
if(columnIndex===0){
return 'allSelect'
}
},
getSelections() {
const selections = this.$refs["editorPlanTable"].getSelection();
console.log("selectionsselections",selections)
if(selections.length==0){
this.$message.warning('请选择一条预算计划')
return
}
if(selections.length>1){
this.$message.warning('只能选择一条预算计划')
return
}
if (selections?.length > 0) {
// if (this.$route.query.isNeedMoney) {
for (let i of selections) {
if(!i._inputMoney){
if (i._inputMoney < 0) {
this.$message({
type: "warning",
message: `${i.year}${i.name} 使用金额需要大于0`,
});
return;
}
if (i._inputMoney > ((Number(i.money) || Number(i.update_money)) - Number(i.has_money_total))) {
this.$message({
type: "warning",
message: `${i.year}${i.name} 使用金额大于剩余预算!`,
});
return;
}
}
}
// }
// 使
// if(this.isSelect){
// this.$message({
// type: "warning",
// message: `使`,
// });
// return
// }
}
console.log("selections",selections)
this.$emit('getPlan',selections)
this.isShowPlanModal = false
},
getParentFlowModId() {
const parentUrl = parent.location.href
const splitArr = parentUrl.split('?')
if (splitArr[1]) {
const query = splitArr[1].split('&')
this.myFlowModId = query.find(i => /^module_id/.test(i))?.split('=')[1]
}
},
toggleBudgetByFlowModId() {
this.$nextTick(_ => {
this.plans.forEach(row => {
if (row.flow_mod_id == this.myFlowModId) {
// this.$refs['editorPlanTable']?.toggleRowSelection(row, true)
}
})
})
},
},
computed: {},
mounted() {
this.$nextTick(() => {
this.boxHeight = window.innerHeight - document.querySelector('.select-container')?.getBoundingClientRect()?.height - document.querySelector('.pagination')?.getBoundingClientRect()?.height - 50
console.log(this.boxHeight, 'box')
})
},
created() {
this.getParentFlowModId()
// window.$getPlans = this.getSelections
this.getPlanTypes()
this.getDepartment()
this.getBudgets()
}
}
</script>
<style scoped lang="scss">
.page {
padding: 10px;
height: 100%;
}
.select-container {
display: flex;
justify-content: space-between;
align-items: center;
}
::v-deep .allSelect .cell {
display: none;
}
</style>

@ -48,6 +48,11 @@ export default {
type:Function,
default:()=>{}
},
headerCellClassName:{
type:Function,
default:()=>{}
},
defaultExpandAll:{
type:Boolean,
default:true
@ -154,7 +159,7 @@ export default {
mounted() {
},
render(h) {
let {highlightCurrentRow,rowKey,expandRowKeys,selectChange,selectAllClick,summaryMethod,cellClick,btnWidth,selectClick,height,createIndexRow,tableStyle,treeProps,showSummary,showHeader,$scopedSlots,showIndex,defaultExpandAll,headerCellStyle,headerRowStyle,rowStyle,cellStyle,indent,tableHeight,tableItem,list,deleteClick,editorClick,rowClick,objectSpanMethod} = this
let {highlightCurrentRow,rowKey,expandRowKeys,selectChange,selectAllClick,summaryMethod,cellClick,btnWidth,selectClick,height,createIndexRow,tableStyle,treeProps,showSummary,showHeader,$scopedSlots,showIndex,defaultExpandAll,headerCellStyle,headerCellClassName,headerRowStyle,rowStyle,cellStyle,indent,tableHeight,tableItem,list,deleteClick,editorClick,rowClick,objectSpanMethod} = this
return (
<div className="table-tree" style={{ 'position': 'relative' }}>
{tableItem && tableItem.length > 0 ?
@ -167,6 +172,7 @@ export default {
summary-method={summaryMethod}
header-row-style={headerRowStyle}
header-cell-style={headerCellStyle}
header-cell-class-name={headerCellClassName}
row-style={rowStyle}
cell-style={cellStyle}
indent={indent}

@ -0,0 +1,167 @@
<template>
<div>
<!-- 发起流程前选择流程 或直接发起流程 -->
<Modal :width="70" class-name="oa-modal" title="事前流程" :mask-closable="false" v-model="isShowOaLinkModal"
>
<div style="width: 100%;height: 100%;padding:10px 40px">
<el-button size="small" type="primary" style="margin-bottom:10px" @click="saveNewOa(row)"></el-button>
<div class="search">
<el-input size="small" style="width: 200px;margin-right:10px" v-model="select.keyword"
placeholder="请输入关键词"></el-input>
<el-button size="small" type="primary" @click="select.page=1,getOaLink()"></el-button>
</div>
<div class="xytable">
<xy-table
:header-cell-class-name="cellClassName"
ref="oaTable" :list="oaList" row-key="id" :table-item="table" :height="300"
@select="handleSelectionChange">
<template v-slot:btns>
<el-table-column :fixed="$store.getters.device === 'mobile'?false:'right'" header-align="center"
label="操作" width="80">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="toOaDetail(scope.row)"></el-button>
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex; justify-content: flex-end">
<Page :total="total" show-elevator @on-change="pageChange" />
</div>
</div>
</div>
<template v-slot:footer>
<div>
<el-button size="small" type="" style="margin-bottom:10px" @click="cancelOa"></el-button>
<el-button size="small" type="primary" style="margin-bottom:10px" @click="confirmOa"></el-button>
</div>
</template>
</Modal>
</div>
</template>
<script>
import {
oaSelect,
oaSave
} from "@/api/contract/contract";
export default {
data() {
return {
isShowOaLinkModal: false,
row: {},
oaList: [],
flow:'', //
select: {
page: 1,
page_size: 10,
keyword: ''
},
total: 0,
table: [{
type: 'selection',
align: 'center',
width: 58,
}, {
prop: 'title',
label: 'OA流程',
align: "left"
}]
}
},
watch: {
isShowOaLinkModal(newval) {
if (newval) {
console.log("row", this.row)
this.getOaLink()
} else {
this.row = {}
this.oaList = []
this.flow = ''
console.log("row2", this.row)
}
}
},
methods: {
async getOaLink() {
this.$refs.oaTable.clearSelection();
const res = await oaSelect({
custom_model_id: this.row.flow_mod_id,
page: this.select.page,
page_size: this.select.page_size,
keyword: this.select.keyword
})
this.oaList = res.flows.data
this.total = res.flows.total
if (!this.oaList.length && this.select.page == 1) {
this.saveNewOa(this.row)
}
},
pageChange(e) {
this.select.page = e
this.getOaLink()
},
async saveNewOa(row) {
this.$emit('createOa', row,this.flow)
this.isShowOaLinkModal = false
},
confirmOa() {
console.log("this.$refs['oaTable'].getSelection()", this.$refs['oaTable'].getSelection());
let flowsList = this.$refs['oaTable'].getSelection();
if(flowsList.length==0){
this.$message.warning('请选择一条流程关联')
return
}
if(flowsList.length>1){
this.$message.warning('只能选择一条流程关联')
return
}
oaSave({
foreign_field:'out_contract_id',
foreign_id:this.row.id,
flow_id:flowsList[0].id
}).then(res=>{
this.$message.success('关联成功')
this.$emit('refresh')
this.isShowOaLinkModal = false
})
},
cancelOa() {
this.isShowOaLinkModal = false
},
// oa
toOaDetail(row) {
this.$emit('oaDetail', row)
},
cellClassName({row,column,rowIndex,columnIndex}){
if(columnIndex===1){
return 'allSelect'
}
},
handleSelectionChange(selectedRows) {
if (selectedRows.length > 1) {
//
this.$refs.oaTable.clearSelection();
this.$refs.oaTable.toggleRowSelection(selectedRows[selectedRows.length - 1]);
}
}
}
}
</script>
<style scoped lang="scss">
.oa-modal {
.search {
display: flex;
align-items: center;
margin-bottom: 10px;
}
}
::v-deep .allSelect .cell {
display: none;
}
</style>

@ -199,6 +199,57 @@
/>
<span style="flex: 1; text-align: right">无需采购流程如水电邮寄费等</span>
</el-form-item>
<!-- 维修的预算计划 -->
<el-form-item v-if="isWeixiu" prop="is_simple" label="预算计划">
<div>
<el-popover placement="right-start" width="660" trigger="hover" v-if="isWeixiu &&weixiuSelection!=''">
<xy-table
v-if="isWeixiu"
:list="weixiuSelectionList"
size="mini"
:table-item="[
...planTable.slice(1),
{
width: 120,
align: 'right',
label: '使用金额(元)',
prop: '_inputMoney',
formatter: (v1, v2, value) =>
`${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ','),
},
]"
:height="100"
style="width: 100%"
row-key="id"
border
:tree-props="{
children: 'notChildren',
hasChildren: 'hasChildren',
}"
>
<template #btns></template>
</xy-table>
<el-button
@click="openOtherPlan"
icon="el-icon-s-order"
size="small"
type="primary"
slot="reference"
>{{weixiuSelection?weixiuSelection:'选择预算计划'}}</el-button
>
</el-popover>
<el-button
v-else
@click="openOtherPlan"
icon="el-icon-s-order"
size="small"
type="primary"
slot="reference"
>选择预算计划</el-button
>
</div>
<!-- <el-input v-model="weixiuyusuan" placeholder="请选择预算计划" @focus=""></el-input> -->
</el-form-item>
<el-form-item v-if="!isOtherFlow" prop="is_trade" label="是否为工会项目">
<el-switch
@ -964,6 +1015,7 @@
</div>
</div>
</div>
<otherPlan ref="otherPlan" @getPlan="getSelectionPlan"></otherPlan>
<!-- <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>
@ -992,18 +1044,21 @@ import { listdeptNoAuth } from '@/api/system/department'
import { deepCopy } from "@/utils";
import listAll from "@/views/contract/contractList.vue"
import otherPlan from "@/components/PlanPicker/otherPlan.vue"
import {
listCommonuser
} from "@/api/common.js";
export default {
components:{
listAll
listAll,otherPlan
},
data() {
return {
showTypes:true,
showEdit:false,
isWeixiu:false,
weixiuSelection:'',
weixiuSelectionList:[],
myPurchaseType: 1, // 1 2
//
flowIds: [{"name":"政府采购流转","id":71,"type":2},{"name":"公务接待","id":86,"type":1},{"name":"会议费用","id":87,"type":1},{"name":"培训费","id":88,"type":1},{"name":"用印","id":76,"type":1},{"name":"仪器设备维修流转","id":84,"type":1},{"name":"请休假","id":68,"type":1},{"name":"仪器设备购置流转","id":82,"type":1},{"name":"安装、维修流转","id":96,"type":1},{"name":"车船维修保养流转","id":97,"type":1}],
@ -1389,6 +1444,27 @@ export default {
};
},
methods: {
//
openOtherPlan(){
this.$refs.otherPlan.isShowPlanModal = true
},
getSelectionPlan(e){
console.log("e",e)
const selections = e
// this.planSelections = e
this.weixiuSelectionList = e
this.weixiuSelection = selections.map(item => item.name).join('');
this.form.money_way_id = Array.from(new Set(selections.map(i => i.type))).toString();
this.form.contract_plan_links = selections.map((i) => ({
plan_id: i.id,
use_money: i._inputMoney,
new_money: i.money,
}));
this.form.plan_price = selections.reduce((a, b) => a + Number(b._inputMoney), 0);
if (selections[0]?.flow_mod_id && !this.form.flow_mod_id) {
this.form.flow_mod_id = selections[0]?.flow_mod_id;
}
},
isSimpleChange(e) {
this.form.money = e ? this.planSelections.reduce((a, b) => a + Number(b._inputMoney), 0) : 0;
},

@ -747,6 +747,7 @@
<addContractLedger ref="addContractLedger" @refresh="getContracts"></addContractLedger>
<!-- oa办理-->
<oaLink ref="oaLink" @createOa="createOa" @oaDetail="oaDetail" @refresh="getContracts"></oaLink>
<Modal
:width="86"
class-name="oa-modal"
@ -784,6 +785,7 @@ import editor from "./components/editorContract";
import detail from "./components/detailContract";
import borrow from "./components/borrowContract";
import borrowList from "./components/borrowList";
import oaLink from "./components/oaLink";
import paymentRegistration from "./components/paymentRegistration";
import contractSign from "@/views/contract/components/contractSign";
@ -807,6 +809,7 @@ export default {
},
components: {
oaLink,
addContractLedger,
editor,
detail,
@ -1729,6 +1732,12 @@ export default {
}
})
},
oaDetail(row){
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=${row.id}`
this.oaUrl = url
this.isShowOaModal = true
},
async toOaDetail (tbname,row) {
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
switch (tbname) {
@ -1743,7 +1752,8 @@ export default {
url += contract?.flow_id
break;
case "other":
url += row.other_flow_id
let other = row.contract_flow_links.find(i => i.custom_model_id === row.flow_mod_id)
url += other[0]?.flow_id
break;
default:
url = `${process.env.VUE_APP_OUT_URL}/flow/list/todo`
@ -1854,8 +1864,33 @@ export default {
}
},
//
async buyProcess(row,type=1) {
//
createOa(row,flow){
console.log("oa",row,flow)
if(flow==='buyProcess'){
this.buyProcess(row,flow)
}else if(flow==='signProcess'){
this.signProcess(row,flow)
}else if(flow==='paying'){
this.paying(row,flow)
}
},
async buyProcess(row,flow) {
// flow
// oa
const hasMatch = this.flowConfig.some(item =>
item.custom_model_id === row.flow_model_id
);
console.log("row,flow",row,flow)
if(!flow){
if(true){
this.$refs.oaLink.row = row
this.$refs.oaLink.flow = 'buyProcess'
this.$refs.oaLink.isShowOaLinkModal = true
return
}
}
let baseInfo = {}
if (row.is_common_purchase) {
baseInfo = {
@ -1888,14 +1923,25 @@ export default {
}
break;
}
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=${row.is_common_purchase ? 99 : row.flow_mod_id}&out_contract_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`;
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&form_canal=contract&module_name=oa&isSinglePage=1&module_id=${row.is_common_purchase ? 99 : row.flow_mod_id}&out_contract_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`;
console.log('url',url)
this.oaUrl = url
this.isShowOaModal = true
},
//
async signProcess(row) {
async signProcess(row,flow) {
// 72
const hasMatch = this.flowConfig.some(item =>
item.custom_model_id === row.flow_model_id
);
if(!flow){
if(hasMatch){
this.$refs.oaLink.row = row
this.$refs.oaLink.flow = 'signProcess'
this.$refs.oaLink.isShowOaLinkModal = true
return
}
}
this.setNowContract(row, "hetong");
let baseInfo = {
"hetongmingcheng": row?.name,
@ -1905,14 +1951,25 @@ export default {
"jiafang": row.supply,
"xiangguanliucheng": [row.contract_flow_links?.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=${window.encodeURIComponent(JSON.stringify(baseInfo))}`;
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&form_canal=contract&module_name=oa&isSinglePage=1&module_id=72&out_contract_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`;
this.oaUrl = url;
this.isShowOaModal = true;
},
//
async paying(row) {
async paying(row,flow) {
// 75
const hasMatch = this.flowConfig.some(item =>
item.custom_model_id === row.flow_model_id
);
if(!flow){
if(hasMatch){
this.$refs.oaLink.row = row
this.$refs.oaLink.flow = 'paying'
this.$refs.oaLink.isShowOaLinkModal = true
return
}
}
let payments = [];
const actNumsTotal = () => {
return payments.reduce((pre,cur) => {
@ -1946,16 +2003,16 @@ export default {
"contractno": contract?.number,
"guanlianliucheng": contract?.contract_flow_links?.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_away_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`;
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&form_canal=contract&module_name=oa&isSinglePage=1&module_id=75&out_away_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`;
this.oaUrl = url;
this.isShowOaModal = true;
this.$router.push('/contract/paymentRegistrationList_1')
},
//
async askProcess(row) {
async askProcess(row,flow) {
let res = await getOatoken();
let url = `${process.env.VUE_APP_OUT_URL}/admin/flow/create/17?auth_token=${this.$store.getters.oa_token}&out_contract_id=${row.id}`;
let url = `${process.env.VUE_APP_OUT_URL}/admin/flow/create/17?auth_token=${this.$store.getters.oa_token}&form_canal=contract&out_contract_id=${row.id}`;
let askProcess = window.open(
url,
"askProcess",

@ -806,7 +806,7 @@ import {listdeptNoAuth} from "@/api/system/department";
if (res.list.data) {
this.plans = res.list.data.map(i => ({
use_money:0,
// use_money: this.paymentRegistrationForm.applyMoney,
// use_money: this.paymentRegistrationForm.applyMoney?this.paymentRegistrationForm.actMoney:0,
...i
})).reduce((accumulator, current) => {
const duplicate = accumulator.find(item => item.id === current.id);
@ -870,6 +870,7 @@ import {listdeptNoAuth} from "@/api/system/department";
toggleSelection(plans) {
if (plans) {
this.plans.filter(plan => {
console.log("this.plans",plans,this.plans,this.paymentRegistrationForm)
// if (plans.includes(plan.pid.toString())) {
// // plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money
// plan.use_money = this.paymentRegistrationForm.applyMoney
@ -881,6 +882,8 @@ import {listdeptNoAuth} from "@/api/system/department";
if (plans.includes(plan.pid)) {
plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money
return true
}else{
plan.use_money = this.paymentRegistrationForm.actMoney
}
// plan.use_money = this.paymentRegistrationForm.applyMoney

Loading…
Cancel
Save