add_quality_testing.vue 80 KB

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