Forráskód Böngészése

修改港口组件

caojunjie 3 éve
szülő
commit
429141848e

+ 7 - 2
src/components/port-info/index.vue

@@ -13,7 +13,7 @@
           v-for="item in portList"
           :key="item.id"
           :label="item.name"
-          :value="item.name"
+          :value="type=='id'?item.id:item.name"
         >
         </el-option>
       </el-select>
@@ -148,6 +148,7 @@ export default {
   },
   props: {
     value: String,
+    type: String,
     disabled: Boolean
   },
   model: {
@@ -174,7 +175,11 @@ export default {
       this.$refs.crud.toggleSelection();
     },
     importPort() {
-      this.$emit("balabala", this.selectionList[0].name);
+      if(this.type == 'id'){
+        this.$emit("balabala", this.selectionList[0].id);
+      }else {
+        this.$emit("balabala", this.selectionList[0].name);
+      }
       this.portinfoVisible = false;
     },
     //打印

+ 2 - 0
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -215,12 +215,14 @@
         </template>
         <template slot-scope="scope" slot="polId">
           <port-info
+              :type="'id'"
               v-model="goodsForm.polId"
               :disabled="goodsForm.status === 1"
           />
         </template>
         <template slot-scope="scope" slot="podId">
           <port-info
+              :type="'id'"
               v-model="goodsForm.podId"
               :disabled="goodsForm.status === 1"
           />