Przeglądaj źródła

Merge branch 'master' of http://47.107.53.207:3000/ymy/oms

ymy 1 rok temu
rodzic
commit
91cedad6ab

+ 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>

+ 104 - 54
src/views/audit/logistics/index.vue

@@ -10,6 +10,7 @@
 			<by-tool :propConfig="toolConfig" @clickHandle="insideTools" />
 			<div class="box-shadow">
 				<by-form :propConfig="detailConfig" ref="addFormId"></by-form>
+				<by-table :propConfig="tableConfig" ref="table"></by-table>
 			</div>
 		</div>
 	</div>
@@ -17,8 +18,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 +90,7 @@
 					width: 200,
 					title: '发货单状态',
 					field: 'tmsOrderStatus',
+					component: Logistics2,
 				},
 				{
 					width: 200,
@@ -265,12 +269,12 @@
 				},
 				{
 					width: 200,
-					title: '货物总重量,单位kg',
+					title: '货物总重量',
 					field: 'tmsTotalWeight',
 				},
 				{
 					width: 200,
-					title: '货物总体积,单位立方米',
+					title: '货物总体积',
 					field: 'tmsTotalVolume',
 				},
 				{
@@ -278,16 +282,6 @@
 					title: '承运商名称',
 					field: 'tmsCarrierName',
 				},
-				{
-					width: 200,
-					title: '承运商id',
-					field: 'tmsCarrierInfoId',
-				},
-				{
-					width: 200,
-					title: '上游规则id',
-					field: 'tmsRuleUpId',
-				},
 				{
 					width: 200,
 					title: '车型要求',
@@ -359,7 +353,7 @@
 						span: 6,
 						label: '发货单状态',
 						prop: 'tmsOrderStatus',
-						component: 'by-input',
+						component: Logistics,
 					},
 					{
 						span: 6,
@@ -415,56 +409,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 +490,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 +535,6 @@
 					},
 				],
 				[
-					{
-						span: 6,
-						label: '收货地址',
-						prop: 'tmsUnloadingAddress',
-						component: 'by-input',
-					},
 					{
 						span: 6,
 						label: '收货人',
@@ -559,6 +548,12 @@
 						prop: 'tmsUnloadingContacts',
 						component: 'by-input',
 					},
+					{
+						span: 6,
+						label: '收货地址',
+						prop: 'tmsUnloadingAddress',
+						component: 'by-input',
+					},
 					{
 						span: 6,
 						label: '收货点经度',
@@ -658,7 +653,60 @@
 					}
 				]
 			]
-
+		}
+		tableConfig = {
+			attr: {
+				size: 'mini',
+				align: 'left',
+				readonly: true
+			},
+			columns:
+				[{
+					width: 250,
+					title: '物料名称',
+					field: 'tmsGoodsName',
+				},
+				{
+					width: 180,
+					title: '物料编码',
+					field: 'tmsGoodsCode',
+				},				
+				// {
+				// 	width: 180,
+				// 	title: '物料型号',
+				// 	field: 'tmsGoodsModel',
+				// },
+				{
+					width: 180,
+					title: '单价',
+					field: 'tmsGoodsPrice',
+				},
+				{
+					width: 180,
+					title: '数量',
+					field: 'tmsQuantity',
+				},
+				{
+					width: 180,
+					title: '数量单位',
+					field: 'tmsQuantityUnit',
+				},
+				{
+					width: 180,
+					title: '小计',
+					field: 'tmsGoodsTotalPrice',
+				},
+				{
+					width: 180,
+					title: '重量',
+					field: 'tmsWeight',
+				},
+				{
+					width: 180,
+					title: '体积',
+					field: 'tmsVolume',
+				},
+				]
 		}
 		mounted() {
 			this.timer = setInterval(() => {
@@ -685,10 +733,12 @@
 			let loading = this.$loading({ target: '.main-container' });
 			getSingleData({ id: e.id }).then((res : any) => {
 				if (res.code === 200) {
-					let data = res.data;
 					this.isShow = 'detail';
 					loading.close();
-					this.$nextTick(() => (this as any).$refs.addFormId.setValue(data));
+					this.$nextTick(() => {
+						(this as any).$refs.addFormId.setValue(res.data);
+						(this as any).$refs.table.setValue(res.data.subItemList);
+					});
 				} else loading.close();
 			}).catch(() => loading.close());
 		}