edit_quality_testing.vue 46 KB

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