edit_quality_testing.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <view ref="all-input">
  3. <view @click='hidden' class='wrap'>
  4. <view class='title_b'>基本信息</view>
  5. <view class="c-row ">
  6. <view class="title">仓库</view>
  7. <view class="con-list">
  8. {{gridList.warehouseName}}
  9. </view>
  10. </view>
  11. <view class="c-row ">
  12. <view class="title">编号</view>
  13. <view class="con-list">
  14. {{gridList.qualityNo}}
  15. </view>
  16. </view>
  17. <view class="c-row ">
  18. <view class="title">客户</view>
  19. <view class="con-list">
  20. {{gridList.customerName}}({{gridList.customerPhone}})
  21. </view>
  22. </view>
  23. <view class="c-row ">
  24. <view class="title">车牌号</view>
  25. <view class="con-list">
  26. <input v-model='gridList.carNumber' @click.stop="handleShowKeyboard":disabled="true" placeholder="请输入车牌号" name="input"></input>
  27. <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
  28. <!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
  29. </view>
  30. </view>
  31. <view v-if="gridList.paramType != '1'" class="c-row ">
  32. <view class="title">扣重比</view>
  33. <view class="con-list">
  34. <input :disabled='flag==1' v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
  35. name="input"></input>
  36. </view>
  37. </view>
  38. <view v-else class="c-row ">
  39. <view class="title">扣杂</view>
  40. <view class="con-list">
  41. <input :disabled='flag==1' v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂"
  42. @input="waterContentChange" name="input"></input>
  43. <input v-if='flag==0' value='未复检' disabled placeholder="复检扣杂" name="input"></input>
  44. <input v-else :disabled='flag!=1' v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂"
  45. name="input"></input>
  46. </view>
  47. </view>
  48. <view class="c-row ">
  49. <view class="title">购粮性质</view>
  50. <view class="con-list">
  51. <input :disabled='flag==1' v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
  52. name="input"></input>
  53. </view>
  54. </view>
  55. <view class="c-row ">
  56. <view class="title">仓位号</view>
  57. <view class="con-list">
  58. <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
  59. v-model="show" mode="selector">
  60. </u-picker>
  61. <view v-if='flag!=1' @click='show=true'>{{gridList.binNumber}}</view>
  62. <view v-else>{{gridList.binNumber}}</view>
  63. </view>
  64. </view>
  65. <view class="c-row ">
  66. <view class="title">囤位号</view>
  67. <view class="con-list">
  68. <input v-model='gridList.storageTagNo' placeholder="请输入囤位号"
  69. name="input"></input>
  70. </view>
  71. </view>
  72. <view class="c-row ">
  73. <view class="title">货名</view>
  74. <view class="con-list">
  75. <!-- <view v-if="flag != '0'">
  76. {{gridList.goodsName}}
  77. </view> -->
  78. <view @click='goodsName = true'>{{gridList.goodsName}}</view>
  79. <u-picker :range="goodsList" range-key="goodsName" @confirm='goodsPicker($event)' v-model="goodsName" mode="selector" >
  80. </u-picker>
  81. </view>
  82. </view>
  83. <view class="c-row ">
  84. <view class="title">类型</view>
  85. <view class="con-list">
  86. {{gridList.type}}
  87. </view>
  88. </view>
  89. <view v-if="gridList.type == '潮粮'" class="c-row">
  90. <view class="title">净重单价(元/公斤)</view>
  91. <view class="con-list">
  92. <input :disabled='flag==1' v-model='gridList.tidalGrainPrice' disabled placeholder="自动获取,不可编辑"
  93. name="input"></input>
  94. </view>
  95. </view>
  96. <view v-if="gridList.type == '干粮'" class="c-row">
  97. <view class="title">干粮单价(元/公斤)</view>
  98. <view class="con-list">
  99. <input v-model='gridList.dryGrainPrice' placeholder="请输入干粮单价" name="input"></input>
  100. </view>
  101. </view>
  102. <view class="c-row-fj" v-if="flag==2||flag==1">
  103. <view style="margin: 0px 0px 30rpx 10rpx;">复检备注</view>
  104. <textarea class='textarea-style' v-model='gridList.reMemo' placeholder="请输入复检备注" maxlength="300"></textarea>
  105. </view>
  106. <view class="c-row" v-if="flag==1&&gridList.warehouseName=='鲅鱼圈金信库'">
  107. <view class="title">车型</view>
  108. <view class="con-list">
  109. <view @click='carstatus = true'>{{gridList.carModel?gridList.carModel:'请选择车型'}}</view>
  110. <u-picker :range="carModeList" range-key="constValue" @confirm='carPicker($event)' v-model="carstatus" mode="selector" >
  111. </u-picker>
  112. </view>
  113. </view>
  114. </view>
  115. <view style='padding-bottom:300rpx;'>
  116. <view class='wrap'>
  117. <view style='margin-right:10px;' class='flex justify-between align-item-center'>
  118. <view class='title_b'>化验信息</view>
  119. <view class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572" v-if='flag==0' v-model="value" @change="change"></u-switch></view>
  120. </view>
  121. <view class="c-row ">
  122. <view class="title">等级</view>
  123. <view class="con-list">
  124. <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
  125. mode="selector">
  126. </u-picker>
  127. <view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
  128. <view v-else>{{gridList.grade}}</view>
  129. </view>
  130. </view>
  131. <view class="c-row ">
  132. <view class="title">水分(%)</view>
  133. <view class="con-list">
  134. <input :disabled='flag==1' v-model='gridList.waterContent' placeholder="初检水分"
  135. @input="waterContentChange" name="input"></input>
  136. <input v-if='flag==0' value='未复检' disabled placeholder="复检水分" name="input"></input>
  137. <input :disabled='flag!=1' v-else v-model='gridList.reWaterContent' placeholder="复检水分"
  138. name="input"></input>
  139. </view>
  140. </view>
  141. <view class="c-row ">
  142. <view class="title">容重(克/升)</view>
  143. <view class="con-list">
  144. <input :disabled='flag==1' v-model='gridList.bulkDensity' placeholder="请输入容重"
  145. name="input"></input>
  146. </view>
  147. </view>
  148. <view class="c-row ">
  149. <view class="title">不完善粒(%)</view>
  150. <view class="con-list">
  151. <input :disabled='flag==1' v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
  152. name="input"></input>
  153. </view>
  154. </view>
  155. <view class="c-row ">
  156. <view class="title">杂质(%)</view>
  157. <view class="con-list">
  158. <input :disabled='flag==1' v-model='gridList.impurity' placeholder="请输入杂质占比"
  159. name="input"></input>
  160. </view>
  161. </view>
  162. <view class="c-row ">
  163. <view class="title">霉变粒(%)</view>
  164. <view class="con-list">
  165. <input :disabled='flag==1' v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
  166. name="input"></input>
  167. </view>
  168. </view>
  169. <view class="c-row ">
  170. <view class="title">热损伤(%)</view>
  171. <view class="con-list">
  172. <input :disabled='flag==1' v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
  173. name="input"></input>
  174. <!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. <view class="footer">
  180. <view v-if='!value&&flag==1' @click='confirmInfo' class="button">确认初检信息</view>
  181. <view @click='submit' class="button">提交</view>
  182. </view>
  183. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  184. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  185. showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  186. <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
  187. <view class="buns_item">
  188. <view class="but_css" @click="print">打印小票</view>
  189. <view class="but_css" @click="close">返回</view>
  190. </view>
  191. </u-popup>
  192. </view>
  193. </template>
  194. <script>
  195. import dragButton from "@/components/drag-button/drag-button.vue";
  196. import keyboard from "@/components/master-keyboard/master-keyboard.vue";
  197. import {
  198. mapState
  199. } from 'vuex';
  200. let startY = 0,
  201. moveY = 0,
  202. pageAtTop = true;
  203. export default {
  204. components: {
  205. dragButton,
  206. keyboard
  207. },
  208. data() {
  209. return {
  210. isShowPrint:false,
  211. inputShow: false,
  212. modalName: '',
  213. mycarStyle: '',
  214. feild: undefined,
  215. id: 0,
  216. show: false,
  217. selector: [],
  218. show1: false,
  219. goodsName:false,
  220. carstatus:false,
  221. inputContent: '',
  222. coverTransform: 'translateY(0px)',
  223. coverTransition: '0s',
  224. moving: false,
  225. footprintList: [],
  226. searchKeyWord: '',
  227. isVip: false,
  228. flag: 0,
  229. userInfoTmp: [],
  230. inputStatus: 'none',
  231. carInfo: [],
  232. gridCol: 4,
  233. pageSize: 10,
  234. currentPage: 1,
  235. gridBorder: false,
  236. headUrl: "../../static/img/myimg/YongHu@3x.png",
  237. userphone: "",
  238. username: "请更改昵称",
  239. gridList: {
  240. natureOfGrainPurchase: '贸易粮',
  241. type: '潮粮',
  242. tidalGrainPrice: '',
  243. dryGrainPrice: '',
  244. carNumber:'',
  245. carModel:'',
  246. },
  247. managementType: '',
  248. warehouseName: '',
  249. warehouseList: [],
  250. showTran: true,
  251. companyId: 1,
  252. current: 4,
  253. value:false,
  254. carModeList:[],
  255. gradeList: [{
  256. key: 1,
  257. value: '一等品'
  258. },
  259. {
  260. key: 2,
  261. value: '二等品'
  262. },
  263. {
  264. key: 3,
  265. value: '三等品'
  266. },
  267. {
  268. key: 4,
  269. value: '等外'
  270. },
  271. ],
  272. cangid: '',
  273. goodsList:[],
  274. isShowAlert:false,
  275. content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
  276. }
  277. },
  278. // #ifndef MP
  279. onNavigationBarButtonTap(e) {
  280. const index = e.index;
  281. if (index === 0) {
  282. this.navTo('/pages/set/set');
  283. } else if (index === 1) {
  284. // #ifdef APP-PLUS
  285. const pages = getCurrentPages();
  286. const page = pages[pages.length - 1];
  287. const currentWebview = page.$getAppWebview();
  288. currentWebview.hideTitleNViewButtonRedDot({
  289. index
  290. });
  291. // #endif
  292. uni.navigateTo({
  293. url: '/pages/notice/notice'
  294. })
  295. }
  296. },
  297. // #endif
  298. computed: {
  299. ...mapState(['hasLogin', 'userInfo']),
  300. // 手机号中间4位加*
  301. starUserphone() {
  302. let reg = /^(\d{3})\d{4}(\d{4})$/;
  303. if (this.userphone) {
  304. return this.userphone.replace(reg, "$1****$2");
  305. }
  306. }
  307. },
  308. onLoad(options) {
  309. this.id = options.id
  310. this.flag = options.flag
  311. this.cangid = options.cangid
  312. this.managementType = options.managementType
  313. },
  314. onShow() {
  315. console.log(this.flag)
  316. var that = this
  317. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
  318. id: this.id
  319. }).then(res => {
  320. if (res.data.data) {
  321. let data = res.data.data
  322. if(data.supplementaryRecording==1){
  323. that.value=true
  324. }else{
  325. that.value=false
  326. }
  327. that.gridList = data
  328. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
  329. id: this.cangid
  330. }).then(res => {
  331. that.warehouseList = res.data.data.warehousePositionInfoList
  332. })
  333. }
  334. })
  335. this.$api.doRequest('get', 'commonSysParameter/getInfo', {
  336. constId: 'QUA1'
  337. }).then(res => {
  338. if (res.data.data) {
  339. that.carModeList=res.data.data
  340. }
  341. })
  342. //质检货名下拉
  343. this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
  344. warehouseId: this.cangid
  345. }).then(res => {
  346. if (res.data.data) {
  347. this.goodsList = res.data.data
  348. }
  349. })
  350. this.gridList.grade = this.gradeList[0].value
  351. this.gridList.gradeKey = this.gradeList[0].key
  352. },
  353. methods: {
  354. print(){
  355. uni.navigateTo({
  356. url: '/pages/erpbusiness/bleConnect'
  357. })
  358. },
  359. close(){
  360. this.isShowPrint = false
  361. uni.navigateBack({})
  362. },
  363. // focusConfig(type){
  364. // console.log('childclick',type)
  365. // // 0是上一项
  366. // if(type==0){
  367. // }else{}
  368. // },
  369. hidden(){
  370. this.$refs.keyboard.open(false)
  371. },
  372. carPicker(e){
  373. this.gridList.carModel=this.carModeList[e[0]].constValue
  374. },
  375. handleShowKeyboard(){
  376. if(this.flag==0){
  377. if(this.$refs.keyboard.open){
  378. this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
  379. }else{
  380. this.$refs.keyboard[0].open(true)
  381. }
  382. }
  383. },
  384. handleShowKeyboard1(){
  385. if(this.flag==0){
  386. if(this.$refs.keyboard1.open){
  387. this.$refs.keyboard1.open(true)//true 键盘显示 false 键盘隐藏
  388. }else{
  389. this.$refs.keyboard1[0].open(true)
  390. }
  391. }
  392. },
  393. handleClick(e){
  394. this.gridList.carNumber = e.value //键盘输入值
  395. },
  396. handleClick1(e){
  397. this.gridList.jiaorenli = e.value //键盘输入值
  398. },
  399. change(e){
  400. if(e){
  401. this.gridList.supplementaryRecording=1
  402. }else{
  403. this.gridList.supplementaryRecording=0
  404. }
  405. },
  406. confirmInfo() {
  407. this.isShowAlert = true
  408. },
  409. alertBtn() {
  410. var that = this
  411. that.gridList.reWaterContent=that.gridList.waterContent
  412. if(that.gridList.buckleMiscellaneous){
  413. that.gridList.reBuckleMiscellaneous=that.gridList.buckleMiscellaneous
  414. }
  415. that.gridList.flag = 1
  416. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection',that.gridList).then(res => {
  417. if(res.data.code=="200"){
  418. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {id:that.gridList.id,flag:2}).then(res => {
  419. if(res.data.code=="200"){
  420. that.$api.msg('提交成功!')
  421. setTimeout(function(){
  422. uni.navigateBack({})
  423. },1000)
  424. }else{
  425. that.$api.msg('提交失败')
  426. }
  427. })
  428. }else{
  429. that.$api.msg('提交失败')
  430. }
  431. })
  432. },
  433. waterContentChange() {
  434. var that = this
  435. if (this.gridList.goodsName && this.cangid) {
  436. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  437. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  438. warehouseId: this.cangid,
  439. goodsName: this.gridList.goodsName
  440. }).then(res => {
  441. that.gridList.dryGrainPrice = res.data.data
  442. })
  443. }
  444. }
  445. if (this.gridList.goodsName) {
  446. for (var i = 0; i < this.purchasePriceList.length; i++) {
  447. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  448. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  449. this.gridList.paramType = this.purchasePriceList[i].paramType
  450. }
  451. }
  452. }
  453. var numReg = /^[0-9]*$/
  454. var numRe = new RegExp(numReg)
  455. //潮粮单价改变事件
  456. if (
  457. this.gridList.goodsName &&
  458. this.gridList.waterContent &&
  459. this.gridList.grade &&
  460. numRe.test(this.gridList.waterContent)
  461. ) {
  462. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  463. warehouseId: this.cangid,
  464. goodsName: this.gridList.goodsName,
  465. waterContent: this.gridList.waterContent,
  466. grade: this.gridList.grade,
  467. }).then(res => {
  468. if (that.gridList.paramType == '1') {
  469. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  470. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  471. .dryGrainPrice)).toFixed(4)
  472. if (!that.gridList.tidalGrainPrice) {
  473. that.gridList.tidalGrainPrice = ''
  474. }
  475. } else {
  476. that.gridList.tidalGrainPrice = res.data.data
  477. }
  478. })
  479. }
  480. },
  481. goodsPicker(e){
  482. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  483. },
  484. submit() {
  485. this.gridList.flag = this.flag
  486. // if(this.flag==2){
  487. // this.gridList.reInspector=this.userInfo.userName
  488. // }
  489. var that = this
  490. if (!this.gridList.qualityNo) {
  491. this.$api.msg('编号不能为空')
  492. return
  493. }
  494. if (!this.gridList.binNumber) {
  495. this.$api.msg('仓位不能为空')
  496. return
  497. }
  498. if (!this.gridList.customerName) {
  499. this.$api.msg('客户不能为空')
  500. return
  501. }
  502. if (!this.gridList.storageTagNo) {
  503. this.$api.msg('囤位号不能为空')
  504. return
  505. }
  506. if (this.gridList.storageTagNo.length > 10) {
  507. this.$api.msg('囤位号不能为空')
  508. return
  509. }
  510. if (!this.gridList.carNumber) {
  511. this.$api.msg('车牌号不能为空')
  512. return
  513. }
  514. if (this.gridList.carNumber.length > 7) {
  515. this.$api.msg('车牌号输入错误')
  516. return
  517. }
  518. if (!this.gridList.goodsName) {
  519. this.$api.msg('货名不能为空')
  520. return
  521. }
  522. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  523. this.gridList.buckleWeightRatio > 2) {
  524. this.$api.msg('扣重比输入错误')
  525. return
  526. }
  527. if (
  528. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  529. String(this.gridList.buckleWeightRatio).length -
  530. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  531. this.$api.msg('扣重比输入错误')
  532. return
  533. }
  534. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  535. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  536. this.$api.msg('初检扣杂输入错误')
  537. return
  538. }
  539. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  540. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  541. this.$api.msg('复检扣杂输入错误')
  542. return
  543. }
  544. if (!this.gridList.type) {
  545. this.$api.msg('类型不能为空')
  546. return
  547. }
  548. if (!this.gridList.natureOfGrainPurchase) {
  549. this.$api.msg('购粮性质不能为空')
  550. return
  551. }
  552. if(this.value==false||this.flag==2){
  553. if (!this.gridList.grade) {
  554. this.$api.msg('等级不能为空')
  555. return
  556. }
  557. if (!this.gridList.impurity) {
  558. this.$api.msg('杂质不能为空')
  559. return
  560. }
  561. if (!this.gridList.waterContent) {
  562. this.$api.msg('初检水分不能为空')
  563. return
  564. }
  565. // if (!this.gridList.reWaterContent) {
  566. // this.$api.msg('复检水分不能为空')
  567. // return
  568. // }
  569. if (!this.gridList.mildewGrain) {
  570. this.$api.msg('霉变粒不能为空')
  571. return
  572. }
  573. if (!this.gridList.bulkDensity) {
  574. this.$api.msg('容重不能为空')
  575. return
  576. }
  577. if (!this.gridList.jiaorenli) {
  578. this.$api.msg('热损伤不能为空')
  579. return
  580. }
  581. if (!this.gridList.imperfectGrain) {
  582. this.$api.msg('不完整粒不能为空')
  583. return
  584. }
  585. }
  586. uni.showModal({
  587. content: "确定提交质检信息?",
  588. showCancel: true,
  589. confirmText: '提交',
  590. success: function(res) {
  591. if (res.confirm) {
  592. that.$api.doRequest('post',
  593. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  594. .then(res => {
  595. if (res.data.code == 200) {
  596. that.$api.msg('编辑质检成功')
  597. that.isShowPrint = true
  598. that.gridList.warehouseId = that.cangid
  599. uni.setStorageSync("quality_print",that.gridList)
  600. console.log('that.gridList',that.gridList)
  601. // uni.getStorageSync("depotAcquisition_warehouseName")
  602. // uni.navigateBack({})
  603. }
  604. })
  605. }
  606. }
  607. })
  608. },
  609. gradepicker(e) {
  610. console.log(e)
  611. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  612. this.gridList.grade = this.gradeList[e[0]].value
  613. this.gridList.gradeKey = this.gradeList[e[0]].key
  614. this.waterContentChange()
  615. },
  616. binNumberpicker(e) {
  617. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  618. },
  619. del(item) {
  620. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  621. id: item.id
  622. }).then(res => {
  623. if (res.data.code == 200) {
  624. this.$api.msg('删除成功')
  625. } else {
  626. this.$api.msg('系统异常,请联系管理员')
  627. }
  628. })
  629. },
  630. contactUs() {
  631. const that = this
  632. uni.makePhoneCall({
  633. // 手机号
  634. phoneNumber: '18241771147',
  635. // 成功回调
  636. success: (res) => {},
  637. // 失败回调
  638. fail: (res) => {}
  639. });
  640. },
  641. loadData() {
  642. // const that = this
  643. // if(uni.getStorageSync("PageCur")){
  644. // that.PageCur = uni.getStorageSync("PageCur");
  645. // }
  646. // that.userInfoTmp = uni.getStorageSync("userInfo")
  647. // uni.showLoading({
  648. // title: '正在加载',
  649. // mask:true
  650. // })
  651. // that.$api.request('integral', 'getIndexData', failres => {
  652. // that.$api.msg(failres.errmsg)
  653. // uni.hideLoading()
  654. // }).then(res => {
  655. // let data = res.data
  656. // uni.setStorageSync("message", data.message);
  657. // uni.setStorageSync("task", data.task);
  658. // uni.setStorageSync("contract", data.contract);
  659. // uni.setStorageSync('showTran', data.showTran);
  660. // that.showTran = data.showTran
  661. // that.gridList[4].tips = data.task
  662. // that.gridList[2].tips = data.contract
  663. // that.companyId = data.companyId
  664. // uni.hideLoading()
  665. // })
  666. },
  667. confirm() {
  668. const that = this
  669. if (!that.inputContent) {
  670. that.$api.msg('输入不能为空')
  671. return
  672. }
  673. let obj = {}
  674. obj[that.feild] = that.inputContent
  675. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  676. that.userInfo.nickname = that.inputContent
  677. that.inputContent = ''
  678. that.$store.commit('login', that.userInfo)
  679. })
  680. },
  681. cancel() {
  682. this.inputShow = false
  683. this.inputStatus = 'none'
  684. this.genderShow = false
  685. },
  686. myAccount() {
  687. uni.navigateTo({
  688. url: `/pageA/pages/contract`
  689. })
  690. },
  691. /**
  692. * 统一跳转接口,拦截未登录路由
  693. * navigator标签现在默认没有转场动画,所以用view
  694. */
  695. navTo(url) {
  696. if (!this.hasLogin) {
  697. url = '/pages/public/login';
  698. }
  699. uni.navigateTo({
  700. url
  701. })
  702. },
  703. mycarClick(carNo) {
  704. this.modalName = null
  705. uni.navigateTo({
  706. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  707. })
  708. },
  709. scanCode() {
  710. uni.scanCode({
  711. success: function(res) {
  712. uni.navigateTo({
  713. url: res.result
  714. })
  715. }
  716. })
  717. },
  718. hideModal(e) {
  719. this.modalName = null
  720. },
  721. }
  722. }
  723. </script>
  724. <style lang='scss' scoped>
  725. .title_b {
  726. margin: 20rpx 20rpx 0rpx 20rpx;
  727. padding: 20rpx 10rpx 20rpx 10rpx;
  728. font-size: 18px;
  729. font-weight: 550;
  730. }
  731. page {
  732. background: #F5F6FA;
  733. }
  734. .wrap {
  735. padding-bottom: 10px;
  736. font-size: 14px;
  737. background: #fff;
  738. margin: 10px;
  739. border-radius: 10px;
  740. input {
  741. font-size: 14px;
  742. }
  743. >.title {
  744. padding: 10px 16px;
  745. }
  746. .b-b:after {
  747. border-bottom: 1px solid #eee;
  748. }
  749. }
  750. .footer {
  751. background: #fff;
  752. position: fixed;
  753. bottom: 0;
  754. width: 100%;
  755. padding: 20px 10px;
  756. z-index: 10;
  757. .button {
  758. background: #22C572;
  759. width: 90%;
  760. margin: 20rpx auto;
  761. padding: 10px;
  762. color: #fff;
  763. text-align: center;
  764. border-radius: 30px;
  765. }
  766. }
  767. .c-row {
  768. display: -webkit-box;
  769. display: -webkit-flex;
  770. display: flex;
  771. -webkit-box-align: center;
  772. -webkit-align-items: center;
  773. align-items: center;
  774. padding: 20rpx 30rpx;
  775. position: relative;
  776. }
  777. .con-list {
  778. -webkit-box-flex: 1;
  779. -webkit-flex: 1;
  780. flex: 1;
  781. display: -webkit-box;
  782. display: -webkit-flex;
  783. display: flex;
  784. -webkit-box-orient: vertical;
  785. -webkit-box-direction: normal;
  786. -webkit-flex-direction: column;
  787. flex-direction: column;
  788. color: #303133;
  789. line-height: 40rpx;
  790. text-align: right;
  791. padding-right: 20rpx;
  792. }
  793. input:disabled {
  794. color: #ccc;
  795. }
  796. .textarea-style{
  797. border: 1px solid #EEEEEE;
  798. width: 100%;
  799. padding:20rpx;
  800. border-radius: 20rpx;
  801. }
  802. .c-row-fj{
  803. padding:20rpx
  804. }
  805. .buns_item{
  806. display: flex;
  807. padding: 80rpx 0 50rpx 0;
  808. justify-content: space-around;
  809. }
  810. .but_css{
  811. background: #22C572;
  812. width: 40%;
  813. padding: 20rpx;
  814. color: #fff;
  815. text-align: center;
  816. border-radius: 20rpx;
  817. }
  818. </style>