Commit 7d58a160 authored by 邓春圆's avatar 邓春圆

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

parents 6d9f91d1 4b2e75a1
...@@ -343,3 +343,10 @@ export function updateUrl(data) { ...@@ -343,3 +343,10 @@ export function updateUrl(data) {
data, data,
}); });
} }
export function dealCustomsSplitNotify(notifyId){
return request({
url: `/shipment/box/dealCustomsSplitNotify?notifyId=${notifyId}`,
method: "get",
})
}
...@@ -515,6 +515,19 @@ export function warehousePictureList(data){ ...@@ -515,6 +515,19 @@ export function warehousePictureList(data){
data data
}) })
} }
export function warehousePictureCreate(data){
return request({
url: '/order/warehouse-picture/create',
method: 'post',
data
})
}
export function warehousePictureDelete(id){
return request({
url: '/order/warehouse-picture/delete?id=' + id,
method: 'delete'
})
}
// 获得部门订单分页 // 获得部门订单分页
export function deptOrderPage(params){ export function deptOrderPage(params){
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<script> <script>
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import {warehousePictureCreate} from "@/api/ecw/order";
export default { export default {
props: { props: {
...@@ -63,6 +64,15 @@ export default { ...@@ -63,6 +64,15 @@ export default {
isShowTip: { isShowTip: {
type: Boolean, type: Boolean,
default: true default: true
},
// 类型 1入仓 2 调拨出仓 3调拨到仓 4 订单转异
type: {
type: Number,
default: undefined
},
id: {
type: Number,
default: undefined
} }
}, },
data() { data() {
...@@ -118,7 +128,7 @@ export default { ...@@ -118,7 +128,7 @@ export default {
handleRemove(index) { handleRemove(index) {
this.fileList.splice(index, 1); this.fileList.splice(index, 1);
this.$emit("input", this.listToString(this.fileList)); this.$emit("input", this.listToString(this.fileList));
this.$emit("delete", index);
}, },
// 上传成功回调 // 上传成功回调
handleUploadSuccess(res) { handleUploadSuccess(res) {
...@@ -128,8 +138,15 @@ export default { ...@@ -128,8 +138,15 @@ export default {
this.fileList = this.fileList.concat(this.uploadList); this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = []; this.uploadList = [];
this.number = 0; this.number = 0;
warehousePictureCreate({
"bizId": this.id,
"type": this.type,
"url": res.data
}).then(() => {
this.$emit("input", this.listToString(this.fileList)); this.$emit("input", this.listToString(this.fileList));
this.$emit("refresh");
this.$modal.closeLoading(); this.$modal.closeLoading();
})
} }
}else { }else {
this.handleUploadError(); this.handleUploadError();
......
...@@ -288,7 +288,10 @@ export default { ...@@ -288,7 +288,10 @@ export default {
}, },
// 用于储位回显选中 // 用于储位回显选中
isSelected(warehouse, area, position = 0){ isSelected(warehouse, area, position = 0){
return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && (position === e.locationId || undefined === e.locationId)) return !!this.value.find(e => {
// 最后一个条件不能用!e.locationId来判断,会导致选择了没有locationId的全部被选中,上次改这里忘记什么原因了,下次复现再来调整
return warehouse === e.wareId && area === e.areaId && (position === e.locationId || e.locationId == undefined)
})
}, },
} }
} }
......
...@@ -198,7 +198,7 @@ import { ...@@ -198,7 +198,7 @@ import {
getbox, getbox,
getboxPage, getboxPage,
exportboxExcel, exportboxExcel,
getNoticeList, getNoticeList, dealCustomsSplitNotify,
} from "@/api/ecw/box"; } from "@/api/ecw/box";
import { import {
downloadFile, downloadFile,
...@@ -426,7 +426,7 @@ export default { ...@@ -426,7 +426,7 @@ export default {
} }
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCommand(row, command) { async handleCommand(row, command) {
this.$set(this.dialogCfg, "fullscreen", false); this.$set(this.dialogCfg, "fullscreen", false);
switch (command) { switch (command) {
...@@ -513,6 +513,9 @@ export default { ...@@ -513,6 +513,9 @@ export default {
if ([5, 6, 7].includes(noticeType)) { if ([5, 6, 7].includes(noticeType)) {
this.$router.push("/boxSea/query/" + row.id); this.$router.push("/boxSea/query/" + row.id);
} }
if([9].includes(noticeType)){
await dealCustomsSplitNotify(row.notifyId)
}
this.closeDialog(); this.closeDialog();
break; break;
} }
......
...@@ -828,8 +828,8 @@ export default { ...@@ -828,8 +828,8 @@ export default {
remarks: this.shopForm.remarks, remarks: this.shopForm.remarks,
volume: this.putin.volume, volume: this.putin.volume,
weight: this.putin.weight, weight: this.putin.weight,
chargeWeight: this.putin.chargeWeight, chargeWeight: this.shopForm.chargeWeight,
chargeVolume: this.putin.chargeVolume, chargeVolume: this.shopForm.chargeVolume,
worth: this.shopForm.worth || 0, worth: this.shopForm.worth || 0,
specsRecordVOList:this.shopForm.specsRecordVOList, specsRecordVOList:this.shopForm.specsRecordVOList,
shipmentSplit: true shipmentSplit: true
...@@ -899,6 +899,7 @@ export default { ...@@ -899,6 +899,7 @@ export default {
deleteRow(index){ deleteRow(index){
const spliceIndex = typeof index !== 'number' ? this.shopForm.specsRecordVOList.length - 1 : index const spliceIndex = typeof index !== 'number' ? this.shopForm.specsRecordVOList.length - 1 : index
this.shopForm.specsRecordVOList.splice(spliceIndex, 1) this.shopForm.specsRecordVOList.splice(spliceIndex, 1)
this.calcDefaultData()
}, },
// 计算体积 // 计算体积
calcVolume(row){ calcVolume(row){
...@@ -947,18 +948,32 @@ export default { ...@@ -947,18 +948,32 @@ export default {
}) })
this.currentPutIn = null this.currentPutIn = null
// 根据比例计算默认的收费方数和收费重量 this.calcDefaultData()
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
this.$set(this.shopForm, 'chargeVolume', (orderItem.chargeVolume*rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (orderItem.chargeWeight*rate).toFixed(2))
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
}, },
// 清空放入记录 // 清空放入记录
clearAll(){ clearAll(){
this.$confirm(this.$t("确定要清空放入数据么?")).then(res => { this.$confirm(this.$t("确定要清空放入数据么?")).then(res => {
this.shopForm.specsRecordVOList = [] this.shopForm.specsRecordVOList = []
this.calcDefaultData()
}) })
},
// 计算默认的收费数据
calcDefaultData() {
// 根据比例计算默认的收费方数和收费重量
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
/*
* 1 普货 2 重货 3 泡货
* 普货 收费数据=入仓数据
* 泡货 收费方数=入仓方数 收费重量 = 品名收费重量*比例
* 重货 收费方数=品名收费方数*比例 收费重量 = 入仓重量
* */
const chargeVolume = orderItem.itemType === 2 ? (orderItem.chargeVolume*rate).toFixed(2) : this.putin.volume
const chargeWeight = orderItem.itemType === 3 ? (orderItem.chargeWeight*rate).toFixed(2) : this.putin.weight
this.$set(this.shopForm, 'chargeVolume', chargeVolume)
this.$set(this.shopForm, 'chargeWeight', chargeWeight)
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
} }
}, },
}; };
......
...@@ -335,18 +335,26 @@ export default { ...@@ -335,18 +335,26 @@ export default {
if (res.code === 566) { if (res.code === 566) {
this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), { this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
type: "warning", distinguishCancelAndClose: true,
confirmButtonText: '预装关联单',
cancelButtonText: '仅当前订单'
}) })
.then((_) => { .then((_) => {
createGoods({ ...params, relationStatus: 2 }).then((res) => { createGoods({ ...params, relationStatus: 2, singleLoad: false }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}); });
}); });
}) })
.catch((_) => { .catch((action) => {
if(action =='cancel'){
createGoods({ ...params, relationStatus: 2, singleLoad: true }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}); });
});
}
});
} }
}); });
}, },
......
...@@ -264,6 +264,7 @@ export default { ...@@ -264,6 +264,7 @@ export default {
}, },
methods: { methods: {
getCustomsOrderList(dcCustomsType) { getCustomsOrderList(dcCustomsType) {
if(!dcCustomsType) dcCustomsType = '1'
customsOrderList({ customsOrderList({
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
customsTypes: dcCustomsType === "3" ? "2,3" : dcCustomsType, customsTypes: dcCustomsType === "3" ? "2,3" : dcCustomsType,
...@@ -547,6 +548,7 @@ export default { ...@@ -547,6 +548,7 @@ export default {
}, },
watch: { watch: {
"cusDeclarationObj.dcCustomsType"(val) { "cusDeclarationObj.dcCustomsType"(val) {
console.log(val,'val')
this.getCustomsOrderList(val); this.getCustomsOrderList(val);
}, },
"cusDeclarationObj.documentInfo"(val) { "cusDeclarationObj.documentInfo"(val) {
......
...@@ -699,7 +699,7 @@ export default { ...@@ -699,7 +699,7 @@ export default {
type: "warning", type: "warning",
}) })
.then((_) => { .then((_) => {
createGoods({ ...params, relationStatus: 1 }).then((res) => { createGoods({ ...params, relationStatus: 1, singleLoad: true }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}); });
...@@ -713,18 +713,26 @@ export default { ...@@ -713,18 +713,26 @@ export default {
if (res.code === 566) { if (res.code === 566) {
this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), { this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
type: "warning", distinguishCancelAndClose: true,
confirmButtonText: '预装关联单',
cancelButtonText: '仅当前订单'
}) })
.then((_) => { .then((_) => {
createGoods({ ...params, relationStatus: 2 }).then((res) => { createGoods({ ...params, relationStatus: 2, singleLoad: false }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}); });
}); });
}) })
.catch((_) => { .catch((action) => {
if(action =='cancel'){
createGoods({ ...params, relationStatus: 2, singleLoad: true }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}); });
});
}
});
} }
}); });
} else { } else {
......
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
list.push({ list.push({
...oItem, ...oItem,
warehouseInInfo, warehouseInInfo,
multiSpecification: item.multiSpecification, multiSpecification: oItem.multiSpecification,
positionNo: oItem.positionNo, positionNo: oItem.positionNo,
tallyStatus: item.tallyStatus, tallyStatus: item.tallyStatus,
tallyTime: item.tallyTime, tallyTime: item.tallyTime,
......
...@@ -77,7 +77,8 @@ import lodop from '@/utils/lodop' ...@@ -77,7 +77,8 @@ import lodop from '@/utils/lodop'
export default { export default {
filters: {parseTime}, filters: {parseTime},
props:{ props:{
orderId: [String, Number] orderId: [String, Number],
warehouseInNum: Number
}, },
data(){ data(){
return { return {
...@@ -116,7 +117,9 @@ export default { ...@@ -116,7 +117,9 @@ export default {
loadData(){ loadData(){
printTag(this.orderId).then(res => { printTag(this.orderId).then(res => {
this.$set(this, 'tags', res.data) this.$set(this, 'tags', res.data)
this.form.start = res.data[0].num // this.form.start = res.data[0].num
// 起始标签为入仓数 + 1
this.form.start = this.warehouseInNum + 1
this.form.end = res.data[res.data.length-1].num this.form.end = res.data[res.data.length-1].num
}) })
}, },
...@@ -126,9 +129,10 @@ export default { ...@@ -126,9 +129,10 @@ export default {
this.$emit('close'); this.$emit('close');
}, },
showPreview(){ showPreview(){
/* 2023-07-17 要求不限制范围
if(this.form.end > this.tags[this.tags.length-1].num){ if(this.form.end > this.tags[this.tags.length-1].num){
return this.$message.error(this.$t('结束标签不对')) return this.$message.error(this.$t('结束标签不对'))
} }*/
if(!this.printTags.length){ if(!this.printTags.length){
return this.$message.error(this.$t('指定区域无可打印标签')) return this.$message.error(this.$t('指定区域无可打印标签'))
} }
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
<dict-selector v-model="row.unit" :type="DICT_TYPE.ECW_PACKAGING_TYPE" defaultable :disabled="!canAddProduct || !productEditable" /> <dict-selector v-model="row.unit" :type="DICT_TYPE.ECW_PACKAGING_TYPE" defaultable :disabled="!canAddProduct || !productEditable" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('数量') + '(个)'" width="120px"> <el-table-column :label="`${$t('数量')}(${$t('个')})`" width="120px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model="row.quantity" @keyup.native="checkPositiveInterge(row, 'quantity')" :disabled="!canAddProduct || !productEditable" /> <el-input v-model="row.quantity" @keyup.native="checkPositiveInterge(row, 'quantity')" :disabled="!canAddProduct || !productEditable" />
</template> </template>
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.harvestMethod" :filter="item => item.value == 1 || homeDeliveryService" defaultable :disabled="false" /> <dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.harvestMethod" :filter="item => item.value == 1 || homeDeliveryService" defaultable :disabled="false" />
</el-form-item> </el-form-item>
</div> </div>
<div v-if="homeDeliveryService && form.harvestMethod == 2"> <div v-if="homeDeliveryService && +form.harvestMethod === 2">
<el-form-item :label="$t('收货地区')" prop="country"> <el-form-item :label="$t('收货地区')" prop="country">
<area-selector <area-selector
:country="form.consigneeVO ? form.consigneeVO.country : undefined" :country="form.consigneeVO ? form.consigneeVO.country : undefined"
...@@ -562,7 +562,8 @@ let makeDefaultFormData = () => { ...@@ -562,7 +562,8 @@ let makeDefaultFormData = () => {
isExternalWarehouse: false, isExternalWarehouse: false,
externalWarehouseDtoList:[], externalWarehouseDtoList:[],
orderItemVOList:[], orderItemVOList:[],
drawee: 2 drawee: 2,
harvestMethod: "1"
} }
} }
window.Decimal = Decimal window.Decimal = Decimal
......
...@@ -430,7 +430,7 @@ ...@@ -430,7 +430,7 @@
exclude(scope.row.status, [0]) && exclude(scope.row.status, [0]) &&
exclude(scope.row.abnormalState, [5,6,7,8]) exclude(scope.row.abnormalState, [5,6,7,8])
"> ">
<el-dropdown-item @click.native="printTagOrderId=scope.row.orderId" v-hasPermi="['ecw:order:print_tag']">{{$t('打印标签')}}</el-dropdown-item> <el-dropdown-item @click.native="printTag(scope.row)" v-hasPermi="['ecw:order:print_tag']">{{$t('打印标签')}}</el-dropdown-item>
</template> </template>
<!-- 打印入仓单 --> <!-- 打印入仓单 -->
...@@ -456,7 +456,7 @@ ...@@ -456,7 +456,7 @@
@pagination="getList" /> @pagination="getList" />
<special-needs :orderNo="orderNo" :show.sync="isShow" :currency="JSON.stringify(currencyList)" :order-id="orderId" @determine="getList" ></special-needs> <special-needs :orderNo="orderNo" :show.sync="isShow" :currency="JSON.stringify(currencyList)" :order-id="orderId" @determine="getList" ></special-needs>
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" /> <print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" :warehouse-in-num="printTagWarehouseInNum" />
<print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId=null" /> <print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId=null" />
<print-lading-bill v-if="printLadingBillOrderId !== null" :order-id="printLadingBillOrderId" @close="printLadingBillOrderId=null" /> <print-lading-bill v-if="printLadingBillOrderId !== null" :order-id="printLadingBillOrderId" @close="printLadingBillOrderId=null" />
<batch-pickup v-if="showBatchPickup" @close="onBatchClose" @success="onBatchClose"/> <batch-pickup v-if="showBatchPickup" @close="onBatchClose" @success="onBatchClose"/>
...@@ -567,6 +567,7 @@ export default { ...@@ -567,6 +567,7 @@ export default {
dateFilter: [], //筛选日期 dateFilter: [], //筛选日期
printTagOrderId: null, // 显示打印标签的订单ID printTagOrderId: null, // 显示打印标签的订单ID
printTagWarehouseInNum: 0, // 打印标签的订单入仓箱数
printWarehouseReceiptOrderId: null, // 打印入仓单的订单ID printWarehouseReceiptOrderId: null, // 打印入仓单的订单ID
printLadingBillOrderId: null, // 打印提单的订单ID printLadingBillOrderId: null, // 打印提单的订单ID
showBatchPickup: false, // 是否显示批量提货弹窗 showBatchPickup: false, // 是否显示批量提货弹窗
...@@ -881,6 +882,11 @@ export default { ...@@ -881,6 +882,11 @@ export default {
onBatchClose(){ onBatchClose(){
this.showBatchPickup = false this.showBatchPickup = false
this.handleQuery() this.handleQuery()
},
// 打印标签
printTag(order){
this.printTagOrderId=order.orderId
this.printTagWarehouseInNum = order.sumNum
} }
} }
}; };
......
...@@ -94,7 +94,8 @@ ...@@ -94,7 +94,8 @@
</template> </template>
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
<el-form-item label-width="0"> <el-form-item label-width="0">
<el-input-number controls-position="right" :min="0" class="w-100 tight" v-model="row.boxGauge1" @blur="calcVolume(row)"/> <input class="input" v-model="row.boxGauge1" type="number" @keyup="calcVolume(row)" @change="calcVolume(row)" :min="0"></input>
<!--<el-input-number controls-position="right" :min="0" class="w-100 tight" v-model="row.boxGauge1" @blur="calcVolume(row)"/>-->
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -104,7 +105,8 @@ ...@@ -104,7 +105,8 @@
</template> </template>
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
<el-form-item label-width="0"> <el-form-item label-width="0">
<el-input-number controls-position="right" :min="0" class="w-100 tight" v-model="row.boxGauge2" @blur="calcVolume(row)" /> <input class="input" v-model="row.boxGauge2" type="number" @keyup="calcVolume(row)" @change="calcVolume(row)" :min="0"></input>
<!--<el-input-number controls-position="right" :min="0" class="w-100 tight" v-model="row.boxGauge2" @blur="calcVolume(row)" />-->
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -114,7 +116,8 @@ ...@@ -114,7 +116,8 @@
</template> </template>
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
<el-form-item label-width="0"> <el-form-item label-width="0">
<el-input-number controls-position="right" :min="0" class="w-100 tight" v-model="row.boxGauge3" @blur="calcVolume(row)"/> <input class="input" v-model="row.boxGauge3" type="number" @keyup="calcVolume(row)" @change="calcVolume(row)" :min="0"></input>
<!--<el-input-number controls-position="right" :min="0" class="w-100 tight" v-model="row.boxGauge3" @blur="calcVolume(row)"/>-->
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -338,12 +341,15 @@ export default { ...@@ -338,12 +341,15 @@ export default {
}, },
// 计算体积 // 计算体积
calcVolume(row){ calcVolume(row){
// 改了规格后按照规格计算体积
this.$set(row, 'calcVolumeByBoxGauge', 1)
let volume = Decimal(row.boxGauge1 || 0) let volume = Decimal(row.boxGauge1 || 0)
.times(Decimal(row.boxGauge2 || 0)) .times(Decimal(row.boxGauge2 || 0))
.times(Decimal(row.boxGauge3 || 0)).div(1000000) .times(Decimal(row.boxGauge3 || 0)).div(1000000)
// 如果是箱的单位要乘以箱数 // 如果是箱的单位要乘以箱数
if(row.specificationType === 1) { if(+row.specificationType === 1) {
row.volume = volume.times(Decimal(row.num || 0)) volume = volume.times(Decimal(row.num || 0))
} }
// 最低0.01 // 最低0.01
...@@ -355,16 +361,22 @@ export default { ...@@ -355,16 +361,22 @@ export default {
if(!locationArr || !locationArr.length) return '' if(!locationArr || !locationArr.length) return ''
let arr = [] let arr = []
locationArr.forEach(item => { locationArr.forEach(item => {
arr.push(`${item.areaName}${item.locationName || ''}`) arr.push(`${item.areaName || ''}${item.locationName || ''}`)
}) })
return Array.from(new Set(arr)).join(",") return Array.from(new Set(arr)).join(",")
}, },
// 根据箱数计算体积,重量,数量 // 根据箱数计算体积,重量,数量
calc(row){ calc(row){
const rate = row.num / this.warehouseRecord.cartonsNum const rate = row.num / this.warehouseRecord.cartonsNum
row.volume = (this.warehouseRecord.volume * rate).toFixed(2) row.volume = (this.warehouseRecord.volume * rate).toFixed(2)
row.weight = (this.warehouseRecord.weight * rate).toFixed(2) row.weight = (this.warehouseRecord.weight * rate).toFixed(2)
row.quantity = (this.warehouseRecord.quantityAll * rate).toFixed(0) row.quantity = (this.warehouseRecord.quantityAll * rate).toFixed(0)
// 如果是按照规格计算体积,则重新计算
if(row.calcVolumeByBoxGauge){
this.calcVolume(row)
}
}, },
closeDialog(){ closeDialog(){
this.show = false this.show = false
...@@ -385,6 +397,9 @@ export default { ...@@ -385,6 +397,9 @@ export default {
if(this.splitTotal('weight') > this.leftData('weight')){ if(this.splitTotal('weight') > this.leftData('weight')){
return this.$message.error("拆出重量不能大于剩余重量") return this.$message.error("拆出重量不能大于剩余重量")
} }
if(this.splitTotal('quantity') > this.leftData('quantity')){
return this.$message.error("拆出数量不能大于剩余数量")
}
// 如果全拆(拆出箱数 == 原入仓箱数),则体积重量也需要全拆 // 如果全拆(拆出箱数 == 原入仓箱数),则体积重量也需要全拆
if(this.splitTotal('num') === this.warehouseRecord.cartonsNum){ if(this.splitTotal('num') === this.warehouseRecord.cartonsNum){
if(this.splitTotal('volume') !== this.warehouseRecord.volume){ if(this.splitTotal('volume') !== this.warehouseRecord.volume){
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
<el-table-column :label="$t('体积') + '(m³)'" prop="volume" /> <el-table-column :label="$t('体积') + '(m³)'" prop="volume" />
<el-table-column :label="$t('重量') + '(kg)'" prop="weight" /> <el-table-column :label="$t('重量') + '(kg)'" prop="weight" />
<el-table-column :label="$t('数量(个)')" prop="quantity" /> <el-table-column :label="$t('数量(个)')" prop="quantity" />
<!--<el-table-column :label="$t('入仓快递单号')" prop="expressNo" />--> <el-table-column :label="$t('入仓快递单号')" prop="expressNo" />
<!--<el-table-column :label="$t('首次入仓时间')" prop="inTime" > <el-table-column :label="$t('首次入仓时间')" prop="inTime" >
<template slot-scope="{row}">{{row.inTime|parseTime}}</template> <template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>--> </el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" > <el-table-column :label="$t('储位')" prop="orderLocationBackVOList" >
<template slot-scope="{row}"> <template slot-scope="{row}">
<!--{{getLocationName(row.orderLocationList)}}--> <!--{{getLocationName(row.orderLocationList)}}-->
...@@ -52,10 +52,12 @@ ...@@ -52,10 +52,12 @@
<script> <script>
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect/index.vue"; import WarehouseAreaSelect from "@/components/WarehouseAreaSelect/index.vue";
import {parseTime} from "@/utils/ruoyi";
export default { export default {
name: "WarehouseRecord", name: "WarehouseRecord",
components: {WarehouseAreaSelect}, components: {WarehouseAreaSelect},
filters: {parseTime},
props:{ props:{
list:{ list:{
type: Array, type: Array,
...@@ -73,6 +75,7 @@ export default { ...@@ -73,6 +75,7 @@ export default {
this.show = true this.show = true
}, },
methods:{ methods:{
parseTime,
// 获取储位名称 // 获取储位名称
getLocationName(locationArr){ getLocationName(locationArr){
if(!locationArr || !locationArr.length) return '' if(!locationArr || !locationArr.length) return ''
......
...@@ -5,10 +5,6 @@ ...@@ -5,10 +5,6 @@
<div slot="header" class="card-title">{{$t('拆单申请')}}-{{orderData.orderNo||''}}</div> <div slot="header" class="card-title">{{$t('拆单申请')}}-{{orderData.orderNo||''}}</div>
<div class="btn-header"> <div class="btn-header">
<span class="card-title">{{$t('原单信息')}}</span> <span class="card-title">{{$t('原单信息')}}</span>
<div>
<span v-if="orderData.abnormalState!=0" class="red">{{$t('异常无法拆单')}}</span>
<el-button v-else type="primary" @click="addSplit" :disabled="orderData.inWarehouseState==207">{{$t('新建拆单')}} </el-button>
</div>
</div> </div>
<el-descriptions :column="4"> <el-descriptions :column="4">
<el-descriptions-item :label="$t('唛头')"> <el-descriptions-item :label="$t('唛头')">
...@@ -128,9 +124,16 @@ ...@@ -128,9 +124,16 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card class="card" v-if="splitData.length>0"> <el-card class="card">
<!-- 列表 --> <!-- 列表 -->
<div slot="header" class="card-title">{{$t('拆单信息')}}</div> <div slot="header" class="card-title flex">
<div style="flex: 1; display: flex; align-items: center">{{$t('拆单信息')}}</div>
<div>
<span v-if="orderData.abnormalState!=0" class="red">{{$t('异常无法拆单')}}</span>
<el-button v-else type="primary" @click="addSplit" :disabled="orderData.inWarehouseState==207">{{$t('新建拆单')}} </el-button>
</div>
</div>
<template v-if="splitData.length>0">
<div v-for="(item, index) in splitData" :key="index"> <div v-for="(item, index) in splitData" :key="index">
<div class="btn-header"> <div class="btn-header">
<div> <div>
...@@ -208,12 +211,14 @@ ...@@ -208,12 +211,14 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</template>
<el-empty v-else></el-empty>
</el-card> </el-card>
<work-flow xmlkey="split_order" v-model="selectedUsers"></work-flow> <work-flow xmlkey="split_order" v-model="selectedUsers"></work-flow>
<div slot="footer" class="card footer_btn" v-if="orderData.abnormalState==0"> <div slot="footer" class="card footer_btn" v-if="orderData.abnormalState==0">
<template v-if="orderData.inWarehouseState!=207"> <template v-if="orderData.inWarehouseState!=207">
<el-button type="primary" @click="submitForm">{{$t('提交申请')}}</el-button> <el-button type="primary" @click="submitForm">{{$t('提交申请')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button> <el-button plain type="primary" @click="cancel">{{$t('取消')}}</el-button>
<el-button type="primary" @click="reset">{{$t('重置')}}</el-button> <el-button type="primary" @click="reset">{{$t('重置')}}</el-button>
</template> </template>
<template v-else> <template v-else>
...@@ -259,7 +264,8 @@ ...@@ -259,7 +264,8 @@
<el-option v-for="item in orderData.orderItemVOList" :label="item.prodTitleEn" :value="item.orderItemId" :key="item.prodTitleEn" ></el-option> <el-option v-for="item in orderData.orderItemVOList" :label="item.prodTitleEn" :value="item.orderItemId" :key="item.prodTitleEn" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<div class="page-title">{{$t('品名可拆数据')}}</div> <el-card>
<div slot="header" class="page-title">{{$t('品名可拆数据')}}</div>
<div class="pl-20"> <div class="pl-20">
<span class="mr-10">{{$t('箱数')}}:{{ leftData.num || 0 }}</span> <span class="mr-10">{{$t('箱数')}}:{{ leftData.num || 0 }}</span>
<span class="mr-10">{{ $t('入仓方数') }}:{{ leftData.volume || 0 }}m³</span> <span class="mr-10">{{ $t('入仓方数') }}:{{ leftData.volume || 0 }}m³</span>
...@@ -269,7 +275,11 @@ ...@@ -269,7 +275,11 @@
<span class="mr-10">{{ $t('数量(个)') }}:{{ leftData.quantity || 0 }}</span> <span class="mr-10">{{ $t('数量(个)') }}:{{ leftData.quantity || 0 }}</span>
<span class="mr-10">{{ $t('剩余货值') }}:{{ leftData.worth || 0 }}{{ $t('元') }}</span> <span class="mr-10">{{ $t('剩余货值') }}:{{ leftData.worth || 0 }}{{ $t('元') }}</span>
</div> </div>
<div class="page-title">{{$t('可拆入仓记录')}}</div> </el-card>
<el-card class="mt-10">
<div slot="header" class="page-title">{{$t('可拆入仓记录')}}</div>
<el-table <el-table
:data="getOrderItemWarehouseIn(shopForm.orderItemId)" :data="getOrderItemWarehouseIn(shopForm.orderItemId)"
style="width: 100%"> style="width: 100%">
...@@ -328,7 +338,9 @@ ...@@ -328,7 +338,9 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="flex-between mt-20 mb-10"> </el-card>
<el-card class="mt-10">
<div slot="header" class="flex-between mt-20 mb-10">
<div class="page-title" style="margin: 0"> <div class="page-title" style="margin: 0">
{{$t('已放入入仓记录')}} {{$t('已放入入仓记录')}}
</div> </div>
...@@ -384,8 +396,10 @@ ...@@ -384,8 +396,10 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card>
<div class="page-title">放入数据</div> <el-card class="mt-10">
<div slot="header" class="page-title">放入数据</div>
<div>
<div class="pl-20 mb-10"> <div class="pl-20 mb-10">
<span class="mr-10">{{$t('箱数')}}:{{ putin.num || 0 }},</span> <span class="mr-10">{{$t('箱数')}}:{{ putin.num || 0 }},</span>
<span class="mr-10">{{ $t('数量(个)') }}:{{ putin.quantity || 0 }},</span> <span class="mr-10">{{ $t('数量(个)') }}:{{ putin.quantity || 0 }},</span>
...@@ -407,6 +421,9 @@ ...@@ -407,6 +421,9 @@
<el-form-item :label="$t('备注信息')"> <el-form-item :label="$t('备注信息')">
<el-input v-model="shopForm.remark"></el-input> <el-input v-model="shopForm.remark"></el-input>
</el-form-item> </el-form-item>
</div>
</el-card>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="shopAdd" :disabled="!shopForm.specsRecordVOList || !shopForm.specsRecordVOList.length">{{$t('确定')}}</el-button> <el-button type="primary" @click="shopAdd" :disabled="!shopForm.specsRecordVOList || !shopForm.specsRecordVOList.length">{{$t('确定')}}</el-button>
...@@ -903,21 +920,6 @@ export default { ...@@ -903,21 +920,6 @@ export default {
} }
this.open = true this.open = true
}, },
/*changeProdTitleZh(val){
var list = []
list = this.splitData[0].orderSplitItemBackVOList.filter(item=>item.id == val)
this.shopForm.sum = list[0].num
this.quantitySum = list[0].quantity
this.shopForm.orderItemId = list[0].orderItemId
this.shopForm.prodTitleEn = list[0].prodTitleEn
this.shopForm.prodTitleZh = list[0].prodTitleZh
// 默认给一个
if(!this.shopForm.specsRecordVOList || !this.shopForm.specsRecordVOList.length){
this.addRow()
}
this.numcheck()
},*/
// 查询数量是否必填 // 查询数量是否必填
numcheck(){ numcheck(){
quantityRequired(this.orderData.lineId).then(res=>{ quantityRequired(this.orderData.lineId).then(res=>{
...@@ -968,10 +970,10 @@ export default { ...@@ -968,10 +970,10 @@ export default {
}) })
that.open = false that.open = false
}, },
cancel(){ /*cancel(){
this.open = false this.open = false
this.form = {} this.form = {}
}, },*/
shopAdd(){ shopAdd(){
this.$refs["shopForm"].validate(valid => { this.$refs["shopForm"].validate(valid => {
if (!valid) { if (!valid) {
...@@ -995,6 +997,7 @@ export default { ...@@ -995,6 +997,7 @@ export default {
volume: this.putin.volume, volume: this.putin.volume,
chargeVolume: this.shopForm.chargeVolume, chargeVolume: this.shopForm.chargeVolume,
weight: this.putin.weight, weight: this.putin.weight,
quantity: this.putin.quantity,
chargeWeight: this.shopForm.chargeWeight, chargeWeight: this.shopForm.chargeWeight,
worth: this.shopForm.worth || 0, worth: this.shopForm.worth || 0,
specsRecordVOList:this.shopForm.specsRecordVOList specsRecordVOList:this.shopForm.specsRecordVOList
...@@ -1062,26 +1065,11 @@ export default { ...@@ -1062,26 +1065,11 @@ export default {
}) })
}) })
}, },
// 添加一行
/*addRow(){
if(!this.shopForm.specsRecordVOList){
this.$set(this.shopForm,'specsRecordVOList',[])
}
if(!this.currentWarehouseItem){
return this.$message.info(this.$t("请选择入仓记录"))
}
let { specificationType, boxGauge1, boxGauge2, boxGauge3, volume, weight } = this.currentWarehouseItem
let num = this.currentWarehouseItem.cartonsNum
// 根据入仓记录添加一行
this.shopForm.specsRecordVOList.push({
specificationType, boxGauge1, boxGauge2, boxGauge3, volume, weight,num,
orderLocationList: this.currentWarehouseItem.orderLocationBackVOList
})
},*/
// 删除一行,可选参数index表上行号,参数不是数字则删除最后一行 // 删除一行,可选参数index表上行号,参数不是数字则删除最后一行
deleteRow(index){ deleteRow(index){
const spliceIndex = typeof index !== 'number' ? this.shopForm.specsRecordVOList.length - 1 : index const spliceIndex = typeof index !== 'number' ? this.shopForm.specsRecordVOList.length - 1 : index
this.shopForm.specsRecordVOList.splice(spliceIndex, 1) this.shopForm.specsRecordVOList.splice(spliceIndex, 1)
this.calcDefaultData()
}, },
// 计算体积 // 计算体积
calcVolume(row){ calcVolume(row){
...@@ -1130,30 +1118,49 @@ export default { ...@@ -1130,30 +1118,49 @@ export default {
this.shopForm.specsRecordVOList.push({...item}) this.shopForm.specsRecordVOList.push({...item})
}) })
this.currentPutIn = null this.currentPutIn = null
this.calcDefaultData()
// 根据比例计算默认的收费方数和收费重量
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
this.$set(this.shopForm, 'chargeVolume', (orderItem.chargeVolume*rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (orderItem.chargeWeight*rate).toFixed(2))
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
}, },
// 清空放入记录 // 清空放入记录
clearAll(){ clearAll(){
this.$confirm(this.$t("确定要清空放入数据么?")).then(res => { this.$confirm(this.$t("确定要清空放入数据么?")).then(res => {
this.shopForm.specsRecordVOList = [] this.shopForm.specsRecordVOList = []
this.calcDefaultData()
}) })
}, },
// 计算放入的默认值
calcDefaultData(){
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
/*
* 1 普货 2 重货 3 泡货
* 普货 收费数据=入仓数据
* 泡货 收费方数=入仓方数 收费重量 = 品名收费重量*比例
* 重货 收费方数=品名收费方数*比例 收费重量 = 入仓重量
* */
const chargeVolume = orderItem.itemType === 2 ? (orderItem.chargeVolume*rate).toFixed(2) : this.putin.volume
const chargeWeight = orderItem.itemType === 3 ? (orderItem.chargeWeight*rate).toFixed(2) : this.putin.weight
this.$set(this.shopForm, 'chargeVolume', chargeVolume)
this.$set(this.shopForm, 'chargeWeight', chargeWeight)
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
},
// 重置 // 重置
reset(){ reset(){
deleteAllSplit(this.queryParams.orderId).then(res => { return deleteAllSplit(this.queryParams.orderId).then(res => {
this.getList() this.getList()
}) })
},
// 取消
async cancel(){
await this.reset()
this.$store.dispatch('tagsView/delCurrentView')
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.page-title{
margin: 0;
}
.card-title{ .card-title{
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
......
...@@ -164,7 +164,15 @@ ...@@ -164,7 +164,15 @@
<span style="font-size: 18px">{{$t('入仓影像')}}</span> <span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div> </div>
<div> <div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.urls" ></image-and-video-upload> <image-and-video-upload
:fileSize="50"
:isShowTip="true"
v-model="form.urls"
:type="1"
:id="orderId"
@delete="handleDeleteImage"
@refresh="getWarehousePictureList"
></image-and-video-upload>
</div> </div>
</el-card> </el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)"> <div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)">
...@@ -222,7 +230,7 @@ import { ...@@ -222,7 +230,7 @@ import {
getOrderWarehouseIn, getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId, getSpecialListByOrderId, listByOrderId,
orderWarehouseInFinish, orderWarehouseInUpdateLabel, orderWarehouseInFinish, orderWarehouseInUpdateLabel,
rollbackDelete, warehousePictureList rollbackDelete, warehousePictureDelete, warehousePictureList
} from '@/api/ecw/order' } from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo" import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog' import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
...@@ -284,6 +292,8 @@ export default { ...@@ -284,6 +292,8 @@ export default {
sumVolume: '', sumVolume: '',
sumWeight: '', sumWeight: '',
}, },
// form.urls的完整数据
urlsObject: [],
currencyList:[], currencyList:[],
order: {}, order: {},
orderId: undefined, orderId: undefined,
...@@ -320,6 +330,12 @@ export default { ...@@ -320,6 +330,12 @@ export default {
}, },
methods: { methods: {
// 删除了入仓影像
handleDeleteImage(index) {
warehousePictureDelete(this.urlsObject[index].id).then(() => {
this.urlsObject.splice(index, 1);
})
},
getOrderItemList(){ getOrderItemList(){
this.orderItemList = [] this.orderItemList = []
return getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data) return getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
...@@ -333,7 +349,8 @@ export default { ...@@ -333,7 +349,8 @@ export default {
bizId: this.order.orderId, bizId: this.order.orderId,
type: 1 type: 1
}).then(r =>{ }).then(r =>{
this.form.urls = r.data.map(i =>i.url) this.form.urls = r.data.map(i =>i.url).reverse()
this.urlsObject = r.data.reverse()
}) })
}, },
include(){ include(){
......
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