shish 5 سال پیش
والد
کامیت
9f12756ca6

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
ghs/dist/shop/css/chunk-608a8dc7.9666604e.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.6f07e55a.css" rel="preload" as="style"><link href="/css/chunk-libs.2e1e87b5.css" rel="preload" as="style"><link href="/js/app.34b22a85.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.34b22a85.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.0402be00.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.0402be00.js"></script></body></html>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
ghs/dist/shop/js/app.0402be00.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
ghs/dist/shop/js/chunk-608a8dc7.8be785dd.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
ghs/dist/shop/js/chunk-68c7447a.ab05e9f1.js


+ 16 - 7
ghs/src/service/product/index.js

@@ -2,13 +2,22 @@ import { BaseService, Service } from '@/cool';
 
 @Service('product')
 export class ProductService extends BaseService {
-	// 所有花材  姜枫2021.04.18
-	list(data) {
-		return this.request({
-			url: '/list',
-			params: data
-		});
-	}
+
+//获取拼音首字母
+py(data) {
+  return this.request({
+    url: '/py',
+    params: data
+  });
+}
+
+// 所有花材  姜枫2021.04.18
+list(data) {
+  return this.request({
+    url: '/list',
+    params: data
+  });
+}
 
 /** *
  * 批量修改product信息

+ 26 - 18
ghs/src/views/item/list.vue

@@ -82,7 +82,7 @@
       </template> 
 
       <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)" >修改</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==0" @click.native.stop="setStatusFun(scope.row.id,1)" >下架</el-button>
 			</template>
@@ -165,6 +165,7 @@
 						<el-input
 							v-model="replaceForm.name"
 							placeholder="请输入名称"
+							@input="fillName($event)"
 							size="small"
 						></el-input>
 					</el-form-item>
@@ -175,13 +176,6 @@
 						size="small"
 				></el-input>
 			</el-form-item>
-          <el-form-item label="别名" prop="alias">
-						<el-input
-							v-model="replaceForm.alias"
-							placeholder="请输入别名"
-							size="small"
-						></el-input>
-					</el-form-item>
 
 		<el-form-item label="图片" prop="cover">
 						<cl-upload v-model="replaceForm.cover" :successFun="uploadSuccess"></cl-upload>
@@ -315,7 +309,6 @@ export default {
 		replaceForm: {
 				name: '',
 				py: '',
-				alias: '',
 				classId: '',
 				className: '',
 				cover: '',
@@ -376,9 +369,21 @@ export default {
   computed: {
   },
   mounted() {
-    
+    this.init();
   },
   methods: {
+	  //自动填写拼音
+	  fillName(event){
+		this.$service.product.py({ name: event }).then(res => {
+			if(res.py){
+				this.replaceForm.py = res.py
+			}
+		}).catch(err => { console.log(err) })
+	  },
+	  init(){
+		this.getAllClass()
+		this.getAllUnit()
+	  },
     selectItemFn (currentItem) {
 
       let item = currentItem.list
@@ -747,7 +752,6 @@ export default {
 
       this.dataList.form.data = JSON.stringify(this.initData)
       this.$service.product.productBatchUpdate(this.dataList.form).then(res => {
-
 		
 		if(type == 'price'){
 			//修改原价需要刷新
@@ -764,26 +768,34 @@ export default {
 
     },
     replaceBtnFn(id) {
-		this.getAllClass()
-		this.getAllUnit()
       	this.addDialog = true
 		this.currentItemId = id;
+
 		if(id==0){
 			this.replaceFormRules = {};
 			this.replaceForm = {
 				name: '',
 				py: '',
-				alias: '',
 				classId: '',
 				className: '',
 				cover: '',
 				bigUnit: '',
 				smallUnit: '',
+				bigUnitId: '',
+				smallUnitId: '',
 				stockWarning:'',
 				cost:'',
 				addPrice:'',
 				weight:'',
 			};
+
+			//大小单位默认给设置为扎和支
+		  this.replaceForm.bigUnitId = this.unitList[0].id;
+		  this.replaceForm.bigUnit = this.unitList[0].name;
+		  this.replaceForm.smallUnitId = this.unitList[1].id;
+		  this.replaceForm.smallUnit = this.unitList[1].name;
+		  this.$forceUpdate();
+
 		}else{
 			this.replaceFormRules = {
 				name: {
@@ -843,7 +855,6 @@ export default {
 		}
 		let data = this.$refs['xCrud'].table.data;
 		data.forEach((ele)=>{
-
 			if(this.dataList.form.type == 'addPrice'){
 				let batchAddNum = (Number(this.batchAddNum) + Number(ele.addPrice)).toFixed(2)
 				ele.addPrice = batchAddNum
@@ -859,7 +870,6 @@ export default {
 			}else{
 
 			}
-
 		})
 		this.dialogFormVisible = false;
 	},
@@ -870,7 +880,6 @@ export default {
 		}
 		let data = this.$refs['xCrud'].table.data;
 		data.forEach((ele)=>{
-
 			if(this.dataList.form.type == 'addPrice'){
 				ele.addPrice = this.batchAlterNum
 				this.initData.push({id:ele.id,addPrice:this.batchAlterNum})
@@ -883,7 +892,6 @@ export default {
 			}else{
 
 			}
-
 		})
 		this.dialogFormVisible = false
 	},

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است