add_quality_testing.vue 45 KB

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