<template>
	<view>
		<!-- //查找 -->
		<view class="search">
			<view class="search-title">
				{{$t('dosugar.equipmentClientID')}}
			</view>
			<view class="search-input">
				<input type="text" :placeholder="$t('dosugar.placeholder')" v-model="searchClientId" />
			</view>
			<view class="search-button">
				<button type="primary" size="mini" class="" @click="search()">
					<p class="">{{$t('alarmClock.add')}}</P>
				</button>
			</view>
		</view>
		<!-- //多选下拉框 -->
		<view class="select-item">
			<ld-select :multiple="true" :list="equipmentNameList" label-key="label" value-key="value"
				:placeholder="$t('alarmClock.placeholder')" clearable v-model="equipmentIds" @change="selectChange2"></ld-select>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.name')}}：
			</view>
			<view class="search-input3">
				{{$t('updatePrice.price')}}：
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A01')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A01" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A02')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A02" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A03')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A03" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A04')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A04" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A05')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A05" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A06')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A06" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A07')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A07" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A08')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A08" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A09')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A09" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A10')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A10" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A11')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A11" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A12')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A12" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A13')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A13" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A14')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A14" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A15')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A15" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A16')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A16" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A17')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A17" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A18')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A18" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A19')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A19" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A20')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A20" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A21')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A21" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A22')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A22" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A23')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A23" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A24')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A24" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A25')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A25" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A26')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A26" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A27')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A27" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A28')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A28" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A29')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A29" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A30')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A30" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A31')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A31" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A32')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A32" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A33')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A33" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A34')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A34" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A35')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A35" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A37')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A37" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A38')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A38" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A39')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A39" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A40')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A40" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A41')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A41" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A42')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A42" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A43')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A43" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A44')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A44" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A45')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A45" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A46')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A46" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A47')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A47" />
			</view>
		</view>
		<view class="line"></view>
		<view class="search">
			<view class="search-title">
				{{$t('updatePrice.A48')}}：
			</view>
			<view class="search-input2">
				<input type="text"  v-model="A48" />
			</view>
		</view>
		<view class="line"></view>
		<!-- //提交按钮 -->
		<view class="tr">
			<button  type="primary" formType="submit" @click="update()" class="button">
				<p class="p1">{{$t('alarmClock.update')}}</p>
			</button>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapActions,
		mapMutations
	} from 'vuex'
	import MxDatePicker from "../../components/mx-datepicker/mx-datepicker.vue";
	// import ldSelect from "../../components/ld-select/ld-select.vue";
	import ldSelect from "../../components/ld-select/ld-select.vue"
	import likeButton from "../../components/like-button/like-button.vue";
	import {
		dateUtils
	} from '@/common/util.js';
	export default {
		components: {
			MxDatePicker,
			ldSelect,
			likeButton
		},
		data() {
			return {
				value: '',
				searchClientId: null,
				equipmentName: null,
				equipmentNameList: [],
				globalUser: {},
				equipmentIds: [],
				A01:'',
				A02:'',
				A03:'',
				A04:'',
				A05:'',
				A06:'',
				A07:'',
				A08:'',
				A09:'',
				A10:'',
				A11:'',
				A12:'',
				A13:'',
				A14:'',
				A15:'',
				A16:'',
				A17:'',
				A18:'',
				A19:'',
				A20:'',
				A21:'',
				A22:'',
				A23:'',
				A24:'',
				A25:'',
				A26:'',
				A27:'',
				A28:'',
				A29:'',
				A30:'',
				A31:'',
				A32:'',
				A33:'',
				A34:'',
				A35:'',
				A37:'',
				A38:'',
				A39:'',
				A40:'',
				A41:'',
				A42:'',
				A43:'',
				A44:'',
				A45:'',
				A46:'',
				A47:'',
				A48:''
			}
		},
		onShow() {
			this.globalUser = uni.getStorageSync("globalUser");
			this.globalUser.todayDate = dateUtils.getCurrentDate();
			uni.setNavigationBarTitle({
				title: this.$t('remoteList.price')
			});
			var token = uni.getStorageSync("token");
			if (token.length > 1) {
				this.getEquipmentListData();
			} else {
				uni.reLaunch({
					url: '../../../pages/Login/Login',
				});
			}

		},
		onLoad() {

		},
		methods: {
			...mapActions('chart', ['getEquipmentListByUser', 'addAlarmClock', 'addAlarmClockItem', 'updateAlarmClock']),
			getEquipmentListData() {
				this.getEquipmentListByUser(this.globalUser)
					.then(data => {
						// this.merchantList = data;
						// console.log("1223");
						var listName = data[0].equipmentList;
						var equipmentNameList = this.equipmentNameList;
						var co = {};
						co["value"] = 'all';
						co["label"] = this.$t('common.allDevice');
						equipmentNameList.push(co);
						for (var i = 0; i < listName.length; i++) {
							var cov = {};
							cov["value"] = listName[i].id;
							cov["label"] = this.$t('common.name') + listName[i].name + ' , '+ this.$t('common.ID') + listName[i].clientId.substring(
								listName[i].clientId.length - 6, listName[i].clientId.length);
							equipmentNameList.push(cov);
						}
						this.equipmentNameList = equipmentNameList;
						var listId = data[0].id;
						if (listId != null && listId != '1') {
							uni.setStorageSync("listName", listName);
						}

						uni.stopPullDownRefresh();
					}, _ => void uni.stopPullDownRefresh());
			},

			onSelected(e) { //选择
				this.showPicker = false;
				if (e) {
					this[this.type] = e.value;
					//选择的值
					// console.log('value => ' + e.value);
					//原始的Date对象
					// console.log('date => ' + e.date);
				}
			},
			// bindPickerChange: function(e) {
			// 	this.indexType = e.target.value
			// },
			addEids(equipmentIds) {
				// console.log('equipmentIds' + equipmentIds);
				var eids = equipmentIds.split(",");
				var idss = this.equipmentIds;
				var is = this.equipmentNameList
				for (var k = 0; k < eids.length; k++) {
					var id = eids[k];
					if (id != "" && id != '') {
						this.equipmentIds.push(parseInt(id));
					}
				}
			},
			search() {
				// console.log("search");
				var clientId = this.searchClientId;
				var list = uni.getStorageSync("listName");
				var n = 0;
				for (var i = 0; i < list.length; i++) {
					var code = list[i].clientId.substring(list[i].clientId.length - 6, list[i].clientId.length);
					if (code == clientId) {
						n++;
						var id = list[i].id;
						this.equipmentIds.push(id);
						setTimeout(() => {
							this.getProduct();
						}, 2000);
						break;
					}
				}
				if (n == 0) {
					uni.showModal({
						title: this.$t('common.tip'),
						content: this.$t('common.noDevice'),
						success: (res) => {

						}
					})
				}
				if (n > 0) {
					uni.showModal({
						title: this.$t('common.tip'),
						content: this.$t('common.addDevice'),
						success: (res) => {

						}
					})
				}
			},
			selectChange2(val) {
				//有改动文件 import likeButton from "../../components/like-button/like-button.vue";
				if (val == "all") {
					this.equipmentIds = [];
					var list = uni.getStorageSync("listName");
					for (var i = 0; i < list.length; i++) {
						this.equipmentIds.push(list[i].id);
					}
				} else {
					this.equipmentIds = val
				}
				console.log('this.equipmentIds => ' + this.equipmentIds);
				if(val.length==1){
					setTimeout(() => {
						this.getProduct();
					}, 2000);
				}
			},
			getProduct(){
				if(this.equipmentIds.length!=1){
					return;
				}
				var serverurl = this.serverurl;
				var token = uni.getStorageSync("token");
				uni.request({
					url: serverurl + '/TProduct/selectProducts?equimentId='+this.equipmentIds,
					// data: {
					// 	"equipmentIds": that.equipmentIds,
					// 	"guestPwd": that.guestPwd,
					// 	"adminPwd": that.adminPwd,
					// },
					method: "GET",
					header: {
						'token': token
					},
					success: (res) => {
						if(res.data.code){
							var list = res.data.data;
							var ifForeign = this.globalUser.ifForeign;
							if(ifForeign==0){
								for (var i = 0; i < list.length; i++) {
									var no = list[i].no;
									switch(no){
										case "A01":
											this.A01 = list[i].rmbPrice;
										break;
										case "A02":
											this.A02 = list[i].rmbPrice;
										break;
										case "A03":
											this.A03 = list[i].rmbPrice;
										break;
										case "A04":
											this.A04 = list[i].rmbPrice;
										break;					
										case "A05":
											this.A05 = list[i].rmbPrice;
										break;					
										case "A06":
											this.A06 = list[i].rmbPrice;
										break;					
										case "A07":
											this.A07 = list[i].rmbPrice;
										break;					
										case "A07":
											this.A07 = list[i].rmbPrice;
										break;					
										case "A08":
											this.A08 = list[i].rmbPrice;
										break;
										case "A09":
											this.A09 = list[i].rmbPrice;
										break;
										case "A10":
											this.A10 = list[i].rmbPrice;
										break;
										case "A11":
											this.A11 = list[i].rmbPrice;
										break;
										case "A12":
											this.A12 = list[i].rmbPrice;
										break;
										case "A13":
											this.A13 = list[i].rmbPrice;
										break;
										case "A14":
											this.A14 = list[i].rmbPrice;
										break;
										case "A15":
											this.A15 = list[i].rmbPrice;
										break;
										case "A16":
											this.A16 = list[i].rmbPrice;
										break;
										case "A17":
											this.A17 = list[i].rmbPrice;
										break;
										case "A18":
											this.A18 = list[i].rmbPrice;
										break;
										case "A19":
											this.A19 = list[i].rmbPrice;
										break;
										case "A20":
											this.A20 = list[i].rmbPrice;
										break;
										case "A21":
											this.A21 = list[i].rmbPrice;
										break;
										case "A22":
											this.A22 = list[i].rmbPrice;
										break;
										case "A23":
											this.A23 = list[i].rmbPrice;
										break;
										case "A24":
											this.A24 = list[i].rmbPrice;
										break;
										case "A25":
											this.A25 = list[i].rmbPrice;
										break;
										case "A26":
											this.A26 = list[i].rmbPrice;
										break;
										case "A27":
											this.A27 = list[i].rmbPrice;
										break;
										case "A28":
											this.A28 = list[i].rmbPrice;
										break;
										case "A29":
											this.A29 = list[i].rmbPrice;
										break;
										case "A30":
											this.A30 = list[i].rmbPrice;
										break;
										case "A31":
											this.A31 = list[i].rmbPrice;
										break;
										case "A32":
											this.A32 = list[i].rmbPrice;
										break;
										case "A33":
											this.A33 = list[i].rmbPrice;
										break;
										case "A34":
											this.A34 = list[i].rmbPrice;
										break;
										case "A35":
											this.A35 = list[i].rmbPrice;
										break;
										case "A37":
											this.A37 = list[i].rmbPrice;
										break;
										case "A38":
											this.A38 = list[i].rmbPrice;
										break;
										case "A39":
											this.A39 = list[i].rmbPrice;
										break;
										case "A40":
											this.A40 = list[i].rmbPrice;
										break;
										case "A41":
											this.A41 = list[i].rmbPrice;
										break;
										case "A42":
											this.A42 = list[i].rmbPrice;
										break;
										case "A43":
											this.A43 = list[i].rmbPrice;
										break;
										case "A44":
											this.A44 = list[i].rmbPrice;
										break;
										case "A45":
											this.A45 = list[i].rmbPrice;
										break;
										case "A46":
											this.A46 = list[i].rmbPrice;
										break;
										case "A47":
											this.A47 = list[i].rmbPrice;
										break;
										case "A48":
											this.A48 = list[i].rmbPrice;
										break;
									}
								}
							}else{
								for (var i = 0; i < list.length; i++) {
									var no = list[i].no;
									switch(no){
										case "A01":
											this.A01 = list[i].codePrice;
										break;
										case "A02":
											this.A02 = list[i].codePrice;
										break;
										case "A03":
											this.A03 = list[i].codePrice;
										break;
										case "A04":
											this.A04 = list[i].codePrice;
										break;					
										case "A05":
											this.A05 = list[i].codePrice;
										break;					
										case "A06":
											this.A06 = list[i].codePrice;
										break;					
										case "A07":
											this.A07 = list[i].codePrice;
										break;					
										case "A07":
											this.A07 = list[i].codePrice;
										break;					
										case "A08":
											this.A08 = list[i].codePrice;
										break;
										case "A09":
											this.A09 = list[i].codePrice;
										break;
										case "A10":
											this.A10 = list[i].codePrice;
										break;
										case "A11":
											this.A11 = list[i].codePrice;
										break;
										case "A12":
											this.A12 = list[i].codePrice;
										break;
										case "A13":
											this.A13 = list[i].codePrice;
										break;
										case "A14":
											this.A14 = list[i].codePrice;
										break;
										case "A15":
											this.A15 = list[i].codePrice;
										break;
										case "A16":
											this.A16 = list[i].codePrice;
										break;
										case "A17":
											this.A17 = list[i].codePrice;
										break;
										case "A18":
											this.A18 = list[i].codePrice;
										break;
										case "A19":
											this.A19 = list[i].codePrice;
										break;
										case "A20":
											this.A20 = list[i].codePrice;
										break;
										case "A21":
											this.A21 = list[i].codePrice;
										break;
										case "A22":
											this.A22 = list[i].codePrice;
										break;
										case "A23":
											this.A23 = list[i].codePrice;
										break;
										case "A24":
											this.A24 = list[i].codePrice;
										break;
										case "A25":
											this.A25 = list[i].codePrice;
										break;
										case "A26":
											this.A26 = list[i].codePrice;
										break;
										case "A27":
											this.A27 = list[i].codePrice;
										break;
										case "A28":
											this.A28 = list[i].codePrice;
										break;
										case "A29":
											this.A29 = list[i].codePrice;
										break;
										case "A30":
											this.A30 = list[i].codePrice;
										break;
										case "A31":
											this.A31 = list[i].codePrice;
										break;
										case "A32":
											this.A32 = list[i].codePrice;
										break;
										case "A33":
											this.A33 = list[i].codePrice;
										break;
										case "A34":
											this.A34 = list[i].codePrice;
										break;
										case "A35":
											this.A35 = list[i].codePrice;
										break;
										case "A37":
											this.A37 = list[i].codePrice;
										break;
										case "A38":
											this.A38 = list[i].codePrice;
										break;
										case "A39":
											this.A39 = list[i].codePrice;
										break;
										case "A40":
											this.A40 = list[i].codePrice;
										break;
										case "A41":
											this.A41 = list[i].codePrice;
										break;
										case "A42":
											this.A42 = list[i].codePrice;
										break;
										case "A43":
											this.A43 = list[i].codePrice;
										break;
										case "A44":
											this.A44 = list[i].codePrice;
										break;
										case "A45":
											this.A45 = list[i].codePrice;
										break;
										case "A46":
											this.A46 = list[i].codePrice;
										break;
										case "A47":
											this.A47 = list[i].codePrice;
										break;
										case "A48":
											this.A48 = list[i].codePrice;
										break;
									}
								}
							}
						}
					}
				});
			},
			switchChange: function(e) {
				this.status = e.target.value;
			},
			update() {
				if(this.equipmentIds==''||this.equipmentIds.length==0){
					return;
				}
				var that = this;
				uni.showModal({
					title: that.$t('equipmentStatusList.tip'),
					content:that.$t('updatePassword.sure') ,
					success: (re) => {
						if (re.confirm) {
							var serverurl = that.serverurl;
							var token = uni.getStorageSync("token");
							var products = [];
							
							var product ={
								showType:'',
								no:'',
								rmbPrice:''
							}
							if(that.equipmentIds!=''){
								product.showType = that.equipmentIds;
							}
							
							if(that.A01!=''){
								product.showType = that.equipmentIds;
								product.no = 'A01';
								product.rmbPrice = that.A01;
								products.push(product);
								product={};
							}
							if(that.A02!=''){
								product.showType = that.equipmentIds;
								product.no = 'A02';
								product.rmbPrice = that.A02;
								products.push(product);
								product={};
							}
							if(that.A03!=''){
								product.showType = that.equipmentIds;
								product.no = 'A03';
								product.rmbPrice = that.A03;
								products.push(product);
								product={};
							}
							if(that.A04!=''){
								product.showType = that.equipmentIds;
								product.no = 'A04';
								product.rmbPrice = that.A04;
								products.push(product);
								product={};
							}
							if(that.A05!=''){
								product.showType = that.equipmentIds;
								product.no = 'A05';
								product.rmbPrice = that.A05;
								products.push(product);
								product={};
							}
							if(that.A06!=''){
								product.showType = that.equipmentIds;
								product.no = 'A06';
								product.rmbPrice = that.A06;
								products.push(product);
								product={};
							}
							if(that.A07!=''){
								product.showType = that.equipmentIds;
								product.no = 'A07';
								product.rmbPrice = that.A07;
								products.push(product);
								product={};
							}
							if(that.A08!=''){
								product.showType = that.equipmentIds;
								product.no = 'A08';
								product.rmbPrice = that.A08;
								products.push(product);
								product={};
							}
							if(that.A09!=''){
								product.showType = that.equipmentIds;
								product.no = 'A09';
								product.rmbPrice = that.A09;
								products.push(product);
								product={};
							}
							if(that.A10!=''){
								product.showType = that.equipmentIds;
								product.no = 'A10';
								product.rmbPrice = that.A10;
								products.push(product);
								product={};
							}
							if(that.A11!=''){
								product.showType = that.equipmentIds;
								product.no = 'A11';
								product.rmbPrice = that.A11;
								products.push(product);
								product={};
							}
							if(that.A12!=''){
								product.showType = that.equipmentIds;
								product.no = 'A12';
								product.rmbPrice = that.A12;
								products.push(product);
								product={};
							}
							if(that.A13!=''){
								product.showType = that.equipmentIds;
								product.no = 'A13';
								product.rmbPrice = that.A13;
								products.push(product);
								product={};
							}
							if(that.A14!=''){
								product.showType = that.equipmentIds;
								product.no = 'A14';
								product.rmbPrice = that.A14;
								products.push(product);
								product={};
							}
							if(that.A15!=''){
								product.showType = that.equipmentIds;
								product.no = 'A15';
								product.rmbPrice = that.A15;
								products.push(product);
								product={};
							}
							if(that.A16!=''){
								product.showType = that.equipmentIds;
								product.no = 'A16';
								product.rmbPrice = that.A16;
								products.push(product);
								product={};
							}
							if(that.A17!=''){
								product.showType = that.equipmentIds;
								product.no = 'A17';
								product.rmbPrice = that.A17;
								products.push(product);
								product={};
							}
							if(that.A18!=''){
								product.showType = that.equipmentIds;
								product.no = 'A18';
								product.rmbPrice = that.A18;
								products.push(product);
								product={};
							}
							if(that.A19!=''){
								product.showType = that.equipmentIds;
								product.no = 'A19';
								product.rmbPrice = that.A19;
								products.push(product);
								product={};
							}
							if(that.A20!=''){
								product.showType = that.equipmentIds;
								product.no = 'A20';
								product.rmbPrice = that.A20;
								products.push(product);
								product={};
							}
							if(that.A21!=''){
								product.showType = that.equipmentIds;
								product.no = 'A21';
								product.rmbPrice = that.A21;
								products.push(product);
								product={};
							}
							if(that.A22!=''){
								product.showType = that.equipmentIds;
								product.no = 'A22';
								product.rmbPrice = that.A22;
								products.push(product);
								product={};
							}
							if(that.A23!=''){
								product.showType = that.equipmentIds;
								product.no = 'A23';
								product.rmbPrice = that.A23;
								products.push(product);
								product={};
							}
							if(that.A24!=''){
								product.showType = that.equipmentIds;
								product.no = 'A24';
								product.rmbPrice = that.A24;
								products.push(product);
								product={};
							}
							if(that.A25!=''){
								product.showType = that.equipmentIds;
								product.no = 'A25';
								product.rmbPrice = that.A25;
								products.push(product);
								product={};
							}
							if(that.A26!=''){
								product.showType = that.equipmentIds;
								product.no = 'A26';
								product.rmbPrice = that.A26;
								products.push(product);
								product={};
							}
							if(that.A27!=''){
								product.showType = that.equipmentIds;
								product.no = 'A27';
								product.rmbPrice = that.A27;
								products.push(product);
								product={};
							}
							if(that.A28!=''){
								product.showType = that.equipmentIds;
								product.no = 'A28';
								product.rmbPrice = that.A28;
								products.push(product);
								product={};
							}
							if(that.A29!=''){
								product.showType = that.equipmentIds;
								product.no = 'A29';
								product.rmbPrice = that.A29;
								products.push(product);
								product={};
							}
							if(that.A30!=''){
								product.showType = that.equipmentIds;
								product.no = 'A30';
								product.rmbPrice = that.A30;
								products.push(product);
								product={};
							}
							if(that.A31!=''){
								product.showType = that.equipmentIds;
								product.no = 'A31';
								product.rmbPrice = that.A31;
								products.push(product);
								product={};
							}
							if(that.A32!=''){
								product.showType = that.equipmentIds;
								product.no = 'A32';
								product.rmbPrice = that.A32;
								products.push(product);
								product={};
							}
							if(that.A33!=''){
								product.showType = that.equipmentIds;
								product.no = 'A33';
								product.rmbPrice = that.A33;
								products.push(product);
								product={};
							}
							if(that.A34!=''){
								product.showType = that.equipmentIds;
								product.no = 'A34';
								product.rmbPrice = that.A34;
								products.push(product);
								product={};
							}
							if(that.A35!=''){
								product.showType = that.equipmentIds;
								product.no = 'A35';
								product.rmbPrice = that.A35;
								products.push(product);
								product={};
							}
							if(that.A37!=''){
								product.showType = that.equipmentIds;
								product.no = 'A37';
								product.rmbPrice = that.A37;
								products.push(product);
								product={};
							}
							if(that.A38!=''){
								product.showType = that.equipmentIds;
								product.no = 'A38';
								product.rmbPrice = that.A38;
								products.push(product);
								product={};
							}
							if(that.A39!=''){
								product.showType = that.equipmentIds;
								product.no = 'A39';
								product.rmbPrice = that.A39;
								products.push(product);
								product={};
							}
							if(that.A40!=''){
								product.showType = that.equipmentIds;
								product.no = 'A40';
								product.rmbPrice = that.A40;
								products.push(product);
								product={};
							}
							if(that.A41!=''){
								product.showType = that.equipmentIds;
								product.no = 'A41';
								product.rmbPrice = that.A41;
								products.push(product);
								product={};
							}
							if(that.A42!=''){
								product.showType = that.equipmentIds;
								product.no = 'A42';
								product.rmbPrice = that.A42;
								products.push(product);
								product={};
							}
							if(that.A43!=''){
								product.showType = that.equipmentIds;
								product.no = 'A43';
								product.rmbPrice = that.A43;
								products.push(product);
								product={};
							}
							if(that.A44!=''){
								product.showType = that.equipmentIds;
								product.no = 'A44';
								product.rmbPrice = that.A44;
								products.push(product);
								product={};
							}
							if(that.A45!=''){
								product.showType = that.equipmentIds;
								product.no = 'A45';
								product.rmbPrice = that.A45;
								products.push(product);
								product={};
							}
							if(that.A46!=''){
								product.showType = that.equipmentIds;
								product.no = 'A46';
								product.rmbPrice = that.A46;
								products.push(product);
								product={};
							}
							if(that.A47!=''){
								product.showType = that.equipmentIds;
								product.no = 'A47';
								product.rmbPrice = that.A47;
								products.push(product);
								product={};
							}
							if(that.A48!=''){
								product.showType = that.equipmentIds;
								product.no = 'A48';
								product.rmbPrice = that.A48;
								products.push(product);
								product={};
							}
							var list = JSON.stringify(products);
							uni.request({
								url: serverurl + '/TProduct/updateProductsById',
								data: {
									"products": list
								},
								header: {
									'token': token
								},
								method: "POST",
								success: (res) => {
									if(res.data.code){
										uni.showToast({
											title: res.data.message,
											duration: 1000
										});
									}
								}
							});
						}
					}
				})
			},
		}
	}
</script>

<style>
	.test {
		text-align: center;
		padding: 10px 0;
	}

	.time {
		font-size: 78upx;
	}

	.btime {
		margin: 20upx;
		font-size: 28upx;
	}

	/* 	button {
		margin: 20upx;
		font-size: 28upx;
	} */

	/* #ifdef MP-ALIPAY */
	.uni-badge {
		margin-left: 20rpx;
	}

	/* #endif */
	.uni-badge {
		font-size: 40upx;
	}

	.example-body {
		flex-direction: row;
		justify-content: flex-start;
		padding-bottom: 15upx;
		font-size: 40upx;
	}

	.uni-badge-left-margin {
		font-size: 40upx;
		margin-left: 50upx;
	}

	.uni-list-cell {
		padding-top: 20upx;
		padding-bottom: 10upx;
		font-size: 35upx;
	}

	.line {
		height: 2upx;
		background: #8C959F;
	}

	.search {
		width: 100%;
		padding-top: 15upx;
		padding-bottom: 15upx;
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
	}

	.search-title {
		width: 28%;
		text-align: center;
		font-size: 26upx;
		font-family: "PingFang-SC-Bold";
	}

	.search-input{
		width: 48%;
		height: 25px;
		text-align: center;
		font-size: 26upx;
		/* font-family: "PingFang-SC-Bold"; */
		box-shadow: 0upx 0upx 20upx #D3D3D3;
		border-radius: 5upx;
	}

	.search-input2 {
		width: 65%;
		text-align: center;
		font-size: 26upx;
		font-family: "PingFang-SC-Bold";
		box-shadow: 0upx 0upx 20upx #D3D3D3;
		border-radius: 5upx;
	}
	.search-input3 {
		width: 65%;
		text-align: center;
		font-size: 26upx;
		font-family: "PingFang-SC-Bold";
	}

	.search-button{
		width: 20%;
		padding-left: 10px;
		padding-bottom: 5px;
		text-align: center;
		height: 60upx;
		text-align: left;
	}

	.select-item {
		/* padding-top: 20upx; */
	}

	.tr {
		padding-top: 15upx;
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		font-size: 48upx;
		font-family: "PingFang-SC-Bold";
		/* position: fixed; */
		bottom: 100upx;
		width: 100%;
	}

	.button {
		margin: auto;
		width: 60%;
		height: 100upx;
	}

	.p1 {
		font-size: 48upx;
	}
</style>
