Browse Source

page/productReceipt/coms 文件迁移 8/8-10/25

hella_vue3
王志国 4 weeks ago
parent
commit
4ae564d47e
  1. 3
      src/pages/productReceipt/coms/comProductDetailCard.vue
  2. 180
      src/pages/productReceipt/coms/comProductDetailCardBatch.vue
  3. 4
      src/pages/productReceipt/coms/comProductJobCard.vue

3
src/pages/productReceipt/coms/comProductDetailCard.vue

@ -10,7 +10,7 @@
<recommend :detail="item" :isShowFromLocation="false" :isShowToLocation="settingParam.allowModifyLocation == 'TRUE'"></recommend>
</u-swipe-action>
<view v-if="item.fgList != undefined && item.fgList.length > 0" v-for="(fg, key) in item.fgList" :key="key">
<com-fg-card :detail="fg"></com-fg-card>
<com-fg-card :detail="fg" class="scan_view"></com-fg-card>
</view>
</view>
</u-collapse-item>
@ -128,6 +128,7 @@ const remove = (item) => {
if (res) {
item.scaned = false
item.handleQty = null
item.fgList = []
emit('remove', item)
}
})

180
src/pages/productReceipt/coms/comProductDetailCardBatch.vue

@ -0,0 +1,180 @@
<template>
<view class="" style="background-color: #fff;">
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"></itemCompareQty>
<view class="" v-for="(item,index) in dataContent.subList" :key="index" >
<u-swipe-action ref="swipeAction" v-if="index==0"
:options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
@click="(...event)=>swipeClick(event,item,'parent')"
:class="item.scaned?'scan_view':''">
<recommendBatch :detail="item" :isShowFromLocation="false"
:isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommendBatch>
</u-swipe-action>
<view v-if="item.fgList!=undefined && item.fgList.length>0" class="card_view " style="margin-left: 20px;"
v-for="(fg, index) in item.fgList" :key="index">
<com-fg-card :detail='fg' class="scan_view"></com-fg-card>
</view>
</view>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<productDetailInfoPopup ref="jobDetailPopup" :dataContent="showItem"></productDetailInfoPopup>
<comMessage ref="message"></comMessage>
</view>
</template>
<script setup lang="ts">
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommendBatch from '@/mycomponents/recommend/recommendBatch.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import productDetailInfoPopup from '@/pages/productReceipt/coms/productDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue"
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import config from '@/static/config.js'
import {
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
import { ref, watch, onMounted, computed,nextTick } from 'vue';
import { useCountStore } from '@/store'
const store = useCountStore()
const props = defineProps({
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
locationAreaTypeList: {
type: Array,
default: null
},
isEdit: {
type: Boolean,
default: true
}
});
const showItem = ref({});
const editItem = ref({
record: {}
});
const locatonItem = ref({});
const detailOptions = ref([]);
const scanOptions = ref([]);
const options = ref([]);
const removeOptions = ref([]);
const editAndRemoveOptions = ref([]);
const collapse1 = ref(null);
const receiptEdit = ref(null);
const scanLocationCode = ref(null);
const jobDetailPopup = ref(null);
const message = ref(null);
watch(() => props.dataContent, (newDataContent, oldDataContent) => {
if (newDataContent?.subList?.length > 0) {
if (collapse1.value) {
nextTick(() => {
collapse1.value.init();
});
}
}
}, { immediate: true, deep: true });
onMounted(() => {
removeOptions.value = getRemoveOption();
editAndRemoveOptions.value = getEditRemoveOption();
});
//
const swipeClick = (e, item) => {
if (e.content.text === "详情") {
detail(item);
} else if (e.content.text === "编辑") {
edit(item);
} else if (e.content.text === "库位") {
showLocation(item);
} else if (e.content.text === "移除") {
remove(item);
}
};
const edit = (item) => {
editItem.value = item;
receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
};
const showLocation = (item) => {
locatonItem.value = item;
scanLocationCode.value.openScanPopup();
};
const getLocation = (location, code) => {
locatonItem.value.toLocationCode = code;
emit('updateData');
};
const detail = (item) => {
showItem.value = item;
jobDetailPopup.value.openPopup(item);
};
const remove = (item) => {
message.value.showQuestionMessage("确定移除扫描信息?", (res) => {
if (res) {
item.scaned = false;
item.handleQty = null;
item.fgList = [];
emit('remove', item);
}
});
};
const confirm = (qty) => {
editItem.value.handleQty = qty;
emit('updateData');
};
const isDevlement = computed(() => config.isDevelopment);
const copy = (detail) => {
const content = `HPQ;V1.0;I${detail.itemCode};P${detail.packingNumber};B${detail.batch};Q${detail.qty}`;
// #ifdef H5
navigator.clipboard.writeText(content).then(() => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
});
});
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
});
}
});
// #endif
};
const emit = defineEmits(['updateData', 'remove']);
</script>
<style>
</style>

4
src/pages/productReceipt/coms/comProductJobCard.vue

@ -1,6 +1,8 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
<!-- <view class="task_item">
<view class="task_text">
<view class="">
@ -36,7 +38,7 @@
<script setup lang="ts">
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
import jobAccept from '@/mycomponents/job/jobAccept.vue'
const props = defineProps({
dataContent: {
type: Object,

Loading…
Cancel
Save