edit_quality_testing.vue 49 KB

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