add_quality_testing.vue 82 KB

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