add_quality_testing.vue 62 KB

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