add_quality_testing.vue 76 KB

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