edit_quality_testing.vue 37 KB

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