Sfoglia il codice sorgente

更新 远程搜索逻辑;新增指数上传

wzh 3 anni fa
parent
commit
7c97de0218

+ 4 - 0
src/apis/fetch.js

@@ -375,4 +375,8 @@ export default {
   getTransPortsList(data) {
     return $http("/port/trans/list", data);
   },
+
+  getCargoOwnerSelect(data) {
+    return $http("/proxy/detail/cargoOwner/select", data);
+  },
 };

+ 1 - 3
src/components/RemoteSelect.vue

@@ -1,6 +1,5 @@
 <template>
   <el-select
-    v-model="value"
     filterable
     :multiple="multiple"
     :multiple-limit="multiple ? 0 : 1"
@@ -16,7 +15,7 @@
       v-for="item in options"
       :key="item.key"
       :label="item.value"
-      :value="item.key"
+      :value="{ value: item.key, key: item.value }"
     />
   </el-select>
 </template>
@@ -41,7 +40,6 @@ export default {
     },
     api: String,
     params: Object,
-    value: [String, Number, Array],
     multiple: {
       type: Boolean,
       default: false,

+ 3 - 3
src/views/portsManage/sailingSchedule.vue

@@ -250,17 +250,17 @@ function pageChange(e) {
 
 let cargoOwnerCompanyStr = ref([]);
 function selectCargoOwnerCompany(e) {
-  ruleForm.value.cargoOwnerIds = e.join(",");
+  ruleForm.value.cargoOwnerIds = e.value.join(",");
 }
 
 let departurePortStr = ref("");
 function selectDeparturePort(e) {
-  ruleForm.value.departurePortId = e;
+  ruleForm.value.departurePortId = e.value;
 }
 
 let destinationPortStr = ref("");
 function selectDdestinationPort(e) {
-  ruleForm.value.destinationPortId = e;
+  ruleForm.value.destinationPortId = e.value;
 }
 let options = ref([
   {

+ 7 - 9
src/views/voyage/voyageList.vue

@@ -62,7 +62,7 @@
         ></el-input>
         <div class="search-btn" @click="getVoyageList(1)">查询</div>
       </div>
-      <!-- <div class="df aic">
+      <div class="df aic">
         <el-button
           @click="FYDIModalVisable = true"
           class="mr20"
@@ -78,16 +78,13 @@
         >
           <template v-slot:default>
             <div class="df aic jcsa">
-              <RemoteSearch
-                api="getUserSelect"
+              <RemoteSelect
+                api="getCargoOwnerSelect"
                 v-model="cargoOwnerCompanyStr"
                 placeholder="公司名称/联系人/手机号"
-                :params="{
-                  identity: 2,
-                }"
                 @selectItem="selectCargoOwnerUpload($event)"
                 class="mb10"
-              ></RemoteSearch>
+              ></RemoteSelect>
               <el-upload
                 v-if="FYDIParams.cargoOwnerId"
                 class="upload-demo"
@@ -115,7 +112,7 @@
           @click="voyageAddDialogVisible = true"
           >添加航次</el-button
         >
-      </div> -->
+      </div>
     </div>
     <el-dialog
       v-model="voyageAddDialogVisible"
@@ -766,7 +763,8 @@ let FYDIParams = ref({
 });
 let cargoOwnerCompanyStr = ref("");
 function selectCargoOwnerUpload(item) {
-  FYDIParams.value.cargoOwnerId = item.key;
+  cargoOwnerCompanyStr.value = item.key;
+  FYDIParams.value.cargoOwnerId = item.value;
 }
 
 function FYDIModalClose() {