add_quality_testing.vue 77 KB

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