完成 采购入库单 采购入库单缓存的 二维码预览 改造 添加 二维码预览组件
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <uni-popup ref="BarCodePopup" type="center" @change="onPupupStateChangeHandler"> |
| | | <view class="content"> |
| | | <view class="title"> |
| | | {{ title }} |
| | | </view> |
| | | <view class="img"> |
| | | <canvas id="barcodeCanvas" canvas-id="barcodeCanvas" style="width: 200px;height: 200px;"></canvas> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import UQRCode from 'uqrcodejs' |
| | | export default { |
| | | name: "BarCodePopup", |
| | | data() { |
| | | return { |
| | | imgSrc: '', |
| | | title: '', |
| | | }; |
| | | }, |
| | | methods: { |
| | | open() { |
| | | this.$refs.BarCodePopup.open() |
| | | }, |
| | | async onPupupStateChangeHandler(e) { |
| | | console.log('e: ',e); |
| | | if (e.show === true) { |
| | | // this.getBillList() |
| | | await this.$nextTick() |
| | | await this.initCanvas() |
| | | } else { |
| | | // 清理资源 |
| | | this.title = '' |
| | | } |
| | | }, |
| | | async initCanvas() { |
| | | // 触发初始化canvas事件 |
| | | let title = this.title |
| | | return new Promise((resolve, reject) => { |
| | | let qr = new UQRCode(); |
| | | // 设置二维码内容 |
| | | qr.data = title; |
| | | let canvasContext = uni.createCanvasContext('barcodeCanvas', this); // 如果是组件,this必须传入 |
| | | console.log('qr: ',qr); |
| | | // 设置二维码大小,必须与canvas设置的宽高一致 |
| | | qr.size = 200; |
| | | // 调用制作二维码方法 |
| | | qr.make(); |
| | | // 设置uQRCode实例的canvas上下文 |
| | | qr.canvasContext = canvasContext; |
| | | // 调用绘制方法将二维码图案绘制到canvas上 |
| | | qr.drawCanvas(); |
| | | this.$forceUpdate() |
| | | resolve() |
| | | }) |
| | | }, |
| | | async setCodeInfo(title) { |
| | | this.title = title |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .content { |
| | | box-sizing: border-box; |
| | | padding: 20rpx; |
| | | background-color: #fff; |
| | | // height: 400rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | } |
| | | </style> |
| | |
| | | "@psdk/tspl": "^0.6.1", |
| | | "echarts": "^5.6.0", |
| | | "i": "^0.3.7", |
| | | "npm": "^9.5.1" |
| | | "npm": "^9.5.1", |
| | | "qrcode": "^1.5.4", |
| | | "uqrcodejs": "^4.0.7" |
| | | } |
| | | } |
| | |
| | | <view class="righton"> |
| | | <input name="HBillNo" disabled v-model="hform.HBillNo" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="scan" size="20" @click="qrCodeDisplay"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据ID:</view> |
| | |
| | | </view> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType" |
| | | :HStockOrgID="hform.HStockOrgID"></BillListPopupVue> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | | <script> |
| | |
| | | getUserStockRelation |
| | | } from "@/utils/userRelationManager.js" |
| | | import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue'; |
| | | import QRCode from 'qrcode' |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }, |
| | | components: { |
| | | BillListPopupVue |
| | | BillListPopupVue, BarCodePopupVue |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | async qrCodeDisplay() { |
| | | try { |
| | | this.$refs.barcodePopup.setCodeInfo(this.hform.HBillNo) |
| | | this.$refs.barcodePopup.open() |
| | | }catch(err) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: err |
| | | }) |
| | | } |
| | | }, |
| | | async getRelationStore() { |
| | | let { |
| | | data, |
| | |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | // setTimeout(() => { |
| | | // uni.navigateBack(); |
| | | // }, 50) |
| | | } |
| | | } |
| | | }); |
| | |
| | | <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> |
| | | |
| | | <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0"> |
| | | <uni-card :title="item.制单日期.substr(0,10)" :extra="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> |
| | | <uni-card :title="item.制单日期.substr(0,10)" :extra="item.单据号" style="margin: 10px;" |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | |
| | | </uni-card> |
| | | </view> |
| | | <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==1"> |
| | | <uni-card :title="item.日期" :extra="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> |
| | | <uni-card :title="item.日期" :extra="item.单据号" style="margin: 10px;" |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | |
| | | </view> |
| | | |
| | | <view class="more"> |
| | | <view class="part" style="color: #3a78ff;width: 100%;" @tap.stop="qrCodeDisplay(item)"> |
| | | <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>显示二维码 |
| | | </view> |
| | | <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)"> |
| | | <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>撤销 |
| | | </view> |
| | |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length != showList.length">加载中...</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length == showList.length">已到底</view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getUserInfo } from "@/utils/auth.js"; |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import QRCode from 'qrcode' |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | page:1, |
| | | } |
| | | }, |
| | | components: { |
| | | BarCodePopupVue |
| | | }, |
| | | onLoad() { |
| | | //用户模块权限判断 |
| | | this.CheckModRight() |
| | |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | async qrCodeDisplay(item) { |
| | | this.$refs.barcodePopup.setCodeInfo(item.HBillNo) |
| | | await this.$nextTick() |
| | | this.$refs.barcodePopup.open() |
| | | }, |
| | | CheckModRight(){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/CheckModRight_Json', |
| | |
| | | console.log(item) |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/TempList_Modify_Json', |
| | | data:{ "HInterID": item.HInterID, "HBillNo": item.单据号, "HBillType": this.hform.HBillType }, |
| | | data: { |
| | | "HInterID": item.HInterID, |
| | | "HBillNo": item.单据号, |
| | | "HBillType": this.hform.HBillType |
| | | }, |
| | | success: (res) => { |
| | | console.log(1,res); |
| | | if(res.data.count == 1){ |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/set_DelPonderationBillMain_Temp_New_Json', |
| | | url: this.serverUrl + |
| | | '/WEBSController/set_DelPonderationBillMain_Temp_New_Json', |
| | | data:{ |
| | | HInterID: item.HInterID, |
| | | HBillNo: item.单据号, |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/set_DeleteICStockBillAndWMS_Json', |
| | | url: this.serverUrl + |
| | | '/WEBSController/set_DeleteICStockBillAndWMS_Json', |
| | | data:{ |
| | | HInterID: item.HInterID, |
| | | HBillNo: item.单据号, |
| | |
| | | margin: 20rpx auto; |
| | | margin-top: 90rpx; |
| | | } |
| | | |
| | | .tabs{ |
| | | width: 100%; |
| | | position: fixed; |
| | |
| | | z-index: 9; |
| | | display: flex; |
| | | background-color: #e5e5e5; |
| | | |
| | | view{ |
| | | width: 50%; |
| | | font-size: 30rpx; |
| | |
| | | text-align: center; |
| | | padding: 16rpx 0; |
| | | } |
| | | |
| | | .on{ |
| | | color: #3a78ff; |
| | | font-weight: bold; |
| | | border-bottom: 3px solid #3a78ff; |
| | | } |
| | | } |
| | | |
| | | .buttons{ |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: 20rpx; |
| | | |
| | | button{ |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a{ |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-b{ |
| | | background-color: #41a863; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c{ |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .form-item{ |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | padding: 6rpx 0; |
| | | |
| | | .title{ |
| | | width: 180rpx; |
| | | |
| | | text{ |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .right{ |
| | | width: 450rpx; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | } |
| | | |
| | | .righton{ |
| | | width: 450rpx; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | } |
| | | |
| | | input{ |
| | | width: 100%; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .list{ |
| | | width: 100%; |
| | | |
| | | .card-detail{ |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail{ |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text{ |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .more{ |
| | | color: #888; |
| | | font-size: 26rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part{ |
| | | width: 50%; |
| | | display: flex;align-items: center;justify-content: center; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | </view> |
| | | |
| | | <view class="more"> |
| | | <!-- <view class="part" style="color: #3a78ff;width: 100%;" @tap.stop="qrCodeDisplay(item)"> |
| | | <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>显示二维码 |
| | | </view> --> |
| | | <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)"> |
| | | <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>撤销 |
| | | </view> |
| | |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length != showList.length">加载中...</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length == showList.length">已到底</view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getUserInfo } from "@/utils/auth.js"; |
| | | import QRCode from 'qrcode' |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | page:1, |
| | | } |
| | | }, |
| | | components: {BarCodePopupVue}, |
| | | onLoad() { |
| | | //用户模块权限判断 |
| | | this.CheckModRight() |
| | |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | async qrCodeDisplay(item) { |
| | | try { |
| | | let link = await QRCode.toDataURL(item.HBillNo) |
| | | this.$refs.barcodePopup.setCodeInfo(link, item.HBillNo) |
| | | this.$refs.barcodePopup.open() |
| | | }catch(err) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: err |
| | | }) |
| | | } |
| | | }, |
| | | CheckModRight(){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/CheckModRight_Json', |
| | |
| | | </view> |
| | | |
| | | <view class="more"> |
| | | <!-- <view class="part" style="color: #3a78ff;width: 100%;" @tap.stop="qrCodeDisplay(item)"> |
| | | <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>显示二维码 |
| | | </view> --> |
| | | <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)"> |
| | | <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>撤销 |
| | | </view> |
| | |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length != showList.length">加载中...</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length == showList.length">已到底</view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common.js" |
| | | import QRCode from 'qrcode' |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | page: 1, |
| | | } |
| | | }, |
| | | components: {BarCodePopupVue}, |
| | | onLoad() { |
| | | //用户模块权限判断 |
| | | this.CheckModRight() |
| | |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | async qrCodeDisplay(item) { |
| | | try { |
| | | let link = await QRCode.toDataURL(item.HBillNo) |
| | | this.$refs.barcodePopup.setCodeInfo(link, item.HBillNo) |
| | | this.$refs.barcodePopup.open() |
| | | }catch(err) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: err |
| | | }) |
| | | } |
| | | }, |
| | | CheckModRight() { |
| | | CommonUtils.doRequest( |
| | | "/WEBSController/CheckModRight_Json", { |
| | |
| | | </view> |
| | | |
| | | <view class="more"> |
| | | <!-- <view class="part" style="color: #3a78ff;width: 100%;" @tap.stop="qrCodeDisplay(item)"> |
| | | <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>显示二维码 |
| | | </view> --> |
| | | <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)"> |
| | | <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>撤销 |
| | | </view> |
| | |
| | | <view class="over" v-if="!listData || listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length != showList.length">加载中...</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length == showList.length">已到底</view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getUserInfo } from "@/utils/auth.js"; |
| | | import QRCode from 'qrcode' |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | page:1, |
| | | } |
| | | }, |
| | | components: {BarCodePopupVue}, |
| | | onShow() { |
| | | //用户模块权限判断 |
| | | this.CheckModRight() |
| | |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | async qrCodeDisplay(item) { |
| | | try { |
| | | let link = await QRCode.toDataURL(item.HBillNo) |
| | | this.$refs.barcodePopup.setCodeInfo(link, item.HBillNo) |
| | | this.$refs.barcodePopup.open() |
| | | }catch(err) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: err |
| | | }) |
| | | } |
| | | }, |
| | | CheckModRight(){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/CheckModRight_Json', |
| | |
| | | </view> |
| | | |
| | | <view class="more"> |
| | | <view class="part" style="border-right: 1px solid #eee;color: #3a78ff;" @tap.stop="edit(item)"> |
| | | <!-- <view class="part" style="border-right: 1px solid #eee;color: #3a78ff;" @tap.stop="edit(item)"> |
| | | <uni-icons type="compose" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>编辑 |
| | | </view> |
| | | </view> --> |
| | | <view class="part" style="color: #da0000;" @tap.stop="del(item)"> |
| | | <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" size="18"></uni-icons>删除 |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <view class="more"> |
| | | <view class="part" style="color: #3a78ff;width: 100%;" @tap.stop="qrCodeDisplay(item)"> |
| | | <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>显示二维码 |
| | | </view> |
| | | <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)"> |
| | | <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>撤销 |
| | | </view> |
| | |
| | | <view class="over" v-if="!listData || listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length != showList.length">加载中...</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length == showList.length">已到底</view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getUserInfo } from "@/utils/auth.js"; |
| | | import QRCode from 'qrcode' |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | page:1, |
| | | } |
| | | }, |
| | | components: {BarCodePopupVue}, |
| | | onShow() { |
| | | //用户模块权限判断 |
| | | this.CheckModRight() |
| | |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | async qrCodeDisplay(item) { |
| | | try { |
| | | let link = await QRCode.toDataURL(item.HBillNo) |
| | | this.$refs.barcodePopup.setCodeInfo(link, item.HBillNo) |
| | | this.$refs.barcodePopup.open() |
| | | }catch(err) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: err |
| | | }) |
| | | } |
| | | }, |
| | | CheckModRight(){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/CheckModRight_Json', |
| | |
| | | <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> |
| | | |
| | | <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0"> |
| | | <uni-card :title="item.制单日期.substr(0,10)" :extra="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> |
| | | <uni-card :title="item.制单日期.substr(0,10)" :extra="item.单据号" style="margin: 10px;" |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | |
| | | </uni-card> |
| | | </view> |
| | | <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==1"> |
| | | <uni-card :title="item.日期" :extra="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> |
| | | <uni-card :title="item.日期" :extra="item.单据号" style="margin: 10px;" |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | |
| | | </view> |
| | | |
| | | <view class="more"> |
| | | <!-- <view class="part" style="color: #3a78ff;width: 100%;" @tap.stop="qrCodeDisplay(item)"> |
| | | <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>显示二维码 |
| | | </view> --> |
| | | <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)"> |
| | | <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>撤销 |
| | | </view> |
| | |
| | | <view class="over" v-if="!listData || listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length != showList.length">加载中...</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length == showList.length">已到底</view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getUserInfo } from "@/utils/auth.js"; |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import QRCode from 'qrcode' |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | page:1, |
| | | } |
| | | }, |
| | | components: { |
| | | BarCodePopupVue |
| | | }, |
| | | onShow() { |
| | | //用户模块权限判断 |
| | | this.CheckModRight() |
| | |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | async qrCodeDisplay(item) { |
| | | try { |
| | | let link = await QRCode.toDataURL(item.HBillNo) |
| | | this.$refs.barcodePopup.setCodeInfo(link, item.HBillNo) |
| | | this.$refs.barcodePopup.open() |
| | | }catch(err) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: err |
| | | }) |
| | | } |
| | | }, |
| | | CheckModRight(){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/CheckModRight_Json', |
| | |
| | | console.log(item) |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/TempList_Modify_Json', |
| | | data:{ "HInterID": item.HInterID, "HBillNo": item.单据号, "HBillType": this.hform.HBillType }, |
| | | data: { |
| | | "HInterID": item.HInterID, |
| | | "HBillNo": item.单据号, |
| | | "HBillType": this.hform.HBillType |
| | | }, |
| | | success: (res) => { |
| | | console.log(1,res); |
| | | if(res.data.count == 1){ |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/set_DelPonderationBillMain_Temp_New_Json', |
| | | url: this.serverUrl + |
| | | '/WEBSController/set_DelPonderationBillMain_Temp_New_Json', |
| | | data:{ |
| | | HInterID: item.HInterID, |
| | | HBillNo: item.单据号, |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/set_DeleteICStockBillAndWMS_Json', |
| | | url: this.serverUrl + |
| | | '/WEBSController/set_DeleteICStockBillAndWMS_Json', |
| | | data:{ |
| | | HInterID: item.HInterID, |
| | | HBillNo: item.单据号, |
| | |
| | | margin: 20rpx auto; |
| | | margin-top: 90rpx; |
| | | } |
| | | |
| | | .tabs{ |
| | | width: 100%; |
| | | position: fixed; |
| | |
| | | z-index: 9; |
| | | display: flex; |
| | | background-color: #e5e5e5; |
| | | |
| | | view{ |
| | | width: 50%; |
| | | font-size: 30rpx; |
| | |
| | | text-align: center; |
| | | padding: 16rpx 0; |
| | | } |
| | | |
| | | .on{ |
| | | color: #3a78ff; |
| | | font-weight: bold; |
| | | border-bottom: 3px solid #3a78ff; |
| | | } |
| | | } |
| | | |
| | | .buttons{ |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: 20rpx; |
| | | |
| | | button{ |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a{ |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-b{ |
| | | background-color: #41a863; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c{ |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .form-item{ |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | padding: 6rpx 0; |
| | | |
| | | .title{ |
| | | width: 180rpx; |
| | | |
| | | text{ |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .right{ |
| | | width: 450rpx; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | } |
| | | |
| | | .righton{ |
| | | width: 450rpx; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | } |
| | | |
| | | input{ |
| | | width: 100%; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .list{ |
| | | width: 100%; |
| | | |
| | | .card-detail{ |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail{ |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text{ |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .more{ |
| | | color: #888; |
| | | font-size: 26rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part{ |
| | | width: 50%; |
| | | display: flex;align-items: center;justify-content: center; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | </style> |