|
|
@ -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) {
|
|
|
|