Browse Source

修改盘点 三方库收货显示数量

pda_nev
李俊城 12 months ago
parent
commit
c4a5b00527
  1. 42
      fe/PDA/common/mock.js
  2. 7
      fe/PDA/mycomponents/comjob/comJobScanDetail.vue
  3. 2
      fe/PDA/mycomponents/coms/task/comCount.vue
  4. 4
      fe/PDA/pages/return/returnBeforPutaway.vue
  5. 28
      fe/PDA/pages/task/assembleIssueJobDetail.vue
  6. 29
      fe/PDA/pages/task/coatingIssuleJobDetail.vue
  7. 25
      fe/PDA/pages/task/countFgDetail.vue
  8. 134
      fe/PDA/pages/task/countRawDetail.vue
  9. 30
      fe/PDA/pages/task/injectionIssueJobDetail.vue
  10. 25
      fe/PDA/pages/task/kittingIssueJobDetail.vue
  11. 31
      fe/PDA/pages/task/sparePartIssueJobDetail.vue
  12. 20
      fe/PDA/pages/task/thirdLocationDetail.vue
  13. 21
      fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-list.vue
  14. 40
      fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue

42
fe/PDA/common/mock.js

@ -0,0 +1,42 @@
const defaultData = {
pageIndex: 1,
pageSize: 20,
name: ''
}
/**模拟后端请求*/
export const simulationReqGetList = function(data = defaultData) {
return new Promise((resolve, reject) => {
let list = []
if (data.pageIndex > 3) {
return resolve(list)
}
const startIndex = data.pageIndex * data.pageSize - data.pageSize
for (let i = startIndex; i < data.pageIndex * data.pageSize; i++) {
if (data.name) {
list.push({
name: `${data.name}${i + 1}条数据`,
code: `${i}-${i + 1}`
})
} else {
list.push({
name: `${i + 1}条数据`,
code: `${i}-${i + 1}`
})
}
}
setTimeout(() => {
return resolve(list)
}, 1000)
})
}
export const getDataList = function() {
let list = []
for (let i = 0; i < 200; i++) {
list.push({
name: `${i + 1}条数据`,
code: `${i}-${i + 1}`
})
}
return list
}

7
fe/PDA/mycomponents/comjob/comJobScanDetail.vue

@ -17,8 +17,9 @@
<view class="text_lightblue">{{scanHint}}</view>
<view class="text_black text_bold">{{ scanCount}}</view>
</view>
<view class="cell_info" v-if="isShowOther">
<view class="text_lightblue">未发数量</view>
<view class="text_lightblue">{{showOther}}</view>
<view class="text_black text_bold">{{ allCount-scanCount}}</view>
</view>
<view class="cell_info" v-if="isShowShouRong">
@ -75,6 +76,10 @@
type: Boolean,
default: false
},
showOther:{
type: String,
default: "未发数量"
},
isShowShouRong:{
type: Boolean,
default: false

2
fe/PDA/mycomponents/coms/task/comCount.vue

@ -6,7 +6,7 @@
</view>
<view class="margin_xs_bottom">
<view class="count_list">
<text>{{datacontent.countStage|countStageDesc}}</text> |
<!-- <text>{{datacontent.countStage|countStageDesc}}</text> | -->
<!-- <text>{{datacontent.type | checkTypeDesc}}</text> | -->
<text>{{datacontent.countMethod |countMethodDesc}}</text> |
<text>{{datacontent.locationCode }}</text>

4
fe/PDA/pages/return/returnBeforPutaway.vue

@ -28,7 +28,7 @@
<script>
import {
getBalancesByFilter,
getBalanceRemoveInAndOutAsync,
returnBeforePutaway,
getDictByCode
} from '@/api/index.js';
@ -143,7 +143,7 @@
packingCode: code,
locationTypes: [6] //
};
getBalancesByFilter(params).then(res => {
getBalanceRemoveInAndOutAsync(params).then(res => {
if (res.totalCount == 0) {
that.showScanMessage('箱码【' + code + '】在【隔离库】未查询到库存信息');
} else if (res.totalCount == 1) {

28
fe/PDA/pages/task/assembleIssueJobDetail.vue

@ -379,6 +379,27 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -393,7 +414,7 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -417,7 +438,7 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -431,11 +452,10 @@
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup()
});
},

29
fe/PDA/pages/task/coatingIssuleJobDetail.vue

@ -379,6 +379,27 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -393,7 +414,7 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -417,7 +438,7 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -431,12 +452,10 @@
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup()
});
},

25
fe/PDA/pages/task/countFgDetail.vue

@ -130,13 +130,14 @@
</view>
<!-- <com-count-items ref='comcountItems' @selectedItem='selectedCountItem'> </com-count-items> -->
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<winScanByCode ref="scanPopup" title="物料号" @getScanCode='getScanResult' @close='closeScanPopup()'></winScanByCode>
<winScanByProductCode ref="scanPopup" title="单件码" @getScanResult='getScanResult' ></winScanByProductCode>
<com-easy-input ref="descPopup" @confirm='closeEditCountDesc'></com-easy-input>
<com-easy-input-count ref="countPopup" @confirm='closeEditCount'></com-easy-input-count>
<win-inventory-status ref="statusPopup"></win-inventory-status>
<!-- com-message必须放在最下层 -->
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></com-message>
<!-- <uni-load-more :status="loadingType" v-if="details.length>0"></uni-load-more> -->
</view>
</template>
@ -187,7 +188,7 @@
import comEasyInput from '@/mycomponents/common/comEasyInput.vue';
import comEasyInputCount from '@/mycomponents/common/comEasyInputCount.vue';
import winInventoryStatus from '@/mycomponents/wincom/winInventoryStatus.vue';
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
export default {
components: {
@ -199,7 +200,8 @@
comNumberBox,
comEasyInput,
comEasyInputCount,
winInventoryStatus
winInventoryStatus,
winScanByProductCode
},
data() {
return {
@ -384,7 +386,8 @@
return list.slice(start, end)
},
getScanResult(itemCode){
getScanResult(result){
var itemCode =result.itemCode;
this.getitem(itemCode,res=>{
var result = res;
var itemScan = this.scanAllDetails.filter(r =>
@ -407,6 +410,7 @@
this.addNewDetail(result)
} else if (items.length == 1) {
var item = items[0];
item.isNew =true;
this.setQty(item, item.inventoryQty, true);
} else {
this.showMessage('盘点数量异常,箱码【' + packingCode + '】的出现多条数据');
@ -549,10 +553,12 @@
detail.inventoryQty = 0;
detail.countQty = 1;
detail.status = 2;
detail.uom =result.basicUom
return detail;
},
setQty(item, qty, isAdd) {
item.countQty = Number(qty);
item.countTime = new Date();
item.IsDelete =false;
@ -574,8 +580,13 @@
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
item.IsDelete = true;
item.modified =true;
if(item.isNew){
this.showList.splice(index, 1)
this.scanAllDetails.splice(index, 1)
}else {
item.IsDelete = true;
item.modified = true;
}
this.initList();
this.scanPopupGetfocus();
this.calcScanCount();
@ -670,7 +681,7 @@
calcScanCount() {
this.scanCount = this.scanAllDetails.length;
this.scanCount = this.scanAllDetails.filter(r=>r.IsDelete==false).length;
},
bindPickerChange(e, item) {

134
fe/PDA/pages/task/countRawDetail.vue

@ -7,6 +7,7 @@
:newCount="newCount" :location="location" :countOrder="datacontent.inventoryStage">
</com-count-scan-detail>
</view>
<!-- <button @click="open">打开</button> -->
<scroll-view scroll-y="true" style="margin-bottom: 50rpx;">
<view v-for="(item ,index) in showList" :key="index">
<view class="detail-content common_card">
@ -144,6 +145,7 @@
<!-- com-message必须放在最下层 -->
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></com-message>
<!-- <uni-load-more :status="loadingType" v-if="details.length>0"></uni-load-more> -->
<wz-select-popup ref="wzSelectPopup" @select="selectCheckbox" />
</view>
</template>
@ -242,7 +244,12 @@
pageSize: 20,
jobStatus: "",
index: 0,
showList: []
showList: [],
userForm: {
names: [],
values: [],
origin: []
}
}
},
props: {},
@ -338,6 +345,43 @@
})
},
methods: {
open() {
this.$refs.wzSelectPopup.open({
mode: 'radio', //radio checkbox
// dataList:[], //dataList使proxyConfig
selected: this.userForm.values, //
proxyConfig: { //
reqFun: this.reqGetList, //,Promise.resolve([])
localPaging: false //
},
search: {
type: 'remote', //local | remote
},
fields: {
label: 'name',
value: 'code'
}
})
},
selectCheckbox(mode, data) {
console.log(mode, data)
},
reqGetList(data) {
let params = {
pageSize: data.pageSize,
pageIndex: data.pageIndex,
itemCode:data.searchValue
};
return getBalancesByFilterAsync(params);
// return simulationReqGetList({
// pageIndex: data.pageIndex,
// pageSize: data.pageSize,
// name: data.searchValue
// })
},
initList() {
this.index = 1;
this.showList = []
@ -360,12 +404,12 @@
that.originalDetails = res.details;
that.allCount = res.details.length
that.scanAllDetails = res.depDetails.filter(r=>r.inventoryStage==res.inventoryStage);
that.scanAllDetails = res.depDetails.filter(r => r.inventoryStage == res.inventoryStage);
that.scanCount = that.scanAllDetails.length
that.scanAllDetails.forEach(res=>{
that.scanAllDetails.forEach(res => {
res.IsDelete = false;
res.modified=false;
res.modified = false;
})
this.initList()
@ -388,7 +432,7 @@
//
const start = (pageNo - 1) * pageSize;
const end = start + pageSize; //
var list =this.scanAllDetails.filter((r=>r.IsDelete==false))
var list = this.scanAllDetails.filter((r => r.IsDelete == false))
return list.slice(start, end)
},
@ -398,7 +442,7 @@
let itemCode = result.data.itemCode;
let packingCode = result.data.code === null ? '' : result.data.code;
var itemScan = this.scanAllDetails.filter(r =>
r.packingCode == packingCode&&r.inventoryStage==this.datacontent.inventoryStage)
r.packingCode == packingCode && r.inventoryStage == this.datacontent.inventoryStage)
if (itemScan.length > 0) {
setTimeout(res => {
showConfirmMsg("箱码【" + packingCode + "】已经扫描,是否覆盖已经扫描的信息", res => {
@ -413,12 +457,13 @@
}
let items = this.originalDetails.filter(r =>
r.packingCode === packingCode&&r.inventoryStage==this.datacontent.inventoryStage)
r.packingCode === packingCode && r.inventoryStage == this.datacontent.inventoryStage)
//
if (items.length == 0) {
this.addNewDetail(result)
} else if (items.length == 1) {
var item = items[0];
item.isNew =true;
this.setQty(item, item.inventoryQty, true);
} else {
this.showMessage('盘点数量异常,箱码【' + packingCode + '】的出现多条数据');
@ -497,13 +542,13 @@
creatDetail(result, balanceItem) {
let detail = {
isNew: true,
IsDelete:false,
modified:true,
IsDelete: false,
modified: true,
countTime: new Date(),
masterID: this.id,
countLabel: "",
number: this.datacontent.number,
inventoryStage:this.datacontent.inventoryStage,
inventoryStage: this.datacontent.inventoryStage,
inventoryQty: 0,
uom: result.data.uom,
@ -539,7 +584,7 @@
detail.inventoryQty = balanceItem.qty;
detail.countQty = balanceItem.qty;
detail.status = balanceItem.status;
return detail;
},
@ -554,13 +599,13 @@
setQty(item, qty, isAdd) {
item.countQty = Number(qty);
item.countTime = new Date();
item.IsDelete =false;
item.modified =true;
item.IsDelete = false;
item.modified = true;
item.countOperator = localStorage.userId;
if (isAdd) {
this.scanAllDetails.unshift(item)
}else {
item.countDescription=""
} else {
item.countDescription = ""
}
this.initList();
this.scanPopupGetfocus();
@ -573,8 +618,13 @@
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
item.IsDelete = true;
item.modified =true;
if(item.isNew){
this.showList.splice(index, 1)
this.scanAllDetails.splice(index, 1)
}else {
item.IsDelete = true;
item.modified = true;
}
// this.scanAllDetails.splice(index, 1);
this.initList();
this.scanPopupGetfocus();
@ -600,33 +650,33 @@
},
submit() {
if (this.scanAllDetails.length == 0) {
this.showMessage("盘点数量为0,请先扫描")
return;
}
var commitList=this.scanAllDetails.filter(r=>r.modified==true)
var commitList = this.scanAllDetails.filter(r => r.modified == true)
if (commitList.length == 0) {
this.showMessage("没有修改的数据,请先扫描")
return;
}
var temp="";
var temp = "";
for (var i = 0; i < this.scanAllDetails.length; i++) {
if(this.scanAllDetails[i].countQty==0){
temp=this.scanAllDetails[i];
break;
}
if (this.scanAllDetails[i].countQty == 0) {
temp = this.scanAllDetails[i];
break;
}
}
if(temp!=""){
this.showMessage("箱码:["+temp.packingCode+"]盘点数量为0,请输入盘点数量")
if (temp != "") {
this.showMessage("箱码:[" + temp.packingCode + "]盘点数量为0,请输入盘点数量")
return;
}
this.finishJob();
},
@ -636,13 +686,13 @@
title: "提交中...",
mask: true
});
this.datacontent.depDetails = this.scanAllDetails.filter(r=>r.modified==true);
this.datacontent.details =[];
this.datacontent.depDetails = this.scanAllDetails.filter(r => r.modified == true);
this.datacontent.details = [];
that.datacontent.completeUserId = localStorage.getItem('userId')
that.datacontent.completeUserName = localStorage.getItem('userName_CN')
that.datacontent.completeTime = getCurrDateTime()
let params = JSON.stringify(this.datacontent);
console.log("提交参数",params)
console.log("提交参数", params)
finishCountJob(this.id, params)
.then(res => {
uni.hideLoading();
@ -661,19 +711,19 @@
item.countTime = new Date();
item.countOperator = localStorage.userId;
this.calcScanCount();
if(value==item.countQty){
item.modified=false
}else {
item.modified=true
if (value == item.countQty) {
item.modified = false
} else {
item.modified = true
}
}else {
} else {
this.showMessage("盘点数量必须大于0")
}
},
calcScanCount() {
this.scanCount = this.scanAllDetails.length;
this.scanCount = this.scanAllDetails.filter(r=>r.IsDelete==false).length;
},
bindPickerChange(e, item) {

30
fe/PDA/pages/task/injectionIssueJobDetail.vue

@ -379,6 +379,28 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -393,7 +415,7 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -417,7 +439,7 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -431,12 +453,10 @@
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup();
});
},

25
fe/PDA/pages/task/kittingIssueJobDetail.vue

@ -379,6 +379,28 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -431,11 +453,10 @@
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup()
});
},

31
fe/PDA/pages/task/sparePartIssueJobDetail.vue

@ -379,6 +379,28 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -393,7 +415,7 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -417,7 +439,7 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -430,14 +452,11 @@
item.handleToPackingCodeLocationCode = balancesItem.locationCode
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup()
});
},

20
fe/PDA/pages/task/thirdLocationDetail.vue

@ -2,7 +2,8 @@
<page-meta root-font-size="18px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount" scanHint="已收数量"
:isShowOther="true" showOther="未发数量">
</com-job-scan-detail>
</view>
@ -243,11 +244,13 @@
that.datacontent = item;
that.jobStatus = item.jobStatus
that.details = item.details;
that.allCount = 0;
that.details.forEach(res => {
res.scaned = false;
that.allCount = that.allCount + res.recommendQty
})
that.ispending = item.jobStatus === 2;
that.allCount = item.details.length;
// that.toLocation = item.details[0].recommendLocationCode;
})
.catch(err => {
@ -282,13 +285,18 @@
getScanCount() {
this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
this.scanCount=0;
this.datacontent.details.forEach(res=>{
if(res.scaned){
this.scanCount=this.scanCount+res.handledQty
}
})
// this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
this.$refs.scanPopup.closeScanPopup();
},
cancel() {

21
fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-list.vue

@ -2,9 +2,18 @@
<view class="wz-list">
<view :class="item.check?'check-item':'list-item'" v-for="(item,index) in list" :key="index"
@click="$emit('checkList',item)">
<uni-icons v-if="item.check" type="checkbox-filled" color="#007aff" size="24"></uni-icons>
<uni-icons v-else type="circle" color="#999" size="24"></uni-icons>
<view class="list-item-text">{{item[fields.label]}}</view>
<view class="" v-if="isShowIcon">
<uni-icons v-if="item.check" type="checkbox-filled" color="#007aff" size="24"></uni-icons>
<uni-icons v-else type="circle" color="#999" size="24"></uni-icons>
</view>
({{index+1}})
<view class="uni-flex" style="flex-direction: column; font-size: 32rpx;">
<view class="list-item-text">代码 : {{item.itemCode}}</view>
<view class="list-item-text">名称 : {{item.itemName}}</view>
<view class="list-item-text">描述 : {{item.itemDesc1}}</view>
</view>
</view>
<view class="loadmore" @click="$emit('loadmore')">
<view v-if="page.loading == 'loading'" class="icon">
@ -23,6 +32,10 @@
type: Array,
default: () => []
},
isShowIcon: {
type: Boolean,
default: true
},
page: {
type: Object,
default: () => {
@ -97,7 +110,7 @@
justify-content: center;
align-items: center;
font-size: $uni-font-size-sm;
padding: 8px ;
padding: 8px;
@keyframes rotateInfinite {
form {

40
fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue

@ -2,13 +2,20 @@
<view>
<u-popup ref="popup" v-model="showPopup" border-radius="15" mode="center">
<view class="select-popup-content">
<view class="uni-flex" style="display: flex; width: 100%;justify-content: center; ">
<view class="" style=" font-size: 35rpx; margin: 20rpx; font-weight: bold;">
{{title}}
</view>
</view>
<u-line></u-line>
<view class="popup-search">
<wz-search v-model="searchValue" @search="searchData('search')" @clear="searchData('clear')" />
<wz-search v-model="searchValue" @search="searchData('search')" @clear="searchData('clear')" @input="change"/>
</view>
<scroll-view class="popup-scroll-y" :scroll-top="scroll.newTop" scroll-y
:style="{'--popup-scroll-height': scrollH}" @scrolltolower="scrolltolower" @scroll="viewScroll">
<wz-list :list="dataList" :fields="popConfig.fields" :page="pageStatus" @checkList="checkList"
@loadmore="scrolltolower" />
@loadmore="scrolltolower" :isShowIcon="false" />
</scroll-view>
<view v-if="popConfig.mode =='checkbox'" class="footer-button">
<view class="button-item">
@ -54,6 +61,12 @@
type: String,
default: 'bottom'
},
title: {
type: String,
default: '物料查询'
},
},
data() {
return {
@ -90,6 +103,10 @@
this.scroll.oldTop = e.detail.scrollTop
}, 100)
},
change(data){
console.log("输入",data)
this.searchData("search")
},
searchData(type) {
const {
search,
@ -178,20 +195,29 @@
...page,
searchValue: this.searchValue
}).then(list => {
list.items.forEach(res=>{
res.code =res.itemCode
res.name =res.itemName;
})
if (proxyConfig.localPaging) { //
allDataList = list
allDataList = list.items
this.getLocalPagingData()
return
}
this.pageStatus.loading = 'loadmore'
if (!list || list.length != page.pageSize) {
// if (!list.items || list.items.length != page.pageSize) {
// this.pageStatus.loading = 'nomore'
// this.pageStatus.isEmpty = true
// }
if (!list.items || list.items.length ==0) {
this.pageStatus.loading = 'nomore'
this.pageStatus.isEmpty = true
}
this.handleSelected(list)
this.dataList = this.dataList.concat(list)
this.handleSelected(list.items)
this.dataList = this.dataList.concat(list.items)
})
},
close() {
@ -275,7 +301,7 @@
fields
} = this.popConfig
list?.forEach(item => {
const valueCode = item[fields.value]
const valueCode = item.itemCode
const isChecked = selected instanceof Array ? selected.includes(valueCode) : selected ==
valueCode
item.check = isChecked ? true : false

Loading…
Cancel
Save