add_quality_testing.vue 66 KB

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