add_quality_testing.vue 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419
  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. console.log(this.pricetext)
  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. if(this.gridList.contractNo==this.contractNolist[i].contractNo){
  761. console.log(this.contractNolist[i])
  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.carNo=this.gridList.carNumber
  949. this.gridList.baseId=this.cangid
  950. this.gridList.warehouseId=this.cangid
  951. if (!this.gridList.qualityNo) {
  952. this.$api.msg('编号不能为空')
  953. return
  954. }
  955. if (!this.gridList.binNumber) {
  956. this.$api.msg('仓位不能为空')
  957. return
  958. }
  959. if(this.typevalue==3){
  960. if (!this.gridList.customerName) {
  961. this.$api.msg('客户不能为空')
  962. return
  963. }
  964. if (!this.gridList.natureOfGrainPurchase) {
  965. this.$api.msg('购粮性质不能为空')
  966. return
  967. }
  968. }
  969. // if (!this.gridList.storageTagNo) {
  970. // this.$api.msg('囤位号不能为空')
  971. // return
  972. // }
  973. // if (this.gridList.storageTagNo&&this.gridList.storageTagNo.length > 10) {
  974. // this.$api.msg('囤位号不能为空')
  975. // return
  976. // }
  977. if (!this.gridList.carNumber) {
  978. this.$api.msg('车牌号不能为空')
  979. return
  980. }
  981. if (this.gridList.carNumber.length != 7) {
  982. this.$api.msg('车牌号输入错误')
  983. return
  984. }
  985. if (!this.gridList.goodsName) {
  986. this.$api.msg('货名不能为空')
  987. return
  988. }
  989. // if (this.gridList.buckleWeightRatio < 0 || this.gridList.buckleWeightRatio > 2) {
  990. // this.$api.msg('扣重比输入错误')
  991. // return
  992. // }
  993. // if (
  994. // String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  995. // String(this.gridList.buckleWeightRatio).length -
  996. // (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  997. // this.$api.msg('扣重比输入错误')
  998. // return
  999. // }
  1000. if (!this.gridList.type) {
  1001. this.$api.msg('类型不能为空')
  1002. return
  1003. }
  1004. if(this.value==false){
  1005. if (!this.gridList.grade) {
  1006. this.$api.msg('等级不能为空')
  1007. return
  1008. }
  1009. if (!this.gridList.impurity) {
  1010. this.$api.msg('杂质不能为空')
  1011. return
  1012. }
  1013. if (!this.gridList.waterContent) {
  1014. this.$api.msg('初检水分不能为空')
  1015. return
  1016. }
  1017. // if (!this.gridList.reWaterContent) {
  1018. // this.$api.msg('复检水分不能为空')
  1019. // return
  1020. // }
  1021. if (!this.gridList.mildewGrain) {
  1022. this.$api.msg('霉变粒不能为空')
  1023. return
  1024. }
  1025. if (!this.gridList.bulkDensity) {
  1026. this.$api.msg('容重不能为空')
  1027. return
  1028. }
  1029. if (!this.gridList.jiaorenli) {
  1030. this.$api.msg('热损伤不能为空')
  1031. return
  1032. }
  1033. if (!this.gridList.imperfectGrain) {
  1034. this.$api.msg('不完整粒不能为空')
  1035. return
  1036. }
  1037. }
  1038. uni.showModal({
  1039. content: "确定提交质检信息?",
  1040. showCancel: true,
  1041. confirmText: '提交',
  1042. success: function(res) {
  1043. if (res.confirm) {
  1044. that.gridList.serviceManagementType=that.typevalue
  1045. if(that.typevalue==3){
  1046. that.$api.doRequest('get', '/paymentManagement/cumulant', {
  1047. compId: uni.getStorageSync('pcUserInfo').compId,
  1048. customerNumberCard: that.gridList.customerNumberCard,
  1049. goodsName: that.gridList.goodsName,
  1050. })
  1051. .then(response => {
  1052. if (response.data.code == 200) {
  1053. for (let i = 0; i < that.purchasePriceList.length; i++) {
  1054. if (
  1055. that.gridList.goodsName == that.purchasePriceList[i]
  1056. .goodsName
  1057. ) {
  1058. let count = (that.purchasePriceList[i].saleLimit -
  1059. response.data.data / 1000).toFixed(2)
  1060. console.log(count,that.purchasePriceList[i].saleLimit,
  1061. response.data.data)
  1062. if (Number(count) <= 0) {
  1063. count = 0
  1064. that.$api.msg('该客户累计销售' + that.gridList.goodsName + (
  1065. response.data.data / 1000).toFixed(2) +
  1066. '吨,还可售粮' +
  1067. count + '吨', )
  1068. } else {
  1069. that.$api.doRequest('post',
  1070. '/warehouseInOutInfo/InOutWarehouse',
  1071. that.gridList)
  1072. .then(res => {
  1073. that.gridList.warehouseInOutId=res.data.data
  1074. that.$api.doRequest('post',
  1075. '/qualityInspectionManagement/api/addQualityInspection',
  1076. that.gridList)
  1077. .then(res => {
  1078. if (res.data.code == 200) {
  1079. that.$api.msg('提交成功')
  1080. that.isShowPrint = true
  1081. that.gridList.warehouseId = that.cangid
  1082. that.gridList.compId = uni.getStorageSync('pcUserInfo').compId
  1083. uni.setStorageSync("quality_print",that.gridList)
  1084. console.log('that.gridList',that.gridList)
  1085. // uni.navigateBack({})
  1086. } else {
  1087. that.$api.msg('提交失败')
  1088. }
  1089. })
  1090. })
  1091. }
  1092. }
  1093. }
  1094. }
  1095. })
  1096. }else{
  1097. that.$api.doRequest('post',
  1098. '/warehouseInOutInfo/InOutWarehouse',
  1099. that.gridList)
  1100. .then(res => {
  1101. that.gridList.warehouseInOutId=res.data.data
  1102. that.$api.doRequest('post',
  1103. '/qualityInspectionManagement/api/addQualityInspection',
  1104. that.gridList)
  1105. .then(res => {
  1106. if (res.data.code == 200) {
  1107. that.$api.msg('提交成功')
  1108. that.isShowPrint = true
  1109. that.gridList.warehouseId = that.cangid
  1110. that.gridList.compId = uni.getStorageSync('pcUserInfo').compId
  1111. uni.setStorageSync("quality_print",that.gridList)
  1112. console.log('that.gridList',that.gridList)
  1113. // uni.navigateBack({})
  1114. } else {
  1115. hat.$api.msg('提交失败')
  1116. }
  1117. })
  1118. })
  1119. }
  1120. }
  1121. }
  1122. })
  1123. },
  1124. gradepicker(e) {
  1125. console.log(e)
  1126. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1127. this.gridList.grade = this.gradeList[e[0]].value
  1128. this.gridList.gradeKey = this.gradeList[e[0]].key
  1129. this.waterContentChange()
  1130. },
  1131. setGoodName(e,status) {
  1132. //
  1133. // [e[0]] = 0
  1134. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  1135. if (this.goodsList[e[0]].goodsName == '玉米') {
  1136. this.gridList.type = '干粮'
  1137. this.edit = true
  1138. } else if (this.goodsList[e[0]].goodsName == '玉米(潮粮)') {
  1139. this.gridList.type = '潮粮'
  1140. this.edit = true
  1141. } else {
  1142. this.gridList.type = '干粮'
  1143. this.edit = false
  1144. }
  1145. var that = this
  1146. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  1147. // this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
  1148. // warehouseId: this.cangid,
  1149. // goodsName: this.gridList.goodsName
  1150. // }).then(res => {
  1151. // if (res.data.data) {
  1152. // uni.hideLoading()
  1153. // // let data = res.data.data
  1154. // // that.gridList =data
  1155. // }
  1156. // })
  1157. uni.setStorageSync('goodsName', this.gridList.goodsName)
  1158. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  1159. if(!status){
  1160. uni.showLoading({title: '加载中',mask:true})
  1161. }
  1162. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1163. warehouseId: this.cangid,
  1164. goodsName: this.gridList.goodsName
  1165. }).then(res => {
  1166. this.gridList.dryGrainPrice = res.data.data
  1167. if(!status){
  1168. uni.hideLoading()
  1169. }
  1170. })
  1171. }
  1172. this.waterContentChange()
  1173. },
  1174. goodspicker(e) {
  1175. console.log(e)
  1176. this.setGoodName(e)
  1177. },
  1178. typepicker(e) {
  1179. var that = this
  1180. this.gridList.type = this.typeList[e[0]]
  1181. if (this.gridList.type == "干粮" && this.gridList.goodsName) {
  1182. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  1183. warehouseId: this.cangid,
  1184. goodsName: this.gridList.goodsName
  1185. }).then(res => {
  1186. that.gridList.dryGrainPrice = res.data.data
  1187. })
  1188. }
  1189. },
  1190. binNumberpicker(e) {
  1191. console.log(this.warehouseList[e[0]])
  1192. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  1193. this.gridList.positionId = this.warehouseList[e[0]].id
  1194. },
  1195. del(item) {
  1196. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  1197. id: item.id
  1198. }).then(res => {
  1199. if (res.data.code == 200) {
  1200. this.$api.msg('删除成功')
  1201. } else {
  1202. this.$api.msg('系统异常,请联系管理员')
  1203. }
  1204. })
  1205. },
  1206. contactUs() {
  1207. const that = this
  1208. uni.makePhoneCall({
  1209. // 手机号
  1210. phoneNumber: '18241771147',
  1211. // 成功回调
  1212. success: (res) => {},
  1213. // 失败回调
  1214. fail: (res) => {}
  1215. });
  1216. },
  1217. loadData() {
  1218. // const that = this
  1219. // if(uni.getStorageSync("PageCur")){
  1220. // that.PageCur = uni.getStorageSync("PageCur");
  1221. // }
  1222. // that.userInfoTmp = uni.getStorageSync("userInfo")
  1223. // uni.showLoading({
  1224. // title: '正在加载',
  1225. // mask:true
  1226. // })
  1227. // that.$api.request('integral', 'getIndexData', failres => {
  1228. // that.$api.msg(failres.errmsg)
  1229. // uni.hideLoading()
  1230. // }).then(res => {
  1231. // let data = res.data
  1232. // uni.setStorageSync("message", data.message);
  1233. // uni.setStorageSync("task", data.task);
  1234. // uni.setStorageSync("contract", data.contract);
  1235. // uni.setStorageSync('showTran', data.showTran);
  1236. // that.showTran = data.showTran
  1237. // that.gridList[4].tips = data.task
  1238. // that.gridList[2].tips = data.contract
  1239. // that.companyId = data.companyId
  1240. // uni.hideLoading()
  1241. // })
  1242. },
  1243. confirm() {
  1244. const that = this
  1245. if (!that.inputContent) {
  1246. that.$api.msg('输入不能为空')
  1247. return
  1248. }
  1249. let obj = {}
  1250. obj[that.feild] = that.inputContent
  1251. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  1252. that.userInfo.nickname = that.inputContent
  1253. that.inputContent = ''
  1254. that.$store.commit('login', that.userInfo)
  1255. })
  1256. },
  1257. cancel() {
  1258. this.inputShow = false
  1259. this.inputStatus = 'none'
  1260. this.genderShow = false
  1261. },
  1262. myAccount() {
  1263. uni.navigateTo({
  1264. url: `/pageA/pages/contract`
  1265. })
  1266. },
  1267. /**
  1268. * 统一跳转接口,拦截未登录路由
  1269. * navigator标签现在默认没有转场动画,所以用view
  1270. */
  1271. navTo(url) {
  1272. if (!this.hasLogin) {
  1273. url = '/pages/public/login';
  1274. }
  1275. uni.navigateTo({
  1276. url
  1277. })
  1278. },
  1279. mycarClick(carNo) {
  1280. this.modalName = null
  1281. uni.navigateTo({
  1282. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  1283. })
  1284. },
  1285. scanCode() {
  1286. uni.scanCode({
  1287. success: function(res) {
  1288. uni.navigateTo({
  1289. url: res.result
  1290. })
  1291. }
  1292. })
  1293. },
  1294. hideModal(e) {
  1295. this.modalName = null
  1296. },
  1297. }
  1298. }
  1299. </script>
  1300. <style lang='scss' scoped>
  1301. page {
  1302. background: #F5F6FA;
  1303. }
  1304. .title_b {
  1305. margin: 20rpx 20rpx 0rpx 20rpx;
  1306. padding: 20rpx 10rpx 20rpx 10rpx;
  1307. font-size: 18px;
  1308. font-weight: 550;
  1309. }
  1310. .c-row {
  1311. display: -webkit-box;
  1312. display: -webkit-flex;
  1313. display: flex;
  1314. -webkit-box-align: center;
  1315. -webkit-align-items: center;
  1316. align-items: center;
  1317. padding: 20rpx 30rpx;
  1318. position: relative;
  1319. }
  1320. .con-list {
  1321. -webkit-box-flex: 1;
  1322. -webkit-flex: 1;
  1323. flex: 1;
  1324. display: -webkit-box;
  1325. display: -webkit-flex;
  1326. display: flex;
  1327. -webkit-box-orient: vertical;
  1328. -webkit-box-direction: normal;
  1329. -webkit-flex-direction: column;
  1330. flex-direction: column;
  1331. color: #303133;
  1332. line-height: 40rpx;
  1333. text-align: right;
  1334. padding-right: 20rpx;
  1335. }
  1336. .wrap {
  1337. padding-bottom: 10px;
  1338. font-size: 14px;
  1339. background: #fff;
  1340. margin: 10px;
  1341. border-radius: 10px;
  1342. input {
  1343. font-size: 14px;
  1344. }
  1345. >.title {
  1346. padding: 10px 16px;
  1347. }
  1348. }
  1349. .footer {
  1350. background: #fff;
  1351. position: fixed;
  1352. bottom: 0;
  1353. width: 100%;
  1354. padding: 20px 10px;
  1355. z-index: 10;
  1356. .button {
  1357. background: #22C572;
  1358. width: 90%;
  1359. margin: 20rpx auto;
  1360. padding: 10px;
  1361. color: #fff;
  1362. text-align: center;
  1363. border-radius: 30px;
  1364. }
  1365. }
  1366. .buns_item{
  1367. display: flex;
  1368. padding: 80rpx 0 50rpx 0;
  1369. justify-content: space-around;
  1370. }
  1371. .but_css{
  1372. background: #22C572;
  1373. width: 40%;
  1374. padding: 20rpx;
  1375. color: #fff;
  1376. text-align: center;
  1377. border-radius: 20rpx;
  1378. }
  1379. /deep/.u-radio-group{
  1380. flex-direction: row-reverse;
  1381. }
  1382. </style>