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