add_quality_testing.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412
  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])
  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. console.log(res)
  648. if(res.data.data){
  649. console.log(res.data.data)
  650. uni.hideLoading();
  651. }
  652. this.contractNolist=res.data.data
  653. })
  654. if (uni.getStorageSync('checkcustomer')) {
  655. let _customerInfo = uni.getStorageSync('checkcustomer')
  656. if (_customerInfo.shipperName) {
  657. this.gridList.identityId = _customerInfo.id
  658. //点击登记客户
  659. this.gridList.customerName = _customerInfo.shipperName
  660. this.gridList.customerPhone = _customerInfo.shipperPhone
  661. this.gridList.carNumber=_customerInfo.carNo
  662. } else {
  663. //点击搜索客户
  664. this.gridList.customerName = _customerInfo.customerName
  665. this.gridList.customerPhone = _customerInfo.customerPhone
  666. }
  667. this.gridList.customerNumberCard = _customerInfo.customerNumberCard
  668. }
  669. },
  670. methods: {
  671. changeprice(){
  672. if(this.pricetext='解锁'){
  673. this.pricedisabled=false
  674. this.pricetext='锁定'
  675. }else{
  676. this.pricedisabled=true
  677. this.pricetext='解锁'
  678. }
  679. },
  680. inputprice(){
  681. if(this.pricetext='锁定'){
  682. this.pricedisabled=true
  683. this.pricetext='解锁'
  684. }
  685. },
  686. groupChange(e){
  687. console.log(e)
  688. this.gridList.serviceManagementType=e
  689. if(e==1){
  690. this.gridList.qualityNo=''
  691. }else{
  692. let number = '000' + this.warehouseCount
  693. number = number.substring(number.length - 4, number.length)
  694. this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
  695. }
  696. },
  697. outtypepicker(e,status){
  698. if(status==0){
  699. this.gridList.outType=this.multiSelector[e[0]].name
  700. }else{
  701. if(this.multiSelector[e[0]].name=='他运'){
  702. this.goodsdisabled=false
  703. this.gridList.outType=this.multiSelector1[e[0]].name
  704. }else{
  705. this.gridList.outType='自运'
  706. this.goodsdisabled=true
  707. this.outType=this.multiSelector[e[0]].name
  708. this.gridList.contractNo=this.multiSelector1[i].contractNo
  709. for (let i = 0; i < this.contractNolist.length; i++) {
  710. if(this.gridList.contractNo==this.contractNolist[i].contractNo){
  711. this.gridList.goodsName=this.outContractNo[q].goodsName
  712. this.gridList.goodsNameKey=this.outContractNo[q].goodsNameKey
  713. }
  714. }
  715. this.waterContentChange()
  716. }
  717. }
  718. console.log(this.gridList.outType)
  719. },
  720. changefreight(){
  721. this.freightstatus=!this.freightstatus
  722. if(this.freightstatus){
  723. this.freighttext='自动获取'
  724. }else{
  725. this.freighttext='手动填写'
  726. }
  727. },
  728. changecost(){
  729. this.coststatus=!this.coststatus
  730. if(this.coststatus){
  731. this.costtext='自动获取'
  732. }else{
  733. this.costtext='手动填写'
  734. }
  735. },
  736. inOutDatepicker(e){
  737. this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
  738. console.log(e)
  739. },
  740. fleetpicker(e){
  741. this.gridList.fleet=this.fleetNameList[e[0]].fleetName
  742. },
  743. change(e){
  744. if(e){
  745. this.gridList.supplementaryRecording=1
  746. }else{
  747. this.gridList.supplementaryRecording=0
  748. }
  749. },
  750. tasknopicker(e){
  751. console.log(e)
  752. this.gridList.inOutTaskNo=this.taskNolist[e[0]].inOutTaskNo
  753. var data = this.taskNolist[e[0]]
  754. if (this.taskNolist[e[0]].contractNo) {
  755. this.gridList.contractNo = this.taskNolist[e[0]].contractNo
  756. }else {
  757. this.gridList.contractNo = this.taskNolist[e[0]].moveTaskNo
  758. }
  759. for (let i = 0; i < this.contractNolist.length; i++) {
  760. console.log(this.gridList.contractNo,this.contractNolist[i].contractNo,this.gridList.contractNo==this.contractNolist[i].contractNo)
  761. if(this.gridList.contractNo==this.contractNolist[i].contractNo){
  762. this.gridList.goodsName = this.contractNolist[i].goodsName
  763. this.gridList.goodsNameKey = this.contractNolist[i].goodsNameKey
  764. this.gridList.grade = this.contractNolist[i].grade
  765. this.gridList.inOutType = this.contractNolist[i].inOutType
  766. if(this.gridList.inOutType=='采购入库'){
  767. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  768. this.gridList.qualityNo='CGRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  769. if (!this.contractNolist[i].unitContractPrice) {
  770. this.gridList.tips = '卖方' + this.contractNolist[i].seller
  771. } else {
  772. this.gridList.tips ='卖方' +this.contractNolist[i].seller +'( ' + this.contractNolist[i].unitContractPrice +'元/吨)'
  773. }
  774. this.gridList.inOutTypeKey = 1
  775. }else if(this.gridList.inOutType=='移库入库'){
  776. this.warehouseTradeCount = '000' + this.warehouseTradeCount
  777. this.gridList.qualityNo='YKRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
  778. if (this.contractNolist[i].unitContractPrice) {
  779. this.gridList.tips ='出货库' +data.sendWarehouse +' (' +this.contractNolist[i].unitContractPrice +'元/吨)'
  780. } else {
  781. this.gridList.tips = '出货库' + data.sendWarehouse
  782. }
  783. this.gridList.inOutTypeKey = 3
  784. }else if (this.contractNolist[i].inOutType == '移库出库') {
  785. this.gridList.tips = '入货库' + data.receiveWarehouse
  786. } else if (this.contractNolist[i].inOutType == '暂存入库') {
  787. this.gridList.inOutTypeKey = 4
  788. } else if (this.contractNolist[i].inOutType == '贸易服务入库') {
  789. this.gridList.inOutTypeKey = 5
  790. } else if (this.contractNolist[i].inOutType == '退库') {
  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.cost = this.contractNolist[i].contractPrice
  799. if (this.cost) {
  800. this.isGetCost = true
  801. this.gridList.cost =this.cost - this.gridList.deductionAmount
  802. } else {
  803. this.isGetCost = false
  804. this.gridList.cost = this.gridList.cost
  805. }
  806. if (this.contractNolist[i].inOutType == '移库入库') {
  807. this.isSelectType = false
  808. } else {
  809. this.isSelectType = true
  810. }
  811. if (this.contractNolist[i].priceType == '随行就市') {
  812. this.disabled1 = !this.disabled1
  813. }
  814. if (this.contractNolist[i].deliverType == '1') {
  815. this.carstatus = true
  816. } else {
  817. this.carstatus = false
  818. }
  819. if (this.contractNolist[i].tranCarInfoList) {
  820. this.tranCarInfoList = this.contractNolist[i].tranCarInfoList
  821. // this.carstatus = true
  822. }else{
  823. this.options2 =[]
  824. }
  825. this.fleetNameList=this.contractNolist[i].tranCarInfoList1
  826. }
  827. }
  828. console.log(this.gridList)
  829. },
  830. print(){
  831. uni.navigateTo({
  832. url: '/pages/erpbusiness/bleConnect'
  833. })
  834. },
  835. close(){
  836. this.isShowPrint = false
  837. uni.navigateBack({})
  838. },
  839. hidden(){
  840. this.$refs.keyboard.open(false)
  841. },
  842. handleShowKeyboard(){
  843. if(this.$refs.keyboard.open){
  844. this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
  845. }else{
  846. this.$refs.keyboard[0].open(true)
  847. }
  848. },
  849. handleClick(e){
  850. this.gridList.carNumber = e.value //键盘输入值
  851. },
  852. // confirmInfo() {
  853. // this.isShowAlert = true
  854. // },
  855. // alertBtn() {
  856. // this.$api.doRequest('get', '/qualityInspectionManagement/api/editQualityInspection', {
  857. // id: this.id,
  858. // flag:2
  859. // }).then(res => {
  860. // if(res.data.code=="200"){
  861. // this.$api.msg('提交成功!')
  862. // }else{
  863. // this.$api.msg('提交失败')
  864. // }
  865. // })
  866. // },
  867. cancelClick() {
  868. this.isShowAlert = false
  869. },
  870. waterContentChange() {
  871. var that = this
  872. if (this.gridList.goodsName && this.cangid) {
  873. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  874. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  875. warehouseId: this.cangid,
  876. goodsName: this.gridList.goodsName
  877. }).then(res => {
  878. that.gridList.dryGrainPrice = res.data.data
  879. })
  880. }
  881. }
  882. if (this.gridList.goodsName) {
  883. for (var i = 0; i < this.purchasePriceList.length; i++) {
  884. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  885. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  886. this.gridList.paramType = this.purchasePriceList[i].paramType
  887. }
  888. }
  889. }
  890. var numReg = /^[0-9]*$/
  891. var numRe = new RegExp(numReg)
  892. //潮粮单价改变事件
  893. if (
  894. this.gridList.goodsName &&
  895. this.gridList.waterContent &&
  896. this.gridList.grade &&
  897. numRe.test(this.gridList.waterContent)
  898. ) {
  899. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  900. warehouseId: this.cangid,
  901. goodsName: this.gridList.goodsName,
  902. waterContent: this.gridList.waterContent,
  903. grade: this.gridList.grade,
  904. }).then(res => {
  905. if (that.gridList.paramType == '1') {
  906. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  907. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  908. .dryGrainPrice)).toFixed(4)
  909. if (!that.gridList.tidalGrainPrice) {
  910. that.gridList.tidalGrainPrice = ''
  911. }
  912. } else {
  913. if(that.gridList.type == '干粮'){
  914. that.gridList.dryGrainPrice = res.data.data
  915. }
  916. else{
  917. that.gridList.tidalGrainPrice = res.data.data
  918. }
  919. }
  920. })
  921. }
  922. },
  923. gocustomer() {
  924. uni.navigateTo({
  925. url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList.warehouseName + '&goodsName=' + this.gridList.goodsName
  926. })
  927. },
  928. getdate() {
  929. var date = new Date()
  930. var year = date.getFullYear() //获取完整的年份(4位)
  931. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  932. var datetime = date.getDate() //获取当前日(1-31)
  933. if (mouth < 10) {
  934. mouth = '0' + mouth
  935. }
  936. if (datetime < 10) {
  937. datetime = '0' + datetime
  938. }
  939. return year + '' + mouth + '' + datetime
  940. },
  941. submit() {
  942. if(this.typevalue==3){
  943. if(this.outType){
  944. this.gridList.outType=this.outType
  945. }
  946. }
  947. var that = this
  948. this.gridList.baseId=this.cangid
  949. this.gridList.warehouseId=this.cangid
  950. if (!this.gridList.qualityNo) {
  951. this.$api.msg('编号不能为空')
  952. return
  953. }
  954. if (!this.gridList.binNumber) {
  955. this.$api.msg('仓位不能为空')
  956. return
  957. }
  958. if(this.typevalue==3){
  959. if (!this.gridList.customerName) {
  960. this.$api.msg('客户不能为空')
  961. return
  962. }
  963. if (!this.gridList.natureOfGrainPurchase) {
  964. this.$api.msg('购粮性质不能为空')
  965. return
  966. }
  967. }
  968. // if (!this.gridList.storageTagNo) {
  969. // this.$api.msg('囤位号不能为空')
  970. // return
  971. // }
  972. if (this.gridList.storageTagNo&&this.gridList.storageTagNo.length > 10) {
  973. this.$api.msg('囤位号不能为空')
  974. return
  975. }
  976. if (!this.gridList.carNumber) {
  977. this.$api.msg('车牌号不能为空')
  978. return
  979. }
  980. if (this.gridList.carNumber.length != 7) {
  981. this.$api.msg('车牌号输入错误')
  982. return
  983. }
  984. if (!this.gridList.goodsName) {
  985. this.$api.msg('货名不能为空')
  986. return
  987. }
  988. // if (this.gridList.buckleWeightRatio < 0 || this.gridList.buckleWeightRatio > 2) {
  989. // this.$api.msg('扣重比输入错误')
  990. // return
  991. // }
  992. // if (
  993. // String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  994. // String(this.gridList.buckleWeightRatio).length -
  995. // (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  996. // this.$api.msg('扣重比输入错误')
  997. // return
  998. // }
  999. if (!this.gridList.type) {
  1000. this.$api.msg('类型不能为空')
  1001. return
  1002. }
  1003. if(this.value==false){
  1004. if (!this.gridList.grade) {
  1005. this.$api.msg('等级不能为空')
  1006. return
  1007. }
  1008. if (!this.gridList.impurity) {
  1009. this.$api.msg('杂质不能为空')
  1010. return
  1011. }
  1012. if (!this.gridList.waterContent) {
  1013. this.$api.msg('初检水分不能为空')
  1014. return
  1015. }
  1016. // if (!this.gridList.reWaterContent) {
  1017. // this.$api.msg('复检水分不能为空')
  1018. // return
  1019. // }
  1020. if (!this.gridList.mildewGrain) {
  1021. this.$api.msg('霉变粒不能为空')
  1022. return
  1023. }
  1024. if (!this.gridList.bulkDensity) {
  1025. this.$api.msg('容重不能为空')
  1026. return
  1027. }
  1028. if (!this.gridList.jiaorenli) {
  1029. this.$api.msg('热损伤不能为空')
  1030. return
  1031. }
  1032. if (!this.gridList.imperfectGrain) {
  1033. this.$api.msg('不完整粒不能为空')
  1034. return
  1035. }
  1036. }
  1037. uni.showModal({
  1038. content: "确定提交质检信息?",
  1039. showCancel: true,
  1040. confirmText: '提交',
  1041. success: function(res) {
  1042. if (res.confirm) {
  1043. that.gridList.serviceManagementType=that.typevalue
  1044. if(that.typevalue==3){
  1045. that.$api.doRequest('get', '/paymentManagement/cumulant', {
  1046. compId: uni.getStorageSync('pcUserInfo').compId,
  1047. customerNumberCard: that.gridList.customerNumberCard,
  1048. goodsName: that.gridList.goodsName,
  1049. })
  1050. .then(response => {
  1051. if (response.data.code == 200) {
  1052. for (let i = 0; i < that.purchasePriceList.length; i++) {
  1053. if (
  1054. that.gridList.goodsName == that.purchasePriceList[i]
  1055. .goodsName
  1056. ) {
  1057. let count = (that.purchasePriceList[i].saleLimit -
  1058. response.data.data / 1000).toFixed(2)
  1059. console.log(count,that.purchasePriceList[i].saleLimit,
  1060. response.data.data)
  1061. if (Number(count) <= 0) {
  1062. count = 0
  1063. that.$api.msg('该客户累计销售' + that.gridList.goodsName + (
  1064. response.data.data / 1000).toFixed(2) +
  1065. '吨,还可售粮' +
  1066. count + '吨', )
  1067. } else {
  1068. that.$api.doRequest('post',
  1069. '/warehouseInOutInfo/InOutWarehouse',
  1070. that.gridList)
  1071. .then(res => {
  1072. that.gridList.warehouseInOutId=res.data.data
  1073. that.$api.doRequest('post',
  1074. '/qualityInspectionManagement/api/addQualityInspection',
  1075. that.gridList)
  1076. .then(res => {
  1077. if (res.data.code == 200) {
  1078. that.$api.msg('提交成功')
  1079. that.isShowPrint = true
  1080. that.gridList.warehouseId = that.cangid
  1081. that.gridList.compId = uni.getStorageSync('pcUserInfo').compId
  1082. uni.setStorageSync("quality_print",that.gridList)
  1083. console.log('that.gridList',that.gridList)
  1084. // uni.navigateBack({})
  1085. } else {
  1086. that.$api.msg('提交失败')
  1087. }
  1088. })
  1089. })
  1090. }
  1091. }
  1092. }
  1093. }
  1094. })
  1095. }else{
  1096. that.$api.doRequest('post',
  1097. '/warehouseInOutInfo/InOutWarehouse',
  1098. that.gridList)
  1099. .then(res => {
  1100. that.gridList.warehouseInOutId=res.data.data
  1101. that.$api.doRequest('post',
  1102. '/qualityInspectionManagement/api/addQualityInspection',
  1103. that.gridList)
  1104. .then(res => {
  1105. if (res.data.code == 200) {
  1106. that.$api.msg('提交成功')
  1107. that.isShowPrint = true
  1108. that.gridList.warehouseId = that.cangid
  1109. that.gridList.compId = uni.getStorageSync('pcUserInfo').compId
  1110. uni.setStorageSync("quality_print",that.gridList)
  1111. console.log('that.gridList',that.gridList)
  1112. // uni.navigateBack({})
  1113. } else {
  1114. hat.$api.msg('提交失败')
  1115. }
  1116. })
  1117. })
  1118. }
  1119. }
  1120. }
  1121. })
  1122. },
  1123. gradepicker(e) {
  1124. console.log(e)
  1125. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1126. this.gridList.grade = this.gradeList[e[0]].value
  1127. this.gridList.gradeKey = this.gradeList[e[0]].key
  1128. this.waterContentChange()
  1129. },
  1130. setGoodName(e) {
  1131. //
  1132. // [e[0]] = 0
  1133. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1134. if (this.goodsList[e[0]].goodsName == '玉米') {
  1135. this.gridList.type = '干粮'
  1136. this.edit = true
  1137. } else if (this.goodsList[e[0]].goodsName == '玉米(潮粮)') {
  1138. this.gridList.type = '潮粮'
  1139. this.edit = true
  1140. } else {
  1141. this.gridList.type = '干粮'
  1142. this.edit = false
  1143. }
  1144. var that = this
  1145. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  1146. // this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
  1147. // warehouseId: this.cangid,
  1148. // goodsName: this.gridList.goodsName
  1149. // }).then(res => {
  1150. // if (res.data.data) {
  1151. // uni.hideLoading()
  1152. // // let data = res.data.data
  1153. // // that.gridList =data
  1154. // }
  1155. // })
  1156. uni.setStorageSync('goodsName', this.gridList.goodsName)
  1157. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  1158. uni.showLoading({title: '加载中',mask:true})
  1159. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1160. warehouseId: this.cangid,
  1161. goodsName: this.gridList.goodsName
  1162. }).then(res => {
  1163. this.gridList.dryGrainPrice = res.data.data
  1164. uni.hideLoading()
  1165. })
  1166. }
  1167. this.waterContentChange()
  1168. },
  1169. goodspicker(e) {
  1170. console.log(e)
  1171. this.setGoodName(e)
  1172. },
  1173. typepicker(e) {
  1174. var that = this
  1175. this.gridList.type = this.typeList[e[0]]
  1176. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  1177. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1178. warehouseId: this.cangid,
  1179. goodsName: this.gridList.goodsName
  1180. }).then(res => {
  1181. that.gridList.dryGrainPrice = res.data.data
  1182. })
  1183. }
  1184. },
  1185. binNumberpicker(e) {
  1186. console.log(this.warehouseList[e[0]])
  1187. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  1188. this.gridList.positionId = this.warehouseList[e[0]].id
  1189. },
  1190. del(item) {
  1191. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  1192. id: item.id
  1193. }).then(res => {
  1194. if (res.data.code == 200) {
  1195. this.$api.msg('删除成功')
  1196. } else {
  1197. this.$api.msg('系统异常,请联系管理员')
  1198. }
  1199. })
  1200. },
  1201. contactUs() {
  1202. const that = this
  1203. uni.makePhoneCall({
  1204. // 手机号
  1205. phoneNumber: '18241771147',
  1206. // 成功回调
  1207. success: (res) => {},
  1208. // 失败回调
  1209. fail: (res) => {}
  1210. });
  1211. },
  1212. loadData() {
  1213. // const that = this
  1214. // if(uni.getStorageSync("PageCur")){
  1215. // that.PageCur = uni.getStorageSync("PageCur");
  1216. // }
  1217. // that.userInfoTmp = uni.getStorageSync("userInfo")
  1218. // uni.showLoading({
  1219. // title: '正在加载',
  1220. // mask:true
  1221. // })
  1222. // that.$api.request('integral', 'getIndexData', failres => {
  1223. // that.$api.msg(failres.errmsg)
  1224. // uni.hideLoading()
  1225. // }).then(res => {
  1226. // let data = res.data
  1227. // uni.setStorageSync("message", data.message);
  1228. // uni.setStorageSync("task", data.task);
  1229. // uni.setStorageSync("contract", data.contract);
  1230. // uni.setStorageSync('showTran', data.showTran);
  1231. // that.showTran = data.showTran
  1232. // that.gridList[4].tips = data.task
  1233. // that.gridList[2].tips = data.contract
  1234. // that.companyId = data.companyId
  1235. // uni.hideLoading()
  1236. // })
  1237. },
  1238. confirm() {
  1239. const that = this
  1240. if (!that.inputContent) {
  1241. that.$api.msg('输入不能为空')
  1242. return
  1243. }
  1244. let obj = {}
  1245. obj[that.feild] = that.inputContent
  1246. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1247. that.userInfo.nickname = that.inputContent
  1248. that.inputContent = ''
  1249. that.$store.commit('login', that.userInfo)
  1250. })
  1251. },
  1252. cancel() {
  1253. this.inputShow = false
  1254. this.inputStatus = 'none'
  1255. this.genderShow = false
  1256. },
  1257. myAccount() {
  1258. uni.navigateTo({
  1259. url: `/pageA/pages/contract`
  1260. })
  1261. },
  1262. /**
  1263. * 统一跳转接口,拦截未登录路由
  1264. * navigator标签现在默认没有转场动画,所以用view
  1265. */
  1266. navTo(url) {
  1267. if (!this.hasLogin) {
  1268. url = '/pages/public/login';
  1269. }
  1270. uni.navigateTo({
  1271. url
  1272. })
  1273. },
  1274. mycarClick(carNo) {
  1275. this.modalName = null
  1276. uni.navigateTo({
  1277. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1278. })
  1279. },
  1280. scanCode() {
  1281. uni.scanCode({
  1282. success: function(res) {
  1283. uni.navigateTo({
  1284. url: res.result
  1285. })
  1286. }
  1287. })
  1288. },
  1289. hideModal(e) {
  1290. this.modalName = null
  1291. },
  1292. }
  1293. }
  1294. </script>
  1295. <style lang='scss' scoped>
  1296. page {
  1297. background: #F5F6FA;
  1298. }
  1299. .title_b {
  1300. margin: 20rpx 20rpx 0rpx 20rpx;
  1301. padding: 20rpx 10rpx 20rpx 10rpx;
  1302. font-size: 18px;
  1303. font-weight: 550;
  1304. }
  1305. .c-row {
  1306. display: -webkit-box;
  1307. display: -webkit-flex;
  1308. display: flex;
  1309. -webkit-box-align: center;
  1310. -webkit-align-items: center;
  1311. align-items: center;
  1312. padding: 20rpx 30rpx;
  1313. position: relative;
  1314. }
  1315. .con-list {
  1316. -webkit-box-flex: 1;
  1317. -webkit-flex: 1;
  1318. flex: 1;
  1319. display: -webkit-box;
  1320. display: -webkit-flex;
  1321. display: flex;
  1322. -webkit-box-orient: vertical;
  1323. -webkit-box-direction: normal;
  1324. -webkit-flex-direction: column;
  1325. flex-direction: column;
  1326. color: #303133;
  1327. line-height: 40rpx;
  1328. text-align: right;
  1329. padding-right: 20rpx;
  1330. }
  1331. .wrap {
  1332. padding-bottom: 10px;
  1333. font-size: 14px;
  1334. background: #fff;
  1335. margin: 10px;
  1336. border-radius: 10px;
  1337. input {
  1338. font-size: 14px;
  1339. }
  1340. >.title {
  1341. padding: 10px 16px;
  1342. }
  1343. }
  1344. .footer {
  1345. background: #fff;
  1346. position: fixed;
  1347. bottom: 0;
  1348. width: 100%;
  1349. padding: 20px 10px;
  1350. z-index: 10;
  1351. .button {
  1352. background: #22C572;
  1353. width: 90%;
  1354. margin: 20rpx auto;
  1355. padding: 10px;
  1356. color: #fff;
  1357. text-align: center;
  1358. border-radius: 30px;
  1359. }
  1360. }
  1361. .buns_item{
  1362. display: flex;
  1363. padding: 80rpx 0 50rpx 0;
  1364. justify-content: space-around;
  1365. }
  1366. .but_css{
  1367. background: #22C572;
  1368. width: 40%;
  1369. padding: 20rpx;
  1370. color: #fff;
  1371. text-align: center;
  1372. border-radius: 20rpx;
  1373. }
  1374. /deep/.u-radio-group{
  1375. flex-direction: row-reverse;
  1376. }
  1377. </style>