edit_quality_testing.vue 36 KB

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