edit_quality_testing.vue 23 KB

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