edit_quality_testing.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299
  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. this.purchasePriceList = uni.getStorageSync('purchasePriceList')
  531. console.log(this.flag)
  532. var that = this
  533. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  534. id: this.id
  535. }).then(res => {
  536. if (res.data.data) {
  537. let data = res.data.data
  538. if (data.supplementaryRecording == 1) {
  539. that.value = true
  540. } else {
  541. that.value = false
  542. }
  543. that.gridList = data
  544. if(!that.gridList.reGrade){
  545. that.gridList.reGrade=that.gridList.grade
  546. }
  547. if(!that.gridList.reWaterContent){
  548. that.gridList.reWaterContent=that.gridList.waterContent
  549. }
  550. if(!that.gridList.reBulkDensity){
  551. that.gridList.reBulkDensity=that.gridList.bulkDensity
  552. }
  553. if(!that.gridList.reImperfectGrain){
  554. that.gridList.reImperfectGrain=that.gridList.imperfectGrain
  555. }
  556. if(!that.gridList.reImpurity){
  557. that.gridList.reImpurity=that.gridList.impurity
  558. }
  559. if(!that.gridList.reMildewGrain){
  560. that.gridList.reMildewGrain=that.gridList.mildewGrain
  561. }
  562. if(!that.gridList.reJiaorenli){
  563. that.gridList.reJiaorenli=that.gridList.jiaorenli
  564. }
  565. if(this.gridList.outType&&this.gridList.serviceManagementType==3){
  566. this.outType=this.gridList.outType
  567. }
  568. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  569. id: this.cangid
  570. }).then(res => {
  571. that.warehouseList = res.data.data.warehousePositionInfoList
  572. })
  573. }
  574. })
  575. this.$api.doRequest('get', 'commonSysParameter/getInfo', {
  576. constId: 'QUA1'
  577. }).then(res => {
  578. if (res.data.data) {
  579. that.carModeList = res.data.data
  580. }
  581. })
  582. //质检货名下拉
  583. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  584. warehouseId: this.cangid
  585. }).then(res => {
  586. if (res.data.data) {
  587. that.goodsList = res.data.data
  588. if (that.goodsList.length > 0) {
  589. that.gridList.goodsName = that.goodsList[0].goodsName
  590. uni.setStorageSync('purchasePriceList', that.goodsList)
  591. that.purchasePriceList = uni.getStorageSync('purchasePriceList')
  592. }
  593. }
  594. })
  595. this.gridList.grade = this.gradeList[0].value
  596. this.gridList.gradeKey = this.gradeList[0].key
  597. },
  598. onShow() {
  599. this.multiSelector1=[{name:'他运',value:'他运'}]
  600. this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  601. warehouseName:this.warehouseName
  602. }).then(res => {
  603. // console.log(res)
  604. if(res.data.data.contractManagementInfoList){
  605. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  606. res.data.data.contractMangementInfoList[i].name='自运 ('+
  607. res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
  608. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  609. }
  610. }else{
  611. this.multiSelector1=[{name:'他运',value:'他运'}]
  612. }
  613. // this.taskNolist=res.data.data
  614. })
  615. // uni.showLoading({title: '加载中'})
  616. // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  617. // flag: 2,
  618. // warehouseName:this.warehouseName
  619. // }).then(res => {
  620. // console.log(res)
  621. // uni.hideLoading();
  622. // this.taskNolist=res.data.data
  623. // })
  624. let _kh = uni.getStorageSync('isClick')
  625. if (uni.getStorageSync('checkcustomer') && _kh) {
  626. let _customerInfo = uni.getStorageSync('checkcustomer')
  627. if (_customerInfo.shipperName) {
  628. this.gridList.identityId = _customerInfo.id
  629. //点击登记客户
  630. this.gridList.customerName = _customerInfo.shipperName
  631. this.gridList.customerPhone = _customerInfo.shipperPhone
  632. this.gridList.carNumber = _customerInfo.carNo
  633. } else {
  634. //点击搜索客户
  635. this.gridList.customerName = _customerInfo.customerName
  636. this.gridList.customerPhone = _customerInfo.customerPhone
  637. }
  638. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  639. }
  640. },
  641. methods: {
  642. obtainPrice(){//根据容重获取价格
  643. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  644. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  645. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  646. warehouseId: this.cangid,
  647. goodsName: this.gridList.goodsName,
  648. bulkDensity:this.gridList.bulkDensity
  649. }).then(res => {
  650. if(res.data.data != 0){
  651. this.gridList.dryGrainPrice = res.data.data
  652. }
  653. })
  654. // }
  655. }
  656. },
  657. changeprice(){
  658. if(this.pricetext=='解锁'){
  659. this.pricedisabled=false
  660. this.pricetext='锁定'
  661. }else{
  662. this.pricedisabled=true
  663. this.pricetext='解锁'
  664. }
  665. },
  666. inputprice(){
  667. if(this.pricetext=='锁定'){
  668. this.pricedisabled=true
  669. this.pricetext='解锁'
  670. }
  671. },
  672. inOutDatepicker(e){
  673. this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
  674. console.log(e)
  675. },
  676. fleetpicker(e){
  677. this.gridList.fleet=this.fleetNameList[e[0]].fleetName
  678. },
  679. changefreight(){
  680. this.freightstatus=!this.freightstatus
  681. if(this.freightstatus){
  682. this.freighttext='自动获取'
  683. }else{
  684. this.freighttext='手动填写'
  685. }
  686. },
  687. changecost(){
  688. this.coststatus=!this.coststatus
  689. if(this.coststatus){
  690. this.costtext='自动获取'
  691. }else{
  692. this.costtext='手动填写'
  693. }
  694. },
  695. gocustomer() {
  696. uni.navigateTo({
  697. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  698. .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
  699. })
  700. },
  701. print() {
  702. uni.navigateTo({
  703. url: '/pages/erpbusiness/bleConnect'
  704. })
  705. },
  706. close() {
  707. this.isShowPrint = false
  708. uni.navigateBack({})
  709. },
  710. // focusConfig(type){
  711. // console.log('childclick',type)
  712. // // 0是上一项
  713. // if(type==0){
  714. // }else{}
  715. // },
  716. hidden() {
  717. this.$refs.keyboard.open(false)
  718. },
  719. carPicker(e) {
  720. this.gridList.carModel = this.carModeList[e[0]].constValue
  721. },
  722. handleShowKeyboard() {
  723. if (this.flag == 0) {
  724. if (this.$refs.keyboard.open) {
  725. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  726. } else {
  727. this.$refs.keyboard[0].open(true)
  728. }
  729. }
  730. },
  731. handleShowKeyboard1() {
  732. if (this.flag == 0) {
  733. if (this.$refs.keyboard1.open) {
  734. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  735. } else {
  736. this.$refs.keyboard1[0].open(true)
  737. }
  738. }
  739. },
  740. handleClick(e) {
  741. this.gridList.carNumber = e.value //键盘输入值
  742. },
  743. handleClick1(e) {
  744. this.gridList.jiaorenli = e.value //键盘输入值
  745. },
  746. change(e) {
  747. if (e) {
  748. this.gridList.supplementaryRecording = 1
  749. } else {
  750. this.gridList.supplementaryRecording = 0
  751. }
  752. },
  753. confirmInfo() {
  754. this.isShowAlert = true
  755. },
  756. alertBtn() {
  757. this.gridList.agent=this.userInfo.userName;
  758. var that = this
  759. that.gridList.reWaterContent = that.gridList.waterContent
  760. if (that.gridList.buckleMiscellaneous) {
  761. that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
  762. }
  763. that.gridList.flag = 1
  764. if(this.flag==3){
  765. this.gridList.statusFlag=7
  766. }else if(this.flag==4||this.flag==0){
  767. this.gridList.statusFlag=0
  768. }
  769. else if(this.flag==1){
  770. this.gridList.statusFlag=1
  771. }else if(this.flag==2){
  772. this.gridList.statusFlag=2
  773. }
  774. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
  775. res => {
  776. if (res.data.code == "200") {
  777. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
  778. id: that.gridList.id,
  779. flag: 2
  780. }).then(res => {
  781. if (res.data.code == "200") {
  782. that.$api.msg('提交成功!')
  783. setTimeout(function() {
  784. uni.navigateBack({delta:Int16Array})
  785. }, 1000)
  786. } else {
  787. that.$api.msg('提交失败')
  788. }
  789. })
  790. } else {
  791. that.$api.msg('提交失败')
  792. }
  793. })
  794. },
  795. waterContentChange() {
  796. var that = this
  797. if (this.gridList.goodsName) {
  798. for (var i = 0; i < this.purchasePriceList.length; i++) {
  799. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  800. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  801. this.gridList.paramType = this.purchasePriceList[i].paramType
  802. }
  803. }
  804. }
  805. if(this.gridList.serviceManagementType == 3){ //收购入库 不需在获取价格
  806. return
  807. }
  808. if (this.gridList.goodsName && this.cangid) {
  809. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  810. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  811. warehouseId: this.cangid,
  812. goodsName: this.gridList.goodsName
  813. }).then(res => {
  814. that.gridList.dryGrainPrice = res.data.data
  815. })
  816. }
  817. }
  818. var numReg = /^[0-9]*$/
  819. var numRe = new RegExp(numReg)
  820. //潮粮单价改变事件
  821. if (
  822. this.gridList.goodsName &&
  823. this.gridList.waterContent &&
  824. this.gridList.grade &&
  825. numRe.test(this.gridList.waterContent)
  826. ) {
  827. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  828. warehouseId: this.cangid,
  829. goodsName: this.gridList.goodsName,
  830. waterContent: this.gridList.waterContent,
  831. grade: this.gridList.grade,
  832. }).then(res => {
  833. if (that.gridList.paramType == '1') {
  834. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  835. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  836. .dryGrainPrice)).toFixed(4)
  837. if (!that.gridList.tidalGrainPrice) {
  838. that.gridList.tidalGrainPrice = ''
  839. }
  840. } else {
  841. that.gridList.tidalGrainPrice = res.data.data
  842. }
  843. })
  844. }
  845. },
  846. goodsPicker(e) {
  847. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  848. },
  849. submit() {
  850. this.$delete(this.gridList,'status')
  851. this.gridList.agent=this.userInfo.userName;
  852. if(this.flag==3){
  853. this.gridList.statusFlag=7
  854. }else if(this.flag==4||this.flag==0){
  855. this.gridList.statusFlag=0
  856. }
  857. else if(this.flag==1){
  858. this.gridList.statusFlag=1
  859. }else if(this.flag==2){
  860. this.gridList.statusFlag=2
  861. }
  862. if(this.gridList.serviceManagementType==3){
  863. if(this.outType){
  864. this.gridList.outType=this.outType
  865. }
  866. }else{
  867. this.gridList.customerName = ''
  868. }
  869. var text=''
  870. if(this.utils.getCurrectRoles('acquisitionQuality.qview')&&!this.utils.getCurrectRoles('acquisitionQuality.initial')){
  871. text="确定提交钎样信息?"
  872. if(this.flag==3||this.flag==4||this.flag==0){
  873. this.gridList.brazer=1
  874. }
  875. }else{
  876. text="确定提交质检信息?"
  877. if(this.flag==3||this.flag==4||this.flag==0){
  878. this.gridList.brazer=0
  879. }
  880. }
  881. if(this.flag==4){
  882. this.gridList.flag = 0
  883. }else{
  884. this.gridList.flag = this.flag
  885. }
  886. // if(this.flag==2){
  887. // this.gridList.reInspector=this.userInfo.userName
  888. // }
  889. if (!this.gridList.qualityNo) {
  890. this.$api.msg('编号不能为空')
  891. return
  892. }
  893. var that = this
  894. if(this.flag==4||this.flag==0){
  895. if (!this.gridList.binNumber) {
  896. this.$api.msg('仓位不能为空')
  897. return
  898. }
  899. }
  900. if(this.gridList.serviceManagementType==3){
  901. if (!this.gridList.customerName) {
  902. this.$api.msg('客户不能为空')
  903. return
  904. }
  905. }
  906. // if (!this.gridList.storageTagNo) {
  907. // this.$api.msg('囤位号不能为空')
  908. // return
  909. // }
  910. // if (this.gridList.storageTagNo.length > 10) {
  911. // this.$api.msg('囤位号不能为空')
  912. // return
  913. // }
  914. if (!this.gridList.carNumber) {
  915. this.$api.msg('车牌号不能为空')
  916. return
  917. }
  918. if (this.gridList.carNumber.length > 7) {
  919. this.$api.msg('车牌号输入错误')
  920. return
  921. }
  922. if (!this.gridList.goodsName) {
  923. this.$api.msg('货名不能为空')
  924. return
  925. }
  926. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  927. this.gridList.buckleWeightRatio > 2) {
  928. this.$api.msg('扣重比输入错误')
  929. return
  930. }
  931. if (
  932. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  933. String(this.gridList.buckleWeightRatio).length -
  934. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  935. this.$api.msg('扣重比输入错误')
  936. return
  937. }
  938. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  939. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  940. this.$api.msg('初检扣杂输入错误')
  941. return
  942. }
  943. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  944. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  945. this.$api.msg('复检扣杂输入错误')
  946. return
  947. }
  948. if (!this.gridList.type) {
  949. this.$api.msg('类型不能为空')
  950. return
  951. }
  952. if (this.value == false&&this.flag!=3 || this.flag == 2) {
  953. if (!this.gridList.grade) {
  954. this.$api.msg('等级不能为空')
  955. return
  956. }
  957. if (!this.gridList.impurity) {
  958. this.$api.msg('杂质不能为空')
  959. return
  960. }
  961. if (!this.gridList.waterContent) {
  962. this.$api.msg('初检水分不能为空')
  963. return
  964. }
  965. // if (!this.gridList.reWaterContent) {
  966. // this.$api.msg('复检水分不能为空')
  967. // return
  968. // }
  969. if (!this.gridList.mildewGrain) {
  970. this.$api.msg('霉变粒不能为空')
  971. return
  972. }
  973. if(this.gridList.goodsName!="大豆"){
  974. if (!this.gridList.bulkDensity) {
  975. this.$api.msg('容重不能为空')
  976. return
  977. }
  978. }else{
  979. if (!this.gridList.bulkDensity) {
  980. this.$api.msg('蛋白不能为空')
  981. return
  982. }
  983. }
  984. if (!this.gridList.jiaorenli) {
  985. this.$api.msg('热损伤不能为空')
  986. return
  987. }
  988. if (!this.gridList.imperfectGrain) {
  989. this.$api.msg('不完整粒不能为空')
  990. return
  991. }
  992. }
  993. this.gridList.storageNumber = this.gridList.storageTagNo
  994. var kid=JSON.parse(JSON.stringify(this.gridList.warehouseInOutId))
  995. this.zjid=JSON.parse(JSON.stringify(this.gridList.id))
  996. that.gridList.warehouseInOutDetail={
  997. id:that.gridList.warehouseInOutId,
  998. grade:that.gridList.grade,
  999. reGrade:that.gridList.grade,
  1000. waterContent:that.gridList.waterContent,
  1001. reWaterContent:that.gridList.reWaterContent,
  1002. imperfectGrain:that.gridList.imperfectGrain,
  1003. reImperfectGrain:that.gridList.reImperfectGrain,
  1004. impurity:that.gridList.impurity,
  1005. reImpurity:that.gridList.reImpurity,
  1006. jiaorenli:that.gridList.jiaorenli,
  1007. reJiaorenli:that.gridList.reJiaorenli,
  1008. bulkDensity:that.gridList.bulkDensity,
  1009. reBulkDensity:that.gridList.reBulkDensity,
  1010. mildewGrain:that.gridList.mildewGrain,
  1011. reMildewGrain:that.gridList.reMildewGrain,
  1012. }
  1013. console.log(this.gridList)
  1014. uni.showModal({
  1015. content: text,
  1016. showCancel: true,
  1017. confirmText: '提交',
  1018. success: function(res) {
  1019. if (res.confirm) {
  1020. that.$api.doRequest('post',
  1021. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  1022. .then(res => {
  1023. that.gridList.id=kid
  1024. that.gridList.statusFlag=1
  1025. that.$api.doRequest('post',
  1026. '/warehouseInOutInfo/InOutWarehouse',
  1027. that.gridList)
  1028. .then(res => {
  1029. if (res.data.code == 200) {
  1030. that.$api.msg('编辑质检成功')
  1031. that.gridList.warehouseId = that.cangid
  1032. uni.setStorageSync("quality_print", that.gridList)
  1033. console.log('that.gridList', that.gridList)
  1034. if(that.utils.getCurrectRoles('acquisitionQuality.initial')){
  1035. that.isShowPrint = true
  1036. }else{
  1037. uni.navigateBack({delta:1})
  1038. }
  1039. // uni.getStorageSync("depotAcquisition_warehouseName")
  1040. // uni.navigateBack({})
  1041. }
  1042. })
  1043. })
  1044. }
  1045. }
  1046. })
  1047. },
  1048. gradepicker(e) {
  1049. console.log(e)
  1050. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1051. this.gridList.grade = this.gradeList[e[0]].value
  1052. this.gridList.gradeKey = this.gradeList[e[0]].key
  1053. this.waterContentChange()
  1054. },
  1055. gradepicker1(e) {
  1056. console.log(e)
  1057. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1058. this.gridList.reGrade = this.gradeList[e[0]].value
  1059. this.gridList.reGradeKey = this.gradeList[e[0]].key
  1060. },
  1061. binNumberpicker(e) {
  1062. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  1063. },
  1064. del(item) {
  1065. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  1066. id: item.id
  1067. }).then(res => {
  1068. if (res.data.code == 200) {
  1069. this.$api.msg('删除成功')
  1070. } else {
  1071. this.$api.msg('系统异常,请联系管理员')
  1072. }
  1073. })
  1074. },
  1075. contactUs() {
  1076. const that = this
  1077. uni.makePhoneCall({
  1078. // 手机号
  1079. phoneNumber: '18241771147',
  1080. // 成功回调
  1081. success: (res) => {},
  1082. // 失败回调
  1083. fail: (res) => {}
  1084. });
  1085. },
  1086. loadData() {
  1087. // const that = this
  1088. // if(uni.getStorageSync("PageCur")){
  1089. // that.PageCur = uni.getStorageSync("PageCur");
  1090. // }
  1091. // that.userInfoTmp = uni.getStorageSync("userInfo")
  1092. // uni.showLoading({
  1093. // title: '正在加载',
  1094. // mask:true
  1095. // })
  1096. // that.$api.request('integral', 'getIndexData', failres => {
  1097. // that.$api.msg(failres.errmsg)
  1098. // uni.hideLoading()
  1099. // }).then(res => {
  1100. // let data = res.data
  1101. // uni.setStorageSync("message", data.message);
  1102. // uni.setStorageSync("task", data.task);
  1103. // uni.setStorageSync("contract", data.contract);
  1104. // uni.setStorageSync('showTran', data.showTran);
  1105. // that.showTran = data.showTran
  1106. // that.gridList[4].tips = data.task
  1107. // that.gridList[2].tips = data.contract
  1108. // that.companyId = data.companyId
  1109. // uni.hideLoading()
  1110. // })
  1111. },
  1112. confirm() {
  1113. const that = this
  1114. if (!that.inputContent) {
  1115. that.$api.msg('输入不能为空')
  1116. return
  1117. }
  1118. let obj = {}
  1119. obj[that.feild] = that.inputContent
  1120. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1121. that.userInfo.nickname = that.inputContent
  1122. that.inputContent = ''
  1123. that.$store.commit('login', that.userInfo)
  1124. })
  1125. },
  1126. cancel() {
  1127. this.inputShow = false
  1128. this.inputStatus = 'none'
  1129. this.genderShow = false
  1130. },
  1131. myAccount() {
  1132. uni.navigateTo({
  1133. url: `/pageA/pages/contract`
  1134. })
  1135. },
  1136. /**
  1137. * 统一跳转接口,拦截未登录路由
  1138. * navigator标签现在默认没有转场动画,所以用view
  1139. */
  1140. navTo(url) {
  1141. if (!this.hasLogin) {
  1142. url = '/pages/public/login';
  1143. }
  1144. uni.navigateTo({
  1145. url
  1146. })
  1147. },
  1148. mycarClick(carNo) {
  1149. this.modalName = null
  1150. uni.navigateTo({
  1151. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1152. })
  1153. },
  1154. scanCode() {
  1155. uni.scanCode({
  1156. success: function(res) {
  1157. uni.navigateTo({
  1158. url: res.result
  1159. })
  1160. }
  1161. })
  1162. },
  1163. hideModal(e) {
  1164. this.modalName = null
  1165. },
  1166. }
  1167. }
  1168. </script>
  1169. <style lang='scss' scoped>
  1170. .title_b {
  1171. margin: 20rpx 20rpx 0rpx 20rpx;
  1172. padding: 20rpx 10rpx 20rpx 10rpx;
  1173. font-size: 18px;
  1174. font-weight: 550;
  1175. }
  1176. page {
  1177. background: #F5F6FA;
  1178. }
  1179. .wrap {
  1180. padding-bottom: 10px;
  1181. font-size: 14px;
  1182. background: #fff;
  1183. margin: 10px;
  1184. border-radius: 10px;
  1185. input {
  1186. font-size: 14px;
  1187. }
  1188. >.title {
  1189. padding: 10px 16px;
  1190. }
  1191. .b-b:after {
  1192. border-bottom: 1px solid #eee;
  1193. }
  1194. }
  1195. .footer {
  1196. background: #fff;
  1197. position: fixed;
  1198. bottom: 0;
  1199. width: 100%;
  1200. padding: 20px 10px;
  1201. z-index: 10;
  1202. .button {
  1203. background: #22C572;
  1204. width: 90%;
  1205. margin: 20rpx auto;
  1206. padding: 10px;
  1207. color: #fff;
  1208. text-align: center;
  1209. border-radius: 30px;
  1210. }
  1211. }
  1212. .c-row {
  1213. display: -webkit-box;
  1214. display: -webkit-flex;
  1215. display: flex;
  1216. -webkit-box-align: center;
  1217. -webkit-align-items: center;
  1218. align-items: center;
  1219. padding: 20rpx 30rpx;
  1220. position: relative;
  1221. }
  1222. .con-list {
  1223. -webkit-box-flex: 1;
  1224. -webkit-flex: 1;
  1225. flex: 1;
  1226. display: -webkit-box;
  1227. display: -webkit-flex;
  1228. display: flex;
  1229. -webkit-box-orient: vertical;
  1230. -webkit-box-direction: normal;
  1231. -webkit-flex-direction: column;
  1232. flex-direction: column;
  1233. color: #303133;
  1234. line-height: 40rpx;
  1235. text-align: right;
  1236. padding-right: 20rpx;
  1237. }
  1238. input:disabled {
  1239. color: #ccc;
  1240. }
  1241. .textarea-style {
  1242. border: 1px solid #EEEEEE;
  1243. width: 100%;
  1244. padding: 20rpx;
  1245. border-radius: 20rpx;
  1246. }
  1247. .c-row-fj {
  1248. padding: 20rpx
  1249. }
  1250. .buns_item {
  1251. display: flex;
  1252. padding: 80rpx 0 50rpx 0;
  1253. justify-content: space-around;
  1254. }
  1255. .but_css {
  1256. background: #22C572;
  1257. width: 40%;
  1258. padding: 20rpx;
  1259. color: #fff;
  1260. text-align: center;
  1261. border-radius: 20rpx;
  1262. }
  1263. </style>