| | |
| | | </view> |
| | | </view> |
| | | <u-toast ref="uToast"></u-toast> |
| | | <view class="cardList"> |
| | | <view class="cardList" v-if="user.useProd == 1"> |
| | | <view class="switchPanel"> |
| | | <view class="switchBtns"> |
| | | <view class="btnItem" @click="changeTab(1)"> |
| | |
| | | postHazmatUse, |
| | | postHazmatUsed, |
| | | postHazmatDiscard, |
| | | postProductDiscard, getProductByCode, postProductSold |
| | | postProductDiscard, getProductByCode, postProductSold, |
| | | getUserInfo |
| | | } from '../../../api/index.js' |
| | | import VUE_APP_BASE_URL from 'common/constant.js' |
| | | import take from '../../../static/take.png' |
| | |
| | | id: null, |
| | | remaining: '' |
| | | }, |
| | | user: {}, |
| | | rules: { |
| | | remaining: { |
| | | type: 'string', |
| | |
| | | } |
| | | }, |
| | | tabNum: 1, |
| | | blockText: '原材料', |
| | | blockText: '危化品', |
| | | blockStyle: { |
| | | transform: 'translateX(0px)' |
| | | } |
| | |
| | | }, |
| | | created(){ |
| | | uni.hideTabBar() |
| | | this.getUserInfo() |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | getUserInfo(){ |
| | | getUserInfo().then(res => { |
| | | if(res.code == 200) { |
| | | this.user = res.data |
| | | uni.setStorageSync('userSet', res.data) |
| | | }else{ |
| | | uni.$u.toast(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | scanCode(title){ |
| | | const t = this |
| | | t.modalTitle = title |
| | |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | t.showModal = false |
| | | t.closeModal() |
| | | }, |
| | | |
| | | confirmBack() { |
| | |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | t.showModal = false |
| | | t.hazmatBack.remaining = '' |
| | | t.closeModal() |
| | | }).catch(errors => { |
| | | uni.$u.toast('请完善必填信息') |
| | | }) |
| | |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | t.showModal = false |
| | | t.closeModal() |
| | | }, |
| | | |
| | | confirmSell(){ |
| | |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | t.showModal = false |
| | | t.closeModal() |
| | | }, |
| | | |
| | | confirmCancle(){ |
| | |
| | | }) |
| | | }) |
| | | } |
| | | t.showModal = false |
| | | t.closeModal() |
| | | }, |
| | | |
| | | closeModal(){ |