Commit bba4cf02 authored by dragondean@qq.com's avatar dragondean@qq.com
parents edc4d1cd 3b15b096
......@@ -58,6 +58,24 @@ export function createCost(data) {
return request({
url: '/ecw/box-cost/create',
method: 'post',
data: data
data
})
}
// 审核详情
export function approvalDetail(data) {
return request({
url: '/ecw/box-approval/approvalDetail',
method: 'post',
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
})
}
function jsonToFormData(params) {
const formData = new FormData();
for (const [key, value] of Object.entries(params)) {
formData.append(key, value);
}
return formData;
}
......@@ -367,7 +367,7 @@ export function secGoodsList(params) {
}
/**
* 获得订单预装分页
* 获得预装分页
*
* @export
* @param {*} params
......@@ -375,7 +375,7 @@ export function secGoodsList(params) {
*/
export function preloadPage(params) {
return request({
url: "/ecw/order/preloadPage",
url: "/ecw/box-preload-goods/preloadPage",
method: "get",
params,
});
......@@ -385,7 +385,7 @@ export function preloadPage(params) {
* 创建预装部分
*
* @export
* @param {*} params
* @param {*} data
* @return {*}
*/
export function createSection(data) {
......@@ -400,7 +400,7 @@ export function createSection(data) {
* 删除预装部分
*
* @export
* @param {*} params
* @param {*} id
* @return {*}
*/
export function deleteSection(id) {
......@@ -414,7 +414,7 @@ export function deleteSection(id) {
* 删除预装货物
*
* @export
* @param {*} params
* @param {*} id
* @return {*}
*/
export function deleteGoods(id) {
......@@ -428,7 +428,7 @@ export function deleteGoods(id) {
* 预装
*
* @export
* @param {*} params
* @param {*} data
* @return {*}
*/
export function createGoods(data) {
......@@ -542,7 +542,7 @@ export function boxUpdate(data) {
* 获取卸柜数据
*
* @export
* @param {*} data
* @param {*} params
* @return {*}
*/
export function loadGoodsList(params) {
......@@ -600,6 +600,70 @@ export function createError(data) {
/***************************** 卸柜 end **********************************/
/***************************** 报关费用 start **********************************/
/**
* 搜索出货单下的订单
*
* @export
* @param {*} data
* @return {*}
*/
export function extraCostOrder(data) {
return request({
url: "/ecw/box-customs-extra-cost/searchByOrderNo",
method: "post",
data,
});
}
/**
* 创建额外报关费用
*
* @export
* @param {*} data
* @return {*}
*/
export function extraCostCreate(data) {
return request({
url: "/ecw/box-customs-extra-cost/create",
method: "post",
data,
});
}
/**
* 更新额外报关费用
*
* @export
* @param {*} data
* @return {*}
*/
export function extraCostUpdate(data) {
return request({
url: "/ecw/box-customs-extra-cost/update",
method: "put",
data,
});
}
/**
* 获得额外报关费用列表
*
* @export
* @param {*} data
* @return {*}
*/
export function extraCostList(params) {
return request({
url: "/ecw/box-customs-extra-cost/list",
method: "get",
params,
});
}
/***************************** 报关费用 end **********************************/
/**
* 服务提示消息回调
*
......
import request from '@/utils/request'
// 创建收款单
export function createReceipt(data) {
return request({
url: '/ecw/receipt/create',
method: 'post',
data: data
})
}
// 获取应收款列表
export function getReceivableList(query) {
return request({
url: '/ecw/receivable/page',
method: 'get',
params: query
})
}
// 根据获取应收款列表
// export function getReceivableListByIds(query) {
// return request({
// url: '/ecw/receivable/list',
// method: 'get',
// params: query
// })
// }
// 更新应付款
export function updatePayable(data) {
return request({
url: '/ecw/payable/update',
method: 'put',
data: data
})
}
// 删除应付款
export function deletePayable(id) {
return request({
url: '/ecw/payable/delete?id=' + id,
method: 'delete'
})
}
// 获取应付款列表
export function getPayableList(query) {
return request({
url: '/ecw/payable/page',
method: 'get',
params: query
})
}
// 获取应付款详情
export function getPayableInfoByIds(query) {
return request({
url: '/ecw/payable/get',
method: 'get',
params: query
})
}
// 创建付款单
export function createPayment(data) {
return request({
url: '/ecw/payment/create',
method: 'post',
data: data
})
}
// 获取付款单列表
export function getPaymentList(query) {
return request({
url: '/ecw/payment/page',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -75,3 +75,11 @@ export function handlerExceptionByExceptionId(data){
data: data
})
}
// 根据商品ID获取商品详情
export function getOrderItemById(id) {
return request({
url: '/ecw/order-exception/getOrderItemById?id=' + id,
method: 'get'
})
}
......@@ -125,5 +125,13 @@ export function deptList(data) {
})
}
/** 修改其他服务 */
export function serviceConfig(data) {
return request({
url: '/ecw/warehouse/serviceConfig',
method: 'post',
data: data
})
}
<template>
<!-- 预览组件 -->
<div class="FilePreview">
<div class="container">
<!-- 渲染层 -->
<div class="object" v-if="TragetObj.format == 'jpg' || TragetObj.format == 'png' || TragetObj.format == 'JPG' || TragetObj.format == 'PNG' || TragetObj.format == 'jpeg'|| TragetObj.format == 'tiff'|| TragetObj.format == 'swf'|| TragetObj.format == 'gif'|| TragetObj.format == 'JPEG'|| TragetObj.format == 'GIF'"
ref="imgWrap" @mousewheel.prevent="rollImg">
<img class="Target modal-img" ref="img" @mousedown="moveImg" :src="TragetObj.url" alt="" >
</div>
<!-- 视频 -->
<div class="object" v-else-if="TragetObj.format == 'webm' || TragetObj.format == 'mov' || TragetObj.format == 'mp4'">
<video class="Target" controls="controls" width="1200" height="700" :src="TragetObj.url" autoplay ref="videoref" >
您的浏览器不支持。
</video>
</div>
<!-- 附件 -->
<div class="object" v-else>
<iframe class="Target" frameborder="1" index-render="1" scrolling="yes" height="890.15" width="1220.4" :src="TragetObj.url"></iframe>
</div>
<!-- 操作按钮 -->
<div class="viewer_btn">
<ul>
<li @click="onClickEnlarge">
<i class="el-icon-zoom-in"></i>
</li>
<li @click="onClickNarrow">
<i class="el-icon-zoom-out"></i>
</li>
<li @click="onClickReturnOriginal">
<i class="el-icon-c-scale-to-original"></i>
</li>
<!-- 下载 -->
<li v-if="TragetObj.downUrl">
<a :href="TragetObj.downUrl">
<i class="el-icon-download"></i>
</a>
</li>
<!-- <li>
<i class="el-icon-full-screen"></i>
</li> -->
</ul>
</div>
<!--下一个 -->
<div class="next" v-if="NumIndex < this.FilePresAll.length - 1" @click="onClickNext">
<i class="el-icon-arrow-right"></i>
</div>
<!-- 上一个 -->
<div class="previous" v-if="NumIndex != 0" @click="onCLickPrevious">
<i class="el-icon-arrow-left"></i>
</div>
<!-- 关闭按钮 -->
<div class="close" @click="onClickClose">
<i class="el-icon-close"></i>
</div>
</div>
<div class="viewer__mask" @click.stop="onClickClose">
<div v-loading="loadingFlag"></div>
</div>
</div>
</template>
<script>
export default {
name:"FilePreview",
props:['TragetPic', 'FilePreAll'],
data(){
return{
EleWidth:"",
EleHeight:"",
TragetObj:{}, // 目标对象
FilePresAll:[], // 渲染数组
NumIndex:0, // 当前渲染目标的下标
loadingFlag:false, // 加载
}
},
created(){
this.TragetObj = this.TragetPic // 目标对象
this.FilePresAll = this.FilePreAll // 渲染数组
},
mounted () {
if(this.EleWidth == ""){
if(this.TragetObj.format != 'jpg' && this.TragetObj.format != 'png' && this.TragetObj.format != 'JPG' && this.TragetObj.format != 'PNG' && this.TragetObj.format != 'jpeg' && this.TragetObj.format != 'tiff' && this.TragetObj.format != 'swf' && this.TragetObj.format != 'gif' && this.TragetObj.format != 'JPEG' && this.TragetObj.format != 'GIF'){
this.loadingFlag = true
}else{
this.loadingFlag = false
}
}
// 获取目标元素值
let Target = document.getElementsByClassName("Target")[0];
this.EleWidth = Target.offsetWidth
this.EleHeight = Target.offsetHeight
if(this.EleWidth != ""){
this.loadingFlag = false
}
// console.log(this.EleWidth)
// 获取当前目标的下标值
this.FilePresAll.forEach((item, index)=>{
if(item.FileName == this.TragetObj.FileName){
this.NumIndex = index
}
})
},
beforeUpdate () {
if(this.TragetObj.format != 'jpg' && this.TragetObj.format != 'png' && this.TragetObj.format != 'JPG' && this.TragetObj.format != 'PNG' && this.TragetObj.format != 'jpeg' && this.TragetObj.format != 'tiff' && this.TragetObj.format != 'swf' && this.TragetObj.format != 'gif' && this.TragetObj.format != 'JPEG' && this.TragetObj.format != 'GIF'){
this.loadingFlag = true
}else{
this.loadingFlag = false
}
this.$nextTick(()=>{
let eleParent = document.querySelector('.object')
// 获取目标元素值
let Target = eleParent.children[0]
this.EleWidth = Target.offsetWidth
this.EleHeight = Target.offsetHeight
// console.log(Target)
})
},
methods:{
// 放大功能
onClickEnlarge(){
let Target=document.getElementsByClassName("Target")[0];
Target.style.height=Target.height*1.1+'px';
Target.style.width=Target.width*1.1+'px';
},
// 缩小功能
onClickNarrow(){
let Target=document.getElementsByClassName("Target")[0];
Target.style.height=Target.height/1.1+'px';
Target.style.width=Target.width/1.1+'px';
},
// 返回原图大小
onClickReturnOriginal(){
let Target=document.getElementsByClassName("Target")[0];
Target.style.height=this.EleHeight+'px';
Target.style.width=this.EleWidth +'px';
},
// 点击下一个事件
onClickNext(){
if(this.NumIndex < this.FilePresAll.length - 1){
this.NumIndex++
this.TragetObj = this.FilePresAll[this.NumIndex]
}
},
// 点击上一个事件
onCLickPrevious(){
if(this.NumIndex != 0){
this.NumIndex--
this.TragetObj = this.FilePresAll[this.NumIndex]
}
},
// 关闭按钮
onClickClose(){
// 关闭视频声音
if(this.$refs.videoref != undefined){
this.$refs.videoref.pause()
}
this.$emit('Close', false)
},
// 拖拽图片事件
moveImg (e) {
e.preventDefault()
// 获取元素
let imgWrap = this.$refs.imgWrap
let img = this.$refs.img
let x = e.pageX - img.offsetLeft
let y = e.pageY - img.offsetTop
// 添加鼠标移动事件
imgWrap.addEventListener('mousemove', move)
function move (e) {
img.style.left = e.pageX - x + 'px'
img.style.top = e.pageY - y + 'px'
}
// 添加鼠标抬起事件,鼠标抬起,将事件移除
img.addEventListener('mouseup', () => {
imgWrap.removeEventListener('mousemove', move)
})
// 鼠标离开父级元素,把事件移除
imgWrap.addEventListener('mouseout', () => {
imgWrap.removeEventListener('mousemove', move)
})
},
// 鼠标滚动缩放图片事件
rollImg (event) {
/* 获取当前页面的缩放比 若未设置zoom缩放比,则为默认100%,即1,原图大小 */
let zoom = parseInt(this.$refs.img.style.zoom) || 100
/* event.wheelDelta 获取滚轮滚动值并将滚动值叠加给缩放比zoom wheelDelta统一为±120,其中正数表示为向上滚动,负数表示向下滚动 */
zoom += event.wheelDelta / 12
/* 最小范围 和 最大范围 的图片缩放尺度 */
if (zoom >= 40 && zoom < 500) {
this.$refs.img.style.zoom = zoom + '%'
}
return false
},
}
}
</script>
<style lang="scss" scoped>
.FilePreview{
position: fixed;
left: 0;
top: 0;
z-index: 8888;
height: 100%;
width: 100%;
.container{
display: flex;
flex-direction: column;
align-items:center;/*由于flex-direction: column,因此align-items代表的是水平方向*/
justify-content: center;/*由于flex-direction: column,因此justify-content代表的是垂直方向*/
position: relative;
left: 0;
top: 0;
height: 100%;
width: 100%;
.object{
z-index: 10001;
display: flex;
flex-direction: column;
align-items:center;/*由于flex-direction: column,因此align-items代表的是水平方向*/
justify-content: center;/*由于flex-direction: column,因此justify-content代表的是垂直方向*/
margin: 25px;
.modal-img {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
max-width: 100%;
cursor: move;
&-wrap {
position: relative;
width: 960px;
height: 560px;
overflow: hidden;
}
}
}
.viewer_btn{
position: absolute;
left: 50%;
bottom: 20px;
z-index: 10020;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
// width: 250px;
height: 44px;
padding: 0 23px;
background-color: #606266;
border-color: #fff;
border-radius: 22px;
ul{
padding: 0;
margin: 0;
display: flex;
justify-content: space-between;
align-items: center;
li{
font-size: 30px;
color: #fff;
padding: 6px 10px;
cursor: pointer;
}
}
}
.next{
position: absolute;
top: 50%;
right: 15px;
z-index: 10020;
font-size: 30px;
height: 44px;
width: 44px;
line-height: 44px;
text-align: center;
background: #606266;
color: #fff;
border-radius: 50%;
cursor: pointer;
}
.previous{
position: absolute;
top: 50%;
left: 15px;
z-index: 10020;
font-size: 30px;
height: 44px;
width: 44px;
line-height: 44px;
text-align: center;
background: #606266;
color: #fff;
border-radius: 50%;
cursor: pointer;
}
.close{
position: absolute;
top: 15px;
right: 15px;
z-index: 10020;
font-size: 30px;
cursor: pointer;
background: #606266;
border-radius: 50%;
width: 44px;
height: 44px;
line-height: 44px;
text-align: center;
}
}
.viewer__mask{
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.9);
top: 0;
left: 0;
z-index: 8888;
display: flex;
flex-direction: column;
align-items:center;/*由于flex-direction: column,因此align-items代表的是水平方向*/
justify-content: center;/*由于flex-direction: column,因此justify-content代表的是垂直方向*/
}
}
</style>
<style>
/* 关闭图标 */
.FilePreview .el-icon-close{
color: #fff;
}
</style>
......@@ -61,14 +61,14 @@ export default {
type: Boolean,
default: false
},
value: String
value: Array,
orderId: Number
},
data() {
return {
opened: false,
orderId: '',
area: [],
activeName: '0',
selectedWarehouse: [],
......@@ -94,7 +94,7 @@ export default {
methods: {
handleSubmit() {
this.$emit('input', this.selected.join(','))
this.$emit('input', this.inputValue)
this.opened = false
},
handleClose() {},
......@@ -106,7 +106,7 @@ export default {
warehouse.selected = true
// 区域被选,清空该区域下的位置
warehouse.positionList.forEach(g => {
if(warehouse.positionList) warehouse.positionList.forEach(g => {
g.children.forEach(k => {
k.selected = false
})
......@@ -154,7 +154,7 @@ export default {
e.children.forEach(f => {
// 区域
f.selected = false
f.positionList.forEach(g => {
if(f.positionList) f.positionList.forEach(g => {
// 位置
g.children.forEach(k => {
// 子位置
......@@ -168,6 +168,7 @@ export default {
},
computed: {
// code array
selected() {
const result = []
......@@ -176,17 +177,52 @@ export default {
e.children.forEach(f => {
// 区域
if (f.selected) result.push(f.code)
f.positionList.forEach(g => {
else if(f.positionList) f.positionList.forEach(g => {
// 位置
if (g.selected) result.push(k.code)
g.children.forEach(k => {
// 子位置
if (k.selected) result.push(k.code)
})
})
})
})
return result
},
inputValue(){
const result = []
this.area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
if (f.selected) result.push({
orderId: this.orderId,
wareId: f.pid,
areaId: f.id
})
else if(f.positionList) f.positionList.forEach(g => {
// 位置
if (g.selected) result.push({
orderId: this.orderId,
wareId: g.domainId,
areaId: g.areaId,
locationId: g.id
})
else g.children.forEach(k => {
// 子位置
if (k.selected) result.push({
orderId: this.orderId,
wareId: k.domainId,
areaId: k.areaId,
locationId: k.id
})
})
})
})
})
return result
}
}
......
......@@ -149,6 +149,22 @@ export const DICT_TYPE = {
ORDER_EXCEPTION_STATUS:'order_exception_status',//异常订单状态
PAYMENT_TYPE:'payment_type',//收款类型
ORDER_WAREHOUSE_IN_STATUS: 'order_warehouse_in_status', // 入仓状态
ORDER_NO_QUOTE_EXCEPTION_RESULT:'order_no_quote_exception_result',//未报价异常处理结果
ORDER_SUPERFLUOUS_BOX_EXCEPTION_RESULT:'order_superfluous_box_exception_result',//多箱异常处理结果
ORDER_LACI_BOX_EXCEPTION_RESULT:'order_lack_box_exception_result',//少箱异常处理结果
ORDER_PAY_EXCEPTION_RESULT:'order_pay_exception_result',//预付异常处理结果
ORDER_MISS_EXCEPTION_RESULT:'order_miss_exception_result',//货物丢失异常处理结果
ORDER_SUPERFLUOUS_GOODS_EXCEPTION_RESULT:'order_superfluous_goods_exception_result',//货物增多异常处理结果
ORDER_DAMAGE_EXCEPTION_RESULT:'order_damage_exception_result',//货物破损异常处理结果
ORDER_IN_WATER_EXCEPTION_RESULT:'order_in_water_exception_result',//货物浸水异常处理结果
ORDER_HEAVY_CARGO_EXCEPTION_RESULT:'order_heavy_cargo_exception_result',//重货异常处理结果
ORDER_DOC_EXCEPTION_RESULT:'order_doc_exception_result',//单证异常处理结果
ORDER_CONSIGNOR_EXCEPTION_RESULT:'order_consignor_exception_result',//发货人异常处理结果
ORDER_COD_EXCEPTION_RESULT:'order_cod_exception_result',//代收货款异常处理结果
ORDER_OTHER_EXCEPTION_RESULT:'order_other_exception_result',//其它异常处理结果
ORDER_BULKY_CARGO_EXCEPTION_RESULT:'order_bulky_cargo_exception_result',//泡货异常处理结果
PAYMENT_TYPE:'payment_type',//收款类型
ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'receivable_fee_type',
......@@ -167,6 +183,7 @@ export const DICT_TYPE = {
BOX_SHIPPING_PRICE_UNIT: 'shipping_price_unit', // 金额单位
BOX_SHIPPING_TICKET_EXCEPTION: 'shipping_ticket_exception', // 票异常
BOX_SHIPPING_PROCESS: 'shipping_process', // 海运出货流程
BOX_SHIPPING_BRAND_TYPE: 'shipping_brand_type', // 出货品牌类型
}
/**
......
......@@ -145,6 +145,7 @@ import {listSimpleUsers} from "@/api/system/user";
import {getActivityList} from "@/api/bpm/activity";
import specialDiscount from "@/views/ecw/offer/specialDiscount"
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import shippingDetail from '@/views/ecw/box/shippingDetail'
// 流程实例的详情页,可用于审批
export default {
......@@ -152,7 +153,8 @@ export default {
components: {
Parser,
specialDiscount,
warehouseDetails
warehouseDetails,
shippingDetail
},
computed:{
matterNum(){
......
<template>
<div class="app-approvalShipping">
<h1>申请信息【出货信息】</h1>
<el-descriptions :column="6" border>
<el-descriptions-item label="自编号">{{boxBackVO.selfNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="boxBackVO.transportType" />
</el-descriptions-item>
<el-descriptions-item label="出货渠道">
{{getShipChannelName(boxBackVO.shippingChannelId)}}
</el-descriptions-item>
<el-descriptions-item label="柜型">
{{cabinetLabel}}
</el-descriptions-item>
<el-descriptions-item label="体积/重量">
{{getVolumeWeight(loadDetail.totalStatistics)}}
</el-descriptions-item>
<el-descriptions-item label="货柜状态">
{{getCabinetStatus(boxBackVO)}}
</el-descriptions-item>
</el-descriptions>
<el-row style="marginTop:15px">
<el-button type="primary" @click="showOrder">订单列表</el-button>
</el-row>
<div>
<p>申请原因</p>
<div>
{{boxBackVO.preInstallInfo ? boxBackVO.preInstallInfo.applyReason : ''}}
</div>
</div>
<el-dialog :title="dialogConfig.title" :visible.sync="dialogConfig.visible" fullscreen :modal-append-to-body=false append-to-body>
<el-descriptions :column="6" border>
<el-descriptions-item label="自编号">{{boxBackVO.selfNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="boxBackVO.transportType" />
</el-descriptions-item>
<el-descriptions-item label="出货渠道">
{{getShipChannelName(boxBackVO.shippingChannelId)}}
</el-descriptions-item>
<el-descriptions-item label="柜型">
{{cabinetLabel}}
</el-descriptions-item>
<el-descriptions-item label="体积/重量">
{{getVolumeWeight(loadDetail.totalStatistics)}}
</el-descriptions-item>
<el-descriptions-item label="货柜状态">
{{getCabinetStatus(boxBackVO)}}
</el-descriptions-item>
</el-descriptions>
<el-row style="marginTop:15px">
<el-table :data="loadDetail.sectionOrderList" border>
<el-table-column prop="sectionName" label="部分" align="center"></el-table-column>
<el-table-column prop="orderNo" label="订单号" align="center">
<template v-slot="{row}">
<el-button type="text" @click="jumpOrderDetail(row)">{{row.orderNo}}</el-button>
</template>
</el-table-column>
<el-table-column label="货物信息" align="center" width="500px">
<template v-slot="{row}">
<section class="table-goodList">
<div v-for="(item, index) in row.goodsList" :key="index" class="goodList-div">
{{index+1}}{{item.prodTitleZh}}
</div>
</section>
</template>
</el-table-column>
<el-table-column label="入仓货物属性" align="center">
<template v-slot="{row}">
<section class="table-goodList">
<div>合计:{{calcSum(row.goodsList)}}</div>
<div v-for="(item, index) in row.goodsList" :key="index" class="goodList-div">
{{item.volume}}{{item.weight}}kg
</div>
</section>
</template>
</el-table-column>
<el-table-column prop="installNum" label="实装箱数" align="center"></el-table-column>
<el-table-column prop="volume" label="体积m³" align="center"></el-table-column>
<el-table-column prop="weight" label="重量" align="center"></el-table-column>
<el-table-column prop="unloadNum" label="卸柜箱数" align="center" v-if="isShowColumn(boxBackVO)"></el-table-column>
</el-table>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { approvalDetail } from "@/api/ecw/box";
import { getSeaStatus, getStatusName } from "./shippingSea/utils";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { getChannelList } from "@/api/ecw/channel";
/**
* 出货审核详情
*/
export default {
name: "shippingDetail",
props: {
processId: {
type: [Number, String],
},
},
data() {
return {
boxBackVO: {},
loadDetail: {},
// 柜型
cabinetLabel: "",
//渠道
channelList: [],
// 弹出配置
dialogConfig: {
title: "",
visible: false,
},
};
},
created() {
getChannelList().then((res) => (this.channelList = res.data));
},
methods: {
/* 获取详情 */
getApprovalDetail(processId) {
approvalDetail({ approvalId: processId }).then((res) => {
this.boxBackVO = res.data.boxBackVO;
this.loadDetail = res.data.loadDetail;
});
},
/* 获取柜型 */
getCabinetLabel(cabinetId) {
getCabinetPage(null).then((response) => {
const cabinetList = response.data.list;
for (const cabinetItem of cabinetList) {
if (cabinetItem.id == cabinetId) {
this.cabinetLabel = cabinetItem.name;
break;
}
}
});
},
/* 打开订单列表 */
showOrder() {
this.$set(this.dialogConfig, "title", `${this.boxBackVO.selfNo} 订单列表`);
this.$set(this.dialogConfig, "visible", true);
},
/* 合计 */
calcSum(goodsList) {
let sum = 0;
goodsList.forEach((element) => {
sum = sum + element.num;
});
return sum;
},
/* 跳转订单详情 */
jumpOrderDetail(row) {
this.$router.push("/order/associated-order/" + row.orderId);
},
},
watch: {
processId(val) {
this.getApprovalDetail(val);
},
boxBackVO(val) {
// 柜型
this.getCabinetLabel(val.cabinetId);
},
},
computed: {
/* 渠道 */
getShipChannelName() {
return (shippingChannelId) => {
for (const channelItem of this.channelList) {
if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh;
}
return "/";
}
};
},
/* 货柜状态 */
getCabinetStatus() {
return (shippingVO) => {
return getStatusName(getSeaStatus(shippingVO));
};
},
/* 体积重量 */
getVolumeWeight() {
return (total) => {
return `${total?.num ?? 0} ${total?.volume ?? 0}m³ ${
total?.weight ?? 0
}kg`;
};
},
/* 是否显示卸柜箱数 */
isShowColumn() {
return (shippingVO) => {
return getSeaStatus(shippingVO) >= 142 ? true : false;
};
},
},
};
</script>
<style lang="scss" scoped>
</style>
......@@ -30,7 +30,7 @@
<el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit(2)">封柜</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="danger" @click="startCabinet">开始装柜</el-button>
<el-button type="danger" @click="startCabinet" :disabled="isStartCabinet">开始装柜</el-button>
</el-row>
</div>
</template>
......@@ -104,6 +104,13 @@ export default {
this.dialogVisible = true;
},
},
computed: {
isStartCabinet() {
const { currNode, shipmentObj } = this.$attrs;
const status = shipmentObj[currNode.keyName];
return status === 46 ? true : false;
},
},
};
</script>
......
......@@ -120,14 +120,10 @@
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body>
<!-- 已装未装订单 -->
<template v-if="dialogConfig.type === 'orderTable'">
<div style="display: flex;">
<el-table :data="orderList.loadList">
<el-table-column label="已装" align="center" prop="loadTag" />
</el-table>
<el-table :data="orderList.unLoadList">
<el-table-column label="未装" align="center" prop="unloadTag" />
</el-table>
</div>
<el-table :data="orderList" border>
<el-table-column label="已装" align="center" prop="loadTag" />
<el-table-column label="未装" align="center" prop="unloadTag" />
</el-table>
</template>
<!-- 补单 -->
<supplementOrder v-if="dialogConfig.type === 'supplementOrder' && dialogConfig.dialogVisible" v-bind="$attrs" :shipmentObj="shipmentObj" @supplementFinish="supplementFinish" />
......@@ -240,7 +236,7 @@ export default {
fullscreen: false,
},
// 已装/未装
orderList: {},
orderList: [],
// 柜型
cabinetList: [],
// 二维码/条码编号
......@@ -295,14 +291,20 @@ export default {
orderClick(row) {
orderTagList({ orderId: row.orderId }).then((res) => {
const { data = [] } = res;
this.orderList = {
loadList: data.loadList.map((item) => ({
loadTag: item,
})),
unLoadList: data.unLoadList.map((item) => ({
unloadTag: item,
})),
};
this.orderList = [];
// 取最长的list
let dataLength = data.loadList.length;
if (data.unLoadList.length > dataLength) {
dataLength = data.unLoadList.length;
}
// 组装数据,用一个table组件渲染
for (let index = 0; index < dataLength; index++) {
this.orderList.push({
loadTag: data.loadList[index],
unloadTag: data.unLoadList[index],
});
}
});
this.shwoDialog({
type: "orderTable",
......
......@@ -43,7 +43,7 @@
<el-row class="right-title">
<div>货物筛选</div>
<div>当前装柜:{{partData.title}}</div>
<div>可预装方数:无返回m³,重量:无返回Kg</div>
<div>可预装方数:{{unloadStatistics.volume}}m³,重量:{{unloadStatistics.weight}}Kg</div>
</el-row>
<!-- 搜索工作栏 -->
......@@ -76,7 +76,7 @@
<div>
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
</div>
<div>入仓时间:{{item.rucangtime}}</div>
<div>入仓时间:{{formatDate(item.rucangTime)}}</div>
<div>
<el-button type="text" @click="handleGoods('all', item)">[全部预装]</el-button>
<el-button type="text" @click="foldTable(index, item)">[{{item.fold ? '展开' : '收起'}}]</el-button>
......@@ -84,12 +84,12 @@
</el-row>
<el-collapse-transition>
<div v-show="!item.fold">
<el-table v-loading="loading" :data="item.orderItemList" border>
<el-table v-loading="loading" :data="item.boxOrderItemList" border>
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column label="品名" align="center" prop="prodTitleZh" min-width="500" />
<el-table-column label="品牌" align="center" prop="brandType" width="120">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="scope.row.brandType" />
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_BRAND_TYPE" :value="scope.row.brandType" />
</template>
</el-table-column>
<el-table-column label="箱数" align="center" prop="num" width="120" />
......@@ -103,7 +103,9 @@
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p>
</template>
</el-table-column>
<el-table-column label="预装柜" align="center" prop="weight" width="120" />
<el-table-column label="预装柜" align="center" prop="" width="120">
无返回
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleGoods('singele',scope.row)">预装</el-button>
......@@ -125,11 +127,11 @@
<el-col :span="6" class="totle-info">
<div>
<p>总计:</p>
<p>111</p>
<p>无返回</p>
</div>
<div>
<p>容量:</p>
<p>111</p>
<p>无返回</p>
</div>
</el-col>
</el-row>
......@@ -149,6 +151,7 @@ import {
createGoods,
remove,
} from "@/api/ecw/boxSea";
import { formatDate } from "../../utils";
/**
* 补单
*/
......@@ -174,6 +177,7 @@ export default {
toBePreList: [],
total: 0,
loading: false,
unloadStatistics: {},
};
},
created() {
......@@ -211,8 +215,10 @@ export default {
...this.queryParams,
};
preloadPage({ ...params, ...this.pageParam }).then((res) => {
this.toBePreList = res.data.list;
this.total = res.data.total;
const { data } = res;
this.toBePreList = data.dataList?.list ?? [];
this.total = data.dataList?.total ?? 0;
this.unloadStatistics = data.unloadStatistics ?? {};
this.loading = false;
});
},
......@@ -317,6 +323,7 @@ export default {
})
.catch((_) => {});
},
formatDate,
},
computed: {
/** 目的地 */
......
<template>
<div>
<el-form ref="cusDeclarationForm" :rules="rules" :model="cusDeclarationObj" label-width="120px">
<el-form-item label="单证要求">我司全代 <el-button type="primary" style="margin-left:10px;" @click="downloadVGM">VGM声明</el-button>
<el-form-item label="单证要求">无返回 <el-button type="primary" style="margin-left:10px;" @click="downloadVGM">VGM声明</el-button>
</el-form-item>
<el-form-item label="柜重" prop="dcBoxWgt">
<el-input v-model="cusDeclarationObj.dcBoxWgt" placeholder="请输入柜重" clearable />
......@@ -70,31 +70,31 @@
<el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="extraCost">额外费用</el-button>
<el-button type="primary" @click="extraCost" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCustomsStatus === '3'">额外费用</el-button>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog customsClearance" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<el-dialog custom-class="shipping-dialog customsClearance" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" width="700px" :modal-append-to-body=false append-to-body>
<el-row>
<el-row>
<el-form label-width="100px">
<el-form-item label="订单号" class="two-element">
<el-input v-model="orderNo" placeholder="请输入订单号" clearable />
<el-button type="primary" icon="el-icon-search"></el-button>
<el-button type="primary" icon="el-icon-search" @click="searchOrder"></el-button>
</el-form-item>
</el-form>
</el-row>
<el-row>
<el-table :data="[{}]">
<el-table-column label="订单号" align="center" prop="selfNo" />
<el-table-column label="报关费用" align="center" prop="orderFees">
<el-table :data="costOrderList">
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="报关费用" align="center" prop="fee">
<template slot-scope="scope">
<el-input v-model="scope.row.orderFees" placeholder="请输入内容" />
<el-input-number v-model="scope.row.fee" controls-position="right" :min="1"></el-input-number>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="small">确定</el-button>
<el-button type="primary" size="small" @click="createExtraCost(scope.row)">确定</el-button>
</template>
</el-table-column>
</el-table>
......@@ -102,22 +102,22 @@
<el-row class="cost-title">
<div>额外费用订单</div>
<div>
<el-button size="small">重置</el-button>
<el-button size="small" @click="restCostList()">重置</el-button>
</div>
</el-row>
<el-row>
<el-table :data="[{}]">
<el-table :data="costList">
<el-table-column type="selection" width="55" />
<el-table-column label="订单号" align="center" prop="selfNo" />
<el-table-column label="报关费用" align="center" prop="customsFees">
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="报关费用" align="center" prop="fee" width="220px">
<template slot-scope="scope">
<el-input v-model="scope.row.customsFees" placeholder="请输入内容" />
<el-input-number v-model="scope.row.fee" controls-position="right" :min="1"></el-input-number>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="small">修改</el-button>
<el-button size="small">重置</el-button>
<el-button type="primary" size="small" @click="updateExtraCost(scope.row)">修改</el-button>
<el-button size="small" @click="restCostList(scope.row)">重置</el-button>
</template>
</el-table-column>
</el-table>
......@@ -129,7 +129,15 @@
<script>
import supplierSelect from "./common/supplierSelect.vue";
import { customsCreate, serviceMsg } from "@/api/ecw/boxSea";
import {
customsCreate,
serviceMsg,
extraCostList,
extraCostOrder,
extraCostCreate,
extraCostUpdate,
approvalCreate,
} from "@/api/ecw/boxSea";
import { formatNumberString, formatDateStr } from "../utils";
import ImageUpload from "@/components/ImageUpload";
......@@ -157,6 +165,10 @@ export default {
},
// 订单号
orderNo: "",
// 订单列表
costOrderList: [],
// 额外费用列表
costList: [],
};
},
created() {
......@@ -184,13 +196,107 @@ export default {
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
// 查验
const { dcCustomsStatus, dcCheckStatus } = this.cusDeclarationObj;
if (dcCustomsStatus === "3") {
// 退场/部分退场
if (["1", "2"].includes(dcCheckStatus)) {
approvalCreate({
approvalStatus: 0,
approvalType: dcCheckStatus === "1" ? 5 : 6, // 5报关全退,6报关部分退
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
} else {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
}
});
}
});
},
/* 查询订单号 */
searchOrder() {
if (!this.orderNo) {
this.$message.error("请输入订单号");
return;
}
extraCostOrder({
shipmentId: this.$attrs.shipmentObj.id,
orderNo: this.orderNo,
}).then((res) => {
this.costOrderList = [
{
orderNo: this.orderNo,
orderId: res.data,
},
];
this.searchCostList(res.data);
});
},
/* 查询额外费用订单 */
searchCostList(orderId) {
extraCostList({
shipmentId: this.$attrs.shipmentObj.id,
orderId: orderId,
}).then((res) => {
this.costList = res.data.map((item) => {
return { originalFee: item.fee, ...item };
});
});
},
/* 创建额外费用 */
createExtraCost(row) {
if (!row.fee) {
this.$message.error("请输入费用");
return;
}
extraCostCreate({
fee: row.fee,
orderId: row.orderId,
orderNo: row.orderNo,
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.searchCostList(row.orderId);
});
});
},
/* 修改额外费用 */
updateExtraCost(row) {
if (!row.fee) {
this.$message.error("请输入费用");
return;
}
extraCostUpdate(row).then((res) => {
serviceMsg(res, this).then(() => {
this.searchCostList(row.orderId);
});
});
},
/* 重置 */
restCostList(row) {
this.costList = this.costList.map((item) => {
if (row && row.id === item.id) {
return {
...item,
fee: item.originalFee,
};
}
if (!row) {
return {
...item,
fee: item.originalFee,
};
}
return item;
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
......@@ -203,7 +309,12 @@ export default {
},
// 额外费用
extraCost() {
this.$set(this.dialogConfig, "title", "自编号");
const { shipmentObj } = this.$attrs;
// 清空额外费用
this.orderNo = "";
this.costOrderList = [];
this.costList = [];
this.$set(this.dialogConfig, "title", `${shipmentObj.selfNo} 报关费用`);
this.$set(this.dialogConfig, "dialogVisible", true);
},
// 计算VGM重量
......
......@@ -31,7 +31,7 @@
</el-select>
</el-form-item>
<el-form-item label="订单号" prop="toBePreOrderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号码" clearable />
<el-input v-model="queryParams.toBePreOrderNo" placeholder="请输入订单号码" clearable />
</el-form-item>
<el-form-item label="已预装单号" prop="preOrderNo">
<el-input v-model="queryParams.preOrderNo" placeholder="请输入已预装单号" clearable />
......@@ -126,7 +126,7 @@
<el-table-column type="selection" align="center" width="55" fixed="left" />
<el-table-column label="订单号" align="center" prop="orderNo" width="120" />
<el-table-column label="目的地" align="center" prop="destWarehouseName" width="120" />
<el-table-column label="入仓时间" align="center" prop="rucangtime" width="120" />
<el-table-column label="入仓时间" align="center" prop="rucangTime" width="120" />
<el-table-column label="品名" align="center" prop="prodTitleZh" width="120" />
<el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量/重货比" align="center" width="140" prop="volumeWeight">
......@@ -142,7 +142,7 @@
</el-table-column>
<el-table-column label="备案" align="center" prop="productRecord" width="100">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="scope.row.productRecord" />
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_BRAND_TYPE" :value="scope.row.productRecord" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width" fixed="right">
......@@ -169,15 +169,15 @@
<div class="preinstall-title preinstalled">
<div class="red-label">
<p>筛选后待预装数量:</p>
<p>无返回</p>
<p>{{unloadStatistics.num}}箱</p>
</div>
<div class="red-label">
<p>方数:</p>
<p>无返回</p>
<p>{{unloadStatistics.volume}}m³</p>
</div>
<div class="red-label">
<p>重量:</p>
<p>无返回</p>
<p>{{unloadStatistics.weight}}kg</p>
</div>
</div>
</el-row>
......@@ -199,7 +199,7 @@
</div>
<div>
<p>入仓时间:</p>
<p>{{item.rucangtime}}</p>
<p>{{formatDate(item.rucangTime)}}</p>
</div>
<div>
<p>重货比:</p>
......@@ -214,12 +214,12 @@
</el-dropdown>
</div>
</el-row>
<el-table v-loading="toBePreLoading" :data="item.orderItemList" border show-summary :summary-method="getSummaries">
<el-table v-loading="toBePreLoading" :data="item.boxOrderItemList" border show-summary :summary-method="getSummaries">
<el-table-column type="index" align="center" label="序号" width="50" />
<el-table-column label="品名" align="center" prop="prodTitleZh" />
<el-table-column label="备案" align="center" prop="brandType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="scope.row.brandType" />
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_BRAND_TYPE" :value="scope.row.brandType" />
</template>
</el-table-column>
<el-table-column label="箱数" align="center" prop="num" />
......@@ -229,8 +229,14 @@
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p>
</template>
</el-table-column>
<el-table-column label="报关方式" align="center" prop="" />
<el-table-column label="包装类型" align="center" prop="" />
<el-table-column label="报关方式" align="center" prop="">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
</el-table-column>
<el-table-column label="包装类型" align="center" prop="">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_PACKAGE_TYPE" :value="scope.row.unit" />
</template>
</el-table-column>
<el-table-column label="材质" align="center" prop="material" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -278,6 +284,7 @@ import {
approvalCreate,
} from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import { formatDate } from "../utils";
/**
* 预装
......@@ -309,6 +316,7 @@ export default {
toBePreLoading: false,
toBePreList: [],
total: 0,
unloadStatistics: {},
// 显示搜索条件
showSearch: true,
......@@ -345,6 +353,7 @@ export default {
this.handleQuery("toBePre");
},
methods: {
formatDate,
/* 获取城市 */
importCityName(id) {
var arr = this.$attrs.warehouseList.filter((item) => item.id == id);
......@@ -358,9 +367,10 @@ export default {
getSecGoods() {
this.preLoading = true;
// 处理查询参数
let params = { ...this.queryParams };
let params = this.getParams();
// 已预装单号
params.orderNo = params.preOrderNo;
delete params.preOrderNo;
params.shipmentId = this.shipmentObj.id;
secGoodsList(params).then((res) => {
this.preList = res.data;
......@@ -371,12 +381,15 @@ export default {
getPreLoad() {
this.toBePreLoading = true;
// 处理查询参数
let params = { ...this.queryParams };
let params = this.getParams();
// 订单号
params.orderNo = params.toBePreOrderNo;
delete params.toBePreOrderNo;
preloadPage({ ...params, ...this.pageParam }).then((res) => {
this.toBePreList = res.data.list;
this.total = res.data.total;
const { data } = res;
this.toBePreList = data.dataList?.list ?? [];
this.total = data.dataList?.total ?? 0;
this.unloadStatistics = data.unloadStatistics ?? {};
this.toBePreLoading = false;
});
},
......@@ -525,6 +538,15 @@ export default {
this.pageParam.pageNo = 1;
this.getPreLoad();
},
getParams() {
const { rucangtime = [] } = this.queryParams;
delete this.queryParams.rucangtime;
return {
...this.queryParams,
rucangTimeStart: rucangtime[0],
rucangTimeEnd: rucangtime[1],
};
},
},
};
</script>
......
......@@ -16,7 +16,7 @@
import { approvalCreate, serviceMsg } from "@/api/ecw/boxSea";
/**
* 预装反审
* 反审
*/
export default {
name: "review",
......@@ -32,11 +32,12 @@ export default {
onSubmit() {
this.$refs["reviewForm"].validate((valid) => {
if (valid) {
const { currNode, shipmentObj } = this.$attrs;
approvalCreate({
shipmentId: this.$attrs.shipmentObj.id,
shipmentId: shipmentObj.id,
...this.reviewObj,
approvalStatus: 0,
approvalType: 4, // 预装反审
approvalType: currNode.type === "preinstall" ? 4 : 7, // 4预装反审 7卸柜反审核
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
......
......@@ -16,7 +16,7 @@
<el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="danger" @click="startUnloading">开始卸柜</el-button>
<el-button type="danger" @click="startUnloading" :disabled="isStartUnloading">开始卸柜</el-button>
</el-row>
<!-- 开始卸柜 -->
......@@ -91,6 +91,13 @@ export default {
this.dialogVisible = true;
},
},
computed: {
isStartUnloading() {
const { currNode, shipmentObj } = this.$attrs;
const status = shipmentObj[currNode.keyName];
return status === 146 ? true : false;
},
},
};
</script>
......
......@@ -18,9 +18,9 @@
<el-select v-model="currPart" placeholder="请选择当前部分">
</el-select>
<p>
<span>13</span>
<span>10.83m3</span>
<span>210kg</span>
<span>无返回 </span>
<span>无返回 m3</span>
<span>无返回 kg</span>
</p>
</el-row>
......@@ -62,15 +62,16 @@
<div class="label-font">
<p>
<span>总计:</span>
<span>{{pageData.totalStatistics ? pageData.totalStatistics.num : 0}}箱</span>
<span>无返回</span>
<!-- <span>{{pageData.totalStatistics ? pageData.totalStatistics.num : 0}}箱</span>
<span>{{pageData.totalStatistics ? pageData.totalStatistics.volume : 0}}m3</span>
<span>{{pageData.totalStatistics ? pageData.totalStatistics.weight : 0}}kg</span>
<span>{{pageData.totalStatistics ? pageData.totalStatistics.weight : 0}}kg</span> -->
</p>
</div>
<div class="label-font">
<p>
<span>已卸:</span>
<span>0</span>
<span>无返回</span>
</p>
</div>
</el-row>
......
......@@ -32,7 +32,6 @@
import bookingWidget from "./nodePage/booking.vue";
import trailerWidget from "./nodePage/trailer.vue";
import preinstallWidget from "./nodePage/preinstall.vue";
import preinstallReviewWidget from "./nodePage/preinstallReview.vue";
import agentWidget from "./nodePage/agent.vue";
import cabinetWidget from "./nodePage/cabinet/index.vue";
import cusDeclarationWidget from "./nodePage/cusDeclaration.vue";
......@@ -46,6 +45,7 @@ import arrivalWidget from "./nodePage/arrival.vue";
import cusClearanceWidget from "./nodePage/cusClearance.vue";
import unloadingWidget from "./nodePage/unloading/index.vue";
import settlementWidget from "./nodePage/settlement.vue";
import ReviewWidget from "./nodePage/review.vue";
/**
* 海运流程图
......@@ -70,7 +70,7 @@ export default {
cusClearanceWidget,
unloadingWidget,
settlementWidget,
preinstallReviewWidget,
ReviewWidget,
},
props: {
shipmentObj: Object,
......@@ -129,15 +129,24 @@ export default {
// 预装
case "preinstall":
// 预装反审
const status = this.shipmentObj[node.keyName];
if ([23, 24].includes(status)) {
this.currentComponent = `preinstallReviewWidget`;
const preStatus = this.shipmentObj[node.keyName];
if ([23, 24].includes(preStatus)) {
this.currentComponent = `ReviewWidget`;
this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "title", "预装反审");
} else {
this.$set(this.dialogConfig, "fullscreen", true);
this.$set(this.dialogConfig, "title", "出货安排(预装)");
}
// 卸柜
case "unloading":
// 卸柜反审
const unStatus = this.shipmentObj[node.keyName];
if ([144, 145].includes(unStatus)) {
this.currentComponent = `ReviewWidget`;
this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "title", "卸柜反审");
}
break;
}
this.$set(this.dialogConfig, "dialogVisible", true);
......@@ -192,9 +201,10 @@ export default {
<style lang="scss">
.app-seaProcess {
.shipping-chart {
width: max-content;
display: flex;
padding: 10px 0;
padding: 10px 10px;
min-width: 1320px;
.chart-nodes {
display: flex;
align-items: center;
......
<template>
<div class="app-seaStepDetail">
<el-scrollbar :vertical="true">
<div class="shipping-step">
<template v-for="(step, index) in flatSeaStep">
<div :key="index" v-if="shipmentObj[step.voName] && columnsMapping[step.voName]" class="step-table">
<div class="step-title">{{step.title}}</div>
<div v-for="(data, index) in columnsMapping[step.voName]" :key="index" class="step-content">
<p>{{data.title}}</p>
<p>{{getObjInfo(step.voName, data)}}</p>
</div>
<el-scrollbar :vertical="true" viewClass="shipping-step">
<!-- <div class="shipping-step"> -->
<template v-for="(step, index) in flatSeaStep">
<div :key="index" v-if="shipmentObj[step.voName] && columnsMapping[step.voName]" class="step-table">
<div class="step-title">{{step.title}}</div>
<div v-for="(data, index) in columnsMapping[step.voName]" :key="index" class="step-content">
<p>{{data.title}}</p>
<p>{{getObjInfo(step.voName, data)}}</p>
</div>
</template>
</div>
</div>
</template>
<!-- </div> -->
</el-scrollbar>
</div>
</template>
......@@ -30,348 +30,7 @@ export default {
data() {
return {
flatSeaStep: this.seaBaseData.flat(),
columnsMapping: {
bookSeaInfo: [
{
title: "SO NO",
key: "sono",
},
{
title: "船公司类型",
key: "shipCompanyType",
type: "supplier",
},
{
title: "驳船港",
key: "bargePortId",
type: "dock",
},
{
title: "大船港",
key: "bigPortId",
type: "dock",
},
{
title: "目的港",
key: "destPortId",
type: "dock",
},
{
title: "订舱公司",
key: "spaceCompanyId",
type: "supplier",
},
{
title: "预计驳船时间",
key: "bargeTime",
type: "date",
},
{
title: "预计开船时间",
key: "sailTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
preInstallInfo: [
{
title: "预装时间",
key: "createTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
trailerInfo: [
{
title: "货柜号",
key: "tlContainerNo",
},
{
title: "封条",
key: "tlStripSeal",
},
{
title: "拖车公司",
key: "tlCompanyId",
type: "supplier",
},
{
title: "拖车时间",
key: "tlTime",
type: "date",
},
{
title: "车牌",
key: "tlLicensePlate",
},
{
title: "司机",
key: "tlDriver",
},
{
title: "联系方式",
key: "tlDriverContact",
},
{
title: "业务员",
key: "operator",
},
],
agentInfo: [
{
title: "代理商",
key: "agentId",
type: "supplier",
},
{
title: "业务员",
key: "operator",
},
],
cabinetInfo: [
{
title: "到仓时间",
key: "ldInWarehouseTime",
type: "date",
},
{
title: "仓库类型",
key: "ldWarehouseType",
type: "warehouse",
},
{
title: "装柜时间",
key: "ldBoxTime",
type: "date",
},
{
title: "出仓时间",
key: "ldOutWarehouseTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
customsInfo: [
{
title: "报关方式",
key: "dcCustomsType",
type: "shipping_customs_type",
},
{
title: "报关行公司",
key: "dcCompanyId",
type: "supplier",
},
{
title: "截关时间",
key: "dcCutOffTime",
type: "date",
},
{
title: "状态",
key: "dcCustomsStatus",
type: "shipping_dcCustoms_status",
},
{
title: "放行时间",
key: "dcPassTime",
type: "date",
},
{
title: "新封条",
key: "dcStripSeal",
},
{
title: "柜重",
key: "dcBoxWgt",
},
{
title: "货重",
key: "dcGoodsWgt",
},
{
title: "VGM重量",
key: "dcVgmWgt",
},
{
title: "业务员",
key: "operator",
},
],
shipConfigInfo: [
{
title: "已配/免配",
key: "saExmtStatus",
type: "saExmtStatus",
},
{
title: "业务员",
key: "operator",
},
],
ladingBillInfo: [
{
title: "清关代理",
key: "agentId",
type: "supplier",
},
{
title: "提单品名",
key: "blMblNo",
},
{
title: "通知方",
key: "notifyingId",
},
{
title: "提单备注",
key: "remarks",
},
{
title: "数量",
key: "packageNum",
},
{
title: "体积",
key: "cbm",
},
{
title: "业务员",
key: "operator",
},
],
bargeInfo: [
{
title: "驳船",
key: "bgExmtStatus",
type: "bgExmtStatus",
},
{
title: "业务员",
key: "operator",
},
],
shippingInfo: [
{
title: "实际开船时间",
key: "dtRealShipTime",
type: "datetime",
},
{
title: "预计到港时间",
key: "dtEstArrivalTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
clearanceDocInfo: [
{
title: "agent list",
key: "cdAgentlistType",
type: "isFile",
},
{
title: "soncap",
key: "cdSoncapType",
type: "isFile",
},
{
title: "出单方式",
key: "cdOutBillType",
type: "billingMethod",
},
{
title: "寄送时间",
key: "cdSendTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
arrivalInfo: [
{
title: "实际到港时间",
key: "apRealTime",
type: "datetime",
},
{
title: "确认到港",
key: "apConfirmTime",
type: "datetime",
},
{
title: "卸港时间",
key: "apUnloadPortTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
clearanceInfo: [
{
title: "预计清关时间",
key: "clEstTime",
type: "date",
},
{
title: "清关时间",
key: "clClearTime",
type: "datetime",
},
{
title: "业务员",
key: "operator",
},
],
cabinetUnloadInfo: [
{
title: "到仓时间",
key: "ulWarehouseTime",
type: "date",
},
{
title: "卸货时间",
key: "ulBoxTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
settlementInfo: [
{
title: "可结算",
key: "slSettlementTime",
type: "date",
},
{
title: "已结算",
key: "slSettledTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
},
columnsMapping: _C.getColmnMapping(),
};
},
methods: {
......@@ -445,6 +104,8 @@ export default {
flex-wrap: wrap;
align-content: flex-start;
height: 550px;
min-width: 1300px;
padding: 10px 10px;
p {
margin: 0;
......
......@@ -43,7 +43,7 @@ import { getWarehouseList } from "@/api/ecw/warehouse";
import { getSupplierPage } from "@/api/ecw/supplier";
import { getDockPage } from "@/api/ecw/dock";
import { listUser } from "@/api/system/user";
import { getStatusName, seaBaseData } from "./utils";
import { getSeaStatus, getStatusName, seaBaseData } from "./utils";
/**
* 海运操作主页面
......@@ -117,34 +117,7 @@ export default {
watch: {
/* 监听发货对象 */
shipmentObj(val) {
let currNodeStatus = 11,
isBreak = false;
// 迭代每个节点
for (let i = 0; i < this.seaBaseData.length; i++) {
const nodes = this.seaBaseData[i];
for (let j = 0; j < nodes.length; j++) {
const node = nodes[j];
const { keyName, voName, status } = node;
if (!keyName) continue;
const { start, wait, end } = status;
if (start.includes(val[keyName]) && val[voName]) {
currNodeStatus = val[keyName];
}
if (wait.includes(val[keyName])) {
currNodeStatus = val[keyName];
isBreak = true;
break;
}
if (end.includes(val[keyName])) {
currNodeStatus = val[keyName];
}
}
if (isBreak) break;
}
this.statusLabel = getStatusName().get(currNodeStatus);
this.statusLabel = getStatusName(getSeaStatus(val));
},
},
};
......
import dayjs from "dayjs";
function getStatusName() {
/**
* 节点状态值
*
* @return {*}
*/
function getStatusName(statu) {
const statusName = new Map();
statusName.set(11, "未订舱");
......@@ -60,9 +65,14 @@ function getStatusName() {
statusName.set(152, "结算中");
statusName.set(153, "已结算");
return statusName;
return statusName.get(statu);
}
/**
* 海运流程
*
* @return {*}
*/
function seaBaseData() {
return [
[
......@@ -400,6 +410,359 @@ function seaBaseData() {
];
}
/**
* 详情显示列
*
* @return {*}
*/
function getColmnMapping() {
return {
bookSeaInfo: [
{
title: "SO NO",
key: "sono",
},
{
title: "船公司类型",
key: "shipCompanyType",
type: "supplier",
},
{
title: "驳船港",
key: "bargePortId",
type: "dock",
},
{
title: "大船港",
key: "bigPortId",
type: "dock",
},
{
title: "目的港",
key: "destPortId",
type: "dock",
},
{
title: "订舱公司",
key: "spaceCompanyId",
type: "supplier",
},
{
title: "预计驳船时间",
key: "bargeTime",
type: "date",
},
{
title: "预计开船时间",
key: "sailTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
preInstallInfo: [
{
title: "预装时间",
key: "createTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
trailerInfo: [
{
title: "货柜号",
key: "tlContainerNo",
},
{
title: "封条",
key: "tlStripSeal",
},
{
title: "拖车公司",
key: "tlCompanyId",
type: "supplier",
},
{
title: "拖车时间",
key: "tlTime",
type: "date",
},
{
title: "车牌",
key: "tlLicensePlate",
},
{
title: "司机",
key: "tlDriver",
},
{
title: "联系方式",
key: "tlDriverContact",
},
{
title: "业务员",
key: "operator",
},
],
agentInfo: [
{
title: "代理商",
key: "agentId",
type: "supplier",
},
{
title: "业务员",
key: "operator",
},
],
cabinetInfo: [
{
title: "到仓时间",
key: "ldInWarehouseTime",
type: "date",
},
{
title: "仓库类型",
key: "ldWarehouseType",
type: "warehouse",
},
{
title: "装柜时间",
key: "ldBoxTime",
type: "date",
},
{
title: "出仓时间",
key: "ldOutWarehouseTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
customsInfo: [
{
title: "报关方式",
key: "dcCustomsType",
type: "shipping_customs_type",
},
{
title: "报关行公司",
key: "dcCompanyId",
type: "supplier",
},
{
title: "截关时间",
key: "dcCutOffTime",
type: "date",
},
{
title: "状态",
key: "dcCustomsStatus",
type: "shipping_dcCustoms_status",
},
{
title: "放行时间",
key: "dcPassTime",
type: "date",
},
{
title: "新封条",
key: "dcStripSeal",
},
{
title: "柜重",
key: "dcBoxWgt",
},
{
title: "货重",
key: "dcGoodsWgt",
},
{
title: "VGM重量",
key: "dcVgmWgt",
},
{
title: "业务员",
key: "operator",
},
],
shipConfigInfo: [
{
title: "已配/免配",
key: "saExmtStatus",
type: "saExmtStatus",
},
{
title: "业务员",
key: "operator",
},
],
ladingBillInfo: [
{
title: "清关代理",
key: "agentId",
type: "supplier",
},
{
title: "提单品名",
key: "blMblNo",
},
{
title: "通知方",
key: "notifyingId",
},
{
title: "提单备注",
key: "remarks",
},
{
title: "数量",
key: "packageNum",
},
{
title: "体积",
key: "cbm",
},
{
title: "业务员",
key: "operator",
},
],
bargeInfo: [
{
title: "驳船",
key: "bgExmtStatus",
type: "bgExmtStatus",
},
{
title: "业务员",
key: "operator",
},
],
shippingInfo: [
{
title: "实际开船时间",
key: "dtRealShipTime",
type: "datetime",
},
{
title: "预计到港时间",
key: "dtEstArrivalTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
clearanceDocInfo: [
{
title: "agent list",
key: "cdAgentlistType",
type: "isFile",
},
{
title: "soncap",
key: "cdSoncapType",
type: "isFile",
},
{
title: "出单方式",
key: "cdOutBillType",
type: "billingMethod",
},
{
title: "寄送时间",
key: "cdSendTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
arrivalInfo: [
{
title: "实际到港时间",
key: "apRealTime",
type: "datetime",
},
{
title: "确认到港",
key: "apConfirmTime",
type: "datetime",
},
{
title: "卸港时间",
key: "apUnloadPortTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
clearanceInfo: [
{
title: "预计清关时间",
key: "clEstTime",
type: "date",
},
{
title: "清关时间",
key: "clClearTime",
type: "datetime",
},
{
title: "业务员",
key: "operator",
},
],
cabinetUnloadInfo: [
{
title: "到仓时间",
key: "ulWarehouseTime",
type: "date",
},
{
title: "卸货时间",
key: "ulBoxTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
settlementInfo: [
{
title: "可结算",
key: "slSettlementTime",
type: "date",
},
{
title: "已结算",
key: "slSettledTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
};
}
/**
* 常量字典
*/
const constantDict = {
// 配船状态
saExmtStatus: [
......@@ -447,6 +810,13 @@ const constantDict = {
],
};
/**
* string format number
*
* @param {*} obj
* @param {*} keys
* @return {*}
*/
function formatStringNumber(obj, keys) {
for (const [key, value] of Object.entries(obj)) {
if (keys.includes(key) && !Number.isNaN(Number(value))) {
......@@ -456,6 +826,13 @@ function formatStringNumber(obj, keys) {
return obj;
}
/**
* number format string
*
* @param {*} obj
* @param {*} keys
* @return {*}
*/
function formatNumberString(obj, keys) {
for (const [key, value] of Object.entries(obj)) {
if (keys.includes(key) && value) {
......@@ -465,6 +842,14 @@ function formatNumberString(obj, keys) {
return obj;
}
/**
* stringDate format Date
*
* @param {*} obj
* @param {*} keys
* @param {string} [format="YYYY-MM-DD"]
* @return {*}
*/
function formatDateStr(obj, keys, format = "YYYY-MM-DD") {
for (const [key, value] of Object.entries(obj)) {
if (keys.includes(key) && dayjs(value).isValid()) {
......@@ -474,6 +859,43 @@ function formatDateStr(obj, keys, format = "YYYY-MM-DD") {
return obj;
}
function formatDate(date, format = "YYYY-MM-DD") {
if (!date) return date;
return dayjs(date).format(format);
}
function getSeaStatus(val) {
let currNodeStatus = 11,
isBreak = false,
datas = seaBaseData();
// 迭代每个节点
for (let i = 0; i < datas.length; i++) {
const nodes = datas[i];
for (let j = 0; j < nodes.length; j++) {
const node = nodes[j];
const { keyName, voName, status } = node;
if (!keyName) continue;
const { start, wait, end } = status;
if (start.includes(val[keyName]) && val[voName]) {
currNodeStatus = val[keyName];
}
if (wait.includes(val[keyName])) {
currNodeStatus = val[keyName];
isBreak = true;
break;
}
if (end.includes(val[keyName])) {
currNodeStatus = val[keyName];
}
}
if (isBreak) break;
}
return currNodeStatus;
}
export const fileTypes = [
"doc",
"xls",
......@@ -487,9 +909,12 @@ export const fileTypes = [
export {
getStatusName,
getColmnMapping,
getSeaStatus,
seaBaseData,
constantDict,
formatStringNumber,
formatDateStr,
formatNumberString,
formatDate,
};
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-card shadow="never">
<div slot="header" class="clearfix">
<span>渠道信息</span>
......@@ -42,6 +42,14 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="简码" prop="code">
<el-input
v-model="form.code"
placeholder="请输入简码"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="归属仓库" prop="warehouseIds">
<!-- <el-select v-model="form.wareHouseIds">
......@@ -86,7 +94,7 @@
</el-form-item>
</el-col> -->
</el-row>
<el-form-item label="备注-中文" prop="remarksZh">
<el-input
v-model="form.remarksZh"
......@@ -105,22 +113,22 @@
</el-radio-group>
</el-form-item> -->
</el-card>
<el-card shadow="never">
<div slot="header" class="clearfix">
<span>渠道收费规则</span>
</div>
<el-form-item label="清关单价" prop="customsClearUnit">
<el-input v-model="form.customsClearUnit" placeholder="请输入清关单价">
<span slot="append">$</span>
</el-input>
</el-form-item>
<el-form-item label="每0.5KG单价" prop="weightUnitPrice">
<el-input v-model="form.weightUnitPrice" placeholder="此字段名暂缺" >
<span slot="append">$</span>
</el-input>
</el-form-item>
</el-card>
<!-- <el-card shadow="never">-->
<!-- <div slot="header" class="clearfix">-->
<!-- <span>渠道收费规则</span>-->
<!-- </div>-->
<!-- -->
<!-- <el-form-item label="清关单价" prop="customsClearUnit">-->
<!-- <el-input v-model="form.customsClearUnit" placeholder="请输入清关单价">-->
<!-- <span slot="append">$</span>-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="每0.5KG单价" prop="weightUnitPrice">-->
<!-- <el-input v-model="form.weightUnitPrice" placeholder="此字段名暂缺" >-->
<!-- <span slot="append">$</span>-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<!-- </el-card>-->
</el-form>
<div>
<el-button type="primary" @click="submitForm">确 定</el-button>
......@@ -222,4 +230,4 @@ export default {
.el-card{
margin-bottom: 20px;
}
</style>
\ No newline at end of file
</style>
......@@ -74,7 +74,7 @@
<!-- <el-table-column label="名称-英文" align="center" prop="nameEn" /> -->
<el-table-column label="内部名称" align="center" prop="internalNameZh" />
<!-- <el-table-column label="内部名称-英文" align="center" prop="internalNameEn" />
<el-table-column label="类型编码" align="center" prop="typeNumber" />
<el-table-column label="类型编码" align="center" prop="typeNumber" />-->
<!-- <el-table-column label="仓库id字符串" align="center" prop="warehouseIds" /> -->
<el-table-column label="仓库名" align="center" prop="warehouseNameList" width="180">
<template slot-scope="scope">
......@@ -88,6 +88,7 @@
</el-scrollbar>
</template>
</el-table-column>
<el-table-column label="简码" align="center" prop="code" />
<el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="快递公司" align="center" prop="companyName" />
<el-table-column label="预计时间(天)" align="center" prop="etaTime" />
......@@ -202,6 +203,7 @@ export default {
internalNameZh: undefined,
internalNameEn: undefined,
typeNumber: undefined,
code: undefined,
warehouseIds: undefined,
sort: undefined,
expressId: undefined,
......
......@@ -3,352 +3,629 @@
<el-card>
<div v-if="id" slot="header" class="card-title">新增收款单</div>
<div v-else slot="header" class="card-title">新增收款单</div>
<el-form ref="form" :model="form" label-width="120px" label-position="left">
<el-descriptions :column="3" border>
<el-descriptions-item label="客户" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="customerId" required error="客户不能为空">
<customer-selector v-model="form.customerId" @change="consignor = $event" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="部门" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="departmentId" required error="部门不能为空">
<el-select v-model="form.departmentId" style="width: 300px;" placeholder="请选择部门">
<el-option v-for="item in deptData" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="业务员" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorId" required error="客户不能为空">
<el-select v-model="form.salesmanId" placeholder="请选择业务员">
<el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.id"/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="手续费(RMB)" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="feeRate" required error="手续费不能为空">
<el-input v-model="form.feeRate" placeholder="请输入手续费"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="备注" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="remark" required error="备注不能为空">
<el-input v-model="form.remark" placeholder="备注"></el-input>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
<el-form
ref="form"
:model="form"
label-width="120px"
label-position="left"
>
<el-descriptions :column="3" border>
<el-descriptions-item label="客户">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="customerId"
required
error="客户不能为空"
>
<customer-selector
v-model="form.customerId"
@change="consignor = $event"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="部门">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="departmentId"
required
error="部门不能为空"
>
<el-select
v-model="form.departmentId"
style="width: 300px"
placeholder="请选择部门"
>
<el-option
v-for="item in deptData"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="业务员">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="salesmanId"
required
error="客户不能为空"
>
<el-select v-model="form.salesmanId" placeholder="请选择业务员">
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="手续费(RMB)">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="feeRate"
required
error="手续费不能为空"
>
<el-input
v-model="form.feeRate"
placeholder="请输入手续费"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="备注">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="remark"
required
error="备注不能为空"
>
<el-input v-model="form.remark" placeholder="备注"></el-input>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
<el-card class="card">
<div slot="header" class="card-title">订单信息</div>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" style="padding: 10px;margin-bottom: 10px;"
>添加未收客户款项</el-button>
</el-col>
<el-table v-loading="loadings" :data="list" border>
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="运输方式" align="center" prop="transportId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId"></dict-tag>
</template>
</el-table-column>
<el-table-column label="出货渠道" align="center" prop="channelName" />
<el-table-column label="始发地" align="center" prop="toDepartureId" />
<el-table-column label="目的地" align="center" prop="toDepartureId" />
<el-table-column label="品名" align="center" prop="toDepartureId" />
<el-table-column label="箱数" align="center" prop="sumNum" />
<el-table-column label="体积/重量" align="center" prop="sumVolume">
<template slot-scope="scope">
{{scope.row.sumVolume+'/'+scope.row.sumWeight}}
</template>
</el-table-column>
<el-table-column label="收入类型" align="center" prop="sumWeight" />
<el-table-column label="收款类型" align="center" prop="payType" />
<el-table-column label="应收金额" align="center" prop="sumWeight" />
<el-table-column label="收款类型" align="center" prop="payType" />
<el-table-column label="总金额美元" align="center" prop="sumWeight" />
<el-table-column label="总金额RMB" align="center" prop="payType" />
<el-table-column label="实收金额" align="center" prop="actualAmount" />
</el-table>
<div slot="header" class="card-title">订单信息</div>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
style="padding: 10px; margin-bottom: 10px"
>添加未收客户款项</el-button
>
</el-col>
<el-table v-loading="loadings" :data="list" border>
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-form ref="forms" :model="form" label-width="120px" label-position="left">
<el-descriptions :column="2" border class="card">
<el-descriptions-item label="收款账户" style="width: 50%;">
<el-form-item label="" label-width="0" style="margin-bottom: 0;" prop="consignorId" required error="请选择收款账户">
<el-select v-model="form.platformAccountId" placeholder="请选择收款账户">
<el-option v-for="item in bankData" :key="item.id" :label="item.baAccountName+'('+item.baAccountNum+')'" :value="item.id"/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="是否需要开票" style="width: 50%;">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorId" required error="请选择是否需要开票">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="form.transportId" />
</el-form-item>
</el-descriptions-item>
<el-table-column label="运输方式" align="center" prop="transportId">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
:value="scope.row.transportId"
></dict-tag>
</template>
</el-table-column>
<el-table-column label="出货渠道" align="center" prop="channelName" />
<el-table-column label="始发地" align="center" prop="toDepartureId" />
<el-table-column label="目的地" align="center" prop="toDepartureId" />
<el-table-column label="品名" align="center" prop="title">
<template slot-scope="scope">
{{ scope.row.titleZh + "(" + scope.row.titleEn + ")" }}
</template>
</el-table-column>
<el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量" align="center" prop="weight" />
<!-- <el-table-column label="体积/重量" align="center" prop="sumVolume">
<template slot-scope="scope">
{{ scope.row.sumVolume + "/" + scope.row.sumWeight }}
</template>
</el-table-column> -->
<el-table-column label="收款类型" align="center" prop="paymentType">
<template slot-scope="scope">
<dict-selector
:type="DICT_TYPE.PAYMENT_TYPE"
v-model="scope.row.paymentType"
></dict-selector>
</template>
</el-table-column>
<!-- <el-table-column label="收入类型" align="center" prop="sumWeight" /> -->
<el-table-column label="收入类型" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column label="单价美元" align="center" prop="unitPrice" />
<el-table-column label="外币兑1人民币汇率" align="center" prop="huilv">
<template slot-scope="scope">
<el-input v-model="scope.row.huilv"></el-input>
</template>
</el-table-column>
<el-table-column label="总金额$" align="center" prop="totalAmount" />
<el-table-column label="总金额¥" align="center" prop="totalAmount" />
<el-table-column label="已收金额" align="center" prop="totalAmount" />
<el-table-column label="本次实收金额" align="center" width="140" prop="totalAmount">
<template slot-scope="scope">
<el-input v-model="scope.row.totalAmount">
<template slot="append">美元</template>
</el-input>
</template>
</el-table-column>
<!-- <el-table-column label="本次实收金额" align="center" prop="totalAmount" /> -->
<!-- <el-table-column label="应收金额" align="center" prop="sumWeight" />
<el-table-column label="收款类型" align="center" prop="payType" />
<el-table-column label="总金额美元" align="center" prop="sumWeight" />
<el-table-column label="总金额RMB" align="center" prop="payType" />
<el-table-column label="实收金额" align="center" prop="actualAmount" /> -->
</el-table>
</el-descriptions>
<div class="card">
<el-form-item label="收款附件" label-width="120px" style="margin-bottom: 0;width: 33%;display: inline-block" prop="consignorId">
<el-upload
class="upload-demo"
:action="uploadFileUrl"
:headers="headers"
:on-success="handleUploadSuccess"
:before-upload="handleBeforeUpload"
:on-error="handleUploadError"
:before-remove="beforeRemove"
multiple
>
<el-button size="small" type="primary">上传附件</el-button>
</el-upload>
</el-form-item>
<el-form-item label="水单号:" label-width="120px" style="margin-bottom: 0;width: 31%;margin-left: 2%;display: inline-block" prop="waterBillNo" required error="水单号不能为空">
<el-input v-model="form.waterBillNo" maxlength="200" placeholder="请输入水单号"></el-input>
</el-form-item>
<el-form-item label="实收日期:" label-width="120px" style="margin-bottom: 0;width: 31%;margin-left: 2%;display: inline-block" prop="payedAt" required error="实收日期不能为空">
<el-date-picker clearable v-model="form.payedAt" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择实收日期" />
</el-form-item>
</div>
</el-form>
<el-form
ref="forms"
:model="form"
label-width="120px"
label-position="left"
>
<el-descriptions :column="2" border class="card">
<el-descriptions-item label="收款账户" style="width: 50%">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="platformAccountId"
required
error="请选择收款账户"
>
<el-select
v-model="form.platformAccountId"
placeholder="请选择收款账户"
>
<el-option
v-for="item in bankData"
:key="item.id"
:label="item.baAccountName + '(' + item.baAccountNum + ')'"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="是否需要开票" style="width: 50%">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="transportId"
required
error="请选择是否需要开票"
>
<dict-selector
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="form.transportId"
/>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
<div class="card">
<el-form-item
label="收款附件"
label-width="120px"
style="margin-bottom: 0; width: 33%; display: inline-block"
prop="wenjian"
>
<el-upload
class="upload-demo"
:action="uploadFileUrl"
:headers="headers"
:on-success="handleUploadSuccess"
:before-upload="handleBeforeUpload"
:on-error="handleUploadError"
:before-remove="beforeRemove"
multiple
>
<el-button size="small" type="primary">上传附件</el-button>
</el-upload>
</el-form-item>
<el-form-item
label="水单号:"
label-width="120px"
style="
margin-bottom: 0;
width: 31%;
margin-left: 2%;
display: inline-block;
"
prop="waterBillNo"
required
error="水单号不能为空"
>
<el-input
v-model="form.waterBillNo"
maxlength="200"
placeholder="请输入水单号"
></el-input>
</el-form-item>
<el-form-item
label="实收日期:"
label-width="120px"
style="
margin-bottom: 0;
width: 31%;
margin-left: 2%;
display: inline-block;
"
prop="payedAt"
required
error="实收日期不能为空"
>
<el-date-picker
clearable
v-model="form.payedAt"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择实收日期"
/>
</el-form-item>
</div>
</el-form>
</el-card>
<div slot="footer" class="dialog-footer">
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitForm">保 存</el-button>
<el-button type="primary" @click="submitForm">新 增</el-button>
</div>
<el-dialog :visible.sync="open" title="添加未收客户款项" width="80%" append-to-body>
<div>
<!-- <div slot="header" class="card-title">添加未收客户款项</div> -->
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="80px">
<el-row>
<el-form-item label="始发城市">
<el-select v-model="queryParams.departureId" placeholder="请选择始发地">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的城市">
<el-select v-model="queryParams.objectiveId" placeholder="请选择始发地">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
</el-form-item>
<el-form-item label="出货渠道" >
<el-select v-model="queryParams.channelId" placeholder="请选择出货渠道">
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="报关方式">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" />
</el-form-item>
<el-form-item label="控货">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.control" />
</el-form-item>
<el-form-item label="客户名称" >
<customer-selector v-model="queryParams.consignorId" @change="consignor = $event" />
</el-form-item>
</el-row>
<el-form-item label="订单编号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-dialog
:visible.sync="open"
title="添加未收客户款项"
width="80%"
append-to-body
>
<div>
<!-- <div slot="header" class="card-title">添加未收客户款项</div> -->
<!-- 搜索工作栏 -->
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="80px"
>
<el-row>
<el-form-item label="始发城市">
<el-select
v-model="queryParams.departureId"
placeholder="请选择始发地"
>
<el-option
v-for="item in expoerCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的城市">
<el-select
v-model="queryParams.objectiveId"
placeholder="请选择始发地"
>
<el-option
v-for="item in importCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
/>
</el-form-item>
<el-form-item label="出货渠道">
<el-select
v-model="queryParams.channelId"
placeholder="请选择出货渠道"
>
<el-option
v-for="item in channelList"
:label="item.nameZh"
:value="item.channelId"
:key="item.channelId"
></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="报关方式">
<dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model="queryParams.customsType"
/>
</el-form-item>
<el-form-item label="控货">
<dict-selector
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="queryParams.control"
/>
</el-form-item>
<el-form-item label="客户名称">
<customer-selector
v-model="queryParams.consignorId"
@change="consignor = $event"
/>
</el-form-item>
</el-row>
<el-form-item label="订单编号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="自编号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="自编号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入自编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
</el-form-item>
</el-form>
</el-col>
<el-table v-loading="loadings" :data="orderData" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column label="自编号" align="center" prop="orderNo" />
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="运输方式" align="center" prop="transportId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId"></dict-tag>
</template>
</el-table-column>
<el-table-column label="出货渠道" align="center" prop="channelName" />
<el-table-column label="始发地" align="center" prop="toDepartureId" />
<el-table-column label="目的地" align="center" prop="toDepartureId" />
<el-table-column label="商品信息" align="center" prop="toDepartureId" />
<el-table-column label="箱数" align="center" prop="sumNum" />
<el-table-column label="体积/重量" align="center" prop="weight">
<template slot-scope="scope">
{{scope.row.volume/scope.row.weight}}
</template>
</el-table-column>
<el-table-column label="费用类型" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.feeType"></dict-tag>
</template>
</el-table-column>
<el-table-column label="单价" align="center" prop="unitPrice" />
<el-table-column label="总金额美元" align="center" prop="totalAmount" />
</el-table>
<!-- </el-card> -->
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确认添加</el-button>
<el-button @click="hiddenDialog">取 消</el-button>
</div>
</div>
</el-dialog>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading1"
:data="orderData"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="唛头" align="center" prop="marks" />
<el-table-column label="品名" align="center" prop="title">
<template slot-scope="scope">
{{ scope.row.titleZh + "(" + scope.row.titleEn + ")" }}
</template>
</el-table-column>
<el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量" align="center" prop="weight" />
<el-table-column label="发货人" align="center" prop="consignorName" />
<el-table-column label="收货人" align="center" prop="consigneeName" />
<el-table-column label="订单状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.ORDER_STATUS"
:value="scope.row.status"
/>
</template>
</el-table-column>
<el-table-column label="收入类型" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column label="单价美元" align="center" prop="unitPrice" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<!-- </el-card> -->
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveSelectList">确认添加</el-button>
<el-button @click="hiddenDialog">取 消</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { userList } from "@/api/system/user"
import {DICT_TYPE} from '@/utils/dict'
import { getToken } from "@/utils/auth";
import CustomerSelector from '@/components/CustomerSelector'
import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { listSimpleDepts } from "@/api/system/dept"
import {getChannelList} from '@/api/ecw/channel'
import {getTradeCityList} from '@/api/ecw/region'
export default {
name: "CreatCollection",
components: {
CustomerSelector
},
data() {
return {
loadings: false,
uploadFileUrl: process.env.VUE_APP_BASE_API + "/app-api/file/upload", // 上传的图片服务器地址
form:{},
creatorData:[],
list:[],
fileList:[],
orderData:[],
headers: {
Authorization: "Bearer " + getToken(),
},
loading:'',
open:false,
bankData:[],
params:{
page:1,
rows:20,
},
deptData:[],
deptArr:[],
oadings: false,
channelList: [],
queryParams:{
page:1,
rows:20,
},
multipleSelection:[],
tradeCityList:[],
id:0
}
},
created() {
let that = this
if(that.$route.query.id){
this.id = this.$route.query.id
}
// if(that.$route.query.consignorId){
// this.queryParams.consignorId = this.$route.query.consignorId
// }
// if(that.$route.query.writeOffName){
// this.form.writeOffName = this.$route.query.writeOffName
// }
userList('salesman').then(res =>that.creatorData = res.data)
getChannelList().then(res => that.channelList = res.data)
getTradeCityList().then(res => that.tradeCityList = res.data)
getBankAccountPage(that.params).then(res =>that.bankData = res.data.list)
listSimpleDepts().then(res =>{
res.data.forEach((item)=>{
if(item.parentId==0){
that.deptArr.push(item)
import { userList } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import { getToken } from "@/utils/auth";
import CustomerSelector from "@/components/CustomerSelector";
import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { listSimpleDepts } from "@/api/system/dept";
import { getChannelList } from "@/api/ecw/channel";
import { getTradeCityList } from "@/api/ecw/region";
import { createReceipt } from "@/api/ecw/financial";
import { getReceivableList } from "@/api/ecw/financial";
}else{
that.deptData.push(item)
}
})
that.deptData.forEach((value)=>{
var dept = that.deptArr.filter(itt=>itt.id==value.parentId)
if(dept.length>0){
value.name =dept[0].name+' | '+ value.name
}
})
})
},
computed:{
expoerCityList(){
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
},
},
methods: {
beforeRemove(file, fileList) {
return this.$confirm(`确定移除?`);
},
handleUploadSuccess(res,file,fileList) {
var arr = []
fileList.forEach((item)=>{
arr.push(item.response.data)
})
this.fileList= arr
console.log(this.fileList)
this.loading.close();
},
handleBeforeUpload() {
this.loading = this.$loading({
lock: true,
text: "上传中",
background: "rgba(0, 0, 0, 0.7)",
});
export default {
name: "CreatCollection",
components: {
CustomerSelector,
},
data() {
return {
loadings: false,
loading1: false,
uploadFileUrl: process.env.VUE_APP_BASE_API + "/app-api/file/upload", // 上传的图片服务器地址
form: {},
creatorData: [],
list: [],
fileList: [],
orderData: [],
headers: {
Authorization: "Bearer " + getToken(),
},
handleUploadError() {
this.$message({
type: "error",
message: "上传失败",
});
this.loading.close();
loading: "",
open: false,
bankData: [],
params: {
page: 1,
rows: 20,
},
/** 新增按钮操作 */
handleAdd() {
this.open = true;
deptData: [],
deptArr: [],
oadings: false,
channelList: [],
queryParams: {
page: 1,
rows: 20,
},
hiddenDialog(){
this.open = false
},
submitForm(){
multipleSelection: [],
tradeCityList: [],
id: 0
};
},
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
},
created() {
let that = this;
if (that.$route.query.id) {
this.id = this.$route.query.id;
}
this.getList();
// if(that.$route.query.consignorId){
// this.queryParams.consignorId = this.$route.query.consignorId
// }
// if(that.$route.query.writeOffName){
// this.form.writeOffName = this.$route.query.writeOffName
// }
userList("salesman").then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
getBankAccountPage(that.params).then(
(res) => (that.bankData = res.data.list)
);
listSimpleDepts().then((res) => {
res.data.forEach((item) => {
if (item.parentId == 0) {
that.deptArr.push(item);
} else {
that.deptData.push(item);
}
});
that.deptData.forEach((value) => {
var dept = that.deptArr.filter((itt) => itt.id == value.parentId);
if (dept.length > 0) {
value.name = dept[0].name + " | " + value.name;
}
});
});
this.id && getReceivableList({ ...that.params, id: this.id }).then(res => {
console.log(res, '==================')
})
},
computed: {
expoerCityList() {
return this.tradeCityList.filter((item) => item.type == 2);
},
importCityList() {
return this.tradeCityList.filter((item) => item.type == 1);
},
},
methods: {
getReceivableListByIds() {
},
getList() {
this.loading1 = true;
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateType, "createTime");
// 执行查询
getReceivableList(params).then((response) => {
this.orderData = response.data.list;
this.total = response.data.total;
this.loading1 = false;
});
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除?`);
},
handleUploadSuccess(res, file, fileList) {
var arr = [];
fileList.forEach((item) => {
arr.push(item.response.data);
});
this.fileList = arr;
console.log(this.fileList);
this.loading.close();
},
handleBeforeUpload() {
this.loading = this.$loading({
lock: true,
text: "上传中",
background: "rgba(0, 0, 0, 0.7)",
});
},
handleUploadError() {
this.$message({
type: "error",
message: "上传失败",
});
this.loading.close();
},
/** 新增按钮操作 */
handleAdd() {
this.open = true;
},
hiddenDialog() {
this.open = false;
},
submitForm() {
const params = this.form;
console.log(params);
// createReceipt()
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
saveSelectList() {
this.list = this.multipleSelection
this.open = false;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
},
}
},
};
</script>
<style>
.card{
margin-top: 20px;
}
.dialog-footer{
padding: 40px;
}
.card-title{
font-size: 18px;
font-weight: bold;
}
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 40px;
}
.card-title {
font-size: 18px;
font-weight: bold;
}
</style>
......@@ -2,169 +2,389 @@
<div class="app-container">
<el-card>
<div slot="header" class="card-title">请款单</div>
<el-form ref="form" :model="form" label-width="120px" label-position="left">
<el-descriptions :column="3" class="card" border>
<el-descriptions-item label="供应商" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="supplierId" required error="供应商不能为空">
<customer-selector v-model="form.supplierId" @change="consignor = $event" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="部门" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="departmentId" required error="部门不能为空">
<el-select v-model="form.departmentId" style="width: 300px;" placeholder="请选择部门">
<el-option v-for="item in deptData" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="业务员" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="salesmanId" required error="客户不能为空">
<el-select v-model="form.salesmanName" placeholder="请选择业务员">
<el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.nickname"/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="申请日期" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorId" required error="申请日期不能为空">
<el-date-picker clearable v-model="form.applicationAt" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择申请日期" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="供应商银行账号" style="width: 50%;">
<el-form-item label="" label-width="0" style="margin-bottom: 0;" prop="consignorId" required error="请选择收款账户">
<el-select v-model="form.supplierId" placeholder="请选择收款账户">
<el-option v-for="item in bankData" :key="item.id" :label="item.baAccountName+'('+item.baAccountNum+')'" :value="item.id"/>
</el-select>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" class="card" border>
<el-descriptions-item label="最后付款日期" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="latestPayAt" required error="最后付款日期不能为空">
<el-date-picker clearable v-model="form.latestPayAt" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择最后付款日期" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="结算方式" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" required error="选择结算方式">
<dict-selector :type="DICT_TYPE.CUSTOMER_BALANCE" v-model="form.settlementType" />
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
<el-form
ref="form"
:model="form"
label-width="120px"
label-position="left"
>
<el-descriptions :column="3" class="card" border>
<el-descriptions-item label="供应商">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="supplierId"
:rules="{ required: true, trigger: ['blur', 'change'] }"
error="供应商不能为空"
>
<!-- <customer-selector v-model="form.supplierId" @change="consignor = $event" /> -->
<el-select
v-model="form.supplierId"
placeholder="请选择供应商"
@change="selectChange"
>
<el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="supplier.companyZh"
:value="supplier.id"
></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="部门">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="departmentId"
required
error="部门不能为空"
>
<el-select
v-model="form.departmentId"
style="width: 300px"
placeholder="请选择部门"
>
<el-option
v-for="item in deptData"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="业务员">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="salesmanName"
required
error="业务员不能为空"
>
<el-select v-model="form.salesmanName" placeholder="请选择业务员">
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="申请日期">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="applicationAt"
required
error="申请日期不能为空"
>
<el-date-picker
clearable
v-model="form.applicationAt"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
type="date"
placeholder="选择申请日期"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="供应商银行账号" style="width: 50%">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="supplierBankAccount"
required
error="请选择收款账户"
>
<el-select v-model="form.supplierBankAccount" placeholder="请选择收款账户">
<el-option
v-for="item in bankData"
:key="item.id"
:label="item.baAccountName + '(' + item.baAccountNum + ')'"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" class="card" border>
<el-descriptions-item label="最后付款日期">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="latestPayAt"
required
error="最后付款日期不能为空"
>
<el-date-picker
clearable
v-model="form.latestPayAt"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
type="date"
placeholder="选择最后付款日期"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="结算方式">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
required
error="选择结算方式"
prop="settlementType"
>
<dict-selector
:type="DICT_TYPE.CUSTOMER_BALANCE"
v-model="form.settlementType"
/>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
<el-card class="card">
<div slot="header" class="card-title">费用信息</div>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" style="padding: 10px;margin-bottom: 10px;"
>添加供应商未付款项</el-button>
</el-col>
<el-table v-loading="loadings" :data="list" border>
<el-table-column label="订单编号" align="center" prop="orderNo" />
<el-table-column label="费用类型" align="center" prop="transportId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId"></dict-tag>
</template>
</el-table-column>
<el-table-column label="发票号码" align="center" prop="channelName" />
<el-table-column label="应付金额" align="center" prop="toDepartureId" />
<el-table-column label="币种" align="center" prop="toDepartureId" />
<el-table-column label="汇率" align="center" prop="toDepartureId" />
<el-table-column label="税率" align="center" prop="sumNum" />
<el-table-column label="价格合计(RMB)" align="center" prop="payType" />
</el-table>
<div slot="header" class="card-title">费用信息</div>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
style="padding: 10px; margin-bottom: 10px"
>添加供应商未付款项</el-button
>
</el-col>
<el-table v-loading="loadings" :data="list" border :show-summary="!!list.length" :summary-method="getSummaries">
<el-table-column label="自编号" align="center" prop="payableNo" />
<el-table-column label="费用类型" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column label="发票号码" align="center" prop="invoiceNumber" />
<el-table-column label="应付金额" align="center" prop="totalAmount" />
<el-table-column label="币种" align="center" prop="currencyId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
<el-table-column label="汇率" align="center" prop="exchangeRate" />
<el-table-column label="税率" align="center" prop="taxRate" />
<el-table-column label="价税合计(RMB)" align="center" prop="total" />
</el-table>
<el-form ref="forms" :model="form" label-width="120px" label-position="left" style="width: 50%;">
<el-descriptions :column="1" class="card" border>
<el-descriptions-item label="账单号">
<el-form-item label="" label-width="0" style="margin-bottom: 0;" required error="账单号不能为空">
<el-input v-model="form.accountNumber" placeholder="请输入账单号"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="发票">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="invoiceStatus" required error="请选择是否开票">
<el-select v-model="form.invoiceStatus" placeholder="请选择是否开票">
<el-option label="未开票" value="0"/>
<el-option label="已开票" value="1"/>
</el-select>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
<el-form
ref="forms"
:model="form"
label-width="120px"
label-position="left"
style="width: 50%"
>
<el-descriptions :column="1" class="card" border>
<el-descriptions-item label="账单号">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
required
error="账单号不能为空"
prop="accountNumber"
>
<el-input
v-model="form.accountNumber"
placeholder="请输入账单号"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="发票">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="invoiceStatus"
required
error="请选择是否开票"
>
<el-select
v-model="form.invoiceStatus"
placeholder="请选择是否开票"
>
<el-option label="未开票" value="0" />
<el-option label="已开票" value="1" />
</el-select>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
<div slot="footer" class="dialog-footer">
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitForm">保 存</el-button>
<el-button type="primary" @click="submitForm">新 增</el-button>
</div>
<el-dialog :visible.sync="open" title="添加未收客户款项" width="80%" append-to-body>
<el-dialog
:visible.sync="open"
title="添加未收客户款项"
width="80%"
append-to-body
@open="openDialog"
>
<div>
<!-- <div slot="header" class="card-title">添加未收客户款项</div> -->
<!-- <div slot="header" class="card-title">添加未收客户款项</div> -->
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="80px">
<el-row>
<el-form-item label="供应商">
<customer-selector v-model="form.supplierId" @change="consignor = $event" />
</el-form-item>
<el-form-item label="始发城市">
<el-select v-model="queryParams.departureId" placeholder="请选择始发地">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的城市">
<el-select v-model="queryParams.objectiveId" placeholder="请选择始发地">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
</el-form-item>
<el-form-item label="出货渠道" >
<el-select v-model="queryParams.channelId" placeholder="请选择出货渠道">
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="报关方式">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" />
</el-form-item>
<el-form-item label="控货">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.control" />
</el-form-item>
<el-form-item label="客户名称" >
<customer-selector v-model="queryParams.consignorId" @change="consignor = $event" />
</el-form-item>
</el-row>
<el-form-item label="订单编号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable/>
</el-form-item>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="80px"
>
<el-row>
<el-form-item label="供应商">
<customer-selector
v-model="queryParams.supplierId"
@change="consignor = $event"
/>
</el-form-item>
<el-form-item label="始发城市">
<el-select
v-model="queryParams.departureId"
placeholder="请选择始发地"
>
<el-option
v-for="item in expoerCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的城市">
<el-select
v-model="queryParams.objectiveId"
placeholder="请选择始发地"
>
<el-option
v-for="item in importCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
/>
</el-form-item>
<el-form-item label="出货渠道">
<el-select
v-model="queryParams.channelId"
placeholder="请选择出货渠道"
>
<el-option
v-for="item in channelList"
:label="item.nameZh"
:value="item.channelId"
:key="item.channelId"
></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="报关方式">
<dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model="queryParams.customsType"
/>
</el-form-item>
<el-form-item label="控货">
<dict-selector
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="queryParams.control"
/>
</el-form-item>
<el-form-item label="客户名称">
<customer-selector
v-model="queryParams.consignorId"
@change="consignor = $event"
/>
</el-form-item>
</el-row>
<el-form-item label="订单编号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单编号"
clearable
/>
</el-form-item>
<el-form-item label="自编号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入自编号" clearable/>
</el-form-item>
<el-form-item label="自编号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入自编号"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
</el-form-item>
</el-form>
</el-col>
<el-table v-loading="loadings" :data="orderData" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column label="自编号" align="center" prop="orderNo" />
<el-table-column label="柜号" align="center" prop="orderNo" />
<el-table-column label="运输方式" align="center" prop="transportId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId"></dict-tag>
</template>
</el-table-column>
<el-table-column label="出货渠道" align="center" prop="channelName" />
<el-table-column label="始发地" align="center" prop="toDepartureId" />
<el-table-column label="目的地" align="center" prop="toDepartureId" />
<el-table-column label="金额" align="center" prop="totalAmount" />
<el-table-column label="备注" align="center" prop="toDepartureId" />
</el-table>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-form>
<el-table
ref="multipleTable"
v-loading="loading"
:data="orderData"
border
@selection-change="handleSelectionChange"
row-key="id"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column label="自编号" align="center" prop="payableNo" />
<el-table-column label="货柜号" align="center" prop="containerNo" />
<el-table-column label="供应商" align="center" prop="supplierName" />
<el-table-column label="费用类型" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column label="金额" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<!-- </el-card> -->
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确认添加</el-button>
<el-button type="primary" @click="saveSelectList">确认添加</el-button>
<el-button @click="hiddenDialog">取 消</el-button>
</div>
</div>
......@@ -173,108 +393,265 @@
</template>
<script>
import { userList } from "@/api/system/user"
import {DICT_TYPE} from '@/utils/dict'
import { getToken } from "@/utils/auth"
import {getChannelList} from '@/api/ecw/channel'
import CustomerSelector from '@/components/CustomerSelector'
import { getBankAccountPage } from "@/api/ecw/bankAccount"
import { listSimpleDepts } from "@/api/system/dept"
import {getTradeCityList} from '@/api/ecw/region'
export default {
name: "CreatPayment",
import { userList } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import { getToken } from "@/utils/auth";
import { getChannelList } from "@/api/ecw/channel";
import CustomerSelector from "@/components/CustomerSelector";
import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { listSimpleDepts } from "@/api/system/dept";
import { getTradeCityList } from "@/api/ecw/region";
import { getSupplierPage } from "@/api/ecw/supplier";
import { getPayableList, getPayableInfoByIds, createPayment } from "@/api/ecw/financial"
export default {
name: "CreatPayment",
components: {
CustomerSelector
CustomerSelector
},
data() {
return {
orderData:[],
loadings: false,
open:false,
form:{},
creatorData:[],
list:[],
channelList:[],
loading:'',
bankData:[],
params:{
page:1,
rows:20,
},
deptData:[],
deptArr:[],
queryParams:{
page:1,
rows:20,
},
multipleSelection:[],
tradeCityList:[]
}
},
created() {
let that = this
userList('salesman').then(res =>that.creatorData = res.data)
getChannelList().then(res => that.channelList = res.data)
getTradeCityList().then(res => that.tradeCityList = res.data)
getBankAccountPage(that.params).then(res =>that.bankData = res.data.list)
listSimpleDepts().then(res =>{
res.data.forEach((item)=>{
if(item.parentId==0){
that.deptArr.push(item)
}else{
that.deptData.push(item)
}
})
that.deptData.forEach((value)=>{
var dept = that.deptArr.filter(itt=>itt.id==value.parentId)
if(dept.length>0){
value.name =dept[0].name+' | '+ value.name
}
data() {
return {
id: 0,
orderData: [],
total: 0,
loadings: false,
open: false,
form: {},
creatorData: [],
list: [],
channelList: [],
loading: "",
bankData: [],
params: {
page: 1,
rows: 20,
},
deptData: [],
deptArr: [],
queryParams: {
page: 1,
rows: 20,
},
multipleSelection: [],
tradeCityList: [],
allSupplier: []
};
},
created() {
let that = this;
if (that.$route.query.id && that.$route.query.id !== '0') {
this.id = this.$route.query.id;
getPayableInfoByIds({ id: this.id }).then(res => {
this.list = [{...res.data}]
this.$set(this.form, 'supplierId', res.data.supplierId)
})
}
userList("salesman").then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
getBankAccountPage(that.params).then(
(res) => (that.bankData = res.data.list)
);
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
this.selectChange(this.form.supplierId)
});
listSimpleDepts().then((res) => {
res.data.forEach((item) => {
if (item.parentId == 0) {
that.deptArr.push(item);
} else {
that.deptData.push(item);
}
});
that.deptData.forEach((value) => {
var dept = that.deptArr.filter((itt) => itt.id == value.parentId);
if (dept.length > 0) {
value.name = dept[0].name + " | " + value.name;
}
});
});
},
computed: {
expoerCityList() {
return this.tradeCityList.filter((item) => item.type == 2);
},
importCityList() {
return this.tradeCityList.filter((item) => item.type == 1);
},
},
methods: {
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询
getPayableList(params).then((response) => {
this.orderData = response.data.list;
this.total = response.data.total;
this.loading = false;
this.$nextTick(() => {
this.list.forEach(itm => {
const t = this.orderData.find(v => v.id == itm.id)
t && this.$refs.multipleTable.toggleRowSelection(t, true)
})
})
});
},
getSummaries(param) {
const { columns, data } = param;
const sums = new Array(columns.length).map(v => '');
const index = sums.length - 1
sums[index - 1] = '价税合计大写'
const t = data.map(v => v.total).reduce((prev, curr) => {
return prev + curr;
}, 0)
sums[index] = this.convertCurrency(t)
return sums;
},
/** 新增按钮操作 */
handleAdd() {
this.open = true;
},
submitForm() {
this.$refs.form.validate ((valid)=>{
if (valid) {
this.$refs.forms.validate((val) => {
if (val) {
const params = {...this.form}
if (this.list && this.list.length > 0) {
params.payableReqVOList = [...this.list]
}
createPayment(params).then(res => {
this.$modal.msgSuccess("新增成功");
})
}
})
}
})
},
computed:{
expoerCityList(){
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
},
selectChange(val) {
const t = this.allSupplier.find(v => v.id == val)
t && (this.form.supplierName = t.companyZh)
},
methods: {
/** 新增按钮操作 */
handleAdd() {
this.open = true
},
submitForm(){
},
handleQuery(){
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
hiddenDialog(){
this.open = false
handleQuery() {},
handleSelectionChange(val) {
this.multipleSelection = val;
},
hiddenDialog() {
this.open = false;
},
saveSelectList() {
this.list = this.multipleSelection
this.open = false;
},
convertCurrency(money) {
//汉字的数字
var cnNums = new Array('', '', '', '', '', '', '', '', '', '');
//基本单位
var cnIntRadice = new Array('', '', '', '');
//对应整数部分扩展单位
var cnIntUnits = new Array('', '', '亿', '');
//对应小数部分单位
var cnDecUnits = new Array('', '', '', '');
//整数金额时后面跟的字符
var cnInteger = '';
//整型完以后的单位
var cnIntLast = '';
//最大处理的数字
var maxNum = 999999999999999.9999;
//金额整数部分
var integerNum;
//金额小数部分
var decimalNum;
//输出的中文金额字符串
var chineseStr = '';
//分离金额后用的数组,预定义
var parts;
// 传入的参数为空情况
if(money === '') {
return '';
}
money = parseFloat(money)
if(money >= maxNum){
return ''
}
// 传入的参数为0情况
if (money === 0) {
chineseStr = cnNums[0] + cnIntLast + cnInteger;
return chineseStr
}
// 转为字符串
money = money.toString();
// indexOf 检测某字符在字符串中首次出现的位置 返回索引值(从0 开始) -1 代表无
if (money.indexOf('.') == -1) {
integerNum = money;
decimalNum = ''
}else{
parts = money.split('.');
integerNum = parts[0];
decimalNum = parts[1].substr(0,4);
}
//转换整数部分
if(parseInt(integerNum,10) > 0){
let zeroCount = 0;
let IntLen = integerNum.length
for(let i = 0; i < IntLen; i++){
let n = integerNum.substr(i,1);
let p = IntLen - i - 1;
let q = p / 4;
let m = p % 4;
if( n == '0'){
zeroCount ++ ;
}else{
if(zeroCount > 0){
chineseStr += cnNums[0]
}
zeroCount = 0;
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
}
if(m == 0 && zeroCount < 4){
chineseStr += cnIntUnits[q];
}
}
// 最后+ 元
chineseStr += cnIntLast;
}
// 转换小数部分
if(decimalNum != ''){
let decLen = decimalNum.length;
for(let i = 0; i <decLen; i++){
let n = decimalNum.substr(i,1);
if(n != '0'){
chineseStr += cnNums[Number(n)] + cnDecUnits[i]
}
}
}
if(chineseStr == ''){
chineseStr += cnNums[0] + cnIntLast + cnInteger;
}else if(decimalNum == ''){
chineseStr += cnInteger;
}
return chineseStr
},
}
openDialog() {
this.getList()
}
},
};
</script>
<style>
.card{
margin-top: 20px;
}
.dialog-footer{
padding: 40px;
}
.card-title{
font-size: 18px;
font-weight: bold;
}
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 40px;
}
.card-title {
font-size: 18px;
font-weight: bold;
}
</style>
<template>
<div class="app-container">
<div slot="header" class="card-title">应付款</div>
<div slot="header" class="card-title">应付款</div>
<!-- 搜索工作栏 -->
<el-card v-show="showSearch">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px" class="card">
<el-row>
<el-form-item label="柜号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入柜号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="自编号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="订单号:" >
<el-card v-show="showSearch">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="100px"
class="card"
>
<el-row>
<el-form-item label="柜号:">
<el-input
style="max-width: 188px"
v-model="queryParams.orderNo"
placeholder="请输入柜号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="自编号:">
<el-input
style="max-width: 188px"
v-model="queryParams.orderNo"
placeholder="请输入自编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="订单号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入订单号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item label="始发城市:">
<el-select v-model="queryParams.departureId" placeholder="请选择始发城市">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的城市:">
<el-select v-model="queryParams.objectiveId" placeholder="请选择目的城市">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式:" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
</el-form-item>
</el-row>
<el-form-item label="始发城市:">
<el-select
v-model="queryParams.departureId"
placeholder="请选择始发城市"
>
<el-option
v-for="item in expoerCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的城市:">
<el-select
v-model="queryParams.objectiveId"
placeholder="请选择目的城市"
>
<el-option
v-for="item in importCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式:">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
/>
</el-form-item>
</el-row>
<!-- <el-form-item label="付款单号:" >
<!-- <el-form-item label="付款单号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入付款单号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<!-- <el-form-item label="状态:">
<!-- <el-form-item label="状态:">
<dict-selector :type="DICT_TYPE.ECW_RECEIPT_STATE" v-model="queryParams.control" />
</el-form-item>
<el-form-item label="业务员:">
......@@ -42,7 +81,7 @@
</el-select>
</el-form-item> -->
<!-- <el-row>
<!-- <el-row>
<el-form-item label="收款时间:" >
<el-date-picker
v-model="dateType"
......@@ -53,162 +92,279 @@
</el-date-picker>
</el-form-item>
</el-row> -->
<el-row>
<!-- <el-form-item label="商品名称:" >
<el-row>
<!-- <el-form-item label="商品名称:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入商品名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item label="供应商名称:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入供应商名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="费用类型:" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.feeType"></dict-selector>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">查找</el-button>
<el-button style="margin-left:10px" type="success" @click="handleAdd(0)">新增请款单</el-button>
</el-form-item>
</el-row>
</el-form>
</el-card>
<el-table v-loading="loadings" :data="list" border class="card">
<el-table-column label="自编号" align="center" prop="orderNo" />
<el-table-column label="货柜号" align="center" prop="orderNo" />
<el-table-column label="供应商" align="center" prop="orderNo" />
<el-table-column label="费用类型" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.feeType"></dict-tag>
</template>
</el-table-column>
<el-table-column label="金额" align="center" prop="totalAmount" />
<!-- <el-table-column label="创建时间" align="center" prop="channelName" />
<el-form-item label="供应商名称:">
<el-input
style="max-width: 188px"
v-model="queryParams.orderNo"
placeholder="请输入供应商名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="费用类型:">
<dict-selector
:type="DICT_TYPE.FEE_TYPE"
v-model="queryParams.feeType"
></dict-selector>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">查找</el-button>
<el-button
style="margin-left: 10px"
type="success"
@click="handleAdd(0)"
>新增请款单</el-button
>
</el-form-item>
</el-row>
</el-form>
</el-card>
<el-table v-loading="loadings" :data="list" border class="card">
<el-table-column label="自编号" align="center" prop="payableNo" />
<el-table-column label="货柜号" align="center" prop="containerNo" />
<el-table-column label="供应商" align="center" prop="supplierName" />
<el-table-column label="费用类型" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column label="金额" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
<!-- <el-table-column label="创建时间" align="center" prop="channelName" />
<el-table-column label="创建人" align="center" prop="toDepartureId" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="success" @click="open=true">编辑</el-button>
<el-button size="mini" @click="handleAdd(scope.row.consignorId)">请款</el-button>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="费用登记" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="操作步骤" prop="receiptNo">
<el-input v-model="form.receiptNo" placeholder="请输入收款单号(例:SKD001)" />
</el-form-item>
<el-form-item label="费用类型" prop="departmentId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.feeType"></dict-selector>
</el-form-item>
<el-form-item label="供应商" prop="departmentName">
<el-input v-model="form.departmentName" placeholder="请输入供应商" />
</el-form-item>
<el-form-item label="金额" prop="salesmanId" style="flex">
<el-input-number v-model="form.num" controls-position="right" :min="1"></el-input-number>
<dict-selector style="width: 120px;" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" v-model="queryParams.feeType"></dict-selector>
</el-form-item>
<el-form-item label="备注" prop="departmentName">
<el-input type="textarea" v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button plain @click="cancel">关闭</el-button>
</div>
</el-dialog>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button size="mini" type="text" @click="editClick(scope.row)"
>编辑</el-button
>
<el-button size="mini" type="text" @click="handleAdd(scope.row.id)"
>请款</el-button
>
<el-button size="mini" type="text" @click="deleteClick(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
title="费用登记"
:visible.sync="open"
width="500px"
append-to-body
>
<el-form ref="costForm" :model="costObj" label-width="80px">
<el-form-item label="操作步骤">
<el-select v-model="costObj.stepsId" placeholder="请选择操作步骤">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="费用类型">
<el-select v-model="costObj.feeType" placeholder="请选择费用类型">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.FEE_TYPE)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="供应商">
<el-select v-model="costObj.supplierId" placeholder="请选择供应商">
<el-option v-for="supplier in allSupplier" :key="supplier.id" :label="supplier.companyZh" :value="supplier.id"></el-option>
</el-select>
</el-form-item>
<el-row class="two-element">
<el-form-item label="金额">
<el-input-number v-model="costObj.totalAmount" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="" label-width="0px">
<el-select v-model="costObj.currencyId" placeholder="请选择单位">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PRICE_UNIT)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-form-item label="备注">
<el-input v-model="costObj.remark" type="textarea" rows="2" placeholder="请输入备注"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="operate-button">
<el-button type="primary" @click="submitEditForm">确定</el-button>
<el-button @click="cancelEditForm">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { userList } from "@/api/system/user"
import {DICT_TYPE} from '@/utils/dict'
import {getTradeCityList} from '@/api/ecw/region'
import { userList } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import { getTradeCityList } from "@/api/ecw/region";
import { getPayableList, deletePayable, updatePayable } from "@/api/ecw/financial"
import { getSupplierPage } from "@/api/ecw/supplier";
export default {
name: "Payable",
components: {
export default {
name: "Payable",
components: {},
data() {
return {
open: false,
showSearch: true,
loadings: false,
tradeCityList: [],
costObj: {},
creatorData: [],
list: [],
total: 0,
dateType: [],
loading: "",
params: {
page: 1,
rows: 20,
},
queryParams: {
page: 1,
rows: 20,
},
allSupplier: [],
};
},
computed: {
expoerCityList() {
return this.tradeCityList.filter((item) => item.type == 2);
},
importCityList() {
return this.tradeCityList.filter((item) => item.type == 1);
},
},
created() {
let that = this;
userList("salesman").then((res) => (that.creatorData = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
this.getList()
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
});
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询
getPayableList(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 新增按钮操作 */
handleAdd(id) {
return this.$router.push("creatPayment?id=" + id);
},
submitEditForm() {
const params = {
invoiceNumber: this.costObj.invoiceNumber,
id: this.costObj.id,
stepsId: this.costObj.stepsId,
feeType: this.costObj.feeType,
supplierId: this.costObj.supplierId,
totalAmount: this.costObj.totalAmount,
currencyId: this.costObj.currencyId,
remark: this.costObj.remark
}
updatePayable(params).then(res => {
this.$modal.msgSuccess("修改成功");
this.getList();
this.open = false;
})
},
/** 取消按钮 */
cancelEditForm() {
this.open = false;
},
editClick(row) {
row.stepsId = String(row.stepsId)
row.feeType = String(row.feeType)
row.currencyId = String(row.currencyId)
this.costObj = { ...row }
this.open = true;
},
deleteClick(row) {
const id = row.id;
this.$modal.confirm('是否确认删除该应付款?').then(function() {
return deletePayable(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
// deletePayable({ id: row.id }).then(res => {
// this.getList()
// this.$modal.msgSuccess("删除成功");
// })
},
},
};
</script>
},
data() {
return {
open:false,
showSearch:true,
loadings: false,
tradeCityList:[],
form:{},
creatorData:[],
list:[],
total:0,
dateType:[],
loading:'',
params:{
page:1,
rows:20,
},
queryParams:{
page:1,
rows:20,
},
}
},
computed:{
expoerCityList(){
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
},
},
created() {
let that = this
userList('salesman').then(res =>that.creatorData = res.data)
getTradeCityList().then(res => that.tradeCityList = res.data)
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getReceiptPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 新增按钮操作 */
handleAdd(id) {
return this.$router.push('creatPayment?consignorId='+id)
},
submitForm(){
this.open = false;
},
/** 取消按钮 */
cancel() {
this.open = false;
},
},
}
</script>
<style lang="scss" scoped>
.small-padding ::v-deep .el-button {
<style>
.card{
margin-top: 20px;
}
.dialog-footer{
padding: 40px;
}
.card-title{
font-size: 18px;
font-weight: bold;
}
</style>
}
// 页面内元素弹窗form控件宽度设置
::v-deep .el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 40px;
}
.card-title {
font-size: 18px;
font-weight: bold;
}
</style>
<template>
<div class="app-container">
<div slot="header" class="card-title">付款单</div>
<!-- 搜索工作栏 -->
<el-card v-show="showSearch" class="card">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="100px"
class="card"
>
<el-row :span="24">
<el-form-item label="柜号:">
<el-input
style="max-width: 188px"
v-model="queryParams.receiptNo"
placeholder="请输入收款单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="自编号:">
<el-input
style="max-width: 188px"
v-model="queryParams.receiptNo"
placeholder="请输入收款单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="付款单号:">
<el-input
style="max-width: 188px"
v-model="queryParams.receiptNo"
placeholder="请输入收款单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="供应商:">
<el-select
v-model="queryParams.supplierId"
placeholder="请选择供应商"
>
<el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="supplier.companyZh"
:value="supplier.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态:">
<dict-selector :type="DICT_TYPE.ECW_RECEIPT_STATE" v-model="queryParams.state" />
</el-form-item>
</el-row>
<el-row :span="24">
<el-form-item label="业务员:">
<el-select v-model="form.salesmanId" placeholder="请选择业务员">
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间:">
<el-date-picker
v-model="queryParams.beginCreateTime"
type="datetimerange"
range-separator="到"
start-placeholder="请选择日期"
end-placeholder="请选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="发票状态:">
<el-select
v-model="queryParams.invoiceStatus"
placeholder="请选择是否开票"
>
<el-option label="未开票" value="0" />
<el-option label="已开票" value="1" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">查找</el-button>
</el-form-item>
</el-row>
</el-form>
</el-card>
<el-table v-loading="loadings" :data="list" border class="card">
<el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="付款单号" align="center" prop="paymentNo" />
<el-table-column label="供应商" align="center" prop="supplierName" />
<el-table-column label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="最后付款时间" align="center" prop="latestPayAt">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.latestPayAt) }}</span>
</template>
</el-table-column>
<el-table-column label="发票" align="center" prop="invoiceStatus">
<template slot-scope="scope">
<span>{{ scope.row.invoiceStatus === 0 ? '未开票' : '已开票' }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<span>{{ stateMap(scope.row.state) }}</span>
<!-- <dict-tag
:type="DICT_TYPE.ECW_RECEIPT_STATE"
:value="scope.row.state"
/> -->
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" @click="handleAdd(scope.row.id)" type="text">编辑</el-button>
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" type="text">审核</el-button>
<el-button v-if="scope.row.state == 2" size="mini" type="text">反审核</el-button>
<el-button v-if="scope.row.state == 2" size="mini" type="text">核销</el-button>
<el-button v-if="scope.row.state == 4" size="mini" type="text">反核销</el-button>
<!-- <el-button v-if="scope.row.state == 3" size="mini" type="text">开票</el-button> -->
<el-button size="mini" type="text" @click="toprint(scope.row.id)">打印</el-button>
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" type="text">删除</el-button>
<!-- <el-button size="mini" type="text" @click="open = true">导出订单</el-button> -->
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
title="费用登记"
:visible.sync="open"
width="500px"
style="margin-top: 20vh !important"
append-to-body
>
<div
slot="header"
class="card-title"
style="border-bottom: 2px solid #f8f8f8"
>
<span>导出账单</span>
<i class="el-icon-close" @click="cancel"></i>
</div>
<div class="dialog-footer">
<el-button type="primary" style="width: 130px" @click="submitForm"
>国内账单</el-button
>
<el-button
plain
type="primary"
style="width: 130px; margin: 0"
@click="submitForm"
>Debite note</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import { userList } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import CustomerSelector from "@/components/CustomerSelector";
import { getSupplierPage } from "@/api/ecw/supplier";
import { getPaymentList } from "@/api/ecw/financial"
export default {
name: "paymentVoucher",
components: {
CustomerSelector,
},
data() {
return {
open: false,
showSearch: true,
loadings: false,
form: {},
creatorData: [],
allSupplier: [],
list: [],
total: 0,
dateType: [],
loading: "",
// params: {
// page: 1,
// rows: 20,
// },
// 查询参数
queryParams: {
page: 1,
rows: 20,
dateType: null,
date: null,
originId: null,
destinationId: null,
transportId: null,
isCargoControl: null,
orderExceptionStatus: null,
orderExceptionType: null,
orderNo: null,
consignorId: null,
marks: null,
prodId: null,
productRecord: null,
followUpSalesmanId: null,
},
};
},
created() {
let that = this;
userList("salesman").then((res) => (that.creatorData = res.data));
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
});
this.getList()
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询
getPaymentList(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
stateMap(state) {
switch (state) {
case 1:
return '待审核'
case 2:
return '已审核待核销'
case 3:
return '已核销'
case 4:
return '审批驳回'
}
},
/** 新增按钮操作 */
handleAdd(id) {
return this.$router.push("creatCollection?id=" + id);
},
toprint(id) {
return this.$router.push("printVoucher?id=" + id);
},
submitForm() {
this.open = false;
},
/** 取消按钮 */
cancel() {
this.open = false;
},
},
};
</script>
<style>
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 30px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
height: 160px;
}
.card-title {
font-size: 18px;
font-weight: bold;
}
</style>
......@@ -4,26 +4,26 @@
<div style="text-align: center;font-weight: bold;font-size: 20px;">收款单</div>
<div style="margin-top: 20px;">
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><span style="width: 120px;text-align: right;">部门:</span><span>{{form?form.departmentName:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">部门:</div><span>{{form?form.departmentName:''}}</span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><span style="width: 120px;text-align: right;">收款单号:</span><span>{{form?form.receiptNo:''}}</span></div>
<div style="flex:1"><span style="width: 120px;text-align: right;">收款日期:</span><span>{{form?form.payedAt:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">收款单号:</div> <span>{{form?form.receiptNo:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">收款日期:</div><span>{{form?form.payedAt:''}}</span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><span style="width: 120px;text-align: right;">客户名称:</span><span>{{form?form.customerName:''}}</span></div>
<div style="flex:1"><span style="width: 120px;text-align: right;">收款户名:</span><span>{{form?form.platformAccount:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">客户名称:</div><span>{{form?form.customerName:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">收款户名:</div><span>{{form?form.platformAccount:''}}</span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><span style="width: 120px;text-align: right;">银行名称:</span><span>{{form?form.accountBank:''}}</span></div>
<div style="flex:1"><span style="width: 120px;text-align: right;">银行账号:</span><span>{{form?form.accountBank:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">银行名称:</div><span>{{form?form.accountBank:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">银行账号:</div><span>{{form?form.accountBank:''}}</span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><span style="width: 120px;text-align: right;">水单号:</span><span>{{form?form.accountBank:''}}</span></div>
<div style="flex:1"><span style="width: 120px;text-align: right;">手续费:</span><span>{{form?form.accountBank:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">水单号:</div><span>{{form?form.accountBank:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">手续费:</div><span>{{form?form.accountBank:''}}</span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;">
<div style="flex:1"><span style="width: 120px;text-align: right;">备注:</span><span>{{form?form.accountBank:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">备注:</div><span>{{form?form.accountBank:''}}</span></div>
</div>
</div>
<table border="1" style="margin-top: 20px;width: 100%;text-align: center;border-collapse: collapse; ">
......
<template>
<div class="app-container">
<div slot="header" class="card-title">待收款</div>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8" style="margin-right: 60px;">
<el-button style="float: right;margin-left:10px" type="primary" size="mini" @click="handleAdd(0)">新增收款单</el-button>
<el-button v-if="showSearch" style="float: right;" type="primary" size="mini" icon="el-icon-s-unfold" @click="showSearch=!showSearch"></el-button>
<el-button v-else style="float: right;" type="primary" size="mini" icon="el-icon-s-fold" @click="showSearch=!showSearch"></el-button>
</el-row>
<div slot="header" class="card-title">待收款</div>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8" style="margin-right: 60px">
<el-button
style="float: right; margin-left: 10px"
type="primary"
size="mini"
@click="handleAdd(0)"
>新增收款单</el-button
>
<el-button
v-if="showSearch"
style="float: right"
type="primary"
size="mini"
icon="el-icon-s-unfold"
@click="showSearch = !showSearch"
></el-button>
<el-button
v-else
style="float: right"
type="primary"
size="mini"
icon="el-icon-s-fold"
@click="showSearch = !showSearch"
></el-button>
</el-row>
<!-- 搜索工作栏 -->
<el-card v-show="showSearch">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="80px" class="card">
<el-row>
<el-form-item label="始发城市:">
<el-select v-model="queryParams.departureId" placeholder="请选择始发城市">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的城市:">
<el-select v-model="queryParams.objectiveId" placeholder="请选择目的城市">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式:" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
</el-form-item>
<el-form-item label="控货:">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.control" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="订单状态:">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.control" />
</el-form-item>
<el-form-item label="报关方式:">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" />
</el-form-item>
<el-form-item label="订单号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="品名:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入品名" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="提单号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入提单号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="唛头:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入唛头" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="费用类型:" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.feeType"></dict-selector>
</el-form-item>
<el-form-item label="发货人:" prop="consignorId">
<customer-selector v-model="queryParams.consignorId" @change="consignor = $event" />
</el-form-item>
<!-- <el-form-item label="发货人:" >
<el-card v-show="showSearch">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="80px"
class="card"
>
<el-row>
<el-form-item label="始发城市:">
<el-select
v-model="queryParams.departureId"
placeholder="请选择始发城市"
>
<el-option
v-for="item in expoerCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的城市:">
<el-select
v-model="queryParams.objectiveId"
placeholder="请选择目的城市"
>
<el-option
v-for="item in importCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式:">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
/>
</el-form-item>
<el-form-item label="控货:">
<dict-selector
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="queryParams.isCargoControl"
/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="订单状态:">
<dict-selector
:type="DICT_TYPE.ORDER_STATUS"
v-model="queryParams.status"
/>
</el-form-item>
<el-form-item label="报关方式:">
<dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model="queryParams.customsType"
/>
</el-form-item>
<el-form-item label="订单号:">
<el-input
style="max-width: 188px"
v-model="queryParams.orderNo"
placeholder="请输入订单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="品名:">
<el-input
style="max-width: 188px"
v-model="queryParams.title"
placeholder="请输入品名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="提单号:">
<el-input
style="max-width: 188px"
v-model="queryParams.tidanNo"
placeholder="请输入提单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="唛头:">
<el-input
style="max-width: 188px"
v-model="queryParams.marks"
placeholder="请输入唛头"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="费用类型:">
<dict-selector
:type="DICT_TYPE.FEE_TYPE"
v-model="queryParams.feeType"
></dict-selector>
</el-form-item>
<el-form-item label="发货人:">
<customer-selector
v-model="queryParams.consignorNameOrPhone"
@change="consignor = $event"
/>
</el-form-item>
<!-- <el-form-item label="发货人:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入发货人" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
</el-row>
<el-row>
<el-form-item label="收货人:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入收货人" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="自编号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<dict-selector :type="DICT_TYPE.BEGINTIME_TYPE_ENDTIME" v-model="queryParams.date"></dict-selector>
<el-date-picker
v-model="dateType"
type="datetimerange"
range-separator="-"
start-placeholder="请选择日期"
end-placeholder="请选择日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</el-form-item>
</el-row>
</el-form>
</el-card>
<el-table v-loading="loadings" :data="list" border class="card">
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="唛头" align="center" prop="orderNo" />
<el-table-column label="品名" align="center" prop="orderNo" />
<el-table-column label="箱数" align="center" prop="sumNum" />
<el-table-column label="体积/重量" align="center" prop="weight" />
<el-table-column label="发货人" align="center" prop="orderNo" />
<el-table-column label="收货人" align="center" prop="orderNo" />
<el-table-column label="运输方式" align="center" prop="transportId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId"></dict-tag>
</template>
</el-table-column>
<el-table-column label="出货渠道" align="center" prop="channelName" />
<el-table-column label="始发地" align="center" prop="toDepartureId" />
<el-table-column label="目的地" align="center" prop="toDepartureId" />
<el-table-column label="商品信息" align="center" prop="toDepartureId" />
<el-table-column label="订单状态" align="center" prop="orderStatus">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.orderStatus" />
</template>
</el-table-column>
<el-table-column label="收入类型" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.feeType"></dict-tag>
</template>
</el-table-column>
<el-table-column label="总金额美元" align="center" prop="totalAmount" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleAdd(scope.row.consignorId)"
>收款</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList"/>
</el-row>
<el-row>
<el-form-item label="收货人:">
<!-- <el-input style="max-width: 188px;" v-model="queryParams.consigneeNameOrPhone" placeholder="请输入收货人" clearable @keyup.enter.native="handleQuery"/> -->
<customer-selector
v-model="queryParams.consigneeNameOrPhone"
@change="consignor = $event"
/>
</el-form-item>
<el-form-item label="自编号:">
<el-input
style="max-width: 188px"
v-model="queryParams.selfNo"
placeholder="请输入自编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间:">
<!-- <dict-selector :type="DICT_TYPE.BEGINTIME_TYPE_ENDTIME" v-model="queryParams.date"></dict-selector> -->
<el-date-picker
v-model="dateType"
type="datetimerange"
range-separator="-"
value-format="yyyy-MM-dd"
start-placeholder="请选择日期"
end-placeholder="请选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</el-form-item>
</el-row>
</el-form>
</el-card>
<el-table v-loading="loadings" :data="list" border class="card">
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="唛头" align="center" prop="marks" />
<el-table-column label="品名" align="center" prop="title">
<template slot-scope="scope">
{{ scope.row.titleZh + "(" + scope.row.titleEn + ")" }}
</template>
</el-table-column>
<el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量" align="center" prop="weight" />
<el-table-column label="发货人" align="center" prop="consignorName" />
<el-table-column label="收货人" align="center" prop="consigneeName" />
<el-table-column label="订单状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="收入类型" align="center" prop="feeType">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column label="单价美元" align="center" prop="unitPrice" />
<el-table-column label="总金额美元" align="center" prop="totalAmount" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleAdd(scope.row)"
>收款</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</div>
</template>
<script>
import { userList } from "@/api/system/user"
import {DICT_TYPE} from '@/utils/dict'
import CustomerSelector from '@/components/CustomerSelector'
import {getTradeCityList} from '@/api/ecw/region'
import { userList } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import CustomerSelector from "@/components/CustomerSelector";
import { getTradeCityList } from "@/api/ecw/region";
import { getReceivableList } from "@/api/ecw/financial";
export default {
name: "Receivable",
components: {
CustomerSelector
},
data() {
return {
showSearch:true,
loadings: false,
form:{},
creatorData:[],
list:[],
total:0,
dateType:[],
loading:'',
params:{
page:1,
rows:20,
},
queryParams:{
page:1,
rows:20,
},
tradeCityList:[],
}
},
created() {
let that = this
userList('salesman').then(res =>that.creatorData = res.data)
getTradeCityList().then(res => that.tradeCityList = res.data)
},
computed:{
expoerCityList(){
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
},
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getReceiptPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 新增按钮操作 */
handleAdd(id) {
return this.$router.push('creatCollection?consignorId='+id)
},
submitForm(){
}
},
}
</script>
export default {
name: "Receivable",
components: {
CustomerSelector,
},
data() {
return {
showSearch: true,
loadings: false,
form: {},
creatorData: [],
list: [],
total: 0,
dateType: [],
loading: "",
params: {
page: 1,
rows: 20,
},
queryParams: {
page: 1,
rows: 20,
},
tradeCityList: [],
};
},
created() {
let that = this;
userList("salesman").then((res) => (that.creatorData = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
this.getList();
},
computed: {
expoerCityList() {
return this.tradeCityList.filter((item) => item.type == 2);
},
importCityList() {
return this.tradeCityList.filter((item) => item.type == 1);
},
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateType, "createTime");
// 执行查询
getReceivableList(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
/** 新增按钮操作 */
handleAdd(row) {
// return this.$router.push("creatCollection?id=" + row.id, { params });
return this.$router.push({ path: "creatCollection?id=" + row.id, query: { data: JSON.stringify(row) } })
},
submitForm() {},
},
};
</script>
<style>
.card{
margin-top: 20px;
}
.dialog-footer{
padding: 40px;
}
.card-title{
font-size: 18px;
font-weight: bold;
}
</style>
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 40px;
}
.card-title {
font-size: 18px;
font-weight: bold;
}
</style>
......@@ -173,14 +173,6 @@
<el-checkbox v-for="dict in transportDatas" :label="dict.value" :key="dict.value" :value="dict.value" name="freight"> {{dict.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="其他服务" prop="otherServiceList">
<el-checkbox-group v-model="form.otherServiceList">
<el-checkbox label="1">送货上门</el-checkbox>
<el-checkbox label="2">非控货订单代收货款</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="网点详情" prop="contentZh">
<editor v-model="form.contentZh" :min-height="150"/>
......@@ -274,7 +266,6 @@ export default {
// 表单参数
form: {
checkList:[],
otherServiceList:[],
},
// 表单校验
rules: {
......@@ -471,8 +462,7 @@ export default {
worktime: undefined,
adminId: undefined,
aorder: undefined,
checkList: [],
otherServiceList: []
checkList: []
};
this.resetForm("form");
......@@ -508,9 +498,6 @@ export default {
let ckList = response.data.freight.split(',');
this.$set(this.form, 'checkList', ckList);
let otherService = response.data.otherService.split(",");
this.$set(this.form, 'otherServiceList', otherService);
this.open = true;
this.title = "修改服务网点";
});
......@@ -522,6 +509,9 @@ export default {
return;
}
console.log(this.form);
// return;
//逗号拼接运输方式
var freight = ''
for(let i = 0; i < this.form.checkList.length; i++) {
......@@ -530,11 +520,6 @@ export default {
freight = freight.substring(0, freight.length - 1);
this.form.freight = freight;
var otherService = this.form.otherServiceList.join(',');
this.form.otherService= otherService;
// console.log(otherService);
// return;
// 修改的提交
if (this.form.id != null) {
updateNode(this.form).then(response => {
......
......@@ -83,7 +83,7 @@
<el-table-column label="英文名" align="center" prop="prodTitleEn" />
<el-table-column label="品牌" width="100px">
<template slot-scope="scope">
{{scope.row.brand?'':''}}
<dict-tag :value="scope.row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable />
</template>
</el-table-column>
<el-table-column label="件数" width="90px" prop="num" />
......@@ -167,7 +167,7 @@
</el-descriptions>
<el-descriptions v-if="item.transportId==2">
<el-descriptions-item label="船公司">
{{item.airlineCompany}}
{{item.shippingCompany}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[2,3,4].indexOf(item.transportId) > -1">
......
......@@ -33,14 +33,16 @@
</div>
</template>
</el-table-column>
<el-table-column label="入仓时间" prop="rucangTime"></el-table-column>
<el-table-column label="入仓时间" prop="rucangTime">
<template v-slot="{row}">
{{parseTime(row.rucangTime)}}
</template>
</el-table-column>
<el-table-column label="状态">
<template v-slot:default="scope">
<dict-tag :value="scope.row.status" :type="DICT_TYPE.ORDER_STATUS"></dict-tag>
</template>
</el-table-column>
<el-table-column label="操作人"></el-table-column>
<el-table-column label="操作时间"></el-table-column>
<el-table-column label="操作">
<template v-slot:default="scope">
<el-button type="text" size="mini" @click="joinAssociation(scope.row.orderId)">加入关联</el-button>
......
......@@ -33,9 +33,25 @@
</el-table-column>
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column label="订单号" prop="orderBackVO.orderNo"></el-table-column>
<el-table-column label="唛头" prop="marks"></el-table-column>
<el-table-column label="货物数据"></el-table-column>
<el-table-column label="入仓时间"></el-table-column>
<el-table-column label="唛头" prop="orderBackVO.marks"></el-table-column>
<el-table-column label="货物数据">
<template v-slot="{row}">
<div>
{{row.orderBackVO.costVO.totalNum}}
</div>
<div>
{{row.orderBackVO.costVO.totalVolume}}
</div>
<div>
{{row.orderBackVO.costVO.totalWorth}}KG
</div>
</template>
</el-table-column>
<el-table-column label="入仓时间" prop="orderBackVO.rucangTime">
<template v-slot="{row}">
{{parseTime(row.orderBackVO.rucangTime)}}
</template>
</el-table-column>
<el-table-column label="状态" prop="status" >
<template v-slot:default="scope">
<dict-tag :value="scope.row.orderBackVO.status" :type="DICT_TYPE.ORDER_STATUS" ></dict-tag>
......@@ -68,12 +84,14 @@ import {
guanlianList,
} from "@/api/ecw/associatedOrder";
import {getDictDatas,DICT_TYPE} from '@/utils/dict'
import Template from "@/views/cms/template";
export default {
name: "associatedOrder",
props:{
orderId:[String,Boolean]
},
components:{
Template,
ordeDetailsForm
},
computed:{
......@@ -113,6 +131,7 @@ export default {
guanlianList(this.params).then(r => {
if(r.code === 0){
this.list = r.data
console.log( this.list[0])
}
})
},
......
......@@ -4,13 +4,14 @@
<el-descriptions-item label="唛头">{{details.marks}}</el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数">{{details.sumQuantity || 0}}/{{details.totalsumNum || 0}}</el-descriptions-item>
<el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_ABNORMAL_STATE" :value="details.status" />
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="details.status" />
</el-descriptions-item>
<el-descriptions-item label="送货日期"></el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="details.transportId"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="出货渠道">
{{details.channelId}}123
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="details.channelId"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="始发地">{{ details.logisticsInfoDto ? details.logisticsInfoDto.startTitleZh :''}}</el-descriptions-item>
......
......@@ -53,6 +53,9 @@
<el-table-column label="目的地" prop="objectiveName"></el-table-column>
<el-table-column
label="发货人">
<template v-slot="{row}">
<div></div>
</template>
</el-table-column>
<el-table-column
label="收货人">
......@@ -116,6 +119,7 @@ import {
import {applicationGetOrderByProcessId, feeApplicationGet, getOrder, getOrderPage,} from "@/api/ecw/order";
import { getChannelList } from '@/api/ecw/channel';
import Template from "@/views/cms/template";
import {getSupplierPage} from "@/api/ecw/supplier";
export default {
components: {Template},
props:{
......
......@@ -5,17 +5,12 @@
<el-row>
<el-form-item >
<el-select v-model="queryParams.dateType" style="width: 172px;">
<el-option label="入仓时间" value="0"/>
<el-option label="处理时间" value="1"/>
<el-option label="入仓时间" value="1"/>
<el-option label="处理时间" value="2"/>
</el-select>
<el-date-picker
v-model="queryParams.date"
type="datetimerange"
style="margin-left: 10px;"
range-separator="到"
start-placeholder="请选择日期"
end-placeholder="请选择日期">
</el-date-picker>
<el-date-picker clearable v-model="queryParams.beginCreateTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="请选择开始日期" />
<span></span>
<el-date-picker clearable v-model="queryParams.endCreateTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="请选择结束日期" />
</el-form-item>
<el-form-item label="始发地:">
<el-select v-model="queryParams.originId" placeholder="请选择始发地">
......@@ -47,13 +42,13 @@
</el-row>
<el-row>
<el-form-item label="发货人:">
<customer-selector v-model="queryParams.consignorId" @change="consignor = $event" />
<customer-selector v-model="queryParams.consignor" @change="consignor = $event" />
</el-form-item>
<el-form-item label="唛头:">
<el-input v-model="queryParams.marks" placeholder="请输入唛头" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="品名:" prop="prodId">
<product-selector v-model="queryParams.prodId" @keyup.enter.native="handleQuery" />
<el-form-item label="品名:">
<product-selector v-model="queryParams.goodsName" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="备案:">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" @keyup.enter.native="handleQuery"/>
......@@ -61,13 +56,13 @@
</el-row>
<el-row>
<el-form-item label="跟进业务">
<el-select v-model="queryParams.followUpSalesmanId" placeholder="请选择跟进业务">
<el-select v-model="queryParams.salesmanId" placeholder="请选择跟进业务">
<el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="reset">重置</el-button>
<!-- <el-button icon="el-icon-refresh" @click="reset">重置</el-button> -->
</el-form-item>
</el-row>
</el-form>
......@@ -85,7 +80,12 @@
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="订单号" align="center">
<template slot-scope="scope">
<span>{{scope.row.orderNo}}</span>
<span>{{specialNeedTag(scope.row.specialNeed)}}</span>
</template>
</el-table-column>
<el-table-column label="唛头" align="center" >
<template slot-scope="scope">
<span>{{scope.row.marks||''}}</span>
......@@ -168,21 +168,7 @@ export default {
// 查询参数
queryParams: {
page: 1,
rows: 10,
dateType:null,
date:null,
originId:null,
destinationId:null,
transportId:null,
isCargoControl:null,
orderExceptionStatus:null,
orderExceptionType:null,
orderNo:null,
consignorId:null,
marks:null,
prodId:null,
productRecord:null,
followUpSalesmanId:null
rows: 10
},
tradeCityList:[],
};
......@@ -198,7 +184,8 @@ export default {
},
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
}
},
},
methods: {
/** 查询列表 */
......@@ -218,20 +205,6 @@ export default {
this.queryParams = {
page: 1,
rows: 10,
dateType:undefined,
date:undefined,
originId:undefined,
destinationId:undefined,
transportId:undefined,
isCargoControl:undefined,
orderExceptionStatus:undefined,
orderExceptionType:undefined,
orderNo:undefined,
consignorId:undefined,
marks:undefined,
prodId:undefined,
productRecord:undefined,
followUpSalesmanId:undefined
};
this.resetForm("queryForm");
},
......@@ -247,6 +220,31 @@ export default {
this.$router.push({
path:"./pending?id="+id,
})
},
specialNeedTag(value){
var tag = ''
if(!value){
return
}
if(value.indexOf("1")!=-1||value.indexOf("2")!=-1){
tag += '(木)'
}
if(value.indexOf("3")!=-1){
tag += '(箱)'
}
if(value.indexOf("4")!=-1){
tag += '(袋)'
}
if(value.indexOf("5")!=-1){
tag += '(纸)'
}
if(value.indexOf("6")!=-1){
tag += '(垫)'
}
if(value.indexOf("7")!=-1){
tag += '(空)'
}
return tag
}
}
}
......
......@@ -32,17 +32,37 @@
width="55">
</el-table-column>
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column label="订单号" prop="orderNo"></el-table-column>
<el-table-column label="唛头" prop="marks"></el-table-column>
<el-table-column label="货物数据"></el-table-column>
<el-table-column label="入仓时间" prop="remarks"></el-table-column>
<el-table-column label="订单号" prop="orderBackVO.orderNo"></el-table-column>
<el-table-column label="唛头" prop="orderBackVO.marks"></el-table-column>
<el-table-column label="货物数据">
<template v-slot="{row}">
<div>
{{row.orderBackVO.costVO.totalNum}}
</div>
<div>
{{row.orderBackVO.costVO.totalVolume}}
</div>
<div>
{{row.orderBackVO.costVO.totalWorth}}KG
</div>
</template>
</el-table-column>
<el-table-column label="入仓时间">
<template v-slot="{row}">
{{parseTime(row.orderBackVO.rucangTime)}}
</template>
</el-table-column>
<el-table-column label="状态" prop="status" >
<template v-slot:default="scope">
<dict-tag :value="scope.row.status" :type="DICT_TYPE.ORDER_STATUS" ></dict-tag>
<dict-tag :value="scope.row.orderBackVO.status" :type="DICT_TYPE.ORDER_STATUS" ></dict-tag>
</template>
</el-table-column>
<el-table-column label="操作人"></el-table-column>
<el-table-column label="操作时间" prop="createTime"></el-table-column>
<el-table-column label="操作时间" prop="createTime">
<template v-slot="{row}">{{
parseTime(row.orderBackVO.createTime)
}}</template>
</el-table-column>
<el-table-column label="操作">
<template v-slot:default='scope'>
<el-button type="text" @click ="guanlianOrderByOrderId(scope.row.orderId)">
......@@ -64,12 +84,14 @@ import {
guanlianList,
} from "@/api/ecw/mutexOrder";
import {getDictDatas,DICT_TYPE} from '@/utils/dict'
import Template from "@/views/cms/template";
export default {
name: "mutexOrder",
props:{
orderId:[String,Boolean]
},
components:{
Template,
ordeDetailsForm
},
data(){
......
......@@ -13,7 +13,7 @@
</el-form-item>
</el-form>
<h1 class="title">
未加入关联订单列表
未加入互斥订单列表
</h1>
<el-divider></el-divider>
<el-table :data="list" @selection-change="handleSelectionChange">
......@@ -24,15 +24,29 @@
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="订单号" prop="orderNo"></el-table-column>
<el-table-column label="唛头" prop="marks"></el-table-column>
<el-table-column label="货物数据"></el-table-column>
<el-table-column label="入仓时间" prop="rucangtime"></el-table-column>
<el-table-column label="货物数据">
<template v-slot="{row}">
<div>
{{row.costVO.totalNum}}
</div>
<div>
{{row.costVO.totalVolume}}
</div>
<div>
{{row.costVO.totalWorth}}KG
</div>
</template>
</el-table-column>
<el-table-column label="入仓时间" prop="rucangTime">
<template v-slot="{row}">
{{parseTime(row.rucangTime)}}
</template>
</el-table-column>
<el-table-column label="状态">
<template v-slot:default="scope">
<dict-tag :value="scope.row.status" :type="DICT_TYPE.ORDER_STATUS"></dict-tag>
</template>
</el-table-column>
<el-table-column label="操作人"></el-table-column>
<el-table-column label="操作时间"></el-table-column>
<el-table-column label="操作">
<template v-slot:default="scope">
<el-button type="text" size="mini" @click="joinAssociation(scope.row.orderId)">加入互斥</el-button>
......@@ -91,6 +105,7 @@ export default {
}).then(r => {
if (r.code === 0) {
this.list = r.data
console.log(this.list[0])
}
})
},
......
......@@ -8,13 +8,13 @@
{{orderData.marks?orderData.marks:''}}
</el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数">
{{orderData.sumNum||0}}/{{orderData.costVO?orderData.costVO.num:0}}
{{orderData.sumNum||0}}/{{orderData.costVO?orderData.costVO.totalNum:0}}
</el-descriptions-item>
<el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" />
</el-descriptions-item>
<el-descriptions-item label="送货日期">
<span v-if="orderData">{{orderData.status>=5?(orderData.orderItemVOList.length>0?orderData.orderItemVOList[0].warehouseInInfoVO.inTime:''):(orderData.consigneeVO?orderData.consigneeVO.deliveryDate:'')}}</span>
<span v-if="orderData">{{orderData.status>=5?(orderData.orderItemVOList.length>0?orderData.orderItemVOList[0].warehouseInInfoVO.firstInTime:''):(orderData.consigneeVO?orderData.consigneeVO.deliveryDate:'')}}</span>
</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
......@@ -65,54 +65,61 @@
</el-table-column>
<el-table-column label="异常描述" align="center">
<template slot-scope="scope">
<span>{{scope.row.orderExceptionRemark}}</span>
<span>{{scope.row.orderExceptionDescVO.descZh}}</span>
</template>
</el-table-column>
<el-table-column label="金额" align="center" scope="orderExceptionAmount" />
<el-table-column label="异常状态" align="center">
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :value="scope.row.orderExceptionStatus" />
</template>
</el-table-column>
<el-table-column label="附件" align="center">
<template slot-scope="scope">
<span>{{scope.row.orderExceptionRemark}}</span>
<div class="filelist">
<span v-for="(item,index) in scope.row.orderExceptionAttr" :key="index" @click="onClickOpenPreview(item,scope.$index)">{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column label="处理人" align="center" prop="orderExceptionAmount" />
<el-table-column label="处理时间" align="center" prop='orderExceptionTime' />
<el-table-column label="处理人" align="center" prop="userName" />
<el-table-column label="处理时间" align="center" prop='handlerTime' />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.id,scope.row.orderExceptionType)">处理</el-button>
<el-tag v-if="scope.row.orderExceptionStatus>0">已完成</el-tag>
<el-button v-else size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.id,scope.row.orderExceptionType)">处理</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<div class="preview" v-if="IsPreview">
<file-preview :key="timers" :TragetPic="TragetPic" :FilePreAll="FilePreAll" @Close="onClickClosePreview"></file-preview>
</div>
</div>
</template>
<script>
import {getExceptionListByOrderId} from "@/api/ecw/orderException"
import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from '@/utils/dict'
import {getOrder} from '@/api/ecw/order'
import FilePreview from '@/components/FilePreview'
export default {
name: "Pending",
components: {
FilePreview
},
data() {
return {
// 遮罩层
loading: false,
// 显示搜索条件
showSearch: true,
loading: true,
orderData:{},
// 订单异常列表
list: [],
tradeCityList:[],
orderId:0
orderId:0,
IsPreview:false, // 控制预览弹窗字段
timers:"", //时间戳
FilePreAll:[], // 预览数组
TragetPic:{},
};
},
created() {
......@@ -121,7 +128,6 @@ export default {
this.getList()
this.getOrders()
}
getTradeCityList().then(res => this.tradeCityList = res.data)
},
methods: {
/** 查询列表 */
......@@ -138,22 +144,72 @@ export default {
this.orderData = response.data
});
},
importCityName(id){
var arr = this.tradeCityList.filter(item => item.id == id)
return arr.length>0?arr[0].titleZh:''
},
handEdit(id, type){
// if(type == 3){
if(type == 8||type==15){
this.$router.push({
path:"/order/weightDeal?id="+id,
})
}else{
this.$router.push({
path:"/order/prepayDeal?id="+id,
})
// }
}
}
},
getFileName(fileName){
var fileArr = fileName.split('/')
return fileArr[fileArr.length-1]
},
getFileFormat(fileName){
var fileArr = this.getFileName(fileName).split('.')
return fileArr[fileArr.length-1]
},
// 打开预览
onClickOpenPreview(val,index){
this.TragetPic = { // 当前点击的文件
FileName: this.getFileName(val), // 文件名称
name: this.getFileName(val), // 文件名称(可以不传)
format:this.getFileFormat(val), // 文件格式
url: val, // 预览地址
downUrl:"", // 下载地址
} // 目标对象
if(this.list[index].orderExceptionAttr.indexOf(',')==-1){
this.FilePreAll.push(this.TragetPic)
}else{
var fileArr = this.list[index].orderExceptionAttr.split(',')
fileArr.forEach(item =>{ // 需要预览的文件数组(可以传空数组就是单张预览)
let obj = {
FileName: this.getFileName(item),
name: this.getFileName(item),
format:this.getFileFormat(item),
url: item,
downUrl:"",
}
this.FilePreAll.push(obj)
})
}
this.IsPreview = true // 打开预览弹窗
this.timers = new Date().getTime() // 刷新预览地址
},
// 关闭预览
onClickClosePreview(val){
this.IsPreview = val // 由组件内部传入的关闭数据赋值关闭
},
}
}
</script>
<style>
<style scoped>
.filelist{
display: flex;
flex-wrap: wrap;
align-items: center;
}
.filelist span{
width: 48%;
margin-right: 2%;
color: #1E98D7;
}
.card-title{
font-size: 18px;
font-weight: bold;
......
......@@ -11,43 +11,53 @@
{{orderData?orderData.orderNo:''}}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="产品名称:">
{{orderData.totalMoney}}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="英文名称:">
{{orderData.totalMoney}}
</el-form-item>
</el-row>
<div v-if="orderExceptionData.orderExceptionType==1||orderExceptionData.orderExceptionType==2">
<el-row>
<el-form-item label="产品名称:" >
{{shopData?shopData.prodTitleZh:''}}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="产品名称英文名称:">
{{shopData?shopData.prodTitleEn:''}}
</el-form-item>
</el-row>
</div>
<el-row>
<el-form-item label="运输路线:" >
<span v-if="orderData"><dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /></span>
{{orderData?getRouterNameById(orderData.lineId):''}}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="填单参数:">
{{(orderData.sumNum||0)+''+(orderData.sumVolume||0)+''+(orderData.sumWeight||0)+'kg'}}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="入仓参数:">
{{(orderData.sumNum||0)+''+(orderData.sumVolume||0)+''+(orderData.sumWeight||0)+'kg'}}
</el-form-item>
</el-row>
<el-row :span="12">
<el-form-item label="异常描述:">
{{orderData.totalMoney||''}}
</el-form-item>
<el-button type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button>
</el-row>
<div v-if="orderExceptionData.orderExceptionType!=3||orderExceptionData.orderExceptionType!=9||orderExceptionData.orderExceptionType!=10||orderExceptionData.orderExceptionType!=11">
<el-row>
<el-form-item label="填单参数:">
{{(orderData.costVO?orderData.costVO.totalNum:0)+''+(orderData.costVO?orderData.costVO.totalVolume:0)+''+(orderData.costVO?orderData.costVO.totalWeight:0)+'kg'}}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="入仓参数:">
{{(orderData.sumNum||0)+''+(orderData.sumVolume||0)+''+(orderData.sumWeight||0)+'kg'}}
</el-form-item>
</el-row>
<el-row :span="12">
<el-form-item label="异常描述:">
{{orderData.totalMoney||''}}
</el-form-item>
<el-button v-if="orderExceptionData.orderExceptionType==3" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button>
</el-row>
<!-- <el-row :span="12">
<el-form-item label="详细内容:">
{{orderData.totalMoney||''}}
</el-form-item>
<el-button v-if="orderExceptionData.orderExceptionStatus==3" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button>
</el-row> -->
</div>
</el-form>
<el-table v-loading="loading" border :data="orderData.orderItemVOList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column label="品名" align="center" prop="goodsType">
<el-table v-if="orderExceptionData.orderExceptionType==3" v-loading="loading" border :data="orderData.orderItemVOList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55">
</el-table-column> -->
<el-table-column label="品名" align="center">
<template slot-scope="scope">
{{scope.row.prodTitleZh+'('+scope.row.prodTitleEn+')'}}
</template>
......@@ -83,18 +93,33 @@
</template>
</el-table-column>
</el-table>
<el-form :model="orderData" ref="queryForms" size="small" :inline="true" label-width="120px" class="card">
<el-row>
<el-table v-if="orderExceptionData.orderExceptionType==9||orderExceptionData.orderExceptionType==10||orderExceptionData.orderExceptionType==11" v-loading="loading" border :data="orderData.orderItemVOList">
<el-table-column label="中文名" align="center" prop="prodTitleZh" />
<el-table-column label="英文名" align="center" prop="prodTitleEn" />
<el-table-column label="品牌" align="center" prop="brand" />
<el-table-column label="填单箱数" prop="num" />
<el-table-column label="入仓箱数">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO.cartonsNum}}
</template>
</el-table-column>
<el-table-column label="方数" prop="volume" />
<el-table-column label="重量" prop="weight" />
<el-table-column label="数量" prop="quantity" />
<el-table-column label="货值" prop="worth" />
</el-table>
<el-form :model="handlerParams" ref="queryForms" size="small" :inline="true" label-width="120px" class="card">
<el-row v-if="orderExceptionData.orderExceptionType==3">
<el-form-item label="应付金额:">
{{orderData.totalMoney}}
</el-form-item>
</el-row>
<el-row>
<el-row v-if="orderExceptionData.orderExceptionType==3">
<el-form-item label="核销金额:">
{{orderData.totalMoney}}
</el-form-item>
</el-row>
<el-row>
<el-row v-if="orderExceptionData.orderExceptionType==3">
<el-form-item label="核销比例:">
{{orderData.totalMoney}}
</el-form-item>
......@@ -102,7 +127,7 @@
<el-row>
<el-form-item label="处理结果:" >
<el-select v-model="handlerParams.orderExceptionHandlerResult">
<el-option v-for="dict in this.getDictDatas('order_pay_exception_result')"
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
......@@ -112,6 +137,28 @@
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
</el-form-item>
</el-row>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType==9">
<el-form-item label="报关资料:" size="medium">
<file-upload v-model="handlerParams.fileList" :value="orderExceptionData.file" ></file-upload>
</el-form-item>
</el-row>
<div v-if="orderExceptionData.orderExceptionType==4||orderExceptionData.orderExceptionType==5||orderExceptionData.orderExceptionType==6||orderExceptionData.orderExceptionType==7">
<el-row >
<el-form-item label="详细内容:">
{{orderExceptionData.content}}
</el-form-item>
</el-row>
<el-row >
<el-form-item label="状态:">
<dict-selector :type="DICT_TYPE.ORDER_ERROR_TYPE" v-model="handlerParams.orderExceptionStatus" />
</el-form-item>
</el-row>
<el-row >
<el-form-item label="*查明原因:">
{{orderExceptionData.content}}
</el-form-item>
</el-row>
</div>
</el-form>
</el-card>
<div slot="footer" class="dialog-footer">
......@@ -119,21 +166,22 @@
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button plain type="primary" @click="$router.back()">取消</el-button>
</div>
<el-button type="primary" @click="submitForm">转交</el-button>
<el-button v-if="orderExceptionData.orderExceptionStatus==3" type="primary" @click="submitForm">转交</el-button>
</div>
</div>
</template>
<script>
import {DICT_TYPE} from '@/utils/dict'
import FileUpload from '@/components/FileUpload'
import {getDictData, getDictDatas} from '@/utils/dict'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getOrder} from '@/api/ecw/order'
import {getExceptionById,handlerExceptionByExceptionId} from "@/api/ecw/orderException"
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById} from "@/api/ecw/orderException"
export default {
name: "PrepayDeal",
components: {
FileUpload
},
data() {
return {
......@@ -149,6 +197,7 @@
handlerParams:{
orderExceptionId:0
},
shopData:{},
//发货/收货人信息
consigneeData:[],
routerList:[],
......@@ -169,9 +218,13 @@
that.loading = true;
getExceptionById(that.orderExceptionId).then(response => {
that.orderExceptionData = response.data;
that.handlerParams.orderExceptionStatus = response.data.orderExceptionStatus
that.loading = false;
that.orderId = response.data.orderId
that.getOrderData()
if(response.data.hasOwnProperty('orderItemId')){
that.getShopData(response.data.orderItemId)
}
});
},
getOrderData(){
......@@ -179,6 +232,11 @@
this.orderData = response.data
});
},
getShopData(id){
getOrderItemById(id).then(res=>{
this.shopData = res.data
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
......@@ -205,12 +263,11 @@
// }
},
submitForm(){
handlerExceptionByExceptionId(that.orderExceptionId).then(response => {
that.orderExceptionData = response.data;
that.loading = false;
that.orderId = response.data.orderId
this.getOrderData()
});
console.log(this.handlerParams)
handlerExceptionByExceptionId(this.handlerParams).then(res=>{
this.$modal.msgSuccess("提交成功");
this.$router.back()
})
},
/** 跟进按钮操作 */
handleAdd() {
......@@ -233,7 +290,7 @@
margin-top: 10px;
}
.header{
width: 60%;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
......
......@@ -5,7 +5,8 @@
<order-base-info :order="order"></order-base-info>
<div style="margin-top: 20px">
<span>储位:{{ locationName }}</span><el-button type="primary" size="mini" @click="areaVisible = true" style="margin-left: 15px">选择</el-button>
<span>储位:{{ ($refs.area ? $refs.area.selected : []).join(',') }}</span>
<el-button type="primary" size="mini" @click="areaVisible = true" style="margin-left: 15px">选择</el-button>
</div>
<h2>货物信息</h2>
......@@ -90,7 +91,7 @@
</div>
</el-form>
<warehouse-area-dialog :visible.sync="areaVisible" v-model="locationName"></warehouse-area-dialog>
<warehouse-area-dialog ref="area" :visible.sync="areaVisible" v-model="form.orderLocationCreateReqVOList" :order-id="orderId"></warehouse-area-dialog>
<edit-dialog :visible.sync="warehousingVisible" :warehousing="warehousing"></edit-dialog>
......@@ -118,10 +119,10 @@ import {getCurrencyList} from "@/api/ecw/currency"
import {
getOrder,
getOrderWarehouseIn,
getSpecialListByOrderId,
getSpecialListByOrderId, listByOrderId,
orderWarehouseInFinish,
rollbackApply
} from "@/api/ecw/order"
} from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import editDialog from '@/views/ecw/order/warehousing/components/editDialog'
......@@ -140,10 +141,11 @@ export default {
mounted() {
if(this.$route.query.id){
this.orderId = this.$route.query.id
this.orderId = parseInt(this.$route.query.id || undefined)
getOrder(this.orderId).then(r => this.order = r.data)
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
listByOrderId({ orderId: this.orderId }).then(r => this.form.orderLocationCreateReqVOList = r.data)
}
getCurrencyList().then(res => this.currencyList = res.data)
},
......@@ -153,10 +155,10 @@ export default {
DICT_TYPE,
areaVisible: false,
finishVisible: false,
locationName: '',
warehousingVisible: false,
form: {
orderSpecialNeedReceivableReqVoList: []
orderSpecialNeedReceivableReqVoList: [],
orderLocationCreateReqVOList: []
},
currencyList:[],
order: {},
......@@ -172,7 +174,7 @@ export default {
handleSubmit() {
orderWarehouseInFinish({
orderSpecialNeedReceivableReqVoList: this.form.orderSpecialNeedReceivableReqVoList,
"locationName": this.locationName,
"orderLocationCreateReqVOList": this.form.orderLocationCreateReqVOList,
"orderId": this.order.orderId
}).then(r => {
if (r.data) {
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-card>
<div slot="header" class="card-title">查看</div>
<el-descriptions :column="4">
<el-descriptions-item label="唛头">
{{orderData.marks?orderData.marks:''}}
</el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数">
{{orderData.sumNum||0}}/{{orderData.costVO?orderData.costVO.totalNum:0}}
</el-descriptions-item>
<el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" />
</el-descriptions-item>
<el-descriptions-item label="送货日期">
<span v-if="orderData">{{orderData.status>=5?(orderData.orderItemVOList.length>0?orderData.orderItemVOList[0].warehouseInInfoVO.inTime:''):(orderData.consigneeVO?orderData.consigneeVO.deliveryDate:'')}}</span>
</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item>
<el-descriptions-item label="始发地">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:''}}
</el-descriptions-item>
<el-descriptions-item label="目的地">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.destTitleZh:''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item label="发货人">
{{orderData.consignorVO?orderData.consignorVO.name||'':''}}
</el-descriptions-item>
<el-descriptions-item label="发货公司">
{{orderData.consignorVO?orderData.consignorVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="发货电话">
{{orderData.consignorVO?orderData.consignorVO.phone||'':''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item label="收货人">
{{orderData.consigneeVO?orderData.consigneeVO.name||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货公司">
{{orderData.consigneeVO?orderData.consigneeVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货电话">
{{orderData.consigneeVO?orderData.consigneeVO.phone||'':''}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card">
<!-- 列表 -->
<div slot="header" class="card-title">货物信息</div>
<el-table v-loading="loading" border :data="orderData.orderItemVOList" :summary-method="getSummaries" show-summary>
<el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="品名" align="center" >
<template slot-scope="scope">
<p>{{scope.row.prodTitleEn||''}}</p>
<p>{{scope.row.prodTitleZh||''}}</p>
</template>
</el-table-column>
<el-table-column label="填单货物信息">
<template slot-scope="scope">
<p>品牌:<dict-tag :value="scope.row.brandType" :type="DICT_TYPE.ECW_IS_BRAND" /></p>
<p>箱数:{{scope.row.num||0}}</p>
<p>体积:{{scope.row.volume||0}}CBM</p>
<p>重量:{{scope.row.weight||0}}KG</p>
</template>
</el-table-column>
<el-table-column label="入库货物属性" align="center" >
<template slot-scope="scope">
<span>规格:{{scope.row.boxGauge||0}}</span>
<p>
<span>品牌:<dict-tag :value="scope.row.brand" :type="DICT_TYPE.ECW_IS_BRAND" /></span>
<span>箱数:{{scope.row.num||0}}</span>
<span>体积:{{scope.row.volume||0}}CBM</span>
<span>重量:{{scope.row.weight||0}}KG</span>
</p>
</template>
</el-table-column>
<el-table-column label="重货方数" align="center" >
<template slot-scope="scope">
<span>{{scope.row.ss||0}}CBM</span>
</template>
</el-table-column>
<el-table-column label="最后操作时间" scope="handlerTime" />
</el-table>
</el-card>
<div slot="footer" class="dialog-footer">
<div>
<el-button type="primary" @click="submit('general_cargo')">设为普货</el-button>
<el-button plain type="primary" @click="submit('process')">设为已处理</el-button>
</div>
</div>
</div>
</template>
<script>
import {getExceptionById,handlerExceptionByExceptionId} from "@/api/ecw/orderException"
import {DICT_TYPE} from '@/utils/dict'
import {getOrder} from '@/api/ecw/order'
export default {
name: "WeightDeal",
components: {
},
data() {
return {
// 遮罩层
loading: false,
orderData:{},
list: {},
orderId:0,
};
},
created() {
if(this.$route.query.id){
this.id = this.$route.query.id
this.getList()
}
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
getExceptionById(this.id).then(response => {
this.list = response.data;
this.loading = false;
this.getOrders()
});
},
getOrders(){
getOrder(this.list.orderId).then(response => {
this.orderData = response.data
});
},
getSummaries(){
const sums = [];
if(!this.orderData || !this.orderData.list ||ths.orderData.length==0){
return sums
}
sums[0] = '小计'
var orderSum = 0
var orderV = 0
var orderW = 0
var leviteSum = 0
var leviteV = 0
var leviteW = 0
this.orderData.list.forEach((column, index) => {
orderSum += column.orderSum
orderV += column.volume
orderW += column.weight
leviteSum += column.orderSum
leviteV += column.volume
leviteW += column.weight
});
sums[1] = ''
sums[2] = '下单统计:'+ orderSum+''+ orderV +'' + orderW + ' kg'
sums[3] = '入仓统计:'+ leviteSum+''+ leviteV +'' + leviteW + ' kg'
sums[4] = ''
sums[5] = ''
return sums;
},
submit(result){
handlerExceptionByExceptionId({orderExceptionId:this.list.id,orderExceptionHandlerResult:result}).then(res=>{
this.$modal.msgSuccess("提交成功");
this.$router.back()
})
}
}
}
</script>
<style scoped>
.filelist{
display: flex;
flex-wrap: wrap;
align-items: center;
}
.filelist span{
width: 48%;
margin-right: 2%;
color: #1E98D7;
}
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card{
margin-top: 20px;
}
</style>
......@@ -122,12 +122,21 @@
</template>
</el-table-column>
<el-table-column label="路线服务" align="center" prop="otherService">
<template slot-scope="scope">
<div>{{ serviceNames(scope.row.otherService) }}</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="routeStatusClick(scope.row)"
v-hasPermi="['ecw:warehouse:routerQuery']">{{scope.row.lineId ? '关闭线路' : '开通线路'}}</el-button>
<el-button size="mini" type="primary" @click="templateClick(scope.row)" v-if="scope.row.lineId != null"
v-hasPermi="['ecw:warehouse:routerQuery']">设置路线提单模板</el-button>
<el-button size="mini" type="primary" @click="serviceClick(scope.row)" v-if="scope.row.lineId != null"
v-hasPermi="['ecw:warehouse:routerQuery']">开通服务</el-button>
</template>
</el-table-column>
</el-table>
......@@ -266,6 +275,22 @@
</div>
</el-dialog>
<!--设置服务-->
<el-dialog title="设置服务" :visible.sync="serviceOpen" width="1000px" append-to-body>
<el-form ref="form" :model="lineform" :rules="rules" label-width="80px">
<el-form-item label="其他服务" prop="otherServiceList">
<el-checkbox-group v-model="lineform.serviceList">
<el-checkbox v-for="item in serviceGroup" :label="item.id" :key="item.id" :value="item.id"> {{item.text}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitLineForm">保 存</el-button>
</div>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="设置路线提单模板" :visible.sync="templateOpen" width="1000px" @close="ladingFormClose()" append-to-body>
<el-form ref="form" :model="ladingform" :rules="rules" label-width="80px">
......@@ -340,7 +365,7 @@
<script>
import { createWarehouse, updateWarehouse, deleteWarehouse, getWarehouse, getWarehousePage,createTemplate,getLadingTemplate,
exportWarehouseExcel,routerList,changeRouteStatus,deptBind,deptList } from "@/api/ecw/warehouse";
exportWarehouseExcel,routerList,changeRouteStatus,deptBind,deptList,serviceConfig } from "@/api/ecw/warehouse";
import { getNodePage } from "@/api/ecw/node";
import { getListTree } from "@/api/ecw/region";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
......@@ -404,6 +429,11 @@ export default {
//市信息列表
cityList: [],
serviceGroup: [
{id: '1', text: '送货上门'},
{id: '2', text: '非控货订单代收货款'}
],
// 总条数
total: 0,
// 仓库列表
......@@ -414,6 +444,8 @@ export default {
open: false,
templateOpen:false,
dateRangeCreateTime: [],
serviceOpen: false,
isUpdate: false,
......@@ -457,6 +489,8 @@ export default {
// 表单参数
form: {checkList:[],},
ladingform: {prefixCounter:null,titleZh:null,contentZh:null,account:null,acctArr:[]},
lineform: {serviceList:[]},
// 表单校验
rules: {
nodeId: [{ required: true, message: "服务网点不能为空", trigger: "blur" }],
......@@ -521,6 +555,25 @@ export default {
}
}
},
serviceNames() {
return otherService => {
if(!otherService) return '';
let serviceList = otherService.split(",");
let names = [];
for(let index in serviceList) {
let item = serviceList[index];
for(let dictIndex in this.serviceGroup) {
let dictItem = this.serviceGroup[dictIndex];
if(dictItem.id == item) {
names.push(dictItem.text);
break;
}
}
}
return names.join(',');
}
}
},
watch: {
......@@ -712,6 +765,33 @@ export default {
this.templateOpen = true;
},
serviceClick(row) {
if(row.otherService) {
this.lineform.serviceList = row.otherService.split(",");
} else {
this.lineform.serviceList = [];
}
this.serviceOpen = true;
this.lineform.lineId = row.lineId;
},
submitLineForm() {
let otherService = this.lineform.serviceList.join(',');
this.lineform.otherService = otherService;
serviceConfig(this.lineform).then(res => {
this.$modal.msgSuccess("操作成功");
for(let index in this.routeList) {
let routeItem = this.routeList[index];
if(routeItem.lineId && routeItem.lineId == this.lineform.lineId) {
// routeItem.otherService = otherService;
this.$set(routeItem, 'otherService', otherService);
}
}
this.serviceOpen = false;
})
},
routeStatusClick(row) {
this.routeQueryParam.transportType = row.transportType;
this.routeQueryParam.warehouseId = row.id;
......
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