add_quality_testing.vue 61 KB

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