edit_quality_testing.vue 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618
  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. {{gridList.dryGrainPrice}}
  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. },
  557. managementType: '',
  558. warehouseName: '',
  559. warehouseList: [],
  560. InputEvent:'',
  561. bottomHeight:'10rpx',
  562. MykeywordShow:false,
  563. showTran: true,
  564. companyId: 1,
  565. current: 4,
  566. value: false,
  567. carModeList: [],
  568. fleetNameList:[],
  569. gradeList: [{
  570. key: 1,
  571. value: '一等品'
  572. },
  573. {
  574. key: 2,
  575. value: '二等品'
  576. },
  577. {
  578. key: 3,
  579. value: '三等品'
  580. },
  581. {
  582. key: 4,
  583. value: '等外'
  584. },
  585. ],
  586. cangid: '',
  587. goodsList: [],
  588. taskNolist:[],
  589. dryGrainPrice:0,
  590. tidalGrainPrice:0,
  591. isShowAlert: false,
  592. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  593. }
  594. },
  595. // #ifndef MP
  596. onNavigationBarButtonTap(e) {
  597. const index = e.index;
  598. if (index === 0) {
  599. this.navTo('/pages/set/set');
  600. } else if (index === 1) {
  601. // #ifdef APP-PLUS
  602. const pages = getCurrentPages();
  603. const page = pages[pages.length - 1];
  604. const currentWebview = page.$getAppWebview();
  605. currentWebview.hideTitleNViewButtonRedDot({
  606. index
  607. });
  608. // #endif
  609. uni.navigateTo({
  610. url: '/pages/notice/notice'
  611. })
  612. }
  613. },
  614. // #endif
  615. computed: {
  616. ...mapState(['hasLogin', 'userInfo']),
  617. // 手机号中间4位加*
  618. starUserphone() {
  619. let reg = /^(\d{3})\d{4}(\d{4})$/;
  620. if (this.userphone) {
  621. return this.userphone.replace(reg, "$1****$2");
  622. }
  623. }
  624. },
  625. onLoad(options) {
  626. this.id = options.id
  627. this.flag = options.flag
  628. this.cangid = options.cangid
  629. this.warehouseName=options.warehouseName
  630. this.managementType = options.managementType
  631. console.log(this.flag)
  632. var that = this
  633. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  634. id: this.id
  635. }).then(res => {
  636. if (res.data.data) {
  637. let data = res.data.data
  638. if (data.supplementaryRecording == 1) {
  639. that.value = true
  640. } else {
  641. that.value = false
  642. }
  643. that.gridList = data
  644. if(that.gridList.type=='干粮'){
  645. if (this.gridList.goodsName &&
  646. this.gridList.bulkDensity &&
  647. this.cangid) {
  648. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  649. warehouseId: this.cangid,
  650. goodsName: this.gridList.goodsName,
  651. bulkDensity:this.gridList.bulkDensity
  652. }).then(res => {
  653. if(res.data.data != 0){
  654. this.gridList.dryGrainPrice = res.data.data
  655. this.dryGrainPrice = res.data.data
  656. this.deductionchange()
  657. }
  658. })
  659. }
  660. }else if(that.gridList.type=='潮粮'){
  661. if (
  662. this.gridList.goodsName &&
  663. this.gridList.waterContent &&
  664. this.gridList.grade
  665. ) {
  666. console.log('123123')
  667. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  668. warehouseId: this.cangid,
  669. goodsName: this.gridList.goodsName,
  670. waterContent: this.gridList.waterContent,
  671. grade: this.gridList.grade,
  672. }).then(res => {
  673. if (that.gridList.paramType == '1') {
  674. // console.log(that.gridList)
  675. if(that.gridList.buckleMiscellaneous){
  676. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  677. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  678. .dryGrainPrice)).toFixed(4)
  679. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  680. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  681. .dryGrainPrice)).toFixed(4)
  682. }
  683. if (!that.gridList.tidalGrainPrice) {
  684. that.gridList.tidalGrainPrice = ''
  685. }
  686. } else {
  687. that.gridList.tidalGrainPrice = res.data.data
  688. that.tidalGrainPrice = res.data.data
  689. }
  690. this.deductionchange()
  691. })
  692. }
  693. }
  694. // if(that.gridList.dryGrainPrice){
  695. // that.dryGrainPrice=that.gridList.dryGrainPrice
  696. // }
  697. // if(that.gridList.tidalGrainPrice){
  698. // that.tidalGrainPrice=that.gridList.tidalGrainPrice
  699. // }
  700. if(!that.gridList.reGrade){
  701. that.gridList.reGrade=that.gridList.grade
  702. }
  703. if(!that.gridList.reWaterContent){
  704. that.gridList.reWaterContent=that.gridList.waterContent
  705. }
  706. if(!that.gridList.reBulkDensity){
  707. that.gridList.reBulkDensity=that.gridList.bulkDensity
  708. }
  709. if(!that.gridList.reImperfectGrain){
  710. that.gridList.reImperfectGrain=that.gridList.imperfectGrain
  711. }
  712. if(!that.gridList.reImpurity){
  713. that.gridList.reImpurity=that.gridList.impurity
  714. }
  715. if(!that.gridList.reMildewGrain){
  716. that.gridList.reMildewGrain=that.gridList.mildewGrain
  717. }
  718. if(!that.gridList.reJiaorenli){
  719. that.gridList.reJiaorenli=that.gridList.jiaorenli
  720. }
  721. if(this.gridList.outType&&this.gridList.serviceManagementType==3){
  722. this.outType=this.gridList.outType
  723. }
  724. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  725. id: this.cangid
  726. }).then(res => {
  727. that.warehouseList = res.data.data.warehousePositionInfoList
  728. })
  729. }
  730. })
  731. this.$api.doRequest('get', 'commonSysParameter/getInfo', {
  732. constId: 'QUA1'
  733. }).then(res => {
  734. if (res.data.data) {
  735. that.carModeList = res.data.data
  736. }
  737. })
  738. //质检货名下拉
  739. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  740. warehouseId: this.cangid
  741. }).then(res => {
  742. if (res.data.data) {
  743. that.goodsList = res.data.data
  744. if (that.goodsList.length > 0) {
  745. that.gridList.goodsName = that.goodsList[0].goodsName
  746. uni.setStorageSync('purchasePriceList', that.goodsList)
  747. that.purchasePriceList = uni.getStorageSync('purchasePriceList')
  748. }
  749. }
  750. })
  751. this.gridList.grade = this.gradeList[0].value
  752. this.gridList.gradeKey = this.gradeList[0].key
  753. },
  754. onShow() {
  755. this.multiSelector1=[{name:'他运',value:'他运'}]
  756. this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  757. warehouseName:this.warehouseName
  758. }).then(res => {
  759. // console.log(res)
  760. if(res.data.data.contractManagementInfoList){
  761. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  762. res.data.data.contractMangementInfoList[i].name='自运 ('+
  763. res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
  764. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  765. }
  766. }else{
  767. this.multiSelector1=[{name:'他运',value:'他运'}]
  768. }
  769. // this.taskNolist=res.data.data
  770. })
  771. // uni.showLoading({title: '加载中'})
  772. // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  773. // flag: 2,
  774. // warehouseName:this.warehouseName
  775. // }).then(res => {
  776. // console.log(res)
  777. // uni.hideLoading();
  778. // this.taskNolist=res.data.data
  779. // })
  780. let _kh = uni.getStorageSync('isClick')
  781. if (uni.getStorageSync('checkcustomer') && _kh) {
  782. let _customerInfo = uni.getStorageSync('checkcustomer')
  783. if (_customerInfo.shipperName) {
  784. this.gridList.identityId = _customerInfo.id
  785. //点击登记客户
  786. this.gridList.customerName = _customerInfo.shipperName
  787. this.gridList.customerPhone = _customerInfo.shipperPhone
  788. this.gridList.carNumber = _customerInfo.carNo
  789. } else {
  790. //点击搜索客户
  791. this.gridList.customerName = _customerInfo.customerName
  792. this.gridList.customerPhone = _customerInfo.customerPhone
  793. }
  794. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  795. }
  796. },
  797. methods: {
  798. Cancelword(){
  799. this.bottomHeight = '10rpx';
  800. this.MykeywordShow =false;
  801. this.InputEvent = '';
  802. },
  803. goNext(val){
  804. if(this.flag==0||this.flag==3||this.flag==4){
  805. var inputList = Equ_List;
  806. }else{
  807. var inputList = Equ_List1;
  808. }
  809. var index = inputList.indexOf(val);
  810. this.setScrollTops(val);
  811. if(index<inputList.length-1){
  812. this.InputEvent = inputList[index+1];
  813. }else{
  814. this.InputEvent=''
  815. this.bottomHeight = '10rpx';
  816. this.MykeywordShow = false;
  817. }
  818. },
  819. mykeywordset(datatxt){
  820. var arr = JSON.parse(datatxt);
  821. this.gridList[arr.even] = arr.value;
  822. if(arr.even=='waterContent'){
  823. this.waterContentChange()
  824. }else if(arr.even=='bulkDensity'){
  825. this.obtainPrice()
  826. }
  827. },
  828. SetInputKey(even){
  829. uni.hideKeyboard();
  830. this.InputEvent = even;
  831. this.setScrollTops(even);
  832. if(!this.MykeywordShow){
  833. this.bottomHeight = '320rpx';
  834. this.MykeywordShow = true;
  835. }
  836. },
  837. setScrollTops(even){
  838. if(this.flag==0||this.flag==3||this.flag==4){
  839. var inputList = Equ_List;
  840. }else{
  841. var inputList = Equ_List1;
  842. }
  843. var index = inputList.indexOf(even);
  844. this.viewTop = (index + 1) * 60 + 100;
  845. },
  846. pricefocus(e,status){
  847. console.log(e)
  848. if(status==1){
  849. if(e.detail.value==0){
  850. this.gridList.waterPriceIncrease=''
  851. }
  852. }else if(status==2){
  853. if(e.detail.value==0){
  854. this.gridList.waterPriceDeduction=''
  855. }
  856. }else if(status==3){
  857. if(e.detail.value==0){
  858. this.gridList.qualityPriceIncrease=''
  859. }
  860. }else if(status==4){
  861. if(e.detail.value==0){
  862. this.gridList.qualityPriceDeduction=''
  863. }
  864. }
  865. },
  866. priceblur(e,status){
  867. console.log(e)
  868. if(status==1){
  869. if(e.detail.value==''){
  870. this.gridList.waterPriceIncrease=0
  871. }
  872. }else if(status==2){
  873. if(e.detail.value==''){
  874. this.gridList.waterPriceDeduction=0
  875. }
  876. }else if(status==3){
  877. if(e.detail.value==''){
  878. this.gridList.qualityPriceIncrease=0
  879. }
  880. }else if(status==4){
  881. if(e.detail.value==''){
  882. this.gridList.qualityPriceDeduction=0
  883. }
  884. }
  885. },
  886. deductionchange(){
  887. console.log(this.gridList.type,this.tidalGrainPrice,
  888. Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4))
  889. if(this.gridList.type=='干粮'){
  890. if(this.dryGrainPrice!=''){
  891. 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))
  892. this.gridList.dryGrainPrice=Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
  893. }
  894. }else if(this.gridList.type=='潮粮'){
  895. if(this.tidalGrainPrice!=''){
  896. this.gridList.tidalGrainPrice=Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
  897. }
  898. }
  899. this.$forceUpdate()
  900. },
  901. obtainPrice(){//根据容重获取价格
  902. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  903. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  904. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  905. warehouseId: this.cangid,
  906. goodsName: this.gridList.goodsName,
  907. bulkDensity:this.gridList.bulkDensity
  908. }).then(res => {
  909. if(res.data.data != 0){
  910. this.gridList.dryGrainPrice = res.data.data
  911. this.dryGrainPrice = res.data.data
  912. this.gridList.waterPriceIncrease=0
  913. this.gridList.waterPriceDeduction=0
  914. this.gridList.qualityPriceIncrease=0
  915. this.gridList.qualityPriceDeduction=0
  916. }
  917. })
  918. // }
  919. }
  920. },
  921. changeprice(){
  922. if(this.pricetext=='解锁'){
  923. this.pricedisabled=false
  924. this.pricetext='锁定'
  925. }else{
  926. this.pricedisabled=true
  927. this.pricetext='解锁'
  928. }
  929. },
  930. inputprice(){
  931. if(this.pricetext=='锁定'){
  932. this.pricedisabled=true
  933. this.pricetext='解锁'
  934. }
  935. },
  936. inOutDatepicker(e){
  937. this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
  938. console.log(e)
  939. },
  940. fleetpicker(e){
  941. this.gridList.fleet=this.fleetNameList[e[0]].fleetName
  942. },
  943. changefreight(){
  944. this.freightstatus=!this.freightstatus
  945. if(this.freightstatus){
  946. this.freighttext='自动获取'
  947. }else{
  948. this.freighttext='手动填写'
  949. }
  950. },
  951. changecost(){
  952. this.coststatus=!this.coststatus
  953. if(this.coststatus){
  954. this.costtext='自动获取'
  955. }else{
  956. this.costtext='手动填写'
  957. }
  958. },
  959. gocustomer() {
  960. uni.navigateTo({
  961. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  962. .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
  963. })
  964. },
  965. print() {
  966. uni.navigateTo({
  967. url: '/pages/erpbusiness/bleConnect'
  968. })
  969. },
  970. close() {
  971. this.isShowPrint = false
  972. uni.navigateBack({})
  973. },
  974. // focusConfig(type){
  975. // console.log('childclick',type)
  976. // // 0是上一项
  977. // if(type==0){
  978. // }else{}
  979. // },
  980. hidden() {
  981. this.$refs.keyboard.open(false)
  982. },
  983. carPicker(e) {
  984. this.gridList.carModel = this.carModeList[e[0]].constValue
  985. },
  986. handleShowKeyboard() {
  987. if (this.flag == 0) {
  988. if (this.$refs.keyboard.open) {
  989. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  990. } else {
  991. this.$refs.keyboard[0].open(true)
  992. }
  993. }
  994. },
  995. handleShowKeyboard1() {
  996. if (this.flag == 0) {
  997. if (this.$refs.keyboard1.open) {
  998. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  999. } else {
  1000. this.$refs.keyboard1[0].open(true)
  1001. }
  1002. }
  1003. },
  1004. handleClick(e) {
  1005. this.gridList.carNumber = e.value //键盘输入值
  1006. },
  1007. handleClick1(e) {
  1008. this.gridList.jiaorenli = e.value //键盘输入值
  1009. },
  1010. change(e) {
  1011. if (e) {
  1012. this.gridList.supplementaryRecording = 1
  1013. } else {
  1014. this.gridList.supplementaryRecording = 0
  1015. }
  1016. },
  1017. confirmInfo() {
  1018. this.isShowAlert = true
  1019. },
  1020. alertBtn() {
  1021. this.gridList.agent=this.userInfo.userName;
  1022. var that = this
  1023. that.gridList.reWaterContent = that.gridList.waterContent
  1024. if (that.gridList.buckleMiscellaneous) {
  1025. that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
  1026. }
  1027. that.gridList.flag = 1
  1028. if(this.flag==3){
  1029. this.gridList.statusFlag=7
  1030. }else if(this.flag==4||this.flag==0){
  1031. this.gridList.statusFlag=0
  1032. }
  1033. else if(this.flag==1){
  1034. this.gridList.statusFlag=1
  1035. }else if(this.flag==2){
  1036. this.gridList.statusFlag=2
  1037. }
  1038. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
  1039. res => {
  1040. if (res.data.code == "200") {
  1041. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
  1042. id: that.gridList.id,
  1043. flag: 2
  1044. }).then(res => {
  1045. if (res.data.code == "200") {
  1046. that.$api.msg('提交成功!')
  1047. setTimeout(function() {
  1048. uni.navigateBack({delta:Int16Array})
  1049. }, 1000)
  1050. } else {
  1051. that.$api.msg('提交失败')
  1052. }
  1053. })
  1054. } else {
  1055. that.$api.msg('提交失败')
  1056. }
  1057. })
  1058. },
  1059. waterContentChange() {
  1060. var that = this
  1061. if (this.gridList.goodsName) {
  1062. for (var i = 0; i < this.purchasePriceList.length; i++) {
  1063. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  1064. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  1065. this.gridList.paramType = this.purchasePriceList[i].paramType
  1066. }
  1067. }
  1068. }
  1069. console.log(this.gridList.serviceManagementType)
  1070. if(this.gridList.serviceManagementType != 3){ //非收购入库 不需在获取价格
  1071. return
  1072. }
  1073. if (this.gridList.goodsName && this.cangid) {
  1074. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1075. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1076. warehouseId: this.cangid,
  1077. goodsName: this.gridList.goodsName
  1078. }).then(res => {
  1079. that.gridList.dryGrainPrice = res.data.data
  1080. that.dryGrainPrice = res.data.data
  1081. })
  1082. }
  1083. }
  1084. that.gridList.waterPriceIncrease=0
  1085. that.gridList.waterPriceDeduction=0
  1086. that.gridList.qualityPriceIncrease=0
  1087. that.gridList.qualityPriceDeduction=0
  1088. //潮粮单价改变事件
  1089. if (
  1090. this.gridList.goodsName &&
  1091. this.gridList.waterContent &&
  1092. this.gridList.grade
  1093. ) {
  1094. console.log('123123')
  1095. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1096. warehouseId: this.cangid,
  1097. goodsName: this.gridList.goodsName,
  1098. waterContent: this.gridList.waterContent,
  1099. grade: this.gridList.grade,
  1100. }).then(res => {
  1101. if (that.gridList.paramType == '1') {
  1102. // console.log(that.gridList)
  1103. if(that.gridList.buckleMiscellaneous){
  1104. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1105. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1106. .dryGrainPrice)).toFixed(4)
  1107. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1108. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1109. .dryGrainPrice)).toFixed(4)
  1110. }
  1111. if (!that.gridList.tidalGrainPrice) {
  1112. that.gridList.tidalGrainPrice = ''
  1113. }
  1114. if(that.gridList.type == '干粮'){
  1115. that.gridList.dryGrainPrice = res.data.data
  1116. that.dryGrainPrice = that.gridList.dryGrainPrice
  1117. }
  1118. } else {
  1119. that.gridList.tidalGrainPrice = res.data.data
  1120. if(that.gridList.type == '干粮'){
  1121. that.gridList.dryGrainPrice = res.data.data
  1122. that.dryGrainPrice = that.gridList.dryGrainPrice
  1123. }else{
  1124. that.gridList.tidalGrainPrice = res.data.data
  1125. that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1126. }
  1127. }
  1128. // that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1129. })
  1130. }
  1131. },
  1132. goodsPicker(e) {
  1133. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  1134. },
  1135. submit() {
  1136. this.$delete(this.gridList,'status')
  1137. this.gridList.agent=this.userInfo.userName;
  1138. // if(!this.$u.test.isEmpty(this.gridList.tidalGrainPrice)){
  1139. // this.gridList.tidalGrainPrice=''
  1140. // return
  1141. // }
  1142. if(this.flag==3){
  1143. this.gridList.statusFlag=7
  1144. }else if(this.flag==4||this.flag==0){
  1145. this.gridList.statusFlag=0
  1146. }
  1147. else if(this.flag==1){
  1148. this.gridList.statusFlag=1
  1149. }else if(this.flag==2){
  1150. this.gridList.statusFlag=2
  1151. }
  1152. if(this.gridList.serviceManagementType==3){
  1153. if(this.outType){
  1154. this.gridList.outType=this.outType
  1155. }
  1156. }else{
  1157. this.gridList.customerName = ''
  1158. }
  1159. var text=''
  1160. if(this.utils.getCurrectRoles('acquisitionQuality.qview')&&!this.utils.getCurrectRoles('acquisitionQuality.initial')){
  1161. text="确定提交钎样信息?"
  1162. if(this.flag==3||this.flag==4||this.flag==0){
  1163. this.gridList.brazer=1
  1164. }
  1165. }else{
  1166. text="确定提交质检信息?"
  1167. if(this.flag==3||this.flag==4||this.flag==0){
  1168. this.gridList.brazer=0
  1169. }
  1170. }
  1171. if(this.flag==4){
  1172. this.gridList.flag = 0
  1173. }else{
  1174. this.gridList.flag = this.flag
  1175. }
  1176. // if(this.flag==2){
  1177. // this.gridList.reInspector=this.userInfo.userName
  1178. // }
  1179. if (!this.gridList.qualityNo) {
  1180. this.$api.msg('编号不能为空')
  1181. return
  1182. }
  1183. var that = this
  1184. if(this.flag==4||this.flag==0){
  1185. if (!this.gridList.binNumber) {
  1186. this.$api.msg('仓位不能为空')
  1187. return
  1188. }
  1189. }
  1190. if(this.gridList.serviceManagementType==3){
  1191. if (!this.gridList.customerName) {
  1192. this.$api.msg('客户不能为空')
  1193. return
  1194. }
  1195. }
  1196. // if (!this.gridList.storageTagNo) {
  1197. // this.$api.msg('囤位号不能为空')
  1198. // return
  1199. // }
  1200. // if (this.gridList.storageTagNo.length > 10) {
  1201. // this.$api.msg('囤位号不能为空')
  1202. // return
  1203. // }
  1204. if (!this.gridList.carNumber) {
  1205. this.$api.msg('车牌号不能为空')
  1206. return
  1207. }
  1208. if (this.gridList.carNumber.length > 7) {
  1209. this.$api.msg('车牌号输入错误')
  1210. return
  1211. }
  1212. if (!this.gridList.goodsName) {
  1213. this.$api.msg('货名不能为空')
  1214. return
  1215. }
  1216. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  1217. this.gridList.buckleWeightRatio > 2) {
  1218. this.$api.msg('扣重比输入错误')
  1219. return
  1220. }
  1221. if (
  1222. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  1223. String(this.gridList.buckleWeightRatio).length -
  1224. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  1225. this.$api.msg('扣重比输入错误')
  1226. return
  1227. }
  1228. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  1229. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  1230. this.$api.msg('初检扣杂输入错误')
  1231. return
  1232. }
  1233. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  1234. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  1235. this.$api.msg('复检扣杂输入错误')
  1236. return
  1237. }
  1238. if (!this.gridList.type) {
  1239. this.$api.msg('类型不能为空')
  1240. return
  1241. }
  1242. if (this.value == false&&this.flag!=3 || this.flag == 2) {
  1243. if (!this.gridList.grade) {
  1244. this.$api.msg('等级不能为空')
  1245. return
  1246. }
  1247. if (!this.gridList.impurity) {
  1248. this.$api.msg('杂质不能为空')
  1249. return
  1250. }
  1251. if (!this.gridList.waterContent) {
  1252. this.$api.msg('初检水分不能为空')
  1253. return
  1254. }
  1255. // if (!this.gridList.reWaterContent) {
  1256. // this.$api.msg('复检水分不能为空')
  1257. // return
  1258. // }
  1259. if (!this.gridList.mildewGrain) {
  1260. this.$api.msg('霉变粒不能为空')
  1261. return
  1262. }
  1263. if(this.gridList.goodsName!="大豆"){
  1264. if (!this.gridList.bulkDensity) {
  1265. this.$api.msg('容重不能为空')
  1266. return
  1267. }
  1268. }else{
  1269. if (!this.gridList.bulkDensity) {
  1270. this.$api.msg('蛋白不能为空')
  1271. return
  1272. }
  1273. }
  1274. if (!this.gridList.jiaorenli) {
  1275. this.$api.msg('热损伤不能为空')
  1276. return
  1277. }
  1278. if (!this.gridList.imperfectGrain) {
  1279. this.$api.msg('不完整粒不能为空')
  1280. return
  1281. }
  1282. }
  1283. this.gridList.storageNumber = this.gridList.storageTagNo
  1284. var kid=JSON.parse(JSON.stringify(this.gridList.warehouseInOutId))
  1285. this.zjid=JSON.parse(JSON.stringify(this.gridList.id))
  1286. that.gridList.warehouseInOutDetail={
  1287. id:that.gridList.warehouseInOutId,
  1288. grade:that.gridList.grade,
  1289. reGrade:that.gridList.grade,
  1290. waterContent:that.gridList.waterContent,
  1291. reWaterContent:that.gridList.reWaterContent,
  1292. imperfectGrain:that.gridList.imperfectGrain,
  1293. reImperfectGrain:that.gridList.reImperfectGrain,
  1294. impurity:that.gridList.impurity,
  1295. reImpurity:that.gridList.reImpurity,
  1296. jiaorenli:that.gridList.jiaorenli,
  1297. reJiaorenli:that.gridList.reJiaorenli,
  1298. bulkDensity:that.gridList.bulkDensity,
  1299. reBulkDensity:that.gridList.reBulkDensity,
  1300. mildewGrain:that.gridList.mildewGrain,
  1301. reMildewGrain:that.gridList.reMildewGrain,
  1302. }
  1303. console.log(this.gridList)
  1304. uni.showModal({
  1305. content: text,
  1306. showCancel: true,
  1307. confirmText: '提交',
  1308. success: function(res) {
  1309. if (res.confirm) {
  1310. that.$api.doRequest('post',
  1311. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  1312. .then(res => {
  1313. uni.setStorageSync("quality_print", that.gridList)
  1314. that.gridList.id=kid
  1315. that.gridList.statusFlag=1
  1316. that.$api.doRequest('post',
  1317. '/warehouseInOutInfo/InOutWarehouse',
  1318. that.gridList)
  1319. .then(res => {
  1320. if (res.data.code == 200) {
  1321. that.$api.msg('编辑质检成功')
  1322. that.gridList.warehouseId = that.cangid
  1323. console.log('that.gridList', that.gridList)
  1324. if(that.utils.getCurrectRoles('acquisitionQuality.initial')){
  1325. that.isShowPrint = true
  1326. }else{
  1327. uni.navigateBack({delta:1})
  1328. }
  1329. // uni.getStorageSync("depotAcquisition_warehouseName")
  1330. // uni.navigateBack({})
  1331. }
  1332. })
  1333. })
  1334. }
  1335. }
  1336. })
  1337. },
  1338. gradepicker(e) {
  1339. console.log(e)
  1340. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1341. this.gridList.grade = this.gradeList[e[0]].value
  1342. this.gridList.gradeKey = this.gradeList[e[0]].key
  1343. this.waterContentChange()
  1344. },
  1345. gradepicker1(e) {
  1346. console.log(e)
  1347. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1348. this.gridList.reGrade = this.gradeList[e[0]].value
  1349. this.gridList.reGradeKey = this.gradeList[e[0]].key
  1350. },
  1351. binNumberpicker(e) {
  1352. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  1353. },
  1354. del(item) {
  1355. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  1356. id: item.id
  1357. }).then(res => {
  1358. if (res.data.code == 200) {
  1359. this.$api.msg('删除成功')
  1360. } else {
  1361. this.$api.msg('系统异常,请联系管理员')
  1362. }
  1363. })
  1364. },
  1365. contactUs() {
  1366. const that = this
  1367. uni.makePhoneCall({
  1368. // 手机号
  1369. phoneNumber: '18241771147',
  1370. // 成功回调
  1371. success: (res) => {},
  1372. // 失败回调
  1373. fail: (res) => {}
  1374. });
  1375. },
  1376. loadData() {
  1377. // const that = this
  1378. // if(uni.getStorageSync("PageCur")){
  1379. // that.PageCur = uni.getStorageSync("PageCur");
  1380. // }
  1381. // that.userInfoTmp = uni.getStorageSync("userInfo")
  1382. // uni.showLoading({
  1383. // title: '正在加载',
  1384. // mask:true
  1385. // })
  1386. // that.$api.request('integral', 'getIndexData', failres => {
  1387. // that.$api.msg(failres.errmsg)
  1388. // uni.hideLoading()
  1389. // }).then(res => {
  1390. // let data = res.data
  1391. // uni.setStorageSync("message", data.message);
  1392. // uni.setStorageSync("task", data.task);
  1393. // uni.setStorageSync("contract", data.contract);
  1394. // uni.setStorageSync('showTran', data.showTran);
  1395. // that.showTran = data.showTran
  1396. // that.gridList[4].tips = data.task
  1397. // that.gridList[2].tips = data.contract
  1398. // that.companyId = data.companyId
  1399. // uni.hideLoading()
  1400. // })
  1401. },
  1402. confirm() {
  1403. const that = this
  1404. if (!that.inputContent) {
  1405. that.$api.msg('输入不能为空')
  1406. return
  1407. }
  1408. let obj = {}
  1409. obj[that.feild] = that.inputContent
  1410. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1411. that.userInfo.nickname = that.inputContent
  1412. that.inputContent = ''
  1413. that.$store.commit('login', that.userInfo)
  1414. })
  1415. },
  1416. cancel() {
  1417. this.inputShow = false
  1418. this.inputStatus = 'none'
  1419. this.genderShow = false
  1420. },
  1421. myAccount() {
  1422. uni.navigateTo({
  1423. url: `/pageA/pages/contract`
  1424. })
  1425. },
  1426. /**
  1427. * 统一跳转接口,拦截未登录路由
  1428. * navigator标签现在默认没有转场动画,所以用view
  1429. */
  1430. navTo(url) {
  1431. if (!this.hasLogin) {
  1432. url = '/pages/public/login';
  1433. }
  1434. uni.navigateTo({
  1435. url
  1436. })
  1437. },
  1438. mycarClick(carNo) {
  1439. this.modalName = null
  1440. uni.navigateTo({
  1441. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1442. })
  1443. },
  1444. scanCode() {
  1445. uni.scanCode({
  1446. success: function(res) {
  1447. uni.navigateTo({
  1448. url: res.result
  1449. })
  1450. }
  1451. })
  1452. },
  1453. hideModal(e) {
  1454. this.modalName = null
  1455. },
  1456. }
  1457. }
  1458. </script>
  1459. <style lang='scss' scoped>
  1460. .title_b {
  1461. margin: 20rpx 20rpx 0rpx 20rpx;
  1462. padding: 20rpx 10rpx 20rpx 10rpx;
  1463. font-size: 18px;
  1464. font-weight: 550;
  1465. }
  1466. page {
  1467. background: #F5F6FA;
  1468. }
  1469. .wrap {
  1470. padding-bottom: 10px;
  1471. font-size: 14px;
  1472. background: #fff;
  1473. margin: 10px;
  1474. border-radius: 10px;
  1475. input {
  1476. font-size: 14px;
  1477. }
  1478. >.title {
  1479. padding: 10px 16px;
  1480. }
  1481. .b-b:after {
  1482. border-bottom: 1px solid #eee;
  1483. }
  1484. }
  1485. .footer {
  1486. background: #fff;
  1487. position: fixed;
  1488. bottom: 0;
  1489. width: 100%;
  1490. padding: 20px 10px;
  1491. z-index: 10;
  1492. .button {
  1493. background: #22C572;
  1494. width: 90%;
  1495. margin: 20rpx auto;
  1496. padding: 10px;
  1497. color: #fff;
  1498. text-align: center;
  1499. border-radius: 30px;
  1500. }
  1501. }
  1502. .c-row {
  1503. display: -webkit-box;
  1504. display: -webkit-flex;
  1505. display: flex;
  1506. -webkit-box-align: center;
  1507. -webkit-align-items: center;
  1508. align-items: center;
  1509. padding: 20rpx 30rpx;
  1510. position: relative;
  1511. }
  1512. .con-list {
  1513. -webkit-box-flex: 1;
  1514. -webkit-flex: 1;
  1515. flex: 1;
  1516. display: -webkit-box;
  1517. display: -webkit-flex;
  1518. display: flex;
  1519. -webkit-box-orient: vertical;
  1520. -webkit-box-direction: normal;
  1521. -webkit-flex-direction: column;
  1522. flex-direction: column;
  1523. color: #303133;
  1524. line-height: 40rpx;
  1525. text-align: right;
  1526. padding-right: 20rpx;
  1527. }
  1528. input:disabled {
  1529. color: #ccc;
  1530. }
  1531. .textarea-style {
  1532. border: 1px solid #EEEEEE;
  1533. width: 100%;
  1534. padding: 20rpx;
  1535. border-radius: 20rpx;
  1536. }
  1537. .c-row-fj {
  1538. padding: 20rpx
  1539. }
  1540. .buns_item {
  1541. display: flex;
  1542. padding: 80rpx 0 50rpx 0;
  1543. justify-content: space-around;
  1544. }
  1545. .but_css {
  1546. background: #22C572;
  1547. width: 40%;
  1548. padding: 20rpx;
  1549. color: #fff;
  1550. text-align: center;
  1551. border-radius: 20rpx;
  1552. }
  1553. </style>