Browse Source

修改明细组件

hella_online_20240829
niexiting 4 months ago
parent
commit
03d58da87b
  1. 59
      src/pages/count/job/fuzzyCountDetail.vue

59
src/pages/count/job/fuzzyCountDetail.vue

@ -12,30 +12,17 @@
</view>
<scroll-view scroll-y="true" class="page-main-scroll">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="editRemoveOption">
{{editRemoveOption}}
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<package-and-item-card :dataContent="item"></package-and-item-card>
<!-- <com-count-detail-card :ref="'countDetail_'+index" :dataContent="item" :index="index"
@editItem="editItem" :settingParam="jobContent" @remove="updateData"
@updateData="updateData">
</com-count-detail-card> -->
</view>
<view class='split_line'></view>
</view>
<!-- <item-qty v-if="settingParam.isOpenCount=='TRUE'" :dataContent="dataContent"
:handleQty="dataContent.handleQty" :isShowBalanceQty="false">
</item-qty>
<item-qty v-else :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowBalanceQty="true" :showRecommendQty="false" :showStdPack="true">
</item-qty> -->
</uni-swipe-action-item>
</uni-swipe-action>
</scroll-view>
</view>
@ -77,6 +64,10 @@
Decimal
} from 'decimal.js'; //
import {
getEditRemoveOption
} from '@/common/array.js';
import {
goHome,
navigateBack,
@ -125,7 +116,7 @@
jobStatus: "",
fromLocation: {},
fromLocationCode: '',
editRemoveOption: []
};
},
onLoad(option) {
@ -141,6 +132,7 @@
}
}
this.showFromLocationPopup();
this.editRemoveOption=getEditRemoveOption();
},
//
onNavigationBarButtonTap(e) {
@ -233,8 +225,6 @@
}
},
closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
@ -275,6 +265,7 @@
itemDesc2: packInfo.itemDesc2,
projectCode: "",
qty: packInfo.qty,
countQty: packInfo.qty,
uom: packInfo.uom,
remark: "",
locationCode: this.fromLocationCode,
@ -286,8 +277,6 @@
return detail;
},
//
editCountResult(item, subItem) {
let that = this;
@ -311,7 +300,35 @@
this.scanPopupGetFocus();
},
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(detail) {
this.$emit("editItem", detail)
},
detail(item) {
this.showItem = item;
this.$refs.detailInfoPopup.openPopup(item);
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
// this.dataContent.subList.splice(index, 1)
item.scaned = false;
item.handleQty = 0;
this.$emit('removePack')
}
});
},
commit() {
// if(this.detailSource.length==0)

Loading…
Cancel
Save