edit_quality_testing.vue 55 KB

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