edit_quality_testing.vue 22 KB

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