edit_quality_testing.vue 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492
  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. } else {
  1000. that.gridList.tidalGrainPrice = res.data.data
  1001. }
  1002. that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1003. })
  1004. }
  1005. },
  1006. goodsPicker(e) {
  1007. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  1008. },
  1009. submit() {
  1010. this.$delete(this.gridList,'status')
  1011. this.gridList.agent=this.userInfo.userName;
  1012. // if(!this.$u.test.isEmpty(this.gridList.tidalGrainPrice)){
  1013. // this.gridList.tidalGrainPrice=''
  1014. // return
  1015. // }
  1016. if(this.flag==3){
  1017. this.gridList.statusFlag=7
  1018. }else if(this.flag==4||this.flag==0){
  1019. this.gridList.statusFlag=0
  1020. }
  1021. else if(this.flag==1){
  1022. this.gridList.statusFlag=1
  1023. }else if(this.flag==2){
  1024. this.gridList.statusFlag=2
  1025. }
  1026. if(this.gridList.serviceManagementType==3){
  1027. if(this.outType){
  1028. this.gridList.outType=this.outType
  1029. }
  1030. }else{
  1031. this.gridList.customerName = ''
  1032. }
  1033. var text=''
  1034. if(this.utils.getCurrectRoles('acquisitionQuality.qview')&&!this.utils.getCurrectRoles('acquisitionQuality.initial')){
  1035. text="确定提交钎样信息?"
  1036. if(this.flag==3||this.flag==4||this.flag==0){
  1037. this.gridList.brazer=1
  1038. }
  1039. }else{
  1040. text="确定提交质检信息?"
  1041. if(this.flag==3||this.flag==4||this.flag==0){
  1042. this.gridList.brazer=0
  1043. }
  1044. }
  1045. if(this.flag==4){
  1046. this.gridList.flag = 0
  1047. }else{
  1048. this.gridList.flag = this.flag
  1049. }
  1050. // if(this.flag==2){
  1051. // this.gridList.reInspector=this.userInfo.userName
  1052. // }
  1053. if (!this.gridList.qualityNo) {
  1054. this.$api.msg('编号不能为空')
  1055. return
  1056. }
  1057. var that = this
  1058. if(this.flag==4||this.flag==0){
  1059. if (!this.gridList.binNumber) {
  1060. this.$api.msg('仓位不能为空')
  1061. return
  1062. }
  1063. }
  1064. if(this.gridList.serviceManagementType==3){
  1065. if (!this.gridList.customerName) {
  1066. this.$api.msg('客户不能为空')
  1067. return
  1068. }
  1069. }
  1070. // if (!this.gridList.storageTagNo) {
  1071. // this.$api.msg('囤位号不能为空')
  1072. // return
  1073. // }
  1074. // if (this.gridList.storageTagNo.length > 10) {
  1075. // this.$api.msg('囤位号不能为空')
  1076. // return
  1077. // }
  1078. if (!this.gridList.carNumber) {
  1079. this.$api.msg('车牌号不能为空')
  1080. return
  1081. }
  1082. if (this.gridList.carNumber.length > 7) {
  1083. this.$api.msg('车牌号输入错误')
  1084. return
  1085. }
  1086. if (!this.gridList.goodsName) {
  1087. this.$api.msg('货名不能为空')
  1088. return
  1089. }
  1090. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  1091. this.gridList.buckleWeightRatio > 2) {
  1092. this.$api.msg('扣重比输入错误')
  1093. return
  1094. }
  1095. if (
  1096. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  1097. String(this.gridList.buckleWeightRatio).length -
  1098. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  1099. this.$api.msg('扣重比输入错误')
  1100. return
  1101. }
  1102. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  1103. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  1104. this.$api.msg('初检扣杂输入错误')
  1105. return
  1106. }
  1107. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  1108. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  1109. this.$api.msg('复检扣杂输入错误')
  1110. return
  1111. }
  1112. if (!this.gridList.type) {
  1113. this.$api.msg('类型不能为空')
  1114. return
  1115. }
  1116. if (this.value == false&&this.flag!=3 || this.flag == 2) {
  1117. if (!this.gridList.grade) {
  1118. this.$api.msg('等级不能为空')
  1119. return
  1120. }
  1121. if (!this.gridList.impurity) {
  1122. this.$api.msg('杂质不能为空')
  1123. return
  1124. }
  1125. if (!this.gridList.waterContent) {
  1126. this.$api.msg('初检水分不能为空')
  1127. return
  1128. }
  1129. // if (!this.gridList.reWaterContent) {
  1130. // this.$api.msg('复检水分不能为空')
  1131. // return
  1132. // }
  1133. if (!this.gridList.mildewGrain) {
  1134. this.$api.msg('霉变粒不能为空')
  1135. return
  1136. }
  1137. if(this.gridList.goodsName!="大豆"){
  1138. if (!this.gridList.bulkDensity) {
  1139. this.$api.msg('容重不能为空')
  1140. return
  1141. }
  1142. }else{
  1143. if (!this.gridList.bulkDensity) {
  1144. this.$api.msg('蛋白不能为空')
  1145. return
  1146. }
  1147. }
  1148. if (!this.gridList.jiaorenli) {
  1149. this.$api.msg('热损伤不能为空')
  1150. return
  1151. }
  1152. if (!this.gridList.imperfectGrain) {
  1153. this.$api.msg('不完整粒不能为空')
  1154. return
  1155. }
  1156. }
  1157. this.gridList.storageNumber = this.gridList.storageTagNo
  1158. var kid=JSON.parse(JSON.stringify(this.gridList.warehouseInOutId))
  1159. this.zjid=JSON.parse(JSON.stringify(this.gridList.id))
  1160. that.gridList.warehouseInOutDetail={
  1161. id:that.gridList.warehouseInOutId,
  1162. grade:that.gridList.grade,
  1163. reGrade:that.gridList.grade,
  1164. waterContent:that.gridList.waterContent,
  1165. reWaterContent:that.gridList.reWaterContent,
  1166. imperfectGrain:that.gridList.imperfectGrain,
  1167. reImperfectGrain:that.gridList.reImperfectGrain,
  1168. impurity:that.gridList.impurity,
  1169. reImpurity:that.gridList.reImpurity,
  1170. jiaorenli:that.gridList.jiaorenli,
  1171. reJiaorenli:that.gridList.reJiaorenli,
  1172. bulkDensity:that.gridList.bulkDensity,
  1173. reBulkDensity:that.gridList.reBulkDensity,
  1174. mildewGrain:that.gridList.mildewGrain,
  1175. reMildewGrain:that.gridList.reMildewGrain,
  1176. }
  1177. console.log(this.gridList)
  1178. uni.showModal({
  1179. content: text,
  1180. showCancel: true,
  1181. confirmText: '提交',
  1182. success: function(res) {
  1183. if (res.confirm) {
  1184. that.$api.doRequest('post',
  1185. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  1186. .then(res => {
  1187. uni.setStorageSync("quality_print", that.gridList)
  1188. that.gridList.id=kid
  1189. that.gridList.statusFlag=1
  1190. that.$api.doRequest('post',
  1191. '/warehouseInOutInfo/InOutWarehouse',
  1192. that.gridList)
  1193. .then(res => {
  1194. if (res.data.code == 200) {
  1195. that.$api.msg('编辑质检成功')
  1196. that.gridList.warehouseId = that.cangid
  1197. console.log('that.gridList', that.gridList)
  1198. if(that.utils.getCurrectRoles('acquisitionQuality.initial')){
  1199. that.isShowPrint = true
  1200. }else{
  1201. uni.navigateBack({delta:1})
  1202. }
  1203. // uni.getStorageSync("depotAcquisition_warehouseName")
  1204. // uni.navigateBack({})
  1205. }
  1206. })
  1207. })
  1208. }
  1209. }
  1210. })
  1211. },
  1212. gradepicker(e) {
  1213. console.log(e)
  1214. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1215. this.gridList.grade = this.gradeList[e[0]].value
  1216. this.gridList.gradeKey = this.gradeList[e[0]].key
  1217. this.waterContentChange()
  1218. },
  1219. gradepicker1(e) {
  1220. console.log(e)
  1221. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1222. this.gridList.reGrade = this.gradeList[e[0]].value
  1223. this.gridList.reGradeKey = this.gradeList[e[0]].key
  1224. },
  1225. binNumberpicker(e) {
  1226. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  1227. },
  1228. del(item) {
  1229. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  1230. id: item.id
  1231. }).then(res => {
  1232. if (res.data.code == 200) {
  1233. this.$api.msg('删除成功')
  1234. } else {
  1235. this.$api.msg('系统异常,请联系管理员')
  1236. }
  1237. })
  1238. },
  1239. contactUs() {
  1240. const that = this
  1241. uni.makePhoneCall({
  1242. // 手机号
  1243. phoneNumber: '18241771147',
  1244. // 成功回调
  1245. success: (res) => {},
  1246. // 失败回调
  1247. fail: (res) => {}
  1248. });
  1249. },
  1250. loadData() {
  1251. // const that = this
  1252. // if(uni.getStorageSync("PageCur")){
  1253. // that.PageCur = uni.getStorageSync("PageCur");
  1254. // }
  1255. // that.userInfoTmp = uni.getStorageSync("userInfo")
  1256. // uni.showLoading({
  1257. // title: '正在加载',
  1258. // mask:true
  1259. // })
  1260. // that.$api.request('integral', 'getIndexData', failres => {
  1261. // that.$api.msg(failres.errmsg)
  1262. // uni.hideLoading()
  1263. // }).then(res => {
  1264. // let data = res.data
  1265. // uni.setStorageSync("message", data.message);
  1266. // uni.setStorageSync("task", data.task);
  1267. // uni.setStorageSync("contract", data.contract);
  1268. // uni.setStorageSync('showTran', data.showTran);
  1269. // that.showTran = data.showTran
  1270. // that.gridList[4].tips = data.task
  1271. // that.gridList[2].tips = data.contract
  1272. // that.companyId = data.companyId
  1273. // uni.hideLoading()
  1274. // })
  1275. },
  1276. confirm() {
  1277. const that = this
  1278. if (!that.inputContent) {
  1279. that.$api.msg('输入不能为空')
  1280. return
  1281. }
  1282. let obj = {}
  1283. obj[that.feild] = that.inputContent
  1284. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1285. that.userInfo.nickname = that.inputContent
  1286. that.inputContent = ''
  1287. that.$store.commit('login', that.userInfo)
  1288. })
  1289. },
  1290. cancel() {
  1291. this.inputShow = false
  1292. this.inputStatus = 'none'
  1293. this.genderShow = false
  1294. },
  1295. myAccount() {
  1296. uni.navigateTo({
  1297. url: `/pageA/pages/contract`
  1298. })
  1299. },
  1300. /**
  1301. * 统一跳转接口,拦截未登录路由
  1302. * navigator标签现在默认没有转场动画,所以用view
  1303. */
  1304. navTo(url) {
  1305. if (!this.hasLogin) {
  1306. url = '/pages/public/login';
  1307. }
  1308. uni.navigateTo({
  1309. url
  1310. })
  1311. },
  1312. mycarClick(carNo) {
  1313. this.modalName = null
  1314. uni.navigateTo({
  1315. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1316. })
  1317. },
  1318. scanCode() {
  1319. uni.scanCode({
  1320. success: function(res) {
  1321. uni.navigateTo({
  1322. url: res.result
  1323. })
  1324. }
  1325. })
  1326. },
  1327. hideModal(e) {
  1328. this.modalName = null
  1329. },
  1330. }
  1331. }
  1332. </script>
  1333. <style lang='scss' scoped>
  1334. .title_b {
  1335. margin: 20rpx 20rpx 0rpx 20rpx;
  1336. padding: 20rpx 10rpx 20rpx 10rpx;
  1337. font-size: 18px;
  1338. font-weight: 550;
  1339. }
  1340. page {
  1341. background: #F5F6FA;
  1342. }
  1343. .wrap {
  1344. padding-bottom: 10px;
  1345. font-size: 14px;
  1346. background: #fff;
  1347. margin: 10px;
  1348. border-radius: 10px;
  1349. input {
  1350. font-size: 14px;
  1351. }
  1352. >.title {
  1353. padding: 10px 16px;
  1354. }
  1355. .b-b:after {
  1356. border-bottom: 1px solid #eee;
  1357. }
  1358. }
  1359. .footer {
  1360. background: #fff;
  1361. position: fixed;
  1362. bottom: 0;
  1363. width: 100%;
  1364. padding: 20px 10px;
  1365. z-index: 10;
  1366. .button {
  1367. background: #22C572;
  1368. width: 90%;
  1369. margin: 20rpx auto;
  1370. padding: 10px;
  1371. color: #fff;
  1372. text-align: center;
  1373. border-radius: 30px;
  1374. }
  1375. }
  1376. .c-row {
  1377. display: -webkit-box;
  1378. display: -webkit-flex;
  1379. display: flex;
  1380. -webkit-box-align: center;
  1381. -webkit-align-items: center;
  1382. align-items: center;
  1383. padding: 20rpx 30rpx;
  1384. position: relative;
  1385. }
  1386. .con-list {
  1387. -webkit-box-flex: 1;
  1388. -webkit-flex: 1;
  1389. flex: 1;
  1390. display: -webkit-box;
  1391. display: -webkit-flex;
  1392. display: flex;
  1393. -webkit-box-orient: vertical;
  1394. -webkit-box-direction: normal;
  1395. -webkit-flex-direction: column;
  1396. flex-direction: column;
  1397. color: #303133;
  1398. line-height: 40rpx;
  1399. text-align: right;
  1400. padding-right: 20rpx;
  1401. }
  1402. input:disabled {
  1403. color: #ccc;
  1404. }
  1405. .textarea-style {
  1406. border: 1px solid #EEEEEE;
  1407. width: 100%;
  1408. padding: 20rpx;
  1409. border-radius: 20rpx;
  1410. }
  1411. .c-row-fj {
  1412. padding: 20rpx
  1413. }
  1414. .buns_item {
  1415. display: flex;
  1416. padding: 80rpx 0 50rpx 0;
  1417. justify-content: space-around;
  1418. }
  1419. .but_css {
  1420. background: #22C572;
  1421. width: 40%;
  1422. padding: 20rpx;
  1423. color: #fff;
  1424. text-align: center;
  1425. border-radius: 20rpx;
  1426. }
  1427. </style>