| New file |
| | |
| | | <template> |
| | | <view class="page" id="pageContent"> |
| | | <view class="search-condition-zone"> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 条码: |
| | | </view> |
| | | <view class="right general"> |
| | | <input type="text" v-model="hform.HBarCode" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 仓库: |
| | | </view> |
| | | <view class="right general"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="onArrayHWHNameChangeHandler"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 仓位: |
| | | </view> |
| | | <view class="right general" v-show="HIsStockMgr"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="onArrayHStockPlaceNameChangeHandler"></uni-combox> |
| | | </view> |
| | | <view class="right disabled" v-show="!HIsStockMgr"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!HIsStockMgr" placeholder="不可操作" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="button-zone"> |
| | | <button type="default" class="btn-a" size="mini" @tap="cmdSearch">查询</button> |
| | | <button type="default" class="btn-c" size="mini" @tap="exit">退出</button> |
| | | </view> |
| | | <view class="info-list-zone"> |
| | | <view class="card-item" v-for="(item, index) in listDataShow"> |
| | | <uni-card :title="item['物料代码']" :extra="'数量: ' + item['数量']" note="Tips"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item['仓库']"> |
| | | <text>仓库:</text>{{item['仓库']}} |
| | | </view> |
| | | <view class="detail" v-if="item['仓位']"> |
| | | <text>仓位:</text>{{item['仓位']}} |
| | | </view> |
| | | <view class="detail" v-if="item['物料名称']"> |
| | | <text>物料名称:</text>{{item['物料名称']}} |
| | | </view> |
| | | <view class="detail" v-if="item['规格型号']"> |
| | | <text>规格型号:</text>{{item['规格型号']}} |
| | | </view> |
| | | <view class="detail" v-if="item['批次']"> |
| | | <text>批次:</text>{{item['批次']}} |
| | | </view> |
| | | <view class="detail" v-if="item['辅助属性']"> |
| | | <text>辅助属性:</text>{{item['辅助属性']}} |
| | | </view> |
| | | <view class="detail" v-if="item['生产日期']"> |
| | | <text>生产日期:</text>{{item['生产日期']}} |
| | | </view> |
| | | <view class="detail" v-if="item['有效期至']"> |
| | | <text>有效期至:</text>{{item['有效期至']}} |
| | | </view> |
| | | <view class="detail" v-if="item['组织']"> |
| | | <text>组织:</text>{{item['组织']}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | </view> |
| | | <view class="pagination-zone"> |
| | | <uni-pagination show-icon :page-size="paginationMeta.pageSize" :total="paginationMeta.total" :current="paginationMeta.current" |
| | | @change="onPaginationChangeHandler"></uni-pagination> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common' |
| | | import { |
| | | getUserInfo |
| | | } from '../../utils/auth' |
| | | export default { |
| | | data() { |
| | | return { |
| | | navHeight: 0, |
| | | HWHNameList: [], |
| | | arrayHWHName: [], |
| | | HStockPlaceNameList: [], |
| | | arrayHStockPlaceName: [], |
| | | HIsStockMgr: false, |
| | | scrollTop: 0, |
| | | |
| | | hform: { |
| | | HBarCode: '', |
| | | HWHName: '', |
| | | HWHID: 0, |
| | | HStockPlaceName: '', |
| | | HStockPlaceID: 0, |
| | | }, |
| | | |
| | | paginationMeta: { |
| | | current: 1, |
| | | total: 0, |
| | | pageSize: 30, |
| | | }, |
| | | |
| | | listData: [], |
| | | listDataShow: [], |
| | | } |
| | | }, |
| | | methods: { |
| | | exit() { |
| | | uni.navigateBack() |
| | | }, |
| | | onArrayHWHNameChangeHandler(e) { |
| | | let index = this.HWHNameList.findIndex(p => p.HName == e) |
| | | if (index != -1) { |
| | | this.hform.HWHID = this.HWHNameList[index].HItemID |
| | | this.HIsStockMgr = this.HWHNameList[index].HIsStockMgr |
| | | } |
| | | }, |
| | | getWHInfo() { |
| | | CommonUtils.doRequest( |
| | | "/Web/GetWarehouseList_Json_New", { |
| | | Warehouse: "", |
| | | HOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HWHNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHWHName[i] = data[i]["HName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓库数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | }, |
| | | onArrayHStockPlaceNameChangeHandler() { |
| | | let index = this.HStockPlaceNameList.findIndex(p => p.HName == e) |
| | | if (index != -1) { |
| | | this.hform.HStockPlaceID = this.HStockPlaceNameList[index].HItemID |
| | | } |
| | | }, |
| | | getStockPlaceInfo() { |
| | | CommonUtils.doRequest( |
| | | "/WEBSController/GetStockPlaceList_Json", { |
| | | StockPlace: '', |
| | | HWhID: this.hform.HWHID, |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | console.log(res1) |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HStockPlaceNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = data[i]["HWhName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | }, |
| | | cmdSearch() { |
| | | if (this.hform.HWHName == '') { |
| | | this.hform.HWHID = 0 |
| | | } |
| | | |
| | | if (this.hform.HStockPlaceName == '') { |
| | | this.hform.HStockPlaceID = 0 |
| | | } |
| | | |
| | | CommonUtils.doRequest2({ |
| | | url: '/KF_ICInventoryByMaterID/GetBillEntry_TmpList_Pack1', |
| | | data: { |
| | | "HBarCode": this.hform.HBarCode, |
| | | "sHWHID": this.hform.HWHID, |
| | | "sHSPID": this.hform.HStockPlaceID, |
| | | "HOWNERID": uni.getStorageSync('OrganizationID'), |
| | | "sWhere": '' |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count > 0) { |
| | | this.listData = data |
| | | this.paginationMeta.total = data.length |
| | | this.onPaginationChangeHandler({ |
| | | current: 1 |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | async onPaginationChangeHandler({ |
| | | current |
| | | }) { |
| | | this.listDataShow = |
| | | this.listData.slice((current - 1) * this.paginationMeta.pageSize, |
| | | current * this.paginationMeta.pageSize) |
| | | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getWHInfo() |
| | | this.getStockPlaceInfo() |
| | | |
| | | this.$nextTick(() => { |
| | | this.cmdSearch() |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .page { |
| | | height: calc(100vh - 44px); |
| | | box-sizing: border-box; |
| | | padding: 20rpx 10rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10rpx; |
| | | position: relative; |
| | | |
| | | .button-zone { |
| | | height: auto; |
| | | box-sizing: border-box; |
| | | padding-top: 20rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c { |
| | | background-color: #ff5722; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .search-condition-zone { |
| | | height: auto; |
| | | box-sizing: border-box; |
| | | padding: 0 60rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20rpx; |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 20rpx; |
| | | align-items: center; |
| | | |
| | | .left { |
| | | width: 4rem; |
| | | } |
| | | |
| | | .right { |
| | | flex: 1; |
| | | padding: 8rpx 16rpx; |
| | | |
| | | .search { |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | } |
| | | |
| | | .general { |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | } |
| | | |
| | | .disabled { |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | } |
| | | |
| | | .uni-combox { |
| | | box-sizing: border-box; |
| | | padding: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .info-list-zone { |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | |
| | | .card-item { |
| | | .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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .pagination-zone { |
| | | height: 80rpx; |
| | | } |
| | | } |
| | | </style> |