Browse Source

修改查询物料号添加库位和状态,修改扫描后清空

hella_online_20240829
lijuncheng 2 months ago
parent
commit
1ff926df13
  1. 31
      src/api/request2.js
  2. 23
      src/common/basic.js
  3. 26
      src/common/directory.js
  4. 10
      src/mycomponents/balance/bussinessType.vue
  5. 149
      src/mycomponents/item/itemFilter.vue
  6. 4
      src/mycomponents/scan/winCheckFgLabel.vue
  7. 2
      src/mycomponents/scan/winScanAsnNumber.vue
  8. 2
      src/mycomponents/scan/winScanContainer.vue
  9. 2
      src/mycomponents/scan/winScanItem.vue
  10. 2
      src/mycomponents/scan/winScanJobNumber.vue
  11. 23
      src/pages.json
  12. 8
      src/pages/index/index.vue
  13. 10
      src/pages/query/coms/comItemBalance.vue
  14. 99
      src/pages/query/coms/comItemDetailCard.vue
  15. 19
      src/pages/query/coms/comLocationDetailCard.vue
  16. 367
      src/pages/query/item.vue
  17. 11
      src/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue

31
src/api/request2.js

@ -230,16 +230,18 @@ export function getBusinesstypeByCode(code) {
});
}
/**
* 按物料代码查询库存明细
* 按物品查询库存
* @param {*} itemCode
*
*/
export function getBalanceByItemCode(params) {
return request({
url: baseApi + "/wms/balance/page",
method: "get",
url: baseApi + "/wms/balance/seniorAll",
method: "post",
data: params,
});
}
@ -251,8 +253,8 @@ export function getBalanceByItemCode(params) {
*/
export function getExpectinByItemcode(params) {
return request({
url: baseApi + "/wms/expectin/page",
method: "get",
url: baseApi + "/wms/expectin/senior",
method: "post",
data: params,
});
}
@ -264,8 +266,8 @@ export function getExpectinByItemcode(params) {
*/
export function getExpectoutByItemcode(params) {
return request({
url: baseApi + "/wms/expectout/page",
method: "get",
url: baseApi + "/wms/expectout/senior",
method: "post",
data: params,
});
}
@ -4207,3 +4209,16 @@ export function getBalanceByParams(data) {
data:data
});
}
/**
* 获取业务类型
* @param {*}
*/
export function getBusinessType() {
return request({
url: baseApi + "/wms/businesstype/page?pageSize=1000&pageNo=1",
method: "get",
data:{}
});
}

23
src/common/basic.js

@ -18,7 +18,7 @@ let unplannedIissueReason = [];
let scrapReasonList = [];
let inspectFailedReasonList = [];
let switchList=[]
let businessList=[]
//获取字典信息
@ -36,6 +36,7 @@ export function clearCacheData() {
scrapReasonList = [];
inspectFailedReasonList = [];
switchList=[]
businessList=[]
}
@ -355,6 +356,26 @@ export function getSwitchInfoByCode(code) {
return isCheck;
}
//获取业务类型名称
export function getBusinessTypeName(code) {
var resultInfo = null
if (businessList.length == 0) {
businessList = uni.getStorageSync("businessType")
}
for (let item of businessList) {
if (item.code == code) {
resultInfo = item
break;
}
}
return resultInfo.name;
}

26
src/common/directory.js

@ -20,6 +20,7 @@ let sampleMethodList = [];
let transferModeList = [];
let countStageList = [];
let locationAreaTypeList = [];
let businessList=[]
@ -60,6 +61,7 @@ export function clearCacheData() {
transferModeList = [];
countStageList = [];
locationAreaTypeList=[]
businessList=[]
}
//获取字典信息
@ -225,6 +227,22 @@ export function getItemStateInfo(value) {
return resultInfo
}
//获取业务类型名称
export function getBusinessTypeName(code) {
var resultInfo = null
if (businessList.length == 0) {
businessList = uni.getStorageSync("businessType")
}
for (let item of businessList) {
if (item.code == code) {
resultInfo = item
break;
}
}
return resultInfo.name;
}
//获取库区类型
export function getLocationAreaTypeInfo(value) {
var resultInfo = "";
@ -335,6 +353,14 @@ export function getRequestStateInfo(value) {
return resultInfo
}
//获取库存状态集合
export function getInventoryStatusList() {
if (inventoryStatusList.length == 0) {
inventoryStatusList = getDirectoryInfo("inventory_status")
}
return inventoryStatusList
}
//获取库存状态
export function getInventoryStatusInfo(value) {

10
src/mycomponents/balance/bussinessType.vue

@ -1,13 +1,14 @@
<template>
<view class="business_view">
<text class="card_business">{{businessTypeDesc(bussinessType)}}</text>
<text class="card_business_content">{{number}}</text>
<text class="card_business">业务类型</text>
<text class="card_business_content">{{businessTypeDesc(bussinessType)}}</text>
</view>
</template>
<script>
import {
getBusinessTypeDesc
getBusinessTypeName,
} from '@/common/directory.js';
export default {
data() {
@ -25,7 +26,8 @@
},
methods:{
businessTypeDesc(type){
return getBusinessTypeDesc(type)
// return"1"
return getBusinessTypeName(type)
}
}

149
src/mycomponents/item/itemFilter.vue

@ -0,0 +1,149 @@
<template>
<uni-popup ref="popup">
<view class="maskbox" @tap="maskClick"></view>
<view class="uni-flex uni-column "
style="background-color: white;width: 100%; height:auto;padding: 20rpx;z-index: 99;position: relative; border-radius: 10rpx;">
<view class="uni-flex" style="justify-content: center; font-size: 35rpx; font-weight: bold;" >
筛选条件
</view>
<view class="uni-flex " style=" flex-direction: column; width: 100%;margin-top: 10rpx;">
<view class="" style="font-size: 35rpx; margin-bottom: 10rpx;">
库位
</view>
<u-input style="margin-left: 0rpx;" confirmType="search" v-model="locationCode" :border="true"
placeholder="请输入库位" :focus="true"/>
</view>
<view class="" style="font-size: 35rpx; margin-top: 10rpx; margin-bottom: 10rpx;">
库存状态 :
<uni-data-checkbox mode="tag" multiple v-model="state" :localdata="stateList"></uni-data-checkbox>
</view>
<view class="" style="margin-top: 30rpx; margin-left: 30rpx; margin-right: 30rpx;">
<button type="primary" size="default" @click="confirm">确认</button>
</view>
</view>
</uni-popup>
</template>
<script>
import {
getTodayDate
} from '@/common/basic.js';
import {
getInventoryStatusList
} from '@/common/directory.js';
import winScanJobNumber from "@/mycomponents/scan/winScanJobNumber.vue"
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue"
export default {
emits: [
"onConfirmClick"
],
components: {
winScanJobNumber,
winScanAsnNumber
},
props: {
checkedToday: {
type: Boolean,
default: false
},
checkedWaitTask: {
type: Boolean,
default: false
},
otherTitle: {
type: String,
default: ""
},
isShowAsn: {
type: Boolean,
default: false
},
isShowJob: {
type: Boolean,
default: true
},
isShowFromLocationCode: {
type: Boolean,
default: false
},
isShowProductionLineCode: {
type: Boolean,
default: false
},
productionline: {
type: Array,
default: []
}
},
data() {
return {
dataContent: {},
checkedTodayModel: false,
checkedWaitModel: false,
stateList: [],
state:[],
locationCode:""
}
},
watch: {
},
mounted() {},
methods: {
//
maskClick() {
//
this.closeScanPopup();
},
openFilter() {
this.stateList =getInventoryStatusList()
this.stateList.forEach(res=>{
res.text =res.label
})
this.$refs['popup'].open("right");
},
closeScanPopup() {
this.$refs.popup.close()
},
switchChangeToday(isOn) {
let creationTime = '';
if (isOn) {
creationTime = getTodayDate();
}
this.$emit("switchChangeToday", isOn, creationTime)
this.closeScanPopup()
},
scanNumberClick() {
this.$refs.scanNumber.openScanPopup();
},
scanOtherClick() {
this.$refs.scanAsnNumber.openScanPopup();
},
confirm() {
this.$emit("onConfirmClick", this.locationCode,this.state)
this.closeScanPopup();
},
}
}
</script>
<style lang="scss">
.maskbox {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
}
</style>

4
src/mycomponents/scan/winCheckFgLabel.vue

@ -16,7 +16,7 @@
<view class="">
<view class="" style="position: relative">
<win-com-scan ref="comscanFgLabel" placeholder="WMS制品标签" @getResult="getScanFgResult"
:isShowHistory="false" :clearResult="false" :headerType="headerType"></win-com-scan>
:isShowHistory="false" :clearResult="true" :headerType="headerType"></win-com-scan>
<view class="uni-flex"
style="position: absolute; color: #3C9CFF; font-weight: bold; font-size: 15px; left: 10px;bottom:10px; z-index: 999;">
{{itemCode}}
@ -24,7 +24,7 @@
</view>
<view class="">
<win-com-scan-customer-label ref="comscanCustomerLabel" placeholder="客户标签"
@getResult="getScanCustomerResult" :isShowHistory="false" :clearResult="false"
@getResult="getScanCustomerResult" :isShowHistory="false" :clearResult="true"
:headerType="headerType"></win-com-scan-customer-label>
</view>
</view>

2
src/mycomponents/scan/winScanAsnNumber.vue

@ -13,7 +13,7 @@
</view>
<view class="">
<view class="">
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="false" :isShowHistory="false">
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="true" :isShowHistory="false">
</win-com-scan>
</view>
</view>

2
src/mycomponents/scan/winScanContainer.vue

@ -12,7 +12,7 @@
</view>
<view class="">
<view class="">
<win-com-scan ref="scan" headerType='HCQ' @getResult="getScanResult" :placeholder='title' :clearResult="false"
<win-com-scan ref="scan" headerType='HCQ' @getResult="getScanResult" :placeholder='title' :clearResult="true"
:boxFocus="true" :isShowHistory="isShowHistory">
</win-com-scan>
</view>

2
src/mycomponents/scan/winScanItem.vue

@ -13,7 +13,7 @@
</view>
<view class="">
<view class="">
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="false"
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="true"
headerType="HMQ,HPQ">
</win-com-scan>
</view>

2
src/mycomponents/scan/winScanJobNumber.vue

@ -16,7 +16,7 @@
<win-com-scan ref="scan"
@getResult="getScanResult"
:placeholder='title'
:clearResult="false"
:clearResult="true"
:isShowHistory="false"
headerType=""
>

23
src/pages.json

@ -57,11 +57,28 @@
{
"path": "pages/query/item",
"style": {
"enablePullDownRefresh": false, //
"enablePullDownRefresh": true, //
"navigationBarTitleText": "按物料查询库存",
"titleNView": {
"autoBackButton": "true",
"buttons": [{}]
// "autoBackButton": "true",
"buttons": [
//
{
"float": "right",
"fontSize": "58rpx", //
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
},
{
"float": "right",
"fontSize": "52rpx", //
"text": "\ue6e2",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
}
}
},

8
src/pages/index/index.vue

@ -75,7 +75,8 @@
getDictionaryItem,
getPackageUnitList,
getMainMessage,
getSwitchByCode
getSwitchByCode,
getBusinessType
} from '@/api/request2.js';
export default {
@ -393,6 +394,11 @@
uni.setStorageSync("switch", res.data)
}).catch(error=>{
})
//
getBusinessType().then(res=>{
uni.setStorageSync("businessType", res.data.list)
}).catch(error=>{
})
},
openCheck(url) {

10
src/pages/query/coms/comItemBalance.vue

@ -1,12 +1,16 @@
<template>
<view :class="dataContent.scaned?'scan_view':''" style="width: 100%;">
<view class="uni-flex uni-row space-between center">
<view class="uni-flex uni-row space-between" style="width: 100%;">
<view>
<view class="" v-if="dataContent.jobNumber" style="font-size: 32rpx; margin-left: 15rpx;">
任务号{{dataContent.jobNumber}}
</view>
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch>
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
<bussinessType v-if="isShowBusiness" :bussinessType="dataContent.businessType"
:number="dataContent.jobNumber"></bussinessType>
<bussinessType v-if="isShowBusiness&&dataContent.businessType" :bussinessType="dataContent.businessType"
></bussinessType>
</view>
<view>
<qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"

99
src/pages/query/coms/comItemDetailCard.vue

@ -1,53 +1,70 @@
<template>
<view class="" style="width: 100%; background-color: #fff; border-radius: 10rpx;">
<view class="uni-flex uni-row space-between" style="align-items: center;">
<view>
<com-empty-view v-if="itemList.length==0"></com-empty-view>
<view class="" style="background-color: #fff; width: 100%;" v-for="(item,index) in itemList">
<!-- <view class="flex uni-center u-col-center" style="flex-direction: row; "> -->
<view>
<com-item-balance :dataContent="item" :isShowStdPack="false" :isShowPack="isShowPack"
:isShowBatch="isShowBatch" :isShowLocation="isShowLocation" :isShowBusiness="isShowBusiness">
</com-item-balance>
<pack v-if="dataContent.parentNumber" title="父包装" :packingCode="dataContent.parentNumber"></pack>
<pack v-if=" dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location :locationCode="dataContent.locationCode"></location>
<view class="" v-if="dataContent.jobNumber"
style="font-size: 30rpx; padding-left: 10rpx ; padding-bottom: 10rpx;">
<text style="color: coral; ">任务号</text>
{{dataContent.jobNumber}}
</view>
<view class="" v-if="dataContent.businessType"
style="font-size: 30rpx; padding-left: 10rpx ; padding-bottom: 10rpx;">
<text style="color:green; ">业务类型</text>
{{businessTypeDesc(dataContent.businessType)}}
</view>
</view>
<view class="uni-flex" style="flex-direction: column;">
<view class="uni-flex uni-row center">
<qty :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="true"></qty>
</view>
</view>
</view>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import item from '@/mycomponents/item/item.vue'
import pack from '@/mycomponents/balance/pack.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import status from '@/mycomponents/status/status.vue'
import location from '@/mycomponents/balance/location.vue'
import {
getBusinessTypeDesc
getBusinessTypeName,
} from '@/common/directory.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import location from '@/mycomponents/location/location.vue'
import comItemBalance from '@/pages/query/coms/comItemBalance.vue'
import bussinessType from '@/mycomponents/balance/bussinessType.vue'
export default {
name: "comdetail",
components: {
comEmptyView,
location,
bussinessType,
comItemBalance
itemQty,
item,
pack,
batch,
qty,
status,
location
},
data() {
return {};
},
return {
//
props: {
itemList: {
type: Array,
value: null
},
displayLocations: {
type: Boolean,
default: true
};
},
type: {
type: String,
default: "partCode"
props: {
dataContent: {
type: Object,
default: null,
},
isShowPack: {
type: Boolean,
@ -61,16 +78,20 @@
type: Boolean,
default: true
},
isShowBusiness: {
isShowStdPack: {
type: Boolean,
default: false
default: true
},
},
methods: {}
}
</script>
methods: {
businessTypeDesc(type){
return getBusinessTypeName(type)
},
}
}
</script>
<style>
</style>

19
src/pages/query/coms/comLocationDetailCard.vue

@ -19,7 +19,7 @@
<view class="" v-if="dataContent.businessType"
style="font-size: 30rpx; padding-left: 10rpx ; padding-bottom: 10rpx;">
<text style="color:green; ">业务类型</text>
{{dataContent.businessType}}
{{businessTypeDesc(dataContent.businessType)}}
</view>
</view>
<view class="uni-flex" style="flex-direction: column;">
@ -44,6 +44,10 @@
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import status from '@/mycomponents/status/status.vue'
import {
getBusinessTypeName,
} from '@/common/directory.js';
export default {
components: {
itemQty,
@ -84,18 +88,9 @@
},
methods: {
edit() {
},
detail() {
businessTypeDesc(type){
return getBusinessTypeName(type)
},
remove() {
},
resetScan() {
}
}
}

367
src/pages/query/item.vue

@ -1,31 +1,31 @@
<!-- 基于z-paging封装个性化分页组件演示(vue) -->
<template>
<view class="">
<view class="uni-flex" style="flex-direction: column">
<itemFilter ref="filter" @onConfirmClick="confirm">
</itemFilter>
<view class="top" style="">
<com-blank-view @goScan='openScanPopup' v-if="itemCode==''"></com-blank-view>
<!-- 这里就很整洁了只要设置ref绑定query事件绑定list就可以了 -->
<my-paging v-show="itemCode!=''" ref="paging" v-model="dataList" @query="queryList">
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中如果需要跟着滚动则不要设置slot="top" -->
<template #top>
<view v-if="itemDetail!=undefined">
<item-info :itemdetail='itemDetail'></item-info>
<view class='split_line'></view>
<z-tabs :list="tabList" @change="tabChange" />
<item-info v-if="itemDetail" :itemdetail='itemDetail'></item-info>
<z-tabs v-if="itemCode" :list="tabList" @change="tabChange" />
</view>
</template>
<view class="" style="padding-bottom: 50rpx;">
<comItemDetailCard v-if="tabIndex == 0" :itemList="dataList" :isShowPack="false" style='margin: 10rpx;'>
</comItemDetailCard>
<comItemDetailCard v-if="tabIndex == 1" :itemList="dataList" style='margin: 10rpx;'>
</comItemDetailCard>
<comItemDetailCard v-if="tabIndex == 2" :itemList="dataList" :isShowLocation="false"
:isShowBusiness="true"></comItemDetailCard>
<comItemDetailCard v-if="tabIndex == 3" :itemList="dataList" :isShowLocation="false"
:isShowBusiness="true">
<view style="padding-top: 230rpx;width:100%">
<view v-if="totalCount>0" style="margin:10rpx; font-size:35rpx; font-weight:bold">总数 : {{totalCount}}
</view>
<view v-for="(item, index) in dataList" style="width:100%" :key="index">
<view class="uni-flex uni-row"
style=" align-items: center; background-color: #fff; border-radius:10rpx;margin:10rpx; ">
<view class="" style="font-size:35rpx; ">
({{index+1}})
</view>
<comItemDetailCard :isShowPack="false" :dataContent="item" style='margin: 10rpx;'>
</comItemDetailCard>
</view>
</my-paging>
</view>
<uni-load-more :status="loadingType" v-if="dataList.length>0" />
</view>
<win-scan-button @goScan='openScanPopup' v-if="itemCode!=''"></win-scan-button>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'>
</win-scan-item>
@ -49,6 +49,9 @@
import winScanItem from '@/mycomponents/scan/winScanItem.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue'
import itemFilter from '@/mycomponents/item/itemFilter.vue'
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
export default {
components: {
itemInfo,
@ -56,6 +59,8 @@
winScanItem,
winScanButton,
comItemDetailCard,
itemFilter,
comEmptyView
},
data() {
return {
@ -66,17 +71,37 @@
itemDetail: undefined,
itemCode: '',
balances: [],
loadingType: "nomore",
totalCount: 0,
locationCode: "",
inventoryStatus: "",
pageSize:10
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
}
},
onReachBottom() {
console.log("底部")
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getContentByTab(this.tabIndex, this.pageNo, this.pageSize, "more");
},
mounted() {
this.openScanPopup();
},
onPullDownRefresh() {
this.getContentByTab(this.tabIndex, this.pageNo, this.pageSize, "refresh");
},
methods: {
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
@ -117,25 +142,64 @@
},
//
getSummary(pageNo, pageSize) {
getSummary(pageNo, pageSize, type) {
uni.showLoading({
title: "加载中...",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.dataList = [];
}
var filters = [];
filters.push({
column: "itemCode",
action: "==",
value: this.itemCode
})
if (this.locationCode) {
filters.push({
column: "locationCode",
action: "==",
value: this.locationCode
})
}
if (this.inventoryStatus) {
filters.push({
column: "inventoryStatus",
action: "in",
value: this.inventoryStatus
})
}
var params = {
itemCode: this.itemCode,
pageNo: pageNo,
filters: filters,
pageNo: this.pageNo,
pageSize: pageSize
}
console.log("getSummary", pageNo)
getBalanceSummary(params).then(res => {
getBalanceByItemCode(params).then(res => {
uni.hideLoading();
if (res.data.list.length > 0) {
this.$refs.paging.complete(res.data.list);
} else {
this.$refs.paging.complete(false);
this.showMessage('未查找到物料【' + this.itemCode + '】');
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
list.forEach(item=>{
item.packingNumber=""
})
this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++;
}).catch(error => {
this.$refs.paging.complete(false);
uni.hideLoading();
@ -143,95 +207,199 @@
})
},
//
getDetailList(pageNo, pageSize) {
getDetailList(pageNo, pageSize, type) {
uni.showLoading({
title: "加载中...",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.dataList = [];
}
var filters = [];
filters.push({
column: "itemCode",
action: "==",
value: this.itemCode
})
if (this.locationCode) {
filters.push({
column: "locationCode",
action: "==",
value: this.locationCode
})
}
if (this.inventoryStatus) {
filters.push({
column: "inventoryStatus",
action: "in",
value: this.inventoryStatus
})
}
var params = {
itemCode: this.itemCode,
pageNo: pageNo,
filters: filters,
pageNo: this.pageNo,
pageSize: pageSize
}
getBalanceByItemCode(params).then(res => {
uni.hideLoading();
if (res.data.list.length > 0) {
this.$refs.paging.complete(res.data.list);
} else {
this.$refs.paging.complete(false);
this.showMessage('未查找到物料【' + this.itemCode + '】');
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++;
}).catch(error => {
this.$refs.paging.complete(false);
uni.hideLoading();
this.showMessage(error);
})
},
ontabtap(e) {
let index = e.target.dataset.current || e.currentTarget.dataset.current;
this.tabIndex = index;
this.getContentByTab(index);
},
getContentByTab(index, pageNo, pageSize) {
if (index === 0) this.getSummary(pageNo, pageSize);
else if (index === 1) this.getDetailList(pageNo, pageSize);
getContentByTab(index, pageNo, pageSize, type) {
if (index === 0) this.getSummary(pageNo, pageSize, type);
else if (index === 1) this.getDetailList(pageNo, pageSize, type);
else if (index === 2) {
this.getExpectin(pageNo, pageSize);
this.getExpectin(pageNo, pageSize, type);
} else if (index == 3) {
this.getExpectout(pageNo, pageSize);
this.getExpectout(pageNo, pageSize, type);
}
},
//
getExpectin(pageNo, pageSize) {
getExpectin(pageNo, pageSize, type) {
uni.showLoading({
title: "加载中...",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.dataList = [];
}
var filters = [];
filters.push({
column: "itemCode",
action: "==",
value: this.itemCode
})
if (this.locationCode) {
filters.push({
column: "locationCode",
action: "==",
value: this.locationCode
})
}
if (this.inventoryStatus) {
filters.push({
column: "inventoryStatus",
action: "in",
value: this.inventoryStatus
})
}
var params = {
itemCode: this.itemCode,
pageNo: pageNo,
filters: filters,
pageNo: this.pageNo,
pageSize: pageSize
}
getExpectinByItemcode(params).then(res => {
uni.hideLoading();
if (res.data.total > 0) {
this.$refs.paging.complete(res.data.list);
} else {
this.showMessage('未查找到物料【' + this.itemCode + '】');
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++;
}).catch(error => {
this.$refs.paging.complete(false);
uni.hideLoading();
this.showMessage(error);
})
},
//
getExpectout(pageNo, pageSize) {
getExpectout(pageNo, pageSize, type) {
uni.showLoading({
title: "加载中...",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.dataList = [];
}
var filters = [];
filters.push({
column: "itemCode",
action: "==",
value: this.itemCode
})
if (this.locationCode) {
filters.push({
column: "locationCode",
action: "==",
value: this.locationCode
})
}
if (this.inventoryStatus) {
filters.push({
column: "inventoryStatus",
action: "in",
value: this.inventoryStatus
})
}
var params = {
itemCode: this.itemCode,
pageNo: pageNo,
filters: filters,
pageNo: this.pageNo,
pageSize: pageSize
}
getExpectoutByItemcode(params).then(res => {
uni.hideLoading();
if (res.data.total > 0) {
this.$refs.paging.complete(res.data.list);
} else {
this.$refs.paging.complete(false);
this.showMessage('未查找到物料【' + this.itemCode + '】');
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++;
}).catch(error => {
this.$refs.paging.complete(false);
uni.hideLoading();
this.showMessage(error);
})
},
showMessage(message) {
@ -248,55 +416,38 @@
},
tabChange(index) {
this.tabIndex = index;
this.$refs.paging.reload(true);
this.getContentByTab(index, this.pageNo, this.pageSize, "refresh")
},
queryList(pageNo, pageSize) {
console.log("加载", pageNo)
if (this.itemCode != "") {
this.getContentByTab(this.tabIndex, pageNo, pageSize)
}
},
itemClick(item) {
console.log('点击了', item.title);
confirm(locationCode, status) {
this.locationCode = locationCode;
if(status.length>0){
var arrayItems = status.join(',')
this.inventoryStatus = arrayItems
}else {
this.inventoryStatus=""
}
this.tabChange(this.tabIndex)
}
}
}
</script>
<style>
.notice {
background-color: red;
color: white;
display: flex;
flex-direction: column;
padding: 12rpx 20rpx;
font-size: 24rpx;
}
.item {
position: relative;
height: 150rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0rpx 30rpx;
}
.item-detail {
padding: 5rpx 15rpx;
border-radius: 10rpx;
font-size: 28rpx;
color: white;
background-color: #007AFF;
}
.item-line {
position: absolute;
bottom: 0rpx;
left: 0rpx;
height: 1px;
<style scoped lang="scss">
page {
height: 100%;
}
.top{
width: 100%;
background-color: #eeeeee;
position: fixed;
/* #ifdef APP */
top: 0rpx;
/* #endif */
/* #ifdef H5 */
top: 80rpx;
/* #endif */
right: 0;
}
</style>

11
src/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue

@ -487,7 +487,9 @@
flex-direction: row;
align-items: center;
position: relative;
margin: 5px 0;
// margin: 10px 0;
margin-left: 25rpx;
margin-top: 30rpx;
margin-right: 25px;
.hidden {
@ -502,11 +504,13 @@
flex-direction: row;
align-items: center;
justify-content: space-between;
ma
.checklist-text {
font-size: 14px;
font-size: 18px;
color: #666;
margin-left: 5px;
margin-left: 10px;
line-height: 14px;
padding: 10rpx;
}
.checkobx__list {
@ -522,6 +526,7 @@
transform-origin: center;
transform: rotate(45deg);
opacity: 0;
padding: 10rpx;
}
}

Loading…
Cancel
Save