edit_quality_testing.vue 56 KB

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