shish 2 ani în urmă
părinte
comite
5ad6d946ce

+ 75 - 0
ghsApp/src/admin/book/customBookChange.vue

@@ -0,0 +1,75 @@
+<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">
+						<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.event }}</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 { getCustomBookChangeList } from '@/api/book'
+import list from '@/mixins/list'
+export default {
+	name: "bookChange",
+	components: {
+		AppWrapperEmpty
+	},
+	mixins:[list],
+	data() {
+		return {
+
+		};
+	},
+	methods: {
+		async init(){
+            let id = this.option.id?this.option.id:0
+			let itemId = this.option.itemId?this.option.itemId:0
+			let itemName = this.option.itemName?this.option.itemName:0
+			uni.setNavigationBarTitle({ title: itemName })
+			const res = await getCustomBookChangeList({ page:this.list.page,relateSecondId:id,itemId:itemId })
+			if (this.$util.isEmpty(res.data.list)){
+				this.completes(res)
+				return
+			}
+			this.completes(res)
+		}
+	},
+	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>

+ 75 - 0
ghsApp/src/admin/book/itemBookChange.vue

@@ -0,0 +1,75 @@
+<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">
+						<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.event }}</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 { getGlobalBookChangeList } from '@/api/book'
+import list from '@/mixins/list'
+export default {
+	name: "bookChange",
+	components: {
+		AppWrapperEmpty
+	},
+	mixins:[list],
+	data() {
+		return {
+
+		};
+	},
+	methods: {
+		async init(){
+            let id = this.option.id?this.option.id:0
+			let itemId = this.option.itemId?this.option.itemId:0
+			let itemName = this.option.itemName?this.option.itemName:0
+			uni.setNavigationBarTitle({ title: itemName })
+			const res = await getGlobalBookChangeList({ page:this.list.page,relateSecondId:id,itemId:itemId })
+			if (this.$util.isEmpty(res.data.list)){
+				this.completes(res)
+				return
+			}
+			this.completes(res)
+		}
+	},
+	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>

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

@@ -8,10 +8,19 @@ export const getIoList = data => {
 	return https.get('/book-io/get-io-list', data)
 	return https.get('/book-io/get-io-list', data)
 }
 }
 
 
+
 export const getGlobalBookChangeList = data => {
 export const getGlobalBookChangeList = data => {
 	return https.get('/book-change-global/list', data)
 	return https.get('/book-change-global/list', data)
 }
 }
 
 
+export const getCustomBookChangeList = data => {
+	return https.get('/book-custom-change/list', data)
+}
+
+export const getBookChangeList = data => {
+	return https.get('/book-change/list', data)
+}
+
 export const getBookItemCustomDetail = data => {
 export const getBookItemCustomDetail = data => {
 	return https.get('/book-item-ghs/get-list', data)
 	return https.get('/book-item-ghs/get-list', data)
 }
 }