add_quality_testing.vue 84 KB

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