修改合同,关联发票回选

main-20240105
gongzeliang 8 months ago
parent bafab64758
commit 6ee9616fe1

@ -0,0 +1,10 @@
import request from '@/plugin/axios'
// 创建预算管理
export function getCustomerContractTypeListAll(query) {
return request({
url: '/bs/contract-type/listAll',
method: 'get',
params: query
})
}

@ -0,0 +1,53 @@
import request from '@/plugin/axios'
// 创建项目管理
export function createProject(data) {
return request({
url: '/bs/project/create',
method: 'post',
data: data
})
}
// 更新项目管理
export function updateProject(data) {
return request({
url: '/bs/project/update',
method: 'put',
data: data
})
}
// 删除项目管理
export function deleteProject(id) {
return request({
url: '/bs/project/delete?id=' + id,
method: 'delete'
})
}
// 获得项目管理
export function getProject(id) {
return request({
url: '/bs/project/get?id=' + id,
method: 'get'
})
}
// 获得项目管理分页
export function getProjectPage(query) {
return request({
url: '/bs/project/page',
method: 'get',
params: query
})
}
// 导出项目管理 Excel
export function exportProjectExcel(query) {
return request({
url: '/bs/project/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

@ -569,15 +569,15 @@ export default {
// let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('') // let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('')
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceIds', arr) this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceIds', arr)
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'show', false) this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'show', false)
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceName', '以关联发票,请点击查看')
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceCount', this.totalCount(arr)) this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceCount', this.totalCount(arr))
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceName', this.totalName(arr))
}, },
handleConfirmIe1(arr, nIndex) { handleConfirmIe1(arr, nIndex) {
// let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('') // let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('')
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceIds', arr) this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceIds', arr)
this.$set(this.form.expenseClaimDetails[nIndex], 'show', false) this.$set(this.form.expenseClaimDetails[nIndex], 'show', false)
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceName', '以关联发票,请点击查看')
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceCount', this.totalCount(arr)) this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceCount', this.totalCount(arr))
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceName', this.totalName(arr))
}, },
totalCount(obj) { totalCount(obj) {
@ -590,6 +590,17 @@ export default {
} }
return count; return count;
}, },
totalName(obj) {
let count = '';
for (let key in obj) {
if (Array.isArray(obj[key])) {
obj[key].forEach(function (item){
count = !count?item:count+ `${item}`
})
}
}
return count;
},
handleAddAccount(pIndex, index) { handleAddAccount(pIndex, index) {
this.form.expenseClaimTrips[pIndex].expenseClaimDetails.push({ this.form.expenseClaimTrips[pIndex].expenseClaimDetails.push({

@ -7,15 +7,13 @@
<div class="item-box"> <div class="item-box">
<van-field v-model="form.contractNumber" :disabled="['edit','show'].includes(this.$route.query.type)" @blur="handleCtBlur" placeholder="请输入" :rules="[{ required: true, message: '请输入' }]" required label="合同编号" clear-trigger="always" input-align="right" /> <van-field v-model="form.contractNumber" :disabled="['edit','show'].includes(this.$route.query.type)" @blur="handleCtBlur" placeholder="请输入" :rules="[{ required: true, message: '请输入' }]" required label="合同编号" clear-trigger="always" input-align="right" />
<van-field v-model="form.contractName" required placeholder="请输入" :disabled="disabled" :rules="[{ required: true, message: '请输入' }]" label="合同名称" clear-trigger="always" input-align="right" /> <van-field v-model="form.contractName" required placeholder="请输入" :disabled="disabled" :rules="[{ required: true, message: '请输入' }]" label="合同名称" clear-trigger="always" input-align="right" />
<van-field :value="form.time" label="合同起止时间" :disabled="disabled ||oaListIsDisabled " :class="disabled ? 'actived-disabled':''" placeholder="请选择" required :rules="[{ required: true, message: '请选择' }]" @click="handleDateShow()" :right-icon="form.time ? '' :'arrow' " input-align="right" readonly autosize rows="1" type="textarea"> <van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled ||oaListIsDisabled" :class="form.startTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startTime1" @click="handleDateShow('startTime')" label="合同开始时间" clear-trigger="always" input-align="right" />
<!-- <template v-if="form.time && !disabled" #button> <van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled ||oaListIsDisabled" :class="form.endTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.endTime1" @click="handleDateShow('endTime')" label="合同结束时间" clear-trigger="always" input-align="right" />
<van-icon name="clear" color="#C8C9CC" size="16" @click.stop="handleClear()" />
</template> -->
</van-field>
<RePick v-model="form.customerCompanyId" :disabled="disabled ||oaListIsDisabled " titleKey="companyName" idKey="id" label="客户名称" name="customerCompanyId" :list="supplierList" isRequrie isCell clearable /> <RePick v-model="form.customerCompanyId" :disabled="disabled ||oaListIsDisabled " titleKey="companyName" idKey="id" label="客户名称" name="customerCompanyId" :list="supplierList" isRequrie isCell clearable />
<RePick v-model="form.departmentId" :disabled="disabled" label="签约部门" @change="handleChange" :name="`departmentId`" :list="userDeptTree" isRequrie isCascader isShowSearch title="签约部门" titleKey="name" isCell clearable /> <RePick v-model="form.departmentId" :disabled="disabled" label="签约部门" @change="handleChange" :name="`departmentId`" :list="userDeptTree" isRequrie isCascader isShowSearch title="签约部门" titleKey="name" isCell clearable />
<RePick v-model="form.signatoryId" :disabled="disabled" titleKey="nickname" idKey="id" label="签约人员" name="signatoryId" :list="signatoryList" isRequrie isCell clearable /> <RePick v-model="form.signatoryId" :disabled="disabled" titleKey="nickname" idKey="id" label="签约人员" name="signatoryId" :list="signatoryList" isRequrie isCell clearable />
<RePick v-model="form.contractType" :disabled="disabled" titleKey="label" idKey="value" label="合同类型" name="contractType" :list="typeList" isRequrie isCell clearable /> <RePick v-model="form.contractType" :disabled="disabled" titleKey="contractName" idKey="id" label="合同类型" name="contractType" :list="typeList" isRequrie isCell clearable />
<RePick v-model="form.projectId" :disabled="disabled" titleKey="projectName" idKey="id" label="所属项目" name="contractType" :list="projectList" isRequrie isCell clearable />
<van-field v-model="form.amount" :disabled="disabled ||oaListIsDisabled " type="number" name="amount" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="合同总金额" /> <van-field v-model="form.amount" :disabled="disabled ||oaListIsDisabled " type="number" name="amount" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="合同总金额" />
<van-field label="是否收款" required name="isCollect" :disabled="disabled" input-align="right" :rules="[{ required:true, message: '请选择' }]" label-width="9em"> <van-field label="是否收款" required name="isCollect" :disabled="disabled" input-align="right" :rules="[{ required:true, message: '请选择' }]" label-width="9em">
<template #input> <template #input>
@ -27,6 +25,15 @@
</van-field> </van-field>
<van-field v-model="form.managerPhone" :disabled="disabled" name="managerPhone" type="number" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.rePhone }]" label="经办人电话" /> <van-field v-model="form.managerPhone" :disabled="disabled" name="managerPhone" type="number" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.rePhone }]" label="经办人电话" />
<!-- <van-field v-model="form.receivedAmount" :disabled="disabled" name="receivedAmount" type="number" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="付款金额" /> --> <!-- <van-field v-model="form.receivedAmount" :disabled="disabled" name="receivedAmount" type="number" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="付款金额" /> -->
<RePick v-model="form.capitalSource" :disabled="disabled" titleKey="label" idKey="value" label="资金来源" name="capitalSource" :list="capitalSource" isCell clearable />
<van-field v-model="form.proposerPerson" :disabled="disabled" name="proposerPerson" type="number" placeholder="请输入" input-align="right" label="申请人" />
<van-field v-model="form.taxAmount" :disabled="disabled" name="taxAmount" type="number" placeholder="请输入" input-align="right" label="合同金额(含税)" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled" :class="form.proposerTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.proposerTime1" @click="handleDateShow('proposerTime')" label="申请时间" clear-trigger="always" input-align="right" />
<van-field v-model="form.taxForeheads" :disabled="disabled" name="taxForeheads" type="number" placeholder="请输入" input-align="right" label="税额" />
<van-field v-model="form.taxRate" :disabled="disabled" name="taxRate" type="number" placeholder="请输入" input-align="right" label="税率" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled" :class="form.dateSigning ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.dateSigning1" @click="handleDateShow('dateSigning')" label="签订时间" clear-trigger="always" input-align="right" />
<van-field v-model="form.other" :disabled="disabled" name="reason" autosize rows="2" label="合同描述" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" /> <van-field v-model="form.other" :disabled="disabled" name="reason" autosize rows="2" label="合同描述" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" />
</div> </div>
</div> </div>
@ -50,11 +57,15 @@
<van-icon name="delete-o" size="20" :color="`${disabled || oaListIsDisabled ? '#c8c9cc' : ''}`" /> <van-icon name="delete-o" size="20" :color="`${disabled || oaListIsDisabled ? '#c8c9cc' : ''}`" />
</div> </div>
</div> </div>
<van-field v-model="item.planTime" label="预计收款时间" :disabled="disabled || oaListIsDisabled" :class="disabled ? 'actived-disabled':''" placeholder="请选择" @click="handlePDateShow(item.planTime,index)" :right-icon="item.planTime ? '' :'arrow' " input-align="right" readonly autosize rows="1" type="textarea"> <van-field v-model="item.planTime" label="计划付款时间" :disabled="disabled || oaListIsDisabled" :class="disabled ? 'actived-disabled':''" placeholder="请选择" @click="handlePDateShow(item.planTime,index)" :right-icon="item.planTime ? '' :'arrow' " input-align="right" readonly autosize rows="1" type="textarea">
</van-field>
<van-field v-model="item.planName" label="计划名称" :disabled="disabled || oaListIsDisabled" name="planName" placeholder="请输入" input-align="right">
</van-field> </van-field>
<van-field v-model="item.percentage" label="比例(数字)" :disabled="disabled || oaListIsDisabled" @blur="handleBulrPe($event,index)" name="percentage" type="number" placeholder="请输入" input-align="right"> <van-field v-model="item.percentage" label="比例(数字)" :disabled="disabled || oaListIsDisabled" @blur="handleBulrPe($event,index)" name="percentage" type="number" placeholder="请输入" input-align="right">
</van-field> </van-field>
<van-field v-model="item.actualAmount" name="actualAmount" :disabled="disabled || oaListIsDisabled" type="number" placeholder="请输入" input-align="right" label="实付金额" /> <van-field v-model="item.actualAmount" name="actualAmount" :disabled="disabled || oaListIsDisabled" type="number" placeholder="请输入" input-align="right" label="实付金额" />
<van-field v-model="item.planMemo" label="备注" :disabled="disabled || oaListIsDisabled" name="planMemo" placeholder="请输入" input-align="right">
</van-field>
</div> </div>
</div> </div>
<div class="section mt5" v-if="['show'].includes(typeStr)"> <span class="line"> </span>审批流程</div> <div class="section mt5" v-if="['show'].includes(typeStr)"> <span class="line"> </span>审批流程</div>
@ -65,7 +76,7 @@
<BottomBtn ref="BottomBtn" :isAuthorised="isAuthorised" @onBtConfirm="handleBtConfirm" :accessId="accessId" /> <BottomBtn ref="BottomBtn" :isAuthorised="isAuthorised" @onBtConfirm="handleBtConfirm" :accessId="accessId" />
<!--行程时间范围选择 --> <!--行程时间范围选择 -->
<van-calendar ref="vanCalendar" allow-same-day :maxDate="maxDate" v-model="dateShow" :min-date="minDate" :default-date="defaultDate" type="range" color="#0088FE" @confirm="handleDateSelect" /> <van-calendar ref="vanCalendar" allow-same-day :maxDate="maxDate" v-model="dateShow" :min-date="minDate" :default-date="defaultDate" color="#0088FE" @confirm="handleDateSelect" />
<!--预计付款时间选择 --> <!--预计付款时间选择 -->
<van-calendar ref="pVanCalendar" allow-same-day :maxDate="maxDate" v-model="palnTimeShow" :min-date="minDate" :default-date="pDefaultDate" color="#0088FE" @confirm="handlePlanDateSelect" /> <van-calendar ref="pVanCalendar" allow-same-day :maxDate="maxDate" v-model="palnTimeShow" :min-date="minDate" :default-date="pDefaultDate" color="#0088FE" @confirm="handlePlanDateSelect" />
@ -82,6 +93,8 @@ import {
listUser, listUser,
} from "@/api/system/user"; } from "@/api/system/user";
import { Dialog } from 'vant' import { Dialog } from 'vant'
import {getCustomerContractTypeListAll} from "@/api/bs/contractType";
import {getProjectPage} from "@/api/bs/project";
export default { export default {
//import使 //import使
name: 'contract-custom', name: 'contract-custom',
@ -129,6 +142,8 @@ export default {
isRereset: false, isRereset: false,
VerifyFunc, VerifyFunc,
typeList: [], typeList: [],
projectList:[],
capitalSource:[],
signatoryList: [], signatoryList: [],
departmentList: [], departmentList: [],
dayjs, dayjs,
@ -508,34 +523,52 @@ export default {
this.supplierList = res.data.list || [] this.supplierList = res.data.list || []
console.log('supplierList...', this.supplierList); console.log('supplierList...', this.supplierList);
}) })
getCustomerContractTypeListAll({
type: 1
}).then((res) => {
this.typeList = res.data || []
})
getProjectPage({type:1,pageNo: 1,
pageSize: 500}).then(res=>{
this.projectList = res.data.list || []
})
listData({ listData({
pageNo: 1, pageNo: 1,
pageSize: this.$store.getters.requestPageSize, pageSize: 50,
dictType: 'supplier_ct_type', dictType: "capital_source",
}).then((res) => { }).then((res) => {
// this.capitalSource = res.data.list || [];
this.typeList = res.data.list || [] });
})
}, },
handleDateShow() { handleDateShow(dateType) {
if (this.disabled) return if (this.disabled) return
this.dateType = dateType
this.$nextTick(() => { this.$nextTick(() => {
let date = dateType == 'dateSigning'?this.form.dateSigning:dateType=='proposerTime'?this.form.proposerTime:dateType=='startTime'?this.form.startTime:dateType=='endTime'?this.form.endTime:''
this.$refs.vanCalendar && this.$refs.vanCalendar.reset() this.$refs.vanCalendar && this.$refs.vanCalendar.reset()
this.dateShow = true this.dateShow = true
if (this.form.startTime && this.form.endTime) { if (date) {
this.defaultDate = [dayjs(this.form.startTime).toDate(), dayjs(this.form.endTime).toDate()] let time = dayjs(Number(date)).format('YYYY/MM/DD');
this.defaultDate = new Date(time)
} }
}) })
}, },
handleDateSelect(list) { handleDateSelect(val) {
if (list && list.length) { if(this.dateType == 'dateSigning'){
this.$set(this.form, 'time', `${dayjs(list[0]).format('YY/MM/DD')}~${dayjs(list[1]).format('YY/MM/DD')}`) this.$set(this.form, 'dateSigning1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startTime', dayjs(list[0]).valueOf()) this.$set(this.form, 'dateSigning', `${dayjs(val).valueOf()}`)
this.$set(this.form, 'endTime', dayjs(list[1]).valueOf()) }
} else { if(this.dateType == 'proposerTime'){
this.$set(this.form, 'time', null) this.$set(this.form, 'proposerTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startTime', null) this.$set(this.form, 'proposerTime', `${dayjs(val).valueOf()}`)
this.$set(this.form, 'endTime', null) }
if(this.dateType == 'startTime'){
this.$set(this.form, 'startTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startTime', `${dayjs(val).valueOf()}`)
}
if(this.dateType == 'endTime'){
this.$set(this.form, 'endTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'endTime', `${dayjs(val).valueOf()}`)
} }
this.dateShow = false this.dateShow = false
}, },

@ -7,12 +7,15 @@
<div class="item-box"> <div class="item-box">
<van-field v-model="form.contractNumber" @blur="handleCtBlur" placeholder="请输入" :disabled="['edit','show'].includes(this.$route.query.type)" :rules="[{ required: true, message: '请输入' }]" required label="合同编号" clear-trigger="always" input-align="right" /> <van-field v-model="form.contractNumber" @blur="handleCtBlur" placeholder="请输入" :disabled="['edit','show'].includes(this.$route.query.type)" :rules="[{ required: true, message: '请输入' }]" required label="合同编号" clear-trigger="always" input-align="right" />
<van-field v-model="form.contractName" required placeholder="请输入" :disabled="disabled" :rules="[{ required: true, message: '请输入' }]" label="合同名称" clear-trigger="always" input-align="right" /> <van-field v-model="form.contractName" required placeholder="请输入" :disabled="disabled" :rules="[{ required: true, message: '请输入' }]" label="合同名称" clear-trigger="always" input-align="right" />
<van-field :value="form.time" label="合同起止时间" :disabled="disabled ||oaListIsDisabled " :class="disabled ? 'actived-disabled':''" placeholder="请选择" required :rules="[{ required: true, message: '请选择' }]" @click="handleDateShow(1)" :right-icon="form.time ? '' :'arrow' " input-align="right" readonly autosize rows="1" type="textarea"> <!-- <van-field :value="form.time" label="合同起止时间" :disabled="disabled ||oaListIsDisabled " :class="disabled ? 'actived-disabled':''" placeholder="请选择" required :rules="[{ required: true, message: '请选择' }]" @click="handleDateShow(1)" :right-icon="form.time ? '' :'arrow' " input-align="right" readonly autosize rows="1" type="textarea">-->
</van-field> <!-- </van-field>-->
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled ||oaListIsDisabled" :class="form.startTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startTime1" @click="handleDateShow('startTime')" label="合同开始时间" clear-trigger="always" input-align="right" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled ||oaListIsDisabled" :class="form.endTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.endTime1" @click="handleDateShow('endTime')" label="合同结束时间" clear-trigger="always" input-align="right" />
<RePick v-model="form.supplierId" :disabled="disabled ||oaListIsDisabled " titleKey="companyAme" idKey="id" label="供应商名称" name="supplierId" :list="supplierList" isRequrie isCell clearable /> <RePick v-model="form.supplierId" :disabled="disabled ||oaListIsDisabled " titleKey="companyAme" idKey="id" label="供应商名称" name="supplierId" :list="supplierList" isRequrie isCell clearable />
<RePick v-model="form.departmentId" :disabled="disabled" label="签约部门" @change="handleChange" :name="`departmentId`" :list="userDeptTree" isRequrie isCascader isShowSearch title="签约部门" titleKey="name" isCell clearable /> <RePick v-model="form.departmentId" :disabled="disabled" label="签约部门" @change="handleChange" :name="`departmentId`" :list="userDeptTree" isRequrie isCascader isShowSearch title="签约部门" titleKey="name" isCell clearable />
<RePick v-model="form.signatoryId" :disabled="disabled" titleKey="nickname" idKey="id" label="签约人员" name="signatoryId" :list="signatoryList" isRequrie isCell clearable /> <RePick v-model="form.signatoryId" :disabled="disabled" titleKey="nickname" idKey="id" label="签约人员" name="signatoryId" :list="signatoryList" isRequrie isCell clearable />
<RePick v-model="form.contractType" :disabled="disabled" titleKey="label" idKey="value" label="合同类型" name="contractType" :list="typeList" isRequrie isCell clearable /> <RePick v-model="form.contractType" :disabled="disabled" titleKey="contractName" idKey="id" label="合同类型" name="contractType" :list="typeList" isRequrie isCell clearable />
<RePick v-model="form.projectId" :disabled="disabled" titleKey="projectName" idKey="id" label="所属项目" name="contractType" :list="projectList" isRequrie isCell clearable />
<van-field v-model="form.amount" :disabled="disabled" type=" number" name="amount" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="合同总金额" /> <van-field v-model="form.amount" :disabled="disabled" type=" number" name="amount" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="合同总金额" />
<van-field label="是否收票" required name="isCollect" :disabled="disabled" input-align="right" :rules="[{ required:true, message: '请选择' }]" label-width="9em"> <van-field label="是否收票" required name="isCollect" :disabled="disabled" input-align="right" :rules="[{ required:true, message: '请选择' }]" label-width="9em">
<template #input> <template #input>
@ -24,7 +27,14 @@
</van-field> </van-field>
<van-field v-model="form.managerPhone" :disabled="disabled" name="managerPhone" type="number" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.rePhone }]" label="经办人电话" /> <van-field v-model="form.managerPhone" :disabled="disabled" name="managerPhone" type="number" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.rePhone }]" label="经办人电话" />
<van-field v-model="form.dealContent" :disabled="disabled" name="reason" autosize rows="2" label="交易内容" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" /> <van-field v-model="form.dealContent" :disabled="disabled" name="reason" autosize rows="2" label="交易内容" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" />
<van-field v-model="form.other" :disabled="disabled" name="reason" autosize rows="2" label="其他" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" /> <RePick v-model="form.capitalSource" :disabled="disabled" titleKey="label" idKey="value" label="资金来源" name="capitalSource" :list="capitalSource" isCell clearable />
<van-field v-model="form.proposerPerson" :disabled="disabled" name="proposerPerson" type="number" placeholder="请输入" input-align="right" label="申请人" />
<van-field v-model="form.taxAmount" :disabled="disabled" name="taxAmount" type="number" placeholder="请输入" input-align="right" label="合同金额(含税)" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled" :class="form.proposerTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.proposerTime1" @click="handleDateShow('proposerTime')" label="申请时间" clear-trigger="always" input-align="right" />
<van-field v-model="form.taxForeheads" :disabled="disabled" name="taxForeheads" type="number" placeholder="请输入" input-align="right" label="税额" />
<van-field v-model="form.taxRate" :disabled="disabled" name="taxRate" type="number" placeholder="请输入" input-align="right" label="税率" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled" :class="form.dateSigning ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.dateSigning1" @click="handleDateShow('dateSigning')" label="签订时间" clear-trigger="always" input-align="right" />
<van-field v-model="form.other" :disabled="disabled" name="reason" autosize rows="2" label="合同简述" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" />
</div> </div>
</div> </div>
<div class="section mt5"> <span class="line"> </span>附件</div> <div class="section mt5"> <span class="line"> </span>附件</div>
@ -47,11 +57,15 @@
<van-icon name="delete-o" size="20" :color="`${disabled || oaListIsDisabled ? '#c8c9cc' : ''}`" /> <van-icon name="delete-o" size="20" :color="`${disabled || oaListIsDisabled ? '#c8c9cc' : ''}`" />
</div> </div>
</div> </div>
<van-field v-model="item.planTime" label="预计付款时间" :disabled="disabled || oaListIsDisabled" :class="disabled ? 'actived-disabled':''" placeholder="请选择" @click="handlePDateShow(item.planTime,index)" :right-icon="item.planTime ? '' :'arrow' " input-align="right" readonly autosize rows="1" type="textarea"> <van-field v-model="item.planTime" label="计划付款时间" :disabled="disabled || oaListIsDisabled" :class="disabled ? 'actived-disabled':''" placeholder="请选择" @click="handlePDateShow(item.planTime,index)" :right-icon="item.planTime ? '' :'arrow' " input-align="right" readonly autosize rows="1" type="textarea">
</van-field>
<van-field v-model="item.planName" label="计划名称" :disabled="disabled || oaListIsDisabled" name="planName" placeholder="请输入" input-align="right">
</van-field> </van-field>
<van-field v-model="item.percentage" label="比例(数字)" :disabled="disabled || oaListIsDisabled" @blur="handleBulrPe($event,index)" name="percentage" type="number" placeholder="请输入" input-align="right"> <van-field v-model="item.percentage" label="比例(数字)" :disabled="disabled || oaListIsDisabled" @blur="handleBulrPe($event,index)" name="percentage" type="number" placeholder="请输入" input-align="right">
</van-field> </van-field>
<van-field v-model="item.actualAmount" name="actualAmount" :disabled="disabled || oaListIsDisabled" type="number" placeholder="请输入" input-align="right" label="实付金额" /> <van-field v-model="item.actualAmount" name="actualAmount" :disabled="disabled || oaListIsDisabled" type="number" placeholder="请输入" input-align="right" label="实付金额" />
<van-field v-model="item.planMemo" label="备注" :disabled="disabled || oaListIsDisabled" name="planMemo" placeholder="请输入" input-align="right">
</van-field>
</div> </div>
</div> </div>
<div class="section mt5" v-if="['show'].includes(typeStr)"> <span class="line"> </span>审批流程</div> <div class="section mt5" v-if="['show'].includes(typeStr)"> <span class="line"> </span>审批流程</div>
@ -61,7 +75,7 @@
<BottomBtn ref="BottomBtn" :isAuthorised="isAuthorised" @onBtConfirm="handleBtConfirm" :accessId="accessId" /> <BottomBtn ref="BottomBtn" :isAuthorised="isAuthorised" @onBtConfirm="handleBtConfirm" :accessId="accessId" />
<!--行程时间范围选择 --> <!--行程时间范围选择 -->
<van-calendar ref="vanCalendar" allow-same-day :maxDate="maxDate" v-model="dateShow" :min-date="minDate" :default-date="defaultDate" type="range" color="#0088FE" @confirm="handleDateSelect" /> <van-calendar ref="vanCalendar" allow-same-day :maxDate="maxDate" v-model="dateShow" :min-date="minDate" :default-date="defaultDate" color="#0088FE" @confirm="handleDateSelect" />
<!--预计付款时间选择 --> <!--预计付款时间选择 -->
<van-calendar ref="pVanCalendar" allow-same-day :maxDate="maxDate" v-model="palnTimeShow" :min-date="minDate" :default-date="pDefaultDate" color="#0088FE" @confirm="handlePlanDateSelect" /> <van-calendar ref="pVanCalendar" allow-same-day :maxDate="maxDate" v-model="palnTimeShow" :min-date="minDate" :default-date="pDefaultDate" color="#0088FE" @confirm="handlePlanDateSelect" />
@ -79,6 +93,8 @@ import { Dialog } from 'vant'
import { import {
listUser, listUser,
} from "@/api/system/user"; } from "@/api/system/user";
import { getCustomerContractTypeListAll } from '@/api/bs/contractType'
import {getProjectPage} from "@/api/bs/project";
export default { export default {
//import使 //import使
name: 'contract-supplier', name: 'contract-supplier',
@ -129,6 +145,8 @@ export default {
isRereset: false, isRereset: false,
VerifyFunc, VerifyFunc,
typeList: [], typeList: [],
capitalSource:[],
projectList:[],
signatoryList: [], signatoryList: [],
departmentList: [], departmentList: [],
dayjs, dayjs,
@ -156,7 +174,8 @@ export default {
dealContent: null, dealContent: null,
other: null, other: null,
}, },
oaReimburseFeeitemList: [] oaReimburseFeeitemList: [],
dateType:''
}; };
}, },
@ -501,23 +520,34 @@ export default {
this.supplierList = res.data.list || [] this.supplierList = res.data.list || []
resolve() resolve()
}) })
getCustomerContractTypeListAll({
type: 2
}).then((res) => {
this.typeList = res.data || []
})
getProjectPage({type:2,pageNo: 1,
pageSize: 500}).then(res=>{
this.projectList = res.data.list || []
})
listData({ listData({
pageNo: 1, pageNo: 1,
pageSize: this.$store.getters.requestPageSize, pageSize: 50,
dictType: 'supplier_ct_type', dictType: "capital_source",
}).then((res) => { }).then((res) => {
// this.capitalSource = res.data.list || [];
this.typeList = res.data.list || [] });
})
}) })
}, },
handleDateShow() { handleDateShow(dateType) {
if (this.disabled) return if (this.disabled) return
this.dateType = dateType
this.$nextTick(() => { this.$nextTick(() => {
let date = dateType == 'dateSigning'?this.form.dateSigning:dateType=='proposerTime'?this.form.proposerTime:dateType=='startTime'?this.form.startTime:dateType=='endTime'?this.form.endTime:''
this.$refs.vanCalendar && this.$refs.vanCalendar.reset() this.$refs.vanCalendar && this.$refs.vanCalendar.reset()
this.dateShow = true this.dateShow = true
if (this.form.startTime && this.form.endTime) { if (date) {
this.defaultDate = [dayjs(this.form.startTime).toDate(), dayjs(this.form.endTime).toDate()] let time = dayjs(Number(date)).format('YYYY/MM/DD');
this.defaultDate = new Date(time)
} }
}) })
}, },
@ -532,16 +562,33 @@ export default {
} }
}) })
}, },
handleDateSelect(list) { handleDateSelect(val) {
if (list && list.length) { if(this.dateType == 'dateSigning'){
this.$set(this.form, 'time', `${dayjs(list[0]).format('YY/MM/DD')}~${dayjs(list[1]).format('YY/MM/DD')}`) this.$set(this.form, 'dateSigning1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startTime', dayjs(list[0]).valueOf()) this.$set(this.form, 'dateSigning', `${dayjs(val).valueOf()}`)
this.$set(this.form, 'endTime', dayjs(list[1]).valueOf()) }
} else { if(this.dateType == 'proposerTime'){
this.$set(this.form, 'time', null) this.$set(this.form, 'proposerTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startTime', null) this.$set(this.form, 'proposerTime', `${dayjs(val).valueOf()}`)
this.$set(this.form, 'endTime', null)
} }
if(this.dateType == 'startTime'){
this.$set(this.form, 'startTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startTime', `${dayjs(val).valueOf()}`)
}
if(this.dateType == 'endTime'){
this.$set(this.form, 'endTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'endTime', `${dayjs(val).valueOf()}`)
}
// if (list && list.length) {
// this.$set(this.form, 'time', `${dayjs(list[0]).format('YY/MM/DD')}~${dayjs(list[1]).format('YY/MM/DD')}`)
// this.$set(this.form, 'startTime', dayjs(list[0]).valueOf())
// this.$set(this.form, 'endTime', dayjs(list[1]).valueOf())
// } else {
// this.$set(this.form, 'time', null)
// this.$set(this.form, 'startTime', null)
// this.$set(this.form, 'endTime', null)
// }
this.dateShow = false this.dateShow = false
}, },
handlePlanDateSelect(date) { handlePlanDateSelect(date) {

Loading…
Cancel
Save