Explorar el Código

报损单列表、详情

jf hace 5 años
padre
commit
c0bbed1e5e

+ 335 - 0
ghsApp/src/admin/breakage/info.vue

@@ -0,0 +1,335 @@
+<template>
+	<view class="app-content">
+		<view v-if="!$util.isEmpty(detailInfo)" class="info-content_box">
+			<view class="title">单据信息</view>
+			<view class="bills-info_box content-box">
+				<view class="order-info_box">
+					<view>订单日期:</view>
+					<view>{{ detailInfo.addTime }}</view>
+				</view>
+				<view class="order-info_box">
+					<view>订单编码:</view>
+					<view>{{ detailInfo.orderSn }}</view>
+					<view class="price">
+						<button @click="copy(detailInfo.orderSn)" class="admin-button-com default">复制</button>
+					</view>
+				</view>
+				<view class="order-info_box">
+					<view>报损人员:</view>
+					<view>{{ detailInfo.shopAdminName }}</view>
+				</view>
+			</view>
+
+			<view class="title">
+				商品信息
+			</view>
+			<view class="module-com content-box">
+				<view class="commodity-view">
+					<view class="commodity-list">
+						<view
+							v-for="(s, idx) in detailInfo.itemInfo"
+							:key="idx"
+							class="commodity-item"
+						>
+							<image class="item-icon" :src="s.itemCover" alt="商品图片" />
+
+							<view class="item-info">
+								<view class="info-line">
+									<text class="item-name">{{ s.itemName }}</text>
+									<text class="item-price">
+										<text class="unit">¥</text>
+
+										<text class="price">{{ s.itemPrice }}</text>
+									</text>
+								</view>
+								<view class="info-line">
+									<text class="item-type">{{ s.property }}</text>
+									<text class="item-count">{{ `${s.bigNum}/${s.smallNum}` }}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="summary-bar">
+						<view class="operate-view" ></view>
+						<view class="describe-view">
+							共{{ detailInfo.itemInfo.length || 0 }}种, 共{{ detailInfo.bigNum }}扎{{
+								detailInfo.smallNum}}支
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="content-box price-detail">
+				<div class="module-com input-line-wrap">
+					<tui-list-cell class="line-cell" :hover="false">
+						<div class="tui-title">备注</div>
+						<input :disabled="true" v-model="detailInfo.remark" placeholder-class="phcolor" class="tui-input" name="name" type="text" />
+					</tui-list-cell>
+				</div>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+
+import { wastageDetail } from "@/api/wastage/index";
+import productMins from "@/mixins/product";
+import TuiListCell from "@/components/plugin/list-cell";
+
+export default {
+	name: "info",
+	components: {
+		TuiListCell
+	},
+	mixins: [productMins],
+	data() {
+		return {
+			pageType: "order_change",
+			autoLoad: false,
+			stepActive: 0,
+			form: {
+				name: ""
+			},
+			detailInfo: {},
+			loading: false
+		};
+	},
+	onShow() {
+
+	},
+	methods: {
+		copy(val) {
+			const self = this;
+			uni.setClipboardData({
+				data: val,
+				success: function() {
+					self.$msg("复制成功");
+				}
+			});
+		},
+		callUp(mobile) {
+			uni.makePhoneCall({
+				phoneNumber: mobile
+			});
+		},
+		async init() {
+			const { orderSn } = this.option;
+			if (!orderSn) {
+				return;
+			}
+			const { data } = await wastageDetail({orderSn:orderSn});
+			this.detailInfo = data;
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.info-content_box {
+	padding: 0 20px 100px;
+	& > .title {
+		color: #666666;
+		font-size: 28px;
+		font-weight: 600;
+		padding: 30px 3px;
+	}
+	& .address-des_bx {
+		display: flex;
+		padding: 20px 10px 30px 20px;
+		& > view:nth-child(1) {
+			flex: 1;
+			margin-top: 10px;
+			& > view:nth-child(1) {
+				color: #333333;
+				font-size: 32px;
+				font-weight: bold;
+			}
+			& > view:nth-child(2) {
+				color: #666666;
+				font-size: 28px;
+				font-weight: 400;
+				margin-top: 20px;
+			}
+		}
+		& > view:nth-child(2) {
+			display: flex;
+			& .icondianhua1 {
+				font-size: 50px;
+				color: #3385ff;
+				margin-left: 0px;
+			}
+		}
+	}
+	.bills-info_box {
+		padding: 30px 20px 30px;
+		// border-bottom: 1px solid #EEEEEE;
+		& > .order-info_box {
+			display: flex;
+			align-items: center;
+			font-size: 26px;
+			font-weight: 400;
+			margin-bottom: 5px;
+			& > view:nth-child(1) {
+				color: #999999;
+				width: 135px;
+				text-align: right;
+			}
+			& > view:nth-child(2) {
+				color: #333333;
+			}
+			& > .price {
+				flex: 1;
+				font-size: 30px;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				& .iconxiangyou {
+					color: #999999;
+					font-size: 25px;
+					margin-left: 12px;
+				}
+			}
+		}
+	}
+	.content-box {
+		background-color: #ffffff;
+		border-radius: 10px;
+	}
+	.commodity-view {
+		display: flex;
+		flex-direction: column;
+		.commodity-list {
+			padding: 20px;
+			.commodity-item {
+				display: flex;
+				margin-bottom: 20px;
+				.item-icon {
+					flex-shrink: 0;
+					width: 140px;
+					height: 140px;
+				}
+				.item-info {
+					display: flex;
+					flex-direction: column;
+					justify-content: center;
+					flex: 1;
+					margin-left: 20px;
+					.info-line {
+						margin-bottom: 20px;
+						display: flex;
+						justify-content: space-between;
+						align-items: flex-end;
+						.item-name {
+							color: #666;
+							font-size: 28px;
+						}
+						.item-price {
+							color: #333;
+							font-size: 22px;
+							.price {
+								font-size: 32px;
+								font-weight: bold;
+							}
+						}
+						.item-type {
+							color: #999;
+							font-size: 24px;
+						}
+						.item-count {
+							color: #666;
+							font-size: 24px;
+						}
+					}
+				}
+			}
+		}
+		.summary-bar {
+			padding: 0 20px;
+			height: 90px;
+			display: flex;
+
+			align-items: center;
+			justify-content: space-between;
+			border-top: 1px solid #eeeeee;
+			.operate-view {
+				display: flex;
+
+				align-items: center;
+				color: #3385ff;
+				font-size: 26px;
+				.iconfont {
+					margin-right: 20px;
+					font-size: 40px;
+				}
+			}
+			.describe-view {
+				display: flex;
+
+				align-items: center;
+				color: #333;
+				font-size: 24px;
+				.price {
+					font-weight: bold;
+					font-size: 36px;
+				}
+			}
+		}
+	}
+	.shipping-address {
+		display: flex;
+		align-items: center;
+		margin-top: 20px;
+		& > view:nth-child(1) {
+			color: #999999;
+			font-size: 28upx;
+			font-weight: 400;
+			display: inline-block;
+			padding: 30upx 0 30upx 20upx;
+			flex: 1;
+			& > text {
+				color: #333333;
+				font-weight: 600;
+			}
+		}
+		& > view:nth-child(2) {
+			font-size: 60px;
+			color: #d6e7ff;
+			margin-right: 10px;
+		}
+	}
+	.price-detail {
+		margin-top: 20px;
+		margin-bottom: 20px;
+	}
+	.detail-price_box {
+		color: #333333;
+		font-size: 22px;
+		text-align: right;
+		flex: 1;
+		font-weight: 600;
+		&.red {
+			color: #ff2842;
+		}
+	}
+}
+.app-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	& .admin-button-com {
+		padding: 0;
+		margin-right: 15px;
+		width: 140px;
+		height: 70px;
+		line-height: 70px;
+		text-align: center;
+		color: #3385ff;
+		border: 1px solid #3385ff;
+		&.active{
+			color: #666666;
+			border: 1px solid #ccc;
+		}
+	}
+}
+</style>

+ 99 - 0
ghsApp/src/admin/breakage/list.vue

@@ -0,0 +1,99 @@
+<template>
+  <div class="app-content">
+			<block v-if="!$util.isEmpty(list.data)">
+				<navigator class="flex-space list" v-for="(item, index) in list.data" :key="index" :url="`/admin/breakage/info?orderSn=${item.orderSn}`" >
+				<view class="label">
+					<text>日期:{{item.addTime}}</text>
+					<text>单号:{{item.orderSn}}</text>
+					<text>操作:{{item.shopAdminName}}</text>
+				</view>
+				<view class="flex val">
+					{{item.bigNum}}/{{item.smallNum}}
+					<view class="iconfont iconxiangyou"></view>
+				</view>
+			</navigator>
+			</block>
+			<block v-else>
+				<app-wrapper-empty
+					title="暂无数据"
+					:is-empty="$util.isEmpty(list.data)"
+				/>
+			</block>
+
+  </div>
+</template>
+
+<script>
+
+import { list } from "@/mixins";
+import { wastageList } from "@/api/wastage";
+export default {
+  name: "breakage-list",
+  components: {},
+  mixins: [list],
+  data() {
+    return {
+    };
+  },
+  onPullDownRefresh() {
+    this.resetList();
+    this._list().then((res) => {
+      uni.stopPullDownRefresh();
+    });
+  },
+  onReachBottom() {
+    if (!this.list.finished) {
+      this._list().then((res) => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+  mounted() {
+    // getCategory()
+    // getUsage()
+  },
+  onLoad(option) {
+  },
+  onShow() {
+  	this.resetList();
+    this._list();
+  },
+  methods: {
+    _list(type, timeArr) {
+      return wastageList({
+        page: this.list.page,
+      }).then((res) => {
+        this.completes(res);
+        if (this.$util.isEmpty(res.data)){
+          return false
+        }
+
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+	.app-content{
+		.list{
+			padding: 20rpx 30rpx;
+			margin-bottom: 20rpx;
+			background: #FFFFFF;
+			.label{
+				line-height: 50rpx;
+				text{
+					display: block;
+				}
+			}
+			.val{
+				font-size: 25rpx;
+				.iconfont{
+					margin-left: 12rpx;
+					color: #999999;
+				}
+			}
+		}
+	}
+</style>

+ 6 - 1
ghsApp/src/admin/home/apply.vue

@@ -82,6 +82,11 @@
                                 img: `${this.$constant.imgUrl}/ghs/home/icon_ghs.png`,
                                 url: "/admin/ghs/shop"
                             },
+																									{
+																										name: "报损单",
+																										img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,
+																										url: "/admin/breakage/list"
+																									},
                         ]
                     },
                     {
@@ -160,4 +165,4 @@
   }
 }
     }
-</style>
+</style>

+ 14 - 0
ghsApp/src/api/wastage/index.js

@@ -0,0 +1,14 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+/** *
+ * 损耗列表 jiangfeng2021.06.27
+ */
+export const wastageList = data => {
+	return https.get('/wastage/list', data)
+}
+/** *
+	* 损耗详情 jiangfeng2021.06.27
+	*/
+export const wastageDetail = data => {
+	return https.get('/wastage/detail', data)
+}

+ 8 - 0
ghsApp/src/pages.json

@@ -209,6 +209,14 @@
 				{"path": "shop","style": {"navigationBarTitleText": "供应商"}}
 			]
 		},
+		{
+			"root": "admin/breakage",
+			"pages": [
+				{"path": "list","style": {"navigationBarTitleText": "报损单","enablePullDownRefresh": true}},
+				{"path": "info","style": {"navigationBarTitleText": "报损单详情"}}
+
+			]
+		},
 		{
 			"root": "admin/coupon",
 			"pages": [