add_quality_testing.vue 63 KB

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