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 * @param {*} itemCode
* *
*/ */
export function getBalanceByItemCode(params) { export function getBalanceByItemCode(params) {
return request({ return request({
url: baseApi + "/wms/balance/page", url: baseApi + "/wms/balance/seniorAll",
method: "get", method: "post",
data: params, data: params,
}); });
} }
@ -251,8 +253,8 @@ export function getBalanceByItemCode(params) {
*/ */
export function getExpectinByItemcode(params) { export function getExpectinByItemcode(params) {
return request({ return request({
url: baseApi + "/wms/expectin/page", url: baseApi + "/wms/expectin/senior",
method: "get", method: "post",
data: params, data: params,
}); });
} }
@ -264,8 +266,8 @@ export function getExpectinByItemcode(params) {
*/ */
export function getExpectoutByItemcode(params) { export function getExpectoutByItemcode(params) {
return request({ return request({
url: baseApi + "/wms/expectout/page", url: baseApi + "/wms/expectout/senior",
method: "get", method: "post",
data: params, data: params,
}); });
} }
@ -4207,3 +4209,16 @@ export function getBalanceByParams(data) {
data: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 scrapReasonList = [];
let inspectFailedReasonList = []; let inspectFailedReasonList = [];
let switchList=[] let switchList=[]
let businessList=[]
//获取字典信息 //获取字典信息
@ -36,6 +36,7 @@ export function clearCacheData() {
scrapReasonList = []; scrapReasonList = [];
inspectFailedReasonList = []; inspectFailedReasonList = [];
switchList=[] switchList=[]
businessList=[]
} }
@ -355,6 +356,26 @@ export function getSwitchInfoByCode(code) {
return isCheck; 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 transferModeList = [];
let countStageList = []; let countStageList = [];
let locationAreaTypeList = []; let locationAreaTypeList = [];
let businessList=[]
@ -60,6 +61,7 @@ export function clearCacheData() {
transferModeList = []; transferModeList = [];
countStageList = []; countStageList = [];
locationAreaTypeList=[] locationAreaTypeList=[]
businessList=[]
} }
//获取字典信息 //获取字典信息
@ -225,6 +227,22 @@ export function getItemStateInfo(value) {
return resultInfo 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) { export function getLocationAreaTypeInfo(value) {
var resultInfo = ""; var resultInfo = "";
@ -335,6 +353,14 @@ export function getRequestStateInfo(value) {
return resultInfo return resultInfo
} }
//获取库存状态集合
export function getInventoryStatusList() {
if (inventoryStatusList.length == 0) {
inventoryStatusList = getDirectoryInfo("inventory_status")
}
return inventoryStatusList
}
//获取库存状态 //获取库存状态
export function getInventoryStatusInfo(value) { export function getInventoryStatusInfo(value) {

10
src/mycomponents/balance/bussinessType.vue

@ -1,13 +1,14 @@
<template> <template>
<view class="business_view"> <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> </view>
</template> </template>
<script> <script>
import { import {
getBusinessTypeDesc getBusinessTypeName,
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { export default {
data() { data() {
@ -25,7 +26,8 @@
}, },
methods:{ methods:{
businessTypeDesc(type){ 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="">
<view class="" style="position: relative"> <view class="" style="position: relative">
<win-com-scan ref="comscanFgLabel" placeholder="WMS制品标签" @getResult="getScanFgResult" <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" <view class="uni-flex"
style="position: absolute; color: #3C9CFF; font-weight: bold; font-size: 15px; left: 10px;bottom:10px; z-index: 999;"> style="position: absolute; color: #3C9CFF; font-weight: bold; font-size: 15px; left: 10px;bottom:10px; z-index: 999;">
{{itemCode}} {{itemCode}}
@ -24,7 +24,7 @@
</view> </view>
<view class=""> <view class="">
<win-com-scan-customer-label ref="comscanCustomerLabel" placeholder="客户标签" <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> :headerType="headerType"></win-com-scan-customer-label>
</view> </view>
</view> </view>

2
src/mycomponents/scan/winScanAsnNumber.vue

@ -13,7 +13,7 @@
</view> </view>
<view class=""> <view class="">
<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> </win-com-scan>
</view> </view>
</view> </view>

2
src/mycomponents/scan/winScanContainer.vue

@ -12,7 +12,7 @@
</view> </view>
<view class=""> <view class="">
<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"> :boxFocus="true" :isShowHistory="isShowHistory">
</win-com-scan> </win-com-scan>
</view> </view>

2
src/mycomponents/scan/winScanItem.vue

@ -13,7 +13,7 @@
</view> </view>
<view class=""> <view class="">
<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"> headerType="HMQ,HPQ">
</win-com-scan> </win-com-scan>
</view> </view>

2
src/mycomponents/scan/winScanJobNumber.vue

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

23
src/pages.json

@ -57,11 +57,28 @@
{ {
"path": "pages/query/item", "path": "pages/query/item",
"style": { "style": {
"enablePullDownRefresh": false, // "enablePullDownRefresh": true, //
"navigationBarTitleText": "按物料查询库存", "navigationBarTitleText": "按物料查询库存",
"titleNView": { "titleNView": {
"autoBackButton": "true", // "autoBackButton": "true",
"buttons": [{}] "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, getDictionaryItem,
getPackageUnitList, getPackageUnitList,
getMainMessage, getMainMessage,
getSwitchByCode getSwitchByCode,
getBusinessType
} from '@/api/request2.js'; } from '@/api/request2.js';
export default { export default {
@ -393,6 +394,11 @@
uni.setStorageSync("switch", res.data) uni.setStorageSync("switch", res.data)
}).catch(error=>{ }).catch(error=>{
}) })
//
getBusinessType().then(res=>{
uni.setStorageSync("businessType", res.data.list)
}).catch(error=>{
})
}, },
openCheck(url) { openCheck(url) {

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

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

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

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

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

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

367
src/pages/query/item.vue

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

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

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

Loading…
Cancel
Save