edit_quality_testing.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291
  1. <template>
  2. <view 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="title">车牌号</view>
  97. <view class="con-list">
  98. <input :disabled="flag!=4&&flag!=3" v-model='gridList.carNumber' @click.stop="handleShowKeyboard" placeholder="请输入车牌号"
  99. name="input"></input>
  100. <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
  101. :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
  102. <!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
  103. </view>
  104. </view>
  105. <!-- <view v-if="gridList.paramType != '1'" class="c-row ">
  106. <view class="title">扣重比</view>
  107. <view class="con-list">
  108. <input :disabled='flag==1' v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
  109. name="input"></input>
  110. </view>
  111. </view>
  112. <view v-else class="c-row ">
  113. <view class="title">扣杂</view>
  114. <view class="con-list">
  115. <input :disabled='flag==1' v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂"
  116. @input="waterContentChange" name="input"></input>
  117. <input v-if='flag==0' value='未复检' disabled placeholder="复检扣杂" name="input"></input>
  118. <input v-else :disabled='flag!=1' v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂"
  119. name="input"></input>
  120. </view>
  121. </view> -->
  122. <view v-if='gridList.serviceManagementType==3&&flag!=3' class="c-row ">
  123. <view class="title">购粮性质</view>
  124. <view class="con-list">
  125. <input :disabled='flag==1' v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
  126. name="input"></input>
  127. </view>
  128. </view>
  129. <view v-if='flag!=3' class="c-row ">
  130. <view class="title">仓位号</view>
  131. <view class="con-list">
  132. <view v-if='flag!=1' @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
  133. <view v-else>{{gridList.binNumber}}</view>
  134. </view>
  135. </view>
  136. <view v-if='flag!=3' class="c-row ">
  137. <view class="title">囤位号</view>
  138. <view class="con-list">
  139. <input :disabled="flag!=4&&flag!=0" v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
  140. </view>
  141. </view>
  142. <view v-if='flag!=3' class="c-row ">
  143. <view class="title">货名</view>
  144. <view class="con-list">
  145. <!-- <view v-if="flag != '0'">
  146. {{gridList.goodsName}}
  147. </view> -->
  148. <view v-if='flag==4||flag==0' @click='goodsName = true'>{{gridList.goodsName}}</view>
  149. <view v-else>{{gridList.goodsName}}</view>
  150. <u-picker :range="goodsList" range-key="goodsName" @confirm='goodsPicker($event)'
  151. v-model="goodsName" mode="selector">
  152. </u-picker>
  153. </view>
  154. </view>
  155. <view v-if='flag!=3' class="c-row ">
  156. <view class="title">类型</view>
  157. <view class="con-list">
  158. {{gridList.type}}
  159. </view>
  160. </view>
  161. <view v-if='gridList.serviceManagementType==1' class="c-row ">
  162. <view class="title">运输方式</view>
  163. <view class="con-list">
  164. <view v-if='flag==4||flag==0' @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
  165. <view v-else>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
  166. <u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
  167. mode="selector">
  168. </u-picker>
  169. </view>
  170. </view>
  171. <view v-if='gridList.serviceManagementType==3&&flag!=0' class="c-row ">
  172. <view class="title">运输方式</view>
  173. <view class="con-list">
  174. <view v-if='flag==4||flag==3' @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
  175. <view v-else>{{outType?outType:'请选择运输方式'}}</view>
  176. <u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)' v-model="show8"
  177. mode="selector">
  178. </u-picker>
  179. </view>
  180. </view>
  181. <view v-if='gridList.serviceManagementType==1&&flag!=3||gridList.serviceManagementType==3&&gridList.outType=="自运"&&flag!=3' class="c-row ">
  182. <view class="title">车队</view>
  183. <view class="con-list">
  184. <view v-if='flag==4||flag==0' @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
  185. <view v-else>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
  186. <u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName" v-model="show6"
  187. mode="selector">
  188. </u-picker>
  189. </view>
  190. </view>
  191. <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  192. <view class="title">箱号-1</view>
  193. <view class="con-list">
  194. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  195. </view>
  196. </view>
  197. <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  198. <view class="title">封号-1</view>
  199. <view class="con-list">
  200. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  201. </view>
  202. </view>
  203. <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  204. <view class="title">箱号-2</view>
  205. <view class="con-list">
  206. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  207. </view>
  208. </view>
  209. <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  210. <view class="title">封号-2</view>
  211. <view class="con-list">
  212. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  213. </view>
  214. </view>
  215. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  216. <view class="title">箱号-1</view>
  217. <view class="con-list">
  218. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  219. </view>
  220. </view>
  221. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  222. <view class="title">封号-1</view>
  223. <view class="con-list">
  224. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  225. </view>
  226. </view>
  227. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  228. <view class="title">箱号-2</view>
  229. <view class="con-list">
  230. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  231. </view>
  232. </view>
  233. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  234. <view class="title">封号-2</view>
  235. <view class="con-list">
  236. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  237. </view>
  238. </view>
  239. <view v-if="gridList.type == '潮粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
  240. <view class="title">净重单价(元/公斤)</view>
  241. <view class="con-list">
  242. <input :disabled='flag==1&&pricedisabled' v-model='gridList.tidalGrainPrice' @blur='inputprice' placeholder="自动获取,不可编辑"
  243. name="input"></input>
  244. </view>
  245. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  246. </view>
  247. <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
  248. <view class="title">干粮单价(元/公斤)</view>
  249. <view class="con-list">
  250. <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit" @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
  251. </view>
  252. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  253. </view>
  254. <view class="c-row-fj" v-if="flag==2||flag==1">
  255. <view style="margin: 0px 0px 30rpx 10rpx;">复检备注</view>
  256. <textarea class='textarea-style' v-model='gridList.reMemo' placeholder="请输入复检备注"
  257. maxlength="300"></textarea>
  258. </view>
  259. <view class="c-row" v-if="flag==1&&gridList.warehouseName=='鲅鱼圈金信库'">
  260. <view class="title">车型</view>
  261. <view class="con-list">
  262. <view @click='carstatus = true'>{{gridList.carModel?gridList.carModel:'请选择车型'}}</view>
  263. <u-picker :range="carModeList" range-key="constValue" @confirm='carPicker($event)'
  264. v-model="carstatus" mode="selector">
  265. </u-picker>
  266. </view>
  267. </view>
  268. <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==1&&flag!=3" class="c-row">
  269. <view class="title">干粮单价(元/公斤)</view>
  270. <view class="con-list">
  271. {{gridList.dryGrainPrice}}
  272. </view>
  273. </view>
  274. </view>
  275. <view v-if='flag!=3' style='padding-bottom:300rpx;'>
  276. <view class='wrap'>
  277. <view style='margin-right:10px;' class='flex justify-between align-item-center'>
  278. <view class='title_b'>化验信息</view>
  279. <view v-if='flag==0||flag==4' class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572"
  280. v-model="value" @change="change"></u-switch>
  281. </view>
  282. </view>
  283. <view class="c-row ">
  284. <view class="title">等级</view>
  285. <view class="con-list">
  286. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
  287. mode="selector">
  288. </u-picker>
  289. <view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
  290. <view v-else>{{gridList.grade}}</view>
  291. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker1($event)' v-model="show2"
  292. mode="selector">
  293. </u-picker>
  294. <view v-if='flag==1' @click='show2=true'>{{gridList.reGrade?gridList.reGrade:'请选择等级'}}</view>
  295. <view v-if='flag==2'>{{gridList.reGrade}}</view>
  296. </view>
  297. </view>
  298. <view class="c-row ">
  299. <view class="title">水分(%)</view>
  300. <view class="con-list">
  301. <input :disabled='flag==1' v-model='gridList.waterContent' placeholder="初检水分"
  302. @input="waterContentChange" type="digit" name="input"></input>
  303. <input v-if='flag==1||flag==2' type="digit" v-model='gridList.reWaterContent' placeholder="复检水分"
  304. name="input"></input>
  305. </view>
  306. </view>
  307. <view class="c-row ">
  308. <view v-if='gridList.goodsName!="大豆"' class="title">容重(克/升)</view>
  309. <view v-else class="title">蛋白</view>
  310. <view class="con-list">
  311. <input :disabled='flag==1' type="digit" v-model='gridList.bulkDensity' placeholder="请输入容重"
  312. name="input" @input="obtainPrice"></input>
  313. <input v-if='flag==1||flag==2' type="digit" v-model='gridList.reBulkDensity' placeholder="请输入容重"
  314. name="input" @input="obtainPrice"></input>
  315. </view>
  316. </view>
  317. <view class="c-row ">
  318. <view class="title">不完善粒(%)</view>
  319. <view class="con-list">
  320. <input :disabled='flag==1' type="digit" v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
  321. name="input"></input>
  322. <input v-if='flag==1||flag==2' type="digit" v-model='gridList.reImperfectGrain' placeholder="请输入不完整粒占比"
  323. name="input"></input>
  324. </view>
  325. </view>
  326. <view class="c-row ">
  327. <view class="title">杂质(%)</view>
  328. <view class="con-list">
  329. <input :disabled='flag==1' type="digit" v-model='gridList.impurity' placeholder="请输入杂质占比"
  330. name="input"></input>
  331. <input v-if='flag==1||flag==2' type="digit" v-model='gridList.reImpurity' placeholder="请输入杂质占比"
  332. name="input"></input>
  333. </view>
  334. </view>
  335. <view class="c-row ">
  336. <view class="title">霉变粒(%)</view>
  337. <view class="con-list">
  338. <input :disabled='flag==1' type="digit" v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
  339. name="input"></input>
  340. <input v-if='flag==1||flag==2' type="digit" v-model='gridList.reMildewGrain' placeholder="请输入霉变粒占比"
  341. name="input"></input>
  342. </view>
  343. </view>
  344. <view class="c-row ">
  345. <view class="title">热损伤(%)</view>
  346. <view class="con-list">
  347. <input :disabled='flag==1' type="digit" v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
  348. name="input"></input>
  349. <input v-if='flag==1||flag==2' type="digit" v-model='gridList.reJiaorenli' placeholder="请输入热损伤占比"
  350. name="input"></input>
  351. <!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
  352. </view>
  353. </view>
  354. </view>
  355. </view>
  356. <view class="footer">
  357. <view v-if='flag==1' @click='confirmInfo' class="button">确认初检信息</view>
  358. <view @click='submit' class="button">提交</view>
  359. </view>
  360. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  361. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  362. showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  363. <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
  364. <view class="buns_item">
  365. <view class="but_css" @click="print">打印小票</view>
  366. <view class="but_css" @click="close">返回</view>
  367. </view>
  368. </u-popup>
  369. <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
  370. v-model="show" mode="selector">
  371. </u-picker>
  372. </view>
  373. </template>
  374. <script>
  375. import dragButton from "@/components/drag-button/drag-button.vue";
  376. import keyboard from "@/components/master-keyboard/master-keyboard.vue";
  377. import {
  378. mapState
  379. } from 'vuex';
  380. let startY = 0,
  381. moveY = 0,
  382. pageAtTop = true;
  383. export default {
  384. components: {
  385. dragButton,
  386. keyboard
  387. },
  388. data() {
  389. return {
  390. isShowPrint: false,
  391. inputShow: false,
  392. modalName: '',
  393. mycarStyle: '',
  394. feild: undefined,
  395. id: 0,
  396. show: false,
  397. show2:false,
  398. show4:false,
  399. show5:false,
  400. show7:false,
  401. show8:false,
  402. pricedisabled:false,
  403. multiSelector1:[{name:'他运',value:'他运'}],
  404. outType:'',
  405. selector: [],
  406. show1: false,
  407. pricetext:'锁定',
  408. goodsName: false,
  409. carstatus: false,
  410. params:{year: true,
  411. month: true,
  412. day: true,},
  413. inputContent: '',
  414. multiSelector: [{
  415. name: '汽运',
  416. value: '0',
  417. },
  418. {
  419. name: '火运',
  420. value: '1',
  421. },
  422. {
  423. name: '集装箱船',
  424. value: '2',
  425. },
  426. {
  427. name: '散船',
  428. value: '3',
  429. },
  430. ],
  431. coverTransform: 'translateY(0px)',
  432. coverTransition: '0s',
  433. moving: false,
  434. footprintList: [],
  435. zjid:'',
  436. searchKeyWord: '',
  437. isVip: false,
  438. flag: 0,
  439. freightstatus:false,
  440. coststatus:false,
  441. freighttext:'手动填写',
  442. costtext:'手动填写',
  443. userInfoTmp: [],
  444. inputStatus: 'none',
  445. carInfo: [],
  446. gridCol: 4,
  447. pageSize: 10,
  448. currentPage: 1,
  449. gridBorder: false,
  450. headUrl: "../../static/img/myimg/YongHu@3x.png",
  451. userphone: "",
  452. username: "请更改昵称",
  453. gridList: {
  454. natureOfGrainPurchase: '贸易粮',
  455. type: '潮粮',
  456. tidalGrainPrice: '',
  457. dryGrainPrice: '',
  458. carNumber: '',
  459. carModel: '',
  460. },
  461. managementType: '',
  462. warehouseName: '',
  463. warehouseList: [],
  464. showTran: true,
  465. companyId: 1,
  466. current: 4,
  467. value: false,
  468. carModeList: [],
  469. fleetNameList:[],
  470. gradeList: [{
  471. key: 1,
  472. value: '一等品'
  473. },
  474. {
  475. key: 2,
  476. value: '二等品'
  477. },
  478. {
  479. key: 3,
  480. value: '三等品'
  481. },
  482. {
  483. key: 4,
  484. value: '等外'
  485. },
  486. ],
  487. cangid: '',
  488. goodsList: [],
  489. taskNolist:[],
  490. isShowAlert: false,
  491. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  492. }
  493. },
  494. // #ifndef MP
  495. onNavigationBarButtonTap(e) {
  496. const index = e.index;
  497. if (index === 0) {
  498. this.navTo('/pages/set/set');
  499. } else if (index === 1) {
  500. // #ifdef APP-PLUS
  501. const pages = getCurrentPages();
  502. const page = pages[pages.length - 1];
  503. const currentWebview = page.$getAppWebview();
  504. currentWebview.hideTitleNViewButtonRedDot({
  505. index
  506. });
  507. // #endif
  508. uni.navigateTo({
  509. url: '/pages/notice/notice'
  510. })
  511. }
  512. },
  513. // #endif
  514. computed: {
  515. ...mapState(['hasLogin', 'userInfo']),
  516. // 手机号中间4位加*
  517. starUserphone() {
  518. let reg = /^(\d{3})\d{4}(\d{4})$/;
  519. if (this.userphone) {
  520. return this.userphone.replace(reg, "$1****$2");
  521. }
  522. }
  523. },
  524. onLoad(options) {
  525. this.id = options.id
  526. this.flag = options.flag
  527. this.cangid = options.cangid
  528. this.warehouseName=options.warehouseName
  529. this.managementType = options.managementType
  530. console.log(this.flag)
  531. var that = this
  532. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  533. id: this.id
  534. }).then(res => {
  535. if (res.data.data) {
  536. let data = res.data.data
  537. if (data.supplementaryRecording == 1) {
  538. that.value = true
  539. } else {
  540. that.value = false
  541. }
  542. that.gridList = data
  543. if(!that.gridList.reGrade){
  544. that.gridList.reGrade=that.gridList.grade
  545. }
  546. if(!that.gridList.reWaterContent){
  547. that.gridList.reWaterContent=that.gridList.waterContent
  548. }
  549. if(!that.gridList.reBulkDensity){
  550. that.gridList.reBulkDensity=that.gridList.bulkDensity
  551. }
  552. if(!that.gridList.reImperfectGrain){
  553. that.gridList.reImperfectGrain=that.gridList.imperfectGrain
  554. }
  555. if(!that.gridList.reImpurity){
  556. that.gridList.reImpurity=that.gridList.impurity
  557. }
  558. if(!that.gridList.reMildewGrain){
  559. that.gridList.reMildewGrain=that.gridList.mildewGrain
  560. }
  561. if(!that.gridList.reJiaorenli){
  562. that.gridList.reJiaorenli=that.gridList.jiaorenli
  563. }
  564. if(this.gridList.outType&&this.gridList.serviceManagementType==3){
  565. this.outType=this.gridList.outType
  566. }
  567. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  568. id: this.cangid
  569. }).then(res => {
  570. that.warehouseList = res.data.data.warehousePositionInfoList
  571. })
  572. }
  573. })
  574. this.$api.doRequest('get', 'commonSysParameter/getInfo', {
  575. constId: 'QUA1'
  576. }).then(res => {
  577. if (res.data.data) {
  578. that.carModeList = res.data.data
  579. }
  580. })
  581. //质检货名下拉
  582. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  583. warehouseId: this.cangid
  584. }).then(res => {
  585. if (res.data.data) {
  586. this.goodsList = res.data.data
  587. }
  588. })
  589. this.gridList.grade = this.gradeList[0].value
  590. this.gridList.gradeKey = this.gradeList[0].key
  591. },
  592. onShow() {
  593. this.multiSelector1=[{name:'他运',value:'他运'}]
  594. this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  595. warehouseName:this.warehouseName
  596. }).then(res => {
  597. // console.log(res)
  598. if(res.data.data.contractManagementInfoList){
  599. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  600. res.data.data.contractMangementInfoList[i].name='自运 ('+
  601. res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
  602. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  603. }
  604. }else{
  605. this.multiSelector1=[{name:'他运',value:'他运'}]
  606. }
  607. // this.taskNolist=res.data.data
  608. })
  609. // uni.showLoading({title: '加载中'})
  610. // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  611. // flag: 2,
  612. // warehouseName:this.warehouseName
  613. // }).then(res => {
  614. // console.log(res)
  615. // uni.hideLoading();
  616. // this.taskNolist=res.data.data
  617. // })
  618. let _kh = uni.getStorageSync('isClick')
  619. if (uni.getStorageSync('checkcustomer') && _kh) {
  620. let _customerInfo = uni.getStorageSync('checkcustomer')
  621. if (_customerInfo.shipperName) {
  622. this.gridList.identityId = _customerInfo.id
  623. //点击登记客户
  624. this.gridList.customerName = _customerInfo.shipperName
  625. this.gridList.customerPhone = _customerInfo.shipperPhone
  626. this.gridList.carNumber = _customerInfo.carNo
  627. } else {
  628. //点击搜索客户
  629. this.gridList.customerName = _customerInfo.customerName
  630. this.gridList.customerPhone = _customerInfo.customerPhone
  631. }
  632. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  633. }
  634. },
  635. methods: {
  636. obtainPrice(){//根据容重获取价格
  637. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  638. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  639. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  640. warehouseId: this.cangid,
  641. goodsName: this.gridList.goodsName,
  642. bulkDensity:this.gridList.bulkDensity
  643. }).then(res => {
  644. if(res.data.data != 0){
  645. this.gridList.dryGrainPrice = res.data.data
  646. }
  647. })
  648. // }
  649. }
  650. },
  651. changeprice(){
  652. if(this.pricetext=='解锁'){
  653. this.pricedisabled=false
  654. this.pricetext='锁定'
  655. }else{
  656. this.pricedisabled=true
  657. this.pricetext='解锁'
  658. }
  659. },
  660. inputprice(){
  661. if(this.pricetext=='锁定'){
  662. this.pricedisabled=true
  663. this.pricetext='解锁'
  664. }
  665. },
  666. inOutDatepicker(e){
  667. this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
  668. console.log(e)
  669. },
  670. fleetpicker(e){
  671. this.gridList.fleet=this.fleetNameList[e[0]].fleetName
  672. },
  673. changefreight(){
  674. this.freightstatus=!this.freightstatus
  675. if(this.freightstatus){
  676. this.freighttext='自动获取'
  677. }else{
  678. this.freighttext='手动填写'
  679. }
  680. },
  681. changecost(){
  682. this.coststatus=!this.coststatus
  683. if(this.coststatus){
  684. this.costtext='自动获取'
  685. }else{
  686. this.costtext='手动填写'
  687. }
  688. },
  689. gocustomer() {
  690. uni.navigateTo({
  691. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  692. .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
  693. })
  694. },
  695. print() {
  696. uni.navigateTo({
  697. url: '/pages/erpbusiness/bleConnect'
  698. })
  699. },
  700. close() {
  701. this.isShowPrint = false
  702. uni.navigateBack({})
  703. },
  704. // focusConfig(type){
  705. // console.log('childclick',type)
  706. // // 0是上一项
  707. // if(type==0){
  708. // }else{}
  709. // },
  710. hidden() {
  711. this.$refs.keyboard.open(false)
  712. },
  713. carPicker(e) {
  714. this.gridList.carModel = this.carModeList[e[0]].constValue
  715. },
  716. handleShowKeyboard() {
  717. if (this.flag == 0) {
  718. if (this.$refs.keyboard.open) {
  719. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  720. } else {
  721. this.$refs.keyboard[0].open(true)
  722. }
  723. }
  724. },
  725. handleShowKeyboard1() {
  726. if (this.flag == 0) {
  727. if (this.$refs.keyboard1.open) {
  728. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  729. } else {
  730. this.$refs.keyboard1[0].open(true)
  731. }
  732. }
  733. },
  734. handleClick(e) {
  735. this.gridList.carNumber = e.value //键盘输入值
  736. },
  737. handleClick1(e) {
  738. this.gridList.jiaorenli = e.value //键盘输入值
  739. },
  740. change(e) {
  741. if (e) {
  742. this.gridList.supplementaryRecording = 1
  743. } else {
  744. this.gridList.supplementaryRecording = 0
  745. }
  746. },
  747. confirmInfo() {
  748. this.isShowAlert = true
  749. },
  750. alertBtn() {
  751. this.gridList.agent=this.userInfo.userName;
  752. var that = this
  753. that.gridList.reWaterContent = that.gridList.waterContent
  754. if (that.gridList.buckleMiscellaneous) {
  755. that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
  756. }
  757. that.gridList.flag = 1
  758. if(this.flag==3){
  759. this.gridList.statusFlag=7
  760. }else if(this.flag==4||this.flag==0){
  761. this.gridList.statusFlag=0
  762. }
  763. else if(this.flag==1){
  764. this.gridList.statusFlag=1
  765. }else if(this.flag==2){
  766. this.gridList.statusFlag=2
  767. }
  768. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
  769. res => {
  770. if (res.data.code == "200") {
  771. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
  772. id: that.gridList.id,
  773. flag: 2
  774. }).then(res => {
  775. if (res.data.code == "200") {
  776. that.$api.msg('提交成功!')
  777. setTimeout(function() {
  778. uni.navigateBack({delta:Int16Array})
  779. }, 1000)
  780. } else {
  781. that.$api.msg('提交失败')
  782. }
  783. })
  784. } else {
  785. that.$api.msg('提交失败')
  786. }
  787. })
  788. },
  789. waterContentChange() {
  790. var that = this
  791. if (this.gridList.goodsName) {
  792. for (var i = 0; i < this.purchasePriceList.length; i++) {
  793. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  794. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  795. this.gridList.paramType = this.purchasePriceList[i].paramType
  796. }
  797. }
  798. }
  799. if(this.gridList.serviceManagementType == 3){ //收购入库 不需在获取价格
  800. return
  801. }
  802. if (this.gridList.goodsName && this.cangid) {
  803. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  804. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  805. warehouseId: this.cangid,
  806. goodsName: this.gridList.goodsName
  807. }).then(res => {
  808. that.gridList.dryGrainPrice = res.data.data
  809. })
  810. }
  811. }
  812. var numReg = /^[0-9]*$/
  813. var numRe = new RegExp(numReg)
  814. //潮粮单价改变事件
  815. if (
  816. this.gridList.goodsName &&
  817. this.gridList.waterContent &&
  818. this.gridList.grade &&
  819. numRe.test(this.gridList.waterContent)
  820. ) {
  821. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  822. warehouseId: this.cangid,
  823. goodsName: this.gridList.goodsName,
  824. waterContent: this.gridList.waterContent,
  825. grade: this.gridList.grade,
  826. }).then(res => {
  827. if (that.gridList.paramType == '1') {
  828. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  829. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  830. .dryGrainPrice)).toFixed(4)
  831. if (!that.gridList.tidalGrainPrice) {
  832. that.gridList.tidalGrainPrice = ''
  833. }
  834. } else {
  835. that.gridList.tidalGrainPrice = res.data.data
  836. }
  837. })
  838. }
  839. },
  840. goodsPicker(e) {
  841. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  842. },
  843. submit() {
  844. this.$delete(this.gridList,'status')
  845. this.gridList.agent=this.userInfo.userName;
  846. if(this.flag==3){
  847. this.gridList.statusFlag=7
  848. }else if(this.flag==4||this.flag==0){
  849. this.gridList.statusFlag=0
  850. }
  851. else if(this.flag==1){
  852. this.gridList.statusFlag=1
  853. }else if(this.flag==2){
  854. this.gridList.statusFlag=2
  855. }
  856. if(this.gridList.serviceManagementType==3){
  857. if(this.outType){
  858. this.gridList.outType=this.outType
  859. }
  860. }else{
  861. this.gridList.customerName = ''
  862. }
  863. var text=''
  864. if(this.utils.getCurrectRoles('acquisitionQuality.qview')&&!this.utils.getCurrectRoles('acquisitionQuality.initial')){
  865. text="确定提交钎样信息?"
  866. if(this.flag==3||this.flag==4||this.flag==0){
  867. this.gridList.brazer=1
  868. }
  869. }else{
  870. text="确定提交质检信息?"
  871. if(this.flag==3||this.flag==4||this.flag==0){
  872. this.gridList.brazer=0
  873. }
  874. }
  875. if(this.flag==4){
  876. this.gridList.flag = 0
  877. }else{
  878. this.gridList.flag = this.flag
  879. }
  880. // if(this.flag==2){
  881. // this.gridList.reInspector=this.userInfo.userName
  882. // }
  883. if (!this.gridList.qualityNo) {
  884. this.$api.msg('编号不能为空')
  885. return
  886. }
  887. var that = this
  888. if(this.flag==4||this.flag==0){
  889. if (!this.gridList.binNumber) {
  890. this.$api.msg('仓位不能为空')
  891. return
  892. }
  893. }
  894. if(this.gridList.serviceManagementType==3){
  895. if (!this.gridList.customerName) {
  896. this.$api.msg('客户不能为空')
  897. return
  898. }
  899. }
  900. // if (!this.gridList.storageTagNo) {
  901. // this.$api.msg('囤位号不能为空')
  902. // return
  903. // }
  904. // if (this.gridList.storageTagNo.length > 10) {
  905. // this.$api.msg('囤位号不能为空')
  906. // return
  907. // }
  908. if (!this.gridList.carNumber) {
  909. this.$api.msg('车牌号不能为空')
  910. return
  911. }
  912. if (this.gridList.carNumber.length > 7) {
  913. this.$api.msg('车牌号输入错误')
  914. return
  915. }
  916. if (!this.gridList.goodsName) {
  917. this.$api.msg('货名不能为空')
  918. return
  919. }
  920. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  921. this.gridList.buckleWeightRatio > 2) {
  922. this.$api.msg('扣重比输入错误')
  923. return
  924. }
  925. if (
  926. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  927. String(this.gridList.buckleWeightRatio).length -
  928. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  929. this.$api.msg('扣重比输入错误')
  930. return
  931. }
  932. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  933. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  934. this.$api.msg('初检扣杂输入错误')
  935. return
  936. }
  937. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  938. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  939. this.$api.msg('复检扣杂输入错误')
  940. return
  941. }
  942. if (!this.gridList.type) {
  943. this.$api.msg('类型不能为空')
  944. return
  945. }
  946. if (this.value == false&&this.flag!=3 || this.flag == 2) {
  947. if (!this.gridList.grade) {
  948. this.$api.msg('等级不能为空')
  949. return
  950. }
  951. if (!this.gridList.impurity) {
  952. this.$api.msg('杂质不能为空')
  953. return
  954. }
  955. if (!this.gridList.waterContent) {
  956. this.$api.msg('初检水分不能为空')
  957. return
  958. }
  959. // if (!this.gridList.reWaterContent) {
  960. // this.$api.msg('复检水分不能为空')
  961. // return
  962. // }
  963. if (!this.gridList.mildewGrain) {
  964. this.$api.msg('霉变粒不能为空')
  965. return
  966. }
  967. if(this.gridList.goodsName!="大豆"){
  968. if (!this.gridList.bulkDensity) {
  969. this.$api.msg('容重不能为空')
  970. return
  971. }
  972. }else{
  973. if (!this.gridList.bulkDensity) {
  974. this.$api.msg('蛋白不能为空')
  975. return
  976. }
  977. }
  978. if (!this.gridList.jiaorenli) {
  979. this.$api.msg('热损伤不能为空')
  980. return
  981. }
  982. if (!this.gridList.imperfectGrain) {
  983. this.$api.msg('不完整粒不能为空')
  984. return
  985. }
  986. }
  987. this.gridList.storageNumber = this.gridList.storageTagNo
  988. var kid=JSON.parse(JSON.stringify(this.gridList.warehouseInOutId))
  989. this.zjid=JSON.parse(JSON.stringify(this.gridList.id))
  990. that.gridList.warehouseInOutDetail={
  991. id:that.gridList.warehouseInOutId,
  992. grade:that.gridList.grade,
  993. reGrade:that.gridList.grade,
  994. waterContent:that.gridList.waterContent,
  995. reWaterContent:that.gridList.reWaterContent,
  996. imperfectGrain:that.gridList.imperfectGrain,
  997. reImperfectGrain:that.gridList.reImperfectGrain,
  998. impurity:that.gridList.impurity,
  999. reImpurity:that.gridList.reImpurity,
  1000. jiaorenli:that.gridList.jiaorenli,
  1001. reJiaorenli:that.gridList.reJiaorenli,
  1002. bulkDensity:that.gridList.bulkDensity,
  1003. reBulkDensity:that.gridList.reBulkDensity,
  1004. mildewGrain:that.gridList.mildewGrain,
  1005. reMildewGrain:that.gridList.reMildewGrain,
  1006. }
  1007. console.log(this.gridList)
  1008. uni.showModal({
  1009. content: text,
  1010. showCancel: true,
  1011. confirmText: '提交',
  1012. success: function(res) {
  1013. if (res.confirm) {
  1014. that.$api.doRequest('post',
  1015. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  1016. .then(res => {
  1017. that.gridList.id=kid
  1018. that.gridList.statusFlag=1
  1019. that.$api.doRequest('post',
  1020. '/warehouseInOutInfo/InOutWarehouse',
  1021. that.gridList)
  1022. .then(res => {
  1023. if (res.data.code == 200) {
  1024. that.$api.msg('编辑质检成功')
  1025. that.gridList.warehouseId = that.cangid
  1026. uni.setStorageSync("quality_print", that.gridList)
  1027. console.log('that.gridList', that.gridList)
  1028. if(that.utils.getCurrectRoles('acquisitionQuality.initial')){
  1029. that.isShowPrint = true
  1030. }else{
  1031. uni.navigateBack({delta:1})
  1032. }
  1033. // uni.getStorageSync("depotAcquisition_warehouseName")
  1034. // uni.navigateBack({})
  1035. }
  1036. })
  1037. })
  1038. }
  1039. }
  1040. })
  1041. },
  1042. gradepicker(e) {
  1043. console.log(e)
  1044. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1045. this.gridList.grade = this.gradeList[e[0]].value
  1046. this.gridList.gradeKey = this.gradeList[e[0]].key
  1047. this.waterContentChange()
  1048. },
  1049. gradepicker1(e) {
  1050. console.log(e)
  1051. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1052. this.gridList.reGrade = this.gradeList[e[0]].value
  1053. this.gridList.reGradeKey = this.gradeList[e[0]].key
  1054. },
  1055. binNumberpicker(e) {
  1056. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  1057. },
  1058. del(item) {
  1059. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  1060. id: item.id
  1061. }).then(res => {
  1062. if (res.data.code == 200) {
  1063. this.$api.msg('删除成功')
  1064. } else {
  1065. this.$api.msg('系统异常,请联系管理员')
  1066. }
  1067. })
  1068. },
  1069. contactUs() {
  1070. const that = this
  1071. uni.makePhoneCall({
  1072. // 手机号
  1073. phoneNumber: '18241771147',
  1074. // 成功回调
  1075. success: (res) => {},
  1076. // 失败回调
  1077. fail: (res) => {}
  1078. });
  1079. },
  1080. loadData() {
  1081. // const that = this
  1082. // if(uni.getStorageSync("PageCur")){
  1083. // that.PageCur = uni.getStorageSync("PageCur");
  1084. // }
  1085. // that.userInfoTmp = uni.getStorageSync("userInfo")
  1086. // uni.showLoading({
  1087. // title: '正在加载',
  1088. // mask:true
  1089. // })
  1090. // that.$api.request('integral', 'getIndexData', failres => {
  1091. // that.$api.msg(failres.errmsg)
  1092. // uni.hideLoading()
  1093. // }).then(res => {
  1094. // let data = res.data
  1095. // uni.setStorageSync("message", data.message);
  1096. // uni.setStorageSync("task", data.task);
  1097. // uni.setStorageSync("contract", data.contract);
  1098. // uni.setStorageSync('showTran', data.showTran);
  1099. // that.showTran = data.showTran
  1100. // that.gridList[4].tips = data.task
  1101. // that.gridList[2].tips = data.contract
  1102. // that.companyId = data.companyId
  1103. // uni.hideLoading()
  1104. // })
  1105. },
  1106. confirm() {
  1107. const that = this
  1108. if (!that.inputContent) {
  1109. that.$api.msg('输入不能为空')
  1110. return
  1111. }
  1112. let obj = {}
  1113. obj[that.feild] = that.inputContent
  1114. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1115. that.userInfo.nickname = that.inputContent
  1116. that.inputContent = ''
  1117. that.$store.commit('login', that.userInfo)
  1118. })
  1119. },
  1120. cancel() {
  1121. this.inputShow = false
  1122. this.inputStatus = 'none'
  1123. this.genderShow = false
  1124. },
  1125. myAccount() {
  1126. uni.navigateTo({
  1127. url: `/pageA/pages/contract`
  1128. })
  1129. },
  1130. /**
  1131. * 统一跳转接口,拦截未登录路由
  1132. * navigator标签现在默认没有转场动画,所以用view
  1133. */
  1134. navTo(url) {
  1135. if (!this.hasLogin) {
  1136. url = '/pages/public/login';
  1137. }
  1138. uni.navigateTo({
  1139. url
  1140. })
  1141. },
  1142. mycarClick(carNo) {
  1143. this.modalName = null
  1144. uni.navigateTo({
  1145. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1146. })
  1147. },
  1148. scanCode() {
  1149. uni.scanCode({
  1150. success: function(res) {
  1151. uni.navigateTo({
  1152. url: res.result
  1153. })
  1154. }
  1155. })
  1156. },
  1157. hideModal(e) {
  1158. this.modalName = null
  1159. },
  1160. }
  1161. }
  1162. </script>
  1163. <style lang='scss' scoped>
  1164. .title_b {
  1165. margin: 20rpx 20rpx 0rpx 20rpx;
  1166. padding: 20rpx 10rpx 20rpx 10rpx;
  1167. font-size: 18px;
  1168. font-weight: 550;
  1169. }
  1170. page {
  1171. background: #F5F6FA;
  1172. }
  1173. .wrap {
  1174. padding-bottom: 10px;
  1175. font-size: 14px;
  1176. background: #fff;
  1177. margin: 10px;
  1178. border-radius: 10px;
  1179. input {
  1180. font-size: 14px;
  1181. }
  1182. >.title {
  1183. padding: 10px 16px;
  1184. }
  1185. .b-b:after {
  1186. border-bottom: 1px solid #eee;
  1187. }
  1188. }
  1189. .footer {
  1190. background: #fff;
  1191. position: fixed;
  1192. bottom: 0;
  1193. width: 100%;
  1194. padding: 20px 10px;
  1195. z-index: 10;
  1196. .button {
  1197. background: #22C572;
  1198. width: 90%;
  1199. margin: 20rpx auto;
  1200. padding: 10px;
  1201. color: #fff;
  1202. text-align: center;
  1203. border-radius: 30px;
  1204. }
  1205. }
  1206. .c-row {
  1207. display: -webkit-box;
  1208. display: -webkit-flex;
  1209. display: flex;
  1210. -webkit-box-align: center;
  1211. -webkit-align-items: center;
  1212. align-items: center;
  1213. padding: 20rpx 30rpx;
  1214. position: relative;
  1215. }
  1216. .con-list {
  1217. -webkit-box-flex: 1;
  1218. -webkit-flex: 1;
  1219. flex: 1;
  1220. display: -webkit-box;
  1221. display: -webkit-flex;
  1222. display: flex;
  1223. -webkit-box-orient: vertical;
  1224. -webkit-box-direction: normal;
  1225. -webkit-flex-direction: column;
  1226. flex-direction: column;
  1227. color: #303133;
  1228. line-height: 40rpx;
  1229. text-align: right;
  1230. padding-right: 20rpx;
  1231. }
  1232. input:disabled {
  1233. color: #ccc;
  1234. }
  1235. .textarea-style {
  1236. border: 1px solid #EEEEEE;
  1237. width: 100%;
  1238. padding: 20rpx;
  1239. border-radius: 20rpx;
  1240. }
  1241. .c-row-fj {
  1242. padding: 20rpx
  1243. }
  1244. .buns_item {
  1245. display: flex;
  1246. padding: 80rpx 0 50rpx 0;
  1247. justify-content: space-around;
  1248. }
  1249. .but_css {
  1250. background: #22C572;
  1251. width: 40%;
  1252. padding: 20rpx;
  1253. color: #fff;
  1254. text-align: center;
  1255. border-radius: 20rpx;
  1256. }
  1257. </style>