add_quality_testing.vue 84 KB

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