add_quality_testing.vue 62 KB

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