shish 2 лет назад
Родитель
Сommit
f9f13ad552

+ 4 - 0
ghsApp/src/api/book/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const getIoList = data => {
+	return https.get('/book-io/get-io-list', data)
+}
+
 export const getBookItemCustomDetail = data => {
 	return https.get('/book-item-ghs/get-list', data)
 }

+ 2 - 1
ghsApp/src/pages.json

@@ -107,7 +107,8 @@
 				{"path": "allot","style": {"navigationBarTitleText": "分配工作"}},
 				{"path": "refundSuccess","style": {"navigationBarTitleText": "结果"}},
 				{"path": "refundList","style": {"navigationBarTitleText": "售后记录", "enablePullDownRefresh": true}},
-				{"path": "refundAllList","style": {"navigationBarTitleText": "售后记录", "enablePullDownRefresh": false}}
+				{"path": "refundAllList","style": {"navigationBarTitleText": "售后记录", "enablePullDownRefresh": false}},
+				{"path": "bookChange","style": {"navigationBarTitleText": "变动记录", "enablePullDownRefresh": false}}
 			]
 		},
 		{

+ 74 - 0
ghsApp/src/pagesOrder/bookChange.vue

@@ -0,0 +1,74 @@
+<template>
+	<view class="app-content">
+		<view class="main-view">
+			<block v-if="!$util.isEmpty(list.data)">
+				<t-table :headerBackgroundColor="'#F0F2F6'">
+					<t-tr header>
+                        <t-th>时间</t-th>
+						<t-th>花材</t-th>
+						<t-th>变动</t-th>
+						<t-th>最终</t-th>
+						<t-th>操作人</t-th>
+					</t-tr>
+					<view v-for="(item, index) in list.data" :key="index" @click="goDetail(item)">
+						<t-tr>
+							<t-td align="center" color="info"><view >{{ item.addTime.substr(5,11) }}</view></t-td>
+							<t-td align="center" color="info"><view >{{ item.itemName }}</view></t-td>
+							<t-td align="center" color="info"><view >{{item.io==1?'+':'-'}}{{ item.changeNum }}</view></t-td>
+							<t-td align="center" color="info"><view >{{ item.num }}</view></t-td>
+							<t-td align="center" color="info"><view >{{ item.staffName }}</view></t-td>
+						</t-tr>
+					</view>
+				</t-table>
+			</block>
+			<block v-else>
+				<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+			</block>
+		</view>
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { getIoList } from '@/api/book'
+import list from '@/mixins/list'
+export default {
+	name: "bookChange",
+	components: {
+		AppWrapperEmpty
+	},
+	mixins:[list],
+	data() {
+		return {
+
+		};
+	},
+	methods: {
+		async init(){
+            let orderId = this.option.orderId?this.option.orderId:0
+			const res = await getIoList({ page:this.list.page,orderId:orderId })
+			if (this.$util.isEmpty(res.data.list)){
+				this.completes(res)
+				return
+			}
+			this.completes(res)
+		},
+		goDetail(item){
+		}
+	},
+	async onPullDownRefresh() {
+		this.resetList();
+		await this.init()
+		uni.stopPullDownRefresh();
+	},
+	async onReachBottom() {
+		if (!this.list.finished) {
+			await this.init()
+			uni.stopPullDownRefresh();;
+		} else {
+			uni.stopPullDownRefresh();
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 6 - 1
ghsApp/src/pagesOrder/detail.vue

@@ -247,7 +247,9 @@
 						</view>
 					</view>
 					<view class="summary-bar">
-						<view class="operate-view" ></view>
+						<view class="operate-view" >
+							<text @click="getBookChange" v-if="detailInfo.book == 1">预订变动明细</text>
+						</view>
 						<view class="describe-view">
 							共{{ detailInfo.productStat.kind}}种,共
 							<text v-if="detailInfo.productStat.bigNum > 0">{{ detailInfo.productStat.bigNum }}扎</text>
@@ -518,6 +520,9 @@ export default {
 		}
 	},
 	methods: {
+		getBookChange(){
+			this.$util.pageTo({url: '/pagesOrder/bookChange?orderId='+this.detailInfo.id})
+		},
 		updateConfirmTime(e){
 			let that = this
 			this.payDate = e.detail.value