edit_quality_testing.vue 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914
  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="text"></input>
  534. </view>
  535. </view>
  536. <view v-show="compName=='辽宁佳屹农商贸有限公司'"
  537. class="c-row">
  538. <view class="title">生产日期</view>
  539. <view class="con-list">
  540. <u-calendar v-model="show3" @change="change1" :mode="mode"></u-calendar>
  541. <view :style='gridList.produceDate?"color:#000;":"color:#999;"' @click="show3 = true">{{gridList.produceDate?gridList.produceDate:'选择生产日期'}}</view>
  542. <!-- <input v-model='gridList.factory' :disabled='disabled1' maxlength="30"
  543. placeholder="请输入工厂" name="input" type="digit"></input> -->
  544. </view>
  545. </view>
  546. <view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
  547. <view class="title">污染件数</view>
  548. <view class="con-list">
  549. <input v-model='gridList.polluteNum' :disabled='disabled1'
  550. placeholder="请输入污染件数" name="input" type="digit"></input>
  551. </view>
  552. </view>
  553. <view v-show="compName=='辽宁佳屹农商贸有限公司'" style='padding:20rpx 30rpx;'>
  554. <view class="title">污染附件</view>
  555. <view class="con-list">
  556. <u-upload :custom-btn='true' class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
  557. modelId: '',
  558. vesselId: ''}" :file-list="fileList" :action="action" :show-progress='false' :show-tips="false" :max-size="maxSize" :max-count="9"
  559. :size-type="['compressed']" @on-success="getImgUrl($event,0)" @on-error="onError"
  560. @on-remove="onRemove($event,0)" @on-uploaded="isAdd = true"
  561. :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress">
  562. <view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover"
  563. hover-stay-time="150">
  564. <image style="width:23px;height:23px;" src="../../static/img/liangmai/xiangji-2.png"
  565. mode=""></image>
  566. <view>选择图片</view>
  567. </view>
  568. </u-upload>
  569. </view>
  570. </view>
  571. <view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
  572. <view class="title">破损件数</view>
  573. <view class="con-list">
  574. <input v-model='gridList.wornNum' :disabled='disabled1'
  575. placeholder="请输入破损件数" name="input" type="digit"></input>
  576. </view>
  577. </view>
  578. <view v-show="compName=='辽宁佳屹农商贸有限公司'" style='padding:20rpx 30rpx;'>
  579. <view class="title">破损附件</view>
  580. <view class="con-list">
  581. <u-upload :custom-btn='true' :file-list="fileList1" class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
  582. modelId: '',
  583. vesselId: ''}" :action="action" :show-progress='false' :show-tips="false" :max-size="maxSize" :max-count="9"
  584. :size-type="['compressed']" @on-success="getImgUrl($event,1)" @on-error="onError"
  585. @on-remove="onRemove($event,1)" @on-uploaded="isAdd = true"
  586. :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress">
  587. <view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover"
  588. hover-stay-time="150">
  589. <image style="width:23px;height:23px;" src="../../static/img/liangmai/xiangji-2.png"
  590. mode=""></image>
  591. <view>选择图片</view>
  592. </view>
  593. </u-upload>
  594. </view>
  595. </view>
  596. </view>
  597. </view>
  598. <view class="footer">
  599. <view v-if='flag==1' @click='confirmInfo' class="button">确认初检信息</view>
  600. <view @click='submit' class="button">提交</view>
  601. </view>
  602. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  603. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  604. :showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  605. <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
  606. <view class="buns_item">
  607. <view class="but_css" @click="print">打印小票</view>
  608. <view class="but_css" @click="close">返回</view>
  609. </view>
  610. </u-popup>
  611. <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
  612. v-model="show" mode="selector">
  613. </u-picker>
  614. </view>
  615. </template>
  616. <script>
  617. const Equ_List=['waterContent','bulkDensity','imperfectGrain','impurity','mildewGrain','jiaorenli'];
  618. const Equ_List1=['reWaterContent','reBulkDensity','reImperfectGrain','reImpurity','reMildewGrain','reJiaorenli'];
  619. import dragButton from "@/components/drag-button/drag-button.vue";
  620. import keyboard from "@/components/master-keyboard/master-keyboard.vue";
  621. import MyNumberInput from "@/components/MyNumberInput.vue";
  622. import {
  623. mapState
  624. } from 'vuex';
  625. let startY = 0,
  626. moveY = 0,
  627. pageAtTop = true;
  628. export default {
  629. components: {
  630. dragButton,
  631. keyboard,
  632. MyNumberInput
  633. },
  634. data() {
  635. return {
  636. isShowPrint: false,
  637. inputShow: false,
  638. modalName: '',
  639. mycarStyle: '',
  640. feild: undefined,
  641. id: 0,
  642. show: false,
  643. show2:false,
  644. show4:false,
  645. show5:false,
  646. show7:false,
  647. show8:false,
  648. pricedisabled:false,
  649. multiSelector1:[{name:'他运',value:'他运'}],
  650. outType:'',
  651. selector: [],
  652. show1: false,
  653. pricetext:'锁定',
  654. goodsName: false,
  655. carstatus: false,
  656. params:{year: true,
  657. month: true,
  658. day: true,},
  659. inputContent: '',
  660. multiSelector: [{
  661. name: '汽运',
  662. value: '0',
  663. },
  664. {
  665. name: '火运',
  666. value: '1',
  667. },
  668. {
  669. name: '集装箱船',
  670. value: '2',
  671. },
  672. {
  673. name: '散船',
  674. value: '3',
  675. },
  676. ],
  677. coverTransform: 'translateY(0px)',
  678. coverTransition: '0s',
  679. moving: false,
  680. footprintList: [],
  681. zjid:'',
  682. searchKeyWord: '',
  683. isVip: false,
  684. flag: 0,
  685. freightstatus:false,
  686. coststatus:false,
  687. freighttext:'手动填写',
  688. costtext:'手动填写',
  689. userInfoTmp: [],
  690. inputStatus: 'none',
  691. carInfo: [],
  692. gridCol: 4,
  693. pageSize: 10,
  694. currentPage: 1,
  695. gridBorder: false,
  696. headUrl: "../../static/img/myimg/YongHu@3x.png",
  697. userphone: "",
  698. username: "请更改昵称",
  699. gridList: {
  700. natureOfGrainPurchase: '贸易粮',
  701. type: '潮粮',
  702. tidalGrainPrice: '',
  703. dryGrainPrice: '',
  704. carNumber: '',
  705. carModel: '',
  706. serviceManagementType:'3',
  707. specifications:830
  708. },
  709. action: this.$uploadUrl,
  710. pcUserInfo: uni.getStorageSync('pcUserInfo'),
  711. maxSize: 50 * 1024 * 1024,
  712. managementType: '',
  713. warehouseName: '',
  714. warehouseList: [],
  715. InputEvent:'',
  716. bottomHeight:'10rpx',
  717. MykeywordShow:false,
  718. showTran: true,
  719. companyId: 1,
  720. current: 4,
  721. value: false,
  722. carModeList: [],
  723. fleetNameList:[],
  724. gradeList: [{
  725. key: 1,
  726. value: '一等品'
  727. },
  728. {
  729. key: 2,
  730. value: '二等品'
  731. },
  732. {
  733. key: 3,
  734. value: '三等品'
  735. },
  736. {
  737. key: 4,
  738. value: '等外'
  739. },
  740. ],
  741. cangid: '',
  742. goodsList: [],
  743. taskNolist:[],
  744. dryGrainPrice:0,
  745. tidalGrainPrice:0,
  746. isShowAlert: false,
  747. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  748. transgeneShow:false,
  749. transgeneList:[{value:'非转基因'},{value:'转基因'}],
  750. colorLustreShow : false,
  751. colorLustreList:[{value:'正常'},{value:'异常'}],
  752. imglist:[],
  753. imglist1:[],
  754. fileList:[],
  755. fileList1:[],
  756. compName: "",
  757. }
  758. },
  759. // #ifndef MP
  760. onNavigationBarButtonTap(e) {
  761. const index = e.index;
  762. if (index === 0) {
  763. this.navTo('/pages/set/set');
  764. } else if (index === 1) {
  765. // #ifdef APP-PLUS
  766. const pages = getCurrentPages();
  767. const page = pages[pages.length - 1];
  768. const currentWebview = page.$getAppWebview();
  769. currentWebview.hideTitleNViewButtonRedDot({
  770. index
  771. });
  772. // #endif
  773. uni.navigateTo({
  774. url: '/pages/notice/notice'
  775. })
  776. }
  777. },
  778. // #endif
  779. computed: {
  780. ...mapState(['hasLogin', 'userInfo']),
  781. // 手机号中间4位加*
  782. starUserphone() {
  783. let reg = /^(\d{3})\d{4}(\d{4})$/;
  784. if (this.userphone) {
  785. return this.userphone.replace(reg, "$1****$2");
  786. }
  787. }
  788. },
  789. onLoad(options) {
  790. this.id = options.id
  791. this.flag = options.flag
  792. this.cangid = options.cangid
  793. this.warehouseName=options.warehouseName
  794. this.managementType = options.managementType
  795. console.log(this.flag)
  796. var that = this
  797. uni.showLoading({
  798. title:"加载中"
  799. })
  800. var that = this
  801. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  802. id: this.id
  803. }).then(res => {
  804. uni.hideLoading()
  805. if (res.data.data) {
  806. let data = res.data.data
  807. if (data.supplementaryRecording == 1) {
  808. that.value = true
  809. } else {
  810. that.value = false
  811. }
  812. if(data.polluteUrl){
  813. this.imglist=data.polluteUrl.split(',')
  814. this.$api.doRequest('get', 'appendix/query/getFileList', {
  815. appendixIds: data.polluteUrl
  816. }).then(res1 => {
  817. for (var i = 0; i < res1.data.data.length; i++) {
  818. res1.data.data[i].url=res1.data.data[i].appendixPath
  819. }
  820. this.fileList=res1.data.data
  821. })
  822. }
  823. if(data.wornUrl){
  824. this.imglist1=data.wornUrl.split(',')
  825. this.$api.doRequest('get', 'appendix/query/getFileList', {
  826. appendixIds: data.wornUrl
  827. }).then(res1 => {
  828. for (var i = 0; i < res1.data.data.length; i++) {
  829. res1.data.data[i].url=res1.data.data[i].appendixPath
  830. }
  831. this.fileList1=res1.data.data
  832. })
  833. }
  834. that.gridList = data
  835. if(that.gridList.type=='干粮'){
  836. if (this.gridList.goodsName &&
  837. this.gridList.bulkDensity &&
  838. this.cangid) {
  839. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  840. warehouseId: this.cangid,
  841. goodsName: this.gridList.goodsName,
  842. bulkDensity:this.gridList.bulkDensity
  843. }).then(res => {
  844. if(res.data.data != 0){
  845. this.gridList.dryGrainPrice = res.data.data
  846. this.dryGrainPrice = res.data.data
  847. this.deductionchange()
  848. }
  849. })
  850. }
  851. }else if(that.gridList.type=='潮粮'){
  852. if (
  853. this.gridList.goodsName &&
  854. this.gridList.waterContent &&
  855. this.gridList.grade
  856. ) {
  857. console.log('123123')
  858. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  859. warehouseId: this.cangid,
  860. goodsName: this.gridList.goodsName,
  861. waterContent: this.gridList.waterContent,
  862. grade: this.gridList.grade,
  863. }).then(res => {
  864. if (that.gridList.paramType == '1') {
  865. // console.log(that.gridList)
  866. if(that.gridList.buckleMiscellaneous){
  867. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  868. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  869. .dryGrainPrice)).toFixed(4)
  870. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  871. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  872. .dryGrainPrice)).toFixed(4)
  873. }
  874. if (!that.gridList.tidalGrainPrice) {
  875. that.gridList.tidalGrainPrice = ''
  876. }
  877. } else {
  878. that.gridList.tidalGrainPrice = res.data.data
  879. that.tidalGrainPrice = res.data.data
  880. }
  881. this.deductionchange()
  882. })
  883. }
  884. }
  885. // if(that.gridList.dryGrainPrice){
  886. // that.dryGrainPrice=that.gridList.dryGrainPrice
  887. // }
  888. // if(that.gridList.tidalGrainPrice){
  889. // that.tidalGrainPrice=that.gridList.tidalGrainPrice
  890. // }
  891. if(!that.gridList.reGrade){
  892. that.gridList.reGrade=that.gridList.grade
  893. }
  894. if(!that.gridList.reWaterContent){
  895. that.gridList.reWaterContent=that.gridList.waterContent
  896. }
  897. if(!that.gridList.reBulkDensity){
  898. that.gridList.reBulkDensity=that.gridList.bulkDensity
  899. }
  900. if(!that.gridList.reImperfectGrain){
  901. that.gridList.reImperfectGrain=that.gridList.imperfectGrain
  902. }
  903. if(!that.gridList.reImpurity){
  904. that.gridList.reImpurity=that.gridList.impurity
  905. }
  906. if(!that.gridList.reMildewGrain){
  907. that.gridList.reMildewGrain=that.gridList.mildewGrain
  908. }
  909. if(!that.gridList.reJiaorenli){
  910. that.gridList.reJiaorenli=that.gridList.jiaorenli
  911. }
  912. if(this.gridList.outType&&this.gridList.serviceManagementType==3){
  913. this.outType=this.gridList.outType
  914. }
  915. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  916. id: this.cangid
  917. }).then(res => {
  918. that.warehouseList = res.data.data.warehousePositionInfoList
  919. })
  920. //质检货名下拉
  921. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  922. warehouseId: this.cangid
  923. }).then(res => {
  924. if (res.data.data) {
  925. that.goodsList = res.data.data
  926. if (that.goodsList.length > 0) {
  927. if(!that.gridList.goodsName){
  928. that.gridList.goodsName = that.goodsList[0].goodsName
  929. }
  930. uni.setStorageSync('purchasePriceList', that.goodsList)
  931. that.purchasePriceList = uni.getStorageSync('purchasePriceList')
  932. }
  933. }
  934. else if(res.data.code != 200 && that.gridList.serviceManagementType==3){
  935. uni.showModal({
  936. content:res.data.message,
  937. showCancel:false
  938. })
  939. }
  940. })
  941. }
  942. })
  943. this.$api.doRequest('get', 'commonSysParameter/getInfo', {
  944. constId: 'QUA1'
  945. }).then(res => {
  946. if (res.data.data) {
  947. that.carModeList = res.data.data
  948. }
  949. })
  950. this.gridList.grade = this.gradeList[2].value
  951. this.gridList.gradeKey = this.gradeList[2].key
  952. },
  953. onShow() {
  954. var that = this
  955. if(uni.getStorageSync('compName1')){
  956. that.compName = uni.getStorageSync('compName1').company
  957. }
  958. this.multiSelector1=[{name:'他运',value:'他运'}]
  959. this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  960. warehouseName:this.warehouseName
  961. }).then(res => {
  962. // console.log(res)
  963. if(res.data.data.contractManagementInfoList){
  964. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  965. res.data.data.contractMangementInfoList[i].name='自运 ('+
  966. res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
  967. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  968. }
  969. }else{
  970. this.multiSelector1=[{name:'他运',value:'他运'}]
  971. }
  972. // this.taskNolist=res.data.data
  973. })
  974. // uni.showLoading({title: '加载中'})
  975. // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  976. // flag: 2,
  977. // warehouseName:this.warehouseName
  978. // }).then(res => {
  979. // console.log(res)
  980. // uni.hideLoading();
  981. // this.taskNolist=res.data.data
  982. // })
  983. let _kh = uni.getStorageSync('isClick')
  984. if (uni.getStorageSync('checkcustomer') && _kh) {
  985. let _customerInfo = uni.getStorageSync('checkcustomer')
  986. if (_customerInfo.shipperName) {
  987. this.gridList.identityId = _customerInfo.id
  988. //点击登记客户
  989. this.gridList.customerName = _customerInfo.shipperName
  990. this.gridList.customerPhone = _customerInfo.shipperPhone
  991. this.gridList.carNumber = _customerInfo.carNo
  992. } else {
  993. //点击搜索客户
  994. this.gridList.customerName = _customerInfo.customerName
  995. this.gridList.customerPhone = _customerInfo.customerPhone
  996. }
  997. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  998. }
  999. },
  1000. methods: {
  1001. onError(error) {
  1002. alert(error)
  1003. console.log('------------error-----------')
  1004. console.log(error)
  1005. },
  1006. onProgress(e) {
  1007. console.log(e)
  1008. },
  1009. radioGroupChange(e){
  1010. console.log(e)
  1011. this.gridList.specifications=e
  1012. },
  1013. change1(e) {
  1014. this.gridList.produceDate=e.result
  1015. console.log(e);
  1016. },
  1017. onRemove(index,i) {
  1018. console.log(index,i)
  1019. if(i==0){
  1020. this.imglist.splice(index, 1)
  1021. this.gridList.polluteUrl=this.imglist.toString()
  1022. }else{
  1023. this.imglist1.splice(index, 1)
  1024. this.gridList.wornUrl=this.imglist1.toString()
  1025. }
  1026. },
  1027. getImgUrl(res,status) {
  1028. var that = this
  1029. this.$api.doRequest('post', '/appendix/api/saveFilesApp', {
  1030. newAppendixs: [res.data],
  1031. oldAppendixIds: ""
  1032. }).then(res1 => {
  1033. if(status==0){
  1034. that.imglist.push(res1.data.data[0])
  1035. that.gridList.polluteUrl=that.imglist.toString()
  1036. }else{
  1037. that.imglist1.push(res1.data.data[0])
  1038. that.gridList.wornUrl=that.imglist1.toString()
  1039. }
  1040. console.log(res)
  1041. })
  1042. },
  1043. colorLustreClick(e){
  1044. this.gridList.colorLustre = this.colorLustreList[e[0]].value
  1045. },
  1046. colorLustreClick1(e){
  1047. this.gridList.reColorLustre = this.colorLustreList[e[0]].value
  1048. },
  1049. transgeneClick(e){
  1050. this.gridList.transgene = this.transgeneList[e[0]].value
  1051. },
  1052. transgeneClick1(e){
  1053. this.gridList.reTransgene = this.transgeneList[e[0]].value
  1054. },
  1055. Cancelword(){
  1056. this.bottomHeight = '10rpx';
  1057. this.MykeywordShow =false;
  1058. this.InputEvent = '';
  1059. },
  1060. goNext(val){
  1061. if(this.flag==0||this.flag==3||this.flag==4){
  1062. var inputList = Equ_List;
  1063. }else{
  1064. var inputList = Equ_List1;
  1065. }
  1066. var index = inputList.indexOf(val);
  1067. this.setScrollTops(val);
  1068. if(index<inputList.length-1){
  1069. this.InputEvent = inputList[index+1];
  1070. }else{
  1071. this.InputEvent=''
  1072. this.bottomHeight = '10rpx';
  1073. this.MykeywordShow = false;
  1074. }
  1075. },
  1076. mykeywordset(datatxt){
  1077. var arr = JSON.parse(datatxt);
  1078. this.gridList[arr.even] = arr.value;
  1079. if(arr.even=='waterContent'){
  1080. this.waterContentChange()
  1081. }else if(arr.even=='bulkDensity'){
  1082. this.obtainPrice()
  1083. }
  1084. },
  1085. SetInputKey(even){
  1086. uni.hideKeyboard();
  1087. this.InputEvent = even;
  1088. this.setScrollTops(even);
  1089. if(!this.MykeywordShow){
  1090. this.bottomHeight = '320rpx';
  1091. this.MykeywordShow = true;
  1092. }
  1093. },
  1094. setScrollTops(even){
  1095. if(this.flag==0||this.flag==3||this.flag==4){
  1096. var inputList = Equ_List;
  1097. }else{
  1098. var inputList = Equ_List1;
  1099. }
  1100. var index = inputList.indexOf(even);
  1101. this.viewTop = (index + 1) * 60 + 100;
  1102. },
  1103. pricefocus(e,status){
  1104. console.log(e)
  1105. if(status==1){
  1106. if(e.detail.value==0){
  1107. this.gridList.waterPriceIncrease=''
  1108. }
  1109. }else if(status==2){
  1110. if(e.detail.value==0){
  1111. this.gridList.waterPriceDeduction=''
  1112. }
  1113. }else if(status==3){
  1114. if(e.detail.value==0){
  1115. this.gridList.qualityPriceIncrease=''
  1116. }
  1117. }else if(status==4){
  1118. if(e.detail.value==0){
  1119. this.gridList.qualityPriceDeduction=''
  1120. }
  1121. }
  1122. },
  1123. priceblur(e,status){
  1124. console.log(e)
  1125. if(status==1){
  1126. if(e.detail.value==''){
  1127. this.gridList.waterPriceIncrease=0
  1128. }
  1129. }else if(status==2){
  1130. if(e.detail.value==''){
  1131. this.gridList.waterPriceDeduction=0
  1132. }
  1133. }else if(status==3){
  1134. if(e.detail.value==''){
  1135. this.gridList.qualityPriceIncrease=0
  1136. }
  1137. }else if(status==4){
  1138. if(e.detail.value==''){
  1139. this.gridList.qualityPriceDeduction=0
  1140. }
  1141. }
  1142. },
  1143. deductionchange(){
  1144. console.log(this.gridList.type,this.tidalGrainPrice,
  1145. Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4))
  1146. if(this.gridList.type=='干粮'){
  1147. if(this.dryGrainPrice!=''){
  1148. 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))
  1149. this.gridList.dryGrainPrice=Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
  1150. }
  1151. }else if(this.gridList.type=='潮粮'){
  1152. if(this.tidalGrainPrice!=''){
  1153. this.gridList.tidalGrainPrice=Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
  1154. }
  1155. }
  1156. this.$forceUpdate()
  1157. },
  1158. obtainPrice(){//根据容重获取价格
  1159. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  1160. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1161. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1162. warehouseId: this.cangid,
  1163. goodsName: this.gridList.goodsName,
  1164. bulkDensity:this.gridList.bulkDensity
  1165. }).then(res => {
  1166. if(res.data.data != 0){
  1167. this.gridList.dryGrainPrice = res.data.data
  1168. this.dryGrainPrice = res.data.data
  1169. this.gridList.waterPriceIncrease=0
  1170. this.gridList.waterPriceDeduction=0
  1171. this.gridList.qualityPriceIncrease=0
  1172. this.gridList.qualityPriceDeduction=0
  1173. }
  1174. })
  1175. // }
  1176. }
  1177. },
  1178. changeprice(){
  1179. if(this.pricetext=='解锁'){
  1180. this.pricedisabled=false
  1181. this.pricetext='锁定'
  1182. }else{
  1183. this.pricedisabled=true
  1184. this.pricetext='解锁'
  1185. }
  1186. },
  1187. inputprice(){
  1188. if(this.pricetext=='锁定'){
  1189. this.pricedisabled=true
  1190. this.pricetext='解锁'
  1191. }
  1192. },
  1193. inOutDatepicker(e){
  1194. this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
  1195. console.log(e)
  1196. },
  1197. fleetpicker(e){
  1198. this.gridList.fleet=this.fleetNameList[e[0]].fleetName
  1199. },
  1200. changefreight(){
  1201. this.freightstatus=!this.freightstatus
  1202. if(this.freightstatus){
  1203. this.freighttext='自动获取'
  1204. }else{
  1205. this.freighttext='手动填写'
  1206. }
  1207. },
  1208. changecost(){
  1209. this.coststatus=!this.coststatus
  1210. if(this.coststatus){
  1211. this.costtext='自动获取'
  1212. }else{
  1213. this.costtext='手动填写'
  1214. }
  1215. },
  1216. gocustomer() {
  1217. uni.navigateTo({
  1218. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  1219. .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
  1220. })
  1221. },
  1222. print() {
  1223. uni.navigateTo({
  1224. url: '/pages/erpbusiness/bleConnect'
  1225. })
  1226. },
  1227. close() {
  1228. this.isShowPrint = false
  1229. uni.navigateBack({})
  1230. },
  1231. // focusConfig(type){
  1232. // console.log('childclick',type)
  1233. // // 0是上一项
  1234. // if(type==0){
  1235. // }else{}
  1236. // },
  1237. hidden() {
  1238. this.$refs.keyboard.open(false)
  1239. },
  1240. carPicker(e) {
  1241. this.gridList.carModel = this.carModeList[e[0]].constValue
  1242. },
  1243. handleShowKeyboard() {
  1244. if (this.flag == 0) {
  1245. if (this.$refs.keyboard.open) {
  1246. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  1247. } else {
  1248. this.$refs.keyboard[0].open(true)
  1249. }
  1250. }
  1251. },
  1252. handleShowKeyboard1() {
  1253. if (this.flag == 0) {
  1254. if (this.$refs.keyboard1.open) {
  1255. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  1256. } else {
  1257. this.$refs.keyboard1[0].open(true)
  1258. }
  1259. }
  1260. },
  1261. handleClick(e) {
  1262. this.gridList.carNumber = e.value //键盘输入值
  1263. },
  1264. handleClick1(e) {
  1265. this.gridList.jiaorenli = e.value //键盘输入值
  1266. },
  1267. change(e) {
  1268. if (e) {
  1269. this.gridList.supplementaryRecording = 1
  1270. } else {
  1271. this.gridList.supplementaryRecording = 0
  1272. }
  1273. },
  1274. confirmInfo() {
  1275. this.isShowAlert = true
  1276. },
  1277. alertBtn() {
  1278. this.gridList.agent=this.userInfo.userName;
  1279. var that = this
  1280. that.gridList.reWaterContent = that.gridList.waterContent
  1281. if (that.gridList.buckleMiscellaneous) {
  1282. that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
  1283. }
  1284. that.gridList.flag = 1
  1285. if(this.flag==3){
  1286. this.gridList.statusFlag=7
  1287. }else if(this.flag==4||this.flag==0){
  1288. this.gridList.statusFlag=0
  1289. }
  1290. else if(this.flag==1){
  1291. this.gridList.statusFlag=1
  1292. }else if(this.flag==2){
  1293. this.gridList.statusFlag=2
  1294. }
  1295. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
  1296. res => {
  1297. if (res.data.code == "200") {
  1298. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
  1299. id: that.gridList.id,
  1300. flag: 2
  1301. }).then(res => {
  1302. if (res.data.code == "200") {
  1303. that.$api.msg('提交成功!')
  1304. setTimeout(function() {
  1305. uni.navigateBack({delta:Int16Array})
  1306. }, 1000)
  1307. } else {
  1308. that.$api.msg('提交失败')
  1309. }
  1310. })
  1311. } else {
  1312. that.$api.msg('提交失败')
  1313. }
  1314. })
  1315. },
  1316. waterContentChange() {
  1317. var that = this
  1318. if (this.gridList.goodsName) {
  1319. for (var i = 0; i < this.purchasePriceList.length; i++) {
  1320. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  1321. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  1322. this.gridList.paramType = this.purchasePriceList[i].paramType
  1323. }
  1324. }
  1325. }
  1326. console.log(this.gridList.serviceManagementType)
  1327. // debugger
  1328. if(this.gridList.serviceManagementType != 3){ //非收购入库 不需在获取价格
  1329. return
  1330. }
  1331. if (this.gridList.goodsName && this.cangid) {
  1332. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1333. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1334. warehouseId: this.cangid,
  1335. goodsName: this.gridList.goodsName
  1336. }).then(res => {
  1337. that.gridList.dryGrainPrice = res.data.data
  1338. that.dryGrainPrice = res.data.data
  1339. })
  1340. }
  1341. }
  1342. that.gridList.waterPriceIncrease=0
  1343. that.gridList.waterPriceDeduction=0
  1344. that.gridList.qualityPriceIncrease=0
  1345. that.gridList.qualityPriceDeduction=0
  1346. //潮粮单价改变事件
  1347. if (
  1348. this.gridList.goodsName &&
  1349. this.gridList.waterContent &&
  1350. this.gridList.grade
  1351. ) {
  1352. console.log('123123')
  1353. uni.showLoading({
  1354. title:"加载中"
  1355. })
  1356. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1357. warehouseId: this.cangid,
  1358. goodsName: this.gridList.goodsName,
  1359. waterContent: this.gridList.waterContent,
  1360. grade: this.gridList.grade,
  1361. }).then(res => {
  1362. if (that.gridList.paramType == '1') {
  1363. // console.log(that.gridList)
  1364. if(that.gridList.buckleMiscellaneous){
  1365. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1366. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1367. .dryGrainPrice)).toFixed(4)
  1368. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1369. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1370. .dryGrainPrice)).toFixed(4)
  1371. }
  1372. if (!that.gridList.tidalGrainPrice) {
  1373. that.gridList.tidalGrainPrice = ''
  1374. }
  1375. if(that.gridList.type == '干粮'){
  1376. that.gridList.dryGrainPrice = res.data.data
  1377. that.dryGrainPrice = that.gridList.dryGrainPrice
  1378. }
  1379. } else {
  1380. that.gridList.tidalGrainPrice = res.data.data
  1381. if(that.gridList.type == '干粮'){
  1382. that.gridList.dryGrainPrice = res.data.data
  1383. that.dryGrainPrice = that.gridList.dryGrainPrice
  1384. }else{
  1385. that.gridList.tidalGrainPrice = res.data.data
  1386. that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1387. }
  1388. }
  1389. // that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1390. uni.hideLoading()
  1391. })
  1392. }
  1393. },
  1394. goodsPicker(e) {
  1395. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  1396. },
  1397. submit() {
  1398. this.$delete(this.gridList,'status')
  1399. this.gridList.agent=this.userInfo.userName;
  1400. this.gridList.waterContent = Number(this.gridList.waterContent)
  1401. // if(!this.$u.test.isEmpty(this.gridList.tidalGrainPrice)){
  1402. // this.gridList.tidalGrainPrice=''
  1403. // return
  1404. // }
  1405. if(this.flag==3){
  1406. this.gridList.statusFlag=7
  1407. }else if(this.flag==4||this.flag==0){
  1408. this.gridList.statusFlag=0
  1409. }
  1410. else if(this.flag==1){
  1411. this.gridList.statusFlag=1
  1412. }else if(this.flag==2){
  1413. this.gridList.statusFlag=2
  1414. }
  1415. if(this.gridList.serviceManagementType==3){
  1416. if(this.outType){
  1417. this.gridList.outType=this.outType
  1418. }
  1419. }else{
  1420. this.gridList.customerName = ''
  1421. }
  1422. var text=''
  1423. if(this.utils.getCurrectRoles('acquisitionQuality.qview')&&!this.utils.getCurrectRoles('acquisitionQuality.initial')){
  1424. text="确定提交钎样信息?"
  1425. if(this.flag==3||this.flag==4||this.flag==0){
  1426. this.gridList.brazer=1
  1427. }
  1428. }else{
  1429. text="确定提交质检信息?"
  1430. if(this.flag==3||this.flag==4||this.flag==0){
  1431. this.gridList.brazer=0
  1432. }
  1433. }
  1434. if(this.flag==4){
  1435. this.gridList.flag = 0
  1436. }else{
  1437. this.gridList.flag = this.flag
  1438. }
  1439. // if(this.flag==2){
  1440. // this.gridList.reInspector=this.userInfo.userName
  1441. // }
  1442. if (!this.gridList.qualityNo) {
  1443. this.$api.msg('编号不能为空')
  1444. return
  1445. }
  1446. var that = this
  1447. if(this.flag==4||this.flag==0){
  1448. if (!this.gridList.binNumber) {
  1449. this.$api.msg('仓位不能为空')
  1450. return
  1451. }
  1452. }
  1453. if(this.gridList.serviceManagementType==3){
  1454. if (!this.gridList.customerName) {
  1455. this.$api.msg('客户不能为空')
  1456. return
  1457. }
  1458. }
  1459. // if (!this.gridList.storageTagNo) {
  1460. // this.$api.msg('囤位号不能为空')
  1461. // return
  1462. // }
  1463. // if (this.gridList.storageTagNo.length > 10) {
  1464. // this.$api.msg('囤位号不能为空')
  1465. // return
  1466. // }
  1467. if (!this.gridList.carNumber) {
  1468. this.$api.msg('车牌号不能为空')
  1469. return
  1470. }
  1471. if (this.gridList.carNumber.length > 7) {
  1472. this.$api.msg('车牌号输入错误')
  1473. return
  1474. }
  1475. if (!this.gridList.goodsName) {
  1476. this.$api.msg('货名不能为空')
  1477. return
  1478. }
  1479. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  1480. this.gridList.buckleWeightRatio > 2) {
  1481. this.$api.msg('扣重比输入错误')
  1482. return
  1483. }
  1484. if (
  1485. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  1486. String(this.gridList.buckleWeightRatio).length -
  1487. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  1488. this.$api.msg('扣重比输入错误')
  1489. return
  1490. }
  1491. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  1492. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  1493. this.$api.msg('初检扣杂输入错误')
  1494. return
  1495. }
  1496. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  1497. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  1498. this.$api.msg('复检扣杂输入错误')
  1499. return
  1500. }
  1501. if (!this.gridList.type) {
  1502. this.$api.msg('类型不能为空')
  1503. return
  1504. }
  1505. if (this.value == false&&this.flag!=3 || this.flag == 2) {
  1506. if (!this.gridList.grade) {
  1507. this.$api.msg('等级不能为空')
  1508. return
  1509. }
  1510. if (!this.gridList.impurity) {
  1511. this.$api.msg('杂质不能为空')
  1512. return
  1513. }
  1514. debugger
  1515. console.log(this.gridList.waterContent)
  1516. console.log(Number(this.gridList.waterContent))
  1517. if (!this.gridList.waterContent) {
  1518. this.$api.msg('初检水分不能为空')
  1519. return
  1520. }
  1521. // if (!this.gridList.reWaterContent) {
  1522. // this.$api.msg('复检水分不能为空')
  1523. // return
  1524. // }
  1525. if (!this.gridList.mildewGrain) {
  1526. this.$api.msg('霉变粒不能为空')
  1527. return
  1528. }
  1529. if(this.gridList.goodsName!="大豆"){
  1530. if (!this.gridList.bulkDensity) {
  1531. this.$api.msg('容重不能为空')
  1532. return
  1533. }
  1534. }
  1535. if (!this.gridList.jiaorenli) {
  1536. this.$api.msg('热损伤不能为空')
  1537. return
  1538. }
  1539. if (!this.gridList.imperfectGrain) {
  1540. this.$api.msg('不完整粒不能为空')
  1541. return
  1542. }
  1543. }
  1544. this.gridList.storageNumber = this.gridList.storageTagNo
  1545. var kid=JSON.parse(JSON.stringify(this.gridList.warehouseInOutId))
  1546. this.zjid=JSON.parse(JSON.stringify(this.gridList.id))
  1547. that.gridList.warehouseInOutDetail={
  1548. id:that.gridList.warehouseInOutDetailId,
  1549. grade:that.gridList.grade,
  1550. reGrade:that.gridList.grade,
  1551. waterContent:that.gridList.waterContent,
  1552. reWaterContent:that.gridList.reWaterContent,
  1553. imperfectGrain:that.gridList.imperfectGrain,
  1554. reImperfectGrain:that.gridList.reImperfectGrain,
  1555. impurity:that.gridList.impurity,
  1556. reImpurity:that.gridList.reImpurity,
  1557. jiaorenli:that.gridList.jiaorenli,
  1558. reJiaorenli:that.gridList.reJiaorenli,
  1559. bulkDensity:that.gridList.bulkDensity,
  1560. reBulkDensity:that.gridList.reBulkDensity,
  1561. mildewGrain:that.gridList.mildewGrain,
  1562. reMildewGrain:that.gridList.reMildewGrain,
  1563. }
  1564. console.log(this.gridList)
  1565. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  1566. warehouseId: this.cangid
  1567. }).then(res => {
  1568. if(res.data.code != 200 && that.gridList.serviceManagementType==3){
  1569. uni.showModal({
  1570. content:res.data.message,
  1571. showCancel:false
  1572. })
  1573. return;
  1574. }
  1575. else{
  1576. uni.showModal({
  1577. content: text,
  1578. showCancel: true,
  1579. confirmText: '提交',
  1580. success: function(res) {
  1581. if (res.confirm) {
  1582. that.$api.doRequest('post',
  1583. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  1584. .then(res => {
  1585. uni.setStorageSync("quality_print", that.gridList)
  1586. // that.gridList.id=kid
  1587. // that.gridList.statusFlag=1
  1588. // that.$api.doRequest('post',
  1589. // '/warehouseInOutInfo/InOutWarehouse',
  1590. // that.gridList)
  1591. // .then(res => {
  1592. if (res.data.code == 200) {
  1593. that.$api.msg('编辑质检成功')
  1594. that.gridList.warehouseId = that.cangid
  1595. uni.setStorageSync('checkcustomer',{})
  1596. console.log('that.gridList', that.gridList)
  1597. if(that.utils.getCurrectRoles('acquisitionQuality.initial')){
  1598. that.isShowPrint = true
  1599. }else{
  1600. uni.navigateBack({delta:1})
  1601. }
  1602. // uni.getStorageSync("depotAcquisition_warehouseName")
  1603. // uni.navigateBack({})
  1604. }
  1605. // })
  1606. })
  1607. }
  1608. }
  1609. })
  1610. }
  1611. })
  1612. },
  1613. gradepicker(e) {
  1614. console.log(e)
  1615. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1616. this.gridList.grade = this.gradeList[e[0]].value
  1617. this.gridList.gradeKey = this.gradeList[e[0]].key
  1618. this.waterContentChange()
  1619. },
  1620. gradepicker1(e) {
  1621. console.log(e)
  1622. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1623. this.gridList.reGrade = this.gradeList[e[0]].value
  1624. this.gridList.reGradeKey = this.gradeList[e[0]].key
  1625. },
  1626. binNumberpicker(e) {
  1627. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  1628. },
  1629. del(item) {
  1630. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  1631. id: item.id
  1632. }).then(res => {
  1633. if (res.data.code == 200) {
  1634. this.$api.msg('删除成功')
  1635. } else {
  1636. this.$api.msg('系统异常,请联系管理员')
  1637. }
  1638. })
  1639. },
  1640. contactUs() {
  1641. const that = this
  1642. uni.makePhoneCall({
  1643. // 手机号
  1644. phoneNumber: '18241771147',
  1645. // 成功回调
  1646. success: (res) => {},
  1647. // 失败回调
  1648. fail: (res) => {}
  1649. });
  1650. },
  1651. loadData() {
  1652. // const that = this
  1653. // if(uni.getStorageSync("PageCur")){
  1654. // that.PageCur = uni.getStorageSync("PageCur");
  1655. // }
  1656. // that.userInfoTmp = uni.getStorageSync("userInfo")
  1657. // uni.showLoading({
  1658. // title: '正在加载',
  1659. // mask:true
  1660. // })
  1661. // that.$api.request('integral', 'getIndexData', failres => {
  1662. // that.$api.msg(failres.errmsg)
  1663. // uni.hideLoading()
  1664. // }).then(res => {
  1665. // let data = res.data
  1666. // uni.setStorageSync("message", data.message);
  1667. // uni.setStorageSync("task", data.task);
  1668. // uni.setStorageSync("contract", data.contract);
  1669. // uni.setStorageSync('showTran', data.showTran);
  1670. // that.showTran = data.showTran
  1671. // that.gridList[4].tips = data.task
  1672. // that.gridList[2].tips = data.contract
  1673. // that.companyId = data.companyId
  1674. // uni.hideLoading()
  1675. // })
  1676. },
  1677. confirm() {
  1678. const that = this
  1679. if (!that.inputContent) {
  1680. that.$api.msg('输入不能为空')
  1681. return
  1682. }
  1683. let obj = {}
  1684. obj[that.feild] = that.inputContent
  1685. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1686. that.userInfo.nickname = that.inputContent
  1687. that.inputContent = ''
  1688. that.$store.commit('login', that.userInfo)
  1689. })
  1690. },
  1691. cancel() {
  1692. this.inputShow = false
  1693. this.inputStatus = 'none'
  1694. this.genderShow = false
  1695. },
  1696. myAccount() {
  1697. uni.navigateTo({
  1698. url: `/pageA/pages/contract`
  1699. })
  1700. },
  1701. /**
  1702. * 统一跳转接口,拦截未登录路由
  1703. * navigator标签现在默认没有转场动画,所以用view
  1704. */
  1705. navTo(url) {
  1706. if (!this.hasLogin) {
  1707. url = '/pages/public/login';
  1708. }
  1709. uni.navigateTo({
  1710. url
  1711. })
  1712. },
  1713. mycarClick(carNo) {
  1714. this.modalName = null
  1715. uni.navigateTo({
  1716. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1717. })
  1718. },
  1719. scanCode() {
  1720. uni.scanCode({
  1721. success: function(res) {
  1722. uni.navigateTo({
  1723. url: res.result
  1724. })
  1725. }
  1726. })
  1727. },
  1728. hideModal(e) {
  1729. this.modalName = null
  1730. },
  1731. }
  1732. }
  1733. </script>
  1734. <style lang='scss' scoped>
  1735. .title_b {
  1736. margin: 20rpx 20rpx 0rpx 20rpx;
  1737. padding: 20rpx 10rpx 20rpx 10rpx;
  1738. font-size: 18px;
  1739. font-weight: 550;
  1740. }
  1741. page {
  1742. background: #F5F6FA;
  1743. }
  1744. .wrap {
  1745. padding-bottom: 10px;
  1746. font-size: 14px;
  1747. background: #fff;
  1748. margin: 10px;
  1749. border-radius: 10px;
  1750. input {
  1751. font-size: 14px;
  1752. }
  1753. >.title {
  1754. padding: 10px 16px;
  1755. }
  1756. .b-b:after {
  1757. border-bottom: 1px solid #eee;
  1758. }
  1759. }
  1760. .footer {
  1761. background: #fff;
  1762. position: fixed;
  1763. bottom: 0;
  1764. width: 100%;
  1765. padding: 20px 10px;
  1766. z-index: 10;
  1767. .button {
  1768. background: #22C572;
  1769. width: 90%;
  1770. margin: 20rpx auto;
  1771. padding: 10px;
  1772. color: #fff;
  1773. text-align: center;
  1774. border-radius: 30px;
  1775. }
  1776. }
  1777. .c-row {
  1778. display: -webkit-box;
  1779. display: -webkit-flex;
  1780. display: flex;
  1781. -webkit-box-align: center;
  1782. -webkit-align-items: center;
  1783. align-items: center;
  1784. padding: 20rpx 30rpx;
  1785. position: relative;
  1786. }
  1787. .con-list {
  1788. -webkit-box-flex: 1;
  1789. -webkit-flex: 1;
  1790. flex: 1;
  1791. display: -webkit-box;
  1792. display: -webkit-flex;
  1793. display: flex;
  1794. -webkit-box-orient: vertical;
  1795. -webkit-box-direction: normal;
  1796. -webkit-flex-direction: column;
  1797. flex-direction: column;
  1798. color: #303133;
  1799. line-height: 40rpx;
  1800. text-align: right;
  1801. padding-right: 20rpx;
  1802. }
  1803. input:disabled {
  1804. color: #ccc;
  1805. }
  1806. .textarea-style {
  1807. border: 1px solid #EEEEEE;
  1808. width: 100%;
  1809. padding: 20rpx;
  1810. border-radius: 20rpx;
  1811. }
  1812. .c-row-fj {
  1813. padding: 20rpx
  1814. }
  1815. .buns_item {
  1816. display: flex;
  1817. padding: 80rpx 0 50rpx 0;
  1818. justify-content: space-around;
  1819. }
  1820. .but_css {
  1821. background: #22C572;
  1822. width: 40%;
  1823. padding: 20rpx;
  1824. color: #fff;
  1825. text-align: center;
  1826. border-radius: 20rpx;
  1827. }
  1828. /deep/.u-radio-group {
  1829. flex-direction: row-reverse;
  1830. }
  1831. /deep/.u-upload .u-list-item {
  1832. background: #fff;
  1833. border: 1px dashed #ccc;
  1834. border-radius: 10rpx;
  1835. height: 190rpx !important;
  1836. width: 190rpx !important;
  1837. margin: 10rpx;
  1838. text-align: center;
  1839. display: flex;
  1840. align-items: center;
  1841. justify-content: center;
  1842. flex-direction: column;
  1843. }
  1844. </style>