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

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

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

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

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

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

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

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

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

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

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

+ 95 - 0
ghs/src/views/book/components/book-custom-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/book/components/book-custom-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/book/components/book-custom-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/book/components/book-custom-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>

+ 51 - 3
ghs/src/views/book/custom.vue

@@ -10,6 +10,12 @@
 
 
 			<template #slot-column-option="{scope}">
 			<template #slot-column-option="{scope}">
 				<el-button @click.stop="goDetail(scope.row)" size="medium" type="primary">查看明细</el-button>
 				<el-button @click.stop="goDetail(scope.row)" 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>
+
 			</template>
 			</template>
 
 
 			<template #table-column-name="{scope}">
 			<template #table-column-name="{scope}">
@@ -20,13 +26,27 @@
         		<el-input v-model="search" placeholder="搜索客户" size="big" clearable="true" style="width:300px;" ref="customSearchRef" @input="changeSearch()" @focus="search=''"></el-input>
         		<el-input v-model="search" placeholder="搜索客户" size="big" clearable="true" style="width:300px;" ref="customSearchRef" @input="changeSearch()" @focus="search=''"></el-input>
 			</template>
 			</template>
 
 
+			<book-custom-record ref="bookCustomRecord" :itemData="bookCustomRecordData" />
+			<book-custom-on-record ref="bookCustomOnRecord" :itemData="bookCustomOnRecordData" />
+
+			<book-custom-road-record ref="bookCustomRoadRecord" :itemData="bookCustomRoadRecordData" />
+			<book-custom-cg-record ref="bookCustomCgRecord" :itemData="bookCustomCgRecordData" />
+
 		</x-crud>
 		</x-crud>
 	</div>
 	</div>
 </template>
 </template>
 <script>
 <script>
 import { mapGetters, mapActions } from 'vuex';
 import { mapGetters, mapActions } from 'vuex';
+import bookCustomRecord from './components/book-custom-record';
+import bookCustomOnRecord from './components/book-custom-on-record';
+import bookCustomCgRecord from './components/book-custom-cg-record';
+import bookCustomRoadRecord from './components/book-custom-road-record';
 export default {
 export default {
 	components: {
 	components: {
+		bookCustomRecord,
+		bookCustomOnRecord,
+		bookCustomCgRecord,
+		bookCustomRoadRecord
 	},
 	},
 	data() {
 	data() {
 		return {
 		return {
@@ -43,7 +63,11 @@ export default {
 			loading: false,
 			loading: false,
 			ghsId:0,
 			ghsId:0,
             endTime:'',
             endTime:'',
-			search:''
+			search:'',
+			bookCustomCgRecordData:{},
+			bookCustomRoadRecordData:{},
+			bookCustomOnRecordData:{},
+			bookCustomRecordData:{}
 		};
 		};
 	},
 	},
 	mounted() {
 	mounted() {
@@ -52,6 +76,30 @@ export default {
 		})
 		})
 	},
 	},
 	methods: {
 	methods: {
+		getCgRecord(info){
+			this.bookCustomCgRecordData = {customId:info.customId,customName:info.name,id:info.id}
+			setTimeout(() => {
+				this.$refs.bookCustomCgRecord.init()
+			})
+		},
+		getRoadRecord(info){
+			this.bookCustomRoadRecordData = {customId:info.customId,customName:info.name,id:info.id}
+			setTimeout(() => {
+				this.$refs.bookCustomRoadRecord.init()
+			})
+		},
+		getOnRecord(info){
+			this.bookCustomOnRecordData = {customId:info.customId,customName:info.name,id:info.id}
+			setTimeout(() => {
+				this.$refs.bookCustomOnRecord.init()
+			})
+		},
+		getBookRecord(info){
+			this.bookCustomRecordData = {customId:info.customId,customName:info.name,id:info.id}
+			setTimeout(() => {
+				this.$refs.bookCustomRecord.init()
+			})
+		},
 		changeSearch(){
 		changeSearch(){
 			let that = this
 			let that = this
 			if(this.T != null){
 			if(this.T != null){
@@ -59,7 +107,7 @@ export default {
 			}
 			}
 			this.T = setTimeout(function(){
 			this.T = setTimeout(function(){
 				that.app.refresh({search:that.search})
 				that.app.refresh({search:that.search})
-			},700)
+			},650)
 		},
 		},
 		goDetail(info){
 		goDetail(info){
 			let query = {customId:info.customId,customName:info.name}
 			let query = {customId:info.customId,customName:info.name}
@@ -109,7 +157,7 @@ export default {
 					op: {
 					op: {
 						visible: true,
 						visible: true,
 						props: {
 						props: {
-							width: 700,
+							width: 750,
 							align: 'left',
 							align: 'left',
 							fixed: 'right',
 							fixed: 'right',
 							label: '操作'
 							label: '操作'

+ 1 - 1
ghs/src/views/in/list.vue

@@ -241,7 +241,7 @@ export default {
       }
       }
       this.T = setTimeout(function(){
       this.T = setTimeout(function(){
         that.app.refresh({ status: that.tabIndex,searchTime:that.searchTime,startTime:that.startTime,endTime:that.endTime,search:that.searchContent,cgStaffId:that.currentCgStaffId})
         that.app.refresh({ status: that.tabIndex,searchTime:that.searchTime,startTime:that.startTime,endTime:that.endTime,search:that.searchContent,cgStaffId:that.currentCgStaffId})
-      },700)			
+      },650)			
 		},
 		},
 		exportData(){
 		exportData(){
 			this.$service.purchaseOrder.getOrderList({status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,export:1,pageSize:9999999}).then(res => {
 			this.$service.purchaseOrder.getOrderList({status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,export:1,pageSize:9999999}).then(res => {

+ 1 - 1
ghs/src/views/order/book.vue

@@ -196,7 +196,7 @@ export default {
       }
       }
       this.T = setTimeout(function(){
       this.T = setTimeout(function(){
         that.app.refresh({status:this.tabIndex,search:this.search})
         that.app.refresh({status:this.tabIndex,search:this.search})
-      },700)			
+      },650)			
 		},
 		},
     exportStockAssign(){
     exportStockAssign(){
 			this.$service.statBook.exportStockAssign({}).then(res => {
 			this.$service.statBook.exportStockAssign({}).then(res => {