Commit 934b8880 authored by huyf's avatar huyf

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

parents c833ee77 2270d256
......@@ -51,6 +51,14 @@ export function getCustomerContactsPage(query) {
})
}
// 获得客户联系人下拉列表
export function getCustomerContactsSelect(query) {
return request({
url: '/ecw/customer-contacts/select',
method: 'get',
params: query
})
}
// 导出客户联系人 Excel
export function exportCustomerContactsExcel(query) {
return request({
......
......@@ -69,3 +69,12 @@ export function batchUpdateProduct(data) {
data: data
})
}
// 计算单种运输方式的商品费用(单个商品也做数组传参)
export function calculationPrice(data){
return request({
url: '/product/line/price/calculation',
method: 'post',
data: data
})
}
\ No newline at end of file
<template>
<div>
<el-select v-model="formData.country">
<el-option v-for="(item) in treeList" :value="item.id" :label="item.titleZh" :key="item.id" />
</el-select>
<el-select v-model="formData.province">
<el-option v-for="(item) in provinceList" :value="item.id" :label="item.titleZh" :key="item.id" />
</el-select>
<el-select v-model="formData.city">
<el-option v-for="(item) in cityList" :value="item.id" :label="item.titleZh" :key="item.id" />
</el-select>
</div>
</template>
<script>
import { getListTree } from "@/api/ecw/region";
export default {
data(){
return {
formData:{
},
treeList: [],
provinceList: [],
cityList:[]
}
},
watch:{
'formData.city'(city){
this.$emit('cityChange', city)
},
'formData.country'(country){
this.$emit('countryChange', country)
this.treeList.forEach(item => {
if(item.id == country){
this.provinceList = item.children || []
}
})
},
'formData.province'(province){
this.$emit('provinceChange', province)
this.provinceList.forEach(item => {
if(item.id == province){
this.cityList = item.children || []
}
})
}
},
created(){
getListTree({treeType: 1}).then(response => {
this.treeList = response.data
})
}
}
</script>
\ No newline at end of file
<template>
<el-select
v-model="index"
filterable
clearable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="remoteMethod"
:loading="loading">
<el-option
v-for="(item, index) in list"
:key="item.id"
:label="`${item.contactsName}(${item.customerName})`"
:value="index">
</el-option>
</el-select>
</template>
<script>
import {getCustomerContactsSelect, getCustomerContacts} from '@/api/ecw/customerContacts'
export default {
props:{
value: [String, Number]
},
data(){
return {
index: null,
list:[],
loading: false,
size: 20
}
},
watch:{
index(val){
this.$emit('input', val !== null ? this.list[val].customerContactsId: null)
this.$emit('change', val !== null ? this.list[val]: null)
},
value(val){
this.init()
}
},
created(){
this.init()
},
methods:{
init(){
if(!this.value) return
let index = this.list.findIndex(item => item.customerContactsId == this.value)
if(index < 0){
getCustomerContacts(this.value).then(res => {
this.list.unshift(res.data)
this.index = 0
})
}
},
remoteMethod(keyword){
let params = {
size: this.size
}
params.searchKey = keyword
this.loading = true
getCustomerContactsSelect(params)
.then(res => this.list = res.data)
.finally(() => this.loading = false)
}
}
}
</script>
\ No newline at end of file
......@@ -6,12 +6,14 @@
remote
reserve-keyword
placeholder="请输入商品关键词"
:disabled="disabled"
:remote-method="remoteMethod"
:loading="loading">
<el-option
v-for="(item, index) in list"
:key="item.id"
:label="item.titleZh"
:value="index">
</el-option>
</el-select>
......@@ -22,19 +24,23 @@ import {getProduct, getProductPage} from '@/api/ecw/product'
export default {
props:{
productType: [String, Number],
value: [String, Number]
value: [String, Number],
disabled: Boolean
},
data(){
return {
index: {},
index: null,
list:[],
loading: false
}
},
watch:{
index(val){
this.$emit('input', val !== null ? this.list[val].id : null)
this.$emit('change', val !== null ? this.list[val] : null)
let productId = val !== '' && val !== null ? this.list[val].id : null
console.log('index val', val, productId)
this.$emit('input', productId)
this.$emit('change', val != '' && val !== null ? this.list[val] : null)
},
value(val){
console.log('初始化内容', val)
......
......@@ -97,6 +97,8 @@ export const DICT_TYPE = {
ECW_OFFER_TYPE: 'offer_type', // 跟进类型
ECW_OFFER_METHOD: 'offer_method', // 跟进方式
ECW_RECEIPT_STATE: 'receipt_state',//收款单状态
ECW_SUING_METHOD: 'suing_method', // 出单方式
ECW_HARVEST_METHOD: 'harvest_method', // 收货方式
//--------ecw---------
CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source',
......
<template>
<div>
<el-form ref="agentForm" :rules="rules" :model="agentObj" label-width="120px">
<el-form ref="agentForm" :model="agentObj" label-width="120px">
<el-form-item label="代理商Agent">
<el-select v-model="agentObj.agent" placeholder="请选择代理商">
</el-select>
......
<template>
<div>
<el-form ref="arrivalForm" :rules="rules" :model="arrivalObj" label-width="120px">
<el-form-item label="预计到港时间">{{arrivalObj.expectedTime}}</el-form-item>
<el-form-item label="实际到港时间">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.actualTime"></el-date-picker>
</el-form-item>
<el-form-item label="确认到港" prop="confirmTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.confirmTime">
</el-date-picker>
<p class="message-area" v-show="showMsg">请确认是否有异常,如有异常请进行异常登记</p>
</el-form-item>
<el-form-item label="卸港时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="arrivalObj.dischargeTime"></el-date-picker>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" title="票异常" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" />
</el-dialog>
</div>
</template>
<script>
import regError from "./regError";
import dayjs from "dayjs";
/**
* 到港
*/
export default {
name: "arrival",
components: {
regError,
},
data() {
return {
// 到港对象
arrivalObj: {
expectedTime: "2022-07-18",
},
// 校验
rules: {
actualTime: [{ required: true, message: "必填", trigger: "change" }],
},
// 弹窗配置
dialogVisible: false,
// 提示消息
showMsg: false,
};
},
watch: {
// 预计到港时间
"arrivalObj.expectedTime"(val) {
this.compareDate(val, this.arrivalObj.confirmTime);
},
// 确认到港时间
"arrivalObj.confirmTime"(val) {
this.compareDate(this.arrivalObj.expectedTime, val);
},
},
methods: {
// 时间比较
compareDate(expectedTime, confirmTime) {
this.showMsg = false;
let date1 = null,
date2 = null;
if (expectedTime) date1 = dayjs(expectedTime);
if (confirmTime) date2 = dayjs(confirmTime);
if (date1 && date2) {
const days = date2.date() - date1.date();
if (days > 5) {
this.showMsg = true;
}
}
},
// 异常登记
exceptionReg() {
this.dialogVisible = true;
},
/** 提交 */
onSubmit() {
this.$refs["arrivalForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
},
},
};
</script>
<style lang="scss" scoped>
.message-area {
margin: 0;
color: red;
}
</style>
......@@ -74,7 +74,7 @@
* 清关文件
*/
export default {
name: "clearanceDocument",
name: "clrDocument",
data() {
return {
// 清关文件对象
......
<template>
<div>
<el-form ref="cusClearanceForm" :rules="rules" :model="cusClearanceObj" label-width="120px">
<el-form-item label="清关代理">{{cusClearanceObj.agent}}</el-form-item>
<el-form-item label="预计清关时间" prop="expectedTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusClearanceObj.expectedTime"></el-date-picker>
</el-form-item>
<el-form-item label="清关时间" prop="confirmTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="cusClearanceObj.confirmTime"></el-date-picker>
<p class="message-area" v-show="showMsg">清关时间与预计时间不符,如有异常请登记</p>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" title="票异常" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" />
</el-dialog>
</div>
</template>
<script>
import regError from "./regError";
import dayjs from "dayjs";
/**
* 清关
*/
export default {
name: "cusClearance",
components: {
regError,
},
data() {
return {
// 清关对象
cusClearanceObj: {
agent: "test111",
},
// 校验
rules: {
expectedTime: [{ required: true, message: "必填", trigger: "change" }],
confirmTime: [{ required: true, message: "必填", trigger: "change" }],
},
// 弹窗配置
dialogVisible: false,
// 提示消息
showMsg: false,
};
},
watch: {
// 预计清关时间
"cusClearanceObj.expectedTime"(val) {
this.compareDate(val, this.cusClearanceObj.confirmTime);
},
// 清关时间
"cusClearanceObj.confirmTime"(val) {
this.compareDate(this.cusClearanceObj.expectedTime, val);
},
},
methods: {
// 时间比较
compareDate(expectedTime, confirmTime) {
this.showMsg = false;
let date1 = null,
date2 = null;
if (expectedTime) date1 = dayjs(expectedTime);
if (confirmTime) date2 = dayjs(confirmTime);
if (date1 && date2 && date2 !== date1) {
this.showMsg = true;
}
},
// 异常登记
exceptionReg() {
this.dialogVisible = true;
},
/** 提交 */
onSubmit() {
this.$refs["cusClearanceForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
},
},
};
</script>
<style lang="scss" scoped>
.message-area {
margin: 0;
color: red;
}
</style>
<template>
<div>
<el-form ref="cusClearanceForm" :rules="rules" :model="cusClearance" label-width="120px">
<el-form ref="cusDeclarationForm" :rules="rules" :model="cusDeclaration" label-width="120px">
<el-form-item label="单证要求">我司全代 <el-button type="primary" style="margin-left:10px;" @click="downloadVGM">VGM声明</el-button>
</el-form-item>
<el-form-item label="柜重" prop="cabinetWeight">
<el-input v-model="cusClearance.cabinetWeight" placeholder="请输入柜重" clearable />
<el-input v-model="cusDeclaration.cabinetWeight" placeholder="请输入柜重" clearable />
</el-form-item>
<el-form-item label="货重" prop="cargoWeight">
<el-input v-model="cusClearance.cargoWeight" placeholder="请输入货重" clearable />
<el-input v-model="cusDeclaration.cargoWeight" placeholder="请输入货重" clearable />
</el-form-item>
<el-form-item label="VGM重量(柜重+货重)">
<el-input v-model="cusClearance.vgmWeight" placeholder="请输入VGM重量" clearable />
<el-input v-model="cusDeclaration.vgmWeight" placeholder="请输入VGM重量" clearable />
</el-form-item>
<el-form-item label="报关方式" prop="method">
<el-select v-model="cusClearance.method" placeholder="请选择报关方式">
<el-select v-model="cusDeclaration.method" placeholder="请选择报关方式">
<el-option v-for="item in methods" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="正常报关订单">
</el-form-item>
<el-form-item label="报关公司名称">
<el-select v-model="cusClearance.companyName" placeholder="请选择报关公司名称">
<el-select v-model="cusDeclaration.companyName" placeholder="请选择报关公司名称">
</el-select>
</el-form-item>
<el-form-item label="截关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusClearance.cutTime"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.cutTime"></el-date-picker>
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="cusClearance.status">
<el-radio-group v-model="cusDeclaration.status">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- 查验 -->
<div v-show="cusClearance.status === '3'">
<div v-show="cusDeclaration.status === '3'">
<el-form-item label="查验">
<el-radio-group v-model="cusClearance.check">
<el-radio-group v-model="cusDeclaration.check">
<el-radio v-for="item in checkItems" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
<!-- 退场 -->
<div v-show="cusClearance.check === '1' || cusClearance.check === '2'">
<div v-show="cusDeclaration.check === '1' || cusDeclaration.check === '2'">
<el-form-item label="查验时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusClearance.checkTime"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.checkTime"></el-date-picker>
</el-form-item>
<el-form-item label="查验前图片">
<el-upload action="" :limit="1" :file-list="cusClearance.checkFile">
<el-upload action="" :limit="1" :file-list="cusDeclaration.checkFile">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
<el-form-item label="新封条">
<el-input v-model="cusClearance.newSeal" placeholder="请输入新封条" clearable />
<el-input v-model="cusDeclaration.newSeal" placeholder="请输入新封条" clearable />
</el-form-item>
</div>
<!-- 放行 -->
<el-form-item label="放行时间" v-show="cusClearance.status === '2' || cusClearance.check === '2'">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusClearance.releaseTime"></el-date-picker>
<el-form-item label="放行时间" v-show="cusDeclaration.status === '2' || cusDeclaration.check === '2'">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.releaseTime"></el-date-picker>
</el-form-item>
<el-form-item label="装箱单">
......@@ -83,7 +83,7 @@
<el-form label-width="100px">
<el-form-item label="订单号" class="two-element">
<el-input v-model="orderNo" placeholder="请输入订单号" clearable />
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
<el-button type="primary" icon="el-icon-search"></el-button>
</el-form-item>
</el-form>
</el-row>
......@@ -135,7 +135,7 @@
* 报关
*/
export default {
name: "customsClearance",
name: "cusDeclaration",
data() {
return {
// 报关方式
......@@ -184,7 +184,7 @@ export default {
},
],
// 报关对象
cusClearance: {},
cusDeclaration: {},
// 校验
rules: {
cabinetWeight: [{ required: true, message: "必填", trigger: "change" }],
......@@ -201,16 +201,16 @@ export default {
};
},
watch: {
"cusClearance.status"(val) {
"cusDeclaration.status"(val) {
if (val !== "3") {
this.$set(this.cusClearance, "check", "");
this.$set(this.cusDeclaration, "check", "");
}
},
},
methods: {
/** 提交 */
onSubmit() {
this.$refs["cusClearanceForm"].validate((valid) => {
this.$refs["cusDeclarationForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
......
......@@ -17,62 +17,31 @@
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit('departureForm')">提交</el-button>
<el-button type="success" @click="onSubmit">提交</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog departure" title="票异常" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<el-form ref="errorForm" :model="errorObj" label-width="140px">
<el-form-item label="操作步骤">
<el-select v-model="errorObj.step" placeholder="请选择操作步骤">
</el-select>
</el-form-item>
<el-form-item label="票异常">
<el-select v-model="errorObj.ticketError" placeholder="请选择票异常">
</el-select>
</el-form-item>
<el-form-item label="异常情况">
<el-input v-model="errorObj.description" type="textarea" rows="2" placeholder="请输入异常情况"></el-input>
</el-form-item>
<el-form-item label="异常时间" prop="arrivalTime" class="two-element">
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorStart"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorend"></el-date-picker>
</el-form-item>
<el-form-item label="是否更新订单状态">
<el-radio-group v-model="errorObj.updateOrder">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="中文内容">
<el-input v-model="errorObj.chContent" type="textarea" rows="2" placeholder="请输入中文内容"></el-input>
</el-form-item>
<el-form-item label="英文内容">
<el-input v-model="errorObj.enContent" type="textarea" rows="2" placeholder="请输入英文内容"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="success" @click="onSubmit('errorForm')">提交</el-button>
<el-button @click="dialogVisible = false;">关闭</el-button>
</el-row>
<el-dialog custom-class="shipping-dialog" title="票异常" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" />
</el-dialog>
</div>
</template>
<script>
import regError from "./regError";
/**
* 起运
*/
export default {
name: "departure",
components: { regError },
data() {
return {
// 起运对象
departureObj: {},
// 异常对象
errorObj: {},
// 校验
rules: {
arrivalTime: [{ required: true, message: "必填", trigger: "change" }],
......@@ -81,17 +50,6 @@ export default {
dialogVisible: false,
// 提示消息
showMsg: false,
// 是否更新订单动态
status: [
{
value: "1",
label: "",
},
{
value: "2",
label: "",
},
],
};
},
watch: {
......@@ -121,8 +79,8 @@ export default {
this.dialogVisible = true;
},
/** 提交 */
onSubmit(formName) {
this.$refs[formName].validate((valid) => {
onSubmit() {
this.$refs["departureForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
......
<template>
<div>
<el-form ref="errorForm" :model="errorObj" label-width="140px">
<el-form-item label="操作步骤">
<el-select v-model="errorObj.step" placeholder="请选择操作步骤">
</el-select>
</el-form-item>
<el-form-item label="票异常">
<el-select v-model="errorObj.ticketError" placeholder="请选择票异常">
</el-select>
</el-form-item>
<el-form-item label="异常情况">
<el-input v-model="errorObj.description" type="textarea" rows="2" placeholder="请输入异常情况"></el-input>
</el-form-item>
<el-form-item label="异常时间" prop="arrivalTime" class="two-element">
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorStart"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorend"></el-date-picker>
</el-form-item>
<el-form-item label="是否更新订单状态">
<el-radio-group v-model="errorObj.updateOrder">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="中文内容">
<el-input v-model="errorObj.chContent" type="textarea" rows="2" placeholder="请输入中文内容"></el-input>
</el-form-item>
<el-form-item label="英文内容">
<el-input v-model="errorObj.enContent" type="textarea" rows="2" placeholder="请输入英文内容"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="success" @click="onSubmit">提交</el-button>
<el-button @click="$emit('closeDialog')">关闭</el-button>
</el-row>
</div>
</template>
<script>
/**
* 异常登记
*/
export default {
name: "regError",
data() {
return {
// 异常对象
errorObj: {},
// 是否更新订单动态
status: [
{
value: "1",
label: "",
},
{
value: "2",
label: "",
},
],
};
},
watch: {},
methods: {
/** 提交 */
onSubmit() {
this.$refs["errorForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-form ref="unloadingForm" :model="unloadingObj" label-width="100px">
<el-form-item label="网点">
<el-select v-model="unloadingObj.outlets" placeholder="请选择网点">
</el-select>
</el-form-item>
<el-form-item label="到仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="unloadingObj.warehouseTime"></el-date-picker>
</el-form-item>
<el-form-item label="卸柜时间">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="unloadingObj.unloadingTime"></el-date-picker>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="danger" @click="startUnloading">开始卸柜</el-button>
</el-row>
<!-- 开始卸柜 -->
<el-dialog title="开始卸柜" :visible.sync="dialogVisible" fullscreen :modal-append-to-body=false append-to-body destroy-on-close>
<startUnloading />
</el-dialog>
</div>
</template>
<script>
import startUnloading from "./startUnloading.vue";
/**
* 卸柜
*/
export default {
name: "unloading",
components: { startUnloading },
data() {
return {
// 清关对象
unloadingObj: {
agent: "test111",
},
// 弹窗状态
dialogVisible: false,
};
},
watch: {},
methods: {
/** 提交 */
onSubmit() {
this.$refs["unloadingForm"].validate((valid) => {
if (valid) {
// TODO 判断是否已经卸柜
this.$message.warning("请先通过卸柜审批");
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
},
// 开始卸柜
startUnloading() {
this.dialogVisible = true;
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="app-startUnloading">
<!-- 自编号 -->
<el-row class="number-area">
<p class="label-font">自编号:</p>
<p class="label-font">CNG2510</p>
<el-input v-model="labelNo" placeholder="请输入标签号"></el-input>
<div>
<el-button>批量输入</el-button>
<el-button>一键卸柜</el-button>
</div>
</el-row>
<!-- 当前部分 -->
<el-row class="number-area">
<p class="label-font">当前部分:</p>
<el-select v-model="currPart" placeholder="请选择当前部分">
</el-select>
<p>
<span>13箱</span>
<span>10.83m3</span>
<span>210kg</span>
</p>
</el-row>
<!-- 表格 -->
<el-row>
<el-table v-loading="loading" :data="list">
<el-table-column label="序号" type="index" width="50" />
<!-- <el-table-column label="订单号" align="center" prop="selfNo">
<template slot-scope="scope">
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.selfNo }}</a>
</template>
</el-table-column> -->
<el-table-column label="订单号" align="center" prop="cubNo" />
<el-table-column label="商品信息" align="center" prop="cubNo" />
<el-table-column label="实装箱数" align="center" prop="cabinetId" />
<el-table-column label="卸柜箱数" align="center" prop="transportType" />
<el-table-column label="清关状态" align="center" prop="squareNumber" />
<el-table-column label="体积" align="center" prop="weight" />
<el-table-column label="重量" align="center" prop="weight" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="openError">异常</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<!-- 总计 -->
<el-row>
<div>
<p>
<span>总计:</span>
<span>33箱子</span>
<span>10.83m3</span>
<span>210kg</span>
</p>
</div>
<div>
<p>
<span>已卸:</span>
<span>16</span>
</p>
</div>
</el-row>
<el-row>
<el-button type="success">卸柜完成</el-button>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" title="异常" :visible.sync="dialogVisible" width="500px" :modal-append-to-body=false append-to-body destroy-on-close>
<unloadingError @closeDialog="dialogVisible = false" />
</el-dialog>
</div>
</template>
<script>
import unloadingError from "./unloadingError.vue";
/**
* 开始卸柜
*/
export default {
name: "startUnloading",
components: { unloadingError },
data() {
return {
// 标签号
labelNo: "",
// 当前部分
currPart: "",
// loading
loading: false,
// 表格数据
list: [{}],
// 弹窗配置
dialogVisible: false,
};
},
watch: {},
methods: {
/** 提交 */
onSubmit() {
this.$refs["unloadingForm"].validate((valid) => {
if (valid) {
// TODO 判断是否已经卸柜
this.$message.warning("请先通过卸柜审批");
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
},
// 打开异常
openError() {
this.dialogVisible = true;
},
},
};
</script>
<style lang="scss" scoped>
.app-startUnloading {
p {
margin: 0;
> span {
margin-right: 5px;
}
}
.el-row {
margin-bottom: 15px;
}
.label-font {
font-size: 16px;
font-weight: bolder;
}
.number-area {
display: flex;
align-items: center;
> * {
margin-right: 10px;
}
> .el-input {
width: 200px;
}
}
}
</style>
<template>
<div>
<el-form ref="errorForm" :model="errorObj" label-width="100px">
<el-form-item label="异常">
<el-radio-group v-model="errorObj.errorStatus">
</el-radio-group>
</el-form-item>
<el-form-item label="品名">
<el-select v-model="errorObj.goodName" placeholder="请选择品名">
</el-select>
</el-form-item>
<el-form-item label="件数">
<el-input-number v-model="errorObj.pieces" controls-position="right" :min="1"></el-input-number>
</el-form-item>
<el-form-item label="异常详情">
<el-input v-model="errorObj.details" type="textarea" rows="2" placeholder="请输入异常详情"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="success" @click="onSubmit">提交</el-button>
<el-button @click="$emit('closeDialog')">关闭</el-button>
</el-row>
</div>
</template>
<script>
/**
* 卸柜异常
*/
export default {
name: "unloadingError",
data() {
return {
// 异常对象
errorObj: {},
};
},
methods: {
/** 提交 */
onSubmit() {
this.$refs["errorForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
},
};
</script>
<style lang="scss" scoped>
</style>
......@@ -3,18 +3,18 @@
<!-- 海运流程图 -->
<el-scrollbar :vertical="true" style="width: 100%;" viewClass="shipping-chart">
<div v-for="(nodes,index) in chartData['sea']" :key="index" class="chart-nodes">
<div>
<div class="node-area">
<div v-for="node in nodes" :key="node.title" @click="nodeClick(node)" class="node-div">
<template v-if="!node.unNode">
<img :src="node.imgSrc" alt="">
<p>{{node.title}}</p>
</template>
<template v-else-if="node.unNode">
<el-button type="primary" @click="nodeClick(node)">{{node.title}}</el-button>
<el-button type="primary" @click="nodeClick(node)" style="width:100px;">{{node.title}}</el-button>
</template>
</div>
</div>
<div class="chart-arrow" v-if="index !== (chartData['sea'].length-1)">
<div class="arrow-area" v-if="index !== (chartData['sea'].length-1)">
<img src="@/assets/images/shipping/jt-start.png" alt="">
</div>
</div>
......@@ -22,47 +22,27 @@
<!-- 弹窗 -->
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :width="dialogConfig.width" :fullscreen="dialogConfig.fullscreen" :close-on-click-modal=false :modal-append-to-body=false append-to-body destroy-on-close>
<!-- 订舱 -->
<bookingWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'booking'" />
<!-- 拖车 -->
<trailerWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'trailer'" />
<!-- 预装 -->
<preinstallWidget v-if="dialogConfig.type === 'preinstall'" />
<!-- agent -->
<agentWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'agent'" />
<!-- 装柜 -->
<cabinetWidget :boxId="boxId" @closeDialog="closeDialog" v-if="dialogConfig.type === 'cabinet'" />
<!-- 报关 -->
<customsClearanceWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'customsDeclaration'" />
<!-- 配船 -->
<shipWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'ship'" />
<!-- 提单材料 -->
<subMaterialWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'subMaterial'" />
<!-- 驳船 -->
<bargeWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'barge'" />
<!-- 起运 -->
<departureWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'departure'" />
<!-- 提单copy -->
<blCopyWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'blCopy'" />
<!-- 清关文件 -->
<clearanceDocumentWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'clearanceDocument'" />
<component v-bind:is="currentComponent" @closeDialog="closeDialog"></component>
</el-dialog>
</div>
</template>
<script>
import bookingWidget from "./nodePage/booking";
import trailerWidget from "./nodePage/trailer";
import preinstallWidget from "./nodePage/preinstall";
import agentWidget from "./nodePage/agent";
import cabinetWidget from "./nodePage/cabinet";
import customsClearanceWidget from "./nodePage/customsClearance";
import shipWidget from "./nodePage/ship";
import subMaterialWidget from "./nodePage/subMaterial";
import bargeWidget from "./nodePage/barge";
import departureWidget from "./nodePage/departure";
import blCopyWidget from "./nodePage/blCopy";
import clearanceDocumentWidget from "./nodePage/clearanceDocument";
import bookingWidget from "./nodePage/booking.vue";
import trailerWidget from "./nodePage/trailer.vue";
import preinstallWidget from "./nodePage/preinstall.vue";
import agentWidget from "./nodePage/agent.vue";
import cabinetWidget from "./nodePage/cabinet/index.vue";
import cusDeclarationWidget from "./nodePage/cusDeclaration.vue";
import shipWidget from "./nodePage/ship.vue";
import subMaterialWidget from "./nodePage/subMaterial.vue";
import bargeWidget from "./nodePage/barge.vue";
import departureWidget from "./nodePage/departure.vue";
import blCopyWidget from "./nodePage/blCopy.vue";
import clrDocumentWidget from "./nodePage/clrDocument.vue";
import arrivalWidget from "./nodePage/arrival.vue";
import cusClearanceWidget from "./nodePage/cusClearance.vue";
import unloadingWidget from "./nodePage/unloading/index.vue";
/**
* 海运流程图
......@@ -75,13 +55,16 @@ export default {
preinstallWidget,
agentWidget,
cabinetWidget,
customsClearanceWidget,
cusDeclarationWidget,
shipWidget,
subMaterialWidget,
bargeWidget,
departureWidget,
blCopyWidget,
clearanceDocumentWidget,
clrDocumentWidget,
arrivalWidget,
cusClearanceWidget,
unloadingWidget,
},
props: {
shippingType: String,
......@@ -93,9 +76,8 @@ export default {
dialogConfig: {
dialogVisible: false,
title: "",
width: "30%",
width: "",
fullscreen: false,
type: "", // 标识
},
// 流程图节点
chartData: {
......@@ -135,7 +117,7 @@ export default {
{
title: "报关",
imgSrc: require("@/assets/images/shipping/bg-start.png"),
type: "customsDeclaration",
type: "cusDeclaration",
},
{
title: "配船",
......@@ -175,7 +157,7 @@ export default {
},
{
unNode: true,
type: "clearanceDocument",
type: "clrDocument",
title: "清关文件",
},
],
......@@ -190,7 +172,7 @@ export default {
{
title: "清关",
imgSrc: require("@/assets/images/shipping/qg-start.png"),
type: "customsClearance",
type: "cusClearance",
},
],
[
......@@ -209,6 +191,8 @@ export default {
],
],
},
// 当前组件
currentComponent: "",
};
},
methods: {
......@@ -218,32 +202,23 @@ export default {
},
/** 节点点击 */
nodeClick(node) {
this.currentComponent = `${node.type}Widget`;
this.$set(this.dialogConfig, "width", "500px");
this.$set(this.dialogConfig, "title", node.title);
this.$set(this.dialogConfig, "fullscreen", false);
switch (node.type) {
// 订舱
case "booking":
// 驳船
case "barge":
// 清关文件
case "clearanceDocumentWidget":
case "clrDocument":
this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "fullscreen", false);
break;
// AGENT
case "agent":
this.$set(this.dialogConfig, "title", "代理商设置");
break;
// 拖车
case "trailer":
// 装柜
case "cabinet":
// 报关
case "customsDeclaration":
// 起运
case "departure":
this.$set(this.dialogConfig, "width", "500px");
this.$set(this.dialogConfig, "fullscreen", false);
break;
// 预装
case "preinstall":
this.$set(this.dialogConfig, "fullscreen", true);
......@@ -251,7 +226,6 @@ export default {
break;
}
this.$set(this.dialogConfig, "dialogVisible", true);
this.$set(this.dialogConfig, "type", node.type);
},
},
};
......@@ -267,18 +241,24 @@ export default {
display: flex;
align-items: center;
justify-content: center;
.node-div {
margin-top: 10px;
cursor: pointer;
p {
margin-top: -10px;
margin-bottom: 0px;
text-align: center;
.node-area {
display: flex;
flex-direction: column;
align-items: center;
.node-div {
margin-top: 10px;
cursor: pointer;
p {
margin-top: -10px;
margin-bottom: 0px;
text-align: center;
}
}
}
}
.chart-arrow {
margin: 0 10px;
.arrow-area {
margin: 0 10px;
}
}
}
</style>
......@@ -7,57 +7,55 @@
<el-descriptions :column="3" border>
<el-descriptions-item label="*发货人" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorId" required error="发货人不能为空">
<customer-selector v-model="form.consignorId" @change="consignor = $event" />
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorContactsId" required error="发货人不能为空">
<customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="发货人">
{{consignor.name || ''}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{consignor.defaultContactPhone || ''}}
<el-descriptions-item label="电话">
{{consignorContact.phoneNew || ''}}
</el-descriptions-item>
<el-descriptions-item label="发货人公司">
{{consignor.company || ''}}
</el-descriptions-item>
<el-descriptions-item label="客户来源">
{{consignor.source || ''}}
</el-descriptions-item>
<el-descriptions-item label="社交软件">
暂缺字段数据
{{consignorContact.customerName || ''}}
</el-descriptions-item>
<el-descriptions-item label="联系地址">
{{consignor.address || ''}}
<el-descriptions-item label="Email">
{{consignorContact.email || ''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" border>
<el-descriptions-item label="*收货人">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeId" required error="收货人不能为空">
<customer-selector v-model="form.consigneeId" @change="consignee = $event" />
<el-descriptions-item label="*发货人" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeContactsId" required error="发货人不能为空">
<customer-contact-selector v-model="form.consigneeContactsId" @change="consigneeContact = $event" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="收货人">
{{consignee.name || ''}}
<el-descriptions-item label="电话">
{{consigneeContact.phoneNew || ''}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{consignee.defaultContactPhone || ''}}
</el-descriptions-item>
<el-descriptions-item label="收货人公司">
{{consignee.company || ''}}
<el-descriptions-item label="发货人公司">
{{consigneeContact.customerName || ''}}
</el-descriptions-item>
<el-descriptions-item label="客户来源">
{{consignee.source || ''}}
<el-descriptions-item label="Email">
{{consigneeContact.email || ''}}
</el-descriptions-item>
<el-descriptions-item label="社交软件">
暂缺字段数据
</el-descriptions>
<el-descriptions :column="3" border>
<el-descriptions-item label="*运输方式">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="transportId" required error="请选择运输方式">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="联系地址">
{{consignee.address || ''}}
<el-descriptions-item label="出货渠道">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="channelId" :required="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" error="请选择出货渠道">
<selector
:disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-model="form.channelId"
:options="channelList"
value-field="channelId"
label-field="nameZh"
></selector>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" border>
<el-descriptions :column="2" border>
<el-descriptions-item label="*始发城市">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="departureId" required error="始发地必选">
<el-select v-model="form.departureId" placeholder="请选择始发地">
......@@ -72,12 +70,27 @@
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="*请选择线路" :span="2">
<el-row :gutter="10">
<el-col :span="12">
<el-input :value="getRouterNameById(form.lineId)" readonly placeholder="请在右侧选择线路"></el-input>
</el-col>
<el-col :span="12">
<select size="5" v-model="form.lineId" style="min-width: 300px">
<template v-for="item in routerList">
<option :value="item.id" :key="item.id">{{item.startTitleZh}} >> {{item.destTitleZh}}</option>
</template>
</select>
</el-col>
</el-row>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="mt-10">
<div slot="header" class="card-title">
<div class="card-name">商品信息</div>
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addProduct"></el-button>
<el-button type="primary" size="mini" @click="addProduct(null)">添加货物</el-button>
<el-button type="primary" size="mini">批量添加货物</el-button>
</div>
<el-table :data="productList" border>
<el-table-column label="序号" width="60px" fixed>
......@@ -85,109 +98,90 @@
{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column label="中文名" width="160px">
<el-table-column label="中文名" width="160px">
<template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="row.goodsType = $event.typeId" />
<product-selector v-model="row.prodId" @change="row.goodsType = $event ? $event.typeId : null" :disabled="!form.lineId" />
</template>
</el-table-column>
<el-table-column label="英文名" width="160px">
<el-table-column label="英文名" width="160px">
<template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="row.goodsType = $event.typeId" />
<product-selector v-model="row.prodId" @change="row.goodsType =$event ? $event.typeId : null" :disabled="!form.lineId" />
</template>
</el-table-column>
<el-table-column label="商品类型" width="160px">
<!-- <el-table-column label="商品类型" width="160px">
<template slot-scope="{row}">
<selector disabled v-model="row.goodsType" :options="productAttrList" label-field="attrName" value-field="id"></selector>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="品牌" width="100px">
<template slot-scope="{row}">
<dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" formatter="bool" defaultable @input="getProductFee(row)" />
<dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" formatter="bool" defaultable @input="calculationPrice(row)" :disabled="!form.lineId" />
</template>
</el-table-column>
<el-table-column label="件数" width="90px">
<template slot-scope="{row}">
<el-input v-model.number="row.num" />
<el-input v-model.number="row.num" :disabled="!form.lineId" />
</template>
</el-table-column>
<el-table-column label="包装单位">
<template slot-scope="{row}">
<dict-selector v-model="row.unit" :type="DICT_TYPE.ECW_PACKAGE_TYPE" defaultable />
<dict-selector v-model="row.unit" :type="DICT_TYPE.ECW_PACKAGE_TYPE" defaultable :disabled="!form.lineId" />
</template>
</el-table-column>
<el-table-column label="箱规(m)" width="120px">
<el-table-column label="数量">
<template slot-scope="{row}">
<el-input v-model="row.boxGauge" @input="calcVolume(row)" />
<el-input v-model="row.quantity" type="number" :disabled="!form.lineId" />
</template>
</el-table-column>
<el-table-column label="总体积(m³)" width="100px">
<!-- <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="体积(m³)" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.volume" />
<el-input v-model="row.volume" :disabled="!form.lineId" />
</template>
</el-table-column>
<el-table-column label="重量(kg)" width="100px">
<el-table-column label="重量(kg)" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.weight" />
<el-input v-model="row.weight" :disabled="!form.lineId" />
</template>
</el-table-column>
<el-table-column label="货值(RMB)" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.worth" />
<el-input v-model="row.worth" :disabled="!form.lineId" />
</template>
</el-table-column>
<el-table-column label="商品特性" width="250px">
<template slot-scope="{row}">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event)">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event); calculationPrice(row)" :disabled="!form.lineId">
<el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{item.attrName}}</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column label="运输方式" width="150px">
<template slot-scope="{row}">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="row.transportId"
@input="onTransportChange(row,$event)" formatter="number" />
</template>
</el-table-column>
<el-table-column label="出货渠道" width="150px">
<template slot-scope="{row}">
<selector
:disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, row.transportId).cssClass != 'channel'"
v-model="row.channelId"
:options="channelList"
value-field="channelId"
label-field="nameZh"
@input="onChannelChange(row)"
></selector>
</template>
</el-table-column>
<el-table-column label="线路" width="200px">
<template slot-scope="{row}">
<selector
v-model="row.lineId"
:options="routerList"
@input="onLineChange(row)"
clearable
:label-field="(item, index) => item.startTitleZh + ' >> ' + item.destTitleZh" value-field="id"></selector>
</template>
</el-table-column>
<el-table-column label="运费" width="200px">
<template slot-scope="{row}">
<template v-if="row.fee">
<div>
运费:{{row.fee.seaFreight}} {{currentMap[row.fee.seaFreightCurrency]}} / {{unitMap[row.fee.seaFreightVolume]}}
运费:{{row.fee.seaFreight}} {{currentcyMap[row.fee.seaFreightCurrency]}} / {{unitMap[row.fee.seaFreightVolume]}}
</div>
<div>
清关费:{{row.fee.clearanceFreight}} {{currentMap[row.fee.clearanceFreightCurrency]}} / {{unitMap[row.fee.clearanceFreightVolume]}}
清关费:{{row.fee.clearanceFreight}} {{currentcyMap[row.fee.clearanceFreightCurrency]}} / {{unitMap[row.fee.clearanceFreightVolume]}}
</div>
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="180px" fixed="right">
<el-table-column label="是否预付" width="200px">
<template slot-scope="{row}">
{{row.yufu || '未知'}}
</template>
</el-table-column>
<el-table-column label="操作" width="80px" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="delProduct(scope.$index)">删除</el-button>
<!-- <el-button size="mini" type="primary" @click="showMorePrice($index)">更多报价</el-button> -->
<!-- <el-button size="mini" type="primary" @click="getProductFee(scope.row)">计算</el-button> -->
</template>
</el-table-column>
</el-table>
......@@ -199,80 +193,21 @@
<el-descriptions-item label="总件数">
{{sum.totalNum || 0}}
</el-descriptions-item>
<!-- <el-descriptions-item label="总体积">
<el-descriptions-item label="总体积">
{{sum.totalVolume || 0}}m³
</el-descriptions-item>
<el-descriptions-item label="总重量">
{{sum.totalWeight || 0}}kg
</el-descriptions-item> -->
<el-descriptions-item label="总货值">
{{sum.totalWorth || 0}}人民币
</el-descriptions-item>
<el-descriptions-item label="保价费">
{{fee.insuranceFee || 0}}人民币
</el-descriptions-item>
<!-- <el-descriptions-item label="总运费">
<div>{{fee.seaNGN || 0}}泰拉</div>
<div>{{fee.seaRMB || 0}}人民币</div>
<div>{{fee.seaUSD || 0}}美元</div>
<el-descriptions-item label="数量">
{{sum.totalWorth || 0}}
</el-descriptions-item>
<el-descriptions-item label="总清关费">
<div>{{fee.clearanceNGN || 0}}泰拉</div>
<div>{{fee.clearanceRMB || 0}}人民币</div>
<div>{{fee.clearanceUSD || 0}}美元</div>
<el-descriptions-item label="总货值(RMB)">
{{sum.totalWorth || 0}}元
</el-descriptions-item>
<el-descriptions-item label="预计费用">
<div>{{fee.seaNGN + fee.clearanceNGN}}泰拉</div>
<div>{{fee.seaRMB + fee.clearanceRMB + fee.insuranceFee }}人民币</div>
<div>{{fee.seaUSD + fee.clearanceUSD}}美元</div>
</el-descriptions-item> -->
</el-descriptions>
</el-card>
<template v-for="(item, index) in transportList" >
<el-card class="mt-10" :key="index" v-if="item._enabled" :data-enabled="item._enabled">
<div class="card-title" slot="header">{{item.label}}</div>
<el-form-item v-for="(router, routerIndex) in item.routers" :key="routerIndex" :label="item.label.substr(0, 2) + '线路' + (routerIndex + 1)">
<el-col :span="12">
{{getRouterNameById(router.lineId)}}
</el-col>
<el-col :span="12" v-if="router.channelId">
出货渠道{{routerIndex + 1}}: {{getChannelNameById(router.channelId)}}
</el-col>
</el-form-item>
<el-form-item label="是否双清" v-if="[2,3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" />
</el-form-item>
<el-form-item label="航空公司" v-if="[3,4].indexOf(+item.transportId) > -1">
<el-select placeholder="" v-model="item.airlineCompany">
</el-select>
</el-form-item>
<el-form-item label="船公司" v-if="[2].indexOf(+item.transportId) > -1">
<el-select placeholder="" v-model="item.airlineCompany">
</el-select>
</el-form-item>
<el-form-item label="清关证书" v-if="[2,3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item>
<el-form-item label="清关证书备注" v-if="[2,3,4].indexOf(+item.transportId) > -1">
<el-input v-model="item.remarks" ></el-input>
</el-form-item>
<el-form-item label="是否拆包" v-if="[3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item>
<el-form-item label="单票立刻转运" v-if="[3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
<span style="margin-left:10px">注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”</span>
</el-form-item>
<el-form-item label="包装类型" v-if="[3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.packageType" form-type="checkbox" :type="DICT_TYPE.ECW_PACKAGE_TYPE" multiple />
</el-form-item>
<el-form-item label="包装要求备注" v-if="[3,4].indexOf(+item.transportId) > -1">
<el-input v-model="item.packageRemarks" ></el-input>
</el-form-item>
</el-card>
</template>
<el-card class="mt-10">
<div class="card-title" slot="header">通用</div>
......@@ -280,52 +215,57 @@
<el-descriptions-item label="唛头">
<el-input v-model="form.marks" placeholder=""></el-input>
</el-descriptions-item>
<el-descriptions-item label="报关方式">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" />
</el-descriptions-item>
<el-descriptions-item label="预计结束时间">
<el-date-picker v-model="form.stopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-descriptions-item>
<el-descriptions-item label="是否控货">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.control" form-type="radio" />
</el-descriptions-item>
<el-descriptions-item label="竞争对手">
<el-input v-model="form.competitor" placeholder=""></el-input>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-descriptions-item label="是否代收货款">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCollection" form-type="radio" />
</el-descriptions-item>
<el-descriptions-item label="重要程度">
<el-rate v-model="form.importance"></el-rate>
<el-descriptions-item label="代收货款金额">
<el-input v-model="form.collectionProxy" placeholder="" style="width:200px"></el-input>
<selector v-model="form.collectionProxyCurrency" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-descriptions-item>
<el-descriptions-item label="价格有效时间">
<el-date-picker v-model="form.startTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
-
<el-date-picker v-model="form.endTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-descriptions-item label="单证报关" :span="2">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" />
</el-descriptions-item>
<el-descriptions-item label="交货方式">
<!--
接口要求数据为整数,所以增加trade_type类型的字典,用1234代码以下不同类型
FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)
-->
<dict-selector :type="DICT_TYPE.ECW_TRADE_TYPE" fomtter="number" v-model="form.tradeType" />
<el-input v-model="form.tradeAdress" placeholder=""></el-input>
<el-descriptions-item label="出单方式">
<dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" />
</el-descriptions-item>
<!-- <el-descriptions-item label="总运费" :span="2">
<el-descriptions-item label="送货日期">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="deliveryDate" required error="送货日期不能为空">
<el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="总清关费" :span="2">
<el-descriptions-item label="入仓类型">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="form.warehouseType" />
</el-descriptions-item>
<el-descriptions-item label="收货方式">
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.harvestMethod" />
</el-descriptions-item>
<el-descriptions-item label="收货地区" :span="2">
<area-selector
@countryChange="onAreaChange('country', $event)"
@provinceChange="onAreaChange('province', $event)"
@cityChange="onAreaChange('city', $event)"
></area-selector>
</el-descriptions-item>
<el-descriptions-item label="收货详细地址" :span="2">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeAddress" required error="收货详细地址不能为空">
<el-input v-model="form.consigneeAddress" placeholder=""></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="总价格" :span="2">
</el-descriptions-item> -->
<!-- <el-descriptions-item label="佣金类型" :span="2">
<dict-selector :type="DICT_TYPE.COMMISSION_TYPE" form-type="radio" fomtter="number" v-model="form.commissionType" defaultable />
</el-descriptions-item> -->
<el-descriptions-item label="付款人" :span="2">
<dict-selector :type="DICT_TYPE.DRAWEE" v-model="form.drawee" form-type="radio" />
<dict-selector :type="DICT_TYPE.DRAWEE" v-model="form.drawee" defaultable form-type="radio" />
</el-descriptions-item>
<el-descriptions-item v-if="form.drawee==3" label="费用类型" :span="2">
<template v-for="(item,index) in customDraweeVOList" v-key="index">
<el-form-item :label="item.name" >
<el-form-item :label="item.name" :key="index" >
<dict-selector :type="DICT_TYPE.DRAWEE" :filter="(e) => e.value == '1' || e.value == '2'" v-model="item.value" form-type="radio" />
</el-form-item>
</template>
......@@ -333,6 +273,48 @@
</el-descriptions>
</el-card>
<el-card class="mt-10" v-if="transport">
<div class="card-title" slot="header">{{transport.label}}</div>
<el-form-item label="快递单号">
<el-input v-model="form.number" placeholder="请输入购买商品的快递单号"></el-input>
</el-form-item>
<el-form-item label="是否双清" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" />
</el-form-item>
<el-form-item label="航空公司" v-if="[3,4].indexOf(+form.transportId) > -1">
<!--待查询备选数据-->
<el-select placeholder="" v-model="form.airlineCompany">
</el-select>
</el-form-item>
<el-form-item label="船公司" v-if="[2].indexOf(+form.transportId) > -1">
<el-select placeholder="" v-model="form.shippingCompany">
</el-select>
</el-form-item>
<el-form-item label="清关证书" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item>
<el-form-item label="清关证书备注" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<el-input v-model="form.remarks" ></el-input>
</el-form-item>
<el-form-item label="是否拆包" v-if="[3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item>
<el-form-item label="单票立刻转运" v-if="[3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
<span style="margin-left:10px">注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”</span>
</el-form-item>
<el-form-item label="特殊要求" >
<dict-selector v-model="form.packageType" form-type="checkbox" :type="DICT_TYPE.ECW_PACKAGE_TYPE" multiple />
</el-form-item>
<el-form-item label="特殊要求备注">
<el-input v-model="form.packageRemarks" ></el-input>
</el-form-item>
</el-card>
<el-form-item label="">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="$router.back()">取 消</el-button>
......@@ -342,12 +324,12 @@
</template>
<script>
import { createOrder, updateOrder, getOrder, getProductFeeList, getProductFee } from "@/api/ecw/order";
import { createOrder, updateOrder, getOrder, getProductFeeList } from "@/api/ecw/order";
import ProductSelector from '@/components/ProductSelector'
import {getProductAttrList} from '@/api/ecw/productAttr'
import {getChannelList} from '@/api/ecw/channel'
import Selector from '@/components/Selector'
import CustomerSelector from '@/components/CustomerSelector'
import CustomerContactSelector from '@/components/CustomerContactSelector'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getTradeCityList} from '@/api/ecw/region'
import {getDictData} from '@/utils/dict'
......@@ -355,10 +337,14 @@ import Fee from '@/components/Fee'
import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit'
import { getDictDatas } from '@/utils/dict';
import { getCustomer } from '@/api/ecw/customer';
import { getListTree } from "@/api/ecw/region";
import AreaSelector from '@/components/AreaSelector'
import {calculationPrice} from '@/api/ecw/product'
export default {
name: "OrderEdit",
components: {
ProductSelector, Selector, CustomerSelector, Fee
ProductSelector, Selector, CustomerContactSelector, Fee, AreaSelector
},
data() {
return {
......@@ -371,18 +357,16 @@ export default {
draweeList: [],
// 遮罩层
loading: true,
// 是否显示弹出层
/* dateRangeStopTime: [],
dateRangeStartTime: [],
dateRangeEndTime: [],
dateRangeCreateTime: [], */
productList:[], // 商品信息
productAttrList:[], // 商品属性
channelList: [], // 出货取到
routerList: [],
tradeCityList: [],
consignor: {}, // 发货人
consignee:{}, // 收货人
treeList: [],
consignorContact: {}, // 发货联系人
consigneeContact:{}, // 收货联系人
consignee: null,
consignor: null,
transportList: [],
currencyList:[],
unitList:[],
......@@ -393,10 +377,7 @@ export default {
},
// 表单校验
rules: {
/* number: [{ required: true, message: "报价单号不能为空", trigger: "blur" }],
consignorId: [{ required: true, message: "客户id,发货人不能为空", trigger: "blur" }],
consigneeId: [{ required: true, message: "收货人id不能为空", trigger: "blur" }],
sendstatus: [{ required: true, message: "站内信状态,0未发送,1已发送不能为空", trigger: "blur" }], */
}
};
},
......@@ -410,35 +391,7 @@ export default {
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
// 被启用的货运方式
/* enbedTransports(){
let transports = []
this.transportList.forEach(item => {
let disabled = true
let lineIds = []
let channelIds = []
let routers = []
this.productList.forEach(prod => {
if(prod.offerTransportId == item.transportId){
disabled = false
routers.push({
lineId: prod.lineId,
channelId: prod.channelId
})
if(prod.lineId)lineIds.push(prod.lineId)
if(prod.channelId)channelIds.push(prod.channelId)
}
})
if(!disabled){
item._disabled = disabled
item.routers = routers
item.lineIds = lineIds.join(',')
item.channelIds = channelIds.join(',')
transports.push(item)
}
})
return transports
}, */
// 根据线路id显示线路名称
getRouterNameById(){
return routerId => {
......@@ -456,7 +409,11 @@ export default {
return this.channelList.find(item => item.channelId == channelId) ?. nameZh
}
},
currentMap(){
// 当前运输方式
transport(){
return this.transportList.find(item => item.value == this.form.transportId)
},
currentcyMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = item.titleZh
......@@ -496,19 +453,29 @@ export default {
'form.objectiveId'(){
this.getOpenedRouterList()
},
// 发货联系人发生变化获取发货客户
consignorContact(){
this.getConsignor()
},
// 收货联系人发生变化获取收货客户
consigneeContact(){
this.getConsignee()
}
},
created() {
getProductAttrList().then(res => this.productAttrList = res.data)
getChannelList().then(res => this.channelList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data)
this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE).forEach(res => {
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
/* .forEach(res => {
this.transportList.push({
transportId: +res.value, // 转为整形
label: res.label,
})
})
}) */
if(this.$route.query.id){
getOffer(this.$route.query.id).then(res => {
......@@ -545,8 +512,29 @@ export default {
}else this.addProduct()
},
methods: {
onTransportChange(row, val){
this.getProductFee(row)
onAreaChange(type, val){
this.$set(this.form, type, val)
},
// 获取发货人
getConsignor(){
if(!this.consignorContact){
this.consignor = null
}
getCustomer(this.consignorContact.customerId).then(res => {
this.consignor = res.data
})
},
// 获取收货人
getConsignee(){
if(!this.consigneeContact){
this.consignee = null
}
getCustomer(this.consigneeContact.customerId).then(res => {
this.consignee = res.data
})
},
/* onTransportChange(row, val){
this.this.calculationPrice(row)
if(this.getDictData(this.DICT_TYPE.ECW_TRANSPORT_TYPE, val).cssClass != 'channel') row.channelId = null
this.updateEnabledTransports()
},
......@@ -556,15 +544,15 @@ export default {
},
onChannelChange(row){
this.getProductFee(row)
},
}, */
onProductAttrChange(row, attr){
console.log(attr)
this.getProductFee(row)
this.calculationPrice(row)
/* // 需要强制刷新,否则勾选框不更新
this.$forceUpdate() */
},
// 更新运输方式
updateEnabledTransports(){
/* updateEnabledTransports(){
let enabled = {}
this.productList.forEach(prod => {
......@@ -599,17 +587,23 @@ export default {
Object.assign(transport, enabled[transport.transportId])
}
})
},
}, */
addProduct(data){
this.productList.push(data || {prodAttrArr:[]})
},
// 计算商品运费
getProductFee(row){
if(!row.prodId || !row.transportId || !row.lineId || !row.num || !row.weight)return false
calculationPrice(row){
console.log('calculationPrice', row)
if(!row.prodId || !this.form.transportId || !this.form.lineId)return false
if(row.prodAttrArr){
row.prodAttrIds = row.prodAttrArr.join(',')
}
getProductFeeList(row).then(res => {
calculationPrice({
lineId: this.form.lineId,
transportId: this.form.transportId,
channelId: this.form.channelId,
prodConditionParamList: [row]
}).then(res => {
this.$set(row, 'fee', res.data[0] || {})
})
},
......@@ -653,6 +647,7 @@ export default {
this.productList.map(item => {
item.prodAttrIds = item.prodAttrArr.join(',')
item.brandType = item.brand ? 1 : 0
})
this.transportList.map(item => {
if(item._enabled){
......@@ -664,7 +659,7 @@ export default {
if (this.form.orderNo != null) {
let data = Object.assign({}, this.form, {
customDraweeVOList: this.customDraweeVOList,
transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.productList
})
updateOrder(data).then(response => {
......@@ -673,9 +668,13 @@ export default {
});
return;
}
let data = Object.assign({}, this.form, {
let data = Object.assign({
consigneeId: this.consignee.id,
consignorId: this.consignor.id,
customerId: this.consignor.id
}, this.form, {
customDraweeVOList: this.customDraweeVOList,
transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.productList
})
// 添加的提交
......
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