edit_quality_testing.vue 23 KB

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