add_quality_testing.vue 61 KB

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