edit_quality_testing.vue 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196
  1. <template>
  2. <view ref="all-input">
  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. <view v-if='gridList.serviceManagementType==1'>贸易入库</view>
  9. <view v-if='gridList.serviceManagementType==3'>收购入库</view>
  10. </view>
  11. </view>
  12. <view v-if="flag!=3" class="c-row ">
  13. <view class="title">仓库</view>
  14. <view class="con-list">
  15. {{gridList.warehouseName}}
  16. </view>
  17. </view>
  18. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  19. <view class="title">任务编号</view>
  20. <view class="con-list">
  21. <view >{{gridList.inOutTaskNo}}</view>
  22. </view>
  23. </view>
  24. <view v-if='gridList.serviceManagementType==1&&gridList.inOutType!="移库入库"&&flag!=3' class="c-row ">
  25. <view class="title">合同编号</view>
  26. <view class="con-list">
  27. {{gridList.contractNo}}
  28. </view>
  29. </view>
  30. <view v-if='gridList.serviceManagementType==1&&gridList.inOutType=="移库入库"&&flag!=3' class="c-row ">
  31. <view class="title">移库编号</view>
  32. <view class="con-list">
  33. {{gridList.contractNo}}
  34. </view>
  35. </view>
  36. <view v-if='flag!=3' class="c-row ">
  37. <view class="title">业务编号</view>
  38. <view class="con-list">
  39. {{gridList.qualityNo}}
  40. </view>
  41. </view>
  42. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  43. <view class="title">成本</view>
  44. <view class="con-list">
  45. <view v-if='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view>
  46. <view v-if='coststatus'>
  47. <input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
  48. </view>
  49. </view>
  50. <button class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
  51. </view>
  52. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  53. <view class="title">运费</view>
  54. <view class="con-list flex">
  55. <view v-if='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
  56. <view v-if='freightstatus'>
  57. <input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
  58. </view>
  59. </view>
  60. <button class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
  61. </view>
  62. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  63. <view class="title">扣款</view>
  64. <view class="con-list">
  65. <input v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
  66. </view>
  67. </view>
  68. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  69. <view class="title">入库类型</view>
  70. <view class="con-list">
  71. {{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
  72. </view>
  73. </view>
  74. <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
  75. <view class="title">入库日期</view>
  76. <view class="con-list">
  77. <view @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
  78. <u-picker @confirm='inOutDatepicker($event)' :params="params" v-model="show5"
  79. mode="time">
  80. </u-picker>
  81. </view>
  82. </view>
  83. <view v-if='gridList.serviceManagementType==3&&flag!=0' class="c-row ">
  84. <view class="title">客户</view>
  85. <view class="con-list">
  86. <view @click='gocustomer'>
  87. {{gridList.customerName}}({{gridList.customerPhone}})
  88. </view>
  89. </view>
  90. </view>
  91. <view v-if='flag!=0' class="c-row ">
  92. <view class="title">车牌号</view>
  93. <view class="con-list">
  94. <input v-model='gridList.carNumber' @click.stop="handleShowKeyboard" placeholder="请输入车牌号"
  95. name="input"></input>
  96. <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
  97. :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
  98. <!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
  99. </view>
  100. </view>
  101. <!-- <view v-if="gridList.paramType != '1'" class="c-row ">
  102. <view class="title">扣重比</view>
  103. <view class="con-list">
  104. <input :disabled='flag==1' v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
  105. name="input"></input>
  106. </view>
  107. </view>
  108. <view v-else class="c-row ">
  109. <view class="title">扣杂</view>
  110. <view class="con-list">
  111. <input :disabled='flag==1' v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂"
  112. @input="waterContentChange" name="input"></input>
  113. <input v-if='flag==0' value='未复检' disabled placeholder="复检扣杂" name="input"></input>
  114. <input v-else :disabled='flag!=1' v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂"
  115. name="input"></input>
  116. </view>
  117. </view> -->
  118. <view v-if='gridList.serviceManagementType==3&&flag!=3' class="c-row ">
  119. <view class="title">购粮性质</view>
  120. <view class="con-list">
  121. <input :disabled='flag==1' v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
  122. name="input"></input>
  123. </view>
  124. </view>
  125. <view v-if='flag!=3' class="c-row ">
  126. <view class="title">仓位号</view>
  127. <view class="con-list">
  128. <view v-if='flag!=1' @click='show=true'>{{gridList.binNumber}}</view>
  129. <view v-else>{{gridList.binNumber}}</view>
  130. </view>
  131. </view>
  132. <view v-if='flag!=3' class="c-row ">
  133. <view class="title">囤位号</view>
  134. <view class="con-list">
  135. <input v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
  136. </view>
  137. </view>
  138. <view v-if='flag!=3' class="c-row ">
  139. <view class="title">货名</view>
  140. <view class="con-list">
  141. <!-- <view v-if="flag != '0'">
  142. {{gridList.goodsName}}
  143. </view> -->
  144. <view @click='goodsName = true'>{{gridList.goodsName}}</view>
  145. <u-picker :range="goodsList" range-key="goodsName" @confirm='goodsPicker($event)'
  146. v-model="goodsName" mode="selector">
  147. </u-picker>
  148. </view>
  149. </view>
  150. <view v-if='flag!=3' class="c-row ">
  151. <view class="title">类型</view>
  152. <view class="con-list">
  153. {{gridList.type}}
  154. </view>
  155. </view>
  156. <view v-if='gridList.serviceManagementType==1' class="c-row ">
  157. <view class="title">运输方式</view>
  158. <view class="con-list">
  159. <view @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
  160. <u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
  161. mode="selector">
  162. </u-picker>
  163. </view>
  164. </view>
  165. <view v-if='gridList.serviceManagementType==3&&flag!=0' class="c-row ">
  166. <view class="title">运输方式</view>
  167. <view class="con-list">
  168. <view @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
  169. <u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)' v-model="show8"
  170. mode="selector">
  171. </u-picker>
  172. </view>
  173. </view>
  174. <view v-if='gridList.serviceManagementType==1&&flag!=3||gridList.serviceManagementType==3&&gridList.outType=="自运"&&flag!=3' class="c-row ">
  175. <view class="title">车队</view>
  176. <view class="con-list">
  177. <view @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
  178. <u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName" v-model="show5"
  179. mode="selector">
  180. </u-picker>
  181. </view>
  182. </view>
  183. <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  184. <view class="title">箱号-1</view>
  185. <view class="con-list">
  186. <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  187. </view>
  188. </view>
  189. <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  190. <view class="title">封号-1</view>
  191. <view class="con-list">
  192. <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  193. </view>
  194. </view>
  195. <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  196. <view class="title">箱号-2</view>
  197. <view class="con-list">
  198. <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  199. </view>
  200. </view>
  201. <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
  202. <view class="title">封号-2</view>
  203. <view class="con-list">
  204. <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  205. </view>
  206. </view>
  207. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  208. <view class="title">箱号-1</view>
  209. <view class="con-list">
  210. <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
  211. </view>
  212. </view>
  213. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  214. <view class="title">封号-1</view>
  215. <view class="con-list">
  216. <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
  217. </view>
  218. </view>
  219. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  220. <view class="title">箱号-2</view>
  221. <view class="con-list">
  222. <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
  223. </view>
  224. </view>
  225. <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
  226. <view class="title">封号-2</view>
  227. <view class="con-list">
  228. <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
  229. </view>
  230. </view>
  231. <view v-if="gridList.type == '潮粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
  232. <view class="title">净重单价(元/公斤)</view>
  233. <view class="con-list">
  234. <input :disabled='flag==1&&pricedisabled' v-model='gridList.tidalGrainPrice' @blur='inputprice' placeholder="自动获取,不可编辑"
  235. name="input"></input>
  236. </view>
  237. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  238. </view>
  239. <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
  240. <view class="title">干粮单价(元/公斤)</view>
  241. <view class="con-list">
  242. <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit" @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
  243. </view>
  244. <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
  245. </view>
  246. <view class="c-row-fj" v-if="flag==2||flag==1">
  247. <view style="margin: 0px 0px 30rpx 10rpx;">复检备注</view>
  248. <textarea class='textarea-style' v-model='gridList.reMemo' placeholder="请输入复检备注"
  249. maxlength="300"></textarea>
  250. </view>
  251. <view class="c-row" v-if="flag==1&&gridList.warehouseName=='鲅鱼圈金信库'">
  252. <view class="title">车型</view>
  253. <view class="con-list">
  254. <view @click='carstatus = true'>{{gridList.carModel?gridList.carModel:'请选择车型'}}</view>
  255. <u-picker :range="carModeList" range-key="constValue" @confirm='carPicker($event)'
  256. v-model="carstatus" mode="selector">
  257. </u-picker>
  258. </view>
  259. </view>
  260. <view v-if="gridList.type == '干粮'&&flag!=3" class="c-row">
  261. <view class="title">干粮单价(元/公斤)</view>
  262. <view class="con-list" @click="setPrice">
  263. {{gridList.dryGrainPrice}}
  264. </view>
  265. </view>
  266. </view>
  267. <view v-if='flag!=3' style='padding-bottom:300rpx;'>
  268. <view class='wrap'>
  269. <view style='margin-right:10px;' class='flex justify-between align-item-center'>
  270. <view class='title_b'>化验信息</view>
  271. <view v-if='flag==0||flag==4' class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572"
  272. v-model="value" @change="change"></u-switch>
  273. </view>
  274. </view>
  275. <view class="c-row ">
  276. <view class="title">等级</view>
  277. <view class="con-list">
  278. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
  279. mode="selector">
  280. </u-picker>
  281. <view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
  282. <view v-else>{{gridList.grade}}</view>
  283. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker1($event)' v-model="show2"
  284. mode="selector">
  285. </u-picker>
  286. <view v-if='flag==1' @click='show2=true'>{{gridList.reGrade?gridList.reGrade:'请选择等级'}}</view>
  287. <view v-else>{{gridList.reGrade}}</view>
  288. </view>
  289. </view>
  290. <view class="c-row ">
  291. <view class="title">水分(%)</view>
  292. <view class="con-list">
  293. <input :disabled='flag==1' v-model='gridList.waterContent' placeholder="初检水分"
  294. @input="waterContentChange" type="digit" name="input"></input>
  295. <input v-if='flag==0' value='未复检' disabled placeholder="复检水分" name="input"></input>
  296. <input :disabled='flag!=1' type="digit" v-else v-model='gridList.reWaterContent' placeholder="复检水分"
  297. name="input"></input>
  298. </view>
  299. </view>
  300. <view class="c-row ">
  301. <view class="title">容重(克/升)</view>
  302. <view class="con-list">
  303. <input :disabled='flag==1' type="digit" v-model='gridList.bulkDensity' placeholder="请输入容重"
  304. name="input"></input>
  305. <input :disabled='flag!=1' type="digit" v-model='gridList.reBulkDensity' placeholder="请输入容重"
  306. name="input"></input>
  307. </view>
  308. </view>
  309. <view class="c-row ">
  310. <view class="title">不完善粒(%)</view>
  311. <view class="con-list">
  312. <input :disabled='flag==1' type="digit" v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
  313. name="input"></input>
  314. <input :disabled='flag!=1' type="digit" v-model='gridList.reImperfectGrain' placeholder="请输入不完整粒占比"
  315. name="input"></input>
  316. </view>
  317. </view>
  318. <view class="c-row ">
  319. <view class="title">杂质(%)</view>
  320. <view class="con-list">
  321. <input :disabled='flag==1' type="digit" v-model='gridList.impurity' placeholder="请输入杂质占比"
  322. name="input"></input>
  323. <input :disabled='flag!=1' type="digit" v-model='gridList.reImpurity' placeholder="请输入杂质占比"
  324. name="input"></input>
  325. </view>
  326. </view>
  327. <view class="c-row ">
  328. <view class="title">霉变粒(%)</view>
  329. <view class="con-list">
  330. <input :disabled='flag==1' type="digit" v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
  331. name="input"></input>
  332. <input :disabled='flag!=1' type="digit" v-model='gridList.reMildewGrain' placeholder="请输入霉变粒占比"
  333. name="input"></input>
  334. </view>
  335. </view>
  336. <view class="c-row ">
  337. <view class="title">热损伤(%)</view>
  338. <view class="con-list">
  339. <input :disabled='flag==1' type="digit" v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
  340. name="input"></input>
  341. <input :disabled='flag!=1' type="digit" v-model='gridList.reJiaorenli' placeholder="请输入热损伤占比"
  342. name="input"></input>
  343. <!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
  344. </view>
  345. </view>
  346. </view>
  347. </view>
  348. <view class="footer">
  349. <view v-if='flag==1' @click='confirmInfo' class="button">确认初检信息</view>
  350. <view @click='submit' class="button">提交</view>
  351. </view>
  352. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  353. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  354. showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  355. <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
  356. <view class="buns_item">
  357. <view class="but_css" @click="print">打印小票</view>
  358. <view class="but_css" @click="close">返回</view>
  359. </view>
  360. </u-popup>
  361. <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
  362. v-model="show" mode="selector">
  363. </u-picker>
  364. </view>
  365. </template>
  366. <script>
  367. import dragButton from "@/components/drag-button/drag-button.vue";
  368. import keyboard from "@/components/master-keyboard/master-keyboard.vue";
  369. import {
  370. mapState
  371. } from 'vuex';
  372. let startY = 0,
  373. moveY = 0,
  374. pageAtTop = true;
  375. export default {
  376. components: {
  377. dragButton,
  378. keyboard
  379. },
  380. data() {
  381. return {
  382. isShowPrint: false,
  383. inputShow: false,
  384. modalName: '',
  385. mycarStyle: '',
  386. feild: undefined,
  387. id: 0,
  388. show: false,
  389. show2:false,
  390. show4:false,
  391. show5:false,
  392. show7:false,
  393. show8:false,
  394. pricedisabled:false,
  395. multiSelector1:[{name:'他运',value:'他运'}],
  396. outType:'',
  397. selector: [],
  398. show1: false,
  399. pricetext:'锁定',
  400. goodsName: false,
  401. carstatus: false,
  402. params:{year: true,
  403. month: true,
  404. day: true,},
  405. inputContent: '',
  406. multiSelector: [{
  407. name: '汽运',
  408. value: '0',
  409. },
  410. {
  411. name: '火运',
  412. value: '1',
  413. },
  414. {
  415. name: '集装箱船',
  416. value: '2',
  417. },
  418. {
  419. name: '散船',
  420. value: '3',
  421. },
  422. ],
  423. coverTransform: 'translateY(0px)',
  424. coverTransition: '0s',
  425. moving: false,
  426. footprintList: [],
  427. searchKeyWord: '',
  428. isVip: false,
  429. flag: 0,
  430. freightstatus:false,
  431. coststatus:false,
  432. freighttext:'手动填写',
  433. costtext:'手动填写',
  434. userInfoTmp: [],
  435. inputStatus: 'none',
  436. carInfo: [],
  437. gridCol: 4,
  438. pageSize: 10,
  439. currentPage: 1,
  440. gridBorder: false,
  441. headUrl: "../../static/img/myimg/YongHu@3x.png",
  442. userphone: "",
  443. username: "请更改昵称",
  444. gridList: {
  445. natureOfGrainPurchase: '贸易粮',
  446. type: '潮粮',
  447. tidalGrainPrice: '',
  448. dryGrainPrice: '',
  449. carNumber: '',
  450. carModel: '',
  451. },
  452. managementType: '',
  453. warehouseName: '',
  454. warehouseList: [],
  455. showTran: true,
  456. companyId: 1,
  457. current: 4,
  458. value: false,
  459. carModeList: [],
  460. fleetNameList:[],
  461. gradeList: [{
  462. key: 1,
  463. value: '一等品'
  464. },
  465. {
  466. key: 2,
  467. value: '二等品'
  468. },
  469. {
  470. key: 3,
  471. value: '三等品'
  472. },
  473. {
  474. key: 4,
  475. value: '等外'
  476. },
  477. ],
  478. cangid: '',
  479. goodsList: [],
  480. taskNolist:[],
  481. isShowAlert: false,
  482. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  483. }
  484. },
  485. // #ifndef MP
  486. onNavigationBarButtonTap(e) {
  487. const index = e.index;
  488. if (index === 0) {
  489. this.navTo('/pages/set/set');
  490. } else if (index === 1) {
  491. // #ifdef APP-PLUS
  492. const pages = getCurrentPages();
  493. const page = pages[pages.length - 1];
  494. const currentWebview = page.$getAppWebview();
  495. currentWebview.hideTitleNViewButtonRedDot({
  496. index
  497. });
  498. // #endif
  499. uni.navigateTo({
  500. url: '/pages/notice/notice'
  501. })
  502. }
  503. },
  504. // #endif
  505. computed: {
  506. ...mapState(['hasLogin', 'userInfo']),
  507. // 手机号中间4位加*
  508. starUserphone() {
  509. let reg = /^(\d{3})\d{4}(\d{4})$/;
  510. if (this.userphone) {
  511. return this.userphone.replace(reg, "$1****$2");
  512. }
  513. }
  514. },
  515. onLoad(options) {
  516. this.id = options.id
  517. this.flag = options.flag
  518. this.cangid = options.cangid
  519. this.warehouseName=options.warehouseName
  520. this.managementType = options.managementType
  521. console.log(this.flag)
  522. var that = this
  523. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  524. id: this.id
  525. }).then(res => {
  526. if (res.data.data) {
  527. let data = res.data.data
  528. if (data.supplementaryRecording == 1) {
  529. that.value = true
  530. } else {
  531. that.value = false
  532. }
  533. that.gridList = data
  534. if(!that.gridList.reGrade){
  535. that.gridList.reGrade=that.gridList.grade
  536. }
  537. if(!that.gridList.reWaterContent){
  538. that.gridList.reWaterContent=that.gridList.waterContent
  539. }
  540. if(!that.gridList.reBulkDensity){
  541. that.gridList.reBulkDensity=that.gridList.bulkDensity
  542. }
  543. if(!that.gridList.reImperfectGrain){
  544. that.gridList.reImperfectGrain=that.gridList.imperfectGrain
  545. }
  546. if(!that.gridList.reImpurity){
  547. that.gridList.reImpurity=that.gridList.impurity
  548. }
  549. if(!that.gridList.reMildewGrain){
  550. that.gridList.reMildewGrain=that.gridList.mildewGrain
  551. }
  552. if(!that.gridList.reJiaorenli){
  553. that.gridList.reJiaorenli=that.gridList.jiaorenli
  554. }
  555. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  556. id: this.cangid
  557. }).then(res => {
  558. that.warehouseList = res.data.data.warehousePositionInfoList
  559. })
  560. }
  561. })
  562. this.$api.doRequest('get', 'commonSysParameter/getInfo', {
  563. constId: 'QUA1'
  564. }).then(res => {
  565. if (res.data.data) {
  566. that.carModeList = res.data.data
  567. }
  568. })
  569. //质检货名下拉
  570. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  571. warehouseId: this.cangid
  572. }).then(res => {
  573. if (res.data.data) {
  574. this.goodsList = res.data.data
  575. }
  576. })
  577. this.gridList.grade = this.gradeList[0].value
  578. this.gridList.gradeKey = this.gradeList[0].key
  579. },
  580. onShow() {
  581. this.multiSelector1=[]
  582. this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  583. warehouseName:this.warehouseName
  584. }).then(res => {
  585. // console.log(res)
  586. if(res.data.data.contractManagementInfoList){
  587. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  588. res.data.data.contractMangementInfoList[i].name='自运 ('+
  589. res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
  590. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  591. }
  592. }
  593. // this.taskNolist=res.data.data
  594. })
  595. // uni.showLoading({title: '加载中'})
  596. // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  597. // flag: 2,
  598. // warehouseName:this.warehouseName
  599. // }).then(res => {
  600. // console.log(res)
  601. // uni.hideLoading();
  602. // this.taskNolist=res.data.data
  603. // })
  604. let _kh = uni.getStorageSync('isClick')
  605. if (uni.getStorageSync('checkcustomer') && _kh) {
  606. let _customerInfo = uni.getStorageSync('checkcustomer')
  607. if (_customerInfo.shipperName) {
  608. this.gridList.identityId = _customerInfo.id
  609. //点击登记客户
  610. this.gridList.customerName = _customerInfo.shipperName
  611. this.gridList.customerPhone = _customerInfo.shipperPhone
  612. this.gridList.carNumber = _customerInfo.carNo
  613. } else {
  614. //点击搜索客户
  615. this.gridList.customerName = _customerInfo.customerName
  616. this.gridList.customerPhone = _customerInfo.customerPhone
  617. }
  618. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  619. }
  620. },
  621. methods: {
  622. changeprice(){
  623. if(this.pricetext=='解锁'){
  624. this.pricedisabled=false
  625. this.pricetext='锁定'
  626. }else{
  627. this.pricedisabled=true
  628. this.pricetext='解锁'
  629. }
  630. },
  631. inputprice(){
  632. if(this.pricetext=='锁定'){
  633. this.pricedisabled=true
  634. this.pricetext='解锁'
  635. }
  636. },
  637. inOutDatepicker(e){
  638. this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
  639. console.log(e)
  640. },
  641. fleetpicker(e){
  642. this.gridList.fleet=this.fleetNameList[e[0]].fleetName
  643. },
  644. changefreight(){
  645. this.freightstatus=!this.freightstatus
  646. if(this.freightstatus){
  647. this.freighttext='自动获取'
  648. }else{
  649. this.freighttext='手动填写'
  650. }
  651. },
  652. changecost(){
  653. this.coststatus=!this.coststatus
  654. if(this.coststatus){
  655. this.costtext='自动获取'
  656. }else{
  657. this.costtext='手动填写'
  658. }
  659. },
  660. gocustomer() {
  661. uni.navigateTo({
  662. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  663. .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
  664. })
  665. },
  666. print() {
  667. uni.navigateTo({
  668. url: '/pages/erpbusiness/bleConnect'
  669. })
  670. },
  671. close() {
  672. this.isShowPrint = false
  673. uni.navigateBack({})
  674. },
  675. // focusConfig(type){
  676. // console.log('childclick',type)
  677. // // 0是上一项
  678. // if(type==0){
  679. // }else{}
  680. // },
  681. hidden() {
  682. this.$refs.keyboard.open(false)
  683. },
  684. carPicker(e) {
  685. this.gridList.carModel = this.carModeList[e[0]].constValue
  686. },
  687. handleShowKeyboard() {
  688. if (this.flag == 0) {
  689. if (this.$refs.keyboard.open) {
  690. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  691. } else {
  692. this.$refs.keyboard[0].open(true)
  693. }
  694. }
  695. },
  696. handleShowKeyboard1() {
  697. if (this.flag == 0) {
  698. if (this.$refs.keyboard1.open) {
  699. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  700. } else {
  701. this.$refs.keyboard1[0].open(true)
  702. }
  703. }
  704. },
  705. handleClick(e) {
  706. this.gridList.carNumber = e.value //键盘输入值
  707. },
  708. handleClick1(e) {
  709. this.gridList.jiaorenli = e.value //键盘输入值
  710. },
  711. change(e) {
  712. if (e) {
  713. this.gridList.supplementaryRecording = 1
  714. } else {
  715. this.gridList.supplementaryRecording = 0
  716. }
  717. },
  718. confirmInfo() {
  719. this.isShowAlert = true
  720. },
  721. alertBtn() {
  722. var that = this
  723. that.gridList.reWaterContent = that.gridList.waterContent
  724. if (that.gridList.buckleMiscellaneous) {
  725. that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
  726. }
  727. that.gridList.flag = 1
  728. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
  729. res => {
  730. if (res.data.code == "200") {
  731. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
  732. id: that.gridList.id,
  733. flag: 2
  734. }).then(res => {
  735. if (res.data.code == "200") {
  736. that.$api.msg('提交成功!')
  737. setTimeout(function() {
  738. uni.navigateBack({})
  739. }, 1000)
  740. } else {
  741. that.$api.msg('提交失败')
  742. }
  743. })
  744. } else {
  745. that.$api.msg('提交失败')
  746. }
  747. })
  748. },
  749. waterContentChange() {
  750. var that = this
  751. if (this.gridList.goodsName && this.cangid) {
  752. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  753. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  754. warehouseId: this.cangid,
  755. goodsName: this.gridList.goodsName
  756. }).then(res => {
  757. that.gridList.dryGrainPrice = res.data.data
  758. })
  759. }
  760. }
  761. if (this.gridList.goodsName) {
  762. for (var i = 0; i < this.purchasePriceList.length; i++) {
  763. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  764. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  765. this.gridList.paramType = this.purchasePriceList[i].paramType
  766. }
  767. }
  768. }
  769. var numReg = /^[0-9]*$/
  770. var numRe = new RegExp(numReg)
  771. //潮粮单价改变事件
  772. if (
  773. this.gridList.goodsName &&
  774. this.gridList.waterContent &&
  775. this.gridList.grade &&
  776. numRe.test(this.gridList.waterContent)
  777. ) {
  778. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  779. warehouseId: this.cangid,
  780. goodsName: this.gridList.goodsName,
  781. waterContent: this.gridList.waterContent,
  782. grade: this.gridList.grade,
  783. }).then(res => {
  784. if (that.gridList.paramType == '1') {
  785. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  786. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  787. .dryGrainPrice)).toFixed(4)
  788. if (!that.gridList.tidalGrainPrice) {
  789. that.gridList.tidalGrainPrice = ''
  790. }
  791. } else {
  792. that.gridList.tidalGrainPrice = res.data.data
  793. }
  794. })
  795. }
  796. },
  797. goodsPicker(e) {
  798. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  799. },
  800. submit() {
  801. this.gridList.statusFlag=1
  802. if(this.gridList.serviceManagementType==3){
  803. if(this.outType){
  804. this.gridList.outType=this.outType
  805. }
  806. }else{
  807. this.gridList.customerName = ''
  808. }
  809. this.gridList.flag = this.flag
  810. // if(this.flag==2){
  811. // this.gridList.reInspector=this.userInfo.userName
  812. // }
  813. var that = this
  814. if (!this.gridList.qualityNo) {
  815. this.$api.msg('编号不能为空')
  816. return
  817. }
  818. if (!this.gridList.binNumber) {
  819. this.$api.msg('仓位不能为空')
  820. return
  821. }
  822. if(this.gridList.serviceManagementType==3){
  823. if (!this.gridList.customerName) {
  824. this.$api.msg('客户不能为空')
  825. return
  826. }
  827. }
  828. // if (!this.gridList.storageTagNo) {
  829. // this.$api.msg('囤位号不能为空')
  830. // return
  831. // }
  832. // if (this.gridList.storageTagNo.length > 10) {
  833. // this.$api.msg('囤位号不能为空')
  834. // return
  835. // }
  836. if (!this.gridList.carNumber) {
  837. this.$api.msg('车牌号不能为空')
  838. return
  839. }
  840. if (this.gridList.carNumber.length > 7) {
  841. this.$api.msg('车牌号输入错误')
  842. return
  843. }
  844. if (!this.gridList.goodsName) {
  845. this.$api.msg('货名不能为空')
  846. return
  847. }
  848. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  849. this.gridList.buckleWeightRatio > 2) {
  850. this.$api.msg('扣重比输入错误')
  851. return
  852. }
  853. if (
  854. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  855. String(this.gridList.buckleWeightRatio).length -
  856. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  857. this.$api.msg('扣重比输入错误')
  858. return
  859. }
  860. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  861. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  862. this.$api.msg('初检扣杂输入错误')
  863. return
  864. }
  865. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  866. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  867. this.$api.msg('复检扣杂输入错误')
  868. return
  869. }
  870. if (!this.gridList.type) {
  871. this.$api.msg('类型不能为空')
  872. return
  873. }
  874. if (this.value == false || this.flag == 2) {
  875. if (!this.gridList.grade) {
  876. this.$api.msg('等级不能为空')
  877. return
  878. }
  879. if (!this.gridList.impurity) {
  880. this.$api.msg('杂质不能为空')
  881. return
  882. }
  883. if (!this.gridList.waterContent) {
  884. this.$api.msg('初检水分不能为空')
  885. return
  886. }
  887. // if (!this.gridList.reWaterContent) {
  888. // this.$api.msg('复检水分不能为空')
  889. // return
  890. // }
  891. if (!this.gridList.mildewGrain) {
  892. this.$api.msg('霉变粒不能为空')
  893. return
  894. }
  895. if (!this.gridList.bulkDensity) {
  896. this.$api.msg('容重不能为空')
  897. return
  898. }
  899. if (!this.gridList.jiaorenli) {
  900. this.$api.msg('热损伤不能为空')
  901. return
  902. }
  903. if (!this.gridList.imperfectGrain) {
  904. this.$api.msg('不完整粒不能为空')
  905. return
  906. }
  907. }
  908. this.gridList.storageNumber = this.gridList.storageTagNo
  909. that.gridList.warehouseInOutDetail={
  910. id:that.gridList.warehouseInOutId,
  911. grade:that.gridList.grade,
  912. reGrade:that.gridList.grade,
  913. waterContent:that.gridList.waterContent,
  914. reWaterContent:that.gridList.reWaterContent,
  915. imperfectGrain:that.gridList.imperfectGrain,
  916. reImperfectGrain:that.gridList.reImperfectGrain,
  917. impurity:that.gridList.impurity,
  918. reImpurity:that.gridList.reImpurity,
  919. jiaorenli:that.gridList.jiaorenli,
  920. reJiaorenli:that.gridList.reJiaorenli,
  921. bulkDensity:that.gridList.bulkDensity,
  922. reBulkDensity:that.gridList.reBulkDensity,
  923. mildewGrain:that.gridList.mildewGrain,
  924. reMildewGrain:that.gridList.reMildewGrain,
  925. }
  926. uni.showModal({
  927. content: "确定提交质检信息?",
  928. showCancel: true,
  929. confirmText: '提交',
  930. success: function(res) {
  931. if (res.confirm) {
  932. that.$api.doRequest('post',
  933. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  934. .then(res => {
  935. that.$api.doRequest('post',
  936. '/warehouseInOutInfo/InOutWarehouse',
  937. that.gridList)
  938. .then(res => {
  939. if (res.data.code == 200) {
  940. that.$api.msg('编辑质检成功')
  941. that.gridList.warehouseId = that.cangid
  942. uni.setStorageSync("quality_print", that.gridList)
  943. console.log('that.gridList', that.gridList)
  944. that.isShowPrint = true
  945. // uni.getStorageSync("depotAcquisition_warehouseName")
  946. // uni.navigateBack({})
  947. }
  948. })
  949. })
  950. }
  951. }
  952. })
  953. },
  954. gradepicker(e) {
  955. console.log(e)
  956. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  957. this.gridList.grade = this.gradeList[e[0]].value
  958. this.gridList.gradeKey = this.gradeList[e[0]].key
  959. this.waterContentChange()
  960. },
  961. gradepicker1(e) {
  962. console.log(e)
  963. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  964. this.gridList.reGrade = this.gradeList[e[0]].value
  965. this.gridList.reGradeKey = this.gradeList[e[0]].key
  966. },
  967. binNumberpicker(e) {
  968. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  969. },
  970. del(item) {
  971. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  972. id: item.id
  973. }).then(res => {
  974. if (res.data.code == 200) {
  975. this.$api.msg('删除成功')
  976. } else {
  977. this.$api.msg('系统异常,请联系管理员')
  978. }
  979. })
  980. },
  981. contactUs() {
  982. const that = this
  983. uni.makePhoneCall({
  984. // 手机号
  985. phoneNumber: '18241771147',
  986. // 成功回调
  987. success: (res) => {},
  988. // 失败回调
  989. fail: (res) => {}
  990. });
  991. },
  992. loadData() {
  993. // const that = this
  994. // if(uni.getStorageSync("PageCur")){
  995. // that.PageCur = uni.getStorageSync("PageCur");
  996. // }
  997. // that.userInfoTmp = uni.getStorageSync("userInfo")
  998. // uni.showLoading({
  999. // title: '正在加载',
  1000. // mask:true
  1001. // })
  1002. // that.$api.request('integral', 'getIndexData', failres => {
  1003. // that.$api.msg(failres.errmsg)
  1004. // uni.hideLoading()
  1005. // }).then(res => {
  1006. // let data = res.data
  1007. // uni.setStorageSync("message", data.message);
  1008. // uni.setStorageSync("task", data.task);
  1009. // uni.setStorageSync("contract", data.contract);
  1010. // uni.setStorageSync('showTran', data.showTran);
  1011. // that.showTran = data.showTran
  1012. // that.gridList[4].tips = data.task
  1013. // that.gridList[2].tips = data.contract
  1014. // that.companyId = data.companyId
  1015. // uni.hideLoading()
  1016. // })
  1017. },
  1018. confirm() {
  1019. const that = this
  1020. if (!that.inputContent) {
  1021. that.$api.msg('输入不能为空')
  1022. return
  1023. }
  1024. let obj = {}
  1025. obj[that.feild] = that.inputContent
  1026. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1027. that.userInfo.nickname = that.inputContent
  1028. that.inputContent = ''
  1029. that.$store.commit('login', that.userInfo)
  1030. })
  1031. },
  1032. cancel() {
  1033. this.inputShow = false
  1034. this.inputStatus = 'none'
  1035. this.genderShow = false
  1036. },
  1037. myAccount() {
  1038. uni.navigateTo({
  1039. url: `/pageA/pages/contract`
  1040. })
  1041. },
  1042. /**
  1043. * 统一跳转接口,拦截未登录路由
  1044. * navigator标签现在默认没有转场动画,所以用view
  1045. */
  1046. navTo(url) {
  1047. if (!this.hasLogin) {
  1048. url = '/pages/public/login';
  1049. }
  1050. uni.navigateTo({
  1051. url
  1052. })
  1053. },
  1054. mycarClick(carNo) {
  1055. this.modalName = null
  1056. uni.navigateTo({
  1057. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1058. })
  1059. },
  1060. scanCode() {
  1061. uni.scanCode({
  1062. success: function(res) {
  1063. uni.navigateTo({
  1064. url: res.result
  1065. })
  1066. }
  1067. })
  1068. },
  1069. hideModal(e) {
  1070. this.modalName = null
  1071. },
  1072. }
  1073. }
  1074. </script>
  1075. <style lang='scss' scoped>
  1076. .title_b {
  1077. margin: 20rpx 20rpx 0rpx 20rpx;
  1078. padding: 20rpx 10rpx 20rpx 10rpx;
  1079. font-size: 18px;
  1080. font-weight: 550;
  1081. }
  1082. page {
  1083. background: #F5F6FA;
  1084. }
  1085. .wrap {
  1086. padding-bottom: 10px;
  1087. font-size: 14px;
  1088. background: #fff;
  1089. margin: 10px;
  1090. border-radius: 10px;
  1091. input {
  1092. font-size: 14px;
  1093. }
  1094. >.title {
  1095. padding: 10px 16px;
  1096. }
  1097. .b-b:after {
  1098. border-bottom: 1px solid #eee;
  1099. }
  1100. }
  1101. .footer {
  1102. background: #fff;
  1103. position: fixed;
  1104. bottom: 0;
  1105. width: 100%;
  1106. padding: 20px 10px;
  1107. z-index: 10;
  1108. .button {
  1109. background: #22C572;
  1110. width: 90%;
  1111. margin: 20rpx auto;
  1112. padding: 10px;
  1113. color: #fff;
  1114. text-align: center;
  1115. border-radius: 30px;
  1116. }
  1117. }
  1118. .c-row {
  1119. display: -webkit-box;
  1120. display: -webkit-flex;
  1121. display: flex;
  1122. -webkit-box-align: center;
  1123. -webkit-align-items: center;
  1124. align-items: center;
  1125. padding: 20rpx 30rpx;
  1126. position: relative;
  1127. }
  1128. .con-list {
  1129. -webkit-box-flex: 1;
  1130. -webkit-flex: 1;
  1131. flex: 1;
  1132. display: -webkit-box;
  1133. display: -webkit-flex;
  1134. display: flex;
  1135. -webkit-box-orient: vertical;
  1136. -webkit-box-direction: normal;
  1137. -webkit-flex-direction: column;
  1138. flex-direction: column;
  1139. color: #303133;
  1140. line-height: 40rpx;
  1141. text-align: right;
  1142. padding-right: 20rpx;
  1143. }
  1144. input:disabled {
  1145. color: #ccc;
  1146. }
  1147. .textarea-style {
  1148. border: 1px solid #EEEEEE;
  1149. width: 100%;
  1150. padding: 20rpx;
  1151. border-radius: 20rpx;
  1152. }
  1153. .c-row-fj {
  1154. padding: 20rpx
  1155. }
  1156. .buns_item {
  1157. display: flex;
  1158. padding: 80rpx 0 50rpx 0;
  1159. justify-content: space-around;
  1160. }
  1161. .but_css {
  1162. background: #22C572;
  1163. width: 40%;
  1164. padding: 20rpx;
  1165. color: #fff;
  1166. text-align: center;
  1167. border-radius: 20rpx;
  1168. }
  1169. </style>