瀏覽代碼

短驳物流

hcf 1 年之前
父節點
當前提交
d5b0feaa0f
共有 2 個文件被更改,包括 36 次插入0 次删除
  1. 9 0
      src/api/delivery.ts
  2. 27 0
      src/components/Assembly/storeHouse.vue

+ 9 - 0
src/api/delivery.ts

@@ -104,4 +104,13 @@ export function getShortBargeSingleData(data ?: any) {
 		method: 'GET',
 		params: data
 	})
+}
+
+//仓库主键查询
+export function getMaindataStorehouseSingleData(data ?: any) {
+	return request({
+		url: '/maindata/maindataStorehouse/single',
+		method: 'GET',
+		params: data
+	})
 }

+ 27 - 0
src/components/Assembly/storeHouse.vue

@@ -0,0 +1,27 @@
+<template>
+	<div>
+		{{value}}
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch, Mixins } from "vue-property-decorator";
+	import { getMaindataStorehouseSingleData } from '@/api/delivery';
+	@Component
+	export default class StoreHouse extends Vue {
+		@Prop()
+		propValue : any
+		value : any = ''
+		created() {
+			if(this.propValue){
+				getMaindataStorehouseSingleData({ id: this.propValue }).then((res : any) => {
+					if (res.code === 200) {
+						this.value = res.data.name
+					}
+				}).catch();
+			}
+		};
+	}
+</script>
+
+<style>
+</style>