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

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

parent 5e4ea432
......@@ -5,7 +5,7 @@
append-to-body
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 :label="$t('品名')" prop="name">
<template #default="{row}">{{$l(row, "prodName")}}</template>
......@@ -22,32 +22,37 @@
<el-table-column :label="$t('用途')" prop="unit">
<template #default="{row}">{{$l(row, "usageNames")}}</template>
</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>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSubmit">{{$t('确定')}}</el-button>
<el-button @click="handleClose">{{$t('取消')}}</el-button>
</div>
<media-dialog v-if="curPictrues" :value="curPictrues" @close="curPictrues=null"></media-dialog>
</el-dialog>
</template>
<script>
import ProductSelector from "@/components/ProductSelector"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
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";
import {getOrderItemCommonAttr} from "@/api/ecw/order"
import MediaDialog from "@/views/ecw/order/stocking/components/MediaDialog.vue";
export default {
components: {MediaDialog},
props: {
orderId: {
type: Number,
......@@ -60,7 +65,8 @@ export default {
visible: true,
// 备选的商品明细
orderItemDetails: [],
multipleSelection:[]
multipleSelection:[],
curPictrues: null
}
},
watch:{
......@@ -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() {
getOrderItemCommonAttr(this.orderId, this.warehouseInId || 0).then(res => {
this.orderItemDetails = res.data
......@@ -99,6 +116,18 @@ export default {
},
handleClose() {
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 {
</script>
<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>
</el-dialog>
</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