edit_quality_testing.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  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' 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" name="input"></input>
  290. <input v-if='flag==0' value='未复检' disabled placeholder="复检水分" name="input"></input>
  291. <input :disabled='flag!=1' 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' v-model='gridList.bulkDensity' placeholder="请输入容重"
  299. name="input"></input>
  300. <input :disabled='flag!=1' 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' v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
  308. name="input"></input>
  309. <input :disabled='flag!=1' 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' v-model='gridList.impurity' placeholder="请输入杂质占比"
  317. name="input"></input>
  318. <input :disabled='flag!=1' 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' v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
  326. name="input"></input>
  327. <input :disabled='flag!=1' 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' v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
  335. name="input"></input>
  336. <input :disabled='flag!=1' 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. that.gridList.reGrade=that.gridList.grade
  525. that.gridList.reWaterContent=that.gridList.waterContent
  526. that.gridList.reBulkDensity=that.gridList.bulkDensity
  527. that.gridList.reImperfectGrain=that.gridList.imperfectGrain
  528. that.gridList.reImpurity=that.gridList.impurity
  529. that.gridList.reMildewGrain=that.gridList.mildewGrain
  530. that.gridList.reJiaorenli=that.gridList.jiaorenli
  531. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  532. id: this.cangid
  533. }).then(res => {
  534. that.warehouseList = res.data.data.warehousePositionInfoList
  535. })
  536. }
  537. })
  538. this.$api.doRequest('get', 'commonSysParameter/getInfo', {
  539. constId: 'QUA1'
  540. }).then(res => {
  541. if (res.data.data) {
  542. that.carModeList = res.data.data
  543. }
  544. })
  545. //质检货名下拉
  546. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  547. warehouseId: this.cangid
  548. }).then(res => {
  549. if (res.data.data) {
  550. this.goodsList = res.data.data
  551. }
  552. })
  553. this.gridList.grade = this.gradeList[0].value
  554. this.gridList.gradeKey = this.gradeList[0].key
  555. },
  556. onShow() {
  557. this.multiSelector1=[]
  558. this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
  559. warehouseName:this.warehouseName
  560. }).then(res => {
  561. // console.log(res)
  562. if(res.data.data.contractManagementInfoList){
  563. for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
  564. res.data.data.contractMangementInfoList[i].name='自运 ('+
  565. res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
  566. this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
  567. }
  568. }
  569. // this.taskNolist=res.data.data
  570. })
  571. // uni.showLoading({title: '加载中'})
  572. // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
  573. // flag: 2,
  574. // warehouseName:this.warehouseName
  575. // }).then(res => {
  576. // console.log(res)
  577. // uni.hideLoading();
  578. // this.taskNolist=res.data.data
  579. // })
  580. let _kh = uni.getStorageSync('isClick')
  581. if (uni.getStorageSync('checkcustomer') && _kh) {
  582. let _customerInfo = uni.getStorageSync('checkcustomer')
  583. if (_customerInfo.shipperName) {
  584. this.gridList.identityId = _customerInfo.id
  585. //点击登记客户
  586. this.gridList.customerName = _customerInfo.shipperName
  587. this.gridList.customerPhone = _customerInfo.shipperPhone
  588. this.gridList.carNumber = _customerInfo.carNo
  589. } else {
  590. //点击搜索客户
  591. this.gridList.customerName = _customerInfo.customerName
  592. this.gridList.customerPhone = _customerInfo.customerPhone
  593. }
  594. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  595. }
  596. },
  597. methods: {
  598. inOutDatepicker(e){
  599. this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
  600. console.log(e)
  601. },
  602. fleetpicker(e){
  603. this.gridList.fleet=this.fleetNameList[e[0]].fleetName
  604. },
  605. changefreight(){
  606. this.freightstatus=!this.freightstatus
  607. if(this.freightstatus){
  608. this.freighttext='自动获取'
  609. }else{
  610. this.freighttext='手动填写'
  611. }
  612. },
  613. changecost(){
  614. this.coststatus=!this.coststatus
  615. if(this.coststatus){
  616. this.costtext='自动获取'
  617. }else{
  618. this.costtext='手动填写'
  619. }
  620. },
  621. gocustomer() {
  622. uni.navigateTo({
  623. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
  624. .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
  625. })
  626. },
  627. print() {
  628. uni.navigateTo({
  629. url: '/pages/erpbusiness/bleConnect'
  630. })
  631. },
  632. close() {
  633. this.isShowPrint = false
  634. uni.navigateBack({})
  635. },
  636. // focusConfig(type){
  637. // console.log('childclick',type)
  638. // // 0是上一项
  639. // if(type==0){
  640. // }else{}
  641. // },
  642. hidden() {
  643. this.$refs.keyboard.open(false)
  644. },
  645. carPicker(e) {
  646. this.gridList.carModel = this.carModeList[e[0]].constValue
  647. },
  648. handleShowKeyboard() {
  649. if (this.flag == 0) {
  650. if (this.$refs.keyboard.open) {
  651. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  652. } else {
  653. this.$refs.keyboard[0].open(true)
  654. }
  655. }
  656. },
  657. handleShowKeyboard1() {
  658. if (this.flag == 0) {
  659. if (this.$refs.keyboard1.open) {
  660. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  661. } else {
  662. this.$refs.keyboard1[0].open(true)
  663. }
  664. }
  665. },
  666. handleClick(e) {
  667. this.gridList.carNumber = e.value //键盘输入值
  668. },
  669. handleClick1(e) {
  670. this.gridList.jiaorenli = e.value //键盘输入值
  671. },
  672. change(e) {
  673. if (e) {
  674. this.gridList.supplementaryRecording = 1
  675. } else {
  676. this.gridList.supplementaryRecording = 0
  677. }
  678. },
  679. confirmInfo() {
  680. this.isShowAlert = true
  681. },
  682. alertBtn() {
  683. var that = this
  684. that.gridList.reWaterContent = that.gridList.waterContent
  685. if (that.gridList.buckleMiscellaneous) {
  686. that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
  687. }
  688. that.gridList.flag = 1
  689. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
  690. res => {
  691. if (res.data.code == "200") {
  692. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
  693. id: that.gridList.id,
  694. flag: 2
  695. }).then(res => {
  696. if (res.data.code == "200") {
  697. that.$api.msg('提交成功!')
  698. setTimeout(function() {
  699. uni.navigateBack({})
  700. }, 1000)
  701. } else {
  702. that.$api.msg('提交失败')
  703. }
  704. })
  705. } else {
  706. that.$api.msg('提交失败')
  707. }
  708. })
  709. },
  710. waterContentChange() {
  711. var that = this
  712. if (this.gridList.goodsName && this.cangid) {
  713. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  714. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  715. warehouseId: this.cangid,
  716. goodsName: this.gridList.goodsName
  717. }).then(res => {
  718. that.gridList.dryGrainPrice = res.data.data
  719. })
  720. }
  721. }
  722. if (this.gridList.goodsName) {
  723. for (var i = 0; i < this.purchasePriceList.length; i++) {
  724. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  725. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  726. this.gridList.paramType = this.purchasePriceList[i].paramType
  727. }
  728. }
  729. }
  730. var numReg = /^[0-9]*$/
  731. var numRe = new RegExp(numReg)
  732. //潮粮单价改变事件
  733. if (
  734. this.gridList.goodsName &&
  735. this.gridList.waterContent &&
  736. this.gridList.grade &&
  737. numRe.test(this.gridList.waterContent)
  738. ) {
  739. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  740. warehouseId: this.cangid,
  741. goodsName: this.gridList.goodsName,
  742. waterContent: this.gridList.waterContent,
  743. grade: this.gridList.grade,
  744. }).then(res => {
  745. if (that.gridList.paramType == '1') {
  746. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  747. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  748. .dryGrainPrice)).toFixed(4)
  749. if (!that.gridList.tidalGrainPrice) {
  750. that.gridList.tidalGrainPrice = ''
  751. }
  752. } else {
  753. that.gridList.tidalGrainPrice = res.data.data
  754. }
  755. })
  756. }
  757. },
  758. goodsPicker(e) {
  759. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  760. },
  761. submit() {
  762. this.gridList.statusFlag=1
  763. if(this.gridList.serviceManagementType==3){
  764. if(this.outType){
  765. this.gridList.outType=this.outType
  766. }
  767. }
  768. this.gridList.flag = this.flag
  769. // if(this.flag==2){
  770. // this.gridList.reInspector=this.userInfo.userName
  771. // }
  772. var that = this
  773. if (!this.gridList.qualityNo) {
  774. this.$api.msg('编号不能为空')
  775. return
  776. }
  777. if (!this.gridList.binNumber) {
  778. this.$api.msg('仓位不能为空')
  779. return
  780. }
  781. if(this.gridList.s==3){
  782. if (!this.gridList.customerName) {
  783. this.$api.msg('客户不能为空')
  784. return
  785. }
  786. }
  787. if (!this.gridList.storageTagNo) {
  788. this.$api.msg('囤位号不能为空')
  789. return
  790. }
  791. if (this.gridList.storageTagNo.length > 10) {
  792. this.$api.msg('囤位号不能为空')
  793. return
  794. }
  795. if (!this.gridList.carNumber) {
  796. this.$api.msg('车牌号不能为空')
  797. return
  798. }
  799. if (this.gridList.carNumber.length > 7) {
  800. this.$api.msg('车牌号输入错误')
  801. return
  802. }
  803. if (!this.gridList.goodsName) {
  804. this.$api.msg('货名不能为空')
  805. return
  806. }
  807. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  808. this.gridList.buckleWeightRatio > 2) {
  809. this.$api.msg('扣重比输入错误')
  810. return
  811. }
  812. if (
  813. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  814. String(this.gridList.buckleWeightRatio).length -
  815. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  816. this.$api.msg('扣重比输入错误')
  817. return
  818. }
  819. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  820. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  821. this.$api.msg('初检扣杂输入错误')
  822. return
  823. }
  824. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  825. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  826. this.$api.msg('复检扣杂输入错误')
  827. return
  828. }
  829. if (!this.gridList.type) {
  830. this.$api.msg('类型不能为空')
  831. return
  832. }
  833. if (this.value == false || this.flag == 2) {
  834. if (!this.gridList.grade) {
  835. this.$api.msg('等级不能为空')
  836. return
  837. }
  838. if (!this.gridList.impurity) {
  839. this.$api.msg('杂质不能为空')
  840. return
  841. }
  842. if (!this.gridList.waterContent) {
  843. this.$api.msg('初检水分不能为空')
  844. return
  845. }
  846. // if (!this.gridList.reWaterContent) {
  847. // this.$api.msg('复检水分不能为空')
  848. // return
  849. // }
  850. if (!this.gridList.mildewGrain) {
  851. this.$api.msg('霉变粒不能为空')
  852. return
  853. }
  854. if (!this.gridList.bulkDensity) {
  855. this.$api.msg('容重不能为空')
  856. return
  857. }
  858. if (!this.gridList.jiaorenli) {
  859. this.$api.msg('热损伤不能为空')
  860. return
  861. }
  862. if (!this.gridList.imperfectGrain) {
  863. this.$api.msg('不完整粒不能为空')
  864. return
  865. }
  866. }
  867. this.gridList.storageNumber = this.gridList.storageTagNo
  868. that.gridList.warehouseInOutDetail={
  869. id:that.gridList.warehouseInOutId,
  870. grade:that.gridList.grade,
  871. reGrade:that.gridList.grade,
  872. waterContent:that.gridList.waterContent,
  873. reWaterContent:that.gridList.reWaterContent,
  874. imperfectGrain:that.gridList.imperfectGrain,
  875. reImperfectGrain:that.gridList.reImperfectGrain,
  876. impurity:that.gridList.impurity,
  877. reImpurity:that.gridList.reImpurity,
  878. jiaorenli:that.gridList.jiaorenli,
  879. reJiaorenli:that.gridList.reJiaorenli,
  880. bulkDensity:that.gridList.bulkDensity,
  881. reBulkDensity:that.gridList.reBulkDensity,
  882. mildewGrain:that.gridList.mildewGrain,
  883. reMildewGrain:that.gridList.reMildewGrain,
  884. }
  885. uni.showModal({
  886. content: "确定提交质检信息?",
  887. showCancel: true,
  888. confirmText: '提交',
  889. success: function(res) {
  890. if (res.confirm) {
  891. that.$api.doRequest('post',
  892. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  893. .then(res => {
  894. that.$api.doRequest('post',
  895. '/warehouseInOutInfo/InOutWarehouse',
  896. that.gridList)
  897. .then(res => {
  898. if (res.data.code == 200) {
  899. that.$api.msg('编辑质检成功')
  900. that.gridList.warehouseId = that.cangid
  901. uni.setStorageSync("quality_print", that.gridList)
  902. console.log('that.gridList', that.gridList)
  903. that.isShowPrint = true
  904. // uni.getStorageSync("depotAcquisition_warehouseName")
  905. // uni.navigateBack({})
  906. }
  907. })
  908. })
  909. }
  910. }
  911. })
  912. },
  913. gradepicker(e) {
  914. console.log(e)
  915. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  916. this.gridList.grade = this.gradeList[e[0]].value
  917. this.gridList.gradeKey = this.gradeList[e[0]].key
  918. this.waterContentChange()
  919. },
  920. gradepicker1(e) {
  921. console.log(e)
  922. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  923. this.gridList.reGrade = this.gradeList[e[0]].value
  924. this.gridList.reGradeKey = this.gradeList[e[0]].key
  925. },
  926. binNumberpicker(e) {
  927. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  928. },
  929. del(item) {
  930. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  931. id: item.id
  932. }).then(res => {
  933. if (res.data.code == 200) {
  934. this.$api.msg('删除成功')
  935. } else {
  936. this.$api.msg('系统异常,请联系管理员')
  937. }
  938. })
  939. },
  940. contactUs() {
  941. const that = this
  942. uni.makePhoneCall({
  943. // 手机号
  944. phoneNumber: '18241771147',
  945. // 成功回调
  946. success: (res) => {},
  947. // 失败回调
  948. fail: (res) => {}
  949. });
  950. },
  951. loadData() {
  952. // const that = this
  953. // if(uni.getStorageSync("PageCur")){
  954. // that.PageCur = uni.getStorageSync("PageCur");
  955. // }
  956. // that.userInfoTmp = uni.getStorageSync("userInfo")
  957. // uni.showLoading({
  958. // title: '正在加载',
  959. // mask:true
  960. // })
  961. // that.$api.request('integral', 'getIndexData', failres => {
  962. // that.$api.msg(failres.errmsg)
  963. // uni.hideLoading()
  964. // }).then(res => {
  965. // let data = res.data
  966. // uni.setStorageSync("message", data.message);
  967. // uni.setStorageSync("task", data.task);
  968. // uni.setStorageSync("contract", data.contract);
  969. // uni.setStorageSync('showTran', data.showTran);
  970. // that.showTran = data.showTran
  971. // that.gridList[4].tips = data.task
  972. // that.gridList[2].tips = data.contract
  973. // that.companyId = data.companyId
  974. // uni.hideLoading()
  975. // })
  976. },
  977. confirm() {
  978. const that = this
  979. if (!that.inputContent) {
  980. that.$api.msg('输入不能为空')
  981. return
  982. }
  983. let obj = {}
  984. obj[that.feild] = that.inputContent
  985. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  986. that.userInfo.nickname = that.inputContent
  987. that.inputContent = ''
  988. that.$store.commit('login', that.userInfo)
  989. })
  990. },
  991. cancel() {
  992. this.inputShow = false
  993. this.inputStatus = 'none'
  994. this.genderShow = false
  995. },
  996. myAccount() {
  997. uni.navigateTo({
  998. url: `/pageA/pages/contract`
  999. })
  1000. },
  1001. /**
  1002. * 统一跳转接口,拦截未登录路由
  1003. * navigator标签现在默认没有转场动画,所以用view
  1004. */
  1005. navTo(url) {
  1006. if (!this.hasLogin) {
  1007. url = '/pages/public/login';
  1008. }
  1009. uni.navigateTo({
  1010. url
  1011. })
  1012. },
  1013. mycarClick(carNo) {
  1014. this.modalName = null
  1015. uni.navigateTo({
  1016. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1017. })
  1018. },
  1019. scanCode() {
  1020. uni.scanCode({
  1021. success: function(res) {
  1022. uni.navigateTo({
  1023. url: res.result
  1024. })
  1025. }
  1026. })
  1027. },
  1028. hideModal(e) {
  1029. this.modalName = null
  1030. },
  1031. }
  1032. }
  1033. </script>
  1034. <style lang='scss' scoped>
  1035. .title_b {
  1036. margin: 20rpx 20rpx 0rpx 20rpx;
  1037. padding: 20rpx 10rpx 20rpx 10rpx;
  1038. font-size: 18px;
  1039. font-weight: 550;
  1040. }
  1041. page {
  1042. background: #F5F6FA;
  1043. }
  1044. .wrap {
  1045. padding-bottom: 10px;
  1046. font-size: 14px;
  1047. background: #fff;
  1048. margin: 10px;
  1049. border-radius: 10px;
  1050. input {
  1051. font-size: 14px;
  1052. }
  1053. >.title {
  1054. padding: 10px 16px;
  1055. }
  1056. .b-b:after {
  1057. border-bottom: 1px solid #eee;
  1058. }
  1059. }
  1060. .footer {
  1061. background: #fff;
  1062. position: fixed;
  1063. bottom: 0;
  1064. width: 100%;
  1065. padding: 20px 10px;
  1066. z-index: 10;
  1067. .button {
  1068. background: #22C572;
  1069. width: 90%;
  1070. margin: 20rpx auto;
  1071. padding: 10px;
  1072. color: #fff;
  1073. text-align: center;
  1074. border-radius: 30px;
  1075. }
  1076. }
  1077. .c-row {
  1078. display: -webkit-box;
  1079. display: -webkit-flex;
  1080. display: flex;
  1081. -webkit-box-align: center;
  1082. -webkit-align-items: center;
  1083. align-items: center;
  1084. padding: 20rpx 30rpx;
  1085. position: relative;
  1086. }
  1087. .con-list {
  1088. -webkit-box-flex: 1;
  1089. -webkit-flex: 1;
  1090. flex: 1;
  1091. display: -webkit-box;
  1092. display: -webkit-flex;
  1093. display: flex;
  1094. -webkit-box-orient: vertical;
  1095. -webkit-box-direction: normal;
  1096. -webkit-flex-direction: column;
  1097. flex-direction: column;
  1098. color: #303133;
  1099. line-height: 40rpx;
  1100. text-align: right;
  1101. padding-right: 20rpx;
  1102. }
  1103. input:disabled {
  1104. color: #ccc;
  1105. }
  1106. .textarea-style {
  1107. border: 1px solid #EEEEEE;
  1108. width: 100%;
  1109. padding: 20rpx;
  1110. border-radius: 20rpx;
  1111. }
  1112. .c-row-fj {
  1113. padding: 20rpx
  1114. }
  1115. .buns_item {
  1116. display: flex;
  1117. padding: 80rpx 0 50rpx 0;
  1118. justify-content: space-around;
  1119. }
  1120. .but_css {
  1121. background: #22C572;
  1122. width: 40%;
  1123. padding: 20rpx;
  1124. color: #fff;
  1125. text-align: center;
  1126. border-radius: 20rpx;
  1127. }
  1128. </style>