add_quality_testing.vue 82 KB

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