add_quality_testing.vue 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498
  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.warehouseCount = Number(options.warehouseCount) + 1
  938. this.warehouseTradeCount = Number(options.warehouseTradeCount) + 1
  939. let number = '000' + this.warehouseCount
  940. number = number.substring(number.length - 4, number.length)
  941. this.gridList.warehouseName = options.warehouseName
  942. // this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
  943. this.cangid = options.cangid
  944. this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  945. id: this.cangid
  946. }).then(res => {
  947. console.log(res)
  948. this.warehouseList = res.data.data.warehousePositionInfoList
  949. })
  950. if (uni.getStorageSync('compName1')) {
  951. this.gridList.compName = uni.getStorageSync('compName1').company
  952. }
  953. this.gridList.person = options.personCharge
  954. this.gridList.personPhone = options.personPhone
  955. this.gridList.qualityInspector = uni.getStorageSync("userInfo").userName
  956. this.gridList.produceDate = date.getFullYear()+'-'+((date.getMonth()+1)>=10?(date.getMonth()+1):'0'+(date.getMonth()+1))+'-'+((date.getDate())>=10?date.getDate():'0'+date.getDate())
  957. // this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  958. // warehouseId: this.cangid
  959. // }).then(res => {
  960. // if (res.data.data) {
  961. // this.setGoodName([0])
  962. // }
  963. // })
  964. this.managementType = options.managementType
  965. let that = this
  966. this.purchasePriceList = uni.getStorageSync('purchasePriceList')
  967. // if (uni.getStorageSync('checkcustomer')) {
  968. // let _customerInfo = uni.getStorageSync('checkcustomer')
  969. // if (_customerInfo.shipperName) {
  970. // this.gridList.identityId = _customerInfo.id
  971. // //点击登记客户
  972. // this.gridList.customerName = _customerInfo.shipperName
  973. // this.gridList.customerPhone = _customerInfo.shipperPhone
  974. // this.gridList.carNumber=_customerInfo.carNo
  975. // } else {
  976. // //点击搜索客户
  977. // this.gridList.customerName = _customerInfo.customerName
  978. // this.gridList.customerPhone = _customerInfo.customerPhone
  979. // }
  980. // this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  981. // }
  982. this.gridList.grade = this.gradeList[1].value
  983. this.gridList.gradeKey = this.gradeList[1].key
  984. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  985. warehouseId: this.cangid
  986. }).then(res => {
  987. if (res.data.data) {
  988. that.goodsList = res.data.data
  989. if (that.goodsList.length > 0) {
  990. that.gridList.goodsName = that.goodsList[0].goodsName
  991. uni.setStorageSync('purchasePriceList', that.goodsList)
  992. that.purchasePriceList = uni.getStorageSync('purchasePriceList')
  993. }
  994. } else if (res.data.code != 200) {
  995. uni.showModal({
  996. content: res.data.message,
  997. showCancel: false
  998. })
  999. }
  1000. })
  1001. console.log(this.gridList)
  1002. this.gridListInit = this.gridList
  1003. },
  1004. async onShow() {
  1005. var that = this
  1006. if(uni.getStorageSync('compName1')){
  1007. that.compName = uni.getStorageSync('compName1').company
  1008. }
  1009. this.isQY = this.utils.getCurrectRoles('acquisitionQuality.qview')
  1010. this.isZJ = this.utils.getCurrectRoles('acquisitionQuality.initial')
  1011. if(!uni.getStorageSync('gridList')){
  1012. if (this.isZJ && !this.isQY) {
  1013. this.typevalue = '1'
  1014. this.contractFlag = 7
  1015. } else {
  1016. this.typevalue = '3'
  1017. this.contractFlag = 10
  1018. }
  1019. }
  1020. uni.showLoading({
  1021. title: '加载中',
  1022. mask: true
  1023. })
  1024. if (this.typevalue == '3') {
  1025. this.flag = 3
  1026. } else {
  1027. this.flag = 2
  1028. }
  1029. await this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  1030. flag: this.flag,
  1031. warehouseName: this.gridList.warehouseName
  1032. }).then(res => {
  1033. for (let i = 0; i < res.data.data.length; i++) {
  1034. this.$set(res.data.data[i], 'inOutTaskNo1', res.data.data[i].inOutTaskNo + (res.data.data[
  1035. i].taskFlag ? '(' + res.data.data[i].taskFlag + ')' : ''))
  1036. }
  1037. // console.log(res.data.data, 22222)
  1038. this.taskNolist = res.data.data
  1039. })
  1040. this.multiSelector1 = [{
  1041. name: '他运',
  1042. value: '他运'
  1043. }]
  1044. await this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  1045. warehouseName: this.gridList.warehouseName
  1046. }).then(res => {
  1047. uni.hideLoading();
  1048. // console.log(2)
  1049. // console.log(res)
  1050. if (res.data.data.contractManagementInfoList) {
  1051. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  1052. res.data.data.contractMangementInfoList[i].name = '自运 (' +
  1053. res.data.data.contractMangementInfoList[i].contractNo + ' ' + res.data.data
  1054. .contractMangementInfoList[i].seller + ')'
  1055. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  1056. }
  1057. } else {
  1058. this.multiSelector1 = [{
  1059. name: '他运',
  1060. value: '他运'
  1061. }]
  1062. }
  1063. // this.taskNolist=res.data.data
  1064. })
  1065. if (uni.getStorageSync('checkcustomer')&&this.typevalue==3) {
  1066. let _customerInfo = uni.getStorageSync('checkcustomer')
  1067. if (_customerInfo.shipperName) {
  1068. this.gridList.identityId = _customerInfo.id
  1069. //点击登记客户
  1070. this.gridList.customerName = _customerInfo.shipperName
  1071. this.gridList.customerPhone = _customerInfo.shipperPhone
  1072. this.gridList.carNumber = _customerInfo.carNo
  1073. } else {
  1074. //点击搜索客户
  1075. this.gridList.customerName = _customerInfo.customerName
  1076. this.gridList.customerPhone = _customerInfo.customerPhone
  1077. }
  1078. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  1079. var that = this
  1080. setTimeout(() => {}, 1000)
  1081. console.log(this.gridList.goodsName)
  1082. if (!this.gridList.goodsName) {
  1083. this.gridList.goodsName = uni.getStorageSync('goodsName')
  1084. }
  1085. if (this.gridList.goodsName) {
  1086. uni.showLoading({
  1087. title: '加载中',
  1088. mask: true
  1089. })
  1090. await this.$api.doRequest('get',
  1091. '/qualityInspectionManagement/getQualityInspectionManagementMap', {
  1092. goodsName: this.gridList.goodsName,
  1093. compId: uni.getStorageSync('pcUserInfo').compId,
  1094. customerNumberCard: this.gridList.customerNumberCard,
  1095. warehouseName: this.gridList.warehouseName
  1096. }).then(res => {
  1097. uni.hideLoading();
  1098. if (res.data.data.A + res.data.data.B + res.data.data.C * 50 > res.data.data.D - 50) {
  1099. that.redstatus = true
  1100. } else {
  1101. that.redstatus = false
  1102. }
  1103. var a = res.data.data.A > 0 ? '已完成' + Number(res.data.data.A).toFixed(2) + '吨,' : ''
  1104. var b = res.data.data.B > 0 ? '进行中' + Number(res.data.data.B).toFixed(2) + '吨,' : ''
  1105. var c = res.data.data.C > 0 ? '未称重' + Number(res.data.data.C) + '车' : ''
  1106. that.gridList.volumeofbusiness = a + b + c
  1107. console.log(that.gridList.volumeofbusiness)
  1108. that.$forceUpdate()
  1109. })
  1110. }
  1111. }
  1112. if(uni.getStorageSync('gridList')&&this.typevalue==1){
  1113. if(uni.getStorageSync('typevalue')){
  1114. this.typevalue=uni.getStorageSync('typevalue')
  1115. }
  1116. this.gridList=uni.getStorageSync('gridList')
  1117. if(uni.getStorageSync('carNo')){
  1118. this.gridList.carNumber=uni.getStorageSync('carNo')
  1119. this.gridList.shipId=uni.getStorageSync('checkcustomer').shipId
  1120. }
  1121. }
  1122. },
  1123. methods: {
  1124. onError(error) {
  1125. alert(error)
  1126. console.log('------------error-----------')
  1127. console.log(error)
  1128. },
  1129. onProgress(e) {
  1130. console.log(e)
  1131. },
  1132. radioGroupChange(e){
  1133. console.log(e)
  1134. this.gridList.specifications=e
  1135. },
  1136. change1(e) {
  1137. this.gridList.produceDate=e.result
  1138. console.log(e);
  1139. },
  1140. onRemove(index,i) {
  1141. console.log(index,i)
  1142. if(i==0){
  1143. this.imglist.splice(index, 1)
  1144. this.gridList.polluteUrl=this.imglist.toString()
  1145. }else{
  1146. this.imglist1.splice(index, 1)
  1147. this.gridList.wornUrl=this.imglist1.toString()
  1148. }
  1149. console.log(this.imglist,this.imglist1)
  1150. },
  1151. carchange(){
  1152. uni.setStorageSync('typevalue', this.typevalue)
  1153. uni.setStorageSync('gridList', this.gridList)
  1154. uni.navigateTo({
  1155. url: '/pages/erpbusiness/customercar?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  1156. .warehouseName + '&goodsName=' + this.gridList.goodsName
  1157. })
  1158. },
  1159. getImgUrl(res,status) {
  1160. var that = this
  1161. this.$api.doRequest('post', '/appendix/api/saveFilesApp', {
  1162. newAppendixs: [res.data],
  1163. oldAppendixIds: ""
  1164. }).then(res1 => {
  1165. if(status==0){
  1166. that.imglist.push(res1.data.data[0])
  1167. that.gridList.polluteUrl=that.imglist.toString()
  1168. }else{
  1169. that.imglist1.push(res1.data.data[0])
  1170. that.gridList.wornUrl=that.imglist1.toString()
  1171. }
  1172. console.log(res)
  1173. })
  1174. },
  1175. colorLustreClick(e) {
  1176. this.gridList.colorLustre = this.colorLustreList[e[0]].value
  1177. },
  1178. transgeneClick(e) {
  1179. this.gridList.transgene = this.transgeneList[e[0]].value
  1180. },
  1181. Cancelword() {
  1182. this.bottomHeight = '10rpx';
  1183. this.MykeywordShow = false;
  1184. this.InputEvent = '';
  1185. },
  1186. goNext(val) {
  1187. var inputList = Equ_List;
  1188. if (this.menuIndex == 1) {
  1189. inputList = Sign_List;
  1190. }
  1191. var index = inputList.indexOf(val);
  1192. this.setScrollTops(val);
  1193. if (index < inputList.length - 1) {
  1194. this.InputEvent = inputList[index + 1];
  1195. } else {
  1196. this.InputEvent = ''
  1197. this.bottomHeight = '10rpx';
  1198. this.MykeywordShow = false;
  1199. }
  1200. },
  1201. mykeywordset(datatxt) {
  1202. var arr = JSON.parse(datatxt);
  1203. this.gridList[arr.even] = arr.value;
  1204. if (arr.even == 'waterContent') {
  1205. this.waterContentChange()
  1206. } else if (arr.even == 'bulkDensity') {
  1207. this.obtainPrice()
  1208. }
  1209. },
  1210. SetInputKey(even) {
  1211. uni.hideKeyboard();
  1212. this.InputEvent = even;
  1213. this.setScrollTops(even);
  1214. if (!this.MykeywordShow) {
  1215. this.bottomHeight = '320rpx';
  1216. this.MykeywordShow = true;
  1217. }
  1218. },
  1219. setScrollTops(even) {
  1220. var inputList = Equ_List;
  1221. var index = inputList.indexOf(even);
  1222. this.viewTop = (index + 1) * 60 + 100;
  1223. },
  1224. pricefocus(e, status) {
  1225. console.log(e)
  1226. if (status == 1) {
  1227. if (e.detail.value == 0) {
  1228. this.gridList.waterPriceIncrease = ''
  1229. }
  1230. } else if (status == 2) {
  1231. if (e.detail.value == 0) {
  1232. this.gridList.waterPriceDeduction = ''
  1233. }
  1234. } else if (status == 3) {
  1235. if (e.detail.value == 0) {
  1236. this.gridList.qualityPriceIncrease = ''
  1237. }
  1238. } else if (status == 4) {
  1239. if (e.detail.value == 0) {
  1240. this.gridList.qualityPriceDeduction = ''
  1241. }
  1242. }
  1243. },
  1244. deductionchange() {
  1245. if (this.gridList.type == '干粮') {
  1246. if (this.dryGrainPrice != '') {
  1247. console.log(Number(this.dryGrainPrice + (this.gridList.waterPriceIncrease / 1000) - (this.gridList
  1248. .waterPriceDeduction / 1000) + (this.gridList.qualityPriceIncrease / 1000) - (this
  1249. .gridList.qualityPriceDeduction / 1000)), Number(this.dryGrainPrice + (this.gridList
  1250. .waterPriceIncrease / 1000) - (this.gridList.waterPriceDeduction / 1000) + (this
  1251. .gridList.qualityPriceIncrease / 1000) - (this.gridList.qualityPriceDeduction /
  1252. 1000)).toFixed(2))
  1253. this.gridList.dryGrainPrice = Number(this.dryGrainPrice + (this.gridList.waterPriceIncrease /
  1254. 1000) - (this.gridList.waterPriceDeduction / 1000) + (this.gridList
  1255. .qualityPriceIncrease /
  1256. 1000) - (this.gridList.qualityPriceDeduction / 1000)).toFixed(4)
  1257. }
  1258. } else if (this.gridList.type == '潮粮') {
  1259. if (this.tidalGrainPrice != '') {
  1260. this.gridList.tidalGrainPrice = Number(this.tidalGrainPrice + (this.gridList.waterPriceIncrease /
  1261. 1000) - (this.gridList.waterPriceDeduction / 1000) + (this.gridList
  1262. .qualityPriceIncrease / 1000) - (this.gridList.qualityPriceDeduction / 1000)).toFixed(4)
  1263. }
  1264. }
  1265. this.$forceUpdate()
  1266. },
  1267. carNopicker(e) {
  1268. this.gridList.carNumber = this.tranCarInfoList[e[0]].carNo
  1269. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1270. if (i == e[0]) {
  1271. this.gridList.carNo = this.tranCarInfoList[i].carNo
  1272. this.gridList.carNoCopy = this.tranCarInfoList[i].carNo + '(' + this.tranCarInfoList[i].tranCarNo +
  1273. ')'
  1274. this.gridList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  1275. this.gridList.carId = this.tranCarInfoList[i].id
  1276. this.gridList.freight = Math.round(
  1277. this.tranCarInfoList[i].tranPrice
  1278. )
  1279. if (this.gridList.inOutType == '移库入库') {
  1280. if (!this.gridList.cost) {
  1281. this.gridList.cost = this.tranCarInfoList[i].cost
  1282. }
  1283. this.gridList.loadNetWeight =
  1284. this.tranCarInfoList[i].loadNetWeight
  1285. }
  1286. }
  1287. }
  1288. },
  1289. obtainPrice() { //根据容重获取价格
  1290. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  1291. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1292. let quality = this.gridList.goodsName == '大豆' ? this.gridList.protein : this.gridList.bulkDensity
  1293. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1294. warehouseId: this.cangid,
  1295. goodsName: this.gridList.goodsName,
  1296. bulkDensity: quality
  1297. }).then(res => {
  1298. if (res.data.data != 0) {
  1299. this.gridList.dryGrainPrice = res.data.data
  1300. this.dryGrainPrice = res.data.data
  1301. this.gridList.waterPriceIncrease = 0
  1302. this.gridList.waterPriceDeduction = 0
  1303. this.gridList.qualityPriceIncrease = 0
  1304. this.gridList.qualityPriceDeduction = 0
  1305. }
  1306. })
  1307. // }
  1308. }
  1309. },
  1310. changeprice() {
  1311. if (this.pricetext == '解锁') {
  1312. this.pricedisabled = false
  1313. this.pricetext = '锁定'
  1314. } else {
  1315. this.pricedisabled = true
  1316. this.pricetext = '解锁'
  1317. }
  1318. },
  1319. inputprice() {
  1320. if (this.pricetext == '锁定') {
  1321. this.pricedisabled = true
  1322. this.pricetext = '解锁'
  1323. }
  1324. console.log(this.gridList.dryGrainPrice, this.gridList.tidalGrainPrice)
  1325. if (this.gridList.type == '干粮') {
  1326. this.dryGrainPrice = this.gridList.dryGrainPrice
  1327. }
  1328. if (this.gridList.type == '潮粮') {
  1329. this.tidalGrainPrice = this.gridList.tidalGrainPrice
  1330. }
  1331. },
  1332. groupChange(e) {
  1333. console.log(e, this.gridListInit)
  1334. this.gridListInit.warehouseName = this.gridList.warehouseName
  1335. if (uni.getStorageSync('checkcustomer')) {
  1336. uni.setStorageSync('checkcustomer', '')
  1337. this.gridListInit.identityId = ''
  1338. this.gridListInit.customerName = ''
  1339. this.gridListInit.customerPhone = ''
  1340. this.gridListInit.carNumber = ''
  1341. this.gridListInit.customerNumberCard = ''
  1342. this.$forceUpdate()
  1343. }
  1344. // this.gridList = JSON.parse(JSON.stringify(this.gridListInit))
  1345. this.gridList = this.$u.deepClone(this.gridListInit)
  1346. this.gridList.serviceManagementType = e
  1347. if (e == 1) {
  1348. if (this.flag != 2) {
  1349. this.gridList.inOutTaskNo = ''
  1350. this.gridList.contractNo = ''
  1351. }
  1352. this.gridList.qualityNo = ''
  1353. this.flag = 2
  1354. // this.contractFlag = 7
  1355. } else {
  1356. if (this.flag != 3) {
  1357. this.gridList.inOutTaskNo = ''
  1358. this.gridList.contractNo = ''
  1359. }
  1360. this.flag = 3
  1361. // this.contractFlag = 10
  1362. // let number = '000' + this.warehouseCount
  1363. // number = number.substring(number.length - 4, number.length)
  1364. // this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
  1365. }
  1366. this.gridList.grade = this.gradeList[1].value
  1367. this.gridList.gradeKey = this.gradeList[1].key
  1368. this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  1369. flag: this.flag,
  1370. warehouseName: this.gridList.warehouseName
  1371. }).then(res => {
  1372. console.log(res)
  1373. for (let i = 0; i < res.data.data.length; i++) {
  1374. this.$set(res.data.data[i], 'inOutTaskNo1', res.data.data[i].inOutTaskNo + (res.data.data[
  1375. i].taskFlag ? '(' + res.data.data[i].taskFlag + ')' : ''))
  1376. }
  1377. this.taskNolist = res.data.data
  1378. })
  1379. console.log(this.gridList, 111111111111)
  1380. },
  1381. outtypepicker(e, status) {
  1382. console.log(e, status)
  1383. if (status == 0) {
  1384. this.gridList.outType = this.multiSelector[e[0]].name
  1385. } else {
  1386. if (this.multiSelector1[e[0]].name == '他运') {
  1387. this.goodsdisabled = false
  1388. this.gridList.outType = this.multiSelector1[e[0]].name
  1389. } else {
  1390. this.gridList.outType = '自运'
  1391. this.goodsdisabled = true
  1392. this.outType = this.multiSelector1[e[0]].name
  1393. this.gridList.contractNo = this.multiSelector1[i].contractNo
  1394. // if (this.gridList.contractNo == this.contractNolist[i].contractNo) {
  1395. // this.gridList.goodsName = this.outContractNo[q].goodsName
  1396. // this.gridList.goodsNameKey = this.outContractNo[q].goodsNameKey
  1397. // }
  1398. this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
  1399. contractNo: this.gridList.contractNo,
  1400. compId: uni.getStorageSync('pcUserInfo').compId
  1401. }).then(res => {
  1402. this.contractNolist = res.data.data
  1403. this.gridList.goodsName = this.contractNolist.goodsName
  1404. this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
  1405. })
  1406. this.waterContentChange()
  1407. }
  1408. }
  1409. console.log(this.gridList.outType)
  1410. },
  1411. changefreight() {
  1412. this.freightstatus = !this.freightstatus
  1413. if (this.freightstatus) {
  1414. this.freighttext = '自动获取'
  1415. } else {
  1416. this.freighttext = '手动填写'
  1417. }
  1418. },
  1419. changecost() {
  1420. this.coststatus = !this.coststatus
  1421. if (this.coststatus) {
  1422. this.costtext = '自动获取'
  1423. } else {
  1424. this.costtext = '手动填写'
  1425. }
  1426. },
  1427. inOutDatepicker(e) {
  1428. this.gridList.inOutDate = e.year + '-' + e.month + '-' + e.day
  1429. console.log(e)
  1430. },
  1431. fleetpicker(e) {
  1432. this.gridList.fleet = this.fleetNameList[e[0]].fleetName
  1433. },
  1434. change(e) {
  1435. if (e) {
  1436. this.gridList.supplementaryRecording = 1
  1437. } else {
  1438. this.gridList.supplementaryRecording = 0
  1439. }
  1440. },
  1441. tasknopicker(e) {
  1442. console.log("切换任务编号", e)
  1443. this.gridList.inOutTaskNo = this.taskNolist[e[0]].inOutTaskNo
  1444. this.gridList.inOutTaskNo1 = this.taskNolist[e[0]].inOutTaskNo1
  1445. this.gridList.taskFlag = this.taskNolist[e[0]].taskFlag
  1446. var data = this.taskNolist[e[0]]
  1447. this.gridList.donecount = data.completedQuantity + '/' + data.weight
  1448. if (this.taskNolist[e[0]].inOutType == '收购入库') {
  1449. this.gridList.contractNo = this.taskNolist[e[0]].contractNo
  1450. this.inType = this.taskNolist[e[0]].inOutType
  1451. this.gridList.goodsName = this.taskNolist[e[0]].goodsName
  1452. if (this.taskNolist[e[0]].goodsName.indexOf("潮粮") != -1) { //收购从合同中带出货名 单价等信息 用货名是否带有潮粮字符来判断干潮类型
  1453. this.gridList.type = "潮粮"
  1454. this.gridList.imperfectGrain = 8
  1455. this.gridList.impurity = 1
  1456. this.gridList.mildewGrain = 2
  1457. this.gridList.jiaorenli = 0
  1458. } else {
  1459. this.gridList.type = "干粮"
  1460. this.gridList.imperfectGrain = 8
  1461. this.gridList.impurity = 1
  1462. this.gridList.mildewGrain = 2
  1463. this.gridList.jiaorenli = 1
  1464. }
  1465. }
  1466. if (this.taskNolist[e[0]].contractNo) {
  1467. this.gridList.contractNo = this.taskNolist[e[0]].contractNo
  1468. } else {
  1469. this.gridList.contractNo = this.taskNolist[e[0]].moveTaskNo
  1470. }
  1471. this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
  1472. contractNo: this.gridList.contractNo,
  1473. compId: uni.getStorageSync('pcUserInfo').compId
  1474. }).then(res => {
  1475. this.contractNolist = res.data.data
  1476. this.gridList.pointOut =this.contractNolist.pointOut
  1477. if (this.typevalue == 3) {
  1478. var gooddata = this.goodsList.filter((item) => {
  1479. return item.goodsName == this.contractNolist.goodsName
  1480. })
  1481. if (this.contractNolist.priceType == "定价收购" && this.inType == "收购入库") {
  1482. this.gridList.dryGrainPrice = Number(this.contractNolist.unitContractPrice / 1000)
  1483. .toFixed(3)
  1484. }
  1485. if (gooddata.length > 0) {
  1486. // 收购入库
  1487. for (let q = 0; q < this.goodsList.length; q++) {
  1488. if (this.goodsList[q].goodsName == this.contractNolist.goodsName) {
  1489. this.gridList.goodsName = this.contractNolist.goodsName
  1490. this.setGoodName([q])
  1491. }
  1492. }
  1493. } else {
  1494. if (this.inType == "收购入库") {
  1495. //收购入库不校验仓库设置中的货名
  1496. uni.showModal({
  1497. title: '提示',
  1498. content: '仓库设置中无该合同货名',
  1499. showCancel: false,
  1500. confirmText: '返回',
  1501. success: function(res) {
  1502. if (res.confirm) {
  1503. uni.navigateBack({
  1504. delta: 1
  1505. })
  1506. }
  1507. }
  1508. });
  1509. }
  1510. }
  1511. } else {
  1512. this.gridList.goodsName = this.contractNolist.goodsName
  1513. if (this.gridList.goodsName == '玉米') {
  1514. this.gridList.type = '干粮'
  1515. this.gridList.imperfectGrain = 8
  1516. this.gridList.impurity = 1
  1517. this.gridList.mildewGrain = 2
  1518. this.gridList.jiaorenli = 1
  1519. if (this.contractNolist.priceType != '随行就市') {
  1520. this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
  1521. .toFixed(3)
  1522. }
  1523. this.edit = true
  1524. } else if (this.gridList.goodsName.indexOf('潮粮') > -1) {
  1525. this.gridList.type = '潮粮'
  1526. this.edit = true
  1527. if (this.contractNolist.priceType != '随行就市') {
  1528. this.gridList.tidalGrainPrice = this.contractNolist.contractPrice
  1529. this.tidalGrainPrice = this.contractNolist.contractPrice
  1530. }
  1531. this.gridList.imperfectGrain = 8
  1532. this.gridList.impurity = 1
  1533. this.gridList.mildewGrain = 2
  1534. this.gridList.jiaorenli = 0
  1535. } else {
  1536. this.gridList.type = '干粮'
  1537. this.gridList.imperfectGrain = 8
  1538. this.gridList.impurity = 1
  1539. this.gridList.mildewGrain = 2
  1540. this.gridList.jiaorenli = 1
  1541. this.edit = false
  1542. if (this.contractNolist.priceType != '随行就市') {
  1543. this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
  1544. .toFixed(3)
  1545. }
  1546. }
  1547. }
  1548. this.deliverType=this.contractNolist.deliverType
  1549. this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
  1550. this.gridList.grade = this.gradeList[1].value
  1551. this.gridList.gradeKey = this.gradeList[1].key
  1552. // this.gridList.grade = this.contractNolist.grade
  1553. this.gridList.inOutType = this.contractNolist.inOutType
  1554. if (this.gridList.goodsName == "大豆") { //货名为大豆是设置默认
  1555. this.gridList.transgene = "非转基因"
  1556. this.gridList.reTransgene = "非转基因"
  1557. this.gridList.colorLustre = "正常"
  1558. this.gridList.reColorLustre = "正常"
  1559. } else {
  1560. delete this.gridList.transgene
  1561. delete this.gridList.reTransgene
  1562. delete this.gridList.colorLustre
  1563. delete this.gridList.reColorLustre
  1564. }
  1565. if (this.gridList.inOutType == '采购入库') {
  1566. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  1567. // this.gridList.qualityNo='CGRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  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. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  1578. // this.gridList.qualityNo='YKRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  1579. if (this.contractNolist.unitContractPrice) {
  1580. this.gridList.tips = '出货库' + data.sendWarehouse + ' (' + this.contractNolist
  1581. .unitContractPrice + '元/吨)'
  1582. } else {
  1583. this.gridList.tips = '出货库' + data.sendWarehouse
  1584. }
  1585. this.gridList.inOutTypeKey = 3
  1586. } else if (this.contractNolist.inOutType == '移库出库') {
  1587. this.gridList.tips = '入货库' + data.receiveWarehouse
  1588. } else if (this.contractNolist.inOutType == '暂存入库') {
  1589. this.gridList.inOutTypeKey = 4
  1590. } else if (this.contractNolist.inOutType == '贸易服务入库') {
  1591. this.gridList.inOutTypeKey = 5
  1592. } else if (this.contractNolist.inOutType == '退库') {
  1593. //退库有无运输任务标识
  1594. this.gridList.tranTaskFlag = this.contractNolist.tranTaskFlag
  1595. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  1596. // this.gridList.qualityNo = 'CGRK' + this.getdate() + this.commonWarehouseNo + this
  1597. // .warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  1598. if (this.contractNolist.contractNo) {
  1599. this.gridList.tips = '买方' + this.contractNolist.buyer
  1600. } else {
  1601. this.gridList.tips = '出货库' + data.sendWarehouse
  1602. }
  1603. this.gridList.inOutTypeKey = 6
  1604. }
  1605. this.cost = this.contractNolist.contractPrice
  1606. if (this.cost) {
  1607. this.isGetCost = true
  1608. this.gridList.cost = this.cost - this.gridList.deductionAmount
  1609. } else {
  1610. this.isGetCost = false
  1611. this.gridList.cost = this.gridList.cost
  1612. }
  1613. if (this.contractNolist.inOutType == '移库入库') {
  1614. this.isSelectType = false
  1615. } else {
  1616. this.isSelectType = true
  1617. }
  1618. if (this.contractNolist.priceType == '随行就市') {
  1619. this.disabled1 = true
  1620. } else {
  1621. this.disabled1 = false
  1622. }
  1623. if (this.contractNolist.deliverType == '1') {
  1624. this.carstatus = true
  1625. } else {
  1626. this.carstatus = false
  1627. }
  1628. this.tranCarInfoList = []
  1629. if (this.contractNolist.tranCarInfoList) {
  1630. for (var q = 0; q < this.contractNolist.tranCarInfoList.length; q++) {
  1631. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList[q]
  1632. .carNo
  1633. if (this.contractNolist.tranCarInfoList[q].tranCarNo) {
  1634. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist
  1635. .tranCarInfoList[q].carNo + '(' + this.contractNolist.tranCarInfoList[q]
  1636. .tranCarNo + ')'
  1637. } else {
  1638. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList
  1639. .carNo
  1640. }
  1641. }
  1642. this.tranCarInfoList = this.contractNolist.tranCarInfoList
  1643. // this.carstatus = true
  1644. } else {
  1645. this.tranCarInfoList = []
  1646. }
  1647. this.fleetNameList = this.contractNolist.tranCarInfoList1
  1648. if (this.gridList.goodsName && this.gridList.customerNumberCard) {
  1649. uni.showLoading({
  1650. title: '加载中',
  1651. mask: true
  1652. })
  1653. let that = this
  1654. this.$api.doRequest('get',
  1655. '/qualityInspectionManagement/getQualityInspectionManagementMap', {
  1656. goodsName: this.gridList.goodsName,
  1657. compId: uni.getStorageSync('pcUserInfo').compId,
  1658. customerNumberCard: this.gridList.customerNumberCard
  1659. }).then(res => {
  1660. uni.hideLoading();
  1661. if (res.data.data.A + res.data.data.B + res.data.data.C * 50 > res.data.data
  1662. .D - 50) {
  1663. that.redstatus = true
  1664. } else {
  1665. that.redstatus = false
  1666. }
  1667. var a = res.data.data.A > 0 ? '已完成' + Number(res.data.data.A).toFixed(2) +
  1668. '吨,' : ''
  1669. var b = res.data.data.B > 0 ? '进行中' + Number(res.data.data.B).toFixed(2) +
  1670. '吨,' : ''
  1671. var c = res.data.data.C > 0 ? '未称重' + Number(res.data.data.C) + '车' : ''
  1672. that.gridList.volumeofbusiness = a + b + c
  1673. console.log(that.gridList.volumeofbusiness)
  1674. that.$forceUpdate()
  1675. })
  1676. }
  1677. })
  1678. this.$forceUpdate()
  1679. console.log(this.gridList)
  1680. },
  1681. print() {
  1682. console.log(this.printId)
  1683. if (this.printId) {
  1684. uni.showLoading({
  1685. title: "加载中",
  1686. mask: true
  1687. })
  1688. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  1689. id: this.printId
  1690. }).then(res => {
  1691. uni.hideLoading()
  1692. uni.setStorageSync("quality_print", res.data.data)
  1693. uni.navigateTo({
  1694. url: '/pages/erpbusiness/bleConnect'
  1695. })
  1696. })
  1697. }
  1698. },
  1699. close() {
  1700. this.isShowPrint = false
  1701. uni.navigateBack({})
  1702. },
  1703. hidden() {
  1704. this.$refs.keyboard.open(false)
  1705. },
  1706. handleShowKeyboard() {
  1707. if (this.$refs.keyboard.open) {
  1708. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  1709. } else {
  1710. this.$refs.keyboard[0].open(true)
  1711. }
  1712. },
  1713. handleShowKeyboard1() {
  1714. if (this.$refs.keyboard1.open) {
  1715. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  1716. } else {
  1717. this.$refs.keyboard1[0].open(true)
  1718. }
  1719. },
  1720. handleClick(e) {
  1721. this.gridList.carNumber = e.value //键盘输入值
  1722. },
  1723. cancelClick() {
  1724. this.isShowAlert = false
  1725. },
  1726. waterContentChange() {
  1727. var that = this
  1728. if (this.gridList.goodsName) {
  1729. for (var i = 0; i < this.purchasePriceList.length; i++) {
  1730. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  1731. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  1732. this.gridList.paramType = this.purchasePriceList[i].paramType
  1733. }
  1734. }
  1735. }
  1736. if (this.inType != "收购入库") { //非收购入库 价格取自合同
  1737. return
  1738. }
  1739. if (this.gridList.goodsName && this.cangid) {
  1740. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1741. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1742. warehouseId: this.cangid,
  1743. goodsName: this.gridList.goodsName
  1744. }).then(res => {
  1745. that.gridList.dryGrainPrice = res.data.data
  1746. that.dryGrainPrice = res.data.data
  1747. })
  1748. }
  1749. }
  1750. that.gridList.waterPriceIncrease = 0
  1751. that.gridList.waterPriceDeduction = 0
  1752. that.gridList.qualityPriceIncrease = 0
  1753. that.gridList.qualityPriceDeduction = 0
  1754. //潮粮单价改变事件
  1755. if (
  1756. this.gridList.goodsName &&
  1757. this.gridList.waterContent &&
  1758. this.gridList.grade
  1759. ) {
  1760. uni.showLoading({
  1761. title: "加载中",
  1762. mask: true
  1763. })
  1764. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1765. warehouseId: this.cangid,
  1766. goodsName: this.gridList.goodsName,
  1767. waterContent: this.gridList.waterContent,
  1768. grade: this.gridList.grade,
  1769. }).then(res => {
  1770. if (that.gridList.paramType == '1') {
  1771. // console.log(that.gridList)
  1772. if (that.gridList.buckleMiscellaneous) {
  1773. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(
  1774. that
  1775. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1776. .dryGrainPrice)).toFixed(4)
  1777. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1778. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1779. .dryGrainPrice)).toFixed(4)
  1780. }
  1781. if (!that.gridList.tidalGrainPrice) {
  1782. that.gridList.tidalGrainPrice = ''
  1783. }
  1784. if (that.gridList.type == '干粮') {
  1785. that.gridList.dryGrainPrice = res.data.data
  1786. that.dryGrainPrice = that.gridList.dryGrainPrice
  1787. }
  1788. } else {
  1789. that.gridList.tidalGrainPrice = res.data.data
  1790. if (that.gridList.type == '干粮') {
  1791. that.gridList.dryGrainPrice = res.data.data
  1792. that.dryGrainPrice = that.gridList.dryGrainPrice
  1793. } else {
  1794. that.gridList.tidalGrainPrice = res.data.data
  1795. that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1796. }
  1797. }
  1798. uni.hideLoading()
  1799. })
  1800. }
  1801. },
  1802. gocustomer() {
  1803. uni.navigateTo({
  1804. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  1805. .warehouseName + '&goodsName=' + this.gridList.goodsName
  1806. })
  1807. },
  1808. getdate() {
  1809. var date = new Date()
  1810. var year = date.getFullYear() //获取完整的年份(4位)
  1811. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  1812. var datetime = date.getDate() //获取当前日(1-31)
  1813. if (mouth < 10) {
  1814. mouth = '0' + mouth
  1815. }
  1816. if (datetime < 10) {
  1817. datetime = '0' + datetime
  1818. }
  1819. return year + '' + mouth + '' + datetime
  1820. },
  1821. async addQualityInspection(type) {
  1822. if (type == 1) {
  1823. await this.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection', this
  1824. .gridList)
  1825. .then(res => {
  1826. console.log(res)
  1827. this.printId = res.data.data
  1828. uni.hideLoading()
  1829. // if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
  1830. // -1) ||
  1831. // (this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
  1832. // -1)) {
  1833. if (res.data.code == 200) {
  1834. console.log("addQualityInspection")
  1835. this.$api.msg('提交成功')
  1836. this.gridList.warehouseId = this.cangid
  1837. this.gridList.compId = uni.getStorageSync(
  1838. 'pcUserInfo').compId
  1839. uni.setStorageSync("quality_print", this.gridList)
  1840. uni.setStorageSync('typevalue', 3)
  1841. uni.setStorageSync('gridList', {})
  1842. if (this.isZJ) {
  1843. this.isShowPrint = true
  1844. } else {
  1845. uni.navigateBack({})
  1846. }
  1847. console.log('that.gridList', this.gridList)
  1848. // uni.navigateBack({})
  1849. }
  1850. else if(res.data.message == '货物种类与类型不符,请确认!'){
  1851. this.$api.msg(res.data.message)
  1852. }else {
  1853. this.$api.msg('提交失败')
  1854. }
  1855. // } else {
  1856. // this.$api.msg('货物种类与类型不符,请确认')
  1857. // }
  1858. })
  1859. return
  1860. }
  1861. if (type == 2) {
  1862. await this.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection', this
  1863. .gridList)
  1864. .then(res => {
  1865. console.log("addQualityInspection")
  1866. this.printId = res.data.data
  1867. uni.hideLoading()
  1868. // if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
  1869. // -1) ||
  1870. // (this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
  1871. // -1)) {
  1872. if (res.data.code == 200) {
  1873. this.$api.msg('提交成功')
  1874. this.gridList.warehouseId = this.cangid
  1875. this.gridList.compId = uni.getStorageSync('pcUserInfo').compId
  1876. uni.setStorageSync("quality_print", this.gridList)
  1877. if (this.isZJ) {
  1878. this.isShowPrint = true
  1879. } else {
  1880. uni.navigateBack({})
  1881. }
  1882. uni.setStorageSync(
  1883. 'checkcustomer', {}
  1884. )
  1885. uni.setStorageSync('typevalue', 3)
  1886. uni.setStorageSync('gridList', {})
  1887. console.log('that.gridList', this.gridList)
  1888. // uni.navigateBack({})
  1889. } else if(res.data.message == '货物种类与类型不符,请确认!'){
  1890. this.$api.msg(res.data.message)
  1891. }
  1892. else {
  1893. this.$api.msg('提交失败')
  1894. }
  1895. // } else {
  1896. // this.$api.msg('货物种类与类型不符,请确认')
  1897. // }
  1898. })
  1899. }
  1900. },
  1901. async inOutWarehouse(type) {
  1902. if (type == 1) {
  1903. await this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.gridList)
  1904. .then(res => {
  1905. console.log("InOutWarehouse")
  1906. this.gridList.warehouseInOutId = res.data.data
  1907. if (this.gridList.warehouseInOutId) {
  1908. this.addQualityInspection(1)
  1909. }
  1910. })
  1911. return
  1912. }
  1913. if (type == 2) {
  1914. await this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.gridList)
  1915. .then(res => {
  1916. console.log("InOutWarehouse")
  1917. if (this.isQY) {
  1918. if (!this.isZJ) {
  1919. this.gridList.brazer = 1
  1920. this.gridList.statusFlag = 7
  1921. } else {
  1922. this.gridList.statusFlag = 0
  1923. }
  1924. }
  1925. this.gridList.warehouseInOutId = res.data.data
  1926. if (this.gridList.warehouseInOutId) {
  1927. this.addQualityInspection(2)
  1928. }
  1929. })
  1930. return
  1931. }
  1932. },
  1933. async cumulant(type) {
  1934. if (type == 1) {
  1935. await this.$api.doRequest('get', '/paymentManagement/cumulant', {
  1936. compId: uni.getStorageSync('pcUserInfo').compId,
  1937. customerNumberCard: this.gridList.customerNumberCard,
  1938. goodsName: this.gridList.goodsName,
  1939. })
  1940. .then(response => {
  1941. console.log("cumulant")
  1942. if (response.data.code == 200) {
  1943. for (let i = 0; i < this.purchasePriceList.length; i++) {
  1944. if (this.gridList.goodsName == this.purchasePriceList[i].goodsName) {
  1945. let count = (this.purchasePriceList[i].saleLimit - response.data.data /
  1946. 1000)
  1947. .toFixed(2)
  1948. console.log(count, this.purchasePriceList[i].saleLimit, response.data.data)
  1949. if (Number(count) <= 0) {
  1950. count = 0
  1951. this.$api.msg('该客户累计销售' + this.gridList.goodsName + (response.data
  1952. .data /
  1953. 1000).toFixed(2) + '吨,还可售粮' + count + '吨', )
  1954. uni.hideLoading()
  1955. break;
  1956. }
  1957. this.gridList.inOutFlag = 2
  1958. this.inOutWarehouse(2)
  1959. }
  1960. }
  1961. }
  1962. })
  1963. return
  1964. }
  1965. },
  1966. async getGoodsName() {
  1967. let that = this
  1968. await this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  1969. warehouseId: this.cangid
  1970. }).then(res => {
  1971. if (res.data.code != 200 && that.typevalue == 3) {
  1972. uni.showModal({
  1973. content: res.data.message,
  1974. showCancel: false
  1975. })
  1976. return;
  1977. }
  1978. uni.showModal({
  1979. content: "确定提交质检信息?",
  1980. showCancel: true,
  1981. confirmText: '提交',
  1982. success: function(res) {
  1983. if (res.confirm) {
  1984. that.gridList.serviceManagementType = that.typevalue
  1985. if (that.typevalue == 3) {
  1986. that.cumulant(1)
  1987. return
  1988. }
  1989. that.gridList.inOutFlag = 2
  1990. that.inOutWarehouse(1)
  1991. // that.addQualityInspection(1)
  1992. }
  1993. }
  1994. })
  1995. })
  1996. },
  1997. submit() {
  1998. console.log(this.isQY, "isQY")
  1999. console.log(this.isZJ, "isZJ")
  2000. if (this.typevalue == 3) {
  2001. if (this.outType) {
  2002. this.gridList.outType = this.outType
  2003. }
  2004. }
  2005. var that = this
  2006. this.gridList.agent = this.userInfo.userName;
  2007. this.gridList.carNo = this.gridList.carNumber
  2008. this.gridList.baseId = this.cangid
  2009. this.gridList.warehouseId = this.cangid
  2010. if (this.typevalue == 1) {
  2011. if (this.gridList.inOutType == '移库入库') {
  2012. this.gridList.numberLetter = 'YKRK'
  2013. } else {
  2014. this.gridList.numberLetter = 'CGRK'
  2015. }
  2016. } else {
  2017. this.gridList.numberLetter = 'SGRK'
  2018. }
  2019. this.gridList.warehouseNo = this.commonWarehouseNo
  2020. if (!this.gridList.inOutTaskNo) {
  2021. this.$api.msg('任务编号不能为空')
  2022. return
  2023. }
  2024. if (this.utils.getCurrectRoles('acquisitionQuality.initial')) {
  2025. if (!this.gridList.binNumber) {
  2026. this.$api.msg('仓位不能为空')
  2027. return
  2028. }
  2029. if (this.typevalue == 3) {
  2030. if (!this.gridList.natureOfGrainPurchase) {
  2031. this.$api.msg('购粮性质不能为空')
  2032. return
  2033. }
  2034. }
  2035. if (!this.gridList.type) {
  2036. this.$api.msg('类型不能为空')
  2037. return
  2038. }
  2039. if (this.value == false) {
  2040. if (!this.gridList.grade) {
  2041. this.$api.msg('等级不能为空')
  2042. return
  2043. }
  2044. if (!this.gridList.impurity) {
  2045. this.$api.msg('杂质不能为空')
  2046. return
  2047. }
  2048. if (!this.gridList.waterContent) {
  2049. this.$api.msg('初检水分不能为空')
  2050. return
  2051. }
  2052. // if (!this.gridList.reWaterContent) {
  2053. // this.$api.msg('复检水分不能为空')
  2054. // return
  2055. // }
  2056. if (!this.gridList.mildewGrain) {
  2057. this.$api.msg('霉变粒不能为空')
  2058. return
  2059. }
  2060. if (this.gridList.goodsName != "大豆") {
  2061. if (!this.gridList.bulkDensity) {
  2062. this.$api.msg('容重不能为空')
  2063. return
  2064. }
  2065. }
  2066. if (this.gridList.goodsName == "大豆") {
  2067. if (!this.gridList.protein) {
  2068. this.$api.msg('蛋白不能为空')
  2069. return
  2070. }
  2071. }
  2072. if (!this.gridList.jiaorenli && this.gridList.jiaorenli != 0) {
  2073. this.$api.msg('热损伤不能为空')
  2074. return
  2075. }
  2076. if (!this.gridList.imperfectGrain) {
  2077. this.$api.msg('不完整粒不能为空')
  2078. return
  2079. }
  2080. }
  2081. }
  2082. if (this.isQY) {
  2083. if (this.typevalue == 3) {
  2084. if (!this.gridList.customerName) {
  2085. this.$api.msg('客户不能为空')
  2086. return
  2087. }
  2088. }
  2089. if (!this.gridList.carNumber) {
  2090. this.$api.msg('车牌号不能为空')
  2091. return
  2092. }
  2093. if (this.gridList.carNumber.length != 7) {
  2094. this.$api.msg('车牌号输入错误')
  2095. return
  2096. }
  2097. if (!this.gridList.goodsName) {
  2098. this.$api.msg('货名不能为空')
  2099. return
  2100. }
  2101. }
  2102. // 钎样提交
  2103. if (this.isQY && !this.isZJ) {
  2104. that.gridList.serviceManagementType = that.typevalue
  2105. uni.showModal({
  2106. content: "确定提交钎样信息?",
  2107. showCancel: true,
  2108. confirmText: '提交',
  2109. success: function(res) {
  2110. if (res.confirm) {
  2111. // 收购入库
  2112. if (that.typevalue == 3) {
  2113. uni.showLoading({
  2114. title: "加载中",
  2115. mask: true
  2116. })
  2117. that.cumulant(1)
  2118. return
  2119. }
  2120. uni.showLoading({
  2121. title: "加载中",
  2122. mask: true
  2123. })
  2124. that.gridList.inOutFlag = 2
  2125. that.inOutWarehouse(1)
  2126. }
  2127. }
  2128. })
  2129. } else {
  2130. this.gridList.brazer = 0
  2131. this.getGoodsName()
  2132. }
  2133. // // 质检提交
  2134. // if (!this.isQY && this.isZJ) {
  2135. // }
  2136. },
  2137. gradepicker(e) {
  2138. console.log(e)
  2139. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  2140. this.gridList.grade = this.gradeList[e[0]].value
  2141. this.gridList.gradeKey = this.gradeList[e[0]].key
  2142. this.waterContentChange()
  2143. },
  2144. setGoodName(e, status) {
  2145. // console.log(this.goodsList[e[0]].goodsName,111111111)
  2146. //
  2147. // [e[0]] = 0
  2148. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  2149. if (this.goodsList[e[0]].goodsName == '玉米') {
  2150. this.gridList.type = '干粮'
  2151. this.edit = true
  2152. } else if (this.goodsList[e[0]].goodsName.indexOf('潮粮') > -1) {
  2153. this.gridList.type = '潮粮'
  2154. this.edit = true
  2155. } else {
  2156. this.gridList.type = '干粮'
  2157. this.edit = false
  2158. }
  2159. var that = this
  2160. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  2161. // this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
  2162. // warehouseId: this.cangid,
  2163. // goodsName: this.gridList.goodsName
  2164. // }).then(res => {
  2165. // if (res.data.data) {
  2166. // uni.hideLoading()
  2167. // // let data = res.data.data
  2168. // // that.gridList =data
  2169. // }
  2170. // })
  2171. uni.setStorageSync('goodsName', this.gridList.goodsName)
  2172. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  2173. if (this.inType == "收购入库") { //收购入库 价格取自合同
  2174. return
  2175. }
  2176. if (!status) {
  2177. uni.showLoading({
  2178. title: '加载中',
  2179. mask: true
  2180. })
  2181. }
  2182. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  2183. warehouseId: this.cangid,
  2184. goodsName: this.gridList.goodsName
  2185. }).then(res => {
  2186. this.gridList.dryGrainPrice = res.data.data
  2187. if (!status) {
  2188. uni.hideLoading()
  2189. }
  2190. })
  2191. }
  2192. this.waterContentChange()
  2193. },
  2194. goodspicker(e) {
  2195. console.log(e)
  2196. this.setGoodName(e)
  2197. },
  2198. typepicker(e) {
  2199. var that = this
  2200. this.gridList.type = this.typeList[e[0]]
  2201. if (this.inType == "收购入库") { //收购入库 价格取自合同
  2202. return
  2203. }
  2204. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  2205. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  2206. warehouseId: this.cangid,
  2207. goodsName: this.gridList.goodsName
  2208. }).then(res => {
  2209. that.gridList.dryGrainPrice = res.data.data
  2210. })
  2211. }
  2212. },
  2213. binNumberpicker(e) {
  2214. console.log(this.warehouseList[e[0]])
  2215. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  2216. this.gridList.positionId = this.warehouseList[e[0]].id
  2217. },
  2218. del(item) {
  2219. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  2220. id: item.id
  2221. }).then(res => {
  2222. if (res.data.code == 200) {
  2223. this.$api.msg('删除成功')
  2224. } else {
  2225. this.$api.msg('系统异常,请联系管理员')
  2226. }
  2227. })
  2228. },
  2229. contactUs() {
  2230. const that = this
  2231. uni.makePhoneCall({
  2232. // 手机号
  2233. phoneNumber: '18241771147',
  2234. // 成功回调
  2235. success: (res) => {},
  2236. // 失败回调
  2237. fail: (res) => {}
  2238. });
  2239. },
  2240. loadData() {
  2241. // const that = this
  2242. // if(uni.getStorageSync("PageCur")){
  2243. // that.PageCur = uni.getStorageSync("PageCur");
  2244. // }
  2245. // that.userInfoTmp = uni.getStorageSync("userInfo")
  2246. // uni.showLoading({
  2247. // title: '正在加载',
  2248. // mask:true
  2249. // })
  2250. // that.$api.request('integral', 'getIndexData', failres => {
  2251. // that.$api.msg(failres.errmsg)
  2252. // uni.hideLoading()
  2253. // }).then(res => {
  2254. // let data = res.data
  2255. // uni.setStorageSync("message", data.message);
  2256. // uni.setStorageSync("task", data.task);
  2257. // uni.setStorageSync("contract", data.contract);
  2258. // uni.setStorageSync('showTran', data.showTran);
  2259. // that.showTran = data.showTran
  2260. // that.gridList[4].tips = data.task
  2261. // that.gridList[2].tips = data.contract
  2262. // that.companyId = data.companyId
  2263. // uni.hideLoading()
  2264. // })
  2265. },
  2266. confirm() {
  2267. const that = this
  2268. if (!that.inputContent) {
  2269. that.$api.msg('输入不能为空')
  2270. return
  2271. }
  2272. let obj = {}
  2273. obj[that.feild] = that.inputContent
  2274. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  2275. that.userInfo.nickname = that.inputContent
  2276. that.inputContent = ''
  2277. that.$store.commit('login', that.userInfo)
  2278. })
  2279. },
  2280. cancel() {
  2281. this.inputShow = false
  2282. this.inputStatus = 'none'
  2283. this.genderShow = false
  2284. },
  2285. myAccount() {
  2286. uni.navigateTo({
  2287. url: `/pageA/pages/contract`
  2288. })
  2289. },
  2290. /**
  2291. * 统一跳转接口,拦截未登录路由
  2292. * navigator标签现在默认没有转场动画,所以用view
  2293. */
  2294. navTo(url) {
  2295. if (!this.hasLogin) {
  2296. url = '/pages/public/login';
  2297. }
  2298. uni.navigateTo({
  2299. url
  2300. })
  2301. },
  2302. mycarClick(carNo) {
  2303. this.modalName = null
  2304. uni.navigateTo({
  2305. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  2306. })
  2307. },
  2308. scanCode() {
  2309. uni.scanCode({
  2310. success: function(res) {
  2311. uni.navigateTo({
  2312. url: res.result
  2313. })
  2314. }
  2315. })
  2316. },
  2317. hideModal(e) {
  2318. this.modalName = null
  2319. },
  2320. }
  2321. }
  2322. </script>
  2323. <style lang='scss' scoped>
  2324. page {
  2325. background: #F5F6FA;
  2326. }
  2327. .title_b {
  2328. margin: 20rpx 20rpx 0rpx 20rpx;
  2329. padding: 20rpx 10rpx 20rpx 10rpx;
  2330. font-size: 18px;
  2331. font-weight: 550;
  2332. }
  2333. .c-row {
  2334. display: -webkit-box;
  2335. display: -webkit-flex;
  2336. display: flex;
  2337. -webkit-box-align: center;
  2338. -webkit-align-items: center;
  2339. align-items: center;
  2340. padding: 20rpx 30rpx;
  2341. position: relative;
  2342. }
  2343. .con-list {
  2344. -webkit-box-flex: 1;
  2345. -webkit-flex: 1;
  2346. flex: 1;
  2347. display: -webkit-box;
  2348. display: -webkit-flex;
  2349. display: flex;
  2350. -webkit-box-orient: vertical;
  2351. -webkit-box-direction: normal;
  2352. -webkit-flex-direction: column;
  2353. flex-direction: column;
  2354. color: #303133;
  2355. line-height: 40rpx;
  2356. text-align: right;
  2357. padding-right: 20rpx;
  2358. }
  2359. .wrap {
  2360. padding-bottom: 10px;
  2361. font-size: 14px;
  2362. background: #fff;
  2363. margin: 10px;
  2364. border-radius: 10px;
  2365. input {
  2366. font-size: 14px;
  2367. }
  2368. >.title {
  2369. padding: 10px 16px;
  2370. }
  2371. }
  2372. .footer {
  2373. background: #fff;
  2374. position: fixed;
  2375. bottom: 0;
  2376. width: 100%;
  2377. padding: 20px 10px;
  2378. z-index: 10;
  2379. .button {
  2380. background: #22C572;
  2381. width: 90%;
  2382. margin: 20rpx auto;
  2383. padding: 10px;
  2384. color: #fff;
  2385. text-align: center;
  2386. border-radius: 30px;
  2387. }
  2388. }
  2389. .buns_item {
  2390. display: flex;
  2391. padding: 80rpx 0 50rpx 0;
  2392. justify-content: space-around;
  2393. }
  2394. .but_css {
  2395. background: #22C572;
  2396. width: 40%;
  2397. padding: 20rpx;
  2398. color: #fff;
  2399. text-align: center;
  2400. border-radius: 20rpx;
  2401. }
  2402. /deep/.u-radio-group {
  2403. flex-direction: row-reverse;
  2404. }
  2405. /deep/.u-upload .u-list-item {
  2406. background: #fff;
  2407. border: 1px dashed #ccc;
  2408. border-radius: 10rpx;
  2409. height: 190rpx !important;
  2410. width: 190rpx !important;
  2411. margin: 10rpx;
  2412. text-align: center;
  2413. display: flex;
  2414. align-items: center;
  2415. justify-content: center;
  2416. flex-direction: column;
  2417. }
  2418. /deep/.radio .u-radio__label{
  2419. margin-right:0;
  2420. }
  2421. </style>