add_quality_testing.vue 82 KB

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