updatePrice.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504
  1. <template>
  2. <view>
  3. <!-- //查找 -->
  4. <view class="search">
  5. <view class="search-title">
  6. {{$t('dosugar.equipmentClientID')}}
  7. </view>
  8. <view class="search-input">
  9. <input type="text" :placeholder="$t('dosugar.placeholder')" v-model="searchClientId" />
  10. </view>
  11. <view class="search-button">
  12. <button type="primary" size="mini" class="" @click="search()">
  13. <p class="">{{$t('alarmClock.add')}}</P>
  14. </button>
  15. </view>
  16. </view>
  17. <!-- //多选下拉框 -->
  18. <view class="select-item">
  19. <ld-select :multiple="true" :list="equipmentNameList" label-key="label" value-key="value"
  20. :placeholder="$t('alarmClock.placeholder')" clearable v-model="equipmentIds" @change="selectChange2"></ld-select>
  21. </view>
  22. <view class="line"></view>
  23. <view class="search">
  24. <view class="search-title">
  25. {{$t('updatePrice.name')}}:
  26. </view>
  27. <view class="search-input3">
  28. {{$t('updatePrice.price')}}:
  29. </view>
  30. </view>
  31. <view class="line"></view>
  32. <view class="search">
  33. <view class="search-title">
  34. {{$t('updatePrice.A01')}}:
  35. </view>
  36. <view class="search-input2">
  37. <input type="text" v-model="A01" />
  38. </view>
  39. </view>
  40. <view class="line"></view>
  41. <view class="search">
  42. <view class="search-title">
  43. {{$t('updatePrice.A02')}}:
  44. </view>
  45. <view class="search-input2">
  46. <input type="text" v-model="A02" />
  47. </view>
  48. </view>
  49. <view class="line"></view>
  50. <view class="search">
  51. <view class="search-title">
  52. {{$t('updatePrice.A03')}}:
  53. </view>
  54. <view class="search-input2">
  55. <input type="text" v-model="A03" />
  56. </view>
  57. </view>
  58. <view class="line"></view>
  59. <view class="search">
  60. <view class="search-title">
  61. {{$t('updatePrice.A04')}}:
  62. </view>
  63. <view class="search-input2">
  64. <input type="text" v-model="A04" />
  65. </view>
  66. </view>
  67. <view class="line"></view>
  68. <view class="search">
  69. <view class="search-title">
  70. {{$t('updatePrice.A05')}}:
  71. </view>
  72. <view class="search-input2">
  73. <input type="text" v-model="A05" />
  74. </view>
  75. </view>
  76. <view class="line"></view>
  77. <view class="search">
  78. <view class="search-title">
  79. {{$t('updatePrice.A06')}}:
  80. </view>
  81. <view class="search-input2">
  82. <input type="text" v-model="A06" />
  83. </view>
  84. </view>
  85. <view class="line"></view>
  86. <view class="search">
  87. <view class="search-title">
  88. {{$t('updatePrice.A07')}}:
  89. </view>
  90. <view class="search-input2">
  91. <input type="text" v-model="A07" />
  92. </view>
  93. </view>
  94. <view class="line"></view>
  95. <view class="search">
  96. <view class="search-title">
  97. {{$t('updatePrice.A08')}}:
  98. </view>
  99. <view class="search-input2">
  100. <input type="text" v-model="A08" />
  101. </view>
  102. </view>
  103. <view class="line"></view>
  104. <view class="search">
  105. <view class="search-title">
  106. {{$t('updatePrice.A09')}}:
  107. </view>
  108. <view class="search-input2">
  109. <input type="text" v-model="A09" />
  110. </view>
  111. </view>
  112. <view class="line"></view>
  113. <view class="search">
  114. <view class="search-title">
  115. {{$t('updatePrice.A10')}}:
  116. </view>
  117. <view class="search-input2">
  118. <input type="text" v-model="A10" />
  119. </view>
  120. </view>
  121. <view class="line"></view>
  122. <view class="search">
  123. <view class="search-title">
  124. {{$t('updatePrice.A11')}}:
  125. </view>
  126. <view class="search-input2">
  127. <input type="text" v-model="A11" />
  128. </view>
  129. </view>
  130. <view class="line"></view>
  131. <view class="search">
  132. <view class="search-title">
  133. {{$t('updatePrice.A12')}}:
  134. </view>
  135. <view class="search-input2">
  136. <input type="text" v-model="A12" />
  137. </view>
  138. </view>
  139. <view class="line"></view>
  140. <view class="search">
  141. <view class="search-title">
  142. {{$t('updatePrice.A13')}}:
  143. </view>
  144. <view class="search-input2">
  145. <input type="text" v-model="A13" />
  146. </view>
  147. </view>
  148. <view class="line"></view>
  149. <view class="search">
  150. <view class="search-title">
  151. {{$t('updatePrice.A14')}}:
  152. </view>
  153. <view class="search-input2">
  154. <input type="text" v-model="A14" />
  155. </view>
  156. </view>
  157. <view class="line"></view>
  158. <view class="search">
  159. <view class="search-title">
  160. {{$t('updatePrice.A15')}}:
  161. </view>
  162. <view class="search-input2">
  163. <input type="text" v-model="A15" />
  164. </view>
  165. </view>
  166. <view class="line"></view>
  167. <view class="search">
  168. <view class="search-title">
  169. {{$t('updatePrice.A16')}}:
  170. </view>
  171. <view class="search-input2">
  172. <input type="text" v-model="A16" />
  173. </view>
  174. </view>
  175. <view class="line"></view>
  176. <view class="search">
  177. <view class="search-title">
  178. {{$t('updatePrice.A17')}}:
  179. </view>
  180. <view class="search-input2">
  181. <input type="text" v-model="A17" />
  182. </view>
  183. </view>
  184. <view class="line"></view>
  185. <view class="search">
  186. <view class="search-title">
  187. {{$t('updatePrice.A18')}}:
  188. </view>
  189. <view class="search-input2">
  190. <input type="text" v-model="A18" />
  191. </view>
  192. </view>
  193. <view class="line"></view>
  194. <view class="search">
  195. <view class="search-title">
  196. {{$t('updatePrice.A19')}}:
  197. </view>
  198. <view class="search-input2">
  199. <input type="text" v-model="A19" />
  200. </view>
  201. </view>
  202. <view class="line"></view>
  203. <view class="search">
  204. <view class="search-title">
  205. {{$t('updatePrice.A20')}}:
  206. </view>
  207. <view class="search-input2">
  208. <input type="text" v-model="A20" />
  209. </view>
  210. </view>
  211. <view class="line"></view>
  212. <view class="search">
  213. <view class="search-title">
  214. {{$t('updatePrice.A21')}}:
  215. </view>
  216. <view class="search-input2">
  217. <input type="text" v-model="A21" />
  218. </view>
  219. </view>
  220. <view class="line"></view>
  221. <view class="search">
  222. <view class="search-title">
  223. {{$t('updatePrice.A22')}}:
  224. </view>
  225. <view class="search-input2">
  226. <input type="text" v-model="A22" />
  227. </view>
  228. </view>
  229. <view class="line"></view>
  230. <view class="search">
  231. <view class="search-title">
  232. {{$t('updatePrice.A23')}}:
  233. </view>
  234. <view class="search-input2">
  235. <input type="text" v-model="A23" />
  236. </view>
  237. </view>
  238. <view class="line"></view>
  239. <view class="search">
  240. <view class="search-title">
  241. {{$t('updatePrice.A24')}}:
  242. </view>
  243. <view class="search-input2">
  244. <input type="text" v-model="A24" />
  245. </view>
  246. </view>
  247. <view class="line"></view>
  248. <view class="search">
  249. <view class="search-title">
  250. {{$t('updatePrice.A25')}}:
  251. </view>
  252. <view class="search-input2">
  253. <input type="text" v-model="A25" />
  254. </view>
  255. </view>
  256. <view class="line"></view>
  257. <view class="search">
  258. <view class="search-title">
  259. {{$t('updatePrice.A26')}}:
  260. </view>
  261. <view class="search-input2">
  262. <input type="text" v-model="A26" />
  263. </view>
  264. </view>
  265. <view class="line"></view>
  266. <view class="search">
  267. <view class="search-title">
  268. {{$t('updatePrice.A27')}}:
  269. </view>
  270. <view class="search-input2">
  271. <input type="text" v-model="A27" />
  272. </view>
  273. </view>
  274. <view class="line"></view>
  275. <view class="search">
  276. <view class="search-title">
  277. {{$t('updatePrice.A28')}}:
  278. </view>
  279. <view class="search-input2">
  280. <input type="text" v-model="A28" />
  281. </view>
  282. </view>
  283. <view class="line"></view>
  284. <view class="search">
  285. <view class="search-title">
  286. {{$t('updatePrice.A29')}}:
  287. </view>
  288. <view class="search-input2">
  289. <input type="text" v-model="A29" />
  290. </view>
  291. </view>
  292. <view class="line"></view>
  293. <view class="search">
  294. <view class="search-title">
  295. {{$t('updatePrice.A30')}}:
  296. </view>
  297. <view class="search-input2">
  298. <input type="text" v-model="A30" />
  299. </view>
  300. </view>
  301. <view class="line"></view>
  302. <view class="search">
  303. <view class="search-title">
  304. {{$t('updatePrice.A31')}}:
  305. </view>
  306. <view class="search-input2">
  307. <input type="text" v-model="A31" />
  308. </view>
  309. </view>
  310. <view class="line"></view>
  311. <view class="search">
  312. <view class="search-title">
  313. {{$t('updatePrice.A32')}}:
  314. </view>
  315. <view class="search-input2">
  316. <input type="text" v-model="A32" />
  317. </view>
  318. </view>
  319. <view class="line"></view>
  320. <view class="search">
  321. <view class="search-title">
  322. {{$t('updatePrice.A33')}}:
  323. </view>
  324. <view class="search-input2">
  325. <input type="text" v-model="A33" />
  326. </view>
  327. </view>
  328. <view class="line"></view>
  329. <view class="search">
  330. <view class="search-title">
  331. {{$t('updatePrice.A34')}}:
  332. </view>
  333. <view class="search-input2">
  334. <input type="text" v-model="A34" />
  335. </view>
  336. </view>
  337. <view class="line"></view>
  338. <view class="search">
  339. <view class="search-title">
  340. {{$t('updatePrice.A35')}}:
  341. </view>
  342. <view class="search-input2">
  343. <input type="text" v-model="A35" />
  344. </view>
  345. </view>
  346. <view class="line"></view>
  347. <view class="search">
  348. <view class="search-title">
  349. {{$t('updatePrice.A37')}}:
  350. </view>
  351. <view class="search-input2">
  352. <input type="text" v-model="A37" />
  353. </view>
  354. </view>
  355. <view class="line"></view>
  356. <view class="search">
  357. <view class="search-title">
  358. {{$t('updatePrice.A38')}}:
  359. </view>
  360. <view class="search-input2">
  361. <input type="text" v-model="A38" />
  362. </view>
  363. </view>
  364. <view class="line"></view>
  365. <view class="search">
  366. <view class="search-title">
  367. {{$t('updatePrice.A39')}}:
  368. </view>
  369. <view class="search-input2">
  370. <input type="text" v-model="A39" />
  371. </view>
  372. </view>
  373. <view class="line"></view>
  374. <view class="search">
  375. <view class="search-title">
  376. {{$t('updatePrice.A40')}}:
  377. </view>
  378. <view class="search-input2">
  379. <input type="text" v-model="A40" />
  380. </view>
  381. </view>
  382. <view class="line"></view>
  383. <view class="search">
  384. <view class="search-title">
  385. {{$t('updatePrice.A41')}}:
  386. </view>
  387. <view class="search-input2">
  388. <input type="text" v-model="A41" />
  389. </view>
  390. </view>
  391. <view class="line"></view>
  392. <view class="search">
  393. <view class="search-title">
  394. {{$t('updatePrice.A42')}}:
  395. </view>
  396. <view class="search-input2">
  397. <input type="text" v-model="A42" />
  398. </view>
  399. </view>
  400. <view class="line"></view>
  401. <view class="search">
  402. <view class="search-title">
  403. {{$t('updatePrice.A43')}}:
  404. </view>
  405. <view class="search-input2">
  406. <input type="text" v-model="A43" />
  407. </view>
  408. </view>
  409. <view class="line"></view>
  410. <view class="search">
  411. <view class="search-title">
  412. {{$t('updatePrice.A44')}}:
  413. </view>
  414. <view class="search-input2">
  415. <input type="text" v-model="A44" />
  416. </view>
  417. </view>
  418. <view class="line"></view>
  419. <view class="search">
  420. <view class="search-title">
  421. {{$t('updatePrice.A45')}}:
  422. </view>
  423. <view class="search-input2">
  424. <input type="text" v-model="A45" />
  425. </view>
  426. </view>
  427. <view class="line"></view>
  428. <view class="search">
  429. <view class="search-title">
  430. {{$t('updatePrice.A46')}}:
  431. </view>
  432. <view class="search-input2">
  433. <input type="text" v-model="A46" />
  434. </view>
  435. </view>
  436. <view class="line"></view>
  437. <view class="search">
  438. <view class="search-title">
  439. {{$t('updatePrice.A47')}}:
  440. </view>
  441. <view class="search-input2">
  442. <input type="text" v-model="A47" />
  443. </view>
  444. </view>
  445. <view class="line"></view>
  446. <view class="search">
  447. <view class="search-title">
  448. {{$t('updatePrice.A48')}}:
  449. </view>
  450. <view class="search-input2">
  451. <input type="text" v-model="A48" />
  452. </view>
  453. </view>
  454. <view class="line"></view>
  455. <!-- //提交按钮 -->
  456. <view class="tr">
  457. <button type="primary" formType="submit" @click="update()" class="button">
  458. <p class="p1">{{$t('alarmClock.update')}}</p>
  459. </button>
  460. </view>
  461. </view>
  462. </template>
  463. <script>
  464. import {
  465. mapState,
  466. mapActions,
  467. mapMutations
  468. } from 'vuex'
  469. import MxDatePicker from "../../components/mx-datepicker/mx-datepicker.vue";
  470. // import ldSelect from "../../components/ld-select/ld-select.vue";
  471. import ldSelect from "../../components/ld-select/ld-select.vue"
  472. import likeButton from "../../components/like-button/like-button.vue";
  473. import {
  474. dateUtils
  475. } from '@/common/util.js';
  476. export default {
  477. components: {
  478. MxDatePicker,
  479. ldSelect,
  480. likeButton
  481. },
  482. data() {
  483. return {
  484. value: '',
  485. searchClientId: null,
  486. equipmentName: null,
  487. equipmentNameList: [],
  488. globalUser: {},
  489. equipmentIds: [],
  490. A01:'',
  491. A02:'',
  492. A03:'',
  493. A04:'',
  494. A05:'',
  495. A06:'',
  496. A07:'',
  497. A08:'',
  498. A09:'',
  499. A10:'',
  500. A11:'',
  501. A12:'',
  502. A13:'',
  503. A14:'',
  504. A15:'',
  505. A16:'',
  506. A17:'',
  507. A18:'',
  508. A19:'',
  509. A20:'',
  510. A21:'',
  511. A22:'',
  512. A23:'',
  513. A24:'',
  514. A25:'',
  515. A26:'',
  516. A27:'',
  517. A28:'',
  518. A29:'',
  519. A30:'',
  520. A31:'',
  521. A32:'',
  522. A33:'',
  523. A34:'',
  524. A35:'',
  525. A37:'',
  526. A38:'',
  527. A39:'',
  528. A40:'',
  529. A41:'',
  530. A42:'',
  531. A43:'',
  532. A44:'',
  533. A45:'',
  534. A46:'',
  535. A47:'',
  536. A48:''
  537. }
  538. },
  539. onShow() {
  540. this.globalUser = uni.getStorageSync("globalUser");
  541. this.globalUser.todayDate = dateUtils.getCurrentDate();
  542. uni.setNavigationBarTitle({
  543. title: this.$t('remoteList.price')
  544. });
  545. var token = uni.getStorageSync("token");
  546. if (token.length > 1) {
  547. this.getEquipmentListData();
  548. } else {
  549. uni.reLaunch({
  550. url: '../../../pages/Login/Login',
  551. });
  552. }
  553. },
  554. onLoad() {
  555. },
  556. methods: {
  557. ...mapActions('chart', ['getEquipmentListByUser', 'addAlarmClock', 'addAlarmClockItem', 'updateAlarmClock']),
  558. getEquipmentListData() {
  559. this.getEquipmentListByUser(this.globalUser)
  560. .then(data => {
  561. // this.merchantList = data;
  562. // console.log("1223");
  563. var listName = data[0].equipmentList;
  564. var equipmentNameList = this.equipmentNameList;
  565. var co = {};
  566. co["value"] = 'all';
  567. co["label"] = this.$t('common.allDevice');
  568. equipmentNameList.push(co);
  569. for (var i = 0; i < listName.length; i++) {
  570. var cov = {};
  571. cov["value"] = listName[i].id;
  572. cov["label"] = this.$t('common.name') + listName[i].name + ' , '+ this.$t('common.ID') + listName[i].clientId.substring(
  573. listName[i].clientId.length - 6, listName[i].clientId.length);
  574. equipmentNameList.push(cov);
  575. }
  576. this.equipmentNameList = equipmentNameList;
  577. var listId = data[0].id;
  578. if (listId != null && listId != '1') {
  579. uni.setStorageSync("listName", listName);
  580. }
  581. uni.stopPullDownRefresh();
  582. }, _ => void uni.stopPullDownRefresh());
  583. },
  584. onSelected(e) { //选择
  585. this.showPicker = false;
  586. if (e) {
  587. this[this.type] = e.value;
  588. //选择的值
  589. // console.log('value => ' + e.value);
  590. //原始的Date对象
  591. // console.log('date => ' + e.date);
  592. }
  593. },
  594. // bindPickerChange: function(e) {
  595. // this.indexType = e.target.value
  596. // },
  597. addEids(equipmentIds) {
  598. // console.log('equipmentIds' + equipmentIds);
  599. var eids = equipmentIds.split(",");
  600. var idss = this.equipmentIds;
  601. var is = this.equipmentNameList
  602. for (var k = 0; k < eids.length; k++) {
  603. var id = eids[k];
  604. if (id != "" && id != '') {
  605. this.equipmentIds.push(parseInt(id));
  606. }
  607. }
  608. },
  609. search() {
  610. // console.log("search");
  611. var clientId = this.searchClientId;
  612. var list = uni.getStorageSync("listName");
  613. var n = 0;
  614. for (var i = 0; i < list.length; i++) {
  615. var code = list[i].clientId.substring(list[i].clientId.length - 6, list[i].clientId.length);
  616. if (code == clientId) {
  617. n++;
  618. var id = list[i].id;
  619. this.equipmentIds.push(id);
  620. setTimeout(() => {
  621. this.getProduct();
  622. }, 2000);
  623. break;
  624. }
  625. }
  626. if (n == 0) {
  627. uni.showModal({
  628. title: this.$t('common.tip'),
  629. content: this.$t('common.noDevice'),
  630. success: (res) => {
  631. }
  632. })
  633. }
  634. if (n > 0) {
  635. uni.showModal({
  636. title: this.$t('common.tip'),
  637. content: this.$t('common.addDevice'),
  638. success: (res) => {
  639. }
  640. })
  641. }
  642. },
  643. selectChange2(val) {
  644. //有改动文件 import likeButton from "../../components/like-button/like-button.vue";
  645. if (val == "all") {
  646. this.equipmentIds = [];
  647. var list = uni.getStorageSync("listName");
  648. for (var i = 0; i < list.length; i++) {
  649. this.equipmentIds.push(list[i].id);
  650. }
  651. } else {
  652. this.equipmentIds = val
  653. }
  654. console.log('this.equipmentIds => ' + this.equipmentIds);
  655. if(val.length==1){
  656. setTimeout(() => {
  657. this.getProduct();
  658. }, 2000);
  659. }
  660. },
  661. getProduct(){
  662. if(this.equipmentIds.length!=1){
  663. return;
  664. }
  665. var serverurl = this.serverurl;
  666. var token = uni.getStorageSync("token");
  667. uni.request({
  668. url: serverurl + '/TProduct/selectProducts?equimentId='+this.equipmentIds,
  669. // data: {
  670. // "equipmentIds": that.equipmentIds,
  671. // "guestPwd": that.guestPwd,
  672. // "adminPwd": that.adminPwd,
  673. // },
  674. method: "GET",
  675. header: {
  676. 'token': token
  677. },
  678. success: (res) => {
  679. if(res.data.code){
  680. var list = res.data.data;
  681. var ifForeign = this.globalUser.ifForeign;
  682. if(ifForeign==0){
  683. for (var i = 0; i < list.length; i++) {
  684. var no = list[i].no;
  685. switch(no){
  686. case "A01":
  687. this.A01 = list[i].rmbPrice;
  688. break;
  689. case "A02":
  690. this.A02 = list[i].rmbPrice;
  691. break;
  692. case "A03":
  693. this.A03 = list[i].rmbPrice;
  694. break;
  695. case "A04":
  696. this.A04 = list[i].rmbPrice;
  697. break;
  698. case "A05":
  699. this.A05 = list[i].rmbPrice;
  700. break;
  701. case "A06":
  702. this.A06 = list[i].rmbPrice;
  703. break;
  704. case "A07":
  705. this.A07 = list[i].rmbPrice;
  706. break;
  707. case "A07":
  708. this.A07 = list[i].rmbPrice;
  709. break;
  710. case "A08":
  711. this.A08 = list[i].rmbPrice;
  712. break;
  713. case "A09":
  714. this.A09 = list[i].rmbPrice;
  715. break;
  716. case "A10":
  717. this.A10 = list[i].rmbPrice;
  718. break;
  719. case "A11":
  720. this.A11 = list[i].rmbPrice;
  721. break;
  722. case "A12":
  723. this.A12 = list[i].rmbPrice;
  724. break;
  725. case "A13":
  726. this.A13 = list[i].rmbPrice;
  727. break;
  728. case "A14":
  729. this.A14 = list[i].rmbPrice;
  730. break;
  731. case "A15":
  732. this.A15 = list[i].rmbPrice;
  733. break;
  734. case "A16":
  735. this.A16 = list[i].rmbPrice;
  736. break;
  737. case "A17":
  738. this.A17 = list[i].rmbPrice;
  739. break;
  740. case "A18":
  741. this.A18 = list[i].rmbPrice;
  742. break;
  743. case "A19":
  744. this.A19 = list[i].rmbPrice;
  745. break;
  746. case "A20":
  747. this.A20 = list[i].rmbPrice;
  748. break;
  749. case "A21":
  750. this.A21 = list[i].rmbPrice;
  751. break;
  752. case "A22":
  753. this.A22 = list[i].rmbPrice;
  754. break;
  755. case "A23":
  756. this.A23 = list[i].rmbPrice;
  757. break;
  758. case "A24":
  759. this.A24 = list[i].rmbPrice;
  760. break;
  761. case "A25":
  762. this.A25 = list[i].rmbPrice;
  763. break;
  764. case "A26":
  765. this.A26 = list[i].rmbPrice;
  766. break;
  767. case "A27":
  768. this.A27 = list[i].rmbPrice;
  769. break;
  770. case "A28":
  771. this.A28 = list[i].rmbPrice;
  772. break;
  773. case "A29":
  774. this.A29 = list[i].rmbPrice;
  775. break;
  776. case "A30":
  777. this.A30 = list[i].rmbPrice;
  778. break;
  779. case "A31":
  780. this.A31 = list[i].rmbPrice;
  781. break;
  782. case "A32":
  783. this.A32 = list[i].rmbPrice;
  784. break;
  785. case "A33":
  786. this.A33 = list[i].rmbPrice;
  787. break;
  788. case "A34":
  789. this.A34 = list[i].rmbPrice;
  790. break;
  791. case "A35":
  792. this.A35 = list[i].rmbPrice;
  793. break;
  794. case "A37":
  795. this.A37 = list[i].rmbPrice;
  796. break;
  797. case "A38":
  798. this.A38 = list[i].rmbPrice;
  799. break;
  800. case "A39":
  801. this.A39 = list[i].rmbPrice;
  802. break;
  803. case "A40":
  804. this.A40 = list[i].rmbPrice;
  805. break;
  806. case "A41":
  807. this.A41 = list[i].rmbPrice;
  808. break;
  809. case "A42":
  810. this.A42 = list[i].rmbPrice;
  811. break;
  812. case "A43":
  813. this.A43 = list[i].rmbPrice;
  814. break;
  815. case "A44":
  816. this.A44 = list[i].rmbPrice;
  817. break;
  818. case "A45":
  819. this.A45 = list[i].rmbPrice;
  820. break;
  821. case "A46":
  822. this.A46 = list[i].rmbPrice;
  823. break;
  824. case "A47":
  825. this.A47 = list[i].rmbPrice;
  826. break;
  827. case "A48":
  828. this.A48 = list[i].rmbPrice;
  829. break;
  830. }
  831. }
  832. }else{
  833. for (var i = 0; i < list.length; i++) {
  834. var no = list[i].no;
  835. switch(no){
  836. case "A01":
  837. this.A01 = list[i].codePrice;
  838. break;
  839. case "A02":
  840. this.A02 = list[i].codePrice;
  841. break;
  842. case "A03":
  843. this.A03 = list[i].codePrice;
  844. break;
  845. case "A04":
  846. this.A04 = list[i].codePrice;
  847. break;
  848. case "A05":
  849. this.A05 = list[i].codePrice;
  850. break;
  851. case "A06":
  852. this.A06 = list[i].codePrice;
  853. break;
  854. case "A07":
  855. this.A07 = list[i].codePrice;
  856. break;
  857. case "A07":
  858. this.A07 = list[i].codePrice;
  859. break;
  860. case "A08":
  861. this.A08 = list[i].codePrice;
  862. break;
  863. case "A09":
  864. this.A09 = list[i].codePrice;
  865. break;
  866. case "A10":
  867. this.A10 = list[i].codePrice;
  868. break;
  869. case "A11":
  870. this.A11 = list[i].codePrice;
  871. break;
  872. case "A12":
  873. this.A12 = list[i].codePrice;
  874. break;
  875. case "A13":
  876. this.A13 = list[i].codePrice;
  877. break;
  878. case "A14":
  879. this.A14 = list[i].codePrice;
  880. break;
  881. case "A15":
  882. this.A15 = list[i].codePrice;
  883. break;
  884. case "A16":
  885. this.A16 = list[i].codePrice;
  886. break;
  887. case "A17":
  888. this.A17 = list[i].codePrice;
  889. break;
  890. case "A18":
  891. this.A18 = list[i].codePrice;
  892. break;
  893. case "A19":
  894. this.A19 = list[i].codePrice;
  895. break;
  896. case "A20":
  897. this.A20 = list[i].codePrice;
  898. break;
  899. case "A21":
  900. this.A21 = list[i].codePrice;
  901. break;
  902. case "A22":
  903. this.A22 = list[i].codePrice;
  904. break;
  905. case "A23":
  906. this.A23 = list[i].codePrice;
  907. break;
  908. case "A24":
  909. this.A24 = list[i].codePrice;
  910. break;
  911. case "A25":
  912. this.A25 = list[i].codePrice;
  913. break;
  914. case "A26":
  915. this.A26 = list[i].codePrice;
  916. break;
  917. case "A27":
  918. this.A27 = list[i].codePrice;
  919. break;
  920. case "A28":
  921. this.A28 = list[i].codePrice;
  922. break;
  923. case "A29":
  924. this.A29 = list[i].codePrice;
  925. break;
  926. case "A30":
  927. this.A30 = list[i].codePrice;
  928. break;
  929. case "A31":
  930. this.A31 = list[i].codePrice;
  931. break;
  932. case "A32":
  933. this.A32 = list[i].codePrice;
  934. break;
  935. case "A33":
  936. this.A33 = list[i].codePrice;
  937. break;
  938. case "A34":
  939. this.A34 = list[i].codePrice;
  940. break;
  941. case "A35":
  942. this.A35 = list[i].codePrice;
  943. break;
  944. case "A37":
  945. this.A37 = list[i].codePrice;
  946. break;
  947. case "A38":
  948. this.A38 = list[i].codePrice;
  949. break;
  950. case "A39":
  951. this.A39 = list[i].codePrice;
  952. break;
  953. case "A40":
  954. this.A40 = list[i].codePrice;
  955. break;
  956. case "A41":
  957. this.A41 = list[i].codePrice;
  958. break;
  959. case "A42":
  960. this.A42 = list[i].codePrice;
  961. break;
  962. case "A43":
  963. this.A43 = list[i].codePrice;
  964. break;
  965. case "A44":
  966. this.A44 = list[i].codePrice;
  967. break;
  968. case "A45":
  969. this.A45 = list[i].codePrice;
  970. break;
  971. case "A46":
  972. this.A46 = list[i].codePrice;
  973. break;
  974. case "A47":
  975. this.A47 = list[i].codePrice;
  976. break;
  977. case "A48":
  978. this.A48 = list[i].codePrice;
  979. break;
  980. }
  981. }
  982. }
  983. }
  984. }
  985. });
  986. },
  987. switchChange: function(e) {
  988. this.status = e.target.value;
  989. },
  990. update() {
  991. if(this.equipmentIds==''||this.equipmentIds.length==0){
  992. return;
  993. }
  994. var that = this;
  995. uni.showModal({
  996. title: that.$t('equipmentStatusList.tip'),
  997. content:that.$t('updatePassword.sure') ,
  998. success: (re) => {
  999. if (re.confirm) {
  1000. var serverurl = that.serverurl;
  1001. var token = uni.getStorageSync("token");
  1002. var products = [];
  1003. var product ={
  1004. showType:'',
  1005. no:'',
  1006. rmbPrice:''
  1007. }
  1008. if(that.equipmentIds!=''){
  1009. product.showType = that.equipmentIds;
  1010. }
  1011. if(that.A01!=''){
  1012. product.showType = that.equipmentIds;
  1013. product.no = 'A01';
  1014. product.rmbPrice = that.A01;
  1015. products.push(product);
  1016. product={};
  1017. }
  1018. if(that.A02!=''){
  1019. product.showType = that.equipmentIds;
  1020. product.no = 'A02';
  1021. product.rmbPrice = that.A02;
  1022. products.push(product);
  1023. product={};
  1024. }
  1025. if(that.A03!=''){
  1026. product.showType = that.equipmentIds;
  1027. product.no = 'A03';
  1028. product.rmbPrice = that.A03;
  1029. products.push(product);
  1030. product={};
  1031. }
  1032. if(that.A04!=''){
  1033. product.showType = that.equipmentIds;
  1034. product.no = 'A04';
  1035. product.rmbPrice = that.A04;
  1036. products.push(product);
  1037. product={};
  1038. }
  1039. if(that.A05!=''){
  1040. product.showType = that.equipmentIds;
  1041. product.no = 'A05';
  1042. product.rmbPrice = that.A05;
  1043. products.push(product);
  1044. product={};
  1045. }
  1046. if(that.A06!=''){
  1047. product.showType = that.equipmentIds;
  1048. product.no = 'A06';
  1049. product.rmbPrice = that.A06;
  1050. products.push(product);
  1051. product={};
  1052. }
  1053. if(that.A07!=''){
  1054. product.showType = that.equipmentIds;
  1055. product.no = 'A07';
  1056. product.rmbPrice = that.A07;
  1057. products.push(product);
  1058. product={};
  1059. }
  1060. if(that.A08!=''){
  1061. product.showType = that.equipmentIds;
  1062. product.no = 'A08';
  1063. product.rmbPrice = that.A08;
  1064. products.push(product);
  1065. product={};
  1066. }
  1067. if(that.A09!=''){
  1068. product.showType = that.equipmentIds;
  1069. product.no = 'A09';
  1070. product.rmbPrice = that.A09;
  1071. products.push(product);
  1072. product={};
  1073. }
  1074. if(that.A10!=''){
  1075. product.showType = that.equipmentIds;
  1076. product.no = 'A10';
  1077. product.rmbPrice = that.A10;
  1078. products.push(product);
  1079. product={};
  1080. }
  1081. if(that.A11!=''){
  1082. product.showType = that.equipmentIds;
  1083. product.no = 'A11';
  1084. product.rmbPrice = that.A11;
  1085. products.push(product);
  1086. product={};
  1087. }
  1088. if(that.A12!=''){
  1089. product.showType = that.equipmentIds;
  1090. product.no = 'A12';
  1091. product.rmbPrice = that.A12;
  1092. products.push(product);
  1093. product={};
  1094. }
  1095. if(that.A13!=''){
  1096. product.showType = that.equipmentIds;
  1097. product.no = 'A13';
  1098. product.rmbPrice = that.A13;
  1099. products.push(product);
  1100. product={};
  1101. }
  1102. if(that.A14!=''){
  1103. product.showType = that.equipmentIds;
  1104. product.no = 'A14';
  1105. product.rmbPrice = that.A14;
  1106. products.push(product);
  1107. product={};
  1108. }
  1109. if(that.A15!=''){
  1110. product.showType = that.equipmentIds;
  1111. product.no = 'A15';
  1112. product.rmbPrice = that.A15;
  1113. products.push(product);
  1114. product={};
  1115. }
  1116. if(that.A16!=''){
  1117. product.showType = that.equipmentIds;
  1118. product.no = 'A16';
  1119. product.rmbPrice = that.A16;
  1120. products.push(product);
  1121. product={};
  1122. }
  1123. if(that.A17!=''){
  1124. product.showType = that.equipmentIds;
  1125. product.no = 'A17';
  1126. product.rmbPrice = that.A17;
  1127. products.push(product);
  1128. product={};
  1129. }
  1130. if(that.A18!=''){
  1131. product.showType = that.equipmentIds;
  1132. product.no = 'A18';
  1133. product.rmbPrice = that.A18;
  1134. products.push(product);
  1135. product={};
  1136. }
  1137. if(that.A19!=''){
  1138. product.showType = that.equipmentIds;
  1139. product.no = 'A19';
  1140. product.rmbPrice = that.A19;
  1141. products.push(product);
  1142. product={};
  1143. }
  1144. if(that.A20!=''){
  1145. product.showType = that.equipmentIds;
  1146. product.no = 'A20';
  1147. product.rmbPrice = that.A20;
  1148. products.push(product);
  1149. product={};
  1150. }
  1151. if(that.A21!=''){
  1152. product.showType = that.equipmentIds;
  1153. product.no = 'A21';
  1154. product.rmbPrice = that.A21;
  1155. products.push(product);
  1156. product={};
  1157. }
  1158. if(that.A22!=''){
  1159. product.showType = that.equipmentIds;
  1160. product.no = 'A22';
  1161. product.rmbPrice = that.A22;
  1162. products.push(product);
  1163. product={};
  1164. }
  1165. if(that.A23!=''){
  1166. product.showType = that.equipmentIds;
  1167. product.no = 'A23';
  1168. product.rmbPrice = that.A23;
  1169. products.push(product);
  1170. product={};
  1171. }
  1172. if(that.A24!=''){
  1173. product.showType = that.equipmentIds;
  1174. product.no = 'A24';
  1175. product.rmbPrice = that.A24;
  1176. products.push(product);
  1177. product={};
  1178. }
  1179. if(that.A25!=''){
  1180. product.showType = that.equipmentIds;
  1181. product.no = 'A25';
  1182. product.rmbPrice = that.A25;
  1183. products.push(product);
  1184. product={};
  1185. }
  1186. if(that.A26!=''){
  1187. product.showType = that.equipmentIds;
  1188. product.no = 'A26';
  1189. product.rmbPrice = that.A26;
  1190. products.push(product);
  1191. product={};
  1192. }
  1193. if(that.A27!=''){
  1194. product.showType = that.equipmentIds;
  1195. product.no = 'A27';
  1196. product.rmbPrice = that.A27;
  1197. products.push(product);
  1198. product={};
  1199. }
  1200. if(that.A28!=''){
  1201. product.showType = that.equipmentIds;
  1202. product.no = 'A28';
  1203. product.rmbPrice = that.A28;
  1204. products.push(product);
  1205. product={};
  1206. }
  1207. if(that.A29!=''){
  1208. product.showType = that.equipmentIds;
  1209. product.no = 'A29';
  1210. product.rmbPrice = that.A29;
  1211. products.push(product);
  1212. product={};
  1213. }
  1214. if(that.A30!=''){
  1215. product.showType = that.equipmentIds;
  1216. product.no = 'A30';
  1217. product.rmbPrice = that.A30;
  1218. products.push(product);
  1219. product={};
  1220. }
  1221. if(that.A31!=''){
  1222. product.showType = that.equipmentIds;
  1223. product.no = 'A31';
  1224. product.rmbPrice = that.A31;
  1225. products.push(product);
  1226. product={};
  1227. }
  1228. if(that.A32!=''){
  1229. product.showType = that.equipmentIds;
  1230. product.no = 'A32';
  1231. product.rmbPrice = that.A32;
  1232. products.push(product);
  1233. product={};
  1234. }
  1235. if(that.A33!=''){
  1236. product.showType = that.equipmentIds;
  1237. product.no = 'A33';
  1238. product.rmbPrice = that.A33;
  1239. products.push(product);
  1240. product={};
  1241. }
  1242. if(that.A34!=''){
  1243. product.showType = that.equipmentIds;
  1244. product.no = 'A34';
  1245. product.rmbPrice = that.A34;
  1246. products.push(product);
  1247. product={};
  1248. }
  1249. if(that.A35!=''){
  1250. product.showType = that.equipmentIds;
  1251. product.no = 'A35';
  1252. product.rmbPrice = that.A35;
  1253. products.push(product);
  1254. product={};
  1255. }
  1256. if(that.A37!=''){
  1257. product.showType = that.equipmentIds;
  1258. product.no = 'A37';
  1259. product.rmbPrice = that.A37;
  1260. products.push(product);
  1261. product={};
  1262. }
  1263. if(that.A38!=''){
  1264. product.showType = that.equipmentIds;
  1265. product.no = 'A38';
  1266. product.rmbPrice = that.A38;
  1267. products.push(product);
  1268. product={};
  1269. }
  1270. if(that.A39!=''){
  1271. product.showType = that.equipmentIds;
  1272. product.no = 'A39';
  1273. product.rmbPrice = that.A39;
  1274. products.push(product);
  1275. product={};
  1276. }
  1277. if(that.A40!=''){
  1278. product.showType = that.equipmentIds;
  1279. product.no = 'A40';
  1280. product.rmbPrice = that.A40;
  1281. products.push(product);
  1282. product={};
  1283. }
  1284. if(that.A41!=''){
  1285. product.showType = that.equipmentIds;
  1286. product.no = 'A41';
  1287. product.rmbPrice = that.A41;
  1288. products.push(product);
  1289. product={};
  1290. }
  1291. if(that.A42!=''){
  1292. product.showType = that.equipmentIds;
  1293. product.no = 'A42';
  1294. product.rmbPrice = that.A42;
  1295. products.push(product);
  1296. product={};
  1297. }
  1298. if(that.A43!=''){
  1299. product.showType = that.equipmentIds;
  1300. product.no = 'A43';
  1301. product.rmbPrice = that.A43;
  1302. products.push(product);
  1303. product={};
  1304. }
  1305. if(that.A44!=''){
  1306. product.showType = that.equipmentIds;
  1307. product.no = 'A44';
  1308. product.rmbPrice = that.A44;
  1309. products.push(product);
  1310. product={};
  1311. }
  1312. if(that.A45!=''){
  1313. product.showType = that.equipmentIds;
  1314. product.no = 'A45';
  1315. product.rmbPrice = that.A45;
  1316. products.push(product);
  1317. product={};
  1318. }
  1319. if(that.A46!=''){
  1320. product.showType = that.equipmentIds;
  1321. product.no = 'A46';
  1322. product.rmbPrice = that.A46;
  1323. products.push(product);
  1324. product={};
  1325. }
  1326. if(that.A47!=''){
  1327. product.showType = that.equipmentIds;
  1328. product.no = 'A47';
  1329. product.rmbPrice = that.A47;
  1330. products.push(product);
  1331. product={};
  1332. }
  1333. if(that.A48!=''){
  1334. product.showType = that.equipmentIds;
  1335. product.no = 'A48';
  1336. product.rmbPrice = that.A48;
  1337. products.push(product);
  1338. product={};
  1339. }
  1340. var list = JSON.stringify(products);
  1341. uni.request({
  1342. url: serverurl + '/TProduct/updateProductsById',
  1343. data: {
  1344. "products": list
  1345. },
  1346. header: {
  1347. 'token': token
  1348. },
  1349. method: "POST",
  1350. success: (res) => {
  1351. if(res.data.code){
  1352. uni.showToast({
  1353. title: res.data.message,
  1354. duration: 1000
  1355. });
  1356. }
  1357. }
  1358. });
  1359. }
  1360. }
  1361. })
  1362. },
  1363. }
  1364. }
  1365. </script>
  1366. <style>
  1367. .test {
  1368. text-align: center;
  1369. padding: 10px 0;
  1370. }
  1371. .time {
  1372. font-size: 78upx;
  1373. }
  1374. .btime {
  1375. margin: 20upx;
  1376. font-size: 28upx;
  1377. }
  1378. /* button {
  1379. margin: 20upx;
  1380. font-size: 28upx;
  1381. } */
  1382. /* #ifdef MP-ALIPAY */
  1383. .uni-badge {
  1384. margin-left: 20rpx;
  1385. }
  1386. /* #endif */
  1387. .uni-badge {
  1388. font-size: 40upx;
  1389. }
  1390. .example-body {
  1391. flex-direction: row;
  1392. justify-content: flex-start;
  1393. padding-bottom: 15upx;
  1394. font-size: 40upx;
  1395. }
  1396. .uni-badge-left-margin {
  1397. font-size: 40upx;
  1398. margin-left: 50upx;
  1399. }
  1400. .uni-list-cell {
  1401. padding-top: 20upx;
  1402. padding-bottom: 10upx;
  1403. font-size: 35upx;
  1404. }
  1405. .line {
  1406. height: 2upx;
  1407. background: #8C959F;
  1408. }
  1409. .search {
  1410. width: 100%;
  1411. padding-top: 15upx;
  1412. padding-bottom: 15upx;
  1413. display: flex;
  1414. flex-direction: row;
  1415. justify-content: flex-start;
  1416. }
  1417. .search-title {
  1418. width: 28%;
  1419. text-align: center;
  1420. font-size: 26upx;
  1421. font-family: "PingFang-SC-Bold";
  1422. }
  1423. .search-input{
  1424. width: 48%;
  1425. height: 25px;
  1426. text-align: center;
  1427. font-size: 26upx;
  1428. /* font-family: "PingFang-SC-Bold"; */
  1429. box-shadow: 0upx 0upx 20upx #D3D3D3;
  1430. border-radius: 5upx;
  1431. }
  1432. .search-input2 {
  1433. width: 65%;
  1434. text-align: center;
  1435. font-size: 26upx;
  1436. font-family: "PingFang-SC-Bold";
  1437. box-shadow: 0upx 0upx 20upx #D3D3D3;
  1438. border-radius: 5upx;
  1439. }
  1440. .search-input3 {
  1441. width: 65%;
  1442. text-align: center;
  1443. font-size: 26upx;
  1444. font-family: "PingFang-SC-Bold";
  1445. }
  1446. .search-button{
  1447. width: 20%;
  1448. padding-left: 10px;
  1449. padding-bottom: 5px;
  1450. text-align: center;
  1451. height: 60upx;
  1452. text-align: left;
  1453. }
  1454. .select-item {
  1455. /* padding-top: 20upx; */
  1456. }
  1457. .tr {
  1458. padding-top: 15upx;
  1459. display: flex;
  1460. flex-direction: row;
  1461. justify-content: flex-start;
  1462. font-size: 48upx;
  1463. font-family: "PingFang-SC-Bold";
  1464. /* position: fixed; */
  1465. bottom: 100upx;
  1466. width: 100%;
  1467. }
  1468. .button {
  1469. margin: auto;
  1470. width: 60%;
  1471. height: 100upx;
  1472. }
  1473. .p1 {
  1474. font-size: 48upx;
  1475. }
  1476. </style>