updatePrice.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500
  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. export default {
  474. components: {
  475. MxDatePicker,
  476. ldSelect,
  477. likeButton
  478. },
  479. data() {
  480. return {
  481. value: '',
  482. searchClientId: null,
  483. equipmentName: null,
  484. equipmentNameList: [],
  485. globalUser: {},
  486. equipmentIds: [],
  487. A01:'',
  488. A02:'',
  489. A03:'',
  490. A04:'',
  491. A05:'',
  492. A06:'',
  493. A07:'',
  494. A08:'',
  495. A09:'',
  496. A10:'',
  497. A11:'',
  498. A12:'',
  499. A13:'',
  500. A14:'',
  501. A15:'',
  502. A16:'',
  503. A17:'',
  504. A18:'',
  505. A19:'',
  506. A20:'',
  507. A21:'',
  508. A22:'',
  509. A23:'',
  510. A24:'',
  511. A25:'',
  512. A26:'',
  513. A27:'',
  514. A28:'',
  515. A29:'',
  516. A30:'',
  517. A31:'',
  518. A32:'',
  519. A33:'',
  520. A34:'',
  521. A35:'',
  522. A37:'',
  523. A38:'',
  524. A39:'',
  525. A40:'',
  526. A41:'',
  527. A42:'',
  528. A43:'',
  529. A44:'',
  530. A45:'',
  531. A46:'',
  532. A47:'',
  533. A48:''
  534. }
  535. },
  536. onShow() {
  537. this.globalUser = uni.getStorageSync("globalUser");
  538. uni.setNavigationBarTitle({
  539. title: this.$t('remoteList.price')
  540. });
  541. var token = uni.getStorageSync("token");
  542. if (token.length > 1) {
  543. this.getEquipmentListData();
  544. } else {
  545. uni.reLaunch({
  546. url: '../../../pages/Login/Login',
  547. });
  548. }
  549. },
  550. onLoad() {
  551. },
  552. methods: {
  553. ...mapActions('chart', ['getEquipmentListByUser', 'addAlarmClock', 'addAlarmClockItem', 'updateAlarmClock']),
  554. getEquipmentListData() {
  555. this.getEquipmentListByUser(this.globalUser)
  556. .then(data => {
  557. // this.merchantList = data;
  558. // console.log("1223");
  559. var listName = data[0].equipmentList;
  560. var equipmentNameList = this.equipmentNameList;
  561. var co = {};
  562. co["value"] = 'all';
  563. co["label"] = this.$t('common.allDevice');
  564. equipmentNameList.push(co);
  565. for (var i = 0; i < listName.length; i++) {
  566. var cov = {};
  567. cov["value"] = listName[i].id;
  568. cov["label"] = this.$t('common.name') + listName[i].name + ' , '+ this.$t('common.ID') + listName[i].clientId.substring(
  569. listName[i].clientId.length - 6, listName[i].clientId.length);
  570. equipmentNameList.push(cov);
  571. }
  572. this.equipmentNameList = equipmentNameList;
  573. var listId = data[0].id;
  574. if (listId != null && listId != '1') {
  575. uni.setStorageSync("listName", listName);
  576. }
  577. uni.stopPullDownRefresh();
  578. }, _ => void uni.stopPullDownRefresh());
  579. },
  580. onSelected(e) { //选择
  581. this.showPicker = false;
  582. if (e) {
  583. this[this.type] = e.value;
  584. //选择的值
  585. // console.log('value => ' + e.value);
  586. //原始的Date对象
  587. // console.log('date => ' + e.date);
  588. }
  589. },
  590. // bindPickerChange: function(e) {
  591. // this.indexType = e.target.value
  592. // },
  593. addEids(equipmentIds) {
  594. // console.log('equipmentIds' + equipmentIds);
  595. var eids = equipmentIds.split(",");
  596. var idss = this.equipmentIds;
  597. var is = this.equipmentNameList
  598. for (var k = 0; k < eids.length; k++) {
  599. var id = eids[k];
  600. if (id != "" && id != '') {
  601. this.equipmentIds.push(parseInt(id));
  602. }
  603. }
  604. },
  605. search() {
  606. // console.log("search");
  607. var clientId = this.searchClientId;
  608. var list = uni.getStorageSync("listName");
  609. var n = 0;
  610. for (var i = 0; i < list.length; i++) {
  611. var code = list[i].clientId.substring(list[i].clientId.length - 6, list[i].clientId.length);
  612. if (code == clientId) {
  613. n++;
  614. var id = list[i].id;
  615. this.equipmentIds.push(id);
  616. setTimeout(() => {
  617. this.getProduct();
  618. }, 2000);
  619. break;
  620. }
  621. }
  622. if (n == 0) {
  623. uni.showModal({
  624. title: this.$t('common.tip'),
  625. content: this.$t('common.noDevice'),
  626. success: (res) => {
  627. }
  628. })
  629. }
  630. if (n > 0) {
  631. uni.showModal({
  632. title: this.$t('common.tip'),
  633. content: this.$t('common.addDevice'),
  634. success: (res) => {
  635. }
  636. })
  637. }
  638. },
  639. selectChange2(val) {
  640. //有改动文件 import likeButton from "../../components/like-button/like-button.vue";
  641. if (val == "all") {
  642. this.equipmentIds = [];
  643. var list = uni.getStorageSync("listName");
  644. for (var i = 0; i < list.length; i++) {
  645. this.equipmentIds.push(list[i].id);
  646. }
  647. } else {
  648. this.equipmentIds = val
  649. }
  650. console.log('this.equipmentIds => ' + this.equipmentIds);
  651. if(val.length==1){
  652. setTimeout(() => {
  653. this.getProduct();
  654. }, 2000);
  655. }
  656. },
  657. getProduct(){
  658. if(this.equipmentIds.length!=1){
  659. return;
  660. }
  661. var serverurl = this.serverurl;
  662. var token = uni.getStorageSync("token");
  663. uni.request({
  664. url: serverurl + '/TProduct/selectProducts?equimentId='+this.equipmentIds,
  665. // data: {
  666. // "equipmentIds": that.equipmentIds,
  667. // "guestPwd": that.guestPwd,
  668. // "adminPwd": that.adminPwd,
  669. // },
  670. method: "GET",
  671. header: {
  672. 'token': token
  673. },
  674. success: (res) => {
  675. if(res.data.code){
  676. var list = res.data.data;
  677. var ifForeign = this.globalUser.ifForeign;
  678. if(ifForeign==0){
  679. for (var i = 0; i < list.length; i++) {
  680. var no = list[i].no;
  681. switch(no){
  682. case "A01":
  683. this.A01 = list[i].rmbPrice;
  684. break;
  685. case "A02":
  686. this.A02 = list[i].rmbPrice;
  687. break;
  688. case "A03":
  689. this.A03 = list[i].rmbPrice;
  690. break;
  691. case "A04":
  692. this.A04 = list[i].rmbPrice;
  693. break;
  694. case "A05":
  695. this.A05 = list[i].rmbPrice;
  696. break;
  697. case "A06":
  698. this.A06 = list[i].rmbPrice;
  699. break;
  700. case "A07":
  701. this.A07 = list[i].rmbPrice;
  702. break;
  703. case "A07":
  704. this.A07 = list[i].rmbPrice;
  705. break;
  706. case "A08":
  707. this.A08 = list[i].rmbPrice;
  708. break;
  709. case "A09":
  710. this.A09 = list[i].rmbPrice;
  711. break;
  712. case "A10":
  713. this.A10 = list[i].rmbPrice;
  714. break;
  715. case "A11":
  716. this.A11 = list[i].rmbPrice;
  717. break;
  718. case "A12":
  719. this.A12 = list[i].rmbPrice;
  720. break;
  721. case "A13":
  722. this.A13 = list[i].rmbPrice;
  723. break;
  724. case "A14":
  725. this.A14 = list[i].rmbPrice;
  726. break;
  727. case "A15":
  728. this.A15 = list[i].rmbPrice;
  729. break;
  730. case "A16":
  731. this.A16 = list[i].rmbPrice;
  732. break;
  733. case "A17":
  734. this.A17 = list[i].rmbPrice;
  735. break;
  736. case "A18":
  737. this.A18 = list[i].rmbPrice;
  738. break;
  739. case "A19":
  740. this.A19 = list[i].rmbPrice;
  741. break;
  742. case "A20":
  743. this.A20 = list[i].rmbPrice;
  744. break;
  745. case "A21":
  746. this.A21 = list[i].rmbPrice;
  747. break;
  748. case "A22":
  749. this.A22 = list[i].rmbPrice;
  750. break;
  751. case "A23":
  752. this.A23 = list[i].rmbPrice;
  753. break;
  754. case "A24":
  755. this.A24 = list[i].rmbPrice;
  756. break;
  757. case "A25":
  758. this.A25 = list[i].rmbPrice;
  759. break;
  760. case "A26":
  761. this.A26 = list[i].rmbPrice;
  762. break;
  763. case "A27":
  764. this.A27 = list[i].rmbPrice;
  765. break;
  766. case "A28":
  767. this.A28 = list[i].rmbPrice;
  768. break;
  769. case "A29":
  770. this.A29 = list[i].rmbPrice;
  771. break;
  772. case "A30":
  773. this.A30 = list[i].rmbPrice;
  774. break;
  775. case "A31":
  776. this.A31 = list[i].rmbPrice;
  777. break;
  778. case "A32":
  779. this.A32 = list[i].rmbPrice;
  780. break;
  781. case "A33":
  782. this.A33 = list[i].rmbPrice;
  783. break;
  784. case "A34":
  785. this.A34 = list[i].rmbPrice;
  786. break;
  787. case "A35":
  788. this.A35 = list[i].rmbPrice;
  789. break;
  790. case "A37":
  791. this.A37 = list[i].codePrice;
  792. break;
  793. case "A38":
  794. this.A38 = list[i].codePrice;
  795. break;
  796. case "A39":
  797. this.A39 = list[i].codePrice;
  798. break;
  799. case "A40":
  800. this.A40 = list[i].codePrice;
  801. break;
  802. case "A41":
  803. this.A41 = list[i].codePrice;
  804. break;
  805. case "A42":
  806. this.A42 = list[i].codePrice;
  807. break;
  808. case "A43":
  809. this.A43 = list[i].codePrice;
  810. break;
  811. case "A44":
  812. this.A44 = list[i].codePrice;
  813. break;
  814. case "A45":
  815. this.A45 = list[i].codePrice;
  816. break;
  817. case "A46":
  818. this.A46 = list[i].codePrice;
  819. break;
  820. case "A47":
  821. this.A47 = list[i].codePrice;
  822. break;
  823. case "A48":
  824. this.A48 = list[i].codePrice;
  825. break;
  826. }
  827. }
  828. }else{
  829. for (var i = 0; i < list.length; i++) {
  830. var no = list[i].no;
  831. switch(no){
  832. case "A01":
  833. this.A01 = list[i].codePrice;
  834. break;
  835. case "A02":
  836. this.A02 = list[i].codePrice;
  837. break;
  838. case "A03":
  839. this.A03 = list[i].codePrice;
  840. break;
  841. case "A04":
  842. this.A04 = list[i].codePrice;
  843. break;
  844. case "A05":
  845. this.A05 = list[i].codePrice;
  846. break;
  847. case "A06":
  848. this.A06 = list[i].codePrice;
  849. break;
  850. case "A07":
  851. this.A07 = list[i].codePrice;
  852. break;
  853. case "A07":
  854. this.A07 = list[i].codePrice;
  855. break;
  856. case "A08":
  857. this.A08 = list[i].codePrice;
  858. break;
  859. case "A09":
  860. this.A09 = list[i].codePrice;
  861. break;
  862. case "A10":
  863. this.A10 = list[i].codePrice;
  864. break;
  865. case "A11":
  866. this.A11 = list[i].codePrice;
  867. break;
  868. case "A12":
  869. this.A12 = list[i].codePrice;
  870. break;
  871. case "A13":
  872. this.A13 = list[i].codePrice;
  873. break;
  874. case "A14":
  875. this.A14 = list[i].codePrice;
  876. break;
  877. case "A15":
  878. this.A15 = list[i].codePrice;
  879. break;
  880. case "A16":
  881. this.A16 = list[i].codePrice;
  882. break;
  883. case "A17":
  884. this.A17 = list[i].codePrice;
  885. break;
  886. case "A18":
  887. this.A18 = list[i].codePrice;
  888. break;
  889. case "A19":
  890. this.A19 = list[i].codePrice;
  891. break;
  892. case "A20":
  893. this.A20 = list[i].codePrice;
  894. break;
  895. case "A21":
  896. this.A21 = list[i].codePrice;
  897. break;
  898. case "A22":
  899. this.A22 = list[i].codePrice;
  900. break;
  901. case "A23":
  902. this.A23 = list[i].codePrice;
  903. break;
  904. case "A24":
  905. this.A24 = list[i].codePrice;
  906. break;
  907. case "A25":
  908. this.A25 = list[i].codePrice;
  909. break;
  910. case "A26":
  911. this.A26 = list[i].codePrice;
  912. break;
  913. case "A27":
  914. this.A27 = list[i].codePrice;
  915. break;
  916. case "A28":
  917. this.A28 = list[i].codePrice;
  918. break;
  919. case "A29":
  920. this.A29 = list[i].codePrice;
  921. break;
  922. case "A30":
  923. this.A30 = list[i].codePrice;
  924. break;
  925. case "A31":
  926. this.A31 = list[i].codePrice;
  927. break;
  928. case "A32":
  929. this.A32 = list[i].codePrice;
  930. break;
  931. case "A33":
  932. this.A33 = list[i].codePrice;
  933. break;
  934. case "A34":
  935. this.A34 = list[i].codePrice;
  936. break;
  937. case "A35":
  938. this.A35 = list[i].codePrice;
  939. break;
  940. case "A37":
  941. this.A37 = list[i].codePrice;
  942. break;
  943. case "A38":
  944. this.A38 = list[i].codePrice;
  945. break;
  946. case "A39":
  947. this.A39 = list[i].codePrice;
  948. break;
  949. case "A40":
  950. this.A40 = list[i].codePrice;
  951. break;
  952. case "A41":
  953. this.A41 = list[i].codePrice;
  954. break;
  955. case "A42":
  956. this.A42 = list[i].codePrice;
  957. break;
  958. case "A43":
  959. this.A43 = list[i].codePrice;
  960. break;
  961. case "A44":
  962. this.A44 = list[i].codePrice;
  963. break;
  964. case "A45":
  965. this.A45 = list[i].codePrice;
  966. break;
  967. case "A46":
  968. this.A46 = list[i].codePrice;
  969. break;
  970. case "A47":
  971. this.A47 = list[i].codePrice;
  972. break;
  973. case "A48":
  974. this.A48 = list[i].codePrice;
  975. break;
  976. }
  977. }
  978. }
  979. }
  980. }
  981. });
  982. },
  983. switchChange: function(e) {
  984. this.status = e.target.value;
  985. },
  986. update() {
  987. if(this.equipmentIds==''||this.equipmentIds.length==0){
  988. return;
  989. }
  990. var that = this;
  991. uni.showModal({
  992. title: that.$t('equipmentStatusList.tip'),
  993. content:that.$t('updatePassword.sure') ,
  994. success: (re) => {
  995. if (re.confirm) {
  996. var serverurl = that.serverurl;
  997. var token = uni.getStorageSync("token");
  998. var products = [];
  999. var product ={
  1000. showType:'',
  1001. no:'',
  1002. rmbPrice:''
  1003. }
  1004. if(that.equipmentIds!=''){
  1005. product.showType = that.equipmentIds;
  1006. }
  1007. if(that.A01!=''){
  1008. product.showType = that.equipmentIds;
  1009. product.no = 'A01';
  1010. product.rmbPrice = that.A01;
  1011. products.push(product);
  1012. product={};
  1013. }
  1014. if(that.A02!=''){
  1015. product.showType = that.equipmentIds;
  1016. product.no = 'A02';
  1017. product.rmbPrice = that.A02;
  1018. products.push(product);
  1019. product={};
  1020. }
  1021. if(that.A03!=''){
  1022. product.showType = that.equipmentIds;
  1023. product.no = 'A03';
  1024. product.rmbPrice = that.A03;
  1025. products.push(product);
  1026. product={};
  1027. }
  1028. if(that.A04!=''){
  1029. product.showType = that.equipmentIds;
  1030. product.no = 'A04';
  1031. product.rmbPrice = that.A04;
  1032. products.push(product);
  1033. product={};
  1034. }
  1035. if(that.A05!=''){
  1036. product.showType = that.equipmentIds;
  1037. product.no = 'A05';
  1038. product.rmbPrice = that.A05;
  1039. products.push(product);
  1040. product={};
  1041. }
  1042. if(that.A06!=''){
  1043. product.showType = that.equipmentIds;
  1044. product.no = 'A06';
  1045. product.rmbPrice = that.A06;
  1046. products.push(product);
  1047. product={};
  1048. }
  1049. if(that.A07!=''){
  1050. product.showType = that.equipmentIds;
  1051. product.no = 'A07';
  1052. product.rmbPrice = that.A07;
  1053. products.push(product);
  1054. product={};
  1055. }
  1056. if(that.A08!=''){
  1057. product.showType = that.equipmentIds;
  1058. product.no = 'A08';
  1059. product.rmbPrice = that.A08;
  1060. products.push(product);
  1061. product={};
  1062. }
  1063. if(that.A09!=''){
  1064. product.showType = that.equipmentIds;
  1065. product.no = 'A09';
  1066. product.rmbPrice = that.A09;
  1067. products.push(product);
  1068. product={};
  1069. }
  1070. if(that.A10!=''){
  1071. product.showType = that.equipmentIds;
  1072. product.no = 'A10';
  1073. product.rmbPrice = that.A10;
  1074. products.push(product);
  1075. product={};
  1076. }
  1077. if(that.A11!=''){
  1078. product.showType = that.equipmentIds;
  1079. product.no = 'A11';
  1080. product.rmbPrice = that.A11;
  1081. products.push(product);
  1082. product={};
  1083. }
  1084. if(that.A12!=''){
  1085. product.showType = that.equipmentIds;
  1086. product.no = 'A12';
  1087. product.rmbPrice = that.A12;
  1088. products.push(product);
  1089. product={};
  1090. }
  1091. if(that.A13!=''){
  1092. product.showType = that.equipmentIds;
  1093. product.no = 'A13';
  1094. product.rmbPrice = that.A13;
  1095. products.push(product);
  1096. product={};
  1097. }
  1098. if(that.A14!=''){
  1099. product.showType = that.equipmentIds;
  1100. product.no = 'A14';
  1101. product.rmbPrice = that.A14;
  1102. products.push(product);
  1103. product={};
  1104. }
  1105. if(that.A15!=''){
  1106. product.showType = that.equipmentIds;
  1107. product.no = 'A15';
  1108. product.rmbPrice = that.A15;
  1109. products.push(product);
  1110. product={};
  1111. }
  1112. if(that.A16!=''){
  1113. product.showType = that.equipmentIds;
  1114. product.no = 'A16';
  1115. product.rmbPrice = that.A16;
  1116. products.push(product);
  1117. product={};
  1118. }
  1119. if(that.A17!=''){
  1120. product.showType = that.equipmentIds;
  1121. product.no = 'A17';
  1122. product.rmbPrice = that.A17;
  1123. products.push(product);
  1124. product={};
  1125. }
  1126. if(that.A18!=''){
  1127. product.showType = that.equipmentIds;
  1128. product.no = 'A18';
  1129. product.rmbPrice = that.A18;
  1130. products.push(product);
  1131. product={};
  1132. }
  1133. if(that.A19!=''){
  1134. product.showType = that.equipmentIds;
  1135. product.no = 'A19';
  1136. product.rmbPrice = that.A19;
  1137. products.push(product);
  1138. product={};
  1139. }
  1140. if(that.A20!=''){
  1141. product.showType = that.equipmentIds;
  1142. product.no = 'A20';
  1143. product.rmbPrice = that.A20;
  1144. products.push(product);
  1145. product={};
  1146. }
  1147. if(that.A21!=''){
  1148. product.showType = that.equipmentIds;
  1149. product.no = 'A21';
  1150. product.rmbPrice = that.A21;
  1151. products.push(product);
  1152. product={};
  1153. }
  1154. if(that.A22!=''){
  1155. product.showType = that.equipmentIds;
  1156. product.no = 'A22';
  1157. product.rmbPrice = that.A22;
  1158. products.push(product);
  1159. product={};
  1160. }
  1161. if(that.A23!=''){
  1162. product.showType = that.equipmentIds;
  1163. product.no = 'A23';
  1164. product.rmbPrice = that.A23;
  1165. products.push(product);
  1166. product={};
  1167. }
  1168. if(that.A24!=''){
  1169. product.showType = that.equipmentIds;
  1170. product.no = 'A24';
  1171. product.rmbPrice = that.A24;
  1172. products.push(product);
  1173. product={};
  1174. }
  1175. if(that.A25!=''){
  1176. product.showType = that.equipmentIds;
  1177. product.no = 'A25';
  1178. product.rmbPrice = that.A25;
  1179. products.push(product);
  1180. product={};
  1181. }
  1182. if(that.A26!=''){
  1183. product.showType = that.equipmentIds;
  1184. product.no = 'A26';
  1185. product.rmbPrice = that.A26;
  1186. products.push(product);
  1187. product={};
  1188. }
  1189. if(that.A27!=''){
  1190. product.showType = that.equipmentIds;
  1191. product.no = 'A27';
  1192. product.rmbPrice = that.A27;
  1193. products.push(product);
  1194. product={};
  1195. }
  1196. if(that.A28!=''){
  1197. product.showType = that.equipmentIds;
  1198. product.no = 'A28';
  1199. product.rmbPrice = that.A28;
  1200. products.push(product);
  1201. product={};
  1202. }
  1203. if(that.A29!=''){
  1204. product.showType = that.equipmentIds;
  1205. product.no = 'A29';
  1206. product.rmbPrice = that.A29;
  1207. products.push(product);
  1208. product={};
  1209. }
  1210. if(that.A30!=''){
  1211. product.showType = that.equipmentIds;
  1212. product.no = 'A30';
  1213. product.rmbPrice = that.A30;
  1214. products.push(product);
  1215. product={};
  1216. }
  1217. if(that.A31!=''){
  1218. product.showType = that.equipmentIds;
  1219. product.no = 'A31';
  1220. product.rmbPrice = that.A31;
  1221. products.push(product);
  1222. product={};
  1223. }
  1224. if(that.A32!=''){
  1225. product.showType = that.equipmentIds;
  1226. product.no = 'A32';
  1227. product.rmbPrice = that.A32;
  1228. products.push(product);
  1229. product={};
  1230. }
  1231. if(that.A33!=''){
  1232. product.showType = that.equipmentIds;
  1233. product.no = 'A33';
  1234. product.rmbPrice = that.A33;
  1235. products.push(product);
  1236. product={};
  1237. }
  1238. if(that.A34!=''){
  1239. product.showType = that.equipmentIds;
  1240. product.no = 'A34';
  1241. product.rmbPrice = that.A34;
  1242. products.push(product);
  1243. product={};
  1244. }
  1245. if(that.A35!=''){
  1246. product.showType = that.equipmentIds;
  1247. product.no = 'A35';
  1248. product.rmbPrice = that.A35;
  1249. products.push(product);
  1250. product={};
  1251. }
  1252. if(that.A37!=''){
  1253. product.showType = that.equipmentIds;
  1254. product.no = 'A37';
  1255. product.rmbPrice = that.A37;
  1256. products.push(product);
  1257. product={};
  1258. }
  1259. if(that.A38!=''){
  1260. product.showType = that.equipmentIds;
  1261. product.no = 'A38';
  1262. product.rmbPrice = that.A38;
  1263. products.push(product);
  1264. product={};
  1265. }
  1266. if(that.A39!=''){
  1267. product.showType = that.equipmentIds;
  1268. product.no = 'A39';
  1269. product.rmbPrice = that.A39;
  1270. products.push(product);
  1271. product={};
  1272. }
  1273. if(that.A40!=''){
  1274. product.showType = that.equipmentIds;
  1275. product.no = 'A40';
  1276. product.rmbPrice = that.A40;
  1277. products.push(product);
  1278. product={};
  1279. }
  1280. if(that.A41!=''){
  1281. product.showType = that.equipmentIds;
  1282. product.no = 'A41';
  1283. product.rmbPrice = that.A41;
  1284. products.push(product);
  1285. product={};
  1286. }
  1287. if(that.A42!=''){
  1288. product.showType = that.equipmentIds;
  1289. product.no = 'A42';
  1290. product.rmbPrice = that.A42;
  1291. products.push(product);
  1292. product={};
  1293. }
  1294. if(that.A43!=''){
  1295. product.showType = that.equipmentIds;
  1296. product.no = 'A43';
  1297. product.rmbPrice = that.A43;
  1298. products.push(product);
  1299. product={};
  1300. }
  1301. if(that.A44!=''){
  1302. product.showType = that.equipmentIds;
  1303. product.no = 'A44';
  1304. product.rmbPrice = that.A44;
  1305. products.push(product);
  1306. product={};
  1307. }
  1308. if(that.A45!=''){
  1309. product.showType = that.equipmentIds;
  1310. product.no = 'A45';
  1311. product.rmbPrice = that.A45;
  1312. products.push(product);
  1313. product={};
  1314. }
  1315. if(that.A46!=''){
  1316. product.showType = that.equipmentIds;
  1317. product.no = 'A46';
  1318. product.rmbPrice = that.A46;
  1319. products.push(product);
  1320. product={};
  1321. }
  1322. if(that.A47!=''){
  1323. product.showType = that.equipmentIds;
  1324. product.no = 'A47';
  1325. product.rmbPrice = that.A47;
  1326. products.push(product);
  1327. product={};
  1328. }
  1329. if(that.A48!=''){
  1330. product.showType = that.equipmentIds;
  1331. product.no = 'A48';
  1332. product.rmbPrice = that.A48;
  1333. products.push(product);
  1334. product={};
  1335. }
  1336. var list = JSON.stringify(products);
  1337. uni.request({
  1338. url: serverurl + '/TProduct/updateProductsById',
  1339. data: {
  1340. "products": list
  1341. },
  1342. header: {
  1343. 'token': token
  1344. },
  1345. method: "POST",
  1346. success: (res) => {
  1347. if(res.data.code){
  1348. uni.showToast({
  1349. title: res.data.message,
  1350. duration: 1000
  1351. });
  1352. }
  1353. }
  1354. });
  1355. }
  1356. }
  1357. })
  1358. },
  1359. }
  1360. }
  1361. </script>
  1362. <style>
  1363. .test {
  1364. text-align: center;
  1365. padding: 10px 0;
  1366. }
  1367. .time {
  1368. font-size: 78upx;
  1369. }
  1370. .btime {
  1371. margin: 20upx;
  1372. font-size: 28upx;
  1373. }
  1374. /* button {
  1375. margin: 20upx;
  1376. font-size: 28upx;
  1377. } */
  1378. /* #ifdef MP-ALIPAY */
  1379. .uni-badge {
  1380. margin-left: 20rpx;
  1381. }
  1382. /* #endif */
  1383. .uni-badge {
  1384. font-size: 40upx;
  1385. }
  1386. .example-body {
  1387. flex-direction: row;
  1388. justify-content: flex-start;
  1389. padding-bottom: 15upx;
  1390. font-size: 40upx;
  1391. }
  1392. .uni-badge-left-margin {
  1393. font-size: 40upx;
  1394. margin-left: 50upx;
  1395. }
  1396. .uni-list-cell {
  1397. padding-top: 20upx;
  1398. padding-bottom: 10upx;
  1399. font-size: 35upx;
  1400. }
  1401. .line {
  1402. height: 2upx;
  1403. background: #8C959F;
  1404. }
  1405. .search {
  1406. width: 100%;
  1407. padding-top: 15upx;
  1408. padding-bottom: 15upx;
  1409. display: flex;
  1410. flex-direction: row;
  1411. justify-content: flex-start;
  1412. }
  1413. .search-title {
  1414. width: 28%;
  1415. text-align: center;
  1416. font-size: 26upx;
  1417. font-family: "PingFang-SC-Bold";
  1418. }
  1419. .search-input{
  1420. width: 48%;
  1421. height: 25px;
  1422. text-align: center;
  1423. font-size: 26upx;
  1424. /* font-family: "PingFang-SC-Bold"; */
  1425. box-shadow: 0upx 0upx 20upx #D3D3D3;
  1426. border-radius: 5upx;
  1427. }
  1428. .search-input2 {
  1429. width: 65%;
  1430. text-align: center;
  1431. font-size: 26upx;
  1432. font-family: "PingFang-SC-Bold";
  1433. box-shadow: 0upx 0upx 20upx #D3D3D3;
  1434. border-radius: 5upx;
  1435. }
  1436. .search-input3 {
  1437. width: 65%;
  1438. text-align: center;
  1439. font-size: 26upx;
  1440. font-family: "PingFang-SC-Bold";
  1441. }
  1442. .search-button{
  1443. width: 20%;
  1444. padding-left: 10px;
  1445. padding-bottom: 5px;
  1446. text-align: center;
  1447. height: 60upx;
  1448. text-align: left;
  1449. }
  1450. .select-item {
  1451. /* padding-top: 20upx; */
  1452. }
  1453. .tr {
  1454. padding-top: 15upx;
  1455. display: flex;
  1456. flex-direction: row;
  1457. justify-content: flex-start;
  1458. font-size: 48upx;
  1459. font-family: "PingFang-SC-Bold";
  1460. /* position: fixed; */
  1461. bottom: 100upx;
  1462. width: 100%;
  1463. }
  1464. .button {
  1465. margin: auto;
  1466. width: 60%;
  1467. height: 100upx;
  1468. }
  1469. .p1 {
  1470. font-size: 48upx;
  1471. }
  1472. </style>