|
@@ -10,7 +10,7 @@
|
|
|
<div class="search-right">
|
|
<div class="search-right">
|
|
|
<div class="search-type" v-for="(item, index) in searchList">
|
|
<div class="search-type" v-for="(item, index) in searchList">
|
|
|
<el-select v-model="item.name" style="margin-right: 20px; width: 200px" disabled>
|
|
<el-select v-model="item.name" style="margin-right: 20px; width: 200px" disabled>
|
|
|
- <el-option value="companyId" label="保险公司"></el-option>
|
|
|
|
|
|
|
+ <el-option value="contactPersonPhone" label="对接人"></el-option>
|
|
|
<el-option value="signDate" label="签单时间"></el-option>
|
|
<el-option value="signDate" label="签单时间"></el-option>
|
|
|
<el-option value="ptlAgreement" label="出单协议"></el-option>
|
|
<el-option value="ptlAgreement" label="出单协议"></el-option>
|
|
|
<el-option value="orderType" label="订单类型"></el-option>
|
|
<el-option value="orderType" label="订单类型"></el-option>
|
|
@@ -32,9 +32,10 @@
|
|
|
<el-option value="不在固定范围" label="不在固定范围"></el-option>
|
|
<el-option value="不在固定范围" label="不在固定范围"></el-option>
|
|
|
<el-option value="为空" label="为空"></el-option>
|
|
<el-option value="为空" label="为空"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
- <el-select class="w-350px" v-if="item.name == 'companyId'" v-model="item.search" placeholder="请选择" clearable
|
|
|
|
|
- filterable :disabled="item.type == '为空'">
|
|
|
|
|
- <el-option v-for="item in companyList" :key="item.id" :value="item.id" :label="item.name"></el-option>
|
|
|
|
|
|
|
+ <el-select class="w-350px" v-if="item.name == 'contactPersonPhone'" v-model="item.search" placeholder="请选择"
|
|
|
|
|
+ clearable filterable :disabled="item.type == '为空'">
|
|
|
|
|
+ <el-option v-for="item in options" :key="item.contactPersonPhone" :value="item.contactPersonPhone"
|
|
|
|
|
+ :label="item.contactPerson"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
<el-date-picker style="width: 350px" v-model="datesearch" v-if="item.name == 'signDate'"
|
|
<el-date-picker style="width: 350px" v-model="datesearch" v-if="item.name == 'signDate'"
|
|
|
:type="item.type == '大于等于' || item.type == '小于等于' ? 'date' : 'daterange'" placeholder="请选择"
|
|
:type="item.type == '大于等于' || item.type == '小于等于' ? 'date' : 'daterange'" placeholder="请选择"
|
|
@@ -160,7 +161,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="actualReceivedAmount" label="实收金额">
|
|
<el-form-item prop="actualReceivedAmount" label="实收金额">
|
|
|
<el-input-number v-model="countForm.actualReceivedAmount" style="width: 100%;" :min="0" :precision="4"
|
|
<el-input-number v-model="countForm.actualReceivedAmount" style="width: 100%;" :min="0" :precision="4"
|
|
|
- controls-position="right" @change="handleChange" />
|
|
|
|
|
|
|
+ controls-position="right" @change="handleChange" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="paymentDifference" label="回款金额">
|
|
<el-form-item prop="paymentDifference" label="回款金额">
|
|
|
<el-input v-model="countForm.paymentDifference" disabled></el-input>
|
|
<el-input v-model="countForm.paymentDifference" disabled></el-input>
|
|
@@ -212,7 +213,7 @@ let router = useRouter()
|
|
|
const CountFormRef = ref<FormInstance>()
|
|
const CountFormRef = ref<FormInstance>()
|
|
|
|
|
|
|
|
const selectedList = ref([])//选中的应收单据
|
|
const selectedList = ref([])//选中的应收单据
|
|
|
-const companyList = ref()//保险公司
|
|
|
|
|
|
|
+const options = ref()//保险公司
|
|
|
const insurerContract = ref()//保险公司协议
|
|
const insurerContract = ref()//保险公司协议
|
|
|
const multipleSearch = ref('')
|
|
const multipleSearch = ref('')
|
|
|
const orderTypesearch = ref('')
|
|
const orderTypesearch = ref('')
|
|
@@ -239,7 +240,7 @@ let imageUrl = ref([])
|
|
|
|
|
|
|
|
//获取保险公司协议
|
|
//获取保险公司协议
|
|
|
const getByCompanyId = () => {
|
|
const getByCompanyId = () => {
|
|
|
- api.dispatchApi.getByCompanyIdt(route.query.id).then((res: any) => {
|
|
|
|
|
|
|
+ api.dispatchApi.getByCompanyIdt(route.query.contactPersonPhone).then((res: any) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
insurerContract.value = res.data
|
|
insurerContract.value = res.data
|
|
|
}
|
|
}
|
|
@@ -250,7 +251,7 @@ const getByCompanyId = () => {
|
|
|
let logicJudge = ref('and')
|
|
let logicJudge = ref('and')
|
|
|
let searchList = ref([
|
|
let searchList = ref([
|
|
|
{
|
|
{
|
|
|
- name: 'companyId',
|
|
|
|
|
|
|
+ name: 'contactPersonPhone',
|
|
|
type: '等于',
|
|
type: '等于',
|
|
|
search: ''
|
|
search: ''
|
|
|
}, {
|
|
}, {
|
|
@@ -271,15 +272,28 @@ let searchList = ref([
|
|
|
search: ''
|
|
search: ''
|
|
|
}
|
|
}
|
|
|
])
|
|
])
|
|
|
|
|
+
|
|
|
|
|
+// 保险公司
|
|
|
|
|
+const initCompany = () => {
|
|
|
|
|
+ api.financeApi.queryReceivableContact({
|
|
|
|
|
+ incomeIds: selectedList.value.map((item: any) => item.id)
|
|
|
|
|
+ }).then((res: any) => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ options.value = res.data
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const showTicket = ref(false)
|
|
const showTicket = ref(false)
|
|
|
-const companyId = ref('')
|
|
|
|
|
-if (route.query?.companyId) {
|
|
|
|
|
|
|
+const contactPersonPhone = ref('')
|
|
|
|
|
+if (route.query?.contactPersonPhone) {
|
|
|
console.log(route.query)
|
|
console.log(route.query)
|
|
|
showTicket.value = true
|
|
showTicket.value = true
|
|
|
selectedList.value = JSON.parse(route.query.selectedList || '[]')
|
|
selectedList.value = JSON.parse(route.query.selectedList || '[]')
|
|
|
- searchList.value[0].search = route.query.companyId || ''
|
|
|
|
|
- companyId.value = route.query.companyId || ''
|
|
|
|
|
|
|
+ searchList.value[0].search = route.query.contactPersonPhone || ''
|
|
|
|
|
+ contactPersonPhone.value = route.query.contactPersonPhone || ''
|
|
|
getByCompanyId()
|
|
getByCompanyId()
|
|
|
|
|
+ initCompany()
|
|
|
} else {
|
|
} else {
|
|
|
showTicket.value = false
|
|
showTicket.value = false
|
|
|
}
|
|
}
|
|
@@ -294,7 +308,7 @@ const handleSearch = () => {
|
|
|
console.log(searchList.value)
|
|
console.log(searchList.value)
|
|
|
// router
|
|
// router
|
|
|
api.financeApi.getSelectedReceivableList({
|
|
api.financeApi.getSelectedReceivableList({
|
|
|
- companyId: route.query.id,
|
|
|
|
|
|
|
+ contactPersonPhone: route.query.contactPersonPhone,
|
|
|
orderNos: selectedList.value.map(item => item.orderNo),
|
|
orderNos: selectedList.value.map(item => item.orderNo),
|
|
|
searchList: searchList.value,
|
|
searchList: searchList.value,
|
|
|
logicJudge: logicJudge.value,
|
|
logicJudge: logicJudge.value,
|
|
@@ -421,12 +435,14 @@ const handelComfirm = (formEl: FormInstance | undefined) => {
|
|
|
formEl.validate((valid) => {
|
|
formEl.validate((valid) => {
|
|
|
console.log(countForm.value)
|
|
console.log(countForm.value)
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+ const contactPersonObj = options.value.find(v => v.contactPersonPhone === contactPersonPhone.value)
|
|
|
api.financeApi.platformSettlement({
|
|
api.financeApi.platformSettlement({
|
|
|
settlementVo: countForm.value,
|
|
settlementVo: countForm.value,
|
|
|
invoicingVo: {
|
|
invoicingVo: {
|
|
|
incomeIds: selectedList.value.map(item => item.id),
|
|
incomeIds: selectedList.value.map(item => item.id),
|
|
|
orderNos: selectedList.value.map(item => item.orderNo),
|
|
orderNos: selectedList.value.map(item => item.orderNo),
|
|
|
- companyId: companyId.value,
|
|
|
|
|
|
|
+ contactPersonPhone: contactPersonPhone.value,
|
|
|
|
|
+ contactPerson: contactPersonObj.contactPerson,
|
|
|
receivablePremium: receivablePremium.value,
|
|
receivablePremium: receivablePremium.value,
|
|
|
invoiceType: "5"
|
|
invoiceType: "5"
|
|
|
}
|
|
}
|
|
@@ -457,20 +473,13 @@ const uploadImage = async (file, fileList) => {
|
|
|
}
|
|
}
|
|
|
const initData = () => {
|
|
const initData = () => {
|
|
|
// router
|
|
// router
|
|
|
- api.financeApi.getSelectedReceivableList({ orderNos: selectedList.value.map(v => v.orderNo), companyId: route.query.id }).then((res: any) => {
|
|
|
|
|
|
|
+ api.financeApi.getSelectedReceivableList({ orderNos: selectedList.value.map(v => v.orderNo), contactPersonPhone: route.query.contactPersonPhone }).then((res: any) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
tableData.value = res.data
|
|
tableData.value = res.data
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-// 保险公司
|
|
|
|
|
-const initCompany = () => {
|
|
|
|
|
- api.insuranceApi.leftList('').then((res: any) => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- companyList.value = res.data
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-}
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const handleChange = async () => {
|
|
const handleChange = async () => {
|
|
|
const num = await calSub(receivablePremium.value, countForm.value.actualReceivedAmount)
|
|
const num = await calSub(receivablePremium.value, countForm.value.actualReceivedAmount)
|
|
@@ -483,15 +492,16 @@ const handleChange = async () => {
|
|
|
* @param subtrahend 减数
|
|
* @param subtrahend 减数
|
|
|
* @returns 差值,若接口无数据则返回 0
|
|
* @returns 差值,若接口无数据则返回 0
|
|
|
*/
|
|
*/
|
|
|
-const calSub = async (minuend:number, subtrahend:number) => {
|
|
|
|
|
|
|
+const calSub = async (minuend: number, subtrahend: number) => {
|
|
|
const res = await api.financeApi.calSub({ minuend, subtrahend })
|
|
const res = await api.financeApi.calSub({ minuend, subtrahend })
|
|
|
return res.data || 0
|
|
return res.data || 0
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const openSettlement = (list,id) => {
|
|
|
|
|
- companyId.value = id
|
|
|
|
|
|
|
+const openSettlement = (list, id) => {
|
|
|
|
|
+ contactPersonPhone.value = id
|
|
|
selectedList.value = list
|
|
selectedList.value = list
|
|
|
handleSettlement()
|
|
handleSettlement()
|
|
|
|
|
+ initCompany()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
defineExpose({
|
|
defineExpose({
|
|
@@ -500,7 +510,6 @@ defineExpose({
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
initData()
|
|
initData()
|
|
|
- initCompany()
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|