add_quality_testing.vue 83 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497
  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. buyer:'',
  621. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  622. inputShow: false,
  623. params: {
  624. year: true,
  625. month: true,
  626. day: true,
  627. },
  628. Data: {
  629. ktv: '111111'
  630. },
  631. action: this.$uploadUrl,
  632. pcUserInfo: uni.getStorageSync('pcUserInfo'),
  633. maxSize: 50 * 1024 * 1024,
  634. Isedit: false,
  635. MykeywordShow: false,
  636. InputEvent: '',
  637. tranTaskFlag: 0,
  638. dryGrainPrice: 0,
  639. tidalGrainPrice: 0,
  640. modalName: '',
  641. pricetext: '锁定',
  642. pricedisabled: false,
  643. show8: false,
  644. mycarStyle: '',
  645. feild: undefined,
  646. id: 0,
  647. outType: '他运',
  648. show: false,
  649. show4: false,
  650. show5: false,
  651. show6: false,
  652. show7: false,
  653. show9: false,
  654. edit: true,
  655. goodsdisabled: false,
  656. freighttext: '手动填写',
  657. costtext: '手动填写',
  658. selector: [],
  659. show1: false,
  660. inputContent: '',
  661. multiSelector1: [{
  662. name: '他运',
  663. value: '他运'
  664. }],
  665. printId: '',
  666. typevalue: '3',
  667. coverTransform: 'translateY(0px)',
  668. coverTransition: '0s',
  669. moving: false,
  670. footprintList: [],
  671. searchKeyWord: '',
  672. isVip: false,
  673. userInfoTmp: [],
  674. inputStatus: 'none',
  675. carInfo: [],
  676. gridCol: 4,
  677. freightstatus: false,
  678. coststatus: false,
  679. pageSize: 10,
  680. show3: false,
  681. show2: false,
  682. goodsList: [],
  683. mode: 'date',
  684. currentPage: 1,
  685. value: false,
  686. gridBorder: false,
  687. headUrl: "../../static/img/myimg/YongHu@3x.png",
  688. userphone: "",
  689. username: "请更改昵称",
  690. contractFlag: 10,
  691. gridList: {
  692. outType: '汽运',
  693. natureOfGrainPurchase: '贸易粮',
  694. type: '',
  695. tidalGrainPrice: '',
  696. dryGrainPrice: '',
  697. buckleMiscellaneous: '',
  698. carNumber: '',
  699. customerName: '',
  700. customerPhone: '',
  701. bulkDensity: "",
  702. imperfectGrain: "",
  703. waterPriceIncrease: 0,
  704. waterPriceDeduction: 0,
  705. qualityPriceIncrease: 0,
  706. qualityPriceDeduction: 0,
  707. waterContent: "",
  708. jiaorenli: "",
  709. impurity: "",
  710. mildewGrain: "",
  711. compName: "",
  712. type: '',
  713. freight: 0,
  714. cost: '',
  715. addressUrl: '',
  716. tidalGrainPrice: 0,
  717. buckleWeightRatio: 0,
  718. buckleMiscellaneous: 0,
  719. paramType: 1,
  720. specifications:830,
  721. warehouseInOutDetail: {
  722. grade: '',
  723. reGrade: '',
  724. imperfectGrain: '',
  725. reImperfectGrain: '',
  726. impurity: '',
  727. reImpurity: '',
  728. jiaorenli: '',
  729. reJiaorenli: '',
  730. bulkDensity: '',
  731. reBulkDensity: '',
  732. mildewGrain: '',
  733. reMildewGrain: '',
  734. },
  735. disablednotarize: false,
  736. deductionAmount: 0,
  737. deductionWeight: 0,
  738. grossWeight: 0,
  739. tare: 0,
  740. grade: '',
  741. inOutDate: new Date().toISOString().slice(0, 10),
  742. netWeight: 0,
  743. pureWeight: 0,
  744. deductionWeight: 0,
  745. waterContent: '',
  746. reWaterContent: '',
  747. reGrade: '',
  748. imperfectGrain: '',
  749. reImperfectGrain: '',
  750. impurity: '',
  751. reImpurity: '',
  752. jiaorenli: '',
  753. reJiaorenli: '',
  754. bulkDensity: '',
  755. reBulkDensity: '',
  756. reMemo: '',
  757. storageTagNo: '',
  758. mildewGrain: '',
  759. reMildewGrain: '',
  760. boxNo: '',
  761. boxNoOther: '',
  762. titleNo: '',
  763. titleNoOther: '',
  764. statusFlag: 1
  765. },
  766. gridListInit: {
  767. natureOfGrainPurchase: '贸易粮',
  768. type: '',
  769. tidalGrainPrice: '',
  770. dryGrainPrice: '',
  771. buckleMiscellaneous: '',
  772. carNumber: '',
  773. customerName: '',
  774. customerPhone: '',
  775. bulkDensity: "",
  776. imperfectGrain: "",
  777. waterContent: "",
  778. jiaorenli: "",
  779. impurity: "",
  780. mildewGrain: "",
  781. compName: "",
  782. type: '',
  783. freight: 0,
  784. cost: '',
  785. addressUrl: '',
  786. tidalGrainPrice: 0,
  787. buckleWeightRatio: 0,
  788. buckleMiscellaneous: 0,
  789. paramType: 1,
  790. warehouseInOutDetail: {
  791. grade: '',
  792. reGrade: '',
  793. imperfectGrain: '',
  794. reImperfectGrain: '',
  795. impurity: '',
  796. reImpurity: '',
  797. jiaorenli: '',
  798. reJiaorenli: '',
  799. bulkDensity: '',
  800. reBulkDensity: '',
  801. mildewGrain: '',
  802. reMildewGrain: '',
  803. },
  804. disablednotarize: false,
  805. deductionAmount: 0,
  806. deductionWeight: 0,
  807. grossWeight: 0,
  808. tare: 0,
  809. grade: '',
  810. // inOutDate: new Date().toISOString().slice(0, 10),
  811. netWeight: 0,
  812. pureWeight: 0,
  813. deductionWeight: 0,
  814. waterContent: '',
  815. reWaterContent: '',
  816. reGrade: '',
  817. imperfectGrain: '',
  818. reImperfectGrain: '',
  819. impurity: '',
  820. reImpurity: '',
  821. jiaorenli: '',
  822. reJiaorenli: '',
  823. bulkDensity: '',
  824. reBulkDensity: '',
  825. reMemo: '',
  826. storageTagNo: '',
  827. mildewGrain: '',
  828. reMildewGrain: '',
  829. boxNo: '',
  830. boxNoOther: '',
  831. titleNo: '',
  832. titleNoOther: '',
  833. statusFlag: 1
  834. },
  835. typeList: ['潮粮', '干粮'],
  836. managementType: '',
  837. flag: 2,
  838. warehouseName: '',
  839. compName:'',
  840. warehouseList: [],
  841. warehouseCount: '',
  842. commonWarehouseNo: '',
  843. // warehouseTradeCount: 0,
  844. showTran: true,
  845. companyId: 1,
  846. contractNolist: [],
  847. current: 4,
  848. taskNolist: [],
  849. tranCarInfoList: [],
  850. fleetNameList: [],
  851. multiSelector: [{
  852. name: '汽运',
  853. value: '0',
  854. },
  855. {
  856. name: '火运',
  857. value: '1',
  858. },
  859. {
  860. name: '集装箱船',
  861. value: '2',
  862. },
  863. {
  864. name: '散船',
  865. value: '3',
  866. },
  867. ],
  868. gradeList: [{
  869. key: 1,
  870. value: '一等品'
  871. },
  872. {
  873. key: 2,
  874. value: '二等品'
  875. },
  876. {
  877. key: 3,
  878. value: '三等品'
  879. },
  880. {
  881. key: 4,
  882. value: '等外'
  883. },
  884. ],
  885. cangid: '',
  886. inType: "", //入库类型
  887. transgeneShow: false,
  888. transgeneList: [{
  889. value: '非转基因'
  890. }, {
  891. value: '转基因'
  892. }],
  893. colorLustreShow: false,
  894. colorLustreList: [{
  895. value: '正常'
  896. }, {
  897. value: '异常'
  898. }],
  899. imglist:[],
  900. imglist1:[],
  901. }
  902. },
  903. // #ifndef MP
  904. onNavigationBarButtonTap(e) {
  905. const index = e.index;
  906. if (index === 0) {
  907. this.navTo('/pages/set/set');
  908. } else if (index === 1) {
  909. // #ifdef APP-PLUS
  910. const pages = getCurrentPages();
  911. const page = pages[pages.length - 1];
  912. const currentWebview = page.$getAppWebview();
  913. currentWebview.hideTitleNViewButtonRedDot({
  914. index
  915. });
  916. // #endif
  917. uni.navigateTo({
  918. url: '/pages/notice/notice'
  919. })
  920. }
  921. },
  922. // #endif
  923. computed: {
  924. ...mapState(['hasLogin', 'userInfo']),
  925. // 手机号中间4位加*
  926. starUserphone() {
  927. let reg = /^(\d{3})\d{4}(\d{4})$/;
  928. if (this.userphone) {
  929. return this.userphone.replace(reg, "$1****$2");
  930. }
  931. }
  932. },
  933. onLoad(options) {
  934. that = this
  935. var date = new Date()
  936. console.log('options',options)
  937. this.commonWarehouseNo = options.commonWarehouseNo
  938. this.gridList.warehouseName = options.warehouseName
  939. this.cangid = options.cangid
  940. this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  941. id: this.cangid
  942. }).then(res => {
  943. console.log(res)
  944. this.warehouseList = res.data.data.warehousePositionInfoList
  945. })
  946. if (uni.getStorageSync('compName1')) {
  947. this.gridList.compName = uni.getStorageSync('compName1').company
  948. }
  949. this.gridList.person = options.personCharge
  950. this.gridList.personPhone = options.personPhone
  951. this.gridList.qualityInspector = uni.getStorageSync("userInfo").userName
  952. this.gridList.produceDate = date.getFullYear()+'-'+((date.getMonth()+1)>=10?(date.getMonth()+1):'0'+(date.getMonth()+1))+'-'+((date.getDate())>=10?date.getDate():'0'+date.getDate())
  953. // this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  954. // warehouseId: this.cangid
  955. // }).then(res => {
  956. // if (res.data.data) {
  957. // this.setGoodName([0])
  958. // }
  959. // })
  960. this.managementType = options.managementType
  961. let that = this
  962. this.purchasePriceList = uni.getStorageSync('purchasePriceList')
  963. // if (uni.getStorageSync('checkcustomer')) {
  964. // let _customerInfo = uni.getStorageSync('checkcustomer')
  965. // if (_customerInfo.shipperName) {
  966. // this.gridList.identityId = _customerInfo.id
  967. // //点击登记客户
  968. // this.gridList.customerName = _customerInfo.shipperName
  969. // this.gridList.customerPhone = _customerInfo.shipperPhone
  970. // this.gridList.carNumber=_customerInfo.carNo
  971. // } else {
  972. // //点击搜索客户
  973. // this.gridList.customerName = _customerInfo.customerName
  974. // this.gridList.customerPhone = _customerInfo.customerPhone
  975. // }
  976. // this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  977. // }
  978. this.gridList.grade = this.gradeList[1].value
  979. this.gridList.gradeKey = this.gradeList[1].key
  980. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  981. warehouseId: this.cangid
  982. }).then(res => {
  983. if (res.data.data) {
  984. that.goodsList = res.data.data
  985. if (that.goodsList.length > 0) {
  986. that.gridList.goodsName = that.goodsList[0].goodsName
  987. uni.setStorageSync('purchasePriceList', that.goodsList)
  988. that.purchasePriceList = uni.getStorageSync('purchasePriceList')
  989. }
  990. } else if (res.data.code != 200) {
  991. uni.showModal({
  992. content: res.data.message,
  993. showCancel: false
  994. })
  995. }
  996. })
  997. console.log(this.gridList)
  998. this.gridListInit = this.gridList
  999. },
  1000. async onShow() {
  1001. var that = this
  1002. if(uni.getStorageSync('compName1')){
  1003. that.compName = uni.getStorageSync('compName1').company
  1004. if(that.compName=='辽宁佳屹农商贸有限公司'){
  1005. console.log("123")
  1006. this.typevalue = '1'
  1007. this.contractFlag = 7
  1008. }
  1009. }
  1010. this.isQY = this.utils.getCurrectRoles('acquisitionQuality.qview')
  1011. this.isZJ = this.utils.getCurrectRoles('acquisitionQuality.initial')
  1012. if(!uni.getStorageSync('gridList')&&that.compName!='辽宁佳屹农商贸有限公司'){
  1013. if (this.isZJ && !this.isQY) {
  1014. console.log("123456")
  1015. this.typevalue = '1'
  1016. this.contractFlag = 7
  1017. } else {
  1018. console.log("243423423")
  1019. this.typevalue = '3'
  1020. this.contractFlag = 10
  1021. }
  1022. }
  1023. uni.showLoading({
  1024. title: '加载中',
  1025. mask: true
  1026. })
  1027. if (this.typevalue == '3') {
  1028. this.flag = 3
  1029. } else {
  1030. this.flag = 2
  1031. }
  1032. await this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  1033. flag: this.flag,
  1034. warehouseName: this.gridList.warehouseName
  1035. }).then(res => {
  1036. for (let i = 0; i < res.data.data.length; i++) {
  1037. this.$set(res.data.data[i], 'inOutTaskNo1', res.data.data[i].inOutTaskNo + (res.data.data[
  1038. i].taskFlag ? '(' + res.data.data[i].taskFlag + ')' : ''))
  1039. }
  1040. // console.log(res.data.data, 22222)
  1041. this.taskNolist = res.data.data
  1042. })
  1043. this.multiSelector1 = [{
  1044. name: '他运',
  1045. value: '他运'
  1046. }]
  1047. await this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  1048. warehouseName: this.gridList.warehouseName
  1049. }).then(res => {
  1050. uni.hideLoading();
  1051. // console.log(2)
  1052. // console.log(res)
  1053. if (res.data.data.contractManagementInfoList) {
  1054. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  1055. res.data.data.contractMangementInfoList[i].name = '自运 (' +
  1056. res.data.data.contractMangementInfoList[i].contractNo + ' ' + res.data.data
  1057. .contractMangementInfoList[i].seller + ')'
  1058. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  1059. }
  1060. } else {
  1061. this.multiSelector1 = [{
  1062. name: '他运',
  1063. value: '他运'
  1064. }]
  1065. }
  1066. // this.taskNolist=res.data.data
  1067. })
  1068. if (uni.getStorageSync('checkcustomer')&&this.typevalue==3) {
  1069. let _customerInfo = uni.getStorageSync('checkcustomer')
  1070. if (_customerInfo.shipperName) {
  1071. this.gridList.identityId = _customerInfo.id
  1072. //点击登记客户
  1073. this.gridList.customerName = _customerInfo.shipperName
  1074. this.gridList.customerPhone = _customerInfo.shipperPhone
  1075. this.gridList.carNumber = _customerInfo.carNo
  1076. } else {
  1077. //点击搜索客户
  1078. this.gridList.customerName = _customerInfo.customerName
  1079. this.gridList.customerPhone = _customerInfo.customerPhone
  1080. }
  1081. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  1082. var that = this
  1083. setTimeout(() => {}, 1000)
  1084. console.log(this.gridList.goodsName)
  1085. if (!this.gridList.goodsName) {
  1086. this.gridList.goodsName = uni.getStorageSync('goodsName')
  1087. }
  1088. if (this.gridList.goodsName) {
  1089. uni.showLoading({
  1090. title: '加载中',
  1091. mask: true
  1092. })
  1093. await this.$api.doRequest('get',
  1094. '/qualityInspectionManagement/getQualityInspectionManagementMap', {
  1095. goodsName: this.gridList.goodsName,
  1096. compId: uni.getStorageSync('pcUserInfo').compId,
  1097. customerNumberCard: this.gridList.customerNumberCard,
  1098. warehouseName: this.gridList.warehouseName
  1099. }).then(res => {
  1100. uni.hideLoading();
  1101. if (res.data.data.A + res.data.data.B + res.data.data.C * 50 > res.data.data.D - 50) {
  1102. that.redstatus = true
  1103. } else {
  1104. that.redstatus = false
  1105. }
  1106. var a = res.data.data.A > 0 ? '已完成' + Number(res.data.data.A).toFixed(2) + '吨,' : ''
  1107. var b = res.data.data.B > 0 ? '进行中' + Number(res.data.data.B).toFixed(2) + '吨,' : ''
  1108. var c = res.data.data.C > 0 ? '未称重' + Number(res.data.data.C) + '车' : ''
  1109. that.gridList.volumeofbusiness = a + b + c
  1110. console.log(that.gridList.volumeofbusiness)
  1111. that.$forceUpdate()
  1112. })
  1113. }
  1114. }
  1115. if(uni.getStorageSync('gridList')&&this.typevalue==1){
  1116. if(uni.getStorageSync('typevalue')){
  1117. this.typevalue=uni.getStorageSync('typevalue')
  1118. }
  1119. this.gridList=uni.getStorageSync('gridList')
  1120. if(uni.getStorageSync('carNo')){
  1121. this.gridList.carNumber=uni.getStorageSync('carNo')
  1122. this.gridList.shipId=uni.getStorageSync('checkcustomer').shipId
  1123. }
  1124. }
  1125. },
  1126. methods: {
  1127. onError(error) {
  1128. alert(error)
  1129. console.log('------------error-----------')
  1130. console.log(error)
  1131. },
  1132. onProgress(e) {
  1133. console.log(e)
  1134. },
  1135. radioGroupChange(e){
  1136. console.log(e)
  1137. this.gridList.specifications=e
  1138. },
  1139. change1(e) {
  1140. this.gridList.produceDate=e.result
  1141. console.log(e);
  1142. },
  1143. onRemove(index,i) {
  1144. console.log(index,i)
  1145. if(i==0){
  1146. this.imglist.splice(index, 1)
  1147. this.gridList.polluteUrl=this.imglist.toString()
  1148. }else{
  1149. this.imglist1.splice(index, 1)
  1150. this.gridList.wornUrl=this.imglist1.toString()
  1151. }
  1152. console.log(this.imglist,this.imglist1)
  1153. },
  1154. carchange(){
  1155. uni.setStorageSync('typevalue', this.typevalue)
  1156. uni.setStorageSync('gridList', this.gridList)
  1157. uni.navigateTo({
  1158. url: '/pages/erpbusiness/customercar?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  1159. .warehouseName + '&goodsName=' + this.gridList.goodsName
  1160. })
  1161. },
  1162. getImgUrl(res,status) {
  1163. var that = this
  1164. this.$api.doRequest('post', '/appendix/api/saveFilesApp', {
  1165. newAppendixs: [res.data],
  1166. oldAppendixIds: ""
  1167. }).then(res1 => {
  1168. if(status==0){
  1169. that.imglist.push(res1.data.data[0])
  1170. that.gridList.polluteUrl=that.imglist.toString()
  1171. }else{
  1172. that.imglist1.push(res1.data.data[0])
  1173. that.gridList.wornUrl=that.imglist1.toString()
  1174. }
  1175. console.log(res)
  1176. })
  1177. },
  1178. colorLustreClick(e) {
  1179. this.gridList.colorLustre = this.colorLustreList[e[0]].value
  1180. },
  1181. transgeneClick(e) {
  1182. this.gridList.transgene = this.transgeneList[e[0]].value
  1183. },
  1184. Cancelword() {
  1185. this.bottomHeight = '10rpx';
  1186. this.MykeywordShow = false;
  1187. this.InputEvent = '';
  1188. },
  1189. goNext(val) {
  1190. var inputList = Equ_List;
  1191. if (this.menuIndex == 1) {
  1192. inputList = Sign_List;
  1193. }
  1194. var index = inputList.indexOf(val);
  1195. this.setScrollTops(val);
  1196. if (index < inputList.length - 1) {
  1197. this.InputEvent = inputList[index + 1];
  1198. } else {
  1199. this.InputEvent = ''
  1200. this.bottomHeight = '10rpx';
  1201. this.MykeywordShow = false;
  1202. }
  1203. },
  1204. mykeywordset(datatxt) {
  1205. var arr = JSON.parse(datatxt);
  1206. this.gridList[arr.even] = arr.value;
  1207. if (arr.even == 'waterContent') {
  1208. this.waterContentChange()
  1209. } else if (arr.even == 'bulkDensity') {
  1210. this.obtainPrice()
  1211. }
  1212. },
  1213. SetInputKey(even) {
  1214. uni.hideKeyboard();
  1215. this.InputEvent = even;
  1216. this.setScrollTops(even);
  1217. if (!this.MykeywordShow) {
  1218. this.bottomHeight = '320rpx';
  1219. this.MykeywordShow = true;
  1220. }
  1221. },
  1222. setScrollTops(even) {
  1223. var inputList = Equ_List;
  1224. var index = inputList.indexOf(even);
  1225. this.viewTop = (index + 1) * 60 + 100;
  1226. },
  1227. pricefocus(e, status) {
  1228. console.log(e)
  1229. if (status == 1) {
  1230. if (e.detail.value == 0) {
  1231. this.gridList.waterPriceIncrease = ''
  1232. }
  1233. } else if (status == 2) {
  1234. if (e.detail.value == 0) {
  1235. this.gridList.waterPriceDeduction = ''
  1236. }
  1237. } else if (status == 3) {
  1238. if (e.detail.value == 0) {
  1239. this.gridList.qualityPriceIncrease = ''
  1240. }
  1241. } else if (status == 4) {
  1242. if (e.detail.value == 0) {
  1243. this.gridList.qualityPriceDeduction = ''
  1244. }
  1245. }
  1246. },
  1247. deductionchange() {
  1248. if (this.gridList.type == '干粮') {
  1249. if (this.dryGrainPrice != '') {
  1250. console.log(Number(this.dryGrainPrice + (this.gridList.waterPriceIncrease / 1000) - (this.gridList
  1251. .waterPriceDeduction / 1000) + (this.gridList.qualityPriceIncrease / 1000) - (this
  1252. .gridList.qualityPriceDeduction / 1000)), Number(this.dryGrainPrice + (this.gridList
  1253. .waterPriceIncrease / 1000) - (this.gridList.waterPriceDeduction / 1000) + (this
  1254. .gridList.qualityPriceIncrease / 1000) - (this.gridList.qualityPriceDeduction /
  1255. 1000)).toFixed(2))
  1256. this.gridList.dryGrainPrice = Number(this.dryGrainPrice + (this.gridList.waterPriceIncrease /
  1257. 1000) - (this.gridList.waterPriceDeduction / 1000) + (this.gridList
  1258. .qualityPriceIncrease /
  1259. 1000) - (this.gridList.qualityPriceDeduction / 1000)).toFixed(4)
  1260. }
  1261. } else if (this.gridList.type == '潮粮') {
  1262. if (this.tidalGrainPrice != '') {
  1263. this.gridList.tidalGrainPrice = Number(this.tidalGrainPrice + (this.gridList.waterPriceIncrease /
  1264. 1000) - (this.gridList.waterPriceDeduction / 1000) + (this.gridList
  1265. .qualityPriceIncrease / 1000) - (this.gridList.qualityPriceDeduction / 1000)).toFixed(4)
  1266. }
  1267. }
  1268. this.$forceUpdate()
  1269. },
  1270. carNopicker(e) {
  1271. this.gridList.carNumber = this.tranCarInfoList[e[0]].carNo
  1272. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1273. if (i == e[0]) {
  1274. this.gridList.carNo = this.tranCarInfoList[i].carNo
  1275. this.gridList.carNoCopy = this.tranCarInfoList[i].carNo + '(' + this.tranCarInfoList[i].tranCarNo +
  1276. ')'
  1277. this.gridList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  1278. this.gridList.carId = this.tranCarInfoList[i].id
  1279. this.gridList.freight = Math.round(
  1280. this.tranCarInfoList[i].tranPrice
  1281. )
  1282. if (this.gridList.inOutType == '移库入库') {
  1283. if (!this.gridList.cost) {
  1284. this.gridList.cost = this.tranCarInfoList[i].cost
  1285. }
  1286. this.gridList.loadNetWeight =
  1287. this.tranCarInfoList[i].loadNetWeight
  1288. }
  1289. }
  1290. }
  1291. },
  1292. obtainPrice() { //根据容重获取价格
  1293. if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
  1294. // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1295. let quality = this.gridList.goodsName == '大豆' ? this.gridList.protein : this.gridList.bulkDensity
  1296. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1297. warehouseId: this.cangid,
  1298. goodsName: this.gridList.goodsName,
  1299. bulkDensity: quality
  1300. }).then(res => {
  1301. if (res.data.data != 0) {
  1302. this.gridList.dryGrainPrice = res.data.data
  1303. this.dryGrainPrice = res.data.data
  1304. this.gridList.waterPriceIncrease = 0
  1305. this.gridList.waterPriceDeduction = 0
  1306. this.gridList.qualityPriceIncrease = 0
  1307. this.gridList.qualityPriceDeduction = 0
  1308. }
  1309. })
  1310. // }
  1311. }
  1312. },
  1313. changeprice() {
  1314. if (this.pricetext == '解锁') {
  1315. this.pricedisabled = false
  1316. this.pricetext = '锁定'
  1317. } else {
  1318. this.pricedisabled = true
  1319. this.pricetext = '解锁'
  1320. }
  1321. },
  1322. inputprice() {
  1323. if (this.pricetext == '锁定') {
  1324. this.pricedisabled = true
  1325. this.pricetext = '解锁'
  1326. }
  1327. console.log(this.gridList.dryGrainPrice, this.gridList.tidalGrainPrice)
  1328. if (this.gridList.type == '干粮') {
  1329. this.dryGrainPrice = this.gridList.dryGrainPrice
  1330. }
  1331. if (this.gridList.type == '潮粮') {
  1332. this.tidalGrainPrice = this.gridList.tidalGrainPrice
  1333. }
  1334. },
  1335. groupChange(e) {
  1336. console.log(e, this.gridListInit)
  1337. this.gridListInit.warehouseName = this.gridList.warehouseName
  1338. if (uni.getStorageSync('checkcustomer')) {
  1339. uni.setStorageSync('checkcustomer', '')
  1340. this.gridListInit.identityId = ''
  1341. this.gridListInit.customerName = ''
  1342. this.gridListInit.customerPhone = ''
  1343. this.gridListInit.carNumber = ''
  1344. this.gridListInit.customerNumberCard = ''
  1345. this.$forceUpdate()
  1346. }
  1347. // this.gridList = JSON.parse(JSON.stringify(this.gridListInit))
  1348. this.gridList = this.$u.deepClone(this.gridListInit)
  1349. this.gridList.serviceManagementType = e
  1350. if (e == 1) {
  1351. if (this.flag != 2) {
  1352. this.gridList.inOutTaskNo = ''
  1353. this.gridList.contractNo = ''
  1354. }
  1355. this.gridList.qualityNo = ''
  1356. this.flag = 2
  1357. // this.contractFlag = 7
  1358. } else {
  1359. if (this.flag != 3) {
  1360. this.gridList.inOutTaskNo = ''
  1361. this.gridList.contractNo = ''
  1362. }
  1363. this.flag = 3
  1364. // this.contractFlag = 10
  1365. // let number = '000' + this.warehouseCount
  1366. // number = number.substring(number.length - 4, number.length)
  1367. // this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
  1368. }
  1369. this.gridList.grade = this.gradeList[1].value
  1370. this.gridList.gradeKey = this.gradeList[1].key
  1371. this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  1372. flag: this.flag,
  1373. warehouseName: this.gridList.warehouseName
  1374. }).then(res => {
  1375. console.log(res)
  1376. for (let i = 0; i < res.data.data.length; i++) {
  1377. this.$set(res.data.data[i], 'inOutTaskNo1', res.data.data[i].inOutTaskNo + (res.data.data[
  1378. i].taskFlag ? '(' + res.data.data[i].taskFlag + ')' : ''))
  1379. }
  1380. this.taskNolist = res.data.data
  1381. })
  1382. console.log(this.gridList, 111111111111)
  1383. },
  1384. outtypepicker(e, status) {
  1385. console.log(e, status)
  1386. if (status == 0) {
  1387. this.gridList.outType = this.multiSelector[e[0]].name
  1388. } else {
  1389. if (this.multiSelector1[e[0]].name == '他运') {
  1390. this.goodsdisabled = false
  1391. this.gridList.outType = this.multiSelector1[e[0]].name
  1392. } else {
  1393. this.gridList.outType = '自运'
  1394. this.goodsdisabled = true
  1395. this.outType = this.multiSelector1[e[0]].name
  1396. this.gridList.contractNo = this.multiSelector1[i].contractNo
  1397. // if (this.gridList.contractNo == this.contractNolist[i].contractNo) {
  1398. // this.gridList.goodsName = this.outContractNo[q].goodsName
  1399. // this.gridList.goodsNameKey = this.outContractNo[q].goodsNameKey
  1400. // }
  1401. this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
  1402. contractNo: this.gridList.contractNo,
  1403. compId: uni.getStorageSync('pcUserInfo').compId
  1404. }).then(res => {
  1405. this.contractNolist = res.data.data
  1406. this.gridList.goodsName = this.contractNolist.goodsName
  1407. this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
  1408. })
  1409. this.waterContentChange()
  1410. }
  1411. }
  1412. console.log(this.gridList.outType)
  1413. },
  1414. changefreight() {
  1415. this.freightstatus = !this.freightstatus
  1416. if (this.freightstatus) {
  1417. this.freighttext = '自动获取'
  1418. } else {
  1419. this.freighttext = '手动填写'
  1420. }
  1421. },
  1422. changecost() {
  1423. this.coststatus = !this.coststatus
  1424. if (this.coststatus) {
  1425. this.costtext = '自动获取'
  1426. } else {
  1427. this.costtext = '手动填写'
  1428. }
  1429. },
  1430. inOutDatepicker(e) {
  1431. this.gridList.inOutDate = e.year + '-' + e.month + '-' + e.day
  1432. console.log(e)
  1433. },
  1434. fleetpicker(e) {
  1435. this.gridList.fleet = this.fleetNameList[e[0]].fleetName
  1436. },
  1437. change(e) {
  1438. if (e) {
  1439. this.gridList.supplementaryRecording = 1
  1440. } else {
  1441. this.gridList.supplementaryRecording = 0
  1442. }
  1443. },
  1444. tasknopicker(e) {
  1445. console.log("切换任务编号", e)
  1446. this.gridList.inOutTaskNo = this.taskNolist[e[0]].inOutTaskNo
  1447. this.gridList.inOutTaskNo1 = this.taskNolist[e[0]].inOutTaskNo1
  1448. this.gridList.taskFlag = this.taskNolist[e[0]].taskFlag
  1449. var data = this.taskNolist[e[0]]
  1450. this.gridList.donecount = data.completedQuantity + '/' + data.weight
  1451. if (this.taskNolist[e[0]].inOutType == '收购入库') {
  1452. this.gridList.contractNo = this.taskNolist[e[0]].contractNo
  1453. this.inType = this.taskNolist[e[0]].inOutType
  1454. this.gridList.goodsName = this.taskNolist[e[0]].goodsName
  1455. if (this.taskNolist[e[0]].goodsName.indexOf("潮粮") != -1) { //收购从合同中带出货名 单价等信息 用货名是否带有潮粮字符来判断干潮类型
  1456. this.gridList.type = "潮粮"
  1457. this.gridList.imperfectGrain = 8
  1458. this.gridList.impurity = 1
  1459. this.gridList.mildewGrain = 2
  1460. this.gridList.jiaorenli = 0
  1461. } else {
  1462. this.gridList.type = "干粮"
  1463. this.gridList.imperfectGrain = 8
  1464. this.gridList.impurity = 1
  1465. this.gridList.mildewGrain = 2
  1466. this.gridList.jiaorenli = 1
  1467. }
  1468. }
  1469. if (this.taskNolist[e[0]].contractNo) {
  1470. this.gridList.contractNo = this.taskNolist[e[0]].contractNo
  1471. } else {
  1472. this.gridList.contractNo = this.taskNolist[e[0]].moveTaskNo
  1473. }
  1474. this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
  1475. contractNo: this.gridList.contractNo,
  1476. compId: uni.getStorageSync('pcUserInfo').compId
  1477. }).then(res => {
  1478. this.contractNolist = res.data.data
  1479. this.buyer=res.data.data.buyer
  1480. this.gridList.pointOut =this.contractNolist.pointOut
  1481. if (this.typevalue == 3) {
  1482. var gooddata = this.goodsList.filter((item) => {
  1483. return item.goodsName == this.contractNolist.goodsName
  1484. })
  1485. if (this.contractNolist.priceType == "定价收购" && this.inType == "收购入库") {
  1486. this.gridList.dryGrainPrice = Number(this.contractNolist.unitContractPrice / 1000)
  1487. .toFixed(3)
  1488. }
  1489. if (gooddata.length > 0) {
  1490. // 收购入库
  1491. for (let q = 0; q < this.goodsList.length; q++) {
  1492. if (this.goodsList[q].goodsName == this.contractNolist.goodsName) {
  1493. this.gridList.goodsName = this.contractNolist.goodsName
  1494. this.setGoodName([q])
  1495. }
  1496. }
  1497. } else {
  1498. if (this.inType == "收购入库") {
  1499. //收购入库不校验仓库设置中的货名
  1500. uni.showModal({
  1501. title: '提示',
  1502. content: '仓库设置中无该合同货名',
  1503. showCancel: false,
  1504. confirmText: '返回',
  1505. success: function(res) {
  1506. if (res.confirm) {
  1507. uni.navigateBack({
  1508. delta: 1
  1509. })
  1510. }
  1511. }
  1512. });
  1513. }
  1514. }
  1515. } else {
  1516. this.gridList.goodsName = this.contractNolist.goodsName
  1517. if (this.gridList.goodsName == '玉米') {
  1518. this.gridList.type = '干粮'
  1519. this.gridList.imperfectGrain = 8
  1520. this.gridList.impurity = 1
  1521. this.gridList.mildewGrain = 2
  1522. this.gridList.jiaorenli = 1
  1523. if (this.contractNolist.priceType != '随行就市') {
  1524. this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
  1525. .toFixed(3)
  1526. }
  1527. this.edit = true
  1528. } else if (this.gridList.goodsName.indexOf('潮粮') > -1) {
  1529. this.gridList.type = '潮粮'
  1530. this.edit = true
  1531. if (this.contractNolist.priceType != '随行就市') {
  1532. this.gridList.tidalGrainPrice = this.contractNolist.contractPrice
  1533. this.tidalGrainPrice = this.contractNolist.contractPrice
  1534. }
  1535. this.gridList.imperfectGrain = 8
  1536. this.gridList.impurity = 1
  1537. this.gridList.mildewGrain = 2
  1538. this.gridList.jiaorenli = 0
  1539. } else {
  1540. this.gridList.type = '干粮'
  1541. this.gridList.imperfectGrain = 8
  1542. this.gridList.impurity = 1
  1543. this.gridList.mildewGrain = 2
  1544. this.gridList.jiaorenli = 1
  1545. this.edit = false
  1546. if (this.contractNolist.priceType != '随行就市') {
  1547. this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
  1548. .toFixed(3)
  1549. }
  1550. }
  1551. }
  1552. this.deliverType=this.contractNolist.deliverType
  1553. this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
  1554. this.gridList.grade = this.gradeList[1].value
  1555. this.gridList.gradeKey = this.gradeList[1].key
  1556. // this.gridList.grade = this.contractNolist.grade
  1557. this.gridList.inOutType = this.contractNolist.inOutType
  1558. if (this.gridList.goodsName == "大豆") { //货名为大豆是设置默认
  1559. this.gridList.transgene = "非转基因"
  1560. this.gridList.reTransgene = "非转基因"
  1561. this.gridList.colorLustre = "正常"
  1562. this.gridList.reColorLustre = "正常"
  1563. } else {
  1564. delete this.gridList.transgene
  1565. delete this.gridList.reTransgene
  1566. delete this.gridList.colorLustre
  1567. delete this.gridList.reColorLustre
  1568. }
  1569. if (this.gridList.inOutType == '采购入库') {
  1570. if (!this.contractNolist.unitContractPrice) {
  1571. this.gridList.tips = '卖方' + this.contractNolist.seller
  1572. } else {
  1573. this.gridList.tips = '卖方' + this.contractNolist.seller + '( ' + this.contractNolist
  1574. .unitContractPrice + '元/吨)'
  1575. }
  1576. this.gridList.inOutTypeKey = 1
  1577. console.log("this.gridList.inOutTypeKey", 1)
  1578. } else if (this.gridList.inOutType == '移库入库') {
  1579. if (this.contractNolist.unitContractPrice) {
  1580. this.gridList.tips = '出货库' + data.sendWarehouse + ' (' + this.contractNolist
  1581. .unitContractPrice + '元/吨)'
  1582. } else {
  1583. this.gridList.tips = '出货库' + data.sendWarehouse
  1584. }
  1585. this.gridList.inOutTypeKey = 3
  1586. } else if (this.contractNolist.inOutType == '移库出库') {
  1587. this.gridList.tips = '入货库' + data.receiveWarehouse
  1588. } else if (this.contractNolist.inOutType == '暂存入库') {
  1589. this.gridList.inOutTypeKey = 4
  1590. } else if (this.contractNolist.inOutType == '贸易服务入库') {
  1591. this.gridList.inOutTypeKey = 5
  1592. } else if (this.contractNolist.inOutType == '退库') {
  1593. //退库有无运输任务标识
  1594. this.gridList.tranTaskFlag = this.contractNolist.tranTaskFlag
  1595. if (this.contractNolist.contractNo) {
  1596. this.gridList.tips = '买方' + this.contractNolist.buyer
  1597. } else {
  1598. this.gridList.tips = '出货库' + data.sendWarehouse
  1599. }
  1600. this.gridList.inOutTypeKey = 6
  1601. }
  1602. this.cost = this.contractNolist.contractPrice
  1603. if (this.cost) {
  1604. this.isGetCost = true
  1605. this.gridList.cost = this.cost - this.gridList.deductionAmount
  1606. } else {
  1607. this.isGetCost = false
  1608. this.gridList.cost = this.gridList.cost
  1609. }
  1610. if (this.contractNolist.inOutType == '移库入库') {
  1611. this.isSelectType = false
  1612. } else {
  1613. this.isSelectType = true
  1614. }
  1615. if (this.contractNolist.priceType == '随行就市') {
  1616. this.disabled1 = true
  1617. } else {
  1618. this.disabled1 = false
  1619. }
  1620. if (this.contractNolist.deliverType == '1') {
  1621. this.carstatus = true
  1622. } else {
  1623. this.carstatus = false
  1624. }
  1625. this.tranCarInfoList = []
  1626. if (this.contractNolist.tranCarInfoList) {
  1627. for (var q = 0; q < this.contractNolist.tranCarInfoList.length; q++) {
  1628. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList[q]
  1629. .carNo
  1630. if (this.contractNolist.tranCarInfoList[q].tranCarNo) {
  1631. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist
  1632. .tranCarInfoList[q].carNo + '(' + this.contractNolist.tranCarInfoList[q]
  1633. .tranCarNo + ')'
  1634. } else {
  1635. this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList
  1636. .carNo
  1637. }
  1638. }
  1639. this.tranCarInfoList = this.contractNolist.tranCarInfoList
  1640. // this.carstatus = true
  1641. } else {
  1642. this.tranCarInfoList = []
  1643. }
  1644. this.fleetNameList = this.contractNolist.tranCarInfoList1
  1645. if (this.gridList.goodsName && this.gridList.customerNumberCard) {
  1646. uni.showLoading({
  1647. title: '加载中',
  1648. mask: true
  1649. })
  1650. let that = this
  1651. this.$api.doRequest('get',
  1652. '/qualityInspectionManagement/getQualityInspectionManagementMap', {
  1653. goodsName: this.gridList.goodsName,
  1654. compId: uni.getStorageSync('pcUserInfo').compId,
  1655. customerNumberCard: this.gridList.customerNumberCard
  1656. }).then(res => {
  1657. uni.hideLoading();
  1658. if (res.data.data.A + res.data.data.B + res.data.data.C * 50 > res.data.data
  1659. .D - 50) {
  1660. that.redstatus = true
  1661. } else {
  1662. that.redstatus = false
  1663. }
  1664. var a = res.data.data.A > 0 ? '已完成' + Number(res.data.data.A).toFixed(2) +
  1665. '吨,' : ''
  1666. var b = res.data.data.B > 0 ? '进行中' + Number(res.data.data.B).toFixed(2) +
  1667. '吨,' : ''
  1668. var c = res.data.data.C > 0 ? '未称重' + Number(res.data.data.C) + '车' : ''
  1669. that.gridList.volumeofbusiness = a + b + c
  1670. console.log(that.gridList.volumeofbusiness)
  1671. that.$forceUpdate()
  1672. })
  1673. }
  1674. })
  1675. this.$forceUpdate()
  1676. console.log(this.gridList)
  1677. },
  1678. print() {
  1679. console.log(this.printId)
  1680. if (this.printId) {
  1681. uni.showLoading({
  1682. title: "加载中",
  1683. mask: true
  1684. })
  1685. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  1686. id: this.printId
  1687. }).then(res => {
  1688. uni.hideLoading()
  1689. uni.setStorageSync("quality_print", res.data.data)
  1690. uni.navigateTo({
  1691. url: '/pages/erpbusiness/bleConnect'
  1692. })
  1693. })
  1694. }
  1695. },
  1696. close() {
  1697. this.isShowPrint = false
  1698. uni.navigateBack({})
  1699. },
  1700. hidden() {
  1701. this.$refs.keyboard.open(false)
  1702. },
  1703. handleShowKeyboard() {
  1704. if (this.$refs.keyboard.open) {
  1705. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  1706. } else {
  1707. this.$refs.keyboard[0].open(true)
  1708. }
  1709. },
  1710. handleShowKeyboard1() {
  1711. if (this.$refs.keyboard1.open) {
  1712. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  1713. } else {
  1714. this.$refs.keyboard1[0].open(true)
  1715. }
  1716. },
  1717. handleClick(e) {
  1718. this.gridList.carNumber = e.value //键盘输入值
  1719. },
  1720. cancelClick() {
  1721. this.isShowAlert = false
  1722. },
  1723. waterContentChange() {
  1724. var that = this
  1725. if (this.gridList.goodsName) {
  1726. for (var i = 0; i < this.purchasePriceList.length; i++) {
  1727. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  1728. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  1729. this.gridList.paramType = this.purchasePriceList[i].paramType
  1730. }
  1731. }
  1732. }
  1733. if (this.inType != "收购入库") { //非收购入库 价格取自合同
  1734. return
  1735. }
  1736. if (this.gridList.goodsName && this.cangid) {
  1737. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  1738. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1739. warehouseId: this.cangid,
  1740. goodsName: this.gridList.goodsName
  1741. }).then(res => {
  1742. that.gridList.dryGrainPrice = res.data.data
  1743. that.dryGrainPrice = res.data.data
  1744. })
  1745. }
  1746. }
  1747. that.gridList.waterPriceIncrease = 0
  1748. that.gridList.waterPriceDeduction = 0
  1749. that.gridList.qualityPriceIncrease = 0
  1750. that.gridList.qualityPriceDeduction = 0
  1751. //潮粮单价改变事件
  1752. if (
  1753. this.gridList.goodsName &&
  1754. this.gridList.waterContent &&
  1755. this.gridList.grade
  1756. ) {
  1757. uni.showLoading({
  1758. title: "加载中",
  1759. mask: true
  1760. })
  1761. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  1762. warehouseId: this.cangid,
  1763. goodsName: this.gridList.goodsName,
  1764. waterContent: this.gridList.waterContent,
  1765. grade: this.gridList.grade,
  1766. }).then(res => {
  1767. if (that.gridList.paramType == '1') {
  1768. // console.log(that.gridList)
  1769. if (that.gridList.buckleMiscellaneous) {
  1770. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(
  1771. that
  1772. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1773. .dryGrainPrice)).toFixed(4)
  1774. that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  1775. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  1776. .dryGrainPrice)).toFixed(4)
  1777. }
  1778. if (!that.gridList.tidalGrainPrice) {
  1779. that.gridList.tidalGrainPrice = ''
  1780. }
  1781. if (that.gridList.type == '干粮') {
  1782. that.gridList.dryGrainPrice = res.data.data
  1783. that.dryGrainPrice = that.gridList.dryGrainPrice
  1784. }
  1785. } else {
  1786. that.gridList.tidalGrainPrice = res.data.data
  1787. if (that.gridList.type == '干粮') {
  1788. that.gridList.dryGrainPrice = res.data.data
  1789. that.dryGrainPrice = that.gridList.dryGrainPrice
  1790. } else {
  1791. that.gridList.tidalGrainPrice = res.data.data
  1792. that.tidalGrainPrice = that.gridList.tidalGrainPrice
  1793. }
  1794. }
  1795. uni.hideLoading()
  1796. })
  1797. }
  1798. },
  1799. gocustomer() {
  1800. uni.navigateTo({
  1801. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  1802. .warehouseName + '&goodsName=' + this.gridList.goodsName+'&buyer='+this.buyer
  1803. })
  1804. },
  1805. getdate() {
  1806. var date = new Date()
  1807. var year = date.getFullYear() //获取完整的年份(4位)
  1808. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  1809. var datetime = date.getDate() //获取当前日(1-31)
  1810. if (mouth < 10) {
  1811. mouth = '0' + mouth
  1812. }
  1813. if (datetime < 10) {
  1814. datetime = '0' + datetime
  1815. }
  1816. return year + '' + mouth + '' + datetime
  1817. },
  1818. async addQualityInspection(type) {
  1819. if (type == 1) {
  1820. await this.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection', this
  1821. .gridList)
  1822. .then(res => {
  1823. console.log(res)
  1824. this.printId = res.data.data
  1825. uni.hideLoading()
  1826. // if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
  1827. // -1) ||
  1828. // (this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
  1829. // -1)) {
  1830. if (res.data.code == 200) {
  1831. console.log("addQualityInspection")
  1832. this.$api.msg('提交成功')
  1833. this.gridList.warehouseId = this.cangid
  1834. this.gridList.compId = uni.getStorageSync(
  1835. 'pcUserInfo').compId
  1836. uni.setStorageSync("quality_print", this.gridList)
  1837. uni.removeStorageSync('typevalue')
  1838. uni.removeStorageSync('gridList')
  1839. if (this.isZJ) {
  1840. this.isShowPrint = true
  1841. } else {
  1842. uni.navigateBack({})
  1843. }
  1844. console.log('that.gridList', this.gridList)
  1845. // uni.navigateBack({})
  1846. }
  1847. else if(res.data.message == '货物种类与类型不符,请确认!'){
  1848. this.$api.msg(res.data.message)
  1849. }else {
  1850. this.$api.msg('提交失败')
  1851. }
  1852. // } else {
  1853. // this.$api.msg('货物种类与类型不符,请确认')
  1854. // }
  1855. })
  1856. return
  1857. }
  1858. if (type == 2) {
  1859. await this.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection', this
  1860. .gridList)
  1861. .then(res => {
  1862. console.log("addQualityInspection")
  1863. this.printId = res.data.data
  1864. uni.hideLoading()
  1865. // if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
  1866. // -1) ||
  1867. // (this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
  1868. // -1)) {
  1869. if (res.data.code == 200) {
  1870. this.$api.msg('提交成功')
  1871. this.gridList.warehouseId = this.cangid
  1872. this.gridList.compId = uni.getStorageSync('pcUserInfo').compId
  1873. uni.setStorageSync("quality_print", this.gridList)
  1874. if (this.isZJ) {
  1875. this.isShowPrint = true
  1876. } else {
  1877. uni.navigateBack({})
  1878. }
  1879. uni.setStorageSync(
  1880. 'checkcustomer', {}
  1881. )
  1882. uni.removeStorageSync('typevalue')
  1883. uni.removeStorageSync('gridList')
  1884. console.log('that.gridList', this.gridList)
  1885. // uni.navigateBack({})
  1886. } else if(res.data.message == '货物种类与类型不符,请确认!'){
  1887. this.$api.msg(res.data.message)
  1888. }
  1889. else {
  1890. this.$api.msg('提交失败')
  1891. }
  1892. // } else {
  1893. // this.$api.msg('货物种类与类型不符,请确认')
  1894. // }
  1895. })
  1896. }
  1897. },
  1898. async inOutWarehouse(type) {
  1899. if (type == 1) {
  1900. await this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.gridList)
  1901. .then(res => {
  1902. console.log("InOutWarehouse")
  1903. this.gridList.warehouseInOutId = res.data.data
  1904. if (this.gridList.warehouseInOutId) {
  1905. this.addQualityInspection(1)
  1906. }
  1907. })
  1908. return
  1909. }
  1910. if (type == 2) {
  1911. await this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.gridList)
  1912. .then(res => {
  1913. console.log("InOutWarehouse")
  1914. if (this.isQY) {
  1915. if (!this.isZJ) {
  1916. this.gridList.brazer = 1
  1917. this.gridList.statusFlag = 7
  1918. } else {
  1919. this.gridList.statusFlag = 0
  1920. }
  1921. }
  1922. this.gridList.warehouseInOutId = res.data.data
  1923. if (this.gridList.warehouseInOutId) {
  1924. this.addQualityInspection(2)
  1925. }
  1926. })
  1927. return
  1928. }
  1929. },
  1930. async cumulant(type) {
  1931. if (type == 1) {
  1932. await this.$api.doRequest('get', '/paymentManagement/cumulant', {
  1933. compId: uni.getStorageSync('pcUserInfo').compId,
  1934. customerNumberCard: this.gridList.customerNumberCard,
  1935. goodsName: this.gridList.goodsName,
  1936. })
  1937. .then(response => {
  1938. console.log("cumulant")
  1939. if (response.data.code == 200) {
  1940. for (let i = 0; i < this.purchasePriceList.length; i++) {
  1941. if (this.gridList.goodsName == this.purchasePriceList[i].goodsName) {
  1942. let count = (this.purchasePriceList[i].saleLimit - response.data.data /
  1943. 1000)
  1944. .toFixed(2)
  1945. console.log(count, this.purchasePriceList[i].saleLimit, response.data.data)
  1946. if (Number(count) <= 0) {
  1947. count = 0
  1948. this.$api.msg('该客户累计销售' + this.gridList.goodsName + (response.data
  1949. .data /
  1950. 1000).toFixed(2) + '吨,还可售粮' + count + '吨', )
  1951. uni.hideLoading()
  1952. break;
  1953. }
  1954. this.gridList.inOutFlag = 2
  1955. this.inOutWarehouse(2)
  1956. }
  1957. }
  1958. }
  1959. })
  1960. return
  1961. }
  1962. },
  1963. async getGoodsName() {
  1964. let that = this
  1965. await this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  1966. warehouseId: this.cangid
  1967. }).then(res => {
  1968. if (res.data.code != 200 && that.typevalue == 3) {
  1969. uni.showModal({
  1970. content: res.data.message,
  1971. showCancel: false
  1972. })
  1973. return;
  1974. }
  1975. uni.showModal({
  1976. content: "确定提交质检信息?",
  1977. showCancel: true,
  1978. confirmText: '提交',
  1979. success: function(res) {
  1980. if (res.confirm) {
  1981. that.gridList.serviceManagementType = that.typevalue
  1982. if (that.typevalue == 3) {
  1983. that.cumulant(1)
  1984. return
  1985. }
  1986. that.gridList.inOutFlag = 2
  1987. that.inOutWarehouse(1)
  1988. // that.addQualityInspection(1)
  1989. }
  1990. }
  1991. })
  1992. })
  1993. },
  1994. submit() {
  1995. console.log(this.isQY, "isQY")
  1996. console.log(this.isZJ, "isZJ")
  1997. if (this.typevalue == 3) {
  1998. if (this.outType) {
  1999. this.gridList.outType = this.outType
  2000. }
  2001. }
  2002. var that = this
  2003. this.gridList.agent = this.userInfo.userName;
  2004. this.gridList.carNo = this.gridList.carNumber
  2005. this.gridList.baseId = this.cangid
  2006. this.gridList.warehouseId = this.cangid
  2007. if (this.typevalue == 1) {
  2008. if (this.gridList.inOutType == '移库入库') {
  2009. this.gridList.numberLetter = 'YKRK'
  2010. } else {
  2011. this.gridList.numberLetter = 'CGRK'
  2012. }
  2013. } else {
  2014. this.gridList.numberLetter = 'SGRK'
  2015. }
  2016. this.gridList.warehouseNo = this.commonWarehouseNo
  2017. if (!this.gridList.inOutTaskNo) {
  2018. this.$api.msg('任务编号不能为空')
  2019. return
  2020. }
  2021. if (this.utils.getCurrectRoles('acquisitionQuality.initial')) {
  2022. if (!this.gridList.binNumber) {
  2023. this.$api.msg('仓位不能为空')
  2024. return
  2025. }
  2026. if (this.typevalue == 3) {
  2027. if (!this.gridList.natureOfGrainPurchase) {
  2028. this.$api.msg('购粮性质不能为空')
  2029. return
  2030. }
  2031. }
  2032. if (!this.gridList.type) {
  2033. this.$api.msg('类型不能为空')
  2034. return
  2035. }
  2036. if (this.value == false) {
  2037. if (!this.gridList.grade) {
  2038. this.$api.msg('等级不能为空')
  2039. return
  2040. }
  2041. if (!this.gridList.impurity) {
  2042. this.$api.msg('杂质不能为空')
  2043. return
  2044. }
  2045. if (!this.gridList.waterContent) {
  2046. this.$api.msg('初检水分不能为空')
  2047. return
  2048. }
  2049. // if (!this.gridList.reWaterContent) {
  2050. // this.$api.msg('复检水分不能为空')
  2051. // return
  2052. // }
  2053. if (!this.gridList.mildewGrain) {
  2054. this.$api.msg('霉变粒不能为空')
  2055. return
  2056. }
  2057. if (this.gridList.goodsName != "大豆") {
  2058. if (!this.gridList.bulkDensity) {
  2059. this.$api.msg('容重不能为空')
  2060. return
  2061. }
  2062. }
  2063. if (this.gridList.goodsName == "大豆") {
  2064. if (!this.gridList.protein) {
  2065. this.$api.msg('蛋白不能为空')
  2066. return
  2067. }
  2068. }
  2069. if (!this.gridList.jiaorenli && this.gridList.jiaorenli != 0) {
  2070. this.$api.msg('热损伤不能为空')
  2071. return
  2072. }
  2073. if (!this.gridList.imperfectGrain) {
  2074. this.$api.msg('不完整粒不能为空')
  2075. return
  2076. }
  2077. }
  2078. }
  2079. if (this.isQY) {
  2080. if (this.typevalue == 3) {
  2081. if (!this.gridList.customerName) {
  2082. this.$api.msg('客户不能为空')
  2083. return
  2084. }
  2085. }
  2086. if (!this.gridList.carNumber) {
  2087. this.$api.msg('车牌号不能为空')
  2088. return
  2089. }
  2090. if (this.gridList.carNumber.length != 7) {
  2091. this.$api.msg('车牌号输入错误')
  2092. return
  2093. }
  2094. if (!this.gridList.goodsName) {
  2095. this.$api.msg('货名不能为空')
  2096. return
  2097. }
  2098. }
  2099. // 钎样提交
  2100. if (this.isQY && !this.isZJ) {
  2101. that.gridList.serviceManagementType = that.typevalue
  2102. uni.showModal({
  2103. content: "确定提交钎样信息?",
  2104. showCancel: true,
  2105. confirmText: '提交',
  2106. success: function(res) {
  2107. if (res.confirm) {
  2108. // 收购入库
  2109. if (that.typevalue == 3) {
  2110. uni.showLoading({
  2111. title: "加载中",
  2112. mask: true
  2113. })
  2114. that.cumulant(1)
  2115. return
  2116. }
  2117. uni.showLoading({
  2118. title: "加载中",
  2119. mask: true
  2120. })
  2121. that.gridList.inOutFlag = 2
  2122. that.inOutWarehouse(1)
  2123. }
  2124. }
  2125. })
  2126. } else {
  2127. this.gridList.brazer = 0
  2128. this.getGoodsName()
  2129. }
  2130. // // 质检提交
  2131. // if (!this.isQY && this.isZJ) {
  2132. // }
  2133. },
  2134. gradepicker(e) {
  2135. console.log(e)
  2136. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  2137. this.gridList.grade = this.gradeList[e[0]].value
  2138. this.gridList.gradeKey = this.gradeList[e[0]].key
  2139. this.waterContentChange()
  2140. },
  2141. setGoodName(e, status) {
  2142. // console.log(this.goodsList[e[0]].goodsName,111111111)
  2143. //
  2144. // [e[0]] = 0
  2145. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  2146. if (this.goodsList[e[0]].goodsName == '玉米') {
  2147. this.gridList.type = '干粮'
  2148. this.edit = true
  2149. } else if (this.goodsList[e[0]].goodsName.indexOf('潮粮') > -1) {
  2150. this.gridList.type = '潮粮'
  2151. this.edit = true
  2152. } else {
  2153. this.gridList.type = '干粮'
  2154. this.edit = false
  2155. }
  2156. var that = this
  2157. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  2158. // this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
  2159. // warehouseId: this.cangid,
  2160. // goodsName: this.gridList.goodsName
  2161. // }).then(res => {
  2162. // if (res.data.data) {
  2163. // uni.hideLoading()
  2164. // // let data = res.data.data
  2165. // // that.gridList =data
  2166. // }
  2167. // })
  2168. uni.setStorageSync('goodsName', this.gridList.goodsName)
  2169. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  2170. if (this.inType == "收购入库") { //收购入库 价格取自合同
  2171. return
  2172. }
  2173. if (!status) {
  2174. uni.showLoading({
  2175. title: '加载中',
  2176. mask: true
  2177. })
  2178. }
  2179. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  2180. warehouseId: this.cangid,
  2181. goodsName: this.gridList.goodsName
  2182. }).then(res => {
  2183. this.gridList.dryGrainPrice = res.data.data
  2184. if (!status) {
  2185. uni.hideLoading()
  2186. }
  2187. })
  2188. }
  2189. this.waterContentChange()
  2190. },
  2191. goodspicker(e) {
  2192. console.log(e)
  2193. this.setGoodName(e)
  2194. },
  2195. typepicker(e) {
  2196. var that = this
  2197. this.gridList.type = this.typeList[e[0]]
  2198. if (this.inType == "收购入库") { //收购入库 价格取自合同
  2199. return
  2200. }
  2201. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  2202. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  2203. warehouseId: this.cangid,
  2204. goodsName: this.gridList.goodsName
  2205. }).then(res => {
  2206. that.gridList.dryGrainPrice = res.data.data
  2207. })
  2208. }
  2209. },
  2210. binNumberpicker(e) {
  2211. console.log(this.warehouseList[e[0]])
  2212. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  2213. this.gridList.positionId = this.warehouseList[e[0]].id
  2214. },
  2215. del(item) {
  2216. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  2217. id: item.id
  2218. }).then(res => {
  2219. if (res.data.code == 200) {
  2220. this.$api.msg('删除成功')
  2221. } else {
  2222. this.$api.msg('系统异常,请联系管理员')
  2223. }
  2224. })
  2225. },
  2226. contactUs() {
  2227. const that = this
  2228. uni.makePhoneCall({
  2229. // 手机号
  2230. phoneNumber: '18241771147',
  2231. // 成功回调
  2232. success: (res) => {},
  2233. // 失败回调
  2234. fail: (res) => {}
  2235. });
  2236. },
  2237. loadData() {
  2238. // const that = this
  2239. // if(uni.getStorageSync("PageCur")){
  2240. // that.PageCur = uni.getStorageSync("PageCur");
  2241. // }
  2242. // that.userInfoTmp = uni.getStorageSync("userInfo")
  2243. // uni.showLoading({
  2244. // title: '正在加载',
  2245. // mask:true
  2246. // })
  2247. // that.$api.request('integral', 'getIndexData', failres => {
  2248. // that.$api.msg(failres.errmsg)
  2249. // uni.hideLoading()
  2250. // }).then(res => {
  2251. // let data = res.data
  2252. // uni.setStorageSync("message", data.message);
  2253. // uni.setStorageSync("task", data.task);
  2254. // uni.setStorageSync("contract", data.contract);
  2255. // uni.setStorageSync('showTran', data.showTran);
  2256. // that.showTran = data.showTran
  2257. // that.gridList[4].tips = data.task
  2258. // that.gridList[2].tips = data.contract
  2259. // that.companyId = data.companyId
  2260. // uni.hideLoading()
  2261. // })
  2262. },
  2263. confirm() {
  2264. const that = this
  2265. if (!that.inputContent) {
  2266. that.$api.msg('输入不能为空')
  2267. return
  2268. }
  2269. let obj = {}
  2270. obj[that.feild] = that.inputContent
  2271. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  2272. that.userInfo.nickname = that.inputContent
  2273. that.inputContent = ''
  2274. that.$store.commit('login', that.userInfo)
  2275. })
  2276. },
  2277. cancel() {
  2278. this.inputShow = false
  2279. this.inputStatus = 'none'
  2280. this.genderShow = false
  2281. },
  2282. myAccount() {
  2283. uni.navigateTo({
  2284. url: `/pageA/pages/contract`
  2285. })
  2286. },
  2287. /**
  2288. * 统一跳转接口,拦截未登录路由
  2289. * navigator标签现在默认没有转场动画,所以用view
  2290. */
  2291. navTo(url) {
  2292. if (!this.hasLogin) {
  2293. url = '/pages/public/login';
  2294. }
  2295. uni.navigateTo({
  2296. url
  2297. })
  2298. },
  2299. mycarClick(carNo) {
  2300. this.modalName = null
  2301. uni.navigateTo({
  2302. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  2303. })
  2304. },
  2305. scanCode() {
  2306. uni.scanCode({
  2307. success: function(res) {
  2308. uni.navigateTo({
  2309. url: res.result
  2310. })
  2311. }
  2312. })
  2313. },
  2314. hideModal(e) {
  2315. this.modalName = null
  2316. },
  2317. }
  2318. }
  2319. </script>
  2320. <style lang='scss' scoped>
  2321. page {
  2322. background: #F5F6FA;
  2323. }
  2324. .title_b {
  2325. margin: 20rpx 20rpx 0rpx 20rpx;
  2326. padding: 20rpx 10rpx 20rpx 10rpx;
  2327. font-size: 18px;
  2328. font-weight: 550;
  2329. }
  2330. .c-row {
  2331. display: -webkit-box;
  2332. display: -webkit-flex;
  2333. display: flex;
  2334. -webkit-box-align: center;
  2335. -webkit-align-items: center;
  2336. align-items: center;
  2337. padding: 20rpx 30rpx;
  2338. position: relative;
  2339. }
  2340. .con-list {
  2341. -webkit-box-flex: 1;
  2342. -webkit-flex: 1;
  2343. flex: 1;
  2344. display: -webkit-box;
  2345. display: -webkit-flex;
  2346. display: flex;
  2347. -webkit-box-orient: vertical;
  2348. -webkit-box-direction: normal;
  2349. -webkit-flex-direction: column;
  2350. flex-direction: column;
  2351. color: #303133;
  2352. line-height: 40rpx;
  2353. text-align: right;
  2354. padding-right: 20rpx;
  2355. }
  2356. .wrap {
  2357. padding-bottom: 10px;
  2358. font-size: 14px;
  2359. background: #fff;
  2360. margin: 10px;
  2361. border-radius: 10px;
  2362. input {
  2363. font-size: 14px;
  2364. }
  2365. >.title {
  2366. padding: 10px 16px;
  2367. }
  2368. }
  2369. .footer {
  2370. background: #fff;
  2371. position: fixed;
  2372. bottom: 0;
  2373. width: 100%;
  2374. padding: 20px 10px;
  2375. z-index: 10;
  2376. .button {
  2377. background: #22C572;
  2378. width: 90%;
  2379. margin: 20rpx auto;
  2380. padding: 10px;
  2381. color: #fff;
  2382. text-align: center;
  2383. border-radius: 30px;
  2384. }
  2385. }
  2386. .buns_item {
  2387. display: flex;
  2388. padding: 80rpx 0 50rpx 0;
  2389. justify-content: space-around;
  2390. }
  2391. .but_css {
  2392. background: #22C572;
  2393. width: 40%;
  2394. padding: 20rpx;
  2395. color: #fff;
  2396. text-align: center;
  2397. border-radius: 20rpx;
  2398. }
  2399. /deep/.u-radio-group {
  2400. flex-direction: row-reverse;
  2401. }
  2402. /deep/.u-upload .u-list-item {
  2403. background: #fff;
  2404. border: 1px dashed #ccc;
  2405. border-radius: 10rpx;
  2406. height: 190rpx !important;
  2407. width: 190rpx !important;
  2408. margin: 10rpx;
  2409. text-align: center;
  2410. display: flex;
  2411. align-items: center;
  2412. justify-content: center;
  2413. flex-direction: column;
  2414. }
  2415. /deep/.radio .u-radio__label{
  2416. margin-right:0;
  2417. }
  2418. </style>