add_quality_testing.vue 88 KB

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