edit_quality_testing.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  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.reWaterContent=that.gridList.waterContent
  418. if(that.gridList.buckleMiscellaneous){
  419. that.gridList.reBuckleMiscellaneous=that.gridList.buckleMiscellaneous
  420. }
  421. that.gridList.flag = 1
  422. this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection',that.gridList).then(res => {
  423. if(res.data.code=="200"){
  424. that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {id:that.gridList.id,flag:2}).then(res => {
  425. if(res.data.code=="200"){
  426. that.$api.msg('提交成功!')
  427. setTimeout(function(){
  428. uni.navigateBack({})
  429. },1000)
  430. }else{
  431. that.$api.msg('提交失败')
  432. }
  433. })
  434. }else{
  435. that.$api.msg('提交失败')
  436. }
  437. })
  438. },
  439. waterContentChange() {
  440. var that = this
  441. if (this.gridList.goodsName && this.cangid) {
  442. if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
  443. this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
  444. warehouseId: this.cangid,
  445. goodsName: this.gridList.goodsName
  446. }).then(res => {
  447. that.gridList.dryGrainPrice = res.data.data
  448. })
  449. }
  450. }
  451. if (this.gridList.goodsName) {
  452. for (var i = 0; i < this.purchasePriceList.length; i++) {
  453. if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
  454. this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
  455. this.gridList.paramType = this.purchasePriceList[i].paramType
  456. }
  457. }
  458. }
  459. var numReg = /^[0-9]*$/
  460. var numRe = new RegExp(numReg)
  461. //潮粮单价改变事件
  462. if (
  463. this.gridList.goodsName &&
  464. this.gridList.waterContent &&
  465. this.gridList.grade &&
  466. numRe.test(this.gridList.waterContent)
  467. ) {
  468. this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
  469. warehouseId: this.cangid,
  470. goodsName: this.gridList.goodsName,
  471. waterContent: this.gridList.waterContent,
  472. grade: this.gridList.grade,
  473. }).then(res => {
  474. if (that.gridList.paramType == '1') {
  475. that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
  476. .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
  477. .dryGrainPrice)).toFixed(4)
  478. if (!that.gridList.tidalGrainPrice) {
  479. that.gridList.tidalGrainPrice = ''
  480. }
  481. } else {
  482. that.gridList.tidalGrainPrice = res.data.data
  483. }
  484. })
  485. }
  486. },
  487. goodsPicker(e) {
  488. this.gridList.goodsName = this.goodsList[e[0]].goodsName
  489. },
  490. submit() {
  491. this.gridList.flag = this.flag
  492. // if(this.flag==2){
  493. // this.gridList.reInspector=this.userInfo.userName
  494. // }
  495. var that = this
  496. if (!this.gridList.qualityNo) {
  497. this.$api.msg('编号不能为空')
  498. return
  499. }
  500. if (!this.gridList.binNumber) {
  501. this.$api.msg('仓位不能为空')
  502. return
  503. }
  504. if (!this.gridList.customerName) {
  505. this.$api.msg('客户不能为空')
  506. return
  507. }
  508. if (!this.gridList.storageTagNo) {
  509. this.$api.msg('囤位号不能为空')
  510. return
  511. }
  512. if (this.gridList.storageTagNo.length > 10) {
  513. this.$api.msg('囤位号不能为空')
  514. return
  515. }
  516. if (!this.gridList.carNumber) {
  517. this.$api.msg('车牌号不能为空')
  518. return
  519. }
  520. if (this.gridList.carNumber.length > 7) {
  521. this.$api.msg('车牌号输入错误')
  522. return
  523. }
  524. if (!this.gridList.goodsName) {
  525. this.$api.msg('货名不能为空')
  526. return
  527. }
  528. if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
  529. this.gridList.buckleWeightRatio > 2) {
  530. this.$api.msg('扣重比输入错误')
  531. return
  532. }
  533. if (
  534. this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
  535. String(this.gridList.buckleWeightRatio).length -
  536. (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
  537. this.$api.msg('扣重比输入错误')
  538. return
  539. }
  540. if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
  541. 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
  542. this.$api.msg('初检扣杂输入错误')
  543. return
  544. }
  545. if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
  546. .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
  547. this.$api.msg('复检扣杂输入错误')
  548. return
  549. }
  550. if (!this.gridList.type) {
  551. this.$api.msg('类型不能为空')
  552. return
  553. }
  554. if (!this.gridList.natureOfGrainPurchase) {
  555. this.$api.msg('购粮性质不能为空')
  556. return
  557. }
  558. if (this.value == false || this.flag == 2) {
  559. if (!this.gridList.grade) {
  560. this.$api.msg('等级不能为空')
  561. return
  562. }
  563. if (!this.gridList.impurity) {
  564. this.$api.msg('杂质不能为空')
  565. return
  566. }
  567. if (!this.gridList.waterContent) {
  568. this.$api.msg('初检水分不能为空')
  569. return
  570. }
  571. // if (!this.gridList.reWaterContent) {
  572. // this.$api.msg('复检水分不能为空')
  573. // return
  574. // }
  575. if (!this.gridList.mildewGrain) {
  576. this.$api.msg('霉变粒不能为空')
  577. return
  578. }
  579. if (!this.gridList.bulkDensity) {
  580. this.$api.msg('容重不能为空')
  581. return
  582. }
  583. if (!this.gridList.jiaorenli) {
  584. this.$api.msg('热损伤不能为空')
  585. return
  586. }
  587. if (!this.gridList.imperfectGrain) {
  588. this.$api.msg('不完整粒不能为空')
  589. return
  590. }
  591. }
  592. uni.showModal({
  593. content: "确定提交质检信息?",
  594. showCancel: true,
  595. confirmText: '提交',
  596. success: function(res) {
  597. if (res.confirm) {
  598. that.$api.doRequest('post',
  599. '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
  600. .then(res => {
  601. if (res.data.code == 200) {
  602. that.$api.msg('编辑质检成功')
  603. that.gridList.warehouseId = that.cangid
  604. uni.setStorageSync("quality_print", that.gridList)
  605. console.log('that.gridList', that.gridList)
  606. that.isShowPrint = true
  607. // uni.getStorageSync("depotAcquisition_warehouseName")
  608. // uni.navigateBack({})
  609. }
  610. })
  611. }
  612. }
  613. })
  614. },
  615. gradepicker(e) {
  616. console.log(e)
  617. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  618. this.gridList.grade = this.gradeList[e[0]].value
  619. this.gridList.gradeKey = this.gradeList[e[0]].key
  620. this.waterContentChange()
  621. },
  622. binNumberpicker(e) {
  623. this.gridList.binNumber = this.warehouseList[e[0]].binNumber
  624. },
  625. del(item) {
  626. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
  627. id: item.id
  628. }).then(res => {
  629. if (res.data.code == 200) {
  630. this.$api.msg('删除成功')
  631. } else {
  632. this.$api.msg('系统异常,请联系管理员')
  633. }
  634. })
  635. },
  636. contactUs() {
  637. const that = this
  638. uni.makePhoneCall({
  639. // 手机号
  640. phoneNumber: '18241771147',
  641. // 成功回调
  642. success: (res) => {},
  643. // 失败回调
  644. fail: (res) => {}
  645. });
  646. },
  647. loadData() {
  648. // const that = this
  649. // if(uni.getStorageSync("PageCur")){
  650. // that.PageCur = uni.getStorageSync("PageCur");
  651. // }
  652. // that.userInfoTmp = uni.getStorageSync("userInfo")
  653. // uni.showLoading({
  654. // title: '正在加载',
  655. // mask:true
  656. // })
  657. // that.$api.request('integral', 'getIndexData', failres => {
  658. // that.$api.msg(failres.errmsg)
  659. // uni.hideLoading()
  660. // }).then(res => {
  661. // let data = res.data
  662. // uni.setStorageSync("message", data.message);
  663. // uni.setStorageSync("task", data.task);
  664. // uni.setStorageSync("contract", data.contract);
  665. // uni.setStorageSync('showTran', data.showTran);
  666. // that.showTran = data.showTran
  667. // that.gridList[4].tips = data.task
  668. // that.gridList[2].tips = data.contract
  669. // that.companyId = data.companyId
  670. // uni.hideLoading()
  671. // })
  672. },
  673. confirm() {
  674. const that = this
  675. if (!that.inputContent) {
  676. that.$api.msg('输入不能为空')
  677. return
  678. }
  679. let obj = {}
  680. obj[that.feild] = that.inputContent
  681. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  682. that.userInfo.nickname = that.inputContent
  683. that.inputContent = ''
  684. that.$store.commit('login', that.userInfo)
  685. })
  686. },
  687. cancel() {
  688. this.inputShow = false
  689. this.inputStatus = 'none'
  690. this.genderShow = false
  691. },
  692. myAccount() {
  693. uni.navigateTo({
  694. url: `/pageA/pages/contract`
  695. })
  696. },
  697. /**
  698. * 统一跳转接口,拦截未登录路由
  699. * navigator标签现在默认没有转场动画,所以用view
  700. */
  701. navTo(url) {
  702. if (!this.hasLogin) {
  703. url = '/pages/public/login';
  704. }
  705. uni.navigateTo({
  706. url
  707. })
  708. },
  709. mycarClick(carNo) {
  710. this.modalName = null
  711. uni.navigateTo({
  712. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  713. })
  714. },
  715. scanCode() {
  716. uni.scanCode({
  717. success: function(res) {
  718. uni.navigateTo({
  719. url: res.result
  720. })
  721. }
  722. })
  723. },
  724. hideModal(e) {
  725. this.modalName = null
  726. },
  727. }
  728. }
  729. </script>
  730. <style lang='scss' scoped>
  731. .title_b {
  732. margin: 20rpx 20rpx 0rpx 20rpx;
  733. padding: 20rpx 10rpx 20rpx 10rpx;
  734. font-size: 18px;
  735. font-weight: 550;
  736. }
  737. page {
  738. background: #F5F6FA;
  739. }
  740. .wrap {
  741. padding-bottom: 10px;
  742. font-size: 14px;
  743. background: #fff;
  744. margin: 10px;
  745. border-radius: 10px;
  746. input {
  747. font-size: 14px;
  748. }
  749. >.title {
  750. padding: 10px 16px;
  751. }
  752. .b-b:after {
  753. border-bottom: 1px solid #eee;
  754. }
  755. }
  756. .footer {
  757. background: #fff;
  758. position: fixed;
  759. bottom: 0;
  760. width: 100%;
  761. padding: 20px 10px;
  762. z-index: 10;
  763. .button {
  764. background: #22C572;
  765. width: 90%;
  766. margin: 20rpx auto;
  767. padding: 10px;
  768. color: #fff;
  769. text-align: center;
  770. border-radius: 30px;
  771. }
  772. }
  773. .c-row {
  774. display: -webkit-box;
  775. display: -webkit-flex;
  776. display: flex;
  777. -webkit-box-align: center;
  778. -webkit-align-items: center;
  779. align-items: center;
  780. padding: 20rpx 30rpx;
  781. position: relative;
  782. }
  783. .con-list {
  784. -webkit-box-flex: 1;
  785. -webkit-flex: 1;
  786. flex: 1;
  787. display: -webkit-box;
  788. display: -webkit-flex;
  789. display: flex;
  790. -webkit-box-orient: vertical;
  791. -webkit-box-direction: normal;
  792. -webkit-flex-direction: column;
  793. flex-direction: column;
  794. color: #303133;
  795. line-height: 40rpx;
  796. text-align: right;
  797. padding-right: 20rpx;
  798. }
  799. input:disabled {
  800. color: #ccc;
  801. }
  802. .textarea-style {
  803. border: 1px solid #EEEEEE;
  804. width: 100%;
  805. padding: 20rpx;
  806. border-radius: 20rpx;
  807. }
  808. .c-row-fj {
  809. padding: 20rpx
  810. }
  811. .buns_item {
  812. display: flex;
  813. padding: 80rpx 0 50rpx 0;
  814. justify-content: space-around;
  815. }
  816. .but_css {
  817. background: #22C572;
  818. width: 40%;
  819. padding: 20rpx;
  820. color: #fff;
  821. text-align: center;
  822. border-radius: 20rpx;
  823. }
  824. </style>