Commit f29aa01d authored by dcy's avatar dcy

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

parents 1251204f 77044bcf
......@@ -50,23 +50,35 @@ export default {
padding: 50px;
text-align: center;
}
$sizes: 10,20,30,50,100,150,200,500,800,1000;
$sizes: 0, 10,20,30,50,100,150,200,500,800,1000;
@for $i from 1 through length($sizes){
$item: nth($sizes, $i);
.ml-#{$item}{
margin-left: #{$item}px;
margin-left: #{$item}px !important;
}
.mr-#{$item}{
margin-right: #{$item}px;
margin-right: #{$item}px !important;
}
.mb-#{$item}{
margin-bottom: #{$item}px;
margin-bottom: #{$item}px !important;
}
.mt-#{$item}{
margin-top: #{$item}px;
margin-top: #{$item}px !important;
}
.pl-#{$item}{
margin-left: #{$item}px !important;
}
.pr-#{$item}{
margin-right: #{$item}px !important;
}
.pb-#{$item}{
margin-bottom: #{$item}px !important;
}
.pt-#{$item}{
margin-top: #{$item}px !important;
}
.w-#{$item}{
width: #{$item}px;
width: #{$item}px !important;
}
}
</style>
......@@ -377,6 +377,24 @@ export function getOrderSpecialByApproveId(approveId) {
})
}
// 订单号检索功能
export function getOrderNoSearch(params) {
return request({
url: '/ecw/order/orderNoSearch',
method: 'get',
params
})
}
// 提单号检索功能
export function getBillNoSearch(params) {
return request({
url: '/ecw/order/billNoSearch',
method: 'get',
params
})
}
// 根据合并订单编号获得已合单的订单动态
export function getMergeLogByMergedOrderNo(params){
return request({
......
......@@ -34,6 +34,15 @@ export function getZhongPao(id) {
})
}
// 获得客户最优惠的重泡货配置
export function getZhongPaoBest(query) {
return request({
url: '/ecw/zhong-pao/get-customer-best-zhong-pao',
method: 'get',
params: query
})
}
// 获得重泡货配置分页
export function getZhongPaoPage(query) {
return request({
......
......@@ -27,6 +27,8 @@
</div>
</div>
</div>
<pagination v-show="total > 0" :total="total" :page.sync="form.pageNo" :limit.sync="form.pageSize"
@pagination="loadList" />
</el-dialog>
</template>
<script>
......@@ -39,11 +41,12 @@ export default {
return {
show: true,
form:{
/* pageNo: 1,
pageSize: 20, */
pageNo: 1,
pageSize: 10,
searchKey: ''
},
list:[]
list:[],
total: 0
}
},
created(){
......@@ -58,6 +61,7 @@ export default {
loadList(){
getCustomerContactsSelect(this.form).then(res => {
this.list = res.data.list
this.total = res.data.total
})
},
closeDialog(){
......
......@@ -124,7 +124,7 @@ export default {
this.$modal.msgSuccess("新增成功");
return getCustomerContactsSelect({customerId: res.data})
}).then(res => {
this.$emit('success', res.data[0])
this.$emit('success', res.data.list[0])
})
});
},
......
......@@ -71,8 +71,8 @@
</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-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-button type="primary" @click="onSubmit(1)">保存</el-button>
......
......@@ -2,7 +2,7 @@
<div>
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row :gutter="10">
<el-col :span="12">
......@@ -207,6 +207,7 @@
<span>联系人</span>
<el-button style="float: right;" size="small" type="primary" @click="handleAddContact">+</el-button>
</div>
<el-form ref="contactForm" :rules="contactRules" :model="form">
<el-table
:data="form.customerContacts"
style="width: 100%"
......@@ -216,8 +217,10 @@
label="部门"
width=""
>
<template v-slot="{ row, column, $index }">
<el-input v-model="row.department" placeholder="请输入部门" size="mini"/>
<template v-slot="{ row }">
<el-form-item label="">
<el-input v-model="row.department" placeholder="请输入部门" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -226,43 +229,51 @@
width=""
>
<template v-slot="{row}">
<el-input v-model="row.position" placeholder="请输入职位" size="mini"/>
<el-form-item label="">
<el-input v-model="row.position" placeholder="请输入职位" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="name"
label="联系人"
>
<template v-slot:header>
<template slot="header">
联系人 <span style="color: #ff0000">*</span>
</template>
<template v-slot="{row}">
<el-input v-model="row.name" placeholder="请输入联系人" size="mini"/>
<template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.name" :prop="'customerContacts.' + $index + '.name'" label="">
<el-input v-model="row.name" placeholder="请输入联系人" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="areaCode"
label="区号"
>
<template v-slot:header>
<template slot="header">
区号 <span style="color: #ff0000">*</span>
</template>
<template v-slot="{row}">
<el-select v-model="row.areaCode" placeholder="请选择区号" filterable>
<el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select>
<template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label="">
<el-select v-model="row.areaCode" placeholder="请选择区号" filterable size="mini">
<el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="phoneNew"
label="联系方式"
>
<template v-slot:header>
<template slot="header">
联系方式 <span style="color: #ff0000">*</span>
</template>
<template v-slot="{row}">
<el-input v-model="row.phoneNew" placeholder="请输入联系方式" size="mini"/>
<template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.phoneNew" :prop="'customerContacts.' + $index + '.phoneNew'" label="">
<el-input v-model="row.phoneNew" placeholder="请输入联系方式" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -270,9 +281,11 @@
label="关联账号"
>
<template v-slot = "{row}">
<el-select v-model="row.userid" @change="selectBD">
<el-option v-for="(item,index) in memberList" :value="item.id" :key="item.id" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select>
<el-form-item label="">
<el-select v-model="row.userid" @change="selectBD" size="mini">
<el-option v-for="(item,index) in memberList" :value="item.id" :key="item.id" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -280,10 +293,12 @@
label="社交软件"
>
<template v-slot="{row}">
<el-select v-model="row.social" placeholder="请选择社交软件">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
<el-form-item label="">
<el-select v-model="row.social" placeholder="请选择社交软件" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -291,7 +306,9 @@
label="社交软件号码"
>
<template v-slot="{row}">
<el-input v-model="row.socialNumber" placeholder="请输入社交软件号码" size="mini"/>
<el-form-item label="">
<el-input v-model="row.socialNumber" placeholder="请输入社交软件号码" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -299,18 +316,22 @@
label="邮箱"
>
<template v-slot="{row}">
<el-input v-model="row.email" placeholder="请输入邮箱" size="mini"/>
<el-form-item label="">
<el-input v-model="row.email" placeholder="请输入邮箱" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="isDefault"
label="设为默认"
>
<template v-slot="{row}">
<el-select v-model="row.isDefault" placeholder="设为默认">
<el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value" :label="dict.label" :value="Number(dict.value)" />
</el-select>
<template v-slot="{ row, column, $index }">
<el-form-item label="">
<el-select v-model="row.isDefault" placeholder="设为默认" @change="handleDefaultChange($index)" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value" :label="dict.label" :value="Number(dict.value)" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -318,10 +339,13 @@
label="操作"
>
<template v-slot="{ row, column, $index }">
<el-button type="danger" @click="form.customerContacts.splice($index, 1)">删除</el-button>
<el-form-item label="">
<el-button type="danger" @click="handleDeleteContact($index)" size="mini">删除</el-button>
</el-form-item>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
<el-row :gutter="10" style="margin-top: 15px">
......@@ -367,7 +391,7 @@
</el-col>
</el-row>
</el-form>
<div style="text-align: right">
<div style="text-align: center">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
......@@ -389,7 +413,7 @@ import {getWarehouseList} from "@/api/ecw/warehouse"
import CustomerLineTable from '@/components/CustomerLineTable'
import {getCustomerSelect} from "@/api/ecw/customer"
import {listServiceUser} from "@/api/system/user"
import {getZhongPaoPage} from '@/api/ecw/zhongPao'
import { getZhongPaoBest, getZhongPaoPage } from '@/api/ecw/zhongPao'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import { getCountryListAll } from '@/api/ecw/country'
import Template from "@/views/cms/template";
......@@ -462,6 +486,13 @@ export default {
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
},
contactRules: {
name: [{ required: true, message: "请输入联系人", trigger: "blur" }],
areaCode: [{ required: true, message: "请选择区号", trigger: "change" }],
phoneNew: [{ required: true, message: "请输入联系方式", trigger: "blur" }],
},
// 网点
nodeList: [],
......@@ -469,7 +500,7 @@ export default {
productList: [],
showZhong: false,
showZhong1: false,
showPao: true,
showPao: false,
showPao1: false,
warehouseList: [], // 仓库列表
importCityList: [], // 进口地址
......@@ -484,6 +515,29 @@ export default {
},
methods: {
handleDefaultChange($index){
// 只有一个联系人,设置成非默认
if (this.form.customerContacts.length === 1 && this.form.customerContacts[0].isDefault === 0){
this.$modal.msgWarning('至少拥有一个默认联系人')
this.form.customerContacts[0].isDefault = 1
return
}
// 设置默认联系人
if (this.form.customerContacts[$index].isDefault === 1) {
// 其他的置否
let i = 0
this.form.customerContacts.forEach(e => {
if (i !== $index){
e.isDefault = 0
}
i++
})
} else {
// 第一个置是
this.form.customerContacts[0].isDefault = 1
}
},
selectBD(){
this.$forceUpdate();
},
......@@ -494,22 +548,35 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
if (this.form.customerContacts.length === 0){
this.$modal.msgError("至少填写一个联系人信息");
return
}
// 修改的提交
if (this.form.id != null) {
this.form.customerContacts.forEach(e => {
e.customerId = this.customerId
})
this.$refs["contactForm"].validate(valid1 => {
this.$refs["form"].validate(valid2 => {
if (!valid1 || !valid2) {
return;
}
if (this.form.customerContacts.length === 0){
this.$modal.msgError("至少填写一个联系人信息");
return
}
// 修改的提交
if (this.form.id != null) {
this.form.customerContacts.forEach(e => {
e.customerId = this.customerId
})
updateCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
updateCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
}).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员')
});
return;
}
// 添加的提交
createCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
......@@ -517,19 +584,8 @@ export default {
}).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员')
});
return;
}
// 添加的提交
createCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
}).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员')
});
});
})
},
/** 表单重置 */
reset() {
......@@ -608,16 +664,24 @@ export default {
// "username": ""
})
},
handleDeleteContact($index){
this.form.customerContacts.splice($index, 1)
if (this.form.customerContacts.length > 0) {
this.$refs['contactForm'].clearValidate()
if (!this.form.customerContacts.find(e => e.isDefault)){
this.form.customerContacts[0].isDefault = 1
}
}
},
getZhongPao(){
// todo 接口不对,应该用list
getZhongPaoPage().then(r => {
r.data.list.forEach(e => {
if(e.type === 1) {
this.form.lightUnit = e.edge
} else if (e.type === 2 || true){ // todo 缺少type
this.form.weightUnit = e.edge
}
})
getZhongPaoBest({
customerId: this.customerId,
// departureId: this.departureId,
// objectiveId: this.objectiveId
}).then(r => {
this.form.weightUnit = r.data.zhongEdge
this.form.lightUnit = r.data.paoEdge
})
}
},
......@@ -639,6 +703,19 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
::v-deep .el-table__cell {
padding-bottom: 0;
.cell {
.el-form-item {
margin-bottom: 9px;
}
.el-form-item__error {
z-index: 1;
padding-top: 0;
top: 32px;
}
}
}
</style>
......@@ -169,7 +169,7 @@
</el-input>
</el-form-item>
<el-form-item v-show="form.status == '3'" label="处理时间" required>
<el-date-picker type="datetime" v-model="form.handleAt"></el-date-picker>
<el-date-picker type="datetime" v-model="form.handleAt" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......
......@@ -136,15 +136,23 @@
<div class="card-name">{{$t('商品信息')}}</div>
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addProduct()" :disabled="!form.lineId"></el-button>
</div>
<el-table :data="productList" border>
<el-table :data="form.prodCreateReqVOList" border class="product-list">
<el-table-column :label="$t('序号')" width="60px" fixed>
<template slot-scope="scope">
{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column :label="$t('中文品名')" width="160px">
<template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="onProductChange(row, $event)" />
<template slot-scope="scope">
<el-form-item label=""
:prop="`prodCreateReqVOList.${scope.$index}.prodId`"
:rules="{
required: true, message: $t('请选择产品'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<product-selector v-model="scope.row.prodId" @change="onProductChange(scope.row, $event)" />
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('英文品名')" width="160px">
......@@ -153,8 +161,16 @@
</template>
</el-table-column>
<el-table-column :label="$t('品牌')" width="100px">
<template slot-scope="{row}">
<dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" />
<template slot-scope="scope">
<el-form-item label=""
:prop="`prodCreateReqVOList.${scope.$index}.brand`"
:rules="{
required: true, message: $t('请选择品牌'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<dict-selector v-model="scope.row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" />
</el-form-item>
</template>
</el-table-column>
......@@ -184,8 +200,16 @@
</template>
</el-table-column>
<el-table-column :label="$t('总货值') + '(RMB)'" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.worth" />
<template slot-scope="scope">
<el-form-item label=""
:prop="`prodCreateReqVOList.${scope.$index}.worth`"
:rules="{
required: true, message: $t('货值不能为空'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<el-input v-model="scope.row.worth" />
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('商品特性')" width="250px">
......@@ -209,7 +233,7 @@
{{$t('运费')}}{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</div>
<div>
{{$t('清关费')}}{{row.fee.clearanceFee}} {{currentcyMap[row.fee.clearanceFeeCurrency]}} / {{unitMap[row.fee.clearanceFeeVolume]}}
{{$t('清关费')}}{{row.fee.oneClearanceFee}} {{currentcyMap[row.fee.clearanceFeeCurrency]}} / {{unitMap[row.fee.clearanceFeeVolume]}}
</div>
</template>
</template>
......@@ -477,7 +501,7 @@ export default {
return {
// 遮罩层
loading: true,
productList:[], // 商品信息
// productList:[], // 商品信息
productAttrList:[], // 商品属性
channelList: [], // 出货取到
routerList: [],
......@@ -494,6 +518,7 @@ export default {
sendstatus:0,
type: [],
isCargoControl: false,
prodCreateReqVOList:[],
},
// 表单校验
rules: {
......@@ -572,7 +597,7 @@ export default {
totalWeight: 0,
totalWorth: 0,
}
this.productList.forEach(item => {
this.form.prodCreateReqVOList.forEach(item => {
sum.totalNum += parseInt(item.num) || 0
sum.totalVolume += parseFloat(item.volume) || 0
sum.totalWeight += parseFloat(item.weight) || 0
......@@ -691,11 +716,11 @@ export default {
getOffer(this.$route.query.id).then(res => {
let formData = res.data
formData.type = formData.type ? formData.type.split(',').filter(item => item != '') : []
this.$set(this, 'form', formData)
formData.prodCreateReqVOList = []
if(res.data.offerProdRespVOList){
res.data.offerProdRespVOList.forEach(item => {
this.addProduct({
formData.prodCreateReqVOList.push({
"goodsType": item.goodsType,
"brand": item.brand,
"unit": item.unit,
......@@ -712,13 +737,13 @@ export default {
})
})
}
this.$set(this, 'form', formData)
// 接口只返回了发货人和收货人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.onContactChoose(data.list.find(item => item.customerContactsId == res.data.consigneeId))
this.contactChooseType = 'consignor'
this.onContactChoose(data.find(item => item.customerContactsId == res.data.consignorId))
this.onContactChoose(data.list.find(item => item.customerContactsId == res.data.consignorId))
})
/* res.data.transportRespVOList.forEach(item => {
let transport = this.transportList.find(t => t.transportId == item.transportId)
......@@ -756,7 +781,7 @@ export default {
}, */
onProductChange(row, 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)
this.$set(this.productNames, product.id, {
titleZh: product.titleZh,
......@@ -779,7 +804,7 @@ export default {
return this.$message.error(this.$t('请先选择路线'))
}
console.log('addProduct', JSON.stringify(data))
this.productList.push(data || {prodAttrArr:[]})
this.form.prodCreateReqVOList.push(data || {prodAttrArr:[]})
},
// 计算商品运费
/* getProductFee(row){
......@@ -821,7 +846,7 @@ export default {
delProduct(index){
this.$confirm(this.$t('确定删除此条内容么?'))
.then(res => {
this.productList.splice(index, 1)
this.form.prodCreateReqVOList.splice(index, 1)
})
},
/** 提交按钮 */
......@@ -831,12 +856,12 @@ export default {
return;
}
this.productList.map(item => {
this.form.prodCreateReqVOList.map(item => {
item.prodAttrIds = item.prodAttrArr.join(',')
item.lineId = this.form.lineId
item.channelId = this.form.channelId
item.transportId = this.form.transportId
item.brandType = item.brand ? 1 : 0
// item.brandType = item.brand ? 1 : 0
})
this.transportList.map(item => {
if(item._enabled){
......@@ -848,7 +873,7 @@ export default {
if (this.form.offerId != null) {
let data = Object.assign({}, this.form, {
transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
prodUpdateReqVOList: this.productList
prodUpdateReqVOList: this.getProductListWithDefaultValue()
})
updateOffer(data).then(response => {
this.$modal.msgSuccess(this.$t("修改成功"));
......@@ -858,7 +883,7 @@ export default {
}
let data = Object.assign({}, this.form, {
transportCreateReqVOList: this.transportList.filter(item => item._enabled),
prodCreateReqVOList: this.productList
prodCreateReqVOList: this.getProductListWithDefaultValue()
})
// 添加的提交
createOffer(data).then(response => {
......@@ -876,10 +901,10 @@ export default {
// 计算商品运费
calculationPrice(){
let calcable = true
if(!this.productList.length) return
this.productList.forEach(item => {
if(!item.weight || !item.prodId){
console.log('重量和产品为选择', item)
if(!this.form.prodCreateReqVOList.length) return
this.form.prodCreateReqVOList.forEach(item => {
if(!item.prodId){
console.log('产品未选择', item)
calcable = false
}
})
......@@ -892,7 +917,7 @@ export default {
lineId: this.form.lineId,
transportId: this.form.transportId,
channelId: this.form.channelId,
prodConditionParamList: this.productList,
prodConditionParamList: this.getProductListWithDefaultValue(),
consigneeCustomerContactsId: this.form.consigneeCustomerContactsId,
consignorCustomerContactsId: this.form.consignorCustomerContactsId,
customsType: this.form.customsType,
......@@ -903,13 +928,26 @@ export default {
this.$set(this, 'couponTotalAmountList', res.data.availableDto.couponTotalAmountList)
this.$set(this, 'couponAvailableGroupDtoList', res.data.availableDto.couponAvailableGroupDtoList)
this.productList.map((item, index) => {
this.form.prodCreateReqVOList.map((item, index) => {
this.$set(item, 'fee', res.data.prodCostDtoList[index] || null)
})
}).finally(() => {
this.calculating = false
})
},
// 体积。件数,数量,重量为选填,但是接口确实必填,所以生成一个副本并赋予默认值
getProductListWithDefaultValue(){
let arr = []
this.form.prodCreateReqVOList.forEach(item => {
let tmp = {...item}
if(!tmp.volume)tmp.volume = 1
if(!tmp.weight)tmp.weight = 1
if(!tmp.quantity)tmp.quantity = 1
if(!tmp.num)tmp.num = 1
arr.push(tmp)
})
return arr
}
}
};
</script>
......@@ -934,4 +972,7 @@ export default {
}
}
::v-deep .product-list .el-form-item__error{
position: static;
}
</style>
\ No newline at end of file
......@@ -74,7 +74,7 @@
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" >
<template slot-scope="scope">
<span>{{ scope.row.orderNo }}</span>
<router-link :to="`detail?orderId=` + scope.row.orderId">{{ scope.row.orderNo }}</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
......
<template>
<el-dialog :title="$t('批量提货')" visible :before-close="closeDialog" :close-on-click-modal="false">
<el-form :model="form">
<el-form ref="form" :model="form" :rules="rules">
<el-tabs v-model="current" type="card">
<el-tab-pane :label="$t('全部提货')" name="createOrderPickupBatch">
<el-form-item :label="$t('订单号') + '/' + this.$t('提单号')" required>
<el-form-item :label="$t('订单号') + '/' + this.$t('提单号')" prop="orderId">
<el-input v-model="form.orderId" :placeholder="$t('例:NA2200001L')"></el-input>
<div>{{$t('注:单号之间使用逗号或空格隔开')}}</div>
</el-form-item>
<el-form-item :label="$t('提货时间')">
<el-form-item :label="$t('提货时间')" prop="pickTime">
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-tab-pane>
......@@ -36,6 +36,10 @@ export default {
pickTime: '',
pickType: 1
},
rules:{
orderId: [{required: true, message: this.$t('请填写单号')}],
pickTime: [{required: true, message: this.$t('请选择时间')}]
}
}
},
computed:{
......@@ -46,22 +50,24 @@ export default {
},
methods:{
submit(){
if(this.form.orderId == '' || this.form.pickTime==''){
return this.$message.error(this.$t('请填写订单号和提货时间'))
}
let orderIdArr = this.form.orderId.replace(/,/g, ' ').split(' ').filter(item => item !='')
let data = []
for(let orderId of orderIdArr){
data.push({
pickType: 1,
orderId,
pickTime: this.form.pickTime
})
}
this.$refs.form.validate().then(() => {
if(this.form.orderId == '' || this.form.pickTime==''){
return this.$message.error(this.$t('请填写订单号和提货时间'))
}
let orderIdArr = this.form.orderId.replace(/,/g, ' ').split(' ').filter(item => item !='')
let data = []
for(let orderId of orderIdArr){
data.push({
pickType: 1,
orderId,
pickTime: this.form.pickTime
})
}
({createOrderPickupBatch, createOrderPickupSplitBatch}[this.current])(data).then(res => {
this.$message.success(this.$t("操作成功"));
this.form.orderId = ''
({createOrderPickupBatch, createOrderPickupSplitBatch}[this.current])(data).then(res => {
this.$message.success(this.$t("操作成功"));
this.$emit('success')
})
})
},
closeDialog(){
......
......@@ -6,7 +6,7 @@
<el-input v-model="cargoControlName" disabled></el-input>
</el-form-item>
<el-form-item :label="$t('原控货手机号')">
<el-input :value="cargoControlPhone" disabled></el-input>
<el-input :value="consigneeCountryCode + ' ' + cargoControlPhone" disabled></el-input>
</el-form-item>
<el-form-item :label="$t('新控货人')" prop="name">
......@@ -49,6 +49,7 @@ export default {
orderId: [String, Number],
cargoControlName: String,
cargoControlPhone: String,
consigneeCountryCode: String,
orderNo: String,
},
......
......@@ -121,9 +121,12 @@
</el-table-column>
<el-table-column prop="" :label="$t('成交单价')" width="220px">
<template slot-scope="{row}">
<template v-if="row.charging ==1">
{{$t('全包价')}} {{row.seaFreight}} {{currentcyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}
<template v-if="!row.seaFreight">未报价</template>
<template>{{$t('全包价')}} {{row.seaFreight}} {{currentcyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</template>
</template>
<template v-else-if="!row.seaFreight && !row.clearanceFreight">未报价</template>
<template v-else>
<div>
{{$t('运费')}}{{row.seaFreight}} {{currentcyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}
......
......@@ -52,36 +52,6 @@
<el-input v-model="form.consigneeEmail" :disabled="form.status !== 0"/>
</el-form-item>
</div>
<!-- <el-descriptions :column="3" border v-if="form.type.indexOf('1') < 0">
<el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('电话')" :labelStyle="labelStyle">
{{consignorContact.areaCode}} {{consignorContact.phoneNew || $t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司')" :labelStyle="labelStyle">
{{consignorContact.company || $t('')}}
</el-descriptions-item>
<el-descriptions-item label="Email" :labelStyle="labelStyle">
{{consignorContact.email || $t('')}}
</el-descriptions-item>
</el-descriptions> -->
<!-- <el-descriptions :column="3" border>
<el-descriptions-item :label="$t('收货人')" :labelStyle="labelStyle" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeContactsId">
<customer-contact-selector v-model="form.consigneeContactsId" @change="consigneeContact = $event" type="2" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('电话')" :labelStyle="labelStyle">
{{consigneeContact.areaCode}} {{consigneeContact.phoneNew || $t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('收货人公司')" :labelStyle="labelStyle">
{{consigneeContact.company || ''}}
</el-descriptions-item>
<el-descriptions-item label="Email" :labelStyle="labelStyle">
{{consigneeContact.email || $t('')}}
</el-descriptions-item>
</el-descriptions> -->
<div class="form-section">
<el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" :disabled="form.status !== 0"/>
......@@ -126,15 +96,23 @@
<el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!form.lineId">{{$t('添加货物')}}</el-button>
<el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!form.lineId">{{$t('批量添加货物')}}</el-button>
</div>
<el-table :data="productList" border>
<el-table :data="form.orderItemVOList" border class="product-list">
<el-table-column :label="$t('序号')" width="60px" fixed>
<template slot-scope="scope">
{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column :label="$t('中文品名')" width="160px">
<template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="onProductChange(row, $event)" :disabled="!form.lineId || !productEditable" />
<template slot-scope="scope">
<el-form-item label=""
:prop="`orderItemVOList.${scope.$index}.prodId`"
:rules="{
required: true, message: $t('请选择产品'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<product-selector v-model="scope.row.prodId" @change="onProductChange(row, $event)" :disabled="!form.lineId || !productEditable" />
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('英文品名')" width="160px">
......@@ -149,8 +127,16 @@
</el-table-column> -->
<el-table-column :label="$t('品牌')" width="100px">
<template slot-scope="{row}">
<dict-selector v-model="row.brandType" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice(row)" :disabled="!form.lineId || !productEditable" />
<template slot-scope="scope">
<el-form-item label=""
:prop="`orderItemVOList.${scope.$index}.brandType`"
:rules="{
required: true, message: $t('请选择品牌'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<dict-selector v-model="scope.row.brandType" :type="DICT_TYPE.ECW_IS_BRAND" defaultable :disabled="!form.lineId || !productEditable" />
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('件数')" width="90px">
......@@ -168,11 +154,6 @@
<el-input v-model="row.quantity" type="number" :disabled="!form.lineId || !productEditable" />
</template>
</el-table-column>
<!-- <el-table-column label="箱规(m)" width="120px">
<template slot-scope="{row}">
<el-input v-model="row.boxGauge" @input="calcVolume(row)" />
</template>
</el-table-column> -->
<el-table-column :label="$t('总体积') + '(m³)'" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.volume" :disabled="!form.lineId || !productEditable" />
......@@ -184,38 +165,26 @@
</template>
</el-table-column>
<el-table-column :label="$t('总货值') + '(RMB)'" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.worth" :disabled="!form.lineId" />
<template slot-scope="scope">
<el-form-item label=""
:prop="`orderItemVOList.${scope.$index}.worth`"
:rules="{
required: true, message: $t('货值不能为空'), trigger: 'blur'
}"
class="mb-0 mr-0"
>
<el-input v-model="scope.row.worth" :disabled="!form.lineId" />
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('商品特性')" width="250px">
<template slot-scope="{row}">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event); calculationPrice(row)" :disabled="!form.lineId || !productEditable">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event)" :disabled="!form.lineId || !productEditable">
<el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{$l(item, 'attrName')}}</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<!-- <el-table-column label="运费" width="200px">
<template slot-scope="{row}">
<template v-if="row.fee && row.fee.charging == 1">
<template v-if="!row.fee.freight">未报价</template>
<template v-else>
全包价:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</template>
</template>
<template v-else-if="!row.fee || (!row.fee.freight && !row.fee.clearanceFee)">未报价</template>
<template v-else-if="row.fee">
<div>
运费:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</div>
<div>
清关费:{{row.fee.clearanceFee}} {{currentcyMap[row.fee.clearanceFeeCurrency]}} / {{unitMap[row.fee.clearanceFeeVolume]}}
</div>
</template>
</template>
</el-table-column> -->
<el-table-column :label="$t('是否预付')">
<template slot-scope="{row}">
<dict-tag v-if="row.fee" :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.fee.isPayAdvance" />
......@@ -329,7 +298,7 @@
<el-form-item label="唛头" prop="marks" >
<el-input v-model="form.marks" placeholder=""></el-input>
</el-form-item>
<el-form-item label="是否控货" prop="marks" class="ml-20">
<el-form-item label="是否控货" prop="isCargoControl" class="ml-20">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCargoControl" form-type="radio" />
</el-form-item>
</div>
......@@ -352,14 +321,50 @@
<el-form-item :label="$t('出单方式')" prop="issuingMethod">
<dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" defaultable />
</el-form-item>
<el-form-item :label="$t('送货日期')" prop="deliveryDate" class="ml-20">
<el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('入仓类型')" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="form.warehouseType" defaultable />
</el-form-item>
</div>
<div>
<el-form-item :label="$t('外部仓库')" prop="warehouseType">
<el-checkbox label="" :checked="!!form.isExternalWarehouse" @change="form.isExternalWarehouse=$event"></el-checkbox>
</el-form-item>
<div v-if="form.isExternalWarehouse" class="pl-50">
<div v-for="(item, index) in form.externalWarehouseDtoList" class="flex" :key="index">
<div class="w-300">
<el-form-item :label="$t('装货时间')"
:prop="'externalWarehouseDtoList.' + index + '.estLoadingTime'"
:rules="{
required: true, message: '装货时间不能为空', trigger: 'blur'
}"
>
<el-date-picker v-model="item.estLoadingTime" value-format="yyyy-MM-dd HH:mm:ss" class="w-200"></el-date-picker>
</el-form-item>
</div>
<div class="w-300 ml-10">
<el-form-item :label="$t('装货地址')"
:prop="'externalWarehouseDtoList.' + index + '.loadingAddress'"
:rules="{
required: true, message: '装货地址不能为空', trigger: 'blur'
}"
>
<el-input v-model="item.loadingAddress" placeholder="" class="w-200"></el-input>
</el-form-item>
<el-button type="primary" icon="el-icon-plus" v-if="index==0" @click="form.externalWarehouseDtoList.push({})"></el-button>
<el-button type="danger" icon="el-icon-delete" v-else-if="index == form.externalWarehouseDtoList.length-1" @click="form.externalWarehouseDtoList.splice(index, 1)"></el-button>
</div>
</div>
</div>
</div>
<div>
<el-form-item :label="$t('预计送货日期')" prop="deliveryDate" class="ml-20">
<el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('收货方式')" prop="harvestMethod" class="ml-20">
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.harvestMethod" :filter="item => item.value == 1 || homeDeliveryService" defaultable />
</el-form-item>
......@@ -444,7 +449,7 @@
<el-form-item label="" style="margin: 30px 0">
<el-button type="primary" @click="submitForm(0)">{{$t('保存')}}</el-button> <!--草稿-->
<el-button type="primary" @click="submitForm(2)">{{$t('新建')}}</el-button> <!--待入仓-->
<el-button type="primary" @click="submitForm(2)" v-if="!form.orderId">{{$t('新建')}}</el-button> <!--待入仓-->
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</el-form-item>
</el-form>
......@@ -489,7 +494,7 @@
</template>
<script>
import { createOrder, updateOrder, getOrder, getProductFeeList, getOrderDetail, getOrderCourierNumber, orderImport, exportPackingList } from "@/api/ecw/order";
import { createOrder, updateOrder, getOrderDetail, getOrderCourierNumber, orderImport, exportPackingList } from "@/api/ecw/order";
import ProductSelector from '@/components/ProductSelector'
import {getProductAttrList} from '@/api/ecw/productAttr'
import {getChannelList} from '@/api/ecw/channel'
......@@ -500,10 +505,7 @@ import {getTradeCityList} from '@/api/ecw/region'
import {getDictData, getDictDatas} from '@/utils/dict'
import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts';
import AreaSelector from '@/components/AreaSelector'
import {calculationPrice} from '@/api/ecw/product'
import {getCustomerAvailableCouponList} from '@/api/ecw/coupon'
import FileUpload from '@/components/FileUpload'
import AreaCodeSelector from '@/components/AreaCodeSelector'
import ChooseContactDialog from '@/components/ChooseContactDialog'
......@@ -519,7 +521,7 @@ export default {
// draweeList: [],
// 遮罩层
loading: true,
productList:[], // 商品信息
//productList:[], // 商品信息
productAttrList:[], // 商品属性
channelList: [], // 出货取到
routerList: [],
......@@ -541,7 +543,10 @@ export default {
status:0,
sendstatus:0,
isCargoControl: false,
type:[]
type:[],
isExternalWarehouse: false,
externalWarehouseDtoList:[{}],
orderItemVOList:[]
},
// 表单校验
rules: {
......@@ -643,7 +648,7 @@ export default {
totalWorth: 0,
totalQuatity: 0
}
this.productList.forEach(item => {
this.form.orderItemVOList.forEach(item => {
sum.totalNum += parseInt(item.num) || 0
sum.totalVolume += (parseFloat(item.volume) || 0) // * (parseInt(item.num) || 0)
sum.totalWeight += (parseFloat(item.weight) || 0) // * (parseInt(item.num) || 0)
......@@ -690,23 +695,14 @@ export default {
this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId)
},
/* // 发货联系人发生变化获取发货客户
consignorContact(){
this.getConsignor()
},
// 收货联系人发生变化获取收货客户
consigneeContact(){
this.getConsignee()
}, */
productList:{
/* 'form.orderItemVOList':{
deep: true,
handler(){
this.productList.map(item => {
this.form.orderItemVOList.map(item => {
item.prodAttrIds = item.prodAttrArr.join(',')
})
this.calculationPrice()
}
},
}, */
fee(){
this.getCoupons()
},
......@@ -729,12 +725,9 @@ export default {
if(this.$route.query.id){
getOrderDetail(this.$route.query.id).then(res => {
this.form = res.data
/* this.form.consignorContactsId = res.data.consignorVO.customerContactsId
this.form.consigneeContactsId = res.data.consigneeVO.customerContactsId */
this.form.orderItemVOList.forEach(item => {
item.prodAttrArr = item.prodAttrIds.split(',').filter(item => item != '')
this.addProduct(Object.assign({}, item))
})
this.form.type = this.form.type ? this.form.type.split(',').filter(item => item != '') : []
this.$set(this.form, 'consignorCompany', res.data.consignorVO.company)
......@@ -770,11 +763,6 @@ export default {
})
},
methods: {
/* onCustomerCreate(customer){
getCustomerContactsListByCustomer({customerId: customer.customerId}).then(res => {
this.onContactChoose(res.data[0])
})
}, */
onContactChoose(contact){
console.log('选择联系人', contact)
if(!this.contactChooseType && !this.quickCreateType) return
......@@ -803,7 +791,7 @@ export default {
addToProductList(){
console.log('addToProductList')
this.importList.forEach(item => {
this.productList.push({
this.form.orderItemVOList.push({
prodId: item.prodId,
brandType: item.brandType,
num: item.num,
......@@ -861,44 +849,10 @@ export default {
},
onProductAttrChange(row, attr){
console.log(attr)
this.calculationPrice(row)
/* // 需要强制刷新,否则勾选框不更新
this.$forceUpdate() */
},
addProduct(data){
this.productList.push(data || {prodAttrArr:[]})
},
// 计算商品运费
calculationPrice(row){
let calcable = true
if(!this.productList.length) return false
this.productList.forEach(item => {
if(!item.weight || !item.prodId){
calcable = false
}
})
if(this.calculating || !calcable) return false
this.calculating = true
console.log('calculationPrice', row)
/* if(!row.prodId || !this.form.transportId || !this.form.lineId)return false
if(row.prodAttrArr){
row.prodAttrIds = row.prodAttrArr.join(',')
} */
calculationPrice({
lineId: this.form.lineId,
transportId: this.form.transportId,
channelId: this.form.channelId,
prodConditionParamList: this.productList //[row]
}).then(res => {
this.$set(this, 'fee', res.data.costDto)
this.productList.map((item, index) => {
this.$set(item, 'fee', res.data.prodCostDtoList[index])
})
}).finally(() => {
this.calculating = false
})
this.form.orderItemVOList.push(data || {prodAttrArr:[]})
},
// 获取路线
getOpenedRouterList(){
......@@ -929,19 +883,7 @@ export default {
delProduct(index){
this.$confirm(this.$t('确定删除此条内容么?'))
.then(res => {
this.productList.splice(index, 1)
})
},
getCoupons(){
if(!this.form.consigneeContactsId || !this.form.consignorContactsId) return false
let data = Object.assign({}, this.form, {
prodConditionParamList: this.productList,
consigneeCustomerContactsId: this.form.consigneeContactsId,
consignorCustomerContactsId: this.form.consignorContactsId
})
getCustomerAvailableCouponList(data)
.then(res => {
this.couponList = res.data
this.form.orderItemVOList.splice(index, 1)
})
},
/** 提交按钮 */
......@@ -952,7 +894,7 @@ export default {
return;
}
this.productList.map(item => {
this.form.orderItemVOList.map(item => {
item.prodAttrIds = item.prodAttrArr.join(',')
})
this.transportList.map(item => {
......@@ -967,7 +909,7 @@ export default {
let data = Object.assign({}, this.form, {
customDraweeVOList: this.customDraweeList,
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.productList,
orderItemVOList: this.getProductListWithDefaultValue(),
couponIds: coupons.join(",")
})
data.type = data.type.join(',')
......@@ -985,7 +927,7 @@ export default {
}, this.form, {
customDraweeVOList: this.customDraweeList,
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.productList,
orderItemVOList: this.getProductListWithDefaultValue(),
status: submitType
})
data.type = data.type.join(',')
......@@ -996,7 +938,19 @@ export default {
});
});
},
// 体积。件数,数量,重量为选填,但是接口确实必填,所以生成一个副本并赋予默认值
getProductListWithDefaultValue(){
let arr = []
this.form.orderItemVOList.forEach(item => {
let tmp = {...item}
if(!tmp.volume)tmp.volume = 1
if(!tmp.weight)tmp.weight = 1
if(!tmp.quantity)tmp.quantity = 1
if(!tmp.num)tmp.num = 1
arr.push(tmp)
})
return arr
}
}
};
</script>
......@@ -1008,13 +962,7 @@ export default {
flex: 1;
}
}
/* .mt-10{
margin-top: 10px;
} */
.form-section{
/* ::v-deep.el-form-item{
width: 30%;
} */
.contact{
display: flex;
align-items: center;
......@@ -1027,4 +975,7 @@ export default {
}
}
::v-deep .product-list .el-form-item__error{
position: static;
}
</style>
\ No newline at end of file
......@@ -241,7 +241,7 @@
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" />
<print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId=null" />
<print-lading-bill v-if="printLadingBillInfo !== null" v-bind="printLadingBillInfo" @close="printLadingBillInfo=null" />
<batch-pickup v-if="showBatchPickup" @close="onBatchClose"/>
<batch-pickup v-if="showBatchPickup" @close="onBatchClose" @success="onBatchClose"/>
<withdrawal v-if="show" :dialog-visible="show" :orderId="orderId" ></withdrawal>
<batch-single-application :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application>
<fee-application :order-id="orderId" :dialog-visible.sync="feeApplicationBol"></fee-application>
......
......@@ -24,7 +24,7 @@
<div class="actions">
<el-button type="primary" @click="$router.replace('detail?orderId=' + order.orderId)">{{$t('查看订单')}}</el-button>
<el-button type="warning" @click="showNotice = true">{{$t('入仓须知')}}</el-button>
<el-button type="info" @click="$router.replace('edit')">{{$t('再来一单')}}</el-button>
<el-button type="info" @click="$router.replace('create')">{{$t('再来一单')}}</el-button>
</div>
<el-dialog :title="$t('查看须知')" :visible.sync="showNotice" width="700px">
......
<template>
<div class="app-container">
<el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px"
<el-form ref="elForm" :model="formData" :rules="rules" inline size="small" label-width="100px"
label-position="left">
<el-form-item :label="$t('公司全称')" prop="companyZh">
<el-input v-model="formData.companyZh" :placeholder="$t('请输入公司全称')" show-word-limit clearable></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 :label="$t('代理名称')" prop="agentName">
<el-input v-model="formData.agentName" :placeholder="$t('请输入代理名称')" clearable :style="{width: '100%'}">
</el-input>
</el-form-item> -->
<el-form-item :label="$t('公司电话')" prop="tell">
<el-input v-model="formData.tell" :placeholder="$t('请输入公司电话')" clearable></el-input>
</el-form-item>
<el-form-item :label="$t('邮件地址')" prop="email">
<el-input v-model="formData.email" :placeholder="$t('请输入邮箱地址')" clearable></el-input>
</el-form-item>
<div>
<el-form-item :label="$t('公司全称')" prop="companyZh">
<el-input v-model="formData.companyZh" :placeholder="$t('请输入公司全称')" show-word-limit clearable></el-input>
</el-form-item>
<el-form-item :label="$t('英文名称')" prop="companyEn">
<el-input v-model="formData.companyEn" :placeholder="$t('请输入公司英文名')" show-word-limit clearable></el-input>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('合作开始时间')" prop="cooperationDateStart">
<el-date-picker v-model="formData.cooperationDateStart" value-format="yyyy-MM-dd HH:mm:ss" clearable></el-date-picker>
</el-form-item>
<el-form-item :label="$t('合作结束时间')" prop="cooperationDateEnd">
<el-date-picker v-model="formData.cooperationDateEnd" value-format="yyyy-MM-dd HH:mm:ss" clearable></el-date-picker>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('公司电话')" prop="tell">
<el-input v-model="formData.tell" :placeholder="$t('请输入公司电话')" clearable></el-input>
</el-form-item>
<el-form-item :label="$t('邮件地址')" prop="email">
<el-input v-model="formData.email" :placeholder="$t('请输入邮箱地址')" clearable></el-input>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('公司地址')" prop="address">
<area-selector
:country="formData.country"
:province="formData.province"
:city="formData.city"
@countryChange="onAreaChange('country', $event)"
@provinceChange="onAreaChange('province', $event)"
@cityChange="onAreaChange('city', $event)"
/>
<el-input v-model="formData.address" :placeholder="$t('请输入详细地址')" class="mt-10"></el-input>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('备注')" prop="remark">
<el-input v-model="formData.remark" type="textarea" :placeholder="$t('请输入备注')"
:autosize="{minRows: 4, maxRows: 4}" class="w-500"></el-input>
</el-form-item>
</div>
<el-form-item :label="$t('公司地址')" prop="address">
<!-- <el-select v-model="formData.country">
<el-option v-for="(item, index) in treeList" :value="item.id" :label="item.titleZh" :key="item.id" />
</el-select>
<el-select v-model="formData.province">
<el-option v-for="(item, index) in provinceList" :value="item.id" :label="item.titleZh" :key="item.id" />
</el-select>
<el-select v-model="formData.city">
<el-option v-for="(item, index) in cityList" :value="item.id" :label="item.titleZh" :key="item.id" />
</el-select> -->
<area-selector
:country="formData.country"
:province="formData.province"
:city="formData.city"
@countryChange="onAreaChange('country', $event)"
@provinceChange="onAreaChange('province', $event)"
@cityChange="onAreaChange('city', $event)"
/>
<el-input v-model="formData.address" :placeholder="$t('请输入详细地址')" class="mt-10"></el-input>
<!-- <el-select v-model="selectedRegionIndex">
<el-option v-for="(item, index) in regionList" :value="index" :label="item.titleZh" :key="item.id" />
</el-select> -->
<!-- <el-select v-model="formData.address" placeholder="请选择下拉选择公司地址" clearable :style="{width: '100%'}">
</el-select> -->
</el-form-item>
<el-form-item :label="$t('备注')" prop="remark">
<el-input v-model="formData.remark" type="textarea" :placeholder="$t('请输入备注')"
:autosize="{minRows: 4, maxRows: 4}" :style="{width: '100%'}"></el-input>
</el-form-item>
<el-form-item label-width="0" prop="field110">
<table-form :title="$t('联系人')" :fields="[
{ label: this.$t('部门'), field: 'department'},
{ label: this.$t('职位'), field: 'position'},
{ label: this.$t('名称') + '*', field: 'name', required: true},
{ label: this.$t('电话') + '*', field: 'phone', required: true},
]" v-model="formData.contactList">
</table-form>
</el-form-item>
<el-form-item :label="$t('供应商类别')" prop="companyType">
<!-- <el-checkbox-group v-model="formData.companyType" size="medium">
<el-checkbox v-for="(item, index) in companyTypeOptions" :key="index" :label="item.value"
:disabled="item.disabled">{{item.label}}</el-checkbox>
</el-checkbox-group> -->
<dict-selector v-model="formData.companyType" type="company_type" multiple />
</el-form-item>
<el-form-item :label="$t('合作类型')" prop="cooperationType">
<dict-selector v-model="formData.cooperationType" type="cooperation_type" />
</el-form-item>
<el-form-item :label="$t('营业执照')" prop="license">
<upload v-model="formData.license" />
<!-- <el-upload ref="license" :file-list="licensefileList" :action="licenseAction"
:before-upload="licenseBeforeUpload">
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
</el-upload> -->
</el-form-item>
<el-form-item :label="$t('合同')" prop="contract">
<upload v-model="formData.contract" />
<!-- <el-upload ref="contract" :file-list="contractfileList" :action="contractAction"
:before-upload="contractBeforeUpload">
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
</el-upload> -->
</el-form-item>
<el-form-item :label="$t('统一信用代码')" prop="licenseNumber">
<el-input v-model="formData.licenseNumber" :placeholder="$t('请输入统一社会信用代码')" clearable
:style="{width: '100%'}"></el-input>
</el-form-item>
<el-form-item label-width="0" prop="field110">
<table-form :title="$t('银行信息')" :fields="[
{ label: this.$t('账户名称') + '*', field: 'accountName', required: true},
{ label: this.$t('币别') + '*', field: 'currency', required: true},
{ label: this.$t('银行名称*'), field: 'bankName', required: true},
{ label: this.$t('银行账户') + '*', field: 'bankAccount', required: true},
{ label: this.$t('银行代码'), field: 'bankCode'},
{ label: this.$t('账户类型'), field: 'accountType'},
{ label: this.$t('银行地址'), field: 'bankAddress'},
]" v-model="formData.bankList">
</table-form>
</el-form-item>
<div>
<el-form-item :label="$t('供应商类别')" prop="companyType">
<dict-selector v-model="formData.companyType" type="company_type" multiple />
</el-form-item>
<el-form-item :label="$t('合作类型')" prop="cooperationType">
<dict-selector v-model="formData.cooperationType" type="cooperation_type" />
</el-form-item>
</div>
<div>
<el-form-item :label="$t('营业执照')" prop="license">
<upload v-model="formData.license" />
</el-form-item>
<el-form-item :label="$t('合同')" prop="contract">
<upload v-model="formData.contract" />
</el-form-item>
</div>
<div>
<el-form-item :label="$t('统一信用代码')" prop="licenseNumber">
<el-input v-model="formData.licenseNumber" :placeholder="$t('请输入统一社会信用代码')" clearable
:style="{width: '100%'}"></el-input>
</el-form-item>
</div>
<div>
<el-form-item label-width="0">
<table-form :title="$t('联系人')" :fields="[
{ label: this.$t('部门'), field: 'department'},
{ label: this.$t('职位'), field: 'position'},
{ label: this.$t('名称'), field: 'name', required: true},
{ label: this.$t('电话'), field: 'phone', required: true},
]" v-model="formData.contactList" class="w-1000">
</table-form>
</el-form-item>
</div>
<div>
<el-form-item label-width="0" prop="field110">
<table-form :title="$t('银行信息')" :fields="[
{ label: this.$t('账户名称'), field: 'accountName', required: true},
{ label: this.$t('币别') , field: 'currency', tag: 'selector', attr: currentcyAttr, required: true},
{ label: this.$t('银行名称'), field: 'bankName', required: true},
{ label: this.$t('银行账户'), field: 'bankAccount', required: true},
{ label: this.$t('银行代码'), field: 'bankCode'},
{ label: this.$t('账户类型'), field: 'accountType'},
{ label: this.$t('银行地址'), field: 'bankAddress'},
{ label: this.$t('状态'), field: 'status', tag:'el-switch', attrs: bankStatusAttr},
{label: this.$t('操作'), buttons: [
{
type: 'danger',
text: '删除',
hander: delBank
}
]}
]" v-model="formData.bankList" class="w-1000">
</table-form>
</el-form-item>
</div>
<el-form-item size="large">
<el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button>
<el-button @click="resetForm">{{$t('重置')}}</el-button>
......@@ -153,7 +158,12 @@ export default {
},
treeList:[],
provinceList:[],
cityList:[]
cityList:[],
bankStatusAttr:{
"active-value":1,
"inactive-value": 0
},
currentcyAttr: []
}
},
computed: {
......@@ -192,6 +202,9 @@ export default {
},
mounted() {},
methods: {
delBank(){
console.log('删除银行卡')
},
onAreaChange(type, val){
this.$set(this.formData, type, val)
},
......@@ -214,7 +227,7 @@ export default {
// 添加的提交
createSupplier(data).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"));
this.$router.back()
this.$router.replace('supplier')
});
});
},
......
......@@ -7,7 +7,7 @@
<line-chart :chart-data="lineChartData" />
</el-row>
<el-row>
<!-- <el-row>
<el-col :span="12">
<ueditor v-model="html" />
</el-col>
......@@ -25,7 +25,7 @@
<el-row>
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
</el-row>
</el-row> -->
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
......
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