add_quality_testing.vue 76 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306
  1. <template>
  2. <view :style='{"margin-bottom":InputEvent!=""?"100px":0}'>
  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. <u-radio-group @change="groupChange" v-model="typevalue">
  9. <u-radio v-show="utils.getCurrectRoles('acquisitionQuality.initial')" key="1" label="贸易入库"
  10. name="1">贸易入库</u-radio>
  11. <u-radio v-show="utils.getCurrectRoles('acquisitionQuality.qview')" key="3" label="收购入库"
  12. name="3">
  13. 收购入库</u-radio>
  14. </u-radio-group>
  15. </view>
  16. </view>
  17. <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  18. <view class="title">仓库</view>
  19. <view class="con-list">
  20. {{gridList.warehouseName}}
  21. </view>
  22. </view>
  23. <view class="c-row ">
  24. <view class="title">任务编号</view>
  25. <view class="con-list">
  26. <view @click='show4=true'>{{gridList.inOutTaskNo1?gridList.inOutTaskNo1:'请选择任务编号'}}</view>
  27. <u-picker :range="taskNolist" range-key="inOutTaskNo1" @confirm='tasknopicker($event)'
  28. v-model="show4" mode="selector">
  29. </u-picker>
  30. </view>
  31. </view>
  32. <view v-show='typevalue==1&&gridList.inOutType!="移库入库"||typevalue==3' class="c-row ">
  33. <view class="title">合同编号</view>
  34. <view class="con-list">
  35. {{gridList.contractNo?gridList.contractNo:'自动获取,不可编辑'}}
  36. </view>
  37. </view>
  38. <view v-show='typevalue==1&&gridList.inOutType=="移库入库"' class="c-row ">
  39. <view class="title">移库编号</view>
  40. <view class="con-list">
  41. {{gridList.contractNo?gridList.contractNo:'自动获取,不可编辑'}}
  42. </view>
  43. </view>
  44. <!-- <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  45. <view class="title">业务编号</view>
  46. <view class="con-list">
  47. {{gridList.qualityNo}}
  48. </view>
  49. </view> -->
  50. <view v-show='typevalue==1' style=' align-items: flex-start;' class="c-row ">
  51. <view class="title">提示</view>
  52. <view class="con-list">
  53. {{gridList.tips?gridList.tips:'自动获取,不可编辑'}}
  54. </view>
  55. </view>
  56. <!-- <view v-show='typevalue==1' class="c-row ">
  57. <view class="title">成本</view>
  58. <view class="con-list">
  59. <view v-show='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view>
  60. <view v-show='coststatus'>
  61. <input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
  62. </view>
  63. </view>
  64. <button class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
  65. </view>
  66. <view v-show='typevalue==1' class="c-row ">
  67. <view class="title">运费</view>
  68. <view class="con-list flex">
  69. <view v-show='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
  70. <view v-show='freightstatus'>
  71. <input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
  72. </view>
  73. </view>
  74. <button class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
  75. </view> -->
  76. <!-- <view v-show='typevalue==1' class="c-row ">
  77. <view class="title">扣款</view>
  78. <view class="con-list">
  79. <input v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
  80. </view>
  81. </view> -->
  82. <view v-show='typevalue==1' class="c-row ">
  83. <view class="title">入库类型</view>
  84. <view class="con-list">
  85. {{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
  86. </view>
  87. </view>
  88. <view v-show='typevalue==1' class="c-row ">
  89. <view class="title">入库日期</view>
  90. <view class="con-list">
  91. <view @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
  92. <u-picker @confirm='inOutDatepicker($event)' :params="params" v-model="show5" mode="time">
  93. </u-picker>
  94. </view>
  95. </view>
  96. <view
  97. v-show='typevalue==1||typevalue==3&&gridList.outType=="自运"&&utils.getCurrectRoles("acquisitionQuality.initial")'
  98. class="c-row ">
  99. <view class="title">车队</view>
  100. <view class="con-list">
  101. <view @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
  102. <u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName"
  103. v-model="show6" mode="selector">
  104. </u-picker>
  105. </view>
  106. </view>
  107. <!-- <view v-show="gridList.paramType != '1'&&utils.getCurrectRoles('acquisitionQuality.initial')" class="c-row ">
  108. <view class="title">扣重比</view>
  109. <view class="con-list">
  110. <input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input" type="digit"></input>
  111. </view>
  112. </view> -->
  113. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")||typevalue==1' class="c-row ">
  114. <view class="title">货名</view>
  115. <view class="con-list">
  116. <view>{{gridList.goodsName}}</view>
  117. <!-- <view v-show='goodsdisabled'>{{gridList.goodsName}}</view> -->
  118. <!-- <view v-show='!goodsdisabled' @click='show2=true'>{{gridList.goodsName}}</view> -->
  119. <u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2"
  120. mode="selector">
  121. </u-picker>
  122. </view>
  123. </view>
  124. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  125. <view class="title">购粮性质</view>
  126. <view class="con-list">
  127. <input v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质" name="input"></input>
  128. </view>
  129. </view>
  130. <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  131. <view class="title">类型</view>
  132. <view class="con-list">{{gridList.type?gridList.type:'干粮'}}</view>
  133. </view>
  134. <view v-show='typevalue==1' class="c-row ">
  135. <view class="title">运输方式</view>
  136. <view class="con-list">
  137. <view @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
  138. <u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
  139. mode="selector">
  140. </u-picker>
  141. </view>
  142. </view>
  143. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
  144. <view class="title">运输方式</view>
  145. <view class="con-list">
  146. <view @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
  147. <u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)'
  148. v-model="show8" mode="selector">
  149. </u-picker>
  150. </view>
  151. </view>
  152. <view v-show='typevalue==1' class="c-row ">
  153. <view class="title">车牌号</view>
  154. <view class="con-list"
  155. v-show='(gridList.inOutType!="移库入库"||gridList.outType!="汽运")&&gridList.tranTaskFlag!="1"'>
  156. <input v-model='gridList.carNumber' @click.stop="handleShowKeyboard" :disabled="true"
  157. placeholder="请输入车牌号" name="input"></input>
  158. <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
  159. :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
  160. </view>
  161. <view class="con-list"
  162. v-show='gridList.inOutType=="移库入库"&&gridList.outType=="汽运"||gridList.tranTaskFlag=="1"'>
  163. <view @click='show9=true'>{{gridList.carNumber?gridList.carNumber:'请选择车牌号'}}</view>
  164. <u-picker :range="tranCarInfoList" range-key="carNo1" @confirm='carNopicker($event,1)'
  165. v-model="show9" mode="selector">
  166. </u-picker>
  167. </view>
  168. </view>
  169. <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  170. <view class="title">仓位号</view>
  171. <view class="con-list">
  172. <view @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
  173. <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
  174. v-model="show" mode="selector">
  175. </u-picker>
  176. </view>
  177. </view>
  178. <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  179. <view class="title">囤位号(选填)</view>
  180. <view class="con-list">
  181. <input type="digit" v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
  182. </view>
  183. </view>
  184. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
  185. <view class="title">客户</view>
  186. <view class="con-list">
  187. <view @click='gocustomer' v-show='gridList.customerName'>
  188. {{gridList.customerName}}({{gridList.customerPhone}})
  189. </view>
  190. <view @click='gocustomer' v-show='!gridList.customerName'>
  191. 选择客户
  192. </view>
  193. </view>
  194. </view>
  195. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
  196. <view class="title">交易量</view>
  197. <view class="con-list">
  198. <view :style="redstatus?'color:red;':''">
  199. {{gridList.volumeofbusiness?gridList.volumeofbusiness:'0'}}
  200. </view>
  201. </view>
  202. </view>
  203. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
  204. <view class="title">车牌号</view>
  205. <view class="con-list" v-show='gridList.inOutType!="移库入库" ||gridList.outType!="汽运"'>
  206. <input v-model='gridList.carNumber' @click.stop="handleShowKeyboard1" :disabled="true"
  207. placeholder="请输入车牌号" name="input"></input>
  208. <master-keyboard ref="keyboard1" keyboardtype="car" :randomNumber="true" :newCar="false"
  209. :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
  210. </view>
  211. <view class="con-list" v-show='gridList.inOutType=="移库入库"&&gridList.outType=="汽运"'>
  212. <view @click='show9=true'>{{gridList.carNumber?gridList.carNumber:'请选择车牌号'}}</view>
  213. <u-picker :range="tranCarInfoList" range-key="carNo1" @confirm='carNopicker($event,1)'
  214. v-model="show9" mode="selector">
  215. </u-picker>
  216. </view>
  217. </view>
  218. <!-- <view v-show="gridList.paramType != '1'&&utils.getCurrectRoles('acquisitionQuality.initial')" class="c-row ">
  219. <view class="title">扣重比</view>
  220. <view class="con-list">
  221. <input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input" type="digit"></input>
  222. </view>
  223. </view> -->
  224. <!-- <view v-else class="c-row ">
  225. <view class="title">扣杂</view>
  226. <view class="con-list">
  227. <input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
  228. name="input" type="digit"></input>
  229. <input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
  230. name="input" type="digit"></input>
  231. </view>
  232. </view> -->
  233. <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
  234. <view class="title">箱号-1</view>
  235. <view class="con-list">
  236. <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  237. </view>
  238. </view>
  239. <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
  240. <view class="title">封号-1</view>
  241. <view class="con-list">
  242. <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  243. </view>
  244. </view>
  245. <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
  246. <view class="title">箱号-2</view>
  247. <view class="con-list">
  248. <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  249. </view>
  250. </view>
  251. <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
  252. <view class="title">封号-2</view>
  253. <view class="con-list">
  254. <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  255. </view>
  256. </view>
  257. <view v-show="typevalue==1 " class="c-row ">
  258. <view class="title">箱号-1</view>
  259. <view class="con-list">
  260. <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  261. </view>
  262. </view>
  263. <view v-show="typevalue==1 " class="c-row ">
  264. <view class="title">封号-1</view>
  265. <view class="con-list">
  266. <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  267. </view>
  268. </view>
  269. <view v-show="typevalue==1 " class="c-row ">
  270. <view class="title">箱号-2</view>
  271. <view class="con-list">
  272. <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  273. </view>
  274. </view>
  275. <view v-show="typevalue==1 " class="c-row ">
  276. <view class="title">封号-2</view>
  277. <view class="con-list">
  278. <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  279. </view>
  280. </view>
  281. </view>
  282. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')" style='padding-bottom:300rpx;'>
  283. <view class='wrap'>
  284. <view style='margin-right:10px;' class='flex justify-between align-item-center'>
  285. <view class='title_b'>化验信息</view>
  286. <view class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572"
  287. v-model="value" @change="change"></u-switch>
  288. </view>
  289. </view>
  290. <view class="c-row ">
  291. <view class="title">等级</view>
  292. <view class="con-list">
  293. <view @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
  294. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
  295. mode="selector">
  296. </u-picker>
  297. </view>
  298. </view>
  299. <view class="c-row ">
  300. <view class="title">水分(%)</view>
  301. <view class="con-list">
  302. <MyNumberInput :myvalue="gridList.waterContent" :Isedit="Isedit" :IsShow="MykeywordShow"
  303. :myevent="'waterContent'" @setValue="mykeywordset" v-if="InputEvent=='waterContent'"
  304. @Cancelword="Cancelword" @goNext="goNext('waterContent')"></MyNumberInput>
  305. <input v-else v-model='gridList.waterContent' @click="SetInputKey('waterContent')"
  306. placeholder="初检水分" @input="waterContentChange" name="input" type="digit"></input>
  307. <!-- <input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
  308. name="input" type="digit"></input> -->
  309. </view>
  310. </view>
  311. <view class="c-row" v-if="gridList.goodsName!='大豆'">
  312. <view class="title">容重(克/升)</view>
  313. <view class="con-list">
  314. <MyNumberInput :myvalue="gridList.bulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
  315. :myevent="'bulkDensity'" @setValue="mykeywordset" v-if="InputEvent=='bulkDensity'"
  316. @Cancelword="Cancelword" @goNext="goNext('bulkDensity')"></MyNumberInput>
  317. <input v-else v-model='gridList.bulkDensity' placeholder="请输入容重"
  318. @click="SetInputKey('bulkDensity')" name="input" type="digit" @input="obtainPrice"></input>
  319. <!-- <input v-model='gridList.bulkDensity' placeholder="请输入容重" name="input" type="digit" @input="obtainPrice"></input> -->
  320. </view>
  321. </view>
  322. <view class="c-row" v-else>
  323. <view class="title">蛋白</view>
  324. <view class="con-list">
  325. <MyNumberInput :myvalue="gridList.protein" :Isedit="Isedit" :IsShow="MykeywordShow"
  326. :myevent="'protein'" @setValue="mykeywordset" v-if="InputEvent=='protein'"
  327. @Cancelword="Cancelword" @goNext="goNext('protein')"></MyNumberInput>
  328. <input v-else v-model='gridList.protein' placeholder="请输入蛋白" @click="SetInputKey('protein')"
  329. name="input" type="digit" @input="obtainPrice"></input>
  330. </view>
  331. </view>
  332. <view class="c-row " v-if="gridList.goodsName != '大豆'">
  333. <view class="title">不完善粒(%)</view>
  334. <view class="con-list">
  335. <MyNumberInput :myvalue="gridList.imperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  336. :myevent="'imperfectGrain'" @setValue="mykeywordset" v-if="InputEvent=='imperfectGrain'"
  337. @Cancelword="Cancelword" @goNext="goNext('imperfectGrain')"></MyNumberInput>
  338. <input v-else v-model='gridList.imperfectGrain' @click="SetInputKey('imperfectGrain')"
  339. placeholder="请输入不完整粒占比" name="input" type="digit"></input>
  340. </view>
  341. </view>
  342. <view class="c-row" v-else>
  343. <view class="title">完整粒率(%)</view>
  344. <view class="con-list">
  345. <MyNumberInput :myvalue="gridList.completeGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  346. :myevent="'completeGrain'" @setValue="mykeywordset" v-if="InputEvent=='completeGrain'"
  347. @Cancelword="Cancelword" @goNext="goNext('impurity')"></MyNumberInput>
  348. <input v-else v-model='gridList.completeGrain' placeholder="请输入完善粒率占比" name="input"
  349. type="digit"></input>
  350. </view>
  351. </view>
  352. <view class="c-row ">
  353. <view class="title">杂质(%)</view>
  354. <view class="con-list">
  355. <MyNumberInput :myvalue="gridList.impurity" :Isedit="Isedit" :IsShow="MykeywordShow"
  356. :myevent="'impurity'" @setValue="mykeywordset" v-if="InputEvent=='impurity'"
  357. @Cancelword="Cancelword" @goNext="goNext('impurity')"></MyNumberInput>
  358. <input v-else v-model='gridList.impurity' placeholder="请输入杂质占比" @click="SetInputKey('impurity')"
  359. name="input" type="digit"></input>
  360. </view>
  361. </view>
  362. <view class="c-row ">
  363. <view class="title">霉变粒(%)</view>
  364. <view class="con-list">
  365. <MyNumberInput :myvalue="gridList.mildewGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  366. :myevent="'mildewGrain'" @setValue="mykeywordset" v-if="InputEvent=='mildewGrain'"
  367. @Cancelword="Cancelword" @goNext="goNext('mildewGrain')"></MyNumberInput>
  368. <input v-else v-model='gridList.mildewGrain' @click="SetInputKey('mildewGrain')"
  369. placeholder="请输入霉变粒占比" name="input" type="digit"></input>
  370. </view>
  371. </view>
  372. <view class="c-row">
  373. <view class="title">热损伤(%)</view>
  374. <view class="con-list">
  375. <MyNumberInput :myvalue="gridList.jiaorenli" :Isedit="Isedit" :IsShow="MykeywordShow"
  376. :myevent="'jiaorenli'" @setValue="mykeywordset" v-if="InputEvent=='jiaorenli'"
  377. @Cancelword="Cancelword" @goNext="goNext('jiaorenli')"></MyNumberInput>
  378. <input v-else v-model='gridList.jiaorenli' @click="SetInputKey('jiaorenli')"
  379. placeholder="请输入热损伤占比" name="input" type="digit"></input>
  380. </view>
  381. </view>
  382. <view class="c-row" v-if="gridList.goodsName == '大豆'">
  383. <view class="title">转基因</view>
  384. <view class="con-list">
  385. <MyNumberInput :myvalue="gridList.transgene" :Isedit="Isedit" :IsShow="MykeywordShow"
  386. :myevent="'transgene'" @setValue="mykeywordset" v-if="InputEvent=='transgene'"
  387. @Cancelword="Cancelword" @goNext="goNext('transgene')"></MyNumberInput>
  388. <view @click="transgeneShow=true">
  389. {{gridList.transgene}}
  390. </view>
  391. <!-- 转基因 -->
  392. <u-picker :range="transgeneList" range-key="value" @confirm='transgeneClick($event)'
  393. v-model="transgeneShow" mode="selector">
  394. </u-picker>
  395. </view>
  396. </view>
  397. <view class="c-row" v-if="gridList.goodsName == '大豆'">
  398. <view class="title">色泽/气味</view>
  399. <view class="con-list">
  400. <MyNumberInput :myvalue="gridList.colorLustre" :Isedit="Isedit" :IsShow="MykeywordShow"
  401. :myevent="'colorLustre'" @setValue="mykeywordset" v-if="InputEvent=='colorLustre'"
  402. @Cancelword="Cancelword" @goNext="goNext('colorLustre')"></MyNumberInput>
  403. <!-- <input v-else v-model='gridList.colorLustre' @click="SetInputKey('colorLustre')"
  404. placeholder="请选择色泽/气味是否正常" name="input" type="digit"></input> -->
  405. <div @click="colorLustreShow = true">{{gridList.colorLustre}}</div>
  406. <!-- 转基因 -->
  407. <u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick($event)'
  408. v-model="colorLustreShow" mode="selector">
  409. </u-picker>
  410. </view>
  411. </view>
  412. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
  413. <view class="title">水分增价(元/吨)</view>
  414. <view class="con-list">
  415. <input v-model='gridList.waterPriceIncrease' @focus="pricefocus($event,1)"
  416. @input='deductionchange' placeholder="请输入水分增价" name="input" type="digit"></input>
  417. </view>
  418. </view>
  419. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
  420. <view class="title">水分扣价(元/吨)</view>
  421. <view class="con-list">
  422. <input v-model='gridList.waterPriceDeduction' @focus="pricefocus($event,2)"
  423. @input='deductionchange' placeholder="请输入水分扣价" name="input" type="digit"></input>
  424. </view>
  425. </view>
  426. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
  427. <view class="title">质量增价(元/吨)</view>
  428. <view class="con-list">
  429. <input v-model='gridList.qualityPriceIncrease' @focus="pricefocus($event,3)"
  430. @input='deductionchange' placeholder="请输入质量增价" name="input" type="digit"></input>
  431. </view>
  432. </view>
  433. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
  434. <view class="title">质量扣价(元/吨)</view>
  435. <view class="con-list">
  436. <input v-model='gridList.qualityPriceDeduction' @focus="pricefocus($event,4)"
  437. @input='deductionchange' placeholder="请输入质量扣价" name="input" type="digit"></input>
  438. </view>
  439. </view>
  440. <view v-show="gridList.type == '干粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3"
  441. class="c-row">
  442. <view class="title">干粮单价(元/公斤)</view>
  443. <view class="con-list">
  444. <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' @blur='inputprice'
  445. placeholder="请输入干粮单价" name="input" type="digit"></input>
  446. </view>
  447. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  448. </view>
  449. <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3"
  450. class="c-row">
  451. <view class="title">净重单价(元/公斤)</view>
  452. <view class="con-list">
  453. <input v-model='gridList.tidalGrainPrice' :disabled='pricedisabled' @blur='inputprice'
  454. placeholder="自动获取,不可编辑" name="input" type="digit"></input>
  455. </view>
  456. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  457. </view>
  458. <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
  459. class="c-row">
  460. <view class="title">净重单价(元/公斤)</view>
  461. <view class="con-list">
  462. <input v-model='gridList.tidalGrainPrice' :disabled='disabled1' @blur='inputprice'
  463. placeholder="自动获取,不可编辑" name="input" type="digit"></input>
  464. </view>
  465. </view>
  466. <!-- <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
  467. class="c-row">
  468. <view class="title">净重单价(元/公斤)</view>
  469. <view class="con-list">
  470. <input v-model='gridList.tidalGrainPrice' :disabled='disabled1' @blur='inputprice'
  471. placeholder="自动获取,不可编辑" name="input" type="digit"></input>
  472. </view>
  473. </view> -->
  474. <view v-show="gridList.type == '干粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
  475. class="c-row">
  476. <view class="title">干粮单价(元/公斤)</view>
  477. <view class="con-list">
  478. <input v-model='gridList.dryGrainPrice' :disabled='disabled1' @blur='inputprice'
  479. placeholder="请输入干粮单价" name="input" type="digit"></input>
  480. </view>
  481. </view>
  482. </view>
  483. </view>
  484. <view class="footer">
  485. <!-- <view @click='confirmInfo' class="button">确认初检信息</view> -->
  486. <view @click='submit' class="button">提交</view>
  487. </view>
  488. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  489. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  490. :showCancelButton='false' :content="content" @cancel="cancelClick"></u-modal>
  491. <!-- @confirm="alertBtn" -->
  492. <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
  493. <view class="buns_item">
  494. <view class="but_css" @click="print">打印小票</view>
  495. <view class="but_css" @click="close">返回</view>
  496. </view>
  497. </u-popup>
  498. </view>
  499. </template>
  500. <script>
  501. var that;
  502. const Equ_List = ['waterContent', 'bulkDensity', 'imperfectGrain', 'impurity', 'mildewGrain', 'jiaorenli', 'protein',
  503. 'completeGrain'
  504. ];
  505. import dragButton from "@/components/drag-button/drag-button.vue";
  506. import keyboard from "@/components/master-keyboard/master-keyboard.vue";
  507. import MyNumberInput from "@/components/MyNumberInput.vue";
  508. import {
  509. mapState
  510. } from 'vuex';
  511. let startY = 0,
  512. moveY = 0,
  513. pageAtTop = true;
  514. export default {
  515. components: {
  516. dragButton,
  517. keyboard,
  518. MyNumberInput
  519. },
  520. data() {
  521. return {
  522. isQY: false,
  523. isZJ: false,
  524. redstatus: false,
  525. isShowPrint: false,
  526. isShowAlert: false,
  527. disabled1: false,
  528. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  529. inputShow: false,
  530. params: {
  531. year: true,
  532. month: true,
  533. day: true,
  534. },
  535. Data: {
  536. ktv: '111111'
  537. },
  538. Isedit: false,
  539. MykeywordShow: false,
  540. InputEvent: '',
  541. tranTaskFlag: 0,
  542. dryGrainPrice: 0,
  543. tidalGrainPrice: 0,
  544. modalName: '',
  545. pricetext: '锁定',
  546. pricedisabled: false,
  547. show8: false,
  548. mycarStyle: '',
  549. feild: undefined,
  550. id: 0,
  551. outType: '他运',
  552. show: false,
  553. show4: false,
  554. show5: false,
  555. show6: false,
  556. show7: false,
  557. show9: false,
  558. edit: true,
  559. goodsdisabled: false,
  560. freighttext: '手动填写',
  561. costtext: '手动填写',
  562. selector: [],
  563. show1: false,
  564. inputContent: '',
  565. multiSelector1: [{
  566. name: '他运',
  567. value: '他运'
  568. }],
  569. printId: '',
  570. typevalue: '3',
  571. coverTransform: 'translateY(0px)',
  572. coverTransition: '0s',
  573. moving: false,
  574. footprintList: [],
  575. searchKeyWord: '',
  576. isVip: false,
  577. userInfoTmp: [],
  578. inputStatus: 'none',
  579. carInfo: [],
  580. gridCol: 4,
  581. freightstatus: false,
  582. coststatus: false,
  583. pageSize: 10,
  584. show3: false,
  585. show2: false,
  586. goodsList: [],
  587. currentPage: 1,
  588. value: false,
  589. gridBorder: false,
  590. headUrl: "../../static/img/myimg/YongHu@3x.png",
  591. userphone: "",
  592. username: "请更改昵称",
  593. contractFlag: 10,
  594. gridList: {
  595. outType: '汽运',
  596. natureOfGrainPurchase: '贸易粮',
  597. type: '',
  598. tidalGrainPrice: '',
  599. dryGrainPrice: '',
  600. buckleMiscellaneous: '',
  601. carNumber: '',
  602. customerName: '',
  603. customerPhone: '',
  604. bulkDensity: "",
  605. imperfectGrain: "",
  606. waterPriceIncrease: 0,
  607. waterPriceDeduction: 0,
  608. qualityPriceIncrease: 0,
  609. qualityPriceDeduction: 0,
  610. waterContent: "",
  611. jiaorenli: "",
  612. impurity: "",
  613. mildewGrain: "",
  614. compName: "",
  615. type: '',
  616. freight: 0,
  617. cost: '',
  618. addressUrl: '',
  619. tidalGrainPrice: 0,
  620. buckleWeightRatio: 0,
  621. buckleMiscellaneous: 0,
  622. paramType: 1,
  623. warehouseInOutDetail: {
  624. grade: '',
  625. reGrade: '',
  626. imperfectGrain: '',
  627. reImperfectGrain: '',
  628. impurity: '',
  629. reImpurity: '',
  630. jiaorenli: '',
  631. reJiaorenli: '',
  632. bulkDensity: '',
  633. reBulkDensity: '',
  634. mildewGrain: '',
  635. reMildewGrain: '',
  636. },
  637. disablednotarize: false,
  638. deductionAmount: 0,
  639. deductionWeight: 0,
  640. grossWeight: 0,
  641. tare: 0,
  642. grade: '',
  643. inOutDate: new Date().toISOString().slice(0, 10),
  644. netWeight: 0,
  645. pureWeight: 0,
  646. deductionWeight: 0,
  647. waterContent: '',
  648. reWaterContent: '',
  649. reGrade: '',
  650. imperfectGrain: '',
  651. reImperfectGrain: '',
  652. impurity: '',
  653. reImpurity: '',
  654. jiaorenli: '',
  655. reJiaorenli: '',
  656. bulkDensity: '',
  657. reBulkDensity: '',
  658. reMemo: '',
  659. storageTagNo: '',
  660. mildewGrain: '',
  661. reMildewGrain: '',
  662. boxNo: '',
  663. boxNoOther: '',
  664. titleNo: '',
  665. titleNoOther: '',
  666. statusFlag: 1
  667. },
  668. gridListInit: {
  669. natureOfGrainPurchase: '贸易粮',
  670. type: '',
  671. tidalGrainPrice: '',
  672. dryGrainPrice: '',
  673. buckleMiscellaneous: '',
  674. carNumber: '',
  675. customerName: '',
  676. customerPhone: '',
  677. bulkDensity: "",
  678. imperfectGrain: "",
  679. waterContent: "",
  680. jiaorenli: "",
  681. impurity: "",
  682. mildewGrain: "",
  683. compName: "",
  684. type: '',
  685. freight: 0,
  686. cost: '',
  687. addressUrl: '',
  688. tidalGrainPrice: 0,
  689. buckleWeightRatio: 0,
  690. buckleMiscellaneous: 0,
  691. paramType: 1,
  692. warehouseInOutDetail: {
  693. grade: '',
  694. reGrade: '',
  695. imperfectGrain: '',
  696. reImperfectGrain: '',
  697. impurity: '',
  698. reImpurity: '',
  699. jiaorenli: '',
  700. reJiaorenli: '',
  701. bulkDensity: '',
  702. reBulkDensity: '',
  703. mildewGrain: '',
  704. reMildewGrain: '',
  705. },
  706. disablednotarize: false,
  707. deductionAmount: 0,
  708. deductionWeight: 0,
  709. grossWeight: 0,
  710. tare: 0,
  711. grade: '',
  712. // inOutDate: new Date().toISOString().slice(0, 10),
  713. netWeight: 0,
  714. pureWeight: 0,
  715. deductionWeight: 0,
  716. waterContent: '',
  717. reWaterContent: '',
  718. reGrade: '',
  719. imperfectGrain: '',
  720. reImperfectGrain: '',
  721. impurity: '',
  722. reImpurity: '',
  723. jiaorenli: '',
  724. reJiaorenli: '',
  725. bulkDensity: '',
  726. reBulkDensity: '',
  727. reMemo: '',
  728. storageTagNo: '',
  729. mildewGrain: '',
  730. reMildewGrain: '',
  731. boxNo: '',
  732. boxNoOther: '',
  733. titleNo: '',
  734. titleNoOther: '',
  735. statusFlag: 1
  736. },
  737. typeList: ['潮粮', '干粮'],
  738. managementType: '',
  739. flag: 2,
  740. warehouseName: '',
  741. warehouseList: [],
  742. warehouseCount: '',
  743. commonWarehouseNo: '',
  744. warehouseTradeCount: 0,
  745. showTran: true,
  746. companyId: 1,
  747. contractNolist: [],
  748. current: 4,
  749. taskNolist: [],
  750. tranCarInfoList: [],
  751. fleetNameList: [],
  752. multiSelector: [{
  753. name: '汽运',
  754. value: '0',
  755. },
  756. {
  757. name: '火运',
  758. value: '1',
  759. },
  760. {
  761. name: '集装箱船',
  762. value: '2',
  763. },
  764. {
  765. name: '散船',
  766. value: '3',
  767. },
  768. ],
  769. gradeList: [{
  770. key: 1,
  771. value: '一等品'
  772. },
  773. {
  774. key: 2,
  775. value: '二等品'
  776. },
  777. {
  778. key: 3,
  779. value: '三等品'
  780. },
  781. {
  782. key: 4,
  783. value: '等外'
  784. },
  785. ],
  786. cangid: '',
  787. inType: "", //入库类型
  788. transgeneShow: false,
  789. transgeneList: [{
  790. value: '非转基因'
  791. }, {
  792. value: '转基因'
  793. }],
  794. colorLustreShow: false,
  795. colorLustreList: [{
  796. value: '正常'
  797. }, {
  798. value: '异常'
  799. }]
  800. }
  801. },
  802. // #ifndef MP
  803. onNavigationBarButtonTap(e) {
  804. const index = e.index;
  805. if (index === 0) {
  806. this.navTo('/pages/set/set');
  807. } else if (index === 1) {
  808. // #ifdef APP-PLUS
  809. const pages = getCurrentPages();
  810. const page = pages[pages.length - 1];
  811. const currentWebview = page.$getAppWebview();
  812. currentWebview.hideTitleNViewButtonRedDot({
  813. index
  814. });
  815. // #endif
  816. uni.navigateTo({
  817. url: '/pages/notice/notice'
  818. })
  819. }
  820. },
  821. // #endif
  822. computed: {
  823. ...mapState(['hasLogin', 'userInfo']),
  824. // 手机号中间4位加*
  825. starUserphone() {
  826. let reg = /^(\d{3})\d{4}(\d{4})$/;
  827. if (this.userphone) {
  828. return this.userphone.replace(reg, "$1****$2");
  829. }
  830. }
  831. },
  832. onLoad(options) {
  833. that = this
  834. console.log(that)
  835. console.log(this.cangid)
  836. this.commonWarehouseNo = options.commonWarehouseNo
  837. this.warehouseCount = Number(options.warehouseCount) + 1
  838. this.warehouseTradeCount = Number(options.warehouseTradeCount) + 1
  839. let number = '000' + this.warehouseCount
  840. number = number.substring(number.length - 4, number.length)
  841. this.gridList.warehouseName = options.warehouseName
  842. // this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
  843. this.cangid = options.cangid
  844. this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  845. id: this.cangid
  846. }).then(res => {
  847. console.log(res)
  848. this.warehouseList = res.data.data.warehousePositionInfoList
  849. })
  850. if (uni.getStorageSync('compName1')) {
  851. this.gridList.compName = uni.getStorageSync('compName1').company
  852. }
  853. this.gridList.person = options.personCharge
  854. this.gridList.personPhone = options.personPhone
  855. this.gridList.qualityInspector = uni.getStorageSync("userInfo").userName
  856. // this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  857. // warehouseId: this.cangid
  858. // }).then(res => {
  859. // if (res.data.data) {
  860. // this.setGoodName([0])
  861. // }
  862. // })
  863. this.managementType = options.managementType
  864. let that = this
  865. this.purchasePriceList = uni.getStorageSync('purchasePriceList')
  866. // if (uni.getStorageSync('checkcustomer')) {
  867. // let _customerInfo = uni.getStorageSync('checkcustomer')
  868. // if (_customerInfo.shipperName) {
  869. // this.gridList.identityId = _customerInfo.id
  870. // //点击登记客户
  871. // this.gridList.customerName = _customerInfo.shipperName
  872. // this.gridList.customerPhone = _customerInfo.shipperPhone
  873. // this.gridList.carNumber=_customerInfo.carNo
  874. // } else {
  875. // //点击搜索客户
  876. // this.gridList.customerName = _customerInfo.customerName
  877. // this.gridList.customerPhone = _customerInfo.customerPhone
  878. // }
  879. // this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  880. // }
  881. this.gridList.grade = this.gradeList[1].value
  882. this.gridList.gradeKey = this.gradeList[1].key
  883. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  884. warehouseId: this.cangid
  885. }).then(res => {
  886. if (res.data.data) {
  887. that.goodsList = res.data.data
  888. if (that.goodsList.length > 0) {
  889. that.gridList.goodsName = that.goodsList[0].goodsName
  890. uni.setStorageSync('purchasePriceList', that.goodsList)
  891. that.purchasePriceList = uni.getStorageSync('purchasePriceList')
  892. }
  893. } else if (res.data.code != 200) {
  894. uni.showModal({
  895. content: res.data.message,
  896. showCancel: false
  897. })
  898. }
  899. })
  900. console.log(this.gridList)
  901. this.gridListInit = this.gridList
  902. },
  903. async onShow() {
  904. this.isQY = this.utils.getCurrectRoles('acquisitionQuality.qview')
  905. this.isZJ = this.utils.getCurrectRoles('acquisitionQuality.initial')
  906. if (this.isZJ && !this.isQY) {
  907. this.typevalue = '1'
  908. this.contractFlag = 7
  909. } else {
  910. this.typevalue = '3'
  911. this.contractFlag = 10
  912. }
  913. uni.showLoading({
  914. title: '加载中',
  915. mask: true
  916. })
  917. if (this.typevalue == '3') {
  918. this.flag = 3
  919. } else {
  920. this.flag = 2
  921. }
  922. await this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  923. flag: this.flag,
  924. warehouseName: this.gridList.warehouseName
  925. }).then(res => {
  926. console.log(1)
  927. console.log(res)
  928. for (let i = 0; i < res.data.data.length; i++) {
  929. this.$set(res.data.data[i], 'inOutTaskNo1', res.data.data[i].inOutTaskNo + (res.data.data[
  930. i].taskFlag ? '(' + res.data.data[i].taskFlag + ')' : ''))
  931. }
  932. console.log(res.data.data, 22222)
  933. this.taskNolist = res.data.data
  934. })
  935. this.multiSelector1 = [{
  936. name: '他运',
  937. value: '他运'
  938. }]
  939. await this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  940. warehouseName: this.gridList.warehouseName
  941. }).then(res => {
  942. uni.hideLoading();
  943. console.log(2)
  944. // console.log(res)
  945. if (res.data.data.contractManagementInfoList) {
  946. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  947. res.data.data.contractMangementInfoList[i].name = '自运 (' +
  948. res.data.data.contractMangementInfoList[i].contractNo + ' ' + res.data.data
  949. .contractMangementInfoList[i].seller + ')'
  950. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  951. }
  952. } else {
  953. this.multiSelector1 = [{
  954. name: '他运',
  955. value: '他运'
  956. }]
  957. }
  958. // this.taskNolist=res.data.data
  959. })
  960. if (uni.getStorageSync('checkcustomer')) {
  961. let _customerInfo = uni.getStorageSync('checkcustomer')
  962. if (_customerInfo.shipperName) {
  963. this.gridList.identityId = _customerInfo.id
  964. //点击登记客户
  965. this.gridList.customerName = _customerInfo.shipperName
  966. this.gridList.customerPhone = _customerInfo.shipperPhone
  967. this.gridList.carNumber = _customerInfo.carNo
  968. } else {
  969. //点击搜索客户
  970. this.gridList.customerName = _customerInfo.customerName
  971. this.gridList.customerPhone = _customerInfo.customerPhone
  972. }
  973. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  974. var that = this
  975. setTimeout(() => {}, 1000)
  976. console.log(this.gridList.goodsName)
  977. if (!this.gridList.goodsName) {
  978. this.gridList.goodsName = uni.getStorageSync('goodsName')
  979. }
  980. if (this.gridList.goodsName) {
  981. uni.showLoading({
  982. title: '加载中',
  983. mask: true
  984. })
  985. await this.$api.doRequest('get',
  986. '/qualityInspectionManagement/getQualityInspectionManagementMap', {
  987. goodsName: this.gridList.goodsName,
  988. compId: uni.getStorageSync('pcUserInfo').compId,
  989. customerNumberCard: this.gridList.customerNumberCard,
  990. warehouseName: this.gridList.warehouseName
  991. }).then(res => {
  992. uni.hideLoading();
  993. if (res.data.data.A + res.data.data.B + res.data.data.C * 50 > res.data.data.D - 50) {
  994. that.redstatus = true
  995. } else {
  996. that.redstatus = false
  997. }
  998. var a = res.data.data.A > 0 ? '已完成' + Number(res.data.data.A).toFixed(2) + '吨,' : ''
  999. var b = res.data.data.B > 0 ? '进行中' + Number(res.data.data.B).toFixed(2) + '吨,' : ''
  1000. var c = res.data.data.C > 0 ? '未称重' + Number(res.data.data.C) + '车' : ''
  1001. that.gridList.volumeofbusiness = a + b + c
  1002. console.log(that.gridList.volumeofbusiness)
  1003. that.$forceUpdate()
  1004. })
  1005. }
  1006. }
  1007. },
  1008. methods: {
  1009. colorLustreClick(e) {
  1010. this.gridList.colorLustre = this.colorLustreList[e[0]].value
  1011. },
  1012. transgeneClick(e) {
  1013. this.gridList.transgene = this.transgeneList[e[0]].value
  1014. },
  1015. Cancelword() {
  1016. this.bottomHeight = '10rpx';
  1017. this.MykeywordShow = false;
  1018. this.InputEvent = '';
  1019. },
  1020. goNext(val) {
  1021. var inputList = Equ_List;
  1022. if (this.menuIndex == 1) {
  1023. inputList = Sign_List;
  1024. }
  1025. var index = inputList.indexOf(val);
  1026. this.setScrollTops(val);
  1027. if (index < inputList.length - 1) {
  1028. this.InputEvent = inputList[index + 1];
  1029. } else {
  1030. this.InputEvent = ''
  1031. this.bottomHeight = '10rpx';
  1032. this.MykeywordShow = false;
  1033. }
  1034. },
  1035. mykeywordset(datatxt) {
  1036. var arr = JSON.parse(datatxt);
  1037. this.gridList[arr.even] = arr.value;
  1038. if (arr.even == 'waterContent') {
  1039. this.waterContentChange()
  1040. } else if (arr.even == 'bulkDensity') {
  1041. this.obtainPrice()
  1042. }
  1043. },
  1044. SetInputKey(even) {
  1045. uni.hideKeyboard();
  1046. this.InputEvent = even;
  1047. this.setScrollTops(even);
  1048. if (!this.MykeywordShow) {
  1049. this.bottomHeight = '320rpx';
  1050. this.MykeywordShow = true;
  1051. }
  1052. },
  1053. setScrollTops(even) {
  1054. var inputList = Equ_List;
  1055. var index = inputList.indexOf(even);
  1056. this.viewTop = (index + 1) * 60 + 100;
  1057. },
  1058. pricefocus(e, status) {
  1059. console.log(e)
  1060. if (status == 1) {
  1061. if (e.detail.value == 0) {
  1062. this.gridList.waterPriceIncrease = ''
  1063. }
  1064. } else if (status == 2) {
  1065. if (e.detail.value == 0) {
  1066. this.gridList.waterPriceDeduction = ''
  1067. }
  1068. } else if (status == 3) {
  1069. if (e.detail.value == 0) {
  1070. this.gridList.qualityPriceIncrease = ''
  1071. }
  1072. } else if (status == 4) {
  1073. if (e.detail.value == 0) {
  1074. this.gridList.qualityPriceDeduction = ''
  1075. }
  1076. }
  1077. },
  1078. deductionchange() {
  1079. if (this.gridList.type == '干粮') {
  1080. if (this.dryGrainPrice != '') {
  1081. console.log(Number(this.dryGrainPrice + (this.gridList.waterPriceIncrease / 1000) - (this.gridList
  1082. .waterPriceDeduction / 1000) + (this.gridList.qualityPriceIncrease / 1000) - (this
  1083. .gridList.qualityPriceDeduction / 1000)), Number(this.dryGrainPrice + (this.gridList
  1084. .waterPriceIncrease / 1000) - (this.gridList.waterPriceDeduction / 1000) + (this
  1085. .gridList.qualityPriceIncrease / 1000) - (this.gridList.qualityPriceDeduction /
  1086. 1000)).toFixed(2))
  1087. this.gridList.dryGrainPrice = Number(this.dryGrainPrice + (this.gridList.waterPriceIncrease /
  1088. 1000) - (this.gridList.waterPriceDeduction / 1000) + (this.gridList
  1089. .qualityPriceIncrease /
  1090. 1000) - (this.gridList.qualityPriceDeduction / 1000)).toFixed(4)
  1091. }
  1092. } else if (this.gridList.type == '潮粮') {
  1093. if (this.tidalGrainPrice != '') {
  1094. this.gridList.tidalGrainPrice = Number(this.tidalGrainPrice + (this.gridList.waterPriceIncrease /
  1095. 1000) - (this.gridList.waterPriceDeduction / 1000) + (this.gridList
  1096. .qualityPriceIncrease / 1000) - (this.gridList.qualityPriceDeduction / 1000)).toFixed(4)
  1097. }
  1098. }
  1099. this.$forceUpdate()
  1100. },
  1101. carNopicker(e) {
  1102. this.gridList.carNumber = this.tranCarInfoList[e[0]].carNo
  1103. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1104. if (i == e[0]) {
  1105. this.gridList.carNo = this.tranCarInfoList[i].carNo
  1106. this.gridList.carNoCopy = this.tranCarInfoList[i].carNo + '(' + this.tranCarInfoList[i].tranCarNo +
  1107. ')'
  1108. this.gridList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  1109. this.gridList.carId = this.tranCarInfoList[i].id
  1110. this.gridList.freight = Math.round(
  1111. this.tranCarInfoList[i].tranPrice
  1112. )
  1113. if (this.gridList.inOutType == '移库入库') {
  1114. if (!this.gridList.cost) {
  1115. this.gridList.cost = this.tranCarInfoList[i].cost
  1116. }
  1117. this.gridList.loadNetWeight =
  1118. this.tranCarInfoList[i].loadNetWeight
  1119. }
  1120. }
  1121. }
  1122. },
  1123. obtainPrice() { //根据容重获取价格
  1124. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  1125. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1126. let quality = this.gridList.goodsName == '大豆' ? this.gridList.protein : this.gridList.bulkDensity
  1127. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1128. warehouseId: this.cangid,
  1129. goodsName: this.gridList.goodsName,
  1130. bulkDensity: quality
  1131. }).then(res => {
  1132. if (res.data.data != 0) {
  1133. this.gridList.dryGrainPrice = res.data.data
  1134. this.dryGrainPrice = res.data.data
  1135. this.gridList.waterPriceIncrease = 0
  1136. this.gridList.waterPriceDeduction = 0
  1137. this.gridList.qualityPriceIncrease = 0
  1138. this.gridList.qualityPriceDeduction = 0
  1139. }
  1140. })
  1141. // }
  1142. }
  1143. },
  1144. changeprice() {
  1145. if (this.pricetext == '解锁') {
  1146. this.pricedisabled = false
  1147. this.pricetext = '锁定'
  1148. } else {
  1149. this.pricedisabled = true
  1150. this.pricetext = '解锁'
  1151. }
  1152. },
  1153. inputprice() {
  1154. if (this.pricetext == '锁定') {
  1155. this.pricedisabled = true
  1156. this.pricetext = '解锁'
  1157. }
  1158. console.log(this.gridList.dryGrainPrice, this.gridList.tidalGrainPrice)
  1159. if (this.gridList.type == '干粮') {
  1160. this.dryGrainPrice = this.gridList.dryGrainPrice
  1161. }
  1162. if (this.gridList.type == '潮粮') {
  1163. this.tidalGrainPrice = this.gridList.tidalGrainPrice
  1164. }
  1165. },
  1166. groupChange(e) {
  1167. console.log(e, this.gridListInit)
  1168. this.gridListInit.warehouseName = this.gridList.warehouseName
  1169. if (uni.getStorageSync('checkcustomer')) {
  1170. uni.setStorageSync('checkcustomer', '')
  1171. this.gridListInit.identityId = ''
  1172. this.gridListInit.customerName = ''
  1173. this.gridListInit.customerPhone = ''
  1174. this.gridListInit.carNumber = ''
  1175. this.gridListInit.customerNumberCard = ''
  1176. this.$forceUpdate()
  1177. }
  1178. // this.gridList = JSON.parse(JSON.stringify(this.gridListInit))
  1179. this.gridList = this.$u.deepClone(this.gridListInit)
  1180. this.gridList.serviceManagementType = e
  1181. if (e == 1) {
  1182. if (this.flag != 2) {
  1183. this.gridList.inOutTaskNo = ''
  1184. this.gridList.contractNo = ''
  1185. }
  1186. this.gridList.qualityNo = ''
  1187. this.flag = 2
  1188. // this.contractFlag = 7
  1189. } else {
  1190. if (this.flag != 3) {
  1191. this.gridList.inOutTaskNo = ''
  1192. this.gridList.contractNo = ''
  1193. }
  1194. this.flag = 3
  1195. // this.contractFlag = 10
  1196. // let number = '000' + this.warehouseCount
  1197. // number = number.substring(number.length - 4, number.length)
  1198. // this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
  1199. }
  1200. this.gridList.grade = this.gradeList[1].value
  1201. this.gridList.gradeKey = this.gradeList[1].key
  1202. this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  1203. flag: this.flag,
  1204. warehouseName: this.gridList.warehouseName
  1205. }).then(res => {
  1206. console.log(res)
  1207. for (let i = 0; i < res.data.data.length; i++) {
  1208. this.$set(res.data.data[i], 'inOutTaskNo1', res.data.data[i].inOutTaskNo + (res.data.data[
  1209. i].taskFlag ? '(' + res.data.data[i].taskFlag + ')' : ''))
  1210. }
  1211. this.taskNolist = res.data.data
  1212. })
  1213. console.log(this.gridList, 111111111111)
  1214. },
  1215. outtypepicker(e, status) {
  1216. console.log(e, status)
  1217. if (status == 0) {
  1218. this.gridList.outType = this.multiSelector[e[0]].name
  1219. } else {
  1220. if (this.multiSelector1[e[0]].name == '他运') {
  1221. this.goodsdisabled = false
  1222. this.gridList.outType = this.multiSelector1[e[0]].name
  1223. } else {
  1224. this.gridList.outType = '自运'
  1225. this.goodsdisabled = true
  1226. this.outType = this.multiSelector1[e[0]].name
  1227. this.gridList.contractNo = this.multiSelector1[i].contractNo
  1228. // if (this.gridList.contractNo == this.contractNolist[i].contractNo) {
  1229. // this.gridList.goodsName = this.outContractNo[q].goodsName
  1230. // this.gridList.goodsNameKey = this.outContractNo[q].goodsNameKey
  1231. // }
  1232. this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
  1233. contractNo: this.gridList.contractNo,
  1234. compId: uni.getStorageSync('pcUserInfo').compId
  1235. }).then(res => {
  1236. this.contractNolist = res.data.data
  1237. this.gridList.goodsName = this.contractNolist.goodsName
  1238. this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
  1239. })
  1240. this.waterContentChange()
  1241. }
  1242. }
  1243. console.log(this.gridList.outType)
  1244. },
  1245. changefreight() {
  1246. this.freightstatus = !this.freightstatus
  1247. if (this.freightstatus) {
  1248. this.freighttext = '自动获取'
  1249. } else {
  1250. this.freighttext = '手动填写'
  1251. }
  1252. },
  1253. changecost() {
  1254. this.coststatus = !this.coststatus
  1255. if (this.coststatus) {
  1256. this.costtext = '自动获取'
  1257. } else {
  1258. this.costtext = '手动填写'
  1259. }
  1260. },
  1261. inOutDatepicker(e) {
  1262. this.gridList.inOutDate = e.year + '-' + e.month + '-' + e.day
  1263. console.log(e)
  1264. },
  1265. fleetpicker(e) {
  1266. this.gridList.fleet = this.fleetNameList[e[0]].fleetName
  1267. },
  1268. change(e) {
  1269. if (e) {
  1270. this.gridList.supplementaryRecording = 1
  1271. } else {
  1272. this.gridList.supplementaryRecording = 0
  1273. }
  1274. },
  1275. tasknopicker(e) {
  1276. console.log("切换任务编号", e)
  1277. this.gridList.inOutTaskNo = this.taskNolist[e[0]].inOutTaskNo
  1278. this.gridList.inOutTaskNo1 = this.taskNolist[e[0]].inOutTaskNo1
  1279. var data = this.taskNolist[e[0]]
  1280. this.gridList.donecount = data.completedQuantity + '/' + data.weight
  1281. if (this.taskNolist[e[0]].inOutType == '收购入库') {
  1282. this.gridList.contractNo = this.taskNolist[e[0]].contractNo
  1283. this.inType = this.taskNolist[e[0]].inOutType
  1284. this.gridList.goodsName = this.taskNolist[e[0]].goodsName
  1285. if (this.taskNolist[e[0]].goodsName.indexOf("潮粮") != -1) { //收购从合同中带出货名 单价等信息 用货名是否带有潮粮字符来判断干潮类型
  1286. this.gridList.type = "潮粮"
  1287. this.gridList.imperfectGrain = 8
  1288. this.gridList.impurity = 1
  1289. this.gridList.mildewGrain = 2
  1290. this.gridList.jiaorenli = 0
  1291. } else {
  1292. this.gridList.type = "干粮"
  1293. this.gridList.imperfectGrain = 8
  1294. this.gridList.impurity = 1
  1295. this.gridList.mildewGrain = 2
  1296. this.gridList.jiaorenli = 1
  1297. }
  1298. }
  1299. if (this.taskNolist[e[0]].contractNo) {
  1300. this.gridList.contractNo = this.taskNolist[e[0]].contractNo
  1301. } else {
  1302. this.gridList.contractNo = this.taskNolist[e[0]].moveTaskNo
  1303. }
  1304. this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
  1305. contractNo: this.gridList.contractNo,
  1306. compId: uni.getStorageSync('pcUserInfo').compId
  1307. }).then(res => {
  1308. this.contractNolist = res.data.data
  1309. if (this.typevalue == 3) {
  1310. var gooddata = this.goodsList.filter((item) => {
  1311. return item.goodsName == this.contractNolist.goodsName
  1312. })
  1313. if (this.contractNolist.priceType == "定价收购" && this.inType == "收购入库") {
  1314. this.gridList.dryGrainPrice = Number(this.contractNolist.unitContractPrice / 1000)
  1315. .toFixed(3)
  1316. }
  1317. if (gooddata.length > 0) {
  1318. // 收购入库
  1319. for (let q = 0; q < this.goodsList.length; q++) {
  1320. if (this.goodsList[q].goodsName == this.contractNolist.goodsName) {
  1321. this.gridList.goodsName = this.contractNolist.goodsName
  1322. this.setGoodName([q])
  1323. }
  1324. }
  1325. } else {
  1326. if (this.inType != "收购入库") { //收购入库不校验仓库设置中的货名
  1327. uni.showModal({
  1328. title: '提示',
  1329. content: '仓库设置中无该合同货名',
  1330. showCancel: false,
  1331. confirmText: '返回',
  1332. success: function(res) {
  1333. if (res.confirm) {
  1334. uni.navigateBack({
  1335. delta: 1
  1336. })
  1337. }
  1338. }
  1339. });
  1340. }
  1341. }
  1342. } else {
  1343. this.gridList.goodsName = this.contractNolist.goodsName
  1344. if (this.gridList.goodsName == '玉米') {
  1345. this.gridList.type = '干粮'
  1346. this.gridList.imperfectGrain = 8
  1347. this.gridList.impurity = 1
  1348. this.gridList.mildewGrain = 2
  1349. this.gridList.jiaorenli = 1
  1350. if (this.contractNolist.priceType != '随行就市') {
  1351. this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
  1352. .toFixed(3)
  1353. }
  1354. this.edit = true
  1355. } else if (this.gridList.goodsName.indexOf('潮粮') > -1) {
  1356. this.gridList.type = '潮粮'
  1357. this.edit = true
  1358. if (this.contractNolist.priceType != '随行就市') {
  1359. this.gridList.tidalGrainPrice = this.contractNolist.contractPrice
  1360. this.tidalGrainPrice = this.contractNolist.contractPrice
  1361. }
  1362. this.gridList.imperfectGrain = 8
  1363. this.gridList.impurity = 1
  1364. this.gridList.mildewGrain = 2
  1365. this.gridList.jiaorenli = 0
  1366. } else {
  1367. this.gridList.type = '干粮'
  1368. this.gridList.imperfectGrain = 8
  1369. this.gridList.impurity = 1
  1370. this.gridList.mildewGrain = 2
  1371. this.gridList.jiaorenli = 1
  1372. this.edit = false
  1373. if (this.contractNolist.priceType != '随行就市') {
  1374. this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
  1375. .toFixed(3)
  1376. }
  1377. }
  1378. }
  1379. this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
  1380. this.gridList.grade = this.gradeList[1].value
  1381. this.gridList.gradeKey = this.gradeList[1].key
  1382. // this.gridList.grade = this.contractNolist.grade
  1383. this.gridList.inOutType = this.contractNolist.inOutType
  1384. if (this.gridList.goodsName == "大豆") { //货名为大豆是设置默认
  1385. this.gridList.transgene = "非转基因"
  1386. this.gridList.reTransgene = "非转基因"
  1387. this.gridList.colorLustre = "正常"
  1388. this.gridList.reColorLustre = "正常"
  1389. } else {
  1390. delete this.gridList.transgene
  1391. delete this.gridList.reTransgene
  1392. delete this.gridList.colorLustre
  1393. delete this.gridList.reColorLustre
  1394. }
  1395. if (this.gridList.inOutType == '采购入库') {
  1396. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  1397. // this.gridList.qualityNo='CGRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  1398. if (!this.contractNolist.unitContractPrice) {
  1399. this.gridList.tips = '卖方' + this.contractNolist.seller
  1400. } else {
  1401. this.gridList.tips = '卖方' + this.contractNolist.seller + '( ' + this.contractNolist
  1402. .unitContractPrice + '元/吨)'
  1403. }
  1404. this.gridList.inOutTypeKey = 1
  1405. console.log("this.gridList.inOutTypeKey", 1)
  1406. } else if (this.gridList.inOutType == '移库入库') {
  1407. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  1408. // this.gridList.qualityNo='YKRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  1409. if (this.contractNolist.unitContractPrice) {
  1410. this.gridList.tips = '出货库' + data.sendWarehouse + ' (' + this.contractNolist
  1411. .unitContractPrice + '元/吨)'
  1412. } else {
  1413. this.gridList.tips = '出货库' + data.sendWarehouse
  1414. }
  1415. this.gridList.inOutTypeKey = 3
  1416. } else if (this.contractNolist.inOutType == '移库出库') {
  1417. this.gridList.tips = '入货库' + data.receiveWarehouse
  1418. } else if (this.contractNolist.inOutType == '暂存入库') {
  1419. this.gridList.inOutTypeKey = 4
  1420. } else if (this.contractNolist.inOutType == '贸易服务入库') {
  1421. this.gridList.inOutTypeKey = 5
  1422. } else if (this.contractNolist.inOutType == '退库') {
  1423. //退库有无运输任务标识
  1424. this.gridList.tranTaskFlag = this.contractNolist.tranTaskFlag
  1425. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  1426. // this.gridList.qualityNo = 'CGRK' + this.getdate() + this.commonWarehouseNo + this
  1427. // .warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  1428. if (this.contractNolist.contractNo) {
  1429. this.gridList.tips = '买方' + this.contractNolist.buyer
  1430. } else {
  1431. this.gridList.tips = '出货库' + data.sendWarehouse
  1432. }
  1433. this.gridList.inOutTypeKey = 6
  1434. }
  1435. this.cost = this.contractNolist.contractPrice
  1436. if (this.cost) {
  1437. this.isGetCost = true
  1438. this.gridList.cost = this.cost - this.gridList.deductionAmount
  1439. } else {
  1440. this.isGetCost = false
  1441. this.gridList.cost = this.gridList.cost
  1442. }
  1443. if (this.contractNolist.inOutType == '移库入库') {
  1444. this.isSelectType = false
  1445. } else {
  1446. this.isSelectType = true
  1447. }
  1448. if (this.contractNolist.priceType == '随行就市') {
  1449. this.disabled1 = true
  1450. } else {
  1451. this.disabled1 = false
  1452. }
  1453. if (this.contractNolist.deliverType == '1') {
  1454. this.carstatus = true
  1455. } else {
  1456. this.carstatus = false
  1457. }
  1458. this.tranCarInfoList = []
  1459. if (this.contractNolist.tranCarInfoList) {
  1460. for (var q = 0; q < this.contractNolist.tranCarInfoList.length; q++) {
  1461. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList[q]
  1462. .carNo
  1463. if (this.contractNolist.tranCarInfoList[q].tranCarNo) {
  1464. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist
  1465. .tranCarInfoList[q].carNo + '(' + this.contractNolist.tranCarInfoList[q]
  1466. .tranCarNo + ')'
  1467. } else {
  1468. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList
  1469. .carNo
  1470. }
  1471. }
  1472. this.tranCarInfoList = this.contractNolist.tranCarInfoList
  1473. // this.carstatus = true
  1474. } else {
  1475. this.tranCarInfoList = []
  1476. }
  1477. this.fleetNameList = this.contractNolist.tranCarInfoList1
  1478. if (this.gridList.goodsName && this.gridList.customerNumberCard) {
  1479. uni.showLoading({
  1480. title: '加载中',
  1481. mask: true
  1482. })
  1483. let that = this
  1484. this.$api.doRequest('get',
  1485. '/qualityInspectionManagement/getQualityInspectionManagementMap', {
  1486. goodsName: this.gridList.goodsName,
  1487. compId: uni.getStorageSync('pcUserInfo').compId,
  1488. customerNumberCard: this.gridList.customerNumberCard
  1489. }).then(res => {
  1490. uni.hideLoading();
  1491. if (res.data.data.A + res.data.data.B + res.data.data.C * 50 > res.data.data
  1492. .D - 50) {
  1493. that.redstatus = true
  1494. } else {
  1495. that.redstatus = false
  1496. }
  1497. var a = res.data.data.A > 0 ? '已完成' + Number(res.data.data.A).toFixed(2) +
  1498. '吨,' : ''
  1499. var b = res.data.data.B > 0 ? '进行中' + Number(res.data.data.B).toFixed(2) +
  1500. '吨,' : ''
  1501. var c = res.data.data.C > 0 ? '未称重' + Number(res.data.data.C) + '车' : ''
  1502. that.gridList.volumeofbusiness = a + b + c
  1503. console.log(that.gridList.volumeofbusiness)
  1504. that.$forceUpdate()
  1505. })
  1506. }
  1507. })
  1508. this.$forceUpdate()
  1509. console.log(this.gridList)
  1510. },
  1511. print() {
  1512. console.log(this.printId)
  1513. if (this.printId) {
  1514. uni.showLoading({
  1515. title: "加载中",
  1516. mask: true
  1517. })
  1518. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  1519. id: this.printId
  1520. }).then(res => {
  1521. uni.hideLoading()
  1522. uni.setStorageSync("quality_print", res.data.data)
  1523. uni.navigateTo({
  1524. url: '/pages/erpbusiness/bleConnect'
  1525. })
  1526. })
  1527. }
  1528. },
  1529. close() {
  1530. this.isShowPrint = false
  1531. uni.navigateBack({})
  1532. },
  1533. hidden() {
  1534. this.$refs.keyboard.open(false)
  1535. },
  1536. handleShowKeyboard() {
  1537. if (this.$refs.keyboard.open) {
  1538. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  1539. } else {
  1540. this.$refs.keyboard[0].open(true)
  1541. }
  1542. },
  1543. handleShowKeyboard1() {
  1544. if (this.$refs.keyboard1.open) {
  1545. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  1546. } else {
  1547. this.$refs.keyboard1[0].open(true)
  1548. }
  1549. },
  1550. handleClick(e) {
  1551. this.gridList.carNumber = e.value //键盘输入值
  1552. },
  1553. cancelClick() {
  1554. this.isShowAlert = false
  1555. },
  1556. waterContentChange() {
  1557. var that = this
  1558. if (this.gridList.goodsName) {
  1559. for (var i = 0; i < this.purchasePriceList.length; i++) {
  1560. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  1561. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  1562. this.gridList.paramType = this.purchasePriceList[i].paramType
  1563. }
  1564. }
  1565. }
  1566. if (this.inType != "收购入库") { //非收购入库 价格取自合同
  1567. return
  1568. }
  1569. if (this.gridList.goodsName && this.cangid) {
  1570. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1571. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1572. warehouseId: this.cangid,
  1573. goodsName: this.gridList.goodsName
  1574. }).then(res => {
  1575. that.gridList.dryGrainPrice = res.data.data
  1576. that.dryGrainPrice = res.data.data
  1577. })
  1578. }
  1579. }
  1580. that.gridList.waterPriceIncrease = 0
  1581. that.gridList.waterPriceDeduction = 0
  1582. that.gridList.qualityPriceIncrease = 0
  1583. that.gridList.qualityPriceDeduction = 0
  1584. //潮粮单价改变事件
  1585. if (
  1586. this.gridList.goodsName &&
  1587. this.gridList.waterContent &&
  1588. this.gridList.grade
  1589. ) {
  1590. uni.showLoading({
  1591. title: "加载中",
  1592. mask: true
  1593. })
  1594. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1595. warehouseId: this.cangid,
  1596. goodsName: this.gridList.goodsName,
  1597. waterContent: this.gridList.waterContent,
  1598. grade: this.gridList.grade,
  1599. }).then(res => {
  1600. if (that.gridList.paramType == '1') {
  1601. // console.log(that.gridList)
  1602. if (that.gridList.buckleMiscellaneous) {
  1603. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(
  1604. that
  1605. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1606. .dryGrainPrice)).toFixed(4)
  1607. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1608. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1609. .dryGrainPrice)).toFixed(4)
  1610. }
  1611. if (!that.gridList.tidalGrainPrice) {
  1612. that.gridList.tidalGrainPrice = ''
  1613. }
  1614. if (that.gridList.type == '干粮') {
  1615. that.gridList.dryGrainPrice = res.data.data
  1616. that.dryGrainPrice = that.gridList.dryGrainPrice
  1617. }
  1618. } else {
  1619. that.gridList.tidalGrainPrice = res.data.data
  1620. if (that.gridList.type == '干粮') {
  1621. that.gridList.dryGrainPrice = res.data.data
  1622. that.dryGrainPrice = that.gridList.dryGrainPrice
  1623. } else {
  1624. that.gridList.tidalGrainPrice = res.data.data
  1625. that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1626. }
  1627. }
  1628. uni.hideLoading()
  1629. })
  1630. }
  1631. },
  1632. gocustomer() {
  1633. uni.navigateTo({
  1634. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  1635. .warehouseName + '&goodsName=' + this.gridList.goodsName
  1636. })
  1637. },
  1638. getdate() {
  1639. var date = new Date()
  1640. var year = date.getFullYear() //获取完整的年份(4位)
  1641. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  1642. var datetime = date.getDate() //获取当前日(1-31)
  1643. if (mouth < 10) {
  1644. mouth = '0' + mouth
  1645. }
  1646. if (datetime < 10) {
  1647. datetime = '0' + datetime
  1648. }
  1649. return year + '' + mouth + '' + datetime
  1650. },
  1651. async addQualityInspection(type) {
  1652. if (type == 1) {
  1653. await this.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection', this
  1654. .gridList)
  1655. .then(res => {
  1656. console.log(res)
  1657. this.printId = res.data.data
  1658. uni.hideLoading()
  1659. // if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
  1660. // -1) ||
  1661. // (this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
  1662. // -1)) {
  1663. if (res.data.code == 200) {
  1664. console.log("addQualityInspection")
  1665. this.$api.msg('提交成功')
  1666. this.gridList.warehouseId = this.cangid
  1667. this.gridList.compId = uni.getStorageSync(
  1668. 'pcUserInfo').compId
  1669. uni.setStorageSync("quality_print", this.gridList)
  1670. if (this.isZJ) {
  1671. this.isShowPrint = true
  1672. } else {
  1673. uni.navigateBack({})
  1674. }
  1675. console.log('that.gridList', this.gridList)
  1676. // uni.navigateBack({})
  1677. }
  1678. else if(res.data.message == '货物种类与类型不符,请确认!'){
  1679. this.$api.msg(res.data.message)
  1680. }else {
  1681. this.$api.msg('提交失败')
  1682. }
  1683. // } else {
  1684. // this.$api.msg('货物种类与类型不符,请确认')
  1685. // }
  1686. })
  1687. return
  1688. }
  1689. if (type == 2) {
  1690. await this.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection', this
  1691. .gridList)
  1692. .then(res => {
  1693. console.log("addQualityInspection")
  1694. this.printId = res.data.data
  1695. uni.hideLoading()
  1696. // if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
  1697. // -1) ||
  1698. // (this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
  1699. // -1)) {
  1700. if (res.data.code == 200) {
  1701. this.$api.msg('提交成功')
  1702. this.gridList.warehouseId = this.cangid
  1703. this.gridList.compId = uni.getStorageSync('pcUserInfo').compId
  1704. uni.setStorageSync("quality_print", this.gridList)
  1705. if (this.isZJ) {
  1706. this.isShowPrint = true
  1707. } else {
  1708. uni.navigateBack({})
  1709. }
  1710. uni.setStorageSync(
  1711. 'checkcustomer', {}
  1712. )
  1713. console.log('that.gridList', this.gridList)
  1714. // uni.navigateBack({})
  1715. } else if(res.data.message == '货物种类与类型不符,请确认!'){
  1716. this.$api.msg(res.data.message)
  1717. }
  1718. else {
  1719. this.$api.msg('提交失败')
  1720. }
  1721. // } else {
  1722. // this.$api.msg('货物种类与类型不符,请确认')
  1723. // }
  1724. })
  1725. }
  1726. },
  1727. async inOutWarehouse(type) {
  1728. if (type == 1) {
  1729. await this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.gridList)
  1730. .then(res => {
  1731. console.log("InOutWarehouse")
  1732. this.gridList.warehouseInOutId = res.data.data
  1733. if (this.gridList.warehouseInOutId) {
  1734. this.addQualityInspection(1)
  1735. }
  1736. })
  1737. return
  1738. }
  1739. if (type == 2) {
  1740. await this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.gridList)
  1741. .then(res => {
  1742. console.log("InOutWarehouse")
  1743. if (this.isQY) {
  1744. if (!this.isZJ) {
  1745. this.gridList.brazer = 1
  1746. this.gridList.statusFlag = 7
  1747. } else {
  1748. this.gridList.statusFlag = 0
  1749. }
  1750. }
  1751. this.gridList.warehouseInOutId = res.data.data
  1752. if (this.gridList.warehouseInOutId) {
  1753. this.addQualityInspection(2)
  1754. }
  1755. })
  1756. return
  1757. }
  1758. },
  1759. async cumulant(type) {
  1760. if (type == 1) {
  1761. await this.$api.doRequest('get', '/paymentManagement/cumulant', {
  1762. compId: uni.getStorageSync('pcUserInfo').compId,
  1763. customerNumberCard: this.gridList.customerNumberCard,
  1764. goodsName: this.gridList.goodsName,
  1765. })
  1766. .then(response => {
  1767. console.log("cumulant")
  1768. if (response.data.code == 200) {
  1769. for (let i = 0; i < this.purchasePriceList.length; i++) {
  1770. if (this.gridList.goodsName == this.purchasePriceList[i].goodsName) {
  1771. let count = (this.purchasePriceList[i].saleLimit - response.data.data /
  1772. 1000)
  1773. .toFixed(2)
  1774. console.log(count, this.purchasePriceList[i].saleLimit, response.data.data)
  1775. if (Number(count) <= 0) {
  1776. count = 0
  1777. this.$api.msg('该客户累计销售' + this.gridList.goodsName + (response.data
  1778. .data /
  1779. 1000).toFixed(2) + '吨,还可售粮' + count + '吨', )
  1780. uni.hideLoading()
  1781. break;
  1782. }
  1783. this.gridList.inOutFlag = 2
  1784. this.inOutWarehouse(2)
  1785. }
  1786. }
  1787. }
  1788. })
  1789. return
  1790. }
  1791. },
  1792. async getGoodsName() {
  1793. let that = this
  1794. await this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  1795. warehouseId: this.cangid
  1796. }).then(res => {
  1797. if (res.data.code != 200 && that.typevalue == 3) {
  1798. uni.showModal({
  1799. content: res.data.message,
  1800. showCancel: false
  1801. })
  1802. return;
  1803. }
  1804. uni.showModal({
  1805. content: "确定提交质检信息?",
  1806. showCancel: true,
  1807. confirmText: '提交',
  1808. success: function(res) {
  1809. if (res.confirm) {
  1810. that.gridList.serviceManagementType = that.typevalue
  1811. if (that.typevalue == 3) {
  1812. that.cumulant(1)
  1813. return
  1814. }
  1815. that.gridList.inOutFlag = 2
  1816. that.inOutWarehouse(1)
  1817. // that.addQualityInspection(1)
  1818. }
  1819. }
  1820. })
  1821. })
  1822. },
  1823. submit() {
  1824. console.log(this.isQY, "isQY")
  1825. console.log(this.isZJ, "isZJ")
  1826. if (this.typevalue == 3) {
  1827. if (this.outType) {
  1828. this.gridList.outType = this.outType
  1829. }
  1830. }
  1831. var that = this
  1832. this.gridList.agent = this.userInfo.userName;
  1833. this.gridList.carNo = this.gridList.carNumber
  1834. this.gridList.baseId = this.cangid
  1835. this.gridList.warehouseId = this.cangid
  1836. if (this.typevalue == 1) {
  1837. if (this.gridList.inOutType == '移库入库') {
  1838. this.gridList.numberLetter = 'YKRK'
  1839. } else {
  1840. this.gridList.numberLetter = 'CGRK'
  1841. }
  1842. } else {
  1843. this.gridList.numberLetter = 'SGRK'
  1844. }
  1845. this.gridList.warehouseNo = this.commonWarehouseNo
  1846. if (!this.gridList.inOutTaskNo) {
  1847. this.$api.msg('任务编号不能为空')
  1848. return
  1849. }
  1850. if (this.utils.getCurrectRoles('acquisitionQuality.initial')) {
  1851. if (!this.gridList.binNumber) {
  1852. this.$api.msg('仓位不能为空')
  1853. return
  1854. }
  1855. if (this.typevalue == 3) {
  1856. if (!this.gridList.natureOfGrainPurchase) {
  1857. this.$api.msg('购粮性质不能为空')
  1858. return
  1859. }
  1860. }
  1861. if (!this.gridList.type) {
  1862. this.$api.msg('类型不能为空')
  1863. return
  1864. }
  1865. if (this.value == false) {
  1866. if (!this.gridList.grade) {
  1867. this.$api.msg('等级不能为空')
  1868. return
  1869. }
  1870. if (!this.gridList.impurity) {
  1871. this.$api.msg('杂质不能为空')
  1872. return
  1873. }
  1874. if (!this.gridList.waterContent) {
  1875. this.$api.msg('初检水分不能为空')
  1876. return
  1877. }
  1878. // if (!this.gridList.reWaterContent) {
  1879. // this.$api.msg('复检水分不能为空')
  1880. // return
  1881. // }
  1882. if (!this.gridList.mildewGrain) {
  1883. this.$api.msg('霉变粒不能为空')
  1884. return
  1885. }
  1886. if (this.gridList.goodsName != "大豆") {
  1887. if (!this.gridList.bulkDensity) {
  1888. this.$api.msg('容重不能为空')
  1889. return
  1890. }
  1891. }
  1892. if (this.gridList.goodsName == "大豆") {
  1893. if (!this.gridList.protein) {
  1894. this.$api.msg('蛋白不能为空')
  1895. return
  1896. }
  1897. }
  1898. if (!this.gridList.jiaorenli && this.gridList.jiaorenli != 0) {
  1899. this.$api.msg('热损伤不能为空')
  1900. return
  1901. }
  1902. if (!this.gridList.imperfectGrain) {
  1903. this.$api.msg('不完整粒不能为空')
  1904. return
  1905. }
  1906. }
  1907. }
  1908. if (this.isQY) {
  1909. if (this.typevalue == 3) {
  1910. if (!this.gridList.customerName) {
  1911. this.$api.msg('客户不能为空')
  1912. return
  1913. }
  1914. }
  1915. if (!this.gridList.carNumber) {
  1916. this.$api.msg('车牌号不能为空')
  1917. return
  1918. }
  1919. if (this.gridList.carNumber.length != 7) {
  1920. this.$api.msg('车牌号输入错误')
  1921. return
  1922. }
  1923. if (!this.gridList.goodsName) {
  1924. this.$api.msg('货名不能为空')
  1925. return
  1926. }
  1927. }
  1928. // 钎样提交
  1929. if (this.isQY && !this.isZJ) {
  1930. that.gridList.serviceManagementType = that.typevalue
  1931. uni.showModal({
  1932. content: "确定提交钎样信息?",
  1933. showCancel: true,
  1934. confirmText: '提交',
  1935. success: function(res) {
  1936. if (res.confirm) {
  1937. // 收购入库
  1938. if (that.typevalue == 3) {
  1939. uni.showLoading({
  1940. title: "加载中",
  1941. mask: true
  1942. })
  1943. that.cumulant(1)
  1944. return
  1945. }
  1946. uni.showLoading({
  1947. title: "加载中",
  1948. mask: true
  1949. })
  1950. that.gridList.inOutFlag = 2
  1951. that.inOutWarehouse(1)
  1952. }
  1953. }
  1954. })
  1955. } else {
  1956. this.gridList.brazer = 0
  1957. this.getGoodsName()
  1958. }
  1959. // // 质检提交
  1960. // if (!this.isQY && this.isZJ) {
  1961. // }
  1962. },
  1963. gradepicker(e) {
  1964. console.log(e)
  1965. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1966. this.gridList.grade = this.gradeList[e[0]].value
  1967. this.gridList.gradeKey = this.gradeList[e[0]].key
  1968. this.waterContentChange()
  1969. },
  1970. setGoodName(e, status) {
  1971. // console.log(this.goodsList[e[0]].goodsName,111111111)
  1972. //
  1973. // [e[0]] = 0
  1974. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1975. if (this.goodsList[e[0]].goodsName == '玉米') {
  1976. this.gridList.type = '干粮'
  1977. this.edit = true
  1978. } else if (this.goodsList[e[0]].goodsName.indexOf('潮粮') > -1) {
  1979. this.gridList.type = '潮粮'
  1980. this.edit = true
  1981. } else {
  1982. this.gridList.type = '干粮'
  1983. this.edit = false
  1984. }
  1985. var that = this
  1986. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  1987. // this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
  1988. // warehouseId: this.cangid,
  1989. // goodsName: this.gridList.goodsName
  1990. // }).then(res => {
  1991. // if (res.data.data) {
  1992. // uni.hideLoading()
  1993. // // let data = res.data.data
  1994. // // that.gridList =data
  1995. // }
  1996. // })
  1997. uni.setStorageSync('goodsName', this.gridList.goodsName)
  1998. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  1999. if (this.inType == "收购入库") { //收购入库 价格取自合同
  2000. return
  2001. }
  2002. if (!status) {
  2003. uni.showLoading({
  2004. title: '加载中',
  2005. mask: true
  2006. })
  2007. }
  2008. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  2009. warehouseId: this.cangid,
  2010. goodsName: this.gridList.goodsName
  2011. }).then(res => {
  2012. this.gridList.dryGrainPrice = res.data.data
  2013. if (!status) {
  2014. uni.hideLoading()
  2015. }
  2016. })
  2017. }
  2018. this.waterContentChange()
  2019. },
  2020. goodspicker(e) {
  2021. console.log(e)
  2022. this.setGoodName(e)
  2023. },
  2024. typepicker(e) {
  2025. var that = this
  2026. this.gridList.type = this.typeList[e[0]]
  2027. if (this.inType == "收购入库") { //收购入库 价格取自合同
  2028. return
  2029. }
  2030. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  2031. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  2032. warehouseId: this.cangid,
  2033. goodsName: this.gridList.goodsName
  2034. }).then(res => {
  2035. that.gridList.dryGrainPrice = res.data.data
  2036. })
  2037. }
  2038. },
  2039. binNumberpicker(e) {
  2040. console.log(this.warehouseList[e[0]])
  2041. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  2042. this.gridList.positionId = this.warehouseList[e[0]].id
  2043. },
  2044. del(item) {
  2045. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  2046. id: item.id
  2047. }).then(res => {
  2048. if (res.data.code == 200) {
  2049. this.$api.msg('删除成功')
  2050. } else {
  2051. this.$api.msg('系统异常,请联系管理员')
  2052. }
  2053. })
  2054. },
  2055. contactUs() {
  2056. const that = this
  2057. uni.makePhoneCall({
  2058. // 手机号
  2059. phoneNumber: '18241771147',
  2060. // 成功回调
  2061. success: (res) => {},
  2062. // 失败回调
  2063. fail: (res) => {}
  2064. });
  2065. },
  2066. loadData() {
  2067. // const that = this
  2068. // if(uni.getStorageSync("PageCur")){
  2069. // that.PageCur = uni.getStorageSync("PageCur");
  2070. // }
  2071. // that.userInfoTmp = uni.getStorageSync("userInfo")
  2072. // uni.showLoading({
  2073. // title: '正在加载',
  2074. // mask:true
  2075. // })
  2076. // that.$api.request('integral', 'getIndexData', failres => {
  2077. // that.$api.msg(failres.errmsg)
  2078. // uni.hideLoading()
  2079. // }).then(res => {
  2080. // let data = res.data
  2081. // uni.setStorageSync("message", data.message);
  2082. // uni.setStorageSync("task", data.task);
  2083. // uni.setStorageSync("contract", data.contract);
  2084. // uni.setStorageSync('showTran', data.showTran);
  2085. // that.showTran = data.showTran
  2086. // that.gridList[4].tips = data.task
  2087. // that.gridList[2].tips = data.contract
  2088. // that.companyId = data.companyId
  2089. // uni.hideLoading()
  2090. // })
  2091. },
  2092. confirm() {
  2093. const that = this
  2094. if (!that.inputContent) {
  2095. that.$api.msg('输入不能为空')
  2096. return
  2097. }
  2098. let obj = {}
  2099. obj[that.feild] = that.inputContent
  2100. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  2101. that.userInfo.nickname = that.inputContent
  2102. that.inputContent = ''
  2103. that.$store.commit('login', that.userInfo)
  2104. })
  2105. },
  2106. cancel() {
  2107. this.inputShow = false
  2108. this.inputStatus = 'none'
  2109. this.genderShow = false
  2110. },
  2111. myAccount() {
  2112. uni.navigateTo({
  2113. url: `/pageA/pages/contract`
  2114. })
  2115. },
  2116. /**
  2117. * 统一跳转接口,拦截未登录路由
  2118. * navigator标签现在默认没有转场动画,所以用view
  2119. */
  2120. navTo(url) {
  2121. if (!this.hasLogin) {
  2122. url = '/pages/public/login';
  2123. }
  2124. uni.navigateTo({
  2125. url
  2126. })
  2127. },
  2128. mycarClick(carNo) {
  2129. this.modalName = null
  2130. uni.navigateTo({
  2131. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  2132. })
  2133. },
  2134. scanCode() {
  2135. uni.scanCode({
  2136. success: function(res) {
  2137. uni.navigateTo({
  2138. url: res.result
  2139. })
  2140. }
  2141. })
  2142. },
  2143. hideModal(e) {
  2144. this.modalName = null
  2145. },
  2146. }
  2147. }
  2148. </script>
  2149. <style lang='scss' scoped>
  2150. page {
  2151. background: #F5F6FA;
  2152. }
  2153. .title_b {
  2154. margin: 20rpx 20rpx 0rpx 20rpx;
  2155. padding: 20rpx 10rpx 20rpx 10rpx;
  2156. font-size: 18px;
  2157. font-weight: 550;
  2158. }
  2159. .c-row {
  2160. display: -webkit-box;
  2161. display: -webkit-flex;
  2162. display: flex;
  2163. -webkit-box-align: center;
  2164. -webkit-align-items: center;
  2165. align-items: center;
  2166. padding: 20rpx 30rpx;
  2167. position: relative;
  2168. }
  2169. .con-list {
  2170. -webkit-box-flex: 1;
  2171. -webkit-flex: 1;
  2172. flex: 1;
  2173. display: -webkit-box;
  2174. display: -webkit-flex;
  2175. display: flex;
  2176. -webkit-box-orient: vertical;
  2177. -webkit-box-direction: normal;
  2178. -webkit-flex-direction: column;
  2179. flex-direction: column;
  2180. color: #303133;
  2181. line-height: 40rpx;
  2182. text-align: right;
  2183. padding-right: 20rpx;
  2184. }
  2185. .wrap {
  2186. padding-bottom: 10px;
  2187. font-size: 14px;
  2188. background: #fff;
  2189. margin: 10px;
  2190. border-radius: 10px;
  2191. input {
  2192. font-size: 14px;
  2193. }
  2194. >.title {
  2195. padding: 10px 16px;
  2196. }
  2197. }
  2198. .footer {
  2199. background: #fff;
  2200. position: fixed;
  2201. bottom: 0;
  2202. width: 100%;
  2203. padding: 20px 10px;
  2204. z-index: 10;
  2205. .button {
  2206. background: #22C572;
  2207. width: 90%;
  2208. margin: 20rpx auto;
  2209. padding: 10px;
  2210. color: #fff;
  2211. text-align: center;
  2212. border-radius: 30px;
  2213. }
  2214. }
  2215. .buns_item {
  2216. display: flex;
  2217. padding: 80rpx 0 50rpx 0;
  2218. justify-content: space-around;
  2219. }
  2220. .but_css {
  2221. background: #22C572;
  2222. width: 40%;
  2223. padding: 20rpx;
  2224. color: #fff;
  2225. text-align: center;
  2226. border-radius: 20rpx;
  2227. }
  2228. /deep/.u-radio-group {
  2229. flex-direction: row-reverse;
  2230. }
  2231. </style>