add_quality_testing.vue 80 KB

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