add_quality_testing.vue 23 KB

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