1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504 |
- <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>
|