Commit be916223 authored by 我在何方's avatar 我在何方
parents eb4f4e33 a3a87def
......@@ -789,10 +789,6 @@ export function batchCanShipment(orderIdList){
data: {orderIdList}
})
}
// 批量转异
export function batchException(ids){
throw new Error('接口未出,待完善,以下代码是copilot生成')
}
// 导出备货订单
export function exportReadyStock(params){
......@@ -803,3 +799,37 @@ export function exportReadyStock(params){
responseType: 'blob'
})
}
// 无需打包
export function noNeedPack(orderItemId){
return request({
url: '/order/order-warehouse-in/no-need-to-pack',
method: 'get',
params: {orderItemId}
})
}
// 完成打包
export function finishPacked(data){
return request({
url: '/order/order-warehouse-in/finish-packed',
method: 'post',
data
})
}
// 完成备货
export function finishStock(data){
return request({
url: '/order/order-warehouse-in/finish-stocked',
method: 'put',
data
})
}
// 批量转异
export function batchException(data){
return request({
url: '/air/order/manual-exception/batch',
method: 'put',
data
})
}
......@@ -120,6 +120,8 @@ export const DICT_TYPE = {
ECW_CUSTOMER_TRANSPORT_TYPE: 'customer_transport_type', // 客户出货渠道(跟运输方式相同,但是显示全部)
ECW_ORDER_APPROVAL_TYPE: 'order_approval_type', // 订单相关审批类型
ECW_FEE_SOURCE: 'fee_source', // 费用来源
STOCK_UP_EXCEPTION_TYPE: 'stock_up_exception_type', // 备货异常类型,
ORDER_ITEM_PACK_STATUS: 'order_item_pack_status', // 空运备货打包状态
//--------ecw---------
CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source',
......
......@@ -172,7 +172,7 @@
<span>{{ scope.row.orderNo }}</span>
</router-link>
<div style="display: flex;flex-wrap: wrap;" v-if="scope.row.advanceType">
<el-button @click="deleteSpecial(item.value,scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.advanceType)" :key="index">{{item.label[0]}}</el-button>
<el-button @click="deleteSpecial(item.value,scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.advanceType)" :key="index">{{item.symbol}}</el-button>
</div>
</template>
</el-table-column>
......@@ -895,10 +895,15 @@ export default {
moleculeChange() { },
denominatorChange() { },
specialRendering(val){
console.log('val', val)
if(val !== undefined){
let i = val.split(',')
return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => {
return i.indexOf(e.value) > -1
}).map(item => {
// 打字开头的用最后一个字,否则取第一个字
item.symbol = item.label[0] == '' ? item.label[item.label.length-1]: item.label[0]
return item
})
}
},
......
......@@ -192,7 +192,7 @@
<dict-selector v-model="batchExceptionForm.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item>
<el-form-item :label="$t('附件')">
<image-upload v-model="batchExceptionForm.exceptionUrls"></image-upload>
<image-and-video-upload v-model="batchExceptionForm.exceptionUrls"></image-and-video-upload>
</el-form-item>
<el-form-item :label="$t('详细信息')">
<el-input v-model="batchExceptionForm.descZh" type="textarea"></el-input>
......@@ -212,33 +212,7 @@ import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import {
createOrder,
updateOrder,
deleteOrder,
getOrder,
getOrderPage,
exportOrderExcel,
orderSpecialNeed,
cancelOrder,
recoveryOrder,
getMyOrderPage,
deptOrderPage,
orderStatistics,
orderMyStatistics,
orderDeptStatistics,
orderExportSearch,
orderExportMySearch,
orderExportDeptSearch,
exportAbnormal,
exportHeavyOrder,
exportReturnOrder,
exportSaleRepay,
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload, setCanShipment, canShipmentPage, batchCanShipment, batchException, waitingShipmentPage
} from "@/api/ecw/order";
import { setCanShipment, canShipmentPage, batchCanShipment, batchException, waitingShipmentPage } from "@/api/ecw/order";
import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
......@@ -253,6 +227,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse'
import { getCurrencyPage } from "@/api/ecw/currency";
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
import {getChannelList} from "@/api/ecw/channel";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload";
export default {
name: "EcwPeddingList",
components: {
......@@ -262,6 +237,7 @@ export default {
MergeLog,
PickupLog,
SplitRevoke,
ImageAndVideoUpload,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
},
data() {
......@@ -432,6 +408,7 @@ export default {
this.$refs.batchExceptionForm.validate(valid => {
if (valid) {
let params = Object.assign({}, this.batchExceptionForm, {orderIds: this.ids})
params.manualExceptionType = params.manualExceptionType.join(',')
batchException(params).then(res =>{
this.$message.success(res.message || this.$t('操作成功'))
this.showBatchException = false
......
......@@ -697,6 +697,7 @@
},
},
methods: {
getDictData,
onTableMounted(e){
// console.warn('onTableMounted', e)
},
......
<template>
<div style="display: inline-block;margin-right: 10px">
<el-button size="mini" @click="visible = true" type="text">{{ title }}</el-button>
<el-dialog
:title="title + ' - ' + warehousing.orderNo"
:visible.sync="visible"
width="1280px"
>
<el-tabs v-model="activeName" type="card">
<el-tab-pane :label="edit ? $t('货物修改') : $t('货物入仓')" name="first">
<el-form ref="form" :model="form" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<span style="min-width: 200px;margin-right: 15px;display: inline-block">
<product-selector v-if="!order.parentOrderId && !isAdd" v-model="form.prodId" @change="onProductChange" determined/>
<span v-else>{{ warehousing.prodTitleZh }}</span>
{{ warehousing.prodTitleZh }}
</span>
<el-button v-if="!order.parentOrderId && !isAdd" type="text" @click="isShowProduct = true">添加新商品</el-button>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<product-selector v-if="!order.parentOrderId && !isAdd" lang="En" v-model="form.prodId" @change="onProductChange" determined/>
<span v-else>{{ warehousing.prodTitleEn }}</span>
<span>{{ warehousing.prodTitleEn }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
......@@ -33,7 +26,7 @@
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage"
clearable>
disabled>
<el-option
v-for="item in brandList"
:key="item.id"
......@@ -51,29 +44,29 @@
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template>
{{ feeType }}
</el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('箱数:') }}<el-input size="mini" v-if="edit" v-model="warehousing.num" style="display: inline-block;width: 100px"></el-input>
<span v-else>{{ warehousing.num }}</span><br>{{ $t('体积:') }}<el-input size="mini" v-if="edit" v-model="warehousing.volume" style="display: inline-block;width: 100px"></el-input>
<span v-else>{{ warehousing.volume }}</span><br>{{ $t('重量:') }}<el-input size="mini" v-if="edit" v-model="warehousing.weight" style="display: inline-block;width: 100px"></el-input>
<span v-else>{{ warehousing.weight }}</span>Kg
<el-descriptions-item :label="$t('填单参数')">
{{ $t('箱数:') }}<span>{{ warehousing.num }}</span><br>
{{ $t('体积:') }}<span>{{ warehousing.volume }}</span><br>
{{ $t('重量:') }}<span>{{ warehousing.weight }}</span>Kg
</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col :span="8">
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector>
<dict-tag :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" :value="orderItemB.material" clearable></dict-tag>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form.prodAttrIds">
<el-checkbox-group v-model="form.prodAttrIds" disabled>
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<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-form-item :label="$t('入仓时间')" v-if="!edit">
{{form.inTime}}
</el-form-item>-->
</el-form>
<el-card class="box-card">
......@@ -189,278 +182,24 @@
<template v-slot="{ row, column, $index}">
<el-popconfirm
v-if="$index >= protectRowCount"
title="确定要删除该行入仓记录吗?"
title="确定要删除该行记录吗?"
@confirm="handleDeleteRow($index)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
<el-button size="mini" type="danger">{{$t('删除')}}</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
<el-tab-pane :label="$t('添加新品名')" name="second" v-if="!edit">
<el-form ref="form1" :model="form1" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<el-form-item required label="" prop="prodId" label-width="0">
<product-selector v-model="form1.prodId" @change="onProductChange1"/>
<el-button type="text" @click="isShowProduct = true" style="margin-left: 15px">添加新商品</el-button>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<el-form-item required label="" prop="prodId" label-width="0">
<product-selector lang="En" v-model="form1.prodId" @change="onProductChange1"/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
<el-form-item required label="" prop="brand" label-width="0">
<el-select
v-model="form1.brand"
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage1"
clearable>
<el-option
v-for="item in brandList1"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template>
{{ isBeian1 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template>
{{ feeType1 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('非填单货物') }}</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col :span="8">
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form1.material" clearable></dict-selector>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form1.prodAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<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-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete(1)"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd(1)"></el-button>
</div>
<el-form ref="tableForm1" :model="form1" :rules="tableFormRules" size="mini">
<el-table
:data="form1.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">
{{ form1.table[$index].cartonsNum }}
{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}
</span>
<el-input v-else v-model="form1.table[$index].cartonsNum" placeholder="">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form1.table[$index].specificationType" @change="handleVolume($index, 1)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form1.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].volume }}</span>
<el-input v-else type="number" v-model="form1.table[$index].volume" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].weight }}</span>
<el-input v-else type="number" v-model="form1.table[$index].weight" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].quantityAll }}</span>
<el-input v-else v-model.number="form1.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].expressNo }}</span>
<el-input v-else v-model="form1.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-model="form1.table[$index].orderLocationBackVOList"
:readonly="form1.table[$index].id && !edit"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form1.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index, 1)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
</el-tabs>
<div v-if="edit && order.status !== 3">
<h2>{{ $t('审批流程') }}</h2>
<work-flow xmlkey="free_apply" v-model="selectedUsers" />
<!-- <div>选择的用户:{{selectedUsers}}</div>-->
</div>
<span slot="footer">
<template v-if="!isEditing">
<el-button @click="handleClose">{{ $t('关 闭') }}</el-button>
<el-button type="primary" @click="handleSubmit()">{{ edit ? $t('确认修改') : $t('提 交') }}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t('审核中') }}</el-button>
<el-button type="primary" @click="handleCancelProcessInstance">{{ $t('取消审核') }}</el-button>
<el-button @click="handleClose">{{ $t('返回') }}</el-button>
</template>
<template v-else>
</template>
<el-button type="primary" @click="handleSubmit">{{ $t('完成打包') }}</el-button>
<el-button @click="handleClose">{{ $t('返回')}}</el-button>
</span>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="添加商品" :visible.sync="isShowProduct" width="550px" append-to-body>
<el-form ref="productForm" :model="productForm" :rules="productRules" label-width="110px">
<el-form-item :label="$t('商品类型')" prop="typeId">
<el-select v-model="productForm.typeId" :placeholder="$t('选择商品类型')" clearable>
<el-option v-for="types in typeList" :key="types.id" :label="types.titleZh" :value="types.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('中文标题')" prop="titleZh">
<el-input v-model="productForm.titleZh" :placeholder="$t('请输入中文标题')" />
</el-form-item>
<el-form-item :label="$t('英文标题')" prop="titleEn">
<el-input v-model="productForm.titleEn" :placeholder="$t('请输入英文标题')" />
</el-form-item>
<el-form-item :label="$t('商品特性')" prop="attrArray">
<el-select v-model="productForm.attrArray" :placeholder="$t('选择商品特性')" clearable multiple>
<el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="productSubmit">{{$t('确定')}}</el-button>
<el-button @click="productCancel">{{$t('取消')}}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
......@@ -470,13 +209,13 @@ import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBr
import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {finishPacked, orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType"
import {addProduct} from "@/api/ecw/product"
export default {
name: "Warehouse",
name: "Package",
components: {
ProductSelector,
......@@ -493,15 +232,17 @@ export default {
type: Object,
default: undefined
},
// 是否集运
isJiyun: {
type: Boolean,
default: false
},
// 入仓修改
// 是否修改
edit: {
type: Boolean,
default: false
},
// 订单信息中的商品项
orderItemA: {
type: Object,
default: () => {
......@@ -512,6 +253,7 @@ export default {
}
}
},
// 入仓的商品项
orderItemB: {
type: Object,
default: () => {
......@@ -691,7 +433,9 @@ export default {
attrList: []
}
},
created() {
this.visible = true
},
methods: {
init(){
this.form.brandType = this.warehousing.brandType
......@@ -758,45 +502,6 @@ export default {
}, 0)
},
handleSubmit() {
if (this.activeName !== "first"){
// 添加非填单货物
if (this.form1.prodAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"),
type: 'warning'
})
}
this.$refs['form1'].validate(valid => {
this.$refs['tableForm1'].validate(valid1 => {
if (!valid || !valid1) {
return
}
return orderWarehouseIn({
...this.form1,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
})
}).then(r => {
if (r.data) {
this.$message.success('新增入仓成功')
this.handleClose()
} else {
this.$message.success('新增入仓失败')
}
})
})
})
} else {
if (this.form.prodAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t('提示'),
......@@ -809,46 +514,11 @@ export default {
if (!valid || !valid1) {
return
}
if (this.edit) {
// 入仓修改
return orderWarehouseInUpdateApply({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
num: this.warehousing.num,
volume: (+this.warehousing.volume)?.toFixed(2) || '',
weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.form.prodId,
prodAttrIds: this.form.prodAttrIds.join(','),
"orderWarehouseInUpdateItemDoList": this.form.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
copyUserId: this.selectedUsers
}).then(r => {
if (r.data) {
this.$message.success(r.msg || '入仓修改发起成功')
this.handleClose()
} else {
this.$message.success(r.msg || '入仓修改发起失败')
}
})
} else {
// 首次入仓、入仓补充
return orderWarehouseIn({
...this.form,
brandType: this.warehousing.brandType,
return finishPacked({
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form.table.map(e => {
orderWarehouseInItemDtoList: this.form.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
......@@ -857,16 +527,14 @@ export default {
}),
}).then(r => {
if (r.data) {
this.$message.success('入仓成功')
this.$message.success('打包成功')
this.handleClose()
} else {
this.$message.success('入仓失败')
this.$message.success('打包失败')
}
})
}
})
})
}
},
handleCancelProcessInstance(){
this.$prompt('请输入取消原因?', this.$t("取消流程"), {
......
......@@ -78,23 +78,23 @@
prop="createTime"
:label="$t('打包状态')">
<template v-slot="{row}">
待完善
<dict-tag :type="DICT_TYPE.ORDER_ITEM_PACK_STATUS" :value="wareItemPackStatus(row.orderItemId)" />
</template>
</el-table-column>
<el-table-column
prop="address"
:label="$t('操作')">
<template v-slot="{ row, column, $index }">
<el-button size="mini" type="warning" @click="$alert('TODO')">{{$t('无需打包')}}</el-button>
<el-button size="mini" type="primary" @click="$router.push(`package?orderId=${row.orderId}&orderItemId=${row.orderItemId}`)">{{$t('打包')}}</el-button>
<el-button size="mini" type="primary" @click="$router.push(`package?orderId=${row.orderId}&orderItemId=${row.orderItemId}`)">{{$t('修改打包')}}</el-button>
<el-button v-if="row.packStatus == 1" size="mini" type="warning" @click="noNeedPack(row)">{{$t('无需打包')}}</el-button>
<el-button v-if="row.packStatus == 1" size="mini" type="primary" @click="package(row, $t('打包'))">{{$t('打包')}}</el-button>
<el-button v-else size="mini" type="primary" @click="package(row, $t('修改打包'))">{{$t('修改打包')}}</el-button>
</template>
</el-table-column>
</el-table>
<h2 v-if="orderSpecialNeeds.length > 0">{{$t('特殊需求')}}</h2>
<!--<h2 v-if="orderSpecialNeeds.length > 0">{{$t('特殊需求')}}</h2>-->
<el-form ref="form" :model="form" label-width="200px">
<el-form-item :label="$i18n.locale === 'en_US' ? item.labelEn : item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 600px">
<!--<el-form-item :label="$i18n.locale === 'en_US' ? item.labelEn : item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 600px">
<el-input v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" :placeholder="$t('请输入') + ($i18n.locale === 'en_US' ? item.labelEn : item.label)">
<el-select v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoneyCurrency" :placeholder="$t('请选择')" slot="append" style="width: 100px">
<el-option
......@@ -105,7 +105,7 @@
</el-option>
</el-select>
</el-input>
</el-form-item>
</el-form-item>-->
<h2>{{$t('订单数据')}}</h2>
<el-form-item :label="$t('总方数')" style="width: 380px">
......@@ -124,22 +124,23 @@
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</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.exceptionUrls" ></image-and-video-upload>
</div>
</el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)">
<div style="text-align: center;margin-top: 15px">
<el-button @click="escapeBol = true;" type="primary">{{$t('转异')}}</el-button>
<el-button type="primary" @click="finishVisible = true">{{$t('完成备货')}}</el-button>
<el-button type="primary" @click="handleSubmit">{{$t('完成备货')}}</el-button>
</div>
</el-form>
<el-dialog :title="order.orderNo + $t('订单转异')" center :visible.sync="escapeBol">
<el-form label-position="top" label-width="200" ref="exceptionForm" :model="form" :rules="exceptionRules">
<el-form-item :label="$t('原因类型')" prop="manualExceptionType">
<dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
<el-form-item :label="$t('异常类型')" prop="manualExceptionType">
<dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.STOCK_UP_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item>
<el-form-item :label="$t('附件')">
<image-upload v-model="form.exceptionUrls"></image-upload>
<!--<image-upload v-model="form.exceptionUrls"></image-upload>-->
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.exceptionUrls" ></image-and-video-upload>
</el-form-item>
<el-form-item :label="$t('详细信息')">
<el-input v-model="form.descZh" type="textarea"></el-input>
......@@ -152,16 +153,25 @@
</el-dialog>
<print-tag v-if="isShowPrintTag" :order-id="orderId" @close="isShowPrintTag = false"></print-tag>
<package
:order="order"
:order-item-a="packageOrderItem"
:order-item-b="packageWarehouseItem"
:title="packageTitle"
v-if="!!packageOrderItem"
@close="packageOrderItem=null;packageOrderItem=null"
></package>
</div>
</template>
<script>
import {getCurrencyList} from "@/api/ecw/currency"
import {
finishPacked, finishStock,
getLabelByOrder, getLabelWaitInByOrder,
getOrder,
getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId,
getSpecialListByOrderId, listByOrderId, noNeedPack,
orderWarehouseInFinish, orderWarehouseInUpdateLabel,
rollbackDelete, warehousePictureList
} from '@/api/ecw/order'
......@@ -194,17 +204,7 @@ export default {
this.getOrderItemList()
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
Promise.all([
this.getOrder(),
listByOrderId({ orderId: this.orderId }).then(r => {
this.form.orderLocationCreateReqVOList = r.data
})
]).then(() => {
/*// 等待仓库id和已选的储位后初始化储位信息
this.$nextTick(() => {
this.$refs.area.updateArea()
})*/
})
this.getOrder()
}
getCurrencyList().then(res => this.currencyList = res.data)
},
......@@ -217,12 +217,9 @@ export default {
finishVisible: false,
warehousingVisible: false,
form: {
orderSpecialNeedReceivableReqVoList: [],
orderLocationCreateReqVOList: [],
exceptionUrls:[],
descZh:'',
manualExceptionType:[],
urls: [],
sumVolume: '',
sumWeight: '',
},
......@@ -257,7 +254,13 @@ export default {
}, trigger: 'change'
}
]
}
},
// 打包弹层的标题
packageTitle: null,
// 当前打包的订单商品项
packageOrderItem: null,
// 打包商品的入仓商品项
packageWarehouseItem: null
}
},
......@@ -288,67 +291,17 @@ export default {
return arr.indexOf(state) == -1
}
},
handleLabelSubmit(){
orderWarehouseInUpdateLabel({
...this.label,
orderId: this.orderId
}).then(r => {
if (r.code === 0){
this.$message.success(r.msg || this.$t('修改标签箱号成功'))
}
})
},
// 箱号标签回显
getLabelByOrder(){
getLabelByOrder(this.orderId).then(r => {
if (r.code === 0 && !! r.data && r.data.length > 0) {
this.label.orderLabelDtoList = r.data
} else {
// 没有历史数据,查默认值
getLabelWaitInByOrder(this.orderId).then(r => {
console.log(r)
if (r.code === 0 && !! r.data) {
this.label.orderLabelDtoList = [r.data]
}
})
}
})
},
handleLabelAdd(index){
this.label.orderLabelDtoList.splice(index + 1, 0, {
"end": '',
"start": ''
})
},
getTowSum(){
// let sumVolume = 0
// let sumWeight = 0
// this.order.orderItemVOList.forEach(e => {
// if (e?.warehouseInInfoVO?.volume) sumVolume += e.warehouseInInfoVO.volume
// if (e?.warehouseInInfoVO?.weight) sumWeight += e.warehouseInInfoVO.weight
// })
this.form.sumVolume = this.order.sumVolume// || sumVolume
this.form.sumWeight = this.order.sumWeight// || sumWeight
},
getOrder(){
return getOrder(this.orderId).then(r => {
this.order = r.data
this.getTowSum()
this.form.sumVolume = this.order.sumVolume
this.form.sumWeight = this.order.sumWeight
}).then(() => {
this.getLabelByOrder()
// this.getLabelByOrder()
this.getWarehousePictureList()
})
},
specialHas0(){
let result = false
this.form.orderSpecialNeedReceivableReqVoList.forEach(e => {
if (e.receivableMoney === '0' || e.receivableMoney === ''){
result = true
}
})
return result
},
// 提交转异
handleException() {
this.$refs.exceptionForm.validate((valid) => {
if (valid) {
......@@ -358,86 +311,32 @@ export default {
}
})
},
// 完成备货
async handleSubmit() {
if (this.specialHas0()) {
const confirm = await this.$confirm(this.$t('有特需费用为0或未填写,请问是否继续?'), this.$t('注意'), {
confirmButtonText: this.$t('继续'),
cancelButtonText: this.$t('取消'),
type: 'warning'
})
if (confirm !== 'confirm'){
return
}
}
let form = {
orderSpecialNeedReceivableReqVoList: this.form.orderSpecialNeedReceivableReqVoList,
"orderLocationCreateReqVOList": this.form.orderLocationCreateReqVOList,
"orderId": this.order.orderId,
urls: this.form.urls,
sumVolume: this.form.sumVolume,
sumWeight: this.form.sumWeight,
isAppend: this.isAdd
}
// TODO 判断是否有未完成打包
// 标签箱号
if (this.order.parentOrderId) {
form.labelList = this.label.orderLabelDtoList || []
}
if (this.escapeBol) {
form.exceptionUrls = this.form.exceptionUrls.length !== 0 ? this.form.exceptionUrls?.split(',') : []
form.descZh = this.form.descZh;
form.manualExceptionType = this.form.manualExceptionType.join(',')
}
orderWarehouseInFinish(form).then(r => {
if (r.code === 0) {
this.escapeBol = false;
this.finishVisible = false
const message = !r.data ? this.$t('该订单已成功入仓,是否打印?') : `<h3>${this.$t('货物已入仓,存在异常')}</h3>${this.$t('该订单已成功入仓,是否打印?')}`
this.$confirm(
message,
this.$t('货物已入仓'),
{
confirmButtonText: this.$t(''),
cancelButtonText: this.$t(''),
dangerouslyUseHTMLString: true
}
).then(() => {
this.isShowPrint = true
}).catch(() => {
// this.$store.dispatch('tagsView/delVisitedView')
this.$message.success(this.$t('入仓成功'))
this.$tab.closePage()
})
}
let form = {...this.form}
form.orderId = this.orderId
form.manualExceptionType = form.manualExceptionType.join(',')
finishStock(form).then(res => {
this.$message.success(this.$t('操作成功'))
})
},
handleWarehousingReturn(item){
this.$confirm(item.prodTitleZh + this.$t('退仓后不可恢复,是否确认退仓?'), this.$t('确定要退仓?'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}).then(() => {
rollbackDelete({
"orderId": item.orderId,
"orderItemId": item.orderItemId
}).then(() => {
this.$message({
type: 'success',
message: this.$t('货物退仓成功!')
});
this.getOrderItemList()
this.getOrder()
// 显示打包弹层
package(row, title = null){
this.packageOrderItem = row
this.packageWarehouseItem = this.orderItemList.find(item => item.orderItemId = row.orderItemId)
this.packageTitle = title || this.$t('打包')
},
// 无需打包
noNeedPack(row){
noNeedPack(row.orderItemId).then(res => {
this.$message.success(this.$t('操作成功'))
})
}).catch(e => {
});
}
},
},
watch: {
orderSpecialNeeds(val){
/*orderSpecialNeeds(val){
val.forEach(e => {
this.form.orderSpecialNeedReceivableReqVoList.push({
"id": e.id,
......@@ -445,7 +344,7 @@ export default {
"receivableMoneyCurrency": e.transCurrency || 3
})
})
}
}*/
},
computed: {
......@@ -455,11 +354,11 @@ export default {
return this.orderItemList.find(item => item.orderItemId == orderItemId)
}
},
isAdd() {
return this.$route.path === "/order/warehousing-add"
},
isEdit() {
return this.$route.path === "/order/warehousing-update"
// 获取打包状态
wareItemPackStatus(){
return orderItemId => {
return this.wareItem(orderItemId)?.packStatus
}
},
title() {
return this.$i18n.locale === 'en_US' ? this.$route.meta.titleEn : this.$route.name
......
......@@ -192,7 +192,7 @@ import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import {canReadyStockShipmentPage, exportReadyStock, getOrderPage} from "@/api/ecw/order";
import {canReadyStockShipmentPage, exportReadyStock, getOrderPage, orderSpecialNeed} from "@/api/ecw/order";
import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
......@@ -220,6 +220,8 @@ export default {
},
data() {
return {
// 导出中状态
exporting: false,
// 选中数组
ids: [],
// 非单个禁用
......@@ -280,7 +282,7 @@ export default {
}
let queryParams = Object.assign({}, this.queryParams, timeParams)
return queryParams
}
},
},
activated(){
this.getList()
......@@ -345,7 +347,29 @@ export default {
}).finally(() => {
this.exporting = false
})
},
// 特需标识处理
specialRendering(val){
console.log('val', val)
if(val !== undefined){
let i = val.split(',')
return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => {
return i.indexOf(e.value) > -1
}).map(item => {
// 打字开头的用最后一个字,否则取第一个字
item.symbol = item.label[0] == '' ? item.label[item.label.length-1]: item.label[0]
return item
})
}
},
// 删除特需
deleteSpecial(id,orderId){
this.$confirm(this.$t('确定删除此特需么?')).then(() => {
return orderSpecialNeed({orderId:orderId,advanceType:id})
}).then(() => {
this.getList()
})
},
}
};
</script>
......
......@@ -202,6 +202,16 @@
</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="form.pictureUrls" ></image-and-video-upload>
</div>
</el-card>
</el-tab-pane>
......@@ -407,6 +417,15 @@
</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="form1.pictureUrls" ></image-and-video-upload>
</div>
</el-card>
</el-tab-pane>
</el-tabs>
......@@ -474,11 +493,13 @@ import {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 ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue"
export default {
name: "Warehouse",
components: {
ImageAndVideoUpload,
ProductSelector,
WarehouseAreaSelect,
WorkFlow
......@@ -624,7 +645,8 @@ export default {
prodType: undefined,
type: undefined,
feeType: undefined,
recordMode: undefined
recordMode: undefined,
pictureUrls: []
},
form1: {
table: [],
......@@ -642,7 +664,8 @@ export default {
prodType: undefined,
type: 1,
feeType: undefined,
recordMode: undefined
recordMode: undefined,
pictureUrls: []
},
brandList: [],
brandList1: [],
......@@ -712,6 +735,7 @@ export default {
this.form.prodType = this.warehousing.prodType
this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType
this.form.pictureUrls = this.warehousing.pictureUrls
this.warehousing.orderWarehouseInBackItemDoList.forEach(e => {
let bg = {}
......
......@@ -158,15 +158,6 @@
<span slot="append">kg</span>
</el-input>
</el-form-item>
<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="form.urls" ></image-and-video-upload>
</div>
</el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)">
<el-button @click="escapeBol = true;" type="primary">{{$t('转异')}}</el-button>
<el-button type="primary" @click="finishVisible = true">{{$t('完成入仓')}}</el-button>
......@@ -231,7 +222,6 @@ import PrintTag from "@/views/ecw/order/components/PrintTag"
import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt"
import imageUpload from "@/components/ImageUpload";
import {parseTime} from "@/utils/ruoyi"
import ImageAndVideoUpload from '@/components/ImageAndVideoUpload'
import Warehouse from "@/views/ecw/order/warehousing/components/Warehouse"
export default {
name: "Warehousing",
......@@ -242,7 +232,6 @@ export default {
PrintTag,
PrintWarehouseReceipt,
imageUpload,
ImageAndVideoUpload,
Warehouse
},
......
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