addMachine.vue 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472
  1. <template>
  2. <view>
  3. <form @submit="submit">
  4. <form @submit="addMachine">
  5. <view class="title"> 机器</view>
  6. <view class="body">
  7. <input class="input" style="display:none;" name="coding" :value=coding />
  8. 机器编码:<input class="input" v-model="coding" />
  9. <button type="primary" @click="saoma('coding')" class="button1">
  10. <p class="p">扫码</p>
  11. </button>
  12. <button type="primary" @click="getMachine(coding)" class="button1">
  13. <p class="p">获取</p>
  14. </button>
  15. </view>
  16. <view class="bodyname">
  17. 名称:<input class="input" name="name" :value="name" />
  18. <button type="primary" form-type="submit" class="button1">
  19. <p class="p">确认</p>
  20. </button>
  21. </view>
  22. <view class="body">
  23. 机身铭牌:<input class="input" name="nameplate" :value="nameplate" />
  24. <button type="primary" form-type="submit" class="button1">
  25. <p class="p">确认</p>
  26. </button>
  27. </view>
  28. <view class="body">
  29. 设备编号:<input class="input" name="clientId" :value="clientId" />
  30. <button type="primary" form-type="submit" class="button1">
  31. <p class="p">确认</p>
  32. </button>
  33. </view>
  34. <view class="body">
  35. 订单编号:<input class="input" name="orderNo" :value="orderNo" />
  36. <button type="primary" form-type="submit" class="button1">
  37. <p class="p">确认</p>
  38. </button>
  39. </view>
  40. <view class="body">
  41. 客户编号:<input class="input" name="customerNo" :value="customerNo" />
  42. <button type="primary" form-type="submit" class="button1">
  43. <p class="p">确认</p>
  44. </button>
  45. </view>
  46. </form>
  47. <view class="line"></view>
  48. <view class="">
  49. <uni-list-item title="添加工序" @click="gongxu()" />
  50. </view>
  51. <view class="line"></view>
  52. <form @submit="jike" @reset="jikeReset">
  53. <view class="modules">
  54. <view class="title">机壳</view>
  55. <view class="body">
  56. <input class="input" style="display:none;" name="jikeCoding" :value=jikeCoding />
  57. 编码:<input class="input" v-model="jikeCoding" />
  58. <button type="primary" @click="saoma('jikeCoding')" class="button1">
  59. <p class="p">扫码</p>
  60. </button>
  61. <button type="primary" @click="getMessage(jikeCoding)" class="button1">
  62. <p class="p">获取</p>
  63. </button>
  64. </view>
  65. <view class="body">
  66. 名称:<input class="input" name="jikeName" :value="jikeName" />
  67. </view>
  68. <view class="body">
  69. 版本:<input class="input" name="jikeVersion" :value="jikeVersion" />
  70. </view>
  71. <view class="modulesButton">
  72. <button type="primary" form-type="submit" class="button1">
  73. <p class="p">确认</p>
  74. </button>
  75. <button type="primary" @click="updateModules(jikeCoding,'jike')" class="button1">
  76. <p class="p">更换</p>
  77. </button>
  78. </view>
  79. </view>
  80. </form>
  81. <view class="line"></view>
  82. <form @submit="lutou" @reset="lutouReset">
  83. <view class="modules">
  84. <view class="title">炉头</view>
  85. <view class="body">
  86. <input class="input" style="display:none;" name="lutouCoding" :value=lutouCoding />
  87. 编码:<input class="input" v-model="lutouCoding" />
  88. <button type="primary" @click="saoma('lutouCoding')" class="button1">
  89. <p class="p">扫码</p>
  90. </button>
  91. <button type="primary" @click="getMessage(lutouCoding)" class="button1">
  92. <p class="p">获取</p>
  93. </button>
  94. </view>
  95. <view class="body">
  96. 名称:<input class="input" name="lutouName" :value="lutouName" />
  97. </view>
  98. <view class="body">
  99. 版本:<input class="input" name="lutouVersion" :value="lutouVersion" />
  100. </view>
  101. <view class="modulesButton">
  102. <button type="primary" form-type="submit" class="button1">
  103. <p class="p">确认</p>
  104. </button>
  105. <button type="primary" @click="updateModules(lutouCoding,'lutou')" class="button1">
  106. <p class="p">更换</p>
  107. </button>
  108. </view>
  109. </view>
  110. </form>
  111. <view class="line"></view>
  112. <form @submit="jiashiqi" @reset="jiashiqiReset">
  113. <view class="modules">
  114. <view class="title">加湿器</view>
  115. <view class="body">
  116. <input class="input" style="display:none;" name="jiashiqiCoding" :value=jiashiqiCoding />
  117. 编码:<input class="input" v-model="jiashiqiCoding" />
  118. <button type="primary" @click="saoma('jiashiqiCoding')" class="button1">
  119. <p class="p">扫码</p>
  120. </button>
  121. <button type="primary" @click="getMessage(jiashiqiCoding)" class="button1">
  122. <p class="p">获取</p>
  123. </button>
  124. </view>
  125. <view class="body">
  126. 名称:<input class="input" name="jiashiqiName" :value="jiashiqiName" />
  127. </view>
  128. <view class="body">
  129. 版本:<input class="input" name="jiashiqiVersion" :value="jiashiqiVersion" />
  130. </view>
  131. <view class="modulesButton">
  132. <button type="primary" form-type="submit" class="button1">
  133. <p class="p">确认</p>
  134. </button>
  135. <button type="primary" @click="updateModules(jiashiqiCoding,'jiashiqi')" class="button1">
  136. <p class="p">更换</p>
  137. </button>
  138. </view>
  139. </view>
  140. </form>
  141. <view class="line"></view>
  142. <form @submit="anzhuoping" @reset="anzhuopingReset">
  143. <view class="modules">
  144. <view class="title">安卓屏</view>
  145. <view class="body">
  146. <input class="input" style="display:none;" name="anzhuopingCoding" :value=anzhuopingCoding />
  147. 编码:<input class="input" v-model="anzhuopingCoding" />
  148. <button type="primary" @click="saoma('anzhuopingCoding')" class="button1">
  149. <p class="p">扫码</p>
  150. </button>
  151. <button type="primary" @click="getMessage(anzhuopingCoding)" class="button1">
  152. <p class="p">获取</p>
  153. </button>
  154. </view>
  155. <view class="body">
  156. 名称:<input class="input" name="anzhuopingName" :value="anzhuopingName" />
  157. </view>
  158. <view class="body">
  159. 版本:<input class="input" name="anzhuopingVersion" :value="anzhuopingVersion" />
  160. </view>
  161. <view class="modulesButton">
  162. <button type="primary" form-type="submit" class="button1">
  163. <p class="p">确认</p>
  164. </button>
  165. <button type="primary" @click="updateModules(anzhuopingCoding,'anzhuoping')" class="button1">
  166. <p class="p">更换</p>
  167. </button>
  168. </view>
  169. </view>
  170. </form>
  171. <view class="line"></view>
  172. <form @submit="plc" @reset="plcReset">
  173. <view class="modules">
  174. <view class="title">plc</view>
  175. <view class="body">
  176. <input class="input" style="display:none;" name="plcCoding" :value=plcCoding />
  177. 编码:<input class="input" v-model="plcCoding" />
  178. <button type="primary" @click="saoma('plcCoding')" class="button1">
  179. <p class="p">扫码</p>
  180. </button>
  181. <button type="primary" @click="getMessage(plcCoding)" class="button1">
  182. <p class="p">获取</p>
  183. </button>
  184. </view>
  185. <view class="body">
  186. 名称:<input class="input" name="plcName" :value="plcName" />
  187. </view>
  188. <view class="body">
  189. 版本:<input class="input" name="plcVersion" :value="plcVersion" />
  190. </view>
  191. <view class="modulesButton">
  192. <button type="primary" form-type="submit" class="button1">
  193. <p class="p">确认</p>
  194. </button>
  195. <button type="primary" @click="updateModules(plcCoding,'plc')" class="button1">
  196. <p class="p">更换</p>
  197. </button>
  198. </view>
  199. </view>
  200. </form>
  201. <view class="line"></view>
  202. <form @submit="jiareban" @reset="jiarebanReset">
  203. <view class="modules">
  204. <view class="title">加热板</view>
  205. <view class="body">
  206. <input class="input" style="display:none;" name="jiarebanCoding" :value=jiarebanCoding />
  207. 编码:<input class="input" v-model="jiarebanCoding" />
  208. <button type="primary" @click="saoma('jiarebanCoding')" class="button1">
  209. <p class="p">扫码</p>
  210. </button>
  211. <button type="primary" @click="getMessage(jiarebanCoding)" class="button1">
  212. <p class="p">获取</p>
  213. </button>
  214. </view>
  215. <view class="body">
  216. 名称:<input class="input" name="jiarebanName" :value="jiarebanName" />
  217. </view>
  218. <view class="body">
  219. 版本:<input class="input" name="jiarebanVersion" :value="jiarebanVersion" />
  220. </view>
  221. <view class="modulesButton">
  222. <button type="primary" form-type="submit" class="button1">
  223. <p class="p">确认</p>
  224. </button>
  225. <button type="primary" @click="updateModules(jiarebanCoding,'jiareban')" class="button1">
  226. <p class="p">更换</p>
  227. </button>
  228. </view>
  229. </view>
  230. </form>
  231. <view class="line"></view>
  232. <form @submit="chugun" @reset="chugunReset">
  233. <view class="modules">
  234. <view class="title">出棍模块</view>
  235. <view class="body">
  236. <input class="input" style="display:none;" name="chugunCoding" :value=chugunCoding />
  237. 编码:<input class="input" v-model="chugunCoding" />
  238. <button type="primary" @click="saoma('chugunCoding')" class="button1">
  239. <p class="p">扫码</p>
  240. </button>
  241. <button type="primary" @click="getMessage(chugunCoding)" class="button1">
  242. <p class="p">获取</p>
  243. </button>
  244. </view>
  245. <view class="body">
  246. 名称:<input class="input" name="chugunName" :value="chugunName" />
  247. </view>
  248. <view class="body">
  249. 版本:<input class="input" name="chugunVersion" :value="chugunVersion" />
  250. </view>
  251. <view class="modulesButton">
  252. <button type="primary" form-type="submit" class="button1">
  253. <p class="p">确认</p>
  254. </button>
  255. <button type="primary" @click="updateModules(chugunCoding,'chugun')" class="button1">
  256. <p class="p">更换</p>
  257. </button>
  258. </view>
  259. </view>
  260. </form>
  261. <view class="line"></view>
  262. <form @submit="diangui" @reset="dianguiReset">
  263. <view class="modules">
  264. <view class="title">电柜模块</view>
  265. <view class="body">
  266. <input class="input" style="display:none;" name="dianguiCoding" :value=dianguiCoding />
  267. 编码:<input class="input" v-model="dianguiCoding" />
  268. <button type="primary" @click="saoma('dianguiCoding')" class="button1">
  269. <p class="p">扫码</p>
  270. </button>
  271. <button type="primary" @click="getMessage(dianguiCoding)" class="button1">
  272. <p class="p">获取</p>
  273. </button>
  274. </view>
  275. <view class="body">
  276. 名称:<input class="input" name="dianguiName" :value="dianguiName" />
  277. </view>
  278. <view class="body">
  279. 版本:<input class="input" name="dianguiVersion" :value="dianguiVersion" />
  280. </view>
  281. <view class="modulesButton">
  282. <button type="primary" form-type="submit" class="button1">
  283. <p class="p">确认</p>
  284. </button>
  285. <button type="primary" @click="updateModules(dianguiCoding,'diangui')" class="button1">
  286. <p class="p">更换</p>
  287. </button>
  288. </view>
  289. </view>
  290. </form>
  291. <view class="line"></view>
  292. <form @submit="xiazai" @reset="xiazaiReset">
  293. <view class="modules">
  294. <view class="title">远程下载模块</view>
  295. <view class="body">
  296. <input class="input" style="display:none;" name="xiazaiCoding" :value=xiazaiCoding />
  297. 编码:<input class="input" v-model="xiazaiCoding" />
  298. <button type="primary" @click="saoma('xiazaiCoding')" class="button1">
  299. <p class="p">扫码</p>
  300. </button>
  301. <button type="primary" @click="getMessage(xiazaiCoding)" class="button1">
  302. <p class="p">获取</p>
  303. </button>
  304. </view>
  305. <view class="body">
  306. 名称:<input class="input" name="xiazaiName" :value="xiazaiName" />
  307. </view>
  308. <view class="body">
  309. 版本:<input class="input" name="xiazaiVersion" :value="xiazaiVersion" />
  310. </view>
  311. <view class="modulesButton">
  312. <button type="primary" form-type="submit" class="button1">
  313. <p class="p">确认</p>
  314. </button>
  315. <button type="primary" @click="updateModules(xiazaiCoding,'xiazai')" class="button1">
  316. <p class="p">更换</p>
  317. </button>
  318. </view>
  319. </view>
  320. </form>
  321. <view class="line"></view>
  322. <form @submit="jixieshou" @reset="jixieshouReset">
  323. <view class="modules">
  324. <view class="title">机械手</view>
  325. <view class="body">
  326. <input class="input" style="display:none;" name="jixieshouCoding" :value=jixieshouCoding />
  327. 编码:<input class="input" v-model="jixieshouCoding" />
  328. <button type="primary" @click="saoma('jixieshouCoding')" class="button1">
  329. <p class="p">扫码</p>
  330. </button>
  331. <button type="primary" @click="getMessage(jixieshouCoding)" class="button1">
  332. <p class="p">获取</p>
  333. </button>
  334. </view>
  335. <view class="body">
  336. 名称:<input class="input" name="jixieshouName" :value="jixieshouName" />
  337. </view>
  338. <view class="body">
  339. 版本:<input class="input" name="jixieshouVersion" :value="jixieshouVersion" />
  340. </view>
  341. <view class="modulesButton">
  342. <button type="primary" form-type="submit" class="button1">
  343. <p class="p">确认</p>
  344. </button>
  345. <button type="primary" @click="updateModules(jixieshouCoding,'jixieshou')" class="button1">
  346. <p class="p">更换</p>
  347. </button>
  348. </view>
  349. </view>
  350. </form>
  351. <view class="line"></view>
  352. <form @submit="yaxingdao" @reset="yaxingdaoReset">
  353. <view class="modules">
  354. <view class="title">压型刀</view>
  355. <view class="body">
  356. <input class="input" style="display:none;" name="yaxingdaoCoding" :value=yaxingdaoCoding />
  357. 编码:<input class="input" v-model="yaxingdaoCoding" />
  358. <button type="primary" @click="saoma('yaxingdaoCoding')" class="button1">
  359. <p class="p">扫码</p>
  360. </button>
  361. <button type="primary" @click="getMessage(yaxingdaoCoding)" class="button1">
  362. <p class="p">获取</p>
  363. </button>
  364. </view>
  365. <view class="body">
  366. 名称:<input class="input" name="yaxingdaoName" :value="yaxingdaoName" />
  367. </view>
  368. <view class="body">
  369. 版本:<input class="input" name="yaxingdaoVersion" :value="yaxingdaoVersion" />
  370. </view>
  371. <view class="modulesButton">
  372. <button type="primary" form-type="submit" class="button1">
  373. <p class="p">确认</p>
  374. </button>
  375. <button type="primary" @click="updateModules(yaxingdaoCoding,'yaxingdao')" class="button1">
  376. <p class="p">更换</p>
  377. </button>
  378. </view>
  379. </view>
  380. </form>
  381. <view class="line"></view>
  382. <form @submit="songtang" @reset="yaxingdaoReset">
  383. <view class="modules">
  384. <view class="title">送糖模块</view>
  385. <view class="body">
  386. <input class="input" style="display:none;" name="songtangCoding" :value=songtangCoding />
  387. 编码:<input class="input" v-model="songtangCoding" />
  388. <button type="primary" @click="saoma('songtangCoding')" class="button1">
  389. <p class="p">扫码</p>
  390. </button>
  391. <button type="primary" @click="getMessage(songtangCoding)" class="button1">
  392. <p class="p">获取</p>
  393. </button>
  394. </view>
  395. <view class="body">
  396. 名称:<input class="input" name="songtangName" :value="songtangName" />
  397. </view>
  398. <view class="body">
  399. 版本:<input class="input" name="songtangVersion" :value="songtangVersion" />
  400. </view>
  401. <view class="modulesButton">
  402. <button type="primary" form-type="submit" class="button1">
  403. <p class="p">确认</p>
  404. </button>
  405. <button type="primary" @click="updateModules(songtangCoding,'songtang')" class="button1">
  406. <p class="p">更换</p>
  407. </button>
  408. </view>
  409. </view>
  410. </form>
  411. <view class="line"></view>
  412. <form @submit="qibeng" @reset="yaxingdaoReset">
  413. <view class="modules">
  414. <view class="title">气泵</view>
  415. <view class="body">
  416. <input class="input" style="display:none;" name="qibengCoding" :value=qibengCoding />
  417. 编码:<input class="input" v-model="qibengCoding" />
  418. <button type="primary" @click="saoma('qibengCoding')" class="button1">
  419. <p class="p">扫码</p>
  420. </button>
  421. <button type="primary" @click="getMessage(qibengCoding)" class="button1">
  422. <p class="p">获取</p>
  423. </button>
  424. </view>
  425. <view class="body">
  426. 名称:<input class="input" name="qibengName" :value="qibengName" />
  427. </view>
  428. <!-- <view class="body">
  429. 版本:<input class="input" name="qibengVersion" :value="qibengVersion" />
  430. </view> -->
  431. <view class="modulesButton">
  432. <button type="primary" form-type="submit" class="button1">
  433. <p class="p">确认</p>
  434. </button>
  435. <button type="primary" @click="updateModules(qibengCoding,'qibeng')" class="button1">
  436. <p class="p">更换</p>
  437. </button>
  438. </view>
  439. </view>
  440. </form>
  441. <view class="line"></view>
  442. <form @submit="zidongdoor" @reset="zidongdoorReset">
  443. <view class="modules">
  444. <view class="title">自动门</view>
  445. <view class="body">
  446. <input class="input" style="display:none;" name="zidongdoorCoding" :value=zidongdoorCoding />
  447. 编码:<input class="input" v-model="zidongdoorCoding" />
  448. <button type="primary" @click="saoma('zidongdoorCoding')" class="button1">
  449. <p class="p">扫码</p>
  450. </button>
  451. <button type="primary" @click="getMessage(zidongdoorCoding)" class="button1">
  452. <p class="p">获取</p>
  453. </button>
  454. </view>
  455. <view class="body">
  456. 名称:<input class="input" name="zidongdoorName" :value="zidongdoorName" />
  457. </view>
  458. <view class="body">
  459. 版本:<input class="input" name="zidongdoorVersion" :value="zidongdoorVersion" />
  460. </view>
  461. <view class="modulesButton">
  462. <button type="primary" form-type="submit" class="button1">
  463. <p class="p">确认</p>
  464. </button>
  465. <button type="primary" @click="updateModules(zidongdoorCoding,'zidongdoor')" class="button1">
  466. <p class="p">更换</p>
  467. </button>
  468. </view>
  469. </view>
  470. </form>
  471. <view class="line"></view>
  472. <form @submit="shuibeng" @reset="shuibengReset">
  473. <view class="modules">
  474. <view class="title">水泵</view>
  475. <view class="body">
  476. <input class="input" style="display:none;" name="shuibengCoding" :value=shuibengCoding />
  477. 编码:<input class="input" v-model="shuibengCoding" />
  478. <button type="primary" @click="saoma('shuibengCoding')" class="button1">
  479. <p class="p">扫码</p>
  480. </button>
  481. <button type="primary" @click="getMessage(shuibengCoding)" class="button1">
  482. <p class="p">获取</p>
  483. </button>
  484. </view>
  485. <view class="body">
  486. 名称:<input class="input" name="shuibengName" :value="shuibengName" />
  487. </view>
  488. <view class="body">
  489. 版本:<input class="input" name="shuibengVersion" :value="shuibengVersion" />
  490. </view>
  491. <view class="modulesButton">
  492. <button type="primary" form-type="submit" class="button1">
  493. <p class="p">确认</p>
  494. </button>
  495. <button type="primary" @click="updateModules(shuibengCoding,'shuibeng')" class="button1">
  496. <p class="p">更换</p>
  497. </button>
  498. </view>
  499. </view>
  500. </form>
  501. <view class="line"></view>
  502. <form @submit="shoudongdoor" @reset="shoudongdoorReset">
  503. <view class="modules">
  504. <view class="title">手动门</view>
  505. <view class="body">
  506. <input class="input" style="display:none;" name="shoudongdoorCoding" :value=shoudongdoorCoding />
  507. 编码:<input class="input" v-model="shoudongdoorCoding" />
  508. <button type="primary" @click="saoma('shoudongdoorCoding')" class="button1">
  509. <p class="p">扫码</p>
  510. </button>
  511. <button type="primary" @click="getMessage(shoudongdoorCoding)" class="button1">
  512. <p class="p">获取</p>
  513. </button>
  514. </view>
  515. <view class="body">
  516. 名称:<input class="input" name="shoudongdoorName" :value="shoudongdoorName" />
  517. </view>
  518. <view class="body">
  519. 版本:<input class="input" name="shoudongdoorVersion" :value="shoudongdoorVersion" />
  520. </view>
  521. <view class="modulesButton">
  522. <button type="primary" form-type="submit" class="button1">
  523. <p class="p">确认</p>
  524. </button>
  525. <button type="primary" @click="updateModules(shoudongdoorCoding,'shoudongdoor')" class="button1">
  526. <p class="p">更换</p>
  527. </button>
  528. </view>
  529. </view>
  530. </form>
  531. <view class="">
  532. <button type="primary" @click="jiancha()" class="button">
  533. <p class="p1">检查</p>
  534. </button>
  535. </view>
  536. <view class="">
  537. {{weiname}} </br>
  538. {{Modulesname}}
  539. </view>
  540. </form>
  541. <view class="line"></view>
  542. </view>
  543. </template>
  544. <script>
  545. import {
  546. mapState,
  547. mapActions,
  548. mapMutations
  549. } from 'vuex';
  550. import timeSelector from '@/components/wing-time-selector/wing-time-selector.vue';
  551. export default {
  552. components: {
  553. timeSelector
  554. },
  555. data() {
  556. return {
  557. produceDate: '',
  558. coding: '',
  559. lutouCoding: null,
  560. jiashiqiCoding: null,
  561. name: null,
  562. jiashiqiName: null,
  563. lutouName: null,
  564. nameplate: null,
  565. clientId:null,
  566. orderNo:null,
  567. customerNo:null,
  568. producePersonnel: null,
  569. jiashiqiVersion: null,
  570. lutouVersion: null,
  571. jikeCoding:null,
  572. jikeName: null,
  573. jikeVersion: null,
  574. shuibengCoding:null,
  575. shuibengName: null,
  576. shuibengVersion: null,
  577. chugunCoding:null,
  578. chugunName: null,
  579. chugunVersion: null,
  580. dianguiCoding:null,
  581. dianguiName: null,
  582. dianguiVersion: null,
  583. zidongdoorCoding:null,
  584. zidongdoorName: null,
  585. zidongdoorVersion: null,
  586. jixieshouCoding:null,
  587. jixieshouName: null,
  588. jixieshouVersion: null,
  589. yaxingdaoCoding:null,
  590. yaxingdaoName: null,
  591. yaxingdaoVersion: null,
  592. qibengCoding:null,
  593. qibengName: null,
  594. qibengVersion: null,
  595. songtangCoding:null,
  596. songtangName: null,
  597. songtangVersion: null,
  598. shoudongdoorCoding:null,
  599. shoudongdoorName: null,
  600. shoudongdoorVersion: null,
  601. anzhuopingCoding:null,
  602. anzhuopingName: null,
  603. anzhuopingVersion: null,
  604. plcCoding:null,
  605. plcName: null,
  606. plcVersion: null,
  607. jiarebanCoding:null,
  608. jiarebanName: null,
  609. jiarebanVersion: null,
  610. xiazaiCoding:null,
  611. xiazaiName: null,
  612. xiazaiVersion: null,
  613. weiname:'',
  614. Modulesname:''
  615. }
  616. },
  617. methods: {
  618. btnConfirm0(e) {
  619. // console.log('确定时间为:', e);
  620. this.produceDate = e.key;
  621. },
  622. btnCancel0() {
  623. this.produceDate = '';
  624. },
  625. gongxu(){
  626. var item = {
  627. coding:null,
  628. type:'add'
  629. };
  630. var coding = this.coding;
  631. item.coding = coding;
  632. uni.navigateTo({
  633. url:'workingProcedure?item='+encodeURIComponent(JSON.stringify(item))
  634. });
  635. },
  636. saoma(cod) {
  637. var that = this;
  638. // 允许从相机和相册扫码
  639. uni.scanCode({
  640. success(res) {
  641. // console.log('条码类型:' + res.scanType);
  642. // console.log('条码内容:' + res.result);
  643. if (cod == 'coding') {
  644. that.coding = res.result;
  645. }
  646. if (cod == 'lutouCoding') {
  647. that.lutouCoding = res.result;
  648. }
  649. if (cod == 'jiashiqiCoding') {
  650. that.jiashiqiCoding = res.result;
  651. }
  652. if (cod == 'shuibengCoding') {
  653. that.shuibengCoding = res.result;
  654. }
  655. if (cod == 'chugunCoding') {
  656. that.chugunCoding = res.result;
  657. }
  658. if (cod == 'dianguiCoding') {
  659. that.dianguiCoding = res.result;
  660. }
  661. if (cod == 'zidongdoorCoding') {
  662. that.zidongdoorCoding = res.result;
  663. }
  664. if (cod == 'jixieshouCoding') {
  665. that.jixieshouCoding = res.result;
  666. }
  667. if (cod == 'yaxingdaoCoding') {
  668. that.yaxingdaoCoding = res.result;
  669. }
  670. if (cod == 'qibengCoding') {
  671. that.qibengCoding = res.result;
  672. }
  673. if (cod == 'songtangCoding') {
  674. that.songtangCoding = res.result;
  675. }
  676. if (cod == 'shoudongdoorCoding') {
  677. that.shoudongdoorCoding = res.result;
  678. }
  679. if (cod == 'anzhuopingCoding') {
  680. that.anzhuopingCoding = res.result;
  681. }
  682. if (cod == 'plcCoding') {
  683. that.plcCoding = res.result;
  684. }
  685. if (cod == 'jiarebanCoding') {
  686. that.jiarebanCoding = res.result;
  687. }
  688. if (cod == 'jikeCoding') {
  689. that.jikeCoding = res.result;
  690. }
  691. if (cod == 'xiazaiCoding') {
  692. that.xiazaiCoding = res.result;
  693. }
  694. }
  695. });
  696. },
  697. //获取机器详细信息
  698. getMachine(coding) {
  699. var that = this;
  700. that.jiashiqiName = null;
  701. that.jiashiqiCoding = null;
  702. that.jiashiqiVersion = null;
  703. that.lutouName =null;
  704. that.lutouCoding = null;
  705. that.lutouVersion =null;
  706. that.shuibengName = null;
  707. that.shuibengCoding = null;
  708. that.shuibengVersion = null;
  709. that.chugunName = null;
  710. that.chugunCoding = null;
  711. that.chugunVersion = null;
  712. that.dianguiName = null;
  713. that.dianguiCoding = null;
  714. that.dianguiVersion = null;
  715. that.jikeName = null;
  716. that.jikeCoding = null;
  717. that.jikeVersion = null;
  718. that.zidongdoorName = null;
  719. that.zidongdoorCoding = null;
  720. that.zidongdoorVersion = null;
  721. that.shoudongdoorName = null;
  722. that.shoudongdoorCoding = null;
  723. that.shoudongdoorVersion = null;
  724. that.jixieshouName = null;
  725. that.jixieshouCoding = null;
  726. that.jixieshouVersion = null;
  727. that.yaxingdaoName = null;
  728. that.yaxingdaoCoding = null;
  729. that.yaxingdaoVersion = null;
  730. that.songtangName = null;
  731. that.songtangCoding = null;
  732. that.songtangVersion = null;
  733. that.songtangVersion = null;
  734. that.qibengName = null;
  735. that.qibengCoding = null;
  736. that.qibengVersion = null;
  737. that.anzhuopingName = null;
  738. that.anzhuopingCoding = null;
  739. that.anzhuopingVersion = null;
  740. that.plcName = null;
  741. that.plcCoding = null;
  742. that.plcVersion = null;
  743. that.jiarebanName = null;
  744. that.jiarebanCoding = null;
  745. that.jiarebanVersion = null;
  746. that.xiazaiName = null;
  747. that.xiazaiCoding = null;
  748. that.xiazaiVersion = null;
  749. var serverUrl = that.serverurl;
  750. var token = uni.getStorageSync("token");
  751. uni.request({
  752. url: serverUrl + "/TMachine/getMachine?coding=" + coding,
  753. method: "GET",
  754. header: {
  755. 'token': token
  756. },
  757. success: (Result) => {
  758. var res = Result;
  759. if (res.data.code == true) {
  760. //当机器已录入时,会先把所有录入模块给列出来
  761. if (res.data.message == 'all') {
  762. var tmachine = res.data.data.tmachine;
  763. that.name = tmachine.name;
  764. that.nameplate = tmachine.nameplate;
  765. that.clientId = tmachine.clientId;
  766. that.customerNo = tmachine.customerNo;
  767. that.orderNo = tmachine.orderNo;
  768. // that.producePersonnel = uni.getStorageSync("name");
  769. var modulesList = res.data.data.modulesList;
  770. var modules;
  771. for (var i = 0; i < modulesList.length; i++) {
  772. // console.log(modulesList[i]);
  773. var coding = modulesList[i].coding;
  774. //排除标准件
  775. if (coding.substring(0, 4) != '1000') {
  776. //半成品
  777. if (coding.substring(0, 2) == '15') {
  778. //"加湿器"
  779. if (coding.substring(5, 7) == '07') {
  780. that.jiashiqiName = modulesList[i].name;
  781. that.jiashiqiCoding = modulesList[i].coding;
  782. that.jiashiqiVersion = modulesList[i].coding.substring(8, 10);
  783. }
  784. //炉头
  785. if (coding.substring(5, 7) == '04') {
  786. that.lutouName = modulesList[i].name;
  787. that.lutouCoding = modulesList[i].coding;
  788. that.lutouVersion = modulesList[i].coding.substring(8, 10);
  789. }
  790. //水泵
  791. if (coding.substring(5, 7) == '08') {
  792. that.shuibengName = modulesList[i].name;
  793. that.shuibengCoding = modulesList[i].coding;
  794. that.shuibengVersion = modulesList[i].coding.substring(8, 10);
  795. }
  796. //出棍模块
  797. if (coding.substring(5, 7) == '06') {
  798. that.chugunName = modulesList[i].name;
  799. that.chugunCoding = modulesList[i].coding;
  800. that.chugunVersion = modulesList[i].coding.substring(8, 10);
  801. }
  802. //电柜模块
  803. if (coding.substring(5, 7) == '01') {
  804. that.dianguiName = modulesList[i].name;
  805. that.dianguiCoding = modulesList[i].coding;
  806. that.dianguiVersion = modulesList[i].coding.substring(8, 10);
  807. }
  808. //机壳
  809. if (coding.substring(5, 7) == '09') {
  810. that.jikeName = modulesList[i].name;
  811. that.jikeCoding = modulesList[i].coding;
  812. that.jikeVersion = modulesList[i].coding.substring(8, 10);
  813. }
  814. //自动门
  815. if (coding.substring(5, 7) == '12') {
  816. that.zidongdoorName = modulesList[i].name;
  817. that.zidongdoorCoding = modulesList[i].coding;
  818. that.zidongdoorVersion = modulesList[i].coding.substring(8, 10);
  819. }
  820. //手动门
  821. if (coding.substring(5, 7) == '11') {
  822. that.shoudongdoorName = modulesList[i].name;
  823. that.shoudongdoorCoding = modulesList[i].coding;
  824. that.shoudongdoorVersion = modulesList[i].coding.substring(8, 10);
  825. }
  826. //机械手
  827. if (coding.substring(5, 7) == '02') {
  828. that.jixieshouName = modulesList[i].name;
  829. that.jixieshouCoding = modulesList[i].coding;
  830. that.jixieshouVersion = modulesList[i].coding.substring(8, 10);
  831. }
  832. //压型刀
  833. if (coding.substring(5, 7) == '03') {
  834. that.yaxingdaoName = modulesList[i].name;
  835. that.yaxingdaoCoding = modulesList[i].coding;
  836. that.yaxingdaoVersion = modulesList[i].coding.substring(8, 10);
  837. }
  838. //送糖
  839. if (coding.substring(5, 7) == '05') {
  840. that.songtangName = modulesList[i].name;
  841. that.songtangCoding = modulesList[i].coding;
  842. that.songtangVersion = modulesList[i].coding.substring(8, 10);
  843. }
  844. //远程下载模块
  845. if (coding.substring(5, 7) == '13') {
  846. that.xiazaiName = modulesList[i].name;
  847. that.xiazaiCoding = modulesList[i].coding;
  848. that.xiazaiVersion = modulesList[i].coding.substring(8, 10);
  849. }
  850. //加热板
  851. if (coding.substring(5, 7) == '14') {
  852. that.jiarebanName = modulesList[i].name;
  853. // that.qibengCoding = modulesList[i].coding.substring(0, 10);
  854. that.jiarebanCoding = modulesList[i].coding;
  855. that.jiarebanVersion = modulesList[i].coding.substring(8, 10);
  856. }
  857. //安卓屏
  858. if (coding.substring(5, 7) == '15') {
  859. that.anzhuopingName = modulesList[i].name;
  860. that.anzhuopingCoding = modulesList[i].coding;
  861. that.anzhuopingVersion = modulesList[i].coding.substring(8, 10);
  862. }
  863. //plc
  864. if (coding.substring(5, 7) == '16') {
  865. that.plcName = modulesList[i].name;
  866. that.plcCoding = modulesList[i].coding;
  867. that.plcVersion = modulesList[i].coding.substring(8, 10);
  868. }
  869. }
  870. }else{
  871. //气泵
  872. if (coding.substring(8, 10) == '39') {
  873. that.qibengName = modulesList[i].name;
  874. // that.qibengCoding = modulesList[i].coding.substring(0, 10);
  875. that.qibengCoding = modulesList[i].coding;
  876. that.qibengVersion = modulesList[i].coding.substring(8, 10);
  877. }
  878. }
  879. }
  880. } else {
  881. var codes = res.data.data;
  882. that.name = codes.name;
  883. that.nameplate = codes.nameplate;
  884. that.clientId = codes.clientId;
  885. that.customerNo = codes.customerNo;
  886. that.orderNo = codes.orderNo;
  887. that.producePersonnel = uni.getStorageSync("name");
  888. }
  889. } else {
  890. uni.showModal({
  891. title: '提示',
  892. content: res.data.message,
  893. });
  894. }
  895. }
  896. });
  897. },
  898. getMessage(coding) {
  899. var that = this;
  900. var serverUrl = that.serverurl;
  901. var token = uni.getStorageSync("token");
  902. uni.request({
  903. url: serverUrl + "/TModules/getMessage?coding=" + coding,
  904. method: "GET",
  905. header: {
  906. 'token': token
  907. },
  908. success: (Result) => {
  909. var res = Result;
  910. if (res.data.code == true) {
  911. var codes = res.data.data;
  912. var coding = codes.code;
  913. //排除标准件
  914. if (coding.substring(0, 4) != '1000') {
  915. //半成品
  916. if (coding.substring(0, 2) == '15') {
  917. //"加湿器"
  918. if (coding.substring(5, 7) == '07') {
  919. that.jiashiqiName = codes.name;
  920. that.jiashiqiCoding = codes.coding;
  921. that.jiashiqiVersion = codes.code.substring(8, 10);
  922. }
  923. //炉头
  924. if (coding.substring(5, 7) == '04') {
  925. that.lutouName = codes.name;
  926. that.lutouCoding = codes.coding;
  927. that.lutouVersion = codes.code.substring(8, 10);
  928. }
  929. //水泵
  930. if (coding.substring(5, 7) == '08') {
  931. that.shuibengName = codes.name;
  932. that.shuibengCoding = codes.coding;
  933. that.shuibengVersion = codes.code.substring(8, 10);
  934. }
  935. //出棍模块
  936. if (coding.substring(5, 7) == '06') {
  937. that.chugunName = codes.name;
  938. that.chugunCoding = codes.coding;
  939. that.chugunVersion = codes.code.substring(8, 10);
  940. }
  941. //电柜模块
  942. if (coding.substring(5, 7) == '01') {
  943. that.dianguiName = codes.name;
  944. that.dianguiCoding = codes.coding;
  945. that.dianguiVersion = codes.code.substring(8, 10);
  946. }
  947. //机壳
  948. if (coding.substring(5, 7) == '09') {
  949. that.jikeName = codes.name;
  950. that.jikeCoding = codes.coding;
  951. that.jikeVersion = codes.code.substring(8, 10);
  952. }
  953. //自动门
  954. if (coding.substring(5, 7) == '12') {
  955. that.zidongdoorName = codes.name;
  956. that.zidongdoorCoding = codes.coding;
  957. that.zidongdoorVersion = codes.code.substring(8, 10);
  958. }
  959. //手动门
  960. if (coding.substring(5, 7) == '11') {
  961. that.shoudongdoorName = codes.name;
  962. that.shoudongdoorCoding = codes.coding;
  963. that.shoudongdoorVersion = codes.code.substring(8, 10);
  964. }
  965. //机械手
  966. if (coding.substring(5, 7) == '02') {
  967. that.jixieshouName = codes.name;
  968. that.jixieshouCoding = codes.coding;
  969. that.jixieshouVersion = codes.code.substring(8, 10);
  970. }
  971. //压型刀
  972. if (coding.substring(5, 7) == '03') {
  973. that.yaxingdaoName = codes.name;
  974. that.yaxingdaoCoding = codes.coding;
  975. that.yaxingdaoVersion = codes.code.substring(8, 10);
  976. }
  977. //送糖
  978. if (coding.substring(5, 7) == '05') {
  979. that.songtangName = codes.name;
  980. that.songtangCoding = codes.coding;
  981. that.songtangVersion = codes.code.substring(8, 10);
  982. }
  983. //远程下载模块
  984. if (coding.substring(5, 7) == '13') {
  985. that.xiazaiName = codes.name;
  986. that.xiazaiCoding = codes.coding;
  987. that.xiazaiVersion = codes.code.substring(8, 10);
  988. }
  989. //加热板
  990. if (coding.substring(5, 7) == '14') {
  991. that.jiarebanName = codes.name;
  992. that.jiarebanCoding = codes.coding;
  993. that.jiarebanVersion =codes.code.substring(8, 10);
  994. }
  995. //安卓屏
  996. if (coding.substring(5, 7) == '15') {
  997. that.anzhuopingName = codes.name;
  998. that.anzhuopingCoding = codes.coding;
  999. that.anzhuopingVersion = codes.code.substring(8, 10);
  1000. }
  1001. //plc
  1002. if (coding.substring(5, 7) == '16') {
  1003. that.plcName = codes.name;
  1004. that.plcCoding = codes.coding;
  1005. that.plcVersion = codes.code.substring(8, 10);
  1006. }
  1007. }
  1008. }else{
  1009. //气泵
  1010. if (coding.substring(8, 10) == '39') {
  1011. that.qibengName = codes.name;
  1012. that.qibengCoding = codes.coding;
  1013. that.qibengVersion = codes.versions;
  1014. }
  1015. }
  1016. } else {
  1017. uni.showModal({
  1018. title: '提示',
  1019. content: res.data.message,
  1020. });
  1021. }
  1022. }
  1023. });
  1024. },
  1025. //机器修改
  1026. addMachine(event) {
  1027. var serverUrl = this.serverurl;
  1028. const {
  1029. value: modules
  1030. } = event.detail;
  1031. // console.log("3");
  1032. var token = uni.getStorageSync("token");
  1033. var createPersonnel = uni.getStorageSync("name");
  1034. uni.request({
  1035. url: serverUrl + "/TMachine/add",
  1036. method: "POST",
  1037. data: {
  1038. "coding": modules.coding,
  1039. "name": modules.name,
  1040. "nameplate": modules.nameplate,
  1041. "clientId":modules.clientId,
  1042. "customerNo":modules.customerNo,
  1043. "orderNo":modules.orderNo,
  1044. "createPersonnel": createPersonnel
  1045. },
  1046. header: {
  1047. 'token': token
  1048. },
  1049. success: (Result) => {
  1050. var res = Result;
  1051. uni.showModal({
  1052. title: '提示',
  1053. content: res.data.message,
  1054. });
  1055. }
  1056. });
  1057. },
  1058. lutou(event) {
  1059. var serverUrl = this.serverurl;
  1060. var machineCoding = this.coding;
  1061. const {
  1062. value: modules
  1063. } = event.detail;
  1064. // console.log(event.detail.value);
  1065. var token = uni.getStorageSync("token");
  1066. var createPersonnel = uni.getStorageSync("name");
  1067. uni.request({
  1068. url: serverUrl + "/TModules/update",
  1069. method: "POST",
  1070. data: {
  1071. "machineCoding": machineCoding,
  1072. "coding": modules.lutouCoding,
  1073. "name": modules.lutouName,
  1074. "installPersonnel": createPersonnel
  1075. },
  1076. header: {
  1077. 'token': token
  1078. },
  1079. success: (Result) => {
  1080. var res = Result;
  1081. if (res.data.code == true) {
  1082. }
  1083. uni.showModal({
  1084. title: '提示',
  1085. content: res.data.message,
  1086. });
  1087. }
  1088. });
  1089. },
  1090. objToStrMap(obj) {
  1091. let strMap = new Map();
  1092. for (let k of Object.keys(obj)) {
  1093. strMap.set(k, obj[k]);
  1094. }
  1095. return strMap;
  1096. },
  1097. jiashiqi(event) {
  1098. this.tijiao(event,"jiashiqi");
  1099. },
  1100. shuibeng(event) {
  1101. this.tijiao(event,"shuibeng");
  1102. },
  1103. chugun(event){
  1104. this.tijiao(event,"chugun");
  1105. },
  1106. diangui(event){
  1107. this.tijiao(event,"diangui");
  1108. },
  1109. zidongdoor(event){
  1110. this.tijiao(event,"zidongdoor");
  1111. },
  1112. shoudongdoor(event){
  1113. this.tijiao(event,"shoudongdoor");
  1114. },
  1115. jixieshou(event){
  1116. this.tijiao(event,"jixieshou");
  1117. },
  1118. yaxingdao(event){
  1119. this.tijiao(event,"yaxingdao");
  1120. },
  1121. qibeng(event){
  1122. this.tijiao(event,"qibeng");
  1123. },
  1124. songtang(event){
  1125. this.tijiao(event,"songtang");
  1126. },
  1127. anzhuoping(event){
  1128. this.tijiao(event,"anzhuoping");
  1129. },
  1130. plc(event){
  1131. this.tijiao(event,"plc");
  1132. },
  1133. jiareban(event){
  1134. this.tijiao(event,"jiareban");
  1135. },
  1136. jike(event){
  1137. this.tijiao(event,"jike");
  1138. },
  1139. xiazai(event){
  1140. this.tijiao(event,"xiazai");
  1141. },
  1142. tijiao(event,sname){
  1143. var serverUrl = this.serverurl;
  1144. var machineCoding = this.coding;
  1145. const {
  1146. value: modules
  1147. } = event.detail;
  1148. var eValue = event.detail.value;
  1149. //将value对象转为map
  1150. var mapValue = this.objToStrMap(eValue);
  1151. var coding = mapValue.get(sname+"Coding");
  1152. var name = mapValue.get(sname+"Name");
  1153. // console.log(coding+"---"+name);
  1154. var token = uni.getStorageSync("token");
  1155. var createPersonnel = uni.getStorageSync("name");
  1156. uni.request({
  1157. url: serverUrl + "/TModules/update",
  1158. method: "POST",
  1159. data: {
  1160. "machineCoding": machineCoding,
  1161. "coding": coding,
  1162. "name": name,
  1163. "installPersonnel": createPersonnel
  1164. },
  1165. header: {
  1166. 'token': token
  1167. },
  1168. success: (Result) => {
  1169. var res = Result;
  1170. if (res.data.code == true) {
  1171. }
  1172. uni.showModal({
  1173. title: '提示',
  1174. content: res.data.message,
  1175. });
  1176. }
  1177. });
  1178. },
  1179. updateModules(code, name) {
  1180. var that = this;
  1181. uni.setStorageSync("updateModules", code);
  1182. uni.setStorageSync("updateMachineCode", that.coding);
  1183. uni.showModal({
  1184. title: '提示',
  1185. content: '是否要更换?',
  1186. success: function(res) {
  1187. if (res.confirm) {
  1188. uni.navigateTo({
  1189. url: 'updateModules',
  1190. });
  1191. if (name == "lutou") {
  1192. that.lutouName = null;
  1193. that.lutouCoding = null;
  1194. that.lutouVersion = null;
  1195. }
  1196. if (name == "jiashiqi") {
  1197. that.jiashiqiName = null;
  1198. that.jiashiqiCoding = null;
  1199. that.jiashiqiVersion = null;
  1200. }
  1201. if (name == "shuibeng") {
  1202. that.shuibengName = null;
  1203. that.shuibengCoding = null;
  1204. that.shuibengVersion = null;
  1205. }
  1206. if (name == "chugun") {
  1207. that.chugunName = null;
  1208. that.chugunCoding = null;
  1209. that.chugunVersion = null;
  1210. }
  1211. if (name == "diangui") {
  1212. that.dianguiName = null;
  1213. that.dianguiCoding = null;
  1214. that.dianguiVersion = null;
  1215. }
  1216. if (name == "zidongdoor") {
  1217. that.zidongdoorName = null;
  1218. that.zidongdoorCoding = null;
  1219. that.zidongdoorVersion = null;
  1220. }
  1221. if (name == "shoudongdoor") {
  1222. that.shoudongdoorName = null;
  1223. that.shoudongdoorCoding = null;
  1224. that.shoudongdoorVersion = null;
  1225. }
  1226. if (name == "jixieshou") {
  1227. that.jixieshouName = null;
  1228. that.jixieshouCoding = null;
  1229. that.jixieshouVersion = null;
  1230. }
  1231. if (name == "yaxingdao") {
  1232. that.yaxingdaoName = null;
  1233. that.yaxingdaoCoding = null;
  1234. that.yaxingdaoVersion = null;
  1235. }
  1236. if (name == "qibeng") {
  1237. that.qibengName = null;
  1238. that.qibengCoding = null;
  1239. that.qibengVersion = null;
  1240. }
  1241. if (name == "songtang") {
  1242. that.songtangName = null;
  1243. that.songtangCoding = null;
  1244. that.songtangVersion = null;
  1245. }
  1246. if (name == "anzhuoping") {
  1247. that.anzhuopingName = null;
  1248. that.anzhuopingCoding = null;
  1249. that.anzhuopingVersion = null;
  1250. }
  1251. if (name == "plc") {
  1252. that.plcName = null;
  1253. that.plcCoding = null;
  1254. that.plcVersion = null;
  1255. }
  1256. if (name == "jiareban") {
  1257. that.jiarebanName = null;
  1258. that.jiarebanCoding = null;
  1259. that.jiarebanVersion = null;
  1260. }
  1261. if (name == "jike") {
  1262. that.jikeName = null;
  1263. that.jikeCoding = null;
  1264. that.jikeVersion = null;
  1265. }
  1266. if (name == "xiazai") {
  1267. that.xiazaiName = null;
  1268. that.xiazaiCoding = null;
  1269. that.xiazaiVersion = null;
  1270. }
  1271. } else if (res.cancel) {}
  1272. }
  1273. });
  1274. },
  1275. submit(event){
  1276. var serverUrl = this.serverurl;
  1277. var machineCoding = this.coding;
  1278. const {
  1279. value: modules
  1280. } = event.detail;
  1281. var token = uni.getStorageSync("token");
  1282. var createPersonnel = uni.getStorageSync("name");
  1283. uni.request({
  1284. url: serverUrl + "/TMachine/submit",
  1285. method: "POST",
  1286. data: {
  1287. "coding": machineCoding,
  1288. checkPersonnel:createPersonnel
  1289. },
  1290. header: {
  1291. 'token': token
  1292. },
  1293. success: (Result) => {
  1294. var res = Result;
  1295. if (res.data.code == true) {
  1296. }
  1297. uni.showModal({
  1298. title: '提示',
  1299. content: res.data.message,
  1300. });
  1301. }
  1302. });
  1303. },
  1304. jiancha(){
  1305. var token = uni.getStorageSync("token");
  1306. uni.request({
  1307. url: this.serverurl + "/TWorkingProcedure/jiancha",
  1308. method: "POST",
  1309. data: {
  1310. "machineCoding": this.coding
  1311. },
  1312. header: {
  1313. 'token': token
  1314. },
  1315. success: (Result) => {
  1316. var res = Result;
  1317. if (res.data.code == false) {
  1318. var re = res.data.data.toString();
  1319. this.weiname = '工序:'+re+'未安装';
  1320. }else{
  1321. this.weiname = '工序已全部安装';
  1322. }
  1323. this.jianchaModules();
  1324. }
  1325. });
  1326. },
  1327. jianchaModules(){
  1328. var token = uni.getStorageSync("token");
  1329. uni.request({
  1330. url: this.serverurl + "/TModules/jianchaModules?machineCoding="+this.coding,
  1331. method: "GET",
  1332. header: {
  1333. 'token': token
  1334. },
  1335. success: (Result) => {
  1336. var res = Result;
  1337. if (res.data.code == false) {
  1338. var re = res.data.data.toString();
  1339. this.Modulesname = '模块:'+re+'未安装';
  1340. }else{
  1341. this.Modulesname = '模块已全部安装';
  1342. }
  1343. }
  1344. });
  1345. }
  1346. }
  1347. }
  1348. </script>
  1349. <style>
  1350. .body {
  1351. background-color: #FFFFFF;
  1352. padding: 20upx 20upx 20upx 20upx;
  1353. display: flex;
  1354. flex-direction: row;
  1355. justify-content: flex-start;
  1356. }
  1357. .bodyname {
  1358. background-color: #FFFFFF;
  1359. padding: 20upx 20upx 20upx 70upx;
  1360. display: flex;
  1361. flex-direction: row;
  1362. justify-content: flex-start;
  1363. }
  1364. .input {
  1365. /* padding: 10upx 20upx 10upx 0upx; */
  1366. padding-left: 20upx;
  1367. padding-top: 10upx;
  1368. background-color: #FFFFFF;
  1369. width: 400upx;
  1370. height: 50upx;
  1371. box-shadow: 0upx 0upx 20upx #D3D3D3;
  1372. border-radius: 5upx;
  1373. }
  1374. .button {
  1375. margin: auto;
  1376. width: 60%;
  1377. height: 100upx;
  1378. }
  1379. .button1 {
  1380. margin: auto;
  1381. width: 75upx;
  1382. height: 50upx;
  1383. }
  1384. .p {
  1385. /* #ifdef H5 */
  1386. top: -13%;
  1387. /* #endif */
  1388. width: 50upx;
  1389. height: 30upx;
  1390. font-size: 25upx;
  1391. padding-right: 9upx;
  1392. padding-top: 6upx;
  1393. /* #ifndef H5 */
  1394. /* padding-top: 10upx; */
  1395. /* #endif */
  1396. position: absolute;
  1397. /* 水平居中 */
  1398. left: 50%;
  1399. -webkit-transform: translateX(-50%);
  1400. transform: translateX(-50%);
  1401. }
  1402. .p1 {
  1403. /* #ifdef H5 */
  1404. top: -13%;
  1405. /* #endif */
  1406. width: 80upx;
  1407. height: 60upx;
  1408. font-size: 40upx;
  1409. padding-top: 6upx;
  1410. /* #ifndef H5 */
  1411. padding-top: 10upx;
  1412. /* #endif */
  1413. position: absolute;
  1414. /* 水平居中 */
  1415. left: 50%;
  1416. -webkit-transform: translateX(-50%);
  1417. transform: translateX(-50%);
  1418. }
  1419. .radio {
  1420. padding-top: 20upx;
  1421. padding-left: 30upx;
  1422. }
  1423. .line {
  1424. background: #ECECEC;
  1425. height: 10upx;
  1426. }
  1427. .title {
  1428. font-size: 35upx;
  1429. }
  1430. .modulesButton {
  1431. background-color: #FFFFFF;
  1432. padding: 20upx 20upx 20upx 20upx;
  1433. display: flex;
  1434. width: 250upx;
  1435. margin: auto;
  1436. flex-direction: row;
  1437. justify-content: flex-start;
  1438. }
  1439. .modules {
  1440. width: 95%;
  1441. margin: auto;
  1442. }
  1443. </style>