edit_quality_testing.vue 36 KB

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