edit_quality_testing.vue 21 KB

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