add_quality_testing.vue 82 KB

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