add_quality_testing.vue 83 KB

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