Browse Source

Merge branch 'dev' of http://39.101.143.165:8090/dong_k/tenant-Platform into dev

@dongkboy 2 months ago
parent
commit
322db69e44
2 changed files with 14 additions and 16 deletions
  1. 1 1
      src/views/platform/index.vue
  2. 13 15
      src/views/platform/ticket.vue

+ 1 - 1
src/views/platform/index.vue

@@ -210,7 +210,7 @@
           <el-table-column label="操作" width="180" fixed="right">
             <template #default="scope">
               <el-button link type="primary" :disabled="scope.row.settlementStatusName == '已结算'"
-                @click="ticketRef.openSettlement([scope.row], scope.row.contactPersonPhone)">结算</el-button>
+                @click="ticketRef.openSettlement([scope.row], scope.row.contactPerson)">结算</el-button>
               <el-button link type="primary" @click="toEdit(scope.row)">编辑</el-button>
               <el-button link type="primary" :disabled="scope.row.settlementStatusName == '已结算'"
                 @click="toDelete([scope.row.id])">删除</el-button>

+ 13 - 15
src/views/platform/ticket.vue

@@ -10,7 +10,7 @@
       <div class="search-right">
         <div class="search-type" v-for="(item, index) in searchList">
           <el-select v-model="item.name" style="margin-right: 20px; width: 200px" disabled>
-            <el-option value="contactPersonPhone" label="对接人"></el-option>
+            <el-option value="contactPerson" label="对接人"></el-option>
             <el-option value="signDate" label="签单时间"></el-option>
             <el-option value="ptlAgreement" label="出单协议"></el-option>
             <el-option value="orderType" label="订单类型"></el-option>
@@ -32,9 +32,9 @@
             <el-option value="不在固定范围" label="不在固定范围"></el-option>
             <el-option value="为空" label="为空"></el-option>
           </el-select>
-          <el-select class="w-350px" v-if="item.name == 'contactPersonPhone'" v-model="item.search" placeholder="请选择"
+          <el-select class="w-350px" v-if="item.name == 'contactPerson'" v-model="item.search" placeholder="请选择"
             clearable :disabled="item.type == '为空'">
-            <el-option v-for="item in options" :key="item.contactPersonPhone" :value="item.contactPersonPhone"
+            <el-option v-for="item in options" :key="item.contactPerson" :value="item.contactPerson"
               :label="item.contactPerson"></el-option>
           </el-select>
           <el-date-picker style="width: 350px" v-model="datesearch" v-if="item.name == 'signDate'"
@@ -267,7 +267,7 @@ let imageUrl = ref([])
 
 //获取保险公司协议
 const getByCompanyId = () => {
-  api.dispatchApi.getByCompanyIdt(route.query.contactPersonPhone).then((res: any) => {
+  api.dispatchApi.getByCompanyIdt(route.query.contactPerson).then((res: any) => {
     if (res.code == 200) {
       insurerContract.value = res.data
     }
@@ -277,7 +277,6 @@ const getByCompanyId = () => {
 
 const initData = () => {
   // router
-  if (selectedList.value.length < 1) return
   api.financeApi.getSelectedReceivableList({ orderNos: selectedList.value.map(v => v.orderNo), searchList: searchList.value, logicJudge: logicJudge.value, }).then((res: any) => {
     if (res.code == 200) {
       tableData.value = res.data
@@ -289,7 +288,7 @@ const initData = () => {
 let logicJudge = ref('and')
 let searchList = ref([
   {
-    name: 'contactPersonPhone',
+    name: 'contactPerson',
     type: '等于',
     search: ''
   }, {
@@ -323,12 +322,12 @@ const initCompany = () => {
 }
 
 const showTicket = ref(false)
-const contactPersonPhone = ref('')
+const contactPerson = ref('')
 if (route.query?.invoiceType) {
   showTicket.value = true
   selectedList.value = JSON.parse(route.query.selectedList || '[]')
-  searchList.value[0].search = route.query.contactPersonPhone || ''
-  contactPersonPhone.value = route.query.contactPersonPhone || ''
+  searchList.value[0].search = route.query.contactPerson || ''
+  contactPerson.value = route.query.contactPerson || ''
   getByCompanyId()
   initData()
 } else {
@@ -527,14 +526,14 @@ const handelComfirm = (formEl: FormInstance | undefined) => {
     if (valid) {
       let contactPersonObj = {}
       if (options.value) {
-        contactPersonObj = options.value.find(v => v.contactPersonPhone === contactPersonPhone.value)
+        contactPersonObj = options.value.find(v => v.contactPerson === contactPerson.value)
       }
       api.financeApi.platformSettlement({
         settlementVo: countForm.value,
         invoicingVo: {
           incomeIds: tableData.value.map(item => item.id),
           orderNos: tableData.value.map(item => item.orderNo),
-          contactPersonPhone: contactPersonPhone.value,
+          contactPerson: contactPerson.value,
           contactPerson: contactPersonObj.contactPerson || '',
           receivablePremium: receivablePremium.value,
           invoiceType: "5"
@@ -592,9 +591,8 @@ const calSub = async (minuend: number = 0, subtrahend: number) => {
   return res.data || 0
 }
 
-const openSettlement = (list, id) => {
-  console.log(list, id)
-  contactPersonPhone.value = id
+const openSettlement = (list, name) => {
+  contactPerson.value = name
   selectedList.value = list
   handleSettlement()
   initData()
@@ -711,4 +709,4 @@ defineExpose({
     color: #ccc;
   }
 }
-</style>
+</style>