edit_quality_testing.vue 65 KB

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