ソースを参照

Merge branch 'master' of http://git.huaml.com/zhh/front-end

shish 2 年 前
コミット
9798e5c4c5
43 ファイル変更226 行追加46 行削除
  1. 0 0
      ghs/dist/shop/css/chunk-12bdee1b.1abc13b8.css
  2. 0 0
      ghs/dist/shop/css/chunk-30f36db2.a8c34017.css
  3. 0 0
      ghs/dist/shop/css/chunk-39657c98.57190132.css
  4. 0 0
      ghs/dist/shop/css/chunk-476c887f.df139dc5.css
  5. 0 0
      ghs/dist/shop/css/chunk-477e6894.3dac31ac.css
  6. 0 0
      ghs/dist/shop/css/chunk-b054a3bc.a8c34017.css
  7. 0 0
      ghs/dist/shop/css/chunk-db5830da.0863bd3e.css
  8. 0 0
      ghs/dist/shop/css/chunk-ec3c7c54.b02f5b2b.css
  9. 1 1
      ghs/dist/shop/index.html
  10. 0 0
      ghs/dist/shop/js/app.fdaf1d04.js
  11. 0 0
      ghs/dist/shop/js/chunk-122c337f.067c95a6.js
  12. 0 0
      ghs/dist/shop/js/chunk-12bdee1b.3fe4e13a.js
  13. 0 0
      ghs/dist/shop/js/chunk-12dbe96a.9683e96c.js
  14. 0 0
      ghs/dist/shop/js/chunk-2d0e21c1.970e8cb7.js
  15. 0 0
      ghs/dist/shop/js/chunk-2d0e21c1.f6d89ad1.js
  16. 0 0
      ghs/dist/shop/js/chunk-30f36db2.c6878a02.js
  17. 0 0
      ghs/dist/shop/js/chunk-33345896.23eb6f65.js
  18. 0 0
      ghs/dist/shop/js/chunk-39657c98.46fb9495.js
  19. 0 0
      ghs/dist/shop/js/chunk-476c887f.d1152d06.js
  20. 0 0
      ghs/dist/shop/js/chunk-477e6894.fbaf7a38.js
  21. 0 0
      ghs/dist/shop/js/chunk-5835fc22.6f817b6e.js
  22. 0 0
      ghs/dist/shop/js/chunk-5e023f6e.7350586b.js
  23. 0 0
      ghs/dist/shop/js/chunk-b054a3bc.4600fba4.js
  24. 0 0
      ghs/dist/shop/js/chunk-db5830da.fb3cecd0.js
  25. 0 0
      ghs/dist/shop/js/chunk-e2c2728e.78bc0dd7.js
  26. 0 0
      ghs/dist/shop/js/chunk-ec3c7c54.cb1ce5cd.js
  27. 7 1
      ghs/src/service/order/index.js
  28. 14 0
      ghs/src/service/purchase-order/index.js
  29. 25 5
      ghs/src/views/home.vue
  30. 15 3
      ghs/src/views/in/change.vue
  31. 51 11
      ghs/src/views/in/list.vue
  32. 19 2
      ghs/src/views/member/list.vue
  33. 10 3
      ghs/src/views/order/add.vue
  34. 54 11
      ghs/src/views/order/list.vue
  35. 1 1
      ghsApp/src/admin/billing/index2.vue
  36. 1 1
      ghsApp/src/admin/breakage/index.vue
  37. 1 1
      ghsApp/src/admin/changePrice/changeStock2.vue
  38. 1 2
      ghsApp/src/admin/changePrice/list2.vue
  39. 1 1
      ghsApp/src/admin/item/list2.vue
  40. 22 0
      ghsApp/src/mixins/product2.js
  41. 1 1
      ghsApp/src/pagesPurchase/add.vue
  42. 1 1
      ghsApp/src/pagesStorehouse/allot/exSelect.vue
  43. 1 1
      ghsApp/src/pagesStorehouse/inventory/select2.vue

ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/css/chunk-12bdee1b.1abc13b8.css


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/css/chunk-30f36db2.a8c34017.css


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/css/chunk-39657c98.57190132.css


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/css/chunk-476c887f.df139dc5.css


+ 0 - 0
ghs/dist/shop/css/chunk-e2c2728e.3dac31ac.css → ghs/dist/shop/css/chunk-477e6894.3dac31ac.css


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/css/chunk-b054a3bc.a8c34017.css


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/css/chunk-db5830da.0863bd3e.css


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/css/chunk-ec3c7c54.b02f5b2b.css


+ 1 - 1
ghs/dist/shop/index.html

@@ -43,4 +43,4 @@
 			.once .sub-title {
 				color: #ababab;
 				font-size: 12px;
-			}</style><link href="/css/app.ae6e08b6.css" rel="preload" as="style"><link href="/css/chunk-libs.ce660555.css" rel="preload" as="style"><link href="/js/app.7f935714.js" rel="preload" as="script"><link href="/js/chunk-libs.c536e65e.js" rel="preload" as="script"><link href="/css/chunk-libs.ce660555.css" rel="stylesheet"><link href="/css/app.ae6e08b6.css" rel="stylesheet"></head><body><noscript></noscript><div id="app"><div class="once"><div class="container"><div class="title">正在加载资源</div><div class="sub-title">初次加载资源可能需要较多时间 请耐心等待</div></div><div class="footer"><a href="https://www.baidu.com/" target="_blank">花卉宝</a></div></div></div><script src="http://img.hzghd.com/cdn/vue/2.6.10/vue.min.js"></script><script src="http://img.hzghd.com/cdn/vue-router/3.1.3/vue-router.min.js"></script><script src="http://img.hzghd.com/cdn/vuex/3.1.1/vuex.min.js"></script><script src="http://img.hzghd.com/cdn/clipboard.js/2.0.4/clipboard.min.js"></script><script src="http://img.hzghd.com/cdn/axios/0.19.0-beta.1/axios.min.js"></script><script src="http://img.hzghd.com/cdn/nprogress/0.2.0/nprogress.min.js"></script><script src="http://img.hzghd.com/cdn/Mock.js/1.0.1-beta3/mock-min.js"></script><script src="http://img.hzghd.com/cdn/quill/2.0.0-dev.3/quill.min.js"></script><script src="http://img.hzghd.com/cdn/element-ui/2.13.0/index.js"></script><script src="http://img.hzghd.com/cdn/viewerjs/1.3.7/viewer.min.js"></script><script src="http://img.hzghd.com/cdn/echarts/4.4.0-rc.1/echarts.min.js"></script><script src="http://img.hzghd.com/cdn/npm/vue-echarts@4.0.2.js"></script><script src="/js/chunk-libs.c536e65e.js"></script><script src="/js/app.7f935714.js"></script></body></html>
+			}</style><link href="/css/app.ae6e08b6.css" rel="preload" as="style"><link href="/css/chunk-libs.ce660555.css" rel="preload" as="style"><link href="/js/app.fdaf1d04.js" rel="preload" as="script"><link href="/js/chunk-libs.c536e65e.js" rel="preload" as="script"><link href="/css/chunk-libs.ce660555.css" rel="stylesheet"><link href="/css/app.ae6e08b6.css" rel="stylesheet"></head><body><noscript></noscript><div id="app"><div class="once"><div class="container"><div class="title">正在加载资源</div><div class="sub-title">初次加载资源可能需要较多时间 请耐心等待</div></div><div class="footer"><a href="https://www.baidu.com/" target="_blank">花卉宝</a></div></div></div><script src="http://img.hzghd.com/cdn/vue/2.6.10/vue.min.js"></script><script src="http://img.hzghd.com/cdn/vue-router/3.1.3/vue-router.min.js"></script><script src="http://img.hzghd.com/cdn/vuex/3.1.1/vuex.min.js"></script><script src="http://img.hzghd.com/cdn/clipboard.js/2.0.4/clipboard.min.js"></script><script src="http://img.hzghd.com/cdn/axios/0.19.0-beta.1/axios.min.js"></script><script src="http://img.hzghd.com/cdn/nprogress/0.2.0/nprogress.min.js"></script><script src="http://img.hzghd.com/cdn/Mock.js/1.0.1-beta3/mock-min.js"></script><script src="http://img.hzghd.com/cdn/quill/2.0.0-dev.3/quill.min.js"></script><script src="http://img.hzghd.com/cdn/element-ui/2.13.0/index.js"></script><script src="http://img.hzghd.com/cdn/viewerjs/1.3.7/viewer.min.js"></script><script src="http://img.hzghd.com/cdn/echarts/4.4.0-rc.1/echarts.min.js"></script><script src="http://img.hzghd.com/cdn/npm/vue-echarts@4.0.2.js"></script><script src="/js/chunk-libs.c536e65e.js"></script><script src="/js/app.fdaf1d04.js"></script></body></html>

ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/app.fdaf1d04.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-122c337f.067c95a6.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-12bdee1b.3fe4e13a.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-12dbe96a.9683e96c.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-2d0e21c1.970e8cb7.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-2d0e21c1.f6d89ad1.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-30f36db2.c6878a02.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-33345896.23eb6f65.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-39657c98.46fb9495.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-476c887f.d1152d06.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-477e6894.fbaf7a38.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-5835fc22.6f817b6e.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-5e023f6e.7350586b.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-b054a3bc.4600fba4.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-db5830da.fb3cecd0.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-e2c2728e.78bc0dd7.js


ファイルの差分が大きいため隠しています
+ 0 - 0
ghs/dist/shop/js/chunk-ec3c7c54.cb1ce5cd.js


+ 7 - 1
ghs/src/service/order/index.js

@@ -87,6 +87,12 @@ export class OrderService extends BaseService {
 		return baseUrl + `/order/down?id=${id}&all=${all}&token=${store.state.user.token}`;
 	}
 
-}
+	cloudPrintOrder(data) {
+		return this.request({
+			url: '/cloud-print-order',
+			params: data
+		});
+	}
 
+}
 export default new OrderService();

+ 14 - 0
ghs/src/service/purchase-order/index.js

@@ -24,5 +24,19 @@ export class PurchaseOrderService extends BaseService {
 		});
 	}
 
+	cancelOrder(data) {
+		return this.request({
+			url: '/cancel',
+			params: data
+		});
+	}
+
+	printBill(data) {
+		return this.request({
+			url: '/print-bill',
+			params: data
+		});
+	}
+
 }
 export default new PurchaseOrderService();

+ 25 - 5
ghs/src/views/home.vue

@@ -73,7 +73,7 @@ export default {
 					url: '/order/list?status=1'
 				},
 				{
-					name: '配送中订单',
+					name: '待收货订单',
 					val: '',
 					url: '/order/list?status=3'
 				},
@@ -95,12 +95,12 @@ export default {
 			],
 			entryData: [
 				{
-					name: '开单',
+					name: '开单 Ctrl+,',
 					icon: 'icondingdanguanli',
 					url: '/order/add'
 				},
 				{
-					name: '采购',
+					name: '采购 Ctrl+.',
 					icon: 'icondingdanguanli',
 					url: '/in/add'
 				},
@@ -176,6 +176,26 @@ export default {
 		};
 	},
 	mounted() {
+
+		let that = this;
+		document.onkeydown=function(e) {
+			console.log(e)
+			if(e && e.key == 'Enter' && e.ctrlKey){
+				if(that.showCommitPop == true){
+				that.createOrder()
+				}else{
+				that.$message({message: '不在结算页',type: 'warning'})
+				}
+			}
+			if(e && e.key == ',' && e.ctrlKey){
+				let query = {}
+				that.$router.push({path:'/order/add',query})
+			}
+			if(e && e.key == '.' && e.ctrlKey){
+				let query = {}
+				that.$router.push({path:'/in/add',query})
+			}
+		}
 		this.init();
 	},
 	methods: {
@@ -194,7 +214,7 @@ export default {
 					this.promptModal = true;
 				}
 				setTimeout(() => {
-					this.initChart();
+					//this.initChart();
 				});
 				// total
 				this.totalData[0].val = `¥${res.todayData.income}`;
@@ -221,7 +241,7 @@ export default {
 			});
 		},
 		initChart() {
-			this.$refs.incomeEchart.initChart();
+			//this.$refs.incomeEchart.initChart();
 		},
 		noticeFn(item) {
 			window.open(item.url);

+ 15 - 3
ghs/src/views/in/change.vue

@@ -51,11 +51,18 @@
                 </el-table-column>
             </el-table>
             <div style="text-align:left;margin-top:18px;">
-                <el-button @click="goBackFn" plain>稍后入库</el-button>
+                <el-button @click="goBackFn" plain v-if="info.status != 3">返回</el-button>
+				<el-button @click="goBackFn" plain v-else>稍后入库</el-button>
+
                 <el-button v-if="info.status == 3" type="success" @click="savePrice">保存价格,稍后入库</el-button>
                 <el-button v-if="info.status == 3" type="danger" @click="confirmIn">仅入库不改价</el-button>
                 <el-button v-if="info.status != 3" type="primary" @click="commitChange(2)">确认改价</el-button>
                 <el-button v-if="info.status == 3" type="primary" @click="commitChange(1)">改价并入库</el-button>
+
+
+				<el-button type="primary" @click="printOrder()" style="margin-left:100px;" v-if="info.status != 5">打小票</el-button>
+				<el-button disabled v-else>打小票</el-button>
+
             </div>
         </div>
 	</div>
@@ -88,6 +95,11 @@ export default {
         }
     },
     methods: {
+		printOrder(){
+			this.$service.purchaseOrder.printBill({id:this.id}).then(data => {
+          		this.$notify({ title: '已打印', message: '操作成功', type: 'success'})
+      		})
+		},
 		confirmIn(){
 			let that = this
             this.$confirm('确认只入库不改价?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
@@ -125,7 +137,7 @@ export default {
 				}
 			})
 			if(hasError){
-				this.$msg(errorHint)
+				this.$message({message: errorHint,type: 'warning'})
 				return false
 			}
 			this.$confirm('确认保存?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
@@ -168,7 +180,7 @@ export default {
 				}
 			})
 			if(hasError){
-				this.$msg(errorHint)
+				this.$message({message: errorHint,type: 'warning'})
 				return false
 			}
 			let hint = '确认提交?'

+ 51 - 11
ghs/src/views/in/list.vue

@@ -3,7 +3,7 @@
     <x-crud class="liu-crud-wrap order-list-wrap" @load="onLoad">
 
       <template #slot-tabs>
-        <el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="handleClick">
+        <el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="changeTab">
           <el-tab-pane
               v-for="(item, index) in tabsData"
               :key="index"
@@ -48,20 +48,30 @@
 
       <template #table-column-status="{scope}">
         <span v-if="scope.row.status == 2">待发货</span>
-        <span v-else-if="scope.row.status == 3">待入库</span>
+        <span v-else-if="scope.row.status == 3" style="color:blue;font-weight:bold;font-size:14px;">待入库</span>
         <span v-else-if="scope.row.status == 4">已入库</span>
         <span v-else-if="scope.row.status == 5">已取消</span>
         <span v-else>待付款</span>
       </template>
 
       <template #slot-column-option="{scope}">
-        <el-button @click.stop="changePrice(scope.row)" size="small" type="primary">改价入库</el-button>
+
+        <el-button size="small" v-if="scope.row.status == 5">改价入库</el-button>
+        <el-button @click.stop="changePrice(scope.row)" size="small" type="success" v-else-if="scope.row.status == 4">修改价格</el-button>
+        <el-button @click.stop="changePrice(scope.row)" size="small" type="primary" v-else>改价入库</el-button>
+
         <el-button @click.stop="detailShowFn(scope.row)" size="small" type="success">详情</el-button>
-        <el-button @click.stop="detailShowFn(scope.row)" size="small" type="primary">取消</el-button>
+        
+        <el-button size="small" v-if="scope.row.status == 5 || scope.row.status == 1">打小票</el-button>
+        <el-button @click.stop="printOrder(scope.row)" size="small" type="primary" v-else>打小票</el-button>
+
+        <el-button @click.stop="cancelOrder(scope.row)" size="small" type="primary" v-if="scope.row.status == 3 || scope.row.status == 2 || scope.row.status == 1">取消</el-button>
+        <el-button size="small" v-else>取消</el-button>
       </template>
 
       <template #slot-new-cg>
-				<el-button type="primary" size="mini" style="margin-left:50px;" @click="newCg()">新增采购</el-button>
+        <el-button type="primary" size="mini" style="margin-left:50px;" @click="billing()">开单 Ctrl + ,</el-button>
+				<el-button type="primary" size="mini" style="margin-left:50px;" @click="newCg()">新增采购 Ctrl + .</el-button>
 			</template>
 
     </x-crud>
@@ -87,17 +97,17 @@ export default {
         },
         {
           text: '待入库',
-          key: '1',
+          key: '3',
           val: 0
         },
         {
           text: '已入库',
-          key: '2',
+          key: '4',
           val: 0
         },
         {
           text: '已取消',
-          key: '3',
+          key: '5',
           val: 0
         }
       ],
@@ -108,7 +118,24 @@ export default {
   created() {
     this.init();
   },
+	mounted() {
+		let that = this;
+		document.onkeydown=function(e) {
+			if(e && e.key == ',' && e.ctrlKey){
+				let query = {}
+				that.$router.push({path:'/order/add',query})
+			}
+			if(e && e.key == '.' && e.ctrlKey){
+				let query = {}
+				that.$router.push({path:'/in/add',query})
+			}
+		}
+	},
   methods: {
+    billing(){
+			let query = {}
+			this.$router.push({path:'/order/add',query})
+    },
     newCg(){
 			let query = {}
 			this.$router.push({path:'/in/add',query})
@@ -143,13 +170,26 @@ export default {
       query.backType = 'list'
       this.$router.push({path:'/in/change',query})
     },
+    printOrder(item){
+      this.$service.purchaseOrder.printBill({id:item.id}).then(data => {
+          this.$notify({ title: '已打印', message: '操作成功', type: 'success'})
+      })
+    },
+    cancelOrder(item){
+			this.$confirm('确认取消?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
+        this.$service.purchaseOrder.cancelOrder({id:item.id}).then(data => {
+          this.$notify({ title: '已取消', message: '操作成功', type: 'success'})
+          this.app.refresh({ status: this.tabIndex})
+        })
+			})
+    },
     detailShowFn(item) {
       this.optionData = item;
       setTimeout(() => {
         this.$refs.orderDetail.init();
       });
     },
-    handleClick(tab, e) {
+    changeTab(tab, e) {
       this.app.refresh({ status: this.tabIndex});
     },
     onLoad({ ctx, app }) {
@@ -164,7 +204,7 @@ export default {
                 prop: 'orderSn',
                 label: '单号',
                 align: 'center',
-                width: '160'
+                width: '130'
               },
               {
                 prop: 'supplierName',
@@ -244,7 +284,7 @@ export default {
             op: {
               visible: true,
               props: {
-                width: 300,
+                width: 320,
                 align: 'center',
                 fixed: 'right',
                 label: '操作'

+ 19 - 2
ghs/src/views/member/list.vue

@@ -69,7 +69,8 @@
 			</template>
 			
 			<template #slot-billing>
-				<el-button type="primary" size="mini" style="margin-left:50px;" @click="billing()">开单</el-button>
+				<el-button type="primary" size="mini" style="margin-left:50px;" @click="billing()">开单 Ctrl+,</el-button>
+				<el-button type="primary" size="mini" style="margin-left:50px;" @click="newCg()">新增采购 Ctrl+.</el-button>
 			</template>
 
 			<template #table-column-name="{scope}">
@@ -159,9 +160,25 @@ export default {
 	created() {
 		this.getLevel();
 	},
-	mounted() {},
+	mounted() {
+		let that = this;
+		document.onkeydown=function(e) {
+			if(e && e.key == ',' && e.ctrlKey){
+				let query = {}
+				that.$router.push({path:'/order/add',query})
+			}
+			if(e && e.key == '.' && e.ctrlKey){
+				let query = {}
+				that.$router.push({path:'/in/add',query})
+			}
+		}
+	},
 	methods: {
 		...mapActions(['getLevel']),
+		newCg(){
+			let query = {}
+			this.$router.push({path:'/in/add',query})
+		},
 		billing(){
 			let query = {}
 			this.$router.push({path:'/order/add',query})

+ 10 - 3
ghs/src/views/order/add.vue

@@ -288,7 +288,9 @@ export default {
       currentItem:{},
       classList:[],
       changeType:'add',
-      TT:null
+      TT:null,
+      defaultGetStaffName:'',
+      defaultGetStaffId:0,
     };
   },
 	mixins: [productMins],
@@ -424,6 +426,8 @@ export default {
         that.setSendType(0)
         that.setTransType(4)
         that.form.hasPay = 2
+        that.form.getStaffId = that.defaultGetStaffId
+        that.form.getStaffName = that.defaultGetStaffName
         that.showCommitPop = true
       }
       if(e && e.key=='F8'){
@@ -442,8 +446,9 @@ export default {
           if(!that.$util.isEmpty(that.staffList)){
             for(const ele of that.staffList){
               if(currentStaff.id == ele.id){
-                that.form.getStaffId = ele.id
-                that.form.getStaffName = ele.name
+
+                that.defaultGetStaffName = ele.name
+                that.defaultGetStaffId = ele.id
               }
             }
           }
@@ -614,6 +619,8 @@ export default {
     formReset(){
       this.form.customId = 0
       this.form.customName = ''
+      this.form.getStaffId = 0
+      this.form.getStaffName = ''
       this.$nextTick(() => {
         this.$refs.customref.focus()
       })

+ 54 - 11
ghs/src/views/order/list.vue

@@ -66,11 +66,18 @@
       </template>
 
       <template #slot-column-option="{scope}">
+        <el-button v-if="scope.row.status != 1 && scope.row.status != 5" @click.stop="beginPrint(scope.row)" size="small" type="primary">打小票</el-button>
+        <el-button v-else size="small">打小票</el-button>
+
         <el-button v-if="scope.row.status != 1 && scope.row.status != 5" @click.stop="printOrder(scope.row)" size="small" type="primary">打A4</el-button>
-        <el-button v-else disabled size="small">打A4</el-button>
+        <el-button v-else size="small">打A4</el-button>
         <el-button @click.stop="detailShowFn(scope.row)" size="small" type="success">详情</el-button>
-        <el-button @click.stop="down(scope.row)" size="small" type="primary">下载</el-button>
-        <el-button @click.stop="allDown(scope.row)" size="small" type="primary">全部下载</el-button>
+        
+        <el-button @click.stop="down(scope.row)" size="small" type="primary" v-if="scope.row.status!=5 && scope.row.status!=1">下载</el-button>
+        <el-button size="small" v-else>下载</el-button>
+
+        <el-button @click.stop="allDown(scope.row)" size="small" type="primary" v-if="scope.row.status!=5 && scope.row.status!=1 && scope.row.sameTimeIdsNum>1">全部下载</el-button>
+        <el-button size="small" v-else>全部下载</el-button>
       </template>
 
       <template #slot-order-book="{scope}">
@@ -82,7 +89,8 @@
       </template>
 
       <template #slot-billing>
-				<el-button type="primary" size="mini" style="margin-left:50px;" @click="billing()">开单</el-button>
+				<el-button type="primary" size="mini" style="margin-left:50px;" @click="billing()">开单 Ctrl + ,</el-button>
+        <el-button type="primary" size="mini" style="margin-left:50px;" @click="newCg()">新增采购 Ctrl + .</el-button>
 			</template>
 
     </x-crud>
@@ -194,7 +202,24 @@ export default {
   created() {
     this.init();
   },
+	mounted() {
+		let that = this;
+		document.onkeydown=function(e) {
+			if(e && e.key == ',' && e.ctrlKey){
+				let query = {}
+				that.$router.push({path:'/order/add',query})
+			}
+			if(e && e.key == '.' && e.ctrlKey){
+				let query = {}
+				that.$router.push({path:'/in/add',query})
+			}
+		}
+	},
   methods: {
+		newCg(){
+			let query = {}
+			this.$router.push({path:'/in/add',query})
+		},
     billing(){
 			let query = {}
 			this.$router.push({path:'/order/add',query})
@@ -224,6 +249,24 @@ export default {
       // this.$store.dispatch('getCategory');
       this.$store.dispatch('getUsage');
     },
+    beginPrint(item){
+      if(item.printNum && Number(item.printNum)>0){
+          this.$confirm('请检查是否发过货,确认补打?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { 
+            this.printBilling(item)
+          })
+      }else{
+        this.printBilling(item)
+      }
+    },
+    printBilling(item){
+      this.$service.order.cloudPrintOrder({id:item.id}).then(data => {
+          if(data.hasNoPrint && data.hasNoPrint == 1){
+            this.$confirm('请先设置打印小票机', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { })
+          }else{
+            this.$notify({ title: '已打印', message: '操作成功', type: 'success'})
+          }
+      })
+    },
     printOrder(info){
 			this.$service.order.info({ id: info.id }).then(res => {
         let printData = res.printData ? res.printData : ''
@@ -298,7 +341,7 @@ export default {
                 prop: 'customMobile',
                 label: '手机号',
                 align: 'center',
-                width: '110'
+                width: '100'
               },
               {
                 prop: 'bigNum',
@@ -314,15 +357,15 @@ export default {
               },
               {
                 prop: 'book',
-                label: '预订',
+                label: '预订',
                 align: 'center',
-                width: '70'
+                width: '50'
               },
               {
                 prop: 'sendTimeWant',
                 label: '预订发货',
                 align: 'center',
-                width: '90'
+                width: '75'
               },
               {
                 prop: 'sameTimeIdsNum',
@@ -359,13 +402,13 @@ export default {
                 prop: 'addTime',
                 label: '开单时间',
                 align: 'center',
-                width: 110
+                width: 90
               },
               {
                 prop: 'status',
                 label: '状态',
                 align: 'center',
-                width: 90
+                width: 70
               }
             ],
             on: {
@@ -384,7 +427,7 @@ export default {
             op: {
               visible: true,
               props: {
-                width: 350,
+                width: 430,
                 align: 'center',
                 fixed: 'right',
                 label: '操作'

+ 1 - 1
ghsApp/src/admin/billing/index2.vue

@@ -26,9 +26,9 @@
 				<!--花材列表-->
 				<block v-if="!$util.isEmpty(globalItemData)">
 					<view class="item_list_bx selectAll">
-						<view class="item_list_title"></view>
 						<view v-if="!$util.isEmpty(globalItemData)">
 							<template v-for="(productItem, productIndex) in globalItemData">
+								<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 								<view style="height: 175upx" :key="productIndex">
 									<Commondity
 										:globalCheckStock="true"

+ 1 - 1
ghsApp/src/admin/breakage/index.vue

@@ -26,8 +26,8 @@
 			:scroll-top="globalScrollTopPlace" @scroll="globalGetScroll" lower-threshold="100" @scrolltolower="globalScrollBottom">
 				<block v-if="!$util.isEmpty(globalItemData)">
 					<view class="item_list_bx selectAll">
-						<view class="item_list_title"></view>
 						<template v-for="(productItem, productIndex) in globalItemData">
+							<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 							<view style="height: 175upx" :key="productIndex">
 								<Commondity
 									:checkStock="true"

+ 1 - 1
ghsApp/src/admin/changePrice/changeStock2.vue

@@ -25,9 +25,9 @@
 
 				<block v-if="!$util.isEmpty(globalItemData)">
 					<view class="item_list_bx selectAll">
-						<view class="item_list_title"></view>
 						<view v-if="!$util.isEmpty(globalItemData)">
 							<template v-for="(productItem, productIndex) in globalItemData">
+								<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 								<view style="height:190upx" :key="productIndex">
 									<ItemComponent :isPrice="false" :info="productItem" @saveStock="saveStock" :ref="`productRef${productItem.id}`" 
 									@hideChangeFn="hideChangeFn" @cancelPreSellFn="cancelPreSellFn">

+ 1 - 2
ghsApp/src/admin/changePrice/list2.vue

@@ -29,11 +29,10 @@
 
 				<block v-if="!$util.isEmpty(globalItemData)">
 					<view class="item_list_bx selectAll">
-						<view class="item_list_title"></view>
-
 						<view v-if="!$util.isEmpty(globalItemData)">
 
 							<template v-for="(productItem, productIndex) in globalItemData">
+								<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 								<view style="height:230upx" :key="productIndex">
 									<ItemComponent :isPrice="false" :info="productItem" @hideChangeFn="hideChangeFn" :ref="`productRef${productItem.id}`"
 									@savePrice="savePrice" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff" @cancelPreSellFn="cancelPreSellFn"></ItemComponent>

+ 1 - 1
ghsApp/src/admin/item/list2.vue

@@ -22,9 +22,9 @@
 					lower-threshold="120" @scrolltolower="globalScrollBottom">
 					<block v-if="!$util.isEmpty(globalItemData)">
 						<view class="item_list_bx selectAll">
-							<view class="item_list_title"></view>
 							<view v-if="!$util.isEmpty(globalItemData)">
 								<template v-for="(productItem, productIndex) in globalItemData">
+									<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 									<view style="height:255upx" :key="productIndex">
 										<ItemStock :info="productItem" @moreAction="moreAction" 
 										@doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"

+ 22 - 0
ghsApp/src/mixins/product2.js

@@ -31,6 +31,7 @@ export default {
 			globalCustomId:0,
 			globalClassData:[],
 			globalClassId:0,
+			globalClassDataIndex:[],
 			globalFinishGetItem:0,
 			globalPage:1,
 			globalPy:'',
@@ -142,6 +143,7 @@ export default {
 			getMenu().then(res=>{
 				if(res.code == 1){
 					that.globalClassData = res.data.class ? res.data.class : []
+					that.globalClassDataIndex = res.data.classIndex ? res.data.classIndex : []
 					if(that.globalClassData[0]){
 						that.globalClassId = that.globalClassData[0].id
 						//保存到仓库
@@ -178,6 +180,13 @@ export default {
 				}
 			})
         },
+		sorts_fun(arr) {
+			return function(a, b) {
+				var v1 = a[arr];
+				var v2 = b[arr];
+				return v1 - v2;
+			}
+		},
 		globalRememberRefresh(){
 			let that = this
 			if(that.$util.isEmpty(that.globalItemData)){
@@ -191,9 +200,13 @@ export default {
 			}
 			//修改数据需要复制一份,否则不会生效
 			that.globalItemData = copyObject(that.globalItemData);
+
+			that.globalItemData = that.globalItemData.sort(this.sorts_fun('classId'))
+			let hasExists = []
 			for (let i=0;i<that.globalItemData.length;i++){
 				let currentProduct = that.globalItemData[i]
 				let currentPId = currentProduct.id
+				let currentClassId = currentProduct.classId||0
 				let selectProduct = selectListData[currentPId] || []
 				if(!that.$util.isEmpty(selectProduct)){
 					that.globalItemData[i].bigCount = selectProduct.bigCount || 0
@@ -204,6 +217,15 @@ export default {
 					that.globalItemData[i].userPrice = 0
 					that.globalItemData[i].smallCount = 0
 				}
+				let cName = ''
+				if(hasExists[currentClassId]){
+					//无操作
+				}else{
+					let currentClass = this.globalClassDataIndex[currentClassId] ? this.globalClassDataIndex[currentClassId] : null
+					cName = currentClass.name ? currentClass.name : ''
+					hasExists[currentClassId] = 1
+				}
+				that.globalItemData[i].className = cName
 			}
 		},
 		globalSwitchClass(cur,item) {

+ 1 - 1
ghsApp/src/pagesPurchase/add.vue

@@ -26,8 +26,8 @@
 			 lower-threshold="100" @scrolltolower="globalScrollBottom">
 				<block v-if="!$util.isEmpty(globalItemData)">
 					<view class="item_list_bx selectAll">
-						<view class="item_list_title"></view>
 						<template v-for="(productItem, productIndex) in globalItemData">
+							<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 							<view style="height:240upx" :key="productIndex">
 							<CommodityPurchase
 								:type="selectJobType"

+ 1 - 1
ghsApp/src/pagesStorehouse/allot/exSelect.vue

@@ -23,9 +23,9 @@
 				:scroll-top="globalScrollTopPlace" @scroll="globalGetScroll" lower-threshold="100" @scrolltolower="globalScrollBottom">
 				<block v-if="!$util.isEmpty(globalItemData)">
 					<view class="item_list_bx selectAll">
-						<view class="item_list_title"></view>
 						<view v-if="!$util.isEmpty(globalItemData)">
 							<template v-for="(productItem, productIndex) in globalItemData">
+								<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 								<view style="height: 175upx" :key="productIndex">
 								<Commondity
 									:key="productIndex"

+ 1 - 1
ghsApp/src/pagesStorehouse/inventory/select2.vue

@@ -27,9 +27,9 @@
 				<!--内容部分 start -->
 				<block v-if="!$util.isEmpty(globalItemData)">
 					<view class="item_list_bx selectAll">
-						<view class="item_list_title"></view>
 						<view v-if="!$util.isEmpty(globalItemData)">
 							<template v-for="(productItem, productIndex) in globalItemData">
+								<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 								<view style="height:175upx" :key="productIndex">
 								<Commondity
 									:key="productIndex"

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません