edit_quality_testing.vue 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735
  1. <template>
  2. <view :style='{"margin-bottom":InputEvent!=""?"200px":0}' ref="all-input">
  3. <view @click='hidden' class='wrap'>
  4. <view class='title_b'>基本信息</view>
  5. <view class="c-row ">
  6. <view class="title">入库类型</view>
  7. <view class="con-list">
  8. <view v-if='gridList.serviceManagementType==1'>贸易入库</view>
  9. <view v-if='gridList.serviceManagementType==3'>收购入库</view>
  10. </view>
  11. </view>
  12. <view v-if="flag!=3" class="c-row ">
  13. <view class="title">仓库</view>
  14. <view class="con-list">
  15. {{gridList.warehouseName}}
  16. </view>
  17. </view>
  18. <view class="c-row ">
  19. <view class="title">任务编号</view>
  20. <view class="con-list">
  21. <view >{{gridList.inOutTaskNo}}</view>
  22. </view>
  23. </view>
  24. <view v-if='gridList.serviceManagementType==1&&gridList.inOutType!="移库入库"&&flag!=3||gridList.serviceManagementType==3' class="c-row ">
  25. <view class="title">合同编号</view>
  26. <view class="con-list">
  27. {{gridList.contractNo}}
  28. </view>
  29. </view>
  30. <view v-if='gridList.serviceManagementType==1&&gridList.inOutType=="移库入库"&&flag!=3' class="c-row ">
  31. <view class="title">移库编号</view>
  32. <view class="con-list">
  33. {{gridList.contractNo}}
  34. </view>
  35. </view>
  36. <view v-if='flag!=3' class="c-row ">
  37. <view class="title">业务编号</view>
  38. <view class="con-list">
  39. {{gridList.qualityNo}}
  40. </view>
  41. </view>
  42. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  43. <view class="title">成本</view>
  44. <view class="con-list">
  45. <view v-if='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view>
  46. <view v-if='coststatus'>
  47. <input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
  48. </view>
  49. </view>
  50. <button v-if='flag==4||flag==0' class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
  51. </view>
  52. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  53. <view class="title">运费</view>
  54. <view class="con-list flex">
  55. <view v-if='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
  56. <view v-if='freightstatus'>
  57. <input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
  58. </view>
  59. </view>
  60. <button v-if='flag==4||flag==0' class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
  61. </view>
  62. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  63. <view class="title">扣款</view>
  64. <view class="con-list">
  65. <input v-if='flag==4||flag==0' v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
  66. </view>
  67. </view>
  68. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  69. <view class="title">入库类型</view>
  70. <view class="con-list">
  71. {{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
  72. </view>
  73. </view>
  74. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  75. <view class="title">入库日期</view>
  76. <view class="con-list">
  77. <view v-if='flag==4||flag==0' @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
  78. <view v-else @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
  79. <u-picker @confirm='inOutDatepicker($event)' :params="params" v-model="show5"
  80. mode="time">
  81. </u-picker>
  82. </view>
  83. </view>
  84. <view v-if='gridList.serviceManagementType==3&&flag!=0' class="c-row ">
  85. <view class="title">客户</view>
  86. <view class="con-list">
  87. <view v-if='flag==4||flag==3' @click='gocustomer'>
  88. {{gridList.customerName}}({{gridList.customerPhone}})
  89. </view>
  90. <view v-else>
  91. {{gridList.customerName}}({{gridList.customerPhone}})
  92. </view>
  93. </view>
  94. </view>
  95. <!-- <view v-if='flag!=0' class="c-row "> -->
  96. <view class="c-row ">
  97. <view class="title">车牌号</view>
  98. <view class="con-list">
  99. <input :disabled="flag!=4&&flag!=3" v-model='gridList.carNumber' @click.stop="handleShowKeyboard" placeholder="请输入车牌号"
  100. name="input"></input>
  101. <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
  102. :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
  103. <!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
  104. </view>
  105. </view>
  106. <!-- <view v-if="gridList.paramType != '1'" class="c-row ">
  107. <view class="title">扣重比</view>
  108. <view class="con-list">
  109. <input :disabled='flag==1' v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
  110. name="input"></input>
  111. </view>
  112. </view>
  113. <view v-else class="c-row ">
  114. <view class="title">扣杂</view>
  115. <view class="con-list">
  116. <input :disabled='flag==1' v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂"
  117. @input="waterContentChange" name="input"></input>
  118. <input v-if='flag==0' value='未复检' disabled placeholder="复检扣杂" name="input"></input>
  119. <input v-else :disabled='flag!=1' v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂"
  120. name="input"></input>
  121. </view>
  122. </view> -->
  123. <view v-if='gridList.serviceManagementType==3&&flag!=3' class="c-row ">
  124. <view class="title">购粮性质</view>
  125. <view class="con-list">
  126. <input :disabled='flag==1' v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
  127. name="input"></input>
  128. </view>
  129. </view>
  130. <view v-if='flag!=3' class="c-row ">
  131. <view class="title">仓位号</view>
  132. <view class="con-list">
  133. <view v-if='flag!=1' @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
  134. <view v-else>{{gridList.binNumber}}</view>
  135. </view>
  136. </view>
  137. <view v-if='flag!=3' class="c-row ">
  138. <view class="title">囤位号</view>
  139. <view class="con-list">
  140. <input :disabled="flag!=4&&flag!=0" v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
  141. </view>
  142. </view>
  143. <view v-if='flag!=3' class="c-row ">
  144. <view class="title">货名</view>
  145. <view class="con-list">
  146. <!-- <view v-if="flag != '0'">
  147. {{gridList.goodsName}}
  148. </view> -->
  149. <view v-if='flag==4||flag==0'>{{gridList.goodsName}}</view>
  150. <view v-else>{{gridList.goodsName}}</view>
  151. <u-picker :range="goodsList" range-key="goodsName" @confirm='goodsPicker($event)'
  152. v-model="goodsName" mode="selector">
  153. </u-picker>
  154. </view>
  155. </view>
  156. <view v-if='flag!=3' class="c-row ">
  157. <view class="title">类型</view>
  158. <view class="con-list">
  159. {{gridList.type}}
  160. </view>
  161. </view>
  162. <view v-if='gridList.serviceManagementType==1' class="c-row ">
  163. <view class="title">运输方式</view>
  164. <view class="con-list">
  165. <view v-if='flag==4||flag==0' @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
  166. <view v-else>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
  167. <u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
  168. mode="selector">
  169. </u-picker>
  170. </view>
  171. </view>
  172. <view v-if='gridList.serviceManagementType==3&&flag!=0' class="c-row ">
  173. <view class="title">运输方式</view>
  174. <view class="con-list">
  175. <view v-if='flag==4||flag==3' @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
  176. <view v-else>{{outType?outType:'请选择运输方式'}}</view>
  177. <u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)' v-model="show8"
  178. mode="selector">
  179. </u-picker>
  180. </view>
  181. </view>
  182. <view v-if='gridList.serviceManagementType==1&&flag!=3||gridList.serviceManagementType==3&&gridList.outType=="自运"&&flag!=3' class="c-row ">
  183. <view class="title">车队</view>
  184. <view class="con-list">
  185. <view v-if='flag==4||flag==0' @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
  186. <view v-else>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
  187. <u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName" v-model="show6"
  188. mode="selector">
  189. </u-picker>
  190. </view>
  191. </view>
  192. <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  193. <view class="title">箱号-1</view>
  194. <view class="con-list">
  195. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  196. </view>
  197. </view>
  198. <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  199. <view class="title">封号-1</view>
  200. <view class="con-list">
  201. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  202. </view>
  203. </view>
  204. <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  205. <view class="title">箱号-2</view>
  206. <view class="con-list">
  207. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  208. </view>
  209. </view>
  210. <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  211. <view class="title">封号-2</view>
  212. <view class="con-list">
  213. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  214. </view>
  215. </view>
  216. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  217. <view class="title">箱号-1</view>
  218. <view class="con-list">
  219. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  220. </view>
  221. </view>
  222. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  223. <view class="title">封号-1</view>
  224. <view class="con-list">
  225. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  226. </view>
  227. </view>
  228. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  229. <view class="title">箱号-2</view>
  230. <view class="con-list">
  231. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  232. </view>
  233. </view>
  234. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  235. <view class="title">封号-2</view>
  236. <view class="con-list">
  237. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  238. </view>
  239. </view>
  240. <view class="c-row-fj" v-if="flag==2||flag==1">
  241. <view style="margin: 0px 0px 30rpx 10rpx;">复检备注</view>
  242. <textarea class='textarea-style' v-model='gridList.reMemo' placeholder="请输入复检备注"
  243. maxlength="300"></textarea>
  244. </view>
  245. <view class="c-row" v-if="flag==1&&gridList.warehouseName=='鲅鱼圈金信库'">
  246. <view class="title">车型</view>
  247. <view class="con-list">
  248. <view @click='carstatus = true'>{{gridList.carModel?gridList.carModel:'请选择车型'}}</view>
  249. <u-picker :range="carModeList" range-key="constValue" @confirm='carPicker($event)'
  250. v-model="carstatus" mode="selector">
  251. </u-picker>
  252. </view>
  253. </view>
  254. </view>
  255. <view v-if='flag!=3' style='padding-bottom:500rpx;'>
  256. <view class='wrap'>
  257. <view style='margin-right:10px;' class='flex justify-between align-item-center'>
  258. <view class='title_b'>化验信息</view>
  259. <view v-if='flag==0||flag==4' class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572"
  260. v-model="value" @change="change"></u-switch>
  261. </view>
  262. </view>
  263. <view class="c-row ">
  264. <view class="title">等级</view>
  265. <view class="con-list">
  266. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
  267. mode="selector">
  268. </u-picker>
  269. <view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
  270. <view v-else>{{gridList.grade}}</view>
  271. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker1($event)' v-model="show2"
  272. mode="selector">
  273. </u-picker>
  274. <view v-if='flag==1' @click='show2=true'>{{gridList.reGrade?gridList.reGrade:'请选择等级'}}</view>
  275. <view v-if='flag==2'>{{gridList.reGrade}}</view>
  276. </view>
  277. </view>
  278. <view class="c-row ">
  279. <view class="title">水分(%)</view>
  280. <view class="con-list">
  281. <MyNumberInput :myvalue="gridList.waterContent" :Isedit="Isedit" :IsShow="MykeywordShow"
  282. :myevent="'waterContent'"
  283. @setValue="mykeywordset" v-if="InputEvent=='waterContent'"
  284. @Cancelword="Cancelword"
  285. @goNext="goNext('waterContent')"></MyNumberInput>
  286. <input v-else :disabled='flag==1' @click="SetInputKey('waterContent')" v-model='gridList.waterContent' placeholder="初检水分"
  287. @input="waterContentChange" type="digit" name="input"></input>
  288. <MyNumberInput :myvalue="gridList.reWaterContent" :Isedit="Isedit" :IsShow="MykeywordShow"
  289. :myevent="'reWaterContent'"
  290. @setValue="mykeywordset" v-if="InputEvent=='reWaterContent'"
  291. @Cancelword="Cancelword"
  292. @goNext="goNext('reWaterContent')"></MyNumberInput>
  293. <input @click="SetInputKey('reWaterContent')" v-if="flag==1&&InputEvent!='reWaterContent'||flag==2&&InputEvent!='reWaterContent'" type="digit" v-model='gridList.reWaterContent' placeholder="复检水分"
  294. name="input"></input>
  295. </view>
  296. </view>
  297. <view class="c-row " v-if='gridList.goodsName!="大豆"'>
  298. <view class="title">容重(克/升)</view>
  299. <view class="con-list">
  300. <MyNumberInput :myvalue="gridList.bulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
  301. :myevent="'bulkDensity'"
  302. @setValue="mykeywordset" v-if="InputEvent=='bulkDensity'"
  303. @Cancelword="Cancelword"
  304. @goNext="goNext('bulkDensity')"></MyNumberInput>
  305. <input v-else @click="SetInputKey('bulkDensity')" :disabled='flag==1' type="digit" v-model='gridList.bulkDensity' placeholder="请输入容重"
  306. name="input" @input="obtainPrice"></input>
  307. <MyNumberInput :myvalue="gridList.reBulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
  308. :myevent="'reBulkDensity'"
  309. @setValue="mykeywordset" v-if="InputEvent=='reBulkDensity'"
  310. @Cancelword="Cancelword"
  311. @goNext="goNext('reBulkDensity')"></MyNumberInput>
  312. <input @click="SetInputKey('reBulkDensity')" v-if="flag==1&&InputEvent!='reBulkDensity'||flag==2&&InputEvent!='reBulkDensity'" type="digit" v-model='gridList.reBulkDensity' placeholder="请输入容重"
  313. name="input"></input>
  314. </view>
  315. </view>
  316. <view class="c-row" v-else>
  317. <view class="title">蛋白</view>
  318. <view class="con-list">
  319. <MyNumberInput :myvalue="gridList.protein" :Isedit="Isedit" :IsShow="MykeywordShow"
  320. :myevent="'protein'"
  321. @setValue="mykeywordset" v-if="InputEvent=='protein'"
  322. @Cancelword="Cancelword"
  323. @goNext="goNext('protein')"></MyNumberInput>
  324. <input v-else @click="SetInputKey('protein')" :disabled='flag==1' type="digit" v-model='gridList.protein' placeholder="请输入蛋白"
  325. name="input" @input="obtainPrice"></input>
  326. <MyNumberInput :myvalue="gridList.reProtein" :Isedit="Isedit" :IsShow="MykeywordShow"
  327. :myevent="'reProtein'"
  328. @setValue="mykeywordset" v-if="InputEvent=='reProtein'"
  329. @Cancelword="Cancelword"
  330. @goNext="goNext('reProtein')"></MyNumberInput>
  331. <input @click="SetInputKey('reProtein')" v-if="flag==1&&InputEvent!='reProtein'||flag==2&&InputEvent!='reProtein'" type="digit" v-model='gridList.reProtein' placeholder="请输入蛋白"
  332. name="input"></input>
  333. </view>
  334. </view>
  335. <view class="c-row " v-if='gridList.goodsName!="大豆"'>
  336. <view class="title">不完善粒(%)</view>
  337. <view class="con-list">
  338. <MyNumberInput :myvalue="gridList.imperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  339. :myevent="'imperfectGrain'"
  340. @setValue="mykeywordset" v-if="InputEvent=='imperfectGrain'"
  341. @Cancelword="Cancelword"
  342. @goNext="goNext('imperfectGrain')"></MyNumberInput>
  343. <input v-else @click="SetInputKey('imperfectGrain')" :disabled='flag==1' type="digit" v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
  344. name="input"></input>
  345. <MyNumberInput :myvalue="gridList.reImperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  346. :myevent="'reImperfectGrain'"
  347. @setValue="mykeywordset" v-if="InputEvent=='reImperfectGrain'"
  348. @Cancelword="Cancelword"
  349. @goNext="goNext('reImperfectGrain')"></MyNumberInput>
  350. <input @click="SetInputKey('reImperfectGrain')" v-if="flag==1&&InputEvent!='reImperfectGrain'||flag==2&&InputEvent!='reImperfectGrain'" type="digit" v-model='gridList.reImperfectGrain' placeholder="请输入不完整粒占比"
  351. name="input"></input>
  352. </view>
  353. </view>
  354. <view class="c-row" v-else>
  355. <view class="title">完整粒率(%)</view>
  356. <view class="con-list">
  357. <MyNumberInput :myvalue="gridList.completeGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  358. :myevent="'completeGrain'"
  359. @setValue="mykeywordset" v-if="InputEvent=='completeGrain'"
  360. @Cancelword="Cancelword"
  361. @goNext="goNext('completeGrain')"></MyNumberInput>
  362. <input v-else @click="SetInputKey('completeGrain')" :disabled='flag==1' type="digit" v-model='gridList.completeGrain' placeholder="请输入完整粒率占比"
  363. name="input"></input>
  364. <MyNumberInput :myvalue="gridList.reCompleteGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  365. :myevent="'reCompleteGrain'"
  366. @setValue="mykeywordset" v-if="InputEvent=='reCompleteGrain'"
  367. @Cancelword="Cancelword"
  368. @goNext="goNext('reCompleteGrain')"></MyNumberInput>
  369. <input @click="SetInputKey('reCompleteGrain')" v-if="flag==1&&InputEvent!='reCompleteGrain'||flag==2&&InputEvent!='reCompleteGrain'" type="digit" v-model='gridList.reCompleteGrain' placeholder="请输入完整粒率占比"
  370. name="input"></input>
  371. </view>
  372. </view>
  373. <view class="c-row ">
  374. <view class="title">杂质(%)</view>
  375. <view class="con-list">
  376. <MyNumberInput :myvalue="gridList.impurity" :Isedit="Isedit" :IsShow="MykeywordShow"
  377. :myevent="'impurity'"
  378. @setValue="mykeywordset" v-if="InputEvent=='impurity'"
  379. @Cancelword="Cancelword"
  380. @goNext="goNext('impurity')"></MyNumberInput>
  381. <input v-else @click="SetInputKey('impurity')" :disabled='flag==1' type="digit" v-model='gridList.impurity' placeholder="请输入杂质占比"
  382. name="input"></input>
  383. <MyNumberInput :myvalue="gridList.reImpurity" :Isedit="Isedit" :IsShow="MykeywordShow"
  384. :myevent="'reImpurity'"
  385. @setValue="mykeywordset" v-if="InputEvent=='reImpurity'"
  386. @Cancelword="Cancelword"
  387. @goNext="goNext('reImpurity')"></MyNumberInput>
  388. <input @click="SetInputKey('reImpurity')" v-if="flag==1&&InputEvent!='reImpurity'||flag==2&&InputEvent!='reImpurity'" type="digit" v-model='gridList.reImpurity' placeholder="请输入杂质占比"
  389. name="input"></input>
  390. </view>
  391. </view>
  392. <view class="c-row ">
  393. <view class="title">霉变粒(%)</view>
  394. <view class="con-list">
  395. <MyNumberInput :myvalue="gridList.mildewGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  396. :myevent="'mildewGrain'"
  397. @setValue="mykeywordset" v-if="InputEvent=='mildewGrain'"
  398. @Cancelword="Cancelword"
  399. @goNext="goNext('mildewGrain')"></MyNumberInput>
  400. <input v-else @click="SetInputKey('mildewGrain')" :disabled='flag==1' type="digit" v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
  401. name="input"></input>
  402. <MyNumberInput :myvalue="gridList.reMildewGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  403. :myevent="'reMildewGrain'"
  404. @setValue="mykeywordset" v-if="InputEvent=='reMildewGrain'"
  405. @Cancelword="Cancelword"
  406. @goNext="goNext('reMildewGrain')"></MyNumberInput>
  407. <input @click="SetInputKey('reMildewGrain')" v-if="flag==1&&InputEvent!='reMildewGrain'||flag==2&&InputEvent!='reMildewGrain'" type="digit" v-model='gridList.reMildewGrain' placeholder="请输入霉变粒占比"
  408. name="input"></input>
  409. </view>
  410. </view>
  411. <view class="c-row ">
  412. <view class="title">热损伤(%)</view>
  413. <view class="con-list">
  414. <MyNumberInput :myvalue="gridList.jiaorenli" :Isedit="Isedit" :IsShow="MykeywordShow"
  415. :myevent="'jiaorenli'"
  416. @setValue="mykeywordset" v-if="InputEvent=='jiaorenli'"
  417. @Cancelword="Cancelword"
  418. @goNext="goNext('jiaorenli')"></MyNumberInput>
  419. <input v-else @click="SetInputKey('jiaorenli')" :disabled='flag==1' type="digit" v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
  420. name="input"></input>
  421. <MyNumberInput :myvalue="gridList.reJiaorenli" :Isedit="Isedit" :IsShow="MykeywordShow"
  422. :myevent="'reJiaorenli'"
  423. @setValue="mykeywordset" v-if="InputEvent=='reJiaorenli'"
  424. @Cancelword="Cancelword"
  425. @goNext="goNext('reJiaorenli')"></MyNumberInput>
  426. <input @click="SetInputKey('reJiaorenli')" v-if="flag==1&&InputEvent!='reJiaorenli'||flag==2&&InputEvent!='reJiaorenli'" type="digit" v-model='gridList.reJiaorenli' placeholder="请输入热损伤占比"
  427. name="input"></input>
  428. <!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
  429. </view>
  430. </view>
  431. <view class="c-row" v-if="gridList.goodsName == '大豆'">
  432. <view class="title">转基因</view>
  433. <view class="con-list">
  434. <view @click="transgeneShow=true">{{gridList.transgene}}</view>
  435. <!-- 转基因 -->
  436. <u-picker :range="transgeneList" range-key="value" @confirm='transgeneClick($event)' v-model="transgeneShow"
  437. mode="selector">
  438. </u-picker>
  439. <view @click="transgeneShow=true">{{gridList.reTransgene?gridList.reTransgene:"请选择是否转基因"}}</view>
  440. <!-- 转基因 -->
  441. <u-picker :range="transgeneList" range-key="value" @confirm='transgeneClick1($event)' v-model="transgeneShow"
  442. mode="selector">
  443. </u-picker>
  444. </view>
  445. </view>
  446. <view class="c-row" v-if="gridList.goodsName == '大豆'">
  447. <view class="title">色泽/气味</view>
  448. <view class="con-list">
  449. <div >{{gridList.colorLustre}}</div>
  450. <u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick($event)' v-model="colorLustreShow"
  451. mode="selector">
  452. </u-picker>
  453. <div @click="colorLustreShow = true">{{gridList.reColorLustre?gridList.reColorLustre:"请选择色泽/气味是否正常"}}</div>
  454. <u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick1($event)' v-model="colorLustreShow"
  455. mode="selector">
  456. </u-picker>
  457. </view>
  458. </view>
  459. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
  460. class="c-row">
  461. <view class="title">水分增价(元/吨)</view>
  462. <view class="con-list">
  463. <input v-model='gridList.waterPriceIncrease' @focus="pricefocus($event,1)" @blur="priceblur($event,1)" @input='deductionchange'
  464. placeholder="请输入水分增价" name="input" type="digit"></input>
  465. </view>
  466. </view>
  467. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
  468. class="c-row">
  469. <view class="title">水分扣价(元/吨)</view>
  470. <view class="con-list">
  471. <input v-model='gridList.waterPriceDeduction' @focus="pricefocus($event,2)" @blur="priceblur($event,2)" @input='deductionchange'
  472. placeholder="请输入水分扣价" name="input" type="digit"></input>
  473. </view>
  474. </view>
  475. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
  476. class="c-row">
  477. <view class="title">质量增价(元/吨)</view>
  478. <view class="con-list">
  479. <input v-model='gridList.qualityPriceIncrease' @focus="pricefocus($event,3)" @blur="priceblur($event,3)" @input='deductionchange'
  480. placeholder="请输入质量增价" name="input" type="digit"></input>
  481. </view>
  482. </view>
  483. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
  484. class="c-row">
  485. <view class="title">质量扣价(元/吨)</view>
  486. <view class="con-list">
  487. <input v-model='gridList.qualityPriceDeduction' @focus="pricefocus($event,4)" @blur="priceblur($event,4)" @input='deductionchange'
  488. placeholder="请输入质量扣价" name="input" type="digit"></input>
  489. </view>
  490. </view>
  491. <view v-if="gridList.type == '潮粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
  492. <view class="title">净重单价(元/公斤)</view>
  493. <view class="con-list">
  494. <input :disabled='flag==1&&pricedisabled' v-model='gridList.tidalGrainPrice' @blur='inputprice' placeholder="自动获取,不可编辑"
  495. name="input"></input>
  496. </view>
  497. <!-- <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button> -->
  498. </view>
  499. <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
  500. <view class="title">干粮单价(元/公斤)</view>
  501. <view class="con-list">
  502. <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit" @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
  503. </view>
  504. <!-- <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button> -->
  505. </view>
  506. <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==1&&flag!=3" class="c-row">
  507. <view class="title">干粮单价(元/公斤)</view>
  508. <view class="con-list">
  509. <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit" @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
  510. </view>
  511. </view>
  512. </view>
  513. </view>
  514. <view class="footer">
  515. <view v-if='flag==1' @click='confirmInfo' class="button">确认初检信息</view>
  516. <view @click='submit' class="button">提交</view>
  517. </view>
  518. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  519. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  520. :showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  521. <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
  522. <view class="buns_item">
  523. <view class="but_css" @click="print">打印小票</view>
  524. <view class="but_css" @click="close">返回</view>
  525. </view>
  526. </u-popup>
  527. <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
  528. v-model="show" mode="selector">
  529. </u-picker>
  530. </view>
  531. </template>
  532. <script>
  533. const Equ_List=['waterContent','bulkDensity','imperfectGrain','impurity','mildewGrain','jiaorenli'];
  534. const Equ_List1=['reWaterContent','reBulkDensity','reImperfectGrain','reImpurity','reMildewGrain','reJiaorenli'];
  535. import dragButton from "@/components/drag-button/drag-button.vue";
  536. import keyboard from "@/components/master-keyboard/master-keyboard.vue";
  537. import MyNumberInput from "@/components/MyNumberInput.vue";
  538. import {
  539. mapState
  540. } from 'vuex';
  541. let startY = 0,
  542. moveY = 0,
  543. pageAtTop = true;
  544. export default {
  545. components: {
  546. dragButton,
  547. keyboard,
  548. MyNumberInput
  549. },
  550. data() {
  551. return {
  552. isShowPrint: false,
  553. inputShow: false,
  554. modalName: '',
  555. mycarStyle: '',
  556. feild: undefined,
  557. id: 0,
  558. show: false,
  559. show2:false,
  560. show4:false,
  561. show5:false,
  562. show7:false,
  563. show8:false,
  564. pricedisabled:false,
  565. multiSelector1:[{name:'他运',value:'他运'}],
  566. outType:'',
  567. selector: [],
  568. show1: false,
  569. pricetext:'锁定',
  570. goodsName: false,
  571. carstatus: false,
  572. params:{year: true,
  573. month: true,
  574. day: true,},
  575. inputContent: '',
  576. multiSelector: [{
  577. name: '汽运',
  578. value: '0',
  579. },
  580. {
  581. name: '火运',
  582. value: '1',
  583. },
  584. {
  585. name: '集装箱船',
  586. value: '2',
  587. },
  588. {
  589. name: '散船',
  590. value: '3',
  591. },
  592. ],
  593. coverTransform: 'translateY(0px)',
  594. coverTransition: '0s',
  595. moving: false,
  596. footprintList: [],
  597. zjid:'',
  598. searchKeyWord: '',
  599. isVip: false,
  600. flag: 0,
  601. freightstatus:false,
  602. coststatus:false,
  603. freighttext:'手动填写',
  604. costtext:'手动填写',
  605. userInfoTmp: [],
  606. inputStatus: 'none',
  607. carInfo: [],
  608. gridCol: 4,
  609. pageSize: 10,
  610. currentPage: 1,
  611. gridBorder: false,
  612. headUrl: "../../static/img/myimg/YongHu@3x.png",
  613. userphone: "",
  614. username: "请更改昵称",
  615. gridList: {
  616. natureOfGrainPurchase: '贸易粮',
  617. type: '潮粮',
  618. tidalGrainPrice: '',
  619. dryGrainPrice: '',
  620. carNumber: '',
  621. carModel: '',
  622. serviceManagementType:'3'
  623. },
  624. managementType: '',
  625. warehouseName: '',
  626. warehouseList: [],
  627. InputEvent:'',
  628. bottomHeight:'10rpx',
  629. MykeywordShow:false,
  630. showTran: true,
  631. companyId: 1,
  632. current: 4,
  633. value: false,
  634. carModeList: [],
  635. fleetNameList:[],
  636. gradeList: [{
  637. key: 1,
  638. value: '一等品'
  639. },
  640. {
  641. key: 2,
  642. value: '二等品'
  643. },
  644. {
  645. key: 3,
  646. value: '三等品'
  647. },
  648. {
  649. key: 4,
  650. value: '等外'
  651. },
  652. ],
  653. cangid: '',
  654. goodsList: [],
  655. taskNolist:[],
  656. dryGrainPrice:0,
  657. tidalGrainPrice:0,
  658. isShowAlert: false,
  659. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  660. transgeneShow:false,
  661. transgeneList:[{value:'非转基因'},{value:'转基因'}],
  662. colorLustreShow : false,
  663. colorLustreList:[{value:'正常'},{value:'异常'}]
  664. }
  665. },
  666. // #ifndef MP
  667. onNavigationBarButtonTap(e) {
  668. const index = e.index;
  669. if (index === 0) {
  670. this.navTo('/pages/set/set');
  671. } else if (index === 1) {
  672. // #ifdef APP-PLUS
  673. const pages = getCurrentPages();
  674. const page = pages[pages.length - 1];
  675. const currentWebview = page.$getAppWebview();
  676. currentWebview.hideTitleNViewButtonRedDot({
  677. index
  678. });
  679. // #endif
  680. uni.navigateTo({
  681. url: '/pages/notice/notice'
  682. })
  683. }
  684. },
  685. // #endif
  686. computed: {
  687. ...mapState(['hasLogin', 'userInfo']),
  688. // 手机号中间4位加*
  689. starUserphone() {
  690. let reg = /^(\d{3})\d{4}(\d{4})$/;
  691. if (this.userphone) {
  692. return this.userphone.replace(reg, "$1****$2");
  693. }
  694. }
  695. },
  696. onLoad(options) {
  697. this.id = options.id
  698. this.flag = options.flag
  699. this.cangid = options.cangid
  700. this.warehouseName=options.warehouseName
  701. this.managementType = options.managementType
  702. console.log(this.flag)
  703. var that = this
  704. uni.showLoading({
  705. title:"加载中"
  706. })
  707. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  708. id: this.id
  709. }).then(res => {
  710. uni.hideLoading()
  711. if (res.data.data) {
  712. let data = res.data.data
  713. if (data.supplementaryRecording == 1) {
  714. that.value = true
  715. } else {
  716. that.value = false
  717. }
  718. that.gridList = data
  719. if(that.gridList.type=='干粮'){
  720. if (this.gridList.goodsName &&
  721. this.gridList.bulkDensity &&
  722. this.cangid) {
  723. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  724. warehouseId: this.cangid,
  725. goodsName: this.gridList.goodsName,
  726. bulkDensity:this.gridList.bulkDensity
  727. }).then(res => {
  728. if(res.data.data != 0){
  729. this.gridList.dryGrainPrice = res.data.data
  730. this.dryGrainPrice = res.data.data
  731. this.deductionchange()
  732. }
  733. })
  734. }
  735. }else if(that.gridList.type=='潮粮'){
  736. if (
  737. this.gridList.goodsName &&
  738. this.gridList.waterContent &&
  739. this.gridList.grade
  740. ) {
  741. console.log('123123')
  742. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  743. warehouseId: this.cangid,
  744. goodsName: this.gridList.goodsName,
  745. waterContent: this.gridList.waterContent,
  746. grade: this.gridList.grade,
  747. }).then(res => {
  748. if (that.gridList.paramType == '1') {
  749. // console.log(that.gridList)
  750. if(that.gridList.buckleMiscellaneous){
  751. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  752. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  753. .dryGrainPrice)).toFixed(4)
  754. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  755. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  756. .dryGrainPrice)).toFixed(4)
  757. }
  758. if (!that.gridList.tidalGrainPrice) {
  759. that.gridList.tidalGrainPrice = ''
  760. }
  761. } else {
  762. that.gridList.tidalGrainPrice = res.data.data
  763. that.tidalGrainPrice = res.data.data
  764. }
  765. this.deductionchange()
  766. })
  767. }
  768. }
  769. // if(that.gridList.dryGrainPrice){
  770. // that.dryGrainPrice=that.gridList.dryGrainPrice
  771. // }
  772. // if(that.gridList.tidalGrainPrice){
  773. // that.tidalGrainPrice=that.gridList.tidalGrainPrice
  774. // }
  775. if(!that.gridList.reGrade){
  776. that.gridList.reGrade=that.gridList.grade
  777. }
  778. if(!that.gridList.reWaterContent){
  779. that.gridList.reWaterContent=that.gridList.waterContent
  780. }
  781. if(!that.gridList.reBulkDensity){
  782. that.gridList.reBulkDensity=that.gridList.bulkDensity
  783. }
  784. if(!that.gridList.reImperfectGrain){
  785. that.gridList.reImperfectGrain=that.gridList.imperfectGrain
  786. }
  787. if(!that.gridList.reImpurity){
  788. that.gridList.reImpurity=that.gridList.impurity
  789. }
  790. if(!that.gridList.reMildewGrain){
  791. that.gridList.reMildewGrain=that.gridList.mildewGrain
  792. }
  793. if(!that.gridList.reJiaorenli){
  794. that.gridList.reJiaorenli=that.gridList.jiaorenli
  795. }
  796. if(this.gridList.outType&&this.gridList.serviceManagementType==3){
  797. this.outType=this.gridList.outType
  798. }
  799. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  800. id: this.cangid
  801. }).then(res => {
  802. that.warehouseList = res.data.data.warehousePositionInfoList
  803. })
  804. //质检货名下拉
  805. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  806. warehouseId: this.cangid
  807. }).then(res => {
  808. if (res.data.data) {
  809. that.goodsList = res.data.data
  810. if (that.goodsList.length > 0) {
  811. if(!that.gridList.goodsName){
  812. that.gridList.goodsName = that.goodsList[0].goodsName
  813. }
  814. uni.setStorageSync('purchasePriceList', that.goodsList)
  815. that.purchasePriceList = uni.getStorageSync('purchasePriceList')
  816. }
  817. }
  818. else if(res.data.code != 200 && that.gridList.serviceManagementType==3){
  819. uni.showModal({
  820. content:res.data.message,
  821. showCancel:false
  822. })
  823. }
  824. })
  825. }
  826. })
  827. this.$api.doRequest('get', 'commonSysParameter/getInfo', {
  828. constId: 'QUA1'
  829. }).then(res => {
  830. if (res.data.data) {
  831. that.carModeList = res.data.data
  832. }
  833. })
  834. this.gridList.grade = this.gradeList[2].value
  835. this.gridList.gradeKey = this.gradeList[2].key
  836. },
  837. onShow() {
  838. this.multiSelector1=[{name:'他运',value:'他运'}]
  839. this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  840. warehouseName:this.warehouseName
  841. }).then(res => {
  842. // console.log(res)
  843. if(res.data.data.contractManagementInfoList){
  844. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  845. res.data.data.contractMangementInfoList[i].name='自运 ('+
  846. res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
  847. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  848. }
  849. }else{
  850. this.multiSelector1=[{name:'他运',value:'他运'}]
  851. }
  852. // this.taskNolist=res.data.data
  853. })
  854. // uni.showLoading({title: '加载中'})
  855. // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  856. // flag: 2,
  857. // warehouseName:this.warehouseName
  858. // }).then(res => {
  859. // console.log(res)
  860. // uni.hideLoading();
  861. // this.taskNolist=res.data.data
  862. // })
  863. let _kh = uni.getStorageSync('isClick')
  864. if (uni.getStorageSync('checkcustomer') && _kh) {
  865. let _customerInfo = uni.getStorageSync('checkcustomer')
  866. if (_customerInfo.shipperName) {
  867. this.gridList.identityId = _customerInfo.id
  868. //点击登记客户
  869. this.gridList.customerName = _customerInfo.shipperName
  870. this.gridList.customerPhone = _customerInfo.shipperPhone
  871. this.gridList.carNumber = _customerInfo.carNo
  872. } else {
  873. //点击搜索客户
  874. this.gridList.customerName = _customerInfo.customerName
  875. this.gridList.customerPhone = _customerInfo.customerPhone
  876. }
  877. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  878. }
  879. },
  880. methods: {
  881. colorLustreClick(e){
  882. this.gridList.colorLustre = this.colorLustreList[e[0]].value
  883. },
  884. colorLustreClick1(e){
  885. this.gridList.reColorLustre = this.colorLustreList[e[0]].value
  886. },
  887. transgeneClick(e){
  888. this.gridList.transgene = this.transgeneList[e[0]].value
  889. },
  890. transgeneClick1(e){
  891. this.gridList.reTransgene = this.transgeneList[e[0]].value
  892. },
  893. Cancelword(){
  894. this.bottomHeight = '10rpx';
  895. this.MykeywordShow =false;
  896. this.InputEvent = '';
  897. },
  898. goNext(val){
  899. if(this.flag==0||this.flag==3||this.flag==4){
  900. var inputList = Equ_List;
  901. }else{
  902. var inputList = Equ_List1;
  903. }
  904. var index = inputList.indexOf(val);
  905. this.setScrollTops(val);
  906. if(index<inputList.length-1){
  907. this.InputEvent = inputList[index+1];
  908. }else{
  909. this.InputEvent=''
  910. this.bottomHeight = '10rpx';
  911. this.MykeywordShow = false;
  912. }
  913. },
  914. mykeywordset(datatxt){
  915. var arr = JSON.parse(datatxt);
  916. this.gridList[arr.even] = arr.value;
  917. if(arr.even=='waterContent'){
  918. this.waterContentChange()
  919. }else if(arr.even=='bulkDensity'){
  920. this.obtainPrice()
  921. }
  922. },
  923. SetInputKey(even){
  924. uni.hideKeyboard();
  925. this.InputEvent = even;
  926. this.setScrollTops(even);
  927. if(!this.MykeywordShow){
  928. this.bottomHeight = '320rpx';
  929. this.MykeywordShow = true;
  930. }
  931. },
  932. setScrollTops(even){
  933. if(this.flag==0||this.flag==3||this.flag==4){
  934. var inputList = Equ_List;
  935. }else{
  936. var inputList = Equ_List1;
  937. }
  938. var index = inputList.indexOf(even);
  939. this.viewTop = (index + 1) * 60 + 100;
  940. },
  941. pricefocus(e,status){
  942. console.log(e)
  943. if(status==1){
  944. if(e.detail.value==0){
  945. this.gridList.waterPriceIncrease=''
  946. }
  947. }else if(status==2){
  948. if(e.detail.value==0){
  949. this.gridList.waterPriceDeduction=''
  950. }
  951. }else if(status==3){
  952. if(e.detail.value==0){
  953. this.gridList.qualityPriceIncrease=''
  954. }
  955. }else if(status==4){
  956. if(e.detail.value==0){
  957. this.gridList.qualityPriceDeduction=''
  958. }
  959. }
  960. },
  961. priceblur(e,status){
  962. console.log(e)
  963. if(status==1){
  964. if(e.detail.value==''){
  965. this.gridList.waterPriceIncrease=0
  966. }
  967. }else if(status==2){
  968. if(e.detail.value==''){
  969. this.gridList.waterPriceDeduction=0
  970. }
  971. }else if(status==3){
  972. if(e.detail.value==''){
  973. this.gridList.qualityPriceIncrease=0
  974. }
  975. }else if(status==4){
  976. if(e.detail.value==''){
  977. this.gridList.qualityPriceDeduction=0
  978. }
  979. }
  980. },
  981. deductionchange(){
  982. console.log(this.gridList.type,this.tidalGrainPrice,
  983. Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4))
  984. if(this.gridList.type=='干粮'){
  985. if(this.dryGrainPrice!=''){
  986. console.log(Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)),Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(2))
  987. this.gridList.dryGrainPrice=Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
  988. }
  989. }else if(this.gridList.type=='潮粮'){
  990. if(this.tidalGrainPrice!=''){
  991. this.gridList.tidalGrainPrice=Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
  992. }
  993. }
  994. this.$forceUpdate()
  995. },
  996. obtainPrice(){//根据容重获取价格
  997. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  998. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  999. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1000. warehouseId: this.cangid,
  1001. goodsName: this.gridList.goodsName,
  1002. bulkDensity:this.gridList.bulkDensity
  1003. }).then(res => {
  1004. if(res.data.data != 0){
  1005. this.gridList.dryGrainPrice = res.data.data
  1006. this.dryGrainPrice = res.data.data
  1007. this.gridList.waterPriceIncrease=0
  1008. this.gridList.waterPriceDeduction=0
  1009. this.gridList.qualityPriceIncrease=0
  1010. this.gridList.qualityPriceDeduction=0
  1011. }
  1012. })
  1013. // }
  1014. }
  1015. },
  1016. changeprice(){
  1017. if(this.pricetext=='解锁'){
  1018. this.pricedisabled=false
  1019. this.pricetext='锁定'
  1020. }else{
  1021. this.pricedisabled=true
  1022. this.pricetext='解锁'
  1023. }
  1024. },
  1025. inputprice(){
  1026. if(this.pricetext=='锁定'){
  1027. this.pricedisabled=true
  1028. this.pricetext='解锁'
  1029. }
  1030. },
  1031. inOutDatepicker(e){
  1032. this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
  1033. console.log(e)
  1034. },
  1035. fleetpicker(e){
  1036. this.gridList.fleet=this.fleetNameList[e[0]].fleetName
  1037. },
  1038. changefreight(){
  1039. this.freightstatus=!this.freightstatus
  1040. if(this.freightstatus){
  1041. this.freighttext='自动获取'
  1042. }else{
  1043. this.freighttext='手动填写'
  1044. }
  1045. },
  1046. changecost(){
  1047. this.coststatus=!this.coststatus
  1048. if(this.coststatus){
  1049. this.costtext='自动获取'
  1050. }else{
  1051. this.costtext='手动填写'
  1052. }
  1053. },
  1054. gocustomer() {
  1055. uni.navigateTo({
  1056. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  1057. .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
  1058. })
  1059. },
  1060. print() {
  1061. uni.navigateTo({
  1062. url: '/pages/erpbusiness/bleConnect'
  1063. })
  1064. },
  1065. close() {
  1066. this.isShowPrint = false
  1067. uni.navigateBack({})
  1068. },
  1069. // focusConfig(type){
  1070. // console.log('childclick',type)
  1071. // // 0是上一项
  1072. // if(type==0){
  1073. // }else{}
  1074. // },
  1075. hidden() {
  1076. this.$refs.keyboard.open(false)
  1077. },
  1078. carPicker(e) {
  1079. this.gridList.carModel = this.carModeList[e[0]].constValue
  1080. },
  1081. handleShowKeyboard() {
  1082. if (this.flag == 0) {
  1083. if (this.$refs.keyboard.open) {
  1084. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  1085. } else {
  1086. this.$refs.keyboard[0].open(true)
  1087. }
  1088. }
  1089. },
  1090. handleShowKeyboard1() {
  1091. if (this.flag == 0) {
  1092. if (this.$refs.keyboard1.open) {
  1093. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  1094. } else {
  1095. this.$refs.keyboard1[0].open(true)
  1096. }
  1097. }
  1098. },
  1099. handleClick(e) {
  1100. this.gridList.carNumber = e.value //键盘输入值
  1101. },
  1102. handleClick1(e) {
  1103. this.gridList.jiaorenli = e.value //键盘输入值
  1104. },
  1105. change(e) {
  1106. if (e) {
  1107. this.gridList.supplementaryRecording = 1
  1108. } else {
  1109. this.gridList.supplementaryRecording = 0
  1110. }
  1111. },
  1112. confirmInfo() {
  1113. this.isShowAlert = true
  1114. },
  1115. alertBtn() {
  1116. this.gridList.agent=this.userInfo.userName;
  1117. var that = this
  1118. that.gridList.reWaterContent = that.gridList.waterContent
  1119. if (that.gridList.buckleMiscellaneous) {
  1120. that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
  1121. }
  1122. that.gridList.flag = 1
  1123. if(this.flag==3){
  1124. this.gridList.statusFlag=7
  1125. }else if(this.flag==4||this.flag==0){
  1126. this.gridList.statusFlag=0
  1127. }
  1128. else if(this.flag==1){
  1129. this.gridList.statusFlag=1
  1130. }else if(this.flag==2){
  1131. this.gridList.statusFlag=2
  1132. }
  1133. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
  1134. res => {
  1135. if (res.data.code == "200") {
  1136. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
  1137. id: that.gridList.id,
  1138. flag: 2
  1139. }).then(res => {
  1140. if (res.data.code == "200") {
  1141. that.$api.msg('提交成功!')
  1142. setTimeout(function() {
  1143. uni.navigateBack({delta:Int16Array})
  1144. }, 1000)
  1145. } else {
  1146. that.$api.msg('提交失败')
  1147. }
  1148. })
  1149. } else {
  1150. that.$api.msg('提交失败')
  1151. }
  1152. })
  1153. },
  1154. waterContentChange() {
  1155. var that = this
  1156. if (this.gridList.goodsName) {
  1157. for (var i = 0; i < this.purchasePriceList.length; i++) {
  1158. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  1159. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  1160. this.gridList.paramType = this.purchasePriceList[i].paramType
  1161. }
  1162. }
  1163. }
  1164. console.log(this.gridList.serviceManagementType)
  1165. // debugger
  1166. if(this.gridList.serviceManagementType != 3){ //非收购入库 不需在获取价格
  1167. return
  1168. }
  1169. if (this.gridList.goodsName && this.cangid) {
  1170. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1171. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1172. warehouseId: this.cangid,
  1173. goodsName: this.gridList.goodsName
  1174. }).then(res => {
  1175. that.gridList.dryGrainPrice = res.data.data
  1176. that.dryGrainPrice = res.data.data
  1177. })
  1178. }
  1179. }
  1180. that.gridList.waterPriceIncrease=0
  1181. that.gridList.waterPriceDeduction=0
  1182. that.gridList.qualityPriceIncrease=0
  1183. that.gridList.qualityPriceDeduction=0
  1184. //潮粮单价改变事件
  1185. if (
  1186. this.gridList.goodsName &&
  1187. this.gridList.waterContent &&
  1188. this.gridList.grade
  1189. ) {
  1190. console.log('123123')
  1191. uni.showLoading({
  1192. title:"加载中"
  1193. })
  1194. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1195. warehouseId: this.cangid,
  1196. goodsName: this.gridList.goodsName,
  1197. waterContent: this.gridList.waterContent,
  1198. grade: this.gridList.grade,
  1199. }).then(res => {
  1200. if (that.gridList.paramType == '1') {
  1201. // console.log(that.gridList)
  1202. if(that.gridList.buckleMiscellaneous){
  1203. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1204. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1205. .dryGrainPrice)).toFixed(4)
  1206. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1207. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1208. .dryGrainPrice)).toFixed(4)
  1209. }
  1210. if (!that.gridList.tidalGrainPrice) {
  1211. that.gridList.tidalGrainPrice = ''
  1212. }
  1213. if(that.gridList.type == '干粮'){
  1214. that.gridList.dryGrainPrice = res.data.data
  1215. that.dryGrainPrice = that.gridList.dryGrainPrice
  1216. }
  1217. } else {
  1218. that.gridList.tidalGrainPrice = res.data.data
  1219. if(that.gridList.type == '干粮'){
  1220. that.gridList.dryGrainPrice = res.data.data
  1221. that.dryGrainPrice = that.gridList.dryGrainPrice
  1222. }else{
  1223. that.gridList.tidalGrainPrice = res.data.data
  1224. that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1225. }
  1226. }
  1227. // that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1228. uni.hideLoading()
  1229. })
  1230. }
  1231. },
  1232. goodsPicker(e) {
  1233. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  1234. },
  1235. submit() {
  1236. this.$delete(this.gridList,'status')
  1237. this.gridList.agent=this.userInfo.userName;
  1238. this.gridList.waterContent = Number(this.gridList.waterContent)
  1239. // if(!this.$u.test.isEmpty(this.gridList.tidalGrainPrice)){
  1240. // this.gridList.tidalGrainPrice=''
  1241. // return
  1242. // }
  1243. if(this.flag==3){
  1244. this.gridList.statusFlag=7
  1245. }else if(this.flag==4||this.flag==0){
  1246. this.gridList.statusFlag=0
  1247. }
  1248. else if(this.flag==1){
  1249. this.gridList.statusFlag=1
  1250. }else if(this.flag==2){
  1251. this.gridList.statusFlag=2
  1252. }
  1253. if(this.gridList.serviceManagementType==3){
  1254. if(this.outType){
  1255. this.gridList.outType=this.outType
  1256. }
  1257. }else{
  1258. this.gridList.customerName = ''
  1259. }
  1260. var text=''
  1261. if(this.utils.getCurrectRoles('acquisitionQuality.qview')&&!this.utils.getCurrectRoles('acquisitionQuality.initial')){
  1262. text="确定提交钎样信息?"
  1263. if(this.flag==3||this.flag==4||this.flag==0){
  1264. this.gridList.brazer=1
  1265. }
  1266. }else{
  1267. text="确定提交质检信息?"
  1268. if(this.flag==3||this.flag==4||this.flag==0){
  1269. this.gridList.brazer=0
  1270. }
  1271. }
  1272. if(this.flag==4){
  1273. this.gridList.flag = 0
  1274. }else{
  1275. this.gridList.flag = this.flag
  1276. }
  1277. // if(this.flag==2){
  1278. // this.gridList.reInspector=this.userInfo.userName
  1279. // }
  1280. if (!this.gridList.qualityNo) {
  1281. this.$api.msg('编号不能为空')
  1282. return
  1283. }
  1284. var that = this
  1285. if(this.flag==4||this.flag==0){
  1286. if (!this.gridList.binNumber) {
  1287. this.$api.msg('仓位不能为空')
  1288. return
  1289. }
  1290. }
  1291. if(this.gridList.serviceManagementType==3){
  1292. if (!this.gridList.customerName) {
  1293. this.$api.msg('客户不能为空')
  1294. return
  1295. }
  1296. }
  1297. // if (!this.gridList.storageTagNo) {
  1298. // this.$api.msg('囤位号不能为空')
  1299. // return
  1300. // }
  1301. // if (this.gridList.storageTagNo.length > 10) {
  1302. // this.$api.msg('囤位号不能为空')
  1303. // return
  1304. // }
  1305. if (!this.gridList.carNumber) {
  1306. this.$api.msg('车牌号不能为空')
  1307. return
  1308. }
  1309. if (this.gridList.carNumber.length > 7) {
  1310. this.$api.msg('车牌号输入错误')
  1311. return
  1312. }
  1313. if (!this.gridList.goodsName) {
  1314. this.$api.msg('货名不能为空')
  1315. return
  1316. }
  1317. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  1318. this.gridList.buckleWeightRatio > 2) {
  1319. this.$api.msg('扣重比输入错误')
  1320. return
  1321. }
  1322. if (
  1323. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  1324. String(this.gridList.buckleWeightRatio).length -
  1325. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  1326. this.$api.msg('扣重比输入错误')
  1327. return
  1328. }
  1329. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  1330. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  1331. this.$api.msg('初检扣杂输入错误')
  1332. return
  1333. }
  1334. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  1335. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  1336. this.$api.msg('复检扣杂输入错误')
  1337. return
  1338. }
  1339. if (!this.gridList.type) {
  1340. this.$api.msg('类型不能为空')
  1341. return
  1342. }
  1343. if (this.value == false&&this.flag!=3 || this.flag == 2) {
  1344. if (!this.gridList.grade) {
  1345. this.$api.msg('等级不能为空')
  1346. return
  1347. }
  1348. if (!this.gridList.impurity) {
  1349. this.$api.msg('杂质不能为空')
  1350. return
  1351. }
  1352. debugger
  1353. console.log(this.gridList.waterContent)
  1354. console.log(Number(this.gridList.waterContent))
  1355. if (!this.gridList.waterContent) {
  1356. this.$api.msg('初检水分不能为空')
  1357. return
  1358. }
  1359. // if (!this.gridList.reWaterContent) {
  1360. // this.$api.msg('复检水分不能为空')
  1361. // return
  1362. // }
  1363. if (!this.gridList.mildewGrain) {
  1364. this.$api.msg('霉变粒不能为空')
  1365. return
  1366. }
  1367. if(this.gridList.goodsName!="大豆"){
  1368. if (!this.gridList.bulkDensity) {
  1369. this.$api.msg('容重不能为空')
  1370. return
  1371. }
  1372. }
  1373. if (!this.gridList.jiaorenli) {
  1374. this.$api.msg('热损伤不能为空')
  1375. return
  1376. }
  1377. if (!this.gridList.imperfectGrain) {
  1378. this.$api.msg('不完整粒不能为空')
  1379. return
  1380. }
  1381. }
  1382. this.gridList.storageNumber = this.gridList.storageTagNo
  1383. var kid=JSON.parse(JSON.stringify(this.gridList.warehouseInOutId))
  1384. this.zjid=JSON.parse(JSON.stringify(this.gridList.id))
  1385. that.gridList.warehouseInOutDetail={
  1386. id:that.gridList.warehouseInOutDetailId,
  1387. grade:that.gridList.grade,
  1388. reGrade:that.gridList.grade,
  1389. waterContent:that.gridList.waterContent,
  1390. reWaterContent:that.gridList.reWaterContent,
  1391. imperfectGrain:that.gridList.imperfectGrain,
  1392. reImperfectGrain:that.gridList.reImperfectGrain,
  1393. impurity:that.gridList.impurity,
  1394. reImpurity:that.gridList.reImpurity,
  1395. jiaorenli:that.gridList.jiaorenli,
  1396. reJiaorenli:that.gridList.reJiaorenli,
  1397. bulkDensity:that.gridList.bulkDensity,
  1398. reBulkDensity:that.gridList.reBulkDensity,
  1399. mildewGrain:that.gridList.mildewGrain,
  1400. reMildewGrain:that.gridList.reMildewGrain,
  1401. }
  1402. console.log(this.gridList)
  1403. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  1404. warehouseId: this.cangid
  1405. }).then(res => {
  1406. if(res.data.code != 200 && that.gridList.serviceManagementType==3){
  1407. uni.showModal({
  1408. content:res.data.message,
  1409. showCancel:false
  1410. })
  1411. return;
  1412. }
  1413. else{
  1414. uni.showModal({
  1415. content: text,
  1416. showCancel: true,
  1417. confirmText: '提交',
  1418. success: function(res) {
  1419. if (res.confirm) {
  1420. that.$api.doRequest('post',
  1421. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  1422. .then(res => {
  1423. uni.setStorageSync("quality_print", that.gridList)
  1424. // that.gridList.id=kid
  1425. // that.gridList.statusFlag=1
  1426. // that.$api.doRequest('post',
  1427. // '/warehouseInOutInfo/InOutWarehouse',
  1428. // that.gridList)
  1429. // .then(res => {
  1430. if (res.data.code == 200) {
  1431. that.$api.msg('编辑质检成功')
  1432. that.gridList.warehouseId = that.cangid
  1433. uni.setStorageSync('checkcustomer',{})
  1434. console.log('that.gridList', that.gridList)
  1435. if(that.utils.getCurrectRoles('acquisitionQuality.initial')){
  1436. that.isShowPrint = true
  1437. }else{
  1438. uni.navigateBack({delta:1})
  1439. }
  1440. // uni.getStorageSync("depotAcquisition_warehouseName")
  1441. // uni.navigateBack({})
  1442. }
  1443. // })
  1444. })
  1445. }
  1446. }
  1447. })
  1448. }
  1449. })
  1450. },
  1451. gradepicker(e) {
  1452. console.log(e)
  1453. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1454. this.gridList.grade = this.gradeList[e[0]].value
  1455. this.gridList.gradeKey = this.gradeList[e[0]].key
  1456. this.waterContentChange()
  1457. },
  1458. gradepicker1(e) {
  1459. console.log(e)
  1460. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1461. this.gridList.reGrade = this.gradeList[e[0]].value
  1462. this.gridList.reGradeKey = this.gradeList[e[0]].key
  1463. },
  1464. binNumberpicker(e) {
  1465. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  1466. },
  1467. del(item) {
  1468. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  1469. id: item.id
  1470. }).then(res => {
  1471. if (res.data.code == 200) {
  1472. this.$api.msg('删除成功')
  1473. } else {
  1474. this.$api.msg('系统异常,请联系管理员')
  1475. }
  1476. })
  1477. },
  1478. contactUs() {
  1479. const that = this
  1480. uni.makePhoneCall({
  1481. // 手机号
  1482. phoneNumber: '18241771147',
  1483. // 成功回调
  1484. success: (res) => {},
  1485. // 失败回调
  1486. fail: (res) => {}
  1487. });
  1488. },
  1489. loadData() {
  1490. // const that = this
  1491. // if(uni.getStorageSync("PageCur")){
  1492. // that.PageCur = uni.getStorageSync("PageCur");
  1493. // }
  1494. // that.userInfoTmp = uni.getStorageSync("userInfo")
  1495. // uni.showLoading({
  1496. // title: '正在加载',
  1497. // mask:true
  1498. // })
  1499. // that.$api.request('integral', 'getIndexData', failres => {
  1500. // that.$api.msg(failres.errmsg)
  1501. // uni.hideLoading()
  1502. // }).then(res => {
  1503. // let data = res.data
  1504. // uni.setStorageSync("message", data.message);
  1505. // uni.setStorageSync("task", data.task);
  1506. // uni.setStorageSync("contract", data.contract);
  1507. // uni.setStorageSync('showTran', data.showTran);
  1508. // that.showTran = data.showTran
  1509. // that.gridList[4].tips = data.task
  1510. // that.gridList[2].tips = data.contract
  1511. // that.companyId = data.companyId
  1512. // uni.hideLoading()
  1513. // })
  1514. },
  1515. confirm() {
  1516. const that = this
  1517. if (!that.inputContent) {
  1518. that.$api.msg('输入不能为空')
  1519. return
  1520. }
  1521. let obj = {}
  1522. obj[that.feild] = that.inputContent
  1523. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1524. that.userInfo.nickname = that.inputContent
  1525. that.inputContent = ''
  1526. that.$store.commit('login', that.userInfo)
  1527. })
  1528. },
  1529. cancel() {
  1530. this.inputShow = false
  1531. this.inputStatus = 'none'
  1532. this.genderShow = false
  1533. },
  1534. myAccount() {
  1535. uni.navigateTo({
  1536. url: `/pageA/pages/contract`
  1537. })
  1538. },
  1539. /**
  1540. * 统一跳转接口,拦截未登录路由
  1541. * navigator标签现在默认没有转场动画,所以用view
  1542. */
  1543. navTo(url) {
  1544. if (!this.hasLogin) {
  1545. url = '/pages/public/login';
  1546. }
  1547. uni.navigateTo({
  1548. url
  1549. })
  1550. },
  1551. mycarClick(carNo) {
  1552. this.modalName = null
  1553. uni.navigateTo({
  1554. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1555. })
  1556. },
  1557. scanCode() {
  1558. uni.scanCode({
  1559. success: function(res) {
  1560. uni.navigateTo({
  1561. url: res.result
  1562. })
  1563. }
  1564. })
  1565. },
  1566. hideModal(e) {
  1567. this.modalName = null
  1568. },
  1569. }
  1570. }
  1571. </script>
  1572. <style lang='scss' scoped>
  1573. .title_b {
  1574. margin: 20rpx 20rpx 0rpx 20rpx;
  1575. padding: 20rpx 10rpx 20rpx 10rpx;
  1576. font-size: 18px;
  1577. font-weight: 550;
  1578. }
  1579. page {
  1580. background: #F5F6FA;
  1581. }
  1582. .wrap {
  1583. padding-bottom: 10px;
  1584. font-size: 14px;
  1585. background: #fff;
  1586. margin: 10px;
  1587. border-radius: 10px;
  1588. input {
  1589. font-size: 14px;
  1590. }
  1591. >.title {
  1592. padding: 10px 16px;
  1593. }
  1594. .b-b:after {
  1595. border-bottom: 1px solid #eee;
  1596. }
  1597. }
  1598. .footer {
  1599. background: #fff;
  1600. position: fixed;
  1601. bottom: 0;
  1602. width: 100%;
  1603. padding: 20px 10px;
  1604. z-index: 10;
  1605. .button {
  1606. background: #22C572;
  1607. width: 90%;
  1608. margin: 20rpx auto;
  1609. padding: 10px;
  1610. color: #fff;
  1611. text-align: center;
  1612. border-radius: 30px;
  1613. }
  1614. }
  1615. .c-row {
  1616. display: -webkit-box;
  1617. display: -webkit-flex;
  1618. display: flex;
  1619. -webkit-box-align: center;
  1620. -webkit-align-items: center;
  1621. align-items: center;
  1622. padding: 20rpx 30rpx;
  1623. position: relative;
  1624. }
  1625. .con-list {
  1626. -webkit-box-flex: 1;
  1627. -webkit-flex: 1;
  1628. flex: 1;
  1629. display: -webkit-box;
  1630. display: -webkit-flex;
  1631. display: flex;
  1632. -webkit-box-orient: vertical;
  1633. -webkit-box-direction: normal;
  1634. -webkit-flex-direction: column;
  1635. flex-direction: column;
  1636. color: #303133;
  1637. line-height: 40rpx;
  1638. text-align: right;
  1639. padding-right: 20rpx;
  1640. }
  1641. input:disabled {
  1642. color: #ccc;
  1643. }
  1644. .textarea-style {
  1645. border: 1px solid #EEEEEE;
  1646. width: 100%;
  1647. padding: 20rpx;
  1648. border-radius: 20rpx;
  1649. }
  1650. .c-row-fj {
  1651. padding: 20rpx
  1652. }
  1653. .buns_item {
  1654. display: flex;
  1655. padding: 80rpx 0 50rpx 0;
  1656. justify-content: space-around;
  1657. }
  1658. .but_css {
  1659. background: #22C572;
  1660. width: 40%;
  1661. padding: 20rpx;
  1662. color: #fff;
  1663. text-align: center;
  1664. border-radius: 20rpx;
  1665. }
  1666. </style>