shish 5 lat temu
rodzic
commit
37ca8f20bd

Plik diff jest za duży
+ 0 - 0
ghs/dist/shop/css/chunk-5dd145f6.7367d810.css


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

@@ -43,4 +43,4 @@
 			.once .sub-title {
 			.once .sub-title {
 				color: #ababab;
 				color: #ababab;
 				font-size: 12px;
 				font-size: 12px;
-			}</style><link href="/css/app.6f07e55a.css" rel="preload" as="style"><link href="/css/chunk-libs.2e1e87b5.css" rel="preload" as="style"><link href="/js/app.4f7e6f93.js" rel="preload" as="script"><link href="/js/chunk-libs.1c1e0cb4.js" rel="preload" as="script"><link href="/css/chunk-libs.2e1e87b5.css" rel="stylesheet"><link href="/css/app.6f07e55a.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="https://img.wixhb.com/cdn/vue/2.6.10/vue.min.js"></script><script src="https://img.wixhb.com/cdn/vue-router/3.1.3/vue-router.min.js"></script><script src="https://img.wixhb.com/cdn/vuex/3.1.1/vuex.min.js"></script><script src="https://img.wixhb.com/cdn/clipboard.js/2.0.4/clipboard.min.js"></script><script src="https://img.wixhb.com/cdn/axios/0.19.0-beta.1/axios.min.js"></script><script src="https://img.wixhb.com/cdn/nprogress/0.2.0/nprogress.min.js"></script><script src="https://img.wixhb.com/cdn/Mock.js/1.0.1-beta3/mock-min.js"></script><script src="https://img.wixhb.com/cdn/quill/2.0.0-dev.3/quill.min.js"></script><script src="https://img.wixhb.com/cdn/element-ui/2.13.0/index.js"></script><script src="https://img.wixhb.com/cdn/viewerjs/1.3.7/viewer.min.js"></script><script src="https://img.wixhb.com/cdn/echarts/4.4.0-rc.1/echarts.min.js"></script><script src="https://img.wixhb.com/cdn/npm/vue-echarts@4.0.2.js"></script><script src="/js/chunk-libs.1c1e0cb4.js"></script><script src="/js/app.4f7e6f93.js"></script></body></html>
+			}</style><link href="/css/app.6f07e55a.css" rel="preload" as="style"><link href="/css/chunk-libs.2e1e87b5.css" rel="preload" as="style"><link href="/js/app.56417c25.js" rel="preload" as="script"><link href="/js/chunk-libs.1c1e0cb4.js" rel="preload" as="script"><link href="/css/chunk-libs.2e1e87b5.css" rel="stylesheet"><link href="/css/app.6f07e55a.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="https://img.wixhb.com/cdn/vue/2.6.10/vue.min.js"></script><script src="https://img.wixhb.com/cdn/vue-router/3.1.3/vue-router.min.js"></script><script src="https://img.wixhb.com/cdn/vuex/3.1.1/vuex.min.js"></script><script src="https://img.wixhb.com/cdn/clipboard.js/2.0.4/clipboard.min.js"></script><script src="https://img.wixhb.com/cdn/axios/0.19.0-beta.1/axios.min.js"></script><script src="https://img.wixhb.com/cdn/nprogress/0.2.0/nprogress.min.js"></script><script src="https://img.wixhb.com/cdn/Mock.js/1.0.1-beta3/mock-min.js"></script><script src="https://img.wixhb.com/cdn/quill/2.0.0-dev.3/quill.min.js"></script><script src="https://img.wixhb.com/cdn/element-ui/2.13.0/index.js"></script><script src="https://img.wixhb.com/cdn/viewerjs/1.3.7/viewer.min.js"></script><script src="https://img.wixhb.com/cdn/echarts/4.4.0-rc.1/echarts.min.js"></script><script src="https://img.wixhb.com/cdn/npm/vue-echarts@4.0.2.js"></script><script src="/js/chunk-libs.1c1e0cb4.js"></script><script src="/js/app.56417c25.js"></script></body></html>

Plik diff jest za duży
+ 0 - 0
ghs/dist/shop/js/app.56417c25.js


Plik diff jest za duży
+ 0 - 0
ghs/dist/shop/js/chunk-5dd145f6.28998230.js


Plik diff jest za duży
+ 0 - 0
ghs/dist/shop/js/chunk-cad19e06.f0967672.js


+ 118 - 74
ghs/src/views/item/list.vue

@@ -8,14 +8,14 @@
         </el-tabs>
         </el-tabs>
       </template>
       </template>
 
 
-			<template #table-column-cover="{ scope }">
-				<cl-avatar
-					shape="square"
-					:size="32"
-					:src="scope.row.cover"
-					:style="{ margin: 'auto' }"
-				></cl-avatar>
-			</template>
+	<template #table-column-cover="{ scope }">
+		<cl-avatar
+			shape="square"
+			:size="32"
+			:src="scope.row.cover"
+			:style="{ margin: 'auto' }"
+		></cl-avatar>
+	</template>
 
 
       <template #table-column-goodsName="{scope}">
       <template #table-column-goodsName="{scope}">
         <span>{{ scope.row.goodsName }}</span>
         <span>{{ scope.row.goodsName }}</span>
@@ -25,20 +25,36 @@
         <span>{{ scope.row.bigUnit }} / {{scope.row.smallUnit}}</span>
         <span>{{ scope.row.bigUnit }} / {{scope.row.smallUnit}}</span>
       </template>
       </template>
 
 
+      <template #table-column-price="{scope}">
+        <span v-if="!priceInput"><span>{{ scope.row.price}}</span></span>
+		<el-input style="width:80%;" ref="sort-input" focus size="mini" v-else placeholder="" v-model="scope.row.price" @blur="changeInputValue(scope.row, 'price')" ></el-input>
+      </template>
+      <template #table-header-price>
+        <div class="set-sort">
+          <span>售价</span>
+          <el-button v-if="!priceInput" icon="el-icon-edit-outline" size="small" type="text" @click="showPriceInput" class="show"></el-button>
+          <el-button class="hide" v-else size="mini" @click="commitChange('price')" type="primary">完成</el-button>
+        </div>
+      </template>
       
       
       <template #table-column-inTurn="{scope}">
       <template #table-column-inTurn="{scope}">
         <span v-if="!sort.status">{{ scope.row.inTurn }}</span>
         <span v-if="!sort.status">{{ scope.row.inTurn }}</span>
-        <el-input style="width:50%;" ref="sort-input" focus size="mini" v-else v-model="scope.row.inTurn" @blur="changeValue(scope.row, 'inTurn')" ></el-input>
+        <el-input style="width:80%;" ref="sort-input" focus size="mini" v-else v-model="scope.row.inTurn" @blur="changeInputValue(scope.row, 'inTurn')" ></el-input>
       </template>
       </template>
 
 
       <template #table-header-inTurn>
       <template #table-header-inTurn>
         <div class="set-sort">
         <div class="set-sort">
           <span>排序</span>
           <span>排序</span>
-          <el-button v-if="!sort.status" icon="el-icon-edit-outline" size="small" type="text" @click="showSort" class="show"></el-button>
+          <el-button v-if="!sort.status" icon="el-icon-edit-outline" size="small" type="text" @click="showInTurn" class="show"></el-button>
           <el-button class="hide" v-else size="mini" @click="commitChange('inTurn')" type="primary">完成</el-button>
           <el-button class="hide" v-else size="mini" @click="commitChange('inTurn')" type="primary">完成</el-button>
         </div>
         </div>
       </template>
       </template>
 
 
+	<template #table-column-prePrice="{scope}">
+		<span>{{ (scope.row.prePrice)}}</span>
+	</template>
+	  
+
       <template #slot-modify="{ scope }">
       <template #slot-modify="{ scope }">
 				<el-button type="text" @click.native.stop="replaceBtnFn(scope.row.id,1)" >修改</el-button>
 				<el-button type="text" @click.native.stop="replaceBtnFn(scope.row.id,1)" >修改</el-button>
 				<el-button type="text" v-if="scope.row.delStatus==1" @click.native.stop="setStatusFun(scope.row.id,0)" >上架</el-button>
 				<el-button type="text" v-if="scope.row.delStatus==1" @click.native.stop="setStatusFun(scope.row.id,0)" >上架</el-button>
@@ -54,7 +70,7 @@
 		</template>
 		</template>
 		<template #table-column-cost="{scope}">
 		<template #table-column-cost="{scope}">
 			<span v-if="!costPrice">{{ scope.row.cost }}</span>
 			<span v-if="!costPrice">{{ scope.row.cost }}</span>
-			<el-input style="width:50%;" ref="sort-input" focus size="mini" v-else v-model="scope.row.cost" @blur="changeValue(scope.row, 'cost')" ></el-input>
+			<el-input style="width:80%;" ref="sort-input" focus size="mini" v-else v-model="scope.row.cost" @blur="changeInputValue(scope.row, 'cost')" ></el-input>
 		</template>
 		</template>
 		<template #table-header-addPrice="{scope}">
 		<template #table-header-addPrice="{scope}">
 			<div class="set-sort">
 			<div class="set-sort">
@@ -66,10 +82,10 @@
 		</template>
 		</template>
       	<template #table-column-addPrice="{scope}">
       	<template #table-column-addPrice="{scope}">
         <span v-if="!canAddPrice">{{ scope.row.addPrice }}</span>
         <span v-if="!canAddPrice">{{ scope.row.addPrice }}</span>
-        <el-input style="width:50%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.addPrice" @blur="changeValue(scope.row, 'addPrice')" ></el-input>
+        <el-input style="width:80%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.addPrice" @blur="changeInputValue(scope.row, 'addPrice')" ></el-input>
       </template>
       </template>
 
 
-		<template #table-header-ratio="{scope}">
+		<template #table-header-ratio>
 			<div class="set-sort">
 			<div class="set-sort">
 				<span>单位比</span>
 				<span>单位比</span>
 				<el-button v-if="!canAddRatio" icon="el-icon-edit-outline" size="small" type="text" @click="showAddRatio" class="show"></el-button>
 				<el-button v-if="!canAddRatio" icon="el-icon-edit-outline" size="small" type="text" @click="showAddRatio" class="show"></el-button>
@@ -78,7 +94,7 @@
 		</template>
 		</template>
       	<template #table-column-ratio="{scope}">
       	<template #table-column-ratio="{scope}">
         <span v-if="!canAddRatio">{{ scope.row.ratio }}</span>
         <span v-if="!canAddRatio">{{ scope.row.ratio }}</span>
-        <el-input style="width:50%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.ratio" @blur="changeValue(scope.row, 'ratio')" ></el-input>
+        <el-input style="width:80%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.ratio" @blur="changeInputValue(scope.row, 'ratio')" ></el-input>
       </template>
       </template>
 
 
 	  	<template #table-header-weight>
 	  	<template #table-header-weight>
@@ -90,7 +106,7 @@
 	  </template>
 	  </template>
 		<template #table-column-weight="{scope}">
 		<template #table-column-weight="{scope}">
 			<span v-if="!costWeight">{{ scope.row.weight }}</span>
 			<span v-if="!costWeight">{{ scope.row.weight }}</span>
-			<el-input style="width:50%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.weight" @blur="changeValue(scope.row, 'weight')"></el-input>
+			<el-input style="width:80%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.weight" @blur="changeInputValue(scope.row, 'weight')"></el-input>
 		</template>
 		</template>
 		<template #table-column-delStatus="{scope}">
 		<template #table-column-delStatus="{scope}">
 			<span>{{ scope.row.delStatus==0?'上架':'下架' }}</span>
 			<span>{{ scope.row.delStatus==0?'上架':'下架' }}</span>
@@ -242,7 +258,6 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { mapGetters } from 'vuex';
 import itemListLayer from '@/components/module/item-list-layer';
 import itemListLayer from '@/components/module/item-list-layer';
 export default {
 export default {
   name: 'item_list',
   name: 'item_list',
@@ -272,6 +287,7 @@ export default {
 	  canAddRatio:false,
 	  canAddRatio:false,
       costPrice: false,
       costPrice: false,
 	  costWeight: false,
 	  costWeight: false,
+	  priceInput:false,
       classId: 0,
       classId: 0,
       className:'',
       className:'',
       showItemModal: false,
       showItemModal: false,
@@ -352,11 +368,12 @@ export default {
   },
   },
   methods: {
   methods: {
     showCost() {
     showCost() {
-      this.initData = []
-      this.costPrice = true
-    },
-    hideCost() {
-      this.costPrice = false
+		this.initData = []
+		this.costPrice = true
+		this.priceInput = false;
+		this.sort.status = false;
+		this.canAddRatio = false;
+		this.costWeight = false;
     },
     },
     selectItemFn (currentItem) {
     selectItemFn (currentItem) {
 
 
@@ -483,25 +500,13 @@ export default {
               prop: 'name',
               prop: 'name',
               label: '名称',
               label: '名称',
               align: 'center',
               align: 'center',
-              'min-width': 180
-            },
-            {
-              prop: 'className',
-              label: '分类',
-              align: 'center',
-              'min-width': 80
-            },
-            {
-              prop: 'stockWarning',
-              label: '库存预警',
-              align: 'center',
-              'min-width': 80
+              'min-width': 160
             },
             },
             {
             {
               prop: 'cost',
               prop: 'cost',
               label: '每扎成本价',
               label: '每扎成本价',
               align: 'center',
               align: 'center',
-              'min-width': 150
+              'min-width': 140
             },
             },
             {
             {
               prop: 'addPrice',
               prop: 'addPrice',
@@ -510,10 +515,16 @@ export default {
               'min-width': 150
               'min-width': 150
             },
             },
             {
             {
-              prop: 'weight',
-              label: '重量(公斤)',
+              prop: 'prePrice',
+              label: '原价',
               align: 'center',
               align: 'center',
-              'min-width': 130
+              minWidth: 80
+            },
+            {
+              prop: 'price',
+              label: '售价',
+              align: 'center',
+              minWidth:140
             },
             },
             {
             {
               prop: 'unit',
               prop: 'unit',
@@ -527,6 +538,12 @@ export default {
               align: 'center',
               align: 'center',
               'min-width': 110
               'min-width': 110
             },
             },
+            {
+              prop: 'weight',
+              label: '重量(公斤)',
+              align: 'center',
+              'min-width': 130
+            },
             {
             {
               prop: 'inTurn',
               prop: 'inTurn',
               label: '排序',
               label: '排序',
@@ -534,15 +551,22 @@ export default {
               minWidth: 130
               minWidth: 130
             },
             },
             {
             {
-              prop: 'addTime',
-              label: '创建时间',
+              prop: 'className',
+              label: '分类',
+              align: 'center',
+              'min-width': 70
+            },
+            {
+              prop: 'stockWarning',
+              label: '库存预警',
               align: 'center',
               align: 'center',
-              minWidth: 140
-            },{
+              'min-width': 75
+            },
+			{
               prop: 'delStatus',
               prop: 'delStatus',
               label: '状态',
               label: '状态',
               align: 'center',
               align: 'center',
-              minWidth: 100
+              minWidth: 70
             }
             }
           ],
           ],
           op: {
           op: {
@@ -566,6 +590,9 @@ export default {
             placeholder: '分类名称'
             placeholder: '分类名称'
           }
           }
         })
         })
+		.set('pagination', {
+			size: 50
+		})
         .set('layout', [
         .set('layout', [
           ['slot-tabs'],
           ['slot-tabs'],
 			['search-key'],
 			['search-key'],
@@ -590,7 +617,8 @@ export default {
     },
     },
     showAddPrice(){
     showAddPrice(){
       this.initData = []
       this.initData = []
-       this.canAddPrice = true
+       this.canAddPrice = true;
+	   this.priceInput = false;
 		this.sort.status = false;
 		this.sort.status = false;
 		this.costPrice = false;
 		this.costPrice = false;
 		this.canAddRatio = false;
 		this.canAddRatio = false;
@@ -598,7 +626,8 @@ export default {
     },
     },
     showAddRatio(){
     showAddRatio(){
       this.initData = []
       this.initData = []
-       this.canAddRatio = true
+       this.canAddRatio = true;
+	   this.priceInput = false;
 		this.sort.status = false;
 		this.sort.status = false;
 		this.costPrice = false;
 		this.costPrice = false;
 		this.canAddPrice = false;
 		this.canAddPrice = false;
@@ -607,22 +636,31 @@ export default {
   	showWeight(){
   	showWeight(){
       this.initData = []
       this.initData = []
        this.costWeight = true
        this.costWeight = true
+	   this.priceInput = false;
 		this.sort.status = false;
 		this.sort.status = false;
 		this.costPrice = false;
 		this.costPrice = false;
 		this.canAddPrice = false;
 		this.canAddPrice = false;
 		this.canAddRatio = false;
 		this.canAddRatio = false;
     },
     },
-    showSort (e) {
+    showInTurn (e) {
       	this.initData = []
       	this.initData = []
 		this.sort.status = true;
 		this.sort.status = true;
+		this.priceInput = false;
 		this.costPrice = false;
 		this.costPrice = false;
 		this.canAddPrice = false;
 		this.canAddPrice = false;
 		this.canAddRatio = false;
 		this.canAddRatio = false;
 		this.costWeight = false;
 		this.costWeight = false;
     },
     },
-
-    commitChange (type) {
-      if(this.$util.isEmpty(this.initData)){
+	showPriceInput(e){
+      	this.initData = []
+		this.priceInput = true;
+		this.sort.status = false;
+		this.costPrice = false;
+		this.canAddPrice = false;
+		this.canAddRatio = false;
+		this.costWeight = false;
+	},
+	hiddenInput(type){
       	switch (type) {
       	switch (type) {
 			case 'inTurn':
 			case 'inTurn':
 				this.sort.status = false;
 				this.sort.status = false;
@@ -639,39 +677,43 @@ export default {
 			case 'weight':
 			case 'weight':
 				this.costWeight = false;
 				this.costWeight = false;
 			break;
 			break;
+			case 'price':
+				this.priceInput = false;
+			break;
 		}
 		}
-        return;
-      }
+	},
+
+    commitChange (type) {
+		
+      if(this.$util.isEmpty(this.initData)){
+		 this.$message.error('没有修改');
+		 this.hiddenInput(type)
+		return false
+	  }
+
+		const loading = this.$loading({
+			lock: true,
+			text: '处理中'
+		});
+
+
       this.dataList.form.data = JSON.stringify(this.initData)
       this.dataList.form.data = JSON.stringify(this.initData)
       this.$service.product.productBatchUpdate(this.dataList.form).then(res => {
       this.$service.product.productBatchUpdate(this.dataList.form).then(res => {
-        console.log(res)
-        this.$message.success('保存成功!');
-		this.app.refresh()
-      }).catch(err => {console.log(err)})
-		switch (type) {
-			case 'inTurn':
-				this.sort.status = false;
-				break;
-			case 'cost':
-				this.costPrice = false;
-				break;
-			case 'addPrice':
-				this.canAddPrice = false;
-				break;
-			case 'ratio':
-				this.canAddRatio = false;
-				break;
-			case 'weight':
-				this.costWeight = false;
-				break;
-		}
+        
+		loading.close();
+
+		this.hiddenInput(type)
+
+      }).catch(err => {
+		  this.hiddenInput(type)
+	  })
+
     },
     },
     replaceBtnFn(id) {
     replaceBtnFn(id) {
 		this.getAllClass()
 		this.getAllClass()
 		this.getAllUnit()
 		this.getAllUnit()
       this.addDialog = true
       this.addDialog = true
 		this.currentItemId = id;
 		this.currentItemId = id;
-
 		if(id==0){
 		if(id==0){
 			this.replaceFormRules = {};
 			this.replaceFormRules = {};
 			this.replaceForm = {
 			this.replaceForm = {
@@ -773,7 +815,7 @@ export default {
 		this.batchAddPrice='';
 		this.batchAddPrice='';
 		this.dialogFormVisible = true;
 		this.dialogFormVisible = true;
 	  },
 	  },
-	changeValue (d, type) {
+	changeInputValue (d, type) {
 		this.dataList.form.type = type
 		this.dataList.form.type = type
 		let obj = {
 		let obj = {
 			id: d.id,
 			id: d.id,
@@ -788,6 +830,8 @@ export default {
 			obj.weight  = d.weight
 			obj.weight  = d.weight
 		}else if(type == 'ratio') {
 		}else if(type == 'ratio') {
 			obj.ratio  = d.ratio
 			obj.ratio  = d.ratio
+		}else if(type == 'price') {
+			obj.price = d.price
 		}
 		}
 		this.initData.push(obj)
 		this.initData.push(obj)
 	}
 	}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików