Commit 6653bd1e authored by 我在何方's avatar 我在何方
parents 18982c34 7b5bdacb
...@@ -50,23 +50,35 @@ export default { ...@@ -50,23 +50,35 @@ export default {
padding: 50px; padding: 50px;
text-align: center; text-align: center;
} }
$sizes: 10,20,30,50,100,150,200,500,800,1000; $sizes: 0, 10,20,30,50,100,150,200,500,800,1000;
@for $i from 1 through length($sizes){ @for $i from 1 through length($sizes){
$item: nth($sizes, $i); $item: nth($sizes, $i);
.ml-#{$item}{ .ml-#{$item}{
margin-left: #{$item}px; margin-left: #{$item}px !important;
} }
.mr-#{$item}{ .mr-#{$item}{
margin-right: #{$item}px; margin-right: #{$item}px !important;
} }
.mb-#{$item}{ .mb-#{$item}{
margin-bottom: #{$item}px; margin-bottom: #{$item}px !important;
} }
.mt-#{$item}{ .mt-#{$item}{
margin-top: #{$item}px; margin-top: #{$item}px !important;
}
.pl-#{$item}{
margin-left: #{$item}px !important;
}
.pr-#{$item}{
margin-right: #{$item}px !important;
}
.pb-#{$item}{
margin-bottom: #{$item}px !important;
}
.pt-#{$item}{
margin-top: #{$item}px !important;
} }
.w-#{$item}{ .w-#{$item}{
width: #{$item}px; width: #{$item}px !important;
} }
} }
</style> </style>
...@@ -73,3 +73,19 @@ export function cancelAdjustApply(data){ ...@@ -73,3 +73,19 @@ export function cancelAdjustApply(data){
data data
}) })
} }
//调仓审核
export function warehouseApprovalCancel(params,reason){
return request({
url: `/order/order-warehouse-approval/cancel/${params}`,
method:'get',
params:{reason}
})
}
// 调仓-查看最近的调仓纪录和审核状态
export function adjustLastWithStatus(params){
return request({
url:'/order/order-warehouse-in/adjust-last-with-status',
method:'get',
params,
})
}
...@@ -163,3 +163,19 @@ export function getBrankByCustomer(data){ ...@@ -163,3 +163,19 @@ export function getBrankByCustomer(data){
data, data,
}) })
} }
//
export function levelLogPage(params){
return request({
url:'/customer/level-log/page',
method:'get',
params
})
}
//获取信用等级日志列表
export function customerCreditLogPage(params){
return request({
url:'/customer/credit-log/page',
method:'get',
params
})
}
...@@ -103,12 +103,12 @@ export function feeApplicationListByOrderId(query){ ...@@ -103,12 +103,12 @@ export function feeApplicationListByOrderId(query){
}) })
} }
// 创建特殊 // 批量更新特需
export function specialNeedCreate(data){ export function specialNeedCreate(data){
return request({ return request({
url:'ecw/order-special-need/create', url:'ecw/order-special-need/updateBatch',
method:'post', method:'put',
data:data, data,
}) })
} }
// 创建特殊 // 创建特殊
...@@ -377,6 +377,24 @@ export function getOrderSpecialByApproveId(approveId) { ...@@ -377,6 +377,24 @@ export function getOrderSpecialByApproveId(approveId) {
}) })
} }
// 订单号检索功能
export function getOrderNoSearch(params) {
return request({
url: '/ecw/order/orderNoSearch',
method: 'get',
params
})
}
// 提单号检索功能
export function getBillNoSearch(params) {
return request({
url: '/ecw/order/billNoSearch',
method: 'get',
params
})
}
// 根据合并订单编号获得已合单的订单动态 // 根据合并订单编号获得已合单的订单动态
export function getMergeLogByMergedOrderNo(params){ export function getMergeLogByMergedOrderNo(params){
return request({ return request({
...@@ -403,3 +421,11 @@ export function exportPackingList(){ ...@@ -403,3 +421,11 @@ export function exportPackingList(){
responseType: 'blob' responseType: 'blob'
}) })
} }
//获得特需
export function orderSpecialNeedGet(params){
return request({
url:'/ecw/order-special-need/get',
method:'get',
params
})
}
...@@ -34,6 +34,15 @@ export function getZhongPao(id) { ...@@ -34,6 +34,15 @@ export function getZhongPao(id) {
}) })
} }
// 获得客户最优惠的重泡货配置
export function getZhongPaoBest(query) {
return request({
url: '/ecw/zhong-pao/get-customer-best-zhong-pao',
method: 'get',
params: query
})
}
// 获得重泡货配置分页 // 获得重泡货配置分页
export function getZhongPaoPage(query) { export function getZhongPaoPage(query) {
return request({ return request({
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
</div> </div>
</div> </div>
</div> </div>
<pagination v-show="total > 0" :total="total" :page.sync="form.pageNo" :limit.sync="form.pageSize"
@pagination="loadList" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
...@@ -39,11 +41,12 @@ export default { ...@@ -39,11 +41,12 @@ export default {
return { return {
show: true, show: true,
form:{ form:{
/* pageNo: 1, pageNo: 1,
pageSize: 20, */ pageSize: 10,
searchKey: '' searchKey: ''
}, },
list:[] list:[],
total: 0
} }
}, },
created(){ created(){
...@@ -57,7 +60,8 @@ export default { ...@@ -57,7 +60,8 @@ export default {
}, },
loadList(){ loadList(){
getCustomerContactsSelect(this.form).then(res => { getCustomerContactsSelect(this.form).then(res => {
this.list = res.data this.list = res.data.list
this.total = res.data.total
}) })
}, },
closeDialog(){ closeDialog(){
......
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
return getCustomerContactsSelect({customerId: res.data}) return getCustomerContactsSelect({customerId: res.data})
}).then(res => { }).then(res => {
this.$emit('success', res.data[0]) this.$emit('success', res.data.list[0])
}) })
}); });
}, },
......
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
f.selected = false f.selected = false
if(f.positionList) f.positionList.forEach(g => { if(f.positionList) f.positionList.forEach(g => {
// 位置 // 位置
g.children.forEach(k => { g.children?.forEach(k => {
// 子位置 // 子位置
k.selected = false k.selected = false
}) })
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
// 区域被选,清空该区域下的位置 // 区域被选,清空该区域下的位置
if(warehouse.positionList) warehouse.positionList.forEach(g => { if(warehouse.positionList) warehouse.positionList.forEach(g => {
g.children.forEach(k => { g.children?.forEach(k => {
k.selected = false k.selected = false
}) })
}) })
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
let hasSelected = false let hasSelected = false
parentAre.positionList.forEach(g => { parentAre.positionList.forEach(g => {
// 位置 // 位置
g.children.forEach(k => { g.children?.forEach(k => {
// 子位置 // 子位置
if (k.selected) hasSelected = true if (k.selected) hasSelected = true
}) })
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
else if(f.positionList) f.positionList.forEach(g => { else if(f.positionList) f.positionList.forEach(g => {
// 位置 // 位置
if (g.selected) result.push(k.code) if (g.selected) result.push(k.code)
g.children.forEach(k => { g.children?.forEach(k => {
// 子位置 // 子位置
if (k.selected) result.push(k.code) if (k.selected) result.push(k.code)
}) })
......
...@@ -29,10 +29,7 @@ ...@@ -29,10 +29,7 @@
<el-input v-model="form.content" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="处理状态" prop="status"> <el-form-item label="处理状态" prop="status">
<el-select v-model="form.status" placeholder="请选择处理状态"> <span>{{ getDictDataLabel(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS, 1) }}</span>
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -90,7 +87,7 @@ ...@@ -90,7 +87,7 @@
import { createCustomerComplaint, updateCustomerComplaint, deleteCustomerComplaint, getCustomerComplaint, getCustomerComplaintPage, exportCustomerComplaintExcel } from "@/api/ecw/customerComplaint"; import { createCustomerComplaint, updateCustomerComplaint, deleteCustomerComplaint, getCustomerComplaint, getCustomerComplaintPage, exportCustomerComplaintExcel } from "@/api/ecw/customerComplaint";
import {getCustomerSelect} from '@/api/ecw/customer' import {getCustomerSelect} from '@/api/ecw/customer'
import DictSelector from '@/components/DictSelector' import DictSelector from '@/components/DictSelector'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE, getDictDatas, getDictDataLabel } from '@/utils/dict'
export default { export default {
name: "customerComplaints", name: "customerComplaints",
...@@ -107,6 +104,8 @@ export default { ...@@ -107,6 +104,8 @@ export default {
data() { data() {
return { return {
DICT_TYPE, DICT_TYPE,
getDictDatas,
getDictDataLabel,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -172,7 +171,7 @@ export default { ...@@ -172,7 +171,7 @@ export default {
orderId: undefined, orderId: undefined,
ladingbillId: undefined, ladingbillId: undefined,
content: undefined, content: undefined,
status: undefined, status: 1,
ascertainReason: undefined, ascertainReason: undefined,
plan: undefined, plan: undefined,
result: undefined, result: undefined,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="right-menu"> <div class="right-menu">
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<el-badge :value="matterNum !== 0 ? matterNum : '' " class="right-menu-item badge"> <el-badge :value="matterNum !== 0 ? matterNum : '' " class="right-menu-item badge">
<div @click="$router.push('/bpm/task/todo')" style="font-size: 28px; color: #cccccc;cursor: pointer;" class="el-icon-postcard"></div> <div @click="$router.push('/task/todo')" style="font-size: 28px; color: #cccccc;cursor: pointer;" class="el-icon-postcard"></div>
</el-badge> </el-badge>
<el-badge :value="notMessage !== 0 ? notMessage : '' " class="right-menu-item badge"> <el-badge :value="notMessage !== 0 ? notMessage : '' " class="right-menu-item badge">
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
} }
}, },
methods: { methods: {
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
}, },
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
font-size: 18px; font-size: 18px;
color: #5a5e66; color: #5a5e66;
vertical-align: text-bottom; vertical-align: text-bottom;
margin-right: 6px; margin-right: 15px;
&.hover-effect { &.hover-effect {
cursor: pointer; cursor: pointer;
transition: background .3s; transition: background .3s;
......
...@@ -94,14 +94,18 @@ ...@@ -94,14 +94,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="方数(预装/已装)" align="center" prop="squareNumber" /> <el-table-column label="方数(预装/已装)" align="center" prop="">
<el-table-column label="重量(预装/已装)" align="center" prop="weight" /> <template slot-scope="{row}">
{{row.boxStatistics.volume}}/{{row.boxStatistics.loadVolume}}
<el-table-column label="状态" align="center" prop="boxStatus">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量(预装/已装)" align="center" prop="weight">
<template slot-scope="{row}">
{{row.boxStatistics.weight}}/{{row.boxStatistics.loadWeight}}
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="shipmentStatusText" />
<el-table-column label="日期" align="center" prop="createTime" width="180"> <el-table-column label="日期" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
</el-form> </el-form>
<el-row class="operate-button" v-if="inReview"> <el-row class="operate-button" v-if="inReview">
<el-button type="primary" @click="jumpReviewDetail">{{cusDeclarationObj.dcCheckStatus === '1' ? '部分退场审核中' : '全部退场审核中'}}</el-button> <el-button type="primary" @click="jumpReviewDetail">{{cusDeclarationObj.dcCheckStatus === '1' ? '全部退场审核中' : '部分退场审核中'}}</el-button>
<el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? '取消部分退场审核' : '取消全部退场审核'}}</el-button> <el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? '取消全部退场审核' : '取消部分退场审核'}}</el-button>
</el-row> </el-row>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
......
...@@ -74,7 +74,6 @@ export default { ...@@ -74,7 +74,6 @@ export default {
}; };
}, },
created() { created() {
this.getBoxInfo();
// 仓库 // 仓库
getWarehouseList().then((r) => { getWarehouseList().then((r) => {
this.warehouseList = r.data; this.warehouseList = r.data;
...@@ -100,6 +99,9 @@ export default { ...@@ -100,6 +99,9 @@ export default {
this.allUsers = data.list ?? []; this.allUsers = data.list ?? [];
}); });
}, },
activated() {
this.getBoxInfo();
},
methods: { methods: {
/* 获取仓库 */ /* 获取仓库 */
importCityName(id) { importCityName(id) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center"> <el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16"> <el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20">
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> <el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
...@@ -207,6 +207,7 @@ ...@@ -207,6 +207,7 @@
<span>联系人</span> <span>联系人</span>
<el-button style="float: right;" size="small" type="primary" @click="handleAddContact">+</el-button> <el-button style="float: right;" size="small" type="primary" @click="handleAddContact">+</el-button>
</div> </div>
<el-form ref="contactForm" :rules="contactRules" :model="form">
<el-table <el-table
:data="form.customerContacts" :data="form.customerContacts"
style="width: 100%" style="width: 100%"
...@@ -216,8 +217,10 @@ ...@@ -216,8 +217,10 @@
label="部门" label="部门"
width="" width=""
> >
<template v-slot="{ row, column, $index }"> <template v-slot="{ row }">
<el-input v-model="row.department" placeholder="请输入部门" size="mini"/> <el-form-item label="">
<el-input v-model="row.department" placeholder="请输入部门" size="mini"/>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -226,43 +229,51 @@ ...@@ -226,43 +229,51 @@
width="" width=""
> >
<template v-slot="{row}"> <template v-slot="{row}">
<el-input v-model="row.position" placeholder="请输入职位" size="mini"/> <el-form-item label="">
<el-input v-model="row.position" placeholder="请输入职位" size="mini"/>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="联系人" label="联系人"
> >
<template v-slot:header> <template slot="header">
联系人 <span style="color: #ff0000">*</span> 联系人 <span style="color: #ff0000">*</span>
</template> </template>
<template v-slot="{row}"> <template v-slot="{row, cellValue, $index}">
<el-input v-model="row.name" placeholder="请输入联系人" size="mini"/> <el-form-item :rules="contactRules.name" :prop="'customerContacts.' + $index + '.name'" label="">
<el-input v-model="row.name" placeholder="请输入联系人" size="mini"/>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="areaCode" prop="areaCode"
label="区号" label="区号"
> >
<template v-slot:header> <template slot="header">
区号 <span style="color: #ff0000">*</span> 区号 <span style="color: #ff0000">*</span>
</template> </template>
<template v-slot="{row}"> <template v-slot="{row, cellValue, $index}">
<el-select v-model="row.areaCode" placeholder="请选择区号" filterable> <el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label="">
<el-option v-for="(item, index) in countryList" <el-select v-model="row.areaCode" placeholder="请选择区号" filterable size="mini">
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" /> <el-option v-for="(item, index) in countryList"
</el-select> :key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="phoneNew" prop="phoneNew"
label="联系方式" label="联系方式"
> >
<template v-slot:header> <template slot="header">
联系方式 <span style="color: #ff0000">*</span> 联系方式 <span style="color: #ff0000">*</span>
</template> </template>
<template v-slot="{row}"> <template v-slot="{row, cellValue, $index}">
<el-input v-model="row.phoneNew" placeholder="请输入联系方式" size="mini"/> <el-form-item :rules="contactRules.phoneNew" :prop="'customerContacts.' + $index + '.phoneNew'" label="">
<el-input v-model="row.phoneNew" placeholder="请输入联系方式" size="mini"/>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -270,9 +281,11 @@ ...@@ -270,9 +281,11 @@
label="关联账号" label="关联账号"
> >
<template v-slot = "{row}"> <template v-slot = "{row}">
<el-select v-model="row.userid" @change="selectBD"> <el-form-item label="">
<el-option v-for="(item,index) in memberList" :value="item.id" :key="item.id" :label="item.nickname + '(' + item.mobile + ')'" ></el-option> <el-select v-model="row.userid" @change="selectBD" size="mini">
</el-select> <el-option v-for="(item,index) in memberList" :value="item.id" :key="item.id" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -280,10 +293,12 @@ ...@@ -280,10 +293,12 @@
label="社交软件" label="社交软件"
> >
<template v-slot="{row}"> <template v-slot="{row}">
<el-select v-model="row.social" placeholder="请选择社交软件"> <el-form-item label="">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)" <el-select v-model="row.social" placeholder="请选择社交软件" size="mini">
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> <el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
</el-select> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -291,7 +306,9 @@ ...@@ -291,7 +306,9 @@
label="社交软件号码" label="社交软件号码"
> >
<template v-slot="{row}"> <template v-slot="{row}">
<el-input v-model="row.socialNumber" placeholder="请输入社交软件号码" size="mini"/> <el-form-item label="">
<el-input v-model="row.socialNumber" placeholder="请输入社交软件号码" size="mini"/>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -299,18 +316,22 @@ ...@@ -299,18 +316,22 @@
label="邮箱" label="邮箱"
> >
<template v-slot="{row}"> <template v-slot="{row}">
<el-input v-model="row.email" placeholder="请输入邮箱" size="mini"/> <el-form-item label="">
<el-input v-model="row.email" placeholder="请输入邮箱" size="mini"/>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="isDefault" prop="isDefault"
label="设为默认" label="设为默认"
> >
<template v-slot="{row}"> <template v-slot="{ row, column, $index }">
<el-select v-model="row.isDefault" placeholder="设为默认"> <el-form-item label="">
<el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)" <el-select v-model="row.isDefault" placeholder="设为默认" @change="handleDefaultChange($index)" size="mini">
:key="dict.value" :label="dict.label" :value="Number(dict.value)" /> <el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
</el-select> :key="dict.value" :label="dict.label" :value="Number(dict.value)" />
</el-select>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -318,10 +339,13 @@ ...@@ -318,10 +339,13 @@
label="操作" label="操作"
> >
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-button type="danger" @click="form.customerContacts.splice($index, 1)">删除</el-button> <el-form-item label="">
<el-button type="danger" @click="handleDeleteContact($index)" size="mini">删除</el-button>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form>
</el-card> </el-card>
<el-row :gutter="10" style="margin-top: 15px"> <el-row :gutter="10" style="margin-top: 15px">
...@@ -367,7 +391,7 @@ ...@@ -367,7 +391,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: center">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
...@@ -389,7 +413,7 @@ import {getWarehouseList} from "@/api/ecw/warehouse" ...@@ -389,7 +413,7 @@ import {getWarehouseList} from "@/api/ecw/warehouse"
import CustomerLineTable from '@/components/CustomerLineTable' import CustomerLineTable from '@/components/CustomerLineTable'
import {getCustomerSelect} from "@/api/ecw/customer" import {getCustomerSelect} from "@/api/ecw/customer"
import {listServiceUser} from "@/api/system/user" import {listServiceUser} from "@/api/system/user"
import {getZhongPaoPage} from '@/api/ecw/zhongPao' import { getZhongPaoBest, getZhongPaoPage } from '@/api/ecw/zhongPao'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts' import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import { getCountryListAll } from '@/api/ecw/country' import { getCountryListAll } from '@/api/ecw/country'
import Template from "@/views/cms/template"; import Template from "@/views/cms/template";
...@@ -462,6 +486,13 @@ export default { ...@@ -462,6 +486,13 @@ export default {
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }], customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }], status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }], founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
},
contactRules: {
name: [{ required: true, message: "请输入联系人", trigger: "blur" }],
areaCode: [{ required: true, message: "请选择区号", trigger: "change" }],
phoneNew: [{ required: true, message: "请输入联系方式", trigger: "blur" }],
}, },
// 网点 // 网点
nodeList: [], nodeList: [],
...@@ -484,6 +515,29 @@ export default { ...@@ -484,6 +515,29 @@ export default {
}, },
methods: { methods: {
handleDefaultChange($index){
// 只有一个联系人,设置成非默认
if (this.form.customerContacts.length === 1 && this.form.customerContacts[0].isDefault === 0){
this.$modal.msgWarning('至少拥有一个默认联系人')
this.form.customerContacts[0].isDefault = 1
return
}
// 设置默认联系人
if (this.form.customerContacts[$index].isDefault === 1) {
// 其他的置否
let i = 0
this.form.customerContacts.forEach(e => {
if (i !== $index){
e.isDefault = 0
}
i++
})
} else {
// 第一个置是
this.form.customerContacts[0].isDefault = 1
}
},
selectBD(){ selectBD(){
this.$forceUpdate(); this.$forceUpdate();
}, },
...@@ -494,30 +548,44 @@ export default { ...@@ -494,30 +548,44 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["contactForm"].validate(valid1 => {
if (!valid) { this.$refs["form"].validate(valid2 => {
return; if (!valid1 || !valid2) {
} return;
// 修改的提交 }
if (this.form.id != null) { if (this.form.customerContacts.length === 0){
this.form.customerContacts.forEach(e => { this.$modal.msgError("至少填写一个联系人信息");
e.customerId = this.customerId return
}) }
// 修改的提交
if (this.form.id != null) {
this.form.customerContacts.forEach(e => {
e.customerId = this.customerId
})
updateCustomer(this.form).then(response => { updateCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
}).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员')
});
return;
}
// 添加的提交
createCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
// this.getList(); // this.getList();
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
}).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员')
}); });
return;
}
// 添加的提交
createCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
// this.getList();
}); });
}); })
}, },
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
...@@ -586,7 +654,7 @@ export default { ...@@ -586,7 +654,7 @@ export default {
// "customerId": 0, // "customerId": 0,
"department": "", "department": "",
"email": "", "email": "",
"isDefault": undefined, "isDefault": this.form.customerContacts.length === 0 ? 1 : 0,
"name": "", "name": "",
"phoneNew": "", "phoneNew": "",
"position": "", "position": "",
...@@ -596,16 +664,24 @@ export default { ...@@ -596,16 +664,24 @@ export default {
// "username": "" // "username": ""
}) })
}, },
handleDeleteContact($index){
this.form.customerContacts.splice($index, 1)
if (this.form.customerContacts.length > 0) {
this.$refs['contactForm'].clearValidate()
if (!this.form.customerContacts.find(e => e.isDefault)){
this.form.customerContacts[0].isDefault = 1
}
}
},
getZhongPao(){ getZhongPao(){
// todo 接口不对,应该用list getZhongPaoBest({
getZhongPaoPage().then(r => { customerId: this.customerId,
r.data.list.forEach(e => { // departureId: this.departureId,
if(e.type === 1) { // objectiveId: this.objectiveId
this.form.lightUnit = e.edge }).then(r => {
} else if (e.type === 2 || true){ // todo 缺少type this.form.weightUnit = r.data.zhongEdge
this.form.weightUnit = e.edge this.form.lightUnit = r.data.paoEdge
}
})
}) })
} }
}, },
...@@ -627,6 +703,19 @@ export default { ...@@ -627,6 +703,19 @@ export default {
} }
</script> </script>
<style scoped> <style scoped lang="scss">
::v-deep .el-table__cell {
padding-bottom: 0;
.cell {
.el-form-item {
margin-bottom: 9px;
}
.el-form-item__error {
z-index: 1;
padding-top: 0;
top: 32px;
}
}
}
</style> </style>
...@@ -68,11 +68,7 @@ ...@@ -68,11 +68,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="国家" align="center" prop="country"> <el-table-column label="国家" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COUNTRY" :value="scope.row.country" />
</template>
</el-table-column>
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn"> <el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column> </el-table-column>
<el-table-column label="客户状态" align="center" prop="status"> <el-table-column label="客户状态" align="center" prop="status">
...@@ -470,6 +466,7 @@ import {getNodeList} from "@/api/ecw/node" ...@@ -470,6 +466,7 @@ import {getNodeList} from "@/api/ecw/node"
import CustomerFollowList from "@/components/CustomerFollowList" import CustomerFollowList from "@/components/CustomerFollowList"
import customerComplaints from "@/components/customerComplaints" import customerComplaints from "@/components/customerComplaints"
import {listServiceUser} from "@/api/system/user"; import {listServiceUser} from "@/api/system/user";
import { getCountryListAll } from '@/api/ecw/country'
export default { export default {
name: "Customer", name: "Customer",
...@@ -527,7 +524,9 @@ export default { ...@@ -527,7 +524,9 @@ export default {
nodeList: [], nodeList: [],
showLine: false, showLine: false,
customerId:undefined, customerId:undefined,
customerServiceList:[] customerServiceList:[],
countryList: []
}; };
}, },
created() { created() {
...@@ -539,8 +538,15 @@ export default { ...@@ -539,8 +538,15 @@ export default {
console.log(r,'客服'); console.log(r,'客服');
this.customerServiceList = r.data; this.customerServiceList = r.data;
}) })
getCountryListAll().then(r => {
this.countryList = r.data
})
}, },
methods: { methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
},
customerServiceFn(val){ customerServiceFn(val){
if(this.customerServiceList.length > 0){ if(this.customerServiceList.length > 0){
let index =this.customerServiceList.findIndex(item => item.id === val.customerService); let index =this.customerServiceList.findIndex(item => item.id === val.customerService);
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="客户名称" prop="customerId"> <el-form-item label="客户名称" prop="customerId">
<el-select v-model="form.customerId" placeholder="请选择客户名称" :disabled="!!customerId"> <el-select v-model="form.customerId" placeholder="请选择客户名称" :disabled="!!customerId" filterable>
<el-option <el-option
v-for="item in customerSelect" v-for="item in customerSelect"
:key="item.id" :key="item.id"
...@@ -112,16 +112,45 @@ ...@@ -112,16 +112,45 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="订单号" prop="orderId"> <el-form-item label="订单号" prop="orderId">
<el-input v-model="form.orderId" placeholder="请输入订单号" /> <el-select
v-model="form.orderId"
filterable
remote
reserve-keyword
placeholder="请输入订单号"
:remote-method="getOrderList"
:loading="loading">
<el-option
v-for="item in orderList"
:key="item.value"
:label="item.value"
:value="item.value">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="提单号" prop="ladingbillId"> <el-form-item label="提单号" prop="ladingbillId">
<el-input v-model="form.ladingbillId" placeholder="请输入提单号" /> <el-select
v-model="form.ladingbillId"
filterable
remote
reserve-keyword
placeholder="请输入提单号"
:remote-method="getBillList"
:loading="loading">
<el-option
v-for="item in billList"
:key="item.value"
:label="item.value"
:value="item.value">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="投诉内容" prop="content"> <el-form-item label="投诉内容" prop="content">
<el-input v-model="form.content" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="处理状态" prop="status"> <el-form-item label="处理状态" prop="status">
<el-select v-model="form.status" placeholder="请选择处理状态"> <span v-if="!form.id">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS, 1) }}</span>
<el-select v-else v-model="form.status" placeholder="请选择处理状态">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select> </el-select>
...@@ -168,7 +197,7 @@ ...@@ -168,7 +197,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item v-show="form.status == '3'" label="处理时间" required> <el-form-item v-show="form.status == '3'" label="处理时间" required>
<el-date-picker type="datetime" v-model="form.handleAt"></el-date-picker> <el-date-picker type="datetime" v-model="form.handleAt" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -184,7 +213,8 @@ import { createCustomerComplaint, updateCustomerComplaint, deleteCustomerComplai ...@@ -184,7 +213,8 @@ import { createCustomerComplaint, updateCustomerComplaint, deleteCustomerComplai
import {getCustomerSelect} from '@/api/ecw/customer' import {getCustomerSelect} from '@/api/ecw/customer'
import CustomerFollow from "../../../components/CustomerFollow" import CustomerFollow from "../../../components/CustomerFollow"
import DictSelector from '@/components/DictSelector' import DictSelector from '@/components/DictSelector'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE, getDictDataLabel, getDictDatas } from '@/utils/dict'
import { getBillNoSearch, getOrderNoSearch } from '@/api/ecw/order'
export default { export default {
name: "CustomerComplaint", name: "CustomerComplaint",
...@@ -202,6 +232,8 @@ export default { ...@@ -202,6 +232,8 @@ export default {
data() { data() {
return { return {
DICT_TYPE, DICT_TYPE,
getDictDatas,
getDictDataLabel,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -234,6 +266,8 @@ export default { ...@@ -234,6 +266,8 @@ export default {
// 表单校验 // 表单校验
rules: { rules: {
customerId: [{ required: true, message: "客户名称不能为空", trigger: "change" }], customerId: [{ required: true, message: "客户名称不能为空", trigger: "change" }],
type: [{ required: true, message: "投诉类型不能为空", trigger: "change" }],
content: [{ required: true, message: "投诉内容不能为空", trigger: "blur" }],
}, },
myFollowCustomerList: [], myFollowCustomerList: [],
...@@ -243,7 +277,10 @@ export default { ...@@ -243,7 +277,10 @@ export default {
// 处理 // 处理
handle: { handle: {
dialogVisible: false dialogVisible: false
} },
billList: [],
orderList: []
}; };
}, },
created() { created() {
...@@ -254,6 +291,22 @@ export default { ...@@ -254,6 +291,22 @@ export default {
}) })
}, },
methods: { methods: {
getBillList(key){
getBillNoSearch({key, pageNo: 1, pageSize: 20}).then(r => {
if (r.code === 0){
this.billList = r.data.list
}
})
},
getOrderList(key){
getOrderNoSearch({key, pageNo: 1, pageSize: 20}).then(r => {
if (r.code === 0){
this.orderList = r.data.list
}
})
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -308,6 +361,8 @@ export default { ...@@ -308,6 +361,8 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加客户投诉"; this.title = "添加客户投诉";
// 新增客诉默认状态为待处理
this.form.status = 1;
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
......
...@@ -136,15 +136,23 @@ ...@@ -136,15 +136,23 @@
<div class="card-name">{{$t('商品信息')}}</div> <div class="card-name">{{$t('商品信息')}}</div>
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addProduct()" :disabled="!form.lineId"></el-button> <el-button type="primary" size="mini" icon="el-icon-plus" @click="addProduct()" :disabled="!form.lineId"></el-button>
</div> </div>
<el-table :data="productList" border> <el-table :data="form.prodCreateReqVOList" border class="product-list">
<el-table-column :label="$t('序号')" width="60px" fixed> <el-table-column :label="$t('序号')" width="60px" fixed>
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.$index + 1}} {{scope.$index + 1}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('中文品名')" width="160px"> <el-table-column :label="$t('中文品名')" width="160px">
<template slot-scope="{row}"> <template slot-scope="scope">
<product-selector v-model="row.prodId" @change="onProductChange(row, $event)" /> <el-form-item label=""
:prop="`prodCreateReqVOList.${scope.$index}.prodId`"
:rules="{
required: true, message: $t('请选择产品'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<product-selector v-model="scope.row.prodId" @change="onProductChange(scope.row, $event)" />
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('英文品名')" width="160px"> <el-table-column :label="$t('英文品名')" width="160px">
...@@ -153,8 +161,16 @@ ...@@ -153,8 +161,16 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('品牌')" width="100px"> <el-table-column :label="$t('品牌')" width="100px">
<template slot-scope="{row}"> <template slot-scope="scope">
<dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" /> <el-form-item label=""
:prop="`prodCreateReqVOList.${scope.$index}.brand`"
:rules="{
required: true, message: $t('请选择品牌'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<dict-selector v-model="scope.row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" />
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -184,8 +200,16 @@ ...@@ -184,8 +200,16 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('总货值') + '(RMB)'" width="100px"> <el-table-column :label="$t('总货值') + '(RMB)'" width="100px">
<template slot-scope="{row}"> <template slot-scope="scope">
<el-input v-model="row.worth" /> <el-form-item label=""
:prop="`prodCreateReqVOList.${scope.$index}.worth`"
:rules="{
required: true, message: $t('货值不能为空'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<el-input v-model="scope.row.worth" />
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品特性')" width="250px"> <el-table-column :label="$t('商品特性')" width="250px">
...@@ -209,7 +233,7 @@ ...@@ -209,7 +233,7 @@
{{$t('运费')}}{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}} {{$t('运费')}}{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</div> </div>
<div> <div>
{{$t('清关费')}}{{row.fee.clearanceFee}} {{currentcyMap[row.fee.clearanceFeeCurrency]}} / {{unitMap[row.fee.clearanceFeeVolume]}} {{$t('清关费')}}{{row.fee.oneClearanceFee}} {{currentcyMap[row.fee.clearanceFeeCurrency]}} / {{unitMap[row.fee.clearanceFeeVolume]}}
</div> </div>
</template> </template>
</template> </template>
...@@ -477,7 +501,7 @@ export default { ...@@ -477,7 +501,7 @@ export default {
return { return {
// 遮罩层 // 遮罩层
loading: true, loading: true,
productList:[], // 商品信息 // productList:[], // 商品信息
productAttrList:[], // 商品属性 productAttrList:[], // 商品属性
channelList: [], // 出货取到 channelList: [], // 出货取到
routerList: [], routerList: [],
...@@ -494,6 +518,7 @@ export default { ...@@ -494,6 +518,7 @@ export default {
sendstatus:0, sendstatus:0,
type: [], type: [],
isCargoControl: false, isCargoControl: false,
prodCreateReqVOList:[],
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -572,7 +597,7 @@ export default { ...@@ -572,7 +597,7 @@ export default {
totalWeight: 0, totalWeight: 0,
totalWorth: 0, totalWorth: 0,
} }
this.productList.forEach(item => { this.form.prodCreateReqVOList.forEach(item => {
sum.totalNum += parseInt(item.num) || 0 sum.totalNum += parseInt(item.num) || 0
sum.totalVolume += parseFloat(item.volume) || 0 sum.totalVolume += parseFloat(item.volume) || 0
sum.totalWeight += parseFloat(item.weight) || 0 sum.totalWeight += parseFloat(item.weight) || 0
...@@ -691,11 +716,11 @@ export default { ...@@ -691,11 +716,11 @@ export default {
getOffer(this.$route.query.id).then(res => { getOffer(this.$route.query.id).then(res => {
let formData = res.data let formData = res.data
formData.type = formData.type ? formData.type.split(',').filter(item => item != '') : [] formData.type = formData.type ? formData.type.split(',').filter(item => item != '') : []
this.$set(this, 'form', formData) formData.prodCreateReqVOList = []
if(res.data.offerProdRespVOList){ if(res.data.offerProdRespVOList){
res.data.offerProdRespVOList.forEach(item => { res.data.offerProdRespVOList.forEach(item => {
this.addProduct({ formData.prodCreateReqVOList.push({
"goodsType": item.goodsType, "goodsType": item.goodsType,
"brand": item.brand, "brand": item.brand,
"unit": item.unit, "unit": item.unit,
...@@ -712,13 +737,13 @@ export default { ...@@ -712,13 +737,13 @@ export default {
}) })
}) })
} }
this.$set(this, 'form', formData)
// 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显 // 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显
getCustomerContactsSelect({ids: [res.data.consigneeId, res.data.consignorId].join(',')}).then(({data}) => { getCustomerContactsSelect({ids: [res.data.consigneeId, res.data.consignorId].join(',')}).then(({data}) => {
this.contactChooseType = 'consignee' this.contactChooseType = 'consignee'
this.onContactChoose(data.find(item => item.customerContactsId == res.data.consigneeId)) this.onContactChoose(data.list.find(item => item.customerContactsId == res.data.consigneeId))
this.contactChooseType = 'consignor' this.contactChooseType = 'consignor'
this.onContactChoose(data.find(item => item.customerContactsId == res.data.consignorId)) this.onContactChoose(data.list.find(item => item.customerContactsId == res.data.consignorId))
}) })
/* res.data.transportRespVOList.forEach(item => { /* res.data.transportRespVOList.forEach(item => {
let transport = this.transportList.find(t => t.transportId == item.transportId) let transport = this.transportList.find(t => t.transportId == item.transportId)
...@@ -756,7 +781,7 @@ export default { ...@@ -756,7 +781,7 @@ export default {
}, */ }, */
onProductChange(row, product){ onProductChange(row, product){
console.log(product) console.log(product)
row.goodsType = product ? product.typeId : null // row.goodsType = product ? product.typeId : null
row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item) row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item)
this.$set(this.productNames, product.id, { this.$set(this.productNames, product.id, {
titleZh: product.titleZh, titleZh: product.titleZh,
...@@ -779,7 +804,7 @@ export default { ...@@ -779,7 +804,7 @@ export default {
return this.$message.error(this.$t('请先选择路线')) return this.$message.error(this.$t('请先选择路线'))
} }
console.log('addProduct', JSON.stringify(data)) console.log('addProduct', JSON.stringify(data))
this.productList.push(data || {prodAttrArr:[]}) this.form.prodCreateReqVOList.push(data || {prodAttrArr:[]})
}, },
// 计算商品运费 // 计算商品运费
/* getProductFee(row){ /* getProductFee(row){
...@@ -821,7 +846,7 @@ export default { ...@@ -821,7 +846,7 @@ export default {
delProduct(index){ delProduct(index){
this.$confirm(this.$t('确定删除此条内容么?')) this.$confirm(this.$t('确定删除此条内容么?'))
.then(res => { .then(res => {
this.productList.splice(index, 1) this.form.prodCreateReqVOList.splice(index, 1)
}) })
}, },
/** 提交按钮 */ /** 提交按钮 */
...@@ -831,12 +856,12 @@ export default { ...@@ -831,12 +856,12 @@ export default {
return; return;
} }
this.productList.map(item => { this.form.prodCreateReqVOList.map(item => {
item.prodAttrIds = item.prodAttrArr.join(',') item.prodAttrIds = item.prodAttrArr.join(',')
item.lineId = this.form.lineId item.lineId = this.form.lineId
item.channelId = this.form.channelId item.channelId = this.form.channelId
item.transportId = this.form.transportId item.transportId = this.form.transportId
item.brandType = item.brand ? 1 : 0 // item.brandType = item.brand ? 1 : 0
}) })
this.transportList.map(item => { this.transportList.map(item => {
if(item._enabled){ if(item._enabled){
...@@ -848,7 +873,7 @@ export default { ...@@ -848,7 +873,7 @@ export default {
if (this.form.offerId != null) { if (this.form.offerId != null) {
let data = Object.assign({}, this.form, { let data = Object.assign({}, this.form, {
transportUpdateReqVOList: this.transportList.filter(item => item._enabled), transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
prodUpdateReqVOList: this.productList prodUpdateReqVOList: this.getProductListWithDefaultValue()
}) })
updateOffer(data).then(response => { updateOffer(data).then(response => {
this.$modal.msgSuccess(this.$t("修改成功")); this.$modal.msgSuccess(this.$t("修改成功"));
...@@ -858,7 +883,7 @@ export default { ...@@ -858,7 +883,7 @@ export default {
} }
let data = Object.assign({}, this.form, { let data = Object.assign({}, this.form, {
transportCreateReqVOList: this.transportList.filter(item => item._enabled), transportCreateReqVOList: this.transportList.filter(item => item._enabled),
prodCreateReqVOList: this.productList prodCreateReqVOList: this.getProductListWithDefaultValue()
}) })
// 添加的提交 // 添加的提交
createOffer(data).then(response => { createOffer(data).then(response => {
...@@ -876,10 +901,10 @@ export default { ...@@ -876,10 +901,10 @@ export default {
// 计算商品运费 // 计算商品运费
calculationPrice(){ calculationPrice(){
let calcable = true let calcable = true
if(!this.productList.length) return if(!this.form.prodCreateReqVOList.length) return
this.productList.forEach(item => { this.form.prodCreateReqVOList.forEach(item => {
if(!item.weight || !item.prodId){ if(!item.prodId){
console.log('重量和产品为选择', item) console.log('产品未选择', item)
calcable = false calcable = false
} }
}) })
...@@ -892,7 +917,7 @@ export default { ...@@ -892,7 +917,7 @@ export default {
lineId: this.form.lineId, lineId: this.form.lineId,
transportId: this.form.transportId, transportId: this.form.transportId,
channelId: this.form.channelId, channelId: this.form.channelId,
prodConditionParamList: this.productList, prodConditionParamList: this.getProductListWithDefaultValue(),
consigneeCustomerContactsId: this.form.consigneeCustomerContactsId, consigneeCustomerContactsId: this.form.consigneeCustomerContactsId,
consignorCustomerContactsId: this.form.consignorCustomerContactsId, consignorCustomerContactsId: this.form.consignorCustomerContactsId,
customsType: this.form.customsType, customsType: this.form.customsType,
...@@ -903,13 +928,26 @@ export default { ...@@ -903,13 +928,26 @@ export default {
this.$set(this, 'couponTotalAmountList', res.data.availableDto.couponTotalAmountList) this.$set(this, 'couponTotalAmountList', res.data.availableDto.couponTotalAmountList)
this.$set(this, 'couponAvailableGroupDtoList', res.data.availableDto.couponAvailableGroupDtoList) this.$set(this, 'couponAvailableGroupDtoList', res.data.availableDto.couponAvailableGroupDtoList)
this.productList.map((item, index) => { this.form.prodCreateReqVOList.map((item, index) => {
this.$set(item, 'fee', res.data.prodCostDtoList[index] || null) this.$set(item, 'fee', res.data.prodCostDtoList[index] || null)
}) })
}).finally(() => { }).finally(() => {
this.calculating = false this.calculating = false
}) })
}, },
// 体积。件数,数量,重量为选填,但是接口确实必填,所以生成一个副本并赋予默认值
getProductListWithDefaultValue(){
let arr = []
this.form.prodCreateReqVOList.forEach(item => {
let tmp = {...item}
if(!tmp.volume)tmp.volume = 1
if(!tmp.weight)tmp.weight = 1
if(!tmp.quantity)tmp.quantity = 1
if(!tmp.num)tmp.num = 1
arr.push(tmp)
})
return arr
}
} }
}; };
</script> </script>
...@@ -934,4 +972,7 @@ export default { ...@@ -934,4 +972,7 @@ export default {
} }
} }
::v-deep .product-list .el-form-item__error{
position: static;
}
</style> </style>
\ No newline at end of file
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
</el-table-column> </el-table-column>
<!-- <el-table-column label="始发仓" prop="startWarehouseName"></el-table-column>--> <!-- <el-table-column label="始发仓" prop="startWarehouseName"></el-table-column>-->
<el-table-column label="目的地" prop="objectiveName"></el-table-column> <el-table-column label="目的地" prop="objectiveName"></el-table-column>
<el-table-column label="始发仓" prop="startWarehouseName">
</el-table-column>
<el-table-column label="发货人"> <el-table-column label="发货人">
<template v-slot="{row}"> <template v-slot="{row}">
<div> <div>
...@@ -52,6 +54,7 @@ ...@@ -52,6 +54,7 @@
{{ row.consignorName }} {{ row.consignorName }}
</p> </p>
<p> <p>
{{row.consignorPhone}}
</p> </p>
</div> </div>
</div> </div>
...@@ -64,28 +67,34 @@ ...@@ -64,28 +67,34 @@
{{ row.consigneeName }} {{ row.consigneeName }}
</p> </p>
<p> <p>
{{ row.consigneePhone }} {{ row.consigneePhone}}
</p> </p>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column>
<template v-slot="{row}">
<el-button @click="canceLtiaoCang(row)" type="text" v-if="row.inWarehouseState === 10">
取消调仓
</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<el-row style="margin-top: 30px">
<el-col :span="8">
<div style="text-align: right;">
{{ list[0] && list[0].adjustToStartWarehouseName ? list[0].adjustToStartWarehouseName : list[0] && list[0].startWarehouseName ? list[0].startWarehouseName : '' }}
</div>
</el-col>
<el-col :span="3"><div style="text-align:center">
调至
</div></el-col>
<el-col :span="8"><el-select v-model="params.warehouseInId">
<el-option v-for="(item ,index) in availableWarehouse" :value="item.id" :label="item.titleZh"
:key="index"></el-option>
</el-select></el-col>
</el-row>
<div style="display: flex;justify-content:center; margin-top: 20px"> <div style="display: flex;justify-content:center; margin-top: 20px">
<div style="width: 200px; margin: 0 10px"> <div style="width: 200px; margin: 0 10px">
{{ list[0] && list[0].startWarehouseName ? list[0].startWarehouseName : '' }} </div>
<div>
</div> </div>
<div style="width: 200px;"> <div style="width: 200px;">
<el-select v-model="params.warehouseInId">
<el-option v-for="(item ,index) in availableWarehouse" :value="item.id" :label="item.titleZh"
:key="index"></el-option>
</el-select>
</div> </div>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -95,12 +104,17 @@ ...@@ -95,12 +104,17 @@
<div style="padding: 20px"> <div style="padding: 20px">
<work-flow xmlkey="warehouse_transfer" v-model="params.copyUserId"/> <work-flow xmlkey="warehouse_transfer" v-model="params.copyUserId"/>
</div> </div>
<div style="text-align: center"> <div style="text-align: center" v-if="!adjustmentBol">
<el-button style="margin-right: 50px" v-if="adjustmentBol">审核中</el-button> <el-button style="margin-right: 50px" @click="submit">提交申请</el-button>
<el-button v-else style="margin-right: 50px" @click="submit" :disabled="isSubmit">提交申请</el-button>
<el-button @click="$emit('update:dialogVisible',false)">取消</el-button> <el-button @click="$emit('update:dialogVisible',false)">取消</el-button>
</div> </div>
<!-- <warehouseDetails></warehouseDetails>--> <div style="text-align: center" v-else>
<el-button @click="()=>{
$router.push({path:'/bpm/process-instance/detail',query:{id:this.applyStatus.orderWarehouseApprovalBackVO.formId}})
}">审核中</el-button>
<el-button @click="cancellationOfOrder" >取消审核</el-button>
<el-button @click="$emit('update:dialogVisible',false)" >取消</el-button>
</div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -108,10 +122,10 @@ ...@@ -108,10 +122,10 @@
<script> <script>
import {DICT_TYPE, getDictDatas} from "@/utils/dict"; import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import { import {
adjustApplyStatus, cancelAdjustApply, adjustApplyStatus, adjustLastWithStatus, cancelAdjustApply,
ecwOrderList, ecwOrderList,
orderWarehouseInAdjustApply, orderWarehouseInAdjustApply,
warehouseAdjustmentList, warehouseAdjustmentList, warehouseApprovalCancel,
} from "@/api/ecw/batchSingleApplication"; } from "@/api/ecw/batchSingleApplication";
import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition"; import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails"; import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
...@@ -148,18 +162,8 @@ export default { ...@@ -148,18 +162,8 @@ export default {
} }
}, },
computed: { computed: {
isSubmit() {
let flag = true;
if (this.list.length === 1 && this.list[0].status === 5) {
flag = false
} else {
let l = this.list.map(e => e.startWarehouseId)
if (this.list.every(e => e.status === 5) && [...new Set(l)].length === 1) flag = false
}
return flag;
},
adjustmentBol() { adjustmentBol() {
return this.list.some(e => e.inWarehouseState === 10) return this.applyStatus?.orderWarehouseAdjustBackVO?.status === 1
} }
}, },
data() { data() {
...@@ -176,6 +180,8 @@ export default { ...@@ -176,6 +180,8 @@ export default {
warehouseOutId: undefined, warehouseOutId: undefined,
copyUserId: [], copyUserId: [],
}, },
applyStatus:{}//调仓-查看状态
} }
}, },
methods: { methods: {
...@@ -183,12 +189,18 @@ export default { ...@@ -183,12 +189,18 @@ export default {
getOrderPage({orderIdList: this.orderList}).then(r => { getOrderPage({orderIdList: this.orderList}).then(r => {
this.list = r.data.list this.list = r.data.list
warehouseAdjustmentList({id: this.list[0].startWarehouseId}).then(r => this.availableWarehouse = r.data) warehouseAdjustmentList({id: this.list[0].startWarehouseId}).then(r => this.availableWarehouse = r.data)
adjustLastWithStatus({orderId:this.list[0].orderId,lang:0}).then(r =>{
this.applyStatus = r.data
if(r.data?.orderWarehouseAdjustBackVO?.status === 1){
this.params.warehouseInId = r.data.orderWarehouseAdjustBackVO?.warehouseInId
}
})
}) })
}, },
submit() { submit() {
let p = this.list.map(e => e.orderId).join(','); let p = this.list.map(e => e.orderId).join(',');
this.params.orderIds = p; this.params.orderIds = p;
this.params.warehouseOutId = this.list[0].startWarehouseId; this.params.warehouseOutId = this.list[0].adjustToStartWarehouseId ? this.list[0].adjustToStartWarehouseId : this.list[0].startWarehouseId;
this.params.orderNo = this.list[0].orderNo this.params.orderNo = this.list[0].orderNo
orderWarehouseInAdjustApply(this.params).then(r => { orderWarehouseInAdjustApply(this.params).then(r => {
if (r.code === 0) { if (r.code === 0) {
...@@ -197,34 +209,25 @@ export default { ...@@ -197,34 +209,25 @@ export default {
} }
}) })
}, },
async canceLtiaoCang(row) { cancellationOfOrder(){
let res = await adjustApplyStatus({orderId: row.orderId}) this.$prompt('请输入审核调仓原因', '提示', {
if (res.data.isBatch) { confirmButtonText: '确定',
this.$message.warning('批量提提交请耐心等待') cancelButtonText: '取消',
} else { }).then(({ value }) => {
this.$prompt('请问您是否要取消调仓?', '提示', { warehouseApprovalCancel(this.applyStatus.orderWarehouseApprovalBackVO.id,value) .then(r => {
confirmButtonText: '确定', if(r.data){
cancelButtonText: '取消', this.$message.success('取消调仓成功')
type: 'warning', this.$emit('update:dialogVisible',false)
}).then((val) => {
cancelAdjustApply({orderId: row.orderId, reason: val.value}).then(r => {
if (r.code === 0) {
this.$message({
type: 'success',
message: '取消调仓成功!'
});
this.getOrderListFn()
}
})
}).catch(() => { }
this.$message({ })
type: 'info', }).catch(() => {
message: '已取消' this.$message({
}); type: 'info',
message: '取消成功'
}); });
} });
}, }
} }
} }
</script> </script>
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" > <el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.orderNo }}</span> <router-link :to="`detail?orderId=` + scope.row.orderId">{{ scope.row.orderNo }}</router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" /> <el-table-column :label="$t('唛头')" align="center" prop="marks" />
......
<template> <template>
<el-dialog :title="$t('批量提货')" visible :before-close="closeDialog" :close-on-click-modal="false"> <el-dialog :title="$t('批量提货')" visible :before-close="closeDialog" :close-on-click-modal="false">
<el-form :model="form"> <el-form ref="form" :model="form" :rules="rules">
<el-tabs v-model="current" type="card"> <el-tabs v-model="current" type="card">
<el-tab-pane :label="$t('全部提货')" name="createOrderPickupBatch"> <el-tab-pane :label="$t('全部提货')" name="createOrderPickupBatch">
<el-form-item :label="$t('订单号') + '/' + this.$t('提单号')" required> <el-form-item :label="$t('订单号') + '/' + this.$t('提单号')" prop="orderId">
<el-input v-model="form.orderId" :placeholder="$t('例:NA2200001L')"></el-input> <el-input v-model="form.orderId" :placeholder="$t('例:NA2200001L')"></el-input>
<div>{{$t('注:单号之间使用逗号或空格隔开')}}</div> <div>{{$t('注:单号之间使用逗号或空格隔开')}}</div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('提货时间')"> <el-form-item :label="$t('提货时间')" prop="pickTime">
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
</el-tab-pane> </el-tab-pane>
...@@ -36,6 +36,10 @@ export default { ...@@ -36,6 +36,10 @@ export default {
pickTime: '', pickTime: '',
pickType: 1 pickType: 1
}, },
rules:{
orderId: [{required: true, message: this.$t('请填写单号')}],
pickTime: [{required: true, message: this.$t('请选择时间')}]
}
} }
}, },
computed:{ computed:{
...@@ -46,22 +50,24 @@ export default { ...@@ -46,22 +50,24 @@ export default {
}, },
methods:{ methods:{
submit(){ submit(){
if(this.form.orderId == '' || this.form.pickTime==''){ this.$refs.form.validate().then(() => {
return this.$message.error(this.$t('请填写订单号和提货时间')) if(this.form.orderId == '' || this.form.pickTime==''){
} return this.$message.error(this.$t('请填写订单号和提货时间'))
let orderIdArr = this.form.orderId.replace(/,/g, ' ').split(' ').filter(item => item !='') }
let data = [] let orderIdArr = this.form.orderId.replace(/,/g, ' ').split(' ').filter(item => item !='')
for(let orderId of orderIdArr){ let data = []
data.push({ for(let orderId of orderIdArr){
pickType: 1, data.push({
orderId, pickType: 1,
pickTime: this.form.pickTime orderId,
}) pickTime: this.form.pickTime
} })
}
({createOrderPickupBatch, createOrderPickupSplitBatch}[this.current])(data).then(res => { ({createOrderPickupBatch, createOrderPickupSplitBatch}[this.current])(data).then(res => {
this.$message.success(this.$t("操作成功")); this.$message.success(this.$t("操作成功"));
this.form.orderId = '' this.$emit('success')
})
}) })
}, },
closeDialog(){ closeDialog(){
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-input v-model="cargoControlName" disabled></el-input> <el-input v-model="cargoControlName" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('原控货手机号')"> <el-form-item :label="$t('原控货手机号')">
<el-input :value="cargoControlPhone" disabled></el-input> <el-input :value="consigneeCountryCode + ' ' + cargoControlPhone" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('新控货人')" prop="name"> <el-form-item :label="$t('新控货人')" prop="name">
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
orderId: [String, Number], orderId: [String, Number],
cargoControlName: String, cargoControlName: String,
cargoControlPhone: String, cargoControlPhone: String,
consigneeCountryCode: String,
orderNo: String, orderNo: String,
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-form label-width="180px" label-position="left"> <el-form label-width="180px" label-position="left">
<el-form-item label="特殊要求"> <el-form-item label="特殊要求">
<el-checkbox-group v-model="advanceType"> <el-checkbox-group v-model="advanceType">
<el-checkbox v-for="(item) in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)" :disabled="advanceTypeList.includes(item.value)" :label="item.value" >{{item.label}}</el-checkbox> <el-checkbox v-for="(item) in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)" :label="item.value" >{{item.label}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="特殊要求备注"><el-input type="textarea" style="width: 300px;" v-model="todoDetail"></el-input></el-form-item> <el-form-item label="特殊要求备注"><el-input type="textarea" style="width: 300px;" v-model="todoDetail"></el-input></el-form-item>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<script> <script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {specialNeedCreate} from "@/api/ecw/order"; import {specialNeedCreate,getSpecialListByOrderId} from "@/api/ecw/order";
export default { export default {
name: "specialNeeds", name: "specialNeeds",
props:{ props:{
...@@ -41,12 +41,9 @@ export default { ...@@ -41,12 +41,9 @@ export default {
type:[String,Number], type:[String,Number],
}, },
show:Boolean, show:Boolean,
advanceTypes:String,
}, },
computed:{ computed:{
advanceTypeList(){
return !!this.advanceTypes ? this.advanceTypes.split(',') : []
}
}, },
data(){ data(){
return{ return{
...@@ -62,7 +59,6 @@ export default { ...@@ -62,7 +59,6 @@ export default {
submit(){ submit(){
this.specialNeedsList.forEach(i => { this.specialNeedsList.forEach(i => {
i.todoDetail = this.todoDetail i.todoDetail = this.todoDetail
}) })
let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1) let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1)
specialNeedCreate(p).then(r=>{ specialNeedCreate(p).then(r=>{
...@@ -86,6 +82,20 @@ export default { ...@@ -86,6 +82,20 @@ export default {
payType:'' payType:''
}) })
}) })
//特需回显
getSpecialListByOrderId(this.orderId).then(r => {
r.data.forEach(i => {
this.advanceType.push(i.advanceType)
let index = this.specialNeedsList.findIndex(item => i.advanceType == item.advanceType)
this.specialNeedsList.splice(index,1, { advanceType:i.advanceType,
orderId:this.orderId,
id:i.id,
transFee:i.transFee,//预计金额
transCurrency:i.transCurrency,//运输费币种
payType:i.payType})
})
})
}else { }else {
this.specialNeedsList = [] this.specialNeedsList = []
this.advanceType = [] this.advanceType = []
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="入仓时间"> label="入仓时间">
<template v-slot="{row}">
{{parseTime(row.rucangTime)}}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="运输方式"> label="运输方式">
...@@ -54,10 +57,22 @@ ...@@ -54,10 +57,22 @@
<el-table-column <el-table-column
label="发货人"> label="发货人">
<template v-slot="{row}"> <template v-slot="{row}">
<div></div> <p>
{{row.consignorName}}
</p>
<p>
{{row.consignorPhone}}
</p>
</template> </template>
</el-table-column> </el-table-column>
<
<el-table-column <el-table-column
header-align="center"
align="center"
prop="columnProp"
label="columnLabel"
>
</el-table-column>
label="收货人"> label="收货人">
<template v-slot="{row}"> <template v-slot="{row}">
<p> <p>
...@@ -211,7 +226,7 @@ export default { ...@@ -211,7 +226,7 @@ export default {
warehouseApprovalGetByFormId({formId:this.processInstanceID}).then( r => { warehouseApprovalGetByFormId({formId:this.processInstanceID}).then( r => {
this.FeeDetails = r.data this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(r.data.details) this.FeeDetails.details = JSON.parse(r.data.details)
getOrderPage({orderIdList:r.data.orderIds}).then(res=>{ getOrderPage({orderIdList:r.data.adjustActualOrderIds}).then(res=>{
this.list = res.data.list this.list = res.data.list
}) })
......
<template>
<div>
<el-dialog
title="选择储位"
:visible.sync="opened"
width="600px"
:before-close="handleClose()"
v-bind="$attrs"
>
<el-tabs v-model="activeName" type="card" @tab-click="activeWarehouse = {}">
<el-tab-pane v-if="item.warehouseId === warehouseId" :label="item.name" :name="'' + index" v-for="(item, index) in area" :key="index">
<div>
<div style="text-align: center">区域</div>
<div style="background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px">
<el-row :gutter="20">
<el-col :span="12" v-for="(warehouse, i) in item.children" :key="i">
<div
class="warehouse-block"
:class="{'warehouse-block-selected': warehouse.selected, 'warehouse-block-active': warehouse.id === activeWarehouse.id}"
@click="handleSelectWarehouse(warehouse)"
>
{{ warehouse.name }}
</div>
</el-col>
</el-row>
</div>
</div>
<div>
<div style="text-align: center">仓位</div>
<div class="position-group">
<div class="position" v-for="position in activeWarehouse.positionList" :key="item.id">
<div
class="position-item"
v-for="item in position.children"
@click="handleSelectPosition(item)"
:class="{'position-item-active': item.selected}">
{{ item.code }}
</div>
</div>
</div>
</div>
<el-divider></el-divider>
已选择:{{ selected.join(', ') }}
<el-divider></el-divider>
</el-tab-pane>
</el-tabs>
<span slot="footer">
<el-button @click="opened = false">关 闭</el-button>
<el-button type="primary" @click="handleSubmit()">提 交</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getByWarehouseId } from '@/api/ecw/warehouseArea'
export default {
name: 'warehouseLocation',
props: {
visible: {
type: Boolean,
default: false
},
value: Array,
orderId: Number,
cityId: {
type: Number,
default: undefined
},
warehouseId: {
type: Number,
default: undefined
},
},
data() {
return {
opened: false,
area: [],
activeName: '0',
selectedWarehouse: [],
selectedPosition: [],
activeWarehouse: {}
};
},
watch: {
visible(val) {
if (val) {
this.opened = true
getByWarehouseId({cityId: this.cityId,}).then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
f.selected = false
if(f.positionList) f.positionList.forEach(g => {
// 位置
if(g.children)g.children.forEach(k => {
// 子位置
k.selected = false
})
})
})
})
this.area = area
})
} else {
}
},
opened(val) {
if (val) {
} else {
this.$emit('update:visible', false)
}
}
},
methods: {
handleSubmit() {
this.$emit('input', this.inputValue)
this.opened = false
},
handleClose() {},
handleSelectWarehouse(warehouse) {
this.activeWarehouse = warehouse
if (!!warehouse.selected) {
warehouse.selected = false
} else {
warehouse.selected = true
// 区域被选,清空该区域下的位置
if(warehouse.positionList) warehouse.positionList.forEach(g => {
if(g.children)g.children.forEach(k => {
k.selected = false
})
})
}
},
handleSelectPosition(position) {
if (!!position.selected) {
position.selected = false
// 反选位置时,检查父区域下是否所有位置被反选,若是,选父区域
const parentAre = this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId)
if (!parentAre.selected) {
// 检查父区域下是否所有位置被反选
let hasSelected = false
parentAre.positionList.forEach(g => {
// 位置
g.children.forEach(k => {
// 子位置
if (k.selected) hasSelected = true
})
})
// 所有子位置被反选,选父区域
if (!hasSelected) parentAre.selected = true
}
} else {
position.selected = true
// 选位置时,父区域反选
this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false
}
}
},
mounted() {
console.log('area dialog mounted')
},
computed: {
// code array
selected() {
const result = []
this.area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
if (f.selected) result.push(f.code)
else if(f.positionList) f.positionList.forEach(g => {
// 位置
if (g.selected) result.push(k.code)
if(g.children)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 if(g.children)g.children.forEach(k => {
// 子位置
if (k.selected) result.push({
orderId: this.orderId,
wareId: k.domainId,
areaId: k.areaId,
locationId: k.id
})
})
})
})
})
return result
}
}
}
</script>
<style scoped>
.warehouse-block{
background-color: white;
border-radius: 5px;
height: 42px;
line-height: 42px;
text-align: center;
margin-bottom: 15px;
cursor: pointer;
transition: 0.5s;
box-shadow: #bfbfbf 3px 3px 14px 0;
user-select: none;
}
.warehouse-block:hover{
opacity: 0.9;
transition: 0.5s;
transform: scale(1.02);
box-shadow: #8f8f8f 7px 5px 14px 0;
}
.warehouse-block-active{
box-shadow: #7e9dbd 7px 5px 14px 0;
transform: scale(1.04);
}
.warehouse-block-selected{
color: #ffffff;
background-color: #4085e3;
}
.position-group{
display: flex;
background-color: #EFEFEF;
border: 1px #EFEFEF solid;
gap: 1px;
min-height: 64px;
}
.position{
width: 20%;
height: 64px;
display: flex;
flex-direction: column;
gap: 1px;
user-select: none;
}
.position-item{
width: 100%;
background-color: #FFFFFF;
flex: 1;
cursor: pointer;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
.position-item:hover{
background-color: #d7dbe3;
}
.position-item-active{
background-color: #4085e3;
color: white;
}
.position-item-active:hover{
background-color: #4085e3;
opacity: 0.8;
}
</style>
...@@ -121,9 +121,12 @@ ...@@ -121,9 +121,12 @@
</el-table-column> </el-table-column>
<el-table-column prop="" :label="$t('成交单价')" width="220px"> <el-table-column prop="" :label="$t('成交单价')" width="220px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<template v-if="row.charging ==1"> <template v-if="row.charging ==1">
{{$t('全包价')}} {{row.seaFreight}} {{currentcyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}} <template v-if="!row.seaFreight">未报价</template>
<template>{{$t('全包价')}} {{row.seaFreight}} {{currentcyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</template>
</template> </template>
<template v-else-if="!row.seaFreight && !row.clearanceFreight">未报价</template>
<template v-else> <template v-else>
<div> <div>
{{$t('运费')}}{{row.seaFreight}} {{currentcyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}} {{$t('运费')}}{{row.seaFreight}} {{currentcyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}
......
...@@ -52,36 +52,6 @@ ...@@ -52,36 +52,6 @@
<el-input v-model="form.consigneeEmail" :disabled="form.status !== 0"/> <el-input v-model="form.consigneeEmail" :disabled="form.status !== 0"/>
</el-form-item> </el-form-item>
</div> </div>
<!-- <el-descriptions :column="3" border v-if="form.type.indexOf('1') < 0">
<el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('电话')" :labelStyle="labelStyle">
{{consignorContact.areaCode}} {{consignorContact.phoneNew || $t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司')" :labelStyle="labelStyle">
{{consignorContact.company || $t('')}}
</el-descriptions-item>
<el-descriptions-item label="Email" :labelStyle="labelStyle">
{{consignorContact.email || $t('')}}
</el-descriptions-item>
</el-descriptions> -->
<!-- <el-descriptions :column="3" border>
<el-descriptions-item :label="$t('收货人')" :labelStyle="labelStyle" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeContactsId">
<customer-contact-selector v-model="form.consigneeContactsId" @change="consigneeContact = $event" type="2" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('电话')" :labelStyle="labelStyle">
{{consigneeContact.areaCode}} {{consigneeContact.phoneNew || $t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('收货人公司')" :labelStyle="labelStyle">
{{consigneeContact.company || ''}}
</el-descriptions-item>
<el-descriptions-item label="Email" :labelStyle="labelStyle">
{{consigneeContact.email || $t('')}}
</el-descriptions-item>
</el-descriptions> -->
<div class="form-section"> <div class="form-section">
<el-form-item :label="$t('运输方式')" prop="transportId"> <el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" :disabled="form.status !== 0"/> <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" :disabled="form.status !== 0"/>
...@@ -126,15 +96,23 @@ ...@@ -126,15 +96,23 @@
<el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!form.lineId">{{$t('添加货物')}}</el-button> <el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!form.lineId">{{$t('添加货物')}}</el-button>
<el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!form.lineId">{{$t('批量添加货物')}}</el-button> <el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!form.lineId">{{$t('批量添加货物')}}</el-button>
</div> </div>
<el-table :data="productList" border> <el-table :data="form.orderItemVOList" border class="product-list">
<el-table-column :label="$t('序号')" width="60px" fixed> <el-table-column :label="$t('序号')" width="60px" fixed>
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.$index + 1}} {{scope.$index + 1}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('中文品名')" width="160px"> <el-table-column :label="$t('中文品名')" width="160px">
<template slot-scope="{row}"> <template slot-scope="scope">
<product-selector v-model="row.prodId" @change="onProductChange(row, $event)" :disabled="!form.lineId || !productEditable" /> <el-form-item label=""
:prop="`orderItemVOList.${scope.$index}.prodId`"
:rules="{
required: true, message: $t('请选择产品'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<product-selector v-model="scope.row.prodId" @change="onProductChange(row, $event)" :disabled="!form.lineId || !productEditable" />
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('英文品名')" width="160px"> <el-table-column :label="$t('英文品名')" width="160px">
...@@ -149,8 +127,16 @@ ...@@ -149,8 +127,16 @@
</el-table-column> --> </el-table-column> -->
<el-table-column :label="$t('品牌')" width="100px"> <el-table-column :label="$t('品牌')" width="100px">
<template slot-scope="{row}"> <template slot-scope="scope">
<dict-selector v-model="row.brandType" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice(row)" :disabled="!form.lineId || !productEditable" /> <el-form-item label=""
:prop="`orderItemVOList.${scope.$index}.brandType`"
:rules="{
required: true, message: $t('请选择品牌'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<dict-selector v-model="scope.row.brandType" :type="DICT_TYPE.ECW_IS_BRAND" defaultable :disabled="!form.lineId || !productEditable" />
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('件数')" width="90px"> <el-table-column :label="$t('件数')" width="90px">
...@@ -168,11 +154,6 @@ ...@@ -168,11 +154,6 @@
<el-input v-model="row.quantity" type="number" :disabled="!form.lineId || !productEditable" /> <el-input v-model="row.quantity" type="number" :disabled="!form.lineId || !productEditable" />
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="箱规(m)" width="120px">
<template slot-scope="{row}">
<el-input v-model="row.boxGauge" @input="calcVolume(row)" />
</template>
</el-table-column> -->
<el-table-column :label="$t('总体积') + '(m³)'" width="100px"> <el-table-column :label="$t('总体积') + '(m³)'" width="100px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model="row.volume" :disabled="!form.lineId || !productEditable" /> <el-input v-model="row.volume" :disabled="!form.lineId || !productEditable" />
...@@ -184,38 +165,26 @@ ...@@ -184,38 +165,26 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('总货值') + '(RMB)'" width="100px"> <el-table-column :label="$t('总货值') + '(RMB)'" width="100px">
<template slot-scope="{row}"> <template slot-scope="scope">
<el-input v-model="row.worth" :disabled="!form.lineId" /> <el-form-item label=""
:prop="`orderItemVOList.${scope.$index}.worth`"
:rules="{
required: true, message: $t('货值不能为空'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<el-input v-model="scope.row.worth" :disabled="!form.lineId" />
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品特性')" width="250px"> <el-table-column :label="$t('商品特性')" width="250px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event); calculationPrice(row)" :disabled="!form.lineId || !productEditable"> <el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event)" :disabled="!form.lineId || !productEditable">
<el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{$l(item, 'attrName')}}</el-checkbox> <el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{$l(item, 'attrName')}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="运费" width="200px">
<template slot-scope="{row}">
<template v-if="row.fee && row.fee.charging == 1">
<template v-if="!row.fee.freight">未报价</template>
<template v-else>
全包价:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</template>
</template>
<template v-else-if="!row.fee || (!row.fee.freight && !row.fee.clearanceFee)">未报价</template>
<template v-else-if="row.fee">
<div>
运费:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</div>
<div>
清关费:{{row.fee.clearanceFee}} {{currentcyMap[row.fee.clearanceFeeCurrency]}} / {{unitMap[row.fee.clearanceFeeVolume]}}
</div>
</template>
</template>
</el-table-column> -->
<el-table-column :label="$t('是否预付')"> <el-table-column :label="$t('是否预付')">
<template slot-scope="{row}"> <template slot-scope="{row}">
<dict-tag v-if="row.fee" :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.fee.isPayAdvance" /> <dict-tag v-if="row.fee" :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.fee.isPayAdvance" />
...@@ -329,7 +298,7 @@ ...@@ -329,7 +298,7 @@
<el-form-item label="唛头" prop="marks" > <el-form-item label="唛头" prop="marks" >
<el-input v-model="form.marks" placeholder=""></el-input> <el-input v-model="form.marks" placeholder=""></el-input>
</el-form-item> </el-form-item>
<el-form-item label="是否控货" prop="marks" class="ml-20"> <el-form-item label="是否控货" prop="isCargoControl" class="ml-20">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCargoControl" form-type="radio" /> <dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCargoControl" form-type="radio" />
</el-form-item> </el-form-item>
</div> </div>
...@@ -352,14 +321,50 @@ ...@@ -352,14 +321,50 @@
<el-form-item :label="$t('出单方式')" prop="issuingMethod"> <el-form-item :label="$t('出单方式')" prop="issuingMethod">
<dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" defaultable /> <dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" defaultable />
</el-form-item> </el-form-item>
<el-form-item :label="$t('送货日期')" prop="deliveryDate" class="ml-20">
<el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</div> </div>
<div> <div>
<el-form-item :label="$t('入仓类型')" prop="warehouseType"> <el-form-item :label="$t('入仓类型')" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="form.warehouseType" defaultable /> <dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="form.warehouseType" defaultable />
</el-form-item> </el-form-item>
</div>
<div>
<el-form-item :label="$t('外部仓库')" prop="warehouseType">
<el-checkbox label="" :checked="!!form.isExternalWarehouse" @change="form.isExternalWarehouse=$event"></el-checkbox>
</el-form-item>
<div v-if="form.isExternalWarehouse" class="pl-50">
<div v-for="(item, index) in form.externalWarehouseDtoList" class="flex" :key="index">
<div class="w-300">
<el-form-item :label="$t('装货时间')"
:prop="'externalWarehouseDtoList.' + index + '.estLoadingTime'"
:rules="{
required: true, message: '装货时间不能为空', trigger: 'blur'
}"
>
<el-date-picker v-model="item.estLoadingTime" value-format="yyyy-MM-dd HH:mm:ss" class="w-200"></el-date-picker>
</el-form-item>
</div>
<div class="w-300 ml-10">
<el-form-item :label="$t('装货地址')"
:prop="'externalWarehouseDtoList.' + index + '.loadingAddress'"
:rules="{
required: true, message: '装货地址不能为空', trigger: 'blur'
}"
>
<el-input v-model="item.loadingAddress" placeholder="" class="w-200"></el-input>
</el-form-item>
<el-button type="primary" icon="el-icon-plus" v-if="index==0" @click="form.externalWarehouseDtoList.push({})"></el-button>
<el-button type="danger" icon="el-icon-delete" v-else-if="index == form.externalWarehouseDtoList.length-1" @click="form.externalWarehouseDtoList.splice(index, 1)"></el-button>
</div>
</div>
</div>
</div>
<div>
<el-form-item :label="$t('预计送货日期')" prop="deliveryDate" class="ml-20">
<el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('收货方式')" prop="harvestMethod" class="ml-20"> <el-form-item :label="$t('收货方式')" prop="harvestMethod" class="ml-20">
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.harvestMethod" :filter="item => item.value == 1 || homeDeliveryService" defaultable /> <dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.harvestMethod" :filter="item => item.value == 1 || homeDeliveryService" defaultable />
</el-form-item> </el-form-item>
...@@ -444,7 +449,7 @@ ...@@ -444,7 +449,7 @@
<el-form-item label="" style="margin: 30px 0"> <el-form-item label="" style="margin: 30px 0">
<el-button type="primary" @click="submitForm(0)">{{$t('保存')}}</el-button> <!--草稿--> <el-button type="primary" @click="submitForm(0)">{{$t('保存')}}</el-button> <!--草稿-->
<el-button type="primary" @click="submitForm(2)">{{$t('新建')}}</el-button> <!--待入仓--> <el-button type="primary" @click="submitForm(2)" v-if="!form.orderId">{{$t('新建')}}</el-button> <!--待入仓-->
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button> <el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -489,7 +494,7 @@ ...@@ -489,7 +494,7 @@
</template> </template>
<script> <script>
import { createOrder, updateOrder, getOrder, getProductFeeList, getOrderDetail, getOrderCourierNumber, orderImport, exportPackingList } from "@/api/ecw/order"; import { createOrder, updateOrder, getOrderDetail, getOrderCourierNumber, orderImport, exportPackingList } from "@/api/ecw/order";
import ProductSelector from '@/components/ProductSelector' import ProductSelector from '@/components/ProductSelector'
import {getProductAttrList} from '@/api/ecw/productAttr' import {getProductAttrList} from '@/api/ecw/productAttr'
import {getChannelList} from '@/api/ecw/channel' import {getChannelList} from '@/api/ecw/channel'
...@@ -500,10 +505,7 @@ import {getTradeCityList} from '@/api/ecw/region' ...@@ -500,10 +505,7 @@ import {getTradeCityList} from '@/api/ecw/region'
import {getDictData, getDictDatas} from '@/utils/dict' import {getDictData, getDictDatas} from '@/utils/dict'
import {getCurrencyList} from '@/api/ecw/currency' import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit' import {getUnitList} from '@/api/ecw/unit'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts';
import AreaSelector from '@/components/AreaSelector' import AreaSelector from '@/components/AreaSelector'
import {calculationPrice} from '@/api/ecw/product'
import {getCustomerAvailableCouponList} from '@/api/ecw/coupon'
import FileUpload from '@/components/FileUpload' import FileUpload from '@/components/FileUpload'
import AreaCodeSelector from '@/components/AreaCodeSelector' import AreaCodeSelector from '@/components/AreaCodeSelector'
import ChooseContactDialog from '@/components/ChooseContactDialog' import ChooseContactDialog from '@/components/ChooseContactDialog'
...@@ -519,7 +521,7 @@ export default { ...@@ -519,7 +521,7 @@ export default {
// draweeList: [], // draweeList: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
productList:[], // 商品信息 //productList:[], // 商品信息
productAttrList:[], // 商品属性 productAttrList:[], // 商品属性
channelList: [], // 出货取到 channelList: [], // 出货取到
routerList: [], routerList: [],
...@@ -541,7 +543,10 @@ export default { ...@@ -541,7 +543,10 @@ export default {
status:0, status:0,
sendstatus:0, sendstatus:0,
isCargoControl: false, isCargoControl: false,
type:[] type:[],
isExternalWarehouse: false,
externalWarehouseDtoList:[{}],
orderItemVOList:[]
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -643,7 +648,7 @@ export default { ...@@ -643,7 +648,7 @@ export default {
totalWorth: 0, totalWorth: 0,
totalQuatity: 0 totalQuatity: 0
} }
this.productList.forEach(item => { this.form.orderItemVOList.forEach(item => {
sum.totalNum += parseInt(item.num) || 0 sum.totalNum += parseInt(item.num) || 0
sum.totalVolume += (parseFloat(item.volume) || 0) // * (parseInt(item.num) || 0) sum.totalVolume += (parseFloat(item.volume) || 0) // * (parseInt(item.num) || 0)
sum.totalWeight += (parseFloat(item.weight) || 0) // * (parseInt(item.num) || 0) sum.totalWeight += (parseFloat(item.weight) || 0) // * (parseInt(item.num) || 0)
...@@ -690,23 +695,14 @@ export default { ...@@ -690,23 +695,14 @@ export default {
this.$set(this.form, 'departureId', router.startCityId) this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId) this.$set(this.form, 'objectiveId', router.destCityId)
}, },
/* // 发货联系人发生变化获取发货客户 /* 'form.orderItemVOList':{
consignorContact(){
this.getConsignor()
},
// 收货联系人发生变化获取收货客户
consigneeContact(){
this.getConsignee()
}, */
productList:{
deep: true, deep: true,
handler(){ handler(){
this.productList.map(item => { this.form.orderItemVOList.map(item => {
item.prodAttrIds = item.prodAttrArr.join(',') item.prodAttrIds = item.prodAttrArr.join(',')
}) })
this.calculationPrice()
} }
}, }, */
fee(){ fee(){
this.getCoupons() this.getCoupons()
}, },
...@@ -729,12 +725,9 @@ export default { ...@@ -729,12 +725,9 @@ export default {
if(this.$route.query.id){ if(this.$route.query.id){
getOrderDetail(this.$route.query.id).then(res => { getOrderDetail(this.$route.query.id).then(res => {
this.form = res.data this.form = res.data
/* this.form.consignorContactsId = res.data.consignorVO.customerContactsId
this.form.consigneeContactsId = res.data.consigneeVO.customerContactsId */
this.form.orderItemVOList.forEach(item => { this.form.orderItemVOList.forEach(item => {
item.prodAttrArr = item.prodAttrIds.split(',').filter(item => item != '') item.prodAttrArr = item.prodAttrIds.split(',').filter(item => item != '')
this.addProduct(Object.assign({}, item))
}) })
this.form.type = this.form.type ? this.form.type.split(',').filter(item => item != '') : [] this.form.type = this.form.type ? this.form.type.split(',').filter(item => item != '') : []
this.$set(this.form, 'consignorCompany', res.data.consignorVO.company) this.$set(this.form, 'consignorCompany', res.data.consignorVO.company)
...@@ -770,11 +763,6 @@ export default { ...@@ -770,11 +763,6 @@ export default {
}) })
}, },
methods: { methods: {
/* onCustomerCreate(customer){
getCustomerContactsListByCustomer({customerId: customer.customerId}).then(res => {
this.onContactChoose(res.data[0])
})
}, */
onContactChoose(contact){ onContactChoose(contact){
console.log('选择联系人', contact) console.log('选择联系人', contact)
if(!this.contactChooseType && !this.quickCreateType) return if(!this.contactChooseType && !this.quickCreateType) return
...@@ -803,7 +791,7 @@ export default { ...@@ -803,7 +791,7 @@ export default {
addToProductList(){ addToProductList(){
console.log('addToProductList') console.log('addToProductList')
this.importList.forEach(item => { this.importList.forEach(item => {
this.productList.push({ this.form.orderItemVOList.push({
prodId: item.prodId, prodId: item.prodId,
brandType: item.brandType, brandType: item.brandType,
num: item.num, num: item.num,
...@@ -861,44 +849,10 @@ export default { ...@@ -861,44 +849,10 @@ export default {
}, },
onProductAttrChange(row, attr){ onProductAttrChange(row, attr){
console.log(attr) console.log(attr)
this.calculationPrice(row)
/* // 需要强制刷新,否则勾选框不更新
this.$forceUpdate() */
}, },
addProduct(data){ addProduct(data){
this.productList.push(data || {prodAttrArr:[]}) this.form.orderItemVOList.push(data || {prodAttrArr:[]})
},
// 计算商品运费
calculationPrice(row){
let calcable = true
if(!this.productList.length) return false
this.productList.forEach(item => {
if(!item.weight || !item.prodId){
calcable = false
}
})
if(this.calculating || !calcable) return false
this.calculating = true
console.log('calculationPrice', row)
/* if(!row.prodId || !this.form.transportId || !this.form.lineId)return false
if(row.prodAttrArr){
row.prodAttrIds = row.prodAttrArr.join(',')
} */
calculationPrice({
lineId: this.form.lineId,
transportId: this.form.transportId,
channelId: this.form.channelId,
prodConditionParamList: this.productList //[row]
}).then(res => {
this.$set(this, 'fee', res.data.costDto)
this.productList.map((item, index) => {
this.$set(item, 'fee', res.data.prodCostDtoList[index])
})
}).finally(() => {
this.calculating = false
})
}, },
// 获取路线 // 获取路线
getOpenedRouterList(){ getOpenedRouterList(){
...@@ -929,19 +883,7 @@ export default { ...@@ -929,19 +883,7 @@ export default {
delProduct(index){ delProduct(index){
this.$confirm(this.$t('确定删除此条内容么?')) this.$confirm(this.$t('确定删除此条内容么?'))
.then(res => { .then(res => {
this.productList.splice(index, 1) this.form.orderItemVOList.splice(index, 1)
})
},
getCoupons(){
if(!this.form.consigneeContactsId || !this.form.consignorContactsId) return false
let data = Object.assign({}, this.form, {
prodConditionParamList: this.productList,
consigneeCustomerContactsId: this.form.consigneeContactsId,
consignorCustomerContactsId: this.form.consignorContactsId
})
getCustomerAvailableCouponList(data)
.then(res => {
this.couponList = res.data
}) })
}, },
/** 提交按钮 */ /** 提交按钮 */
...@@ -952,7 +894,7 @@ export default { ...@@ -952,7 +894,7 @@ export default {
return; return;
} }
this.productList.map(item => { this.form.orderItemVOList.map(item => {
item.prodAttrIds = item.prodAttrArr.join(',') item.prodAttrIds = item.prodAttrArr.join(',')
}) })
this.transportList.map(item => { this.transportList.map(item => {
...@@ -967,7 +909,7 @@ export default { ...@@ -967,7 +909,7 @@ export default {
let data = Object.assign({}, this.form, { let data = Object.assign({}, this.form, {
customDraweeVOList: this.customDraweeList, customDraweeVOList: this.customDraweeList,
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled), // transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.productList, orderItemVOList: this.getProductListWithDefaultValue(),
couponIds: coupons.join(",") couponIds: coupons.join(",")
}) })
data.type = data.type.join(',') data.type = data.type.join(',')
...@@ -985,7 +927,7 @@ export default { ...@@ -985,7 +927,7 @@ export default {
}, this.form, { }, this.form, {
customDraweeVOList: this.customDraweeList, customDraweeVOList: this.customDraweeList,
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled), // transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.productList, orderItemVOList: this.getProductListWithDefaultValue(),
status: submitType status: submitType
}) })
data.type = data.type.join(',') data.type = data.type.join(',')
...@@ -996,7 +938,19 @@ export default { ...@@ -996,7 +938,19 @@ export default {
}); });
}); });
}, },
// 体积。件数,数量,重量为选填,但是接口确实必填,所以生成一个副本并赋予默认值
getProductListWithDefaultValue(){
let arr = []
this.form.orderItemVOList.forEach(item => {
let tmp = {...item}
if(!tmp.volume)tmp.volume = 1
if(!tmp.weight)tmp.weight = 1
if(!tmp.quantity)tmp.quantity = 1
if(!tmp.num)tmp.num = 1
arr.push(tmp)
})
return arr
}
} }
}; };
</script> </script>
...@@ -1008,13 +962,7 @@ export default { ...@@ -1008,13 +962,7 @@ export default {
flex: 1; flex: 1;
} }
} }
/* .mt-10{
margin-top: 10px;
} */
.form-section{ .form-section{
/* ::v-deep.el-form-item{
width: 30%;
} */
.contact{ .contact{
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -1027,4 +975,7 @@ export default { ...@@ -1027,4 +975,7 @@ export default {
} }
} }
::v-deep .product-list .el-form-item__error{
position: static;
}
</style> </style>
\ No newline at end of file
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" /> <print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" />
<print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId=null" /> <print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId=null" />
<print-lading-bill v-if="printLadingBillInfo !== null" v-bind="printLadingBillInfo" @close="printLadingBillInfo=null" /> <print-lading-bill v-if="printLadingBillInfo !== null" v-bind="printLadingBillInfo" @close="printLadingBillInfo=null" />
<batch-pickup v-if="showBatchPickup" @close="onBatchClose"/> <batch-pickup v-if="showBatchPickup" @close="onBatchClose" @success="onBatchClose"/>
<withdrawal v-if="show" :dialog-visible="show" :orderId="orderId" ></withdrawal> <withdrawal v-if="show" :dialog-visible="show" :orderId="orderId" ></withdrawal>
<batch-single-application :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application> <batch-single-application :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application>
<fee-application :order-id="orderId" :dialog-visible.sync="feeApplicationBol"></fee-application> <fee-application :order-id="orderId" :dialog-visible.sync="feeApplicationBol"></fee-application>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="actions"> <div class="actions">
<el-button type="primary" @click="$router.replace('detail?orderId=' + order.orderId)">{{$t('查看订单')}}</el-button> <el-button type="primary" @click="$router.replace('detail?orderId=' + order.orderId)">{{$t('查看订单')}}</el-button>
<el-button type="warning" @click="showNotice = true">{{$t('入仓须知')}}</el-button> <el-button type="warning" @click="showNotice = true">{{$t('入仓须知')}}</el-button>
<el-button type="info" @click="$router.replace('edit')">{{$t('再来一单')}}</el-button> <el-button type="info" @click="$router.replace('create')">{{$t('再来一单')}}</el-button>
</div> </div>
<el-dialog :title="$t('查看须知')" :visible.sync="showNotice" width="700px"> <el-dialog :title="$t('查看须知')" :visible.sync="showNotice" width="700px">
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<el-table-column label="调仓编号" prop="id"></el-table-column> <el-table-column label="调仓编号" prop="id"></el-table-column>
<el-table-column label="调出仓库" prop="warehouseOutName" ></el-table-column> <el-table-column label="调出仓库" prop="warehouseOutName" ></el-table-column>
<el-table-column label="调入仓库" prop="warehouseInName"></el-table-column> <el-table-column label="调入仓库" prop="warehouseInName"></el-table-column>
<el-table-column label="申请人" prop="creator"></el-table-column> <el-table-column label="申请人" prop="creatorName"></el-table-column>
<el-table-column label="申请时间"> <el-table-column label="申请时间">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.createTime)}} {{parseTime(row.createTime)}}
...@@ -67,9 +67,6 @@ ...@@ -67,9 +67,6 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button v-if="row.status === 4" type="text">
撤销
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -78,6 +75,9 @@ ...@@ -78,6 +75,9 @@
<el-descriptions-item label="储位"> <el-descriptions-item label="储位">
<div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}</div><div>{{item.warehouseName ? item.regionName :''}} 区</div></div> <div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}</div><div>{{item.warehouseName ? item.regionName :''}} 区</div></div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item v-if="type == 2" label="选择储位">
<div @click="areaVisible = true" style="color: #0a84ff;cursor: pointer;">选择储位</div>
</el-descriptions-item>
<el-descriptions-item label="调拨目标仓">{{ warehouseDetails && warehouseDetails.warehouseInName ? warehouseDetails.warehouseInName : '' }}</el-descriptions-item> <el-descriptions-item label="调拨目标仓">{{ warehouseDetails && warehouseDetails.warehouseInName ? warehouseDetails.warehouseInName : '' }}</el-descriptions-item>
<el-descriptions-item label="物流公司"> <el-descriptions-item label="物流公司">
<el-select v-model="params.logisticsCompany" > <el-select v-model="params.logisticsCompany" >
...@@ -90,20 +90,22 @@ ...@@ -90,20 +90,22 @@
<el-descriptions-item label="联系电话"> <el-descriptions-item label="联系电话">
<el-input v-model="params.phone"></el-input> <el-input v-model="params.phone"></el-input>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="出仓日期"> <el-descriptions-item label="出仓日期" >
<el-date-picker <el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
v-model="params.deliveryDate" v-model="params.deliveryDate"
type="date" type="date"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-descriptions-item> </el-descriptions-item>
<!-- <el-descriptions-item label="到仓日期">--> <el-descriptions-item label="到仓日期" v-if="type == 2">
<!-- <el-date-picker--> <el-date-picker
<!-- v-model="params.deliveryDate"--> value-format="yyyy-MM-dd HH:mm:ss"
<!-- type="date"--> v-model="params.arrivalDate"
<!-- placeholder="选择日期">--> type="date"
<!-- </el-date-picker>--> placeholder="选择日期">
<!-- </el-descriptions-item>--> </el-date-picker>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-divider content-position="left"> <el-divider content-position="left">
出仓影像 出仓影像
...@@ -114,11 +116,31 @@ ...@@ -114,11 +116,31 @@
<el-input v-model="params.deliveryRemark" type="textarea"></el-input> <el-input v-model="params.deliveryRemark" type="textarea"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div> <div style="margin-bottom: 30px; text-align: center;">
<el-button v-if="type == 1" @click="submit">确认出仓</el-button> <el-button v-if="type == 1" @click="submit" size="medium">确认出仓</el-button>
<el-button v-else @click="submit2">确认到仓</el-button> <el-button v-else @click="submit2(true)" size="medium" >确认到仓</el-button>
<el-button @click="$tab.closeOpenPage({path:'/order/order'})">返回</el-button> <el-button v-if="type == 2" @click="escapeBol = true;">转异</el-button>
<el-button v-if="type == 1" size="medium" @click="cancellationOfOrder">取消调仓</el-button>
<el-button size="medium" @click="$tab.closeOpenPage({path:'/order/order'})">返回</el-button>
</div> </div>
<warehouse-location ref="area" :city-id="warehouseDetails.warehouseInShi" :visible.sync="areaVisible" v-model="params.orderLocationCreateReqVOList" :warehouse-id="warehouseDetails.warehouseInId" :order-id="Number(orderId)"></warehouse-location>
<el-dialog :title="'订单转异'" center :visible.sync="escapeBol">
<el-form label-position="top" label-width="200">
<el-form-item label="原因类型">
<dict-selector v-model="params.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item>
<el-form-item required label="附件">
<image-upload v-model="params.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item label="详细信息">
<el-input v-model="params.descZh" type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="submit2(false)">确认并完成入仓</el-button>
<el-button @click="escapeBol = false">取消</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -128,7 +150,7 @@ import { ...@@ -128,7 +150,7 @@ import {
getAdjustInfo, getAdjustInfo,
getOrder, listByOrderId, getOrder, listByOrderId,
orderWarehouseInGetAdjustInfo, orderWarehouseInGetAdjustInfo,
orderWarehousePicturePage, warehouseAdjustArrived, warehouseAdjustPage, orderWarehousePicturePage, warehouseAdjustArrived,
warehouseAdjustSendOut warehouseAdjustSendOut
} from "@/api/ecw/order"; } from "@/api/ecw/order";
import Template from "@/views/cms/template"; import Template from "@/views/cms/template";
...@@ -136,13 +158,18 @@ import {DICT_TYPE} from '@/utils/dict'; ...@@ -136,13 +158,18 @@ import {DICT_TYPE} from '@/utils/dict';
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index"; import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index";
import {getSupplierPage} from "@/api/ecw/supplier"; import {getSupplierPage} from "@/api/ecw/supplier";
import {getByWarehouseId} from "@/api/ecw/warehouseArea"; import {getByWarehouseId} from "@/api/ecw/warehouseArea";
let STATUS = {1:'审核中', 2:'已通过', 3:'已拒绝', 4:'已出仓', 5:'已到仓'} import {adjustLastWithStatus, warehouseApprovalCancel} from "@/api/ecw/batchSingleApplication";
import warehouseLocation from "@/views/ecw/order/components/warehouseLocation";
import imageUpload from "@/components/ImageUpload";
let STATUS = {1:'申请中', 2:'通过', 3:'不通过', 4:'已取消', 5:'已出仓',6:'已到仓'}
export default { export default {
name: "transferWarehousing", name: "transferWarehousing",
components: { components: {
ImageAndVideoUpload, ImageAndVideoUpload,
Template, Template,
ordeDetailsForm, ordeDetailsForm,
warehouseLocation,
imageUpload
}, },
props: { props: {
orderId: [String, Number], orderId: [String, Number],
...@@ -150,6 +177,8 @@ export default { ...@@ -150,6 +177,8 @@ export default {
}, },
data() { data() {
return { return {
areaVisible:false,
escapeBol:false,
STATUS, STATUS,
orderDetails: {}, orderDetails: {},
DICT_TYPE, DICT_TYPE,
...@@ -162,14 +191,60 @@ export default { ...@@ -162,14 +191,60 @@ export default {
logisticsCompany:undefined, logisticsCompany:undefined,
logisticsNo: "", logisticsNo: "",
phone: "", phone: "",
urls: [] urls: [],
arrivalDate:'',
orderLocationCreateReqVOList:[],
manualExceptionType:0,
descZh:'',
exceptionUrls:[]
}, },
warehouseInShi:'',
expressList:[], expressList:[],
storageSpaceList:[], storageSpaceList:[],
applyStatus:{}
} }
}, },
created() { computed:{
exWarehouse(){
return {
deliveryDate: this.params.deliveryDate,
deliveryRemark: this.params.deliveryRemark,
id: this.params.id,
logisticsCompany: this.params.logisticsCompany,
logisticsNo:this.params.logisticsNo,
phone: this.params.logisticsNo,
urls: this.params.urls,
}
},
toWarehouseAbnormal(){
return {
arrivalDate: this.params.arrivalDate,
arrivalRemark: this.params.arrivalRemark,
descZh: this.params.descZh,
id: this.params.id,
manualExceptionType:this.params.manualExceptionType,
orderLocationCreateReqVOList: this.params.orderLocationCreateReqVOList,
urls: this.params.urls,
exceptionUrls:this.params.exceptionUrls.split(','),
}
},
toWarehouse(){
return {
arrivalDate: this.params.arrivalDate,
arrivalRemark: this.params.arrivalRemark,
id: this.params.id,
urls: this.params.urls,
}
}
},
created() {
if(this.type == 1){
adjustLastWithStatus({orderId:this.orderId,lang:0}).then(r =>{
this.applyStatus = r.data})
}
getSupplierPage({ pageNo: 1, pageSize: 10000}).then(r => { getSupplierPage({ pageNo: 1, pageSize: 10000}).then(r => {
this.expressList = r.data.list; this.expressList = r.data.list;
}) })
...@@ -184,7 +259,7 @@ export default { ...@@ -184,7 +259,7 @@ export default {
}) })
} }
orderWarehouseInGetAdjustInfo({orderId: this.orderId, lang: 0}).then(r => { orderWarehouseInGetAdjustInfo({orderId: this.orderId, lang: 0}).then(r => {
this.warehouseDetails = r.data[0] this.warehouseDetails = r.data[r.data.length - 1]
listByOrderId({orderId:this.orderId}).then(res => { listByOrderId({orderId:this.orderId}).then(res => {
if(res.code === 0){ if(res.code === 0){
getByWarehouseId().then(r =>{ getByWarehouseId().then(r =>{
...@@ -207,10 +282,11 @@ export default { ...@@ -207,10 +282,11 @@ export default {
}) })
} }
}) })
this.warehouseInShi = this.warehouseDetails.warehouseInShi
this.params.phone = this.warehouseDetails.phone || ''; this.params.phone = this.warehouseDetails.phone || '';
this.params.logisticsNo = this.warehouseDetails.logisticsNo; this.params.logisticsNo = this.warehouseDetails.logisticsNo;
this.params.id = this.warehouseDetails.id; this.params.id = this.warehouseDetails.id;
this.params.deliveryDate = this.warehouseDetails.deliveryDate this.params.deliveryDate = new Date(this.warehouseDetails.deliveryDate);
this.params.logisticsCompany = this.warehouseDetails.logisticsCompany ? parseInt(this.warehouseDetails.logisticsCompany) :undefined; this.params.logisticsCompany = this.warehouseDetails.logisticsCompany ? parseInt(this.warehouseDetails.logisticsCompany) :undefined;
orderWarehousePicturePage({rows:100,bizId:this.params.id,type:this.type == 1 ? 2 : 3 }).then(r => { orderWarehousePicturePage({rows:100,bizId:this.params.id,type:this.type == 1 ? 2 : 3 }).then(r => {
if(r.code === 0){ if(r.code === 0){
...@@ -221,20 +297,20 @@ export default { ...@@ -221,20 +297,20 @@ export default {
}, },
methods:{ methods:{
submit(){ submit(){
warehouseAdjustSendOut(this.params).then( warehouseAdjustSendOut(this.exWarehouse).then(
r => { r => {
if(r.code === 0){ if(r.code === 0){
this.$message.success('调拨出仓成功'); this.$message.success('调拨出仓成功');
this.$router.back(); this.$tab.closeOpenPage({path:'/order/order'})
} }
} }
) )
}, },
submit2(){ submit2(val){
warehouseAdjustArrived(this.params).then(r => { warehouseAdjustArrived(val ? this.toWarehouse : this.toWarehouseAbnormal).then(r => {
if(r.code === 0){ if(r.code === 0){
this.$message.success('调到仓成功'); this.$message.success('调到仓成功');
this.$router.back(); this.$tab.closeOpenPage({path:'/order/order'})
} }
}) })
}, },
...@@ -247,12 +323,31 @@ export default { ...@@ -247,12 +323,31 @@ export default {
num += Number(i.num) num += Number(i.num)
weight += Number(i.weight) weight += Number(i.weight)
Wvolume += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.volume : 0); Wvolume += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.volume : 0);
Wnum += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.num : 0) Wnum += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.cartonsNum : 0)
Wweight += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.weight : 0) Wweight += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.weight : 0)
}) })
let text = `下单统计:${num}${volume}${weight}Kg` let text = `下单统计:${num}${volume}${weight}Kg`
let text2 =` 入仓统计:${Wnum}${Wvolume}${Wweight}Kg` let text2 =` 入仓统计:${Wnum}${Wvolume}${Wweight}Kg`
return ['合计:',text,text2] return ['合计:',text,text2]
},
cancellationOfOrder(){
this.$prompt('请输入审核调仓原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
warehouseApprovalCancel(this.applyStatus.orderWarehouseApprovalBackVO.id,value) .then(r => {
if(r.data){
this.$message.success('取消调仓成功')
this.$tab.closeOpenPage({path:'/order/order'})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消成功'
});
});
} }
}, },
} }
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<el-form-item label="原因类型"> <el-form-item label="原因类型">
<dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector> <dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item> </el-form-item>
<el-form-item label="附件"> <el-form-item required label="附件">
<image-upload v-model="form.exceptionUrls"></image-upload> <image-upload v-model="form.exceptionUrls"></image-upload>
</el-form-item> </el-form-item>
<el-form-item label="详细信息"> <el-form-item label="详细信息">
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSubmit">转异完成并入仓</el-button> <el-button type="primary" @click="handleSubmit">确认并完成入仓</el-button>
<el-button @click="escapeBol = false">取消</el-button> <el-button @click="escapeBol = false">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px" <el-form ref="elForm" :model="formData" :rules="rules" inline size="small" label-width="100px"
label-position="left"> label-position="left">
<el-form-item :label="$t('公司全称')" prop="companyZh"> <div>
<el-input v-model="formData.companyZh" :placeholder="$t('请输入公司全称')" show-word-limit clearable></el-input> <el-form-item :label="$t('公司全称')" prop="companyZh">
</el-form-item> <el-input v-model="formData.companyZh" :placeholder="$t('请输入公司全称')" show-word-limit clearable></el-input>
<el-form-item :label="$t('英文名称')" prop="companyEn"> </el-form-item>
<el-input v-model="formData.companyZh" :placeholder="$t('请输入公司英文名')" show-word-limit clearable></el-input> <el-form-item :label="$t('英文名称')" prop="companyEn">
</el-form-item> <el-input v-model="formData.companyEn" :placeholder="$t('请输入公司英文名')" show-word-limit clearable></el-input>
<!-- <el-form-item :label="$t('代理名称')" prop="agentName"> </el-form-item>
<el-input v-model="formData.agentName" :placeholder="$t('请输入代理名称')" clearable :style="{width: '100%'}"> </div>
</el-input> <div>
</el-form-item> --> <el-form-item :label="$t('合作开始时间')" prop="cooperationDateStart">
<el-form-item :label="$t('公司电话')" prop="tell"> <el-date-picker v-model="formData.cooperationDateStart" value-format="yyyy-MM-dd HH:mm:ss" clearable></el-date-picker>
<el-input v-model="formData.tell" :placeholder="$t('请输入公司电话')" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item :label="$t('合作结束时间')" prop="cooperationDateEnd">
<el-form-item :label="$t('邮件地址')" prop="email"> <el-date-picker v-model="formData.cooperationDateEnd" value-format="yyyy-MM-dd HH:mm:ss" clearable></el-date-picker>
<el-input v-model="formData.email" :placeholder="$t('请输入邮箱地址')" clearable></el-input> </el-form-item>
</el-form-item> </div>
<div>
<el-form-item :label="$t('公司电话')" prop="tell">
<el-input v-model="formData.tell" :placeholder="$t('请输入公司电话')" clearable></el-input>
</el-form-item>
<el-form-item :label="$t('邮件地址')" prop="email">
<el-input v-model="formData.email" :placeholder="$t('请输入邮箱地址')" clearable></el-input>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('公司地址')" prop="address">
<area-selector
:country="formData.country"
:province="formData.province"
:city="formData.city"
@countryChange="onAreaChange('country', $event)"
@provinceChange="onAreaChange('province', $event)"
@cityChange="onAreaChange('city', $event)"
/>
<el-input v-model="formData.address" :placeholder="$t('请输入详细地址')" class="mt-10"></el-input>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('备注')" prop="remark">
<el-input v-model="formData.remark" type="textarea" :placeholder="$t('请输入备注')"
:autosize="{minRows: 4, maxRows: 4}" class="w-500"></el-input>
</el-form-item>
</div>
<el-form-item :label="$t('公司地址')" prop="address"> <div>
<!-- <el-select v-model="formData.country"> <el-form-item :label="$t('供应商类别')" prop="companyType">
<el-option v-for="(item, index) in treeList" :value="item.id" :label="item.titleZh" :key="item.id" /> <dict-selector v-model="formData.companyType" type="company_type" multiple />
</el-select> </el-form-item>
<el-select v-model="formData.province"> <el-form-item :label="$t('合作类型')" prop="cooperationType">
<el-option v-for="(item, index) in provinceList" :value="item.id" :label="item.titleZh" :key="item.id" /> <dict-selector v-model="formData.cooperationType" type="cooperation_type" />
</el-select> </el-form-item>
<el-select v-model="formData.city"> </div>
<el-option v-for="(item, index) in cityList" :value="item.id" :label="item.titleZh" :key="item.id" />
</el-select> --> <div>
<area-selector <el-form-item :label="$t('营业执照')" prop="license">
:country="formData.country" <upload v-model="formData.license" />
:province="formData.province" </el-form-item>
:city="formData.city" <el-form-item :label="$t('合同')" prop="contract">
@countryChange="onAreaChange('country', $event)" <upload v-model="formData.contract" />
@provinceChange="onAreaChange('province', $event)" </el-form-item>
@cityChange="onAreaChange('city', $event)" </div>
/> <div>
<el-input v-model="formData.address" :placeholder="$t('请输入详细地址')" class="mt-10"></el-input> <el-form-item :label="$t('统一信用代码')" prop="licenseNumber">
<!-- <el-select v-model="selectedRegionIndex"> <el-input v-model="formData.licenseNumber" :placeholder="$t('请输入统一社会信用代码')" clearable
<el-option v-for="(item, index) in regionList" :value="index" :label="item.titleZh" :key="item.id" /> :style="{width: '100%'}"></el-input>
</el-select> --> </el-form-item>
<!-- <el-select v-model="formData.address" placeholder="请选择下拉选择公司地址" clearable :style="{width: '100%'}"> </div>
</el-select> --> <div>
</el-form-item> <el-form-item label-width="0">
<el-form-item :label="$t('备注')" prop="remark"> <table-form :title="$t('联系人')" :fields="[
<el-input v-model="formData.remark" type="textarea" :placeholder="$t('请输入备注')" { label: this.$t('部门'), field: 'department'},
:autosize="{minRows: 4, maxRows: 4}" :style="{width: '100%'}"></el-input> { label: this.$t('职位'), field: 'position'},
</el-form-item> { label: this.$t('名称'), field: 'name', required: true},
<el-form-item label-width="0" prop="field110"> { label: this.$t('电话'), field: 'phone', required: true},
<table-form :title="$t('联系人')" :fields="[ ]" v-model="formData.contactList" class="w-1000">
{ label: this.$t('部门'), field: 'department'}, </table-form>
{ label: this.$t('职位'), field: 'position'}, </el-form-item>
{ label: this.$t('名称') + '*', field: 'name', required: true}, </div>
{ label: this.$t('电话') + '*', field: 'phone', required: true}, <div>
]" v-model="formData.contactList"> <el-form-item label-width="0" prop="field110">
</table-form> <table-form :title="$t('银行信息')" :fields="[
</el-form-item> { label: this.$t('账户名称'), field: 'accountName', required: true},
<el-form-item :label="$t('供应商类别')" prop="companyType"> { label: this.$t('币别') , field: 'currency', tag: 'selector', attr: currentcyAttr, required: true},
<!-- <el-checkbox-group v-model="formData.companyType" size="medium"> { label: this.$t('银行名称'), field: 'bankName', required: true},
<el-checkbox v-for="(item, index) in companyTypeOptions" :key="index" :label="item.value" { label: this.$t('银行账户'), field: 'bankAccount', required: true},
:disabled="item.disabled">{{item.label}}</el-checkbox> { label: this.$t('银行代码'), field: 'bankCode'},
</el-checkbox-group> --> { label: this.$t('账户类型'), field: 'accountType'},
<dict-selector v-model="formData.companyType" type="company_type" multiple /> { label: this.$t('银行地址'), field: 'bankAddress'},
</el-form-item> { label: this.$t('状态'), field: 'status', tag:'el-switch', attrs: bankStatusAttr},
<el-form-item :label="$t('合作类型')" prop="cooperationType"> {label: this.$t('操作'), buttons: [
<dict-selector v-model="formData.cooperationType" type="cooperation_type" /> {
</el-form-item> type: 'danger',
<el-form-item :label="$t('营业执照')" prop="license"> text: '删除',
<upload v-model="formData.license" /> hander: delBank
<!-- <el-upload ref="license" :file-list="licensefileList" :action="licenseAction" }
:before-upload="licenseBeforeUpload"> ]}
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button> ]" v-model="formData.bankList" class="w-1000">
</el-upload> --> </table-form>
</el-form-item> </el-form-item>
<el-form-item :label="$t('合同')" prop="contract"> </div>
<upload v-model="formData.contract" />
<!-- <el-upload ref="contract" :file-list="contractfileList" :action="contractAction"
:before-upload="contractBeforeUpload">
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
</el-upload> -->
</el-form-item>
<el-form-item :label="$t('统一信用代码')" prop="licenseNumber">
<el-input v-model="formData.licenseNumber" :placeholder="$t('请输入统一社会信用代码')" clearable
:style="{width: '100%'}"></el-input>
</el-form-item>
<el-form-item label-width="0" prop="field110">
<table-form :title="$t('银行信息')" :fields="[
{ label: this.$t('账户名称') + '*', field: 'accountName', required: true},
{ label: this.$t('币别') + '*', field: 'currency', required: true},
{ label: this.$t('银行名称*'), field: 'bankName', required: true},
{ label: this.$t('银行账户') + '*', field: 'bankAccount', required: true},
{ label: this.$t('银行代码'), field: 'bankCode'},
{ label: this.$t('账户类型'), field: 'accountType'},
{ label: this.$t('银行地址'), field: 'bankAddress'},
]" v-model="formData.bankList">
</table-form>
</el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button> <el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button>
<el-button @click="resetForm">{{$t('重置')}}</el-button> <el-button @click="resetForm">{{$t('重置')}}</el-button>
...@@ -153,7 +158,12 @@ export default { ...@@ -153,7 +158,12 @@ export default {
}, },
treeList:[], treeList:[],
provinceList:[], provinceList:[],
cityList:[] cityList:[],
bankStatusAttr:{
"active-value":1,
"inactive-value": 0
},
currentcyAttr: []
} }
}, },
computed: { computed: {
...@@ -192,6 +202,9 @@ export default { ...@@ -192,6 +202,9 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
delBank(){
console.log('删除银行卡')
},
onAreaChange(type, val){ onAreaChange(type, val){
this.$set(this.formData, type, val) this.$set(this.formData, type, val)
}, },
...@@ -214,7 +227,7 @@ export default { ...@@ -214,7 +227,7 @@ export default {
// 添加的提交 // 添加的提交
createSupplier(data).then(response => { createSupplier(data).then(response => {
this.$modal.msgSuccess(this.$t("新增成功")); this.$modal.msgSuccess(this.$t("新增成功"));
this.$router.back() this.$router.replace('supplier')
}); });
}); });
}, },
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<line-chart :chart-data="lineChartData" /> <line-chart :chart-data="lineChartData" />
</el-row> </el-row>
<el-row> <!-- <el-row>
<el-col :span="12"> <el-col :span="12">
<ueditor v-model="html" /> <ueditor v-model="html" />
</el-col> </el-col>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<el-row> <el-row>
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" /> <my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
</el-row> </el-row> -->
<el-row :gutter="32"> <el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="8">
......
...@@ -78,11 +78,16 @@ ...@@ -78,11 +78,16 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-if="form.type == 2"> <el-col :span="12" v-if="form.type == 2">
<el-form-item label="显示菜单" prop="isShowInMenuBar"> <el-form-item label="显示菜单" prop="isShowInMenuBar">
<dict-selector v-model="form.isShowInMenuBar" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" /> <dict-selector v-model="form.isShowInMenuBar" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="form.type == 2">
<el-form-item label="保活" prop="keepalive">
<dict-selector v-model="form.keepalive" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" />
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item v-if="form.type != '3'" label="菜单图标"> <el-form-item v-if="form.type != '3'" label="菜单图标">
<el-popover placement="bottom-start" width="460" trigger="click" @show="$refs['iconSelect'].reset()"> <el-popover placement="bottom-start" width="460" trigger="click" @show="$refs['iconSelect'].reset()">
...@@ -259,6 +264,7 @@ export default { ...@@ -259,6 +264,7 @@ export default {
isShowInMenuBar: undefined, isShowInMenuBar: undefined,
type: SystemMenuTypeEnum.DIR, type: SystemMenuTypeEnum.DIR,
sort: undefined, sort: undefined,
keepalive: false,
status: CommonStatusEnum.ENABLE status: CommonStatusEnum.ENABLE
}; };
this.resetForm("form"); this.resetForm("form");
......
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