add_quality_testing.vue 83 KB

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