| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)">缓存列表</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)">已上传列表</view> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)"> |
| | | {{ $t("POStockInBillList.cacheList") == "POStockInBillList.cacheList" ? "缓存列表" : $t("POStockInBillList.cacheList") }} |
| | | </view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)"> |
| | | {{ $t("POStockInBillList.updatedList") == "POStockInBillList.updatedList" ? "已上传列表" : $t("POStockInBillList.updatedList") }} |
| | | </view> |
| | | </view> |
| | | |
| | | <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> |
| | | |
| | | <view class="form" v-if="tabs == 0"> |
| | | <view class="buttons" @tap="add"> |
| | | <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons>新增 |
| | | <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons> |
| | | {{ $t("POStockInBillList.btnAdd") == "POStockInBillList.btnAdd" ? "新增" : $t("POStockInBillList.btnAdd") }} |
| | | </view> |
| | | </view> |
| | | <view class="form" v-if="tabs == 1"> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="title">{{ $t("POStockInBillList.billNo") == "POStockInBillList.billNo" ? "单据号:" : $t("POStockInBillList.billNo") }}:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HBillNo" placeholder="请输入单据号" /> |
| | | <input v-model="hform.HBillNo" :placeholder="$t('POStockInBillList.billNoPlaceholder') == 'POStockInBillList.billNoPlaceholder' ? '请输入单据号' : $t('POStockInBillList.billNoPlaceholder')" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单单号:</view> |
| | | <view class="title">{{ $t("POStockInBillList.sourceBillNo") == "POStockInBillList.sourceBillNo" ? "源单单号:" : $t("POStockInBillList.sourceBillNo") }}:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | <input v-model="hform.HSourceBillNo" :placeholder="$t('POStockInBillList.sourceBillNoPlaceholder') == 'POStockInBillList.sourceBillNoPlaceholder' ? '请输入源单单号' : $t('POStockInBillList.sourceBillNoPlaceholder')" /> |
| | | </view> |
| | | </view> |
| | | <view class="buttons"> |
| | | <button class="btn-a" size="mini" type="default" @tap="clear">重置</button> |
| | | <button class="btn-c" size="mini" type="default" @tap="search">查询</button> |
| | | <button class="btn-a" size="mini" type="default" @tap="clear"> |
| | | {{ $t("POStockInBillList.btn_Reset") == "POStockInBillList.btn_Reset" ? "重置" : $t("POStockInBillList.btn_Reset") }} |
| | | </button> |
| | | <button class="btn-c" size="mini" type="default" @tap="search"> |
| | | {{ $t("POStockInBillList.btn_Query") == "POStockInBillList.btn_Query" ? "查询" : $t("POStockInBillList.btn_Query") }} |
| | | </button> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | | <text>{{ $t("POStockInBillList.table_Maker") == "POStockInBillList.table_Maker" ? "制单人:" : $t("POStockInBillList.table_Maker") }}:</text>{{item.制单人}} |
| | | </view> |
| | | <view class="detail" v-if="item.单据内码"> |
| | | <text>单据内码:</text>{{item.单据内码}} |
| | | <text>{{ $t("POStockInBillList.table_BillID") == "POStockInBillList.table_BillID" ? "单据内码:" : $t("POStockInBillList.table_BillID") }}:</text>{{item.单据内码}} |
| | | </view> |
| | | <view class="detail" v-if="item.数量"> |
| | | <text>数量:</text>{{item.数量}} |
| | | <text>{{ $t("POStockInBillList.table_Qty") == "POStockInBillList.table_Qty" ? "数量:" : $t("POStockInBillList.table_Qty") }}:</text>{{item.数量}} |
| | | </view> |
| | | <view class="detail" v-if="item.源单单号"> |
| | | <text>源单单号:</text>{{item.源单单号}} |
| | | <text>{{ $t("POStockInBillList.table_SourceBillNo") == "POStockInBillList.table_SourceBillNo" ? "源单单号:" : $t("POStockInBillList.table_SourceBillNo") }}:</text>{{item.源单单号}} |
| | | </view> |
| | | <view class="detail" v-if="item.组织"> |
| | | <text>组织:</text>{{item.组织}} |
| | | <text>{{ $t("POStockInBillList.table_Org") == "POStockInBillList.table_Org" ? "组织:" : $t("POStockInBillList.table_Org") }}:</text>{{item.组织}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="more"> |
| | | <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>编辑 |
| | | <uni-icons type="compose" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons> |
| | | {{ $t("POStockInBillList.btn_Edit") == "POStockInBillList.btn_Edit" ? "编辑" : $t("POStockInBillList.btn_Edit") }} |
| | | </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>删除 |
| | | <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" size="18"></uni-icons> |
| | | {{ $t("POStockInBillList.btn_Del") == "POStockInBillList.btn_Del" ? "删除" : $t("POStockInBillList.btn_Del") }} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | | <text>{{ $t("POStockInBillList.table_Maker") == "POStockInBillList.table_Maker" ? "制单人:" : $t("POStockInBillList.table_Maker") }}:</text>{{item.制单人}} |
| | | </view> |
| | | <view class="detail" v-if="item.数量"> |
| | | <text>数量:</text>{{item.数量}} |
| | | <text>{{ $t("POStockInBillList.table_Qty") == "POStockInBillList.table_Qty" ? "数量:" : $t("POStockInBillList.table_Qty") }}:</text>{{item.数量}} |
| | | </view> |
| | | <view class="detail" v-if="item.源单单号"> |
| | | <text>源单单号:</text>{{item.源单单号}} |
| | | <text>{{ $t("POStockInBillList.table_SourceBillNo") == "POStockInBillList.table_SourceBillNo" ? "源单单号:" : $t("POStockInBillList.table_SourceBillNo") }}:</text>{{item.源单单号}} |
| | | </view> |
| | | <view class="detail" v-if="item.物料代码"> |
| | | <text>物料代码:</text>{{item.物料代码}} |
| | | <text>{{ $t("POStockInBillList.table_MaterNumber") == "POStockInBillList.table_MaterNumber" ? "物料代码:" : $t("POStockInBillList.table_MaterNumber") }}:</text>{{item.物料代码}} |
| | | </view> |
| | | <view class="detail" v-if="item.物料名称"> |
| | | <text>物料名称:</text>{{item.物料名称}} |
| | | <text>{{ $t("POStockInBillList.table_MaterName") == "POStockInBillList.table_MaterName" ? "物料名称:" : $t("POStockInBillList.table_MaterName") }}:</text>{{item.物料名称}} |
| | | </view> |
| | | <view class="detail" v-if="item.规格型号"> |
| | | <text>规格型号:</text>{{item.规格型号}} |
| | | <text>{{ $t("POStockInBillList.table_MaterModel") == "POStockInBillList.table_MaterModel" ? "规格型号:" : $t("POStockInBillList.table_MaterModel") }}:</text>{{item.规格型号}} |
| | | </view> |
| | | <view class="detail" v-if="item.组织"> |
| | | <text>组织:</text>{{item.组织}} |
| | | <text>{{ $t("POStockInBillList.table_Org") == "POStockInBillList.table_Org" ? "组织:" : $t("POStockInBillList.table_Org") }}:</text>{{item.组织}} |
| | | </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>显示二维码 |
| | | <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons> |
| | | {{ $t("POStockInBillList.btn_DisplayCode") == "POStockInBillList.btn_DisplayCode" ? "显示二维码" : $t("POStockInBillList.btn_DisplayCode") }} |
| | | </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>撤销 |
| | | <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons> |
| | | {{ $t("POStockInBillList.btn_Revoke") == "POStockInBillList.btn_Revoke" ? "撤销" : $t("POStockInBillList.btn_Revoke") }} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </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> |
| | | <view class="over" v-if="listData.length == 0"> |
| | | {{ $t("POStockInBillList.noDate") == "POStockInBillList.noDate" ? "暂无数据" : $t("POStockInBillList.noDate") }} |
| | | </view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length != showList.length"> |
| | | {{ $t("POStockInBillList.Loading") == "POStockInBillList.Loading" ? "加载中..." : $t("POStockInBillList.Loading") }} |
| | | </view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length == showList.length"> |
| | | {{ $t("POStockInBillList.bottom") == "POStockInBillList.bottom" ? "已到底" : $t("POStockInBillList.bottom") }} |
| | | </view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | tabs: 0, |
| | | urls: '/WEBSController/GetKf_PonderationBillMain_TempList_New_Json', |
| | | MvarReportTitle: '采购入库单缓存列表', |
| | | MvarReportTitle: this.$t('POStockInBillList.reportTitle') == 'POStockInBillList.reportTitle' ? '采购入库单缓存列表' : this.$t('POStockInBillList.reportTitle'), |
| | | hform: { |
| | | HBillNo: '', |
| | | HSourceBillNo: '', |
| | |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | title: this.$t('POStockInBillList.requestFailed') == 'POStockInBillList.requestFailed' ? '接口请求失败' : this.$t('POStockInBillList.requestFailed'), |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | getList() { |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | title: this.$t('POStockInBillList.loadingTitle') == 'POStockInBillList.loadingTitle' ? '加载中...' : this.$t('POStockInBillList.loadingTitle') |
| | | }) |
| | | uni.request({ |
| | | url: this.serverUrl + this.urls, |
| | |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | title: this.$t('POStockInBillList.requestFailed') == 'POStockInBillList.requestFailed' ? '接口请求失败' : this.$t('POStockInBillList.requestFailed'), |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | title: this.$t('POStockInBillList.requestFailed') == 'POStockInBillList.requestFailed' ? '接口请求失败' : this.$t('POStockInBillList.requestFailed'), |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | //删除 |
| | | del(item) { |
| | | // console.log(item.hmainid,uni.getStorageSync('HUserName')) |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除记录?删除后不能恢复', |
| | | title: this.$t('POStockInBillList.confirmTitle') == 'POStockInBillList.confirmTitle' ? '提示' : this.$t('POStockInBillList.confirmTitle'), |
| | | content: this.$t('POStockInBillList.delConfirm') == 'POStockInBillList.delConfirm' ? '确认要删除记录?删除后不能恢复' : this.$t('POStockInBillList.delConfirm'), |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | title: this.$t('POStockInBillList.requestFailed') == 'POStockInBillList.requestFailed' ? '接口请求失败' : this.$t('POStockInBillList.requestFailed'), |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | //撤销 |
| | | revoke(item) { |
| | | // console.log(item.hmainid,uni.getStorageSync('HUserName')) |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '是否确认撤销', |
| | | title: this.$t('POStockInBillList.confirmTitle') == 'POStockInBillList.confirmTitle' ? '提示' : this.$t('POStockInBillList.confirmTitle'), |
| | | content: this.$t('POStockInBillList.revokeConfirm') == 'POStockInBillList.revokeConfirm' ? '是否确认撤销' : this.$t('POStockInBillList.revokeConfirm'), |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | title: this.$t('POStockInBillList.requestFailed') == 'POStockInBillList.requestFailed' ? '接口请求失败' : this.$t('POStockInBillList.requestFailed'), |
| | | icon: 'none' |
| | | }) |
| | | }, |