Commit c0153bfa authored by 我在何方's avatar 我在何方
parents fb29057f 02e91d10
<template> <template>
<el-dialog title="选择联系人" visible :before-close="closeDialog" :close-on-click-modal="false"> <el-dialog title="选择联系人" visible :before-close="closeDialog" :close-on-click-modal="false">
<div class="header mb-10"> <div class="header mb-10 flex-center">
<div class="flex-center">关键字:</div> <div class="flex-center">关键字:</div>
<el-input v-model="form.searchKey" placeholder="" class="w-200"></el-input> <el-input v-model="form.searchKey" placeholder="" class="w-200"></el-input>
<el-button type="primary" class="ml-10" @click="handleQuery">搜索</el-button> <el-button type="primary" class="ml-10" @click="handleQuery">搜索</el-button>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
:value="index"> :value="index">
</el-option> </el-option>
</el-select> </el-select>
<el-button v-if="quickable" type="text" @click="showQuickCreate=true" class="ml-10">{{$t('快速新建')}}</el-button> <!-- <el-button v-if="quickable" type="text" @click="showQuickCreate=true" class="ml-10">{{$t('快速新建')}}</el-button> -->
<!-- <quick-create v-if="showQuickCreate" @success="onQuickCreateSuccess" @close="showQuickCreate=false" :default="{type}"></quick-create> --> <!-- <quick-create v-if="showQuickCreate" @success="onQuickCreateSuccess" @close="showQuickCreate=false" :default="{type}"></quick-create> -->
</div> </div>
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
type: [String, Number], // 客户类别,新建时指定默认类别,也可以根据需要筛选联系人所属的客户类别 type: String, // 客户类别,新建时指定默认类别,也可以根据需要筛选联系人所属的客户类别
}, },
data(){ data(){
return { return {
...@@ -78,19 +78,10 @@ export default { ...@@ -78,19 +78,10 @@ export default {
const QuickCreateComp = Vue.extend(QuickCreateCustomer) const QuickCreateComp = Vue.extend(QuickCreateCustomer)
const dialog = new QuickCreateComp({ const dialog = new QuickCreateComp({
propsData:{ propsData:{
default: {type: this.type} type: this.type
}, },
}) })
/* dialog.$on = () => {
return {
success: this.onQuickCreateSuccess,
close: () => {
console.log('关闭拉')
this.showQuickCreate = false
}
}
} */
dialog.$on('close', () => { dialog.$on('close', () => {
console.log('关闭拉') console.log('关闭拉')
this.showQuickCreate = false this.showQuickCreate = false
...@@ -104,17 +95,8 @@ export default { ...@@ -104,17 +95,8 @@ export default {
dialog.$mount() dialog.$mount()
console.log({
dialog,
parent: this
})
window.dialogComp = dialog window.dialogComp = dialog
document.body.append(dialog.$el) document.body.append(dialog.$el)
/* dialog.remove = () => {
console.log('关闭拉11')
document.body.removeChild(dialog.$el)
} */
} }
}, },
created(){ created(){
...@@ -145,9 +127,11 @@ export default { ...@@ -145,9 +127,11 @@ export default {
.then(res => this.list = res.data) .then(res => this.list = res.data)
.finally(() => this.loading = false) .finally(() => this.loading = false)
}, },
onQuickCreateSuccess(id){ onQuickCreateSuccess(data){
this.showQuickCreate = false this.showQuickCreate = false
getCustomerContactsListByCustomer({customerId: id}).then(res => { this.list.unshift(data)
this.index = 0
/* getCustomerContactsListByCustomer({customerId: id}).then(res => {
if(!res.data || !res.data.length){ if(!res.data || !res.data.length){
return this.$message.error(this.$t('联系人信息获取失败')) return this.$message.error(this.$t('联系人信息获取失败'))
} }
...@@ -155,7 +139,7 @@ export default { ...@@ -155,7 +139,7 @@ export default {
data.contactsName = data.name // 字段名跟getCustomerContactsSelect对齐 data.contactsName = data.name // 字段名跟getCustomerContactsSelect对齐
this.list.unshift(data) this.list.unshift(data)
this.index = 0 this.index = 0
}) }) */
} }
} }
} }
......
<template> <template>
<div class="dict-selector"> <div class="dict-selector">
<el-select v-if="formType == 'select'" v-model="valueSync" :placeholder="placeholder" clearable :multiple="multiple" :disabled="disabled" @change="val => $emit('change', val)"> <el-select v-if="formType == 'select'" v-model="valueSync" :placeholder="placeholder" :clearable="clearable" :multiple="multiple" :disabled="disabled" @change="val => $emit('change', val)">
<el-option v-for="dict in formattedList" <el-option v-for="dict in formattedList"
:key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/> :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
</el-select> </el-select>
...@@ -52,7 +52,8 @@ export default { ...@@ -52,7 +52,8 @@ export default {
filter: { filter: {
type: Function, type: Function,
default: () => true default: () => true
} },
clearable: Boolean
}, },
data(){ data(){
return { return {
......
...@@ -41,7 +41,6 @@ export default { ...@@ -41,7 +41,6 @@ export default {
}, },
watch:{ watch:{
index(val){ index(val){
let productId = val !== '' && val !== null ? this.list[val].id : null let productId = val !== '' && val !== null ? this.list[val].id : null
console.log('index val', val, productId) console.log('index val', val, productId)
this.$emit('input', productId) this.$emit('input', productId)
...@@ -50,15 +49,7 @@ export default { ...@@ -50,15 +49,7 @@ export default {
}, },
value(val){ value(val){
console.log('初始化内容', val) console.log('初始化内容', val)
/* let index = this.list.findIndex(item => item.id == val)
if(index < 0){
getProduct(val).then(res => {
this.list.unshift(res.data)
this.index = 0
})
} */
this.init() this.init()
} }
}, },
created(){ created(){
...@@ -67,14 +58,17 @@ export default { ...@@ -67,14 +58,17 @@ export default {
}, },
methods:{ methods:{
init(){ init(){
if(!this.value) return null if(!this.value){
this.index = null
return
}
let index = this.list.findIndex(item => item.id == this.value) let index = this.list.findIndex(item => item.id == this.value)
if(index < 0){ if(index < 0){
getProduct(this.value).then(res => { getProduct(this.value).then(res => {
this.list.unshift(res.data) this.list.unshift(res.data)
this.index = 0 this.index = 0
}) })
} }else this.index = index
}, },
remoteMethod(keyword){ remoteMethod(keyword){
let params = { let params = {
......
...@@ -73,14 +73,15 @@ export default { ...@@ -73,14 +73,15 @@ export default {
}, },
// 表单校验 // 表单校验
rules: { rules: {
name: [{ required: true, message: "客户名称不能为空", trigger: "blur" }], name : [{ required: true, message: this.$t("客户名称不能为空"), trigger: "blur" }],
'customerContacts.0.phoneNew': [{ required: true, message: "手机号不能为空", trigger: "blur" }], 'customerContacts.0.phoneNew' : [{ required: true, message: this.$t("手机号不能为空"), trigger: "blur" }],
type: [{ required: true, message: "客户类别不能为空", trigger: "blur" }], 'customerContacts.0.name' : [{ required: true, message: this.$t("联系人不能为空"), trigger: "blur" }],
createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }], type : [{ required: true, message: this.$t("客户类别不能为空"), trigger: "blur" }],
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }], createTime : [{ required: true, message: this.$t("创建时间不能为空"), trigger: "blur" }],
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }], source : [{ required: true, message: this.$t("客户来源不能为空"), trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }], customerService : [{ required: true, message: this.$t("客户经理不能为空"), trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }], status : [{ required: true, message: this.$t("客户状态不能为空"), trigger: "blur" }],
founder : [{ required: true, message: this.$t("创建人不能为空"), trigger: "blur" }],
}, },
serviceUserList: [], serviceUserList: [],
countryList: [], countryList: [],
...@@ -121,7 +122,7 @@ export default { ...@@ -121,7 +122,7 @@ export default {
// 添加的提交 // 添加的提交
createCustomer(this.form).then(res => { createCustomer(this.form).then(res => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
return getCustomerContactsSelect({ids: res.data}) return getCustomerContactsSelect({customerId: res.data})
}).then(res => { }).then(res => {
this.$emit('success', res.data[0]) this.$emit('success', res.data[0])
}) })
......
...@@ -11,17 +11,17 @@ ...@@ -11,17 +11,17 @@
<el-option <el-option
v-for="(item, index) in list" v-for="(item, index) in list"
:key="item.id" :key="item.id"
:label="`${item.name}(${item.number})`" :label="$l(item, 'company') + '('+item.companyCode+')'"
:value="index"> :value="index">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
<script> <script>
import {getSupplier, getSupplierPage} from '@/api/ecw/supplier' import {getSupplier, getSupplierPage} from '@/api/ecw/supplier'
// TODO 接口暂不支持关键词搜索,待接口支持后完善
export default { export default {
props:{ props:{
productType: [String, Number], companyType: [String, Number],
value: [String, Number] value: [String, Number]
}, },
data(){ data(){
...@@ -41,6 +41,7 @@ export default { ...@@ -41,6 +41,7 @@ export default {
} }
}, },
created(){ created(){
this.remoteMethod('')
this.init() this.init()
}, },
methods:{ methods:{
...@@ -52,14 +53,16 @@ export default { ...@@ -52,14 +53,16 @@ export default {
this.list.unshift(res.data) this.list.unshift(res.data)
this.index = 0 this.index = 0
}) })
} }else this.index = index
}, },
remoteMethod(keyword){ remoteMethod(keyword){
let params = {} let params = {
params.searchKey = keyword pageSize: 100
}
params.keyword = keyword
this.loading = true this.loading = true
getSupplierPage(params) getSupplierPage(params)
.then(res => this.list = res.data) .then(res => this.list = res.data.list)
.finally(() => this.loading = false) .finally(() => this.loading = false)
} }
} }
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<el-button type="primary" @click="handlerClick('modifyCabinet','修改柜信息')">修改柜信息</el-button> <el-button type="primary" @click="handlerClick('modifyCabinet','修改柜信息')">修改柜信息</el-button>
</div> </div>
<div v-if="isUnderReview"> <div v-if="isUnderReview">
<el-button type="primary" :disabled=true>封柜审核中</el-button> <el-button type="primary" @click="jumpReviewDetail">封柜审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button> <el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="$emit('closeDialog')">返回</el-button> <el-button plain type="primary" @click="$emit('closeDialog')">返回</el-button>
</div> </div>
...@@ -220,6 +220,7 @@ import { ...@@ -220,6 +220,7 @@ import {
serviceMsg, serviceMsg,
getCapacity, getCapacity,
sumStatistics, sumStatistics,
toReviewDetail,
} from "../../utils"; } from "../../utils";
import splitOrder from "./splitOrder.vue"; import splitOrder from "./splitOrder.vue";
import WorkFlow from "@/components/WorkFlow"; import WorkFlow from "@/components/WorkFlow";
...@@ -519,6 +520,11 @@ export default { ...@@ -519,6 +520,11 @@ export default {
}); });
}); });
}, },
jumpReviewDetail() {
const { cabinetApprovalInfo } = this.shipmentObj;
toReviewDetail.apply(this, [cabinetApprovalInfo.bpmProcessId]);
this.$emit("closeDialog", "close");
},
}, },
computed: { computed: {
/* 是否审核中 */ /* 是否审核中 */
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-date-picker type="datetime" placeholder="请选择日期" v-model="cusDeclarationObj.dcCutOffTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" placeholder="请选择日期" v-model="cusDeclarationObj.dcCutOffTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="dcCustomsStatus"> <el-form-item label="状态" prop="dcCustomsStatus">
<el-radio-group v-model="cusDeclarationObj.dcCustomsStatus"> <el-radio-group v-model="cusDeclarationObj.dcCustomsStatus" :disabled="inReview">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio> <el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<!-- 查验 --> <!-- 查验 -->
<div v-show="cusDeclarationObj.dcCustomsStatus === '3'"> <div v-show="cusDeclarationObj.dcCustomsStatus === '3'">
<el-form-item label="查验"> <el-form-item label="查验">
<el-radio-group v-model="cusDeclarationObj.dcCheckStatus"> <el-radio-group v-model="cusDeclarationObj.dcCheckStatus" :disabled="inReview">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CHECK_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio> <el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CHECK_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -70,9 +70,13 @@ ...@@ -70,9 +70,13 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="operate-button" v-if="inReview">
<el-button type="primary" @click="jumpReviewDetail">{{cusDeclarationObj.dcCheckStatus === '1' ? '部分退场审核中' : '全部退场审核中'}}</el-button>
<el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? '取消部分退场审核' : '取消全部退场审核'}}</el-button>
</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>
<el-button type="success" @click="onSubmit(2)">提交</el-button> <el-button type="success" v-if="!inReview" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="extraCost" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCustomsStatus === '3'">额外费用</el-button> <el-button type="primary" @click="extraCost" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCustomsStatus === '3'">额外费用</el-button>
</el-row> </el-row>
...@@ -141,7 +145,12 @@ import { ...@@ -141,7 +145,12 @@ import {
extraCostUpdate, extraCostUpdate,
approvalCreate, approvalCreate,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { formatNumberString, formatDateStr, serviceMsg } from "../utils"; import {
formatNumberString,
formatDateStr,
serviceMsg,
toReviewDetail,
} from "../utils";
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
/** /**
...@@ -151,6 +160,9 @@ export default { ...@@ -151,6 +160,9 @@ export default {
name: "cusDeclaration", name: "cusDeclaration",
inheritAttrs: false, inheritAttrs: false,
components: { supplierSelect, ImageUpload }, components: { supplierSelect, ImageUpload },
props: {
shipmentObj: Object,
},
data() { data() {
return { return {
// 报关对象 // 报关对象
...@@ -160,7 +172,9 @@ export default { ...@@ -160,7 +172,9 @@ export default {
dcBoxWgt: [{ required: true, message: "必填", trigger: "change" }], dcBoxWgt: [{ required: true, message: "必填", trigger: "change" }],
dcGoodsWgt: [{ required: true, message: "必填", trigger: "change" }], dcGoodsWgt: [{ required: true, message: "必填", trigger: "change" }],
dcCustomsType: [{ required: true, message: "必填", trigger: "change" }], dcCustomsType: [{ required: true, message: "必填", trigger: "change" }],
dcCustomsStatus: [{ required: true, message: "必填", trigger: "change" }], dcCustomsStatus: [
{ required: true, message: "必填", trigger: "change" },
],
}, },
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
...@@ -173,14 +187,16 @@ export default { ...@@ -173,14 +187,16 @@ export default {
costOrderList: [], costOrderList: [],
// 额外费用列表 // 额外费用列表
costList: [], costList: [],
// 是否审核中
inReview: false,
}; };
}, },
created() { created() {
const { currNode, shipmentObj } = this.$attrs; const { currNode } = this.$attrs;
const { voName } = currNode; const { voName } = currNode;
let oldData = { let oldData = {
...shipmentObj[voName], ...this.shipmentObj[voName],
documentInfo: shipmentObj.documentInfo?.split(",") ?? [], documentInfo: this.shipmentObj.documentInfo?.split(",") ?? [],
}; };
oldData = formatDateStr(oldData, [ oldData = formatDateStr(oldData, [
"dcCutOffTime", "dcCutOffTime",
...@@ -199,36 +215,73 @@ export default { ...@@ -199,36 +215,73 @@ export default {
const newList = Array.from(new Set(documentInfo)); const newList = Array.from(new Set(documentInfo));
return newList.length > 2 ? "混合报关" : "VGM声明"; return newList.length > 2 ? "混合报关" : "VGM声明";
}, },
submitCustomsCreate(operateType) {
customsCreate({
...this.cusDeclarationObj,
shipmentId: this.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
},
/** 提交 */ /** 提交 */
onSubmit(operateType) { onSubmit(operateType) {
this.$refs["cusDeclarationForm"].validate((valid) => { this.$refs["cusDeclarationForm"].validate((valid) => {
if (valid) { if (valid) {
customsCreate({ if (operateType === 1) {
...this.cusDeclarationObj, this.submitCustomsCreate(operateType);
shipmentId: this.$attrs.shipmentObj.id, return;
operateType, // 保存
}).then((res) => { }
// 查验 // 提交
const { dcCustomsStatus, dcCheckStatus } = this.cusDeclarationObj; const { dcCustomsStatus, dcCheckStatus } = this.cusDeclarationObj;
if (dcCustomsStatus === "3") { // 1.状态 报关中/放行 直接提交
// 退场/部分退场 if (dcCustomsStatus !== "3") {
if (["1", "2"].includes(dcCheckStatus)) { this.submitCustomsCreate(operateType);
approvalCreate({ return;
approvalStatus: 0, }
approvalType: dcCheckStatus === "1" ? 5 : 6, // 5报关全退,6报关部分退 // 2.查验状态,空 直接提交
shipmentId: this.$attrs.shipmentObj.id, if (!dcCheckStatus) {
}).then((res) => { this.submitCustomsCreate(operateType);
serviceMsg(res, this).then(() => { return;
this.cancel("submit"); }
// 3.查验状态,查验后放行 直接提交
if (dcCheckStatus === "3") {
const { checkExamineStatus } = this.shipmentObj;
// 没有退场审核中的状态
if (checkExamineStatus !== 1) {
this.submitCustomsCreate(operateType);
return;
}
}
// 4.查验状态,退场/部分退场 提示
if (["1", "2"].includes(dcCheckStatus)) {
const { checkExamineStatus } = this.shipmentObj;
// 退场审核状态,1-审核中,2-审核成功,3-审核失败,4-取消
if ([0, 3, 4].includes(checkExamineStatus)) {
this.$modal
.confirm(
`您确认提交${
dcCheckStatus === "1" ? "全部退场" : "部分退场"
}审核吗?`
)
.then(() => {
customsCreate({
...this.cusDeclarationObj,
shipmentId: this.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息
this.$emit("getBoxInfo");
});
}); });
}); })
} .catch(() => {});
} else {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
} }
}); }
} }
}); });
}, },
...@@ -239,7 +292,7 @@ export default { ...@@ -239,7 +292,7 @@ export default {
return; return;
} }
extraCostOrder({ extraCostOrder({
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.shipmentObj.id,
orderNo: this.orderNo, orderNo: this.orderNo,
}).then((res) => { }).then((res) => {
this.costOrderList = [ this.costOrderList = [
...@@ -254,7 +307,7 @@ export default { ...@@ -254,7 +307,7 @@ export default {
/* 查询额外费用订单 */ /* 查询额外费用订单 */
searchCostList(orderId) { searchCostList(orderId) {
extraCostList({ extraCostList({
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.shipmentObj.id,
orderId: orderId, orderId: orderId,
}).then((res) => { }).then((res) => {
this.costList = res.data.map((item) => { this.costList = res.data.map((item) => {
...@@ -272,7 +325,7 @@ export default { ...@@ -272,7 +325,7 @@ export default {
fee: row.fee, fee: row.fee,
orderId: row.orderId, orderId: row.orderId,
orderNo: row.orderNo, orderNo: row.orderNo,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.shipmentObj.id,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.searchCostList(row.orderId); this.searchCostList(row.orderId);
...@@ -321,12 +374,15 @@ export default { ...@@ -321,12 +374,15 @@ export default {
}, },
// 额外费用 // 额外费用
extraCost() { extraCost() {
const { shipmentObj } = this.$attrs;
// 清空额外费用 // 清空额外费用
this.orderNo = ""; this.orderNo = "";
this.costOrderList = []; this.costOrderList = [];
this.costList = []; this.costList = [];
this.$set(this.dialogConfig, "title", `${shipmentObj.selfNo} 报关费用`); this.$set(
this.dialogConfig,
"title",
`${this.shipmentObj.selfNo} 报关费用`
);
this.$set(this.dialogConfig, "dialogVisible", true); this.$set(this.dialogConfig, "dialogVisible", true);
}, },
// 计算VGM重量 // 计算VGM重量
...@@ -345,6 +401,27 @@ export default { ...@@ -345,6 +401,27 @@ export default {
dcBoxWgtTmp + dcGoodsWgtTmp dcBoxWgtTmp + dcGoodsWgtTmp
); );
}, },
// 审核详情
jumpReviewDetail() {
const { customsApprovalInfo } = this.shipmentObj;
toReviewDetail.apply(this, [customsApprovalInfo.bpmProcessId]);
this.cancel("close");
},
/* 取消审核 */
canclAudit() {
const { currNode, shipmentObj } = this.$attrs;
const { voName } = currNode;
approvalCancel({
applyReason: "取消审核",
id: shipmentObj[voName].id,
shipmentId: shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息
this.$emit("getBoxInfo");
});
});
},
}, },
watch: { watch: {
"cusDeclarationObj.dcBoxWgt"(dcBoxWgt) { "cusDeclarationObj.dcBoxWgt"(dcBoxWgt) {
...@@ -358,6 +435,18 @@ export default { ...@@ -358,6 +435,18 @@ export default {
this.$set(this.cusDeclarationObj, "dcCheckStatus", ""); this.$set(this.cusDeclarationObj, "dcCheckStatus", "");
} }
}, },
shipmentObj: {
deep: true,
immediate: true,
handler: function (val) {
// 监听查验状态变化
let { checkExamineStatus } = val;
if (checkExamineStatus === 1) {
// 按钮变成审核中
this.inReview = true;
}
},
},
}, },
}; };
</script> </script>
......
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
<work-flow xmlkey="shipment_preassemble" v-model="selectedUsers"></work-flow> <work-flow xmlkey="shipment_preassemble" v-model="selectedUsers"></work-flow>
</div> </div>
<div v-show="isAudit"> <div v-show="isAudit">
<el-button type="primary" :disabled=true>审核中</el-button> <el-button type="primary" @click="jumpReviewDetail">审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button> <el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="closeDialog">返回</el-button> <el-button plain type="primary" @click="closeDialog">返回</el-button>
</div> </div>
...@@ -302,7 +302,13 @@ import { ...@@ -302,7 +302,13 @@ import {
approvalCancel, approvalCancel,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { formatDate, getTotlContent, serviceMsg, getCapacity } from "../utils"; import {
formatDate,
getTotlContent,
serviceMsg,
getCapacity,
toReviewDetail,
} from "../utils";
import dayjs from "dayjs"; import dayjs from "dayjs";
import WorkFlow from "@/components/WorkFlow"; import WorkFlow from "@/components/WorkFlow";
...@@ -613,6 +619,11 @@ export default { ...@@ -613,6 +619,11 @@ export default {
}); });
}); });
}, },
jumpReviewDetail() {
const { currNode, shipmentObj } = this.$attrs;
toReviewDetail.apply(this, [shipmentObj[currNode.voName].bpmProcessId]);
this.$emit("closeDialog");
},
}, },
}; };
</script> </script>
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</el-table-column> </el-table-column>
<el-table-column label="异常状态" align="center" prop=""> <el-table-column label="异常状态" align="center" prop="">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="handleError(scope.row)" icon="el-icon-edit">{{getOrderError(scope.row, 'errorStatus')}}</el-button> <el-button v-if="scope.row.exceptionList" type="text" size="small" @click="handleError(scope.row)" icon="el-icon-edit">{{getOrderError(scope.row, 'errorStatus')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="异常类型" align="center" prop=""> <el-table-column label="异常类型" align="center" prop="">
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<el-button plain type="primary" @click="$emit('closeStart')">返回</el-button> <el-button plain type="primary" @click="$emit('closeStart')">返回</el-button>
</div> </div>
<div v-if="isUnderReview"> <div v-if="isUnderReview">
<el-button type="primary" :disabled=true>卸柜审核中</el-button> <el-button type="primary" @click="jumpReviewDetail">卸柜审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button> <el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="$emit('closeStart')">返回</el-button> <el-button plain type="primary" @click="$emit('closeStart')">返回</el-button>
</div> </div>
...@@ -123,7 +123,7 @@ import { ...@@ -123,7 +123,7 @@ import {
approvalCancel, approvalCancel,
getSectionList, getSectionList,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { serviceMsg, getTotlContent } from "../../utils"; import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils";
import WorkFlow from "@/components/WorkFlow"; import WorkFlow from "@/components/WorkFlow";
/** /**
...@@ -302,6 +302,11 @@ export default { ...@@ -302,6 +302,11 @@ export default {
path: `/order/pending?id=${row.orderId}`, path: `/order/pending?id=${row.orderId}`,
}); });
}, },
jumpReviewDetail() {
const { cabinetUnloadApprovalInfo } = this.$attrs.shipmentObj;
toReviewDetail.apply(this, [cabinetUnloadApprovalInfo.bpmProcessId]);
this.$emit("closeStart", "close");
},
}, },
computed: { computed: {
/* 是否审核中 */ /* 是否审核中 */
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<!-- 弹窗 --> <!-- 弹窗 -->
<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> <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>
<component v-bind:is="currentComponent" v-if="dialogConfig.dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :shipmentObj="shipmentObj" :currNode="currNode"></component> <component v-bind:is="currentComponent" v-if="dialogConfig.dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" v-on="$listeners" :shipmentObj="shipmentObj" :currNode="currNode"></component>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -178,7 +178,8 @@ export default { ...@@ -178,7 +178,8 @@ export default {
watch: { watch: {
/* 监听发货对象 */ /* 监听发货对象 */
shipmentObj(val) { shipmentObj(val) {
let newNodes = []; let newNodes = [],
finish = 0;
// 迭代每个节点 // 迭代每个节点
for (let i = 0; i < this.seaBaseData.length; i++) { for (let i = 0; i < this.seaBaseData.length; i++) {
const nodes = this.seaBaseData[i]; const nodes = this.seaBaseData[i];
...@@ -187,6 +188,7 @@ export default { ...@@ -187,6 +188,7 @@ export default {
const node = nodes[j]; const node = nodes[j];
const { keyName, voName, status, type } = node; const { keyName, voName, status, type } = node;
// agent
if (!keyName && type === "agent") { if (!keyName && type === "agent") {
if (val[voName]) { if (val[voName]) {
// 已完成agent节点 // 已完成agent节点
...@@ -212,6 +214,20 @@ export default { ...@@ -212,6 +214,20 @@ export default {
if (end.includes(val[keyName])) { if (end.includes(val[keyName])) {
node.currStatus = "end"; node.currStatus = "end";
// 报关
if (type === "cusDeclaration") {
const { dcCustomsStatus, dcCheckStatus } = val;
// 查验状态并且是退场/部分退场
if (dcCustomsStatus === 3 && [1, 2].includes(dcCheckStatus)) {
// 只有审核通过并且已处理才算完成
if (val.checkExamineStatus === 2 && val.checkDealStatus === 1) {
// 已完成节点个数
++nodeIndex;
} else {
continue;
}
}
}
// 已完成节点个数 // 已完成节点个数
++nodeIndex; ++nodeIndex;
} }
...@@ -219,10 +235,11 @@ export default { ...@@ -219,10 +235,11 @@ export default {
// 如果相等标识该步骤已完成 // 如果相等标识该步骤已完成
if (nodeIndex === nodes.length) { if (nodeIndex === nodes.length) {
// 加1表示为已完成步骤后一步 // 加1表示为已完成步骤后一步
this.currIndex = i + 1; finish = finish + 1;
} }
newNodes.push(nodes); newNodes.push(nodes);
} }
this.currIndex = finish;
this.processData = newNodes; this.processData = newNodes;
}, },
}, },
......
...@@ -1030,6 +1030,18 @@ function serviceMsg(result, _vue) { ...@@ -1030,6 +1030,18 @@ function serviceMsg(result, _vue) {
}); });
} }
/**
* 跳转审核详情
*
* @param {*} bpmProcessId
*/
function toReviewDetail(bpmProcessId) {
this.$router.push({
path: "/bpm/process-instance/detail",
query: { id: bpmProcessId },
});
}
export { export {
getStatusName, getStatusName,
getColmnMapping, getColmnMapping,
...@@ -1044,4 +1056,5 @@ export { ...@@ -1044,4 +1056,5 @@ export {
getCapacity, getCapacity,
sumStatistics, sumStatistics,
serviceMsg, serviceMsg,
toReviewDetail,
}; };
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
<!-- <el-select v-model="item.fullCurrencyId" style="width:100px" > <!-- <el-select v-model="item.fullCurrencyId" style="width:100px" >
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> --> </el-select> -->
<selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 3" v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="form.type == 2" v-model="item.combUnit" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
<span v-if="[2].indexOf(form.type) > -1"></span> <span v-if="[2].indexOf(form.type) > -1"></span>
<span v-if="[4].indexOf(form.type) > -1">折扣率</span> <span v-if="[4].indexOf(form.type) > -1">折扣率</span>
...@@ -267,7 +267,12 @@ export default { ...@@ -267,7 +267,12 @@ export default {
status: 1, status: 1,
}, },
// 表单校验 // 表单校验
rules: {}, rules: {
isCargoControl: [{required: true, message: '请选择是否控货'}],
brand: [{required: true, message: '请选择品牌'}],
orderAttr: [{required: true, message: '请选择订单属性'}],
documentDeclaration: [{required: true, message: '请选择单证报关'}]
},
currencyList:[], currencyList:[],
/* clearanceFeeList:[{},{}], /* clearanceFeeList:[{},{}],
freightFeeList:[{},{}], freightFeeList:[{},{}],
...@@ -317,12 +322,29 @@ export default { ...@@ -317,12 +322,29 @@ export default {
}) })
} }
return costType return costType
},
// 满减组合单位列表
combUnitList(){
let arr = []
this.currencyList.forEach(item => {
arr.push({
label: this.$l(item, 'title'),
value: 'fullCurrencyId_' + item.id
})
})
this.unitList.forEach(item => {
arr.push({
label: this.$l(item, 'title'),
value: 'prodUnit_' + item.id
})
})
return arr
} }
}, },
watch:{ watch:{
'form.type'(val){ 'form.type'(val){
// 方数满减3和特价6需要单位 // 方数满减3和特价6需要单位
if((val == 3 || val == 6) && !this.unitList.length){ if((val == 3 || val == 6 || val == 2) && !this.unitList.length){
this.getUnitList() this.getUnitList()
} }
...@@ -429,7 +451,13 @@ export default { ...@@ -429,7 +451,13 @@ export default {
return this.$message('暂无费用设置') return this.$message('暂无费用设置')
} }
// 非有优惠券需要把运费和清关费一起提交 // 非有优惠券需要把运费和清关费一起提交
let discountDetailedVOs = this.costType == 3 ? this.fee[3] : this.fee[1].concat(this.fee[2]) let discountDetailedVOs = this.costType == 3 ? this.fee[3] : this.fee[1].concat(this.fee[2]).filter(item => item.netReceiptsAmount || item.fullAmount)
discountDetailedVOs.map(item => {
if(item.combUnit){
let tmp = item.combUnit.split('_')
item[tmp[0]] = tmp[1]
}
})
let data = Object.assign({}, this.form, {discountDetailedVOs}) let data = Object.assign({}, this.form, {discountDetailedVOs})
// 开始时间必填 // 开始时间必填
if(!data.startTime)data.startTime = '2022-01-01 00:00:00' if(!data.startTime)data.startTime = '2022-01-01 00:00:00'
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px" inline>
<el-card> <el-card>
<div slot="header" class="card-title">{{$t('新建报价单')}}</div> <div slot="header" class="card-title">{{$t('新建报价单')}}</div>
<el-form-item :label="$t('所属人')"> <el-form-item :label="$t('所属人')">
...@@ -10,22 +10,59 @@ ...@@ -10,22 +10,59 @@
<el-radio label="2">{{$t('收件人')}}</el-radio> <el-radio label="2">{{$t('收件人')}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('订单类型')" style="margin-bottom: 0"> <br/>
<el-form-item :label="$t('订单类型')">
<el-checkbox-group v-model="form.type"> <el-checkbox-group v-model="form.type">
<el-checkbox label="1">{{$t('集运服务')}}</el-checkbox> <el-checkbox label="1">{{$t('集运服务')}}</el-checkbox>
<!-- <el-checkbox label="2">海外仓</el-checkbox> --> <el-checkbox label="2">{{$t('海外仓')}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-descriptions :column="3" border> <div class="form-section">
<el-form-item :label="$t('发货人')" prop="consignorId" >
<div class="contact">
<el-input v-model="form.consignorName" placeholder="选择或新建" disabled/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignor'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='1'" />
</div>
</el-form-item>
<el-form-item :label="$t('发货人电话')" prop="consignorPhone">
<!-- <area-code-selector v-model="form.consignorCountryCode" class="w-200 mr-10" disabled /> -->
<el-input :value="`${form.consignorCountryCode || ''} ${form.consignorPhone || ''}`" class="w-200" disabled />
</el-form-item>
<el-form-item :label="$t('发货人公司')" prop="consignorCompany">
<el-input v-model="form.consignorCompany" disabled />
</el-form-item>
<el-form-item label="Email" prop="consignorEmail">
<el-input v-model="form.consignorEmail" disabled />
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('收货人')" prop="consigneeId">
<div class="contact">
<el-input v-model="form.consigneeName" placeholder="请选择或新建" :disabled="true"/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignee'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='2'" />
</div>
</el-form-item>
<el-form-item :label="$t('收货人电话')" prop="consigneePhone">
<!-- <area-code-selector v-model="form.consigneeCountryCode" class="w-200 mr-10" disabled/> -->
<el-input :value="`${form.consigneeCountryCode || ''} ${form.consigneePhone || ''}`" class="w-200" disabled/>
</el-form-item>
<el-form-item :label="$t('收货人公司')" prop="consigneeCompany">
<el-input v-model="form.consigneeCompany" :disabled="true" />
</el-form-item>
<el-form-item label="Email" prop="consigneeEmail">
<el-input v-model="form.consigneeEmail" :disabled="true"/>
</el-form-item>
</div>
<!-- <el-descriptions :column="3" border>
<el-descriptions-item :label="$t('*发货人')" :labelStyle="labelStyle" > <el-descriptions-item :label="$t('*发货人')" :labelStyle="labelStyle" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorId" required :error="$t('发货人不能为空')"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorId" required :error="$t('发货人不能为空')">
<customer-contact-selector v-model="form.consignorId" @change="consignor = $event" /> <customer-contact-selector v-model="form.consignorId" @change="consignor = $event" type="1" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<!-- <el-descriptions-item label="发货人" :labelStyle="labelStyle">
{{consignor.contactsName || ''}}
</el-descriptions-item> -->
<el-descriptions-item :label="$t('手机号')" :labelStyle="labelStyle"> <el-descriptions-item :label="$t('手机号')" :labelStyle="labelStyle">
{{consignor.areaCode}} {{consignor.phoneNew || this.$t('')}} {{consignor.areaCode}} {{consignor.phoneNew || this.$t('')}}
</el-descriptions-item> </el-descriptions-item>
...@@ -34,24 +71,15 @@ ...@@ -34,24 +71,15 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="Email" :labelStyle="labelStyle"> <el-descriptions-item label="Email" :labelStyle="labelStyle">
{{consignor.email || this.$t('')}} {{consignor.email || this.$t('')}}
</el-descriptions-item><!--
<el-descriptions-item label="社交软件">
{{consignor.social}} {{consignor.socialNumber}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="联系地址">
{{consignor.address || ''}}
</el-descriptions-item> -->
</el-descriptions> </el-descriptions>
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<el-descriptions-item :label="$t('收货人')" :labelStyle="labelStyle"> <el-descriptions-item :label="$t('收货人')" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeId" required :error="$t('收货人不能为空')"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeId" required :error="$t('收货人不能为空')">
<customer-contact-selector v-model="form.consigneeId" @change="consignee = $event" /> <customer-contact-selector v-model="form.consigneeId" @change="consignee = $event" type="2" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<!-- <el-descriptions-item label="收货人" :labelStyle="labelStyle">
{{consignee.contactsName || ''}}
</el-descriptions-item> -->
<el-descriptions-item :label="$t('手机号')" :labelStyle="labelStyle"> <el-descriptions-item :label="$t('手机号')" :labelStyle="labelStyle">
{{consignee.areaCode}} {{consignee.phoneNew}} {{consignee.areaCode}} {{consignee.phoneNew}}
</el-descriptions-item> </el-descriptions-item>
...@@ -60,64 +88,48 @@ ...@@ -60,64 +88,48 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="Email" :labelStyle="labelStyle"> <el-descriptions-item label="Email" :labelStyle="labelStyle">
{{consignee.email || this.$t('')}} {{consignee.email || this.$t('')}}
</el-descriptions-item><!--
<el-descriptions-item label="社交软件">
{{consignee.social}} {{consignee.socialNumber}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="联系地址"> </el-descriptions> -->
{{consignee.address || ''}} // TODO
</el-descriptions-item> -->
</el-descriptions>
<el-descriptions :column="2" border> <div class="form-section">
<el-descriptions-item :label="$t('运输方式')" :labelStyle="labelStyle"> <el-form-item :label="$t('运输方式')" prop="transportId">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="transportId" required :error="$t('请选择运输方式')"> <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" @input="calculationPrice" />
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" @input="calculationPrice" /> </el-form-item>
</el-form-item> <el-form-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" prop="channelId">
</el-descriptions-item> <selector
<el-descriptions-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" :labelStyle="labelStyle"> :disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
<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="$t('请选择出货渠道')"> v-model="form.channelId"
<selector :options="channelList"
:disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'" value-field="channelId"
v-model="form.channelId" label-field="nameZh"
:options="channelList" @input="calculationPrice"
value-field="channelId" ></selector>
label-field="nameZh" </el-form-item>
@input="calculationPrice" </div>
></selector>
</el-form-item> <div class="form-section">
</el-descriptions-item> <el-form-item :label="$t('始发城市')" prop="departureId">
</el-descriptions> <el-select v-model="form.departureId" :placeholder="$t('请选择始发地')">
<el-descriptions :column="2" border> <el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
<el-descriptions-item :label="$t('始发城市')" :labelStyle="labelStyle"> </el-select>
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="departureId" required :error="$t('始发地必选')"> </el-form-item>
<el-select v-model="form.departureId" :placeholder="$t('请选择始发地')"> <el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-select v-model="form.objectiveId" :placeholder="$t('请选择目的地')">
</el-select> <el-option v-for="item in importCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-form-item> </el-select>
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('目的城市')" :labelStyle="labelStyle"> </div>
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="objectiveId" required :error="$t('目的城市必选')"> <div class="form-section">
<el-select v-model="form.objectiveId" :placeholder="$t('请选择始发地')"> <el-form-item :label="$t('选择线路')" prop="lineId">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <!-- <el-input :value="getRouterNameById(form.lineId)" readonly :placeholder="$t('请在右侧选择线路')"></el-input> -->
</el-select> <el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> <select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px">
<el-descriptions-item :label="$t('请选择线路')" :span="2" :labelStyle="labelStyle"> <template v-for="item in routerList">
<el-row :gutter="10"> <option :value="item.id" :key="item.id">{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}</option>
<el-col :span="12"> </template>
<el-input :value="getRouterNameById(form.lineId)" readonly :placeholder="$t('请在右侧选择线路')"></el-input> </select>
</el-col> </div>
<el-col :span="12">
<select size="5" v-model="form.lineId" style="min-width: 300px" @change="calculationPrice">
<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>
<el-card class="mt-10"> <el-card class="mt-10">
<div slot="header" class="card-title"> <div slot="header" class="card-title">
...@@ -145,13 +157,6 @@ ...@@ -145,13 +157,6 @@
<dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" /> <dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" />
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column :label="$t('商品类型')" width="160px">
<template slot-scope="{row}">
<selector disabled v-model="row.goodsType" :options="productAttrList" label-field="attrName" value-field="id" @input="calculationPrice"></selector>
</template>
</el-table-column> -->
<el-table-column :label="$t('件数')" width="90px"> <el-table-column :label="$t('件数')" width="90px">
<template slot-scope="{row}"> <template slot-scope="{row}">
...@@ -168,11 +173,6 @@ ...@@ -168,11 +173,6 @@
<el-input v-model.number="row.quantity" @input="calculationPrice" /> <el-input v-model.number="row.quantity" @input="calculationPrice" />
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column :label="$t('箱规') + '(m)'" width="120px">
<template slot-scope="{row}">
<el-input v-model="row.boxGauge" @input="calcVolume(row);calculationPrice()" />
</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" @input="calculationPrice"/> <el-input v-model="row.volume" @input="calculationPrice"/>
...@@ -229,51 +229,36 @@ ...@@ -229,51 +229,36 @@
</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="{row}">
<el-input v-model="row.expressNo" placeholder="缺少字段" /> <el-input v-model="row.expressNo" placeholder="" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" width="180px" fixed="right"> <el-table-column :label="$t('操作')" width="180px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" @click="delProduct(scope.$index)">{{$t('删除')}}</el-button> <el-button size="mini" type="danger" @click="delProduct(scope.$index)">{{$t('删除')}}</el-button>
<!-- <el-button size="mini" type="primary" @click="showMorePrice($index)">{{$t('更多报价')}}</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <!--
</el-card> </el-card>
<el-card class="mt-10"> --> <el-card class="mt-10"> -->
<div class="card-title" style="padding:20px 0;">{{$t('费用小计')}}</div> <div class="card-title" style="padding:20px 0;">{{$t('计')}}</div>
<el-descriptions :column="4" border> <el-descriptions :column="4" border>
<el-descriptions-item :label="$t('总件数')"> <el-descriptions-item :label="$t('总件数')">
{{sum.totalNum || 0}} {{sum.totalNum || 0}}
</el-descriptions-item> </el-descriptions-item>
<!-- <el-descriptions-item label="总体积"> <el-descriptions-item label="总体积">
{{sum.totalVolume || 0}}m³ {{sum.totalVolume || 0}}m³
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="总重量"> <el-descriptions-item label="总重量">
{{sum.totalWeight || 0}}kg {{sum.totalWeight || 0}}kg
</el-descriptions-item> -->
<el-descriptions-item :label="$t('总货值')">
{{sum.totalWorth || 0}}{{$t('人民币')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('保价费')"> <el-descriptions-item label="总数量">
{{fee.insuranceFee || 0}}{{$t('人民币')}} {{sum.totalQuatity || 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> </el-descriptions-item>
<el-descriptions-item label="总清关费">
<div>{{fee.clearanceNGN || 0}}泰拉</div> <el-descriptions-item :label="$t('总货值') + '(RMB)'">
<div>{{fee.clearanceRMB || 0}}人民币</div> {{sum.totalWorth || 0}}{{$t('元')}}
<div>{{fee.clearanceUSD || 0}}美元</div>
</el-descriptions-item> </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-descriptions>
</el-card> </el-card>
...@@ -282,139 +267,152 @@ ...@@ -282,139 +267,152 @@
<el-descriptions :column="5" border> <el-descriptions :column="5" border>
<el-descriptions-item :label="$t('保价费')"> <el-descriptions-item :label="$t('保价费')">
{{fee.insuranceFee || 0}} {{$t('人民币')}} {{fee.insuranceFee || 0}} {{$t('美元')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('总运费')"> <el-descriptions-item :label="$t('总运费')">
<div>{{fee.seaNGN || 0}}{{$t('奈拉')}}</div> <template v-for="item in clearanceFeeList">
<div>{{fee.seaRMB || 0}}{{$t('人民币')}}</div> <div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
<div>{{fee.seaUSD || 0}}{{$t('美元')}}</div> </template>
</el-descriptions-item> </el-descriptions-item>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项--> <!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-descriptions-item :label="$t('总清关费')"> <el-descriptions-item :label="$t('总清关费')">
<div>{{fee.clearanceNGN || 0}}{{$t('奈拉')}}</div> <template v-for="item in freightFeeList">
<div>{{fee.clearanceRMB || 0}}{{$t('人民币')}}</div> <div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
<div>{{fee.clearanceUSD || 0}}{{$t('美元')}}</div> </template>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('其他费用')"> <el-descriptions-item :label="$t('其他费用')">
<el-input v-model="form.otherFee" placeholder="" class="w-100 mr-10"></el-input> <el-input v-model="form.otherFee" placeholder="" class="w-100 mr-10"></el-input>
<selector v-model="form.otherFeeCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100" /> <selector v-model="form.otherFeeCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('原价')" :span="2"> <el-descriptions-item :label="$t('原价')" :span="2">
<!--TODO 缺少字段--> <template v-for="item in originalFeeList">
<div>{{fee.clearanceNGN || 0}}{{$t('奈拉')}}</div> <div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
<div>{{fee.clearanceRMB || 0}}{{$t('人民币')}}</div> </template>
<div>{{fee.clearanceUSD || 0}}{{$t('美元')}}</div>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<div class="card-title" style="padding:20px 0;">{{$t('优惠信息')}}</div> <div class="card-title" style="padding:20px 0;">{{$t('优惠信息')}}</div>
<div v-for="(item, index) in couponList" :key="index" style="display:flex;align-items:center"> <el-table :data="couponList" :show-header="false">
<div class="w-150"> <el-table-column label="">
{{index+1}}. <template slot-scope="scope">
{{productNames[item.prodId] || $t('未知')}} {{scope.$index+1}}.
</div> {{$l(productNames[scope.row.prodId], 'title') || $t('未知')}}
<div class="w-100">
<dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="item.type" />
</div>
<div style="display:flex; align-items:center">
<el-select :placeholder="$t('请选择优惠')" v-model="item.selectedIndex" :data-type="item.value" clearable class="w-300">
<template v-for="(coupon, couponIndex) in item.options">
<el-option :key="coupon.couponId" :label="coupon.titleZh" :value="couponIndex"></el-option>
</template> </template>
</el-select> </el-table-column>
<template v-if="item.selectedIndex !== null"> <el-table-column label="">
<div class="w-100 ml-20"> <template slot-scope="{row}">
-{{item.options[item.selectedIndex].reduceAmount}} <dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="row.type" />
{{currentcyMap[item.options[item.selectedIndex].reduceCurrencyId]}} </template>
</div> </el-table-column>
<div class="ml-20">{{$t('有效期')}}{{item.options[item.selectedIndex].endTime || $t('永久有效')}}</div> <el-table-column label="">
</template> <template slot-scope="{row}">
</div> {{$l(row, 'title')}}
</div> </template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{row}">
-{{row.reduceAmount}}
{{currentcyMap[row.reduceCurrencyId]}}
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{row}">
{{$t('有效期至')}}{{row.endTime ? row.endTime : $t('永久有效')}}
</template>
</el-table-column>
</el-table>
<el-descriptions :column="1" class="mt-20"> <el-descriptions :column="1" class="mt-20">
<el-descriptions-item :label="$t('优惠合计')"> <el-descriptions-item :label="$t('优惠费用')" v-if="couponTotalAmountList && couponTotalAmountList.length">
<div v-for="(discount, discountIndex) in discountArr" :key="discountIndex"> <div v-for="(item, discountIndex) in couponTotalAmountList" :key="discountIndex">
{{discount.reduceAmount}} {{currentcyMap[discount.reduceCurrencyId]}} {{item.totalAmount}} {{currentcyMap[item.currencyId]}}
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('预计费用')"> <el-descriptions-item :label="$t('预计费用')">
// TODO <template v-for="item in estimatedCosts">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card class="mt-10"> <el-card class="mt-10">
<div class="card-title" slot="header">{{$t('通用')}}</div> <div class="card-title" slot="header">{{$t('通用')}}</div>
<div class="form-section">
<el-descriptions :column="2" border> <el-form-item :label="$t('唛头')" prop="marks">
<el-descriptions-item :label="$t('唛头')">
<el-input v-model="form.marks" placeholder=""></el-input> <el-input v-model="form.marks" placeholder=""></el-input>
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('报关方式')"> </div>
<div class="form-section">
<el-form-item :label="$t('报关方式')" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" defaultable /> <dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" defaultable />
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('预计结束时间')"> </div>
<div class="form-section">
<el-form-item :label="$t('预计结束时间')" prop="stopTime">
<el-date-picker v-model="form.stopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker v-model="form.stopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('是否控货')"> <el-form-item :label="$t('是否控货')" prop="control">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.control" form-type="radio" defaultable /> <dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.control" form-type="radio" defaultable />
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('竞争对手')"> </div>
<div class="form-section">
<el-form-item :label="$t('竞争对手')" prop="competitor">
<el-input v-model="form.competitor" placeholder=""></el-input> <el-input v-model="form.competitor" placeholder=""></el-input>
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('重要程度')"> <el-form-item :label="$t('重要程度')" prop="importance">
<el-rate v-model="form.importance"></el-rate> <el-rate v-model="form.importance"></el-rate>
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('价格有效时间')"> </div>
<div class="form-section">
<el-form-item :label="$t('价格有效时间')" prop="startTime">
<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.startTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
- </el-form-item>
<el-form-item label="" prop="endTime">
<el-date-picker v-model="form.endTime" 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> </el-form-item>
<el-descriptions-item :label="$t('交货方式')"> </div>
<div class="form-section">
<el-form-item :label="$t('交货方式')">
<!-- <!--
接口要求数据为整数,所以增加trade_type类型的字典,用1234代码以下不同类型 接口要求数据为整数,所以增加trade_type类型的字典,用1234代码以下不同类型
FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价) FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)
--> -->
<dict-selector :type="DICT_TYPE.ECW_TRADE_TYPE" fomtter="number" v-model="form.tradeType" /> <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>
<!-- <el-descriptions-item label="总运费" :span="2">
</el-descriptions-item>
<el-descriptions-item label="总清关费" :span="2">
</el-descriptions-item>
<el-descriptions-item label="总价格" :span="2">
</el-descriptions-item> --> </el-form-item>
<!-- <el-descriptions-item label="佣金类型" :span="2"> <el-form-item :label="$t('交货地址')">
<dict-selector :type="DICT_TYPE.COMMISSION_TYPE" form-type="radio" fomtter="number" v-model="form.commissionType" defaultable /> <el-input v-model="form.tradeAdress" placeholder="港口或地点"></el-input>
</el-descriptions-item> --> </el-form-item>
<el-descriptions-item :label="$t('备注')" :span="2"> </div>
<el-input v-model="form.remarks" type="textarea" placeholder=""></el-input> <div class="form-section">
</el-descriptions-item> <el-form-item :label="$t('备注')" :span="2">
</el-descriptions> <el-input v-model="form.remarks" type="textarea" placeholder="" style="width:500px; height: 100px"></el-input>
</el-form-item>
</div>
</el-card> </el-card>
<el-card class="mt-10" v-if="transport"> <el-card class="mt-10" v-if="transport">
<div class="card-title" slot="header">{{transport.label}}</div> <div class="card-title" slot="header">{{transport.label}}</div>
<el-form-item :label="$t('快递单号')"> <!-- <el-form-item :label="$t('快递单号')">
<el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')"></el-input> <el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')"></el-input>
</el-form-item> </el-form-item> -->
<el-form-item :label="$t('是否双清')" v-if="[2,3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('是否双清')" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" /> <dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('航空公司')" v-if="[3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('航空公司')" v-if="[3,4].indexOf(+form.transportId) > -1">
<!--待查询备选数据--> <!--待查询备选数据-->
<el-select placeholder="" v-model="form.airlineCompany"> <!-- <el-select placeholder="" v-model="form.airlineCompany">
</el-select> </el-select> -->
<supplier-selector v-model="form.airlineCompany" companyType="10" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('船公司')" v-if="[2].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('船公司')" v-if="[2].indexOf(+form.transportId) > -1">
<el-select placeholder="" v-model="form.shippingCompany"> <!-- <el-select placeholder="" v-model="form.shippingCompany">
</el-select> </el-select> -->
<supplier-selector v-model="form.shippingCompany" companyType="9" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('清关证书')" v-if="[2,3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('清关证书')" v-if="[2,3,4].indexOf(+form.transportId) > -1">
...@@ -430,53 +428,55 @@ ...@@ -430,53 +428,55 @@
<dict-selector v-model="form.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" /> <dict-selector v-model="form.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
<span style="margin-left:10px">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span> <span style="margin-left:10px">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span>
</el-form-item> </el-form-item>
<br/>
<el-form-item :label="$t('特殊要求')" > <el-form-item :label="$t('特殊要求')" >
<dict-selector v-model="form.packageType" form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple /> <dict-selector v-model="form.packageType" form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple />
</el-form-item> </el-form-item>
<br/>
<el-form-item :label="$t('特殊要求备注')"> <el-form-item :label="$t('特殊要求备注')">
<el-input v-model="form.packageRemarks" ></el-input> <el-input v-model="form.packageRemarks" ></el-input>
</el-form-item> </el-form-item>
</el-card> </el-card>
<el-form-item label=""> <el-form-item label="" class="mt-20">
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button> <el-button type="primary" @click="submitForm">{{$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>
<choose-contact-dialog v-if="!!contactChooseType" @choose="onContactChoose" @close="contactChooseType=null" />
<quick-create-customer v-if="quickCreateType" :type="quickCreateType" @success="onContactChoose" @close="quickCreateType=null" />
</div> </div>
</template> </template>
<script> <script>
import { createOffer, updateOffer, getOffer, getProductFeeList, getProductFee } from "@/api/ecw/offer"; import { createOffer, updateOffer, getOffer} from "@/api/ecw/offer";
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'
import Selector from '@/components/Selector' import Selector from '@/components/Selector'
import CustomerContactSelector from '@/components/CustomerContactSelector'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse' import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getTradeCityList} from '@/api/ecw/region' import {getTradeCityList} from '@/api/ecw/region'
import {getDictData} from '@/utils/dict' import {getDictData} 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 {calculationPrice} from '@/api/ecw/product' import {calculationPrice} from '@/api/ecw/product'
import {getCustomerAvailableCouponList} from '@/api/ecw/coupon' import SupplierSelector from '@/components/SupplierSelector'
import ChooseContactDialog from '@/components/ChooseContactDialog'
import QuickCreateCustomer from '@/components/QuickCreateCustomer'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
export default { export default {
name: "OfferEdit", name: "OfferEdit",
components: { components: {
ProductSelector, Selector, CustomerContactSelector ProductSelector, Selector, SupplierSelector,ChooseContactDialog, QuickCreateCustomer
}, },
data() { data() {
return { return {
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 是否显示弹出层
/* dateRangeStopTime: [],
dateRangeStartTime: [],
dateRangeEndTime: [],
dateRangeCreateTime: [], */
productList:[], // 商品信息 productList:[], // 商品信息
productAttrList:[], // 商品属性 productAttrList:[], // 商品属性
channelList: [], // 出货取到 channelList: [], // 出货取到
...@@ -487,7 +487,7 @@ export default { ...@@ -487,7 +487,7 @@ export default {
transportList: [], transportList: [],
currencyList:[], currencyList:[],
unitList:[], unitList:[],
couponList: [{"selectedIndex":null,"options":[{"couponId":74,"titleZh":"2-1,5-2","titleEn":"2-1,5-2","type":2,"cashCondition":0,"reduceAmount":3,"reduceCurrencyId":1,"startTime":"2022-01-01 00:00:00","afterReceiveDays":0,"costType":2,"discountDetailed":"[{\"type\": 1, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 1, \"fullAmount\": 5, \"reduceAmount\": 2, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 2, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 2, \"fullAmount\": 6, \"reduceAmount\": 3, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}]","discountDetailedVOList":[{"type":1,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":1,"fullAmount":5,"fullCurrencyId":1,"reduceAmount":2,"reduceCurrencyId":1},{"type":2,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":2,"fullAmount":6,"fullCurrencyId":1,"reduceAmount":3,"reduceCurrencyId":1}],"isSimilarSuperposition":false,"couponIds":"","suitableUserType":0,"suitableLineType":0,"suitableProdType":0,"limitNum":1,"overdueStatus":true,"putonStatus":1,"getWay":1,"orderAttr":"1,2,3","isSiteContent":false,"brand":"0,1","isCargoControl":"1,0","documentDeclaration":"1,2,3","status":1,"prodList":[],"isDefault":false},{"couponId":73,"titleZh":"3-2,2-1","titleEn":"3-2,2-1","type":2,"cashCondition":0,"reduceAmount":2,"reduceCurrencyId":1,"startTime":"2022-01-01 00:00:00","afterReceiveDays":0,"costType":1,"discountDetailed":"[{\"type\": 1, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 1, \"fullAmount\": 3, \"reduceAmount\": 2, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 2, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 2, \"fullAmount\": 3, \"reduceAmount\": 2, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}]","discountDetailedVOList":[{"type":1,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":1,"fullAmount":3,"fullCurrencyId":1,"reduceAmount":2,"reduceCurrencyId":1},{"type":2,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":2,"fullAmount":3,"fullCurrencyId":1,"reduceAmount":2,"reduceCurrencyId":1}],"isSimilarSuperposition":false,"couponIds":"","suitableUserType":0,"suitableLineType":0,"suitableProdType":0,"limitNum":1,"overdueStatus":true,"putonStatus":1,"getWay":1,"orderAttr":"1,2,3","isSiteContent":false,"brand":"0,1","isCargoControl":"0,1","documentDeclaration":"1,2,3","status":1,"prodList":[],"isDefault":false},{"couponId":71,"titleZh":"金额满2减1","titleEn":"金额满2减1","type":2,"cashCondition":0,"reduceAmount":5,"reduceCurrencyId":1,"startTime":"2022-01-01 00:00:00","afterReceiveDays":0,"costType":1,"discountDetailed":"[{\"type\": 1, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 1, \"fullAmount\": 10, \"reduceAmount\": 5, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}]","discountDetailedVOList":[{"type":1,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":1,"fullAmount":10,"fullCurrencyId":1,"reduceAmount":5,"reduceCurrencyId":1}],"isSimilarSuperposition":true,"couponIds":"","suitableUserType":0,"suitableLineType":0,"suitableProdType":0,"limitNum":1,"overdueStatus":true,"putonStatus":1,"getWay":1,"orderAttr":"1,2,3","isSiteContent":false,"brand":"0,1","isCargoControl":"1,0","documentDeclaration":"1,2,3","status":1,"prodList":[],"isDefault":false}],"prodId":22,"type":2}], // couponList: [],
fee: {}, // 费用 fee: {}, // 费用
// 表单参数 // 表单参数
form: { form: {
...@@ -497,17 +497,26 @@ export default { ...@@ -497,17 +497,26 @@ export default {
}, },
// 表单校验 // 表单校验
rules: { rules: {
/* number: [{ required: true, message: "报价单号不能为空", trigger: "blur" }], lineId: [{ required: true, message: "请选择线路"}],
consignorId: [{ required: true, message: "客户id,发货人不能为空", trigger: "blur" }], consignorId: [{ required: true, message: "发货人不能为空",}],
consigneeId: [{ required: true, message: "收货人id不能为空", trigger: "blur" }], consigneeId: [{ required: true, message: "收货人不能为空"}],
sendstatus: [{ required: true, message: "站内信状态,0未发送,1已发送不能为空", trigger: "blur" }], */ startTime: [{ required: true, message: "有效期开始时间不能为空"}],
endTime: [{ required: true, message: "有效期结束时间不能为空"}],
transportId: [{ required: true, message: "选择运输方式"}],
channelId: [{ required: true, message: "选择出货渠道"}],
/*sendstatus: [{ required: true, message: "站内信状态,0未发送,1已发送不能为空", trigger: "blur" }], */
}, },
labelStyle: 'width:120px', labelStyle: 'width:120px',
productNames: {} // 品名id和名称对应关系 productNames: {}, // 品名id和名称对应关系
couponAvailableGroupDtoList: [], // 可用优惠
couponTotalAmountList: [], // 优惠总额
contactChooseType: null, // 联系人选择对象consignor(发货人) 或者 consignee(收货人)
quickCreateType: null, // 快速新建客户类型,1发货人,2收货人
getOpenedRouterListHandler: undefined
}; };
}, },
computed:{ computed:{
expoerCityList(){ exportCityList(){
return this.tradeCityList.filter(item => item.type == 2) return this.tradeCityList.filter(item => item.type == 2)
}, },
importCityList(){ importCityList(){
...@@ -573,28 +582,67 @@ export default { ...@@ -573,28 +582,67 @@ export default {
return sum return sum
}, },
// 总有优惠金额 // 总有优惠金额
discount(){ couponList(){
let discount = { let arr = []
// curreny: amount this.couponAvailableGroupDtoList.forEach(item => {
} if(item.couponAvailableDtoList && item.couponAvailableDtoList.length){
this.couponList.forEach(item => { // 只取第一个
if(item.selectedIndex !== null){ let it = item.couponAvailableDtoList[0]
let selected = item.options[item.selectedIndex] arr.push({
if(!discount[selected.reduceCurrencyId]) discount[selected.reduceCurrencyId] = 0 prodId: item.prodId,
discount[selected.reduceCurrencyId] += selected.reduceAmount type: it.type,
titleZh: it.titleZh,
titleEn: it.titleEn,
endTime: it.endTime,
reduceAmount: it.reduceAmount,
reduceCurrencyId: it.reduceCurrencyId
})
} }
}) })
return discount return arr
}, },
discountArr(){ // 计算返回的费用清单
let discount = [] feeDtoList(){
for(let currency in this.discount){ return this.fee.feeDtoList || []
discount.push({ },
reduceAmount: this.discount[currency], // 清关费
reduceCurrencyId: currency clearanceFeeList(){
}) return this.feeDtoList.filter(item => item.feeType == 2)
} },
return discount // 运费
freightFeeList(){
return this.feeDtoList.filter(item => item.feeType == 1)
},
// 原价(清关费 + 运费)
originalFeeList(){
let arr = []
this.clearanceFeeList.forEach(item => {
let it = {...item}
let freight = this.freightFeeList.find(fee => fee.currencyId == item.currencyId)
if(freight){
it.amount += freight.amount
}
arr.push(it)
})
return arr
},
// 预计费用(原价 - 优惠金额)
estimatedCosts(){
let arr = []
this.originalFeeList.forEach(item => {
let it = {...item}
let coupon = this.couponList.find(coupon => coupon.reduceCurrencyId == item.currencyId)
if(coupon){
it.amount -= coupon.reduceAmount
}
arr.push(it)
})
return arr
},
// 路线开通的服务
routeOtherServices(){
if(!this.selectedRouter || !this.selectedRouter.otherService) return []
return this.selectedRouter.otherService.split(',')
} }
/* productKeyd(){ /* productKeyd(){
return arrryToKeyedObjectBy(this.productList, 'prodId') return arrryToKeyedObjectBy(this.productList, 'prodId')
...@@ -617,12 +665,18 @@ export default { ...@@ -617,12 +665,18 @@ export default {
}, },
'form.lineId'(lineId){ 'form.lineId'(lineId){
let router = this.routerList.find(item => item.id == lineId) let router = this.routerList.find(item => item.id == lineId)
if(!router) return
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)
// TODO 还需要回填渠道信息,暂时缺少渠道ID
}, },
fee(){ // 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
this.getCoupons() selectedRouter(val){
if(!val) return
['1', '4'].forEach(service => {
if(this.routeOtherServices.indexOf(service) < 0 && this.form.type.indexOf(service) > -1){
this.form.type.splice(this.form.type.findIndex(item => item == service), 1)
}
})
} }
}, },
created() { created() {
...@@ -635,7 +689,10 @@ export default { ...@@ -635,7 +689,10 @@ export default {
if(this.$route.query.id){ if(this.$route.query.id){
getOffer(this.$route.query.id).then(res => { getOffer(this.$route.query.id).then(res => {
this.$set(this, 'form', res.data) let formData = res.data
formData.type = formData.type ? formData.type.split(',').filter(item => item != '') : []
this.$set(this, 'form', formData)
if(res.data.offerProdRespVOList){ if(res.data.offerProdRespVOList){
res.data.offerProdRespVOList.forEach(item => { res.data.offerProdRespVOList.forEach(item => {
this.addProduct({ this.addProduct({
...@@ -655,12 +712,19 @@ export default { ...@@ -655,12 +712,19 @@ export default {
}) })
}) })
} }
console.log('res.data.transportRespVOList', res.data.transportRespVOList)
res.data.transportRespVOList.forEach(item => { // 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显
getCustomerContactsSelect({ids: [res.data.consigneeId, res.data.consignorId].join(',')}).then(({data}) => {
this.contactChooseType = 'consignee'
this.onContactChoose(data.find(item => item.customerContactsId == res.data.consigneeId))
this.contactChooseType = 'consignor'
this.onContactChoose(data.find(item => item.customerContactsId == res.data.consignorId))
})
/* 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)
console.log(item.transportId, transport) console.log(item.transportId, transport)
Object.assign(transport, item, {_enabled: true}) Object.assign(transport, item, {_enabled: true})
}) }) */
/* this.$nextTick(() => { /* this.$nextTick(() => {
this.updateEnabledTransports() this.updateEnabledTransports()
}) */ }) */
...@@ -668,11 +732,22 @@ export default { ...@@ -668,11 +732,22 @@ export default {
}//else this.addProduct() }//else this.addProduct()
}, },
methods: { methods: {
/* onTransportChange(row, val){ onContactChoose(contact){
this.getProductFee(row) console.log('选择联系人', contact)
if(this.getDictData(this.DICT_TYPE.ECW_TRANSPORT_TYPE, val).cssClass != 'channel') row.channelId = null if(!this.contactChooseType && !this.quickCreateType) return
this.updateEnabledTransports() if(!this.contactChooseType && this.quickCreateType){
}, */ this.contactChooseType = this.quickCreateType == 1 ? 'consignor' : 'consignee'
}
this.$set(this.form, this.contactChooseType + 'Company', contact.company)
this.$set(this.form, this.contactChooseType + 'Id', contact.customerContactsId)
this.$set(this.form, this.contactChooseType + 'CountryCode', contact.areaCode)
this.$set(this.form, this.contactChooseType + 'Email', contact.email)
// this.$set(this.form, this.contactChooseType + 'Id', contact.customerId)
this.$set(this.form, this.contactChooseType + 'Name', contact.contactsName)
this.$set(this.form, this.contactChooseType + 'Phone', contact.phoneNew)
this.contactChooseType = null
this.quickCreateType = null
},
/* onProductChange(row, product){ /* onProductChange(row, product){
row.goodsType = product.typeId; row.goodsType = product.typeId;
// 保存商品id和品名,用于优惠信息显示 // 保存商品id和品名,用于优惠信息显示
...@@ -683,6 +758,11 @@ export default { ...@@ -683,6 +758,11 @@ export default {
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, {
titleZh: product.titleZh,
titleEn: product.titleEn
})
this.calculationPrice()
}, },
onLineChange(row){ onLineChange(row){
this.calculationPrice() this.calculationPrice()
...@@ -694,51 +774,15 @@ export default { ...@@ -694,51 +774,15 @@ export default {
onProductAttrChange(row, attr){ onProductAttrChange(row, attr){
this.calculationPrice() this.calculationPrice()
}, },
// 更新运输方式
/* updateEnabledTransports(){
let enabled = {}
this.productList.forEach(prod => {
if(prod.transportId){
if(!enabled[prod.transportId]){
enabled[prod.transportId] = {
// transportId: prod.transportId,
lineIdSet: new Set(),
channelIdSet: new Set(),
routers:[]
}
}
if(prod.lineId){
enabled[prod.transportId].lineIdSet.add(prod.lineId)
}
if(prod.channelId){
enabled[prod.transportId].channelIdSet.add(prod.channelId)
}
if(prod.lineId && enabled[prod.transportId].routers.findIndex(item => { item.lineId == prod.lineId && item.channelId == prod.channelId }) < 0){
enabled[prod.transportId].routers.push({
lineId: prod.lineId,
channelId: prod.channelId
})
}
}
})
console.log(JSON.stringify(enabled))
let enabledTransportIds = Object.keys(enabled).map(item => +item)
this.transportList.forEach(transport => {
this.$set(transport, '_enabled', enabledTransportIds.indexOf(transport.transportId) > -1 && enabled[transport.transportId].routers.length)
if(transport._enabled){
Object.assign(transport, enabled[transport.transportId])
}
})
}, */
addProduct(data){ addProduct(data){
if(!data && !this.form.lineId){ if(!data && !this.form.lineId){
return this.$message.error(this.$t('请先选择路线')) return this.$message.error(this.$t('请先选择路线'))
} }
console.log('addProduct', JSON.stringify(data))
this.productList.push(data || {prodAttrArr:[]}) this.productList.push(data || {prodAttrArr:[]})
}, },
// 计算商品运费 // 计算商品运费
getProductFee(row){ /* getProductFee(row){
if(!row.prodId || !row.transportId || !row.lineId || !row.num || !row.weight)return false if(!row.prodId || !row.transportId || !row.lineId || !row.num || !row.weight)return false
if(row.prodAttrArr){ if(row.prodAttrArr){
row.prodAttrIds = row.prodAttrArr.join(',') row.prodAttrIds = row.prodAttrArr.join(',')
...@@ -746,7 +790,7 @@ export default { ...@@ -746,7 +790,7 @@ export default {
getProductFeeList(row).then(res => { getProductFeeList(row).then(res => {
this.$set(row, 'fee', res.data[0] || {}) this.$set(row, 'fee', res.data[0] || {})
}) })
}, }, */
// 获取路线 // 获取路线
getOpenedRouterList(){ getOpenedRouterList(){
let params = {} let params = {}
...@@ -780,39 +824,6 @@ export default { ...@@ -780,39 +824,6 @@ export default {
this.productList.splice(index, 1) this.productList.splice(index, 1)
}) })
}, },
getCoupons(){
console.log('getCoupons')
// if(!this.form.consigneeContactsId || !this.form.consignorContactsId) return false
let data = Object.assign({}, this.form, {
prodConditionParamList: this.productList,
consigneeCustomerContactsId: this.form.consigneeId,
consignorCustomerContactsId: this.form.consignorId
})
getCustomerAvailableCouponList(data)
.then(res => {
// 对优惠信息按照商品 + 类型 分组展示
let list = {}
res.data.couponAvailableGroupDtoList.forEach(item => {
item.couponAvailableDtoList.forEach(coupon => {
let key = item.prodId + '_' + coupon.type
if(!list[key]){
list[key] = {
selectedIndex: null,
options: [],
prodId: item.prodId,
type: coupon.type
}
}
list[key].options.push(coupon)
})
})
this.couponList = Object.values(list)
})
},
// 显示更多报价
showMorePrice(index){
console.log('显示更多报价', index)
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
...@@ -887,11 +898,13 @@ export default { ...@@ -887,11 +898,13 @@ export default {
customsType: this.form.customsType, customsType: this.form.customsType,
isCargoControl: this.form.control, isCargoControl: this.form.control,
orderType: this.form.orderType, orderType: this.form.orderType,
}).then(res => { }).then(res => {
this.$set(this, 'fee', res.data.costDto) this.$set(this, 'fee', res.data.costDto)
this.$set(this, 'couponTotalAmountList', res.data.availableDto.couponTotalAmountList)
this.$set(this, 'couponAvailableGroupDtoList', res.data.availableDto.couponAvailableGroupDtoList)
this.productList.map((item, index) => { this.productList.map((item, index) => {
this.$set(item, 'fee', res.data.prodCostDtoList[index]) this.$set(item, 'fee', res.data.prodCostDtoList[index] || null)
}) })
}).finally(() => { }).finally(() => {
this.calculating = false this.calculating = false
...@@ -908,7 +921,17 @@ export default { ...@@ -908,7 +921,17 @@ export default {
flex: 1; flex: 1;
} }
} }
.mt-10{ .form-section{
margin-top: 10px; .contact{
display: flex;
align-items: center;
img.phonebook{
width: 30px;
height: 30px;
margin-left: 10px;
cursor: pointer;
}
}
} }
</style> </style>
\ No newline at end of file
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<div class="" v-if="agreement"> <div class="" v-if="agreement">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px">
<el-form-item :label="$t('原控货人')"> <el-form-item :label="$t('原控货人')">
<el-input v-model="cargoControlName" readonly></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 v-model="cargoControlPhone" readonly></el-input> <el-input :value="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,7 +49,8 @@ export default { ...@@ -49,7 +49,8 @@ export default {
orderId: [String, Number], orderId: [String, Number],
cargoControlName: String, cargoControlName: String,
cargoControlPhone: String, cargoControlPhone: String,
orderNo: String orderNo: String,
}, },
components: {SendSmsCode, NeedKnow, AreaCodeSelector}, components: {SendSmsCode, NeedKnow, AreaCodeSelector},
data(){ data(){
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
<el-col :span="8" v-if="order.consignorVO"> <el-col :span="8" v-if="order.consignorVO">
<el-descriptions class="margin-top" border :title="$t('发货人')" :column="1" :labelStyle="{width:'150px'}"> <el-descriptions class="margin-top" border :title="$t('发货人')" :column="1" :labelStyle="{width:'150px'}">
<el-descriptions-item :label="$t('发货人')">{{order.consignorVO.name}}</el-descriptions-item> <el-descriptions-item :label="$t('发货人')">{{order.consignorVO.name}}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人电话')">{{order.consignorVO.phone}}</el-descriptions-item> <el-descriptions-item :label="$t('发货人电话')">
{{order.consignorVO.countryCode}} {{order.consignorVO.phone}}
</el-descriptions-item>
<el-descriptions-item :label="$t('发货人邮箱')">{{order.consignorVO.email}}</el-descriptions-item> <el-descriptions-item :label="$t('发货人邮箱')">{{order.consignorVO.email}}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司名称')"> <el-descriptions-item :label="$t('发货人公司名称')">
{{order.consignorVO.company}} {{order.consignorVO.company}}
...@@ -19,7 +21,9 @@ ...@@ -19,7 +21,9 @@
<el-col :span="16" v-if="order.consigneeVO"> <el-col :span="16" v-if="order.consigneeVO">
<el-descriptions class="margin-top" border :title="$t('收货人')" :column="2" :labelStyle="{width:'150px'}"> <el-descriptions class="margin-top" border :title="$t('收货人')" :column="2" :labelStyle="{width:'150px'}">
<el-descriptions-item :label="$t('收货人')">{{order.consigneeVO.name}}</el-descriptions-item> <el-descriptions-item :label="$t('收货人')">{{order.consigneeVO.name}}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人电话')">{{order.consigneeVO.phone}}</el-descriptions-item> <el-descriptions-item :label="$t('收货人电话')">
{{order.consigneeVO.countryCode}} {{order.consigneeVO.phone}}
</el-descriptions-item>
<el-descriptions-item :label="$t('收货人邮箱')">{{order.consigneeVO.email}}</el-descriptions-item> <el-descriptions-item :label="$t('收货人邮箱')">{{order.consigneeVO.email}}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人公司名称')"> <el-descriptions-item :label="$t('收货人公司名称')">
{{order.consigneeVO.company}} {{order.consigneeVO.company}}
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<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"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('出货渠道')" prop="channelId" required v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" :error="$t('请选择出货渠道')"> <el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'">
<selector <selector
:disabled="form.status !== 0 || getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'" :disabled="form.status !== 0 || getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-model="form.channelId" v-model="form.channelId"
...@@ -119,25 +119,6 @@ ...@@ -119,25 +119,6 @@
</template> </template>
</select> </select>
</div> </div>
<!-- <el-descriptions :column="3" border>
<el-descriptions-item :label="$t('运输方式')" :labelStyle="labelStyle">
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" :labelStyle="labelStyle">
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="2" border>
<el-descriptions-item :label="$t('始发城市')" :labelStyle="labelStyle">
</el-descriptions-item>
<el-descriptions-item :label="$t('目的城市')" :labelStyle="labelStyle">
</el-descriptions-item>
<el-descriptions-item :label="$t('请选择线路')" :span="2" :labelStyle="labelStyle">
</el-descriptions-item>
</el-descriptions> -->
</el-card> </el-card>
<el-card class="mt-10"> <el-card class="mt-10">
<div slot="header" class="card-title"> <div slot="header" class="card-title">
...@@ -255,7 +236,7 @@ ...@@ -255,7 +236,7 @@
</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="{row}">
<el-input v-model="row.expressNo" placeholder="缺少字段" /> <el-input v-model="row.expressNo" placeholder="" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -344,46 +325,47 @@ ...@@ -344,46 +325,47 @@
<el-card class="mt-10"> <el-card class="mt-10">
<div class="card-title" slot="header">{{$t('通用')}}</div> <div class="card-title" slot="header">{{$t('通用')}}</div>
<div class="form-section">
<el-descriptions :column="2" border> <el-form-item label="唛头" prop="marks" >
<el-descriptions-item :label="$t('唛头')"> <el-input v-model="form.marks" placeholder=""></el-input>
<el-form-item label="" prop="marks" label-width="0" style="margin-bottom: 0" > </el-form-item>
<el-input v-model="form.marks" placeholder=""></el-input> <el-form-item label="是否控货" prop="marks" class="ml-20">
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('是否控货')">
<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-descriptions-item> </el-form-item>
</div>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项--> <div class="form-section" v-if="collectionProxy">
<el-descriptions-item :label="$t('是否代收货款')" v-if="collectionProxy"> <el-form-item :label="$t('是否代收货款')" prop="isCollection">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCollection" form-type="radio" /> <dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCollection" form-type="radio" />
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('代收货款金额')" v-if="collectionProxy"> <!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-form-item :label="$t('代收货款金额')" v-if="collectionProxy && form.isCollection" prop="collectionProxy" class="ml-20">
<el-input v-model="form.collectionProxy" placeholder="" class="w-200 mr-10"></el-input> <el-input v-model="form.collectionProxy" placeholder="" class="w-200 mr-10"></el-input>
<selector v-model="form.collectionProxyCurrency" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100" /> <selector v-model="form.collectionProxyCurrency" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100" />
</el-descriptions-item> </el-form-item>
</div>
<el-descriptions-item :label="$t('单证报关')" :span="2"> <div class="form-section">
<el-form-item :label="$t('单证报关')" :span="2" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" defaultable /> <dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" defaultable />
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('出单方式')"> </div>
<div>
<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-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('送货日期')"> <el-form-item :label="$t('送货日期')" prop="deliveryDate" class="ml-20">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="deliveryDate"> <el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> </el-form-item>
</el-form-item> </div>
</el-descriptions-item> <div>
<el-form-item :label="$t('入仓类型')" prop="warehouseType">
<el-descriptions-item :label="$t('入仓类型')">
<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-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('收货方式')"> <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-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('收货地区')" :span="2" v-if="homeDeliveryService"> </div>
<div v-if="homeDeliveryService && form.harvestMethod == 2">
<el-form-item :label="$t('收货地区')">
<area-selector <area-selector
:country="form.consigneeVO ? form.consigneeVO.country : undefined" :country="form.consigneeVO ? form.consigneeVO.country : undefined"
:province="form.consigneeVO ? form.consigneeVO.province : undefined" :province="form.consigneeVO ? form.consigneeVO.province : undefined"
...@@ -392,24 +374,24 @@ ...@@ -392,24 +374,24 @@
@provinceChange="onAreaChange('province', $event)" @provinceChange="onAreaChange('province', $event)"
@cityChange="onAreaChange('city', $event)" @cityChange="onAreaChange('city', $event)"
></area-selector> ></area-selector>
</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('收货详细地址')" :span="2" v-if="homeDeliveryService"> <el-form-item :label="$t('收货详细地址')" prop="consigneeAddress">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeAddress"> <el-input v-model="form.consigneeAddress" placeholder=""></el-input>
<el-input v-model="form.consigneeAddress" placeholder=""></el-input> </el-form-item>
</el-form-item> </div>
</el-descriptions-item> <div>
<el-form-item :label="$t('付款人')" prop="drawee">
<el-descriptions-item :label="$t('付款人')" :span="2">
<dict-selector :type="DICT_TYPE.DRAWEE" v-model="form.drawee" defaultable form-type="radio" /> <dict-selector :type="DICT_TYPE.DRAWEE" v-model="form.drawee" defaultable form-type="radio" />
</el-descriptions-item> <el-table :data="customDraweeList" v-if="form.drawee==3" >
<el-descriptions-item v-if="form.drawee==3" :label="$t('费用类型')" :span="2"> <el-table-column label="费用类型" prop="label" width="200px"></el-table-column>
<template v-for="(item,index) in customDraweeList" v-key="index"> <el-table-column label="付款人" width="300px">
<el-form-item :label="item.label" :key="index" > <template slot-scope="{row}">
<dict-selector :type="DICT_TYPE.DRAWEE" :filter="(e) => e.value == '1' || e.value == '2'" v-model="item.value" form-type="radio" /> <dict-selector :type="DICT_TYPE.DRAWEE" :filter="(e) => e.value == '1' || e.value == '2'" v-model="row.value" form-type="radio" />
</el-form-item> </template>
</template> </el-table-column>
</el-descriptions-item> </el-table>
</el-descriptions> </el-form-item>
</div>
</el-card> </el-card>
<el-card class="mt-10" v-if="transport"> <el-card class="mt-10" v-if="transport">
...@@ -419,6 +401,7 @@ ...@@ -419,6 +401,7 @@
<el-button type="primary" slot="append" @click="getOrderCourierNumber">{{$t('生成单号')}}</el-button> <el-button type="primary" slot="append" @click="getOrderCourierNumber">{{$t('生成单号')}}</el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
<br/>
<el-form-item :label="$t('是否双清')" v-if="[2,3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('是否双清')" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" /> <dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" />
</el-form-item> </el-form-item>
...@@ -442,14 +425,17 @@ ...@@ -442,14 +425,17 @@
<el-form-item label="是否拆包" v-if="[3,4].indexOf(+form.transportId) > -1"> <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" /> <dict-selector v-model="form.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('单票立刻转运')" v-if="[3,4].indexOf(+form.transportId) > -1"> <div class="form-section">
<dict-selector v-model="form.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" /> <el-form-item :label="$t('单票立刻转运')" v-if="[3,4].indexOf(+form.transportId) > -1">
<span style="margin-left:10px">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span> <dict-selector v-model="form.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item> <span style="margin-left:10px">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span>
</el-form-item>
<el-form-item :label="$t('特殊要求')" > </div>
<dict-selector v-model="form.packageType" form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple /> <div class="form-section">
</el-form-item> <el-form-item :label="$t('特殊要求')" >
<dict-selector v-model="form.packageType" form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple />
</el-form-item>
</div>
<el-form-item :label="$t('特殊要求备注')"> <el-form-item :label="$t('特殊要求备注')">
<el-input v-model="form.packageRemarks" ></el-input> <el-input v-model="form.packageRemarks" ></el-input>
</el-form-item> </el-form-item>
...@@ -459,7 +445,7 @@ ...@@ -459,7 +445,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)">{{$t('新建')}}</el-button> <!--待入仓-->
<el-button @click="$router.back()">{{$t('返回')}}</el-button> <el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -514,7 +500,7 @@ import {getTradeCityList} from '@/api/ecw/region' ...@@ -514,7 +500,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 { getCustomer } from '@/api/ecw/customer'; import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts';
import AreaSelector from '@/components/AreaSelector' import AreaSelector from '@/components/AreaSelector'
import {calculationPrice} from '@/api/ecw/product' import {calculationPrice} from '@/api/ecw/product'
import {getCustomerAvailableCouponList} from '@/api/ecw/coupon' import {getCustomerAvailableCouponList} from '@/api/ecw/coupon'
...@@ -745,12 +731,27 @@ export default { ...@@ -745,12 +731,27 @@ export default {
this.form = res.data this.form = res.data
/* this.form.consignorContactsId = res.data.consignorVO.customerContactsId /* this.form.consignorContactsId = res.data.consignorVO.customerContactsId
this.form.consigneeContactsId = res.data.consigneeVO.customerContactsId */ this.form.consigneeContactsId = res.data.consigneeVO.customerContactsId */
this.form.deliveryDate = res.data.consigneeVO.deliveryDate
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.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, 'consignorContactsId', res.data.consignorVO.customerContactsId)
this.$set(this.form, 'consignorCountryCode', res.data.consignorVO.countryCode)
this.$set(this.form, 'consignorEmail', res.data.consignorVO.email)
this.$set(this.form, 'consignorId', res.data.consignorVO.customerId)
this.$set(this.form, 'consignorName', res.data.consignorVO.name)
this.$set(this.form, 'consignorPhone', res.data.consignorVO.phone)
this.$set(this.form, 'consigneeCompany', res.data.consigneeVO.company)
this.$set(this.form, 'consigneeContactsId', res.data.consigneeVO.customerContactsId)
this.$set(this.form, 'consigneeCountryCode', res.data.consigneeVO.countryCode)
this.$set(this.form, 'consigneeEmail', res.data.consigneeVO.email)
this.$set(this.form, 'consigneeId', res.data.consigneeVO.customerId)
this.$set(this.form, 'consigneeName', res.data.consigneeVO.name)
this.$set(this.form, 'consigneePhone', res.data.consigneeVO.phone)
}) })
}else this.addProduct() }else this.addProduct()
...@@ -769,6 +770,11 @@ export default { ...@@ -769,6 +770,11 @@ 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
...@@ -940,7 +946,7 @@ export default { ...@@ -940,7 +946,7 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
// type 在新建的时候表示状态,0草稿,2带入仓 // type 在新建的时候表示状态,0草稿,2带入仓
submitForm(type) { submitForm(submitType) {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (!valid) { if (!valid) {
return; return;
...@@ -976,11 +982,11 @@ export default { ...@@ -976,11 +982,11 @@ export default {
consignorId: this.consignorContact.customerId, consignorId: this.consignorContact.customerId,
customerId : this.consignorContact.customerId, customerId : this.consignorContact.customerId,
couponIds: coupons.join(","), couponIds: coupons.join(","),
status: type
}, 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.productList,
status: submitType
}) })
data.type = data.type.join(',') data.type = data.type.join(',')
// 添加的提交 // 添加的提交
......
<template> <template>
<div> <div>
<el-dialog <el-dialog
title="入仓-货物入仓" title="入仓-货物入仓"
:visible.sync="opened" :visible.sync="opened"
width="960px" width="960px"
> >
<el-descriptions border :column="2"> <el-tabs v-model="activeName" type="card" @tab-click="handleTabs">
<el-descriptions-item label="中文品名">{{ warehousing.prodTitleZh }}</el-descriptions-item> <el-tab-pane label="货物入仓" name="first">
<el-descriptions-item label="英文品名">{{ warehousing.prodTitleEn }}</el-descriptions-item> <el-descriptions border :column="2">
<el-descriptions-item label="品牌"> <el-descriptions-item label="中文品名">{{ warehousing.prodTitleZh }}</el-descriptions-item>
<span v-if="warehousing.orderWarehouseInBackItemDoList && warehousing.orderWarehouseInBackItemDoList.length">{{ form.brand ? brand : '' }}</span> <el-descriptions-item label="英文品名">{{ warehousing.prodTitleEn }}</el-descriptions-item>
<el-select <el-descriptions-item label="品牌">
v-else v-model="form.brand" <span v-if="warehousing.orderWarehouseInBackItemDoList && warehousing.orderWarehouseInBackItemDoList.length">{{ form.brand ? brand : '' }}</span>
placeholder="可修改" <el-select
filterable v-else v-model="form.brand"
@change="handleBrandChange" placeholder="可修改"
allow-create> filterable
<el-option @change="handleBrandChange"
v-for="item in brandList" allow-create>
:key="item.id" <el-option
:label="item.titleZh" v-for="item in brandList"
:value="item.id"> :key="item.id"
</el-option> :label="item.titleZh"
</el-select> :value="item.id">
</el-descriptions-item> </el-option>
<el-descriptions-item label="是否备案">{{ isBeian }}</el-descriptions-item> </el-select>
<el-descriptions-item label="收费模式">{{ feeType }}</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="填单参数"> <el-descriptions-item label="是否备案">{{ isBeian }}</el-descriptions-item>
箱数:{{ warehousing.num }}<br> <el-descriptions-item label="收费模式">{{ feeType }}</el-descriptions-item>
体积:{{ warehousing.volume }}<br> <el-descriptions-item label="填单参数">
重量:{{ warehousing.weight }}Kg 箱数:{{ warehousing.num }}<br>
</el-descriptions-item> 体积:{{ warehousing.volume }}<br>
</el-descriptions> 重量:{{ warehousing.weight }}Kg
<el-form ref="form" :model="form" label-width="80px" style="margin-top: 20px"> </el-descriptions-item>
<el-form-item label="材质"> </el-descriptions>
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material"></dict-selector> <el-form ref="form" :model="form" label-width="80px" style="margin-top: 20px">
</el-form-item> <el-form-item label="材质">
<el-form-item label="入仓时间"> <dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material"></dict-selector>
<el-date-picker v-model="form.inTime" type="datetime" placeholder="请选择入仓时间" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> </el-form-item>
</el-form-item> <el-form-item label="入仓时间">
</el-form> <el-date-picker v-model="form.inTime" type="datetime" placeholder="请选择入仓时间" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>入仓记录</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column label="箱数">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].cartonsNum }}</span>
<el-input v-else v-model="tableData[$index].cartonsNum" placeholder=""></el-input>
<span>{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].unit) }}</span>
</template>
</el-table-column>
<el-table-column label="包装类型">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGE_TYPE" v-model="tableData[$index].unit"></dict-selector>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else v-model.number="tableData[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else v-model.number="tableData[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else v-model.number="tableData[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].volume }}</span>
<el-input v-else v-model.number="tableData[$index].volume" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].weight }}</span>
<el-input v-else v-model.number="tableData[$index].weight" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="数量" width="130px">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].quantityAll }}</span>
<el-input v-else v-model.number="tableData[$index].quantityAll" placeholder="">
<template slot="append"></template>
</el-input>
</template>
</el-table-column>
<el-table-column label="快递单号">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].expressNo }}</span>
<el-input v-else v-model="tableData[$index].expressNo" placeholder=""></el-input>
</template>
</el-table-column>
</el-table>
</el-card>
</el-tab-pane>
<el-tab-pane label="添加新品名" name="second">
<el-descriptions border :column="2">
<el-descriptions-item label="中文品名">
<product-selector v-model="form1.prodId" @change="onProductChange"/>
</el-descriptions-item>
<el-descriptions-item label="英文品名">
<product-selector lang="En" v-model="form1.prodId" @change="onProductChange"/>
</el-descriptions-item>
<el-descriptions-item label="品牌">
<el-select
v-model="form1.brand"
placeholder="可修改"
filterable
@change="handleBrandChange"
allow-create>
<el-option
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="是否备案">{{ isBeian1 }}</el-descriptions-item>
<el-descriptions-item label="收费模式">{{ feeType1 }}</el-descriptions-item>
<el-descriptions-item label="填单参数">非填单货物</el-descriptions-item>
</el-descriptions>
<el-form ref="form" :model="form" label-width="80px" style="margin-top: 20px">
<el-form-item label="材质">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form1.material"></dict-selector>
</el-form-item>
<el-form-item label="入仓时间">
<el-date-picker v-model="form1.inTime" type="datetime" placeholder="请选择入仓时间" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>入仓记录</span> <span>入仓记录</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete"></el-button> <el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete(1)"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button> <el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd(1)"></el-button>
</div> </div>
<el-table <el-table
:data="tableData" :data="tableData1"
style="width: 100%"> style="width: 100%">
<el-table-column label="箱数"> <el-table-column label="箱数">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].cartonsNum }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].cartonsNum }}</span>
<el-input v-else v-model="tableData[$index].cartonsNum" placeholder=""></el-input> <el-input v-else v-model="tableData1[$index].cartonsNum" placeholder=""></el-input>
<span>{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].unit) }}</span> <span>{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData1[$index].unit) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="包装类型"> <el-table-column label="包装类型">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].unit) }}</span> <span v-if="tableData1[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData1[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGE_TYPE" v-model="tableData[$index].unit"></dict-selector> <dict-selector v-else :type="DICT_TYPE.ECW_PACKAGE_TYPE" v-model="tableData1[$index].unit"></dict-selector>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="长(cm)"> <el-table-column label="长(cm)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[0] : '' }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else v-model.number="tableData[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input> <el-input v-else v-model.number="tableData1[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="宽(cm)"> <el-table-column label="宽(cm)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[1] : '' }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else v-model.number="tableData[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input> <el-input v-else v-model.number="tableData1[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="高(cm)"> <el-table-column label="高(cm)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[2] : '' }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else v-model.number="tableData[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input> <el-input v-else v-model.number="tableData1[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="体积(m³)"> <el-table-column label="体积(m³)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].volume }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].volume }}</span>
<el-input v-else v-model.number="tableData[$index].volume" placeholder=""></el-input> <el-input v-else v-model.number="tableData1[$index].volume" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量(Kg)"> <el-table-column label="重量(Kg)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].weight }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].weight }}</span>
<el-input v-else v-model.number="tableData[$index].weight" placeholder=""></el-input> <el-input v-else v-model.number="tableData1[$index].weight" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" width="130px"> <el-table-column label="数量" width="130px">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].quantityAll }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].quantityAll }}</span>
<el-input v-else v-model.number="tableData[$index].quantityAll" placeholder=""> <el-input v-else v-model.number="tableData1[$index].quantityAll" placeholder="">
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="快递单号"> <el-table-column label="快递单号">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].expressNo }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].expressNo }}</span>
<el-input v-else v-model="tableData[$index].expressNo" placeholder=""></el-input> <el-input v-else v-model="tableData1[$index].expressNo" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-tab-pane>
</el-tabs>
<div v-if="edit"> <div v-if="edit">
<h2>审批流程</h2> <h2>审批流程</h2>
...@@ -133,13 +242,15 @@ import { orderWarehouseIn, orderWarehouseInUpdateApply } from '@/api/ecw/order' ...@@ -133,13 +242,15 @@ import { orderWarehouseIn, orderWarehouseInUpdateApply } from '@/api/ecw/order'
import { getFeeTypeByCustomerProduct, getProductBrankPage } from '@/api/ecw/productBrank' import { getFeeTypeByCustomerProduct, getProductBrankPage } from '@/api/ecw/productBrank'
import WorkFlow from "@/components/WorkFlow" import WorkFlow from "@/components/WorkFlow"
import elSelect from '@/components/render/slots/el-select' import elSelect from '@/components/render/slots/el-select'
import ProductSelector from "@/components/ProductSelector"
export default { export default {
name: 'editDialog', name: 'editDialog',
components: { components: {
dictSelector, dictSelector,
WorkFlow WorkFlow,
ProductSelector
}, },
props: { props: {
...@@ -216,9 +327,29 @@ export default { ...@@ -216,9 +327,29 @@ export default {
feeType: 0, feeType: 0,
recordMode: undefined recordMode: undefined
}, },
form1: {
"brand": "",
"brandType": 0,
"inTime": "",
"material": "",
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"orderWarehouseInItemDoList": [],
"prodAttrIds": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"type": 1,
feeType: 0,
recordMode: undefined
},
// orderItem: {}, // orderItem: {},
selectedUsers: undefined selectedUsers: undefined,
activeName: 'first'
}; };
}, },
...@@ -241,10 +372,23 @@ export default { ...@@ -241,10 +372,23 @@ export default {
} else { } else {
this.$emit('update:visible', false) this.$emit('update:visible', false)
} }
},
warehousing(newVal, oldVal){
if(newVal.orderItemId !== oldVal.orderItemId){
this.form.orderWarehouseInItemDoList = []
this.form1.orderWarehouseInItemDoList = []
this.activeName = 'first'
}
} }
}, },
methods: { methods: {
onProductChange(product){
console.log(product)
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
},
handleTabs(){},
handleBrandChange(v){ handleBrandChange(v){
getFeeTypeByCustomerProduct({ getFeeTypeByCustomerProduct({
brandId: parseInt(v), brandId: parseInt(v),
...@@ -252,17 +396,17 @@ export default { ...@@ -252,17 +396,17 @@ export default {
customerId: this.customerId customerId: this.customerId
}).then(r => { }).then(r => {
if(r.code === 0){ if(r.code === 0){
this.form.feeType = parseInt(r.data.feeType) (this.activeName === "first" ? this.form : this.form1).feeType = parseInt(r.data.feeType);
this.form.recordMode = parseInt(r.data.recordMode) (this.activeName === "first" ? this.form : this.form1).recordMode = parseInt(r.data.recordMode)
} }
}) })
}, },
handleVolume(index){ handleVolume(index, val){
const {boxGauge1, boxGauge2, boxGauge3} = this.tableData[index] const {boxGauge1, boxGauge2, boxGauge3} = (val === 1 ? this.tableData1 : this.tableData)[index]
if (boxGauge1 && boxGauge2 && boxGauge3) { if (boxGauge1 && boxGauge2 && boxGauge3) {
this.tableData[index].volume = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000).toFixed(2) (val === 1 ? this.tableData1 : this.tableData)[index].volume = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000).toFixed(2)
} else { } else {
this.tableData[index].volume = 0 (val === 1 ? this.tableData1 : this.tableData)[index].volume = 0
} }
}, },
handleSubmit() { handleSubmit() {
...@@ -275,7 +419,29 @@ export default { ...@@ -275,7 +419,29 @@ export default {
} }
}) })
] ]
if (this.edit) if (this.activeName !== "first"){
return orderWarehouseIn({
...this.form1,
brandType: this.form1.brand ? 1 : 0,
orderId: this.warehousing.orderId,
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
orderWarehouseInItemDoList: this.form1.orderWarehouseInItemDoList.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3
}
})
}).then(r => {
if (r.data){
this.$message.success('新增入仓成功')
this.handleClose()
}else {
this.$message.success('新增入仓失败')
}
})
}
else if (this.edit)
return orderWarehouseInUpdateApply({ return orderWarehouseInUpdateApply({
...this.form, ...this.form,
brandType: this.form.brand ? 1 : 0, brandType: this.form.brand ? 1 : 0,
...@@ -313,18 +479,26 @@ export default { ...@@ -313,18 +479,26 @@ export default {
this.form.orderWarehouseInItemDoList = [] this.form.orderWarehouseInItemDoList = []
this.opened = false this.opened = false
}, },
handleDelete() { handleDelete(val) {
this.form.orderWarehouseInItemDoList.pop() (val === 1 ? this.form1 : this.form).orderWarehouseInItemDoList.pop()
}, },
handleAdd() { handleAdd(val) {
this.form.orderWarehouseInItemDoList.push({ let cartonsNum = '';
if (val !== 1) {
let hasCartonsNum = 0
this.tableData.forEach(e => {
hasCartonsNum += e.cartonsNum
})
cartonsNum = this.warehousing.num - hasCartonsNum
}
(val === 1 ? this.form1 : this.form).orderWarehouseInItemDoList.push({
"boxGauge1": "", "boxGauge1": "",
"boxGauge2": "", "boxGauge2": "",
"boxGauge3": "", "boxGauge3": "",
"cartonsNum": "", "cartonsNum": cartonsNum > 0 ? cartonsNum : '',
"expressNo": "", "expressNo": "",
"quantityAll": "", "quantityAll": "",
"unit": "", "unit": "package",
"volume": '', "volume": '',
"weight": '' "weight": ''
}) })
...@@ -335,9 +509,15 @@ export default { ...@@ -335,9 +509,15 @@ export default {
brandObject(){ brandObject(){
return this.brandList.find(e => e.id === this.form.brand) || '' return this.brandList.find(e => e.id === this.form.brand) || ''
}, },
brandObject1(){
return this.brandList.find(e => e.id === this.form1.brand) || ''
},
tableData() { tableData() {
return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList] return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList]
}, },
tableData1() {
return this.form1.orderWarehouseInItemDoList
},
isBeian(){ isBeian(){
if (this.form.recordMode !== undefined){ if (this.form.recordMode !== undefined){
return ['无备案', '有备案', '中性'][this.form.recordMode] return ['无备案', '有备案', '中性'][this.form.recordMode]
...@@ -348,18 +528,34 @@ export default { ...@@ -348,18 +528,34 @@ export default {
return '' return ''
} }
}, },
isBeian1(){
if (this.form1.recordMode !== undefined){
return ['无备案', '有备案', '中性'][this.form1.recordMode]
}
if (this.brandObject1.filing){
return ['无备案', '有备案', '中性'][this.brandObject1.filing]
} else {
return ''
}
},
/** /**
* 收费模式 * 收费模式
* @returns {string} * @returns {string} 无牌价0,有牌价1,中性品牌价2
*/ */
feeType(){ feeType(){
// 无牌价0,有牌价1,中性品牌价2
const feeType = parseInt(this.form.feeType) const feeType = parseInt(this.form.feeType)
if (feeType >= 0 && feeType < 3) { if (feeType >= 0 && feeType < 3) {
return ['无牌价', '有牌价', '中性品牌价'][feeType] return ['无牌价', '有牌价', '中性品牌价'][feeType]
} }
return '' return ''
}, },
feeType1(){
const feeType = parseInt(this.form1.feeType)
if (feeType >= 0 && feeType < 3) {
return ['无牌价', '有牌价', '中性品牌价'][feeType]
}
return ''
},
brand(){ brand(){
if (!!this.form.brand){ if (!!this.form.brand){
const brand = this.brandList.find(e => e.id === this.form.brand) const brand = this.brandList.find(e => e.id === this.form.brand)
......
...@@ -3,16 +3,22 @@ ...@@ -3,16 +3,22 @@
<el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px" <el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px"
label-position="left"> label-position="left">
<el-form-item :label="$t('公司全称')" prop="companyZh"> <el-form-item :label="$t('公司全称')" prop="companyZh">
<el-input v-model="formData.companyZh" :placeholder="$t('请输入公司全称')" show-word-limit clearable <el-input v-model="formData.companyZh" :placeholder="$t('请输入公司全称')" show-word-limit clearable></el-input>
:style="{width: '100%'}"></el-input> </el-form-item>
<el-form-item :label="$t('英文名称')" prop="companyEn">
<el-input v-model="formData.companyZh" :placeholder="$t('请输入公司英文名')" show-word-limit clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('代理名称')" prop="agentName"> <!-- <el-form-item :label="$t('代理名称')" prop="agentName">
<el-input v-model="formData.agentName" :placeholder="$t('请输入代理名称')" clearable :style="{width: '100%'}"> <el-input v-model="formData.agentName" :placeholder="$t('请输入代理名称')" clearable :style="{width: '100%'}">
</el-input> </el-input>
</el-form-item> </el-form-item> -->
<el-form-item :label="$t('公司电话')" prop="tell"> <el-form-item :label="$t('公司电话')" prop="tell">
<el-input v-model="formData.tell" :placeholder="$t('请输入公司电话')" clearable :style="{width: '100%'}"></el-input> <el-input v-model="formData.tell" :placeholder="$t('请输入公司电话')" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('邮件地址')" prop="email">
<el-input v-model="formData.email" :placeholder="$t('请输入邮箱地址')" clearable></el-input>
</el-form-item>
<el-form-item :label="$t('公司地址')" prop="address"> <el-form-item :label="$t('公司地址')" prop="address">
<!-- <el-select v-model="formData.country"> <!-- <el-select v-model="formData.country">
<el-option v-for="(item, index) in treeList" :value="item.id" :label="item.titleZh" :key="item.id" /> <el-option v-for="(item, index) in treeList" :value="item.id" :label="item.titleZh" :key="item.id" />
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<work-flow xmlkey="free_apply" v-model="selectedUsers" /> <work-flow xmlkey="free_apply" v-model="selectedUsers" />
<div>选择的用户:{{selectedUsers}}</div> <div>选择的用户:{{selectedUsers}}</div>
</el-card> </el-card>
<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>
...@@ -109,7 +110,7 @@ export default { ...@@ -109,7 +110,7 @@ export default {
}, },
created() { created() {
this.handlerBpm(); this.handlerBpm();
}, },
methods: { methods: {
handleSetLineChartData(type) { handleSetLineChartData(type) {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="type"> <el-form-item label="类型" prop="type">
<el-select v-model="queryParams.type" placeholder="公告类型" clearable> <el-select v-model="queryParams.type" placeholder="公告类型" clearable>
<el-option v-for="dict in noticeTypeDictDatas" :key="parseInt(dict.value)" :label="dict.label" :value="parseInt(dict.value)"/> <el-option v-for="dict in noticeTypeDictDatas" :key="parseInt(dict.value)" :label="$l(dict, 'label')" :value="parseInt(dict.value)"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -39,14 +39,19 @@ ...@@ -39,14 +39,19 @@
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建者" align="center" prop="createBy" width="100" /> <el-table-column label="有效日期" align="center" prop="validateDate" width="150" >
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.validateDate, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <!-- <el-table-column label="创建者" align="center" prop="createBy" width="150"/>-->
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template slot-scope="scope" >
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:notice:update']">修改</el-button> v-hasPermi="['system:notice:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
...@@ -67,6 +72,11 @@ ...@@ -67,6 +72,11 @@
<el-input v-model="form.title" placeholder="请输入公告标题" /> <el-input v-model="form.title" placeholder="请输入公告标题" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="标题英文" prop="title">
<el-input v-model="form.titleEn" placeholder="请输入标题英文" />
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="公告类型" prop="type"> <el-form-item label="公告类型" prop="type">
<el-select v-model="form.type" placeholder="请选择"> <el-select v-model="form.type" placeholder="请选择">
...@@ -79,7 +89,7 @@ ...@@ -79,7 +89,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12">
<el-form-item label="状态"> <el-form-item label="状态">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
<el-radio <el-radio
...@@ -90,11 +100,23 @@ ...@@ -90,11 +100,23 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="有效日期">
<el-date-picker type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" :editable="false"
v-model="form.validateDate"
style="width: 100%;"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="内容"> <el-form-item label="内容">
<editor v-model="form.content" :min-height="192"/> <editor v-model="form.content" :min-height="192"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-form-item label="内容英文">
<editor v-model="form.contentEn" :min-height="192"/>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -181,8 +203,10 @@ export default { ...@@ -181,8 +203,10 @@ export default {
this.form = { this.form = {
id: undefined, id: undefined,
title: undefined, title: undefined,
titleEn: undefined,
type: undefined, type: undefined,
content: undefined, content: undefined,
contentEn: undefined,
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