updatePrice.vue 29 KB

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