edit_quality_testing.vue 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643
  1. <template>
  2. <view :style='{"margin-bottom":InputEvent!=""?"100px":0}' ref="all-input">
  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. <view v-if='gridList.serviceManagementType==1'>贸易入库</view>
  9. <view v-if='gridList.serviceManagementType==3'>收购入库</view>
  10. </view>
  11. </view>
  12. <view v-if="flag!=3" class="c-row ">
  13. <view class="title">仓库</view>
  14. <view class="con-list">
  15. {{gridList.warehouseName}}
  16. </view>
  17. </view>
  18. <view class="c-row ">
  19. <view class="title">任务编号</view>
  20. <view class="con-list">
  21. <view >{{gridList.inOutTaskNo}}</view>
  22. </view>
  23. </view>
  24. <view v-if='gridList.serviceManagementType==1&&gridList.inOutType!="移库入库"&&flag!=3||gridList.serviceManagementType==3' class="c-row ">
  25. <view class="title">合同编号</view>
  26. <view class="con-list">
  27. {{gridList.contractNo}}
  28. </view>
  29. </view>
  30. <view v-if='gridList.serviceManagementType==1&&gridList.inOutType=="移库入库"&&flag!=3' class="c-row ">
  31. <view class="title">移库编号</view>
  32. <view class="con-list">
  33. {{gridList.contractNo}}
  34. </view>
  35. </view>
  36. <view v-if='flag!=3' class="c-row ">
  37. <view class="title">业务编号</view>
  38. <view class="con-list">
  39. {{gridList.qualityNo}}
  40. </view>
  41. </view>
  42. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  43. <view class="title">成本</view>
  44. <view class="con-list">
  45. <view v-if='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view>
  46. <view v-if='coststatus'>
  47. <input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
  48. </view>
  49. </view>
  50. <button v-if='flag==4||flag==0' class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
  51. </view>
  52. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  53. <view class="title">运费</view>
  54. <view class="con-list flex">
  55. <view v-if='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
  56. <view v-if='freightstatus'>
  57. <input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
  58. </view>
  59. </view>
  60. <button v-if='flag==4||flag==0' class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
  61. </view>
  62. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  63. <view class="title">扣款</view>
  64. <view class="con-list">
  65. <input v-if='flag==4||flag==0' v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
  66. </view>
  67. </view>
  68. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  69. <view class="title">入库类型</view>
  70. <view class="con-list">
  71. {{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
  72. </view>
  73. </view>
  74. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  75. <view class="title">入库日期</view>
  76. <view class="con-list">
  77. <view v-if='flag==4||flag==0' @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
  78. <view v-else @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
  79. <u-picker @confirm='inOutDatepicker($event)' :params="params" v-model="show5"
  80. mode="time">
  81. </u-picker>
  82. </view>
  83. </view>
  84. <view v-if='gridList.serviceManagementType==3&&flag!=0' class="c-row ">
  85. <view class="title">客户</view>
  86. <view class="con-list">
  87. <view v-if='flag==4||flag==3' @click='gocustomer'>
  88. {{gridList.customerName}}({{gridList.customerPhone}})
  89. </view>
  90. <view v-else>
  91. {{gridList.customerName}}({{gridList.customerPhone}})
  92. </view>
  93. </view>
  94. </view>
  95. <!-- <view v-if='flag!=0' class="c-row "> -->
  96. <view class="c-row ">
  97. <view class="title">车牌号</view>
  98. <view class="con-list">
  99. <input :disabled="flag!=4&&flag!=3" v-model='gridList.carNumber' @click.stop="handleShowKeyboard" placeholder="请输入车牌号"
  100. name="input"></input>
  101. <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
  102. :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
  103. <!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
  104. </view>
  105. </view>
  106. <!-- <view v-if="gridList.paramType != '1'" class="c-row ">
  107. <view class="title">扣重比</view>
  108. <view class="con-list">
  109. <input :disabled='flag==1' v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
  110. name="input"></input>
  111. </view>
  112. </view>
  113. <view v-else class="c-row ">
  114. <view class="title">扣杂</view>
  115. <view class="con-list">
  116. <input :disabled='flag==1' v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂"
  117. @input="waterContentChange" name="input"></input>
  118. <input v-if='flag==0' value='未复检' disabled placeholder="复检扣杂" name="input"></input>
  119. <input v-else :disabled='flag!=1' v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂"
  120. name="input"></input>
  121. </view>
  122. </view> -->
  123. <view v-if='gridList.serviceManagementType==3&&flag!=3' class="c-row ">
  124. <view class="title">购粮性质</view>
  125. <view class="con-list">
  126. <input :disabled='flag==1' v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
  127. name="input"></input>
  128. </view>
  129. </view>
  130. <view v-if='flag!=3' class="c-row ">
  131. <view class="title">仓位号</view>
  132. <view class="con-list">
  133. <view v-if='flag!=1' @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
  134. <view v-else>{{gridList.binNumber}}</view>
  135. </view>
  136. </view>
  137. <view v-if='flag!=3' class="c-row ">
  138. <view class="title">囤位号</view>
  139. <view class="con-list">
  140. <input :disabled="flag!=4&&flag!=0" v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
  141. </view>
  142. </view>
  143. <view v-if='flag!=3' class="c-row ">
  144. <view class="title">货名</view>
  145. <view class="con-list">
  146. <!-- <view v-if="flag != '0'">
  147. {{gridList.goodsName}}
  148. </view> -->
  149. <view v-if='flag==4||flag==0'>{{gridList.goodsName}}</view>
  150. <view v-else>{{gridList.goodsName}}</view>
  151. <u-picker :range="goodsList" range-key="goodsName" @confirm='goodsPicker($event)'
  152. v-model="goodsName" mode="selector">
  153. </u-picker>
  154. </view>
  155. </view>
  156. <view v-if='flag!=3' class="c-row ">
  157. <view class="title">类型</view>
  158. <view class="con-list">
  159. {{gridList.type}}
  160. </view>
  161. </view>
  162. <view v-if='gridList.serviceManagementType==1' class="c-row ">
  163. <view class="title">运输方式</view>
  164. <view class="con-list">
  165. <view v-if='flag==4||flag==0' @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
  166. <view v-else>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
  167. <u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
  168. mode="selector">
  169. </u-picker>
  170. </view>
  171. </view>
  172. <view v-if='gridList.serviceManagementType==3&&flag!=0' class="c-row ">
  173. <view class="title">运输方式</view>
  174. <view class="con-list">
  175. <view v-if='flag==4||flag==3' @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
  176. <view v-else>{{outType?outType:'请选择运输方式'}}</view>
  177. <u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)' v-model="show8"
  178. mode="selector">
  179. </u-picker>
  180. </view>
  181. </view>
  182. <view v-if='gridList.serviceManagementType==1&&flag!=3||gridList.serviceManagementType==3&&gridList.outType=="自运"&&flag!=3' class="c-row ">
  183. <view class="title">车队</view>
  184. <view class="con-list">
  185. <view v-if='flag==4||flag==0' @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
  186. <view v-else>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
  187. <u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName" v-model="show6"
  188. mode="selector">
  189. </u-picker>
  190. </view>
  191. </view>
  192. <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  193. <view class="title">箱号-1</view>
  194. <view class="con-list">
  195. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  196. </view>
  197. </view>
  198. <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  199. <view class="title">封号-1</view>
  200. <view class="con-list">
  201. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  202. </view>
  203. </view>
  204. <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  205. <view class="title">箱号-2</view>
  206. <view class="con-list">
  207. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  208. </view>
  209. </view>
  210. <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  211. <view class="title">封号-2</view>
  212. <view class="con-list">
  213. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  214. </view>
  215. </view>
  216. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  217. <view class="title">箱号-1</view>
  218. <view class="con-list">
  219. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  220. </view>
  221. </view>
  222. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  223. <view class="title">封号-1</view>
  224. <view class="con-list">
  225. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  226. </view>
  227. </view>
  228. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  229. <view class="title">箱号-2</view>
  230. <view class="con-list">
  231. <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  232. </view>
  233. </view>
  234. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  235. <view class="title">封号-2</view>
  236. <view class="con-list">
  237. <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  238. </view>
  239. </view>
  240. <view class="c-row-fj" v-if="flag==2||flag==1">
  241. <view style="margin: 0px 0px 30rpx 10rpx;">复检备注</view>
  242. <textarea class='textarea-style' v-model='gridList.reMemo' placeholder="请输入复检备注"
  243. maxlength="300"></textarea>
  244. </view>
  245. <view class="c-row" v-if="flag==1&&gridList.warehouseName=='鲅鱼圈金信库'">
  246. <view class="title">车型</view>
  247. <view class="con-list">
  248. <view @click='carstatus = true'>{{gridList.carModel?gridList.carModel:'请选择车型'}}</view>
  249. <u-picker :range="carModeList" range-key="constValue" @confirm='carPicker($event)'
  250. v-model="carstatus" mode="selector">
  251. </u-picker>
  252. </view>
  253. </view>
  254. </view>
  255. <view v-if='flag!=3' style='padding-bottom:300rpx;'>
  256. <view class='wrap'>
  257. <view style='margin-right:10px;' class='flex justify-between align-item-center'>
  258. <view class='title_b'>化验信息</view>
  259. <view v-if='flag==0||flag==4' class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572"
  260. v-model="value" @change="change"></u-switch>
  261. </view>
  262. </view>
  263. <view class="c-row ">
  264. <view class="title">等级</view>
  265. <view class="con-list">
  266. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
  267. mode="selector">
  268. </u-picker>
  269. <view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
  270. <view v-else>{{gridList.grade}}</view>
  271. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker1($event)' v-model="show2"
  272. mode="selector">
  273. </u-picker>
  274. <view v-if='flag==1' @click='show2=true'>{{gridList.reGrade?gridList.reGrade:'请选择等级'}}</view>
  275. <view v-if='flag==2'>{{gridList.reGrade}}</view>
  276. </view>
  277. </view>
  278. <view class="c-row ">
  279. <view class="title">水分(%)</view>
  280. <view class="con-list">
  281. <MyNumberInput :myvalue="gridList.waterContent" :Isedit="Isedit" :IsShow="MykeywordShow"
  282. :myevent="'waterContent'"
  283. @setValue="mykeywordset" v-if="InputEvent=='waterContent'"
  284. @Cancelword="Cancelword"
  285. @goNext="goNext('waterContent')"></MyNumberInput>
  286. <input v-else :disabled='flag==1' @click="SetInputKey('waterContent')" v-model='gridList.waterContent' placeholder="初检水分"
  287. @input="waterContentChange" type="digit" name="input"></input>
  288. <MyNumberInput :myvalue="gridList.reWaterContent" :Isedit="Isedit" :IsShow="MykeywordShow"
  289. :myevent="'reWaterContent'"
  290. @setValue="mykeywordset" v-if="InputEvent=='reWaterContent'"
  291. @Cancelword="Cancelword"
  292. @goNext="goNext('reWaterContent')"></MyNumberInput>
  293. <input @click="SetInputKey('reWaterContent')" v-if="flag==1&&InputEvent!='reWaterContent'||flag==2&&InputEvent!='reWaterContent'" type="digit" v-model='gridList.reWaterContent' placeholder="复检水分"
  294. name="input"></input>
  295. </view>
  296. </view>
  297. <view class="c-row ">
  298. <view v-if='gridList.goodsName!="大豆"' class="title">容重(克/升)</view>
  299. <view v-else class="title">蛋白</view>
  300. <view class="con-list">
  301. <MyNumberInput :myvalue="gridList.bulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
  302. :myevent="'bulkDensity'"
  303. @setValue="mykeywordset" v-if="InputEvent=='bulkDensity'"
  304. @Cancelword="Cancelword"
  305. @goNext="goNext('bulkDensity')"></MyNumberInput>
  306. <input v-else @click="SetInputKey('bulkDensity')" :disabled='flag==1' type="digit" v-model='gridList.bulkDensity' placeholder="请输入容重"
  307. name="input" @input="obtainPrice"></input>
  308. <MyNumberInput :myvalue="gridList.reBulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
  309. :myevent="'reBulkDensity'"
  310. @setValue="mykeywordset" v-if="InputEvent=='reBulkDensity'"
  311. @Cancelword="Cancelword"
  312. @goNext="goNext('reBulkDensity')"></MyNumberInput>
  313. <input @click="SetInputKey('reBulkDensity')" v-if="flag==1&&InputEvent!='reBulkDensity'||flag==2&&InputEvent!='reBulkDensity'" type="digit" v-model='gridList.reBulkDensity' placeholder="请输入容重"
  314. name="input"></input>
  315. </view>
  316. </view>
  317. <view class="c-row ">
  318. <view class="title">不完善粒(%)</view>
  319. <view class="con-list">
  320. <MyNumberInput :myvalue="gridList.imperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  321. :myevent="'imperfectGrain'"
  322. @setValue="mykeywordset" v-if="InputEvent=='imperfectGrain'"
  323. @Cancelword="Cancelword"
  324. @goNext="goNext('imperfectGrain')"></MyNumberInput>
  325. <input v-else @click="SetInputKey('imperfectGrain')" :disabled='flag==1' type="digit" v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
  326. name="input"></input>
  327. <MyNumberInput :myvalue="gridList.reImperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  328. :myevent="'reImperfectGrain'"
  329. @setValue="mykeywordset" v-if="InputEvent=='reImperfectGrain'"
  330. @Cancelword="Cancelword"
  331. @goNext="goNext('reImperfectGrain')"></MyNumberInput>
  332. <input @click="SetInputKey('reImperfectGrain')" v-if="flag==1&&InputEvent!='reImperfectGrain'||flag==2&&InputEvent!='reImperfectGrain'" type="digit" v-model='gridList.reImperfectGrain' placeholder="请输入不完整粒占比"
  333. name="input"></input>
  334. </view>
  335. </view>
  336. <view class="c-row ">
  337. <view class="title">杂质(%)</view>
  338. <view class="con-list">
  339. <MyNumberInput :myvalue="gridList.impurity" :Isedit="Isedit" :IsShow="MykeywordShow"
  340. :myevent="'impurity'"
  341. @setValue="mykeywordset" v-if="InputEvent=='impurity'"
  342. @Cancelword="Cancelword"
  343. @goNext="goNext('impurity')"></MyNumberInput>
  344. <input v-else @click="SetInputKey('impurity')" :disabled='flag==1' type="digit" v-model='gridList.impurity' placeholder="请输入杂质占比"
  345. name="input"></input>
  346. <MyNumberInput :myvalue="gridList.reImpurity" :Isedit="Isedit" :IsShow="MykeywordShow"
  347. :myevent="'reImpurity'"
  348. @setValue="mykeywordset" v-if="InputEvent=='reImpurity'"
  349. @Cancelword="Cancelword"
  350. @goNext="goNext('reImpurity')"></MyNumberInput>
  351. <input @click="SetInputKey('reImpurity')" v-if="flag==1&&InputEvent!='reImpurity'||flag==2&&InputEvent!='reImpurity'" type="digit" v-model='gridList.reImpurity' placeholder="请输入杂质占比"
  352. name="input"></input>
  353. </view>
  354. </view>
  355. <view class="c-row ">
  356. <view class="title">霉变粒(%)</view>
  357. <view class="con-list">
  358. <MyNumberInput :myvalue="gridList.mildewGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  359. :myevent="'mildewGrain'"
  360. @setValue="mykeywordset" v-if="InputEvent=='mildewGrain'"
  361. @Cancelword="Cancelword"
  362. @goNext="goNext('mildewGrain')"></MyNumberInput>
  363. <input v-else @click="SetInputKey('mildewGrain')" :disabled='flag==1' type="digit" v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
  364. name="input"></input>
  365. <MyNumberInput :myvalue="gridList.reMildewGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  366. :myevent="'reMildewGrain'"
  367. @setValue="mykeywordset" v-if="InputEvent=='reMildewGrain'"
  368. @Cancelword="Cancelword"
  369. @goNext="goNext('reMildewGrain')"></MyNumberInput>
  370. <input @click="SetInputKey('reMildewGrain')" v-if="flag==1&&InputEvent!='reMildewGrain'||flag==2&&InputEvent!='reMildewGrain'" type="digit" v-model='gridList.reMildewGrain' placeholder="请输入霉变粒占比"
  371. name="input"></input>
  372. </view>
  373. </view>
  374. <view class="c-row ">
  375. <view class="title">热损伤(%)</view>
  376. <view class="con-list">
  377. <MyNumberInput :myvalue="gridList.jiaorenli" :Isedit="Isedit" :IsShow="MykeywordShow"
  378. :myevent="'jiaorenli'"
  379. @setValue="mykeywordset" v-if="InputEvent=='jiaorenli'"
  380. @Cancelword="Cancelword"
  381. @goNext="goNext('jiaorenli')"></MyNumberInput>
  382. <input v-else @click="SetInputKey('jiaorenli')" :disabled='flag==1' type="digit" v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
  383. name="input"></input>
  384. <MyNumberInput :myvalue="gridList.reJiaorenli" :Isedit="Isedit" :IsShow="MykeywordShow"
  385. :myevent="'reJiaorenli'"
  386. @setValue="mykeywordset" v-if="InputEvent=='reJiaorenli'"
  387. @Cancelword="Cancelword"
  388. @goNext="goNext('reJiaorenli')"></MyNumberInput>
  389. <input @click="SetInputKey('reJiaorenli')" v-if="flag==1&&InputEvent!='reJiaorenli'||flag==2&&InputEvent!='reJiaorenli'" type="digit" v-model='gridList.reJiaorenli' placeholder="请输入热损伤占比"
  390. name="input"></input>
  391. <!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
  392. </view>
  393. </view>
  394. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
  395. class="c-row">
  396. <view class="title">水分增价(元/吨)</view>
  397. <view class="con-list">
  398. <input v-model='gridList.waterPriceIncrease' @focus="pricefocus($event,1)" @blur="priceblur($event,1)" @input='deductionchange'
  399. placeholder="请输入水分增价" name="input" type="digit"></input>
  400. </view>
  401. </view>
  402. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
  403. class="c-row">
  404. <view class="title">水分扣价(元/吨)</view>
  405. <view class="con-list">
  406. <input v-model='gridList.waterPriceDeduction' @focus="pricefocus($event,2)" @blur="priceblur($event,2)" @input='deductionchange'
  407. placeholder="请输入水分扣价" name="input" type="digit"></input>
  408. </view>
  409. </view>
  410. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
  411. class="c-row">
  412. <view class="title">质量增价(元/吨)</view>
  413. <view class="con-list">
  414. <input v-model='gridList.qualityPriceIncrease' @focus="pricefocus($event,3)" @blur="priceblur($event,3)" @input='deductionchange'
  415. placeholder="请输入质量增价" name="input" type="digit"></input>
  416. </view>
  417. </view>
  418. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
  419. class="c-row">
  420. <view class="title">质量扣价(元/吨)</view>
  421. <view class="con-list">
  422. <input v-model='gridList.qualityPriceDeduction' @focus="pricefocus($event,4)" @blur="priceblur($event,4)" @input='deductionchange'
  423. placeholder="请输入质量扣价" name="input" type="digit"></input>
  424. </view>
  425. </view>
  426. <view v-if="gridList.type == '潮粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
  427. <view class="title">净重单价(元/公斤)</view>
  428. <view class="con-list">
  429. <input :disabled='flag==1&&pricedisabled' v-model='gridList.tidalGrainPrice' @blur='inputprice' placeholder="自动获取,不可编辑"
  430. name="input"></input>
  431. </view>
  432. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  433. </view>
  434. <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
  435. <view class="title">干粮单价(元/公斤)</view>
  436. <view class="con-list">
  437. <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit" @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
  438. </view>
  439. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  440. </view>
  441. <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==1&&flag!=3" class="c-row">
  442. <view class="title">干粮单价(元/公斤)</view>
  443. <view class="con-list">
  444. <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit" @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
  445. </view>
  446. </view>
  447. </view>
  448. </view>
  449. <view class="footer">
  450. <view v-if='flag==1' @click='confirmInfo' class="button">确认初检信息</view>
  451. <view @click='submit' class="button">提交</view>
  452. </view>
  453. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  454. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  455. :showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  456. <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
  457. <view class="buns_item">
  458. <view class="but_css" @click="print">打印小票</view>
  459. <view class="but_css" @click="close">返回</view>
  460. </view>
  461. </u-popup>
  462. <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
  463. v-model="show" mode="selector">
  464. </u-picker>
  465. </view>
  466. </template>
  467. <script>
  468. const Equ_List=['waterContent','bulkDensity','imperfectGrain','impurity','mildewGrain','jiaorenli'];
  469. const Equ_List1=['reWaterContent','reBulkDensity','reImperfectGrain','reImpurity','reMildewGrain','reJiaorenli'];
  470. import dragButton from "@/components/drag-button/drag-button.vue";
  471. import keyboard from "@/components/master-keyboard/master-keyboard.vue";
  472. import MyNumberInput from "@/components/MyNumberInput.vue";
  473. import {
  474. mapState
  475. } from 'vuex';
  476. let startY = 0,
  477. moveY = 0,
  478. pageAtTop = true;
  479. export default {
  480. components: {
  481. dragButton,
  482. keyboard,
  483. MyNumberInput
  484. },
  485. data() {
  486. return {
  487. isShowPrint: false,
  488. inputShow: false,
  489. modalName: '',
  490. mycarStyle: '',
  491. feild: undefined,
  492. id: 0,
  493. show: false,
  494. show2:false,
  495. show4:false,
  496. show5:false,
  497. show7:false,
  498. show8:false,
  499. pricedisabled:false,
  500. multiSelector1:[{name:'他运',value:'他运'}],
  501. outType:'',
  502. selector: [],
  503. show1: false,
  504. pricetext:'锁定',
  505. goodsName: false,
  506. carstatus: false,
  507. params:{year: true,
  508. month: true,
  509. day: true,},
  510. inputContent: '',
  511. multiSelector: [{
  512. name: '汽运',
  513. value: '0',
  514. },
  515. {
  516. name: '火运',
  517. value: '1',
  518. },
  519. {
  520. name: '集装箱船',
  521. value: '2',
  522. },
  523. {
  524. name: '散船',
  525. value: '3',
  526. },
  527. ],
  528. coverTransform: 'translateY(0px)',
  529. coverTransition: '0s',
  530. moving: false,
  531. footprintList: [],
  532. zjid:'',
  533. searchKeyWord: '',
  534. isVip: false,
  535. flag: 0,
  536. freightstatus:false,
  537. coststatus:false,
  538. freighttext:'手动填写',
  539. costtext:'手动填写',
  540. userInfoTmp: [],
  541. inputStatus: 'none',
  542. carInfo: [],
  543. gridCol: 4,
  544. pageSize: 10,
  545. currentPage: 1,
  546. gridBorder: false,
  547. headUrl: "../../static/img/myimg/YongHu@3x.png",
  548. userphone: "",
  549. username: "请更改昵称",
  550. gridList: {
  551. natureOfGrainPurchase: '贸易粮',
  552. type: '潮粮',
  553. tidalGrainPrice: '',
  554. dryGrainPrice: '',
  555. carNumber: '',
  556. carModel: '',
  557. serviceManagementType:'3'
  558. },
  559. managementType: '',
  560. warehouseName: '',
  561. warehouseList: [],
  562. InputEvent:'',
  563. bottomHeight:'10rpx',
  564. MykeywordShow:false,
  565. showTran: true,
  566. companyId: 1,
  567. current: 4,
  568. value: false,
  569. carModeList: [],
  570. fleetNameList:[],
  571. gradeList: [{
  572. key: 1,
  573. value: '一等品'
  574. },
  575. {
  576. key: 2,
  577. value: '二等品'
  578. },
  579. {
  580. key: 3,
  581. value: '三等品'
  582. },
  583. {
  584. key: 4,
  585. value: '等外'
  586. },
  587. ],
  588. cangid: '',
  589. goodsList: [],
  590. taskNolist:[],
  591. dryGrainPrice:0,
  592. tidalGrainPrice:0,
  593. isShowAlert: false,
  594. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  595. }
  596. },
  597. // #ifndef MP
  598. onNavigationBarButtonTap(e) {
  599. const index = e.index;
  600. if (index === 0) {
  601. this.navTo('/pages/set/set');
  602. } else if (index === 1) {
  603. // #ifdef APP-PLUS
  604. const pages = getCurrentPages();
  605. const page = pages[pages.length - 1];
  606. const currentWebview = page.$getAppWebview();
  607. currentWebview.hideTitleNViewButtonRedDot({
  608. index
  609. });
  610. // #endif
  611. uni.navigateTo({
  612. url: '/pages/notice/notice'
  613. })
  614. }
  615. },
  616. // #endif
  617. computed: {
  618. ...mapState(['hasLogin', 'userInfo']),
  619. // 手机号中间4位加*
  620. starUserphone() {
  621. let reg = /^(\d{3})\d{4}(\d{4})$/;
  622. if (this.userphone) {
  623. return this.userphone.replace(reg, "$1****$2");
  624. }
  625. }
  626. },
  627. onLoad(options) {
  628. this.id = options.id
  629. this.flag = options.flag
  630. this.cangid = options.cangid
  631. this.warehouseName=options.warehouseName
  632. this.managementType = options.managementType
  633. console.log(this.flag)
  634. var that = this
  635. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  636. id: this.id
  637. }).then(res => {
  638. if (res.data.data) {
  639. let data = res.data.data
  640. if (data.supplementaryRecording == 1) {
  641. that.value = true
  642. } else {
  643. that.value = false
  644. }
  645. that.gridList = data
  646. if(that.gridList.type=='干粮'){
  647. if (this.gridList.goodsName &&
  648. this.gridList.bulkDensity &&
  649. this.cangid) {
  650. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  651. warehouseId: this.cangid,
  652. goodsName: this.gridList.goodsName,
  653. bulkDensity:this.gridList.bulkDensity
  654. }).then(res => {
  655. if(res.data.data != 0){
  656. this.gridList.dryGrainPrice = res.data.data
  657. this.dryGrainPrice = res.data.data
  658. this.deductionchange()
  659. }
  660. })
  661. }
  662. }else if(that.gridList.type=='潮粮'){
  663. if (
  664. this.gridList.goodsName &&
  665. this.gridList.waterContent &&
  666. this.gridList.grade
  667. ) {
  668. console.log('123123')
  669. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  670. warehouseId: this.cangid,
  671. goodsName: this.gridList.goodsName,
  672. waterContent: this.gridList.waterContent,
  673. grade: this.gridList.grade,
  674. }).then(res => {
  675. if (that.gridList.paramType == '1') {
  676. // console.log(that.gridList)
  677. if(that.gridList.buckleMiscellaneous){
  678. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  679. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  680. .dryGrainPrice)).toFixed(4)
  681. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  682. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  683. .dryGrainPrice)).toFixed(4)
  684. }
  685. if (!that.gridList.tidalGrainPrice) {
  686. that.gridList.tidalGrainPrice = ''
  687. }
  688. } else {
  689. that.gridList.tidalGrainPrice = res.data.data
  690. that.tidalGrainPrice = res.data.data
  691. }
  692. this.deductionchange()
  693. })
  694. }
  695. }
  696. // if(that.gridList.dryGrainPrice){
  697. // that.dryGrainPrice=that.gridList.dryGrainPrice
  698. // }
  699. // if(that.gridList.tidalGrainPrice){
  700. // that.tidalGrainPrice=that.gridList.tidalGrainPrice
  701. // }
  702. if(!that.gridList.reGrade){
  703. that.gridList.reGrade=that.gridList.grade
  704. }
  705. if(!that.gridList.reWaterContent){
  706. that.gridList.reWaterContent=that.gridList.waterContent
  707. }
  708. if(!that.gridList.reBulkDensity){
  709. that.gridList.reBulkDensity=that.gridList.bulkDensity
  710. }
  711. if(!that.gridList.reImperfectGrain){
  712. that.gridList.reImperfectGrain=that.gridList.imperfectGrain
  713. }
  714. if(!that.gridList.reImpurity){
  715. that.gridList.reImpurity=that.gridList.impurity
  716. }
  717. if(!that.gridList.reMildewGrain){
  718. that.gridList.reMildewGrain=that.gridList.mildewGrain
  719. }
  720. if(!that.gridList.reJiaorenli){
  721. that.gridList.reJiaorenli=that.gridList.jiaorenli
  722. }
  723. if(this.gridList.outType&&this.gridList.serviceManagementType==3){
  724. this.outType=this.gridList.outType
  725. }
  726. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  727. id: this.cangid
  728. }).then(res => {
  729. that.warehouseList = res.data.data.warehousePositionInfoList
  730. })
  731. //质检货名下拉
  732. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  733. warehouseId: this.cangid
  734. }).then(res => {
  735. if (res.data.data) {
  736. that.goodsList = res.data.data
  737. if (that.goodsList.length > 0) {
  738. if(!that.gridList.goodsName){
  739. that.gridList.goodsName = that.goodsList[0].goodsName
  740. }
  741. uni.setStorageSync('purchasePriceList', that.goodsList)
  742. that.purchasePriceList = uni.getStorageSync('purchasePriceList')
  743. }
  744. }
  745. else if(res.data.code != 200 && that.gridList.serviceManagementType==3){
  746. uni.showModal({
  747. content:res.data.message,
  748. showCancel:false
  749. })
  750. }
  751. })
  752. }
  753. })
  754. this.$api.doRequest('get', 'commonSysParameter/getInfo', {
  755. constId: 'QUA1'
  756. }).then(res => {
  757. if (res.data.data) {
  758. that.carModeList = res.data.data
  759. }
  760. })
  761. this.gridList.grade = this.gradeList[0].value
  762. this.gridList.gradeKey = this.gradeList[0].key
  763. },
  764. onShow() {
  765. this.multiSelector1=[{name:'他运',value:'他运'}]
  766. this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  767. warehouseName:this.warehouseName
  768. }).then(res => {
  769. // console.log(res)
  770. if(res.data.data.contractManagementInfoList){
  771. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  772. res.data.data.contractMangementInfoList[i].name='自运 ('+
  773. res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
  774. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  775. }
  776. }else{
  777. this.multiSelector1=[{name:'他运',value:'他运'}]
  778. }
  779. // this.taskNolist=res.data.data
  780. })
  781. // uni.showLoading({title: '加载中'})
  782. // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  783. // flag: 2,
  784. // warehouseName:this.warehouseName
  785. // }).then(res => {
  786. // console.log(res)
  787. // uni.hideLoading();
  788. // this.taskNolist=res.data.data
  789. // })
  790. let _kh = uni.getStorageSync('isClick')
  791. if (uni.getStorageSync('checkcustomer') && _kh) {
  792. let _customerInfo = uni.getStorageSync('checkcustomer')
  793. if (_customerInfo.shipperName) {
  794. this.gridList.identityId = _customerInfo.id
  795. //点击登记客户
  796. this.gridList.customerName = _customerInfo.shipperName
  797. this.gridList.customerPhone = _customerInfo.shipperPhone
  798. this.gridList.carNumber = _customerInfo.carNo
  799. } else {
  800. //点击搜索客户
  801. this.gridList.customerName = _customerInfo.customerName
  802. this.gridList.customerPhone = _customerInfo.customerPhone
  803. }
  804. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  805. }
  806. },
  807. methods: {
  808. Cancelword(){
  809. this.bottomHeight = '10rpx';
  810. this.MykeywordShow =false;
  811. this.InputEvent = '';
  812. },
  813. goNext(val){
  814. if(this.flag==0||this.flag==3||this.flag==4){
  815. var inputList = Equ_List;
  816. }else{
  817. var inputList = Equ_List1;
  818. }
  819. var index = inputList.indexOf(val);
  820. this.setScrollTops(val);
  821. if(index<inputList.length-1){
  822. this.InputEvent = inputList[index+1];
  823. }else{
  824. this.InputEvent=''
  825. this.bottomHeight = '10rpx';
  826. this.MykeywordShow = false;
  827. }
  828. },
  829. mykeywordset(datatxt){
  830. var arr = JSON.parse(datatxt);
  831. this.gridList[arr.even] = arr.value;
  832. if(arr.even=='waterContent'){
  833. this.waterContentChange()
  834. }else if(arr.even=='bulkDensity'){
  835. this.obtainPrice()
  836. }
  837. },
  838. SetInputKey(even){
  839. uni.hideKeyboard();
  840. this.InputEvent = even;
  841. this.setScrollTops(even);
  842. if(!this.MykeywordShow){
  843. this.bottomHeight = '320rpx';
  844. this.MykeywordShow = true;
  845. }
  846. },
  847. setScrollTops(even){
  848. if(this.flag==0||this.flag==3||this.flag==4){
  849. var inputList = Equ_List;
  850. }else{
  851. var inputList = Equ_List1;
  852. }
  853. var index = inputList.indexOf(even);
  854. this.viewTop = (index + 1) * 60 + 100;
  855. },
  856. pricefocus(e,status){
  857. console.log(e)
  858. if(status==1){
  859. if(e.detail.value==0){
  860. this.gridList.waterPriceIncrease=''
  861. }
  862. }else if(status==2){
  863. if(e.detail.value==0){
  864. this.gridList.waterPriceDeduction=''
  865. }
  866. }else if(status==3){
  867. if(e.detail.value==0){
  868. this.gridList.qualityPriceIncrease=''
  869. }
  870. }else if(status==4){
  871. if(e.detail.value==0){
  872. this.gridList.qualityPriceDeduction=''
  873. }
  874. }
  875. },
  876. priceblur(e,status){
  877. console.log(e)
  878. if(status==1){
  879. if(e.detail.value==''){
  880. this.gridList.waterPriceIncrease=0
  881. }
  882. }else if(status==2){
  883. if(e.detail.value==''){
  884. this.gridList.waterPriceDeduction=0
  885. }
  886. }else if(status==3){
  887. if(e.detail.value==''){
  888. this.gridList.qualityPriceIncrease=0
  889. }
  890. }else if(status==4){
  891. if(e.detail.value==''){
  892. this.gridList.qualityPriceDeduction=0
  893. }
  894. }
  895. },
  896. deductionchange(){
  897. console.log(this.gridList.type,this.tidalGrainPrice,
  898. Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4))
  899. if(this.gridList.type=='干粮'){
  900. if(this.dryGrainPrice!=''){
  901. console.log(Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)),Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(2))
  902. this.gridList.dryGrainPrice=Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
  903. }
  904. }else if(this.gridList.type=='潮粮'){
  905. if(this.tidalGrainPrice!=''){
  906. this.gridList.tidalGrainPrice=Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
  907. }
  908. }
  909. this.$forceUpdate()
  910. },
  911. obtainPrice(){//根据容重获取价格
  912. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  913. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  914. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  915. warehouseId: this.cangid,
  916. goodsName: this.gridList.goodsName,
  917. bulkDensity:this.gridList.bulkDensity
  918. }).then(res => {
  919. if(res.data.data != 0){
  920. this.gridList.dryGrainPrice = res.data.data
  921. this.dryGrainPrice = res.data.data
  922. this.gridList.waterPriceIncrease=0
  923. this.gridList.waterPriceDeduction=0
  924. this.gridList.qualityPriceIncrease=0
  925. this.gridList.qualityPriceDeduction=0
  926. }
  927. })
  928. // }
  929. }
  930. },
  931. changeprice(){
  932. if(this.pricetext=='解锁'){
  933. this.pricedisabled=false
  934. this.pricetext='锁定'
  935. }else{
  936. this.pricedisabled=true
  937. this.pricetext='解锁'
  938. }
  939. },
  940. inputprice(){
  941. if(this.pricetext=='锁定'){
  942. this.pricedisabled=true
  943. this.pricetext='解锁'
  944. }
  945. },
  946. inOutDatepicker(e){
  947. this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
  948. console.log(e)
  949. },
  950. fleetpicker(e){
  951. this.gridList.fleet=this.fleetNameList[e[0]].fleetName
  952. },
  953. changefreight(){
  954. this.freightstatus=!this.freightstatus
  955. if(this.freightstatus){
  956. this.freighttext='自动获取'
  957. }else{
  958. this.freighttext='手动填写'
  959. }
  960. },
  961. changecost(){
  962. this.coststatus=!this.coststatus
  963. if(this.coststatus){
  964. this.costtext='自动获取'
  965. }else{
  966. this.costtext='手动填写'
  967. }
  968. },
  969. gocustomer() {
  970. uni.navigateTo({
  971. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  972. .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
  973. })
  974. },
  975. print() {
  976. uni.navigateTo({
  977. url: '/pages/erpbusiness/bleConnect'
  978. })
  979. },
  980. close() {
  981. this.isShowPrint = false
  982. uni.navigateBack({})
  983. },
  984. // focusConfig(type){
  985. // console.log('childclick',type)
  986. // // 0是上一项
  987. // if(type==0){
  988. // }else{}
  989. // },
  990. hidden() {
  991. this.$refs.keyboard.open(false)
  992. },
  993. carPicker(e) {
  994. this.gridList.carModel = this.carModeList[e[0]].constValue
  995. },
  996. handleShowKeyboard() {
  997. if (this.flag == 0) {
  998. if (this.$refs.keyboard.open) {
  999. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  1000. } else {
  1001. this.$refs.keyboard[0].open(true)
  1002. }
  1003. }
  1004. },
  1005. handleShowKeyboard1() {
  1006. if (this.flag == 0) {
  1007. if (this.$refs.keyboard1.open) {
  1008. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  1009. } else {
  1010. this.$refs.keyboard1[0].open(true)
  1011. }
  1012. }
  1013. },
  1014. handleClick(e) {
  1015. this.gridList.carNumber = e.value //键盘输入值
  1016. },
  1017. handleClick1(e) {
  1018. this.gridList.jiaorenli = e.value //键盘输入值
  1019. },
  1020. change(e) {
  1021. if (e) {
  1022. this.gridList.supplementaryRecording = 1
  1023. } else {
  1024. this.gridList.supplementaryRecording = 0
  1025. }
  1026. },
  1027. confirmInfo() {
  1028. this.isShowAlert = true
  1029. },
  1030. alertBtn() {
  1031. this.gridList.agent=this.userInfo.userName;
  1032. var that = this
  1033. that.gridList.reWaterContent = that.gridList.waterContent
  1034. if (that.gridList.buckleMiscellaneous) {
  1035. that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
  1036. }
  1037. that.gridList.flag = 1
  1038. if(this.flag==3){
  1039. this.gridList.statusFlag=7
  1040. }else if(this.flag==4||this.flag==0){
  1041. this.gridList.statusFlag=0
  1042. }
  1043. else if(this.flag==1){
  1044. this.gridList.statusFlag=1
  1045. }else if(this.flag==2){
  1046. this.gridList.statusFlag=2
  1047. }
  1048. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
  1049. res => {
  1050. if (res.data.code == "200") {
  1051. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
  1052. id: that.gridList.id,
  1053. flag: 2
  1054. }).then(res => {
  1055. if (res.data.code == "200") {
  1056. that.$api.msg('提交成功!')
  1057. setTimeout(function() {
  1058. uni.navigateBack({delta:Int16Array})
  1059. }, 1000)
  1060. } else {
  1061. that.$api.msg('提交失败')
  1062. }
  1063. })
  1064. } else {
  1065. that.$api.msg('提交失败')
  1066. }
  1067. })
  1068. },
  1069. waterContentChange() {
  1070. var that = this
  1071. if (this.gridList.goodsName) {
  1072. for (var i = 0; i < this.purchasePriceList.length; i++) {
  1073. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  1074. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  1075. this.gridList.paramType = this.purchasePriceList[i].paramType
  1076. }
  1077. }
  1078. }
  1079. console.log(this.gridList.serviceManagementType)
  1080. if(this.gridList.serviceManagementType != 3){ //非收购入库 不需在获取价格
  1081. return
  1082. }
  1083. if (this.gridList.goodsName && this.cangid) {
  1084. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1085. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1086. warehouseId: this.cangid,
  1087. goodsName: this.gridList.goodsName
  1088. }).then(res => {
  1089. that.gridList.dryGrainPrice = res.data.data
  1090. that.dryGrainPrice = res.data.data
  1091. })
  1092. }
  1093. }
  1094. that.gridList.waterPriceIncrease=0
  1095. that.gridList.waterPriceDeduction=0
  1096. that.gridList.qualityPriceIncrease=0
  1097. that.gridList.qualityPriceDeduction=0
  1098. //潮粮单价改变事件
  1099. if (
  1100. this.gridList.goodsName &&
  1101. this.gridList.waterContent &&
  1102. this.gridList.grade
  1103. ) {
  1104. console.log('123123')
  1105. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1106. warehouseId: this.cangid,
  1107. goodsName: this.gridList.goodsName,
  1108. waterContent: this.gridList.waterContent,
  1109. grade: this.gridList.grade,
  1110. }).then(res => {
  1111. if (that.gridList.paramType == '1') {
  1112. // console.log(that.gridList)
  1113. if(that.gridList.buckleMiscellaneous){
  1114. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1115. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1116. .dryGrainPrice)).toFixed(4)
  1117. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1118. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1119. .dryGrainPrice)).toFixed(4)
  1120. }
  1121. if (!that.gridList.tidalGrainPrice) {
  1122. that.gridList.tidalGrainPrice = ''
  1123. }
  1124. if(that.gridList.type == '干粮'){
  1125. that.gridList.dryGrainPrice = res.data.data
  1126. that.dryGrainPrice = that.gridList.dryGrainPrice
  1127. }
  1128. } else {
  1129. that.gridList.tidalGrainPrice = res.data.data
  1130. if(that.gridList.type == '干粮'){
  1131. that.gridList.dryGrainPrice = res.data.data
  1132. that.dryGrainPrice = that.gridList.dryGrainPrice
  1133. }else{
  1134. that.gridList.tidalGrainPrice = res.data.data
  1135. that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1136. }
  1137. }
  1138. // that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1139. })
  1140. }
  1141. },
  1142. goodsPicker(e) {
  1143. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  1144. },
  1145. submit() {
  1146. this.$delete(this.gridList,'status')
  1147. this.gridList.agent=this.userInfo.userName;
  1148. // if(!this.$u.test.isEmpty(this.gridList.tidalGrainPrice)){
  1149. // this.gridList.tidalGrainPrice=''
  1150. // return
  1151. // }
  1152. if(this.flag==3){
  1153. this.gridList.statusFlag=7
  1154. }else if(this.flag==4||this.flag==0){
  1155. this.gridList.statusFlag=0
  1156. }
  1157. else if(this.flag==1){
  1158. this.gridList.statusFlag=1
  1159. }else if(this.flag==2){
  1160. this.gridList.statusFlag=2
  1161. }
  1162. if(this.gridList.serviceManagementType==3){
  1163. if(this.outType){
  1164. this.gridList.outType=this.outType
  1165. }
  1166. }else{
  1167. this.gridList.customerName = ''
  1168. }
  1169. var text=''
  1170. if(this.utils.getCurrectRoles('acquisitionQuality.qview')&&!this.utils.getCurrectRoles('acquisitionQuality.initial')){
  1171. text="确定提交钎样信息?"
  1172. if(this.flag==3||this.flag==4||this.flag==0){
  1173. this.gridList.brazer=1
  1174. }
  1175. }else{
  1176. text="确定提交质检信息?"
  1177. if(this.flag==3||this.flag==4||this.flag==0){
  1178. this.gridList.brazer=0
  1179. }
  1180. }
  1181. if(this.flag==4){
  1182. this.gridList.flag = 0
  1183. }else{
  1184. this.gridList.flag = this.flag
  1185. }
  1186. // if(this.flag==2){
  1187. // this.gridList.reInspector=this.userInfo.userName
  1188. // }
  1189. if (!this.gridList.qualityNo) {
  1190. this.$api.msg('编号不能为空')
  1191. return
  1192. }
  1193. var that = this
  1194. if(this.flag==4||this.flag==0){
  1195. if (!this.gridList.binNumber) {
  1196. this.$api.msg('仓位不能为空')
  1197. return
  1198. }
  1199. }
  1200. if(this.gridList.serviceManagementType==3){
  1201. if (!this.gridList.customerName) {
  1202. this.$api.msg('客户不能为空')
  1203. return
  1204. }
  1205. }
  1206. // if (!this.gridList.storageTagNo) {
  1207. // this.$api.msg('囤位号不能为空')
  1208. // return
  1209. // }
  1210. // if (this.gridList.storageTagNo.length > 10) {
  1211. // this.$api.msg('囤位号不能为空')
  1212. // return
  1213. // }
  1214. if (!this.gridList.carNumber) {
  1215. this.$api.msg('车牌号不能为空')
  1216. return
  1217. }
  1218. if (this.gridList.carNumber.length > 7) {
  1219. this.$api.msg('车牌号输入错误')
  1220. return
  1221. }
  1222. if (!this.gridList.goodsName) {
  1223. this.$api.msg('货名不能为空')
  1224. return
  1225. }
  1226. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  1227. this.gridList.buckleWeightRatio > 2) {
  1228. this.$api.msg('扣重比输入错误')
  1229. return
  1230. }
  1231. if (
  1232. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  1233. String(this.gridList.buckleWeightRatio).length -
  1234. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  1235. this.$api.msg('扣重比输入错误')
  1236. return
  1237. }
  1238. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  1239. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  1240. this.$api.msg('初检扣杂输入错误')
  1241. return
  1242. }
  1243. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  1244. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  1245. this.$api.msg('复检扣杂输入错误')
  1246. return
  1247. }
  1248. if (!this.gridList.type) {
  1249. this.$api.msg('类型不能为空')
  1250. return
  1251. }
  1252. if (this.value == false&&this.flag!=3 || this.flag == 2) {
  1253. if (!this.gridList.grade) {
  1254. this.$api.msg('等级不能为空')
  1255. return
  1256. }
  1257. if (!this.gridList.impurity) {
  1258. this.$api.msg('杂质不能为空')
  1259. return
  1260. }
  1261. if (!this.gridList.waterContent) {
  1262. this.$api.msg('初检水分不能为空')
  1263. return
  1264. }
  1265. // if (!this.gridList.reWaterContent) {
  1266. // this.$api.msg('复检水分不能为空')
  1267. // return
  1268. // }
  1269. if (!this.gridList.mildewGrain) {
  1270. this.$api.msg('霉变粒不能为空')
  1271. return
  1272. }
  1273. if(this.gridList.goodsName!="大豆"){
  1274. if (!this.gridList.bulkDensity) {
  1275. this.$api.msg('容重不能为空')
  1276. return
  1277. }
  1278. }else{
  1279. if (!this.gridList.bulkDensity) {
  1280. this.$api.msg('蛋白不能为空')
  1281. return
  1282. }
  1283. }
  1284. if (!this.gridList.jiaorenli) {
  1285. this.$api.msg('热损伤不能为空')
  1286. return
  1287. }
  1288. if (!this.gridList.imperfectGrain) {
  1289. this.$api.msg('不完整粒不能为空')
  1290. return
  1291. }
  1292. }
  1293. this.gridList.storageNumber = this.gridList.storageTagNo
  1294. var kid=JSON.parse(JSON.stringify(this.gridList.warehouseInOutId))
  1295. this.zjid=JSON.parse(JSON.stringify(this.gridList.id))
  1296. that.gridList.warehouseInOutDetail={
  1297. id:that.gridList.warehouseInOutDetailId,
  1298. grade:that.gridList.grade,
  1299. reGrade:that.gridList.grade,
  1300. waterContent:that.gridList.waterContent,
  1301. reWaterContent:that.gridList.reWaterContent,
  1302. imperfectGrain:that.gridList.imperfectGrain,
  1303. reImperfectGrain:that.gridList.reImperfectGrain,
  1304. impurity:that.gridList.impurity,
  1305. reImpurity:that.gridList.reImpurity,
  1306. jiaorenli:that.gridList.jiaorenli,
  1307. reJiaorenli:that.gridList.reJiaorenli,
  1308. bulkDensity:that.gridList.bulkDensity,
  1309. reBulkDensity:that.gridList.reBulkDensity,
  1310. mildewGrain:that.gridList.mildewGrain,
  1311. reMildewGrain:that.gridList.reMildewGrain,
  1312. }
  1313. console.log(this.gridList)
  1314. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  1315. warehouseId: this.cangid
  1316. }).then(res => {
  1317. if(res.data.code != 200 && that.gridList.serviceManagementType==3){
  1318. uni.showModal({
  1319. content:res.data.message,
  1320. showCancel:false
  1321. })
  1322. return;
  1323. }
  1324. else{
  1325. uni.showModal({
  1326. content: text,
  1327. showCancel: true,
  1328. confirmText: '提交',
  1329. success: function(res) {
  1330. if (res.confirm) {
  1331. that.$api.doRequest('post',
  1332. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  1333. .then(res => {
  1334. uni.setStorageSync("quality_print", that.gridList)
  1335. // that.gridList.id=kid
  1336. // that.gridList.statusFlag=1
  1337. // that.$api.doRequest('post',
  1338. // '/warehouseInOutInfo/InOutWarehouse',
  1339. // that.gridList)
  1340. // .then(res => {
  1341. if (res.data.code == 200) {
  1342. that.$api.msg('编辑质检成功')
  1343. that.gridList.warehouseId = that.cangid
  1344. console.log('that.gridList', that.gridList)
  1345. if(that.utils.getCurrectRoles('acquisitionQuality.initial')){
  1346. that.isShowPrint = true
  1347. }else{
  1348. uni.navigateBack({delta:1})
  1349. }
  1350. // uni.getStorageSync("depotAcquisition_warehouseName")
  1351. // uni.navigateBack({})
  1352. }
  1353. // })
  1354. })
  1355. }
  1356. }
  1357. })
  1358. }
  1359. })
  1360. },
  1361. gradepicker(e) {
  1362. console.log(e)
  1363. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1364. this.gridList.grade = this.gradeList[e[0]].value
  1365. this.gridList.gradeKey = this.gradeList[e[0]].key
  1366. this.waterContentChange()
  1367. },
  1368. gradepicker1(e) {
  1369. console.log(e)
  1370. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1371. this.gridList.reGrade = this.gradeList[e[0]].value
  1372. this.gridList.reGradeKey = this.gradeList[e[0]].key
  1373. },
  1374. binNumberpicker(e) {
  1375. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  1376. },
  1377. del(item) {
  1378. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  1379. id: item.id
  1380. }).then(res => {
  1381. if (res.data.code == 200) {
  1382. this.$api.msg('删除成功')
  1383. } else {
  1384. this.$api.msg('系统异常,请联系管理员')
  1385. }
  1386. })
  1387. },
  1388. contactUs() {
  1389. const that = this
  1390. uni.makePhoneCall({
  1391. // 手机号
  1392. phoneNumber: '18241771147',
  1393. // 成功回调
  1394. success: (res) => {},
  1395. // 失败回调
  1396. fail: (res) => {}
  1397. });
  1398. },
  1399. loadData() {
  1400. // const that = this
  1401. // if(uni.getStorageSync("PageCur")){
  1402. // that.PageCur = uni.getStorageSync("PageCur");
  1403. // }
  1404. // that.userInfoTmp = uni.getStorageSync("userInfo")
  1405. // uni.showLoading({
  1406. // title: '正在加载',
  1407. // mask:true
  1408. // })
  1409. // that.$api.request('integral', 'getIndexData', failres => {
  1410. // that.$api.msg(failres.errmsg)
  1411. // uni.hideLoading()
  1412. // }).then(res => {
  1413. // let data = res.data
  1414. // uni.setStorageSync("message", data.message);
  1415. // uni.setStorageSync("task", data.task);
  1416. // uni.setStorageSync("contract", data.contract);
  1417. // uni.setStorageSync('showTran', data.showTran);
  1418. // that.showTran = data.showTran
  1419. // that.gridList[4].tips = data.task
  1420. // that.gridList[2].tips = data.contract
  1421. // that.companyId = data.companyId
  1422. // uni.hideLoading()
  1423. // })
  1424. },
  1425. confirm() {
  1426. const that = this
  1427. if (!that.inputContent) {
  1428. that.$api.msg('输入不能为空')
  1429. return
  1430. }
  1431. let obj = {}
  1432. obj[that.feild] = that.inputContent
  1433. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1434. that.userInfo.nickname = that.inputContent
  1435. that.inputContent = ''
  1436. that.$store.commit('login', that.userInfo)
  1437. })
  1438. },
  1439. cancel() {
  1440. this.inputShow = false
  1441. this.inputStatus = 'none'
  1442. this.genderShow = false
  1443. },
  1444. myAccount() {
  1445. uni.navigateTo({
  1446. url: `/pageA/pages/contract`
  1447. })
  1448. },
  1449. /**
  1450. * 统一跳转接口,拦截未登录路由
  1451. * navigator标签现在默认没有转场动画,所以用view
  1452. */
  1453. navTo(url) {
  1454. if (!this.hasLogin) {
  1455. url = '/pages/public/login';
  1456. }
  1457. uni.navigateTo({
  1458. url
  1459. })
  1460. },
  1461. mycarClick(carNo) {
  1462. this.modalName = null
  1463. uni.navigateTo({
  1464. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1465. })
  1466. },
  1467. scanCode() {
  1468. uni.scanCode({
  1469. success: function(res) {
  1470. uni.navigateTo({
  1471. url: res.result
  1472. })
  1473. }
  1474. })
  1475. },
  1476. hideModal(e) {
  1477. this.modalName = null
  1478. },
  1479. }
  1480. }
  1481. </script>
  1482. <style lang='scss' scoped>
  1483. .title_b {
  1484. margin: 20rpx 20rpx 0rpx 20rpx;
  1485. padding: 20rpx 10rpx 20rpx 10rpx;
  1486. font-size: 18px;
  1487. font-weight: 550;
  1488. }
  1489. page {
  1490. background: #F5F6FA;
  1491. }
  1492. .wrap {
  1493. padding-bottom: 10px;
  1494. font-size: 14px;
  1495. background: #fff;
  1496. margin: 10px;
  1497. border-radius: 10px;
  1498. input {
  1499. font-size: 14px;
  1500. }
  1501. >.title {
  1502. padding: 10px 16px;
  1503. }
  1504. .b-b:after {
  1505. border-bottom: 1px solid #eee;
  1506. }
  1507. }
  1508. .footer {
  1509. background: #fff;
  1510. position: fixed;
  1511. bottom: 0;
  1512. width: 100%;
  1513. padding: 20px 10px;
  1514. z-index: 10;
  1515. .button {
  1516. background: #22C572;
  1517. width: 90%;
  1518. margin: 20rpx auto;
  1519. padding: 10px;
  1520. color: #fff;
  1521. text-align: center;
  1522. border-radius: 30px;
  1523. }
  1524. }
  1525. .c-row {
  1526. display: -webkit-box;
  1527. display: -webkit-flex;
  1528. display: flex;
  1529. -webkit-box-align: center;
  1530. -webkit-align-items: center;
  1531. align-items: center;
  1532. padding: 20rpx 30rpx;
  1533. position: relative;
  1534. }
  1535. .con-list {
  1536. -webkit-box-flex: 1;
  1537. -webkit-flex: 1;
  1538. flex: 1;
  1539. display: -webkit-box;
  1540. display: -webkit-flex;
  1541. display: flex;
  1542. -webkit-box-orient: vertical;
  1543. -webkit-box-direction: normal;
  1544. -webkit-flex-direction: column;
  1545. flex-direction: column;
  1546. color: #303133;
  1547. line-height: 40rpx;
  1548. text-align: right;
  1549. padding-right: 20rpx;
  1550. }
  1551. input:disabled {
  1552. color: #ccc;
  1553. }
  1554. .textarea-style {
  1555. border: 1px solid #EEEEEE;
  1556. width: 100%;
  1557. padding: 20rpx;
  1558. border-radius: 20rpx;
  1559. }
  1560. .c-row-fj {
  1561. padding: 20rpx
  1562. }
  1563. .buns_item {
  1564. display: flex;
  1565. padding: 80rpx 0 50rpx 0;
  1566. justify-content: space-around;
  1567. }
  1568. .but_css {
  1569. background: #22C572;
  1570. width: 40%;
  1571. padding: 20rpx;
  1572. color: #fff;
  1573. text-align: center;
  1574. border-radius: 20rpx;
  1575. }
  1576. </style>