add_quality_testing.vue 84 KB

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