add_quality_testing.vue 68 KB

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