Commit ed87f379 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev' into dev

parents f33c81cf 4c1a9c56
......@@ -143,6 +143,15 @@ export function makeBillService(params) {
});
}
// 空运制作提单
export function makeAirBillService(params) {
return request({
url: "/shipment/make-bill-of-lading/airMake",
method: "get",
params,
});
}
// 创建制作提货单
export function createBillService(data) {
return request({
......
......@@ -369,9 +369,9 @@ export function updateAllOrderClearance(data) {
* @param {*} data
* @return {*}
*/
export function getLineInfoList(params) {
export function getLineInfo(params) {
return request({
url: `/ecw/warehouse/getLineInfoList`,
url: `/ecw/warehouse/getLineInfo`,
method: "get",
params
});
......
......@@ -120,7 +120,7 @@
<el-dropdown-item command="error" v-has-permi="['shipment:air:exception']">{{$t('异常登记')}}</el-dropdown-item>
<el-dropdown-item command="cost" v-has-permi="['shipment:air:fee']">{{$t('费用登记')}}</el-dropdown-item>
<el-dropdown-item command="batchMarkup" v-has-permi="['shipment:air:batchMarkup']">{{$t('批量加价')}}</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.prStatus<25" command="editLadingBill" v-has-permi="['shipment:air:editLadingBill']">{{$t('编辑提货单')}}</el-dropdown-item>
<el-dropdown-item command="editLadingBill" v-has-permi="['shipment:air:editLadingBill']">{{$t('编辑提货单')}}</el-dropdown-item>
<!-- <el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item>-->
</el-dropdown-menu>
......@@ -206,7 +206,7 @@ import {
dealCustomsSplitNotify,
exportPreloadGoodsList, downloadReceivableList, getAirNoticeList, zipDownload, downloadAirReceivableList
} from '@/api/ecw/box'
import { getLineInfoList } from '@/api/ecw/boxAir'
import { getLineInfo } from '@/api/ecw/boxAir'
import { getChannelList } from '@/api/ecw/channel'
import { getWarehouseList } from '@/api/ecw/warehouse'
import costForm from './costForm.vue'
......@@ -311,7 +311,24 @@ export default {
this.$t("部分完成"),
this.$t("已完成"),
],
allUsers: []
allUsers: [],
makeBillNodeStatus: {
'1':403,
'2':407,
'3':409,
'4':410,
'5':411,
'6':412,
'7':421,
'8':421,
'9':421,
'10':426,
'11':426,
'12':428,
'13':430,
'14':435,
'15':438,
}
}
},
computed: {
......@@ -518,6 +535,13 @@ export default {
this.handleDelete(row);
break;
case "editLadingBill":
let line = await getLineInfo({startWarehouseId: row.startWarehouseId,destWarehouseId: row.destWarehouseId,transportType:row.transportType})
let makeBillNode = line.data.makeBillNode
console.log(row,this.makeBillNodeStatus[makeBillNode])
if(row.shipmentStatusAir<this.makeBillNodeStatus[makeBillNode]){
this.$message.error(this.$t("此出货单状态未到提单节点"));
return
}
const cabinetLabel = this.getCabinetName(row.cabinetId);
const title = this.$t(
"查看提单 {selfNo}",
......
......@@ -111,7 +111,7 @@ import {
getMakeBillList,
makeBillService,
getBillService,
deleteBillService, zipDownload, downloadReceivableList,
deleteBillService, zipDownload, downloadReceivableList, makeAirBillService, downloadAirReceivableList,
} from "@/api/ecw/box";
import {
getTotlContent,
......@@ -225,7 +225,8 @@ export default {
);
return;
case "downloadReceivableList":
downloadReceivableList({ shipmentId: this.shipmentObj.id }).then(res => {
const api = this.type == 'air' ? downloadAirReceivableList : downloadReceivableList;
api({ shipmentId: this.shipmentObj.id }).then(res => {
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
})
return;
......@@ -236,7 +237,8 @@ export default {
this.$set(this.dialogCfg, "visible", true);
},
makeBill(row) {
makeBillService({
let api = this.type != 'air' ? makeBillService : makeAirBillService;
api({
orderId: row.orderId,
shipmentId: this.shipmentObj.id,
}).then((res) => {
......
......@@ -95,7 +95,7 @@
<template slot-scope="scope"> {{ scope.row.sumVolume }}/{{ scope.row.sumWeight }} </template>
</el-table-column>
<el-table-column :label="$t('到港状态')" prop="arrival" />
<el-table-column :label="$t('到港状态')" prop="clear" />
<el-table-column :label="$t('清关状态')" prop="clear" />
<el-table-column :label="$t('控货')">
<template slot-scope="scope">
{{ cargoControlStatus[scope.row.cargoControlStatus] }}
......
......@@ -288,7 +288,7 @@
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="warehouseInInfoVO.cartonsNum">
<template slot-scope="scope">
<span style="color: blue;" v-if="scope.row.mixStatus == 1">{{scope.row.warehouseInInfoVO.cartonsNum}}{{$t('(混箱)')}}</span>
<el-button v-if="scope.row.mixStatus == 1" type="text" @click="seeBox(scope.row.orderId,scope.row.orderItemId)">{{scope.row.warehouseInInfoVO.cartonsNum}}{{$t('(混箱)')}}</el-button>
<template v-else>
{{scope.row.warehouseInInfoVO.cartonsNum}}
</template>
......@@ -373,6 +373,16 @@
<el-button type="primary" @click="relationOrderListDialog.visible = false">{{$t('关闭窗口')}}</el-button>
</el-row>
</el-dialog>
<el-dialog :title="$t('箱明细')" :visible.sync="boxShow" :before-close="closeBox" :close-on-click-modal="false" append-to-body width="1024px">
<el-form v-if="boxShow">
<WarehouseRecordDetailItem
v-for="(item, index) in boxData"
:key="index" v-model="boxData[index]"
:index="index" :attr-list="attrList"
:readonly="true"
/>
</el-form>
</el-dialog>
</div>
</template>
......@@ -391,6 +401,8 @@ import {
getAllRelateOrderList
} from "@/api/ecw/boxSea";
import { createGoods, preloadPage } from "@/api/ecw/boxAir"
import {getProductAttrList} from '@/api/ecw/productAttr'
import { getOrderWarehouseIn } from '@/api/ecw/order'
import { getChannelList } from "@/api/ecw/channel";
import userSelect from "./common/userSelect.vue";
import {
......@@ -403,6 +415,7 @@ import {
import dayjs from "dayjs";
import WorkFlow from "@/components/WorkFlow";
import Decimal from "decimal.js";
import WarehouseRecordDetailItem from "@/views/ecw/order/warehousing/components/WarehouseRecordDetailItem.vue";
/**
* 分拣
......@@ -410,7 +423,7 @@ import Decimal from "decimal.js";
export default {
name: "preinstall",
inheritAttrs: false,
components: { userSelect, WorkFlow },
components: { userSelect, WorkFlow, WarehouseRecordDetailItem },
data() {
return {
// 状态
......@@ -472,6 +485,10 @@ export default {
visible: false,
data: []
},
// 特性列表
attrList: [],
boxShow:false,
boxData: []
};
},
......@@ -626,6 +643,25 @@ export default {
this.queryParams = {};
this.$refs["queryForm"].resetFields();
},
closeBox(){
this.boxData = []
this.boxShow = false
},
seeBox(orderId,orderItemId){
getOrderWarehouseIn(orderId).then(async(res) => {
let orderwarehouseList = res.data
var warehouseItem = orderwarehouseList.find(item => item.orderItemId == orderItemId)
warehouseItem.orderWarehouseInBackItemDoList.forEach(item=>{
if(item.orderWarehouseInDetailsVOList){
item.orderWarehouseInDetailsVOList.forEach(w=>{
this.boxData.push(w)
})
}
})
this.attrList = (await getProductAttrList()).data
this.boxShow = true
})
},
/** 提交 */
onSubmit() {
this.$refs["operatorForm"].validate((valid, errors) => {
......
......@@ -258,7 +258,14 @@
<dict-tag :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL" :value="row.feeType" />{{ $t('') }}
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="warehouseInInfoVO.cartonsNum" />
<el-table-column :label="$t('箱数')" align="center" prop="warehouseInInfoVO.cartonsNum">
<template slot-scope="scope">
<el-button v-if="scope.row.mixStatus == 1" type="text" @click="seeBox(scope.row.orderId,scope.row.orderItemId)">{{scope.row.warehouseInInfoVO.cartonsNum}}{{$t('(混箱)')}}</el-button>
<template v-else>
{{scope.row.warehouseInInfoVO.cartonsNum}}
</template>
</template>
</el-table-column>
<el-table-column :label="$t('体积') +'/' + $t('重量')" align="center" prop="volumeWeight">
<template slot-scope="scope">
<p v-if="scope.row.warehouseInInfoVO && scope.row.warehouseInInfoVO.volume">{{getTotlContent(scope.row.warehouseInInfoVO,['volume'])}}</p>
......@@ -336,7 +343,16 @@
<el-button type="primary" @click="relationOrderListDialog.visible = false">{{$t('关闭窗口')}}</el-button>
</el-row>
</el-dialog>
<el-dialog :title="$t('箱明细')" :visible.sync="boxShow" :before-close="closeBox" :close-on-click-modal="false" append-to-body width="1024px">
<el-form v-if="boxShow">
<WarehouseRecordDetailItem
v-for="(item, index) in boxData"
:key="index" v-model="boxData[index]"
:index="index" :attr-list="attrList"
:readonly="true"
/>
</el-form>
</el-dialog>
</div>
</template>
......@@ -366,14 +382,16 @@ import {
import dayjs from "dayjs";
import WorkFlow from "@/components/WorkFlow";
import Decimal from "decimal.js";
import {getProductAttrList} from '@/api/ecw/productAttr'
import { getOrderWarehouseIn } from '@/api/ecw/order'
import WarehouseRecordDetailItem from "@/views/ecw/order/warehousing/components/WarehouseRecordDetailItem.vue";
/**
* 预装
*/
export default {
name: "preinstall",
inheritAttrs: false,
components: { userSelect, WorkFlow },
components: { userSelect, WorkFlow, WarehouseRecordDetailItem },
data() {
return {
// 状态
......@@ -433,7 +451,10 @@ export default {
visible: false,
data: []
},
// 特性列表
attrList: [],
boxShow:false,
boxData: []
};
},
computed: {
......@@ -548,6 +569,25 @@ export default {
this.queryParams = {};
this.$refs["queryForm"].resetFields();
},
closeBox(){
this.boxData = []
this.boxShow = false
},
seeBox(orderId,orderItemId){
getOrderWarehouseIn(orderId).then(async(res) => {
let orderwarehouseList = res.data
var warehouseItem = orderwarehouseList.find(item => item.orderItemId == orderItemId)
warehouseItem.orderWarehouseInBackItemDoList.forEach(item=>{
if(item.orderWarehouseInDetailsVOList){
item.orderWarehouseInDetailsVOList.forEach(w=>{
this.boxData.push(w)
})
}
})
this.attrList = (await getProductAttrList()).data
this.boxShow = true
})
},
/** 提交 */
onSubmit() {
this.$refs["operatorForm"].validate((valid, errors) => {
......
......@@ -17,6 +17,50 @@
</el-descriptions-item>
<el-descriptions-item v-if="reason" :label="$t('申请理由')">{{reason}}</el-descriptions-item>
</el-descriptions>
<el-card class="card">
<div slot="header" class="card-title">{{ $t('应收明细') }}</div>
<el-table :data="list" border>
<el-table-column :label="$t('订单号')" align="center" prop="orderNo" />
<el-table-column :label="$t('提单号')" align="center" prop="tidanNo" />
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('品名')" align="center" prop="title">
<template slot-scope="scope">
<span v-if="scope.row.feeType!=5">{{ scope.row.titleZh?(scope.row.titleZh + "(" + scope.row.titleEn + ")"):'' }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num" />
<el-table-column :label="$t('体积/重量')" align="center" prop="weight">
<template slot-scope="scope">
<span v-if="scope.row.feeType!=5"> {{ scope.row.volume + "/" + scope.row.weight }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('收入类型')" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('单价金额')" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
{{getCurrencyLabel(scope.row.currencyId)}}
</template>
</el-table-column>
<el-table-column :label="$t('总金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
{{getCurrencyLabel(scope.row.currencyId)}}
</template>
</el-table-column>
<el-table-column :label="$t('优惠金额')" align="center">
<template slot-scope="scope">
{{ scope.row.discountTotal ? `${scope.row.discountTotal}(${scope.row.discountRemark})` : 0 }}
</template>
</el-table-column>
</el-table>
</el-card>
<div class="btn">
<el-button
size="mini"
......@@ -120,7 +164,12 @@ export default {
})
this.$set(this,'collectionAmount',amountList)
})
}
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
return ''
},
}
}
</script>
......@@ -139,4 +188,11 @@ export default {
font-weight:600;
}
}
.card {
margin-top: 20px;
}
.card-title {
font-size: 18px;
font-weight: bold;
}
</style>
......@@ -56,6 +56,7 @@ export default {
created(){
this.show = true
console.log(this.orderItemId)
if(this.order && this.orderItemId){
this.queryParams.orderId = this.order.orderId;
this.queryParams.orderItemId = this.orderItemId;
......
......@@ -30,12 +30,12 @@
<div slot="header" class="card-title">
{{$t('打包前')}}
</div>
<el-table v-if="orderWarehouseInContent" :data="orderWarehouseInContent">
<el-table v-if="orderWarehouseInContent" :data="orderWarehouseInContent.orderWarehouseInBackItemDoList">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum">
<template slot-scope="{row}">
<span>{{row.cartonsNum}}</span>
<!-- <el-button type="primary" @click="seeBox(row)">({{$t('混箱')}})</el-button> -->
<el-button v-if="row.orderWarehouseInDetailsVOList&&row.orderWarehouseInDetailsVOList.length>0" type="text" @click="seeBox(row.orderWarehouseInDetailsVOList)">({{$t('混箱')}})</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('入仓类型')" prop="cartonsNum">
......@@ -77,7 +77,7 @@
</el-table-column>
<el-table-column :label="$t('入仓影像')" prop="orderLocationBackVOList" >
<template slot-scope="{row}">
<el-button type="primary" @click="seeMv(row.pictureUrls)">{{$t('查看')}}</el-button>
<el-button type="primary" @click="seeMv(orderWarehouseInContent.pictures)">{{$t('查看')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -88,7 +88,12 @@
</div>
<el-table v-if="warehouseItem && warehouseItem.orderWarehouseInBackItemDoList" :data="warehouseItem.orderWarehouseInBackItemDoList">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum" />
<el-table-column :label="$t('箱数')" prop="cartonsNum">
<template slot-scope="{row}">
<span>{{row.cartonsNum}}</span>
<el-button v-if="row.orderWarehouseInDetailsVOList&&row.orderWarehouseInDetailsVOList.length>0" type="text" @click="seeBox(row.orderWarehouseInDetailsVOList)">({{$t('混箱')}})</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('入仓类型')" prop="cartonsNum">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType" />
......@@ -128,7 +133,7 @@
</el-table-column>
<el-table-column :label="$t('入仓影像')" prop="orderLocationBackVOList" >
<template slot-scope="{row}">
<el-button type="primary" @click="seeMv(row.pictureUrls)">{{$t('查看')}}</el-button>
<el-button type="primary" @click="seeMv(warehouseItem.pictureUrls)">{{$t('查看')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -146,10 +151,10 @@
<el-button type="primary" @click="closeDialog">{{$t('关闭窗口')}}</el-button>
</el-dialog>
<el-dialog :title="$t('入仓影像')" :visible="mvShow" :before-close="closeMv" :close-on-click-modal="false" width="600px">
<el-dialog :title="$t('入仓影像')" :visible.sync="mvShow" :before-close="closeMv" :close-on-click-modal="false" width="600px">
<div style="display:flex;flex-wrap:wrap">
<div v-for="(item, index) in pictureUrls" :index="index" :key="index" style="width:80px;height:80px">
<image v-if="item.type === 'image'" :src="item.url" mode="scaleToFill" style="height: 100%" @tap="previewImage(item.url)" />
<img v-if="item.type === 'image'" :src="item.url" mode="scaleToFill" style="height: 100%" @tap="previewImage(item.url)" />
<video v-else-if="item.type === 'video'" :id="`video_${index}`" style="width: 100%;height: 100%" :src="item.url" @play="playVideo(index)" @tap="playVideo(index)" @fullscreenchange="fullscreenchange"></video>
</div>
</div>
......@@ -157,6 +162,14 @@
<span>{{$t('暂无影像')}}</span>
</div>
</el-dialog>
<el-dialog :title="$t('箱明细')" :visible.sync="boxShow" :before-close="closeBox" :close-on-click-modal="false" width="800px">
<WarehouseRecordDetailItem
v-for="(item, index) in boxData"
:key="index" v-model="boxData[index]"
:index="index" :attr-list="attrList"
:readonly="true"
/>
</el-dialog>
</div>
</template>
<script>
......@@ -165,9 +178,10 @@ import { DICT_TYPE } from '@/utils/dict'
import { parseTime } from '@/utils/ruoyi'
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {getProductAttrList} from '@/api/ecw/productAttr'
import WarehouseRecordDetailItem from "@/views/ecw/order/warehousing/components/WarehouseRecordDetailItem.vue";
export default {
components: {
WarehouseAreaSelect
WarehouseAreaSelect,WarehouseRecordDetailItem
},
filters: {parseTime},
props:{
......@@ -188,9 +202,14 @@ export default {
quantityAll:0
},
pictureUrls:[],
mvShow:false
mvShow:false,
boxShow:false,
// 特性列表
attrList: [],
boxData: []
}
},
computed:{
info(){
return this.orderDetail || this.order
......@@ -235,6 +254,7 @@ export default {
}
this.getOrderWarehouseIn()
this.productAttrList = (await getProductAttrList()).data
this.getAttrList()
},
methods:{
// 获取储位名称
......@@ -291,8 +311,36 @@ export default {
},
closeMv(){
this.mvShow = false
},
closeBox(){
this.boxData = []
this.boxShow = false
},
seeBox(data){
data.forEach(e => {
let bg = {}
if (e.boxGauge) {
const boxGauge = e.boxGauge.split('*')
// e.boxGauge1 = boxGauge[0]
// e.boxGauge2 = boxGauge[1]
// e.boxGauge3 = boxGauge[2]
bg = {
boxGauge1: boxGauge[0],
boxGauge2: boxGauge[1],
boxGauge3: boxGauge[2]
}
}
this.boxData.push({...e, ...bg})
})
this.boxShow = true
},
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then(response => {
this.attrList = response.data;
})
},
}
}
</script>
......@@ -4,7 +4,14 @@
<el-button v-if="info.transportId==3" style="position:absolute;top:15px;left:340px" type="primary" @click="seePackLog">{{$t('查看打包历史')}}</el-button>
<el-table v-if="warehouseItem && warehouseItem.orderWarehouseInBackItemDoList" :data="warehouseItem.orderWarehouseInBackItemDoList">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum" />
<el-table-column :label="$t('箱数')" prop="cartonsNum">
<template slot-scope="{row}">
<template v-if="row.orderWarehouseInDetailsVOList && row.orderWarehouseInDetailsVOList.length">
<WarehouseRecordDetail v-model="row.orderWarehouseInDetailsVOList" text readonly />
</template>
<template v-else>{{ row.cartonsNum }}</template>
</template>
</el-table-column>
<el-table-column :label="$t('入仓类型')" prop="cartonsNum">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType" />
......@@ -60,8 +67,10 @@ import { DICT_TYPE } from '@/utils/dict'
import { parseTime } from '@/utils/ruoyi'
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue";
import WarehouseRecordDetail from '@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue'
export default {
components: {
WarehouseRecordDetail,
ImageDisplay,
WarehouseAreaSelect
},
......@@ -124,7 +133,7 @@ export default {
})
},
seePackLog(){
this.$emit('openPackHistory',2)
this.$emit('openPackHistory',this.orderItemId)
}
}
}
......
......@@ -868,9 +868,8 @@ export default {
return JSON.parse(note)
},
//查看打包历史
openPackHistory(){
this.shopPackId = this.showWarehouseInItemId
openPackHistory(id){
this.shopPackId = id
},
//查看打包历史详情
showPackDetail(packAfterData){
......
......@@ -373,7 +373,7 @@
</template>
<!--不可出-->
<template v-if="include(scope.row.airShipment, [2,3,4])">
<template v-if="include(scope.row.airShipment, [2,3,4]) && scope.row.status < 11">
<el-dropdown-item @click.native="setCanNotShipment(scope.row)" v-hasPermi="['ecw:order:setCanNotShipment']">{{$t('不可出')}}</el-dropdown-item>
</template>
</el-dropdown-menu>
......
<script>
import ImageAndVideoUpload from '@/components/ImageAndVideoUpload'
export default {
components: {ImageAndVideoUpload},
props:{
value:{
type:Array,
default:() => []
},
readonly: Boolean
},
data(){
return {
show: false,
pictureUrls:[]
}
},
watch:{
show(){
if(!this.show){
this.$emit('close', this.pictureUrls)
}
},
pictureUrls(){
if(this.value == this.pictureUrls) return
this.$emit('input', this.pictureUrls)
}
},
created() {
this.pictureUrls = this.value
this.show = true
},
methods:{
onBeforeClose(){
this.show = false
}
}
}
</script>
<template>
<el-dialog :visible.sync="show" :before-close="onBeforeClose">
<image-and-video-upload v-model="pictureUrls" readonly></image-and-video-upload>
</el-dialog>
</template>
......@@ -203,7 +203,14 @@
</el-table>
</el-form>
</el-card>
<el-card style="margin-top: 15px;">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="pictureUrls" ></image-and-video-upload>
</div>
</el-card>
<span slot="footer">
<el-button type="primary" @click="handleSubmit">{{ $t('完成打包') }}</el-button>
<el-button @click="handleClose">{{ $t('返回')}}</el-button>
......@@ -223,11 +230,13 @@ 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";
export default {
name: "Package",
components: {
ImageAndVideoUpload,
WarehouseRecordDetail,
ProductSelector,
WarehouseAreaSelect,
......@@ -423,11 +432,14 @@ export default {
//类型列表
typeList: [],
// 特性列表
attrList: []
attrList: [],
pictureUrls: []
}
},
created() {
async created() {
this.visible = true
this.$nextTick()
this.pictureUrls = this.orderItemB.pictureUrls || []
},
methods: {
init(){
......@@ -538,6 +550,7 @@ export default {
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
pictureUrls: this.pictureUrls
}).then(r => {
if (r.data) {
this.$message.success('打包成功')
......
......@@ -9,7 +9,58 @@
<el-table
v-if="order.orderItemVOList && order.orderItemVOList.length > 0 && orderItemList && orderItemList.length > 0"
:data="order.orderItemVOList || []"
default-expand-all
style="width: 100%">
<!--入仓记录-->
<el-table-column type="expand">
<template slot-scope="props">
<div style="padding-left: 80px">
<el-table v-if="wareItem(props.row.orderItemId).orderWarehouseInBackItemDoList" :data="wareItem(props.row.orderItemId).orderWarehouseInBackItemDoList">
<el-table-column :label="$t('序号')">
<template slot-scope="{row, column, $index}">
{{$index + 1}}
</template>
</el-table-column>
<el-table-column prop="cartonsNum" :label="$t('箱数')"></el-table-column>
<el-table-column prop="areaName" :label="$t('入仓类型')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType"></dict-tag>
</template>
</el-table-column>
<el-table-column prop="areaName" :label="$t('包装类型')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="row.unit"></dict-tag>
</template>
</el-table-column>
<el-table-column prop="areaName" :label="$t('长')">
<template v-slot="{row}">{{row.boxGauge.split('*')[0]}}</template>
</el-table-column>
<el-table-column prop="areaName" :label="$t('宽')">
<template v-slot="{row}">{{row.boxGauge.split('*')[1]}}</template>
</el-table-column>
<el-table-column prop="areaName" :label="$t('高')">
<template v-slot="{row}">{{row.boxGauge.split('*')[2]}}</template>
</el-table-column>
<el-table-column prop="volume" :label="$t('体积')+'(m³)'"></el-table-column>
<el-table-column prop="weight" :label="$t('重量')+'(kg)'"></el-table-column>
<el-table-column prop="quantityAll" :label="$t('数量') + '(个)'"></el-table-column>
<el-table-column prop="expressNo" :label="$t('快递单号')"></el-table-column>
<!--<el-table-column prop="areaName" :label="$t('首次入仓时间')"></el-table-column>-->
<el-table-column prop="areaName" :label="$t('储位')">
<template v-slot="{row}">
{{row.orderLocationStr4Merge}}
</template>
</el-table-column>
<el-table-column prop="areaName" :label="$t('影像')">
<template v-slot="{row}">
<el-button type="text" @click="showMedia(props.row)">{{$t('查看')}}</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
</el-table-column>
<el-table-column
type="index"
width="50"
......@@ -134,7 +185,7 @@
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.exceptionUrls" ></image-and-video-upload>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="pictureUrls" readonly ></image-and-video-upload>
</div>
</el-card>
<div style="text-align: center;margin-top: 15px">
......@@ -171,6 +222,7 @@
v-if="!!packageOrderItem"
@close="onPackageClose"
></package>
<media-dialog v-if="curPictrues" :value="curPictrues" @close="curPictrues=null"></media-dialog>
</div>
</template>
......@@ -195,11 +247,13 @@ import ImageAndVideoUpload from '@/components/ImageAndVideoUpload'
import Package from './components/Package'
import Template from "@/views/cms/template/index.vue";
import {getProductAttrList} from "@/api/ecw/productAttr";
import MediaDialog from "@/views/ecw/order/stocking/components/MediaDialog.vue";
export default {
name: "Stocking",
components: {
MediaDialog,
Template,
orderBaseInfo,
WarehouseAreaDialog,
......@@ -274,7 +328,9 @@ export default {
packageOrderItem: null,
// 打包商品的入仓商品项
packageWarehouseItem: null,
productAttrList: []
productAttrList: [],
// 当前查看的影像
curPictrues: null
}
},
......@@ -365,6 +421,14 @@ export default {
this.packageOrderItem=null;
this.packageOrderItem=null;
this.getList()
},
showMedia(orderItem){
console.log('查看影像', orderItem)
const wareItem = this.wareItem(orderItem.orderItemId)
if(!wareItem.pictureUrls){
return this.$message.info(this.$t('暂无影像'))
}
this.curPictrues = wareItem.pictureUrls || []
}
},
watch: {
......@@ -422,6 +486,15 @@ export default {
})
return arr.join(",")
}
},
// 全部入仓记录的入仓影像
pictureUrls(){
let urls = []
this.orderItemList.forEach(item => {
console.log('pictureUrls', item.pictureUrls)
urls = urls.concat(item.pictureUrls || [])
})
return urls
}
}
}
......
......@@ -70,10 +70,19 @@
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-col :span="8">
<el-form-item :label="$t('入仓时间')" v-if="!edit">
<el-date-picker v-model="form.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('用途')">
<el-checkbox-group v-model="form.usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, 'label') }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-card class="box-card">
......@@ -289,10 +298,20 @@
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-col :span="8">
<el-form-item :label="$t('入仓时间')">
<el-date-picker v-model="form1.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('用途')">
<el-checkbox-group v-model="form1.usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, 'label') }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-card class="box-card">
......@@ -418,6 +437,7 @@
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<WarehouseRecordDetail v-model="form1.table[$index].orderWarehouseInDetailsVOList" />
<el-popconfirm
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index, 1)"
......@@ -671,7 +691,8 @@ export default {
type: undefined,
feeType: undefined,
recordMode: undefined,
pictureUrls: []
pictureUrls: [],
usageIds: []
},
form1: {
table: [],
......@@ -690,7 +711,8 @@ export default {
type: 1,
feeType: undefined,
recordMode: undefined,
pictureUrls: []
pictureUrls: [],
usageIds: []
},
brandList: [],
brandList1: [],
......@@ -769,6 +791,7 @@ export default {
this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType
this.form.pictureUrls = this.warehousing.pictureUrls
this.form.usageIds = this.warehousing.usageIds?.split(',') || []
this.warehousing.orderWarehouseInBackItemDoList.forEach(e => {
let bg = {}
......@@ -853,6 +876,7 @@ export default {
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
warehouseInProdAttrIds: this.form1.warehouseInProdAttrIds.join(','),
usageIds: this.form1.usageIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => {
return {
...e,
......@@ -900,6 +924,7 @@ export default {
weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.form.prodId,
warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','),
usageIds: this.form.usageIds.join(','),
"orderWarehouseInUpdateItemDoList": this.form.table.map(e => {
return {
...e,
......@@ -930,6 +955,7 @@ export default {
orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined,
warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','),
usageIds: this.form.usageIds.join(','),
orderWarehouseInItemDoList: this.form.table.map(e => {
return {
...e,
......
<template>
<div style="display: inline-block">
<template v-if="text">
<el-button size="mini" type="text" style="margin-right: 10px" @click="handleOpen">{{ value.length }}(混箱)</el-button>
</template>
<template v-else>
<el-button size="mini" type="primary" style="margin-right: 10px" @click="handleOpen">{{ title }}</el-button>
</template>
<el-dialog
append-to-body
:title="title"
......@@ -48,6 +53,10 @@ export default {
readonly: {
type: Boolean,
default: false
},
text: {
type: Boolean,
default: false
}
},
......@@ -73,7 +82,7 @@ export default {
"cartonsNum": undefined,
"createTime": "",
"expressNo": "",
"prodAttrIds": [],
"prodAttrIds": '',
"prodId": undefined,
"quantityAll": undefined,
"specificationType": undefined,
......@@ -99,7 +108,7 @@ export default {
"cartonsNum": undefined,
"createTime": "",
"expressNo": "",
"prodAttrIds": [],
"prodAttrIds": '',
"prodId": undefined,
"quantityAll": undefined,
"specificationType": undefined,
......
......@@ -7,7 +7,7 @@
<el-row :gutter="10">
<el-col :span="12">
<el-form-item :label="$t('中文品名')">
<product-selector v-model="value.prodId" determined protect-once :disabled="readonly" />
<product-selector v-model="value.prodId" @change="onProductChange" determined :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -43,40 +43,33 @@
<el-checkbox-group v-model="usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value" :disabled="readonly">{{ $l(item, 'label') }}</el-checkbox>
</el-checkbox-group>
<!-- <dict-selector
v-model="usageIds"
:type="DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE"
multiple
form-type="checkbox"
:disabled="readonly"
></dict-selector>-->
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('长')">
<el-input v-model="boxGauge1" :disabled="readonly" />
<el-input v-model="boxGauge1" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('宽')">
<el-input v-model="boxGauge2" :disabled="readonly" />
<el-input v-model="boxGauge2" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('高')">
<el-input v-model="boxGauge3" :disabled="readonly" />
<el-input v-model="boxGauge3" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('重量')">
<el-input v-model="value.weight" :disabled="readonly" />
<el-input v-model="value.weight" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('体积')">
<el-input v-model="value.volume" :disabled="readonly" />
<el-input v-model="value.volume" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
</el-row>
......@@ -93,7 +86,7 @@
</el-col>
<el-col :span="4">
<el-form-item :label="$t('数量')">
<el-input v-model="value.quantityAll" :disabled="readonly" />
<el-input v-model="value.quantityAll" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
</el-row>
......@@ -150,14 +143,16 @@ export default {
await getProductBrank(this.value.brand).then(r => {
this.brandList = [r.data]
})
} else {
this.getProductBrandPage()
}
if (typeof this.value.prodAttrIds === 'string') {
this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e) || []
if (typeof this.value.prodAttrIds === 'string' && this.value.prodAttrIds.length > 0) {
this.prodAttrIds.push(...this.value.prodAttrIds.split(',').map(e => +e))
}
console.log(this.prodAttrIds)
if (this.value.usageIds) {
console.log('this.value.usageIds',this.value.usageIds)
await this.$nextTick()
this.usageIds = this.value.usageIds.split(',') || []
}
......@@ -186,6 +181,12 @@ export default {
},
handleDelete() {
this.$emit('handle-delete')
},
onProductChange(product){
if (!product || this.readonly) {
return
}
this.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
}
},
watch: {
......@@ -193,19 +194,46 @@ export default {
this.value.prodAttrIds = val.join(',')
},
usageIds(val) {
console.log('val', val)
this.$nextTick(() => {
this.value.usageIds = val.join(',')
})
},
boxGauge1() {
if (this.boxGauge1 < 0 ) {
this.boxGauge1 = -this.boxGauge1
}
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
},
boxGauge2() {
if (this.boxGauge2 < 0 ) {
this.boxGauge2 = -this.boxGauge2
}
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
},
boxGauge3() {
if (this.boxGauge3 < 0 ) {
this.boxGauge3 = -this.boxGauge3
}
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
},
'value.volume'() {
if (this.value.volume < 0) {
this.value.volume = -this.value.volume
}
},
'value.quantityAll'() {
if (this.value.quantityAll < 0) {
this.value.quantityAll = -this.value.quantityAll
}
},
'value.weight'() {
if (this.value.weight < 0) {
this.value.weight = -this.value.weight
}
}
}
}
......
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