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

+ 8 - 0
ghs/src/cool/request/index.js

@@ -54,12 +54,20 @@ import book from '@/service/book/index';
 import bookCustom from '@/service/book-custom/index';
 import bookItemCustom from '@/service/book-item-custom/index';
 import stock from '@/service/stock/index';
+import bookChangeGlobal from '@/service/book-change-global/index';
+import bookOnChangeGlobal from '@/service/book-on-change-global/index';
+import bookRoadChangeGlobal from '@/service/book-road-change-global/index';
+import bookCgChangeGlobal from '@/service/book-cg-change-global/index';
 
 export function SET_SERVICE({ store }) {
 	// const files = require.context('@/service/', true, /\.js$/);
 	// const ignore = ['./request.js'];
 
 	let modules = {
+		bookCgChangeGlobal,
+		bookRoadChangeGlobal,
+		bookOnChangeGlobal,
+		bookChangeGlobal,
 		stock,
 		bookItemCustom,
 		bookCustom,

+ 6 - 0
ghs/src/service/book-cg-change-global/index.js

@@ -0,0 +1,6 @@
+import { BaseService, Service } from '@/cool';
+@Service('book-cg-change-global')
+export class BookCgChangeGlobalService extends BaseService {
+
+}
+export default new BookCgChangeGlobalService();

+ 6 - 0
ghs/src/service/book-change-global/index.js

@@ -0,0 +1,6 @@
+import { BaseService, Service } from '@/cool';
+@Service('book-change-global')
+export class BookChangeGlobalService extends BaseService {
+
+}
+export default new BookChangeGlobalService();

+ 6 - 0
ghs/src/service/book-on-change-global/index.js

@@ -0,0 +1,6 @@
+import { BaseService, Service } from '@/cool';
+@Service('book-on-change-global')
+export class BookOnChangeGlobalService extends BaseService {
+
+}
+export default new BookOnChangeGlobalService();

+ 6 - 0
ghs/src/service/book-road-change-global/index.js

@@ -0,0 +1,6 @@
+import { BaseService, Service } from '@/cool';
+@Service('book-road-change-global')
+export class BookRoadChangeGlobalService extends BaseService {
+
+}
+export default new BookRoadChangeGlobalService();

+ 5 - 6
ghs/src/views/book/custom.vue

@@ -12,6 +12,10 @@
 				<el-button @click.stop="goDetail(scope.row)" size="medium" type="primary">查看明细</el-button>
 			</template>
 
+			<template #table-column-name="{scope}">
+				{{ scope.row.name }}<span v-if="scope.row.seatSn!=0">({{ scope.row.seatSn }})</span>
+			</template>
+
 		</x-crud>
 	</div>
 </template>
@@ -47,11 +51,6 @@ export default {
 			ctx.service(this.$service.bookCustom)
 				.set('table', {
 					columns: [
-                        {
-							prop: 'seatSn',
-							label: '货位号',
-							align: 'center',
-						},
 						{
 							prop: 'name',
 							label: '名称',
@@ -91,7 +90,7 @@ export default {
 					op: {
 						visible: true,
 						props: {
-							width: 500,
+							width: 700,
 							align: 'left',
 							fixed: 'right',
 							label: '操作'

+ 8 - 14
ghs/src/views/book/itemCustom.vue

@@ -12,14 +12,18 @@
 			</template>
 
 			<template #slot-search-option="{scope}">
-                <span style="font-size:32upx;color:blue;font-weight:bold;margin-left:30upx;padding:10upx 0 10upx 0;" v-if="remainNum && Number(remainNum)>0 && Number(itemId)>0">
-					{{ remainName }} 剩 {{ remainNum }}份
+                <span style="font-size:32upx;color:blue;font-weight:bold;margin-left:30upx;padding:10upx 0 10upx 0;" v-if="Number(itemId)>0">
+					{{ remainName }}】<span v-if="remainNum && Number(remainNum)>0">剩 {{ remainNum }}份</span>
 				</span>
 				<span v-if="Number(customId)>0" style="font-size:32upx;color:black;font-weight:bold;margin-left:30upx;padding:10upx 0 10upx 0;">
 					【{{ customName }}】预订的花材
 				</span>
 			</template>
 
+			<template #table-column-customName="{scope}">
+				{{ scope.row.customName }}<span v-if="scope.row.seatSn!=0">({{ scope.row.seatSn }})</span>
+			</template>
+
 		</x-crud>
 	</div>
 </template>
@@ -64,11 +68,6 @@ export default {
 			ctx.service(this.$service.bookItemCustom)
 			.set('table', {
 				columns: [
-					{
-						prop: 'seatSn',
-						label: '货位号',
-						align: 'center',
-					},
 					{
 						prop: 'name',
 						label: '名称',
@@ -108,17 +107,12 @@ export default {
 						prop: 'customName',
 						label: '客户',
 						align: 'center',
-					},
-					{
-						prop: 'seatSn',
-						label: '货位',
-						align: 'center',
-					},
+					}
 				],
 				op: {
 					visible: true,
 					props: {
-						width: 300,
+						width: 600,
 						align: 'center',
 						fixed: 'right',
 						label: '操作'

+ 48 - 9
ghs/src/views/order/book.vue

@@ -43,16 +43,21 @@
 
 			<template #slot-column-option="{scope}">
         <el-button @click.stop="goDetail(scope.row)" size="medium" type="primary">查看明细</el-button>
-        <el-button @click.stop="" size="medium" type="primary">预订明细</el-button>
-        <el-button @click.stop="" size="medium" type="primary">上下架记录</el-button>
-        <el-button @click.stop="" size="medium" type="primary">路上记录</el-button>
-        <el-button @click.stop="" size="medium" type="primary">待采记录</el-button>
+        <el-button @click.stop="getBookRecord(scope.row)" size="medium" type="primary">预订记录</el-button>
+        <el-button @click.stop="getOnRecord(scope.row)" size="medium" type="primary">上下架记录</el-button>
+        <el-button @click.stop="getRoadRecord(scope.row)" size="medium" type="primary">路上记录</el-button>
+        <el-button @click.stop="getCgRecord(scope.row)" size="medium" type="primary">待采记录</el-button>
         <el-button @click.stop="getStock(scope.row)" size="medium" type="primary">库存明细</el-button>
       </template>
 
     </x-crud>
 
     <stock-detail ref="stockDetail" :itemData="itemData" />
+    <total-book-record ref="totalBookRecord" :itemData="totalBookRecordData" />
+    <total-book-on-record ref="totalBookOnRecord" :itemData="totalBookOnRecordData" />
+
+    <total-book-road-record ref="totalBookRoadRecord" :itemData="totalBookRoadRecordData" />
+    <total-book-cg-record ref="totalBookCgRecord" :itemData="totalBookCgRecordData" />
 
   </div>
 </template>
@@ -63,10 +68,18 @@ import { getLodop } from '@/utils/lodop';
 import { mapGetters } from 'vuex';
 import {hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint'
 import stockDetail from './components/stock-detail';
+import totalBookRecord from './components/total-book-record';
+import totalBookOnRecord from './components/total-book-on-record';
+import totalBookCgRecord from './components/total-book-cg-record';
+import totalBookRoadRecord from './components/total-book-road-record';
 export default {
   components: {
     SelOrder,
-    stockDetail
+    stockDetail,
+    totalBookRecord,
+    totalBookOnRecord,
+    totalBookCgRecord,
+    totalBookRoadRecord
   },
   computed: {
         ...mapGetters(['shopInfo', 'userInfo'])
@@ -120,20 +133,46 @@ export default {
       shop:{},
       T:null,
       search:'',
-      itemData:{id:0}
+      itemData:{id:0},
+      totalBookRecordData:{},
+      totalBookOnRecordData:{},
+      totalBookRoadRecordData:{},
+      totalBookCgRecordData:{}
     };
   },
   created() {
     this.init();
   },
 	mounted() {
-
     this.$nextTick(() => {
       this.$refs.itemSearchRef.focus()
     })
-
   },
   methods: {
+    getCgRecord(info){
+      this.totalBookCgRecordData = {itemId:info.itemId,itemName:info.name,id:info.id}
+      setTimeout(() => {
+        this.$refs.totalBookCgRecord.init()
+      })
+    },
+    getRoadRecord(info){
+      this.totalBookRoadRecordData = {itemId:info.itemId,itemName:info.name,id:info.id}
+      setTimeout(() => {
+        this.$refs.totalBookRoadRecord.init()
+      })
+    },
+    getOnRecord(info){
+      this.totalBookOnRecordData = {itemId:info.itemId,itemName:info.name,id:info.id}
+      setTimeout(() => {
+        this.$refs.totalBookOnRecord.init()
+      })
+    },
+    getBookRecord(info){
+      this.totalBookRecordData = {itemId:info.itemId,itemName:info.name,id:info.id}
+      setTimeout(() => {
+        this.$refs.totalBookRecord.init()
+      })
+    },
     getStock(info){
       this.itemData = {id:info.itemId,name:info.name}
       setTimeout(() => {
@@ -249,7 +288,7 @@ export default {
             op: {
               visible: true,
               props: {
-                width: 750,
+                width: 800,
                 align: 'left',
                 fixed: 'right',
                 label: '操作'

+ 95 - 0
ghs/src/views/order/components/total-book-cg-record.vue

@@ -0,0 +1,95 @@
+<template>
+	<div>
+		<el-drawer :visible.sync="showArea" size="55vw" :before-close="closeFn" custom-class="drawer-class" direction="ltr">
+			<div>
+				<div style="margin-left:2px;font-weight:bold;">【{{ itemData.itemName?itemData.itemName:'' }}】待采变动记录</div>
+                <x-crud @load="onLoad">
+					<template #table-column-changeNum="{scope}">
+						{{ scope.row.io == 1 ? '+' : '-' }}<span>{{ scope.row.changeNum }}</span>
+					</template>
+                </x-crud>
+			</div>
+		</el-drawer>
+	</div>
+</template>
+<script>
+export default {
+	name: 'total-book-record',
+	props: {
+		itemData: {
+			type: Object,
+			default: () => {}
+		}
+	},
+	data() {
+		return {
+			showArea: false
+		};
+	},
+	methods: {
+		init() {
+			this.showArea = true
+			if(this.app){
+				this.app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})
+			}
+		},
+		closeFn() {
+			this.showArea = false;
+		},
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service(this.$service.bookCgChangeGlobal)
+			.set('table', {
+				columns: [
+					{
+						label: '日期',
+						prop: 'addTime',
+						align: 'center',
+					},
+					{
+						label: '事项',
+						prop: 'event',
+						align: 'center',
+					},
+					{
+						label: '变动',
+						prop: 'changeNum',
+						align: 'center',
+					},
+					{
+						label: '最终',
+						prop: 'num',
+						align: 'center',
+					},
+					{
+						label: '操作人',
+						prop: 'staffName',
+						align: 'center',
+					}
+				],
+				op: {
+					visible: true,
+					props: {
+						width: 60,
+						align: 'center',
+						fixed: 'right',
+						label: '操作'
+					},
+					layout: []
+				}
+			})
+			.set('layout', [
+				[ 'data-table' ],
+				['flex1']
+			])
+			.done()
+			app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.drawer-class{
+	height:100vh;
+}
+</style>

+ 95 - 0
ghs/src/views/order/components/total-book-on-record.vue

@@ -0,0 +1,95 @@
+<template>
+	<div>
+		<el-drawer :visible.sync="showArea" size="55vw" :before-close="closeFn" custom-class="drawer-class" direction="ltr">
+			<div>
+				<div style="margin-left:2px;font-weight:bold;">【{{ itemData.itemName?itemData.itemName:'' }}】上下架记录</div>
+                <x-crud @load="onLoad">
+					<template #table-column-changeNum="{scope}">
+						{{ scope.row.io == 1 ? '+' : '-' }}<span>{{ scope.row.changeNum }}</span>
+					</template>
+                </x-crud>
+			</div>
+		</el-drawer>
+	</div>
+</template>
+<script>
+export default {
+	name: 'total-book-record',
+	props: {
+		itemData: {
+			type: Object,
+			default: () => {}
+		}
+	},
+	data() {
+		return {
+			showArea: false
+		};
+	},
+	methods: {
+		init() {
+			this.showArea = true
+			if(this.app){
+				this.app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})
+			}
+		},
+		closeFn() {
+			this.showArea = false;
+		},
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service(this.$service.bookOnChangeGlobal)
+			.set('table', {
+				columns: [
+					{
+						label: '日期',
+						prop: 'addTime',
+						align: 'center',
+					},
+					{
+						label: '事项',
+						prop: 'event',
+						align: 'center',
+					},
+					{
+						label: '变动',
+						prop: 'changeNum',
+						align: 'center',
+					},
+					{
+						label: '最终',
+						prop: 'num',
+						align: 'center',
+					},
+					{
+						label: '操作人',
+						prop: 'staffName',
+						align: 'center',
+					}
+				],
+				op: {
+					visible: true,
+					props: {
+						width: 160,
+						align: 'center',
+						fixed: 'right',
+						label: '操作'
+					},
+					layout: []
+				}
+			})
+			.set('layout', [
+				[ 'data-table' ],
+				['flex1']
+			])
+			.done()
+			app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.drawer-class{
+	height:100vh;
+}
+</style>

+ 95 - 0
ghs/src/views/order/components/total-book-record.vue

@@ -0,0 +1,95 @@
+<template>
+	<div>
+		<el-drawer :visible.sync="showArea" size="55vw" :before-close="closeFn" custom-class="drawer-class" direction="ltr">
+			<div>
+				<div style="margin-left:2px;font-weight:bold;">【{{ itemData.itemName?itemData.itemName:'' }}】预订记录</div>
+                <x-crud @load="onLoad">
+					<template #table-column-changeNum="{scope}">
+						{{ scope.row.io == 1 ? '+' : '-' }}<span>{{ scope.row.changeNum }}</span>
+					</template>
+                </x-crud>
+			</div>
+		</el-drawer>
+	</div>
+</template>
+<script>
+export default {
+	name: 'total-book-record',
+	props: {
+		itemData: {
+			type: Object,
+			default: () => {}
+		}
+	},
+	data() {
+		return {
+			showArea: false
+		};
+	},
+	methods: {
+		init() {
+			this.showArea = true
+			if(this.app){
+				this.app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})
+			}
+		},
+		closeFn() {
+			this.showArea = false;
+		},
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service(this.$service.bookChangeGlobal)
+			.set('table', {
+				columns: [
+					{
+						label: '日期',
+						prop: 'addTime',
+						align: 'center',
+					},
+					{
+						label: '事项',
+						prop: 'event',
+						align: 'center',
+					},
+					{
+						label: '变动',
+						prop: 'changeNum',
+						align: 'center',
+					},
+					{
+						label: '最终',
+						prop: 'num',
+						align: 'center',
+					},
+					{
+						label: '操作人',
+						prop: 'staffName',
+						align: 'center',
+					}
+				],
+				op: {
+					visible: true,
+					props: {
+						width: 160,
+						align: 'center',
+						fixed: 'right',
+						label: '操作'
+					},
+					layout: []
+				}
+			})
+			.set('layout', [
+				[ 'data-table' ],
+				['flex1']
+			])
+			.done()
+			app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.drawer-class{
+	height:100vh;
+}
+</style>

+ 95 - 0
ghs/src/views/order/components/total-book-road-record.vue

@@ -0,0 +1,95 @@
+<template>
+	<div>
+		<el-drawer :visible.sync="showArea" size="55vw" :before-close="closeFn" custom-class="drawer-class" direction="ltr">
+			<div>
+				<div style="margin-left:2px;font-weight:bold;">【{{ itemData.itemName?itemData.itemName:'' }}】路上记录</div>
+                <x-crud @load="onLoad">
+					<template #table-column-changeNum="{scope}">
+						{{ scope.row.io == 1 ? '+' : '-' }}<span>{{ scope.row.changeNum }}</span>
+					</template>
+                </x-crud>
+			</div>
+		</el-drawer>
+	</div>
+</template>
+<script>
+export default {
+	name: 'total-book-record',
+	props: {
+		itemData: {
+			type: Object,
+			default: () => {}
+		}
+	},
+	data() {
+		return {
+			showArea: false
+		};
+	},
+	methods: {
+		init() {
+			this.showArea = true
+			if(this.app){
+				this.app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})
+			}
+		},
+		closeFn() {
+			this.showArea = false;
+		},
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service(this.$service.bookRoadChangeGlobal)
+			.set('table', {
+				columns: [
+					{
+						label: '日期',
+						prop: 'addTime',
+						align: 'center',
+					},
+					{
+						label: '事项',
+						prop: 'event',
+						align: 'center',
+					},
+					{
+						label: '变动',
+						prop: 'changeNum',
+						align: 'center',
+					},
+					{
+						label: '最终',
+						prop: 'num',
+						align: 'center',
+					},
+					{
+						label: '操作人',
+						prop: 'staffName',
+						align: 'center',
+					}
+				],
+				op: {
+					visible: true,
+					props: {
+						width: 160,
+						align: 'center',
+						fixed: 'right',
+						label: '操作'
+					},
+					layout: []
+				}
+			})
+			.set('layout', [
+				[ 'data-table' ],
+				['flex1']
+			])
+			.done()
+			app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.drawer-class{
+	height:100vh;
+}
+</style>