add_quality_testing.vue 84 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506
  1. <template>
  2. <view :style='{"margin-bottom":InputEvent!=""?"100px":0}'>
  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. <u-radio-group @change="groupChange" v-model="typevalue">
  9. <u-radio v-show="utils.getCurrectRoles('acquisitionQuality.initial')" key="1" label="贸易入库"
  10. name="1">贸易入库</u-radio>
  11. <u-radio v-show="utils.getCurrectRoles('acquisitionQuality.qview')" key="3" label="收购入库"
  12. name="3">
  13. 收购入库</u-radio>
  14. </u-radio-group>
  15. </view>
  16. </view>
  17. <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  18. <view class="title">仓库</view>
  19. <view class="con-list">
  20. {{gridList.warehouseName}}
  21. </view>
  22. </view>
  23. <view class="c-row ">
  24. <view class="title">任务编号</view>
  25. <view class="con-list">
  26. <view @click='show4=true'>{{gridList.inOutTaskNo?gridList.inOutTaskNo:'请选择任务编号'}}</view>
  27. <u-picker :range="taskNolist" range-key="inOutTaskNo1" @confirm='tasknopicker($event)'
  28. v-model="show4" mode="selector">
  29. </u-picker>
  30. </view>
  31. </view>
  32. <view style=' align-items: flex-start;' class="c-row ">
  33. <view class="title">任务提示</view>
  34. <view class="con-list">
  35. {{gridList.taskFlag?gridList.taskFlag:'自动获取,不可编辑'}}
  36. </view>
  37. </view>
  38. <view v-show='typevalue==1&&gridList.inOutType!="移库入库"||typevalue==3' class="c-row ">
  39. <view class="title">合同编号</view>
  40. <view class="con-list">
  41. {{gridList.contractNo?gridList.contractNo:'自动获取,不可编辑'}}
  42. </view>
  43. </view>
  44. <view style=' align-items: flex-start;' class="c-row ">
  45. <view class="title">合同提示</view>
  46. <view class="con-list">
  47. {{gridList.pointOut?gridList.pointOut:'自动获取,不可编辑'}}
  48. </view>
  49. </view>
  50. <view v-show='typevalue==1&&gridList.inOutType=="移库入库"' class="c-row ">
  51. <view class="title">移库编号</view>
  52. <view class="con-list">
  53. {{gridList.contractNo?gridList.contractNo:'自动获取,不可编辑'}}
  54. </view>
  55. </view>
  56. <!-- <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  57. <view class="title">业务编号</view>
  58. <view class="con-list">
  59. {{gridList.qualityNo}}
  60. </view>
  61. </view> -->
  62. <view v-show='typevalue==1' style=' align-items: flex-start;' class="c-row ">
  63. <view class="title"></view>
  64. <view class="con-list">
  65. {{gridList.tips?gridList.tips:'自动获取,不可编辑'}}
  66. </view>
  67. </view>
  68. <!-- <view v-show='typevalue==1' class="c-row ">
  69. <view class="title">成本</view>
  70. <view class="con-list">
  71. <view v-show='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view>
  72. <view v-show='coststatus'>
  73. <input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
  74. </view>
  75. </view>
  76. <button class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
  77. </view>
  78. <view v-show='typevalue==1' class="c-row ">
  79. <view class="title">运费</view>
  80. <view class="con-list flex">
  81. <view v-show='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
  82. <view v-show='freightstatus'>
  83. <input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
  84. </view>
  85. </view>
  86. <button class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
  87. </view> -->
  88. <!-- <view v-show='typevalue==1' class="c-row ">
  89. <view class="title">扣款</view>
  90. <view class="con-list">
  91. <input v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
  92. </view>
  93. </view> -->
  94. <view v-show='typevalue==1' class="c-row ">
  95. <view class="title">入库类型</view>
  96. <view class="con-list">
  97. {{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
  98. </view>
  99. </view>
  100. <view v-show='typevalue==1' class="c-row ">
  101. <view class="title">入库日期</view>
  102. <view class="con-list">
  103. <view @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
  104. <u-picker @confirm='inOutDatepicker($event)' :params="params" v-model="show5" mode="time">
  105. </u-picker>
  106. </view>
  107. </view>
  108. <view
  109. v-show='typevalue==1||typevalue==3&&gridList.outType=="自运"&&utils.getCurrectRoles("acquisitionQuality.initial")'
  110. class="c-row ">
  111. <view class="title">车队</view>
  112. <view class="con-list">
  113. <view @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
  114. <u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName"
  115. v-model="show6" mode="selector">
  116. </u-picker>
  117. </view>
  118. </view>
  119. <!-- <view v-show="gridList.paramType != '1'&&utils.getCurrectRoles('acquisitionQuality.initial')" class="c-row ">
  120. <view class="title">扣重比</view>
  121. <view class="con-list">
  122. <input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input" type="digit"></input>
  123. </view>
  124. </view> -->
  125. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")||typevalue==1' class="c-row ">
  126. <view class="title">货名</view>
  127. <view class="con-list">
  128. <view>{{gridList.goodsName}}</view>
  129. <!-- <view v-show='goodsdisabled'>{{gridList.goodsName}}</view> -->
  130. <!-- <view v-show='!goodsdisabled' @click='show2=true'>{{gridList.goodsName}}</view> -->
  131. <u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2"
  132. mode="selector">
  133. </u-picker>
  134. </view>
  135. </view>
  136. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  137. <view class="title">购粮性质</view>
  138. <view class="con-list">
  139. <input v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质" name="input"></input>
  140. </view>
  141. </view>
  142. <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  143. <view class="title">类型</view>
  144. <view class="con-list">{{gridList.type?gridList.type:'干粮'}}</view>
  145. </view>
  146. <view v-show='typevalue==1' class="c-row ">
  147. <view class="title">运输方式</view>
  148. <view class="con-list">
  149. <view @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
  150. <u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
  151. mode="selector">
  152. </u-picker>
  153. </view>
  154. </view>
  155. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
  156. <view class="title">运输方式</view>
  157. <view class="con-list">
  158. <view @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
  159. <u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)'
  160. v-model="show8" mode="selector">
  161. </u-picker>
  162. </view>
  163. </view>
  164. <view v-show='typevalue==1' class="c-row ">
  165. <view class="title">车牌号</view>
  166. <view class="con-list"
  167. v-show='(gridList.inOutType!="移库入库"||gridList.outType!="汽运")&&gridList.tranTaskFlag!="1"&&deliverType!=1'>
  168. <input v-model='gridList.carNumber' @click.stop="handleShowKeyboard" :disabled="true"
  169. placeholder="请输入车牌号" name="input"></input>
  170. <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
  171. :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
  172. </view>
  173. <view class="con-list"
  174. v-show='gridList.inOutType=="移库入库"&&gridList.outType=="汽运"&&deliverType==1||gridList.tranTaskFlag=="1"&&deliverType==1'>
  175. <view @click='show9=true'>{{gridList.carNumber?gridList.carNumber:'请选择车牌号'}}</view>
  176. <u-picker :range="tranCarInfoList" range-key="carNo1" @confirm='carNopicker($event,1)'
  177. v-model="show9" mode="selector">
  178. </u-picker>
  179. </view>
  180. <button v-show="deliverType!=1" class='cu-btn bg-green shadow' @click="carchange">选择</button>
  181. </view>
  182. <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  183. <view class="title">仓位号</view>
  184. <view class="con-list">
  185. <view @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
  186. <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
  187. v-model="show" mode="selector">
  188. </u-picker>
  189. </view>
  190. </view>
  191. <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
  192. <view class="title">囤位号(选填)</view>
  193. <view class="con-list">
  194. <input type="digit" v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
  195. </view>
  196. </view>
  197. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
  198. <view class="title">客户</view>
  199. <view class="con-list">
  200. <view @click='gocustomer' v-show='gridList.customerName'>
  201. {{gridList.customerName}}({{gridList.customerPhone}})
  202. </view>
  203. <view @click='gocustomer' v-show='!gridList.customerName'>
  204. 选择客户
  205. </view>
  206. </view>
  207. </view>
  208. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
  209. <view class="title">交易量</view>
  210. <view class="con-list">
  211. <view :style="redstatus?'color:red;':''">
  212. {{gridList.volumeofbusiness?gridList.volumeofbusiness:'0'}}
  213. </view>
  214. </view>
  215. </view>
  216. <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
  217. <view class="title">车牌号</view>
  218. <view class="con-list" v-show='gridList.inOutType!="移库入库" ||gridList.outType!="汽运"'>
  219. <input v-model='gridList.carNumber' @click.stop="handleShowKeyboard1" :disabled="true"
  220. placeholder="请输入车牌号" name="input"></input>
  221. <master-keyboard ref="keyboard1" keyboardtype="car" :randomNumber="true" :newCar="false"
  222. :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
  223. </view>
  224. <view class="con-list" v-show='gridList.inOutType=="移库入库"&&gridList.outType=="汽运"'>
  225. <view @click='show9=true'>{{gridList.carNumber?gridList.carNumber:'请选择车牌号'}}</view>
  226. <u-picker :range="tranCarInfoList" range-key="carNo1" @confirm='carNopicker($event,1)'
  227. v-model="show9" mode="selector">
  228. </u-picker>
  229. </view>
  230. </view>
  231. <!-- <view v-show="gridList.paramType != '1'&&utils.getCurrectRoles('acquisitionQuality.initial')" class="c-row ">
  232. <view class="title">扣重比</view>
  233. <view class="con-list">
  234. <input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input" type="digit"></input>
  235. </view>
  236. </view> -->
  237. <!-- <view v-else class="c-row ">
  238. <view class="title">扣杂</view>
  239. <view class="con-list">
  240. <input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
  241. name="input" type="digit"></input>
  242. <input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
  243. name="input" type="digit"></input>
  244. </view>
  245. </view> -->
  246. <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
  247. <view class="title">箱号-1</view>
  248. <view class="con-list">
  249. <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  250. </view>
  251. </view>
  252. <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
  253. <view class="title">封号-1</view>
  254. <view class="con-list">
  255. <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  256. </view>
  257. </view>
  258. <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
  259. <view class="title">箱号-2</view>
  260. <view class="con-list">
  261. <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  262. </view>
  263. </view>
  264. <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
  265. <view class="title">封号-2</view>
  266. <view class="con-list">
  267. <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  268. </view>
  269. </view>
  270. <view v-show="typevalue==1 " class="c-row ">
  271. <view class="title">箱号-1</view>
  272. <view class="con-list">
  273. <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  274. </view>
  275. </view>
  276. <view v-show="typevalue==1 " class="c-row ">
  277. <view class="title">封号-1</view>
  278. <view class="con-list">
  279. <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  280. </view>
  281. </view>
  282. <view v-show="typevalue==1 " class="c-row ">
  283. <view class="title">箱号-2</view>
  284. <view class="con-list">
  285. <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  286. </view>
  287. </view>
  288. <view v-show="typevalue==1 " class="c-row ">
  289. <view class="title">封号-2</view>
  290. <view class="con-list">
  291. <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  292. </view>
  293. </view>
  294. </view>
  295. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')" style='padding-bottom:300rpx;'>
  296. <view class='wrap'>
  297. <view style='margin-right:10px;' class='flex justify-between align-item-center'>
  298. <view class='title_b'>化验信息</view>
  299. <view class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572"
  300. v-model="value" @change="change"></u-switch>
  301. </view>
  302. </view>
  303. <view class="c-row ">
  304. <view class="title">等级</view>
  305. <view class="con-list">
  306. <view @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
  307. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
  308. mode="selector">
  309. </u-picker>
  310. </view>
  311. </view>
  312. <view class="c-row ">
  313. <view class="title">水分(%)</view>
  314. <view class="con-list">
  315. <MyNumberInput :myvalue="gridList.waterContent" :Isedit="Isedit" :IsShow="MykeywordShow"
  316. :myevent="'waterContent'" @setValue="mykeywordset" v-if="InputEvent=='waterContent'"
  317. @Cancelword="Cancelword" @goNext="goNext('waterContent')"></MyNumberInput>
  318. <input v-else v-model='gridList.waterContent' @click="SetInputKey('waterContent')"
  319. placeholder="初检水分" @input="waterContentChange" name="input" type="digit"></input>
  320. <!-- <input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
  321. name="input" type="digit"></input> -->
  322. </view>
  323. </view>
  324. <view class="c-row" v-if="gridList.goodsName!='大豆'">
  325. <view class="title">容重(克/升)</view>
  326. <view class="con-list">
  327. <MyNumberInput :myvalue="gridList.bulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
  328. :myevent="'bulkDensity'" @setValue="mykeywordset" v-if="InputEvent=='bulkDensity'"
  329. @Cancelword="Cancelword" @goNext="goNext('bulkDensity')"></MyNumberInput>
  330. <input v-else v-model='gridList.bulkDensity' placeholder="请输入容重"
  331. @click="SetInputKey('bulkDensity')" name="input" type="digit" @input="obtainPrice"></input>
  332. <!-- <input v-model='gridList.bulkDensity' placeholder="请输入容重" name="input" type="digit" @input="obtainPrice"></input> -->
  333. </view>
  334. </view>
  335. <view class="c-row" v-else>
  336. <view class="title">蛋白</view>
  337. <view class="con-list">
  338. <MyNumberInput :myvalue="gridList.protein" :Isedit="Isedit" :IsShow="MykeywordShow"
  339. :myevent="'protein'" @setValue="mykeywordset" v-if="InputEvent=='protein'"
  340. @Cancelword="Cancelword" @goNext="goNext('protein')"></MyNumberInput>
  341. <input v-else v-model='gridList.protein' placeholder="请输入蛋白" @click="SetInputKey('protein')"
  342. name="input" type="digit" @input="obtainPrice"></input>
  343. </view>
  344. </view>
  345. <view class="c-row " v-if="gridList.goodsName != '大豆'">
  346. <view class="title">不完善粒(%)</view>
  347. <view class="con-list">
  348. <MyNumberInput :myvalue="gridList.imperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  349. :myevent="'imperfectGrain'" @setValue="mykeywordset" v-if="InputEvent=='imperfectGrain'"
  350. @Cancelword="Cancelword" @goNext="goNext('imperfectGrain')"></MyNumberInput>
  351. <input v-else v-model='gridList.imperfectGrain' @click="SetInputKey('imperfectGrain')"
  352. placeholder="请输入不完整粒占比" name="input" type="digit"></input>
  353. </view>
  354. </view>
  355. <view class="c-row" v-else>
  356. <view class="title">完整粒率(%)</view>
  357. <view class="con-list">
  358. <MyNumberInput :myvalue="gridList.completeGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  359. :myevent="'completeGrain'" @setValue="mykeywordset" v-if="InputEvent=='completeGrain'"
  360. @Cancelword="Cancelword" @goNext="goNext('impurity')"></MyNumberInput>
  361. <input v-else v-model='gridList.completeGrain' placeholder="请输入完善粒率占比" name="input"
  362. type="digit"></input>
  363. </view>
  364. </view>
  365. <view class="c-row ">
  366. <view class="title">杂质(%)</view>
  367. <view class="con-list">
  368. <MyNumberInput :myvalue="gridList.impurity" :Isedit="Isedit" :IsShow="MykeywordShow"
  369. :myevent="'impurity'" @setValue="mykeywordset" v-if="InputEvent=='impurity'"
  370. @Cancelword="Cancelword" @goNext="goNext('impurity')"></MyNumberInput>
  371. <input v-else v-model='gridList.impurity' placeholder="请输入杂质占比" @click="SetInputKey('impurity')"
  372. name="input" type="digit"></input>
  373. </view>
  374. </view>
  375. <view class="c-row ">
  376. <view class="title">霉变粒(%)</view>
  377. <view class="con-list">
  378. <MyNumberInput :myvalue="gridList.mildewGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
  379. :myevent="'mildewGrain'" @setValue="mykeywordset" v-if="InputEvent=='mildewGrain'"
  380. @Cancelword="Cancelword" @goNext="goNext('mildewGrain')"></MyNumberInput>
  381. <input v-else v-model='gridList.mildewGrain' @click="SetInputKey('mildewGrain')"
  382. placeholder="请输入霉变粒占比" name="input" type="digit"></input>
  383. </view>
  384. </view>
  385. <view class="c-row">
  386. <view class="title">热损伤(%)</view>
  387. <view class="con-list">
  388. <MyNumberInput :myvalue="gridList.jiaorenli" :Isedit="Isedit" :IsShow="MykeywordShow"
  389. :myevent="'jiaorenli'" @setValue="mykeywordset" v-if="InputEvent=='jiaorenli'"
  390. @Cancelword="Cancelword" @goNext="goNext('jiaorenli')"></MyNumberInput>
  391. <input v-else v-model='gridList.jiaorenli' @click="SetInputKey('jiaorenli')"
  392. placeholder="请输入热损伤占比" name="input" type="digit"></input>
  393. </view>
  394. </view>
  395. <view class="c-row" v-if="gridList.goodsName == '大豆'">
  396. <view class="title">转基因</view>
  397. <view class="con-list">
  398. <MyNumberInput :myvalue="gridList.transgene" :Isedit="Isedit" :IsShow="MykeywordShow"
  399. :myevent="'transgene'" @setValue="mykeywordset" v-if="InputEvent=='transgene'"
  400. @Cancelword="Cancelword" @goNext="goNext('transgene')"></MyNumberInput>
  401. <view @click="transgeneShow=true">
  402. {{gridList.transgene}}
  403. </view>
  404. <!-- 转基因 -->
  405. <u-picker :range="transgeneList" range-key="value" @confirm='transgeneClick($event)'
  406. v-model="transgeneShow" mode="selector">
  407. </u-picker>
  408. </view>
  409. </view>
  410. <view class="c-row" v-if="gridList.goodsName == '大豆'">
  411. <view class="title">色泽/气味</view>
  412. <view class="con-list">
  413. <MyNumberInput :myvalue="gridList.colorLustre" :Isedit="Isedit" :IsShow="MykeywordShow"
  414. :myevent="'colorLustre'" @setValue="mykeywordset" v-if="InputEvent=='colorLustre'"
  415. @Cancelword="Cancelword" @goNext="goNext('colorLustre')"></MyNumberInput>
  416. <!-- <input v-else v-model='gridList.colorLustre' @click="SetInputKey('colorLustre')"
  417. placeholder="请选择色泽/气味是否正常" name="input" type="digit"></input> -->
  418. <div @click="colorLustreShow = true">{{gridList.colorLustre}}</div>
  419. <!-- 转基因 -->
  420. <u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick($event)'
  421. v-model="colorLustreShow" mode="selector">
  422. </u-picker>
  423. </view>
  424. </view>
  425. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
  426. <view class="title">水分增价(元/吨)</view>
  427. <view class="con-list">
  428. <input v-model='gridList.waterPriceIncrease' @focus="pricefocus($event,1)"
  429. @input='deductionchange' placeholder="请输入水分增价" name="input" type="digit"></input>
  430. </view>
  431. </view>
  432. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
  433. <view class="title">水分扣价(元/吨)</view>
  434. <view class="con-list">
  435. <input v-model='gridList.waterPriceDeduction' @focus="pricefocus($event,2)"
  436. @input='deductionchange' placeholder="请输入水分扣价" name="input" type="digit"></input>
  437. </view>
  438. </view>
  439. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
  440. <view class="title">质量增价(元/吨)</view>
  441. <view class="con-list">
  442. <input v-model='gridList.qualityPriceIncrease' @focus="pricefocus($event,3)"
  443. @input='deductionchange' placeholder="请输入质量增价" name="input" type="digit"></input>
  444. </view>
  445. </view>
  446. <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
  447. <view class="title">质量扣价(元/吨)</view>
  448. <view class="con-list">
  449. <input v-model='gridList.qualityPriceDeduction' @focus="pricefocus($event,4)"
  450. @input='deductionchange' placeholder="请输入质量扣价" name="input" type="digit"></input>
  451. </view>
  452. </view>
  453. <view v-show="gridList.type == '干粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3"
  454. class="c-row">
  455. <view class="title">干粮单价(元/公斤)</view>
  456. <view class="con-list">
  457. <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' @blur='inputprice'
  458. placeholder="请输入干粮单价" name="input" type="digit"></input>
  459. </view>
  460. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  461. </view>
  462. <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3"
  463. class="c-row">
  464. <view class="title">净重单价(元/公斤)</view>
  465. <view class="con-list">
  466. <input v-model='gridList.tidalGrainPrice' :disabled='pricedisabled' @blur='inputprice'
  467. placeholder="自动获取,不可编辑" name="input" type="digit"></input>
  468. </view>
  469. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  470. </view>
  471. <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
  472. class="c-row">
  473. <view class="title">净重单价(元/公斤)</view>
  474. <view class="con-list">
  475. <input v-model='gridList.tidalGrainPrice' :disabled='disabled1' @blur='inputprice'
  476. placeholder="自动获取,不可编辑" name="input" type="digit"></input>
  477. </view>
  478. </view>
  479. <!-- <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
  480. class="c-row">
  481. <view class="title">净重单价(元/公斤)</view>
  482. <view class="con-list">
  483. <input v-model='gridList.tidalGrainPrice' :disabled='disabled1' @blur='inputprice'
  484. placeholder="自动获取,不可编辑" name="input" type="digit"></input>
  485. </view>
  486. </view> -->
  487. <view v-show="gridList.type == '干粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
  488. class="c-row">
  489. <view class="title">干粮单价(元/公斤)</view>
  490. <view class="con-list">
  491. <input v-model='gridList.dryGrainPrice' :disabled='disabled1' @blur='inputprice'
  492. placeholder="请输入干粮单价" name="input" type="digit"></input>
  493. </view>
  494. </view>
  495. <view v-show="compName=='辽宁佳屹农商贸有限公司'"
  496. class="c-row">
  497. <view class="title">规格(公斤)</view>
  498. <view class="con-list">
  499. <u-radio-group active-color='#22C572' v-model="gridList.specifications" @change="radioGroupChange">
  500. <u-radio class='radio' name="850">850</u-radio>
  501. <u-radio name="830">830</u-radio>
  502. </u-radio-group>
  503. </view>
  504. </view>
  505. <view v-show="compName=='辽宁佳屹农商贸有限公司'"
  506. class="c-row">
  507. <view class="title">工厂</view>
  508. <view class="con-list">
  509. <input v-model='gridList.factory' :disabled='disabled1' maxlength="30"
  510. placeholder="请输入工厂" name="input" type="text"></input>
  511. </view>
  512. </view>
  513. <view v-show="compName=='辽宁佳屹农商贸有限公司'"
  514. class="c-row">
  515. <view class="title">生产日期</view>
  516. <view class="con-list">
  517. <u-calendar v-model="show3" @change="change1" :mode="mode"></u-calendar>
  518. <view :style='gridList.produceDate?"color:#000;":"color:#999;"' @click="show3 = true">{{gridList.produceDate?gridList.produceDate:'选择生产日期'}}</view>
  519. <!-- <input v-model='gridList.factory' :disabled='disabled1' maxlength="30"
  520. placeholder="请输入工厂" name="input" type="digit"></input> -->
  521. </view>
  522. </view>
  523. <view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
  524. <view class="title">污染件数</view>
  525. <view class="con-list">
  526. <input v-model='gridList.polluteNum' :disabled='disabled1'
  527. placeholder="请输入污染件数" name="input" type="digit"></input>
  528. </view>
  529. </view>
  530. <view v-show="compName=='辽宁佳屹农商贸有限公司'" style='padding:20rpx 30rpx;'>
  531. <view class="title">污染附件</view>
  532. <view class="con-list">
  533. <u-upload :custom-btn='true' class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
  534. modelId: '',
  535. vesselId: ''}" :action="action" :show-progress='false' :show-tips="false" :max-size="maxSize" :max-count="9"
  536. :size-type="['compressed']" @on-success="getImgUrl($event,0)" @on-error="onError"
  537. @on-remove="onRemove($event,0)" @on-uploaded="isAdd = true"
  538. :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress">
  539. <view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover"
  540. hover-stay-time="150">
  541. <image style="width:23px;height:23px;" src="../../static/img/liangmai/xiangji-2.png"
  542. mode=""></image>
  543. <view>选择图片</view>
  544. </view>
  545. </u-upload>
  546. </view>
  547. </view>
  548. <view v-show="compName=='辽宁佳屹农商贸有限公司'" class="c-row">
  549. <view class="title">破损件数</view>
  550. <view class="con-list">
  551. <input v-model='gridList.wornNum' :disabled='disabled1'
  552. placeholder="请输入破损件数" name="input" type="digit"></input>
  553. </view>
  554. </view>
  555. <view v-show="compName=='辽宁佳屹农商贸有限公司'" style='padding:20rpx 30rpx;'>
  556. <view class="title">破损附件</view>
  557. <view class="con-list">
  558. <u-upload :custom-btn='true' class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
  559. modelId: '',
  560. vesselId: ''}" :action="action" :show-progress='false' :show-tips="false" :max-size="maxSize" :max-count="9"
  561. :size-type="['compressed']" @on-success="getImgUrl($event,1)" @on-error="onError"
  562. @on-remove="onRemove($event,1)" @on-uploaded="isAdd = true"
  563. :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress">
  564. <view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover"
  565. hover-stay-time="150">
  566. <image style="width:23px;height:23px;" src="../../static/img/liangmai/xiangji-2.png"
  567. mode=""></image>
  568. <view>选择图片</view>
  569. </view>
  570. </u-upload>
  571. </view>
  572. </view>
  573. </view>
  574. </view>
  575. <view class="footer">
  576. <!-- <view @click='confirmInfo' class="button">确认初检信息</view> -->
  577. <view @click='submit' class="button">提交</view>
  578. </view>
  579. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  580. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  581. :showCancelButton='false' :content="content" @cancel="cancelClick"></u-modal>
  582. <!-- @confirm="alertBtn" -->
  583. <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
  584. <view class="buns_item">
  585. <view class="but_css" @click="print">打印小票</view>
  586. <view class="but_css" @click="close">返回</view>
  587. </view>
  588. </u-popup>
  589. </view>
  590. </template>
  591. <script>
  592. var that;
  593. const Equ_List = ['waterContent', 'bulkDensity', 'imperfectGrain', 'impurity', 'mildewGrain', 'jiaorenli', 'protein',
  594. 'completeGrain'
  595. ];
  596. import dragButton from "@/components/drag-button/drag-button.vue";
  597. import keyboard from "@/components/master-keyboard/master-keyboard.vue";
  598. import MyNumberInput from "@/components/MyNumberInput.vue";
  599. import {
  600. mapState
  601. } from 'vuex';
  602. let startY = 0,
  603. moveY = 0,
  604. pageAtTop = true;
  605. export default {
  606. components: {
  607. dragButton,
  608. keyboard,
  609. MyNumberInput
  610. },
  611. data() {
  612. return {
  613. isQY: false,
  614. isZJ: false,
  615. deliverType:'',
  616. redstatus: false,
  617. isShowPrint: false,
  618. isShowAlert: false,
  619. disabled1: false,
  620. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  621. inputShow: false,
  622. params: {
  623. year: true,
  624. month: true,
  625. day: true,
  626. },
  627. Data: {
  628. ktv: '111111'
  629. },
  630. action: this.$uploadUrl,
  631. pcUserInfo: uni.getStorageSync('pcUserInfo'),
  632. maxSize: 50 * 1024 * 1024,
  633. Isedit: false,
  634. MykeywordShow: false,
  635. InputEvent: '',
  636. tranTaskFlag: 0,
  637. dryGrainPrice: 0,
  638. tidalGrainPrice: 0,
  639. modalName: '',
  640. pricetext: '锁定',
  641. pricedisabled: false,
  642. show8: false,
  643. mycarStyle: '',
  644. feild: undefined,
  645. id: 0,
  646. outType: '他运',
  647. show: false,
  648. show4: false,
  649. show5: false,
  650. show6: false,
  651. show7: false,
  652. show9: false,
  653. edit: true,
  654. goodsdisabled: false,
  655. freighttext: '手动填写',
  656. costtext: '手动填写',
  657. selector: [],
  658. show1: false,
  659. inputContent: '',
  660. multiSelector1: [{
  661. name: '他运',
  662. value: '他运'
  663. }],
  664. printId: '',
  665. typevalue: '3',
  666. coverTransform: 'translateY(0px)',
  667. coverTransition: '0s',
  668. moving: false,
  669. footprintList: [],
  670. searchKeyWord: '',
  671. isVip: false,
  672. userInfoTmp: [],
  673. inputStatus: 'none',
  674. carInfo: [],
  675. gridCol: 4,
  676. freightstatus: false,
  677. coststatus: false,
  678. pageSize: 10,
  679. show3: false,
  680. show2: false,
  681. goodsList: [],
  682. mode: 'date',
  683. currentPage: 1,
  684. value: false,
  685. gridBorder: false,
  686. headUrl: "../../static/img/myimg/YongHu@3x.png",
  687. userphone: "",
  688. username: "请更改昵称",
  689. contractFlag: 10,
  690. gridList: {
  691. outType: '汽运',
  692. natureOfGrainPurchase: '贸易粮',
  693. type: '',
  694. tidalGrainPrice: '',
  695. dryGrainPrice: '',
  696. buckleMiscellaneous: '',
  697. carNumber: '',
  698. customerName: '',
  699. customerPhone: '',
  700. bulkDensity: "",
  701. imperfectGrain: "",
  702. waterPriceIncrease: 0,
  703. waterPriceDeduction: 0,
  704. qualityPriceIncrease: 0,
  705. qualityPriceDeduction: 0,
  706. waterContent: "",
  707. jiaorenli: "",
  708. impurity: "",
  709. mildewGrain: "",
  710. compName: "",
  711. type: '',
  712. freight: 0,
  713. cost: '',
  714. addressUrl: '',
  715. tidalGrainPrice: 0,
  716. buckleWeightRatio: 0,
  717. buckleMiscellaneous: 0,
  718. paramType: 1,
  719. specifications:830,
  720. warehouseInOutDetail: {
  721. grade: '',
  722. reGrade: '',
  723. imperfectGrain: '',
  724. reImperfectGrain: '',
  725. impurity: '',
  726. reImpurity: '',
  727. jiaorenli: '',
  728. reJiaorenli: '',
  729. bulkDensity: '',
  730. reBulkDensity: '',
  731. mildewGrain: '',
  732. reMildewGrain: '',
  733. },
  734. disablednotarize: false,
  735. deductionAmount: 0,
  736. deductionWeight: 0,
  737. grossWeight: 0,
  738. tare: 0,
  739. grade: '',
  740. inOutDate: new Date().toISOString().slice(0, 10),
  741. netWeight: 0,
  742. pureWeight: 0,
  743. deductionWeight: 0,
  744. waterContent: '',
  745. reWaterContent: '',
  746. reGrade: '',
  747. imperfectGrain: '',
  748. reImperfectGrain: '',
  749. impurity: '',
  750. reImpurity: '',
  751. jiaorenli: '',
  752. reJiaorenli: '',
  753. bulkDensity: '',
  754. reBulkDensity: '',
  755. reMemo: '',
  756. storageTagNo: '',
  757. mildewGrain: '',
  758. reMildewGrain: '',
  759. boxNo: '',
  760. boxNoOther: '',
  761. titleNo: '',
  762. titleNoOther: '',
  763. statusFlag: 1
  764. },
  765. gridListInit: {
  766. natureOfGrainPurchase: '贸易粮',
  767. type: '',
  768. tidalGrainPrice: '',
  769. dryGrainPrice: '',
  770. buckleMiscellaneous: '',
  771. carNumber: '',
  772. customerName: '',
  773. customerPhone: '',
  774. bulkDensity: "",
  775. imperfectGrain: "",
  776. waterContent: "",
  777. jiaorenli: "",
  778. impurity: "",
  779. mildewGrain: "",
  780. compName: "",
  781. type: '',
  782. freight: 0,
  783. cost: '',
  784. addressUrl: '',
  785. tidalGrainPrice: 0,
  786. buckleWeightRatio: 0,
  787. buckleMiscellaneous: 0,
  788. paramType: 1,
  789. warehouseInOutDetail: {
  790. grade: '',
  791. reGrade: '',
  792. imperfectGrain: '',
  793. reImperfectGrain: '',
  794. impurity: '',
  795. reImpurity: '',
  796. jiaorenli: '',
  797. reJiaorenli: '',
  798. bulkDensity: '',
  799. reBulkDensity: '',
  800. mildewGrain: '',
  801. reMildewGrain: '',
  802. },
  803. disablednotarize: false,
  804. deductionAmount: 0,
  805. deductionWeight: 0,
  806. grossWeight: 0,
  807. tare: 0,
  808. grade: '',
  809. // inOutDate: new Date().toISOString().slice(0, 10),
  810. netWeight: 0,
  811. pureWeight: 0,
  812. deductionWeight: 0,
  813. waterContent: '',
  814. reWaterContent: '',
  815. reGrade: '',
  816. imperfectGrain: '',
  817. reImperfectGrain: '',
  818. impurity: '',
  819. reImpurity: '',
  820. jiaorenli: '',
  821. reJiaorenli: '',
  822. bulkDensity: '',
  823. reBulkDensity: '',
  824. reMemo: '',
  825. storageTagNo: '',
  826. mildewGrain: '',
  827. reMildewGrain: '',
  828. boxNo: '',
  829. boxNoOther: '',
  830. titleNo: '',
  831. titleNoOther: '',
  832. statusFlag: 1
  833. },
  834. typeList: ['潮粮', '干粮'],
  835. managementType: '',
  836. flag: 2,
  837. warehouseName: '',
  838. compName:'',
  839. warehouseList: [],
  840. warehouseCount: '',
  841. commonWarehouseNo: '',
  842. warehouseTradeCount: 0,
  843. showTran: true,
  844. companyId: 1,
  845. contractNolist: [],
  846. current: 4,
  847. taskNolist: [],
  848. tranCarInfoList: [],
  849. fleetNameList: [],
  850. multiSelector: [{
  851. name: '汽运',
  852. value: '0',
  853. },
  854. {
  855. name: '火运',
  856. value: '1',
  857. },
  858. {
  859. name: '集装箱船',
  860. value: '2',
  861. },
  862. {
  863. name: '散船',
  864. value: '3',
  865. },
  866. ],
  867. gradeList: [{
  868. key: 1,
  869. value: '一等品'
  870. },
  871. {
  872. key: 2,
  873. value: '二等品'
  874. },
  875. {
  876. key: 3,
  877. value: '三等品'
  878. },
  879. {
  880. key: 4,
  881. value: '等外'
  882. },
  883. ],
  884. cangid: '',
  885. inType: "", //入库类型
  886. transgeneShow: false,
  887. transgeneList: [{
  888. value: '非转基因'
  889. }, {
  890. value: '转基因'
  891. }],
  892. colorLustreShow: false,
  893. colorLustreList: [{
  894. value: '正常'
  895. }, {
  896. value: '异常'
  897. }],
  898. imglist:[],
  899. imglist1:[],
  900. }
  901. },
  902. // #ifndef MP
  903. onNavigationBarButtonTap(e) {
  904. const index = e.index;
  905. if (index === 0) {
  906. this.navTo('/pages/set/set');
  907. } else if (index === 1) {
  908. // #ifdef APP-PLUS
  909. const pages = getCurrentPages();
  910. const page = pages[pages.length - 1];
  911. const currentWebview = page.$getAppWebview();
  912. currentWebview.hideTitleNViewButtonRedDot({
  913. index
  914. });
  915. // #endif
  916. uni.navigateTo({
  917. url: '/pages/notice/notice'
  918. })
  919. }
  920. },
  921. // #endif
  922. computed: {
  923. ...mapState(['hasLogin', 'userInfo']),
  924. // 手机号中间4位加*
  925. starUserphone() {
  926. let reg = /^(\d{3})\d{4}(\d{4})$/;
  927. if (this.userphone) {
  928. return this.userphone.replace(reg, "$1****$2");
  929. }
  930. }
  931. },
  932. onLoad(options) {
  933. that = this
  934. var date = new Date()
  935. console.log(this.cangid)
  936. this.commonWarehouseNo = options.commonWarehouseNo
  937. this.warehouseCount = Number(options.warehouseCount) + 1
  938. this.warehouseTradeCount = Number(options.warehouseTradeCount) + 1
  939. let number = '000' + this.warehouseCount
  940. number = number.substring(number.length - 4, number.length)
  941. this.gridList.warehouseName = options.warehouseName
  942. // this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
  943. this.cangid = options.cangid
  944. this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  945. id: this.cangid
  946. }).then(res => {
  947. console.log(res)
  948. this.warehouseList = res.data.data.warehousePositionInfoList
  949. })
  950. if (uni.getStorageSync('compName1')) {
  951. this.gridList.compName = uni.getStorageSync('compName1').company
  952. }
  953. this.gridList.person = options.personCharge
  954. this.gridList.personPhone = options.personPhone
  955. this.gridList.qualityInspector = uni.getStorageSync("userInfo").userName
  956. this.gridList.produceDate = date.getFullYear()+'-'+((date.getMonth()+1)>=10?(date.getMonth()+1):'0'+(date.getMonth()+1))+'-'+((date.getDate())>=10?date.getDate():'0'+date.getDate())
  957. // this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  958. // warehouseId: this.cangid
  959. // }).then(res => {
  960. // if (res.data.data) {
  961. // this.setGoodName([0])
  962. // }
  963. // })
  964. this.managementType = options.managementType
  965. let that = this
  966. this.purchasePriceList = uni.getStorageSync('purchasePriceList')
  967. // if (uni.getStorageSync('checkcustomer')) {
  968. // let _customerInfo = uni.getStorageSync('checkcustomer')
  969. // if (_customerInfo.shipperName) {
  970. // this.gridList.identityId = _customerInfo.id
  971. // //点击登记客户
  972. // this.gridList.customerName = _customerInfo.shipperName
  973. // this.gridList.customerPhone = _customerInfo.shipperPhone
  974. // this.gridList.carNumber=_customerInfo.carNo
  975. // } else {
  976. // //点击搜索客户
  977. // this.gridList.customerName = _customerInfo.customerName
  978. // this.gridList.customerPhone = _customerInfo.customerPhone
  979. // }
  980. // this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  981. // }
  982. this.gridList.grade = this.gradeList[1].value
  983. this.gridList.gradeKey = this.gradeList[1].key
  984. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  985. warehouseId: this.cangid
  986. }).then(res => {
  987. if (res.data.data) {
  988. that.goodsList = res.data.data
  989. if (that.goodsList.length > 0) {
  990. that.gridList.goodsName = that.goodsList[0].goodsName
  991. uni.setStorageSync('purchasePriceList', that.goodsList)
  992. that.purchasePriceList = uni.getStorageSync('purchasePriceList')
  993. }
  994. } else if (res.data.code != 200) {
  995. uni.showModal({
  996. content: res.data.message,
  997. showCancel: false
  998. })
  999. }
  1000. })
  1001. console.log(this.gridList)
  1002. this.gridListInit = this.gridList
  1003. },
  1004. async onShow() {
  1005. var that = this
  1006. if(uni.getStorageSync('compName1')){
  1007. that.compName = uni.getStorageSync('compName1').company
  1008. if(that.compName=='辽宁佳屹农商贸有限公司'){
  1009. console.log("123")
  1010. this.typevalue = '1'
  1011. this.contractFlag = 7
  1012. }
  1013. }
  1014. this.isQY = this.utils.getCurrectRoles('acquisitionQuality.qview')
  1015. this.isZJ = this.utils.getCurrectRoles('acquisitionQuality.initial')
  1016. if(!uni.getStorageSync('gridList')&&that.compName!='辽宁佳屹农商贸有限公司'){
  1017. if (this.isZJ && !this.isQY) {
  1018. console.log("123456")
  1019. this.typevalue = '1'
  1020. this.contractFlag = 7
  1021. } else {
  1022. console.log("243423423")
  1023. this.typevalue = '3'
  1024. this.contractFlag = 10
  1025. }
  1026. }
  1027. uni.showLoading({
  1028. title: '加载中',
  1029. mask: true
  1030. })
  1031. if (this.typevalue == '3') {
  1032. this.flag = 3
  1033. } else {
  1034. this.flag = 2
  1035. }
  1036. await this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  1037. flag: this.flag,
  1038. warehouseName: this.gridList.warehouseName
  1039. }).then(res => {
  1040. for (let i = 0; i < res.data.data.length; i++) {
  1041. this.$set(res.data.data[i], 'inOutTaskNo1', res.data.data[i].inOutTaskNo + (res.data.data[
  1042. i].taskFlag ? '(' + res.data.data[i].taskFlag + ')' : ''))
  1043. }
  1044. // console.log(res.data.data, 22222)
  1045. this.taskNolist = res.data.data
  1046. })
  1047. this.multiSelector1 = [{
  1048. name: '他运',
  1049. value: '他运'
  1050. }]
  1051. await this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  1052. warehouseName: this.gridList.warehouseName
  1053. }).then(res => {
  1054. uni.hideLoading();
  1055. // console.log(2)
  1056. // console.log(res)
  1057. if (res.data.data.contractManagementInfoList) {
  1058. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  1059. res.data.data.contractMangementInfoList[i].name = '自运 (' +
  1060. res.data.data.contractMangementInfoList[i].contractNo + ' ' + res.data.data
  1061. .contractMangementInfoList[i].seller + ')'
  1062. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  1063. }
  1064. } else {
  1065. this.multiSelector1 = [{
  1066. name: '他运',
  1067. value: '他运'
  1068. }]
  1069. }
  1070. // this.taskNolist=res.data.data
  1071. })
  1072. if (uni.getStorageSync('checkcustomer')&&this.typevalue==3) {
  1073. let _customerInfo = uni.getStorageSync('checkcustomer')
  1074. if (_customerInfo.shipperName) {
  1075. this.gridList.identityId = _customerInfo.id
  1076. //点击登记客户
  1077. this.gridList.customerName = _customerInfo.shipperName
  1078. this.gridList.customerPhone = _customerInfo.shipperPhone
  1079. this.gridList.carNumber = _customerInfo.carNo
  1080. } else {
  1081. //点击搜索客户
  1082. this.gridList.customerName = _customerInfo.customerName
  1083. this.gridList.customerPhone = _customerInfo.customerPhone
  1084. }
  1085. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  1086. var that = this
  1087. setTimeout(() => {}, 1000)
  1088. console.log(this.gridList.goodsName)
  1089. if (!this.gridList.goodsName) {
  1090. this.gridList.goodsName = uni.getStorageSync('goodsName')
  1091. }
  1092. if (this.gridList.goodsName) {
  1093. uni.showLoading({
  1094. title: '加载中',
  1095. mask: true
  1096. })
  1097. await this.$api.doRequest('get',
  1098. '/qualityInspectionManagement/getQualityInspectionManagementMap', {
  1099. goodsName: this.gridList.goodsName,
  1100. compId: uni.getStorageSync('pcUserInfo').compId,
  1101. customerNumberCard: this.gridList.customerNumberCard,
  1102. warehouseName: this.gridList.warehouseName
  1103. }).then(res => {
  1104. uni.hideLoading();
  1105. if (res.data.data.A + res.data.data.B + res.data.data.C * 50 > res.data.data.D - 50) {
  1106. that.redstatus = true
  1107. } else {
  1108. that.redstatus = false
  1109. }
  1110. var a = res.data.data.A > 0 ? '已完成' + Number(res.data.data.A).toFixed(2) + '吨,' : ''
  1111. var b = res.data.data.B > 0 ? '进行中' + Number(res.data.data.B).toFixed(2) + '吨,' : ''
  1112. var c = res.data.data.C > 0 ? '未称重' + Number(res.data.data.C) + '车' : ''
  1113. that.gridList.volumeofbusiness = a + b + c
  1114. console.log(that.gridList.volumeofbusiness)
  1115. that.$forceUpdate()
  1116. })
  1117. }
  1118. }
  1119. if(uni.getStorageSync('gridList')&&this.typevalue==1){
  1120. if(uni.getStorageSync('typevalue')){
  1121. this.typevalue=uni.getStorageSync('typevalue')
  1122. }
  1123. this.gridList=uni.getStorageSync('gridList')
  1124. if(uni.getStorageSync('carNo')){
  1125. this.gridList.carNumber=uni.getStorageSync('carNo')
  1126. this.gridList.shipId=uni.getStorageSync('checkcustomer').shipId
  1127. }
  1128. }
  1129. },
  1130. methods: {
  1131. onError(error) {
  1132. alert(error)
  1133. console.log('------------error-----------')
  1134. console.log(error)
  1135. },
  1136. onProgress(e) {
  1137. console.log(e)
  1138. },
  1139. radioGroupChange(e){
  1140. console.log(e)
  1141. this.gridList.specifications=e
  1142. },
  1143. change1(e) {
  1144. this.gridList.produceDate=e.result
  1145. console.log(e);
  1146. },
  1147. onRemove(index,i) {
  1148. console.log(index,i)
  1149. if(i==0){
  1150. this.imglist.splice(index, 1)
  1151. this.gridList.polluteUrl=this.imglist.toString()
  1152. }else{
  1153. this.imglist1.splice(index, 1)
  1154. this.gridList.wornUrl=this.imglist1.toString()
  1155. }
  1156. console.log(this.imglist,this.imglist1)
  1157. },
  1158. carchange(){
  1159. uni.setStorageSync('typevalue', this.typevalue)
  1160. uni.setStorageSync('gridList', this.gridList)
  1161. uni.navigateTo({
  1162. url: '/pages/erpbusiness/customercar?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  1163. .warehouseName + '&goodsName=' + this.gridList.goodsName
  1164. })
  1165. },
  1166. getImgUrl(res,status) {
  1167. var that = this
  1168. this.$api.doRequest('post', '/appendix/api/saveFilesApp', {
  1169. newAppendixs: [res.data],
  1170. oldAppendixIds: ""
  1171. }).then(res1 => {
  1172. if(status==0){
  1173. that.imglist.push(res1.data.data[0])
  1174. that.gridList.polluteUrl=that.imglist.toString()
  1175. }else{
  1176. that.imglist1.push(res1.data.data[0])
  1177. that.gridList.wornUrl=that.imglist1.toString()
  1178. }
  1179. console.log(res)
  1180. })
  1181. },
  1182. colorLustreClick(e) {
  1183. this.gridList.colorLustre = this.colorLustreList[e[0]].value
  1184. },
  1185. transgeneClick(e) {
  1186. this.gridList.transgene = this.transgeneList[e[0]].value
  1187. },
  1188. Cancelword() {
  1189. this.bottomHeight = '10rpx';
  1190. this.MykeywordShow = false;
  1191. this.InputEvent = '';
  1192. },
  1193. goNext(val) {
  1194. var inputList = Equ_List;
  1195. if (this.menuIndex == 1) {
  1196. inputList = Sign_List;
  1197. }
  1198. var index = inputList.indexOf(val);
  1199. this.setScrollTops(val);
  1200. if (index < inputList.length - 1) {
  1201. this.InputEvent = inputList[index + 1];
  1202. } else {
  1203. this.InputEvent = ''
  1204. this.bottomHeight = '10rpx';
  1205. this.MykeywordShow = false;
  1206. }
  1207. },
  1208. mykeywordset(datatxt) {
  1209. var arr = JSON.parse(datatxt);
  1210. this.gridList[arr.even] = arr.value;
  1211. if (arr.even == 'waterContent') {
  1212. this.waterContentChange()
  1213. } else if (arr.even == 'bulkDensity') {
  1214. this.obtainPrice()
  1215. }
  1216. },
  1217. SetInputKey(even) {
  1218. uni.hideKeyboard();
  1219. this.InputEvent = even;
  1220. this.setScrollTops(even);
  1221. if (!this.MykeywordShow) {
  1222. this.bottomHeight = '320rpx';
  1223. this.MykeywordShow = true;
  1224. }
  1225. },
  1226. setScrollTops(even) {
  1227. var inputList = Equ_List;
  1228. var index = inputList.indexOf(even);
  1229. this.viewTop = (index + 1) * 60 + 100;
  1230. },
  1231. pricefocus(e, status) {
  1232. console.log(e)
  1233. if (status == 1) {
  1234. if (e.detail.value == 0) {
  1235. this.gridList.waterPriceIncrease = ''
  1236. }
  1237. } else if (status == 2) {
  1238. if (e.detail.value == 0) {
  1239. this.gridList.waterPriceDeduction = ''
  1240. }
  1241. } else if (status == 3) {
  1242. if (e.detail.value == 0) {
  1243. this.gridList.qualityPriceIncrease = ''
  1244. }
  1245. } else if (status == 4) {
  1246. if (e.detail.value == 0) {
  1247. this.gridList.qualityPriceDeduction = ''
  1248. }
  1249. }
  1250. },
  1251. deductionchange() {
  1252. if (this.gridList.type == '干粮') {
  1253. if (this.dryGrainPrice != '') {
  1254. console.log(Number(this.dryGrainPrice + (this.gridList.waterPriceIncrease / 1000) - (this.gridList
  1255. .waterPriceDeduction / 1000) + (this.gridList.qualityPriceIncrease / 1000) - (this
  1256. .gridList.qualityPriceDeduction / 1000)), Number(this.dryGrainPrice + (this.gridList
  1257. .waterPriceIncrease / 1000) - (this.gridList.waterPriceDeduction / 1000) + (this
  1258. .gridList.qualityPriceIncrease / 1000) - (this.gridList.qualityPriceDeduction /
  1259. 1000)).toFixed(2))
  1260. this.gridList.dryGrainPrice = Number(this.dryGrainPrice + (this.gridList.waterPriceIncrease /
  1261. 1000) - (this.gridList.waterPriceDeduction / 1000) + (this.gridList
  1262. .qualityPriceIncrease /
  1263. 1000) - (this.gridList.qualityPriceDeduction / 1000)).toFixed(4)
  1264. }
  1265. } else if (this.gridList.type == '潮粮') {
  1266. if (this.tidalGrainPrice != '') {
  1267. this.gridList.tidalGrainPrice = Number(this.tidalGrainPrice + (this.gridList.waterPriceIncrease /
  1268. 1000) - (this.gridList.waterPriceDeduction / 1000) + (this.gridList
  1269. .qualityPriceIncrease / 1000) - (this.gridList.qualityPriceDeduction / 1000)).toFixed(4)
  1270. }
  1271. }
  1272. this.$forceUpdate()
  1273. },
  1274. carNopicker(e) {
  1275. this.gridList.carNumber = this.tranCarInfoList[e[0]].carNo
  1276. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1277. if (i == e[0]) {
  1278. this.gridList.carNo = this.tranCarInfoList[i].carNo
  1279. this.gridList.carNoCopy = this.tranCarInfoList[i].carNo + '(' + this.tranCarInfoList[i].tranCarNo +
  1280. ')'
  1281. this.gridList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  1282. this.gridList.carId = this.tranCarInfoList[i].id
  1283. this.gridList.freight = Math.round(
  1284. this.tranCarInfoList[i].tranPrice
  1285. )
  1286. if (this.gridList.inOutType == '移库入库') {
  1287. if (!this.gridList.cost) {
  1288. this.gridList.cost = this.tranCarInfoList[i].cost
  1289. }
  1290. this.gridList.loadNetWeight =
  1291. this.tranCarInfoList[i].loadNetWeight
  1292. }
  1293. }
  1294. }
  1295. },
  1296. obtainPrice() { //根据容重获取价格
  1297. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  1298. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1299. let quality = this.gridList.goodsName == '大豆' ? this.gridList.protein : this.gridList.bulkDensity
  1300. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1301. warehouseId: this.cangid,
  1302. goodsName: this.gridList.goodsName,
  1303. bulkDensity: quality
  1304. }).then(res => {
  1305. if (res.data.data != 0) {
  1306. this.gridList.dryGrainPrice = res.data.data
  1307. this.dryGrainPrice = res.data.data
  1308. this.gridList.waterPriceIncrease = 0
  1309. this.gridList.waterPriceDeduction = 0
  1310. this.gridList.qualityPriceIncrease = 0
  1311. this.gridList.qualityPriceDeduction = 0
  1312. }
  1313. })
  1314. // }
  1315. }
  1316. },
  1317. changeprice() {
  1318. if (this.pricetext == '解锁') {
  1319. this.pricedisabled = false
  1320. this.pricetext = '锁定'
  1321. } else {
  1322. this.pricedisabled = true
  1323. this.pricetext = '解锁'
  1324. }
  1325. },
  1326. inputprice() {
  1327. if (this.pricetext == '锁定') {
  1328. this.pricedisabled = true
  1329. this.pricetext = '解锁'
  1330. }
  1331. console.log(this.gridList.dryGrainPrice, this.gridList.tidalGrainPrice)
  1332. if (this.gridList.type == '干粮') {
  1333. this.dryGrainPrice = this.gridList.dryGrainPrice
  1334. }
  1335. if (this.gridList.type == '潮粮') {
  1336. this.tidalGrainPrice = this.gridList.tidalGrainPrice
  1337. }
  1338. },
  1339. groupChange(e) {
  1340. console.log(e, this.gridListInit)
  1341. this.gridListInit.warehouseName = this.gridList.warehouseName
  1342. if (uni.getStorageSync('checkcustomer')) {
  1343. uni.setStorageSync('checkcustomer', '')
  1344. this.gridListInit.identityId = ''
  1345. this.gridListInit.customerName = ''
  1346. this.gridListInit.customerPhone = ''
  1347. this.gridListInit.carNumber = ''
  1348. this.gridListInit.customerNumberCard = ''
  1349. this.$forceUpdate()
  1350. }
  1351. // this.gridList = JSON.parse(JSON.stringify(this.gridListInit))
  1352. this.gridList = this.$u.deepClone(this.gridListInit)
  1353. this.gridList.serviceManagementType = e
  1354. if (e == 1) {
  1355. if (this.flag != 2) {
  1356. this.gridList.inOutTaskNo = ''
  1357. this.gridList.contractNo = ''
  1358. }
  1359. this.gridList.qualityNo = ''
  1360. this.flag = 2
  1361. // this.contractFlag = 7
  1362. } else {
  1363. if (this.flag != 3) {
  1364. this.gridList.inOutTaskNo = ''
  1365. this.gridList.contractNo = ''
  1366. }
  1367. this.flag = 3
  1368. // this.contractFlag = 10
  1369. // let number = '000' + this.warehouseCount
  1370. // number = number.substring(number.length - 4, number.length)
  1371. // this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
  1372. }
  1373. this.gridList.grade = this.gradeList[1].value
  1374. this.gridList.gradeKey = this.gradeList[1].key
  1375. this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  1376. flag: this.flag,
  1377. warehouseName: this.gridList.warehouseName
  1378. }).then(res => {
  1379. console.log(res)
  1380. for (let i = 0; i < res.data.data.length; i++) {
  1381. this.$set(res.data.data[i], 'inOutTaskNo1', res.data.data[i].inOutTaskNo + (res.data.data[
  1382. i].taskFlag ? '(' + res.data.data[i].taskFlag + ')' : ''))
  1383. }
  1384. this.taskNolist = res.data.data
  1385. })
  1386. console.log(this.gridList, 111111111111)
  1387. },
  1388. outtypepicker(e, status) {
  1389. console.log(e, status)
  1390. if (status == 0) {
  1391. this.gridList.outType = this.multiSelector[e[0]].name
  1392. } else {
  1393. if (this.multiSelector1[e[0]].name == '他运') {
  1394. this.goodsdisabled = false
  1395. this.gridList.outType = this.multiSelector1[e[0]].name
  1396. } else {
  1397. this.gridList.outType = '自运'
  1398. this.goodsdisabled = true
  1399. this.outType = this.multiSelector1[e[0]].name
  1400. this.gridList.contractNo = this.multiSelector1[i].contractNo
  1401. // if (this.gridList.contractNo == this.contractNolist[i].contractNo) {
  1402. // this.gridList.goodsName = this.outContractNo[q].goodsName
  1403. // this.gridList.goodsNameKey = this.outContractNo[q].goodsNameKey
  1404. // }
  1405. this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
  1406. contractNo: this.gridList.contractNo,
  1407. compId: uni.getStorageSync('pcUserInfo').compId
  1408. }).then(res => {
  1409. this.contractNolist = res.data.data
  1410. this.gridList.goodsName = this.contractNolist.goodsName
  1411. this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
  1412. })
  1413. this.waterContentChange()
  1414. }
  1415. }
  1416. console.log(this.gridList.outType)
  1417. },
  1418. changefreight() {
  1419. this.freightstatus = !this.freightstatus
  1420. if (this.freightstatus) {
  1421. this.freighttext = '自动获取'
  1422. } else {
  1423. this.freighttext = '手动填写'
  1424. }
  1425. },
  1426. changecost() {
  1427. this.coststatus = !this.coststatus
  1428. if (this.coststatus) {
  1429. this.costtext = '自动获取'
  1430. } else {
  1431. this.costtext = '手动填写'
  1432. }
  1433. },
  1434. inOutDatepicker(e) {
  1435. this.gridList.inOutDate = e.year + '-' + e.month + '-' + e.day
  1436. console.log(e)
  1437. },
  1438. fleetpicker(e) {
  1439. this.gridList.fleet = this.fleetNameList[e[0]].fleetName
  1440. },
  1441. change(e) {
  1442. if (e) {
  1443. this.gridList.supplementaryRecording = 1
  1444. } else {
  1445. this.gridList.supplementaryRecording = 0
  1446. }
  1447. },
  1448. tasknopicker(e) {
  1449. console.log("切换任务编号", e)
  1450. this.gridList.inOutTaskNo = this.taskNolist[e[0]].inOutTaskNo
  1451. this.gridList.inOutTaskNo1 = this.taskNolist[e[0]].inOutTaskNo1
  1452. this.gridList.taskFlag = this.taskNolist[e[0]].taskFlag
  1453. var data = this.taskNolist[e[0]]
  1454. this.gridList.donecount = data.completedQuantity + '/' + data.weight
  1455. if (this.taskNolist[e[0]].inOutType == '收购入库') {
  1456. this.gridList.contractNo = this.taskNolist[e[0]].contractNo
  1457. this.inType = this.taskNolist[e[0]].inOutType
  1458. this.gridList.goodsName = this.taskNolist[e[0]].goodsName
  1459. if (this.taskNolist[e[0]].goodsName.indexOf("潮粮") != -1) { //收购从合同中带出货名 单价等信息 用货名是否带有潮粮字符来判断干潮类型
  1460. this.gridList.type = "潮粮"
  1461. this.gridList.imperfectGrain = 8
  1462. this.gridList.impurity = 1
  1463. this.gridList.mildewGrain = 2
  1464. this.gridList.jiaorenli = 0
  1465. } else {
  1466. this.gridList.type = "干粮"
  1467. this.gridList.imperfectGrain = 8
  1468. this.gridList.impurity = 1
  1469. this.gridList.mildewGrain = 2
  1470. this.gridList.jiaorenli = 1
  1471. }
  1472. }
  1473. if (this.taskNolist[e[0]].contractNo) {
  1474. this.gridList.contractNo = this.taskNolist[e[0]].contractNo
  1475. } else {
  1476. this.gridList.contractNo = this.taskNolist[e[0]].moveTaskNo
  1477. }
  1478. this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
  1479. contractNo: this.gridList.contractNo,
  1480. compId: uni.getStorageSync('pcUserInfo').compId
  1481. }).then(res => {
  1482. this.contractNolist = res.data.data
  1483. this.gridList.pointOut =this.contractNolist.pointOut
  1484. if (this.typevalue == 3) {
  1485. var gooddata = this.goodsList.filter((item) => {
  1486. return item.goodsName == this.contractNolist.goodsName
  1487. })
  1488. if (this.contractNolist.priceType == "定价收购" && this.inType == "收购入库") {
  1489. this.gridList.dryGrainPrice = Number(this.contractNolist.unitContractPrice / 1000)
  1490. .toFixed(3)
  1491. }
  1492. if (gooddata.length > 0) {
  1493. // 收购入库
  1494. for (let q = 0; q < this.goodsList.length; q++) {
  1495. if (this.goodsList[q].goodsName == this.contractNolist.goodsName) {
  1496. this.gridList.goodsName = this.contractNolist.goodsName
  1497. this.setGoodName([q])
  1498. }
  1499. }
  1500. } else {
  1501. if (this.inType == "收购入库") {
  1502. //收购入库不校验仓库设置中的货名
  1503. uni.showModal({
  1504. title: '提示',
  1505. content: '仓库设置中无该合同货名',
  1506. showCancel: false,
  1507. confirmText: '返回',
  1508. success: function(res) {
  1509. if (res.confirm) {
  1510. uni.navigateBack({
  1511. delta: 1
  1512. })
  1513. }
  1514. }
  1515. });
  1516. }
  1517. }
  1518. } else {
  1519. this.gridList.goodsName = this.contractNolist.goodsName
  1520. if (this.gridList.goodsName == '玉米') {
  1521. this.gridList.type = '干粮'
  1522. this.gridList.imperfectGrain = 8
  1523. this.gridList.impurity = 1
  1524. this.gridList.mildewGrain = 2
  1525. this.gridList.jiaorenli = 1
  1526. if (this.contractNolist.priceType != '随行就市') {
  1527. this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
  1528. .toFixed(3)
  1529. }
  1530. this.edit = true
  1531. } else if (this.gridList.goodsName.indexOf('潮粮') > -1) {
  1532. this.gridList.type = '潮粮'
  1533. this.edit = true
  1534. if (this.contractNolist.priceType != '随行就市') {
  1535. this.gridList.tidalGrainPrice = this.contractNolist.contractPrice
  1536. this.tidalGrainPrice = this.contractNolist.contractPrice
  1537. }
  1538. this.gridList.imperfectGrain = 8
  1539. this.gridList.impurity = 1
  1540. this.gridList.mildewGrain = 2
  1541. this.gridList.jiaorenli = 0
  1542. } else {
  1543. this.gridList.type = '干粮'
  1544. this.gridList.imperfectGrain = 8
  1545. this.gridList.impurity = 1
  1546. this.gridList.mildewGrain = 2
  1547. this.gridList.jiaorenli = 1
  1548. this.edit = false
  1549. if (this.contractNolist.priceType != '随行就市') {
  1550. this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
  1551. .toFixed(3)
  1552. }
  1553. }
  1554. }
  1555. this.deliverType=this.contractNolist.deliverType
  1556. this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
  1557. this.gridList.grade = this.gradeList[1].value
  1558. this.gridList.gradeKey = this.gradeList[1].key
  1559. // this.gridList.grade = this.contractNolist.grade
  1560. this.gridList.inOutType = this.contractNolist.inOutType
  1561. if (this.gridList.goodsName == "大豆") { //货名为大豆是设置默认
  1562. this.gridList.transgene = "非转基因"
  1563. this.gridList.reTransgene = "非转基因"
  1564. this.gridList.colorLustre = "正常"
  1565. this.gridList.reColorLustre = "正常"
  1566. } else {
  1567. delete this.gridList.transgene
  1568. delete this.gridList.reTransgene
  1569. delete this.gridList.colorLustre
  1570. delete this.gridList.reColorLustre
  1571. }
  1572. if (this.gridList.inOutType == '采购入库') {
  1573. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  1574. // this.gridList.qualityNo='CGRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  1575. if (!this.contractNolist.unitContractPrice) {
  1576. this.gridList.tips = '卖方' + this.contractNolist.seller
  1577. } else {
  1578. this.gridList.tips = '卖方' + this.contractNolist.seller + '( ' + this.contractNolist
  1579. .unitContractPrice + '元/吨)'
  1580. }
  1581. this.gridList.inOutTypeKey = 1
  1582. console.log("this.gridList.inOutTypeKey", 1)
  1583. } else if (this.gridList.inOutType == '移库入库') {
  1584. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  1585. // this.gridList.qualityNo='YKRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  1586. if (this.contractNolist.unitContractPrice) {
  1587. this.gridList.tips = '出货库' + data.sendWarehouse + ' (' + this.contractNolist
  1588. .unitContractPrice + '元/吨)'
  1589. } else {
  1590. this.gridList.tips = '出货库' + data.sendWarehouse
  1591. }
  1592. this.gridList.inOutTypeKey = 3
  1593. } else if (this.contractNolist.inOutType == '移库出库') {
  1594. this.gridList.tips = '入货库' + data.receiveWarehouse
  1595. } else if (this.contractNolist.inOutType == '暂存入库') {
  1596. this.gridList.inOutTypeKey = 4
  1597. } else if (this.contractNolist.inOutType == '贸易服务入库') {
  1598. this.gridList.inOutTypeKey = 5
  1599. } else if (this.contractNolist.inOutType == '退库') {
  1600. //退库有无运输任务标识
  1601. this.gridList.tranTaskFlag = this.contractNolist.tranTaskFlag
  1602. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  1603. // this.gridList.qualityNo = 'CGRK' + this.getdate() + this.commonWarehouseNo + this
  1604. // .warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  1605. if (this.contractNolist.contractNo) {
  1606. this.gridList.tips = '买方' + this.contractNolist.buyer
  1607. } else {
  1608. this.gridList.tips = '出货库' + data.sendWarehouse
  1609. }
  1610. this.gridList.inOutTypeKey = 6
  1611. }
  1612. this.cost = this.contractNolist.contractPrice
  1613. if (this.cost) {
  1614. this.isGetCost = true
  1615. this.gridList.cost = this.cost - this.gridList.deductionAmount
  1616. } else {
  1617. this.isGetCost = false
  1618. this.gridList.cost = this.gridList.cost
  1619. }
  1620. if (this.contractNolist.inOutType == '移库入库') {
  1621. this.isSelectType = false
  1622. } else {
  1623. this.isSelectType = true
  1624. }
  1625. if (this.contractNolist.priceType == '随行就市') {
  1626. this.disabled1 = true
  1627. } else {
  1628. this.disabled1 = false
  1629. }
  1630. if (this.contractNolist.deliverType == '1') {
  1631. this.carstatus = true
  1632. } else {
  1633. this.carstatus = false
  1634. }
  1635. this.tranCarInfoList = []
  1636. if (this.contractNolist.tranCarInfoList) {
  1637. for (var q = 0; q < this.contractNolist.tranCarInfoList.length; q++) {
  1638. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList[q]
  1639. .carNo
  1640. if (this.contractNolist.tranCarInfoList[q].tranCarNo) {
  1641. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist
  1642. .tranCarInfoList[q].carNo + '(' + this.contractNolist.tranCarInfoList[q]
  1643. .tranCarNo + ')'
  1644. } else {
  1645. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList
  1646. .carNo
  1647. }
  1648. }
  1649. this.tranCarInfoList = this.contractNolist.tranCarInfoList
  1650. // this.carstatus = true
  1651. } else {
  1652. this.tranCarInfoList = []
  1653. }
  1654. this.fleetNameList = this.contractNolist.tranCarInfoList1
  1655. if (this.gridList.goodsName && this.gridList.customerNumberCard) {
  1656. uni.showLoading({
  1657. title: '加载中',
  1658. mask: true
  1659. })
  1660. let that = this
  1661. this.$api.doRequest('get',
  1662. '/qualityInspectionManagement/getQualityInspectionManagementMap', {
  1663. goodsName: this.gridList.goodsName,
  1664. compId: uni.getStorageSync('pcUserInfo').compId,
  1665. customerNumberCard: this.gridList.customerNumberCard
  1666. }).then(res => {
  1667. uni.hideLoading();
  1668. if (res.data.data.A + res.data.data.B + res.data.data.C * 50 > res.data.data
  1669. .D - 50) {
  1670. that.redstatus = true
  1671. } else {
  1672. that.redstatus = false
  1673. }
  1674. var a = res.data.data.A > 0 ? '已完成' + Number(res.data.data.A).toFixed(2) +
  1675. '吨,' : ''
  1676. var b = res.data.data.B > 0 ? '进行中' + Number(res.data.data.B).toFixed(2) +
  1677. '吨,' : ''
  1678. var c = res.data.data.C > 0 ? '未称重' + Number(res.data.data.C) + '车' : ''
  1679. that.gridList.volumeofbusiness = a + b + c
  1680. console.log(that.gridList.volumeofbusiness)
  1681. that.$forceUpdate()
  1682. })
  1683. }
  1684. })
  1685. this.$forceUpdate()
  1686. console.log(this.gridList)
  1687. },
  1688. print() {
  1689. console.log(this.printId)
  1690. if (this.printId) {
  1691. uni.showLoading({
  1692. title: "加载中",
  1693. mask: true
  1694. })
  1695. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  1696. id: this.printId
  1697. }).then(res => {
  1698. uni.hideLoading()
  1699. uni.setStorageSync("quality_print", res.data.data)
  1700. uni.navigateTo({
  1701. url: '/pages/erpbusiness/bleConnect'
  1702. })
  1703. })
  1704. }
  1705. },
  1706. close() {
  1707. this.isShowPrint = false
  1708. uni.navigateBack({})
  1709. },
  1710. hidden() {
  1711. this.$refs.keyboard.open(false)
  1712. },
  1713. handleShowKeyboard() {
  1714. if (this.$refs.keyboard.open) {
  1715. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  1716. } else {
  1717. this.$refs.keyboard[0].open(true)
  1718. }
  1719. },
  1720. handleShowKeyboard1() {
  1721. if (this.$refs.keyboard1.open) {
  1722. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  1723. } else {
  1724. this.$refs.keyboard1[0].open(true)
  1725. }
  1726. },
  1727. handleClick(e) {
  1728. this.gridList.carNumber = e.value //键盘输入值
  1729. },
  1730. cancelClick() {
  1731. this.isShowAlert = false
  1732. },
  1733. waterContentChange() {
  1734. var that = this
  1735. if (this.gridList.goodsName) {
  1736. for (var i = 0; i < this.purchasePriceList.length; i++) {
  1737. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  1738. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  1739. this.gridList.paramType = this.purchasePriceList[i].paramType
  1740. }
  1741. }
  1742. }
  1743. if (this.inType != "收购入库") { //非收购入库 价格取自合同
  1744. return
  1745. }
  1746. if (this.gridList.goodsName && this.cangid) {
  1747. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1748. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1749. warehouseId: this.cangid,
  1750. goodsName: this.gridList.goodsName
  1751. }).then(res => {
  1752. that.gridList.dryGrainPrice = res.data.data
  1753. that.dryGrainPrice = res.data.data
  1754. })
  1755. }
  1756. }
  1757. that.gridList.waterPriceIncrease = 0
  1758. that.gridList.waterPriceDeduction = 0
  1759. that.gridList.qualityPriceIncrease = 0
  1760. that.gridList.qualityPriceDeduction = 0
  1761. //潮粮单价改变事件
  1762. if (
  1763. this.gridList.goodsName &&
  1764. this.gridList.waterContent &&
  1765. this.gridList.grade
  1766. ) {
  1767. uni.showLoading({
  1768. title: "加载中",
  1769. mask: true
  1770. })
  1771. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1772. warehouseId: this.cangid,
  1773. goodsName: this.gridList.goodsName,
  1774. waterContent: this.gridList.waterContent,
  1775. grade: this.gridList.grade,
  1776. }).then(res => {
  1777. if (that.gridList.paramType == '1') {
  1778. // console.log(that.gridList)
  1779. if (that.gridList.buckleMiscellaneous) {
  1780. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(
  1781. that
  1782. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1783. .dryGrainPrice)).toFixed(4)
  1784. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1785. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1786. .dryGrainPrice)).toFixed(4)
  1787. }
  1788. if (!that.gridList.tidalGrainPrice) {
  1789. that.gridList.tidalGrainPrice = ''
  1790. }
  1791. if (that.gridList.type == '干粮') {
  1792. that.gridList.dryGrainPrice = res.data.data
  1793. that.dryGrainPrice = that.gridList.dryGrainPrice
  1794. }
  1795. } else {
  1796. that.gridList.tidalGrainPrice = res.data.data
  1797. if (that.gridList.type == '干粮') {
  1798. that.gridList.dryGrainPrice = res.data.data
  1799. that.dryGrainPrice = that.gridList.dryGrainPrice
  1800. } else {
  1801. that.gridList.tidalGrainPrice = res.data.data
  1802. that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1803. }
  1804. }
  1805. uni.hideLoading()
  1806. })
  1807. }
  1808. },
  1809. gocustomer() {
  1810. uni.navigateTo({
  1811. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  1812. .warehouseName + '&goodsName=' + this.gridList.goodsName
  1813. })
  1814. },
  1815. getdate() {
  1816. var date = new Date()
  1817. var year = date.getFullYear() //获取完整的年份(4位)
  1818. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  1819. var datetime = date.getDate() //获取当前日(1-31)
  1820. if (mouth < 10) {
  1821. mouth = '0' + mouth
  1822. }
  1823. if (datetime < 10) {
  1824. datetime = '0' + datetime
  1825. }
  1826. return year + '' + mouth + '' + datetime
  1827. },
  1828. async addQualityInspection(type) {
  1829. if (type == 1) {
  1830. await this.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection', this
  1831. .gridList)
  1832. .then(res => {
  1833. console.log(res)
  1834. this.printId = res.data.data
  1835. uni.hideLoading()
  1836. // if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
  1837. // -1) ||
  1838. // (this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
  1839. // -1)) {
  1840. if (res.data.code == 200) {
  1841. console.log("addQualityInspection")
  1842. this.$api.msg('提交成功')
  1843. this.gridList.warehouseId = this.cangid
  1844. this.gridList.compId = uni.getStorageSync(
  1845. 'pcUserInfo').compId
  1846. uni.setStorageSync("quality_print", this.gridList)
  1847. uni.removeStorageSync('typevalue')
  1848. uni.removeStorageSync('gridList')
  1849. if (this.isZJ) {
  1850. this.isShowPrint = true
  1851. } else {
  1852. uni.navigateBack({})
  1853. }
  1854. console.log('that.gridList', this.gridList)
  1855. // uni.navigateBack({})
  1856. }
  1857. else if(res.data.message == '货物种类与类型不符,请确认!'){
  1858. this.$api.msg(res.data.message)
  1859. }else {
  1860. this.$api.msg('提交失败')
  1861. }
  1862. // } else {
  1863. // this.$api.msg('货物种类与类型不符,请确认')
  1864. // }
  1865. })
  1866. return
  1867. }
  1868. if (type == 2) {
  1869. await this.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection', this
  1870. .gridList)
  1871. .then(res => {
  1872. console.log("addQualityInspection")
  1873. this.printId = res.data.data
  1874. uni.hideLoading()
  1875. // if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
  1876. // -1) ||
  1877. // (this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
  1878. // -1)) {
  1879. if (res.data.code == 200) {
  1880. this.$api.msg('提交成功')
  1881. this.gridList.warehouseId = this.cangid
  1882. this.gridList.compId = uni.getStorageSync('pcUserInfo').compId
  1883. uni.setStorageSync("quality_print", this.gridList)
  1884. if (this.isZJ) {
  1885. this.isShowPrint = true
  1886. } else {
  1887. uni.navigateBack({})
  1888. }
  1889. uni.setStorageSync(
  1890. 'checkcustomer', {}
  1891. )
  1892. uni.removeStorageSync('typevalue')
  1893. uni.removeStorageSync('gridList')
  1894. console.log('that.gridList', this.gridList)
  1895. // uni.navigateBack({})
  1896. } else if(res.data.message == '货物种类与类型不符,请确认!'){
  1897. this.$api.msg(res.data.message)
  1898. }
  1899. else {
  1900. this.$api.msg('提交失败')
  1901. }
  1902. // } else {
  1903. // this.$api.msg('货物种类与类型不符,请确认')
  1904. // }
  1905. })
  1906. }
  1907. },
  1908. async inOutWarehouse(type) {
  1909. if (type == 1) {
  1910. await this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.gridList)
  1911. .then(res => {
  1912. console.log("InOutWarehouse")
  1913. this.gridList.warehouseInOutId = res.data.data
  1914. if (this.gridList.warehouseInOutId) {
  1915. this.addQualityInspection(1)
  1916. }
  1917. })
  1918. return
  1919. }
  1920. if (type == 2) {
  1921. await this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.gridList)
  1922. .then(res => {
  1923. console.log("InOutWarehouse")
  1924. if (this.isQY) {
  1925. if (!this.isZJ) {
  1926. this.gridList.brazer = 1
  1927. this.gridList.statusFlag = 7
  1928. } else {
  1929. this.gridList.statusFlag = 0
  1930. }
  1931. }
  1932. this.gridList.warehouseInOutId = res.data.data
  1933. if (this.gridList.warehouseInOutId) {
  1934. this.addQualityInspection(2)
  1935. }
  1936. })
  1937. return
  1938. }
  1939. },
  1940. async cumulant(type) {
  1941. if (type == 1) {
  1942. await this.$api.doRequest('get', '/paymentManagement/cumulant', {
  1943. compId: uni.getStorageSync('pcUserInfo').compId,
  1944. customerNumberCard: this.gridList.customerNumberCard,
  1945. goodsName: this.gridList.goodsName,
  1946. })
  1947. .then(response => {
  1948. console.log("cumulant")
  1949. if (response.data.code == 200) {
  1950. for (let i = 0; i < this.purchasePriceList.length; i++) {
  1951. if (this.gridList.goodsName == this.purchasePriceList[i].goodsName) {
  1952. let count = (this.purchasePriceList[i].saleLimit - response.data.data /
  1953. 1000)
  1954. .toFixed(2)
  1955. console.log(count, this.purchasePriceList[i].saleLimit, response.data.data)
  1956. if (Number(count) <= 0) {
  1957. count = 0
  1958. this.$api.msg('该客户累计销售' + this.gridList.goodsName + (response.data
  1959. .data /
  1960. 1000).toFixed(2) + '吨,还可售粮' + count + '吨', )
  1961. uni.hideLoading()
  1962. break;
  1963. }
  1964. this.gridList.inOutFlag = 2
  1965. this.inOutWarehouse(2)
  1966. }
  1967. }
  1968. }
  1969. })
  1970. return
  1971. }
  1972. },
  1973. async getGoodsName() {
  1974. let that = this
  1975. await this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  1976. warehouseId: this.cangid
  1977. }).then(res => {
  1978. if (res.data.code != 200 && that.typevalue == 3) {
  1979. uni.showModal({
  1980. content: res.data.message,
  1981. showCancel: false
  1982. })
  1983. return;
  1984. }
  1985. uni.showModal({
  1986. content: "确定提交质检信息?",
  1987. showCancel: true,
  1988. confirmText: '提交',
  1989. success: function(res) {
  1990. if (res.confirm) {
  1991. that.gridList.serviceManagementType = that.typevalue
  1992. if (that.typevalue == 3) {
  1993. that.cumulant(1)
  1994. return
  1995. }
  1996. that.gridList.inOutFlag = 2
  1997. that.inOutWarehouse(1)
  1998. // that.addQualityInspection(1)
  1999. }
  2000. }
  2001. })
  2002. })
  2003. },
  2004. submit() {
  2005. console.log(this.isQY, "isQY")
  2006. console.log(this.isZJ, "isZJ")
  2007. if (this.typevalue == 3) {
  2008. if (this.outType) {
  2009. this.gridList.outType = this.outType
  2010. }
  2011. }
  2012. var that = this
  2013. this.gridList.agent = this.userInfo.userName;
  2014. this.gridList.carNo = this.gridList.carNumber
  2015. this.gridList.baseId = this.cangid
  2016. this.gridList.warehouseId = this.cangid
  2017. if (this.typevalue == 1) {
  2018. if (this.gridList.inOutType == '移库入库') {
  2019. this.gridList.numberLetter = 'YKRK'
  2020. } else {
  2021. this.gridList.numberLetter = 'CGRK'
  2022. }
  2023. } else {
  2024. this.gridList.numberLetter = 'SGRK'
  2025. }
  2026. this.gridList.warehouseNo = this.commonWarehouseNo
  2027. if (!this.gridList.inOutTaskNo) {
  2028. this.$api.msg('任务编号不能为空')
  2029. return
  2030. }
  2031. if (this.utils.getCurrectRoles('acquisitionQuality.initial')) {
  2032. if (!this.gridList.binNumber) {
  2033. this.$api.msg('仓位不能为空')
  2034. return
  2035. }
  2036. if (this.typevalue == 3) {
  2037. if (!this.gridList.natureOfGrainPurchase) {
  2038. this.$api.msg('购粮性质不能为空')
  2039. return
  2040. }
  2041. }
  2042. if (!this.gridList.type) {
  2043. this.$api.msg('类型不能为空')
  2044. return
  2045. }
  2046. if (this.value == false) {
  2047. if (!this.gridList.grade) {
  2048. this.$api.msg('等级不能为空')
  2049. return
  2050. }
  2051. if (!this.gridList.impurity) {
  2052. this.$api.msg('杂质不能为空')
  2053. return
  2054. }
  2055. if (!this.gridList.waterContent) {
  2056. this.$api.msg('初检水分不能为空')
  2057. return
  2058. }
  2059. // if (!this.gridList.reWaterContent) {
  2060. // this.$api.msg('复检水分不能为空')
  2061. // return
  2062. // }
  2063. if (!this.gridList.mildewGrain) {
  2064. this.$api.msg('霉变粒不能为空')
  2065. return
  2066. }
  2067. if (this.gridList.goodsName != "大豆") {
  2068. if (!this.gridList.bulkDensity) {
  2069. this.$api.msg('容重不能为空')
  2070. return
  2071. }
  2072. }
  2073. if (this.gridList.goodsName == "大豆") {
  2074. if (!this.gridList.protein) {
  2075. this.$api.msg('蛋白不能为空')
  2076. return
  2077. }
  2078. }
  2079. if (!this.gridList.jiaorenli && this.gridList.jiaorenli != 0) {
  2080. this.$api.msg('热损伤不能为空')
  2081. return
  2082. }
  2083. if (!this.gridList.imperfectGrain) {
  2084. this.$api.msg('不完整粒不能为空')
  2085. return
  2086. }
  2087. }
  2088. }
  2089. if (this.isQY) {
  2090. if (this.typevalue == 3) {
  2091. if (!this.gridList.customerName) {
  2092. this.$api.msg('客户不能为空')
  2093. return
  2094. }
  2095. }
  2096. if (!this.gridList.carNumber) {
  2097. this.$api.msg('车牌号不能为空')
  2098. return
  2099. }
  2100. if (this.gridList.carNumber.length != 7) {
  2101. this.$api.msg('车牌号输入错误')
  2102. return
  2103. }
  2104. if (!this.gridList.goodsName) {
  2105. this.$api.msg('货名不能为空')
  2106. return
  2107. }
  2108. }
  2109. // 钎样提交
  2110. if (this.isQY && !this.isZJ) {
  2111. that.gridList.serviceManagementType = that.typevalue
  2112. uni.showModal({
  2113. content: "确定提交钎样信息?",
  2114. showCancel: true,
  2115. confirmText: '提交',
  2116. success: function(res) {
  2117. if (res.confirm) {
  2118. // 收购入库
  2119. if (that.typevalue == 3) {
  2120. uni.showLoading({
  2121. title: "加载中",
  2122. mask: true
  2123. })
  2124. that.cumulant(1)
  2125. return
  2126. }
  2127. uni.showLoading({
  2128. title: "加载中",
  2129. mask: true
  2130. })
  2131. that.gridList.inOutFlag = 2
  2132. that.inOutWarehouse(1)
  2133. }
  2134. }
  2135. })
  2136. } else {
  2137. this.gridList.brazer = 0
  2138. this.getGoodsName()
  2139. }
  2140. // // 质检提交
  2141. // if (!this.isQY && this.isZJ) {
  2142. // }
  2143. },
  2144. gradepicker(e) {
  2145. console.log(e)
  2146. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  2147. this.gridList.grade = this.gradeList[e[0]].value
  2148. this.gridList.gradeKey = this.gradeList[e[0]].key
  2149. this.waterContentChange()
  2150. },
  2151. setGoodName(e, status) {
  2152. // console.log(this.goodsList[e[0]].goodsName,111111111)
  2153. //
  2154. // [e[0]] = 0
  2155. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  2156. if (this.goodsList[e[0]].goodsName == '玉米') {
  2157. this.gridList.type = '干粮'
  2158. this.edit = true
  2159. } else if (this.goodsList[e[0]].goodsName.indexOf('潮粮') > -1) {
  2160. this.gridList.type = '潮粮'
  2161. this.edit = true
  2162. } else {
  2163. this.gridList.type = '干粮'
  2164. this.edit = false
  2165. }
  2166. var that = this
  2167. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  2168. // this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
  2169. // warehouseId: this.cangid,
  2170. // goodsName: this.gridList.goodsName
  2171. // }).then(res => {
  2172. // if (res.data.data) {
  2173. // uni.hideLoading()
  2174. // // let data = res.data.data
  2175. // // that.gridList =data
  2176. // }
  2177. // })
  2178. uni.setStorageSync('goodsName', this.gridList.goodsName)
  2179. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  2180. if (this.inType == "收购入库") { //收购入库 价格取自合同
  2181. return
  2182. }
  2183. if (!status) {
  2184. uni.showLoading({
  2185. title: '加载中',
  2186. mask: true
  2187. })
  2188. }
  2189. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  2190. warehouseId: this.cangid,
  2191. goodsName: this.gridList.goodsName
  2192. }).then(res => {
  2193. this.gridList.dryGrainPrice = res.data.data
  2194. if (!status) {
  2195. uni.hideLoading()
  2196. }
  2197. })
  2198. }
  2199. this.waterContentChange()
  2200. },
  2201. goodspicker(e) {
  2202. console.log(e)
  2203. this.setGoodName(e)
  2204. },
  2205. typepicker(e) {
  2206. var that = this
  2207. this.gridList.type = this.typeList[e[0]]
  2208. if (this.inType == "收购入库") { //收购入库 价格取自合同
  2209. return
  2210. }
  2211. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  2212. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  2213. warehouseId: this.cangid,
  2214. goodsName: this.gridList.goodsName
  2215. }).then(res => {
  2216. that.gridList.dryGrainPrice = res.data.data
  2217. })
  2218. }
  2219. },
  2220. binNumberpicker(e) {
  2221. console.log(this.warehouseList[e[0]])
  2222. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  2223. this.gridList.positionId = this.warehouseList[e[0]].id
  2224. },
  2225. del(item) {
  2226. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  2227. id: item.id
  2228. }).then(res => {
  2229. if (res.data.code == 200) {
  2230. this.$api.msg('删除成功')
  2231. } else {
  2232. this.$api.msg('系统异常,请联系管理员')
  2233. }
  2234. })
  2235. },
  2236. contactUs() {
  2237. const that = this
  2238. uni.makePhoneCall({
  2239. // 手机号
  2240. phoneNumber: '18241771147',
  2241. // 成功回调
  2242. success: (res) => {},
  2243. // 失败回调
  2244. fail: (res) => {}
  2245. });
  2246. },
  2247. loadData() {
  2248. // const that = this
  2249. // if(uni.getStorageSync("PageCur")){
  2250. // that.PageCur = uni.getStorageSync("PageCur");
  2251. // }
  2252. // that.userInfoTmp = uni.getStorageSync("userInfo")
  2253. // uni.showLoading({
  2254. // title: '正在加载',
  2255. // mask:true
  2256. // })
  2257. // that.$api.request('integral', 'getIndexData', failres => {
  2258. // that.$api.msg(failres.errmsg)
  2259. // uni.hideLoading()
  2260. // }).then(res => {
  2261. // let data = res.data
  2262. // uni.setStorageSync("message", data.message);
  2263. // uni.setStorageSync("task", data.task);
  2264. // uni.setStorageSync("contract", data.contract);
  2265. // uni.setStorageSync('showTran', data.showTran);
  2266. // that.showTran = data.showTran
  2267. // that.gridList[4].tips = data.task
  2268. // that.gridList[2].tips = data.contract
  2269. // that.companyId = data.companyId
  2270. // uni.hideLoading()
  2271. // })
  2272. },
  2273. confirm() {
  2274. const that = this
  2275. if (!that.inputContent) {
  2276. that.$api.msg('输入不能为空')
  2277. return
  2278. }
  2279. let obj = {}
  2280. obj[that.feild] = that.inputContent
  2281. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  2282. that.userInfo.nickname = that.inputContent
  2283. that.inputContent = ''
  2284. that.$store.commit('login', that.userInfo)
  2285. })
  2286. },
  2287. cancel() {
  2288. this.inputShow = false
  2289. this.inputStatus = 'none'
  2290. this.genderShow = false
  2291. },
  2292. myAccount() {
  2293. uni.navigateTo({
  2294. url: `/pageA/pages/contract`
  2295. })
  2296. },
  2297. /**
  2298. * 统一跳转接口,拦截未登录路由
  2299. * navigator标签现在默认没有转场动画,所以用view
  2300. */
  2301. navTo(url) {
  2302. if (!this.hasLogin) {
  2303. url = '/pages/public/login';
  2304. }
  2305. uni.navigateTo({
  2306. url
  2307. })
  2308. },
  2309. mycarClick(carNo) {
  2310. this.modalName = null
  2311. uni.navigateTo({
  2312. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  2313. })
  2314. },
  2315. scanCode() {
  2316. uni.scanCode({
  2317. success: function(res) {
  2318. uni.navigateTo({
  2319. url: res.result
  2320. })
  2321. }
  2322. })
  2323. },
  2324. hideModal(e) {
  2325. this.modalName = null
  2326. },
  2327. }
  2328. }
  2329. </script>
  2330. <style lang='scss' scoped>
  2331. page {
  2332. background: #F5F6FA;
  2333. }
  2334. .title_b {
  2335. margin: 20rpx 20rpx 0rpx 20rpx;
  2336. padding: 20rpx 10rpx 20rpx 10rpx;
  2337. font-size: 18px;
  2338. font-weight: 550;
  2339. }
  2340. .c-row {
  2341. display: -webkit-box;
  2342. display: -webkit-flex;
  2343. display: flex;
  2344. -webkit-box-align: center;
  2345. -webkit-align-items: center;
  2346. align-items: center;
  2347. padding: 20rpx 30rpx;
  2348. position: relative;
  2349. }
  2350. .con-list {
  2351. -webkit-box-flex: 1;
  2352. -webkit-flex: 1;
  2353. flex: 1;
  2354. display: -webkit-box;
  2355. display: -webkit-flex;
  2356. display: flex;
  2357. -webkit-box-orient: vertical;
  2358. -webkit-box-direction: normal;
  2359. -webkit-flex-direction: column;
  2360. flex-direction: column;
  2361. color: #303133;
  2362. line-height: 40rpx;
  2363. text-align: right;
  2364. padding-right: 20rpx;
  2365. }
  2366. .wrap {
  2367. padding-bottom: 10px;
  2368. font-size: 14px;
  2369. background: #fff;
  2370. margin: 10px;
  2371. border-radius: 10px;
  2372. input {
  2373. font-size: 14px;
  2374. }
  2375. >.title {
  2376. padding: 10px 16px;
  2377. }
  2378. }
  2379. .footer {
  2380. background: #fff;
  2381. position: fixed;
  2382. bottom: 0;
  2383. width: 100%;
  2384. padding: 20px 10px;
  2385. z-index: 10;
  2386. .button {
  2387. background: #22C572;
  2388. width: 90%;
  2389. margin: 20rpx auto;
  2390. padding: 10px;
  2391. color: #fff;
  2392. text-align: center;
  2393. border-radius: 30px;
  2394. }
  2395. }
  2396. .buns_item {
  2397. display: flex;
  2398. padding: 80rpx 0 50rpx 0;
  2399. justify-content: space-around;
  2400. }
  2401. .but_css {
  2402. background: #22C572;
  2403. width: 40%;
  2404. padding: 20rpx;
  2405. color: #fff;
  2406. text-align: center;
  2407. border-radius: 20rpx;
  2408. }
  2409. /deep/.u-radio-group {
  2410. flex-direction: row-reverse;
  2411. }
  2412. /deep/.u-upload .u-list-item {
  2413. background: #fff;
  2414. border: 1px dashed #ccc;
  2415. border-radius: 10rpx;
  2416. height: 190rpx !important;
  2417. width: 190rpx !important;
  2418. margin: 10rpx;
  2419. text-align: center;
  2420. display: flex;
  2421. align-items: center;
  2422. justify-content: center;
  2423. flex-direction: column;
  2424. }
  2425. /deep/.radio .u-radio__label{
  2426. margin-right:0;
  2427. }
  2428. </style>