edit_quality_testing.vue 24 KB

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