Commit ee579df8 authored by dragondean@qq.com's avatar dragondean@qq.com

打包从订单选明细适配新接口数据格式

parent 5e4ea432
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
append-to-body append-to-body
width="90vw" width="90vw"
> >
<el-table ref="multipleTable" :data="orderItemDetails" @selection-change="handleSelectionChange"> <el-table ref="multipleTable" :data="flatList" @selection-change="handleSelectionChange" :span-method="objectSpanMethod">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column :label="$t('品名')" prop="name"> <el-table-column :label="$t('品名')" prop="name">
<template #default="{row}">{{$l(row, "prodName")}}</template> <template #default="{row}">{{$l(row, "prodName")}}</template>
...@@ -22,32 +22,37 @@ ...@@ -22,32 +22,37 @@
<el-table-column :label="$t('用途')" prop="unit"> <el-table-column :label="$t('用途')" prop="unit">
<template #default="{row}">{{$l(row, "usageNames")}}</template> <template #default="{row}">{{$l(row, "usageNames")}}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('数量')" prop="quantityAll"></el-table-column> <el-table-column :label="$t('总数量')" prop="quantityAll"></el-table-column>
<el-table-column :label="$t('总箱数')" prop="cartonsNum"></el-table-column>
<el-table-column :label="$t('包装类型')" prop="specificationType">
<template #default="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('规格')" prop="boxGauge"></el-table-column>
<el-table-column :label="$t('总重量')" prop="weight"></el-table-column>
<el-table-column :label="$t('快递单号')" prop="expressNo"></el-table-column>
<el-table-column :label="$t('影像')" prop="quantityAll">
<template #default="{row}">
<el-button type="text" @click="curPictrues = row.pictureUrls">{{$t('查看影像')}}</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSubmit">{{$t('确定')}}</el-button> <el-button type="primary" @click="handleSubmit">{{$t('确定')}}</el-button>
<el-button @click="handleClose">{{$t('取消')}}</el-button> <el-button @click="handleClose">{{$t('取消')}}</el-button>
</div> </div>
<media-dialog v-if="curPictrues" :value="curPictrues" @close="curPictrues=null"></media-dialog>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import ProductSelector from "@/components/ProductSelector" import {getOrderItemCommonAttr} from "@/api/ecw/order"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect" import MediaDialog from "@/views/ecw/order/stocking/components/MediaDialog.vue";
import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBrank"
import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {finishPacked, getOrderItemCommonAttr, orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType"
import {addProduct} from "@/api/ecw/product"
import WarehouseRecordDetail from "@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue";
import Template from "@/views/cms/template/index.vue";
export default { export default {
components: {MediaDialog},
props: { props: {
orderId: { orderId: {
type: Number, type: Number,
...@@ -60,7 +65,8 @@ export default { ...@@ -60,7 +65,8 @@ export default {
visible: true, visible: true,
// 备选的商品明细 // 备选的商品明细
orderItemDetails: [], orderItemDetails: [],
multipleSelection:[] multipleSelection:[],
curPictrues: null
} }
}, },
watch:{ watch:{
...@@ -70,6 +76,17 @@ export default { ...@@ -70,6 +76,17 @@ export default {
} }
}, },
}, },
computed:{
flatList(){
let arr = []
this.orderItemDetails.forEach(item => {
item.orderWarehouseInCommonAttrVOList?.forEach((vo, index) => {
arr.push({...item, ...vo, index, span: index === 0 ? item.orderWarehouseInCommonAttrVOList?.length : 0})
})
})
return arr
}
},
async created() { async created() {
getOrderItemCommonAttr(this.orderId, this.warehouseInId || 0).then(res => { getOrderItemCommonAttr(this.orderId, this.warehouseInId || 0).then(res => {
this.orderItemDetails = res.data this.orderItemDetails = res.data
...@@ -99,6 +116,18 @@ export default { ...@@ -99,6 +116,18 @@ export default {
}, },
handleClose() { handleClose() {
this.visible = false this.visible = false
},
objectSpanMethod({ row, column, rowIndex, columnIndex }){
if(columnIndex > 6){
return {
rowspan: row.span,
colspan: 1
}
}
return {
rowspan: 1,
colspan: 1
}
} }
} }
} }
......
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
</script> </script>
<template> <template>
<el-dialog :visible.sync="show" :before-close="onBeforeClose"> <el-dialog :visible.sync="show" :before-close="onBeforeClose" append-to-body>
<image-and-video-upload v-model="pictureUrls" readonly></image-and-video-upload> <image-and-video-upload v-model="pictureUrls" readonly></image-and-video-upload>
</el-dialog> </el-dialog>
</template> </template>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment