AlanWong 1 년 전
부모
커밋
cb16dc2af4
3개의 변경된 파일146개의 추가작업 그리고 39개의 파일을 삭제
  1. 51 0
      src/components/Assembly/logistics.vue
  2. 51 0
      src/components/Assembly/logistics2.vue
  3. 44 39
      src/views/audit/logistics/index.vue

+ 51 - 0
src/components/Assembly/logistics.vue

@@ -0,0 +1,51 @@
+<template>
+	<div>
+		<el-input style="width: 100%;" :readonly="true" :value="value"></el-input>
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch, Mixins } from "vue-property-decorator";
+	@Component
+	export default class Logistics extends Vue {
+		@Prop()
+		propValue : any
+		value : any = ''
+		@Watch('propValue')
+		propValueChange(v : any) {
+			// 0、创建;5、已分派;10、已派车;15、已提货;20、已发运;30、已送达;35、已回单;-1、已撤回;-2、取消
+			switch (v) {
+				case 0:
+					this.value = '创建'
+					break;
+				case 5:
+					this.value = '已分派'
+					break;
+				case 10:
+					this.value = '已派车'
+					break;
+				case 15:
+					this.value = '已提货'
+					break;
+				case 20:
+					this.value = '已发运'
+					break;
+				case 30:
+					this.value = '已送达'
+					break;
+				case 35:
+					this.value = '已回单'
+					break;
+				case -1:
+					this.value = '已撤回'
+					break;
+				case -2:
+					this.value = '取消'
+					break;
+			}
+		};
+		created() {}
+	}
+</script>
+
+<style>
+</style>

+ 51 - 0
src/components/Assembly/logistics2.vue

@@ -0,0 +1,51 @@
+<template>
+	<div>
+		{{propValueChange}}
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch, Mixins } from "vue-property-decorator";
+	@Component
+	export default class Logistics2 extends Vue {
+		@Prop()
+		propValue : any
+		value : any
+		get propValueChange() {
+			// 0、创建;5、已分派;10、已派车;15、已提货;20、已发运;30、已送达;35、已回单;-1、已撤回;-2、取消
+			switch (this.propValue) {
+				case 0:
+					this.value = '创建'
+					break;
+				case 5:
+					this.value = '已分派'
+					break;
+				case 10:
+					this.value = '已派车'
+					break;
+				case 15:
+					this.value = '已提货'
+					break;
+				case 20:
+					this.value = '已发运'
+					break;
+				case 30:
+					this.value = '已送达'
+					break;
+				case 35:
+					this.value = '已回单'
+					break;
+				case -1:
+					this.value = '已撤回'
+					break;
+				case -2:
+					this.value = '取消'
+					break;
+			}
+			return this.value;
+		};
+		created() { }
+	}
+</script>
+
+<style>
+</style>

+ 44 - 39
src/views/audit/logistics/index.vue

@@ -17,8 +17,10 @@
 <script lang="ts">
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import { getPageData, getSingleData } from '@/api/delivery';
+	import Logistics from "@/components/Assembly/logistics.vue";
+	import Logistics2 from "@/components/Assembly/logistics2.vue";
 	@Component
-	export default class Logistics extends Vue {
+	export default class myLogistics extends Vue {
 		timeNum = 0;
 		calculateCount = 0;
 		isShow : any = 'home'
@@ -87,6 +89,7 @@
 					width: 200,
 					title: '发货单状态',
 					field: 'tmsOrderStatus',
+					component: Logistics2,
 				},
 				{
 					width: 200,
@@ -359,7 +362,7 @@
 						span: 6,
 						label: '发货单状态',
 						prop: 'tmsOrderStatus',
-						component: 'by-input',
+						component: Logistics,
 					},
 					{
 						span: 6,
@@ -415,56 +418,57 @@
 					},
 					{
 						span: 6,
-						label: '发货市编码',
-						prop: 'tmsShipmentCityNo',
+						label: '发货区(县)',
+						prop: 'tmsShipmentRegion',
 						component: 'by-input',
 					},
 					{
 						span: 6,
-						label: '发货区(县)',
-						prop: 'tmsShipmentRegion',
+						label: '发货街道',
+						prop: 'tmsShipmentStreet',
 						component: 'by-input',
 					},
 					{
 						span: 6,
-						labelWidth: '128px',
-						label: '发货区(县)编码',
-						prop: 'tmsShipmentRegionNo',
+						label: '发货人',
+						prop: 'tmsShipmentConsignor',
 						component: 'by-input',
 					},
+
 				],
 				[
 					{
 						span: 6,
-						label: '发货街道',
-						prop: 'tmsShipmentStreet',
+						label: '发货市编码',
+						prop: 'tmsShipmentCityNo',
 						component: 'by-input',
 					},
 					{
 						span: 6,
-						label: '发货街道编码',
-						prop: 'tmsShipmentStreetNo',
+						labelWidth: '128px',
+						label: '发货区(县)编码',
+						prop: 'tmsShipmentRegionNo',
 						component: 'by-input',
 					},
 					{
 						span: 6,
-						label: '发货地址',
-						prop: 'tmsShipmentAddress',
+						label: '发货街道编码',
+						prop: 'tmsShipmentStreetNo',
 						component: 'by-input',
 					},
 					{
 						span: 6,
-						label: '发货人',
-						prop: 'tmsShipmentConsignor',
+						labelWidth: '110px',
+						label: '发货人联系方式',
+						prop: 'tmsShipmentContacts',
 						component: 'by-input',
 					},
 				],
 				[
 					{
 						span: 6,
-						labelWidth: '110px',
-						label: '发货人联系方式',
-						prop: 'tmsShipmentContacts',
+						label: '发货地址',
+						prop: 'tmsShipmentAddress',
 						component: 'by-input',
 					},
 					{
@@ -495,41 +499,41 @@
 					},
 					{
 						span: 6,
-						label: '收货省编码',
-						prop: 'tmsUnloadingProvinceNo',
+						label: '收货',
+						prop: 'tmsUnloadingCity',
 						component: 'by-input',
 					},
 					{
 						span: 6,
-						label: '收货',
-						prop: 'tmsUnloadingCity',
+						label: '收货区(县)',
+						prop: 'tmsUnloadingRegion',
 						component: 'by-input',
 					},
 					{
 						span: 6,
-						label: '收货市编码',
-						prop: 'tmsUnloadingCityNo',
+						label: '收货街道',
+						prop: 'tmsUnloadingStreet',
 						component: 'by-input',
 					},
 				],
 				[
 					{
 						span: 6,
-						label: '收货区(县)',
-						prop: 'tmsUnloadingRegion',
+						label: '收货省编码',
+						prop: 'tmsUnloadingProvinceNo',
 						component: 'by-input',
 					},
 					{
 						span: 6,
-						labelWidth: '128px',
-						label: '收货区(县)编码',
-						prop: 'tmsUnloadingRegionNo',
+						label: '收货市编码',
+						prop: 'tmsUnloadingCityNo',
 						component: 'by-input',
 					},
 					{
 						span: 6,
-						label: '收货街道',
-						prop: 'tmsUnloadingStreet',
+						labelWidth: '128px',
+						label: '收货区(县)编码',
+						prop: 'tmsUnloadingRegionNo',
 						component: 'by-input',
 					},
 					{
@@ -540,12 +544,6 @@
 					},
 				],
 				[
-					{
-						span: 6,
-						label: '收货地址',
-						prop: 'tmsUnloadingAddress',
-						component: 'by-input',
-					},
 					{
 						span: 6,
 						label: '收货人',
@@ -559,6 +557,12 @@
 						prop: 'tmsUnloadingContacts',
 						component: 'by-input',
 					},
+					{
+						span: 6,
+						label: '收货地址',
+						prop: 'tmsUnloadingAddress',
+						component: 'by-input',
+					},
 					{
 						span: 6,
 						label: '收货点经度',
@@ -686,6 +690,7 @@
 			getSingleData({ id: e.id }).then((res : any) => {
 				if (res.code === 200) {
 					let data = res.data;
+					// data.tmsOrderStatus === 0 ? data.tmsOrderStatus = "0" : "";
 					this.isShow = 'detail';
 					loading.close();
 					this.$nextTick(() => (this as any).$refs.addFormId.setValue(data));