shish 1 год назад
Родитель
Сommit
4629791285
2 измененных файлов с 90 добавлено и 0 удалено
  1. 1 0
      ghs/src/mock/userInfo.js
  2. 89 0
      ghs/src/views/order/add-live.vue

+ 1 - 0
ghs/src/mock/userInfo.js

@@ -161,6 +161,7 @@ let menu = {
 		{id: '303',parentId: 3,name: '预订汇总',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/book',viewPath: 'views/order/book.vue',keepAlive: 1},
 		{id: '303',parentId: 3,name: '预订客户',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/book/custom',viewPath: 'views/book/custom.vue',keepAlive: 1},
 		{id: '306',parentId: 3,name: '预订明细',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/book/itemCustom',viewPath: 'views/book/itemCustom.vue',keepAlive: 1},
+		{id: '309',parentId: 3,name: '开走播单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/add-live',viewPath: 'views/order/add-live.vue',keepAlive: 1},
 
 		{id: '15',parentId: null,name: '供货',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/in/ghs',viewPath: 'views/in/ghs.vue',keepAlive: 1},
 		{id: '1505',parentId: 15,name: '商家列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/ghs',viewPath: 'views/in/ghs.vue',keepAlive: 1},

+ 89 - 0
ghs/src/views/order/add-live.vue

@@ -0,0 +1,89 @@
+<template>
+	<div class="app-list-content">
+
+		<div>
+			<el-select @change="getCurrentItem" v-model="currentItemName" filterable remote reserve-keyword placeholder="搜索花材" clearable ref="itemSearchRef"
+			:remote-method="searchItem" style="width:300px;margin-left:30px;margin-top:30px;">
+				<el-option v-for="item in itemList" :key="item.id" :label="`${item.name}(${item.id})`" :value="item.id"> </el-option>
+			</el-select>
+			<el-input v-model="price" placeholder="请输入价格" style="width:200px;margin-left:10px;"></el-input>
+		</div>
+
+		<div>
+			<el-select @change="getCurrentCustom" v-model="currentCustomName" filterable remote reserve-keyword placeholder="搜索客户" clearable ref="customSearchRef"
+			:remote-method="searchCustom" style="width:300px;margin-left:30px;margin-top:30px;">
+				<el-option v-for="item in customList" :key="item.id" :label="`${item.name}(${item.id})`" :value="item"> </el-option>
+			</el-select>
+		</div>
+
+	</div>
+</template>
+<script>
+import { mapGetters, mapActions } from 'vuex';
+export default {
+	components: {
+
+	},
+	data() {
+		return {
+			currentItemName:'',
+			itemList: [],
+			customList:[],
+			price:'',
+			currentCustomName:'',
+			selectCustomList:[],
+		};
+	},
+	computed: {
+		...mapGetters({ levelData: 'level' }),
+		...mapGetters(['token'])
+	},
+	mounted() {
+		this.$nextTick(() => {
+      		this.$refs.itemSearchRef.focus()
+    	})
+	},
+	methods: {
+		...mapActions(['getLevel']),
+		getCurrentCustom(e){
+			let that = this
+			console.log(e)
+			this.currentCustomName = ''
+			this.$nextTick(() => {
+				//this.$refs.customSearchRef.focus()
+			})
+		},
+		getCurrentItem(e){
+			console.log(e)
+		},
+		searchItem(query) {
+			let that = this
+			if (query !== '') {
+				this.loading = true;
+				this.$service.product.list({name:query,delStatus:0}).then(res=>{
+					that.loading = false
+					that.itemList = res.list	
+				})
+			} else {
+				this.itemList = []
+			}
+		},
+		searchCustom(query) {
+			let that = this
+			if (query !== '') {
+				this.loading = true;
+				this.$service.custom.list({name:query}).then(res=>{
+					that.customList = res.list	
+				})
+			} else {
+				this.customList = []
+			}
+		},
+	}
+};
+</script>
+<style lang="scss" scoped>
+.app-list-content{
+	background-color: white;
+}
+</style>