Commit d5fb83eb authored by houjn@hikoon.cn's avatar houjn@hikoon.cn
parents e174fdca e2716eb8
{
"ExpandedNodes": [
"",
"\\src"
"\\src",
"\\src\\views",
"\\src\\views\\ecw",
"\\src\\views\\ecw\\order"
],
"SelectedNode": "\\src\\main.js",
"PreviewInSolutionExplorer": false
}
\ No newline at end of file
No preview for this file type
......@@ -506,10 +506,11 @@ export function boxGoodsDetail(data) {
* @param {*} id
* @return {*}
*/
export function deleteSection(id) {
export function deleteSection(params) {
return request({
url: "/ecw/box-preload-goods/deleteSection?id=" + id,
url: "/ecw/box-preload-goods/deleteSection",
method: "delete",
params
});
}
......@@ -520,10 +521,11 @@ export function deleteSection(id) {
* @param {*} id
* @return {*}
*/
export function deleteGoods(id) {
export function deleteGoods(params) {
return request({
url: "/ecw/box-preload-goods/delete?ids=" + id.join(","),
url: "/ecw/box-preload-goods/delete",
method: "delete",
params
});
}
......@@ -536,12 +538,27 @@ export function deleteGoods(id) {
*/
export function createGoods(data) {
return request({
url: "/ecw/box-preload-goods/create",
url: "/ecw/box-preload-goods/v2/create",
method: "post",
data,
});
}
/**
* 获得订单所有关联列表
*
* @export
* @param {*} params
* @return {*}
*/
export function getAllRelateOrderList(params) {
return request({
url: "/order/guanlian/getAllRelateOrderList",
method: "get",
params,
});
}
/**
* 预装关联订单
*
......
import request from '@/utils/request'
import {param} from "@/utils";
// 创建订单
export function createOrder(data) {
......@@ -688,3 +687,65 @@ export function operateLogPage(params){
timeout: 5 * 60000
})
}
// 获取操作日志详情
export function getOperateLogDetail(id){
return request({
url: '/ecw/order-operate-log/get',
params: {id},
method: 'get',
})
}
// 取消拆单申请
export function splitCancelApply(data){
return request({
url: '/order/split/cancel-apply',
method: 'put',
data
})
}
// 撤销拆单
export function orderSplitRevoke(data){
return request({
url: '/order/split/revoke',
method: 'put',
data
})
}
/*根据订单ID获取撤销拆单详情*/
export function splitRevoke(orderId){
return request({
url: '/order/split/revoke/' + orderId,
method: 'get'
})
}
/*根据审批ID获取撤销拆单详情*/
export function splitRevokeApply(approvalId){
return request({
url: '/order/split/revoke/apply/' + approvalId,
method: 'get'
})
}
/*取消撤销拆单*/
export function cancelSplitRevoke(data){
return request({
url: '/order/split/cancel/revoke',
method: 'put',
data
})
}
/*修改拆单项*/
export function splitItemUpdate(data){
return request({
url: '/order/split-item/update',
method: 'post',
data
})
}
......@@ -113,3 +113,11 @@ export function exportExcel(params) {
responseType: 'arraybuffer'
})
}
// 根据订ID获取订单异常结果
export function getOrderExcptionResult(query) {
return request({
url: '/ecw/order-exception-result/page',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -59,7 +59,6 @@ export function deleteSplit(id) {
})
}
//取消申请拆单
export function cancelApply(data) {
return request({
url: '/order/split/cancel-apply',
......@@ -137,3 +136,12 @@ export function quantitycheck(query) {
params: query
})
}
// 重置拆单
export function deleteAllSplit(orderId) {
return request({
url: '/order/split/delete/all',
method: 'delete',
params: {orderId}
})
}
......@@ -9,6 +9,15 @@ export function createProduct(data) {
})
}
// 创建产品
export function addProduct(data) {
return request({
url: '/ecw/product/add',
method: 'post',
data: data
})
}
// 更新产品
export function updateProduct(data) {
return request({
......
......@@ -134,4 +134,10 @@ export function serviceConfig(data) {
})
}
// 数量是否必填
export function quantityRequired(lineId) {
return request({
url: '/ecw/warehouse/quantity/required/' + lineId,
method: 'get'
})
}
......@@ -13,6 +13,12 @@
<div class="value">{{item.contactsName}}</div>
<el-tag v-if="item.isInOpenSea" type="danger" effect="dark">{{$t('')}}</el-tag>
</div>
<!-- v1.7新增 -->
<div class="line">
<div class="label">{{$t('姓名(英文)')}}</div>
<div class="value">{{item.contactsNameEn}}</div>
<el-tag v-if="item.isInOpenSea" type="danger" effect="dark">{{$t('')}}</el-tag>
</div>
<div class="line">
<div class="label">{{$t('电话')}}</div>
<div class="value">+{{item.areaCode}} {{item.phoneNew}}</div>
......@@ -25,6 +31,11 @@
<div class="label">{{$t('公司')}}</div>
<div class="value">{{item.company}}</div>
</div>
<!-- v1.7新增 -->
<div class="line">
<div class="label">{{$t('公司(英文)')}}</div>
<div class="value">{{item.companyEn}}</div>
</div>
</div>
</div>
</div>
......
......@@ -14,8 +14,12 @@
<el-option
v-for="(item, index) in list"
:key="item.id"
:label="item['title' + lang]"
:label="item['title' + lang] + (item.auditStatus === 2 ? '' : `(${lang === 'Zh' ? '待确定' : 'To be determined'})`)"
:value="index">
<span style="float: left">{{ item['title' + lang] }}</span>
<span style="float: right; color: #c76e6e; font-size: 13px">
{{ item.auditStatus === 2 ? '' : (lang === 'Zh' ? '待确定' : 'To be determined') }}
</span>
</el-option>
</el-select>
</template>
......@@ -30,6 +34,16 @@ export default {
lang: {
type: String,
default: 'Zh'
},
// 是否显示待确认商品,不传默认不显示
determined: {
type: Boolean,
default: false
},
// 是否显示已有商品,不传默认
status: {
type: [String, Number],
default: null
}
},
data(){
......@@ -80,7 +94,9 @@ export default {
},
remoteMethod(keyword){
let params = {
pageSize: keyword ? 100000 : 10
pageSize: keyword ? 100000 : 10,
filter: !this.determined,
status:this.status
}
if(this.productType){
params.typeId = this.productType
......
......@@ -17,11 +17,15 @@
</template>
<script>
import {getCustomerContactsSelect, getCustomerContacts} from '@/api/ecw/customerContacts'
import {listSimpleUsers} from '@/api/system/user'
import {listServiceUser, listSimpleUsers} from '@/api/system/user'
export default {
props:{
value: [String, Number],
clearable: Boolean
clearable: Boolean,
manage:{
type:Boolean,
default:false
}
},
data(){
return {
......@@ -44,9 +48,18 @@ export default {
}
},
created(){
if(this.manage){
// 客户经理
listServiceUser().then(r=>{
this.list = r.data;
})
}else {
// 全部客户
listSimpleUsers().then(res => {
this.list = res.data
})
}
// this.init()
},
methods:{
......
......@@ -258,9 +258,7 @@ export default {
}
},
initArea(){
return getByWarehouseId({ warehouseId: this.warehouseId }).then(r => {
const area = r.data
resetAreaTreeSelected(area) {
area.forEach(e => {
// 仓库
e.children?.forEach(f => {
......@@ -276,12 +274,18 @@ export default {
})
})
})
this.area = area
return area
},
initArea(){
return getByWarehouseId({ warehouseId: this.warehouseId }).then(r => {
this.area = this.resetAreaTreeSelected(r.data)
})
},
// 用于储位回显选中
isSelected(warehouse, area, position = 0){
return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && position === e.locationId)
return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && (position === e.locationId || undefined === e.locationId))
},
}
}
......
......@@ -3834,15 +3834,67 @@
"收款单核销审核": "The payment voucher verification review",
"系统提示": "System prompt",
"合计:{totalNum}箱,{totalVolume}m³(测) {totalChargeVolume}m³(重) {totalWeight}KG": "Total:{totalNum}Box,{totalVolume}m³(Test) {totalChargeVolume}m³(Weight) {totalWeight}KG",
"确定要取消此报价单么?": "",
"确定要恢复此报价单么?": "",
"确定要删除此报价单么?": "",
"优质条件": "",
"港口": "",
"确定要取消此报价单么?": "Are you sure you want to cancel this quote?",
"确定要恢复此报价单么?": "Are you sure you want to restore this quote?",
"确定要删除此报价单么?": "Are you sure you want to delete this quote?",
"优质条件": "high-quality conditions",
"港口": "port",
"出证速度": "Speed of certification",
"快": "fast",
"慢": "slow",
"CTN NO": "",
"请输入CTN NO": "请输入CTN NO",
"境内外类型": "Internal and external types"
"CTN NO": "CTN NO",
"请输入CTN NO": "Please enter CTN NO",
"境内外类型": "Internal and external types",
"为保证入仓数据准确性,入仓请带上一份装箱单(品名,件数,毛重,尺寸方数,是否有牌)": "To ensure the accuracy of warehousing information, please bring a packing list with goods when entrying the warehouse. (Packing list should contain: Product name, Number of cartons, Gross weight, Measurements, Branded or not)",
"姓名(英文)": "Name (English)",
"公司(英文)": "Company (English)",
"入仓体积": "Warehouse volume",
"收费体积": "Fee volume",
"入仓重量": "Warehouse weight",
"收费重量": "Fee weight",
"数据无效": "The data is invalid",
"客户英文名称": "the customer's English name",
"请输入客户英文名称": "Please enter the customer's English name",
"付款人姓名": "The sender's name",
"请输入付款人姓名": "Please enter the name of the payer",
"公司英文名称": "Company English Name",
"联系人英文名称": "Contact's English name",
"请输入联系人英文名称": "Please enter the contact's name in English",
"入仓修改时间": "Warehouse modification time",
"退仓图片": "withdrawal image",
"发货人中文名称": "The sender's Chinese name",
"发货人英文名称": "The sender's English name",
"发货人公司中文名称": "Sender Company's Chinese name",
"发货人公司英文名称": "Sender Company's English name",
"收货人中文名称": "Consignee's Chinese name",
"收货人英文名称": "Consignee's English name",
"收货人公司中文名称": "Consignee company Chinese name",
"收货人公司英文名称": "Consignee company English name",
"显示更多": "Show more",
"订单包含不接受货物,请检查": "The order contains goods that are not accepted. Please check.",
"撤销拆单": "Cancel split order",
"新增品名中文": "New product name in Chinese",
"新增品名英文": "New product name in English",
"{prods}等商品拆单总数据跟主单不匹配": "The total data for the split order of {prods} products does not match the main order.",
"入仓特性": "",
"剩余入仓方数": "",
"剩余收费方数": "",
"剩余入仓重量": "",
"剩余收费重量": "",
"是否需要一起预装?": "",
"请注意,预装反审后,全部提单需重新制作": "",
"请先处理完出货异常,再进行操作": "",
"业绩类型": "",
"普通订单": "",
"收费统计": "",
"公司中文名称": "",
"展示": "",
"无归属订单": "Unassigned Order",
"最多可放入{quantity}": "",
"可放入仓方数": "",
"可放入收费方数": "",
"入仓方数": "",
"收费方数": "",
"可放入重量": "",
"可放入收费重量": ""
}
\ No newline at end of file
......@@ -87,6 +87,7 @@ service.interceptors.response.use(res => {
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) {
Message({
dangerouslyUseHTMLString: true,
message: msg,
type: 'error'
})
......@@ -106,6 +107,12 @@ service.interceptors.response.use(res => {
} else if (code === 555) {
// 额外情况
return Promise.reject(res.data)
} else if (code === 566) {
// 额外情况
return Promise.reject(res.data)
} else if (code === 666) {
// 额外情况
return Promise.reject(res.data)
} else if (code !== 200) {
Notification.error({
title: msg
......
......@@ -386,6 +386,11 @@ export default {
component: ()=>import('@/views/ecw/financial/components/commissionPaymentDetails.vue'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
/*撤销拆单*/
split_revoke:{
component: () => import("@/views/ecw/order/components/SplitRevokeDetail"),
id: this.processInstance.businessKey
}
}
console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim())
......
......@@ -9,7 +9,22 @@
<el-row style="margin-top:15px">
<el-table :data="billData.list" border max-height="500px">
<el-table-column :label="$t('序号')" align="center" width="50" prop="tidanNo" />
<el-table-column :label="$t('订单号')" align="center" prop="orderNo" />
<el-table-column :label="$t('订单号')" align="center" prop="orderNo">
<template slot-scope="scope">
<div>
{{scope.row.orderNo}}
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.drawee? scope.row.drawee:''}}
</div>
<div style="color:red;fontWeight:bold;">
{{ scope.row.applicationInfo? scope.row.applicationInfo : ''}}
</div>
<div style="color:red;fontWeight:bold;">
{{ scope.row.customsTypeName? scope.row.customsTypeName : ''}}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('货物信息')" align="center" prop="">
<template slot-scope="scope">
<section class="table-goodList">
......
......@@ -50,6 +50,7 @@ import html2canvas from 'html2canvas';
import { jsPDF } from "jspdf";
import {uploadFile} from '@/api/infra/file'
import FileSaver from 'file-saver'
import {getOrder, getOrderDetail} from "@/api/ecw/order";
window.html2canvas = html2canvas
export default {
name: "makeLadingBill",
......@@ -175,7 +176,13 @@ export default {
showLoaingTemplate() {
this.visible = true;
},
// 先获取订单信息,pdf用 订单号+唛头命名
createPdf(){
getOrder(this.currRow.orderId).then(res => {
this.afterCreatePdf(res.data)
})
},
afterCreatePdf(orderData){
let loading = this.$loading()
html2canvas(document.querySelector("#html2canvas-container"), {dpi:144, useCORS: true}).then(canvas => {
const doc = new jsPDF('p','pt','a4',true);
......@@ -194,7 +201,7 @@ export default {
/* doc.save("a4.pdf");
return Promise.reject() */
let form = new FormData()
let file = this.selfNo + '-' + this.currRow.tidanNo + '.pdf'
let file = this.currRow.orderNo + '-' + orderData.marks + '.pdf' //this.selfNo + '-' + this.currRow.tidanNo + '.pdf'
form.append('file', new File([doc.output('arraybuffer')], file, {type: 'application/pdf'}))
form.append('path', `admin/shipment/${this.selfNo}/pdf/${file}`) // 最前面不能有/,否则返回的url会有两个/
......
......@@ -77,7 +77,8 @@
</el-row>
<el-row>
<span>{{$t('品牌')}}
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
<template v-if="scope.row.brandName">{{scope.row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
</span>
<span style="margin-left: 10px;">{{$t('箱数')}}:{{scope.row.warehouseInInfoVO ? scope.row.warehouseInInfoVO.cartonsNum : 0 }}</span>
<span style="margin-left: 10px;">{{$t('体积')}}:{{scope.row.warehouseInInfoVO ? scope.row.warehouseInInfoVO.volume : 0 }}m³</span>
......@@ -138,14 +139,32 @@
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
</template>
</el-table-column>
<el-table-column :label="$t('体积')" align="center">
<el-table-column :label="$t('入仓体积')" align="center" >
<template slot-scope="scope">
<span>{{scope.row.volume}}</span>
<el-input v-model="scope.row.volume" @change="updateField(scope.row, 'volume')" size="mini" :disabled="index === 0">
<span slot="append"></span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('重量')" align="center">
<el-table-column :label="$t('收费体积')" align="center" >
<template slot-scope="scope">
<span>{{scope.row.weight}}kg</span>
<el-input v-model="scope.row.chargeVolume" @change="updateField(scope.row, 'chargeVolume')" size="mini" :disabled="index === 0">
<span slot="append"></span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('入仓重量')" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.weight" @change="updateField(scope.row, 'weight')" size="mini" :disabled="index === 0">
<span slot="append">kg</span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('收费重量')" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.chargeWeight" @change="updateField(scope.row, 'chargeWeight')" size="mini" :disabled="index === 0">
<span slot="append">kg</span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center">
......@@ -178,39 +197,64 @@
</div>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="$t('放入品名')" :visible.sync="shopOpen" width="400px" append-to-body>
<el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="100px">
<el-dialog :title="$t('放入品名')" :visible.sync="shopOpen" width="500px" append-to-body>
<el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="150px">
<el-row>
<el-form-item :label="$t('中文品名')+':'" prop="zhId">
<el-select v-model="shopForm.zhId" :placeholder="$t('请选择中文品名')" @change="changeProdTitleZh">
<el-option v-for="item in orderItems" :label="item.prodTitleZh" :value="item.id" :key="item.id" :disabled="itemDisabled(item)"></el-option>
<el-form-item :label="$t('中文品名')+':'" prop="orderItemId">
<el-select v-model="shopForm.orderItemId" :placeholder="$t('请选择中文品名')" @change="onProdChange">
<el-option v-for="item in orderItems" :label="item.prodTitleZh" :value="item.orderItemId" :key="item.id" :disabled="itemDisabled(item)"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('英文品名')+':'" prop="enId">
<el-select v-model="shopForm.enId" :placeholder="$t('请选择英文品名')" @change="changeProdTitleEn">
<el-option v-for="item in orderItems" :label="item.prodTitleEn" :value="item.id" :key="item.id" :disabled="itemDisabled(item)"></el-option>
<el-form-item :label="$t('英文品名')+':'" prop="orderItemId">
<el-select v-model="shopForm.orderItemId" :placeholder="$t('请选择英文品名')" @change="onProdChange">
<el-option v-for="item in orderItems" :label="item.prodTitleEn" :value="item.orderItemId" :key="item.id" :disabled="itemDisabled(item)"></el-option>
</el-select>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('剩余箱数')+':'">
{{shopForm.num||0}}
{{shopForm.leftNum||0}}
</el-form-item>
</el-col>
<el-col :span="12" v-show="isQuantity">
<!--剩余数量计算不出来,显示没意义-->
<!--<el-col :span="12" v-show="isQuantity">
<el-form-item :label="$t('剩余数量(个)')+':'">
{{shopForm.quantity||0}}
{{shopForm.leftQuantity||0}}
</el-form-item>
</el-col>
</el-col>-->
</el-row>
<el-form-item :label="$t('放入箱数')+':'">
{{shopForm.putNum||0}}
<el-input-number v-model="shopForm.num" controls-position="right" :min="0" :max="+shopForm.leftNum" @change="calcAverg"></el-input-number>
</el-form-item>
<el-form-item v-if="mainOrderItem.orderItemId" label-width="0">
{{ $t('剩余入仓方数') }}:{{ mainOrderItem.volume || 0 }}m³,
{{$t('剩余收费方数')}}:{{ mainOrderItem.chargeVolume || 0 }}m³
</el-form-item>
<el-form-item :label="$t('入仓体积')">
<el-input-number v-model="shopForm.volume" controls-position="right" :min="0" :max="mainOrderItem.volume"></el-input-number>
</el-form-item>
<el-form-item :label="$t('收费体积')">
<el-input-number v-model="shopForm.chargeVolume" controls-position="right" :min="0" :max="mainOrderItem.chargeVolume"></el-input-number>
</el-form-item>
<el-form-item v-if="mainOrderItem.orderItemId" label-width="0">
{{ $t('剩余入仓重量') }}:{{ mainOrderItem.weight || 0 }}kg,
{{$t('剩余收费重量')}}:{{ mainOrderItem.chargeWeight || 0 }}kg
</el-form-item>
<el-form-item :label="$t('入仓重量')">
<el-input-number v-model="shopForm.weight" controls-position="right" :min="0" :max="mainOrderItem.weight"></el-input-number>
</el-form-item>
<el-form-item :label="$t('收费重量')">
<el-input-number v-model="shopForm.chargeWeight" controls-position="right" :min="0" :max="mainOrderItem.chargeWeight"></el-input-number>
</el-form-item>
<!--按照原型这里需要显示剩余数量,但是事实无法计算剩余数量,因为已装数量是未知的-->
<el-form-item :label="$t('放入数量(个)')+':'" prop="quantity" v-if="isQuantity">
<el-input-number v-model="shopForm.quantity" controls-position="right" :min="0" :max="mainOrderItem.quantity || undefined"></el-input-number>
</el-form-item>
<!-- <el-form-item :label="$t('放入数量(个)')+':'" prop="putQuantity" v-show="isQuantity">
<el-input-number v-model="shopForm.putQuantity" controls-position="right" :min="0"></el-input-number>
</el-form-item> -->
<el-form-item :label="$t('备注信息')+':'">
<el-input v-model="shopForm.remarks"></el-input>
</el-form-item>
......@@ -227,13 +271,14 @@
<script>
import {
getSplitList,
quantitycheck,
// quantitycheck,
createSplitItem,
deleteSplitItem,
} from "@/api/ecw/orderHandle";
import {quantityRequired} from "@/api/ecw/warehouse";
import { getTradeCityList } from "@/api/ecw/region";
import WorkFlow from "@/components/WorkFlow";
import { getOrder } from "@/api/ecw/order";
import {getOrder, splitItemUpdate} from "@/api/ecw/order";
import { serviceMsg, toReviewDetail } from "../../utils";
import { createApproval, approvalCancel, splitList } from "@/api/ecw/boxSea";
import Decimal from "decimal.js";
......@@ -242,7 +287,7 @@ export default {
name: "splitOrder",
inheritAttrs: false,
components: {
WorkFlow,
WorkFlow
},
props: {
currRow: Object,
......@@ -282,6 +327,9 @@ export default {
lang: 0,
},
isQuantity: false,
// 主单数据
mainOrder: {orderSplitItemBackVOList: {}}
};
},
created() {
......@@ -328,22 +376,33 @@ export default {
}
return false;
},
// 订单项数据,默认要返回一个如下的空json结构体,避免报错
// 装柜拆单只能拆一个出来,所以直接用原单数据作为放入品名的最大值限制即可,跟订单操作中的拆单有所区别
mainOrderItem(){
if(!this.shopForm.orderItemId || !this.mainOrder.orderSplitItemBackVOList.length) return {}
return this.mainOrder.orderSplitItemBackVOList.find(item => item.orderItemId == this.shopForm.orderItemId) || {}
}
},
methods: {
/* 拆箱总数 */
totalSplitNum() {
let _total = 0;
const { orderSplitItemBackVOList = [] } = this.splitData;
orderSplitItemBackVOList.forEach((v) => {
_total = Decimal.add(_total, Number(v.num)).toNumber();
});
return _total;
},
totalSplitQty() {
/*检查并提交字段(体积,重量)修改*/
updateField(row, field){
let val = parseFloat(row[field])
if(!val || val < 0){
this.$message.error(this.$t('数据无效'))
return this.getList()
}
splitItemUpdate(row).then(() => {
this.$message.success(this.$t('修改成功'))
}).catch(() => {
this.getList()
})
},
/* 拆箱总数,默认计算箱数,传递quantity可计算个数 */
totalSplit(field = 'num') {
let _total = 0;
const { orderSplitItemBackVOList = [] } = this.splitData;
orderSplitItemBackVOList.forEach((v) => {
_total = Decimal.add(_total, Number(v.quantity)).toNumber();
_total = Decimal.add(_total, Number(v[field])).toNumber();
});
return _total;
},
......@@ -358,6 +417,8 @@ export default {
const data = res.data;
// 取拆单项
this.splitData = data.filter((item) => !item.isMaster)?.[0] ?? {};
// 取主单,用语判断放入品名的数据上限
this.mainOrder = data.find(item => item.isMaster)
});
},
itemDisabled(data) {
......@@ -462,65 +523,38 @@ export default {
this.shopOpen = true;
this.isQuantity = false;
},
async changeProdTitleZh() {
const item = this.setShopForm("zhId");
this.shopForm.enId = item.id;
this.shopForm = { ...this.shopForm };
await this.getSelectData(item);
},
async changeProdTitleEn() {
const item = this.setShopForm("enId");
this.shopForm.zhId = item.id;
this.shopForm = { ...this.shopForm };
await this.getSelectData(item);
},
setShopForm(key) {
let list = [];
list = this.orderItems.filter((item) => item.id == this.shopForm[key]);
// 更改放入品名后触发,计算重量体积等默认值
onProdChange(){
// 根据键值(中文名或者英文名)来获取对应商品的信息,注:这里应该可以采用orderItemId来获取更优,而不是商品名称,同名可能导致异常
let orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
console.log({orderItem})
// 剩余可装箱数,订单入仓箱数 - 订单已装箱数 - 已拆箱数
let leftNum = Decimal(this.currRow.num).minus(this.currRow.installNum).minus(this.totalSplit('num'))
const data = list[0];
const itemNum = data.num ?? 0;
const itemQty = data.quantity ?? 0;
// 获取拆单项的总num
const total = this.totalSplitNum();
// 订单的剩余
const orderNum = this.currRow.num - this.currRow.installNum;
// 剩余可装
const remainNum = Decimal.sub(orderNum, total).toNumber();
// 剩余箱数
this.$set(this.shopForm, 'leftNum', leftNum)
this.shopForm.num = 0;
this.shopForm.putNum = 0;
// 剩余可装大于等于订单项剩余,显示订单剩余
if (remainNum >= itemNum) {
this.shopForm.num = remainNum;
this.shopForm.putNum = itemNum;
}
// 订单剩余小于订单项剩余,显示订单项剩余
if (remainNum < itemNum) {
this.shopForm.num = this.shopForm.putNum = remainNum;
}
// 如果主单商品项的入仓箱数小于可装箱数,则取商品项数据
leftNum = Math.min(leftNum, this.mainOrderItem.num)
// 放入箱数
this.$set(this.shopForm, 'num', leftNum)
this.calcAverg()
},
// 按比例计算体积重量的默认值
calcAverg(){
// 装箱比例
const rate = this.shopForm.num / this.mainOrderItem.num
const totalQty = this.totalSplitQty();
this.shopForm.quantity = 0;
if (totalQty >= itemQty) {
this.shopForm.quantity = totalQty;
}
if (totalQty < itemQty) {
this.shopForm.quantity = itemQty;
}
this.shopForm.orderItemId = data.orderItemId;
this.shopForm.putQuantity = Decimal.div(
this.shopForm.quantity,
this.shopForm.num
).toFixed(0);
return data;
// 放入个数,剩余个数是算不出来的,因为不知道已装数量,所以放入数量只能按照总数的比例计算
this.$set(this.shopForm, 'quantity', Math.ceil(this.mainOrderItem.quantity*rate|| 0 * rate))
// 数量,体积,重量等按照比例给默认值
this.$set(this.shopForm, 'volume', (this.mainOrderItem.volume * rate).toFixed(2))
this.$set(this.shopForm, 'chargeVolume', (this.mainOrderItem.chargeVolume * rate).toFixed(2))
this.$set(this.shopForm, 'weight', (this.mainOrderItem.weight * rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (this.mainOrderItem.chargeWeight * rate).toFixed(2))
},
async getSelectData(item) {
await quantitycheck({
seaFreightVolume: item.seaFreightVolume,
clearanceFreightVolume: item.clearanceFreightVolume,
}).then((res) => {
await quantityRequired(this.orderData.lineId).then((res) => {
if (res.data) {
this.isQuantity = true;
this.shopRules.putQuantity = [
......@@ -539,6 +573,8 @@ export default {
shopAdd() {
this.$refs["shopForm"].validate((valid) => {
if (valid) {
// 放入箱数自动计算出来的,所以不需要在做判断了
/*
// 输入箱数大于实装箱数
const total = this.totalSplitNum();
const canSplitNum = Decimal.sub(
......@@ -549,23 +585,31 @@ export default {
if (this.shopForm.num > remain) {
this.$message.error(this.$t("放入箱数不能大于总箱数"));
return;
}
}*/
if (this.shopForm.num === 0) {
this.$message.error(this.$t("放入箱数不能为0"));
return;
}
if (this.shopForm.putQuantity === 0 && this.isQuantity) {
if (this.shopForm.quantity === 0 && this.isQuantity) {
this.$message.error(this.$t("放入数量(个)不能为0"));
return;
}
let params = {
num: this.shopForm.putNum,
quantity: this.shopForm.putQuantity,
num: this.shopForm.num,
// quantity: this.shopForm.quantity,
orderItemId: this.shopForm.orderItemId,
orderSplitId: this.splitData.id,
remarks: this.shopForm.remarks,
volume: this.shopForm.volume,
weight: this.shopForm.weight,
chargeWeight: this.shopForm.chargeWeight,
chargeVolume: this.shopForm.chargeVolume
};
// 按数量计费的才需要传递数量
if(this.isQuantity){
params.quantity = this.shopForm.quantity
}
createSplitItem(params).then((res) => {
this.$message.success(this.$t("放入成功"));
this.querySplitGoods();
......
......@@ -535,6 +535,31 @@ export default {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
}).catch((res) => {
if (res.code === 666) {
this.$confirm("<div style='max-height:500px;overflow:auto'>"+res.msg+this.$t('是否需要一起移出?')+"</div>", this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
remove({ ...params, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
})
.catch(action => {
if(action =='cancel'){
remove({ ...params, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
}
});
}
});
},
/* 修改柜信息 */
......
......@@ -246,6 +246,31 @@ export default {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
}).catch((res) => {
if (res.code === 666) {
this.$confirm(res.msg+this.$t('是否需要一起移出?'), this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
remove({ ...params, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
})
.catch(action => {
if(action =='cancel'){
remove({ ...params, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
}
});
}
});
},
/** 预装 */
......@@ -262,11 +287,67 @@ export default {
} else {
params.orderItemIdList = [item.orderItemId];
}
createGoods(params).then((res) => {
createGoods(params)
.then((res) => {
const { data } = res;
if (data.relationMsg) {
const msg = data.relationMsg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
loadRelationOrder(data).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
} else {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
}
})
.catch((res) => {
if (res.code === 555) {
const msg = res.msg && res.msg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
createGoods({ ...params, relationStatus: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
}
if (res.code === 566) {
this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
createGoods({ ...params, relationStatus: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
}
});
},
/* 增加部分 */
addPart() {
......@@ -289,7 +370,11 @@ export default {
}
)
.then((_) => {
deleteSection(this.partData.id).then((res) => {
let params = {
id: this.partData.id,
deleteType: 2
};
deleteSection(params).then((res) => {
serviceMsg(res, this).then(() => {
this.partData = {};
this.getSecGoods();
......
......@@ -319,9 +319,9 @@
</el-row>
<!-- 关联订单弹窗 -->
<el-dialog :title="relationOrderListDialog.title" :visible.sync="relationOrderListDialog.visible" width="30%" append-to-body>
<el-row v-for="(item,index) in relationOrderListDialog.data" :key="item.id">
{{index+1}}. {{item.orderNo}}
</el-row>
<el-card>
<div v-html="relationOrderListDialog.data"></div>
</el-card>
<el-row style="margin-top: 10px;text-align: center;">
<el-button type="primary" @click="relationOrderListDialog.visible = false">{{$t('关闭窗口')}}</el-button>
</el-row>
......@@ -343,6 +343,7 @@ import {
approvalCreate,
approvalCancel,
loadRelationOrder,
getAllRelateOrderList
} from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import {
......@@ -516,10 +517,12 @@ export default {
},
/**查看关联订单 */
getRelationOrder(item) {
console.log(item)
getAllRelateOrderList({orderId:item.orderId,orderNo:item.orderNo}).then(res=>{
this.relationOrderListDialog.title = item.orderNo+'关联订单'
this.relationOrderListDialog.visible = true
this.relationOrderListDialog.data = item.relateOrderList
this.relationOrderListDialog.data = res.msg.replace(/\n/g,'<br>')
})
},
/** 搜索按钮操作 */
handleQuery(type) {
......@@ -628,7 +631,11 @@ export default {
}
)
.then((_) => {
deleteSection(part.id).then((res) => {
let params = {
id: part.id,
deleteType: 2
};
deleteSection(params).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
......@@ -654,6 +661,7 @@ export default {
if (data.relationMsg) {
const msg = data.relationMsg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
......@@ -676,6 +684,7 @@ export default {
if (res.code === 555) {
const msg = res.msg && res.msg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
......@@ -689,6 +698,23 @@ export default {
this.queryAllData();
});
}
if (res.code === 566) {
this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
createGoods({ ...params, relationStatus: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
}
});
} else {
let params = {
......@@ -718,11 +744,38 @@ export default {
if (type === "row") {
ids.push(data.id);
}
deleteGoods(ids).then((res) => {
let param = {
ids: ids.join(",")
}
deleteGoods(param).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
}).catch((res) => {
if (res.code === 666) {
this.$confirm("<div style='max-height:500px;overflow:auto'>"+res.msg+this.$t('是否需要一起移出?')+"</div>", this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
deleteGoods({ ...param, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch(action => {
if(action =='cancel'){
deleteGoods({ ...param, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
}
});
}
});
},
/* 查询所有数据 */
......
......@@ -4,6 +4,7 @@
<el-form-item :label="$t('申请理由')">
<el-input v-model="reviewObj.applyReason" type="textarea" rows="2" :placeholder="$t('请输入申请理由')" :disabled="isReview"></el-input>
</el-form-item>
<span v-if="voKey=='preInstallBackInfo'" style="color: red;margin-left: 120px;">{{$t('请注意,预装反审后,全部提单需重新制作')}}</span>
</el-form>
<el-row class="operate-button">
<el-button type="success" @click="onSubmit" v-show="!isReview">{{$t('发起申请')}}</el-button>
......
......@@ -240,15 +240,41 @@ export default {
type: "warning",
})
.then((_) => {
tallyRemove({
let param = {
orderIdLIst: orderIds,
shipmentId: this.shipmentObj.id,
}).then((res) => {
}
tallyRemove(param).then((res) => {
serviceMsg(res, this).then(() => {
this.getList();
});
}).catch((res) => {
if (res.code === 666) {
this.$confirm("<div style='max-height:500px;overflow:auto'>"+res.msg+this.$t('是否需要一起移出?')+"</div>", this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
tallyRemove({ ...param, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getList();
});
});
})
.catch(action => {
if(action =='cancel'){
tallyRemove({ ...param, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getList();
});
});
}
});
}
});
})
.catch((_) => {});
},
// 关闭弹窗
......
......@@ -126,7 +126,7 @@
import { createChannel, updateChannel, deleteChannel, getChannel, getChannelPage, exportChannelExcel } from "@/api/ecw/channel";
export default {
name: "Channel",
name: "EcwChannelIndex",
components: {
},
data() {
......@@ -163,6 +163,9 @@ export default {
created() {
this.getList();
},
activated() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
......
......@@ -17,6 +17,16 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户英文名称')">
<el-input v-model="form.nameEn" :placeholder="$t('请输入客户英文名称')"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('付款人姓名')">
<el-input v-model="form.payerName" :placeholder="$t('请输入付款人姓名')"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')" disabled>
......@@ -70,7 +80,6 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户生日')" prop="birthday">
<el-date-picker
v-model="form.birthday"
......@@ -80,6 +89,11 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('公司英文名称')">
<el-input v-model="form.companyEn" :placeholder="$t('请输入客户英文名称')"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('主营类别')" prop="productType">
<el-row :gutter="10">
......@@ -268,6 +282,16 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column>
<template slot="header">
{{$t('联系人英文名称')}}
</template>
<template v-slot="{row, cellValue, $index}">
<el-form-item label="">
<el-input v-model="row.nameEn" :placeholder="$t('请输入联系人英文名称')" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="areaCode"
:label="$t('区号')"
......@@ -873,12 +897,15 @@ export default {
id: undefined,
number: undefined,
name: undefined,
nameEn: undefined,
level: 1,
country: undefined,
type: undefined,
transportType:[],
agentId: undefined,
company: undefined,
companyEn: undefined,
payerName:undefined,
address: undefined,
productType: undefined,
productId: undefined,
......@@ -948,6 +975,7 @@ export default {
"social": undefined,
"socialNumber": "",
"userid": undefined,
"nameEn":"",
// "username": ""
})
},
......
......@@ -105,7 +105,7 @@
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name">
<template slot-scope="{row}">
{{row.name}} <el-tag v-if="row.isInOpenSea" size="mini">{{ $t('') }}</el-tag>
{{$l(row, 'name')}} <el-tag v-if="row.isInOpenSea" size="mini">{{ $t('') }}</el-tag>
</template>
</el-table-column>
......
......@@ -44,7 +44,7 @@
<el-table-column :label="$t('客户名称')" align="center" prop="name" >
<template v-slot="scope">
<router-link :to="{path: '/customer/indirectInfo',query: {id: scope.row.id}}" class="link-type">
<span>{{ scope.row.name }}</span>
<span>{{ $l(scope.row,'name') }}</span>
</router-link>
</template>
</el-table-column>
......
......@@ -15,7 +15,8 @@
<el-card style="margin-top: 15px;">
<el-descriptions :column="4" border>
<el-descriptions-item :label="$t('客户编号')">{{ customer.number }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户名称')">{{ customer.name }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户名称')">{{ customer.name}}</el-descriptions-item>
<el-descriptions-item :label="$t('客户英文名称')">{{customer.nameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('结算方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
......@@ -38,6 +39,7 @@
<el-descriptions-item :label="$t('推介人')">{{ customer.promoterName }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{customerService }}</el-descriptions-item>
<el-descriptions-item :label="$t('公司名称')">{{ customer.company }}</el-descriptions-item>
<el-descriptions-item :label="$t('公司英文名称')">{{ customer.companyEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址')">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{ parseTime(customer.createTime) }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建人')">{{ customer.founderName }}</el-descriptions-item>
......@@ -48,7 +50,8 @@
<el-image v-show="!!customer.picture" :src="customer.picture" style="width: 100px;height: 100px"></el-image>
</el-descriptions-item>
<el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item>
<el-descriptions-item :label="$t('新老客户')">{{ customer.isNew ?$t('新客户') : $t('老客户') }}</el-descriptions-item>
<el-descriptions-item :label="$t('业绩类型')">{{ customer.isNew ?$t('新客户') : $t('老客户') }}</el-descriptions-item>
<el-descriptions-item :label="$t('付款人姓名')">{{ customer.payerName }}</el-descriptions-item>
<el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证姓名')">{{ customer.carName }}</el-descriptions-item>
<el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证号码')">{{ customer.carNo }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('信用等级')">{{ customer }}</el-descriptions-item>-->
......@@ -77,6 +80,12 @@
prop="name"
:label="$t('联系人')"
>
</el-table-column>
<el-table-column
prop="nameEn"
:label="$t('联系人英文名称')"
>
</el-table-column>
<el-table-column
prop="phoneNew"
......@@ -165,7 +174,7 @@
@change="changeDate"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
type="datetimerange"
range-separator="-"
:start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
......@@ -231,6 +240,11 @@
<!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />-->
<!-- </template>-->
</el-table-column>
<el-table-column :label="$t('入仓时间')">
<template v-slot="{row}">
{{parseTime(row.rucangTime)}}
</template>
</el-table-column>
</el-table>
<pagination @pagination="getorderList" :page.sync="queryParams.page" :limit.sync="queryParams.rows" :total="orderTotal" ></pagination>
</el-card>
......
......@@ -85,7 +85,11 @@
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column :label="$t('客户名称')" align="center" prop="name" >
<template v-slot="{row}">
{{$l(row, 'name')}}
</template>
</el-table-column>
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
......
......@@ -96,7 +96,11 @@
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column :label="$t('客户名称')" align="center" prop="name" >
<template v-slot="{row}">
{{$l(row, 'name')}}
</template>
</el-table-column>
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
......
......@@ -73,6 +73,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_ESOURCE_TYPE" :value="scope.row.customerType"/>
</template>
</el-table-column>
<el-table-column :label="$t('业绩类型')" align="center" prop="achieveType"/>
<el-table-column :label="$t('报价单号')" align="center" width="180">
<template slot-scope="scope">
<span>{{scope.row.number}}</span>
......@@ -130,7 +131,7 @@
import {listServiceUser} from "@/api/system/user";
export default {
name: "DeptTarget",
name: "EcwDepttargetAllachievement",
components: {},
data() {
return {
......@@ -219,6 +220,10 @@
}
}
},
activated() {
this.getChannelList();
this.getList();
},
created() {
this.getChannelList();
this.getList();
......
......@@ -154,7 +154,7 @@
import { parseTime } from '@/utils/ruoyi';
export default {
name: "DeptTarget",
name: "EcwDepttargetIndex",
components: {},
data() {
return {
......@@ -266,6 +266,10 @@ import { parseTime } from '@/utils/ruoyi';
this.getChannelList();
this.getList();
},
activated() {
this.getChannelList();
this.getList();
},
methods: {
/** 查询部门列表 */
getDeptList(){
......
......@@ -71,6 +71,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_ESOURCE_TYPE" :value="scope.row.customerType"/>
</template>
</el-table-column>
<el-table-column :label="$t('业绩类型')" align="center" prop="achieveType"/>
<el-table-column :label="$t('报价单号')" align="center" width="180">
<template slot-scope="scope">
<span>{{scope.row.number}}</span>
......@@ -126,7 +127,7 @@
import {listServiceUser} from "@/api/system/user";
export default {
name: "DeptTarget",
name: "EcwDepttargetMyachievement",
components: {},
data() {
return {
......@@ -215,6 +216,10 @@
}
}
},
activated() {
this.getChannelList();
this.getList();
},
created() {
this.getChannelList();
this.getList();
......
......@@ -70,6 +70,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_ESOURCE_TYPE" :value="scope.row.customerType"/>
</template>
</el-table-column>
<el-table-column :label="$t('业绩类型')" align="center" prop="achieveType"/>
<el-table-column :label="$t('报价单号')" align="center" width="180">
<template slot-scope="scope">
<span>{{scope.row.number}}</span>
......@@ -126,7 +127,7 @@
import {listServiceUser} from "@/api/system/user";
export default {
name: "DeptTarget",
name: "EcwDepttargetMydeptachievement",
components: {},
data() {
return {
......
......@@ -155,7 +155,7 @@
import { parseTime } from '@/utils/ruoyi';
export default {
name: "DeptTarget",
name: "EcwDepttargetMydepttarget",
components: {},
data() {
return {
......@@ -267,13 +267,17 @@ import { parseTime } from '@/utils/ruoyi';
this.getChannelList();
this.getList();
},
activated() {
this.getChannelList();
this.getList();
},
methods: {
/** 查询部门列表 */
getDeptList(){
this.loading = true;
myListDept(this.queryParams).then(response => {
this.deptList = this.handleTree(response.data, "id");
console.log("this.deptList:"+JSON.stringify(this.deptList));
// console.log("this.deptList:"+JSON.stringify(this.deptList));
this.deptList.forEach((item) => {
this.normalizer(item);
// this.deptData.push(item);
......
......@@ -85,7 +85,11 @@
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column :label="$t('客户名称')" align="center" prop="name" >
<template v-slot="{row}">
{{$l(row, 'name')}}
</template>
</el-table-column>
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
......
......@@ -90,7 +90,11 @@
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column :label="$t('客户名称')" align="center" prop="name" >
<template v-slot="{row}">
{{$l(row, 'name')}}
</template>
</el-table-column>
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
......
<script>
// 对edit组件复用并更名,防止keepalive缓存数据
import edit from './edit.vue'
edit.name = 'OfferCreate'
edit.name = 'EcwOfferCreate'
export default edit
</script>
......@@ -520,6 +520,16 @@ import QuickCreateCustomer from '@/components/QuickCreateCustomer'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
import Decimal from 'decimal.js'
window.Decimal= Decimal
const createDefaultForm = () => {
return {
sendstatus:0,
type: [],
control: false,
isCargoControl: false,
prodCreateReqVOList:[],
transportVO: {}
}
}
export default {
name: "EcwOfferEdit",
components: {
......@@ -542,14 +552,7 @@ export default {
// couponList: [],
fee: {}, // 费用
// 表单参数
form: {
sendstatus:0,
type: [],
control: false,
isCargoControl: false,
prodCreateReqVOList:[],
transportVO: {}
},
form: {...createDefaultForm()},
// 表单校验
labelStyle: 'width:120px',
......@@ -846,7 +849,7 @@ export default {
})
},
'form.transportVO.packageTypeArr'(val){
this.$set(this.form.transportVO, 'packageType', val.join(','))
this.$set(this.form.transportVO, 'packageType', (val || []).join(','))
},
// 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
selectedRouter(val){
......@@ -982,6 +985,8 @@ export default {
if(this.form.channelId){
params.channelId = this.form.channelId
}
// 如果没有任何条件,不请求接口
if(!params.startCityId && !params.destCityId && !params.transportType && !params.channelId) return false
getOpenedRouterList(params).then(res => this.routerList = res.data)
},
// 计算体积
......@@ -1035,6 +1040,14 @@ export default {
})
// 添加的提交
createOffer(data).then(response => {
// 重置表单内容
this.$set(this, 'form', {...createDefaultForm()})
this.routerList = []
this.$nextTick(() => {
console.log('清理表单校验和路线')
this.addProduct()
this.$refs.form.clearValidate()
})
this.$modal.msgSuccess(this.$t("新增成功"));
this.$redirect('index')
});
......
......@@ -42,10 +42,7 @@
{{parseTime(row.rucangTime)}}
</template>
</el-table-column>
<el-table-column :label="$t('状态')">
<template v-slot:default="scope">
<dict-tag :value="scope.row.status" :type="DICT_TYPE.ORDER_STATUS"></dict-tag>
</template>
<el-table-column :label="$t('状态')" prop="statusMsg">
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot:default="scope">
......
......@@ -20,7 +20,7 @@
{{$t('已加入关联订单列表')}}
</h1>
<div style="flex: 1;margin-left: 20px;">
<el-button :disabled="multipleSelection.length === 0" type="primary" @click="batchGuanlianOrderByOrderId(multipleSelection.map(e =>({orderId:orderId,relateOrderId:e.relateOrderId})))" >{{$t('批量移出')}}</el-button>
<el-button :disabled="multipleSelection.length === 0" type="primary" @click="batchGuanlianOrderByOrderId(multipleSelection.map(e =>({orderId:orderId,relateOrderId:e.orderId})))" >{{$t('批量移出')}}</el-button>
</div>
<div>
<el-button type="primary" @click="$router.push(`/order/add-associated-order/${orderId}`)">{{$t('添加关联订单')}}</el-button>
......@@ -54,7 +54,7 @@
</el-table-column>
<el-table-column :label="$t('状态')" prop="status" >
<template v-slot:default="scope">
<dict-tag :value="scope.row.orderBackVO.status" :type="DICT_TYPE.ORDER_STATUS" ></dict-tag>
{{scope.row.orderBackVO.statusMsg}}
</template>
</el-table-column>
<el-table-column :label="$t('操作人')" prop="creator">
......@@ -69,7 +69,7 @@
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot:default='scope'>
<el-button type="text" @click ="guanlianOrderByOrderId(scope.row.relateOrderId)">
<el-button type="text" @click ="guanlianOrderByOrderId(scope.row.orderId)">
{{$t('移出')}}
</el-button>
</template>
......
......@@ -57,6 +57,13 @@
<el-option :label="$t('自有仓')" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('订单类型')" prop="number">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable >
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
......
<template>
<el-dialog :visible="true" title="日志详情" :before-close="closeDialog">
<el-form label-width="100px">
<el-form-item label="ID">{{detail.id}}</el-form-item>
<el-form-item :label="$t('时间')">{{detail.createTime|parseTime}}</el-form-item>
<el-form-item :label="$t('操作人')">{{detail.creatorName}}【ID: {{detail.creator}}</el-form-item>
<el-form-item :label="$t('操作人类型')">{{detail.userType == 2 ? $t('管理员') : $t('会员')}}</el-form-item>
<el-form-item :label="$t('操作描述')">{{detail.msg}}</el-form-item>
<el-form-item :label="$t('操作类型')">{{detail.type}}</el-form-item>
<el-form-item :label="$t('请求地址')">{{detail.requestUrl}}</el-form-item>
<el-form-item :label="$t('请求备注')">{{detail.note}}</el-form-item>
<el-form-item :label="$t('请求内容')">{{detail.body}}</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
import {getOperateLogDetail} from "@/api/ecw/order";
import {parseTime} from '@/utils/ruoyi'
export default {
name: "OperateLogDetail",
filters: {parseTime},
props:{
logId: Number
},
data(){
return {
detail: null
}
},
created() {
this.$nextTick(this.getDetail)
},
methods:{
getDetail(){
getOperateLogDetail(this.logId).then(res => {
this.detail = res.data
})
},
closeDialog(){
this.$emit('close')
}
}
}
</script>
<style scoped>
</style>
<template>
<el-dialog :visible="true" title="撤销拆单" :before-close="close">
<el-form :model="form" label-width="100px">
<!--<el-form-item label="申请理由">
<el-input v-model="form.reason"></el-input>
</el-form-item>-->
<el-form-item label="抄送">
<work-flow v-model="form.ccIds" xmlkey="revoke_split_order"></work-flow>
</el-form-item>
</el-form>
<div slot="footer">
<template v-if="formId" >
<el-button type="primary" @click="toBpmDetail">审核中</el-button>
<el-button type="default" @click="cancelApproval">取消审核</el-button>
</template>
<el-button v-else type="primary" @click="submit" :loading="submitting" :disabled="submitting">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import WorkFlow from "@/components/WorkFlow";
import {cancelSplitRevoke, orderSplitRevoke, splitRevoke} from '@/api/ecw/order'
export default {
name: "SplitRevoke",
components: { WorkFlow},
props:{
orderId: Number
},
data(){
return {
formId: null, // 审批ID
submitting: false,
form: {
ccIds: []
}
}
},
created() {
splitRevoke(this.orderId).then(res =>{
console.log(res)
if(res.data.formId){
this.formId = res.data.formId
}
})
},
methods:{
submit(){
console.log('提交')
if(this.submitting) return
this.submitting = true
orderSplitRevoke({
orderId: this.orderId,
copyUserId: this.form.ccIds
}).then(res => {
this.$message.success(res.msg || '操作成功')
this.close()
}).finally(() =>{
this.submitting = false
})
},
close(){
this.$emit('close')
},
toBpmDetail(){
this.$router.push(`/bpm/process-instance/detail?id=${this.formId}`)
this.close()
},
// 取消审核
cancelApproval(){
this.$prompt(this.$t("请输入取消原因")).then(res => {
return cancelSplitRevoke({orderId: this.orderId, reason: res.value})
}).then(res => {
this.$message.success(res.msg || this.$t('操作成功'))
this.close()
})
}
}
}
</script>
<style scoped>
</style>
<!--拆单审核中的申请信息部分-->
<template>
<div v-if="orders">
<el-table :data="orders">
<el-table-column :label="$t('订单编号')">
<template slot-scope="scope">{{scope.row.orderNo}}</template>
</el-table-column>
<el-table-column :label="$t('唛头')">
<template slot-scope="{row}">{{row.marks}}</template>
</el-table-column>
<el-table-column label="订单状态">
<template slot-scope="{row}">{{row.statusMsg}}</template>
</el-table-column>
<el-table-column :label="$t('填单统计')">
<template slot-scope="{row}">
{{row.costVO.totalNum}}{{$t('')}}<br/>{{row.costVO.totalVolume}}<br/>{{row.costVO.totalWeight}}kg
</template>
</el-table-column>
<el-table-column :label="$t('入仓统计')">
<template slot-scope="{row}">
{{row.sumNum}}{{$t('')}}<br/>{{row.sumVolume}}<br/>{{row.sumWeight}}kg
</template>
</el-table-column>
<el-table-column :label="$t('收费统计')">
<template slot-scope="{row}">
{{row.sumNum}}{{$t('')}}<br/>{{row.wvolume}}<br/>{{row.vweight}}kg
</template>
</el-table-column>
<el-table-column :label="$t('入仓时间')">
<template slot-scope="{row}">
{{row.rucangTime|parseTime}}
</template>
</el-table-column>
<el-table-column :label="$t('运输方式')">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
</template>
</el-table-column>
<el-table-column :label="$t('出货渠道')">
<template slot-scope="{row}">
{{getChannelName(row.channelId)}}
</template>
</el-table-column>
<el-table-column :label="$t('始发仓')">
<template slot-scope="{row}">{{jsonParse(row.departureVO.departure).titleZh}}</template>
</el-table-column>
<el-table-column :label="$t('目的仓')">
<template slot-scope="{row}">
{{jsonParse(row.objectiveVO.objective).titleZh}}
</template>
</el-table-column>
<el-table-column :label="$t('发货人')">
<template slot-scope="{row}">
{{row.consignorVO.name}}
</template>
</el-table-column>
<el-table-column :label="$t('收货人')">
<template slot-scope="{row}">
{{row.consigneeVO.name}}
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {getApproval, getOrder, splitRevokeApply} from '@/api/ecw/order'
import {getMergeListByMergeId} from '@/api/ecw/orderHandle'
import {getChannelListByIds} from '@/api/ecw/channel'
import {parseTime} from '@/utils/ruoyi'
export default {
name: 'SplitRevokeDetail',
filters: {parseTime},
props:{
id: [String, Number]
},
data(){
return {
orders: null,
channels: []
}
},
watch:{
id(){
this.getData()
}
},
computed:{
jsonParse(){
return d => {
return JSON.parse(d)
}
},
getChannelName(){
return id => {
let channel = this.channels.find(item => item.channelId == id)
return channel ? channel.nameZh : '/'
}
}
},
created(){
if(this.id){
this.getData()
}
},
methods:{
getData(){
splitRevokeApply(this.id).then(res => {
this.orders = res.data.childrenOrderList
this.getChannels()
})
},
getChannels(){
let ids = []
this.orders.forEach(order => {
if(order.channelId){
ids.push(order.channelId)
}
})
if(!ids.length) return false
getChannelListByIds({ids: ids.join(',')}).then(res => {
this.channels = res.data
})
}
}
}
</script>
<style scoped lang="scss">
.title{
padding: 10px 0;
span{
font-size: 14px;
font-weight: bold;
}
}
</style>
......@@ -130,6 +130,16 @@
<div>
{{ FeeDetails.details && FeeDetails.details.reason ? FeeDetails.details.reason :''}}
</div>
<p>{{$t('退仓图片')}}</p>
<div>
<el-image
v-for="(item, index) in (FeeDetails.details.imgUrl || '').split(',')"
:key = 'index'
style="width: 100px; height: 100px;margin:10px;"
:src="item"
:preview-src-list="(FeeDetails.details.imgUrl || '').split(',')">
</el-image>
</div>
</div>
<div v-if="type === 4">
<p>{{ $t('申请理由') }}</p>
......
<script>
// 对edit组件复用并更名,防止keepalive缓存数据
import edit from './edit.vue'
edit.name = 'OrderCreate'
edit.name = 'EcwOrderCreate'
export default edit
</script>
......@@ -6,29 +6,40 @@
<template v-if="order.tidanNo"> - {{order.tidanNo}}</template>
<template v-else-if="order.containerNumber"> - {{order.containerNumber}}</template>
</div>
<el-row :gutter="20">
<el-col :span="8" v-if="order.consignorVO">
<el-descriptions class="margin-top" border :title="$t('发货人')" :column="1" :labelStyle="{width:'150px'}">
<el-descriptions-item :label="$t('发货人')">{{order.consignorVO.name}}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人电话')">
<el-row :gutter="24">
<el-col :span="12" v-if="order.consignorVO" >
<el-descriptions class="margin-top" border :title="$t('发货人')" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('中文名称')">{{order.consignorVO.name}}</el-descriptions-item>
<!-- v1.7新增 -->
<el-descriptions-item :label="$t('英文名称')">{{order.consignorVO.nameEn}}</el-descriptions-item>
<el-descriptions-item :label="$t('电话')">
+{{order.consignorVO.countryCode}} {{order.consignorVO.phone}}
</el-descriptions-item>
<el-descriptions-item :label="$t('发货人邮箱')">{{order.consignorVO.email}}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司名称')">
<el-descriptions-item :label="$t('付款人')">
<el-link v-if="order.drawee == 3" @click.native="showDarweeDialog=true" type="primary">{{ $t('自定义') }}</el-link>
<dict-tag v-else :type="DICT_TYPE.DRAWEE" :value="order.drawee"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border :class="showMore?'showInfo':'hiddenInfo'" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('邮箱')">{{order.consignorVO.email}}</el-descriptions-item>
<el-descriptions-item :label="$t('公司中文名称')">
{{order.consignorVO.company}}
</el-descriptions-item>
<!-- v1.7新增 -->
<el-descriptions-item :label="$t('公司英文名称')">
{{order.consignorVO.companyEn}}
</el-descriptions-item>
</el-descriptions>
</el-col>
<el-col :span="16" v-if="order.consigneeVO">
<el-descriptions class="margin-top" border :title="$t('收货人')" :column="2" :labelStyle="{width:'150px'}">
<el-descriptions-item :label="$t('收货人')">{{order.consigneeVO.name}}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人电话')">
<el-col :span="12" v-if="order.consigneeVO" style="position: relative;">
<span style="color:#409EFF;position: absolute;right:40px;top:0;font-size:16px;cursor: pointer;" @click="consigneeChange">{{consigneeText}}</span>
<el-descriptions class="margin-top" border :title="$t('收货人')" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('中文名称')">{{order.consigneeVO.name}}</el-descriptions-item>
<!-- v1.7新增 -->
<el-descriptions-item :label="$t('英文名称')">{{order.consigneeVO.nameEn}}</el-descriptions-item>
<el-descriptions-item :label="$t('电话')">
+{{order.consigneeVO.countryCode}} {{order.consigneeVO.phone}}
</el-descriptions-item>
<el-descriptions-item :label="$t('收货人邮箱')">{{order.consigneeVO.email}}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人公司名称')">
{{order.consigneeVO.company}}
</el-descriptions-item>
<el-descriptions-item :label="$t('收货方式')">
<dict-tag :type="DICT_TYPE.ECW_HARVEST_METHOD" :value="order.consigneeVO.harvestMethod" />
</el-descriptions-item>
......@@ -39,30 +50,33 @@
{{order.consigneeVO.address}}
</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
<el-descriptions class="margin-top" border :column="1" :labelStyle="{width:'150px'}">
<el-descriptions-item :label="$t('付款人')">
<el-link v-if="order.drawee == 3" @click.native="showDarweeDialog=true" type="primary">{{ $t('自定义') }}</el-link>
<dict-tag v-else :type="DICT_TYPE.DRAWEE" :value="order.drawee"></dict-tag>
<el-descriptions border :class="showMore?'showInfo':'hiddenInfo'" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('邮箱')">{{order.consigneeVO.email}}</el-descriptions-item>
<el-descriptions-item :label="$t('公司中文名称')">
{{order.consigneeVO.company}}
</el-descriptions-item>
<!-- v1.7新增 -->
<el-descriptions-item :label="$t('公司英文名称')">
{{order.consigneeVO.companyEn}}
</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
</el-card>
<el-card class="card">
<el-descriptions border :title="$t('物流信息')" :column="2">
<el-descriptions border :title="$t('物流信息')" :column="4" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('始发仓')">{{$l(order.logisticsInfoDto, 'startTitle')}}</el-descriptions-item>
<el-descriptions-item :label="$t('目的仓')">{{$l(order.logisticsInfoDto, 'destTitle')}}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('地址')" :span="2">{{order.logisticsInfoDto.startAddressZh}}</el-descriptions-item> -->
<el-descriptions-item :label="$t('运输方式')" :span="2">
<el-descriptions-item :label="$t('运输方式')" >
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')" :span="2">{{channelName}}</el-descriptions-item>
<el-descriptions-item v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, order.transportId).cssClass == 'channel'":label="$t('出货渠道')" >{{channelName}}</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card">
<el-descriptions class="mr-10" border :title="$t('基础信息')" :column="2">
<el-descriptions class="mr-10" border :title="$t('基础信息')" :column="2" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
<el-descriptions-item :label="$t('送货时间')" v-if="!order.isExternalWarehouse">{{order.deliveryDate}}</el-descriptions-item>
<el-descriptions-item :label="$t('是否控货')">
......@@ -92,6 +106,8 @@
<el-descriptions-item :label="$t('单证报关')">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" />
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="mr-10" border :column="2" :class="showMore?'showInfo':'hiddenInfo'" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('出单方式')">
<dict-tag :type="DICT_TYPE.ECW_SUING_METHOD" :value="order.issuingMethod" />
</el-descriptions-item>
......@@ -127,6 +143,7 @@
{{order.createTime|parseTime}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card">
<el-tabs v-model="activeName">
......@@ -310,6 +327,11 @@
</div>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" prop="note">
<template slot-scope="{row}">
<el-link type="primary" @click="showLogDetailId=row.id">{{$t('详情')}}</el-link>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
......@@ -382,12 +404,16 @@
</el-table-column>
</el-table>
</el-dialog>
<!--日志详情-->
<operate-log-detail v-if="showLogDetailId" :log-id="showLogDetailId" @close="showLogDetailId=null"></operate-log-detail>
</div>
</template>
<script>
import { getOrder, operateLogPage } from '@/api/ecw/order'
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import { getDictDatas, DICT_TYPE, getDictData } from '@/utils/dict';
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
import {getUnitList} from '@/api/ecw/unit'
......@@ -400,9 +426,11 @@ import {getProductBrank} from '@/api/ecw/productBrank'
import { parseTime } from '@/utils/ruoyi';
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {checkPermi} from '@/utils/permission'
import OperateLogDetail from "@/views/ecw/order/components/OprateLogDetail";
export default {
name: "detail",
components: {
OperateLogDetail,
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect
},
filters: {
......@@ -443,6 +471,11 @@ export default {
feeDetail: null, // 费用详情
logsLoading: false, // 日志加载中
logs: [], // 操作日志
activeNames: [],//显示隐藏订单基本信息
showText:this.$t('显示更多'),
showMore:false,
consigneeText:this.$t('更多'),
showLogDetailId: null, // 显示日志详情的ID
}
},
computed:{
......@@ -460,6 +493,9 @@ export default {
})
return map
},
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
objective(){
if(this.order && this.order.objectiveVO){
return JSON.parse(this.order.objectiveVO.objective)
......@@ -517,6 +553,15 @@ export default {
})
return Array.from(new Set(arr)).join(",")
},
//订单信息显示更多
handleChange(val){
this.showText = val.length>0? this.$t('隐藏') : this.$t('显示更多')
},
//订单信息显示更多
consigneeChange(){
this.showMore = !this.showMore;
this.consigneeText = this.showMore? this.$t('隐藏') : this.$t('更多')
},
// 显示费用详情
showFeeDetail(row, type){
this.showFeeDetailDialog = true
......@@ -685,4 +730,17 @@ export default {
.el-icon-arrow-down {
font-size: 12px;
}
.hiddenInfo{
display:none;
}
.showInfo{
display:block;
}
/deep/ .el-collapse-item__header{
color:#409EFF !important;
}
/deep/ .el-collapse-item__wrap{
margin-left:-12px;
border:none !important;
}
</style>
......@@ -22,41 +22,63 @@
</el-form-item>
<div class="form-section">
<el-form-item :label="$t('发货人')" prop="consignorContactsId" >
<el-form-item :label="$t('发货人中文名称')" prop="consignorContactsId" >
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consignorName" placeholder="" :disabled2="inWarehouse"/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignor'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='0'" />
</div>
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('发货人英文名称')" prop="consignorNameEn" >
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consignorNameEn" placeholder="" :disabled2="inWarehouse"/>
</div>
</el-form-item>
<el-form-item :label="$t('发货人电话')" prop="consignorPhone">
<area-code-selector v-model="form.consignorCountryCode" class="w-200 mr-10" disabled />
<el-input v-model="form.consignorPhone" class="w-200" disabled />
</el-form-item>
<el-form-item :label="$t('发货人公司')" prop="consignorPhone">
<el-form-item :label="$t('发货人公司中文名称')" prop="consignorPhone">
<el-input v-model="form.consignorCompany" :disabled2="inWarehouse" />
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('发货人公司英文名称')" prop="consignorPhone">
<el-input v-model="form.consignorCompanyEn" :disabled2="inWarehouse" />
</el-form-item>
<el-form-item label="Email" prop="consignorPhone">
<el-input v-model="form.consignorEmail" :disabled2="inWarehouse" />
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('收货人')" prop="consigneeContactsId">
<el-form-item :label="$t('收货人中文名称')" prop="consigneeContactsId">
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consigneeName" placeholder="" :disabled2="inWarehouse"/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignee'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='1'" />
</div>
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('收货人英文名称')" prop="consigneeNameEn">
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consigneeNameEn" placeholder="" :disabled2="inWarehouse"/>
</div>
</el-form-item>
<el-form-item :label="$t('收货人电话')" prop="consigneePhone">
<area-code-selector v-model="form.consigneeCountryCode" class="w-200 mr-10" disabled/>
<el-input v-model="form.consigneePhone" class="w-200" disabled/>
</el-form-item>
<el-form-item :label="$t('收货人公司')" prop="consigneePhone">
<el-form-item :label="$t('收货人公司中文名称')" prop="consigneePhone">
<el-input v-model="form.consigneeCompany" :disabled2="inWarehouse" />
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('收货人公司英文名称')" prop="consigneePhone">
<el-input v-model="form.consigneeCompanyEn" :disabled2="inWarehouse" />
</el-form-item>
<el-form-item label="Email" prop="consigneePhone">
<el-input v-model="form.consigneeEmail" :disabled2="inWarehouse"/>
</el-form-item>
......@@ -227,7 +249,7 @@
</el-table-column>
<el-table-column :label="$t('商品特性')" width="250px">
<template slot-scope="{row}">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event)" :disabled="!canAddProduct || !productEditable">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event)" :disabled="row.prodAttrArr.indexOf(4)!=-1||!canAddProduct || !productEditable">
<el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{$l(item, 'attrName')}}</el-checkbox>
</el-checkbox-group>
</template>
......@@ -907,21 +929,25 @@ export default {
this.form.packageTypeArr = this.form.packageType ? this.form.packageType.split(',').filter(item => item != '') : []
if(res.data.consignorVO){
this.$set(this.form, 'consignorCompany', res.data.consignorVO.company)
this.$set(this.form, 'consignorCompanyEn', res.data.consignorVO.companyEn)
this.$set(this.form, 'consignorContactsId', res.data.consignorVO.customerContactsId)
this.$set(this.form, 'consignorCountryCode', res.data.consignorVO.countryCode.replace('+', ''))
this.$set(this.form, 'consignorEmail', res.data.consignorVO.email)
this.$set(this.form, 'consignorId', res.data.consignorVO.customerId)
this.$set(this.form, 'consignorName', res.data.consignorVO.name)
this.$set(this.form, 'consignorNameEn', res.data.consignorVO.nameEn)
this.$set(this.form, 'consignorPhone', res.data.consignorVO.phone)
}
if(res.data.consigneeVO){
this.$set(this.form, 'consigneeCompany', res.data.consigneeVO.company)
this.$set(this.form, 'consigneeCompanyEn', res.data.consigneeVO.companyEn)
this.$set(this.form, 'consigneeContactsId', res.data.consigneeVO.customerContactsId)
this.$set(this.form, 'consigneeCountryCode', res.data.consigneeVO.countryCode.replace('+', ''))
this.$set(this.form, 'consigneeEmail', res.data.consigneeVO.email)
this.$set(this.form, 'consigneeId', res.data.consigneeVO.customerId)
this.$set(this.form, 'consigneeName', res.data.consigneeVO.name)
this.$set(this.form, 'consigneeNameEn', res.data.consigneeVO.nameEn)
this.$set(this.form, 'consigneePhone', res.data.consigneeVO.phone)
}
......@@ -973,11 +999,13 @@ export default {
this.contactChooseType = this.quickCreateType == 0 ? 'consignor' : 'consignee'
}
this.$set(this.form, this.contactChooseType + 'Company', contact.company)
this.$set(this.form, this.contactChooseType + 'CompanyEn', contact.companyEn||'')
this.$set(this.form, this.contactChooseType + 'ContactsId', contact.customerContactsId)
this.$set(this.form, this.contactChooseType + 'CountryCode', contact.areaCode.replace('+', ''))
this.$set(this.form, this.contactChooseType + 'Email', contact.email)
this.$set(this.form, this.contactChooseType + 'Id', contact.customerId)
this.$set(this.form, this.contactChooseType + 'Name', contact.contactsName)
this.$set(this.form, this.contactChooseType + 'NameEn', contact.contactsNameEn||'')
this.$set(this.form, this.contactChooseType + 'Phone', contact.phoneNew)
this.contactChooseType = null
this.quickCreateType = null
......@@ -1112,10 +1140,21 @@ export default {
});
}
}
let isInclude = false
this.form.orderItemVOList.map(item => {
//如果商品特性包含不接受货物,不能创建订单或修改订单
if(item.prodAttrArr.indexOf(4)!=-1){
isInclude = true
}
item.prodAttrIds = item.prodAttrArr.join(',')
})
if(isInclude){
return this.$notify({
title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"),
type: 'warning'
});
}
this.transportList.map(item => {
if(item._enabled){
item.lineIds = Array.from(item.lineIdSet).join(',')
......
......@@ -85,6 +85,11 @@
<el-option :label="$t('自有仓')" :value="0"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="">
<el-checkbox style="margin-left:60px" v-model="queryParams.isHaveCustomer" @change="handleQuery">{{$t('无归属订单')}}</el-checkbox>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<!-- <el-button icon="el-icon-refresh" @click="reset">{{ $t('重置') }}</el-button> -->
......@@ -178,7 +183,7 @@
<el-button v-else-if="scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_miss_exception'" v-hasPermi="['ecw:exception:miss']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_goods_exception'" v-hasPermi="['ecw:exception:superfluousGoods']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_goods_exception'" v-hasPermi="['ecw:exception:superfluousGoods']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_in_water_exception'" v-hasPermi="['ecw:exception:inWater']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_damage_exception'" v-hasPermi="['ecw:exception:damaged']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_heavy_cargo_exception'" v-hasPermi="['ecw:exception:heavyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
......@@ -190,6 +195,7 @@
<el-button v-else-if="scope.row.orderExceptionType=='order_bulky_cargo_exception'" v-hasPermi="['ecw:exception:bulkyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -290,6 +296,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
console.log(this.queryParams)
this.queryParams.page = 1
this.getList();
},
......
......@@ -64,7 +64,7 @@
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehouseType" clearable/>
</el-form-item>
<el-form-item :label="$t('客户经理')" >
<user-selector v-model="queryParams.salesmanId" clearable @change="handleQuery"/>
<user-selector manage v-model="queryParams.salesmanId" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"
......@@ -105,7 +105,13 @@
<dict-selector :type="DICT_TYPE.ECW_ORDER_APPROVAL_TYPE" v-model="queryParams.auditType"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('订单类型')" prop="number">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable >
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
......@@ -316,6 +322,12 @@
<el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" v-hasPermi="['ecw:order:split']">{{$t('拆单申请')}}</el-dropdown-item>
</template>
<!--撤销拆单,拆单的子订单,预装前显示,预装后变灰不可点击-->
<template v-if="scope.row.parentOrderId && scope.row.status < 11">
<el-dropdown-item @click.native="splitRevoke(scope.row)" v-hasPermi="['ecw:order:split_revoke']">{{$t('撤销拆单')}}</el-dropdown-item>
</template>
<!-- 合单日志,提货日志 -->
<template v-if="(
scope.row.status > 2
......@@ -453,6 +465,7 @@
<fee-application :order-id="orderId" :currencys="JSON.stringify(currencyList)" :dialog-visible.sync="feeApplicationBol"></fee-application>
<merge-log :order-no="showMergedLogOrderNo" v-if="showMergedLogOrderNo !== null" @close="showMergedLogOrderNo=null" />
<pickup-log v-if="showPickupLogOrderNo" :order-no="showPickupLogOrderNo" @close="showPickupLogOrderNo=null" @delete="getList" />
<SplitRevoke v-if="splitRevokeOrderId" :order-id="splitRevokeOrderId" @close="splitRevokeOrderId=null;getList()"></SplitRevoke>
</div>
</template>
......@@ -462,7 +475,6 @@ 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 { getTradeCityList } from '@/api/ecw/region'
import {
createOrder,
updateOrder,
......@@ -488,7 +500,7 @@ import {
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload
exportUnload, splitCancelApply, orderSplitRevoke
} from "@/api/ecw/order";
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import PrintTag from './components/PrintTag'
......@@ -503,6 +515,7 @@ import MergeLog from '@/views/ecw/order/components/MergeLog'
import PickupLog from './components/PickupLog'
import {getWarehouseList} from '@/api/ecw/warehouse'
import { getCurrencyPage } from "@/api/ecw/currency";
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
export default {
name: "EcwOrderIndex",
components: {
......@@ -511,6 +524,7 @@ export default {
BatchSingleApplication,
MergeLog,
PickupLog,
SplitRevoke,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
},
props: {
......@@ -574,6 +588,8 @@ export default {
},
currencyList:[],
statistics: null ,// 统计数据
splitRevokeOrderId: null, // 撤销拆单的订单ID
};
},
watch:{
......@@ -637,7 +653,7 @@ export default {
}
},
activated(){
this.handleQuery()
this.getList()
},
created() {
this.getTransportFromRoute()
......@@ -649,6 +665,10 @@ export default {
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
},
methods: {
// 取消拆单申请
splitRevoke(row){
this.splitRevokeOrderId = row.orderId
},
// 获得导出函数
getExportFunc(){
let func = orderExportSearch
......@@ -741,10 +761,10 @@ export default {
return this.$alert('不支持此操作')
}
this.$confirm(action.confirm)
.then(res => {
.then(() => {
return action.callable(orderId)
})
.then(res => {
.then(() => {
this.getList()
})
},
......@@ -841,14 +861,13 @@ export default {
specialRendering(val){
if(val !== undefined){
let i = val.split(',')
let special = this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => {
return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => {
return i.indexOf(e.value) > -1
})
return special
}
},
deleteSpecial(id,orderId){
this.$confirm(this.$t('确定删除此特需么?')).then(res => {
this.$confirm(this.$t('确定删除此特需么?')).then(() => {
return orderSpecialNeed({orderId:orderId,advanceType:id})
}).then(() => {
this.getList()
......
......@@ -54,7 +54,7 @@
</el-table-column>
<el-table-column :label="$t('状态')" prop="status" >
<template v-slot:default="scope">
<dict-tag :value="scope.row.orderBackVO.status" :type="DICT_TYPE.ORDER_STATUS" ></dict-tag>
{{scope.row.orderBackVO.statusMsg}}
</template>
</el-table-column>
<el-table-column :label="$t('操作人')">
......
......@@ -42,10 +42,7 @@
{{parseTime(row.rucangTime)}}
</template>
</el-table-column>
<el-table-column :label="$t('状态')">
<template v-slot:default="scope">
<dict-tag :value="scope.row.status" :type="DICT_TYPE.ORDER_STATUS"></dict-tag>
</template>
<el-table-column :label="$t('状态')" prop="statusMsg" >
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot:default="scope">
......
......@@ -110,7 +110,25 @@
</el-table-column>
<el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag>
<!-- <el-button v-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType!='order_no_quote_exception'" v-hasPermi="['ecw:exception:seeExceptionInfo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button> -->
<el-button v-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_miss_exception'" v-hasPermi="['ecw:exception:miss']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_superfluous_goods_exception'" v-hasPermi="['ecw:exception:superfluousGoods']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_in_water_exception'" v-hasPermi="['ecw:exception:inWater']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_damage_exception'" v-hasPermi="['ecw:exception:damaged']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_heavy_cargo_exception'" v-hasPermi="['ecw:exception:heavyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_doc_exception'" v-hasPermi="['ecw:exception:doc']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_consignor_exception'" v-hasPermi="['ecw:exception:consignor']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_other_exception'" v-hasPermi="['ecw:exception:other']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_cod_exception'" v-hasPermi="['ecw:exception:cod']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_bulky_cargo_exception'" v-hasPermi="['ecw:exception:bulkyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-tag style="margin-left:10px" v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag>
<el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
......@@ -127,6 +145,7 @@
<el-button v-else-if="scope.row.orderExceptionType=='order_bulky_cargo_exception'" v-hasPermi="['ecw:exception:bulkyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -11,7 +11,7 @@
{{orderData.orderNo || ''}}
</el-form-item>
</el-row>
<div v-if="shopData">
<div v-if="shopData&&orderExceptionData.orderExceptionType!='goods_add_exception'">
<el-row>
<el-form-item :label="$t('产品名称')+':'" >
{{shopData.prodTitleZh || ''}}
......@@ -89,14 +89,14 @@
<!-- {{orderExceptionData.orderExceptionDescVO?orderExceptionData.orderExceptionDescVO.descZh:''}} -->
{{$l(orderExceptionData.orderExceptionDescVO, 'desc')}}
</el-form-item>
<el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">{{ $t('新增收款单') }}</el-button>
<el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'&&orderExceptionData.orderExceptionStatus!=2" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">{{ $t('新增收款单') }}</el-button>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionDetails">
<el-form-item :label="$t('详细内容')+':'">
<span>{{orderExceptionData.orderExceptionDetails}}</span>
</el-form-item>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType!='goods_add_exception'">
<el-form-item :label="$t('收费参数')+':'">
<span>{{orderData.sumNum||0}}{{$t('')}} {{orderData.wvolume||0}}m³ {{orderData.vweight||0}}Kg {{orderData.sumQuantity||0}}{{$t('')}}</span>
</el-form-item>
......@@ -303,7 +303,7 @@
</el-col>
</el-row>
<el-row :span="12" v-if="orderExceptionData.orderExceptionType=='order_doc_exception'">
<el-form-item :label="$t('报关资料')+':'" size="medium" :require="true">
<el-form-item v-if="orderExceptionData.orderExceptionStatus!=2" :label="$t('报关资料')+':'" size="medium" :require="true">
<file-upload v-model="handlerParams.fileList" :value="orderExceptionData.orderExceptionAttr" ></file-upload>
</el-form-item>
</el-row>
......@@ -317,7 +317,7 @@
<!--预付异常的备选需要根据接口数据过滤-->
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType=='not_customer_service_exception'">
<el-form-item :label="$t('处理结果')+':'" required>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')">
<el-option :disabled="orderFee && orderFee.result && orderFee.result.indexOf(dict.value) ==-1" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
</template>
......@@ -326,16 +326,61 @@
</el-row>
<el-row v-else-if="orderExceptionData.orderExceptionType!='order_miss_exception'&&orderExceptionData.orderExceptionType!='order_superfluous_goods_exception'&&orderExceptionData.orderExceptionType!='order_in_water_exception'&&orderExceptionData.orderExceptionType!='order_damage_exception'">
<el-form-item :label="$t('处理结果')+':'" required>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable @change="handlerResultChange" :disabled="orderExceptionData.orderExceptionStatus==2">
<template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')">
<el-option :disabled="dict.value=='pending'" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
</template>
</el-select>
</el-form-item>
</el-row>
<!-- v1.7新增商品异常 -->
<div v-if="shopData&&orderExceptionData.orderExceptionType=='goods_add_exception'&&handlerParams.orderExceptionHandlerResult=='goods_exists'">
<el-row :gutter="24">
<el-col :span="6">
<el-form-item :label="$t('新增品名中文')+':'" >
{{shopData.prodTitleZh || ''}}
</el-form-item>
</el-col>
<el-form-item label="中文品名"
:rules="{
required: true, message: $t('请选择产品'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<product-selector
:status="0"
:disabled="orderExceptionData.orderExceptionStatus==2"
@hook:mounted="onTableMounted"
v-model="productId2"
@change = "onProductChange($event)"
/>
</el-form-item>
</el-row>
<el-row :gutter="24">
<el-col :span="6">
<el-form-item :label="$t('新增品名英文')+':'">
{{shopData.prodTitleEn || ''}}
</el-form-item>
</el-col>
<el-form-item label="英文品名"
:rules="{
required: true, message: $t('请选择产品'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<product-selector
lang="En"
:status="0"
v-model="productId1"
:disabled="orderExceptionData.orderExceptionStatus==2"
@change = "onProductChange($event)"
/>
</el-form-item>
</el-row>
</div>
<el-row v-if="orderExceptionData.orderExceptionType=='not_customer_service_exception'&&handlerParams.orderExceptionHandlerResult=='allocate'">
<el-form-item :label="$t('移交客户经理')+':'" required>
<el-select v-model="handlerParams.customerService" :placeholder="$t('请选择客户经理')" clearable>
<el-select v-model="handlerParams.customerService" :placeholder="$t('请选择客户经理')" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/>
</el-select>
......@@ -344,7 +389,7 @@
<!-- 代收货款 时需要填写代收金额 -->
<el-row v-if="handlerParams.orderExceptionHandlerResult == 'cod'" >
<el-form-item :label="$t('代收金额')+':'" size="medium" required>
<el-input class="w-100" type="text" v-model="handlerParams.amount" />
<el-input class="w-100" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2" />
<!-- <el-select v-model="handlerParams.currency" clearable>
<el-option v-for="dict in getDictDatas('shipping_price_unit') "
:key="dict.value" :label="dict.label" :value="dict.value"/>
......@@ -355,23 +400,23 @@
<el-row :span="8" v-if="orderExceptionData.orderExceptionType=='order_pick_up_exception'&&handlerParams.orderExceptionHandlerResult=='cost_required'">
<el-form-item :label="$t('送货费用')+':'" size="medium">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable>
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2"/>
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
</el-row>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType!='not_customer_service_exception'">
<el-row :span="8" v-if="orderExceptionData.orderExceptionType!='not_customer_service_exception'&&orderExceptionData.orderExceptionType!='goods_add_exception'">
<el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" :disabled="orderExceptionData.orderExceptionStatus==2" />
</el-form-item>
</el-row>
<div v-if="orderExceptionData.orderExceptionType=='order_miss_exception'||orderExceptionData.orderExceptionType=='order_superfluous_goods_exception'||orderExceptionData.orderExceptionType=='order_in_water_exception'||orderExceptionData.orderExceptionType=='order_damage_exception'">
<el-row >
<el-form-item :label="$t('状态')+':'">
<el-radio-group v-model="handlerParams.orderExceptionStatus" @change="changeExceptionStatus">
<el-radio-group v-model="handlerParams.orderExceptionStatus" @change="changeExceptionStatus" :disabled="orderExceptionData.orderExceptionStatus==2">
<el-radio label="1">{{$t('处理中')}}</el-radio>
<el-radio label="2">{{$t('已处理')}}</el-radio>
</el-radio-group>
......@@ -379,7 +424,7 @@
</el-row>
<el-row>
<el-form-item :label="$t('处理结果')+':'" required v-if="handlerParams.orderExceptionStatus==2">
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_don_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
......@@ -387,8 +432,8 @@
</el-row>
<el-row >
<el-form-item :label="$t('赔付金额')+':'" size="medium" required v-if="handlerParams.orderExceptionStatus==2">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable>
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
......@@ -396,7 +441,7 @@
</el-row>
<el-row>
<el-form-item :label="$t('查明原因')+':'" required v-if="handlerParams.orderExceptionStatus==1">
<el-select v-model="handlerParams.orderExceptionHandlerResult" clearable>
<el-select v-model="handlerParams.orderExceptionHandlerResult" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
......@@ -406,7 +451,7 @@
</el-form>
</el-card>
<!-- 只有不需要预付才需要审核 -->
<template v-if="showWorkFlow">
<template v-if="showWorkFlow&&orderExceptionData.orderExceptionStatus!=2">
<div class="page-title">{{$t('审批流程')}}</div>
<work-flow xmlkey="commission_config" v-model="handlerParams.ccIds" />
</template>
......@@ -420,6 +465,9 @@
<el-button plain type="primary" @click="cancelAudit">{{$t('取消审核')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</template>
<template v-else-if="orderExceptionData.orderExceptionStatus==2">
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
......@@ -437,17 +485,18 @@
import {getOrder} from '@/api/ecw/order'
import FilePreview from '@/components/FilePreview'
import { getCurrencyList } from '@/api/ecw/currency'
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById} from "@/api/ecw/orderException"
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById,getOrderExcptionResult} from "@/api/ecw/orderException"
import {getFirstReceivableListByOrderId} from '@/api/ecw/financial'
import WorkFlow from '@/components/WorkFlow'
import {listByIds} from '@/api/ecw/region'
import {listServiceUser} from "@/api/system/user";
import {cancelProcessInstance} from '@/api/bpm/processInstance'
import {getCustomer} from '@/api/ecw/customer'
import ProductSelector from '@/components/ProductSelector'
export default {
name: "PrepayDeal",
components: {
FileUpload, WorkFlow,FilePreview
FileUpload, WorkFlow,FilePreview,ProductSelector
},
data() {
return {
......@@ -481,6 +530,8 @@
region:'',
customerData:{},//归属客户
customerServiceList:[],//客户经理
productId1:null,
productId2:null
};
},
created() {
......@@ -528,11 +579,19 @@
},
shopData(){
if(this.orderExceptionData.orderItemId && this.orderData && this.orderData.orderItemVOList){
if(this.orderExceptionData.orderExceptionType=='goods_add_exception'&&!this.handlerParams.productId){
this.handlerParams.productId = this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId).prodId
// this.productId1 = this.handlerParams.productId
// this.productId2 = this.handlerParams.productId
}
return this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId)
}
}
},
methods: {
onTableMounted(e){
// console.warn('onTableMounted', e)
},
/** 查询列表 */
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
......@@ -547,6 +606,7 @@
// that.orderExceptionData.orderExceptionType = 'order_other_exception'
// that.orderExceptionData.orderExceptionType = 'order_miss_exception'
// that.orderExceptionData.orderExceptionType = 'not_customer_service_exception'
// that.orderExceptionData.orderExceptionType = 'goods_add_exception'
that.loading = false;
that.orderId = response.data.orderId
that.getOrderData()
......@@ -561,6 +621,9 @@
that.getOrderFeeByIdData()
that.getPreExceptionData()
}
if(that.orderExceptionData.orderExceptionStatus==2){
that.getOrderExcptionResult()
}
});
},
......@@ -580,10 +643,33 @@
this.customerData = res.data
})
},
//获取异常结果
getOrderExcptionResult(){
getOrderExcptionResult({orderExceptionId:this.orderExceptionId}).then(res=>{
this.handlerParams = Object.assign(this.handlerParams,res.data.list[0])
if(!this.orderExceptionData.handlerTime){
this.orderExceptionData.handlerTime = this.handlerParams.handlerTime
}
if(this.handlerParams.handlerRemark){
this.$set(this.handlerParams,'orderExceptionHandlerRemark', this.handlerParams.handlerRemark)
}
if(this.handlerParams.handlerResult){
this.$set(this.handlerParams,'orderExceptionHandlerResult', this.handlerParams.handlerResult)
}
if(this.handlerParams.productId){
this.productId2 = this.productId1 = this.handlerParams.productId
}
})
},
getOrderFeeByIdData(){
getOrderFeeById({id:this.orderId}).then(response => {
this.orderFee = response.data
this.handlerParams.orderExceptionHandlerResult = this.orderFee.result[0]
if(this.orderExceptionData.orderExceptionStatus==2){
this.getOrderExcptionResult()
}
})
},
getPreExceptionData(){
......@@ -612,6 +698,13 @@
}
return this.$t('')
},
//新增异常处理结果切换
handlerResultChange(){
// if(this.orderExceptionData.orderExceptionType=='goods_add_exception'){
// this.productId1 = this.handlerParams.productId
// this.productId2 = this.handlerParams.productId
// }
},
submitForm(){
if(!this.handlerParams.orderExceptionHandlerResult){
this.$modal.msgError(this.$t('请选择处理结果'));
......@@ -624,7 +717,18 @@
// }
this.handlerParams.files = Array.isArray(this.handlerParams.fileList) ? this.handlerParams.fileList.join(',') : this.handlerParams.fileList
}
if(this.orderExceptionData.orderExceptionType=='goods_add_exception'&&this.handlerParams.orderExceptionHandlerResult=='goods_absent'){
this.$redirect('/product/product-list?prodId=' + this.handlerParams.productId)
return
}
if(this.orderExceptionData.orderExceptionType=='goods_add_exception'&&this.handlerParams.orderExceptionHandlerResult=='goods_exists'){
if(this.productId1){
this.handlerParams.productId = this.productId1
}else{
this.$modal.msgError(this.$t('请选择产品'));
return
}
}
handlerExceptionByExceptionId(this.handlerParams).then(res=>{
this.$modal.msgSuccess(this.$t('提交成功'));
this.$redirect('/order/pending?id=' + this.orderData.orderId)
......@@ -688,6 +792,15 @@
onClickClosePreview(val){
this.IsPreview = val // 由组件内部传入的关闭数据赋值关闭
},
onProductChange(product){
if(!product){
this.productId1 = null
this.productId2 = null
return false
}
this.productId1 = product.id
this.productId2 = product.id
},
}
};
</script>
......@@ -731,4 +844,10 @@
.filelist span{
color: #1E98D7;
}
.red{
color: red;
}
.el-select{
width:300px !important;
}
</style>
......@@ -96,7 +96,8 @@
</el-row>
<el-row v-if="scope.row.warehouseInInfoVO">
<span>{{$t('品牌')}}
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" />
<template v-if="scope.row.brandName">{{scope.row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" />
</span>
<span style="margin-left: 10px;">{{$t('箱数')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.cartonsNum}}</span>
<span style="margin-left: 10px;">{{$t('体积')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.volume}}m³</span>
......@@ -137,8 +138,8 @@
<div>
<el-button v-if="index==0" disabled type="primary" @click="addShop(index)">{{$t('放入')}}</el-button>
<el-button v-if="index!=0" type="primary" @click="addShop(index)">{{$t('放入')}}</el-button>
<el-button v-if="index==0" disabled type="primary" plain @click="deleteSplit(item.id)">{{$t('删除')}}</el-button>
<el-button v-if="index!=0" type="primary" plain @click="deleteSplit(item.id)">{{$t('删除')}}</el-button>
<!--<el-button v-if="index==0" disabled type="primary" plain @click="deleteSplit(item.id)">{{$t('删除')}}</el-button>-->
<el-button :disabled="index < splitData.length - 1" type="primary" plain @click="deleteSplit(item.id)">{{$t('删除')}}</el-button>
</div>
</div>
<el-table v-if="item.orderSplitItemBackVOList" border :data="item.orderSplitItemBackVOList">
......@@ -151,17 +152,36 @@
<el-table-column :label="$t('英文名')" align="center" prop="prodTitleEn" />
<el-table-column :label="$t('品牌')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
<template v-if="scope.row.brandName">{{scope.row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('入仓体积')" align="center" >
<template slot-scope="scope">
<el-input v-model="scope.row.volume" @change="updateField(scope.row, 'volume')" size="mini" :disabled="index === 0">
<span slot="append"></span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('收费体积')" align="center" >
<template slot-scope="scope">
<el-input v-model="scope.row.chargeVolume" @change="updateField(scope.row, 'chargeVolume')" size="mini" :disabled="index === 0">
<span slot="append"></span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('体积')" align="center" >
<el-table-column :label="$t('入仓重量')" align="center">
<template slot-scope="scope">
<span>{{scope.row.volume}}</span>
<el-input v-model="scope.row.weight" @change="updateField(scope.row, 'weight')" size="mini" :disabled="index === 0">
<span slot="append">kg</span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('重量')" align="center">
<el-table-column :label="$t('收费重量')" align="center">
<template slot-scope="scope">
<span>{{scope.row.weight}}kg</span>
<el-input v-model="scope.row.chargeWeight" @change="updateField(scope.row, 'chargeWeight')" size="mini" :disabled="index === 0">
<span slot="append">kg</span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center">
......@@ -213,32 +233,51 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="$t('放入品名')" :visible.sync="shopOpen" width="500px" append-to-body>
<el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="120px">
<el-row>
<el-form-item :label="$t('中文品名')+':'" v-if="splitData.length>0">
<el-form-item :label="$t('中文品名')" v-if="splitData.length>0">
<el-select v-model="shopForm.pordid" :placeholder="$t('请选择中文品名')" @change="changeProdTitleZh" clearable>
<el-option v-for="item in splitData[0].orderSplitItemBackVOList" :label="item.prodTitleZh" :value="item.id" :key="item.prodTitleZh" ></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('英文品名')+':'" v-if="splitData.length>0">
<el-form-item :label="$t('英文品名')" v-if="splitData.length>0">
<el-select v-model="shopForm.pordid" :placeholder="$t('请选择英文品名')" @change="changeProdTitleZh" clearable>
<el-option v-for="item in splitData[0].orderSplitItemBackVOList" :label="item.prodTitleEn" :value="item.id" :key="item.prodTitleEn" ></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('剩余箱数')+':'">
{{shopForm.sum||0}}
<el-form-item :label2="$t('剩余箱数')" v-if="mainOrderItem.orderItemId">
{{$t('剩余箱数')}}{{ shopForm.sum || 0 }}<!--,可放入箱数:{{ mainOrderItem.num - 1 }}-->
</el-form-item>
<el-form-item :label="$t('放入箱数')">
<el-input-number v-model="shopForm.num" @change="numChange" controls-position="right" :min="1" :max="mainOrderItem.num"></el-input-number>
</el-form-item>
<el-form-item v-if="quantityshow" :label="$t('放入数量')+'('+$t('个')+')'">
<el-input-number v-model="shopForm.quantity" controls-position="right" :min="1" :max="mainOrderItem.quantity-1" :placeholder="$t('最多可放入{quantity}', {
quantity: mainOrderItem.quantity-1
})"></el-input-number>
</el-form-item>
<el-form-item :label="$t('放入箱数')+':'">
<el-input-number v-model="shopForm.num" @change="numChange" controls-position="right" :min="1" :max="shopForm.sum"></el-input-number>
<el-form-item v-if="mainOrderItem.orderItemId">
<div>{{ $t('剩余入仓方数') }}:{{ mainOrderItem.volume || 0 }}m³<!--,{{$t('可放入仓方数')}}:{{ (mainOrderItem.volume - 0.01).toFixed(2) }}m³--></div>
<div>{{$t('剩余收费方数')}}:{{ mainOrderItem.chargeVolume || 0 }}m³<!--,{{$t('可放入收费方数')}}:{{ (mainOrderItem.chargeVolume - 0.01).toFixed(2) }}m³--></div>
</el-form-item>
<el-form-item v-if="quantityshow" :label="$t('放入数量')+'('+$t('个')+')'+':'">
<el-input-number v-model="shopForm.quantity" controls-position="right" :min="1" :max="quantitySum"></el-input-number>
<el-form-item :label="$t('入仓方数')">
<el-input-number v-model="shopForm.volume" controls-position="right" :min="0" :max="mainOrderItem.volume"></el-input-number>
</el-form-item>
<el-form-item :label="$t('收费方数')">
<el-input-number v-model="shopForm.chargeVolume" controls-position="right" :min="0" :max="mainOrderItem.chargeVolume"></el-input-number>
</el-form-item>
<el-form-item v-if="mainOrderItem.orderItemId">
<div>{{$t('剩余入仓重量')}}:{{ mainOrderItem.weight || 0 }}kg<!--,{{$t('可放入重量')}}:{{ mainOrderItem.weight }}kg--></div>
<div>{{$t('剩余收费重量')}}:{{ mainOrderItem.chargeWeight || 0 }}kg<!--,{{$t('可放入收费重量')}}:{{ mainOrderItem.chargeWeight }}kg--></div>
</el-form-item>
<el-form-item :label="$t('入仓重量')">
<el-input-number v-model="shopForm.weight" controls-position="right" :min="0" :max="mainOrderItem.weight"></el-input-number>
</el-form-item>
<el-form-item :label="$t('收费重量')">
<el-input-number v-model="shopForm.chargeWeight" controls-position="right" :min="0" :max="mainOrderItem.chargeWeight"></el-input-number>
</el-form-item>
<el-form-item :label="$t('备注信息')+':'">
<el-input v-model="shopForm.remark"></el-input>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="shopAdd">{{$t('确定')}}</el-button>
......@@ -265,12 +304,21 @@
<script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import {getSplitList,splitApply,createSplit,cancelApply,createSplitItem,deleteSplitItem,deleteSplit,quantitycheck} from "@/api/ecw/orderHandle"
import {getWarehouseList} from '@/api/ecw/warehouse'
import {
getSplitList,
splitApply,
createSplit,
cancelApply,
createSplitItem,
deleteSplitItem,
deleteSplit,
deleteAllSplit
} from "@/api/ecw/orderHandle"
import {getWarehouseList, quantityRequired} from '@/api/ecw/warehouse'
import {getChannelList} from '@/api/ecw/channel'
import WorkFlow from '@/components/WorkFlow'
import {getOrder} from '@/api/ecw/order'
import {getOrder, splitItemUpdate} from '@/api/ecw/order'
import Decimal from 'decimal.js'
export default {
name: "SplitApply",
......@@ -322,7 +370,7 @@ export default {
quantitySum:0
};
},
created() {
async created() {
this.getChannel()
getWarehouseList().then(res => {
this.tradeCityList = res.data
......@@ -331,8 +379,22 @@ export default {
if (this.$route.query.orderId) {
this.queryParams.orderId = this.$route.query.orderId
}
Promise.all([this.getList(), this.getOrder()]).then(res => {
console.log("拆单数据", this.splitData, this.splitData.length)
if(this.orderData.inWarehouseState != 207 && this.splitData.length){
// 2023-05-20确认不需要询问,直接重置
deleteAllSplit(this.queryParams.orderId).then(res => {
this.getList()
})
/*this.$confirm(this.$t('已有拆单数据,是否要重置?')).then(res => {
return deleteAllSplit(this.queryParams.orderId)
}).then(res => {
this.getList()
this.getOrder()
this.$message.success("重置成功")
})*/
}
})
},
watch: {
//监听table这个对象
......@@ -354,6 +416,12 @@ export default {
});
},
},
// 关闭放入弹层的时候清理弹层表单内容
shopOpen(show){
if(!show){
this.shopForm = {}
}
}
},
computed:{
getDictData(){
......@@ -361,9 +429,32 @@ export default {
},
getDictDatas(){
return getDictDatas
},
// 放入品名试选择的商品项
orderItem(){
if(!this.orderData || !this.shopForm.orderItemId) return {}
return this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId) || {}
},
// 主单数据,也就是拆分剩余的数据,可用来限制拆单放入的最大值
mainOrderItem(){
if(!this.orderItem.orderItemId || !this.splitData.length || !this.splitData[0].orderSplitItemBackVOList) return {}
return this.splitData[0].orderSplitItemBackVOList.find(item => item.orderItemId == this.orderItem.orderItemId) || {}
}
},
methods: {
/*检查并提交字段(体积,重量)修改*/
updateField(row, field){
let val = parseFloat(row[field])
if(!val || val < 0){
this.$message.error(this.$t('数据无效'))
return this.getList()
}
splitItemUpdate(row).then(() => {
this.$message.success(this.$t('修改成功'))
}).finally(() => {
this.getList()
})
},
checkCode(data){
if(data.indexOf('+')==-1){
return '+'+data
......@@ -382,7 +473,7 @@ export default {
},
getOrder(){
this.loading = true;
getOrder(this.queryParams.orderId).then(response => {
return getOrder(this.queryParams.orderId).then(response => {
this.orderData = response.data
this.query.destWarehouseId = response.data.logisticsInfoDto.startWarehouseId
this.loading = false
......@@ -393,7 +484,7 @@ export default {
getList() {
this.loading = true;
// 执行查询
getSplitList(this.queryParams).then(response => {
return getSplitList(this.queryParams).then(response => {
this.splitData = response.data.orderSplitBackVOList
this.orderApprovalBackVO = response.data
......@@ -452,6 +543,44 @@ export default {
this.$modal.msgError(this.$t("请先新建拆单"))
return
}
// 判断体积和重量,子单和必须等于父单
// 1.将拆单中的商品项数据汇总保存到orderItem
this.splitData.forEach(item => {
item.orderSplitItemBackVOList.forEach(splitItem => {
let orderItem = this.orderData.orderItemVOList.find(orderItem => orderItem.orderItemId == splitItem.orderItemId)
if(!orderItem.splitSum){
orderItem.splitSum = {
volume: new Decimal(splitItem.volume || 0),
weight: new Decimal(splitItem.weight|| 0)
}
}else{
orderItem.splitSum.volume = orderItem.splitSum.volume.plus(splitItem.volume || 0)
orderItem.splitSum.weight = orderItem.splitSum.weight.plus(splitItem.weight || 0)
}
})
})
// 2. 遍历商品项 对比数据是否符合
let prods = [] // 数据不符合要求的商品
// 挂在到window测试
window.orderData = this.orderData
this.orderData.orderItemVOList.forEach(item => {
// 未入仓的不检查
if(!item.warehouseInInfoVO){
return
}
// 没拆单的不检查
if(!item.splitSum){
// prods.push(this.$l(item, 'prodTitle'))
return
}
if(item.splitSum.volume.toNumber() != item.warehouseInInfoVO.volume || item.splitSum.weight.toNumber() != item.warehouseInInfoVO.weight){
prods.push(this.$l(item, 'prodTitle'))
}
})
if(prods.length){
return this.$alert( this.$t("{prods}等商品拆单总数据跟主单不匹配", {prods: prods.join(',')}))
}
// if(this.selectedUsers.length==0){
// this.$modal.msgError("请选择抄送人")
// return
......@@ -468,7 +597,6 @@ export default {
addShop(index){
this.splitItemIndex = index
this.shopOpen = true
},
addSplit(){
this.form.transportId = this.orderData.transportId
......@@ -490,21 +618,28 @@ export default {
this.shopForm.prodTitleEn = list[0].prodTitleEn
this.shopForm.prodTitleZh = list[0].prodTitleZh
var orderItemData = this.orderData.orderItemVOList.find(item=>item.orderItemId==this.shopForm.orderItemId)
var params = {
/*var params = {
'seaFreightVolume':orderItemData.seaFreightVolume,
'clearanceFreightVolume':orderItemData.clearanceFreightVolume
}
console.log(orderItemData)
this.numcheck(params)
console.log(orderItemData)*/
this.numcheck()
},
numcheck(params){
quantitycheck(params).then(res=>{
numcheck(){
quantityRequired(this.orderData.lineId).then(res=>{
this.quantityshow = res.data
})
},
// 输入方数箱数后,按照平均值计算数量和体积重量数据
numChange(){
var sum = parseInt(this.quantitySum/this.shopForm.num)
this.$set(this.shopForm,'quantity',sum)
/*var sum = parseInt(this.quantitySum/this.shopForm.num)
this.$set(this.shopForm,'quantity',sum)*/
let rate = this.shopForm.num/this.mainOrderItem.num
this.$set(this.shopForm, 'quantity', Math.ceil(this.mainOrderItem.quantity * rate))
this.$set(this.shopForm, 'volume', (this.mainOrderItem.volume * rate).toFixed(2))
this.$set(this.shopForm, 'chargeVolume', (this.mainOrderItem.chargeVolume * rate).toFixed(2))
this.$set(this.shopForm, 'weight', (this.mainOrderItem.weight * rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (this.mainOrderItem.chargeWeight * rate).toFixed(2))
},
changeProdTitleEn(){
var list = []
......@@ -552,7 +687,11 @@ export default {
num:this.shopForm.num,
orderItemId:this.shopForm.orderItemId,
orderSplitId:this.splitData[this.splitItemIndex].id,
remark:this.shopForm.remark
remark:this.shopForm.remark,
volume: this.shopForm.volume,
chargeVolume: this.shopForm.chargeVolume,
weight: this.shopForm.weight,
chargeWeight: this.shopForm.chargeWeight
}
createSplitItem(params).then(res=>{
this.$message.success(this.$t("放入成功"));
......
......@@ -8,15 +8,17 @@
<div class="title">{{$t('新增订单生成成功')}}</div>
<div class="line">{{$t('订单号')}}{{order.orderNo}}</div>
<div class="line">{{$t('运输方式')}}<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" /></div>
<div class="line">{{$t('路线')}}{{order.logisticsInfoDto.startTitleZh}} >> {{order.logisticsInfoDto.destTitleZh}}</div>
<div class="line">{{$t('路线')}}{{$l(order.logisticsInfoDto, 'startTitle')}} >> {{$l(order.logisticsInfoDto, 'destTitle')}}</div>
<div class="line">{{$t('商品列表')}}
<span v-for="(item, index) in order.orderItemVOList" :key="index">
{{item.prodTitleZh}}
{{$l(item, 'prodTitle')}}
<template v-if="index < order.orderItemVOList.length - 1">{{ $t('') }}</template>
</span>
</div>
<div class="line">{{$t('仓库地址')}}:{{order.logisticsInfoDto.startAddressZh}}</div>
<div class="line">{{$t('仓库地址')}}:{{$l(order.logisticsInfoDto, 'startAddress')}}</div>
<div class="line">{{$t('仓库电话')}}: {{order.logisticsInfoDto.startTell}}</div>
<!-- v1.7新增 -->
<div class="line">{{$t('为保证入仓数据准确性,入仓请带上一份装箱单(品名,件数,毛重,尺寸方数,是否有牌)')}}</div>
<div class="line"></div>
<div class="line">{{$t('您的订单已提交,谢谢您选择捷道物流!')}}</div>
</el-col>
......
......@@ -12,12 +12,15 @@
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<product-selector v-if="!order.parentOrderId && !isAdd" v-model="form.prodId" @change="onProductChange"/>
<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>
</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"/>
<product-selector v-if="!order.parentOrderId && !isAdd" lang="En" v-model="form.prodId" @change="onProductChange" determined/>
<span v-else>{{ warehousing.prodTitleEn }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
......@@ -54,9 +57,20 @@
<span v-else>{{ 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>
</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 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>
......@@ -171,6 +185,19 @@
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
v-if="$index >= protectRowCount"
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
......@@ -185,6 +212,7 @@
<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>
......@@ -223,9 +251,20 @@
</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"></dict-selector>
<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>
......@@ -352,6 +391,18 @@
: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>
......@@ -380,6 +431,35 @@
</template>
</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>
......@@ -391,6 +471,9 @@ 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 {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType"
import {addProduct} from "@/api/ecw/product"
export default {
name: "Warehouse",
......@@ -441,6 +524,11 @@ export default {
}
},
mounted() {
this.getAttrList()
this.getTypeList()
},
computed: {
isAdd() {
return this.$route.path === "/order/warehousing-add"
......@@ -529,7 +617,7 @@ export default {
inTime: undefined,
material: undefined,
orderItemId: undefined,
prodAttrIds: undefined,
prodAttrIds: [],
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
......@@ -547,7 +635,7 @@ export default {
inTime: undefined,
material: undefined,
orderItemId: undefined,
prodAttrIds: undefined,
prodAttrIds: [],
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
......@@ -581,7 +669,26 @@ export default {
formId: '',
// 追加时被保护的行数
protectRowCount: -1
protectRowCount: -1,
// 添加商品弹窗
isShowProduct: false,
productForm: {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
},
productRules: {
typeId: [{ required: true, message: this.$t("商品类型不能为空"), trigger: "change" }],
// attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }],
titleZh: [{ required: true, message: this.$t("中文标题不能为空"), trigger: "blur" }],
titleEn: [{ required: true, message: this.$t("英文标题不能为空"), trigger: "blur" }],
},
//类型列表
typeList: [],
// 特性列表
attrList: []
}
},
......@@ -598,7 +705,7 @@ export default {
this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderItemId
this.form.orderNo = this.warehousing.orderNo
this.form.prodAttrIds = this.warehousing.prodAttrIds
this.form.prodAttrIds = this.warehousing.prodAttrIds?.split(',').map(e => +e) || []
this.form.prodId = this.warehousing.prodId
this.form.prodTitleEn = this.warehousing.prodTitleEn
this.form.prodTitleZh = this.warehousing.prodTitleZh
......@@ -653,6 +760,13 @@ export default {
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) {
......@@ -664,6 +778,7 @@ export default {
orderId: this.warehousing.orderId,
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => {
return {
...e,
......@@ -682,6 +797,13 @@ export default {
})
})
} else {
if (this.form.prodAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"),
type: 'warning'
})
}
this.$refs['form'].validate(valid => {
this.$refs['tableForm'].validate(valid1 => {
if (!valid || !valid1) {
......@@ -699,6 +821,7 @@ export default {
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,
......@@ -724,6 +847,7 @@ export default {
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form.table.map(e => {
return {
...e,
......@@ -762,11 +886,13 @@ export default {
this.form.prodTitleZh = product.titleZh
this.form.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form.brand))
this.form.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
},
onProductChange1(product){
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form1.brand))
this.form1.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
},
getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
......@@ -797,6 +923,13 @@ export default {
this.form.table.pop()
}
},
handleDeleteRow(index, val) {
if (val === 1) {
this.form1.table.splice(index, 1)
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.splice(index, 1)
}
},
handleAdd(val = 0) {
let cartonsNum = ''
if (val !== 1) { // 货物入仓
......@@ -808,6 +941,12 @@ export default {
}
const form = val === 1 ? this.form1 : this.form
const formLength = form.table.length
let orderLocationBackVOList = []
/* // 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
if (formLength > 0) {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}*/
form.table.push({
"boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": this.isJiyun ? 0 : '',
......@@ -819,8 +958,51 @@ export default {
"volume": '',
"weight": '',
specificationType: '1',
table: []
table: [],
orderLocationBackVOList
})
},
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then(response => {
this.attrList = response.data;
})
},
/** 获取产品类型列表 */
getTypeList() {
getProductTypeList().then(response => {
this.typeList = response.data;
})
},
productSubmit(){
this.$refs["productForm"].validate(valid => {
if (!valid) {
return;
}
//商品特性转字符串
this.productForm.attrId = this.productForm.attrArray.join(',')
// 添加的提交
addProduct(this.productForm).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"))
if (this.activeName === 'first') {
this.form.prodId = response.data
this.form.prodAttrIds = this.productForm.attrArray
} else {
this.form1.prodId = response.data
this.form1.prodAttrIds = this.productForm.attrArray
}
this.productCancel()
})
})
},
productCancel(){
this.isShowProduct = false
this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
}
}
}
......
<template>
<div>
<el-dialog
:title="title + ' - ' + warehousing.orderNo"
:visible.sync="opened"
width="1280px"
>
<el-tabs v-model="activeName" type="card" @tab-click="handleTabs">
<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>
<product-selector v-if="!order.parentOrderId" v-model="form.prodId" @change="onProductChange0"/>
<span v-else>{{ warehousing.prodTitleZh }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<product-selector v-if="!order.parentOrderId" lang="En" v-model="form.prodId" @change="onProductChange0"/>
<span v-else>{{ warehousing.prodTitleEn }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
<span v-if="false">{{ form.brand ? brand : '无' }}</span>
<el-form-item required label="" prop="brand" label-width="0">
<el-select
v-model="form.brand"
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage"
clearable>
<el-option
v-for="item in brandList"
: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>
{{ isBeian }}
</el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')">
<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>
</el-descriptions>
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector>
</el-form-item>
<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>
<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"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div>
<el-form ref="tableForm" :model="tableData" :rules="tableFormRules" size="mini">
<el-table
:data="tableData"
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 :rules="tableFormRules.cartonsNum" :prop="$index + '.cartonsNum'">
<el-input v-model="tableData[$index].cartonsNum" placeholder="" @blur="handleVolume($index)">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, tableData[$index].specificationType) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="tableData[$index].specificationType" @change="handleVolume($index)"></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>
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="tableData[$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 :rules="tableFormRules.boxGauge1" :prop="$index + '.boxGauge1'">
<el-input type="number" v-model="tableData[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></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 :rules="tableFormRules.boxGauge2" :prop="$index + '.boxGauge2'">
<el-input type="number" v-model="tableData[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></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 :rules="tableFormRules.boxGauge3" :prop="$index + '.boxGauge3'">
<el-input type="number" v-model="tableData[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></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 :rules="tableFormRules.volume" :prop="$index + '.volume'">
<el-input v-model="tableData[$index].volume" placeholder="" type="number"></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 :rules="tableFormRules.weight" :prop="$index + '.weight'">
<el-input v-model="tableData[$index].weight" placeholder="" type="number"></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 :rules="tableFormRules.quantityAll" :prop="$index + '.quantityAll'">
<el-input v-model.number="tableData[$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>
<el-input v-model="tableData[$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-if="visible"
v-model="tableData[$index].orderLocationBackVOList"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="tableData[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</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="onProductChange"/>
</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="onProductChange"/>
</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="getProductBrandPage"
clearable>
<el-option
v-for="item in brandList"
: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-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form1.material"></dict-selector>
</el-form-item>
<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="tableData1" :rules="tableFormRules" size="mini">
<el-table
:data="tableData1"
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 :rules="tableFormRules.cartonsNum" :prop="$index + '.cartonsNum'">
<span v-if="tableData1[$index].id">
{{ tableData1[$index].cartonsNum }}
{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData1[$index].unit) }}
</span>
<el-input v-else v-model="tableData1[$index].cartonsNum" placeholder="">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData1[$index].unit) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="tableData1[$index].specificationType" @change="handleVolume($index)"></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="tableData1[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData1[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="tableData1[$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 :rules="tableFormRules.boxGauge1" :prop="$index + '.boxGauge1'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else type="number" v-model="tableData1[$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 :rules="tableFormRules.boxGauge2" :prop="$index + '.boxGauge2'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else type="number" v-model="tableData1[$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 :rules="tableFormRules.boxGauge3" :prop="$index + '.boxGauge3'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else type="number" v-model="tableData1[$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 :rules="tableFormRules.volume" :prop="$index + '.volume'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].volume }}</span>
<el-input v-else type="number" v-model="tableData1[$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 :rules="tableFormRules.weight" :prop="$index + '.weight'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].weight }}</span>
<el-input v-else type="number" v-model="tableData1[$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 :rules="tableFormRules.quantityAll" :prop="$index + '.quantityAll'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].quantityAll }}</span>
<el-input v-else v-model.number="tableData1[$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="tableData1[$index].id">{{ tableData1[$index].expressNo }}</span>
<el-input v-else v-model="tableData1[$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="tableData1[$index].orderLocationBackVOList"
:readonly="tableData1[$index].id && !edit"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="tableData1[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
</el-tabs>
<div v-if="edit">
<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="opened = false">{{ $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="opened = false">{{ $t('返回') }}</el-button>
</template>
<template v-else>
</template>
</span>
</el-dialog>
</div>
</template>
<script>
import dictSelector from "@/components/DictSelector"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {getWarehouseLastUpdateApprovalInfo, orderWarehouseIn, orderWarehouseInUpdateApply} from '@/api/ecw/order'
import { getFeeTypeByOrderProduct, getProductBrankPage } from '@/api/ecw/productBrank'
import WorkFlow from "@/components/WorkFlow"
import ProductSelector from "@/components/ProductSelector"
import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
export default {
name: 'editDialog',
components: {
dictSelector,
WorkFlow,
ProductSelector,
WarehouseAreaSelect
},
props: {
order: {
type: Object,
default: undefined
},
orderId: {
type: Number,
default: undefined
},
visible: {
type: Boolean,
default: false
},
isJiyun: {
type: Boolean,
default: false
},
// 入仓修改
edit: {
type: Boolean,
default: false
},
warehousing: {
type: Object,
default: () => {
return {
material: undefined,
inTime: undefined,
orderWarehouseInBackItemDoList: []
}
}
}
},
data() {
return {
DICT_TYPE,
getDictDataLabel,
getDictDatas,
opened: false,
brandList: [],
formRules: {
prodId: [{required: true, message: this.$t("请选择品名"), trigger: "change"}],
brand: [{required: true, message: this.$t("请选择品牌"), trigger: "change"}],
},
form: {
"brand": "",
// "brandType": 0,
// "inTime": "",
// "material": "",
// "orderId": 0,
// "orderItemId": 0,
// "orderNo": "",
"orderWarehouseInItemDoList": [],
"prodAttrIds": "",
"prodId": '',
// "prodTitleEn": "",
// "prodTitleZh": "",
// "prodType": 0,
// "type": 0,
feeType: 0,
recordMode: undefined
},
tableFormRules: {
cartonsNum: [{required: true, message: this.$t("箱数不能为空"), trigger: "change"}],
boxGauge1: [{required: true, message: this.$t("货物长不能为空"), trigger: "change"}],
boxGauge2: [{required: true, message: this.$t("货物宽不能为空"), trigger: "change"}],
boxGauge3: [{required: true, message: this.$t("货物高不能为空"), trigger: "change"}],
volume: [{required: true, message: this.$t("体积不能为空"), trigger: "change"}],
weight: [{required: true, message: this.$t("重量不能为空"), trigger: "change"}],
// quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}]
},
form1: {
"brand": undefined,
"brandType": 0,
"inTime": "",
"material": "",
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"orderWarehouseInItemDoList": [],
"prodAttrIds": "",
"prodId": '',
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"type": 1,
feeType: 0,
recordMode: undefined
},
// orderItem: {},
selectedUsers: undefined,
activeName: 'first',
// 入仓修改正在审核中
isEditing: false,
// 审批业务id
formId: ''
};
},
watch: {
visible(val) {
if (val) {
this.opened = true
if (this.warehousing) {
// this.orderItem = this.warehousing
this.inTime = this.warehousing.inTime
if (!!this.warehousing.brandName){
this.getProductBrandPage(this.warehousing.brandName)
} else {
this.getProductBrandPage()
}
}
} else {
}
},
opened(val) {
if (val) {
this.form1 = {
"brand": undefined,
"brandType": 0,
"inTime": "",
"material": "",
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"orderWarehouseInItemDoList": [],
"prodAttrIds": "",
"prodId": '',
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"type": 1,
feeType: 0,
recordMode: undefined
}
this.form.orderWarehouseInItemDoList = []
this.form1.orderWarehouseInItemDoList = []
this.activeName = 'first'
if (!this.edit){
this.handleAdd()
this.handleAdd(1)
}
this.form.prodId = this.warehousing.prodId
this.form.material = this.warehousing.material
if (this.warehousing.brand && this.warehousing.brand !== 0){
this.form.brand = this.warehousing.brand.toString() || ''
} else {
this.form.brand = ''
}
this.handleBrandChange(this.form.brand)
getWarehouseLastUpdateApprovalInfo({
orderItemId: this.warehousing.orderItemId,
orderId: this.warehousing.orderId
}).then(r => {
if (r.data && r.data.status === 1 && r.data.type === 1){
this.isEditing = true
this.formId = r.data.formId
}
})
} else {
this.$emit('update:visible', false)
}
},
warehousing(newVal, oldVal){
if(newVal.orderItemId !== oldVal.orderItemId){
}
}
},
methods: {
getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
this.brandList = r.data.list.map(e => {
if(e.id){
e.id = e.id.toString()
}
return e
})
})
},
handleCancelProcessInstance(){
this.$prompt('请输入取消原因?', this.$t("取消流程"), {
type: 'warning',
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空"),
}).then(({ value }) => {
cancelProcessInstance(this.formId, value).then(() => {
this.opened = false
this.$modal.msgSuccess("取消成功");
})
})
},
onProductChange(product){
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
},
onProductChange0(product){
this.form.prodTitleZh = product.titleZh
this.form.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form.brand))
},
handleTabs(){
if (this.activeName === 'first'){
this.getProductBrandPage(this.warehousing.brandName)
} else {
this.getProductBrandPage()
}
},
handleBrandChange(v){
getFeeTypeByOrderProduct({
brandId: parseInt(v),
productId: this.warehousing.prodId,
orderId: this.orderId
}).then(r => {
if(r.code === 0){
(this.activeName === "first" ? this.form : this.form1).feeType = parseInt(r.data.feeType);
(this.activeName === "first" ? this.form : this.form1).recordMode = parseInt(r.data.recordMode)
}
})
},
handleVolume(index, val){
setTimeout(() => {
const {boxGauge1, boxGauge2, boxGauge3, specificationType, cartonsNum} = (val === 1 ? this.tableData1 : this.tableData)[index]
let result = ''
if (boxGauge1 && boxGauge2 && boxGauge3 && specificationType && cartonsNum) {
result = (((specificationType === 1 || specificationType === '1') ? cartonsNum : 1) * (boxGauge1 * boxGauge2 * boxGauge3) / 1000000)?.toFixed(2) || ''
} else {
result = ''
}
if (result === '0.00') result = '0.01';
(val === 1 ? this.tableData1 : this.tableData)[index].volume = result
}, 0)
},
handleSubmit() {
// const orderWarehouseInItemDoList = [
// ...this.warehousing.orderWarehouseInBackItemDoList,
// ...this.form.orderWarehouseInItemDoList.map(e => {
// return {
// ...e,
// boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
// orderLocationCreateReqVOList: e.orderLocationBackVOList
// }
// })
// ]
if (this.activeName !== "first"){
// 添加非填单货物
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,
orderWarehouseInItemDoList: this.form1.orderWarehouseInItemDoList.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 {
this.$refs['form'].validate(valid => {
this.$refs['tableForm'].validate(valid1 => {
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,
"orderWarehouseInUpdateItemDoList": this.tableData.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('入仓修改发起成功')
this.handleClose()
} else {
this.$message.success('入仓修改发起失败')
}
})
} else {
// 首次入仓、入仓补充
return orderWarehouseIn({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
orderWarehouseInItemDoList: this.tableData.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('入仓失败')
}
})
}
})
})
}
},
handleClose() {
this.form.orderWarehouseInItemDoList = []
this.opened = false
},
handleDelete(val) {
(val === 1 ? this.form1 : this.form).orderWarehouseInItemDoList.pop()
},
handleAdd(val = 0) {
let cartonsNum = ''
let orderLocationBackVOList = []
if (val !== 1) { // 货物入仓
let hasCartonsNum = 0
this.tableData.forEach(e => {
hasCartonsNum += e.cartonsNum
})
cartonsNum = this.warehousing.num - hasCartonsNum
// orderLocationBackVOList = this.tableData.length
// ? this.tableData[this.tableData.length - 1].orderLocationBackVOList
// : []
} else { // 添加新品名
// orderLocationBackVOList = this.tableData1.length
// ? this.tableData1[this.tableData1.length - 1].orderLocationBackVOList
// : []
}
const form = val === 1 ? this.form1 : this.form
form.orderWarehouseInItemDoList.push({
"boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": this.isJiyun ? 0 : '',
"boxGauge3": this.isJiyun ? 0 : '',
"cartonsNum": cartonsNum > 0 ? cartonsNum : '',
"expressNo": "",
"quantityAll": undefined,
"unit": "1",
"volume": '',
"weight": '',
specificationType: '1',
orderLocationBackVOList
})
}
},
computed: {
title() {
return this.$i18n.locale === 'en_US' ? this.$route.meta.titleEn : this.$route.name
},
brandObject(){
return this.brandList.find(e => e.id === this.form.brand) || ''
},
brandObject1(){
return this.brandList.find(e => e.id === this.form1.brand) || ''
},
tableData() {
// if (!this.edit){
// return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList]
// }
// 入仓修改的时候
this.form.orderWarehouseInItemDoList = this.warehousing.orderWarehouseInBackItemDoList
return this.form.orderWarehouseInItemDoList.map(e => {
const boxGauge = e.boxGauge
if (boxGauge && boxGauge.length > 0) {
const boxGaugeList = boxGauge.split('*')
const [boxGauge1, boxGauge2, boxGauge3] = boxGaugeList
return {...e, boxGauge1, boxGauge2, boxGauge3}
}
return {...e, boxGauge1: this.isJiyun ? 0 : '', boxGauge2: this.isJiyun ? 0 : '', boxGauge3: this.isJiyun ? 0 : ''}
})
},
tableData1() {
return this.form1.orderWarehouseInItemDoList
},
isBeian(){
if (this.form.recordMode !== undefined){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form.recordMode]
}
if (this.brandObject.filing){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject.filing]
} else {
return ''
}
},
isBeian1(){
if (this.form1.recordMode !== undefined){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form1.recordMode]
}
if (this.brandObject1.filing){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject1.filing]
} else {
return ''
}
},
/**
* 收费模式
* @returns {string} 无牌价0,有牌价1,中性品牌价2
*/
feeType(){
const feeType = parseInt(this.form.feeType)
if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType]
}
return ''
},
feeType1(){
const feeType = parseInt(this.form1.feeType)
if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType]
}
return ''
},
brand(){
if (!!this.form.brand){
const brand = this.brandList.find(e => e.id === this.form.brand)
if (brand) {
return brand.titleZh
}
}
return ''
},
warehouseId(){
return this.order?.logisticsInfoDto?.startWarehouseId
}
}
}
</script>
<style scoped lang="scss">
::v-deep .el-table__cell {
padding-bottom: 0;
.cell {
.el-form-item {
margin-bottom: 16px;
}
.el-form-item__error {
z-index: 1;
padding-top: 0;
top: 32px;
}
}
}
</style>
......@@ -90,7 +90,6 @@
:title="$t('修改')"
:order="order"
@close="getList"></warehouse>
<!-- <el-button v-if="isEdit" size="mini" type="text" @click="handleWarehousing(row)">{{$t('修改')}}</el-button>-->
<template v-else-if="
wareItem(row.orderItemId)
&& wareItem(row.orderItemId).orderWarehouseInBackItemDoList
......@@ -103,7 +102,6 @@
:title="$t('追加')"
:order="order"
@close="getList"></warehouse>
<!-- <el-button size="mini" type="text" @click="handleWarehousing(row)">{{$t('追加')}}</el-button>-->
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">{{$t('退仓')}}</el-button>
<!-- </template>-->
</template>
......@@ -114,7 +112,6 @@
:title="$t('入仓')"
:order="order"
@close="getList"></warehouse>
<!-- <el-button v-else size="mini" type="text" @click="handleWarehousing(row)">{{$t('入仓')}}</el-button>-->
</template>
</el-table-column>
</el-table>
......@@ -179,8 +176,6 @@
<warehouse-area-dialog ref="area" :visible.sync="areaVisible" v-model="form.orderLocationCreateReqVOList"
:order-id="orderId" :warehouse-id="warehouseId" :is-editing="isEdit"></warehouse-area-dialog>
<edit-dialog :order="order" :title="title" :order-id="order.orderId" :visible.sync="warehousingVisible" :warehousing="warehousing" :edit="isEdit" :is-jiyun="order.type === 1 || order.type === '1'"></edit-dialog>
<!-- 完成入仓 -->
<el-dialog
:title="$t('确认入仓')"
......@@ -231,7 +226,6 @@ import {
} from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import editDialog from '@/views/ecw/order/warehousing/components/editDialog'
import {DICT_TYPE} from "@/utils/dict"
import PrintTag from "@/views/ecw/order/components/PrintTag"
import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt"
......@@ -245,7 +239,6 @@ export default {
components: {
orderBaseInfo,
WarehouseAreaDialog,
editDialog,
PrintTag,
PrintWarehouseReceipt,
imageUpload,
......@@ -477,11 +470,6 @@ export default {
}
})
},
handleWarehousing(row) {
let wareItem = this.orderItemList.find(item => item.orderItemId == row.orderItemId) || {}
this.warehousing = {...row, ...wareItem}
this.warehousingVisible = true
},
handleWarehousingReturn(item){
this.$confirm(item.prodTitleZh + this.$t('退仓后不可恢复,是否确认退仓?'), this.$t('确定要退仓?'), {
confirmButtonText: this.$t('确定'),
......@@ -507,12 +495,6 @@ export default {
},
watch: {
warehousingVisible(val) {
if (!val){
this.getOrder()
this.getOrderItemList()
}
},
orderSpecialNeeds(val){
val.forEach(e => {
this.form.orderSpecialNeedReceivableReqVoList.push({
......
......@@ -88,36 +88,52 @@
</el-table-column>
<el-table-column :label="$t('重货方数')" v-if="type=='order_heavy_cargo_exception'">
<template slot-scope="scope">
<span>{{scope.row.weVolume||0}}CBM</span>
<span>{{scope.row.chargeVolume||0}}CBM</span>
</template>
</el-table-column>
<el-table-column :label="$t('泡货方数')" v-if="type!='order_heavy_cargo_exception'">
<template slot-scope="scope">
<span>{{scope.row.weVolume||0}}CBM</span>
<span>{{scope.row.chargeVolume||0}}CBM</span>
</template>
</el-table-column>
<el-table-column :label="$t('重货重量')" v-if="type=='order_heavy_cargo_exception'">
<template slot-scope="scope">
<span>{{scope.row.voWeight||0}}KG</span>
<span>{{scope.row.chargeWeight ||0}}KG</span>
</template>
</el-table-column>
<el-table-column :label="$t('泡货重量')" v-if="type!='order_heavy_cargo_exception'" >
<template slot-scope="scope">
<span>{{scope.row.vweight||0}}KG</span>
<span>{{scope.row.chargeWeight ||0}}KG</span>
</template>
</el-table-column>
<el-table-column :label="$t('最后操作时间')" scope="handlerTime" />
</el-table>
</el-card>
<el-card v-if="list.orderExceptionStatus==2">
<div slot="header" class="card-title">{{$t('处理结果')}}</div>
<el-descriptions :column="1">
<el-descriptions-item :label="$t('处理时间')">
{{parseTime(handlerParams.handlerTime)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('处理结果')">
{{handlerParams.handlerResult=='general_cargo'?$t('设为普货'):$t('设为已处理')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('备注')">
{{handlerParams.handlerRemark||"无"}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<div slot="footer" class="dialog-footer">
<div>
<div v-if="list.orderExceptionStatus!=2">
<el-button type="primary" @click="submit('general_cargo')">{{$t('设为普货')}}</el-button>
<el-button plain type="primary" @click="submit('process')">{{$t('设为已处理')}}</el-button>
</div>
<div v-else>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</div>
<el-form :model="handlerParams" ref="queryForms" size="small" label-width="50px" class="card">
</div>
<el-form v-if="list.orderExceptionStatus!=2" :model="handlerParams" ref="queryForms" size="small" label-width="50px" class="card">
<el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
</el-form-item>
......@@ -127,7 +143,7 @@
</template>
<script>
import {getExceptionById,handlerExceptionByExceptionId} from "@/api/ecw/orderException"
import {getExceptionById,handlerExceptionByExceptionId,getOrderExcptionResult} from "@/api/ecw/orderException"
import {DICT_TYPE} from '@/utils/dict'
import {getOrder} from '@/api/ecw/order'
import {getProductBrankPage} from '@/api/ecw/productBrank'
......@@ -171,6 +187,9 @@ export default {
getExceptionById(this.id).then(response => {
this.list = response.data;
this.loading = false;
if(this.list.orderExceptionStatus==2){
this.getOrderExcptionResult()
}
this.getOrders()
});
},
......@@ -178,6 +197,14 @@ export default {
var brank = this.branklist.find(item=>item.id==id)
return brank.titleZh||''
},
//获取异常结果
getOrderExcptionResult(){
getOrderExcptionResult({orderExceptionId:this.id}).then(res=>{
this.handlerParams = res.data.list[0]
console.log(this.handlerParams)
})
},
checkCode(data){
if(data.indexOf('+')==-1){
return '+'+data
......@@ -219,7 +246,7 @@ export default {
submit(result){
handlerExceptionByExceptionId({orderExceptionId:this.list.id,orderExceptionHandlerResult:result,orderExceptionHandlerRemark:this.handlerParams.orderExceptionHandlerRemark}).then(res=>{
this.$modal.msgSuccess(this.$t("提交成功"));
this.$router.back()
this.$store.dispatch('tagsView/delCurrentView')
})
}
}
......
......@@ -13,6 +13,9 @@
<el-form-item :label="$t('退仓原因')">
<el-input v-model="params.reason" style="width:500px" type="textarea"></el-input>
</el-form-item>
<el-form-item :label="$t('图片')">
<image-and-video-upload :file-type="['png' , 'jpg', 'jpeg']" :fileSize="50" :isShowTip="true" v-model="params.imgUrl" ></image-and-video-upload>
</el-form-item>
</el-form>
<el-divider></el-divider>
<h2>{{$t('审批流程')}}</h2>
......@@ -37,6 +40,7 @@ import {
warehouseApprovalCancel
} from "@/api/ecw/batchSingleApplication";
import workFlow from "@/components/WorkFlow";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue";
export default {
name: "withdrawal",
......@@ -45,6 +49,7 @@ export default {
dialogVisible:Boolean
},
components:{
ImageAndVideoUpload,
workFlow
},
data(){
......@@ -55,6 +60,7 @@ export default {
orderNo:undefined,
reason:'',
copyUserId:[],
imgUrl:[]
},
isExamine:true,
details:{},
......@@ -82,6 +88,7 @@ export default {
submit(){
this.params.orderId = this.orderDetails.orderId;
this.params.orderNo =this.orderDetails.orderNo;
this.params.imgUrl = this.params.imgUrl.join(',')
orderWarehouseInDelete(this.params).then(r => {
if(r.code === 0){
this.$message.success(this.$t('退仓成功'));
......
......@@ -159,6 +159,13 @@
</el-form-item>
<el-form-item prop="auditStatus" :label="$t('是否审核')">
<template slot-scope="scope">
<el-select v-model="form.auditStatus">
<el-option v-for="auditStatusItem in auditStatusDictDatas" :key="auditStatusItem.id" :label="$l(auditStatusItem, 'label')" :value="parseInt(auditStatusItem.value)" />
</el-select>
</template>
</el-form-item>
<el-form-item :label="$t('商品编码')" prop="productCode">
<el-input v-model="form.productCode" :placeholder="$t('请输入商品编码')" />
</el-form-item>
......@@ -328,6 +335,7 @@ export default {
packagingList: getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE),
locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION),
preferentialList:[],
exceptionProductId:0//新增商品异常传的id
};
},
......@@ -372,9 +380,19 @@ export default {
if(this.$route.query.typeId != this.queryParams.typeId){
this.queryParams.typeId = +this.$route.query.typeId || null
}
//新增商品异常跳转商品修改
if(this.$route.query.prodId){
this.exceptionProductId = this.$route.query.prodId
this.handleUpdate({id:this.$route.query.prodId})
}
this.getList()
},
created() {
//新增商品异常跳转商品修改
if(this.$route.query.prodId){
this.exceptionProductId = this.$route.query.prodId
this.handleUpdate({id:this.$route.query.prodId})
}
let typeId = this.$route.query.typeId;
if (typeId) {
this.queryParams.typeId = parseInt(typeId);
......@@ -382,6 +400,7 @@ export default {
this.getAttrList();
this.getTypeList();
this.getList();
},
methods: {
/** 获取产品属性列表 */
......@@ -432,6 +451,7 @@ export default {
params.filter=false;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
params.status = 0;
getProductPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
......@@ -487,10 +507,11 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
// this.reset();
console.log(row);
const id = row.id;
getProduct(id).then(response => {
this.form = {...response.data,couponIds:[]};
let attrArray = this.form.attrId.split(',');
let attrArray = this.form.attrId?this.form.attrId.split(','):[];
for (let index in attrArray) {
let value = attrArray[index];
attrArray[index] = parseInt(value);
......@@ -519,9 +540,17 @@ export default {
this.form.attrId = this.form.attrArray.join(',');
// 修改的提交
if (this.form.id != null) {
if(this.exceptionProductId){
this.form.productId = this.exceptionProductId
this.form.status = 0
}
updateProduct(this.form).then(response => {
this.$modal.msgSuccess(this.$t("修改成功"));
this.open = false;
if(this.exceptionProductId){
this.exceptionProductId = null
this.$router.replace({ path: '/product/product-list'})
}
this.getList();
});
return;
......
......@@ -735,7 +735,7 @@ export default {
this.form.priceStepList.forEach(item => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
notEmptyFields.forEach(field => {
if(item[field].toString().trim() == ''){
if(!item[field] || item[field].toString().trim() == ''){
stepPriceEmpty = true
}
})
......@@ -744,7 +744,7 @@ export default {
}
})
if(stepPriceEmpty){
return this.$message.error(this.$t('阶梯价格设置不能留空'))
return this.$message.error(this.$t('阶梯价格设置不能留空'))
}
}
......
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