shish 4 лет назад
Родитель
Сommit
1936bb97c6

+ 2 - 2
ghsApp/dist/build/mp-weixin/admin/home/components/module/operate-line.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/admin/home/components/module/operate.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/admin/home/components/plugin/time-axis.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 2 - 1
ghsApp/dist/build/mp-weixin/app.json

@@ -358,5 +358,6 @@
     "t-tr": "/components/plugin/t-table/t-tr",
     "t-th": "/components/plugin/t-table/t-th",
     "t-td": "/components/plugin/t-table/t-td"
-  }
+  },
+  "sitemapLocation": "sitemap.json"
 }

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
ghsApp/dist/build/mp-weixin/common/vendor.js


+ 2 - 2
ghsApp/dist/build/mp-weixin/components/app-coupon-sel.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/app-uploader.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/module/allSelectInput.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/none-hd.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/plugin/dropdown-list.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/plugin/selectList.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/pagesGys/detailsItem.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/pagesInvite/inviteItem.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesPurchase/components/pageSuccess.js


+ 1 - 1
ghsApp/dist/build/mp-weixin/pagesPurchase/components/pageSuccess.wxml

@@ -1 +1 @@
-<app-result vue-id="2540701a-1" title="{{title?title:'成功'}}" class="data-v-e72ac542" bind:__l="__l" vue-slots="{{['default']}}"><view class="flowers-list-box data-v-e72ac542"><view class="flex title data-v-e72ac542">以下花材售价已变更,如需要请修改:</view><block wx:for="{{flowersList}}" wx:for-item="res" wx:for-index="i" wx:key="i"><view class="flex-space flowers-list data-v-e72ac542"><view class="ov-1x flowers-name data-v-e72ac542">{{res.name}}</view><view class="flex flowers-val data-v-e72ac542"><input type="digit" data-event-opts="{{[['focus',[['priceFocus',[i]]]],['input',[['__set_model',['$0','price','$event',[]],[[['flowersList','',i]]]]]]]}}" value="{{res.price}}" bindfocus="__e" bindinput="__e" class="data-v-e72ac542"/>元</view><view data-event-opts="{{[['tap',[['changePriceFun',['$0','$1'],[[['flowersList','',i,'id']],[['flowersList','',i,'price']]]]]]]}}" class="flex-center 	flowers-btn data-v-e72ac542" bindtap="__e">修改</view></view></block></view><navigator class="flex-center goHome data-v-e72ac542" open-type="switchTab" url="/admin/home/workbench">返回首页</navigator></app-result>
+<app-result vue-id="2540701a-1" title="{{title?title:'成功'}}" class="data-v-00fff544" bind:__l="__l" vue-slots="{{['default']}}"><view class="flowers-list-box data-v-00fff544"><view class="flex title data-v-00fff544">采购已入库,建议修改售价:</view><block wx:for="{{flowersList}}" wx:for-item="res" wx:for-index="i" wx:key="i"><view class="flex-space flowers-list data-v-00fff544"><view class="ov-1x flowers-name data-v-00fff544">{{res.name}}</view><view class="flex flowers-val data-v-00fff544"><input type="digit" data-event-opts="{{[['focus',[['priceFocus',[i]]]],['input',[['__set_model',['$0','autoPrice','$event',[]],[[['flowersList','',i]]]],['updatePrice',['$0','$1'],[[['flowersList','',i,'id']],[['flowersList','',i,'autoPrice']]]]]]]}}" value="{{res.autoPrice}}" bindfocus="__e" bindinput="__e" class="data-v-00fff544"/>元</view></view></block></view><button data-event-opts="{{[['tap',[['commitChange',['$event']]]]]}}" class="admin-button-com big blue data-v-00fff544" style="width:80%;margin-top:50rpx;" bindtap="__e">保存修改</button><navigator class="flex-center goHome data-v-00fff544" open-type="switchTab" data-event-opts="{{[['tap',[['goBackHome',['$event']]]]]}}" bindtap="__e">返回首页</navigator></app-result>

+ 1 - 1
ghsApp/dist/build/mp-weixin/pagesPurchase/components/pageSuccess.wxss

@@ -1 +1 @@
-.admin-button-com.data-v-e72ac542{margin-bottom:20rpx;width:100%}.flowers-list-box.data-v-e72ac542{width:100%}.flowers-list-box .title.data-v-e72ac542{height:80rpx;border-top:1rpx solid #dcdcdc;font-size:28rpx;font-weight:700}.flowers-list-box .flowers-list.data-v-e72ac542{padding:15rpx 0}.flowers-list-box .flowers-list .flowers-name.data-v-e72ac542{width:150rpx}.flowers-list-box .flowers-list .flowers-val input.data-v-e72ac542{width:160rpx;height:50rpx;padding:0 20rpx;margin-right:20rpx;border:1rpx solid #d4d4d4;text-align:center}.flowers-list-box .flowers-list .flowers-btn.data-v-e72ac542{width:100rpx;height:50rpx;color:#fff;background:#69f;border-radius:10rpx}.goHome.data-v-e72ac542{width:80%;height:80rpx;color:#fff;margin-top:150rpx;background:#69f;border-radius:10rpx}
+.admin-button-com.data-v-00fff544{margin-bottom:20rpx;width:100%}.flowers-list-box.data-v-00fff544{width:100%}.flowers-list-box .title.data-v-00fff544{height:80rpx;border-top:1rpx solid #dcdcdc;font-size:28rpx;font-weight:700}.flowers-list-box .flex-space.data-v-00fff544{width:500rpx}.flowers-list-box .flowers-list.data-v-00fff544{padding:15rpx 0}.flowers-list-box .flowers-list .flowers-name.data-v-00fff544{width:150rpx}.flowers-list-box .flowers-list .flowers-val input.data-v-00fff544{width:160rpx;height:50rpx;padding:0 20rpx;margin-right:20rpx;border:1rpx solid #d4d4d4;text-align:center}.flowers-list-box .flowers-list .flowers-btn.data-v-00fff544{width:100rpx;height:50rpx;color:#fff;background:#69f;border-radius:10rpx}.goHome.data-v-00fff544{width:80%;height:80rpx;color:#fff;margin-top:50rpx;background:#3385ff;border-radius:10rpx;font-size:30rpx}

+ 1 - 1
ghsApp/dist/build/mp-weixin/project.config.json

@@ -41,7 +41,7 @@
   "compileType": "miniprogram",
   "libVersion": "",
   "appid": "wxcf32b3f0684c2433",
-  "projectname": "供应商",
+  "projectname": "%E4%BE%9B%E5%BA%94%E5%95%86",
   "condition": {
     "search": {
       "list": []

+ 7 - 0
ghsApp/dist/build/mp-weixin/sitemap.json

@@ -0,0 +1,7 @@
+{
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+  "rules": [{
+  "action": "allow",
+  "page": "*"
+  }]
+}

+ 5 - 0
ghsApp/src/api/product/index.js

@@ -35,6 +35,11 @@ export const batchChangePrice = data => {
 	return https.post("/product/batch-change-price", data);
 };
 
+//批量改价
+export const batchUpdatePrice = data => {
+	return https.post("/product/batch-update", data);
+};
+
 //添加花材
 export const addProduct = data => {
 	return https.post("/product/add", data);

+ 68 - 43
ghsApp/src/pagesPurchase/components/pageSuccess.vue

@@ -11,6 +11,9 @@
 			font-size: 28rpx;
 			font-weight: 700;
 		}
+		.flex-space{
+			width:500rpx;
+		}
 		.flowers-list{
 			padding: 15rpx 0;
 			.flowers-name{width: 150rpx}
@@ -37,29 +40,31 @@
 		width: 80%;
 		height: 80rpx;
 		color: #FFFFFF;
-		margin-top: 150rpx;
-		background: #6699ff;
+		margin-top: 50rpx;
+		background: #3385FF;
 		border-radius: 10rpx;
+		font-size:30rpx;
 	}
 </style>
 <template>
   <appResult :title="title?title:'成功'">
-			<view class="flowers-list-box">
-				<view class="flex title">以下花材售价已变更,如需要请修改:</view>
-				<view class="flex-space flowers-list" v-for="(res,i) in flowersList" :key="i">
-					<view class="ov-1x flowers-name">{{res.name}}</view>
-					<view class="flex flowers-val">
-						<input type="digit" v-model="res.price" @focus="priceFocus(i)"> 元
-					</view>
-					<view class="flex-center 	flowers-btn" @tap="changePriceFun(res.id,res.price)">修改</view>
-				</view>
+	<view class="flowers-list-box">
+		<view class="flex title">采购已入库,建议修改售价:</view>
+		<view class="flex-space flowers-list" v-for="(res,i) in flowersList" :key="i">
+			<view class="ov-1x flowers-name">{{res.name}}</view>
+			<view class="flex flowers-val">
+				<input type="digit" v-model="res.autoPrice" @focus="priceFocus(i)" @input="updatePrice(res.id,res.autoPrice)"> 元
 			</view>
-			<navigator open-type="switchTab" class="flex-center goHome" url="/admin/home/workbench">返回首页</navigator>
+		</view>
+	</view>
+	<button class="admin-button-com big blue" style="width:80%;margin-top:50rpx;" @click="commitChange">保存修改</button>
+
+	<navigator open-type="switchTab" class="flex-center goHome" @click="goBackHome" >返回首页</navigator>
   </appResult>
 </template>
 <script>
-	import { getAllProductDataApi } from "@/api/product/index";
-	import { changePriceByIdApi } from '@/api/product/index'
+import { getAllProductDataApi } from "@/api/product/index";
+import { batchUpdatePrice } from '@/api/product/index'
 import appResult from "@/components/app-result";
 export default {
   name: "pageSuccess",
@@ -71,6 +76,7 @@ export default {
 			title:'',
 			flowersItemInfo:'',
 			flowersList:[],
+			productList:[],
 		};
 	},
 	onShow(){
@@ -84,37 +90,56 @@ export default {
 		uni.removeStorageSync('flowersItemInfo');
 		uni.navigateBack({delta:2})
 	},
-		methods: {
-			priceFocus(i){
-               this.flowersList[i].price = ''
-			},
-    closeLayer() {
-					uni.navigateBack({delta: 3});
-    },
-				getList(){
-    	let productIdArr = '';
-				this.flowersItemInfo.forEach((ele)=>{
-					productIdArr += ele.productId+','
+	methods: {
+		priceFocus(i){
+			this.flowersList[i].autoPrice = ''
+		},
+		closeLayer() {
+			uni.navigateBack({delta: 3});
+		},
+		getList(){
+			let productIdArr = '';
+			let that = this
+			this.flowersItemInfo.forEach((ele)=>{productIdArr += ele.productId+','})
+			getAllProductDataApi({ids : productIdArr.substring(0, productIdArr.lastIndexOf(',')),}).then((res)=>{
+				that.flowersList = res.data.list;
+
+				that.productList = [];
+				console.log('that.productList',that.productList)
+				that.flowersList.forEach(function(item,index,arr){
+					that.productList.push({id:item.id,price:item.price})
 				})
-				getAllProductDataApi({ids : productIdArr.substring(0, productIdArr.lastIndexOf(',')),}).then((res)=>{
-						console.log(res)
-					this.flowersList = res.data.list;
-				});
-			},
-			changePriceFun(id,price){
-				if(price) {
-					changePriceByIdApi({
-						productId: id,
-						price: price
-					}).then(res => {
-							uni.showToast({title:'修改成功'})
-					})
-				} else {
-					this.$msg('金额不能为空')
+				console.log('that.productList',that.productList)
+			});
+		},
+		updatePrice(id,price){
+			let arr = this.productList.map((ele)=>{
+				if(ele.id == id){
+					return {id:id,price:price}
 				}
-				
-			},
-
+				return ele
+			})
+			this.productList = arr
+			console.log(this.productList)
+		},
+		commitChange(){
+			let that = this
+			batchUpdatePrice({data:JSON.stringify(this.productList),type:'price'}).then(res => {
+				uni.showToast({title:res.msg})
+				if(res.code == 1){
+					setTimeout(function(){
+						that.goBackHome()
+					},1000)
+				}
+			})
+		},
+		goBackHome() {
+			this.$util.pageTo({
+				url: "/admin/home/workbench",
+				type: 4,
+				query: { tabIndex: 0 },
+			});
+		}
   },
 };
 </script>

Некоторые файлы не были показаны из-за большого количества измененных файлов