updatePrice.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221
  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. <!-- //提交按钮 -->
  348. <view class="tr">
  349. <button type="primary" formType="submit" @click="update()" class="button">
  350. <p class="p1">{{$t('alarmClock.update')}}</p>
  351. </button>
  352. </view>
  353. </view>
  354. </template>
  355. <script>
  356. import {
  357. mapState,
  358. mapActions,
  359. mapMutations
  360. } from 'vuex'
  361. import MxDatePicker from "../../components/mx-datepicker/mx-datepicker.vue";
  362. // import ldSelect from "../../components/ld-select/ld-select.vue";
  363. import ldSelect from "../../components/ld-select/ld-select.vue"
  364. import likeButton from "../../components/like-button/like-button.vue";
  365. export default {
  366. components: {
  367. MxDatePicker,
  368. ldSelect,
  369. likeButton
  370. },
  371. data() {
  372. return {
  373. value: '',
  374. searchClientId: null,
  375. equipmentName: null,
  376. equipmentNameList: [],
  377. globalUser: {},
  378. equipmentIds: [],
  379. A01:'',
  380. A02:'',
  381. A03:'',
  382. A04:'',
  383. A05:'',
  384. A06:'',
  385. A07:'',
  386. A08:'',
  387. A09:'',
  388. A10:'',
  389. A11:'',
  390. A12:'',
  391. A13:'',
  392. A14:'',
  393. A15:'',
  394. A16:'',
  395. A17:'',
  396. A18:'',
  397. A19:'',
  398. A20:'',
  399. A21:'',
  400. A22:'',
  401. A23:'',
  402. A24:'',
  403. A25:'',
  404. A26:'',
  405. A27:'',
  406. A28:'',
  407. A29:'',
  408. A30:'',
  409. A31:'',
  410. A32:'',
  411. A33:'',
  412. A34:'',
  413. A35:'',
  414. }
  415. },
  416. onShow() {
  417. this.globalUser = uni.getStorageSync("globalUser");
  418. uni.setNavigationBarTitle({
  419. title: this.$t('remoteList.price')
  420. });
  421. var token = uni.getStorageSync("token");
  422. if (token.length > 1) {
  423. this.getEquipmentListData();
  424. } else {
  425. uni.reLaunch({
  426. url: '../../../pages/Login/Login',
  427. });
  428. }
  429. },
  430. onLoad() {
  431. },
  432. methods: {
  433. ...mapActions('chart', ['getEquipmentListByUser', 'addAlarmClock', 'addAlarmClockItem', 'updateAlarmClock']),
  434. getEquipmentListData() {
  435. this.getEquipmentListByUser(this.globalUser)
  436. .then(data => {
  437. // this.merchantList = data;
  438. // console.log("1223");
  439. var listName = data[0].equipmentList;
  440. var equipmentNameList = this.equipmentNameList;
  441. var co = {};
  442. co["value"] = 'all';
  443. co["label"] = '全部机器ALL machine';
  444. equipmentNameList.push(co);
  445. for (var i = 0; i < listName.length; i++) {
  446. var cov = {};
  447. cov["value"] = listName[i].id;
  448. cov["label"] = this.$t('common.name') + listName[i].name + ' , '+ this.$t('common.ID') + listName[i].clientId.substring(
  449. listName[i].clientId.length - 6, listName[i].clientId.length);
  450. equipmentNameList.push(cov);
  451. }
  452. this.equipmentNameList = equipmentNameList;
  453. var listId = data[0].id;
  454. if (listId != null && listId != '1') {
  455. uni.setStorageSync("listName", listName);
  456. }
  457. uni.stopPullDownRefresh();
  458. }, _ => void uni.stopPullDownRefresh());
  459. },
  460. onSelected(e) { //选择
  461. this.showPicker = false;
  462. if (e) {
  463. this[this.type] = e.value;
  464. //选择的值
  465. // console.log('value => ' + e.value);
  466. //原始的Date对象
  467. // console.log('date => ' + e.date);
  468. }
  469. },
  470. // bindPickerChange: function(e) {
  471. // this.indexType = e.target.value
  472. // },
  473. addEids(equipmentIds) {
  474. // console.log('equipmentIds' + equipmentIds);
  475. var eids = equipmentIds.split(",");
  476. var idss = this.equipmentIds;
  477. var is = this.equipmentNameList
  478. for (var k = 0; k < eids.length; k++) {
  479. var id = eids[k];
  480. if (id != "" && id != '') {
  481. this.equipmentIds.push(parseInt(id));
  482. }
  483. }
  484. },
  485. search() {
  486. // console.log("search");
  487. var clientId = this.searchClientId;
  488. var list = uni.getStorageSync("listName");
  489. var n = 0;
  490. for (var i = 0; i < list.length; i++) {
  491. var code = list[i].clientId.substring(list[i].clientId.length - 6, list[i].clientId.length);
  492. if (code == clientId) {
  493. n++;
  494. var id = list[i].id;
  495. this.equipmentIds.push(id);
  496. break;
  497. }
  498. }
  499. if (n == 0) {
  500. uni.showModal({
  501. title: "提示",
  502. content: "找不到该机器",
  503. success: (res) => {
  504. }
  505. })
  506. }
  507. if (n > 0) {
  508. uni.showModal({
  509. title: "提示",
  510. content: "已添加该机器",
  511. success: (res) => {
  512. }
  513. })
  514. }
  515. },
  516. selectChange2(val) {
  517. //有改动文件 import likeButton from "../../components/like-button/like-button.vue";
  518. if (val == "all") {
  519. this.equipmentIds = [];
  520. var list = uni.getStorageSync("listName");
  521. for (var i = 0; i < list.length; i++) {
  522. this.equipmentIds.push(list[i].id);
  523. }
  524. } else {
  525. this.equipmentIds = val
  526. }
  527. console.log('this.equipmentIds => ' + this.equipmentIds);
  528. if(val.length==1){
  529. setTimeout(() => {
  530. this.getProduct();
  531. }, 2000);
  532. }
  533. },
  534. getProduct(){
  535. if(this.equipmentIds.length!=1){
  536. return;
  537. }
  538. var serverurl = this.serverurl;
  539. var token = uni.getStorageSync("token");
  540. uni.request({
  541. url: serverurl + '/TProduct/selectProducts?equimentId='+this.equipmentIds,
  542. // data: {
  543. // "equipmentIds": that.equipmentIds,
  544. // "guestPwd": that.guestPwd,
  545. // "adminPwd": that.adminPwd,
  546. // },
  547. method: "GET",
  548. header: {
  549. 'token': token
  550. },
  551. success: (res) => {
  552. if(res.data.code){
  553. var list = res.data.data;
  554. var ifForeign = this.globalUser.ifForeign;
  555. if(ifForeign==0){
  556. for (var i = 0; i < list.length; i++) {
  557. var no = list[i].no;
  558. switch(no){
  559. case "A01":
  560. this.A01 = list[i].rmbPrice;
  561. break;
  562. case "A02":
  563. this.A02 = list[i].rmbPrice;
  564. break;
  565. case "A03":
  566. this.A03 = list[i].rmbPrice;
  567. break;
  568. case "A04":
  569. this.A04 = list[i].rmbPrice;
  570. break;
  571. case "A05":
  572. this.A05 = list[i].rmbPrice;
  573. break;
  574. case "A06":
  575. this.A06 = list[i].rmbPrice;
  576. break;
  577. case "A07":
  578. this.A07 = list[i].rmbPrice;
  579. break;
  580. case "A07":
  581. this.A07 = list[i].rmbPrice;
  582. break;
  583. case "A08":
  584. this.A08 = list[i].rmbPrice;
  585. break;
  586. case "A09":
  587. this.A09 = list[i].rmbPrice;
  588. break;
  589. case "A10":
  590. this.A10 = list[i].rmbPrice;
  591. break;
  592. case "A11":
  593. this.A11 = list[i].rmbPrice;
  594. break;
  595. case "A12":
  596. this.A12 = list[i].rmbPrice;
  597. break;
  598. case "A13":
  599. this.A13 = list[i].rmbPrice;
  600. break;
  601. case "A14":
  602. this.A14 = list[i].rmbPrice;
  603. break;
  604. case "A15":
  605. this.A15 = list[i].rmbPrice;
  606. break;
  607. case "A16":
  608. this.A16 = list[i].rmbPrice;
  609. break;
  610. case "A17":
  611. this.A17 = list[i].rmbPrice;
  612. break;
  613. case "A18":
  614. this.A18 = list[i].rmbPrice;
  615. break;
  616. case "A19":
  617. this.A19 = list[i].rmbPrice;
  618. break;
  619. case "A20":
  620. this.A20 = list[i].rmbPrice;
  621. break;
  622. case "A21":
  623. this.A21 = list[i].rmbPrice;
  624. break;
  625. case "A22":
  626. this.A22 = list[i].rmbPrice;
  627. break;
  628. case "A23":
  629. this.A23 = list[i].rmbPrice;
  630. break;
  631. case "A24":
  632. this.A24 = list[i].rmbPrice;
  633. break;
  634. case "A25":
  635. this.A25 = list[i].rmbPrice;
  636. break;
  637. case "A26":
  638. this.A26 = list[i].rmbPrice;
  639. break;
  640. case "A27":
  641. this.A27 = list[i].rmbPrice;
  642. break;
  643. case "A28":
  644. this.A28 = list[i].rmbPrice;
  645. break;
  646. case "A29":
  647. this.A29 = list[i].rmbPrice;
  648. break;
  649. case "A30":
  650. this.A30 = list[i].rmbPrice;
  651. break;
  652. case "A31":
  653. this.A31 = list[i].rmbPrice;
  654. break;
  655. case "A32":
  656. this.A32 = list[i].rmbPrice;
  657. break;
  658. case "A33":
  659. this.A33 = list[i].rmbPrice;
  660. break;
  661. case "A34":
  662. this.A34 = list[i].rmbPrice;
  663. break;
  664. case "A35":
  665. this.A35 = list[i].rmbPrice;
  666. break;
  667. }
  668. }
  669. }else{
  670. for (var i = 0; i < list.length; i++) {
  671. var no = list[i].no;
  672. switch(no){
  673. case "A01":
  674. this.A01 = list[i].codePrice;
  675. break;
  676. case "A02":
  677. this.A02 = list[i].codePrice;
  678. break;
  679. case "A03":
  680. this.A03 = list[i].codePrice;
  681. break;
  682. case "A04":
  683. this.A04 = list[i].codePrice;
  684. break;
  685. case "A05":
  686. this.A05 = list[i].codePrice;
  687. break;
  688. case "A06":
  689. this.A06 = list[i].codePrice;
  690. break;
  691. case "A07":
  692. this.A07 = list[i].codePrice;
  693. break;
  694. case "A07":
  695. this.A07 = list[i].codePrice;
  696. break;
  697. case "A08":
  698. this.A08 = list[i].codePrice;
  699. break;
  700. case "A09":
  701. this.A09 = list[i].codePrice;
  702. break;
  703. case "A10":
  704. this.A10 = list[i].codePrice;
  705. break;
  706. case "A11":
  707. this.A11 = list[i].codePrice;
  708. break;
  709. case "A12":
  710. this.A12 = list[i].codePrice;
  711. break;
  712. case "A13":
  713. this.A13 = list[i].codePrice;
  714. break;
  715. case "A14":
  716. this.A14 = list[i].codePrice;
  717. break;
  718. case "A15":
  719. this.A15 = list[i].codePrice;
  720. break;
  721. case "A16":
  722. this.A16 = list[i].codePrice;
  723. break;
  724. case "A17":
  725. this.A17 = list[i].codePrice;
  726. break;
  727. case "A18":
  728. this.A18 = list[i].codePrice;
  729. break;
  730. case "A19":
  731. this.A19 = list[i].codePrice;
  732. break;
  733. case "A20":
  734. this.A20 = list[i].codePrice;
  735. break;
  736. case "A21":
  737. this.A21 = list[i].codePrice;
  738. break;
  739. case "A22":
  740. this.A22 = list[i].codePrice;
  741. break;
  742. case "A23":
  743. this.A23 = list[i].codePrice;
  744. break;
  745. case "A24":
  746. this.A24 = list[i].codePrice;
  747. break;
  748. case "A25":
  749. this.A25 = list[i].codePrice;
  750. break;
  751. case "A26":
  752. this.A26 = list[i].codePrice;
  753. break;
  754. case "A27":
  755. this.A27 = list[i].codePrice;
  756. break;
  757. case "A28":
  758. this.A28 = list[i].codePrice;
  759. break;
  760. case "A29":
  761. this.A29 = list[i].codePrice;
  762. break;
  763. case "A30":
  764. this.A30 = list[i].codePrice;
  765. break;
  766. case "A31":
  767. this.A31 = list[i].codePrice;
  768. break;
  769. case "A32":
  770. this.A32 = list[i].codePrice;
  771. break;
  772. case "A33":
  773. this.A33 = list[i].codePrice;
  774. break;
  775. case "A34":
  776. this.A34 = list[i].codePrice;
  777. break;
  778. case "A35":
  779. this.A35 = list[i].codePrice;
  780. break;
  781. }
  782. }
  783. }
  784. }
  785. }
  786. });
  787. },
  788. switchChange: function(e) {
  789. this.status = e.target.value;
  790. },
  791. update() {
  792. if(this.equipmentIds==''||this.equipmentIds.length==0){
  793. return;
  794. }
  795. var that = this;
  796. uni.showModal({
  797. title: that.$t('equipmentStatusList.tip'),
  798. content:that.$t('updatePassword.sure') ,
  799. success: (re) => {
  800. if (re.confirm) {
  801. var serverurl = that.serverurl;
  802. var token = uni.getStorageSync("token");
  803. var products = [];
  804. var product ={
  805. showType:'',
  806. no:'',
  807. rmbPrice:''
  808. }
  809. if(that.equipmentIds!=''){
  810. product.showType = that.equipmentIds;
  811. }
  812. if(that.A01!=''){
  813. product.showType = that.equipmentIds;
  814. product.no = 'A01';
  815. product.rmbPrice = that.A01;
  816. products.push(product);
  817. product={};
  818. }
  819. if(that.A02!=''){
  820. product.showType = that.equipmentIds;
  821. product.no = 'A02';
  822. product.rmbPrice = that.A02;
  823. products.push(product);
  824. product={};
  825. }
  826. if(that.A03!=''){
  827. product.showType = that.equipmentIds;
  828. product.no = 'A03';
  829. product.rmbPrice = that.A03;
  830. products.push(product);
  831. product={};
  832. }
  833. if(that.A04!=''){
  834. product.showType = that.equipmentIds;
  835. product.no = 'A04';
  836. product.rmbPrice = that.A04;
  837. products.push(product);
  838. product={};
  839. }
  840. if(that.A05!=''){
  841. product.showType = that.equipmentIds;
  842. product.no = 'A05';
  843. product.rmbPrice = that.A05;
  844. products.push(product);
  845. product={};
  846. }
  847. if(that.A06!=''){
  848. product.showType = that.equipmentIds;
  849. product.no = 'A06';
  850. product.rmbPrice = that.A06;
  851. products.push(product);
  852. product={};
  853. }
  854. if(that.A07!=''){
  855. product.showType = that.equipmentIds;
  856. product.no = 'A07';
  857. product.rmbPrice = that.A07;
  858. products.push(product);
  859. product={};
  860. }
  861. if(that.A08!=''){
  862. product.showType = that.equipmentIds;
  863. product.no = 'A08';
  864. product.rmbPrice = that.A08;
  865. products.push(product);
  866. product={};
  867. }
  868. if(that.A09!=''){
  869. product.showType = that.equipmentIds;
  870. product.no = 'A09';
  871. product.rmbPrice = that.A09;
  872. products.push(product);
  873. product={};
  874. }
  875. if(that.A10!=''){
  876. product.showType = that.equipmentIds;
  877. product.no = 'A10';
  878. product.rmbPrice = that.A10;
  879. products.push(product);
  880. product={};
  881. }
  882. if(that.A11!=''){
  883. product.showType = that.equipmentIds;
  884. product.no = 'A11';
  885. product.rmbPrice = that.A11;
  886. products.push(product);
  887. product={};
  888. }
  889. if(that.A12!=''){
  890. product.showType = that.equipmentIds;
  891. product.no = 'A12';
  892. product.rmbPrice = that.A12;
  893. products.push(product);
  894. product={};
  895. }
  896. if(that.A13!=''){
  897. product.showType = that.equipmentIds;
  898. product.no = 'A13';
  899. product.rmbPrice = that.A13;
  900. products.push(product);
  901. product={};
  902. }
  903. if(that.A14!=''){
  904. product.showType = that.equipmentIds;
  905. product.no = 'A14';
  906. product.rmbPrice = that.A14;
  907. products.push(product);
  908. product={};
  909. }
  910. if(that.A15!=''){
  911. product.showType = that.equipmentIds;
  912. product.no = 'A15';
  913. product.rmbPrice = that.A15;
  914. products.push(product);
  915. product={};
  916. }
  917. if(that.A16!=''){
  918. product.showType = that.equipmentIds;
  919. product.no = 'A16';
  920. product.rmbPrice = that.A16;
  921. products.push(product);
  922. product={};
  923. }
  924. if(that.A17!=''){
  925. product.showType = that.equipmentIds;
  926. product.no = 'A17';
  927. product.rmbPrice = that.A17;
  928. products.push(product);
  929. product={};
  930. }
  931. if(that.A18!=''){
  932. product.showType = that.equipmentIds;
  933. product.no = 'A18';
  934. product.rmbPrice = that.A18;
  935. products.push(product);
  936. product={};
  937. }
  938. if(that.A19!=''){
  939. product.showType = that.equipmentIds;
  940. product.no = 'A19';
  941. product.rmbPrice = that.A19;
  942. products.push(product);
  943. product={};
  944. }
  945. if(that.A20!=''){
  946. product.showType = that.equipmentIds;
  947. product.no = 'A20';
  948. product.rmbPrice = that.A20;
  949. products.push(product);
  950. product={};
  951. }
  952. if(that.A21!=''){
  953. product.showType = that.equipmentIds;
  954. product.no = 'A21';
  955. product.rmbPrice = that.A21;
  956. products.push(product);
  957. product={};
  958. }
  959. if(that.A22!=''){
  960. product.showType = that.equipmentIds;
  961. product.no = 'A22';
  962. product.rmbPrice = that.A22;
  963. products.push(product);
  964. product={};
  965. }
  966. if(that.A23!=''){
  967. product.showType = that.equipmentIds;
  968. product.no = 'A23';
  969. product.rmbPrice = that.A23;
  970. products.push(product);
  971. product={};
  972. }
  973. if(that.A24!=''){
  974. product.showType = that.equipmentIds;
  975. product.no = 'A24';
  976. product.rmbPrice = that.A24;
  977. products.push(product);
  978. product={};
  979. }
  980. if(that.A25!=''){
  981. product.showType = that.equipmentIds;
  982. product.no = 'A25';
  983. product.rmbPrice = that.A25;
  984. products.push(product);
  985. product={};
  986. }
  987. if(that.A26!=''){
  988. product.showType = that.equipmentIds;
  989. product.no = 'A26';
  990. product.rmbPrice = that.A26;
  991. products.push(product);
  992. product={};
  993. }
  994. if(that.A27!=''){
  995. product.showType = that.equipmentIds;
  996. product.no = 'A27';
  997. product.rmbPrice = that.A27;
  998. products.push(product);
  999. product={};
  1000. }
  1001. if(that.A28!=''){
  1002. product.showType = that.equipmentIds;
  1003. product.no = 'A28';
  1004. product.rmbPrice = that.A28;
  1005. products.push(product);
  1006. product={};
  1007. }
  1008. if(that.A29!=''){
  1009. product.showType = that.equipmentIds;
  1010. product.no = 'A29';
  1011. product.rmbPrice = that.A29;
  1012. products.push(product);
  1013. product={};
  1014. }
  1015. if(that.A30!=''){
  1016. product.showType = that.equipmentIds;
  1017. product.no = 'A30';
  1018. product.rmbPrice = that.A30;
  1019. products.push(product);
  1020. product={};
  1021. }
  1022. if(that.A31!=''){
  1023. product.showType = that.equipmentIds;
  1024. product.no = 'A31';
  1025. product.rmbPrice = that.A31;
  1026. products.push(product);
  1027. product={};
  1028. }
  1029. if(that.A32!=''){
  1030. product.showType = that.equipmentIds;
  1031. product.no = 'A32';
  1032. product.rmbPrice = that.A32;
  1033. products.push(product);
  1034. product={};
  1035. }
  1036. if(that.A33!=''){
  1037. product.showType = that.equipmentIds;
  1038. product.no = 'A33';
  1039. product.rmbPrice = that.A33;
  1040. products.push(product);
  1041. product={};
  1042. }
  1043. if(that.A34!=''){
  1044. product.showType = that.equipmentIds;
  1045. product.no = 'A34';
  1046. product.rmbPrice = that.A34;
  1047. products.push(product);
  1048. product={};
  1049. }
  1050. if(that.A35!=''){
  1051. product.showType = that.equipmentIds;
  1052. product.no = 'A35';
  1053. product.rmbPrice = that.A35;
  1054. products.push(product);
  1055. product={};
  1056. }
  1057. var list = JSON.stringify(products);
  1058. uni.request({
  1059. url: serverurl + '/TProduct/updateProductsById',
  1060. data: {
  1061. "products": list
  1062. },
  1063. header: {
  1064. 'token': token
  1065. },
  1066. method: "POST",
  1067. success: (res) => {
  1068. if(res.data.code){
  1069. uni.showToast({
  1070. title: res.data.message,
  1071. duration: 1000
  1072. });
  1073. }
  1074. }
  1075. });
  1076. }
  1077. }
  1078. })
  1079. },
  1080. }
  1081. }
  1082. </script>
  1083. <style>
  1084. .test {
  1085. text-align: center;
  1086. padding: 10px 0;
  1087. }
  1088. .time {
  1089. font-size: 78upx;
  1090. }
  1091. .btime {
  1092. margin: 20upx;
  1093. font-size: 28upx;
  1094. }
  1095. /* button {
  1096. margin: 20upx;
  1097. font-size: 28upx;
  1098. } */
  1099. /* #ifdef MP-ALIPAY */
  1100. .uni-badge {
  1101. margin-left: 20rpx;
  1102. }
  1103. /* #endif */
  1104. .uni-badge {
  1105. font-size: 40upx;
  1106. }
  1107. .example-body {
  1108. flex-direction: row;
  1109. justify-content: flex-start;
  1110. padding-bottom: 15upx;
  1111. font-size: 40upx;
  1112. }
  1113. .uni-badge-left-margin {
  1114. font-size: 40upx;
  1115. margin-left: 50upx;
  1116. }
  1117. .uni-list-cell {
  1118. padding-top: 20upx;
  1119. padding-bottom: 10upx;
  1120. font-size: 35upx;
  1121. }
  1122. .line {
  1123. height: 2upx;
  1124. background: #8C959F;
  1125. }
  1126. .search {
  1127. width: 100%;
  1128. padding-top: 15upx;
  1129. padding-bottom: 15upx;
  1130. display: flex;
  1131. flex-direction: row;
  1132. justify-content: flex-start;
  1133. }
  1134. .search-title {
  1135. width: 28%;
  1136. text-align: center;
  1137. font-size: 26upx;
  1138. font-family: "PingFang-SC-Bold";
  1139. }
  1140. .search-input{
  1141. width: 48%;
  1142. height: 25px;
  1143. text-align: center;
  1144. font-size: 26upx;
  1145. /* font-family: "PingFang-SC-Bold"; */
  1146. box-shadow: 0upx 0upx 20upx #D3D3D3;
  1147. border-radius: 5upx;
  1148. }
  1149. .search-input2 {
  1150. width: 65%;
  1151. text-align: center;
  1152. font-size: 26upx;
  1153. font-family: "PingFang-SC-Bold";
  1154. box-shadow: 0upx 0upx 20upx #D3D3D3;
  1155. border-radius: 5upx;
  1156. }
  1157. .search-input3 {
  1158. width: 65%;
  1159. text-align: center;
  1160. font-size: 26upx;
  1161. font-family: "PingFang-SC-Bold";
  1162. }
  1163. .search-button{
  1164. width: 20%;
  1165. padding-left: 10px;
  1166. padding-bottom: 5px;
  1167. text-align: center;
  1168. height: 60upx;
  1169. text-align: left;
  1170. }
  1171. .select-item {
  1172. /* padding-top: 20upx; */
  1173. }
  1174. .tr {
  1175. padding-top: 15upx;
  1176. display: flex;
  1177. flex-direction: row;
  1178. justify-content: flex-start;
  1179. font-size: 48upx;
  1180. font-family: "PingFang-SC-Bold";
  1181. /* position: fixed; */
  1182. bottom: 100upx;
  1183. width: 100%;
  1184. }
  1185. .button {
  1186. margin: auto;
  1187. width: 60%;
  1188. height: 100upx;
  1189. }
  1190. .p1 {
  1191. font-size: 48upx;
  1192. }
  1193. </style>